@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
|
@@ -0,0 +1,448 @@
|
|
|
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 h of f.addedNodes)h.tagName==="LINK"&&h.rel==="modulepreload"&&r(h)}).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 f0(c){return c&&c.__esModule&&Object.prototype.hasOwnProperty.call(c,"default")?c.default:c}var eu={exports:{}},Wn={};/**
|
|
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 km;function gg(){if(km)return Wn;km=1;var c=Symbol.for("react.transitional.element"),o=Symbol.for("react.fragment");function d(r,x,f){var h=null;if(f!==void 0&&(h=""+f),x.key!==void 0&&(h=""+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:h,ref:x!==void 0?x:null,props:f}}return Wn.Fragment=o,Wn.jsx=d,Wn.jsxs=d,Wn}var Hm;function pg(){return Hm||(Hm=1,eu.exports=gg()),eu.exports}var n=pg(),tu={exports:{}},re={};/**
|
|
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 Bm;function vg(){if(Bm)return re;Bm=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"),h=Symbol.for("react.context"),v=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),g=Symbol.for("react.memo"),w=Symbol.for("react.lazy"),S=Symbol.for("react.activity"),z=Symbol.iterator;function O(y){return y===null||typeof y!="object"?null:(y=z&&y[z]||y["@@iterator"],typeof y=="function"?y:null)}var k={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},T=Object.assign,A={};function V(y,Q,W){this.props=y,this.context=Q,this.refs=A,this.updater=W||k}V.prototype.isReactComponent={},V.prototype.setState=function(y,Q){if(typeof y!="object"&&typeof y!="function"&&y!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,y,Q,"setState")},V.prototype.forceUpdate=function(y){this.updater.enqueueForceUpdate(this,y,"forceUpdate")};function H(){}H.prototype=V.prototype;function L(y,Q,W){this.props=y,this.context=Q,this.refs=A,this.updater=W||k}var J=L.prototype=new H;J.constructor=L,T(J,V.prototype),J.isPureReactComponent=!0;var q=Array.isArray;function C(){}var G={H:null,A:null,T:null,S:null},F=Object.prototype.hasOwnProperty;function I(y,Q,W){var P=W.ref;return{$$typeof:c,type:y,key:Q,ref:P!==void 0?P:null,props:W}}function $(y,Q){return I(y.type,Q,y.props)}function he(y){return typeof y=="object"&&y!==null&&y.$$typeof===c}function je(y){var Q={"=":"=0",":":"=2"};return"$"+y.replace(/[=:]/g,function(W){return Q[W]})}var De=/\/+/g;function Ve(y,Q){return typeof y=="object"&&y!==null&&y.key!=null?je(""+y.key):Q.toString(36)}function Ye(y){switch(y.status){case"fulfilled":return y.value;case"rejected":throw y.reason;default:switch(typeof y.status=="string"?y.then(C,C):(y.status="pending",y.then(function(Q){y.status==="pending"&&(y.status="fulfilled",y.value=Q)},function(Q){y.status==="pending"&&(y.status="rejected",y.reason=Q)})),y.status){case"fulfilled":return y.value;case"rejected":throw y.reason}}throw y}function U(y,Q,W,P,ie){var ue=typeof y;(ue==="undefined"||ue==="boolean")&&(y=null);var oe=!1;if(y===null)oe=!0;else switch(ue){case"bigint":case"string":case"number":oe=!0;break;case"object":switch(y.$$typeof){case c:case o:oe=!0;break;case w:return oe=y._init,U(oe(y._payload),Q,W,P,ie)}}if(oe)return ie=ie(y),oe=P===""?"."+Ve(y,0):P,q(ie)?(W="",oe!=null&&(W=oe.replace(De,"$&/")+"/"),U(ie,Q,W,"",function(ln){return ln})):ie!=null&&(he(ie)&&(ie=$(ie,W+(ie.key==null||y&&y.key===ie.key?"":(""+ie.key).replace(De,"$&/")+"/")+oe)),Q.push(ie)),1;oe=0;var He=P===""?".":P+":";if(q(y))for(var Be=0;Be<y.length;Be++)P=y[Be],ue=He+Ve(P,Be),oe+=U(P,Q,W,ue,ie);else if(Be=O(y),typeof Be=="function")for(y=Be.call(y),Be=0;!(P=y.next()).done;)P=P.value,ue=He+Ve(P,Be++),oe+=U(P,Q,W,ue,ie);else if(ue==="object"){if(typeof y.then=="function")return U(Ye(y),Q,W,P,ie);throw Q=String(y),Error("Objects are not valid as a React child (found: "+(Q==="[object Object]"?"object with keys {"+Object.keys(y).join(", ")+"}":Q)+"). If you meant to render a collection of children, use an array instead.")}return oe}function Z(y,Q,W){if(y==null)return y;var P=[],ie=0;return U(y,P,"","",function(ue){return Q.call(W,ue,ie++)}),P}function te(y){if(y._status===-1){var Q=y._result;Q=Q(),Q.then(function(W){(y._status===0||y._status===-1)&&(y._status=1,y._result=W)},function(W){(y._status===0||y._status===-1)&&(y._status=2,y._result=W)}),y._status===-1&&(y._status=0,y._result=Q)}if(y._status===1)return y._result.default;throw y._result}var K=typeof reportError=="function"?reportError:function(y){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var Q=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof y=="object"&&y!==null&&typeof y.message=="string"?String(y.message):String(y),error:y});if(!window.dispatchEvent(Q))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",y);return}console.error(y)},ce={map:Z,forEach:function(y,Q,W){Z(y,function(){Q.apply(this,arguments)},W)},count:function(y){var Q=0;return Z(y,function(){Q++}),Q},toArray:function(y){return Z(y,function(Q){return Q})||[]},only:function(y){if(!he(y))throw Error("React.Children.only expected to receive a single React element child.");return y}};return re.Activity=S,re.Children=ce,re.Component=V,re.Fragment=d,re.Profiler=x,re.PureComponent=L,re.StrictMode=r,re.Suspense=p,re.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=G,re.__COMPILER_RUNTIME={__proto__:null,c:function(y){return G.H.useMemoCache(y)}},re.cache=function(y){return function(){return y.apply(null,arguments)}},re.cacheSignal=function(){return null},re.cloneElement=function(y,Q,W){if(y==null)throw Error("The argument must be a React element, but you passed "+y+".");var P=T({},y.props),ie=y.key;if(Q!=null)for(ue in Q.key!==void 0&&(ie=""+Q.key),Q)!F.call(Q,ue)||ue==="key"||ue==="__self"||ue==="__source"||ue==="ref"&&Q.ref===void 0||(P[ue]=Q[ue]);var ue=arguments.length-2;if(ue===1)P.children=W;else if(1<ue){for(var oe=Array(ue),He=0;He<ue;He++)oe[He]=arguments[He+2];P.children=oe}return I(y.type,ie,P)},re.createContext=function(y){return y={$$typeof:h,_currentValue:y,_currentValue2:y,_threadCount:0,Provider:null,Consumer:null},y.Provider=y,y.Consumer={$$typeof:f,_context:y},y},re.createElement=function(y,Q,W){var P,ie={},ue=null;if(Q!=null)for(P in Q.key!==void 0&&(ue=""+Q.key),Q)F.call(Q,P)&&P!=="key"&&P!=="__self"&&P!=="__source"&&(ie[P]=Q[P]);var oe=arguments.length-2;if(oe===1)ie.children=W;else if(1<oe){for(var He=Array(oe),Be=0;Be<oe;Be++)He[Be]=arguments[Be+2];ie.children=He}if(y&&y.defaultProps)for(P in oe=y.defaultProps,oe)ie[P]===void 0&&(ie[P]=oe[P]);return I(y,ue,ie)},re.createRef=function(){return{current:null}},re.forwardRef=function(y){return{$$typeof:v,render:y}},re.isValidElement=he,re.lazy=function(y){return{$$typeof:w,_payload:{_status:-1,_result:y},_init:te}},re.memo=function(y,Q){return{$$typeof:g,type:y,compare:Q===void 0?null:Q}},re.startTransition=function(y){var Q=G.T,W={};G.T=W;try{var P=y(),ie=G.S;ie!==null&&ie(W,P),typeof P=="object"&&P!==null&&typeof P.then=="function"&&P.then(C,K)}catch(ue){K(ue)}finally{Q!==null&&W.types!==null&&(Q.types=W.types),G.T=Q}},re.unstable_useCacheRefresh=function(){return G.H.useCacheRefresh()},re.use=function(y){return G.H.use(y)},re.useActionState=function(y,Q,W){return G.H.useActionState(y,Q,W)},re.useCallback=function(y,Q){return G.H.useCallback(y,Q)},re.useContext=function(y){return G.H.useContext(y)},re.useDebugValue=function(){},re.useDeferredValue=function(y,Q){return G.H.useDeferredValue(y,Q)},re.useEffect=function(y,Q){return G.H.useEffect(y,Q)},re.useEffectEvent=function(y){return G.H.useEffectEvent(y)},re.useId=function(){return G.H.useId()},re.useImperativeHandle=function(y,Q,W){return G.H.useImperativeHandle(y,Q,W)},re.useInsertionEffect=function(y,Q){return G.H.useInsertionEffect(y,Q)},re.useLayoutEffect=function(y,Q){return G.H.useLayoutEffect(y,Q)},re.useMemo=function(y,Q){return G.H.useMemo(y,Q)},re.useOptimistic=function(y,Q){return G.H.useOptimistic(y,Q)},re.useReducer=function(y,Q,W){return G.H.useReducer(y,Q,W)},re.useRef=function(y){return G.H.useRef(y)},re.useState=function(y){return G.H.useState(y)},re.useSyncExternalStore=function(y,Q,W){return G.H.useSyncExternalStore(y,Q,W)},re.useTransition=function(){return G.H.useTransition()},re.version="19.2.4",re}var Lm;function pu(){return Lm||(Lm=1,tu.exports=vg()),tu.exports}var j=pu();const Xe=f0(j);var lu={exports:{}},Fn={},au={exports:{}},nu={};/**
|
|
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 bg(){return qm||(qm=1,(function(c){function o(U,Z){var te=U.length;U.push(Z);e:for(;0<te;){var K=te-1>>>1,ce=U[K];if(0<x(ce,Z))U[K]=Z,U[te]=ce,te=K;else break e}}function d(U){return U.length===0?null:U[0]}function r(U){if(U.length===0)return null;var Z=U[0],te=U.pop();if(te!==Z){U[0]=te;e:for(var K=0,ce=U.length,y=ce>>>1;K<y;){var Q=2*(K+1)-1,W=U[Q],P=Q+1,ie=U[P];if(0>x(W,te))P<ce&&0>x(ie,W)?(U[K]=ie,U[P]=te,K=P):(U[K]=W,U[Q]=te,K=Q);else if(P<ce&&0>x(ie,te))U[K]=ie,U[P]=te,K=P;else break e}}return Z}function x(U,Z){var te=U.sortIndex-Z.sortIndex;return te!==0?te:U.id-Z.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 h=Date,v=h.now();c.unstable_now=function(){return h.now()-v}}var p=[],g=[],w=1,S=null,z=3,O=!1,k=!1,T=!1,A=!1,V=typeof setTimeout=="function"?setTimeout:null,H=typeof clearTimeout=="function"?clearTimeout:null,L=typeof setImmediate<"u"?setImmediate:null;function J(U){for(var Z=d(g);Z!==null;){if(Z.callback===null)r(g);else if(Z.startTime<=U)r(g),Z.sortIndex=Z.expirationTime,o(p,Z);else break;Z=d(g)}}function q(U){if(T=!1,J(U),!k)if(d(p)!==null)k=!0,C||(C=!0,je());else{var Z=d(g);Z!==null&&Ye(q,Z.startTime-U)}}var C=!1,G=-1,F=5,I=-1;function $(){return A?!0:!(c.unstable_now()-I<F)}function he(){if(A=!1,C){var U=c.unstable_now();I=U;var Z=!0;try{e:{k=!1,T&&(T=!1,H(G),G=-1),O=!0;var te=z;try{t:{for(J(U),S=d(p);S!==null&&!(S.expirationTime>U&&$());){var K=S.callback;if(typeof K=="function"){S.callback=null,z=S.priorityLevel;var ce=K(S.expirationTime<=U);if(U=c.unstable_now(),typeof ce=="function"){S.callback=ce,J(U),Z=!0;break t}S===d(p)&&r(p),J(U)}else r(p);S=d(p)}if(S!==null)Z=!0;else{var y=d(g);y!==null&&Ye(q,y.startTime-U),Z=!1}}break e}finally{S=null,z=te,O=!1}Z=void 0}}finally{Z?je():C=!1}}}var je;if(typeof L=="function")je=function(){L(he)};else if(typeof MessageChannel<"u"){var De=new MessageChannel,Ve=De.port2;De.port1.onmessage=he,je=function(){Ve.postMessage(null)}}else je=function(){V(he,0)};function Ye(U,Z){G=V(function(){U(c.unstable_now())},Z)}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(U){U.callback=null},c.unstable_forceFrameRate=function(U){0>U||125<U?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):F=0<U?Math.floor(1e3/U):5},c.unstable_getCurrentPriorityLevel=function(){return z},c.unstable_next=function(U){switch(z){case 1:case 2:case 3:var Z=3;break;default:Z=z}var te=z;z=Z;try{return U()}finally{z=te}},c.unstable_requestPaint=function(){A=!0},c.unstable_runWithPriority=function(U,Z){switch(U){case 1:case 2:case 3:case 4:case 5:break;default:U=3}var te=z;z=U;try{return Z()}finally{z=te}},c.unstable_scheduleCallback=function(U,Z,te){var K=c.unstable_now();switch(typeof te=="object"&&te!==null?(te=te.delay,te=typeof te=="number"&&0<te?K+te:K):te=K,U){case 1:var ce=-1;break;case 2:ce=250;break;case 5:ce=1073741823;break;case 4:ce=1e4;break;default:ce=5e3}return ce=te+ce,U={id:w++,callback:Z,priorityLevel:U,startTime:te,expirationTime:ce,sortIndex:-1},te>K?(U.sortIndex=te,o(g,U),d(p)===null&&U===d(g)&&(T?(H(G),G=-1):T=!0,Ye(q,te-K))):(U.sortIndex=ce,o(p,U),k||O||(k=!0,C||(C=!0,je()))),U},c.unstable_shouldYield=$,c.unstable_wrapCallback=function(U){var Z=z;return function(){var te=z;z=Z;try{return U.apply(this,arguments)}finally{z=te}}}})(nu)),nu}var Ym;function yg(){return Ym||(Ym=1,au.exports=bg()),au.exports}var su={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 Gm;function jg(){if(Gm)return it;Gm=1;var c=pu();function o(p){var g="https://react.dev/errors/"+p;if(1<arguments.length){g+="?args[]="+encodeURIComponent(arguments[1]);for(var w=2;w<arguments.length;w++)g+="&args[]="+encodeURIComponent(arguments[w])}return"Minified React error #"+p+"; visit "+g+" 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(p,g,w){var S=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:x,key:S==null?null:""+S,children:p,containerInfo:g,implementation:w}}var h=c.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function v(p,g){if(p==="font")return"";if(typeof g=="string")return g==="use-credentials"?g:""}return it.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,it.createPortal=function(p,g){var w=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!g||g.nodeType!==1&&g.nodeType!==9&&g.nodeType!==11)throw Error(o(299));return f(p,g,null,w)},it.flushSync=function(p){var g=h.T,w=r.p;try{if(h.T=null,r.p=2,p)return p()}finally{h.T=g,r.p=w,r.d.f()}},it.preconnect=function(p,g){typeof p=="string"&&(g?(g=g.crossOrigin,g=typeof g=="string"?g==="use-credentials"?g:"":void 0):g=null,r.d.C(p,g))},it.prefetchDNS=function(p){typeof p=="string"&&r.d.D(p)},it.preinit=function(p,g){if(typeof p=="string"&&g&&typeof g.as=="string"){var w=g.as,S=v(w,g.crossOrigin),z=typeof g.integrity=="string"?g.integrity:void 0,O=typeof g.fetchPriority=="string"?g.fetchPriority:void 0;w==="style"?r.d.S(p,typeof g.precedence=="string"?g.precedence:void 0,{crossOrigin:S,integrity:z,fetchPriority:O}):w==="script"&&r.d.X(p,{crossOrigin:S,integrity:z,fetchPriority:O,nonce:typeof g.nonce=="string"?g.nonce:void 0})}},it.preinitModule=function(p,g){if(typeof p=="string")if(typeof g=="object"&&g!==null){if(g.as==null||g.as==="script"){var w=v(g.as,g.crossOrigin);r.d.M(p,{crossOrigin:w,integrity:typeof g.integrity=="string"?g.integrity:void 0,nonce:typeof g.nonce=="string"?g.nonce:void 0})}}else g==null&&r.d.M(p)},it.preload=function(p,g){if(typeof p=="string"&&typeof g=="object"&&g!==null&&typeof g.as=="string"){var w=g.as,S=v(w,g.crossOrigin);r.d.L(p,w,{crossOrigin:S,integrity:typeof g.integrity=="string"?g.integrity:void 0,nonce:typeof g.nonce=="string"?g.nonce:void 0,type:typeof g.type=="string"?g.type:void 0,fetchPriority:typeof g.fetchPriority=="string"?g.fetchPriority:void 0,referrerPolicy:typeof g.referrerPolicy=="string"?g.referrerPolicy:void 0,imageSrcSet:typeof g.imageSrcSet=="string"?g.imageSrcSet:void 0,imageSizes:typeof g.imageSizes=="string"?g.imageSizes:void 0,media:typeof g.media=="string"?g.media:void 0})}},it.preloadModule=function(p,g){if(typeof p=="string")if(g){var w=v(g.as,g.crossOrigin);r.d.m(p,{as:typeof g.as=="string"&&g.as!=="script"?g.as:void 0,crossOrigin:w,integrity:typeof g.integrity=="string"?g.integrity:void 0})}else r.d.m(p)},it.requestFormReset=function(p){r.d.r(p)},it.unstable_batchedUpdates=function(p,g){return p(g)},it.useFormState=function(p,g,w){return h.H.useFormState(p,g,w)},it.useFormStatus=function(){return h.H.useHostTransitionStatus()},it.version="19.2.4",it}var Qm;function Ng(){if(Qm)return su.exports;Qm=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(),su.exports=jg(),su.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 Xm;function Sg(){if(Xm)return Fn;Xm=1;var c=yg(),o=pu(),d=Ng();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 h(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 p(e){if(f(e)!==e)throw Error(r(188))}function g(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 p(s),e;if(i===a)return p(s),t;i=i.sibling}throw Error(r(188))}if(l.return!==a.return)l=s,a=i;else{for(var u=!1,m=s.child;m;){if(m===l){u=!0,l=s,a=i;break}if(m===a){u=!0,a=s,l=i;break}m=m.sibling}if(!u){for(m=i.child;m;){if(m===l){u=!0,l=i,a=s;break}if(m===a){u=!0,a=i,l=s;break}m=m.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 w(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=w(e),t!==null)return t;e=e.sibling}return null}var S=Object.assign,z=Symbol.for("react.element"),O=Symbol.for("react.transitional.element"),k=Symbol.for("react.portal"),T=Symbol.for("react.fragment"),A=Symbol.for("react.strict_mode"),V=Symbol.for("react.profiler"),H=Symbol.for("react.consumer"),L=Symbol.for("react.context"),J=Symbol.for("react.forward_ref"),q=Symbol.for("react.suspense"),C=Symbol.for("react.suspense_list"),G=Symbol.for("react.memo"),F=Symbol.for("react.lazy"),I=Symbol.for("react.activity"),$=Symbol.for("react.memo_cache_sentinel"),he=Symbol.iterator;function je(e){return e===null||typeof e!="object"?null:(e=he&&e[he]||e["@@iterator"],typeof e=="function"?e:null)}var De=Symbol.for("react.client.reference");function Ve(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===De?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case T:return"Fragment";case V:return"Profiler";case A:return"StrictMode";case q:return"Suspense";case C:return"SuspenseList";case I:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case k:return"Portal";case L:return e.displayName||"Context";case H:return(e._context.displayName||"Context")+".Consumer";case J:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case G:return t=e.displayName||null,t!==null?t:Ve(e.type)||"Memo";case F:t=e._payload,e=e._init;try{return Ve(e(t))}catch{}}return null}var Ye=Array.isArray,U=o.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Z=d.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,te={pending:!1,data:null,method:null,action:null},K=[],ce=-1;function y(e){return{current:e}}function Q(e){0>ce||(e.current=K[ce],K[ce]=null,ce--)}function W(e,t){ce++,K[ce]=e.current,e.current=t}var P=y(null),ie=y(null),ue=y(null),oe=y(null);function He(e,t){switch(W(ue,t),W(ie,e),W(P,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?sm(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=sm(t),e=im(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}Q(P),W(P,e)}function Be(){Q(P),Q(ie),Q(ue)}function ln(e){e.memoizedState!==null&&W(oe,e);var t=P.current,l=im(t,e.type);t!==l&&(W(ie,e),W(P,l))}function ns(e){ie.current===e&&(Q(P),Q(ie)),oe.current===e&&(Q(oe),Zn._currentValue=te)}var ki,Du;function $l(e){if(ki===void 0)try{throw Error()}catch(l){var t=l.stack.trim().match(/\n( *(at )?)/);ki=t&&t[1]||"",Du=-1<l.stack.indexOf(`
|
|
42
|
+
at`)?" (<anonymous>)":-1<l.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
43
|
+
`+ki+e+Du}var Hi=!1;function Bi(e,t){if(!e||Hi)return"";Hi=!0;var l=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var a={DetermineComponentFrameRoot:function(){try{if(t){var X=function(){throw Error()};if(Object.defineProperty(X.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(X,[])}catch(D){var M=D}Reflect.construct(e,[],X)}else{try{X.call()}catch(D){M=D}e.call(X.prototype)}}else{try{throw Error()}catch(D){M=D}(X=e())&&typeof X.catch=="function"&&X.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],m=i[1];if(u&&m){var b=u.split(`
|
|
44
|
+
`),R=m.split(`
|
|
45
|
+
`);for(s=a=0;a<b.length&&!b[a].includes("DetermineComponentFrameRoot");)a++;for(;s<R.length&&!R[s].includes("DetermineComponentFrameRoot");)s++;if(a===b.length||s===R.length)for(a=b.length-1,s=R.length-1;1<=a&&0<=s&&b[a]!==R[s];)s--;for(;1<=a&&0<=s;a--,s--)if(b[a]!==R[s]){if(a!==1||s!==1)do if(a--,s--,0>s||b[a]!==R[s]){var B=`
|
|
46
|
+
`+b[a].replace(" at new "," at ");return e.displayName&&B.includes("<anonymous>")&&(B=B.replace("<anonymous>",e.displayName)),B}while(1<=a&&0<=s);break}}}finally{Hi=!1,Error.prepareStackTrace=l}return(l=e?e.displayName||e.name:"")?$l(l):""}function $0(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 Bi(e.type,!1);case 11:return Bi(e.type.render,!1);case 1:return Bi(e.type,!0);case 31:return $l("Activity");default:return""}}function Ou(e){try{var t="",l=null;do t+=$0(e,l),l=e,e=e.return;while(e);return t}catch(a){return`
|
|
47
|
+
Error generating stack: `+a.message+`
|
|
48
|
+
`+a.stack}}var Li=Object.prototype.hasOwnProperty,qi=c.unstable_scheduleCallback,Yi=c.unstable_cancelCallback,K0=c.unstable_shouldYield,J0=c.unstable_requestPaint,pt=c.unstable_now,W0=c.unstable_getCurrentPriorityLevel,Uu=c.unstable_ImmediatePriority,ku=c.unstable_UserBlockingPriority,ss=c.unstable_NormalPriority,F0=c.unstable_LowPriority,Hu=c.unstable_IdlePriority,I0=c.log,P0=c.unstable_setDisableYieldValue,an=null,vt=null;function vl(e){if(typeof I0=="function"&&P0(e),vt&&typeof vt.setStrictMode=="function")try{vt.setStrictMode(an,e)}catch{}}var bt=Math.clz32?Math.clz32:lh,eh=Math.log,th=Math.LN2;function lh(e){return e>>>=0,e===0?32:31-(eh(e)/th|0)|0}var is=256,cs=262144,rs=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 us(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 m=a&134217727;return m!==0?(a=m&~i,a!==0?s=Kl(a):(u&=m,u!==0?s=Kl(u):l||(l=m&~e,l!==0&&(s=Kl(l))))):(m=a&~i,m!==0?s=Kl(m):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 nn(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function ah(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 Bu(){var e=rs;return rs<<=1,(rs&62914560)===0&&(rs=4194304),e}function Gi(e){for(var t=[],l=0;31>l;l++)t.push(e);return t}function sn(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function nh(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 m=e.entanglements,b=e.expirationTimes,R=e.hiddenUpdates;for(l=u&~l;0<l;){var B=31-bt(l),X=1<<B;m[B]=0,b[B]=-1;var M=R[B];if(M!==null)for(R[B]=null,B=0;B<M.length;B++){var D=M[B];D!==null&&(D.lane&=-536870913)}l&=~X}a!==0&&Lu(e,a,0),i!==0&&s===0&&e.tag!==0&&(e.suspendedLanes|=i&~(u&~t))}function Lu(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 Yu(e,t){var l=t&-t;return l=(l&42)!==0?1:Qi(l),(l&(e.suspendedLanes|t))!==0?0:l}function Qi(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 Xi(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Gu(){var e=Z.p;return e!==0?e:(e=window.event,e===void 0?32:_m(e.type))}function Qu(e,t){var l=Z.p;try{return Z.p=e,t()}finally{Z.p=l}}var bl=Math.random().toString(36).slice(2),tt="__reactFiber$"+bl,ut="__reactProps$"+bl,ha="__reactContainer$"+bl,Vi="__reactEvents$"+bl,sh="__reactListeners$"+bl,ih="__reactHandles$"+bl,Xu="__reactResources$"+bl,cn="__reactMarker$"+bl;function Zi(e){delete e[tt],delete e[ut],delete e[Vi],delete e[sh],delete e[ih]}function xa(e){var t=e[tt];if(t)return t;for(var l=e.parentNode;l;){if(t=l[ha]||l[tt]){if(l=t.alternate,t.child!==null||l!==null&&l.child!==null)for(e=mm(e);e!==null;){if(l=e[tt])return l;e=mm(e)}return t}e=l,l=e.parentNode}return null}function ga(e){if(e=e[tt]||e[ha]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function rn(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(r(33))}function pa(e){var t=e[Xu];return t||(t=e[Xu]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function Pe(e){e[cn]=!0}var Vu=new Set,Zu={};function Jl(e,t){va(e,t),va(e+"Capture",t)}function va(e,t){for(Zu[e]=t,e=0;e<t.length;e++)Vu.add(t[e])}var ch=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]*$"),$u={},Ku={};function rh(e){return Li.call(Ku,e)?!0:Li.call($u,e)?!1:ch.test(e)?Ku[e]=!0:($u[e]=!0,!1)}function os(e,t,l){if(rh(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 ds(e,t,l){if(l===null)e.removeAttribute(t);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+l)}}function Wt(e,t,l,a){if(a===null)e.removeAttribute(l);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(l);return}e.setAttributeNS(t,l,""+a)}}function At(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Ju(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function uh(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 $i(e){if(!e._valueTracker){var t=Ju(e)?"checked":"value";e._valueTracker=uh(e,t,""+e[t])}}function Wu(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var l=t.getValue(),a="";return e&&(a=Ju(e)?e.checked?"true":"false":e.value),e=a,e!==l?(t.setValue(e),!0):!1}function fs(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 oh=/[\n"\\]/g;function _t(e){return e.replace(oh,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Ki(e,t,l,a,s,i,u,m){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?Ji(e,u,At(t)):l!=null?Ji(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"),m!=null&&typeof m!="function"&&typeof m!="symbol"&&typeof m!="boolean"?e.name=""+At(m):e.removeAttribute("name")}function Fu(e,t,l,a,s,i,u,m){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)){$i(e);return}l=l!=null?""+At(l):"",t=t!=null?""+At(t):l,m||t===e.value||(e.value=t),e.defaultValue=t}a=a??s,a=typeof a!="function"&&typeof a!="symbol"&&!!a,e.checked=m?e.checked:!!a,e.defaultChecked=!!a,u!=null&&typeof u!="function"&&typeof u!="symbol"&&typeof u!="boolean"&&(e.name=u),$i(e)}function Ji(e,t,l){t==="number"&&fs(e.ownerDocument)===e||e.defaultValue===""+l||(e.defaultValue=""+l)}function ba(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 Iu(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 Pu(e,t,l,a){if(t==null){if(a!=null){if(l!=null)throw Error(r(92));if(Ye(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),$i(e)}function ya(e,t){if(t){var l=e.firstChild;if(l&&l===e.lastChild&&l.nodeType===3){l.nodeValue=t;return}}e.textContent=t}var dh=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 eo(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||dh.has(t)?t==="float"?e.cssFloat=l:e[t]=(""+l).trim():e[t]=l+"px"}function to(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&&eo(e,s,a)}else for(var i in t)t.hasOwnProperty(i)&&eo(e,i,t[i])}function Wi(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 fh=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"]]),mh=/^[\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 ms(e){return mh.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Ft(){}var Fi=null;function Ii(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var ja=null,Na=null;function lo(e){var t=ga(e);if(t&&(e=t.stateNode)){var l=e[ut]||null;e:switch(e=t.stateNode,t.type){case"input":if(Ki(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="'+_t(""+t)+'"][type="radio"]'),t=0;t<l.length;t++){var a=l[t];if(a!==e&&a.form===e.form){var s=a[ut]||null;if(!s)throw Error(r(90));Ki(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&&Wu(a)}break e;case"textarea":Iu(e,l.value,l.defaultValue);break e;case"select":t=l.value,t!=null&&ba(e,!!l.multiple,t,!1)}}}var Pi=!1;function ao(e,t,l){if(Pi)return e(t,l);Pi=!0;try{var a=e(t);return a}finally{if(Pi=!1,(ja!==null||Na!==null)&&(ei(),ja&&(t=ja,e=Na,Na=ja=null,lo(t),e)))for(t=0;t<e.length;t++)lo(e[t])}}function un(e,t){var l=e.stateNode;if(l===null)return null;var a=l[ut]||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 It=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),ec=!1;if(It)try{var on={};Object.defineProperty(on,"passive",{get:function(){ec=!0}}),window.addEventListener("test",on,on),window.removeEventListener("test",on,on)}catch{ec=!1}var yl=null,tc=null,hs=null;function no(){if(hs)return hs;var e,t=tc,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 hs=s.slice(e,1<a?1-a:void 0)}function xs(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 gs(){return!0}function so(){return!1}function ot(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 m in e)e.hasOwnProperty(m)&&(l=e[m],this[m]=l?l(i):i[m]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?gs:so,this.isPropagationStopped=so,this}return S(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=gs)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=gs)},persist:function(){},isPersistent:gs}),t}var Wl={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},ps=ot(Wl),dn=S({},Wl,{view:0,detail:0}),hh=ot(dn),lc,ac,fn,vs=S({},dn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:sc,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!==fn&&(fn&&e.type==="mousemove"?(lc=e.screenX-fn.screenX,ac=e.screenY-fn.screenY):ac=lc=0,fn=e),lc)},movementY:function(e){return"movementY"in e?e.movementY:ac}}),io=ot(vs),xh=S({},vs,{dataTransfer:0}),gh=ot(xh),ph=S({},dn,{relatedTarget:0}),nc=ot(ph),vh=S({},Wl,{animationName:0,elapsedTime:0,pseudoElement:0}),bh=ot(vh),yh=S({},Wl,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),jh=ot(yh),Nh=S({},Wl,{data:0}),co=ot(Nh),Sh={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},wh={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"},Ch={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Eh(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Ch[e])?!!t[e]:!1}function sc(){return Eh}var Th=S({},dn,{key:function(e){if(e.key){var t=Sh[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=xs(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?wh[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:sc,charCode:function(e){return e.type==="keypress"?xs(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?xs(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Ah=ot(Th),_h=S({},vs,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),ro=ot(_h),Rh=S({},dn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:sc}),Mh=ot(Rh),zh=S({},Wl,{propertyName:0,elapsedTime:0,pseudoElement:0}),Dh=ot(zh),Oh=S({},vs,{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}),Uh=ot(Oh),kh=S({},Wl,{newState:0,oldState:0}),Hh=ot(kh),Bh=[9,13,27,32],ic=It&&"CompositionEvent"in window,mn=null;It&&"documentMode"in document&&(mn=document.documentMode);var Lh=It&&"TextEvent"in window&&!mn,uo=It&&(!ic||mn&&8<mn&&11>=mn),oo=" ",fo=!1;function mo(e,t){switch(e){case"keyup":return Bh.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function ho(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Sa=!1;function qh(e,t){switch(e){case"compositionend":return ho(t);case"keypress":return t.which!==32?null:(fo=!0,oo);case"textInput":return e=t.data,e===oo&&fo?null:e;default:return null}}function Yh(e,t){if(Sa)return e==="compositionend"||!ic&&mo(e,t)?(e=no(),hs=tc=yl=null,Sa=!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 uo&&t.locale!=="ko"?null:t.data;default:return null}}var Gh={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 xo(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Gh[e.type]:t==="textarea"}function go(e,t,l,a){ja?Na?Na.push(a):Na=[a]:ja=a,t=ci(t,"onChange"),0<t.length&&(l=new ps("onChange","change",null,l,a),e.push({event:l,listeners:t}))}var hn=null,xn=null;function Qh(e){Pf(e,0)}function bs(e){var t=rn(e);if(Wu(t))return e}function po(e,t){if(e==="change")return t}var vo=!1;if(It){var cc;if(It){var rc="oninput"in document;if(!rc){var bo=document.createElement("div");bo.setAttribute("oninput","return;"),rc=typeof bo.oninput=="function"}cc=rc}else cc=!1;vo=cc&&(!document.documentMode||9<document.documentMode)}function yo(){hn&&(hn.detachEvent("onpropertychange",jo),xn=hn=null)}function jo(e){if(e.propertyName==="value"&&bs(xn)){var t=[];go(t,xn,e,Ii(e)),ao(Qh,t)}}function Xh(e,t,l){e==="focusin"?(yo(),hn=t,xn=l,hn.attachEvent("onpropertychange",jo)):e==="focusout"&&yo()}function Vh(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return bs(xn)}function Zh(e,t){if(e==="click")return bs(t)}function $h(e,t){if(e==="input"||e==="change")return bs(t)}function Kh(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var yt=typeof Object.is=="function"?Object.is:Kh;function gn(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(!Li.call(t,s)||!yt(e[s],t[s]))return!1}return!0}function No(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function So(e,t){var l=No(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=No(l)}}function wo(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?wo(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Co(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=fs(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=fs(e.document)}return t}function uc(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 Jh=It&&"documentMode"in document&&11>=document.documentMode,wa=null,oc=null,pn=null,dc=!1;function Eo(e,t,l){var a=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;dc||wa==null||wa!==fs(a)||(a=wa,"selectionStart"in a&&uc(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}),pn&&gn(pn,a)||(pn=a,a=ci(oc,"onSelect"),0<a.length&&(t=new ps("onSelect","select",null,t,l),e.push({event:t,listeners:a}),t.target=wa)))}function Fl(e,t){var l={};return l[e.toLowerCase()]=t.toLowerCase(),l["Webkit"+e]="webkit"+t,l["Moz"+e]="moz"+t,l}var Ca={animationend:Fl("Animation","AnimationEnd"),animationiteration:Fl("Animation","AnimationIteration"),animationstart:Fl("Animation","AnimationStart"),transitionrun:Fl("Transition","TransitionRun"),transitionstart:Fl("Transition","TransitionStart"),transitioncancel:Fl("Transition","TransitionCancel"),transitionend:Fl("Transition","TransitionEnd")},fc={},To={};It&&(To=document.createElement("div").style,"AnimationEvent"in window||(delete Ca.animationend.animation,delete Ca.animationiteration.animation,delete Ca.animationstart.animation),"TransitionEvent"in window||delete Ca.transitionend.transition);function Il(e){if(fc[e])return fc[e];if(!Ca[e])return e;var t=Ca[e],l;for(l in t)if(t.hasOwnProperty(l)&&l in To)return fc[e]=t[l];return e}var Ao=Il("animationend"),_o=Il("animationiteration"),Ro=Il("animationstart"),Wh=Il("transitionrun"),Fh=Il("transitionstart"),Ih=Il("transitioncancel"),Mo=Il("transitionend"),zo=new Map,mc="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(" ");mc.push("scrollEnd");function qt(e,t){zo.set(e,t),Jl(t,[e])}var ys=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)},Rt=[],Ea=0,hc=0;function js(){for(var e=Ea,t=hc=Ea=0;t<e;){var l=Rt[t];Rt[t++]=null;var a=Rt[t];Rt[t++]=null;var s=Rt[t];Rt[t++]=null;var i=Rt[t];if(Rt[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&&Do(l,s,i)}}function Ns(e,t,l,a){Rt[Ea++]=e,Rt[Ea++]=t,Rt[Ea++]=l,Rt[Ea++]=a,hc|=a,e.lanes|=a,e=e.alternate,e!==null&&(e.lanes|=a)}function xc(e,t,l,a){return Ns(e,t,l,a),Ss(e)}function Pl(e,t){return Ns(e,null,null,t),Ss(e)}function Do(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 Ss(e){if(50<Ln)throw Ln=0,wr=null,Error(r(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Ta={};function Ph(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 Ph(e,t,l,a)}function gc(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Pt(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 Oo(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 ws(e,t,l,a,s,i){var u=0;if(a=e,typeof e=="function")gc(e)&&(u=1);else if(typeof e=="string")u=ng(e,l,P.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 V:return e=jt(12,l,t,s|2),e.elementType=V,e.lanes=i,e;case q:return e=jt(13,l,t,s),e.elementType=q,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 L:u=10;break e;case H:u=9;break e;case J:u=11;break e;case G:u=14;break e;case F: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 pc(e,t,l){return e=jt(6,e,null,t),e.lanes=l,e}function Uo(e){var t=jt(18,null,null,0);return t.stateNode=e,t}function vc(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 ko=new WeakMap;function Mt(e,t){if(typeof e=="object"&&e!==null){var l=ko.get(e);return l!==void 0?l:(t={value:e,source:t,stack:Ou(t)},ko.set(e,t),t)}return{value:e,source:t,stack:Ou(t)}}var Aa=[],_a=0,Cs=null,vn=0,zt=[],Dt=0,jl=null,Xt=1,Vt="";function el(e,t){Aa[_a++]=vn,Aa[_a++]=Cs,Cs=e,vn=t}function Ho(e,t,l){zt[Dt++]=Xt,zt[Dt++]=Vt,zt[Dt++]=jl,jl=e;var a=Xt;e=Vt;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,Xt=1<<32-bt(t)+s|l<<s|a,Vt=i+e}else Xt=1<<i|l<<s|a,Vt=e}function bc(e){e.return!==null&&(el(e,1),Ho(e,1,0))}function yc(e){for(;e===Cs;)Cs=Aa[--_a],Aa[_a]=null,vn=Aa[--_a],Aa[_a]=null;for(;e===jl;)jl=zt[--Dt],zt[Dt]=null,Vt=zt[--Dt],zt[Dt]=null,Xt=zt[--Dt],zt[Dt]=null}function Bo(e,t){zt[Dt++]=Xt,zt[Dt++]=Vt,zt[Dt++]=jl,Xt=t.id,Vt=t.overflow,jl=e}var lt=null,Ue=null,ye=!1,Nl=null,Ot=!1,jc=Error(r(519));function Sl(e){var t=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw bn(Mt(t,e)),jc}function Lo(e){var t=e.stateNode,l=e.type,a=e.memoizedProps;switch(t[tt]=e,t[ut]=a,l){case"dialog":ge("cancel",t),ge("close",t);break;case"iframe":case"object":case"embed":ge("load",t);break;case"video":case"audio":for(l=0;l<Yn.length;l++)ge(Yn[l],t);break;case"source":ge("error",t);break;case"img":case"image":case"link":ge("error",t),ge("load",t);break;case"details":ge("toggle",t);break;case"input":ge("invalid",t),Fu(t,a.value,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name,!0);break;case"select":ge("invalid",t);break;case"textarea":ge("invalid",t),Pu(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||am(t.textContent,l)?(a.popover!=null&&(ge("beforetoggle",t),ge("toggle",t)),a.onScroll!=null&&ge("scroll",t),a.onScrollEnd!=null&&ge("scrollend",t),a.onClick!=null&&(t.onclick=Ft),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 Ra(e){if(e!==lt)return!1;if(!ye)return qo(e),ye=!0,!1;var t=e.tag,l;if((l=t!==3&&t!==27)&&((l=t===5)&&(l=e.type,l=!(l!=="form"&&l!=="button")||Lr(e.type,e.memoizedProps)),l=!l),l&&Ue&&Sl(e),qo(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));Ue=fm(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));Ue=fm(e)}else t===27?(t=Ue,Hl(e.type)?(e=Xr,Xr=null,Ue=e):Ue=t):Ue=lt?kt(e.stateNode.nextSibling):null;return!0}function ta(){Ue=lt=null,ye=!1}function Nc(){var e=Nl;return e!==null&&(ht===null?ht=e:ht.push.apply(ht,e),Nl=null),e}function bn(e){Nl===null?Nl=[e]:Nl.push(e)}var Sc=y(null),la=null,tl=null;function wl(e,t,l){W(Sc,t._currentValue),t._currentValue=l}function ll(e){e._currentValue=Sc.current,Q(Sc)}function wc(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 Cc(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 m=i;i=s;for(var b=0;b<t.length;b++)if(m.context===t[b]){i.lanes|=l,m=i.alternate,m!==null&&(m.lanes|=l),wc(i.return,l,e),a||(u=null);break e}i=m.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),wc(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 Ma(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 m=s.type;yt(s.pendingProps.value,u.value)||(e!==null?e.push(m):e=[m])}}else if(s===oe.current){if(u=s.alternate,u===null)throw Error(r(387));u.memoizedState.memoizedState!==s.memoizedState.memoizedState&&(e!==null?e.push(Zn):e=[Zn])}s=s.return}e!==null&&Cc(t,e,l,a),t.flags|=262144}function Es(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 Yo(la,e)}function Ts(e,t){return la===null&&aa(e),Yo(e,t)}function Yo(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 ex=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()})}},tx=c.unstable_scheduleCallback,lx=c.unstable_NormalPriority,Ke={$$typeof:L,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Ec(){return{controller:new ex,data:new Map,refCount:0}}function yn(e){e.refCount--,e.refCount===0&&tx(lx,function(){e.controller.abort()})}var jn=null,Tc=0,za=0,Da=null;function ax(e,t){if(jn===null){var l=jn=[];Tc=0,za=Rr(),Da={status:"pending",value:void 0,then:function(a){l.push(a)}}}return Tc++,t.then(Go,Go),t}function Go(){if(--Tc===0&&jn!==null){Da!==null&&(Da.status="fulfilled");var e=jn;jn=null,za=0,Da=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function nx(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 Qo=U.S;U.S=function(e,t){Tf=pt(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&ax(e,t),Qo!==null&&Qo(e,t)};var na=y(null);function Ac(){var e=na.current;return e!==null?e:ze.pooledCache}function As(e,t){t===null?W(na,na.current):W(na,t.pool)}function Xo(){var e=Ac();return e===null?null:{parent:Ke._currentValue,pool:e}}var Oa=Error(r(460)),_c=Error(r(474)),_s=Error(r(542)),Rs={then:function(){}};function Vo(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Zo(e,t,l){switch(l=e[l],l===void 0?e.push(t):l!==t&&(t.then(Ft,Ft),t=l),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Ko(e),e;default:if(typeof t.status=="string")t.then(Ft,Ft);else{if(e=ze,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,Ko(e),e}throw ia=t,Oa}}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,Oa):l}}var ia=null;function $o(){if(ia===null)throw Error(r(459));var e=ia;return ia=null,e}function Ko(e){if(e===Oa||e===_s)throw Error(r(483))}var Ua=null,Nn=0;function Ms(e){var t=Nn;return Nn+=1,Ua===null&&(Ua=[]),Zo(Ua,e,t)}function Sn(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function zs(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 Jo(e){function t(E,N){if(e){var _=E.deletions;_===null?(E.deletions=[N],E.flags|=16):_.push(N)}}function l(E,N){if(!e)return null;for(;N!==null;)t(E,N),N=N.sibling;return null}function a(E){for(var N=new Map;E!==null;)E.key!==null?N.set(E.key,E):N.set(E.index,E),E=E.sibling;return N}function s(E,N){return E=Pt(E,N),E.index=0,E.sibling=null,E}function i(E,N,_){return E.index=_,e?(_=E.alternate,_!==null?(_=_.index,_<N?(E.flags|=67108866,N):_):(E.flags|=67108866,N)):(E.flags|=1048576,N)}function u(E){return e&&E.alternate===null&&(E.flags|=67108866),E}function m(E,N,_,Y){return N===null||N.tag!==6?(N=pc(_,E.mode,Y),N.return=E,N):(N=s(N,_),N.return=E,N)}function b(E,N,_,Y){var ae=_.type;return ae===T?B(E,N,_.props.children,Y,_.key):N!==null&&(N.elementType===ae||typeof ae=="object"&&ae!==null&&ae.$$typeof===F&&sa(ae)===N.type)?(N=s(N,_.props),Sn(N,_),N.return=E,N):(N=ws(_.type,_.key,_.props,null,E.mode,Y),Sn(N,_),N.return=E,N)}function R(E,N,_,Y){return N===null||N.tag!==4||N.stateNode.containerInfo!==_.containerInfo||N.stateNode.implementation!==_.implementation?(N=vc(_,E.mode,Y),N.return=E,N):(N=s(N,_.children||[]),N.return=E,N)}function B(E,N,_,Y,ae){return N===null||N.tag!==7?(N=ea(_,E.mode,Y,ae),N.return=E,N):(N=s(N,_),N.return=E,N)}function X(E,N,_){if(typeof N=="string"&&N!==""||typeof N=="number"||typeof N=="bigint")return N=pc(""+N,E.mode,_),N.return=E,N;if(typeof N=="object"&&N!==null){switch(N.$$typeof){case O:return _=ws(N.type,N.key,N.props,null,E.mode,_),Sn(_,N),_.return=E,_;case k:return N=vc(N,E.mode,_),N.return=E,N;case F:return N=sa(N),X(E,N,_)}if(Ye(N)||je(N))return N=ea(N,E.mode,_,null),N.return=E,N;if(typeof N.then=="function")return X(E,Ms(N),_);if(N.$$typeof===L)return X(E,Ts(E,N),_);zs(E,N)}return null}function M(E,N,_,Y){var ae=N!==null?N.key:null;if(typeof _=="string"&&_!==""||typeof _=="number"||typeof _=="bigint")return ae!==null?null:m(E,N,""+_,Y);if(typeof _=="object"&&_!==null){switch(_.$$typeof){case O:return _.key===ae?b(E,N,_,Y):null;case k:return _.key===ae?R(E,N,_,Y):null;case F:return _=sa(_),M(E,N,_,Y)}if(Ye(_)||je(_))return ae!==null?null:B(E,N,_,Y,null);if(typeof _.then=="function")return M(E,N,Ms(_),Y);if(_.$$typeof===L)return M(E,N,Ts(E,_),Y);zs(E,_)}return null}function D(E,N,_,Y,ae){if(typeof Y=="string"&&Y!==""||typeof Y=="number"||typeof Y=="bigint")return E=E.get(_)||null,m(N,E,""+Y,ae);if(typeof Y=="object"&&Y!==null){switch(Y.$$typeof){case O:return E=E.get(Y.key===null?_:Y.key)||null,b(N,E,Y,ae);case k:return E=E.get(Y.key===null?_:Y.key)||null,R(N,E,Y,ae);case F:return Y=sa(Y),D(E,N,_,Y,ae)}if(Ye(Y)||je(Y))return E=E.get(_)||null,B(N,E,Y,ae,null);if(typeof Y.then=="function")return D(E,N,_,Ms(Y),ae);if(Y.$$typeof===L)return D(E,N,_,Ts(N,Y),ae);zs(N,Y)}return null}function ee(E,N,_,Y){for(var ae=null,Ne=null,le=N,fe=N=0,ve=null;le!==null&&fe<_.length;fe++){le.index>fe?(ve=le,le=null):ve=le.sibling;var Se=M(E,le,_[fe],Y);if(Se===null){le===null&&(le=ve);break}e&&le&&Se.alternate===null&&t(E,le),N=i(Se,N,fe),Ne===null?ae=Se:Ne.sibling=Se,Ne=Se,le=ve}if(fe===_.length)return l(E,le),ye&&el(E,fe),ae;if(le===null){for(;fe<_.length;fe++)le=X(E,_[fe],Y),le!==null&&(N=i(le,N,fe),Ne===null?ae=le:Ne.sibling=le,Ne=le);return ye&&el(E,fe),ae}for(le=a(le);fe<_.length;fe++)ve=D(le,E,fe,_[fe],Y),ve!==null&&(e&&ve.alternate!==null&&le.delete(ve.key===null?fe:ve.key),N=i(ve,N,fe),Ne===null?ae=ve:Ne.sibling=ve,Ne=ve);return e&&le.forEach(function(Gl){return t(E,Gl)}),ye&&el(E,fe),ae}function se(E,N,_,Y){if(_==null)throw Error(r(151));for(var ae=null,Ne=null,le=N,fe=N=0,ve=null,Se=_.next();le!==null&&!Se.done;fe++,Se=_.next()){le.index>fe?(ve=le,le=null):ve=le.sibling;var Gl=M(E,le,Se.value,Y);if(Gl===null){le===null&&(le=ve);break}e&&le&&Gl.alternate===null&&t(E,le),N=i(Gl,N,fe),Ne===null?ae=Gl:Ne.sibling=Gl,Ne=Gl,le=ve}if(Se.done)return l(E,le),ye&&el(E,fe),ae;if(le===null){for(;!Se.done;fe++,Se=_.next())Se=X(E,Se.value,Y),Se!==null&&(N=i(Se,N,fe),Ne===null?ae=Se:Ne.sibling=Se,Ne=Se);return ye&&el(E,fe),ae}for(le=a(le);!Se.done;fe++,Se=_.next())Se=D(le,E,fe,Se.value,Y),Se!==null&&(e&&Se.alternate!==null&&le.delete(Se.key===null?fe:Se.key),N=i(Se,N,fe),Ne===null?ae=Se:Ne.sibling=Se,Ne=Se);return e&&le.forEach(function(xg){return t(E,xg)}),ye&&el(E,fe),ae}function Re(E,N,_,Y){if(typeof _=="object"&&_!==null&&_.type===T&&_.key===null&&(_=_.props.children),typeof _=="object"&&_!==null){switch(_.$$typeof){case O:e:{for(var ae=_.key;N!==null;){if(N.key===ae){if(ae=_.type,ae===T){if(N.tag===7){l(E,N.sibling),Y=s(N,_.props.children),Y.return=E,E=Y;break e}}else if(N.elementType===ae||typeof ae=="object"&&ae!==null&&ae.$$typeof===F&&sa(ae)===N.type){l(E,N.sibling),Y=s(N,_.props),Sn(Y,_),Y.return=E,E=Y;break e}l(E,N);break}else t(E,N);N=N.sibling}_.type===T?(Y=ea(_.props.children,E.mode,Y,_.key),Y.return=E,E=Y):(Y=ws(_.type,_.key,_.props,null,E.mode,Y),Sn(Y,_),Y.return=E,E=Y)}return u(E);case k:e:{for(ae=_.key;N!==null;){if(N.key===ae)if(N.tag===4&&N.stateNode.containerInfo===_.containerInfo&&N.stateNode.implementation===_.implementation){l(E,N.sibling),Y=s(N,_.children||[]),Y.return=E,E=Y;break e}else{l(E,N);break}else t(E,N);N=N.sibling}Y=vc(_,E.mode,Y),Y.return=E,E=Y}return u(E);case F:return _=sa(_),Re(E,N,_,Y)}if(Ye(_))return ee(E,N,_,Y);if(je(_)){if(ae=je(_),typeof ae!="function")throw Error(r(150));return _=ae.call(_),se(E,N,_,Y)}if(typeof _.then=="function")return Re(E,N,Ms(_),Y);if(_.$$typeof===L)return Re(E,N,Ts(E,_),Y);zs(E,_)}return typeof _=="string"&&_!==""||typeof _=="number"||typeof _=="bigint"?(_=""+_,N!==null&&N.tag===6?(l(E,N.sibling),Y=s(N,_),Y.return=E,E=Y):(l(E,N),Y=pc(_,E.mode,Y),Y.return=E,E=Y),u(E)):l(E,N)}return function(E,N,_,Y){try{Nn=0;var ae=Re(E,N,_,Y);return Ua=null,ae}catch(le){if(le===Oa||le===_s)throw le;var Ne=jt(29,le,null,E.mode);return Ne.lanes=Y,Ne.return=E,Ne}finally{}}}var ca=Jo(!0),Wo=Jo(!1),Cl=!1;function Rc(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Mc(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,(we&2)!==0){var s=a.pending;return s===null?t.next=t:(t.next=s.next,s.next=t),a.pending=t,t=Ss(e),Do(e,null,l),t}return Ns(e,a,t,l),Ss(e)}function wn(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 zc(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 Dc=!1;function Cn(){if(Dc){var e=Da;if(e!==null)throw e}}function En(e,t,l,a){Dc=!1;var s=e.updateQueue;Cl=!1;var i=s.firstBaseUpdate,u=s.lastBaseUpdate,m=s.shared.pending;if(m!==null){s.shared.pending=null;var b=m,R=b.next;b.next=null,u===null?i=R:u.next=R,u=b;var B=e.alternate;B!==null&&(B=B.updateQueue,m=B.lastBaseUpdate,m!==u&&(m===null?B.firstBaseUpdate=R:m.next=R,B.lastBaseUpdate=b))}if(i!==null){var X=s.baseState;u=0,B=R=b=null,m=i;do{var M=m.lane&-536870913,D=M!==m.lane;if(D?(pe&M)===M:(a&M)===M){M!==0&&M===za&&(Dc=!0),B!==null&&(B=B.next={lane:0,tag:m.tag,payload:m.payload,callback:null,next:null});e:{var ee=e,se=m;M=t;var Re=l;switch(se.tag){case 1:if(ee=se.payload,typeof ee=="function"){X=ee.call(Re,X,M);break e}X=ee;break e;case 3:ee.flags=ee.flags&-65537|128;case 0:if(ee=se.payload,M=typeof ee=="function"?ee.call(Re,X,M):ee,M==null)break e;X=S({},X,M);break e;case 2:Cl=!0}}M=m.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:m.tag,payload:m.payload,callback:m.callback,next:null},B===null?(R=B=D,b=X):B=B.next=D,u|=M;if(m=m.next,m===null){if(m=s.shared.pending,m===null)break;D=m,m=D.next,D.next=null,s.lastBaseUpdate=D,s.shared.pending=null}}while(!0);B===null&&(b=X),s.baseState=b,s.firstBaseUpdate=R,s.lastBaseUpdate=B,i===null&&(s.shared.lanes=0),zl|=u,e.lanes=u,e.memoizedState=X}}function Fo(e,t){if(typeof e!="function")throw Error(r(191,e));e.call(t)}function Io(e,t){var l=e.callbacks;if(l!==null)for(e.callbacks=null,e=0;e<l.length;e++)Fo(l[e],t)}var ka=y(null),Ds=y(0);function Po(e,t){e=dl,W(Ds,e),W(ka,t),dl=e|t.baseLanes}function Oc(){W(Ds,dl),W(ka,ka.current)}function Uc(){dl=Ds.current,Q(ka),Q(Ds)}var Nt=y(null),Ut=null;function Al(e){var t=e.alternate;W(Ze,Ze.current&1),W(Nt,e),Ut===null&&(t===null||ka.current!==null||t.memoizedState!==null)&&(Ut=e)}function kc(e){W(Ze,Ze.current),W(Nt,e),Ut===null&&(Ut=e)}function ed(e){e.tag===22?(W(Ze,Ze.current),W(Nt,e),Ut===null&&(Ut=e)):_l()}function _l(){W(Ze,Ze.current),W(Nt,Nt.current)}function St(e){Q(Nt),Ut===e&&(Ut=null),Q(Ze)}var Ze=y(0);function Os(e){for(var t=e;t!==null;){if(t.tag===13){var l=t.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||Gr(l)||Qr(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,de=null,Ae=null,Je=null,Us=!1,Ha=!1,ra=!1,ks=0,Tn=0,Ba=null,sx=0;function Ge(){throw Error(r(321))}function Hc(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 Bc(e,t,l,a,s,i){return al=i,de=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,U.H=e===null||e.memoizedState===null?Hd:Pc,ra=!1,i=l(a,s),ra=!1,Ha&&(i=ld(t,l,a,s)),td(e),i}function td(e){U.H=Rn;var t=Ae!==null&&Ae.next!==null;if(al=0,Je=Ae=de=null,Us=!1,Tn=0,Ba=null,t)throw Error(r(300));e===null||We||(e=e.dependencies,e!==null&&Es(e)&&(We=!0))}function ld(e,t,l,a){de=e;var s=0;do{if(Ha&&(Ba=null),Tn=0,Ha=!1,25<=s)throw Error(r(301));if(s+=1,Je=Ae=null,e.updateQueue!=null){var i=e.updateQueue;i.lastEffect=null,i.events=null,i.stores=null,i.memoCache!=null&&(i.memoCache.index=0)}U.H=Bd,i=t(l,a)}while(Ha);return i}function ix(){var e=U.H,t=e.useState()[0];return t=typeof t.then=="function"?An(t):t,e=e.useState()[0],(Ae!==null?Ae.memoizedState:null)!==e&&(de.flags|=1024),t}function Lc(){var e=ks!==0;return ks=0,e}function qc(e,t,l){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~l}function Yc(e){if(Us){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Us=!1}al=0,Je=Ae=de=null,Ha=!1,Tn=ks=0,Ba=null}function ct(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Je===null?de.memoizedState=Je=e:Je=Je.next=e,Je}function $e(){if(Ae===null){var e=de.alternate;e=e!==null?e.memoizedState:null}else e=Ae.next;var t=Je===null?de.memoizedState:Je.next;if(t!==null)Je=t,Ae=e;else{if(e===null)throw de.alternate===null?Error(r(467)):Error(r(310));Ae=e,e={memoizedState:Ae.memoizedState,baseState:Ae.baseState,baseQueue:Ae.baseQueue,queue:Ae.queue,next:null},Je===null?de.memoizedState=Je=e:Je=Je.next=e}return Je}function Hs(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function An(e){var t=Tn;return Tn+=1,Ba===null&&(Ba=[]),e=Zo(Ba,e,t),t=de,(Je===null?t.memoizedState:Je.next)===null&&(t=t.alternate,U.H=t===null||t.memoizedState===null?Hd:Pc),e}function Bs(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return An(e);if(e.$$typeof===L)return at(e)}throw Error(r(438,String(e)))}function Gc(e){var t=null,l=de.updateQueue;if(l!==null&&(t=l.memoCache),t==null){var a=de.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=Hs(),de.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]=$;return t.index++,l}function nl(e,t){return typeof t=="function"?t(e):t}function Ls(e){var t=$e();return Qc(t,Ae,e)}function Qc(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 m=u=null,b=null,R=t,B=!1;do{var X=R.lane&-536870913;if(X!==R.lane?(pe&X)===X:(al&X)===X){var M=R.revertLane;if(M===0)b!==null&&(b=b.next={lane:0,revertLane:0,gesture:null,action:R.action,hasEagerState:R.hasEagerState,eagerState:R.eagerState,next:null}),X===za&&(B=!0);else if((al&M)===M){R=R.next,M===za&&(B=!0);continue}else X={lane:0,revertLane:R.revertLane,gesture:null,action:R.action,hasEagerState:R.hasEagerState,eagerState:R.eagerState,next:null},b===null?(m=b=X,u=i):b=b.next=X,de.lanes|=M,zl|=M;X=R.action,ra&&l(i,X),i=R.hasEagerState?R.eagerState:l(i,X)}else M={lane:X,revertLane:R.revertLane,gesture:R.gesture,action:R.action,hasEagerState:R.hasEagerState,eagerState:R.eagerState,next:null},b===null?(m=b=M,u=i):b=b.next=M,de.lanes|=X,zl|=X;R=R.next}while(R!==null&&R!==t);if(b===null?u=i:b.next=m,!yt(i,e.memoizedState)&&(We=!0,B&&(l=Da,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 Xc(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)||(We=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),l.lastRenderedState=i}return[i,a]}function ad(e,t,l){var a=de,s=$e(),i=ye;if(i){if(l===void 0)throw Error(r(407));l=l()}else l=t();var u=!yt((Ae||s).memoizedState,l);if(u&&(s.memoizedState=l,We=!0),s=s.queue,$c(id.bind(null,a,s,e),[e]),s.getSnapshot!==t||u||Je!==null&&Je.memoizedState.tag&1){if(a.flags|=2048,La(9,{destroy:void 0},sd.bind(null,a,s,l,t),null),ze===null)throw Error(r(349));i||(al&127)!==0||nd(a,t,l)}return l}function nd(e,t,l){e.flags|=16384,e={getSnapshot:t,value:l},t=de.updateQueue,t===null?(t=Hs(),de.updateQueue=t,t.stores=[e]):(l=t.stores,l===null?t.stores=[e]:l.push(e))}function sd(e,t,l,a){t.value=l,t.getSnapshot=a,cd(t)&&rd(e)}function id(e,t,l){return l(function(){cd(t)&&rd(e)})}function cd(e){var t=e.getSnapshot;e=e.value;try{var l=t();return!yt(e,l)}catch{return!0}}function rd(e){var t=Pl(e,2);t!==null&&xt(t,e,2)}function Vc(e){var t=ct();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 ud(e,t,l,a){return e.baseState=l,Qc(e,Ae,typeof a=="function"?a:nl)}function cx(e,t,l,a,s){if(Gs(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)}};U.T!==null?l(!0):i.isTransition=!1,a(i),l=t.pending,l===null?(i.next=t.pending=i,od(t,i)):(i.next=l.next,t.pending=l.next=i)}}function od(e,t){var l=t.action,a=t.payload,s=e.state;if(t.isTransition){var i=U.T,u={};U.T=u;try{var m=l(s,a),b=U.S;b!==null&&b(u,m),dd(e,t,m)}catch(R){Zc(e,t,R)}finally{i!==null&&u.types!==null&&(i.types=u.types),U.T=i}}else try{i=l(s,a),dd(e,t,i)}catch(R){Zc(e,t,R)}}function dd(e,t,l){l!==null&&typeof l=="object"&&typeof l.then=="function"?l.then(function(a){fd(e,t,a)},function(a){return Zc(e,t,a)}):fd(e,t,l)}function fd(e,t,l){t.status="fulfilled",t.value=l,md(t),e.state=l,t=e.pending,t!==null&&(l=t.next,l===t?e.pending=null:(l=l.next,t.next=l,od(e,l)))}function Zc(e,t,l){var a=e.pending;if(e.pending=null,a!==null){a=a.next;do t.status="rejected",t.reason=l,md(t),t=t.next;while(t!==a)}e.action=null}function md(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function hd(e,t){return t}function xd(e,t){if(ye){var l=ze.formState;if(l!==null){e:{var a=de;if(ye){if(Ue){t:{for(var s=Ue,i=Ot;s.nodeType!==8;){if(!i){s=null;break t}if(s=kt(s.nextSibling),s===null){s=null;break t}}i=s.data,s=i==="F!"||i==="F"?s:null}if(s){Ue=kt(s.nextSibling),a=s.data==="F!";break e}}Sl(a)}a=!1}a&&(t=l[0])}}return l=ct(),l.memoizedState=l.baseState=t,a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:hd,lastRenderedState:t},l.queue=a,l=Od.bind(null,de,a),a.dispatch=l,a=Vc(!1),i=Ic.bind(null,de,!1,a.queue),a=ct(),s={state:t,dispatch:null,action:e,pending:null},a.queue=s,l=cx.bind(null,de,s,i,l),s.dispatch=l,a.memoizedState=e,[t,l,!1]}function gd(e){var t=$e();return pd(t,Ae,e)}function pd(e,t,l){if(t=Qc(e,t,hd)[0],e=Ls(nl)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var a=An(t)}catch(u){throw u===Oa?_s:u}else a=t;t=$e();var s=t.queue,i=s.dispatch;return l!==t.memoizedState&&(de.flags|=2048,La(9,{destroy:void 0},rx.bind(null,s,l),null)),[a,i,e]}function rx(e,t){e.action=t}function vd(e){var t=$e(),l=Ae;if(l!==null)return pd(t,l,e);$e(),t=t.memoizedState,l=$e();var a=l.queue.dispatch;return l.memoizedState=e,[t,a,!1]}function La(e,t,l,a){return e={tag:e,create:l,deps:a,inst:t,next:null},t=de.updateQueue,t===null&&(t=Hs(),de.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 bd(){return $e().memoizedState}function qs(e,t,l,a){var s=ct();de.flags|=e,s.memoizedState=La(1|t,{destroy:void 0},l,a===void 0?null:a)}function Ys(e,t,l,a){var s=$e();a=a===void 0?null:a;var i=s.memoizedState.inst;Ae!==null&&a!==null&&Hc(a,Ae.memoizedState.deps)?s.memoizedState=La(t,i,l,a):(de.flags|=e,s.memoizedState=La(1|t,i,l,a))}function yd(e,t){qs(8390656,8,e,t)}function $c(e,t){Ys(2048,8,e,t)}function ux(e){de.flags|=4;var t=de.updateQueue;if(t===null)t=Hs(),de.updateQueue=t,t.events=[e];else{var l=t.events;l===null?t.events=[e]:l.push(e)}}function jd(e){var t=$e().memoizedState;return ux({ref:t,nextImpl:e}),function(){if((we&2)!==0)throw Error(r(440));return t.impl.apply(void 0,arguments)}}function Nd(e,t){return Ys(4,2,e,t)}function Sd(e,t){return Ys(4,4,e,t)}function wd(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 Cd(e,t,l){l=l!=null?l.concat([e]):null,Ys(4,4,wd.bind(null,t,e),l)}function Kc(){}function Ed(e,t){var l=$e();t=t===void 0?null:t;var a=l.memoizedState;return t!==null&&Hc(t,a[1])?a[0]:(l.memoizedState=[e,t],e)}function Td(e,t){var l=$e();t=t===void 0?null:t;var a=l.memoizedState;if(t!==null&&Hc(t,a[1]))return a[0];if(a=e(),ra){vl(!0);try{e()}finally{vl(!1)}}return l.memoizedState=[a,t],a}function Jc(e,t,l){return l===void 0||(al&1073741824)!==0&&(pe&261930)===0?e.memoizedState=t:(e.memoizedState=l,e=_f(),de.lanes|=e,zl|=e,l)}function Ad(e,t,l,a){return yt(l,t)?l:ka.current!==null?(e=Jc(e,l,a),yt(e,t)||(We=!0),e):(al&42)===0||(al&1073741824)!==0&&(pe&261930)===0?(We=!0,e.memoizedState=l):(e=_f(),de.lanes|=e,zl|=e,t)}function _d(e,t,l,a,s){var i=Z.p;Z.p=i!==0&&8>i?i:8;var u=U.T,m={};U.T=m,Ic(e,!1,t,l);try{var b=s(),R=U.S;if(R!==null&&R(m,b),b!==null&&typeof b=="object"&&typeof b.then=="function"){var B=nx(b,a);_n(e,t,B,Et(e))}else _n(e,t,a,Et(e))}catch(X){_n(e,t,{then:function(){},status:"rejected",reason:X},Et())}finally{Z.p=i,u!==null&&m.types!==null&&(u.types=m.types),U.T=u}}function ox(){}function Wc(e,t,l,a){if(e.tag!==5)throw Error(r(476));var s=Rd(e).queue;_d(e,s,t,te,l===null?ox:function(){return Md(e),l(a)})}function Rd(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:te,baseState:te,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:nl,lastRenderedState:te},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 Md(e){var t=Rd(e);t.next===null&&(t=e.alternate.memoizedState),_n(e,t.next.queue,{},Et())}function Fc(){return at(Zn)}function zd(){return $e().memoizedState}function Dd(){return $e().memoizedState}function dx(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&&(xt(a,t,l),wn(a,t,l)),t={cache:Ec()},e.payload=t;return}t=t.return}}function fx(e,t,l){var a=Et();l={lane:a,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},Gs(e)?Ud(t,l):(l=xc(e,t,l,a),l!==null&&(xt(l,e,a),kd(l,t,a)))}function Od(e,t,l){var a=Et();_n(e,t,l,a)}function _n(e,t,l,a){var s={lane:a,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null};if(Gs(e))Ud(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,m=i(u,l);if(s.hasEagerState=!0,s.eagerState=m,yt(m,u))return Ns(e,t,s,0),ze===null&&js(),!1}catch{}finally{}if(l=xc(e,t,s,a),l!==null)return xt(l,e,a),kd(l,t,a),!0}return!1}function Ic(e,t,l,a){if(a={lane:2,revertLane:Rr(),gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},Gs(e)){if(t)throw Error(r(479))}else t=xc(e,l,a,2),t!==null&&xt(t,e,2)}function Gs(e){var t=e.alternate;return e===de||t!==null&&t===de}function Ud(e,t){Ha=Us=!0;var l=e.pending;l===null?t.next=t:(t.next=l.next,l.next=t),e.pending=t}function kd(e,t,l){if((l&4194048)!==0){var a=t.lanes;a&=e.pendingLanes,l|=a,t.lanes=l,qu(e,l)}}var Rn={readContext:at,use:Bs,useCallback:Ge,useContext:Ge,useEffect:Ge,useImperativeHandle:Ge,useLayoutEffect:Ge,useInsertionEffect:Ge,useMemo:Ge,useReducer:Ge,useRef:Ge,useState:Ge,useDebugValue:Ge,useDeferredValue:Ge,useTransition:Ge,useSyncExternalStore:Ge,useId:Ge,useHostTransitionStatus:Ge,useFormState:Ge,useActionState:Ge,useOptimistic:Ge,useMemoCache:Ge,useCacheRefresh:Ge};Rn.useEffectEvent=Ge;var Hd={readContext:at,use:Bs,useCallback:function(e,t){return ct().memoizedState=[e,t===void 0?null:t],e},useContext:at,useEffect:yd,useImperativeHandle:function(e,t,l){l=l!=null?l.concat([e]):null,qs(4194308,4,wd.bind(null,t,e),l)},useLayoutEffect:function(e,t){return qs(4194308,4,e,t)},useInsertionEffect:function(e,t){qs(4,2,e,t)},useMemo:function(e,t){var l=ct();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=ct();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=fx.bind(null,de,e),[a.memoizedState,e]},useRef:function(e){var t=ct();return e={current:e},t.memoizedState=e},useState:function(e){e=Vc(e);var t=e.queue,l=Od.bind(null,de,t);return t.dispatch=l,[e.memoizedState,l]},useDebugValue:Kc,useDeferredValue:function(e,t){var l=ct();return Jc(l,e,t)},useTransition:function(){var e=Vc(!1);return e=_d.bind(null,de,e.queue,!0,!1),ct().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,l){var a=de,s=ct();if(ye){if(l===void 0)throw Error(r(407));l=l()}else{if(l=t(),ze===null)throw Error(r(349));(pe&127)!==0||nd(a,t,l)}s.memoizedState=l;var i={value:l,getSnapshot:t};return s.queue=i,yd(id.bind(null,a,i,e),[e]),a.flags|=2048,La(9,{destroy:void 0},sd.bind(null,a,i,l,t),null),l},useId:function(){var e=ct(),t=ze.identifierPrefix;if(ye){var l=Vt,a=Xt;l=(a&~(1<<32-bt(a)-1)).toString(32)+l,t="_"+t+"R_"+l,l=ks++,0<l&&(t+="H"+l.toString(32)),t+="_"}else l=sx++,t="_"+t+"r_"+l.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:Fc,useFormState:xd,useActionState:xd,useOptimistic:function(e){var t=ct();t.memoizedState=t.baseState=e;var l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=l,t=Ic.bind(null,de,!0,l),l.dispatch=t,[e,t]},useMemoCache:Gc,useCacheRefresh:function(){return ct().memoizedState=dx.bind(null,de)},useEffectEvent:function(e){var t=ct(),l={impl:e};return t.memoizedState=l,function(){if((we&2)!==0)throw Error(r(440));return l.impl.apply(void 0,arguments)}}},Pc={readContext:at,use:Bs,useCallback:Ed,useContext:at,useEffect:$c,useImperativeHandle:Cd,useInsertionEffect:Nd,useLayoutEffect:Sd,useMemo:Td,useReducer:Ls,useRef:bd,useState:function(){return Ls(nl)},useDebugValue:Kc,useDeferredValue:function(e,t){var l=$e();return Ad(l,Ae.memoizedState,e,t)},useTransition:function(){var e=Ls(nl)[0],t=$e().memoizedState;return[typeof e=="boolean"?e:An(e),t]},useSyncExternalStore:ad,useId:zd,useHostTransitionStatus:Fc,useFormState:gd,useActionState:gd,useOptimistic:function(e,t){var l=$e();return ud(l,Ae,e,t)},useMemoCache:Gc,useCacheRefresh:Dd};Pc.useEffectEvent=jd;var Bd={readContext:at,use:Bs,useCallback:Ed,useContext:at,useEffect:$c,useImperativeHandle:Cd,useInsertionEffect:Nd,useLayoutEffect:Sd,useMemo:Td,useReducer:Xc,useRef:bd,useState:function(){return Xc(nl)},useDebugValue:Kc,useDeferredValue:function(e,t){var l=$e();return Ae===null?Jc(l,e,t):Ad(l,Ae.memoizedState,e,t)},useTransition:function(){var e=Xc(nl)[0],t=$e().memoizedState;return[typeof e=="boolean"?e:An(e),t]},useSyncExternalStore:ad,useId:zd,useHostTransitionStatus:Fc,useFormState:vd,useActionState:vd,useOptimistic:function(e,t){var l=$e();return Ae!==null?ud(l,Ae,e,t):(l.baseState=e,[e,l.queue.dispatch])},useMemoCache:Gc,useCacheRefresh:Dd};Bd.useEffectEvent=jd;function er(e,t,l,a){t=e.memoizedState,l=l(a,t),l=l==null?t:S({},t,l),e.memoizedState=l,e.lanes===0&&(e.updateQueue.baseState=l)}var tr={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&&(xt(t,e,a),wn(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&&(xt(t,e,a),wn(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&&(xt(t,e,l),wn(t,e,l))}};function Ld(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?!gn(l,a)||!gn(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&&tr.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=S({},l));for(var s in e)l[s]===void 0&&(l[s]=e[s])}return l}function Yd(e){ys(e)}function Gd(e){console.error(e)}function Qd(e){ys(e)}function Qs(e,t){try{var l=e.onUncaughtError;l(t.value,{componentStack:t.stack})}catch(a){setTimeout(function(){throw a})}}function Xd(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 lr(e,t,l){return l=El(l),l.tag=3,l.payload={element:null},l.callback=function(){Qs(e,t)},l}function Vd(e){return e=El(e),e.tag=3,e}function Zd(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(){Xd(t,l,a)}}var u=l.stateNode;u!==null&&typeof u.componentDidCatch=="function"&&(e.callback=function(){Xd(t,l,a),typeof s!="function"&&(Dl===null?Dl=new Set([this]):Dl.add(this));var m=a.stack;this.componentDidCatch(a.value,{componentStack:m!==null?m:""})})}function mx(e,t,l,a,s){if(l.flags|=32768,a!==null&&typeof a=="object"&&typeof a.then=="function"){if(t=l.alternate,t!==null&&Ma(t,l,s,!0),l=Nt.current,l!==null){switch(l.tag){case 31:case 13:return Ut===null?ti():l.alternate===null&&Qe===0&&(Qe=3),l.flags&=-257,l.flags|=65536,l.lanes=s,a===Rs?l.flags|=16384:(t=l.updateQueue,t===null?l.updateQueue=new Set([a]):t.add(a),Tr(e,a,s)),!1;case 22:return l.flags|=65536,a===Rs?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)),Tr(e,a,s)),!1}throw Error(r(435,l.tag))}return Tr(e,a,s),ti(),!1}if(ye)return t=Nt.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=s,a!==jc&&(e=Error(r(422),{cause:a}),bn(Mt(e,l)))):(a!==jc&&(t=Error(r(423),{cause:a}),bn(Mt(t,l))),e=e.current.alternate,e.flags|=65536,s&=-s,e.lanes|=s,a=Mt(a,l),s=lr(e.stateNode,a,s),zc(e,s),Qe!==4&&(Qe=2)),!1;var i=Error(r(520),{cause:a});if(i=Mt(i,l),Bn===null?Bn=[i]:Bn.push(i),Qe!==4&&(Qe=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=lr(l.stateNode,a,e),zc(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=Vd(s),Zd(s,e,l,a),zc(l,s),!1}l=l.return}while(l!==null);return!1}var ar=Error(r(461)),We=!1;function nt(e,t,l,a){t.child=e===null?Wo(t,null,l,a):ca(t,e.child,l,a)}function $d(e,t,l,a,s){l=l.render;var i=t.ref;if("ref"in a){var u={};for(var m in a)m!=="ref"&&(u[m]=a[m])}else u=a;return aa(t),a=Bc(e,t,l,u,i,s),m=Lc(),e!==null&&!We?(qc(e,t,s),sl(e,t,s)):(ye&&m&&bc(t),t.flags|=1,nt(e,t,a,s),t.child)}function Kd(e,t,l,a,s){if(e===null){var i=l.type;return typeof i=="function"&&!gc(i)&&i.defaultProps===void 0&&l.compare===null?(t.tag=15,t.type=i,Jd(e,t,i,a,s)):(e=ws(l.type,null,a,t,t.mode,s),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,!dr(e,s)){var u=i.memoizedProps;if(l=l.compare,l=l!==null?l:gn,l(u,a)&&e.ref===t.ref)return sl(e,t,s)}return t.flags|=1,e=Pt(i,a),e.ref=t.ref,e.return=t,t.child=e}function Jd(e,t,l,a,s){if(e!==null){var i=e.memoizedProps;if(gn(i,a)&&e.ref===t.ref)if(We=!1,t.pendingProps=a=i,dr(e,s))(e.flags&131072)!==0&&(We=!0);else return t.lanes=e.lanes,sl(e,t,s)}return nr(e,t,l,a,s)}function Wd(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 Fd(e,t,i,l,a)}if((l&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&As(t,i!==null?i.cachePool:null),i!==null?Po(t,i):Oc(),ed(t);else return a=t.lanes=536870912,Fd(e,t,i!==null?i.baseLanes|l:l,l,a)}else i!==null?(As(t,i.cachePool),Po(t,i),_l(),t.memoizedState=null):(e!==null&&As(t,null),Oc(),_l());return nt(e,t,s,l),t.child}function Mn(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Fd(e,t,l,a,s){var i=Ac();return i=i===null?null:{parent:Ke._currentValue,pool:i},t.memoizedState={baseLanes:l,cachePool:i},e!==null&&As(t,null),Oc(),ed(t),e!==null&&Ma(e,t,a,!0),t.childLanes=s,null}function Xs(e,t){return t=Zs({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Id(e,t,l){return ca(t,e.child,null,l),e=Xs(t,t.pendingProps),e.flags|=2,St(t),t.memoizedState=null,e}function hx(e,t,l){var a=t.pendingProps,s=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(ye){if(a.mode==="hidden")return e=Xs(t,a),t.lanes=536870912,Mn(null,e);if(kc(t),(e=Ue)?(e=dm(e,Ot),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:jl!==null?{id:Xt,overflow:Vt}:null,retryLane:536870912,hydrationErrors:null},l=Uo(e),l.return=t,t.child=l,lt=t,Ue=null)):e=null,e===null)throw Sl(t);return t.lanes=536870912,null}return Xs(t,a)}var i=e.memoizedState;if(i!==null){var u=i.dehydrated;if(kc(t),s)if(t.flags&256)t.flags&=-257,t=Id(e,t,l);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(r(558));else if(We||Ma(e,t,l,!1),s=(l&e.childLanes)!==0,We||s){if(a=ze,a!==null&&(u=Yu(a,l),u!==0&&u!==i.retryLane))throw i.retryLane=u,Pl(e,u),xt(a,e,u),ar;ti(),t=Id(e,t,l)}else e=i.treeContext,Ue=kt(u.nextSibling),lt=t,ye=!0,Nl=null,Ot=!1,e!==null&&Bo(t,e),t=Xs(t,a),t.flags|=4096;return t}return e=Pt(e.child,{mode:a.mode,children:a.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Vs(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 nr(e,t,l,a,s){return aa(t),l=Bc(e,t,l,a,void 0,s),a=Lc(),e!==null&&!We?(qc(e,t,s),sl(e,t,s)):(ye&&a&&bc(t),t.flags|=1,nt(e,t,l,s),t.child)}function Pd(e,t,l,a,s,i){return aa(t),t.updateQueue=null,l=ld(t,a,l,s),td(e),a=Lc(),e!==null&&!We?(qc(e,t,i),sl(e,t,i)):(ye&&a&&bc(t),t.flags|=1,nt(e,t,l,i),t.child)}function ef(e,t,l,a,s){if(aa(t),t.stateNode===null){var i=Ta,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=tr,t.stateNode=i,i._reactInternals=t,i=t.stateNode,i.props=a,i.state=t.memoizedState,i.refs={},Rc(t),u=l.contextType,i.context=typeof u=="object"&&u!==null?at(u):Ta,i.state=t.memoizedState,u=l.getDerivedStateFromProps,typeof u=="function"&&(er(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&&tr.enqueueReplaceState(i,i.state,null),En(t,a,i,s),Cn(),i.state=t.memoizedState),typeof i.componentDidMount=="function"&&(t.flags|=4194308),a=!0}else if(e===null){i=t.stateNode;var m=t.memoizedProps,b=ua(l,m);i.props=b;var R=i.context,B=l.contextType;u=Ta,typeof B=="object"&&B!==null&&(u=at(B));var X=l.getDerivedStateFromProps;B=typeof X=="function"||typeof i.getSnapshotBeforeUpdate=="function",m=t.pendingProps!==m,B||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(m||R!==u)&&qd(t,i,a,u),Cl=!1;var M=t.memoizedState;i.state=M,En(t,a,i,s),Cn(),R=t.memoizedState,m||M!==R||Cl?(typeof X=="function"&&(er(t,l,X,a),R=t.memoizedState),(b=Cl||Ld(t,l,b,a,M,R,u))?(B||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=R),i.props=a,i.state=R,i.context=u,a=b):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),a=!1)}else{i=t.stateNode,Mc(e,t),u=t.memoizedProps,B=ua(l,u),i.props=B,X=t.pendingProps,M=i.context,R=l.contextType,b=Ta,typeof R=="object"&&R!==null&&(b=at(R)),m=l.getDerivedStateFromProps,(R=typeof m=="function"||typeof i.getSnapshotBeforeUpdate=="function")||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(u!==X||M!==b)&&qd(t,i,a,b),Cl=!1,M=t.memoizedState,i.state=M,En(t,a,i,s),Cn();var D=t.memoizedState;u!==X||M!==D||Cl||e!==null&&e.dependencies!==null&&Es(e.dependencies)?(typeof m=="function"&&(er(t,l,m,a),D=t.memoizedState),(B=Cl||Ld(t,l,B,a,M,D,b)||e!==null&&e.dependencies!==null&&Es(e.dependencies))?(R||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=B):(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,Vs(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 tf(e,t,l,a){return ta(),t.flags|=256,nt(e,t,l,a),t.child}var sr={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function ir(e){return{baseLanes:e,cachePool:Xo()}}function cr(e,t,l){return e=e!==null?e.childLanes&~l:0,t&&(e|=Ct),e}function lf(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(ye){if(s?Al(t):_l(),(e=Ue)?(e=dm(e,Ot),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:jl!==null?{id:Xt,overflow:Vt}:null,retryLane:536870912,hydrationErrors:null},l=Uo(e),l.return=t,t.child=l,lt=t,Ue=null)):e=null,e===null)throw Sl(t);return Qr(e)?t.lanes=32:t.lanes=536870912,null}var m=a.children;return a=a.fallback,s?(_l(),s=t.mode,m=Zs({mode:"hidden",children:m},s),a=ea(a,s,l,null),m.return=t,a.return=t,m.sibling=a,t.child=m,a=t.child,a.memoizedState=ir(l),a.childLanes=cr(e,u,l),t.memoizedState=sr,Mn(null,a)):(Al(t),rr(t,m))}var b=e.memoizedState;if(b!==null&&(m=b.dehydrated,m!==null)){if(i)t.flags&256?(Al(t),t.flags&=-257,t=ur(e,t,l)):t.memoizedState!==null?(_l(),t.child=e.child,t.flags|=128,t=null):(_l(),m=a.fallback,s=t.mode,a=Zs({mode:"visible",children:a.children},s),m=ea(m,s,l,null),m.flags|=2,a.return=t,m.return=t,a.sibling=m,t.child=a,ca(t,e.child,null,l),a=t.child,a.memoizedState=ir(l),a.childLanes=cr(e,u,l),t.memoizedState=sr,t=Mn(null,a));else if(Al(t),Qr(m)){if(u=m.nextSibling&&m.nextSibling.dataset,u)var R=u.dgst;u=R,a=Error(r(419)),a.stack="",a.digest=u,bn({value:a,source:null,stack:null}),t=ur(e,t,l)}else if(We||Ma(e,t,l,!1),u=(l&e.childLanes)!==0,We||u){if(u=ze,u!==null&&(a=Yu(u,l),a!==0&&a!==b.retryLane))throw b.retryLane=a,Pl(e,a),xt(u,e,a),ar;Gr(m)||ti(),t=ur(e,t,l)}else Gr(m)?(t.flags|=192,t.child=e.child,t=null):(e=b.treeContext,Ue=kt(m.nextSibling),lt=t,ye=!0,Nl=null,Ot=!1,e!==null&&Bo(t,e),t=rr(t,a.children),t.flags|=4096);return t}return s?(_l(),m=a.fallback,s=t.mode,b=e.child,R=b.sibling,a=Pt(b,{mode:"hidden",children:a.children}),a.subtreeFlags=b.subtreeFlags&65011712,R!==null?m=Pt(R,m):(m=ea(m,s,l,null),m.flags|=2),m.return=t,a.return=t,a.sibling=m,t.child=a,Mn(null,a),a=t.child,m=e.child.memoizedState,m===null?m=ir(l):(s=m.cachePool,s!==null?(b=Ke._currentValue,s=s.parent!==b?{parent:b,pool:b}:s):s=Xo(),m={baseLanes:m.baseLanes|l,cachePool:s}),a.memoizedState=m,a.childLanes=cr(e,u,l),t.memoizedState=sr,Mn(e.child,a)):(Al(t),l=e.child,e=l.sibling,l=Pt(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 rr(e,t){return t=Zs({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Zs(e,t){return e=jt(22,e,null,t),e.lanes=0,e}function ur(e,t,l){return ca(t,e.child,null,l),e=rr(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function af(e,t,l){e.lanes|=t;var a=e.alternate;a!==null&&(a.lanes|=t),wc(e.return,t,l)}function or(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 nf(e,t,l){var a=t.pendingProps,s=a.revealOrder,i=a.tail;a=a.children;var u=Ze.current,m=(u&2)!==0;if(m?(u=u&1|2,t.flags|=128):u&=1,W(Ze,u),nt(e,t,a,l),a=ye?vn:0,!m&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&af(e,l,t);else if(e.tag===19)af(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&&Os(e)===null&&(s=l),l=l.sibling;l=s,l===null?(s=t.child,t.child=null):(s=l.sibling,l.sibling=null),or(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&&Os(e)===null){t.child=s;break}e=s.sibling,s.sibling=l,l=s,s=e}or(t,!0,l,null,i,a);break;case"together":or(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(Ma(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=Pt(e,e.pendingProps),t.child=l,l.return=t;e.sibling!==null;)e=e.sibling,l=l.sibling=Pt(e,e.pendingProps),l.return=t;l.sibling=null}return t.child}function dr(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&Es(e)))}function xx(e,t,l){switch(t.tag){case 3:He(t,t.stateNode.containerInfo),wl(t,Ke,e.memoizedState.cache),ta();break;case 27:case 5:ln(t);break;case 4:He(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,kc(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?lf(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||(Ma(e,t,l,!1),a=(l&t.childLanes)!==0),s){if(a)return nf(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,Wd(e,t,l,t.pendingProps);case 24:wl(t,Ke,e.memoizedState.cache)}return sl(e,t,l)}function sf(e,t,l){if(e!==null)if(e.memoizedProps!==t.pendingProps)We=!0;else{if(!dr(e,l)&&(t.flags&128)===0)return We=!1,xx(e,t,l);We=(e.flags&131072)!==0}else We=!1,ye&&(t.flags&1048576)!==0&&Ho(t,vn,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")gc(e)?(a=ua(e,a),t.tag=1,t=ef(null,t,e,a,l)):(t.tag=0,t=nr(null,t,e,a,l));else{if(e!=null){var s=e.$$typeof;if(s===J){t.tag=11,t=$d(null,t,e,a,l);break e}else if(s===G){t.tag=14,t=Kd(null,t,e,a,l);break e}}throw t=Ve(e)||e,Error(r(306,t,""))}}return t;case 0:return nr(e,t,t.type,t.pendingProps,l);case 1:return a=t.type,s=ua(a,t.pendingProps),ef(e,t,a,s,l);case 3:e:{if(He(t,t.stateNode.containerInfo),e===null)throw Error(r(387));a=t.pendingProps;var i=t.memoizedState;s=i.element,Mc(e,t),En(t,a,null,l);var u=t.memoizedState;if(a=u.cache,wl(t,Ke,a),a!==i.cache&&Cc(t,[Ke],l,!0),Cn(),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=tf(e,t,a,l);break e}else if(a!==s){s=Mt(Error(r(424)),t),bn(s),t=tf(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(Ue=kt(e.firstChild),lt=t,ye=!0,Nl=null,Ot=!0,l=Wo(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 Vs(e,t),e===null?(l=pm(t.type,null,t.pendingProps,null))?t.memoizedState=l:ye||(l=t.type,e=t.pendingProps,a=ri(ue.current).createElement(l),a[tt]=t,a[ut]=e,st(a,l,e),Pe(a),t.stateNode=a):t.memoizedState=pm(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return ln(t),e===null&&ye&&(a=t.stateNode=hm(t.type,t.pendingProps,ue.current),lt=t,Ot=!0,s=Ue,Hl(t.type)?(Xr=s,Ue=kt(a.firstChild)):Ue=s),nt(e,t,t.pendingProps.children,l),Vs(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&ye&&((s=a=Ue)&&(a=Vx(a,t.type,t.pendingProps,Ot),a!==null?(t.stateNode=a,lt=t,Ue=kt(a.firstChild),Ot=!1,s=!0):s=!1),s||Sl(t)),ln(t),s=t.type,i=t.pendingProps,u=e!==null?e.memoizedProps:null,a=i.children,Lr(s,i)?a=null:u!==null&&Lr(s,u)&&(t.flags|=32),t.memoizedState!==null&&(s=Bc(e,t,ix,null,null,l),Zn._currentValue=s),Vs(e,t),nt(e,t,a,l),t.child;case 6:return e===null&&ye&&((e=l=Ue)&&(l=Zx(l,t.pendingProps,Ot),l!==null?(t.stateNode=l,lt=t,Ue=null,e=!0):e=!1),e||Sl(t)),null;case 13:return lf(e,t,l);case 4:return He(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 $d(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 Kd(e,t,t.type,t.pendingProps,l);case 15:return Jd(e,t,t.type,t.pendingProps,l);case 19:return nf(e,t,l);case 31:return hx(e,t,l);case 22:return Wd(e,t,l,t.pendingProps);case 24:return aa(t),a=at(Ke),e===null?(s=Ac(),s===null&&(s=ze,i=Ec(),s.pooledCache=i,i.refCount++,i!==null&&(s.pooledCacheLanes|=l),s=i),t.memoizedState={parent:a,cache:s},Rc(t),wl(t,Ke,s)):((e.lanes&l)!==0&&(Mc(e,t),En(t,null,null,l),Cn()),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&&Cc(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 fr(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(Df())e.flags|=8192;else throw ia=Rs,_c}else e.flags&=-16777217}function cf(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Nm(t))if(Df())e.flags|=8192;else throw ia=Rs,_c}function $s(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Bu():536870912,e.lanes|=t,Qa|=t)}function zn(e,t){if(!ye)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 ke(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 gx(e,t,l){var a=t.pendingProps;switch(yc(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ke(t),null;case 1:return ke(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),Be(),l.pendingContext&&(l.context=l.pendingContext,l.pendingContext=null),(e===null||e.child===null)&&(Ra(t)?il(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Nc())),ke(t),null;case 26:var s=t.type,i=t.memoizedState;return e===null?(il(t),i!==null?(ke(t),cf(t,i)):(ke(t),fr(t,s,null,a,l))):i?i!==e.memoizedState?(il(t),ke(t),cf(t,i)):(ke(t),t.flags&=-16777217):(e=e.memoizedProps,e!==a&&il(t),ke(t),fr(t,s,e,a,l)),null;case 27:if(ns(t),l=ue.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 ke(t),null}e=P.current,Ra(t)?Lo(t):(e=hm(s,a,l),t.stateNode=e,il(t))}return ke(t),null;case 5:if(ns(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 ke(t),null}if(i=P.current,Ra(t))Lo(t);else{var u=ri(ue.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[ut]=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 ke(t),fr(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=ue.current,Ra(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||am(e.nodeValue,l)),e||Sl(t,!0)}else e=ri(e).createTextNode(a),e[tt]=t,t.stateNode=e}return ke(t),null;case 31:if(l=t.memoizedState,e===null||e.memoizedState!==null){if(a=Ra(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;ke(t),e=!1}else l=Nc(),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 ke(t),null;case 13:if(a=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(s=Ra(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;ke(t),s=!1}else s=Nc(),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),$s(t,t.updateQueue),ke(t),null);case 4:return Be(),e===null&&Or(t.stateNode.containerInfo),ke(t),null;case 10:return ll(t.type),ke(t),null;case 19:if(Q(Ze),a=t.memoizedState,a===null)return ke(t),null;if(s=(t.flags&128)!==0,i=a.rendering,i===null)if(s)zn(a,!1);else{if(Qe!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(i=Os(e),i!==null){for(t.flags|=128,zn(a,!1),e=i.updateQueue,t.updateQueue=e,$s(t,e),t.subtreeFlags=0,e=l,l=t.child;l!==null;)Oo(l,e),l=l.sibling;return W(Ze,Ze.current&1|2),ye&&el(t,a.treeForkCount),t.child}e=e.sibling}a.tail!==null&&pt()>Is&&(t.flags|=128,s=!0,zn(a,!1),t.lanes=4194304)}else{if(!s)if(e=Os(i),e!==null){if(t.flags|=128,s=!0,e=e.updateQueue,t.updateQueue=e,$s(t,e),zn(a,!0),a.tail===null&&a.tailMode==="hidden"&&!i.alternate&&!ye)return ke(t),null}else 2*pt()-a.renderingStartTime>Is&&l!==536870912&&(t.flags|=128,s=!0,zn(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=pt(),e.sibling=null,l=Ze.current,W(Ze,s?l&1|2:l&1),ye&&el(t,a.treeForkCount),e):(ke(t),null);case 22:case 23:return St(t),Uc(),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&&(ke(t),t.subtreeFlags&6&&(t.flags|=8192)):ke(t),l=t.updateQueue,l!==null&&$s(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&&Q(na),null;case 24:return l=null,e!==null&&(l=e.memoizedState.cache),t.memoizedState.cache!==l&&(t.flags|=2048),ll(Ke),ke(t),null;case 25:return null;case 30:return null}throw Error(r(156,t.tag))}function px(e,t){switch(yc(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ll(Ke),Be(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return ns(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 Q(Ze),null;case 4:return Be(),null;case 10:return ll(t.type),null;case 22:case 23:return St(t),Uc(),e!==null&&Q(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 rf(e,t){switch(yc(t),t.tag){case 3:ll(Ke),Be();break;case 26:case 27:case 5:ns(t);break;case 4:Be();break;case 31:t.memoizedState!==null&&St(t);break;case 13:St(t);break;case 19:Q(Ze);break;case 10:ll(t.type);break;case 22:case 23:St(t),Uc(),e!==null&&Q(na);break;case 24:ll(Ke)}}function Dn(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(m){Te(t,t.return,m)}}function Rl(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,m=u.destroy;if(m!==void 0){u.destroy=void 0,s=t;var b=l,R=m;try{R()}catch(B){Te(s,b,B)}}}a=a.next}while(a!==i)}}catch(B){Te(t,t.return,B)}}function uf(e){var t=e.updateQueue;if(t!==null){var l=e.stateNode;try{Io(t,l)}catch(a){Te(e,e.return,a)}}}function of(e,t,l){l.props=ua(e.type,e.memoizedProps),l.state=e.memoizedState;try{l.componentWillUnmount()}catch(a){Te(e,t,a)}}function On(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){Te(e,t,s)}}function Zt(e,t){var l=e.ref,a=e.refCleanup;if(l!==null)if(typeof a=="function")try{a()}catch(s){Te(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){Te(e,t,s)}else l.current=null}function df(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){Te(e,e.return,s)}}function mr(e,t,l){try{var a=e.stateNode;Lx(a,e.type,l,t),a[ut]=t}catch(s){Te(e,e.return,s)}}function ff(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Hl(e.type)||e.tag===4}function hr(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||ff(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 xr(e,t,l){var a=e.tag;if(a===5||a===6)e=e.stateNode,t?(l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l).insertBefore(e,t):(t=l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l,t.appendChild(e),l=l._reactRootContainer,l!=null||t.onclick!==null||(t.onclick=Ft));else if(a!==4&&(a===27&&Hl(e.type)&&(l=e.stateNode,t=null),e=e.child,e!==null))for(xr(e,t,l),e=e.sibling;e!==null;)xr(e,t,l),e=e.sibling}function Ks(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(Ks(e,t,l),e=e.sibling;e!==null;)Ks(e,t,l),e=e.sibling}function mf(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[ut]=l}catch(i){Te(e,e.return,i)}}var cl=!1,Fe=!1,gr=!1,hf=typeof WeakSet=="function"?WeakSet:Set,et=null;function vx(e,t){if(e=e.containerInfo,Hr=xi,e=Co(e),uc(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,m=-1,b=-1,R=0,B=0,X=e,M=null;t:for(;;){for(var D;X!==l||s!==0&&X.nodeType!==3||(m=u+s),X!==i||a!==0&&X.nodeType!==3||(b=u+a),X.nodeType===3&&(u+=X.nodeValue.length),(D=X.firstChild)!==null;)M=X,X=D;for(;;){if(X===e)break t;if(M===l&&++R===s&&(m=u),M===i&&++B===a&&(b=u),(D=X.nextSibling)!==null)break;X=M,M=X.parentNode}X=D}l=m===-1||b===-1?null:{start:m,end:b}}else l=null}l=l||{start:0,end:0}}else l=null;for(Br={focusedElem:e,selectionRange:l},xi=!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 ee=ua(l.type,s);e=a.getSnapshotBeforeUpdate(ee,i),a.__reactInternalSnapshotBeforeUpdate=e}catch(se){Te(l,l.return,se)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,l=e.nodeType,l===9)Yr(e);else if(l===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Yr(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 xf(e,t,l){var a=l.flags;switch(l.tag){case 0:case 11:case 15:ul(e,l),a&4&&Dn(5,l);break;case 1:if(ul(e,l),a&4)if(e=l.stateNode,t===null)try{e.componentDidMount()}catch(u){Te(l,l.return,u)}else{var s=ua(l.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(s,t,e.__reactInternalSnapshotBeforeUpdate)}catch(u){Te(l,l.return,u)}}a&64&&uf(l),a&512&&On(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{Io(e,t)}catch(u){Te(l,l.return,u)}}break;case 27:t===null&&a&4&&mf(l);case 26:case 5:ul(e,l),t===null&&a&4&&df(l),a&512&&On(l,l.return);break;case 12:ul(e,l);break;case 31:ul(e,l),a&4&&vf(e,l);break;case 13:ul(e,l),a&4&&bf(e,l),a&64&&(e=l.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(l=Tx.bind(null,l),$x(e,l))));break;case 22:if(a=l.memoizedState!==null||cl,!a){t=t!==null&&t.memoizedState!==null||Fe,s=cl;var i=Fe;cl=a,(Fe=t)&&!i?ol(e,l,(l.subtreeFlags&8772)!==0):ul(e,l),cl=s,Fe=i}break;case 30:break;default:ul(e,l)}}function gf(e){var t=e.alternate;t!==null&&(e.alternate=null,gf(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Zi(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 Le=null,dt=!1;function rl(e,t,l){for(l=l.child;l!==null;)pf(e,t,l),l=l.sibling}function pf(e,t,l){if(vt&&typeof vt.onCommitFiberUnmount=="function")try{vt.onCommitFiberUnmount(an,l)}catch{}switch(l.tag){case 26:Fe||Zt(l,t),rl(e,t,l),l.memoizedState?l.memoizedState.count--:l.stateNode&&(l=l.stateNode,l.parentNode.removeChild(l));break;case 27:Fe||Zt(l,t);var a=Le,s=dt;Hl(l.type)&&(Le=l.stateNode,dt=!1),rl(e,t,l),Qn(l.stateNode),Le=a,dt=s;break;case 5:Fe||Zt(l,t);case 6:if(a=Le,s=dt,Le=null,rl(e,t,l),Le=a,dt=s,Le!==null)if(dt)try{(Le.nodeType===9?Le.body:Le.nodeName==="HTML"?Le.ownerDocument.body:Le).removeChild(l.stateNode)}catch(i){Te(l,t,i)}else try{Le.removeChild(l.stateNode)}catch(i){Te(l,t,i)}break;case 18:Le!==null&&(dt?(e=Le,um(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,l.stateNode),Fa(e)):um(Le,l.stateNode));break;case 4:a=Le,s=dt,Le=l.stateNode.containerInfo,dt=!0,rl(e,t,l),Le=a,dt=s;break;case 0:case 11:case 14:case 15:Rl(2,l,t),Fe||Rl(4,l,t),rl(e,t,l);break;case 1:Fe||(Zt(l,t),a=l.stateNode,typeof a.componentWillUnmount=="function"&&of(l,t,a)),rl(e,t,l);break;case 21:rl(e,t,l);break;case 22:Fe=(a=Fe)||l.memoizedState!==null,rl(e,t,l),Fe=a;break;default:rl(e,t,l)}}function vf(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Fa(e)}catch(l){Te(t,t.return,l)}}}function bf(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Fa(e)}catch(l){Te(t,t.return,l)}}function bx(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new hf),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new hf),t;default:throw Error(r(435,e.tag))}}function Js(e,t){var l=bx(e);t.forEach(function(a){if(!l.has(a)){l.add(a);var s=Ax.bind(null,e,a);a.then(s,s)}})}function ft(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,m=u;e:for(;m!==null;){switch(m.tag){case 27:if(Hl(m.type)){Le=m.stateNode,dt=!1;break e}break;case 5:Le=m.stateNode,dt=!1;break e;case 3:case 4:Le=m.stateNode.containerInfo,dt=!0;break e}m=m.return}if(Le===null)throw Error(r(160));pf(i,u,s),Le=null,dt=!1,i=s.alternate,i!==null&&(i.return=null),s.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)yf(t,e),t=t.sibling}var Yt=null;function yf(e,t){var l=e.alternate,a=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:ft(t,e),mt(e),a&4&&(Rl(3,e,e.return),Dn(3,e),Rl(5,e,e.return));break;case 1:ft(t,e),mt(e),a&512&&(Fe||l===null||Zt(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=Yt;if(ft(t,e),mt(e),a&512&&(Fe||l===null||Zt(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[cn]||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,Pe(i),a=i;break e;case"link":var u=ym("link","href",s).get(a+(l.href||""));if(u){for(var m=0;m<u.length;m++)if(i=u[m],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(m,1);break t}}i=s.createElement(a),st(i,a,l),s.head.appendChild(i);break;case"meta":if(u=ym("meta","content",s).get(a+(l.content||""))){for(m=0;m<u.length;m++)if(i=u[m],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(m,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,Pe(i),a=i}e.stateNode=a}else jm(s,e.type,e.stateNode);else e.stateNode=bm(s,a,e.memoizedProps);else i!==a?(i===null?l.stateNode!==null&&(l=l.stateNode,l.parentNode.removeChild(l)):i.count--,a===null?jm(s,e.type,e.stateNode):bm(s,a,e.memoizedProps)):a===null&&e.stateNode!==null&&mr(e,e.memoizedProps,l.memoizedProps)}break;case 27:ft(t,e),mt(e),a&512&&(Fe||l===null||Zt(l,l.return)),l!==null&&a&4&&mr(e,e.memoizedProps,l.memoizedProps);break;case 5:if(ft(t,e),mt(e),a&512&&(Fe||l===null||Zt(l,l.return)),e.flags&32){s=e.stateNode;try{ya(s,"")}catch(ee){Te(e,e.return,ee)}}a&4&&e.stateNode!=null&&(s=e.memoizedProps,mr(e,s,l!==null?l.memoizedProps:s)),a&1024&&(gr=!0);break;case 6:if(ft(t,e),mt(e),a&4){if(e.stateNode===null)throw Error(r(162));a=e.memoizedProps,l=e.stateNode;try{l.nodeValue=a}catch(ee){Te(e,e.return,ee)}}break;case 3:if(di=null,s=Yt,Yt=ui(t.containerInfo),ft(t,e),Yt=s,mt(e),a&4&&l!==null&&l.memoizedState.isDehydrated)try{Fa(t.containerInfo)}catch(ee){Te(e,e.return,ee)}gr&&(gr=!1,jf(e));break;case 4:a=Yt,Yt=ui(e.stateNode.containerInfo),ft(t,e),mt(e),Yt=a;break;case 12:ft(t,e),mt(e);break;case 31:ft(t,e),mt(e),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,Js(e,a)));break;case 13:ft(t,e),mt(e),e.child.flags&8192&&e.memoizedState!==null!=(l!==null&&l.memoizedState!==null)&&(Fs=pt()),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,Js(e,a)));break;case 22:s=e.memoizedState!==null;var b=l!==null&&l.memoizedState!==null,R=cl,B=Fe;if(cl=R||s,Fe=B||b,ft(t,e),Fe=B,cl=R,mt(e),a&8192)e:for(t=e.stateNode,t._visibility=s?t._visibility&-2:t._visibility|1,s&&(l===null||b||cl||Fe||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{m=b.stateNode;var X=b.memoizedProps.style,M=X!=null&&X.hasOwnProperty("display")?X.display:null;m.style.display=M==null||typeof M=="boolean"?"":(""+M).trim()}}catch(ee){Te(b,b.return,ee)}}}else if(t.tag===6){if(l===null){b=t;try{b.stateNode.nodeValue=s?"":b.memoizedProps}catch(ee){Te(b,b.return,ee)}}}else if(t.tag===18){if(l===null){b=t;try{var D=b.stateNode;s?om(D,!0):om(b.stateNode,!1)}catch(ee){Te(b,b.return,ee)}}}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,Js(e,l))));break;case 19:ft(t,e),mt(e),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,Js(e,a)));break;case 30:break;case 21:break;default:ft(t,e),mt(e)}}function mt(e){var t=e.flags;if(t&2){try{for(var l,a=e.return;a!==null;){if(ff(a)){l=a;break}a=a.return}if(l==null)throw Error(r(160));switch(l.tag){case 27:var s=l.stateNode,i=hr(e);Ks(e,i,s);break;case 5:var u=l.stateNode;l.flags&32&&(ya(u,""),l.flags&=-33);var m=hr(e);Ks(e,m,u);break;case 3:case 4:var b=l.stateNode.containerInfo,R=hr(e);xr(e,R,b);break;default:throw Error(r(161))}}catch(B){Te(e,e.return,B)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function jf(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;jf(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;)xf(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:Rl(4,t,t.return),oa(t);break;case 1:Zt(t,t.return);var l=t.stateNode;typeof l.componentWillUnmount=="function"&&of(t,t.return,l),oa(t);break;case 27:Qn(t.stateNode);case 26:case 5:Zt(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),Dn(4,i);break;case 1:if(ol(s,i,l),a=i,s=a.stateNode,typeof s.componentDidMount=="function")try{s.componentDidMount()}catch(R){Te(a,a.return,R)}if(a=i,s=a.updateQueue,s!==null){var m=a.stateNode;try{var b=s.shared.hiddenCallbacks;if(b!==null)for(s.shared.hiddenCallbacks=null,s=0;s<b.length;s++)Fo(b[s],m)}catch(R){Te(a,a.return,R)}}l&&u&64&&uf(i),On(i,i.return);break;case 27:mf(i);case 26:case 5:ol(s,i,l),l&&a===null&&u&4&&df(i),On(i,i.return);break;case 12:ol(s,i,l);break;case 31:ol(s,i,l),l&&u&4&&vf(s,i);break;case 13:ol(s,i,l),l&&u&4&&bf(s,i);break;case 22:i.memoizedState===null&&ol(s,i,l),On(i,i.return);break;case 30:break;default:ol(s,i,l)}t=t.sibling}}function pr(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&&yn(l))}function vr(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&yn(e))}function Gt(e,t,l,a){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Nf(e,t,l,a),t=t.sibling}function Nf(e,t,l,a){var s=t.flags;switch(t.tag){case 0:case 11:case 15:Gt(e,t,l,a),s&2048&&Dn(9,t);break;case 1:Gt(e,t,l,a);break;case 3:Gt(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&&yn(e)));break;case 12:if(s&2048){Gt(e,t,l,a),e=t.stateNode;try{var i=t.memoizedProps,u=i.id,m=i.onPostCommit;typeof m=="function"&&m(u,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(b){Te(t,t.return,b)}}else Gt(e,t,l,a);break;case 31:Gt(e,t,l,a);break;case 13:Gt(e,t,l,a);break;case 23:break;case 22:i=t.stateNode,u=t.alternate,t.memoizedState!==null?i._visibility&2?Gt(e,t,l,a):Un(e,t):i._visibility&2?Gt(e,t,l,a):(i._visibility|=2,qa(e,t,l,a,(t.subtreeFlags&10256)!==0||!1)),s&2048&&pr(u,t);break;case 24:Gt(e,t,l,a),s&2048&&vr(t.alternate,t);break;default:Gt(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,m=l,b=a,R=u.flags;switch(u.tag){case 0:case 11:case 15:qa(i,u,m,b,s),Dn(8,u);break;case 23:break;case 22:var B=u.stateNode;u.memoizedState!==null?B._visibility&2?qa(i,u,m,b,s):Un(i,u):(B._visibility|=2,qa(i,u,m,b,s)),s&&R&2048&&pr(u.alternate,u);break;case 24:qa(i,u,m,b,s),s&&R&2048&&vr(u.alternate,u);break;default:qa(i,u,m,b,s)}t=t.sibling}}function Un(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:Un(l,a),s&2048&&pr(a.alternate,a);break;case 24:Un(l,a),s&2048&&vr(a.alternate,a);break;default:Un(l,a)}t=t.sibling}}var kn=8192;function Ya(e,t,l){if(e.subtreeFlags&kn)for(e=e.child;e!==null;)Sf(e,t,l),e=e.sibling}function Sf(e,t,l){switch(e.tag){case 26:Ya(e,t,l),e.flags&kn&&e.memoizedState!==null&&sg(l,Yt,e.memoizedState,e.memoizedProps);break;case 5:Ya(e,t,l);break;case 3:case 4:var a=Yt;Yt=ui(e.stateNode.containerInfo),Ya(e,t,l),Yt=a;break;case 22:e.memoizedState===null&&(a=e.alternate,a!==null&&a.memoizedState!==null?(a=kn,kn=16777216,Ya(e,t,l),kn=a):Ya(e,t,l));break;default:Ya(e,t,l)}}function wf(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 Hn(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,Ef(a,e)}wf(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Cf(e),e=e.sibling}function Cf(e){switch(e.tag){case 0:case 11:case 15:Hn(e),e.flags&2048&&Rl(9,e,e.return);break;case 3:Hn(e);break;case 12:Hn(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Ws(e)):Hn(e);break;default:Hn(e)}}function Ws(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,Ef(a,e)}wf(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Rl(8,t,t.return),Ws(t);break;case 22:l=t.stateNode,l._visibility&2&&(l._visibility&=-3,Ws(t));break;default:Ws(t)}e=e.sibling}}function Ef(e,t){for(;et!==null;){var l=et;switch(l.tag){case 0:case 11:case 15:Rl(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:yn(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(gf(a),a===l){et=null;break e}if(s!==null){s.return=i,et=s;break e}et=i}}}var yx={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}},jx=typeof WeakMap=="function"?WeakMap:Map,we=0,ze=null,xe=null,pe=0,Ee=0,wt=null,Ml=!1,Ga=!1,br=!1,dl=0,Qe=0,zl=0,da=0,yr=0,Ct=0,Qa=0,Bn=null,ht=null,jr=!1,Fs=0,Tf=0,Is=1/0,Ps=null,Dl=null,Ie=0,Ol=null,Xa=null,fl=0,Nr=0,Sr=null,Af=null,Ln=0,wr=null;function Et(){return(we&2)!==0&&pe!==0?pe&-pe:U.T!==null?Rr():Gu()}function _f(){if(Ct===0)if((pe&536870912)===0||ye){var e=cs;cs<<=1,(cs&3932160)===0&&(cs=262144),Ct=e}else Ct=536870912;return e=Nt.current,e!==null&&(e.flags|=32),Ct}function xt(e,t,l){(e===ze&&(Ee===2||Ee===9)||e.cancelPendingCommit!==null)&&(Va(e,0),Ul(e,pe,Ct,!1)),sn(e,l),((we&2)===0||e!==ze)&&(e===ze&&((we&2)===0&&(da|=l),Qe===4&&Ul(e,pe,Ct,!1)),$t(e))}function Rf(e,t,l){if((we&6)!==0)throw Error(r(327));var a=!l&&(t&127)===0&&(t&e.expiredLanes)===0||nn(e,t),s=a?wx(e,t):Er(e,t,!0),i=a;do{if(s===0){Ga&&!a&&Ul(e,t,0,!1);break}else{if(l=e.current.alternate,i&&!Nx(l)){s=Er(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 m=e;s=Bn;var b=m.current.memoizedState.isDehydrated;if(b&&(Va(m,u).flags|=256),u=Er(m,u,!1),u!==2){if(br&&!b){m.errorRecoveryDisabledLanes|=i,da|=i,s=4;break e}i=ht,ht=s,i!==null&&(ht===null?ht=i:ht.push.apply(ht,i))}s=u}if(i=!1,s!==2)continue}}if(s===1){Va(e,0),Ul(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:Ul(a,t,Ct,!Ml);break e;case 2:ht=null;break;case 3:case 5:break;default:throw Error(r(329))}if((t&62914560)===t&&(s=Fs+300-pt(),10<s)){if(Ul(a,t,Ct,!Ml),us(a,0,!0)!==0)break e;fl=t,a.timeoutHandle=cm(Mf.bind(null,a,l,ht,Ps,jr,t,Ct,da,Qa,Ml,i,"Throttled",-0,0),s);break e}Mf(a,l,ht,Ps,jr,t,Ct,da,Qa,Ml,i,null,-0,0)}}break}while(!0);$t(e)}function Mf(e,t,l,a,s,i,u,m,b,R,B,X,M,D){if(e.timeoutHandle=-1,X=t.subtreeFlags,X&8192||(X&16785408)===16785408){X={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Ft},Sf(t,i,X);var ee=(i&62914560)===i?Fs-pt():(i&4194048)===i?Tf-pt():0;if(ee=ig(X,ee),ee!==null){fl=i,e.cancelPendingCommit=ee(Lf.bind(null,e,t,i,l,a,s,u,m,b,B,X,null,M,D)),Ul(e,i,u,!R);return}}Lf(e,t,i,l,a,s,u,m,b)}function Nx(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 Ul(e,t,l,a){t&=~yr,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&&Lu(e,l,t)}function ei(){return(we&6)===0?(qn(0),!1):!0}function Cr(){if(xe!==null){if(Ee===0)var e=xe.return;else e=xe,tl=la=null,Yc(e),Ua=null,Nn=0,e=xe;for(;e!==null;)rf(e.alternate,e),e=e.return;xe=null}}function Va(e,t){var l=e.timeoutHandle;l!==-1&&(e.timeoutHandle=-1,Gx(l)),l=e.cancelPendingCommit,l!==null&&(e.cancelPendingCommit=null,l()),fl=0,Cr(),ze=e,xe=l=Pt(e.current,null),pe=t,Ee=0,wt=null,Ml=!1,Ga=nn(e,t),br=!1,Qa=Ct=yr=da=zl=Qe=0,ht=Bn=null,jr=!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,js(),l}function zf(e,t){de=null,U.H=Rn,t===Oa||t===_s?(t=$o(),Ee=3):t===_c?(t=$o(),Ee=4):Ee=t===ar?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,wt=t,xe===null&&(Qe=1,Qs(e,Mt(t,e.current)))}function Df(){var e=Nt.current;return e===null?!0:(pe&4194048)===pe?Ut===null:(pe&62914560)===pe||(pe&536870912)!==0?e===Ut:!1}function Of(){var e=U.H;return U.H=Rn,e===null?Rn:e}function Uf(){var e=U.A;return U.A=yx,e}function ti(){Qe=4,Ml||(pe&4194048)!==pe&&Nt.current!==null||(Ga=!0),(zl&134217727)===0&&(da&134217727)===0||ze===null||Ul(ze,pe,Ct,!1)}function Er(e,t,l){var a=we;we|=2;var s=Of(),i=Uf();(ze!==e||pe!==t)&&(Ps=null,Va(e,t)),t=!1;var u=Qe;e:do try{if(Ee!==0&&xe!==null){var m=xe,b=wt;switch(Ee){case 8:Cr(),u=6;break e;case 3:case 2:case 9:case 6:Nt.current===null&&(t=!0);var R=Ee;if(Ee=0,wt=null,Za(e,m,b,R),l&&Ga){u=0;break e}break;default:R=Ee,Ee=0,wt=null,Za(e,m,b,R)}}Sx(),u=Qe;break}catch(B){zf(e,B)}while(!0);return t&&e.shellSuspendCounter++,tl=la=null,we=a,U.H=s,U.A=i,xe===null&&(ze=null,pe=0,js()),u}function Sx(){for(;xe!==null;)kf(xe)}function wx(e,t){var l=we;we|=2;var a=Of(),s=Uf();ze!==e||pe!==t?(Ps=null,Is=pt()+500,Va(e,t)):Ga=nn(e,t);e:do try{if(Ee!==0&&xe!==null){t=xe;var i=wt;t:switch(Ee){case 1:Ee=0,wt=null,Za(e,t,i,1);break;case 2:case 9:if(Vo(i)){Ee=0,wt=null,Hf(t);break}t=function(){Ee!==2&&Ee!==9||ze!==e||(Ee=7),$t(e)},i.then(t,t);break e;case 3:Ee=7;break e;case 4:Ee=5;break e;case 7:Vo(i)?(Ee=0,wt=null,Hf(t)):(Ee=0,wt=null,Za(e,t,i,7));break;case 5:var u=null;switch(xe.tag){case 26:u=xe.memoizedState;case 5:case 27:var m=xe;if(u?Nm(u):m.stateNode.complete){Ee=0,wt=null;var b=m.sibling;if(b!==null)xe=b;else{var R=m.return;R!==null?(xe=R,li(R)):xe=null}break t}}Ee=0,wt=null,Za(e,t,i,5);break;case 6:Ee=0,wt=null,Za(e,t,i,6);break;case 8:Cr(),Qe=6;break e;default:throw Error(r(462))}}Cx();break}catch(B){zf(e,B)}while(!0);return tl=la=null,U.H=a,U.A=s,we=l,xe!==null?0:(ze=null,pe=0,js(),Qe)}function Cx(){for(;xe!==null&&!K0();)kf(xe)}function kf(e){var t=sf(e.alternate,e,dl);e.memoizedProps=e.pendingProps,t===null?li(e):xe=t}function Hf(e){var t=e,l=t.alternate;switch(t.tag){case 15:case 0:t=Pd(l,t,t.pendingProps,t.type,void 0,pe);break;case 11:t=Pd(l,t,t.pendingProps,t.type.render,t.ref,pe);break;case 5:Yc(t);default:rf(l,t),t=xe=Oo(t,dl),t=sf(l,t,dl)}e.memoizedProps=e.pendingProps,t===null?li(e):xe=t}function Za(e,t,l,a){tl=la=null,Yc(t),Ua=null,Nn=0;var s=t.return;try{if(mx(e,s,t,l,pe)){Qe=1,Qs(e,Mt(l,e.current)),xe=null;return}}catch(i){if(s!==null)throw xe=s,i;Qe=1,Qs(e,Mt(l,e.current)),xe=null;return}t.flags&32768?(ye||a===1?e=!0:Ga||(pe&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))),Bf(t,e)):li(t)}function li(e){var t=e;do{if((t.flags&32768)!==0){Bf(t,Ml);return}e=t.return;var l=gx(t.alternate,t,dl);if(l!==null){xe=l;return}if(t=t.sibling,t!==null){xe=t;return}xe=t=e}while(t!==null);Qe===0&&(Qe=5)}function Bf(e,t){do{var l=px(e.alternate,e);if(l!==null){l.flags&=32767,xe=l;return}if(l=e.return,l!==null&&(l.flags|=32768,l.subtreeFlags=0,l.deletions=null),!t&&(e=e.sibling,e!==null)){xe=e;return}xe=e=l}while(e!==null);Qe=6,xe=null}function Lf(e,t,l,a,s,i,u,m,b){e.cancelPendingCommit=null;do ai();while(Ie!==0);if((we&6)!==0)throw Error(r(327));if(t!==null){if(t===e.current)throw Error(r(177));if(i=t.lanes|t.childLanes,i|=hc,nh(e,l,i,u,m,b),e===ze&&(xe=ze=null,pe=0),Xa=t,Ol=e,fl=l,Nr=i,Sr=s,Af=a,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,_x(ss,function(){return Xf(),null})):(e.callbackNode=null,e.callbackPriority=0),a=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||a){a=U.T,U.T=null,s=Z.p,Z.p=2,u=we,we|=4;try{vx(e,t,l)}finally{we=u,Z.p=s,U.T=a}}Ie=1,qf(),Yf(),Gf()}}function qf(){if(Ie===1){Ie=0;var e=Ol,t=Xa,l=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||l){l=U.T,U.T=null;var a=Z.p;Z.p=2;var s=we;we|=4;try{yf(t,e);var i=Br,u=Co(e.containerInfo),m=i.focusedElem,b=i.selectionRange;if(u!==m&&m&&m.ownerDocument&&wo(m.ownerDocument.documentElement,m)){if(b!==null&&uc(m)){var R=b.start,B=b.end;if(B===void 0&&(B=R),"selectionStart"in m)m.selectionStart=R,m.selectionEnd=Math.min(B,m.value.length);else{var X=m.ownerDocument||document,M=X&&X.defaultView||window;if(M.getSelection){var D=M.getSelection(),ee=m.textContent.length,se=Math.min(b.start,ee),Re=b.end===void 0?se:Math.min(b.end,ee);!D.extend&&se>Re&&(u=Re,Re=se,se=u);var E=So(m,se),N=So(m,Re);if(E&&N&&(D.rangeCount!==1||D.anchorNode!==E.node||D.anchorOffset!==E.offset||D.focusNode!==N.node||D.focusOffset!==N.offset)){var _=X.createRange();_.setStart(E.node,E.offset),D.removeAllRanges(),se>Re?(D.addRange(_),D.extend(N.node,N.offset)):(_.setEnd(N.node,N.offset),D.addRange(_))}}}}for(X=[],D=m;D=D.parentNode;)D.nodeType===1&&X.push({element:D,left:D.scrollLeft,top:D.scrollTop});for(typeof m.focus=="function"&&m.focus(),m=0;m<X.length;m++){var Y=X[m];Y.element.scrollLeft=Y.left,Y.element.scrollTop=Y.top}}xi=!!Hr,Br=Hr=null}finally{we=s,Z.p=a,U.T=l}}e.current=t,Ie=2}}function Yf(){if(Ie===2){Ie=0;var e=Ol,t=Xa,l=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||l){l=U.T,U.T=null;var a=Z.p;Z.p=2;var s=we;we|=4;try{xf(e,t.alternate,t)}finally{we=s,Z.p=a,U.T=l}}Ie=3}}function Gf(){if(Ie===4||Ie===3){Ie=0,J0();var e=Ol,t=Xa,l=fl,a=Af;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?Ie=5:(Ie=0,Xa=Ol=null,Qf(e,e.pendingLanes));var s=e.pendingLanes;if(s===0&&(Dl=null),Xi(l),t=t.stateNode,vt&&typeof vt.onCommitFiberRoot=="function")try{vt.onCommitFiberRoot(an,t,void 0,(t.current.flags&128)===128)}catch{}if(a!==null){t=U.T,s=Z.p,Z.p=2,U.T=null;try{for(var i=e.onRecoverableError,u=0;u<a.length;u++){var m=a[u];i(m.value,{componentStack:m.stack})}}finally{U.T=t,Z.p=s}}(fl&3)!==0&&ai(),$t(e),s=e.pendingLanes,(l&261930)!==0&&(s&42)!==0?e===wr?Ln++:(Ln=0,wr=e):Ln=0,qn(0)}}function Qf(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,yn(t)))}function ai(){return qf(),Yf(),Gf(),Xf()}function Xf(){if(Ie!==5)return!1;var e=Ol,t=Nr;Nr=0;var l=Xi(fl),a=U.T,s=Z.p;try{Z.p=32>l?32:l,U.T=null,l=Sr,Sr=null;var i=Ol,u=fl;if(Ie=0,Xa=Ol=null,fl=0,(we&6)!==0)throw Error(r(331));var m=we;if(we|=4,Cf(i.current),Nf(i,i.current,u,l),we=m,qn(0,!1),vt&&typeof vt.onPostCommitFiberRoot=="function")try{vt.onPostCommitFiberRoot(an,i)}catch{}return!0}finally{Z.p=s,U.T=a,Qf(e,t)}}function Vf(e,t,l){t=Mt(l,t),t=lr(e.stateNode,t,2),e=Tl(e,t,2),e!==null&&(sn(e,2),$t(e))}function Te(e,t,l){if(e.tag===3)Vf(e,e,l);else for(;t!==null;){if(t.tag===3){Vf(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=Vd(2),a=Tl(t,l,2),a!==null&&(Zd(l,a,t,e),sn(a,2),$t(a));break}}t=t.return}}function Tr(e,t,l){var a=e.pingCache;if(a===null){a=e.pingCache=new jx;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)||(br=!0,s.add(l),e=Ex.bind(null,e,t,l),t.then(e,e))}function Ex(e,t,l){var a=e.pingCache;a!==null&&a.delete(t),e.pingedLanes|=e.suspendedLanes&l,e.warmLanes&=~l,ze===e&&(pe&l)===l&&(Qe===4||Qe===3&&(pe&62914560)===pe&&300>pt()-Fs?(we&2)===0&&Va(e,0):yr|=l,Qa===pe&&(Qa=0)),$t(e)}function Zf(e,t){t===0&&(t=Bu()),e=Pl(e,t),e!==null&&(sn(e,t),$t(e))}function Tx(e){var t=e.memoizedState,l=0;t!==null&&(l=t.retryLane),Zf(e,l)}function Ax(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),Zf(e,l)}function _x(e,t){return qi(e,t)}var ni=null,$a=null,Ar=!1,si=!1,_r=!1,kl=0;function $t(e){e!==$a&&e.next===null&&($a===null?ni=$a=e:$a=$a.next=e),si=!0,Ar||(Ar=!0,Mx())}function qn(e,t){if(!_r&&si){_r=!0;do for(var l=!1,a=ni;a!==null;){if(e!==0){var s=a.pendingLanes;if(s===0)var i=0;else{var u=a.suspendedLanes,m=a.pingedLanes;i=(1<<31-bt(42|e)+1)-1,i&=s&~(u&~m),i=i&201326741?i&201326741|1:i?i|2:0}i!==0&&(l=!0,Wf(a,i))}else i=pe,i=us(a,a===ze?i:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),(i&3)===0||nn(a,i)||(l=!0,Wf(a,i));a=a.next}while(l);_r=!1}}function Rx(){$f()}function $f(){si=Ar=!1;var e=0;kl!==0&&Yx()&&(e=kl);for(var t=pt(),l=null,a=ni;a!==null;){var s=a.next,i=Kf(a,t);i===0?(a.next=null,l===null?ni=s:l.next=s,s===null&&($a=l)):(l=a,(e!==0||(i&3)!==0)&&(si=!0)),a=s}Ie!==0&&Ie!==5||qn(e),kl!==0&&(kl=0)}function Kf(e,t){for(var l=e.suspendedLanes,a=e.pingedLanes,s=e.expirationTimes,i=e.pendingLanes&-62914561;0<i;){var u=31-bt(i),m=1<<u,b=s[u];b===-1?((m&l)===0||(m&a)!==0)&&(s[u]=ah(m,t)):b<=t&&(e.expiredLanes|=m),i&=~m}if(t=ze,l=pe,l=us(e,e===t?l:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a=e.callbackNode,l===0||e===t&&(Ee===2||Ee===9)||e.cancelPendingCommit!==null)return a!==null&&a!==null&&Yi(a),e.callbackNode=null,e.callbackPriority=0;if((l&3)===0||nn(e,l)){if(t=l&-l,t===e.callbackPriority)return t;switch(a!==null&&Yi(a),Xi(l)){case 2:case 8:l=ku;break;case 32:l=ss;break;case 268435456:l=Hu;break;default:l=ss}return a=Jf.bind(null,e),l=qi(l,a),e.callbackPriority=t,e.callbackNode=l,t}return a!==null&&a!==null&&Yi(a),e.callbackPriority=2,e.callbackNode=null,2}function Jf(e,t){if(Ie!==0&&Ie!==5)return e.callbackNode=null,e.callbackPriority=0,null;var l=e.callbackNode;if(ai()&&e.callbackNode!==l)return null;var a=pe;return a=us(e,e===ze?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a===0?null:(Rf(e,a,t),Kf(e,pt()),e.callbackNode!=null&&e.callbackNode===l?Jf.bind(null,e):null)}function Wf(e,t){if(ai())return null;Rf(e,t,!0)}function Mx(){Qx(function(){(we&6)!==0?qi(Uu,Rx):$f()})}function Rr(){if(kl===0){var e=za;e===0&&(e=is,is<<=1,(is&261888)===0&&(is=256)),kl=e}return kl}function Ff(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:ms(""+e)}function If(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 zx(e,t,l,a,s){if(t==="submit"&&l&&l.stateNode===s){var i=Ff((s[ut]||null).action),u=a.submitter;u&&(t=(t=u[ut]||null)?Ff(t.formAction):u.getAttribute("formAction"),t!==null&&(i=t,u=null));var m=new ps("action","action",null,a,s);e.push({event:m,listeners:[{instance:null,listener:function(){if(a.defaultPrevented){if(kl!==0){var b=u?If(s,u):new FormData(s);Wc(l,{pending:!0,data:b,method:s.method,action:i},null,b)}}else typeof i=="function"&&(m.preventDefault(),b=u?If(s,u):new FormData(s),Wc(l,{pending:!0,data:b,method:s.method,action:i},i,b))},currentTarget:s}]})}}for(var Mr=0;Mr<mc.length;Mr++){var zr=mc[Mr],Dx=zr.toLowerCase(),Ox=zr[0].toUpperCase()+zr.slice(1);qt(Dx,"on"+Ox)}qt(Ao,"onAnimationEnd"),qt(_o,"onAnimationIteration"),qt(Ro,"onAnimationStart"),qt("dblclick","onDoubleClick"),qt("focusin","onFocus"),qt("focusout","onBlur"),qt(Wh,"onTransitionRun"),qt(Fh,"onTransitionStart"),qt(Ih,"onTransitionCancel"),qt(Mo,"onTransitionEnd"),va("onMouseEnter",["mouseout","mouseover"]),va("onMouseLeave",["mouseout","mouseover"]),va("onPointerEnter",["pointerout","pointerover"]),va("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 Yn="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(" "),Ux=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Yn));function Pf(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 m=a[u],b=m.instance,R=m.currentTarget;if(m=m.listener,b!==i&&s.isPropagationStopped())break e;i=m,s.currentTarget=R;try{i(s)}catch(B){ys(B)}s.currentTarget=null,i=b}else for(u=0;u<a.length;u++){if(m=a[u],b=m.instance,R=m.currentTarget,m=m.listener,b!==i&&s.isPropagationStopped())break e;i=m,s.currentTarget=R;try{i(s)}catch(B){ys(B)}s.currentTarget=null,i=b}}}}function ge(e,t){var l=t[Vi];l===void 0&&(l=t[Vi]=new Set);var a=e+"__bubble";l.has(a)||(em(t,e,2,!1),l.add(a))}function Dr(e,t,l){var a=0;t&&(a|=4),em(l,e,a,t)}var ii="_reactListening"+Math.random().toString(36).slice(2);function Or(e){if(!e[ii]){e[ii]=!0,Vu.forEach(function(l){l!=="selectionchange"&&(Ux.has(l)||Dr(l,!1,e),Dr(l,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[ii]||(t[ii]=!0,Dr("selectionchange",!1,t))}}function em(e,t,l,a){switch(_m(t)){case 2:var s=ug;break;case 8:s=og;break;default:s=Jr}l=s.bind(null,t,l,e),s=void 0,!ec||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 Ur(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 m=a.stateNode.containerInfo;if(m===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(;m!==null;){if(u=xa(m),u===null)return;if(b=u.tag,b===5||b===6||b===26||b===27){a=i=u;continue e}m=m.parentNode}}a=a.return}ao(function(){var R=i,B=Ii(l),X=[];e:{var M=zo.get(e);if(M!==void 0){var D=ps,ee=e;switch(e){case"keypress":if(xs(l)===0)break e;case"keydown":case"keyup":D=Ah;break;case"focusin":ee="focus",D=nc;break;case"focusout":ee="blur",D=nc;break;case"beforeblur":case"afterblur":D=nc;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=io;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":D=gh;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":D=Mh;break;case Ao:case _o:case Ro:D=bh;break;case Mo:D=Dh;break;case"scroll":case"scrollend":D=hh;break;case"wheel":D=Uh;break;case"copy":case"cut":case"paste":D=jh;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":D=ro;break;case"toggle":case"beforetoggle":D=Hh}var se=(t&4)!==0,Re=!se&&(e==="scroll"||e==="scrollend"),E=se?M!==null?M+"Capture":null:M;se=[];for(var N=R,_;N!==null;){var Y=N;if(_=Y.stateNode,Y=Y.tag,Y!==5&&Y!==26&&Y!==27||_===null||E===null||(Y=un(N,E),Y!=null&&se.push(Gn(N,Y,_))),Re)break;N=N.return}0<se.length&&(M=new D(M,ee,null,l,B),X.push({event:M,listeners:se}))}}if((t&7)===0){e:{if(M=e==="mouseover"||e==="pointerover",D=e==="mouseout"||e==="pointerout",M&&l!==Fi&&(ee=l.relatedTarget||l.fromElement)&&(xa(ee)||ee[ha]))break e;if((D||M)&&(M=B.window===B?B:(M=B.ownerDocument)?M.defaultView||M.parentWindow:window,D?(ee=l.relatedTarget||l.toElement,D=R,ee=ee?xa(ee):null,ee!==null&&(Re=f(ee),se=ee.tag,ee!==Re||se!==5&&se!==27&&se!==6)&&(ee=null)):(D=null,ee=R),D!==ee)){if(se=io,Y="onMouseLeave",E="onMouseEnter",N="mouse",(e==="pointerout"||e==="pointerover")&&(se=ro,Y="onPointerLeave",E="onPointerEnter",N="pointer"),Re=D==null?M:rn(D),_=ee==null?M:rn(ee),M=new se(Y,N+"leave",D,l,B),M.target=Re,M.relatedTarget=_,Y=null,xa(B)===R&&(se=new se(E,N+"enter",ee,l,B),se.target=_,se.relatedTarget=Re,Y=se),Re=Y,D&&ee)t:{for(se=kx,E=D,N=ee,_=0,Y=E;Y;Y=se(Y))_++;Y=0;for(var ae=N;ae;ae=se(ae))Y++;for(;0<_-Y;)E=se(E),_--;for(;0<Y-_;)N=se(N),Y--;for(;_--;){if(E===N||N!==null&&E===N.alternate){se=E;break t}E=se(E),N=se(N)}se=null}else se=null;D!==null&&tm(X,M,D,se,!1),ee!==null&&Re!==null&&tm(X,Re,ee,se,!0)}}e:{if(M=R?rn(R):window,D=M.nodeName&&M.nodeName.toLowerCase(),D==="select"||D==="input"&&M.type==="file")var Ne=po;else if(xo(M))if(vo)Ne=$h;else{Ne=Vh;var le=Xh}else D=M.nodeName,!D||D.toLowerCase()!=="input"||M.type!=="checkbox"&&M.type!=="radio"?R&&Wi(R.elementType)&&(Ne=po):Ne=Zh;if(Ne&&(Ne=Ne(e,R))){go(X,Ne,l,B);break e}le&&le(e,M,R),e==="focusout"&&R&&M.type==="number"&&R.memoizedProps.value!=null&&Ji(M,"number",M.value)}switch(le=R?rn(R):window,e){case"focusin":(xo(le)||le.contentEditable==="true")&&(wa=le,oc=R,pn=null);break;case"focusout":pn=oc=wa=null;break;case"mousedown":dc=!0;break;case"contextmenu":case"mouseup":case"dragend":dc=!1,Eo(X,l,B);break;case"selectionchange":if(Jh)break;case"keydown":case"keyup":Eo(X,l,B)}var fe;if(ic)e:{switch(e){case"compositionstart":var ve="onCompositionStart";break e;case"compositionend":ve="onCompositionEnd";break e;case"compositionupdate":ve="onCompositionUpdate";break e}ve=void 0}else Sa?mo(e,l)&&(ve="onCompositionEnd"):e==="keydown"&&l.keyCode===229&&(ve="onCompositionStart");ve&&(uo&&l.locale!=="ko"&&(Sa||ve!=="onCompositionStart"?ve==="onCompositionEnd"&&Sa&&(fe=no()):(yl=B,tc="value"in yl?yl.value:yl.textContent,Sa=!0)),le=ci(R,ve),0<le.length&&(ve=new co(ve,e,null,l,B),X.push({event:ve,listeners:le}),fe?ve.data=fe:(fe=ho(l),fe!==null&&(ve.data=fe)))),(fe=Lh?qh(e,l):Yh(e,l))&&(ve=ci(R,"onBeforeInput"),0<ve.length&&(le=new co("onBeforeInput","beforeinput",null,l,B),X.push({event:le,listeners:ve}),le.data=fe)),zx(X,e,R,l,B)}Pf(X,t)})}function Gn(e,t,l){return{instance:e,listener:t,currentTarget:l}}function ci(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=un(e,l),s!=null&&a.unshift(Gn(e,s,i)),s=un(e,t),s!=null&&a.push(Gn(e,s,i))),e.tag===3)return a;e=e.return}return[]}function kx(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function tm(e,t,l,a,s){for(var i=t._reactName,u=[];l!==null&&l!==a;){var m=l,b=m.alternate,R=m.stateNode;if(m=m.tag,b!==null&&b===a)break;m!==5&&m!==26&&m!==27||R===null||(b=R,s?(R=un(l,i),R!=null&&u.unshift(Gn(l,R,b))):s||(R=un(l,i),R!=null&&u.push(Gn(l,R,b)))),l=l.return}u.length!==0&&e.push({event:t,listeners:u})}var Hx=/\r\n?/g,Bx=/\u0000|\uFFFD/g;function lm(e){return(typeof e=="string"?e:""+e).replace(Hx,`
|
|
49
|
+
`).replace(Bx,"")}function am(e,t){return t=lm(t),lm(e)===t}function _e(e,t,l,a,s,i){switch(l){case"children":typeof a=="string"?t==="body"||t==="textarea"&&a===""||ya(e,a):(typeof a=="number"||typeof a=="bigint")&&t!=="body"&&ya(e,""+a);break;case"className":ds(e,"class",a);break;case"tabIndex":ds(e,"tabindex",a);break;case"dir":case"role":case"viewBox":case"width":case"height":ds(e,l,a);break;case"style":to(e,a,i);break;case"data":if(t!=="object"){ds(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=ms(""+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"&&_e(e,t,"name",s.name,s,null),_e(e,t,"formEncType",s.formEncType,s,null),_e(e,t,"formMethod",s.formMethod,s,null),_e(e,t,"formTarget",s.formTarget,s,null)):(_e(e,t,"encType",s.encType,s,null),_e(e,t,"method",s.method,s,null),_e(e,t,"target",s.target,s,null)));if(a==null||typeof a=="symbol"||typeof a=="boolean"){e.removeAttribute(l);break}a=ms(""+a),e.setAttribute(l,a);break;case"onClick":a!=null&&(e.onclick=Ft);break;case"onScroll":a!=null&&ge("scroll",e);break;case"onScrollEnd":a!=null&&ge("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=ms(""+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":ge("beforetoggle",e),ge("toggle",e),os(e,"popover",a);break;case"xlinkActuate":Wt(e,"http://www.w3.org/1999/xlink","xlink:actuate",a);break;case"xlinkArcrole":Wt(e,"http://www.w3.org/1999/xlink","xlink:arcrole",a);break;case"xlinkRole":Wt(e,"http://www.w3.org/1999/xlink","xlink:role",a);break;case"xlinkShow":Wt(e,"http://www.w3.org/1999/xlink","xlink:show",a);break;case"xlinkTitle":Wt(e,"http://www.w3.org/1999/xlink","xlink:title",a);break;case"xlinkType":Wt(e,"http://www.w3.org/1999/xlink","xlink:type",a);break;case"xmlBase":Wt(e,"http://www.w3.org/XML/1998/namespace","xml:base",a);break;case"xmlLang":Wt(e,"http://www.w3.org/XML/1998/namespace","xml:lang",a);break;case"xmlSpace":Wt(e,"http://www.w3.org/XML/1998/namespace","xml:space",a);break;case"is":os(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=fh.get(l)||l,os(e,l,a))}}function kr(e,t,l,a,s,i){switch(l){case"style":to(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"?ya(e,a):(typeof a=="number"||typeof a=="bigint")&&ya(e,""+a);break;case"onScroll":a!=null&&ge("scroll",e);break;case"onScrollEnd":a!=null&&ge("scrollend",e);break;case"onClick":a!=null&&(e.onclick=Ft);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Zu.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[ut]||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,""):os(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":ge("error",e),ge("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:_e(e,t,i,u,l,null)}}s&&_e(e,t,"srcSet",l.srcSet,l,null),a&&_e(e,t,"src",l.src,l,null);return;case"input":ge("invalid",e);var m=i=u=s=null,b=null,R=null;for(a in l)if(l.hasOwnProperty(a)){var B=l[a];if(B!=null)switch(a){case"name":s=B;break;case"type":u=B;break;case"checked":b=B;break;case"defaultChecked":R=B;break;case"value":i=B;break;case"defaultValue":m=B;break;case"children":case"dangerouslySetInnerHTML":if(B!=null)throw Error(r(137,t));break;default:_e(e,t,a,B,l,null)}}Fu(e,i,m,b,R,u,s,!1);return;case"select":ge("invalid",e),a=u=i=null;for(s in l)if(l.hasOwnProperty(s)&&(m=l[s],m!=null))switch(s){case"value":i=m;break;case"defaultValue":u=m;break;case"multiple":a=m;default:_e(e,t,s,m,l,null)}t=i,l=u,e.multiple=!!a,t!=null?ba(e,!!a,t,!1):l!=null&&ba(e,!!a,l,!0);return;case"textarea":ge("invalid",e),i=s=a=null;for(u in l)if(l.hasOwnProperty(u)&&(m=l[u],m!=null))switch(u){case"value":a=m;break;case"defaultValue":s=m;break;case"children":i=m;break;case"dangerouslySetInnerHTML":if(m!=null)throw Error(r(91));break;default:_e(e,t,u,m,l,null)}Pu(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:_e(e,t,b,a,l,null)}return;case"dialog":ge("beforetoggle",e),ge("toggle",e),ge("cancel",e),ge("close",e);break;case"iframe":case"object":ge("load",e);break;case"video":case"audio":for(a=0;a<Yn.length;a++)ge(Yn[a],e);break;case"image":ge("error",e),ge("load",e);break;case"details":ge("toggle",e);break;case"embed":case"source":case"link":ge("error",e),ge("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(R in l)if(l.hasOwnProperty(R)&&(a=l[R],a!=null))switch(R){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,t));default:_e(e,t,R,a,l,null)}return;default:if(Wi(t)){for(B in l)l.hasOwnProperty(B)&&(a=l[B],a!==void 0&&kr(e,t,B,a,l,void 0));return}}for(m in l)l.hasOwnProperty(m)&&(a=l[m],a!=null&&_e(e,t,m,a,l,null))}function Lx(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,m=null,b=null,R=null,B=null;for(D in l){var X=l[D];if(l.hasOwnProperty(D)&&X!=null)switch(D){case"checked":break;case"value":break;case"defaultValue":b=X;default:a.hasOwnProperty(D)||_e(e,t,D,null,a,X)}}for(var M in a){var D=a[M];if(X=l[M],a.hasOwnProperty(M)&&(D!=null||X!=null))switch(M){case"type":i=D;break;case"name":s=D;break;case"checked":R=D;break;case"defaultChecked":B=D;break;case"value":u=D;break;case"defaultValue":m=D;break;case"children":case"dangerouslySetInnerHTML":if(D!=null)throw Error(r(137,t));break;default:D!==X&&_e(e,t,M,D,a,X)}}Ki(e,u,m,b,R,B,i,s);return;case"select":D=u=m=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)||_e(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":m=i;break;case"multiple":u=i;default:i!==b&&_e(e,t,s,i,a,b)}t=m,l=u,a=D,M!=null?ba(e,!!l,M,!1):!!a!=!!l&&(t!=null?ba(e,!!l,t,!0):ba(e,!!l,l?[]:"",!1));return;case"textarea":D=M=null;for(m in l)if(s=l[m],l.hasOwnProperty(m)&&s!=null&&!a.hasOwnProperty(m))switch(m){case"value":break;case"children":break;default:_e(e,t,m,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&&_e(e,t,u,s,a,i)}Iu(e,M,D);return;case"option":for(var ee in l)if(M=l[ee],l.hasOwnProperty(ee)&&M!=null&&!a.hasOwnProperty(ee))switch(ee){case"selected":e.selected=!1;break;default:_e(e,t,ee,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:_e(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 se in l)M=l[se],l.hasOwnProperty(se)&&M!=null&&!a.hasOwnProperty(se)&&_e(e,t,se,null,a,M);for(R in a)if(M=a[R],D=l[R],a.hasOwnProperty(R)&&M!==D&&(M!=null||D!=null))switch(R){case"children":case"dangerouslySetInnerHTML":if(M!=null)throw Error(r(137,t));break;default:_e(e,t,R,M,a,D)}return;default:if(Wi(t)){for(var Re in l)M=l[Re],l.hasOwnProperty(Re)&&M!==void 0&&!a.hasOwnProperty(Re)&&kr(e,t,Re,void 0,a,M);for(B in a)M=a[B],D=l[B],!a.hasOwnProperty(B)||M===D||M===void 0&&D===void 0||kr(e,t,B,M,a,D);return}}for(var E in l)M=l[E],l.hasOwnProperty(E)&&M!=null&&!a.hasOwnProperty(E)&&_e(e,t,E,null,a,M);for(X in a)M=a[X],D=l[X],!a.hasOwnProperty(X)||M===D||M==null&&D==null||_e(e,t,X,M,a,D)}function nm(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function qx(){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,m=s.duration;if(i&&m&&nm(u)){for(u=0,m=s.responseEnd,a+=1;a<l.length;a++){var b=l[a],R=b.startTime;if(R>m)break;var B=b.transferSize,X=b.initiatorType;B&&nm(X)&&(b=b.responseEnd,u+=B*(b<m?1:(m-R)/(b-R)))}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 Hr=null,Br=null;function ri(e){return e.nodeType===9?e:e.ownerDocument}function sm(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 im(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 Lr(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 qr=null;function Yx(){var e=window.event;return e&&e.type==="popstate"?e===qr?!1:(qr=e,!0):(qr=null,!1)}var cm=typeof setTimeout=="function"?setTimeout:void 0,Gx=typeof clearTimeout=="function"?clearTimeout:void 0,rm=typeof Promise=="function"?Promise:void 0,Qx=typeof queueMicrotask=="function"?queueMicrotask:typeof rm<"u"?function(e){return rm.resolve(null).then(e).catch(Xx)}:cm;function Xx(e){setTimeout(function(){throw e})}function Hl(e){return e==="head"}function um(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),Fa(t);return}a--}else if(l==="$"||l==="$?"||l==="$~"||l==="$!"||l==="&")a++;else if(l==="html")Qn(e.ownerDocument.documentElement);else if(l==="head"){l=e.ownerDocument.head,Qn(l);for(var i=l.firstChild;i;){var u=i.nextSibling,m=i.nodeName;i[cn]||m==="SCRIPT"||m==="STYLE"||m==="LINK"&&i.rel.toLowerCase()==="stylesheet"||l.removeChild(i),i=u}}else l==="body"&&Qn(e.ownerDocument.body);l=s}while(l);Fa(t)}function om(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 Yr(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":Yr(l),Zi(l);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(l.rel.toLowerCase()==="stylesheet")continue}e.removeChild(l)}}function Vx(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[cn])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=kt(e.nextSibling),e===null)break}return null}function Zx(e,t,l){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!l||(e=kt(e.nextSibling),e===null))return null;return e}function dm(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=kt(e.nextSibling),e===null))return null;return e}function Gr(e){return e.data==="$?"||e.data==="$~"}function Qr(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function $x(e,t){var l=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||l.readyState!=="loading")t();else{var a=function(){t(),l.removeEventListener("DOMContentLoaded",a)};l.addEventListener("DOMContentLoaded",a),e._reactRetry=a}}function kt(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?"||t==="$~"||t==="&"||t==="F!"||t==="F")break;if(t==="/$"||t==="/&")return null}}return e}var Xr=null;function fm(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var l=e.data;if(l==="/$"||l==="/&"){if(t===0)return kt(e.nextSibling);t--}else l!=="$"&&l!=="$!"&&l!=="$?"&&l!=="$~"&&l!=="&"||t++}e=e.nextSibling}return null}function mm(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 hm(e,t,l){switch(t=ri(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 Qn(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Zi(e)}var Ht=new Map,xm=new Set;function ui(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var ml=Z.d;Z.d={f:Kx,r:Jx,D:Wx,C:Fx,L:Ix,m:Px,X:tg,S:eg,M:lg};function Kx(){var e=ml.f(),t=ei();return e||t}function Jx(e){var t=ga(e);t!==null&&t.tag===5&&t.type==="form"?Md(t):ml.r(e)}var Ka=typeof document>"u"?null:document;function gm(e,t,l){var a=Ka;if(a&&typeof t=="string"&&t){var s=_t(t);s='link[rel="'+e+'"][href="'+s+'"]',typeof l=="string"&&(s+='[crossorigin="'+l+'"]'),xm.has(s)||(xm.add(s),e={rel:e,crossOrigin:l,href:t},a.querySelector(s)===null&&(t=a.createElement("link"),st(t,"link",e),Pe(t),a.head.appendChild(t)))}}function Wx(e){ml.D(e),gm("dns-prefetch",e,null)}function Fx(e,t){ml.C(e,t),gm("preconnect",e,t)}function Ix(e,t,l){ml.L(e,t,l);var a=Ka;if(a&&e&&t){var s='link[rel="preload"][as="'+_t(t)+'"]';t==="image"&&l&&l.imageSrcSet?(s+='[imagesrcset="'+_t(l.imageSrcSet)+'"]',typeof l.imageSizes=="string"&&(s+='[imagesizes="'+_t(l.imageSizes)+'"]')):s+='[href="'+_t(e)+'"]';var i=s;switch(t){case"style":i=Ja(e);break;case"script":i=Wa(e)}Ht.has(i)||(e=S({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(Xn(i))||t==="script"&&a.querySelector(Vn(i))||(t=a.createElement("link"),st(t,"link",e),Pe(t),a.head.appendChild(t)))}}function Px(e,t){ml.m(e,t);var l=Ka;if(l&&e){var a=t&&typeof t.as=="string"?t.as:"script",s='link[rel="modulepreload"][as="'+_t(a)+'"][href="'+_t(e)+'"]',i=s;switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":i=Wa(e)}if(!Ht.has(i)&&(e=S({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(Vn(i)))return}a=l.createElement("link"),st(a,"link",e),Pe(a),l.head.appendChild(a)}}}function eg(e,t,l){ml.S(e,t,l);var a=Ka;if(a&&e){var s=pa(a).hoistableStyles,i=Ja(e);t=t||"default";var u=s.get(i);if(!u){var m={loading:0,preload:null};if(u=a.querySelector(Xn(i)))m.loading=5;else{e=S({rel:"stylesheet",href:e,"data-precedence":t},l),(l=Ht.get(i))&&Vr(e,l);var b=u=a.createElement("link");Pe(b),st(b,"link",e),b._p=new Promise(function(R,B){b.onload=R,b.onerror=B}),b.addEventListener("load",function(){m.loading|=1}),b.addEventListener("error",function(){m.loading|=2}),m.loading|=4,oi(u,t,a)}u={type:"stylesheet",instance:u,count:1,state:m},s.set(i,u)}}}function tg(e,t){ml.X(e,t);var l=Ka;if(l&&e){var a=pa(l).hoistableScripts,s=Wa(e),i=a.get(s);i||(i=l.querySelector(Vn(s)),i||(e=S({src:e,async:!0},t),(t=Ht.get(s))&&Zr(e,t),i=l.createElement("script"),Pe(i),st(i,"link",e),l.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},a.set(s,i))}}function lg(e,t){ml.M(e,t);var l=Ka;if(l&&e){var a=pa(l).hoistableScripts,s=Wa(e),i=a.get(s);i||(i=l.querySelector(Vn(s)),i||(e=S({src:e,async:!0,type:"module"},t),(t=Ht.get(s))&&Zr(e,t),i=l.createElement("script"),Pe(i),st(i,"link",e),l.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},a.set(s,i))}}function pm(e,t,l,a){var s=(s=ue.current)?ui(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=Ja(l.href),l=pa(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=Ja(l.href);var i=pa(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(Xn(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||ag(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=Wa(l),l=pa(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 Ja(e){return'href="'+_t(e)+'"'}function Xn(e){return'link[rel="stylesheet"]['+e+"]"}function vm(e){return S({},e,{"data-precedence":e.precedence,precedence:null})}function ag(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),Pe(t),e.head.appendChild(t))}function Wa(e){return'[src="'+_t(e)+'"]'}function Vn(e){return"script[async]"+e}function bm(e,t,l){if(t.count++,t.instance===null)switch(t.type){case"style":var a=e.querySelector('style[data-href~="'+_t(l.href)+'"]');if(a)return t.instance=a,Pe(a),a;var s=S({},l,{"data-href":l.href,"data-precedence":l.precedence,href:null,precedence:null});return a=(e.ownerDocument||e).createElement("style"),Pe(a),st(a,"style",s),oi(a,l.precedence,e),t.instance=a;case"stylesheet":s=Ja(l.href);var i=e.querySelector(Xn(s));if(i)return t.state.loading|=4,t.instance=i,Pe(i),i;a=vm(l),(s=Ht.get(s))&&Vr(a,s),i=(e.ownerDocument||e).createElement("link"),Pe(i);var u=i;return u._p=new Promise(function(m,b){u.onload=m,u.onerror=b}),st(i,"link",a),t.state.loading|=4,oi(i,l.precedence,e),t.instance=i;case"script":return i=Wa(l.src),(s=e.querySelector(Vn(i)))?(t.instance=s,Pe(s),s):(a=l,(s=Ht.get(i))&&(a=S({},l),Zr(a,s)),e=e.ownerDocument||e,s=e.createElement("script"),Pe(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,oi(a,l.precedence,e));return t.instance}function oi(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 m=a[u];if(m.dataset.precedence===t)i=m;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 Vr(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function Zr(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var di=null;function ym(e,t,l){if(di===null){var a=new Map,s=di=new Map;s.set(l,a)}else s=di,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[cn]||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 m=a.get(u);m?m.push(i):a.set(u,[i])}}return a}function jm(e,t,l){e=e.ownerDocument||e,e.head.insertBefore(l,t==="title"?e.querySelector("head > title"):null)}function ng(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 Nm(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function sg(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=Ja(a.href),i=t.querySelector(Xn(s));if(i){t=i._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=fi.bind(e),t.then(e,e)),l.state.loading|=4,l.instance=i,Pe(i);return}i=t.ownerDocument||t,a=vm(a),(s=Ht.get(s))&&Vr(a,s),i=i.createElement("link"),Pe(i);var u=i;u._p=new Promise(function(m,b){u.onload=m,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=fi.bind(e),t.addEventListener("load",l),t.addEventListener("error",l))}}var $r=0;function ig(e,t){return e.stylesheets&&e.count===0&&hi(e,e.stylesheets),0<e.count||0<e.imgCount?function(l){var a=setTimeout(function(){if(e.stylesheets&&hi(e,e.stylesheets),e.unsuspend){var i=e.unsuspend;e.unsuspend=null,i()}},6e4+t);0<e.imgBytes&&$r===0&&($r=62500*qx());var s=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&hi(e,e.stylesheets),e.unsuspend)){var i=e.unsuspend;e.unsuspend=null,i()}},(e.imgBytes>$r?50:800)+t);return e.unsuspend=l,function(){e.unsuspend=null,clearTimeout(a),clearTimeout(s)}}:null}function fi(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)hi(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var mi=null;function hi(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,mi=new Map,t.forEach(cg,e),mi=null,fi.call(e))}function cg(e,t){if(!(t.state.loading&4)){var l=mi.get(e);if(l)var a=l.get(null);else{l=new Map,mi.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=fi.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 Zn={$$typeof:L,Provider:null,Consumer:null,_currentValue:te,_currentValue2:te,_threadCount:0};function rg(e,t,l,a,s,i,u,m,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=Gi(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Gi(0),this.hiddenUpdates=Gi(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 Sm(e,t,l,a,s,i,u,m,b,R,B,X){return e=new rg(e,t,l,u,b,R,B,X,m),t=1,i===!0&&(t|=24),i=jt(3,null,null,t),e.current=i,i.stateNode=e,t=Ec(),t.refCount++,e.pooledCache=t,t.refCount++,i.memoizedState={element:a,isDehydrated:l,cache:t},Rc(i),e}function wm(e){return e?(e=Ta,e):Ta}function Cm(e,t,l,a,s,i){s=wm(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&&(xt(l,e,t),wn(l,e,t))}function Em(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var l=e.retryLane;e.retryLane=l!==0&&l<t?l:t}}function Kr(e,t){Em(e,t),(e=e.alternate)&&Em(e,t)}function Tm(e){if(e.tag===13||e.tag===31){var t=Pl(e,67108864);t!==null&&xt(t,e,67108864),Kr(e,67108864)}}function Am(e){if(e.tag===13||e.tag===31){var t=Et();t=Qi(t);var l=Pl(e,t);l!==null&&xt(l,e,t),Kr(e,t)}}var xi=!0;function ug(e,t,l,a){var s=U.T;U.T=null;var i=Z.p;try{Z.p=2,Jr(e,t,l,a)}finally{Z.p=i,U.T=s}}function og(e,t,l,a){var s=U.T;U.T=null;var i=Z.p;try{Z.p=8,Jr(e,t,l,a)}finally{Z.p=i,U.T=s}}function Jr(e,t,l,a){if(xi){var s=Wr(a);if(s===null)Ur(e,t,a,gi,l),Rm(e,a);else if(fg(s,e,t,l,a))a.stopPropagation();else if(Rm(e,a),t&4&&-1<dg.indexOf(e)){for(;s!==null;){var i=ga(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 m=i;for(m.pendingLanes|=2,m.entangledLanes|=2;u;){var b=1<<31-bt(u);m.entanglements[1]|=b,u&=~b}$t(i),(we&6)===0&&(Is=pt()+500,qn(0))}}break;case 31:case 13:m=Pl(i,2),m!==null&&xt(m,i,2),ei(),Kr(i,2)}if(i=Wr(a),i===null&&Ur(e,t,a,gi,l),i===s)break;s=i}s!==null&&a.stopPropagation()}else Ur(e,t,a,null,l)}}function Wr(e){return e=Ii(e),Fr(e)}var gi=null;function Fr(e){if(gi=null,e=xa(e),e!==null){var t=f(e);if(t===null)e=null;else{var l=t.tag;if(l===13){if(e=h(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 gi=e,null}function _m(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(W0()){case Uu:return 2;case ku:return 8;case ss:case F0:return 32;case Hu:return 268435456;default:return 32}default:return 32}}var Ir=!1,Bl=null,Ll=null,ql=null,$n=new Map,Kn=new Map,Yl=[],dg="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 Rm(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":$n.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Kn.delete(t.pointerId)}}function Jn(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=ga(t),t!==null&&Tm(t)),e):(e.eventSystemFlags|=a,t=e.targetContainers,s!==null&&t.indexOf(s)===-1&&t.push(s),e)}function fg(e,t,l,a,s){switch(t){case"focusin":return Bl=Jn(Bl,e,t,l,a,s),!0;case"dragenter":return Ll=Jn(Ll,e,t,l,a,s),!0;case"mouseover":return ql=Jn(ql,e,t,l,a,s),!0;case"pointerover":var i=s.pointerId;return $n.set(i,Jn($n.get(i)||null,e,t,l,a,s)),!0;case"gotpointercapture":return i=s.pointerId,Kn.set(i,Jn(Kn.get(i)||null,e,t,l,a,s)),!0}return!1}function Mm(e){var t=xa(e.target);if(t!==null){var l=f(t);if(l!==null){if(t=l.tag,t===13){if(t=h(l),t!==null){e.blockedOn=t,Qu(e.priority,function(){Am(l)});return}}else if(t===31){if(t=v(l),t!==null){e.blockedOn=t,Qu(e.priority,function(){Am(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 pi(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var l=Wr(e.nativeEvent);if(l===null){l=e.nativeEvent;var a=new l.constructor(l.type,l);Fi=a,l.target.dispatchEvent(a),Fi=null}else return t=ga(l),t!==null&&Tm(t),e.blockedOn=l,!1;t.shift()}return!0}function zm(e,t,l){pi(e)&&l.delete(t)}function mg(){Ir=!1,Bl!==null&&pi(Bl)&&(Bl=null),Ll!==null&&pi(Ll)&&(Ll=null),ql!==null&&pi(ql)&&(ql=null),$n.forEach(zm),Kn.forEach(zm)}function vi(e,t){e.blockedOn===t&&(e.blockedOn=null,Ir||(Ir=!0,c.unstable_scheduleCallback(c.unstable_NormalPriority,mg)))}var bi=null;function Dm(e){bi!==e&&(bi=e,c.unstable_scheduleCallback(c.unstable_NormalPriority,function(){bi===e&&(bi=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(Fr(a||l)===null)continue;break}var i=ga(l);i!==null&&(e.splice(t,3),t-=3,Wc(i,{pending:!0,data:s,method:l.method,action:a},a,s))}}))}function Fa(e){function t(b){return vi(b,e)}Bl!==null&&vi(Bl,e),Ll!==null&&vi(Ll,e),ql!==null&&vi(ql,e),$n.forEach(t),Kn.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);)Mm(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[ut]||null;if(typeof i=="function")u||Dm(l);else if(u){var m=null;if(i&&i.hasAttribute("formAction")){if(s=i,u=i[ut]||null)m=u.formAction;else if(Fr(s)!==null)continue}else m=u.action;typeof m=="function"?l[a+1]=m:(l.splice(a,3),a-=3),Dm(l)}}}function Om(){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 Pr(e){this._internalRoot=e}yi.prototype.render=Pr.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(r(409));var l=t.current,a=Et();Cm(l,a,e,t,null,null)},yi.prototype.unmount=Pr.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Cm(e.current,2,null,e,null,null),ei(),t[ha]=null}};function yi(e){this._internalRoot=e}yi.prototype.unstable_scheduleHydration=function(e){if(e){var t=Gu();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&&Mm(e)}};var Um=o.version;if(Um!=="19.2.4")throw Error(r(527,Um,"19.2.4"));Z.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=g(t),e=e!==null?w(e):null,e=e===null?null:e.stateNode,e};var hg={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:U,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var ji=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!ji.isDisabled&&ji.supportsFiber)try{an=ji.inject(hg),vt=ji}catch{}}return Fn.createRoot=function(e,t){if(!x(e))throw Error(r(299));var l=!1,a="",s=Yd,i=Gd,u=Qd;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=Sm(e,1,!1,null,null,l,a,null,s,i,u,Om),e[ha]=t.current,Or(e),new Pr(t)},Fn.hydrateRoot=function(e,t,l){if(!x(e))throw Error(r(299));var a=!1,s="",i=Yd,u=Gd,m=Qd,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&&(m=l.onRecoverableError),l.formState!==void 0&&(b=l.formState)),t=Sm(e,1,!0,t,l??null,a,s,b,i,u,m,Om),t.context=wm(null),l=t.current,a=Et(),a=Qi(a),s=El(a),s.callback=null,Tl(l,s,a),l=a,t.current.lanes=l,sn(t,l),$t(t),e[ha]=t.current,Or(e),new yi(t)},Fn.version="19.2.4",Fn}var Vm;function wg(){if(Vm)return lu.exports;Vm=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(),lu.exports=Sg(),lu.exports}var Cg=wg();const Eg=f0(Cg);/**
|
|
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 Zm="popstate";function Tg(c={}){function o(x,f){let{pathname:h="/",search:v="",hash:p=""}=ma(x.location.hash.substring(1));return!h.startsWith("/")&&!h.startsWith(".")&&(h="/"+h),ou("",{pathname:h,search:v,hash:p},f.state&&f.state.usr||null,f.state&&f.state.key||"default")}function d(x,f){let h=x.document.querySelector("base"),v="";if(h&&h.getAttribute("href")){let p=x.location.href,g=p.indexOf("#");v=g===-1?p:p.slice(0,g)}return v+"#"+(typeof f=="string"?f:es(f))}function r(x,f){Lt(x.pathname.charAt(0)==="/",`relative pathnames are not supported in hash history.push(${JSON.stringify(f)})`)}return _g(o,d,r,c)}function qe(c,o){if(c===!1||c===null||typeof c>"u")throw new Error(o)}function Lt(c,o){if(!c){typeof console<"u"&&console.warn(o);try{throw new Error(o)}catch{}}}function Ag(){return Math.random().toString(36).substring(2,10)}function $m(c,o){return{usr:c.state,key:c.key,idx:o}}function ou(c,o,d=null,r){return{pathname:typeof c=="string"?c:c.pathname,search:"",hash:"",...typeof o=="string"?ma(o):o,state:d,key:o&&o.key||r||Ag()}}function es({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 ma(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 _g(c,o,d,r={}){let{window:x=document.defaultView,v5Compat:f=!1}=r,h=x.history,v="POP",p=null,g=w();g==null&&(g=0,h.replaceState({...h.state,idx:g},""));function w(){return(h.state||{idx:null}).idx}function S(){v="POP";let A=w(),V=A==null?null:A-g;g=A,p&&p({action:v,location:T.location,delta:V})}function z(A,V){v="PUSH";let H=ou(T.location,A,V);d&&d(H,A),g=w()+1;let L=$m(H,g),J=T.createHref(H);try{h.pushState(L,"",J)}catch(q){if(q instanceof DOMException&&q.name==="DataCloneError")throw q;x.location.assign(J)}f&&p&&p({action:v,location:T.location,delta:1})}function O(A,V){v="REPLACE";let H=ou(T.location,A,V);d&&d(H,A),g=w();let L=$m(H,g),J=T.createHref(H);h.replaceState(L,"",J),f&&p&&p({action:v,location:T.location,delta:0})}function k(A){return Rg(A)}let T={get action(){return v},get location(){return c(x,h)},listen(A){if(p)throw new Error("A history only accepts one active listener");return x.addEventListener(Zm,S),p=A,()=>{x.removeEventListener(Zm,S),p=null}},createHref(A){return o(x,A)},createURL:k,encodeLocation(A){let V=k(A);return{pathname:V.pathname,search:V.search,hash:V.hash}},push:z,replace:O,go(A){return h.go(A)}};return T}function Rg(c,o=!1){let d="http://localhost";typeof window<"u"&&(d=window.location.origin!=="null"?window.location.origin:window.location.href),qe(d,"No window.location.(origin|href) available to create URL");let r=typeof c=="string"?c:es(c);return r=r.replace(/ $/,"%20"),!o&&r.startsWith("//")&&(r=d+r),new URL(r,d)}function m0(c,o,d="/"){return Mg(c,o,d,!1)}function Mg(c,o,d,r){let x=typeof o=="string"?ma(o):o,f=gl(x.pathname||"/",d);if(f==null)return null;let h=h0(c);zg(h);let v=null;for(let p=0;v==null&&p<h.length;++p){let g=Qg(f);v=Yg(h[p],g,r)}return v}function h0(c,o=[],d=[],r="",x=!1){let f=(h,v,p=x,g)=>{let w={relativePath:g===void 0?h.path||"":g,caseSensitive:h.caseSensitive===!0,childrenIndex:v,route:h};if(w.relativePath.startsWith("/")){if(!w.relativePath.startsWith(r)&&p)return;qe(w.relativePath.startsWith(r),`Absolute route path "${w.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),w.relativePath=w.relativePath.slice(r.length)}let S=xl([r,w.relativePath]),z=d.concat(w);h.children&&h.children.length>0&&(qe(h.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${S}".`),h0(h.children,o,z,S,p)),!(h.path==null&&!h.index)&&o.push({path:S,score:Lg(S,h.index),routesMeta:z})};return c.forEach((h,v)=>{var p;if(h.path===""||!((p=h.path)!=null&&p.includes("?")))f(h,v);else for(let g of x0(h.path))f(h,v,!0,g)}),o}function x0(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 h=x0(r.join("/")),v=[];return v.push(...h.map(p=>p===""?f:[f,p].join("/"))),x&&v.push(...h),v.map(p=>c.startsWith("/")&&p===""?"/":p)}function zg(c){c.sort((o,d)=>o.score!==d.score?d.score-o.score:qg(o.routesMeta.map(r=>r.childrenIndex),d.routesMeta.map(r=>r.childrenIndex)))}var Dg=/^:[\w-]+$/,Og=3,Ug=2,kg=1,Hg=10,Bg=-2,Km=c=>c==="*";function Lg(c,o){let d=c.split("/"),r=d.length;return d.some(Km)&&(r+=Bg),o&&(r+=Ug),d.filter(x=>!Km(x)).reduce((x,f)=>x+(Dg.test(f)?Og:f===""?kg:Hg),r)}function qg(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 Yg(c,o,d=!1){let{routesMeta:r}=c,x={},f="/",h=[];for(let v=0;v<r.length;++v){let p=r[v],g=v===r.length-1,w=f==="/"?o:o.slice(f.length)||"/",S=Ei({path:p.relativePath,caseSensitive:p.caseSensitive,end:g},w),z=p.route;if(!S&&g&&d&&!r[r.length-1].route.index&&(S=Ei({path:p.relativePath,caseSensitive:p.caseSensitive,end:!1},w)),!S)return null;Object.assign(x,S.params),h.push({params:x,pathname:xl([f,S.pathname]),pathnameBase:$g(xl([f,S.pathnameBase])),route:z}),S.pathnameBase!=="/"&&(f=xl([f,S.pathnameBase]))}return h}function Ei(c,o){typeof c=="string"&&(c={path:c,caseSensitive:!1,end:!0});let[d,r]=Gg(c.path,c.caseSensitive,c.end),x=o.match(d);if(!x)return null;let f=x[0],h=f.replace(/(.)\/+$/,"$1"),v=x.slice(1);return{params:r.reduce((g,{paramName:w,isOptional:S},z)=>{if(w==="*"){let k=v[z]||"";h=f.slice(0,f.length-k.length).replace(/(.)\/+$/,"$1")}const O=v[z];return S&&!O?g[w]=void 0:g[w]=(O||"").replace(/%2F/g,"/"),g},{}),pathname:f,pathnameBase:h,pattern:c}}function Gg(c,o=!1,d=!0){Lt(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,(h,v,p)=>(r.push({paramName:v,isOptional:p!=null}),p?"/?([^\\/]+)?":"/([^\\/]+)")).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 Qg(c){try{return c.split("/").map(o=>decodeURIComponent(o).replace(/\//g,"%2F")).join("/")}catch(o){return Lt(!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 gl(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 Xg=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function Vg(c,o="/"){let{pathname:d,search:r="",hash:x=""}=typeof c=="string"?ma(c):c,f;return d?(d=d.replace(/\/\/+/g,"/"),d.startsWith("/")?f=Jm(d.substring(1),"/"):f=Jm(d,o)):f=o,{pathname:f,search:Kg(r),hash:Jg(x)}}function Jm(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 iu(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 Zg(c){return c.filter((o,d)=>d===0||o.route.path&&o.route.path.length>0)}function vu(c){let o=Zg(c);return o.map((d,r)=>r===o.length-1?d.pathname:d.pathnameBase)}function bu(c,o,d,r=!1){let x;typeof c=="string"?x=ma(c):(x={...c},qe(!x.pathname||!x.pathname.includes("?"),iu("?","pathname","search",x)),qe(!x.pathname||!x.pathname.includes("#"),iu("#","pathname","hash",x)),qe(!x.search||!x.search.includes("#"),iu("#","search","hash",x)));let f=c===""||x.pathname==="",h=f?"/":x.pathname,v;if(h==null)v=d;else{let S=o.length-1;if(!r&&h.startsWith("..")){let z=h.split("/");for(;z[0]==="..";)z.shift(),S-=1;x.pathname=z.join("/")}v=S>=0?o[S]:"/"}let p=Vg(x,v),g=h&&h!=="/"&&h.endsWith("/"),w=(f||h===".")&&d.endsWith("/");return!p.pathname.endsWith("/")&&(g||w)&&(p.pathname+="/"),p}var xl=c=>c.join("/").replace(/\/\/+/g,"/"),$g=c=>c.replace(/\/+$/,"").replace(/^\/*/,"/"),Kg=c=>!c||c==="?"?"":c.startsWith("?")?c:"?"+c,Jg=c=>!c||c==="#"?"":c.startsWith("#")?c:"#"+c,Wg=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 Fg(c){return c!=null&&typeof c.status=="number"&&typeof c.statusText=="string"&&typeof c.internal=="boolean"&&"data"in c}function Ig(c){return c.map(o=>o.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var g0=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function p0(c,o){let d=c;if(typeof d!="string"||!Xg.test(d))return{absoluteURL:void 0,isExternal:!1,to:d};let r=d,x=!1;if(g0)try{let f=new URL(window.location.href),h=d.startsWith("//")?new URL(f.protocol+d):new URL(d),v=gl(h.pathname,o);h.origin===f.origin&&v!=null?d=v+h.search+h.hash:x=!0}catch{Lt(!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 v0=["POST","PUT","PATCH","DELETE"];new Set(v0);var Pg=["GET",...v0];new Set(Pg);var en=j.createContext(null);en.displayName="DataRouter";var zi=j.createContext(null);zi.displayName="DataRouterState";var ep=j.createContext(!1),b0=j.createContext({isTransitioning:!1});b0.displayName="ViewTransition";var tp=j.createContext(new Map);tp.displayName="Fetchers";var lp=j.createContext(null);lp.displayName="Await";var Tt=j.createContext(null);Tt.displayName="Navigation";var ts=j.createContext(null);ts.displayName="Location";var Jt=j.createContext({outlet:null,matches:[],isDataRoute:!1});Jt.displayName="Route";var yu=j.createContext(null);yu.displayName="RouteError";var y0="REACT_ROUTER_ERROR",ap="REDIRECT",np="ROUTE_ERROR_RESPONSE";function sp(c){if(c.startsWith(`${y0}:${ap}:{`))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 ip(c){if(c.startsWith(`${y0}:${np}:{`))try{let o=JSON.parse(c.slice(40));if(typeof o=="object"&&o&&typeof o.status=="number"&&typeof o.statusText=="string")return new Wg(o.status,o.statusText,o.data)}catch{}}function cp(c,{relative:o}={}){qe(tn(),"useHref() may be used only in the context of a <Router> component.");let{basename:d,navigator:r}=j.useContext(Tt),{hash:x,pathname:f,search:h}=ls(c,{relative:o}),v=f;return d!=="/"&&(v=f==="/"?d:xl([d,f])),r.createHref({pathname:v,search:h,hash:x})}function tn(){return j.useContext(ts)!=null}function Zl(){return qe(tn(),"useLocation() may be used only in the context of a <Router> component."),j.useContext(ts).location}var j0="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function N0(c){j.useContext(Tt).static||j.useLayoutEffect(c)}function ju(){let{isDataRoute:c}=j.useContext(Jt);return c?yp():rp()}function rp(){qe(tn(),"useNavigate() may be used only in the context of a <Router> component.");let c=j.useContext(en),{basename:o,navigator:d}=j.useContext(Tt),{matches:r}=j.useContext(Jt),{pathname:x}=Zl(),f=JSON.stringify(vu(r)),h=j.useRef(!1);return N0(()=>{h.current=!0}),j.useCallback((p,g={})=>{if(Lt(h.current,j0),!h.current)return;if(typeof p=="number"){d.go(p);return}let w=bu(p,JSON.parse(f),x,g.relative==="path");c==null&&o!=="/"&&(w.pathname=w.pathname==="/"?o:xl([o,w.pathname])),(g.replace?d.replace:d.push)(w,g.state,g)},[o,d,f,x,c])}j.createContext(null);function ls(c,{relative:o}={}){let{matches:d}=j.useContext(Jt),{pathname:r}=Zl(),x=JSON.stringify(vu(d));return j.useMemo(()=>bu(c,JSON.parse(x),r,o==="path"),[c,x,r,o])}function up(c,o){return S0(c,o)}function S0(c,o,d,r,x){var H;qe(tn(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:f}=j.useContext(Tt),{matches:h}=j.useContext(Jt),v=h[h.length-1],p=v?v.params:{},g=v?v.pathname:"/",w=v?v.pathnameBase:"/",S=v&&v.route;{let L=S&&S.path||"";C0(g,!S||L.endsWith("*")||L.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${g}" (under <Route path="${L}">) 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="${L}"> to <Route path="${L==="/"?"*":`${L}/*`}">.`)}let z=Zl(),O;if(o){let L=typeof o=="string"?ma(o):o;qe(w==="/"||((H=L.pathname)==null?void 0:H.startsWith(w)),`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 "${w}" but pathname "${L.pathname}" was given in the \`location\` prop.`),O=L}else O=z;let k=O.pathname||"/",T=k;if(w!=="/"){let L=w.replace(/^\//,"").split("/");T="/"+k.replace(/^\//,"").split("/").slice(L.length).join("/")}let A=m0(c,{pathname:T});Lt(S||A!=null,`No routes matched location "${O.pathname}${O.search}${O.hash}" `),Lt(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 V=hp(A&&A.map(L=>Object.assign({},L,{params:Object.assign({},p,L.params),pathname:xl([w,f.encodeLocation?f.encodeLocation(L.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:L.pathname]),pathnameBase:L.pathnameBase==="/"?w:xl([w,f.encodeLocation?f.encodeLocation(L.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:L.pathnameBase])})),h,d,r,x);return o&&V?j.createElement(ts.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...O},navigationType:"POP"}},V):V}function op(){let c=bp(),o=Fg(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},h=null;return console.error("Error handled by React Router default ErrorBoundary:",c),h=j.createElement(j.Fragment,null,j.createElement("p",null,"💿 Hey developer 👋"),j.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",j.createElement("code",{style:f},"ErrorBoundary")," or"," ",j.createElement("code",{style:f},"errorElement")," prop on your route.")),j.createElement(j.Fragment,null,j.createElement("h2",null,"Unexpected Application Error!"),j.createElement("h3",{style:{fontStyle:"italic"}},o),d?j.createElement("pre",{style:x},d):null,h)}var dp=j.createElement(op,null),w0=class extends j.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=ip(c.digest);d&&(c=d)}let o=c!==void 0?j.createElement(Jt.Provider,{value:this.props.routeContext},j.createElement(yu.Provider,{value:c,children:this.props.component})):this.props.children;return this.context?j.createElement(fp,{error:c},o):o}};w0.contextType=ep;var cu=new WeakMap;function fp({children:c,error:o}){let{basename:d}=j.useContext(Tt);if(typeof o=="object"&&o&&"digest"in o&&typeof o.digest=="string"){let r=sp(o.digest);if(r){let x=cu.get(o);if(x)throw x;let f=p0(r.location,d);if(g0&&!cu.get(o))if(f.isExternal||r.reloadDocument)window.location.href=f.absoluteURL||f.to;else{const h=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(f.to,{replace:r.replace}));throw cu.set(o,h),h}return j.createElement("meta",{httpEquiv:"refresh",content:`0;url=${f.absoluteURL||f.to}`})}}return c}function mp({routeContext:c,match:o,children:d}){let r=j.useContext(en);return r&&r.static&&r.staticContext&&(o.route.errorElement||o.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=o.route.id),j.createElement(Jt.Provider,{value:c},d)}function hp(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,h=d==null?void 0:d.errors;if(h!=null){let w=f.findIndex(S=>S.route.id&&(h==null?void 0:h[S.route.id])!==void 0);qe(w>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(h).join(",")}`),f=f.slice(0,Math.min(f.length,w+1))}let v=!1,p=-1;if(d)for(let w=0;w<f.length;w++){let S=f[w];if((S.route.HydrateFallback||S.route.hydrateFallbackElement)&&(p=w),S.route.id){let{loaderData:z,errors:O}=d,k=S.route.loader&&!z.hasOwnProperty(S.route.id)&&(!O||O[S.route.id]===void 0);if(S.route.lazy||k){v=!0,p>=0?f=f.slice(0,p+1):f=[f[0]];break}}}let g=d&&r?(w,S)=>{var z,O;r(w,{location:d.location,params:((O=(z=d.matches)==null?void 0:z[0])==null?void 0:O.params)??{},unstable_pattern:Ig(d.matches),errorInfo:S})}:void 0;return f.reduceRight((w,S,z)=>{let O,k=!1,T=null,A=null;d&&(O=h&&S.route.id?h[S.route.id]:void 0,T=S.route.errorElement||dp,v&&(p<0&&z===0?(C0("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),k=!0,A=null):p===z&&(k=!0,A=S.route.hydrateFallbackElement||null)));let V=o.concat(f.slice(0,z+1)),H=()=>{let L;return O?L=T:k?L=A:S.route.Component?L=j.createElement(S.route.Component,null):S.route.element?L=S.route.element:L=w,j.createElement(mp,{match:S,routeContext:{outlet:w,matches:V,isDataRoute:d!=null},children:L})};return d&&(S.route.ErrorBoundary||S.route.errorElement||z===0)?j.createElement(w0,{location:d.location,revalidation:d.revalidation,component:T,error:O,children:H(),routeContext:{outlet:null,matches:V,isDataRoute:!0},onError:g}):H()},null)}function Nu(c){return`${c} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function xp(c){let o=j.useContext(en);return qe(o,Nu(c)),o}function gp(c){let o=j.useContext(zi);return qe(o,Nu(c)),o}function pp(c){let o=j.useContext(Jt);return qe(o,Nu(c)),o}function Su(c){let o=pp(c),d=o.matches[o.matches.length-1];return qe(d.route.id,`${c} can only be used on routes that contain a unique "id"`),d.route.id}function vp(){return Su("useRouteId")}function bp(){var r;let c=j.useContext(yu),o=gp("useRouteError"),d=Su("useRouteError");return c!==void 0?c:(r=o.errors)==null?void 0:r[d]}function yp(){let{router:c}=xp("useNavigate"),o=Su("useNavigate"),d=j.useRef(!1);return N0(()=>{d.current=!0}),j.useCallback(async(x,f={})=>{Lt(d.current,j0),d.current&&(typeof x=="number"?await c.navigate(x):await c.navigate(x,{fromRouteId:o,...f}))},[c,o])}var Wm={};function C0(c,o,d){!o&&!Wm[c]&&(Wm[c]=!0,Lt(!1,d))}j.memo(jp);function jp({routes:c,future:o,state:d,onError:r}){return S0(c,void 0,d,r,o)}function Np({to:c,replace:o,state:d,relative:r}){qe(tn(),"<Navigate> may be used only in the context of a <Router> component.");let{static:x}=j.useContext(Tt);Lt(!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}=j.useContext(Jt),{pathname:h}=Zl(),v=ju(),p=bu(c,vu(f),h,r==="path"),g=JSON.stringify(p);return j.useEffect(()=>{v(JSON.parse(g),{replace:o,state:d,relative:r})},[v,g,r,o,d]),null}function Qt(c){qe(!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 Sp({basename:c="/",children:o=null,location:d,navigationType:r="POP",navigator:x,static:f=!1,unstable_useTransitions:h}){qe(!tn(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let v=c.replace(/^\/*/,"/"),p=j.useMemo(()=>({basename:v,navigator:x,static:f,unstable_useTransitions:h,future:{}}),[v,x,f,h]);typeof d=="string"&&(d=ma(d));let{pathname:g="/",search:w="",hash:S="",state:z=null,key:O="default"}=d,k=j.useMemo(()=>{let T=gl(g,v);return T==null?null:{location:{pathname:T,search:w,hash:S,state:z,key:O},navigationType:r}},[v,g,w,S,z,O,r]);return Lt(k!=null,`<Router basename="${v}"> is not able to match the URL "${g}${w}${S}" because it does not start with the basename, so the <Router> won't render anything.`),k==null?null:j.createElement(Tt.Provider,{value:p},j.createElement(ts.Provider,{children:o,value:k}))}function wp({children:c,location:o}){return up(du(c),o)}function du(c,o=[]){let d=[];return j.Children.forEach(c,(r,x)=>{if(!j.isValidElement(r))return;let f=[...o,x];if(r.type===j.Fragment){d.push.apply(d,du(r.props.children,f));return}qe(r.type===Qt,`[${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>`),qe(!r.props.index||!r.props.children,"An index route cannot have child routes.");let h={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&&(h.children=du(r.props.children,f)),d.push(h)}),d}var Si="get",wi="application/x-www-form-urlencoded";function Di(c){return typeof HTMLElement<"u"&&c instanceof HTMLElement}function Cp(c){return Di(c)&&c.tagName.toLowerCase()==="button"}function Ep(c){return Di(c)&&c.tagName.toLowerCase()==="form"}function Tp(c){return Di(c)&&c.tagName.toLowerCase()==="input"}function Ap(c){return!!(c.metaKey||c.altKey||c.ctrlKey||c.shiftKey)}function _p(c,o){return c.button===0&&(!o||o==="_self")&&!Ap(c)}var Ni=null;function Rp(){if(Ni===null)try{new FormData(document.createElement("form"),0),Ni=!1}catch{Ni=!0}return Ni}var Mp=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function ru(c){return c!=null&&!Mp.has(c)?(Lt(!1,`"${c}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${wi}"`),null):c}function zp(c,o){let d,r,x,f,h;if(Ep(c)){let v=c.getAttribute("action");r=v?gl(v,o):null,d=c.getAttribute("method")||Si,x=ru(c.getAttribute("enctype"))||wi,f=new FormData(c)}else if(Cp(c)||Tp(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 p=c.getAttribute("formaction")||v.getAttribute("action");if(r=p?gl(p,o):null,d=c.getAttribute("formmethod")||v.getAttribute("method")||Si,x=ru(c.getAttribute("formenctype"))||ru(v.getAttribute("enctype"))||wi,f=new FormData(v,c),!Rp()){let{name:g,type:w,value:S}=c;if(w==="image"){let z=g?`${g}.`:"";f.append(`${z}x`,"0"),f.append(`${z}y`,"0")}else g&&f.append(g,S)}}else{if(Di(c))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');d=Si,r=null,x=wi,h=c}return f&&x==="text/plain"&&(h=f,f=void 0),{action:r,method:d.toLowerCase(),encType:x,formData:f,body:h}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function wu(c,o){if(c===!1||c===null||typeof c>"u")throw new Error(o)}function Dp(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&&gl(x.pathname,o)==="/"?x.pathname=`${o.replace(/\/$/,"")}/_root.${r}`:x.pathname=`${x.pathname.replace(/\/$/,"")}.${r}`,x}async function Op(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 Up(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 kp(c,o,d){let r=await Promise.all(c.map(async x=>{let f=o.routes[x.route.id];if(f){let h=await Op(f,d);return h.links?h.links():[]}return[]}));return qp(r.flat(1).filter(Up).filter(x=>x.rel==="stylesheet"||x.rel==="preload").map(x=>x.rel==="stylesheet"?{...x,rel:"prefetch",as:"style"}:{...x,rel:"prefetch"}))}function Fm(c,o,d,r,x,f){let h=(p,g)=>d[g]?p.route.id!==d[g].route.id:!0,v=(p,g)=>{var w;return d[g].pathname!==p.pathname||((w=d[g].route.path)==null?void 0:w.endsWith("*"))&&d[g].params["*"]!==p.params["*"]};return f==="assets"?o.filter((p,g)=>h(p,g)||v(p,g)):f==="data"?o.filter((p,g)=>{var S;let w=r.routes[p.route.id];if(!w||!w.hasLoader)return!1;if(h(p,g)||v(p,g))return!0;if(p.route.shouldRevalidate){let z=p.route.shouldRevalidate({currentUrl:new URL(x.pathname+x.search+x.hash,window.origin),currentParams:((S=d[0])==null?void 0:S.params)||{},nextUrl:new URL(c,window.origin),nextParams:p.params,defaultShouldRevalidate:!0});if(typeof z=="boolean")return z}return!0}):[]}function Hp(c,o,{includeHydrateFallback:d}={}){return Bp(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 Bp(c){return[...new Set(c)]}function Lp(c){let o={},d=Object.keys(c).sort();for(let r of d)o[r]=c[r];return o}function qp(c,o){let d=new Set;return new Set(o),c.reduce((r,x)=>{let f=JSON.stringify(Lp(x));return d.has(f)||(d.add(f),r.push({key:f,link:x})),r},[])}function E0(){let c=j.useContext(en);return wu(c,"You must render this element inside a <DataRouterContext.Provider> element"),c}function Yp(){let c=j.useContext(zi);return wu(c,"You must render this element inside a <DataRouterStateContext.Provider> element"),c}var Cu=j.createContext(void 0);Cu.displayName="FrameworkContext";function T0(){let c=j.useContext(Cu);return wu(c,"You must render this element inside a <HydratedRouter> element"),c}function Gp(c,o){let d=j.useContext(Cu),[r,x]=j.useState(!1),[f,h]=j.useState(!1),{onFocus:v,onBlur:p,onMouseEnter:g,onMouseLeave:w,onTouchStart:S}=o,z=j.useRef(null);j.useEffect(()=>{if(c==="render"&&h(!0),c==="viewport"){let T=V=>{V.forEach(H=>{h(H.isIntersecting)})},A=new IntersectionObserver(T,{threshold:.5});return z.current&&A.observe(z.current),()=>{A.disconnect()}}},[c]),j.useEffect(()=>{if(r){let T=setTimeout(()=>{h(!0)},100);return()=>{clearTimeout(T)}}},[r]);let O=()=>{x(!0)},k=()=>{x(!1),h(!1)};return d?c!=="intent"?[f,z,{}]:[f,z,{onFocus:In(v,O),onBlur:In(p,k),onMouseEnter:In(g,O),onMouseLeave:In(w,k),onTouchStart:In(S,O)}]:[!1,z,{}]}function In(c,o){return d=>{c&&c(d),d.defaultPrevented||o(d)}}function Qp({page:c,...o}){let{router:d}=E0(),r=j.useMemo(()=>m0(d.routes,c,d.basename),[d.routes,c,d.basename]);return r?j.createElement(Vp,{page:c,matches:r,...o}):null}function Xp(c){let{manifest:o,routeModules:d}=T0(),[r,x]=j.useState([]);return j.useEffect(()=>{let f=!1;return kp(c,o,d).then(h=>{f||x(h)}),()=>{f=!0}},[c,o,d]),r}function Vp({page:c,matches:o,...d}){let r=Zl(),{future:x,manifest:f,routeModules:h}=T0(),{basename:v}=E0(),{loaderData:p,matches:g}=Yp(),w=j.useMemo(()=>Fm(c,o,g,f,r,"data"),[c,o,g,f,r]),S=j.useMemo(()=>Fm(c,o,g,f,r,"assets"),[c,o,g,f,r]),z=j.useMemo(()=>{if(c===r.pathname+r.search+r.hash)return[];let T=new Set,A=!1;if(o.forEach(H=>{var J;let L=f.routes[H.route.id];!L||!L.hasLoader||(!w.some(q=>q.route.id===H.route.id)&&H.route.id in p&&((J=h[H.route.id])!=null&&J.shouldRevalidate)||L.hasClientLoader?A=!0:T.add(H.route.id))}),T.size===0)return[];let V=Dp(c,v,x.unstable_trailingSlashAwareDataRequests,"data");return A&&T.size>0&&V.searchParams.set("_routes",o.filter(H=>T.has(H.route.id)).map(H=>H.route.id).join(",")),[V.pathname+V.search]},[v,x.unstable_trailingSlashAwareDataRequests,p,r,f,w,o,c,h]),O=j.useMemo(()=>Hp(S,f),[S,f]),k=Xp(S);return j.createElement(j.Fragment,null,z.map(T=>j.createElement("link",{key:T,rel:"prefetch",as:"fetch",href:T,...d})),O.map(T=>j.createElement("link",{key:T,rel:"modulepreload",href:T,...d})),k.map(({key:T,link:A})=>j.createElement("link",{key:T,nonce:d.nonce,...A,crossOrigin:A.crossOrigin??d.crossOrigin})))}function Zp(...c){return o=>{c.forEach(d=>{typeof d=="function"?d(o):d!=null&&(d.current=o)})}}var $p=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{$p&&(window.__reactRouterVersion="7.13.0")}catch{}function Kp({basename:c,children:o,unstable_useTransitions:d,window:r}){let x=j.useRef();x.current==null&&(x.current=Tg({window:r,v5Compat:!0}));let f=x.current,[h,v]=j.useState({action:f.action,location:f.location}),p=j.useCallback(g=>{d===!1?v(g):j.startTransition(()=>v(g))},[d]);return j.useLayoutEffect(()=>f.listen(p),[f,p]),j.createElement(Sp,{basename:c,children:o,location:h.location,navigationType:h.action,navigator:f,unstable_useTransitions:d})}var A0=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,_0=j.forwardRef(function({onClick:o,discover:d="render",prefetch:r="none",relative:x,reloadDocument:f,replace:h,state:v,target:p,to:g,preventScrollReset:w,viewTransition:S,unstable_defaultShouldRevalidate:z,...O},k){let{basename:T,unstable_useTransitions:A}=j.useContext(Tt),V=typeof g=="string"&&A0.test(g),H=p0(g,T);g=H.to;let L=cp(g,{relative:x}),[J,q,C]=Gp(r,O),G=Fp(g,{replace:h,state:v,target:p,preventScrollReset:w,relative:x,viewTransition:S,unstable_defaultShouldRevalidate:z,unstable_useTransitions:A});function F($){o&&o($),$.defaultPrevented||G($)}let I=j.createElement("a",{...O,...C,href:H.absoluteURL||L,onClick:H.isExternal||f?o:F,ref:Zp(k,q),target:p,"data-discover":!V&&d==="render"?"true":void 0});return J&&!V?j.createElement(j.Fragment,null,I,j.createElement(Qp,{page:L})):I});_0.displayName="Link";var R0=j.forwardRef(function({"aria-current":o="page",caseSensitive:d=!1,className:r="",end:x=!1,style:f,to:h,viewTransition:v,children:p,...g},w){let S=ls(h,{relative:g.relative}),z=Zl(),O=j.useContext(zi),{navigator:k,basename:T}=j.useContext(Tt),A=O!=null&&lv(S)&&v===!0,V=k.encodeLocation?k.encodeLocation(S).pathname:S.pathname,H=z.pathname,L=O&&O.navigation&&O.navigation.location?O.navigation.location.pathname:null;d||(H=H.toLowerCase(),L=L?L.toLowerCase():null,V=V.toLowerCase()),L&&T&&(L=gl(L,T)||L);const J=V!=="/"&&V.endsWith("/")?V.length-1:V.length;let q=H===V||!x&&H.startsWith(V)&&H.charAt(J)==="/",C=L!=null&&(L===V||!x&&L.startsWith(V)&&L.charAt(V.length)==="/"),G={isActive:q,isPending:C,isTransitioning:A},F=q?o:void 0,I;typeof r=="function"?I=r(G):I=[r,q?"active":null,C?"pending":null,A?"transitioning":null].filter(Boolean).join(" ");let $=typeof f=="function"?f(G):f;return j.createElement(_0,{...g,"aria-current":F,className:I,ref:w,style:$,to:h,viewTransition:v},typeof p=="function"?p(G):p)});R0.displayName="NavLink";var Jp=j.forwardRef(({discover:c="render",fetcherKey:o,navigate:d,reloadDocument:r,replace:x,state:f,method:h=Si,action:v,onSubmit:p,relative:g,preventScrollReset:w,viewTransition:S,unstable_defaultShouldRevalidate:z,...O},k)=>{let{unstable_useTransitions:T}=j.useContext(Tt),A=ev(),V=tv(v,{relative:g}),H=h.toLowerCase()==="get"?"get":"post",L=typeof v=="string"&&A0.test(v),J=q=>{if(p&&p(q),q.defaultPrevented)return;q.preventDefault();let C=q.nativeEvent.submitter,G=(C==null?void 0:C.getAttribute("formmethod"))||h,F=()=>A(C||q.currentTarget,{fetcherKey:o,method:G,navigate:d,replace:x,state:f,relative:g,preventScrollReset:w,viewTransition:S,unstable_defaultShouldRevalidate:z});T&&d!==!1?j.startTransition(()=>F()):F()};return j.createElement("form",{ref:k,method:H,action:V,onSubmit:r?p:J,...O,"data-discover":!L&&c==="render"?"true":void 0})});Jp.displayName="Form";function Wp(c){return`${c} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function M0(c){let o=j.useContext(en);return qe(o,Wp(c)),o}function Fp(c,{target:o,replace:d,state:r,preventScrollReset:x,relative:f,viewTransition:h,unstable_defaultShouldRevalidate:v,unstable_useTransitions:p}={}){let g=ju(),w=Zl(),S=ls(c,{relative:f});return j.useCallback(z=>{if(_p(z,o)){z.preventDefault();let O=d!==void 0?d:es(w)===es(S),k=()=>g(c,{replace:O,state:r,preventScrollReset:x,relative:f,viewTransition:h,unstable_defaultShouldRevalidate:v});p?j.startTransition(()=>k()):k()}},[w,g,S,d,r,o,c,x,f,h,v,p])}var Ip=0,Pp=()=>`__${String(++Ip)}__`;function ev(){let{router:c}=M0("useSubmit"),{basename:o}=j.useContext(Tt),d=vp(),r=c.fetch,x=c.navigate;return j.useCallback(async(f,h={})=>{let{action:v,method:p,encType:g,formData:w,body:S}=zp(f,o);if(h.navigate===!1){let z=h.fetcherKey||Pp();await r(z,d,h.action||v,{unstable_defaultShouldRevalidate:h.unstable_defaultShouldRevalidate,preventScrollReset:h.preventScrollReset,formData:w,body:S,formMethod:h.method||p,formEncType:h.encType||g,flushSync:h.flushSync})}else await x(h.action||v,{unstable_defaultShouldRevalidate:h.unstable_defaultShouldRevalidate,preventScrollReset:h.preventScrollReset,formData:w,body:S,formMethod:h.method||p,formEncType:h.encType||g,replace:h.replace,state:h.state,fromRouteId:d,flushSync:h.flushSync,viewTransition:h.viewTransition})},[r,x,o,d])}function tv(c,{relative:o}={}){let{basename:d}=j.useContext(Tt),r=j.useContext(Jt);qe(r,"useFormAction must be used inside a RouteContext");let[x]=r.matches.slice(-1),f={...ls(c||".",{relative:o})},h=Zl();if(c==null){f.search=h.search;let v=new URLSearchParams(f.search),p=v.getAll("index");if(p.some(w=>w==="")){v.delete("index"),p.filter(S=>S).forEach(S=>v.append("index",S));let w=v.toString();f.search=w?`?${w}`:""}}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])),es(f)}function lv(c,{relative:o}={}){let d=j.useContext(b0);qe(d!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=M0("useViewTransitionState"),x=ls(c,{relative:o});if(!d.isTransitioning)return!1;let f=gl(d.currentLocation.pathname,r)||d.currentLocation.pathname,h=gl(d.nextLocation.pathname,r)||d.nextLocation.pathname;return Ei(x.pathname,h)!=null||Ei(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 z0=(...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 av=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 nv=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 Im=c=>{const o=nv(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 sv={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 iv=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 cv=j.forwardRef(({color:c="currentColor",size:o=24,strokeWidth:d=2,absoluteStrokeWidth:r,className:x="",children:f,iconNode:h,...v},p)=>j.createElement("svg",{ref:p,...sv,width:o,height:o,stroke:c,strokeWidth:r?Number(d)*24/Number(o):d,className:z0("lucide",x),...!f&&!iv(v)&&{"aria-hidden":"true"},...v},[...h.map(([g,w])=>j.createElement(g,w)),...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 ne=(c,o)=>{const d=j.forwardRef(({className:r,...x},f)=>j.createElement(cv,{ref:f,iconNode:o,className:z0(`lucide-${av(Im(c))}`,`lucide-${c}`,r),...x}));return d.displayName=Im(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 rv=[["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"}]],D0=ne("activity",rv);/**
|
|
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 uv=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],ov=ne("arrow-down",uv);/**
|
|
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 dv=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],Pm=ne("arrow-right",dv);/**
|
|
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 fv=[["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"}]],mv=ne("arrow-up-down",fv);/**
|
|
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 hv=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],xv=ne("arrow-up",hv);/**
|
|
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 gv=[["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"}]],pv=ne("bell",gv);/**
|
|
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 vv=[["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"}]],bv=ne("blocks",vv);/**
|
|
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 yv=[["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"}]],jv=ne("bot",yv);/**
|
|
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 Nv=[["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"}]],e0=ne("briefcase",Nv);/**
|
|
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 Sv=[["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"}]],Ti=ne("calendar",Sv);/**
|
|
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 wv=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Pa=ne("check",wv);/**
|
|
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 Cv=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Ev=ne("chevron-down",Cv);/**
|
|
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 Tv=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],Av=ne("chevron-left",Tv);/**
|
|
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 _v=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Ai=ne("chevron-right",_v);/**
|
|
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 Rv=[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]],Mv=ne("chevrons-up-down",Rv);/**
|
|
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 zv=[["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"}]],Kt=ne("circle-alert",zv);/**
|
|
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 Dv=[["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"}]],t0=ne("circle-arrow-down",Dv);/**
|
|
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 Ov=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],as=ne("circle-check-big",Ov);/**
|
|
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 Uv=[["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"}]],fu=ne("circle-x",Uv);/**
|
|
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 kv=[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],_i=ne("clock",kv);/**
|
|
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 Hv=[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]],Bv=ne("code",Hv);/**
|
|
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 Lv=[["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"}]],Eu=ne("external-link",Lv);/**
|
|
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"}]],mu=ne("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 Yv=[["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"}]],Ri=ne("eye",Yv);/**
|
|
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 Gv=[["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"}]],Qv=ne("file-text",Gv);/**
|
|
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 Xv=[["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"}]],Vv=ne("git-pull-request",Xv);/**
|
|
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 Zv=[["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=ne("hash",Zv);/**
|
|
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 $v=[["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"}]],Kv=ne("house",$v);/**
|
|
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 Jv=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],Wv=ne("info",Jv);/**
|
|
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 Fv=[["path",{d:"M5 3v14",key:"9nsxs2"}],["path",{d:"M12 3v8",key:"1h2ygw"}],["path",{d:"M19 3v18",key:"1sk56x"}]],Iv=ne("kanban",Fv);/**
|
|
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 Pv=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],O0=ne("loader-circle",Pv);/**
|
|
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 eb=[["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"}]],U0=ne("map",eb);/**
|
|
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 tb=[["path",{d:"M5 12h14",key:"1ays0h"}]],lb=ne("minus",tb);/**
|
|
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 ab=[["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"}]],k0=ne("pause",ab);/**
|
|
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 nb=[["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"}]],Tu=ne("pen",nb);/**
|
|
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 sb=[["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"}]],Oi=ne("play",sb);/**
|
|
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 ib=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Vl=ne("plus",ib);/**
|
|
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 cb=[["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"}]],hu=ne("rotate-ccw",cb);/**
|
|
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 rb=[["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"}]],ub=ne("save",rb);/**
|
|
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 ob=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],Au=ne("search",ob);/**
|
|
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 db=[["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"}]],H0=ne("settings",db);/**
|
|
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 fb=[["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"}]],B0=ne("shield",fb);/**
|
|
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 mb=[["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"}]],l0=ne("slack",mb);/**
|
|
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 hb=[["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"}]],xb=ne("square-pen",hb);/**
|
|
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 gb=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],pb=ne("terminal",gb);/**
|
|
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 vb=[["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"}]],bb=ne("test-tube-diagonal",vb);/**
|
|
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 yb=[["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"}]],jb=ne("test-tube",yb);/**
|
|
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 Nb=[["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"}]],_u=ne("trash-2",Nb);/**
|
|
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 Sb=[["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"}]],wb=ne("triangle-alert",Sb);/**
|
|
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 Cb=[["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"}]],xu=ne("users",Cb);/**
|
|
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 Eb=[["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"}]],Tb=ne("wifi",Eb);/**
|
|
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 Ab=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],pl=ne("x",Ab);/**
|
|
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 _b=[["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"}]],Rb=ne("zap",_b),a0=c=>{let o;const d=new Set,r=(g,w)=>{const S=typeof g=="function"?g(o):g;if(!Object.is(S,o)){const z=o;o=w??(typeof S!="object"||S===null)?S:Object.assign({},o,S),d.forEach(O=>O(o,z))}},x=()=>o,v={setState:r,getState:x,getInitialState:()=>p,subscribe:g=>(d.add(g),()=>d.delete(g))},p=o=c(r,x,v);return v},Mb=c=>c?a0(c):a0,zb=c=>c;function Db(c,o=zb){const d=Xe.useSyncExternalStore(c.subscribe,()=>o(c.getState()),()=>o(c.getInitialState()));return Xe.useDebugValue(d),d}const n0=c=>{const o=Mb(c),d=r=>Db(o,r);return Object.assign(d,o),d},Ob=c=>c?n0(c):n0,Ui="";let L0=!1,gu=null;function Ub(c){L0=c}function kb(c){gu=c}function Hb(c){return encodeURIComponent(c.replace(/\//g,"~"))}function Me(c){return L0&&gu?c.replace("/api/",`/api/projects/${Hb(gu)}/`):c}function Bb(){return Oe("/api/projects")}async function Oe(c,o){const d=`${Ui}${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 q0(){return Oe(Me("/api/status"))}function Lb(){return Oe(Me("/api/prs"))}function qb(c,o){const d=`?lines=${encodeURIComponent(o)}`;return Oe(Me(`/api/logs/${encodeURIComponent(c)}${d}`))}function Ru(){return Oe(Me("/api/config"))}function Mi(c){return Oe(Me("/api/config"),{method:"PUT",body:JSON.stringify(c)})}function Yb(){return Oe(Me("/api/doctor"))}function Y0(){return Oe(Me("/api/schedule-info"))}function Gb(){return Oe(Me("/api/actions/review"),{method:"POST"})}function s0(){return Oe(Me("/api/actions/install-cron"),{method:"POST"})}function Qb(){return Oe(Me("/api/actions/uninstall-cron"),{method:"POST"})}function Xb(c="all"){return Oe(Me("/api/actions/cancel"),{method:"POST",body:JSON.stringify({type:c})})}function Vb(){return Oe(Me("/api/agents"))}function Zb(c){return Oe(Me("/api/agents"),{method:"POST",body:JSON.stringify(c)})}function i0(c,o){return Oe(Me(`/api/agents/${encodeURIComponent(c)}`),{method:"PUT",body:JSON.stringify(o)})}function $b(c){return Oe(Me(`/api/agents/${encodeURIComponent(c)}/prompt`))}function Kb(){return Oe(Me("/api/agents/seed-defaults"),{method:"POST"})}async function Jb(c){const o=`${Ui}${Me(`/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 Wb(c){return Oe(Me("/api/slack/channels"),{method:"POST",body:JSON.stringify({botToken:c})})}function Fb(c,o){return Oe(Me("/api/slack/channels/create"),{method:"POST",body:JSON.stringify({botToken:c,name:o})})}const Ql=["Draft","Ready","In Progress","Review","Done"];function G0(){return Oe(Me("/api/board/status"))}function Ib(c){return Oe(Me("/api/board/issues"),{method:"POST",body:JSON.stringify(c)})}function Q0(c,o){return Oe(Me(`/api/board/issues/${c}/move`),{method:"PATCH",body:JSON.stringify({column:o})})}async function Pb(c){const o=`${Ui}${Me(`/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 ey(){return Oe(Me("/api/actions/clear-lock"),{method:"POST"})}function ty(c,o=[],d){const r=(d==null?void 0:d.enabled)??!0,x=j.useRef(c);x.current=c,j.useEffect(()=>{if(!r)return;const f=`${Ui}${Me("/api/status/events")}`,h=new EventSource(f);return h.addEventListener("status_changed",v=>{try{const p=JSON.parse(v.data);x.current(p)}catch{}}),()=>{h.close()}},[r,...o])}function ly(){return Oe(Me("/api/roadmap"))}function ay(){return Oe(Me("/api/roadmap/scan"),{method:"POST"})}function X0(c){return Oe(Me("/api/roadmap/toggle"),{method:"PUT",body:JSON.stringify({enabled:c})})}function gt(c,o=[],d){const r=(d==null?void 0:d.enabled)??!0,[x,f]=j.useState(null),[h,v]=j.useState(!0),[p,g]=j.useState(null),w=j.useRef(c);w.current=c;const S=j.useRef(()=>{(async()=>{g(null);try{const O=await w.current();f(O)}catch(O){g(O instanceof Error?O:new Error("Unknown error"))}})()});return S.current=S.current.bind(S),j.useEffect(()=>{if(!r)return;let z=!1;return v(!0),g(null),(async()=>{try{const k=await w.current();z||f(k)}catch(k){z||g(k instanceof Error?k:new Error("Unknown error"))}finally{z||v(!1)}})(),()=>{z=!0}},[...o,r]),{data:x,loading:h,error:p,refetch:S.current}}const ny=typeof localStorage<"u"?localStorage.getItem("nw-selected-project"):null,rt=Ob(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=>{Ub(o),c({isGlobalMode:o})},projects:[],setProjects:o=>c({projects:o}),selectedProjectId:ny,selectProject:o=>{kb(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}:{}}})}})),sy=()=>{const[c,o]=j.useState(!1),{projectName:d,isGlobalMode:r,projects:x,selectedProjectId:f,selectProject:h}=rt(),v=[{icon:Kv,label:"Dashboard",path:"/"},{icon:Iv,label:"Board",path:"/board"},{icon:Vv,label:"Pull Requests",path:"/prs",badge:1},{icon:U0,label:"Roadmap",path:"/roadmap"},{icon:Ti,label:"Scheduling",path:"/scheduling"},{icon:pb,label:"Logs",path:"/logs"},{icon:bv,label:"Integrations",path:"/integrations"},{icon:xu,label:"Agents",path:"/agents"},{icon:H0,label:"Settings",path:"/settings"}];return n.jsxs("aside",{className:`
|
|
366
|
+
relative flex flex-col transition-all duration-300 ease-[cubic-bezier(0.25,0.1,0.25,1)]
|
|
367
|
+
${c?"w-20":"w-72"} h-screen flex-shrink-0 z-50
|
|
368
|
+
bg-[#030712]/80 backdrop-blur-xl border-r border-white/5
|
|
369
|
+
`,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(e0,{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:p=>h(p.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(p=>p.valid).map(p=>n.jsx("option",{value:p.name,children:p.name},p.name))}),n.jsx(Mv,{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(e0,{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(p=>n.jsxs(Xe.Fragment,{children:[p.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(R0,{to:p.path,className:({isActive:g})=>`
|
|
370
|
+
flex items-center px-3.5 py-3 rounded-xl transition-all duration-200 group relative
|
|
371
|
+
${g?"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"}
|
|
372
|
+
${c?"justify-center":""}
|
|
373
|
+
`,children:({isActive:g})=>n.jsxs(n.Fragment,{children:[n.jsx(p.icon,{className:`h-5 w-5 transition-colors ${g?"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:p.label}),p.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 ${g?"bg-indigo-500/20 text-indigo-300":"bg-white/5 text-slate-400 border border-white/5"}`,children:p.badge})),g&&!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:p.label})]})})})]},p.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(Ai,{className:"h-5 w-5"}):n.jsx(Av,{className:"h-5 w-5"})})})]})},iy=()=>{const{projectName:c}=rt();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(Tb,{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(Au,{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(pv,{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(H0,{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"})]})]})},cy=({toast:c,onDismiss:o})=>{const d={success:n.jsx(as,{className:"h-5 w-5 text-green-400"}),error:n.jsx(Kt,{className:"h-5 w-5 text-red-400"}),info:n.jsx(Wv,{className:"h-5 w-5 text-blue-400"}),warning:n.jsx(wb,{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:`
|
|
374
|
+
pointer-events-auto w-full max-w-sm overflow-hidden rounded-lg
|
|
375
|
+
bg-slate-900 border border-slate-800 border-l-4 ${r[c.type]}
|
|
376
|
+
shadow-lg ring-1 ring-black ring-opacity-5 transition-all
|
|
377
|
+
animate-in slide-in-from-right-full fade-in duration-300
|
|
378
|
+
`,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(pl,{className:"h-5 w-5"})]})})]})})})},ry=()=>{const{toasts:c,removeToast:o}=rt();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(cy,{toast:d,onDismiss:o},d.id))})};function uy(){const{setGlobalMode:c,setGlobalModeLoading:o,setProjects:d,selectProject:r,selectedProjectId:x}=rt();j.useEffect(()=>{o(!0),Bb().then(f=>{c(!0),d(f);const h=f.filter(v=>v.valid);x&&h.some(v=>v.name===x)?r(x):h.length>0&&r(h[0].name)}).catch(()=>{c(!1)}).finally(()=>{o(!1)})},[])}const Mu=({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)})},oy=({role:c})=>c.toLowerCase().includes("security")?n.jsx(B0,{className:"h-3 w-3"}):c.toLowerCase().includes("tech")||c.toLowerCase().includes("architect")?n.jsx(Rb,{className:"h-3 w-3"}):c.toLowerCase().includes("qa")?n.jsx(jb,{className:"h-3 w-3"}):n.jsx(Bv,{className:"h-3 w-3"}),dy=({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:h=>{(h.key==="Enter"||h.key===" ")&&(h.preventDefault(),o(c))},className:`relative rounded-xl border p-5 flex flex-col gap-4 transition-all duration-200
|
|
379
|
+
${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(Mu,{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(oy,{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:h=>{h.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:h=>{h.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(Tu,{className:"h-3.5 w-3.5"})}),n.jsx("button",{onClick:h=>{h.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(_u,{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(h=>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:h},h))}),c.modelConfig&&n.jsxs("div",{className:"text-[10px] text-slate-600 font-mono",children:[c.modelConfig.provider,"/",c.modelConfig.model]})]})},fy=({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]=j.useState(""),h=()=>{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(p=>p!==v)),className:"text-slate-500 hover:text-red-400",children:n.jsx(pl,{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(),h()),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:h,className:"px-3 py-2 rounded-lg bg-white/5 text-slate-400 hover:text-slate-200 text-sm",children:"Add"})]})]})},c0=({label:c,items:o,onChange:d})=>{const[r,x]=j.useState(""),[f,h]=j.useState(""),v=()=>{r.trim()&&(d({...o,[r.trim()]:f.trim()}),x(""),h(""))};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(([p,g])=>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:p}),n.jsx("span",{className:"text-xs text-slate-400 flex-1 truncate",children:g}),n.jsx("button",{onClick:()=>{const w={...o};delete w[p],d(w)},className:"text-slate-600 hover:text-red-400",children:n.jsx(pl,{className:"h-3 w-3"})})]},p))}),n.jsxs("div",{className:"flex gap-2",children:[n.jsx("input",{value:r,onChange:p=>x(p.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:p=>h(p.target.value),onKeyDown:p=>p.key==="Enter"&&(p.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"})]})]})},r0=({label:c,items:o,onChange:d,examplePlaceholder:r,whyPlaceholder:x})=>{const f=(h,v)=>{const p=[...o];p[h]={...p[h],...v},d(p)};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((h,v)=>n.jsxs("div",{className:"rounded-lg border border-white/10 bg-[#111827] p-2 space-y-2",children:[n.jsx("input",{value:h.example,onChange:p=>f(v,{example:p.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:h.why,onChange:p=>f(v,{why:p.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((p,g)=>g!==v)),className:"text-slate-500 hover:text-red-400 px-1",title:"Remove",children:n.jsx(pl,{className:"h-3.5 w-3.5"})})]})]},v))})]})},Pn=({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"})]}),Ia=({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 my(){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 hy(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 xy=["Identity","Soul","Style","Calibration","Advanced"],gy=({persona:c,onClose:o,onSave:d})=>{var q;const[r,x]=j.useState("Identity"),[f,h]=j.useState(c?hy(c):my()),[v,p]=j.useState(!1),[g,w]=j.useState(null),[S,z]=j.useState(null),[O,k]=j.useState(!1),T=C=>h(G=>({...G,soul:{...G.soul,...C}})),A=C=>h(G=>({...G,style:{...G.style,...C}})),V=C=>h(G=>({...G,skill:{...G.skill,...C}})),H=C=>h(G=>({...G,modelConfig:G.modelConfig?{...G.modelConfig,...C}:{provider:"anthropic",model:"claude-sonnet-4-6",...C}})),L=async()=>{if(!f.name.trim()||!f.role.trim()){w("Name and role are required.");return}p(!0),w(null);const C=f.modelConfig===null?null:f.modelConfig.model?f.modelConfig:void 0,G={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,G),o()}catch(F){w(F.message)}finally{p(!1)}},J=async()=>{if(c){k(!0);try{const C=await $b(c.id);z(C.prompt)}catch(C){z(`Error: ${C.message}`)}finally{k(!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(Mu,{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(pl,{className:"h-5 w-5"})})]}),n.jsx("div",{className:"px-6 pt-4",children:n.jsx(fy,{tabs:xy,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(Ia,{label:"Name",value:f.name,onChange:C=>h(G=>({...G,name:C})),placeholder:"e.g. Maya"}),n.jsx(Ia,{label:"Role",value:f.role,onChange:C=>h(G=>({...G,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:(q=(f.name||"?")[0])==null?void 0:q.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 G=(I=C.target.files)==null?void 0:I[0];if(!G)return;const F=new FileReader;F.onload=$=>{var je;const he=(je=$.target)==null?void 0:je.result;h(De=>({...De,avatarUrl:he}))},F.readAsDataURL(G)}})]}),f.avatarUrl&&n.jsx("button",{onClick:()=>h(C=>({...C,avatarUrl:""})),className:"ml-2 text-xs text-slate-500 hover:text-red-400",children:"Remove"})]})]})]}),n.jsx(Pn,{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,G])=>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]:F,...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:G.map((F,I)=>n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx("input",{value:F,onChange:$=>{const he=[...G];he[I]=$.target.value,T({opinions:{...f.soul.opinions??{},[C]:he}})},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 $=G.filter((he,je)=>je!==I);T({opinions:{...f.soul.opinions??{},[C]:$}})},className:"text-slate-500 hover:text-red-400 text-xs",children:"×"})]},I))}),n.jsx("button",{onClick:()=>{T({opinions:{...f.soul.opinions??{},[C]:[...G,""]}})},className:"text-xs text-indigo-400 hover:text-indigo-300",children:"+ Add take"})]},C))]})]}),r==="Style"&&n.jsxs(n.Fragment,{children:[n.jsx(Pn,{label:"Voice Principles",value:f.style.voicePrinciples,onChange:C=>A({voicePrinciples:C}),placeholder:"Describe the voice in 1-2 sentences..."}),n.jsx(Ia,{label:"Tone",value:f.style.tone,onChange:C=>A({tone:C}),placeholder:"e.g. Vigilant but not paranoid. Matter-of-fact."}),n.jsx(Ia,{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(Pn,{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(c0,{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=>V({additionalInstructions:C}),placeholder:"Add an instruction..."}),n.jsx(r0,{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(r0,{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:()=>h(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=>H({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(Ia,{label:"Model",value:f.modelConfig.model,onChange:C=>H({model:C}),placeholder:"e.g. claude-sonnet-4-6"}),f.modelConfig.provider==="custom"&&n.jsx(Ia,{label:"Base URL",value:f.modelConfig.baseUrl??"",onChange:C=>H({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=>H({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=>H({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,G])=>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:G==="***"?"":G,placeholder:G==="***"?"(masked)":"value",onChange:F=>{var I;return H({envVars:{...((I=f.modelConfig)==null?void 0:I.envVars)??{},[C]:F.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 $;const{[C]:F,...I}=(($=f.modelConfig)==null?void 0:$.envVars)??{};H({envVars:I})},className:"text-slate-500 hover:text-red-400 text-xs",children:"×"})]},C)),n.jsx("button",{onClick:()=>{var G;const C=prompt("Environment variable name (e.g., ANTHROPIC_API_KEY):");C!=null&&C.trim()&&H({envVars:{...((G=f.modelConfig)==null?void 0:G.envVars)??{},[C.trim()]:""}})},className:"text-xs text-indigo-400 hover:text-indigo-300 mt-1",children:"+ Add Env Var"})]})]}),n.jsx(c0,{label:"Operating Modes",items:f.skill.modes,onChange:C=>V({modes:C})}),n.jsx(Pn,{label:"Interpolation Rules",value:f.skill.interpolationRules,onChange:C=>V({interpolationRules:C}),rows:3,placeholder:"How this persona should reason when explicit opinions are missing..."}),n.jsx(Pn,{label:"System Prompt Override (leave empty to compile from soul)",value:f.systemPromptOverride,onChange:C=>h(G=>({...G,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:J,disabled:O,className:"flex items-center gap-1.5 text-xs text-indigo-400 hover:text-indigo-300 disabled:opacity-50",children:[n.jsx(Ri,{className:"h-3.5 w-3.5"}),O?"Loading...":"Preview"]})]}),S&&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:S})]})]})]}),n.jsxs("div",{className:"flex items-center justify-between px-6 py-4 border-t border-white/10",children:[g&&n.jsx("p",{className:"text-sm text-red-400",children:g}),!g&&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:L,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"})]})]})]})]})},py=({persona:c,onConfirm:o,onCancel:d})=>{const[r,x]=j.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"})]})]})]})},vy=()=>{const{selectedProjectId:c,globalModeLoading:o}=rt(),{data:d,loading:r,error:x,refetch:f}=gt(()=>Vb(),[c],{enabled:!o}),[h,v]=j.useState(void 0),[p,g]=j.useState(null),[w,S]=j.useState(!1),[z,O]=j.useState(null),k=j.useCallback(async(J,q)=>{J?await i0(J,q):await Zb(q),f()},[f]),T=j.useCallback(async J=>{await Jb(J.id),g(null),f()},[f]),A=j.useCallback(async J=>{await i0(J.id,{isActive:!J.isActive}),f()},[f]),V=async()=>{S(!0),O(null);try{await Kb(),f()}catch(J){O(J.message)}finally{S(!1)}},H=(d==null?void 0:d.filter(J=>J.isActive).length)??0,L=(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(xu,{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:[L," agent",L!==1?"s":""," ·"," ",H," active"]})]}),n.jsxs("div",{className:"flex items-center gap-3",children:[n.jsxs("button",{onClick:V,disabled:w,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(hu,{className:`h-4 w-4 ${w?"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(xu,{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:V,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(hu,{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(J=>n.jsx(dy,{persona:J,onEdit:v,onDelete:g,onToggleActive:A},J.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(Ai,{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(J=>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(Mu,{persona:J,size:"sm"}),n.jsxs("div",{children:[n.jsx("span",{className:"text-sm font-medium text-slate-200",children:J.name}),n.jsx("span",{className:"text-xs text-slate-500 ml-2",children:J.role})]})]}),J.soul.whoIAm&&n.jsx("p",{className:"text-xs text-slate-500 leading-relaxed mb-2",children:J.soul.whoIAm}),J.soul.worldview.length>0&&n.jsx("ul",{className:"space-y-1",children:J.soul.worldview.slice(0,3).map((q,C)=>n.jsx("li",{className:"text-xs text-slate-600 pl-3 border-l border-white/5",children:q},C))})]},J.id))})]})}),h!==void 0&&n.jsx(gy,{persona:h,onClose:()=>v(void 0),onSave:k}),p&&n.jsx(py,{persona:p,onConfirm:()=>T(p),onCancel:()=>g(null)})]})},be=({children:c,className:o="",onClick:d})=>n.jsxs("div",{className:`
|
|
380
|
+
relative bg-[#0b101b] rounded-xl border border-white/5
|
|
381
|
+
shadow-[0_4px_20px_-4px_rgba(0,0,0,0.5)]
|
|
382
|
+
transition-all duration-300
|
|
383
|
+
${d?"cursor-pointer hover:border-indigo-500/30 hover:shadow-indigo-500/5 group":""}
|
|
384
|
+
${o}
|
|
385
|
+
`,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})]}),me=({children:c,variant:o="primary",size:d="md",loading:r=!1,className:x="",disabled:f,...h})=>{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]",p={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"},g={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} ${p[o]} ${g[d]} ${x}`,disabled:f||r,...h,children:[r&&n.jsx(O0,{className:"mr-2 h-4 w-4 animate-spin"}),c]})},Ci=({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})},V0={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"}},by=({defaultColumn:c,onClose:o,onCreated:d})=>{const[r,x]=j.useState(""),[f,h]=j.useState(""),[v,p]=j.useState(c),[g,w]=j.useState(!1),[S,z]=j.useState(null),{addToast:O}=rt(),k=async T=>{if(T.preventDefault(),!!r.trim()){w(!0),z(null);try{await Ib({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{w(!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(pl,{className:"h-5 w-5"})})]}),n.jsxs("form",{onSubmit:k,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=>p(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=>h(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"})]}),S&&n.jsx("p",{className:"text-sm text-red-400",children:S}),n.jsxs("div",{className:"flex justify-end space-x-3 pt-2",children:[n.jsx(me,{variant:"ghost",type:"button",onClick:o,children:"Cancel"}),n.jsx(me,{type:"submit",disabled:g||!r.trim(),children:g?"Creating...":"Create Issue"})]})]})]})]})},yy=({issue:c,onClose:o,onMoved:d,onClosed:r})=>{const[x,f]=j.useState(!1),[h,v]=j.useState(!1),{addToast:p}=rt(),g=async z=>{if(z!==c.column){f(!0);try{await Q0(c.number,z),p({title:"Issue moved",message:`#${c.number} moved to ${z}`,type:"success"}),d(),o()}catch(O){p({title:"Move failed",message:O instanceof Error?O.message:"Failed to move issue",type:"error"})}finally{f(!1)}}},w=async()=>{if(confirm(`Close issue #${c.number}: "${c.title}"?`)){v(!0);try{await Pb(c.number),p({title:"Issue closed",message:`#${c.number} closed on GitHub`,type:"success"}),r(),o()}catch(z){p({title:"Close failed",message:z instanceof Error?z.message:"Failed to close issue",type:"error"})}finally{v(!1)}}},S=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(Ci,{variant:V0[S].badge,children:S})]}),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(pl,{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:()=>g(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(Eu,{className:"h-3.5 w-3.5"}),n.jsx("span",{children:"GitHub"})]}),n.jsx("button",{onClick:w,disabled:h,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:h?"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."})})]})]})},jy=({issue:c,onClick:o,onDragStart:d})=>{const[r,x]=j.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(be,{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(", ")})]})})},Ny=({name:c,issues:o,draggingIssue:d,onIssueClick:r,onNewIssue:x,onMoveIssue:f,onDragStart:h})=>{const v=V0[c],[p,g]=j.useState(!1),w=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 ${p&&w?"bg-indigo-500/5 ring-1 ring-indigo-500/30":""}`,onDragOver:S=>{w&&(S.preventDefault(),S.dataTransfer.dropEffect="move",g(!0))},onDragLeave:()=>g(!1),onDrop:S=>{S.preventDefault(),g(!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 ${p&&w?"border-indigo-500/40":"border-slate-800"}`,children:n.jsx("span",{className:"text-xs text-slate-700",children:p&&w?"Drop here":"No issues"})}):o.map(S=>n.jsx(jy,{issue:S,onClick:()=>r(S),onDragStart:h},S.id))})]})},Sy=()=>{const[c,o]=j.useState(null),[d,r]=j.useState(null),[x,f]=j.useState(null),[h,v]=j.useState(null),p=j.useRef(!1),{addToast:g,selectedProjectId:w,globalModeLoading:S}=rt(),{data:z,loading:O,error:k,refetch:T}=gt(G0,[w],{enabled:!S});j.useEffect(()=>{const H=setInterval(()=>{p.current||T()},3e4);return()=>clearInterval(H)},[T]);const A=j.useCallback(async(H,L)=>{f(null);const J=h??(z==null?void 0:z.columns);if(!J)return;const q=J,C={};for(const F of Ql)C[F]=(J[F]??[]).filter(I=>I.number!==H.number);const G={...H,column:L};C[L]=[...C[L]??[],G],v(C),o(F=>(F==null?void 0:F.number)===H.number?G:F),p.current=!0;try{await Q0(H.number,L),T(),setTimeout(()=>{v(null),p.current=!1},800)}catch(F){v(q),o(I=>(I==null?void 0:I.number)===H.number?H:I),p.current=!1,g({title:"Move failed",message:F instanceof Error?F.message:"Failed to move issue",type:"error"})}},[g,T,h,z]);if(S||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(k&&k.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(k)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:k.message}),n.jsx(me,{onClick:()=>T(),children:"Retry"})]});if(!z)return null;const V=h??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((H,L)=>{var J;return H+(((J=V[L])==null?void 0:J.length)??0)},0)," issues across ",Ql.length," columns"]})]}),n.jsxs(me,{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(H=>n.jsx(Ny,{name:H,issues:V[H]??[],draggingIssue:x,onIssueClick:o,onNewIssue:r,onMoveIssue:A,onDragStart:f},H))})}),c&&n.jsx(yy,{issue:c,onClose:()=>o(null),onMoved:()=>T(),onClosed:()=>T()}),d&&n.jsx(by,{defaultColumn:d,onClose:()=>r(null),onCreated:()=>T()})]})},wy={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"},Cy=()=>{var je,De,Ve,Ye,U;const c=ju(),[o,d]=j.useState(null),[r,x]=j.useState(!1),[f,h]=j.useState(null),{setProjectName:v,addToast:p,selectedProjectId:g,globalModeLoading:w}=rt(),{data:S,loading:z,error:O,refetch:k}=gt(q0,[g],{enabled:!w}),{data:T}=gt(Y0,[g],{enabled:!w}),{data:A}=gt(()=>G0().catch(()=>null),[g],{enabled:!w});ty(Z=>{h(Z)},[g,w],{enabled:!w});const V=f||S;if(Xe.useEffect(()=>{V!=null&&V.projectName&&v(V.projectName)},[V,v]),j.useEffect(()=>{const Z=setInterval(()=>{k()},3e4);return()=>clearInterval(Z)},[k]),j.useEffect(()=>{const Z=()=>k();return window.addEventListener("focus",Z),()=>window.removeEventListener("focus",Z)},[k]),w||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(Kt,{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(me,{onClick:()=>k(),children:"Retry"})]});if(!V)return null;const H=V.prs.length,L=V.prs.filter(Z=>Z.reviewScore!==null&&Z.reviewScore<70).length,J=((je=A==null?void 0:A.columns.Ready)==null?void 0:je.length)??0,q=((De=A==null?void 0:A.columns["In Progress"])==null?void 0:De.length)??0,C=V.processes.find(Z=>Z.name==="executor"),G=V.processes.find(Z=>Z.name==="reviewer"),F=V.processes.find(Z=>Z.name==="qa"),I=async Z=>{d(Z);try{const te=await Xb(Z),K=te.results.every(ce=>ce.success);p({title:K?"Process Cancelled":"Cancel Failed",message:te.results.map(ce=>ce.message).join("; "),type:K?"success":"error"})}catch(te){p({title:"Cancel Failed",message:te instanceof Error?te.message:"Failed to cancel process",type:"error"})}finally{d(null),k()}},$=async()=>{x(!0);try{await ey(),p({title:"Lock Cleared",message:"Stale executor state removed",type:"success"}),k()}catch(Z){p({title:"Clear Failed",message:Z instanceof Error?Z.message:"Failed to clear lock",type:"error"})}finally{x(!1)}},he=Z=>{if(!Z)return"Not scheduled";try{const te=new Date(Z),K=new Date,ce=te.getTime()-K.getTime(),y=Math.floor(ce/6e4);return y<0?"Running now...":y<60?`In ${y} min`:y<1440?`In ${Math.floor(y/60)} hr${y>=120?"s":""}`:`In ${Math.floor(y/1440)} day${y>=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(be,{className:"p-5",onClick:()=>c("/board"),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:"Board Ready"}),n.jsx("h3",{className:"text-3xl font-bold text-slate-100 mt-1",children:J})]}),n.jsx("div",{className:"p-2 bg-green-500/10 rounded-lg text-green-400",children:n.jsx(as,{className:"h-5 w-5"})})]}),n.jsx("p",{className:"text-xs text-slate-500 mt-4",children:"issues ready to start"})]}),n.jsxs(be,{className:"p-5",onClick:()=>c("/board"),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:q})]}),n.jsx("div",{className:"p-2 bg-blue-500/10 rounded-lg text-blue-400",children:n.jsx(D0,{className:"h-5 w-5"})})]}),n.jsx("p",{className:"text-xs text-slate-500 mt-4",children:"issues in progress"})]}),n.jsxs(be,{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:H})]}),n.jsx("div",{className:"p-2 bg-purple-500/10 rounded-lg text-purple-400",children:n.jsx(_i,{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(be,{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:V.crontab.installed?"Active":"Inactive"})]}),n.jsx("div",{className:`p-2 rounded-lg ${V.crontab.installed?"bg-indigo-500/10 text-indigo-400":"bg-slate-700/50 text-slate-500"}`,children:n.jsx(Ti,{className:"h-5 w-5"})})]}),n.jsx("p",{className:"text-xs text-slate-500 mt-4",children:V.crontab.installed?`${V.crontab.entries.length} entr${V.crontab.entries.length===1?"y":"ies"} installed`:"No crontab entries"})]})]}),n.jsxs(be,{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-3 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:V.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:V.config.provider})]}),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(V.timestamp).toLocaleString()})]})]})]}),n.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[n.jsxs(be,{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} • ${V.activePrd??"Running"}`:"Idle"})]})]}),n.jsxs("div",{className:"flex items-center space-x-2",children:[(C==null?void 0:C.running)&&n.jsxs(me,{size:"sm",variant:"ghost",className:"text-red-400 hover:text-red-300",onClick:()=>I("run"),disabled:o==="run",children:[n.jsx(fu,{className:"h-4 w-4 mr-1"}),o==="run"?"Stopping...":"Stop"]}),!(C!=null&&C.running)&&V.activePrd&&n.jsx(me,{size:"sm",variant:"ghost",className:"text-amber-400 hover:text-amber-300",onClick:$,disabled:r,children:r?"Clearing...":"Force Clear"}),n.jsx(me,{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 ${G!=null&&G.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 ${G!=null&&G.running?"text-slate-200":"text-slate-400"}`,children:"Reviewer"}),n.jsx("div",{className:"text-xs text-slate-500",children:G!=null&&G.running?`PID: ${G.pid} • Running`:"Idle"})]})]}),n.jsxs("div",{className:"flex items-center space-x-2",children:[(G==null?void 0:G.running)&&n.jsxs(me,{size:"sm",variant:"ghost",className:"text-red-400 hover:text-red-300",onClick:()=>I("review"),disabled:o==="review",children:[n.jsx(fu,{className:"h-4 w-4 mr-1"}),o==="review"?"Stopping...":"Stop"]}),n.jsx(me,{size:"sm",variant:"ghost",onClick:()=>c("/logs"),disabled:!(G!=null&&G.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 ${F!=null&&F.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 ${F!=null&&F.running?"text-slate-200":"text-slate-400"}`,children:"QA"}),n.jsx("div",{className:"text-xs text-slate-500",children:F!=null&&F.running?`PID: ${F.pid} • Running`:"Idle"})]})]}),n.jsx("div",{className:"flex items-center space-x-2",children:n.jsx(me,{size:"sm",variant:"ghost",onClick:()=>c("/logs"),children:"View Log"})})]})]})]}),n.jsxs(be,{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(Pm,{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(Ti,{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":he(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(_i,{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":he(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 ${(Ve=T==null?void 0:T.qa)!=null&&Ve.installed?"bg-green-500/10 text-green-400":"bg-slate-800 text-slate-500"}`,children:n.jsx(bb,{className:"h-4 w-4"})}),n.jsxs("div",{children:[n.jsx("div",{className:`text-sm font-medium ${(Ye=T==null?void 0:T.qa)!=null&&Ye.installed?"text-slate-200":"text-slate-500"}`,children:"QA"}),n.jsx("div",{className:"text-xs text-slate-500",children:T!=null&&T.paused?"Paused":he((U=T==null?void 0:T.qa)==null?void 0:U.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(Pm,{className:"ml-1 h-3 w-3"})]})]}),n.jsx(be,{className:"p-4",children:A?n.jsx("div",{className:"flex flex-wrap gap-3",children:Ql.map(Z=>{var K;const te=((K=A.columns[Z])==null?void 0:K.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 ${wy[Z]}`,children:[n.jsx("span",{className:"text-xs font-medium",children:Z}),n.jsx("span",{className:"text-xs font-bold",children:te})]},Z)})}):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."]})})]})]})},Ce=Xe.forwardRef(({className:c="",label:o,error:d,helperText:r,rightIcon:x,...f},h)=>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:h,className:`
|
|
386
|
+
w-full rounded-lg bg-slate-950 border border-slate-800
|
|
387
|
+
px-3 py-2 text-sm text-slate-200
|
|
388
|
+
placeholder:text-slate-600
|
|
389
|
+
focus:outline-none focus:ring-2 focus:ring-indigo-500/50 focus:border-indigo-500
|
|
390
|
+
disabled:opacity-50 disabled:cursor-not-allowed
|
|
391
|
+
transition-all duration-200
|
|
392
|
+
${d?"border-red-500/50 focus:ring-red-500/50 focus:border-red-500":""}
|
|
393
|
+
${x?"pr-10":""}
|
|
394
|
+
${c}
|
|
395
|
+
`,...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]}));Ce.displayName="Input";const Xl=Xe.forwardRef(({className:c="",label:o,error:d,helperText:r,options:x,value:f,onChange:h,children:v,...p},g)=>{const w=S=>{h&&h(S.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:g,className:`
|
|
396
|
+
w-full appearance-none rounded-lg bg-slate-950 border border-slate-800
|
|
397
|
+
px-3 py-2 pr-10 text-sm text-slate-200
|
|
398
|
+
focus:outline-none focus:ring-2 focus:ring-indigo-500/50 focus:border-indigo-500
|
|
399
|
+
disabled:opacity-50 disabled:cursor-not-allowed
|
|
400
|
+
transition-all duration-200
|
|
401
|
+
${d?"border-red-500/50 focus:ring-red-500/50 focus:border-red-500":""}
|
|
402
|
+
${c}
|
|
403
|
+
`,value:f,onChange:w,...p,children:x?x.map(S=>n.jsx("option",{value:S.value,children:S.label},S.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(Ev,{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 Ey(){var Z,te;const{data:c,refetch:o}=gt(Ru),{addToast:d}=rt(),[r,x]=j.useState(1),[f,h]=j.useState(!1),[v,p]=j.useState(!1),[g,w]=j.useState([]),[S,z]=j.useState(!1),[O,k]=j.useState(""),[T,A]=j.useState(""),[V,H]=j.useState(""),[L,J]=j.useState(""),[q,C]=j.useState(""),[G,F]=j.useState("");Xe.useEffect(()=>{var K,ce,y,Q;c!=null&&c.slack&&(k(c.slack.botToken||""),A(c.slack.appToken||""),H(((K=c.slack.channels)==null?void 0:K.eng)||""),J(((ce=c.slack.channels)==null?void 0:ce.prs)||""),C(((y=c.slack.channels)==null?void 0:y.incidents)||""),F(((Q=c.slack.channels)==null?void 0:Q.releases)||""))},[c]);const I=async()=>{try{h(!0),await Mi({slack:{enabled:!1,botToken:"",appToken:"",channels:{eng:"",prs:"",incidents:"",releases:""},autoCreateProjectChannels:!1,discussionEnabled:!0}}),k(""),A(""),H(""),J(""),C(""),F(""),x(1),o(),d({title:"Disconnected",message:"Slack integration removed.",type:"success"})}catch(K){d({title:"Error",message:K.message||"Failed to disconnect",type:"error"})}finally{h(!1)}},$=async(K=!1)=>{try{h(!0),await Mi({slack:{enabled:!0,botToken:O,appToken:T,channels:{eng:V,prs:L,incidents:q,releases:G},autoCreateProjectChannels:!0,discussionEnabled:!0}}),d({title:"Success",message:"Slack configuration saved successfully.",type:"success"}),o(),x(K?1:r+1)}catch(ce){d({title:"Error",message:ce.message||"Failed to save configuration",type:"error"})}finally{h(!1)}},he=async()=>{if(x(3),!!O.startsWith("xoxb-"))try{z(!0);const K=await Wb(O);w(K);const ce=ue=>{var oe;return(oe=K.find(He=>He.name.toLowerCase()===ue))==null?void 0:oe.id},y=V||ce("eng"),Q=L||ce("prs"),W=q||ce("incidents"),P=G||ce("releases"),ie=[];if(y||ie.push({name:"eng",setter:H}),Q||ie.push({name:"prs",setter:J}),W||ie.push({name:"incidents",setter:C}),P||ie.push({name:"releases",setter:F}),ie.length>0){d({title:"Creating Channels",message:`Auto-creating missing channels: ${ie.map(oe=>"#"+oe.name).join(", ")}`,type:"info"});const ue=[...K];for(const oe of ie)try{const He=await Fb(O,oe.name),Be=He.channelId;oe.setter(Be),ue.push({id:Be,name:oe.name}),He.inviteWarning?d({title:"Channel Created with Warning",message:`#${oe.name}: ${He.inviteWarning}`,type:"warning"}):He.welcomeMessagePosted||d({title:"Channel Created",message:`#${oe.name} was created, but welcome message failed to post.`,type:"warning"})}catch(He){console.error("Failed to create channel:",oe.name,He)}w(ue)}else y&&H(y),Q&&J(Q),W&&C(W),P&&F(P)}catch{d({title:"Warning",message:"Could not fetch channels automatically. Please verify your token.",type:"warning"})}finally{z(!1)}},je="https://api.slack.com/apps?new_app=1",De=`{
|
|
404
|
+
"display_information": {
|
|
405
|
+
"name": "Night Watch AI",
|
|
406
|
+
"description": "AI-driven startup team",
|
|
407
|
+
"background_color": "#0d1117"
|
|
408
|
+
},
|
|
409
|
+
"features": {
|
|
410
|
+
"bot_user": {
|
|
411
|
+
"display_name": "Night Watch AI",
|
|
412
|
+
"always_online": true
|
|
413
|
+
}
|
|
414
|
+
},
|
|
415
|
+
"oauth_config": {
|
|
416
|
+
"scopes": {
|
|
417
|
+
"bot": [
|
|
418
|
+
"chat:write",
|
|
419
|
+
"chat:write.customize",
|
|
420
|
+
"channels:manage",
|
|
421
|
+
"channels:read",
|
|
422
|
+
"channels:join",
|
|
423
|
+
"reactions:write",
|
|
424
|
+
"reactions:read",
|
|
425
|
+
"app_mentions:read",
|
|
426
|
+
"channels:history",
|
|
427
|
+
"users:read"
|
|
428
|
+
]
|
|
429
|
+
}
|
|
430
|
+
},
|
|
431
|
+
"settings": {
|
|
432
|
+
"event_subscriptions": {
|
|
433
|
+
"bot_events": [
|
|
434
|
+
"app_mention",
|
|
435
|
+
"message.channels"
|
|
436
|
+
]
|
|
437
|
+
},
|
|
438
|
+
"socket_mode_enabled": true,
|
|
439
|
+
"token_rotation_enabled": false,
|
|
440
|
+
"org_deploy_enabled": false
|
|
441
|
+
}
|
|
442
|
+
} `;if(!c)return n.jsx("div",{className:"animate-pulse flex space-x-4",children:"Loading..."});const Ve=((Z=c.slack)==null?void 0:Z.enabled)&&((te=c.slack)==null?void 0:te.botToken),Ye=()=>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(l0,{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(Pa,{className:"w-4 h-4"})," Connected"]}),n.jsx(me,{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(be,{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(Ce,{label:"Bot User OAuth Token",type:v?"text":"password",value:O,onChange:K=>k(K.target.value),className:"flex-1",rightIcon:n.jsx("button",{type:"button",onClick:()=>p(!v),className:"hover:text-slate-300 pointer-events-auto transition-colors",children:v?n.jsx(mu,{className:"w-4 h-4"}):n.jsx(Ri,{className:"w-4 h-4"})})})}),n.jsxs("div",{className:"mt-4",children:[n.jsx(Ce,{label:"App-Level Token (Socket Mode)",type:v?"text":"password",value:T,onChange:K=>A(K.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:V},{label:"prs",id:L},{label:"incidents",id:q},{label:"releases",id:G}].map(K=>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:["#",K.label," Channel"]}),K.id&&n.jsxs("button",{onClick:()=>window.open(`https://slack.com/app_redirect?channel=${K.id}`,"_blank"),className:"text-[10px] text-indigo-400 hover:text-indigo-300 flex items-center gap-1 transition-colors",children:["Open ",n.jsx(Eu,{className:"w-2.5 h-2.5"})]})]}),n.jsx(Ce,{value:K.id,onChange:ce=>{K.label==="eng"&&H(ce.target.value),K.label==="prs"&&J(ce.target.value),K.label==="incidents"&&C(ce.target.value),K.label==="releases"&&F(ce.target.value)},placeholder:"C1234567890"})]},K.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(me,{onClick:()=>$(!0),loading:f,children:"Save Changes"})})]})]}),U=[{number:1,title:"Create App",icon:jv},{number:2,title:"Tokens & Scopes",icon:B0},{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."})]}),Ve&&r===1?Ye():n.jsxs(be,{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(l0,{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)/(U.length-1)*100}%`}}),U.map(K=>n.jsxs("div",{className:`relative z-10 flex flex-col items-center gap-2 ${r>=K.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]
|
|
443
|
+
${r>=K.number?"border-indigo-500 glow-indigo":"border-slate-800"}
|
|
444
|
+
${r===K.number?"ring-4 ring-indigo-500/20":""}
|
|
445
|
+
`,children:r>K.number?n.jsx(Pa,{className:"w-6 h-6"}):n.jsx(K.icon,{className:"w-5 h-5"})}),n.jsx("span",{className:"text-xs font-medium tracking-wide",children:K.title})]},K.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:De})}),n.jsx(me,{size:"sm",className:"absolute top-2 right-2 opacity-0 group-hover:opacity-100 transition-opacity",onClick:()=>{navigator.clipboard.writeText(De),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(me,{variant:"outline",onClick:()=>window.open(je,"_blank"),children:"Open Slack API Console"}),n.jsxs(me,{onClick:()=>x(2),children:["Next Step ",n.jsx(Ai,{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(Ce,{label:"Slack Bot Token",placeholder:"xoxb-...",value:O,onChange:K=>k(K.target.value),type:v?"text":"password",rightIcon:n.jsx("button",{type:"button",onClick:()=>p(!v),className:"hover:text-slate-300 pointer-events-auto transition-colors",children:v?n.jsx(mu,{className:"w-4 h-4"}):n.jsx(Ri,{className:"w-4 h-4"})})}),n.jsxs("div",{className:"mt-4",children:[n.jsx(Ce,{label:"Slack App Token (Socket Mode)",placeholder:"xapp-...",value:T,onChange:K=>A(K.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(me,{variant:"ghost",onClick:()=>x(1),children:"Back"}),n.jsxs(me,{onClick:he,disabled:!O.startsWith("xoxb-")||S,children:["Next Step ",n.jsx(Ai,{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:g.length>0?n.jsxs(n.Fragment,{children:[n.jsxs(be,{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:""},...g.map(K=>({label:"#"+K.name,value:K.id}))],value:V,onChange:H})]}),n.jsxs(be,{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:""},...g.map(K=>({label:"#"+K.name,value:K.id}))],value:L,onChange:J})]}),n.jsxs(be,{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:""},...g.map(K=>({label:"#"+K.name,value:K.id}))],value:q,onChange:C})]}),n.jsxs(be,{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:""},...g.map(K=>({label:"#"+K.name,value:K.id}))],value:G,onChange:F})]})]}):n.jsxs(n.Fragment,{children:[n.jsxs(be,{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(Ce,{placeholder:"C1234567890",value:V,onChange:K=>H(K.target.value)})]}),n.jsxs(be,{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(Ce,{placeholder:"C1234567890",value:L,onChange:K=>J(K.target.value)})]}),n.jsxs(be,{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(Ce,{placeholder:"C1234567890",value:q,onChange:K=>C(K.target.value)})]}),n.jsxs(be,{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(Ce,{placeholder:"C1234567890",value:G,onChange:K=>F(K.target.value)})]})]})})]}),n.jsxs("div",{className:"flex justify-between pt-8",children:[n.jsx(me,{variant:"ghost",onClick:()=>x(2),children:"Back"}),n.jsx(me,{onClick:()=>$(!0),loading:f,disabled:!V||!L||!q,children:"Complete Setup"})]})]})]})]})]})}const Ty=()=>{const[c,o]=j.useState(!0),[d,r]=j.useState(""),[x,f]=j.useState("executor"),h=j.useRef(null),{selectedProjectId:v,globalModeLoading:p}=rt(),{data:g,loading:w,error:S,refetch:z}=gt(()=>qb(x,500),[x,v],{enabled:!p}),{data:O}=gt(q0,[v],{enabled:!p}),k=(g==null?void 0:g.lines)||[];j.useEffect(()=>{c&&h.current&&(h.current.scrollTop=h.current.scrollHeight)},[k,c]),j.useEffect(()=>{if(!c)return;const H=window.setInterval(()=>{z()},3e3);return()=>window.clearInterval(H)},[c,x,z]);const T=k.filter(H=>H.toLowerCase().includes(d.toLowerCase())),A=H=>{f(H),r("")},V=H=>{if(!(O!=null&&O.processes))return!1;const L=O.processes.find(J=>J.name===H);return(L==null?void 0:L.running)??!1};return S?n.jsxs("div",{className:"flex flex-col items-center justify-center h-full space-y-4",children:[n.jsx(Kt,{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:S.message}),n.jsx(me,{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:H=>r(H.target.value)}),n.jsx(Au,{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"}),V("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"}),V("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"}),V("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(me,{size:"sm",variant:"ghost",onClick:()=>z(),children:[n.jsx(t0,{className:"h-4 w-4 mr-2"}),"Refresh"]}),n.jsxs(me,{size:"sm",variant:"ghost",onClick:()=>o(!c),children:[c?n.jsx(k0,{className:"h-4 w-4 mr-2"}):n.jsx(Oi,{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:h,className:"flex-1 overflow-y-auto p-4 font-mono text-sm terminal-scroll bg-slate-900",children:[w?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((H,L)=>{const J=H.includes("[ERROR]"),q=H.includes("[WARN]");return n.jsxs("div",{className:`leading-6 hover:bg-slate-800/50 px-2 rounded -mx-2 ${J?"text-red-400":q?"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:L+1}),H]},L)}),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(t0,{className:"h-4 w-4 mr-2"}),"Scroll to bottom"]})]})]})},Ay=()=>{const[c,o]=j.useState(null),[d,r]=j.useState(!1),[x,f]=j.useState("all"),[h,v]=j.useState("number"),[p,g]=j.useState("desc"),{addToast:w,selectedProjectId:S,globalModeLoading:z}=rt(),{data:O,loading:k,error:T,refetch:A}=gt(Lb,[S],{enabled:!z}),V=O??[],H=$=>{switch($){case"pass":return n.jsx(as,{className:"h-4 w-4 text-green-500"});case"fail":return n.jsx(fu,{className:"h-4 w-4 text-red-500"});case"pending":return n.jsx(O0,{className:"h-4 w-4 text-amber-500 animate-spin"});default:return n.jsx(Kt,{className:"h-4 w-4 text-slate-500"})}},L=$=>{switch($){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"}},J=$=>$===null?"No review decision yet":$===100?"PR has been approved":$===0?"Changes have been requested":`Review score: ${$}`,q=j.useMemo(()=>V.filter($=>{switch(x){case"needs-work":return $.ciStatus==="fail"||$.reviewScore===0;case"pending":return $.ciStatus==="pending"||$.ciStatus==="unknown"||$.reviewScore===null;case"passed":return $.ciStatus==="pass"&&$.reviewScore===100;case"all":default:return!0}}),[V,x]),C=j.useMemo(()=>[...q].sort((he,je)=>{let De=0;switch(h){case"number":De=he.number-je.number;break;case"title":De=he.title.localeCompare(je.title);break;case"branch":De=he.branch.localeCompare(je.branch);break;case"ciStatus":{const Ve={fail:0,pending:1,unknown:2,pass:3};De=(Ve[he.ciStatus]??2)-(Ve[je.ciStatus]??2);break}case"reviewScore":{const Ve=he.reviewScore??-1,Ye=je.reviewScore??-1;De=Ve-Ye;break}}return p==="asc"?De:-De}),[q,h,p]),G=$=>{h===$?g(p==="asc"?"desc":"asc"):(v($),g("desc"))},F=$=>h!==$?n.jsx(mv,{className:"h-3 w-3 text-slate-600"}):p==="asc"?n.jsx(xv,{className:"h-3 w-3 text-indigo-400"}):n.jsx(ov,{className:"h-3 w-3 text-indigo-400"});if(k)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(Kt,{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(me,{onClick:()=>A(),children:"Retry"})]});const I=async()=>{r(!0);try{const $=await Gb();w({title:"Reviewer Started",message:$.pid?`Started with PID ${$.pid}`:"Reviewer started",type:"success"})}catch($){w({title:"Reviewer Failed",message:$ instanceof Error?$.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(me,{size:"sm",onClick:I,disabled:d,children:[n.jsx(Au,{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:()=>G("number"),children:n.jsxs("div",{className:"flex items-center space-x-1",children:[n.jsx("span",{children:"Title"}),F("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:()=>G("branch"),children:n.jsxs("div",{className:"flex items-center space-x-1",children:[n.jsx("span",{children:"Branch"}),F("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:()=>G("ciStatus"),children:n.jsxs("div",{className:"flex items-center space-x-1",children:[n.jsx("span",{children:"CI Status"}),F("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:()=>G("reviewScore"),children:n.jsxs("div",{className:"flex items-center space-x-1",children:[n.jsx("span",{children:"Review Score"}),F("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($=>n.jsxs("tr",{className:"hover:bg-slate-800/50 cursor-pointer transition-colors",onClick:()=>o(c===$.number?null:$.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:["#",$.number]}),n.jsx("span",{className:"font-medium text-slate-200",children:$.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:$.branch})}),n.jsx("td",{className:"px-6 py-4",children:n.jsxs("div",{className:"flex items-center space-x-2",title:L($.ciStatus),children:[H($.ciStatus),n.jsx("span",{className:"text-sm capitalize text-slate-400",children:$.ciStatus})]})}),n.jsx("td",{className:"px-6 py-4",children:$.reviewScore!==null?n.jsxs("div",{className:"flex items-center space-x-2",title:J($.reviewScore),children:[n.jsx("div",{className:"w-24 h-2 bg-slate-800 rounded-full overflow-hidden",children:n.jsx("div",{className:`h-full ${$.reviewScore>=70?"bg-green-500":"bg-red-500"}`,style:{width:`${$.reviewScore}%`}})}),n.jsx("span",{className:`text-sm font-bold ${$.reviewScore>=70?"text-green-500":"text-red-500"}`,children:$.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:$.url,target:"_blank",rel:"noopener noreferrer",className:"text-slate-500 hover:text-indigo-400",onClick:he=>he.stopPropagation(),children:n.jsx(Eu,{className:"h-4 w-4"})})})]},$.number)),C.length===0&&n.jsx("tr",{children:n.jsx("td",{colSpan:5,className:"px-6 py-12 text-center text-slate-500",children:V.length===0?"No open PRs found.":`No PRs match the "${x}" filter.`})})]})]})}),c&&n.jsx(be,{className:"p-6 bg-slate-900 border-indigo-900/50 animate-in fade-in slide-in-from-top-4 duration-300",children:(()=>{const $=V.find(he=>he.number===c);return $?n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsxs("div",{children:[n.jsx("h3",{className:"font-bold text-slate-200",children:$.title}),n.jsxs("p",{className:"text-sm text-slate-400 mt-1",children:["Branch: ",n.jsx("span",{className:"font-mono",children:$.branch})]})]}),n.jsxs("div",{className:"flex items-center space-x-4",children:[n.jsxs("div",{className:"text-center",title:L($.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:[H($.ciStatus),n.jsx("span",{className:"text-sm capitalize text-slate-300",children:$.ciStatus})]})]}),$.reviewScore!==null&&n.jsxs("div",{className:"text-center",title:J($.reviewScore),children:[n.jsx("div",{className:"text-xs text-slate-500",children:"Review Score"}),n.jsx("div",{className:`text-xl font-bold mt-1 ${$.reviewScore>=70?"text-green-500":"text-red-500"}`,children:$.reviewScore})]})]})]}):null})()})]})},fa=Xe.forwardRef(({className:c="",label:o,checked:d,onChange:r,...x},f)=>{const h=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:h,...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})]})});fa.displayName="Switch";const _y=()=>{const{addToast:c,selectedProjectId:o,globalModeLoading:d}=rt(),[r,x]=j.useState(!1),[f,h]=j.useState(!1),{data:v,loading:p,error:g,refetch:w}=gt(ly,[o],{enabled:!d});j.useEffect(()=>{if(!(v!=null&&v.enabled))return;const H=setInterval(()=>{w()},1e4);return()=>clearInterval(H)},[v==null?void 0:v.enabled,w]);const S=async H=>{h(!0);try{await X0(H),c({title:H?"Scanner Enabled":"Scanner Disabled",message:H?"Roadmap scanner is now active.":"Roadmap scanner has been paused.",type:H?"success":"info"}),w()}catch(L){c({title:"Toggle Failed",message:L instanceof Error?L.message:"Failed to toggle scanner",type:"error"})}finally{h(!1)}},z=async()=>{x(!0);try{const H=await ay();H.created.length>0?c({title:"Scan Complete",message:`Created ${H.created.length} PRD(s): ${H.created.join(", ")}`,type:"success"}):c({title:"Scan Complete",message:"No new PRDs to create.",type:"info"}),H.errors.length>0&&c({title:"Scan Errors",message:H.errors.join("; "),type:"warning"}),w()}catch(H){c({title:"Scan Failed",message:H instanceof Error?H.message:"Failed to scan roadmap",type:"error"})}finally{x(!1)}};if(p)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(g)return n.jsxs("div",{className:"flex flex-col items-center justify-center h-full space-y-4",children:[n.jsx(Kt,{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:g.message}),n.jsx(me,{onClick:()=>w(),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(be,{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(U0,{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,k=My(v.status),T=zy(v.items),A=v.lastScan?Dy(v.lastScan):"Never",V=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(fa,{label:v.enabled?"Enabled":"Disabled",checked:v.enabled,onChange:S,disabled:f}),n.jsxs(me,{onClick:z,loading:r,disabled:!v.enabled||v.status==="complete",children:[n.jsx(Oi,{className:"h-4 w-4 mr-2"}),"Scan Now"]})]})]}),n.jsx(be,{className:`p-6 border-2 ${k.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(k.icon,{className:`h-8 w-8 ${k.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 ${k.textColor}`,children:k.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 ",V," min"]})]}),v.enabled&&v.status==="complete"&&n.jsx("div",{className:"text-emerald-400",children:"Auto-scan paused - all items sliced"})]})]})}),n.jsxs(be,{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(([H,L])=>n.jsxs(be,{className:"p-6",children:[n.jsx("h3",{className:"text-lg font-semibold text-slate-200 mb-4",children:H}),n.jsx("div",{className:"space-y-2",children:L.map(J=>n.jsx(Ry,{item:J},J.hash))})]},H))]})};function Ry({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(lb,{className:"h-4 w-4 text-slate-600 flex-shrink-0"}):d?n.jsx(as,{className:"h-4 w-4 text-emerald-400 flex-shrink-0"}):n.jsx(Qv,{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(Ci,{variant:"neutral",children:"Skipped"}):d?n.jsx(Ci,{variant:"success",children:c.prdFile||"Processed"}):n.jsx(Ci,{variant:"warning",children:"Pending"})})]})}function My(c){switch(c){case"complete":return{label:"Complete",icon:as,textColor:"text-emerald-400",borderColor:"border-emerald-500/20 bg-emerald-500/5"};case"idle":return{label:"Idle",icon:_i,textColor:"text-blue-400",borderColor:"border-blue-500/20 bg-blue-500/5"};case"scanning":return{label:"Scanning",icon:Oi,textColor:"text-indigo-400",borderColor:"border-indigo-500/20 bg-indigo-500/5"};case"disabled":return{label:"Disabled",icon:Kt,textColor:"text-slate-400",borderColor:"border-slate-500/20 bg-slate-500/5"};default:return{label:"No Roadmap",icon:Kt,textColor:"text-slate-500",borderColor:"border-slate-500/20"}}}function zy(c){const o={};for(const d of c){const r=d.section||"General";o[r]||(o[r]=[]),o[r].push(d)}return o}function Dy(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 zu=[{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 uu(c){const o=c.trim().split(/\s+/);if(o.length!==5)return c;const[d,r,x,f,h]=o,v=zu.find(p=>p.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==="*"&&h==="*"?`Daily at ${u0(r)}`:d==="0"&&r!=="*"&&x==="*"&&f==="*"&&h==="1-5"?`Weekdays at ${u0(r)}`:c}function u0(c){const o=parseInt(c,10);return o===0?"12 AM":o<12?`${o} AM`:o===12?"12 PM":`${o-12} PM`}function Oy(c){const o=zu.find(d=>d.value===c);return(o==null?void 0:o.value)??"__custom__"}function Uy(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 ky(c){const o={weekday:"short",month:"short",day:"numeric",hour:"numeric",minute:"2-digit",hour12:!0};return c.toLocaleDateString("en-US",o)}function Hy(c){const o=new Date,d=c.getTime()-o.getTime(),r=Math.floor(d/6e4);return r>=0&&r<30}const By=()=>{const{addToast:c,selectedProjectId:o,globalModeLoading:d}=rt(),[r,x]=j.useState(!1),[f,h]=j.useState(!1),[v,p]=j.useState({executorSchedule:"",reviewerSchedule:"",isEditing:!1}),{data:g,loading:w,error:S,refetch:z}=gt(Y0,[o],{enabled:!d}),{data:O,loading:k,refetch:T}=gt(Ru,[o],{enabled:!d});j.useEffect(()=>{const I=setInterval(()=>{z()},3e4);return()=>clearInterval(I)},[z]),j.useEffect(()=>{O&&!v.isEditing&&p({executorSchedule:O.cronSchedule,reviewerSchedule:O.reviewerSchedule,isEditing:!1})},[O,v.isEditing]);const A=async()=>{if(g){x(!0);try{g.paused?(await s0(),c({title:"Schedule Resumed",message:"Cron schedules have been reactivated.",type:"success"})):(await Qb(),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)}}},V=()=>{O&&p({executorSchedule:O.cronSchedule,reviewerSchedule:O.reviewerSchedule,isEditing:!0})},H=()=>{O&&p({executorSchedule:O.cronSchedule,reviewerSchedule:O.reviewerSchedule,isEditing:!1})},L=async()=>{if(O){h(!0);try{await Mi({cronSchedule:v.executorSchedule,reviewerSchedule:v.reviewerSchedule}),await s0(),c({title:"Schedule Updated",message:"Cron schedules have been saved and installed.",type:"success"}),p(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{h(!1)}}},J=(I,$)=>{if(!I)return n.jsx("span",{className:"text-slate-500",children:"Not scheduled"});const he=new Date(I),je=Hy(he);return n.jsxs("div",{className:"flex items-center space-x-2",children:[je&&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:Uy(he)}),n.jsxs("span",{className:"text-slate-500 ml-2",children:["(",ky(he),")"]})]})]})},q=(I,$,he,je)=>{const De=Oy($),Ve=De==="__custom__";return n.jsxs("div",{className:`space-y-3 ${je?"opacity-50 pointer-events-none":""}`,children:[n.jsx("div",{className:"flex items-center space-x-3",children:n.jsx(Xl,{label:`${I} Preset`,options:zu,value:De,onChange:Ye=>{Ye!=="__custom__"&&he(Ye)},className:"flex-1"})}),Ve&&n.jsx(Ce,{label:"Custom Cron Expression",value:$,onChange:Ye=>he(Ye.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:uu($)})]})]})};if(w||k)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(S||!g||!O)return n.jsxs("div",{className:"flex flex-col items-center justify-center h-full space-y-4",children:[n.jsx(Kt,{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:(S==null?void 0:S.message)||"Unknown error"}),n.jsx(me,{onClick:()=>{z(),T()},children:"Retry"})]});const C=g.paused,G=C?"bg-amber-500/10 text-amber-400 border-amber-500/20":"bg-green-500/10 text-green-400 border-green-500/20",F=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(be,{className:`p-6 border-2 ${G}`,children:n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsxs("div",{className:"flex items-center space-x-4",children:[n.jsx(_i,{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:F})]})]}),n.jsx(me,{variant:C?"primary":"outline",size:"lg",onClick:A,loading:r,children:C?n.jsxs(n.Fragment,{children:[n.jsx(Oi,{className:"h-5 w-5 mr-2"}),"Resume"]}):n.jsxs(n.Fragment,{children:[n.jsx(k0,{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(be,{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(me,{variant:"ghost",size:"sm",onClick:V,children:[n.jsx(xb,{className:"h-4 w-4 mr-1"}),"Edit"]})]}),v.isEditing?q("Executor",v.executorSchedule,I=>p($=>({...$,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:uu(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"}),J(g.executor.nextRun,O.cronSchedule)]}),n.jsxs("div",{className:`flex items-center space-x-2 text-sm ${g.executor.installed?"text-green-400":"text-amber-400"}`,children:[n.jsx(Pa,{className:"h-4 w-4"}),n.jsx("span",{children:g.executor.installed?"Installed":"Not installed"})]})]})})]}),n.jsxs(be,{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?q("Reviewer",v.reviewerSchedule,I=>p($=>({...$,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:uu(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"}),J(g.reviewer.nextRun,O.reviewerSchedule)]}),n.jsxs("div",{className:`flex items-center space-x-2 text-sm ${g.reviewer.installed?"text-green-400":"text-amber-400"}`,children:[n.jsx(Pa,{className:"h-4 w-4"}),n.jsx("span",{children:g.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(be,{className:"p-6",children:[n.jsxs("div",{className:"flex items-center space-x-2 mb-4",children:[n.jsx(Ti,{className:"h-5 w-5 text-slate-400"}),n.jsx("h3",{className:"text-lg font-semibold text-slate-200",children:"Active Crontab Entries"})]}),g.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:g.entries.map((I,$)=>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},$))})]}),v.isEditing&&n.jsxs("div",{className:"flex items-center justify-end space-x-4 pt-4 border-t border-slate-800",children:[n.jsx(me,{variant:"ghost",onClick:H,children:"Cancel"}),n.jsxs(me,{onClick:L,loading:f,children:[n.jsx(Pa,{className:"h-4 w-4 mr-2"}),"Save & Install"]})]})]})},Ly=({tabs:c,activeTab:o,onChange:d,className:r=""})=>{var p,g;const[x,f]=Xe.useState((p=c[0])==null?void 0:p.id),h=o||x,v=w=>{d?d(w):f(w)};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(w=>n.jsx("button",{onClick:()=>v(w.id),className:`
|
|
446
|
+
whitespace-nowrap py-4 px-1 border-b-2 font-medium text-sm transition-all duration-200
|
|
447
|
+
${h===w.id?"border-indigo-500 text-indigo-400":"border-transparent text-slate-500 hover:text-slate-300 hover:border-slate-700"}
|
|
448
|
+
`,children:w.label},w.id))})}),n.jsx("div",{className:"flex-1 animate-in fade-in slide-in-from-bottom-2 duration-300",children:(g=c.find(w=>w.id===h))==null?void 0:g.content})]})},qy={enabled:!1,botToken:"",channels:{eng:"",prs:"",incidents:"",releases:""},autoCreateProjectChannels:!1,discussionEnabled:!1},o0=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??qy}),Yy=c=>["TOKEN","SECRET","KEY","PASSWORD","AUTH","API_KEY"].some(d=>c.toUpperCase().includes(d)),Gy=({value:c,isSensitive:o})=>{const[d,r]=Xe.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(mu,{className:"h-4 w-4"}):n.jsx(Ri,{className:"h-4 w-4"})})]}):n.jsx("span",{className:"text-sm text-slate-300 font-mono truncate max-w-xs",children:c})},Qy=({envVars:c,onChange:o})=>{const[d,r]=Xe.useState(""),[x,f]=Xe.useState(""),[h,v]=Xe.useState(null),[p,g]=Xe.useState(""),w=()=>{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("")}},S=A=>{const V={...c};delete V[A],o(V)},z=A=>{v(A),g(c[A])},O=()=>{h&&(o({...c,[h]:p}),v(null),g(""))},k=()=>{v(null),g("")},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,V])=>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}),h===A?n.jsxs("div",{className:"flex items-center gap-2 flex-1",children:[n.jsx("input",{type:"text",value:p,onChange:H=>g(H.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(Pa,{className:"h-4 w-4"})}),n.jsx("button",{type:"button",onClick:k,className:"p-1 text-slate-400 hover:text-slate-300",children:n.jsx(pl,{className:"h-4 w-4"})})]}):n.jsx(Gy,{value:V,isSensitive:Yy(A)})]}),h!==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(Tu,{className:"h-4 w-4"})}),n.jsx("button",{type:"button",onClick:()=>S(A),className:"p-1 text-red-400 hover:text-red-300",children:n.jsx(_u,{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(me,{onClick:w,disabled:!d.trim(),children:[n.jsx(Vl,{className:"h-4 w-4 mr-1"}),"Add"]})]})]})},Xy=({notifications:c,onChange:o})=>{const[d,r]=Xe.useState(null),[x,f]=Xe.useState(!1),[h,v]=Xe.useState({type:"slack",url:"",events:[]}),p=[{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"}],g=()=>{o({webhooks:[...c.webhooks,h]}),v({type:"slack",url:"",events:[]}),f(!1)},w=(k,T)=>{const A=[...c.webhooks];A[k]=T,o({webhooks:A})},S=k=>{o({webhooks:c.webhooks.filter((T,A)=>A!==k)})},z=(k,T)=>k.includes(T)?k.filter(A=>A!==T):[...k,T],O=({webhook:k,onChange:T,onSave:A,onCancel:V,isNew:H})=>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:k.type,onChange:L=>{const J=L;T(J==="telegram"?{type:J,botToken:"",chatId:"",events:k.events}:{type:J,url:"",events:k.events})},options:[{label:"Slack",value:"slack"},{label:"Discord",value:"discord"},{label:"Telegram",value:"telegram"}]}),k.type==="telegram"?n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"relative",children:n.jsx(Ce,{label:"Bot Token",type:"password",value:k.botToken||"",onChange:L=>T({...k,botToken:L.target.value}),placeholder:"123456789:ABCdefGHIjklMNOpqrsTUVwxyz"})}),n.jsx(Ce,{label:"Chat ID",value:k.chatId||"",onChange:L=>T({...k,chatId:L.target.value}),placeholder:"123456789"})]}):n.jsx("div",{className:"md:col-span-2",children:n.jsx(Ce,{label:"Webhook URL",type:"password",value:k.url||"",onChange:L=>T({...k,url:L.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:p.map(L=>n.jsx("button",{type:"button",onClick:()=>T({...k,events:z(k.events,L.value)}),className:`px-3 py-1.5 rounded-md text-sm transition-colors ${k.events.includes(L.value)?"bg-indigo-600 text-white":"bg-slate-800 text-slate-400 hover:bg-slate-700"}`,children:L.label},L.value))})]}),n.jsxs("div",{className:"flex justify-end gap-2",children:[n.jsx(me,{variant:"ghost",onClick:V,children:"Cancel"}),n.jsx(me,{onClick:A,disabled:k.events.length===0||(k.type==="telegram"?!k.botToken||!k.chatId:!k.url),children:H?"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((k,T)=>n.jsx("div",{children:d===T?n.jsx(O,{webhook:k,onChange:A=>w(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:k.type}),k.type==="telegram"&&n.jsxs("span",{className:"text-xs text-slate-500",children:["Chat ID: ",k.chatId]})]}),n.jsx("div",{className:"flex flex-wrap gap-1",children:k.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(Tu,{className:"h-4 w-4"})}),n.jsx("button",{type:"button",onClick:()=>S(T),className:"p-2 text-red-400 hover:text-red-300",children:n.jsx(_u,{className:"h-4 w-4"})})]})]})},T))}),x?n.jsx(O,{webhook:h,onChange:v,onSave:g,onCancel:()=>f(!1),isNew:!0}):n.jsxs(me,{variant:"ghost",onClick:()=>f(!0),children:[n.jsx(Vl,{className:"h-4 w-4 mr-2"}),"Add Webhook"]})]})},d0=({label:c,value:o,onChange:d,placeholder:r,helpText:x})=>{const[f,h]=Xe.useState(""),v=()=>{f.trim()&&!o.includes(f.trim())&&(d([...o,f.trim()]),h(""))},p=w=>{d(o.filter(S=>S!==w))},g=w=>{w.key==="Enter"&&(w.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(w=>n.jsxs("span",{className:"inline-flex items-center gap-1 px-2 py-1 bg-slate-800 rounded text-sm text-slate-300",children:[w,n.jsx("button",{type:"button",onClick:()=>p(w),className:"text-slate-500 hover:text-red-400",children:n.jsx(pl,{className:"h-3 w-3"})})]},w))}),n.jsxs("div",{className:"flex gap-2",children:[n.jsx("input",{type:"text",value:f,onChange:w=>h(w.target.value),onKeyDown:g,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(me,{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})]})},Vy=()=>{const{addToast:c,projectName:o,selectedProjectId:d,globalModeLoading:r}=rt(),[x,f]=Xe.useState(!1),[h,v]=Xe.useState(null),{data:p,loading:g,error:w,refetch:S}=gt(Ru,[d],{enabled:!r}),{data:z,loading:O,refetch:k}=gt(Yb,[d],{enabled:!r}),T=z??[];Xe.useEffect(()=>{p&&v(o0(p))},[p]);const A=(q,C)=>{v(G=>G&&{...G,[q]:C})},V=async()=>{if(h){f(!0);try{await Mi({provider:h.provider,defaultBranch:h.defaultBranch,branchPrefix:h.branchPrefix,branchPatterns:h.branchPatterns,reviewerEnabled:h.reviewerEnabled,minReviewScore:h.minReviewScore,maxRuntime:h.maxRuntime,reviewerMaxRuntime:h.reviewerMaxRuntime,maxLogSize:h.maxLogSize,cronScheduleOffset:h.cronScheduleOffset,maxRetries:h.maxRetries,providerEnv:h.providerEnv,notifications:h.notifications,prdPriority:h.prdPriority,roadmapScanner:h.roadmapScanner,templatesDir:h.templatesDir,slack:h.slack}),c({title:"Settings Saved",message:"Configuration updated successfully.",type:"success"}),S(),k()}catch(q){c({title:"Save Failed",message:q instanceof Error?q.message:"Failed to save configuration",type:"error"})}finally{f(!1)}}},H=()=>{p&&(v(o0(p)),c({title:"Reset Complete",message:"Unsaved changes were discarded.",type:"info"}))},L=async q=>{try{const C=await X0(q);A("roadmapScanner",C.roadmapScanner),c({title:q?"Roadmap Scanner Enabled":"Roadmap Scanner Disabled",message:`Roadmap scanner has been ${q?"enabled":"disabled"}.`,type:"success"})}catch(C){c({title:"Toggle Failed",message:C instanceof Error?C.message:"Failed to toggle roadmap scanner",type:"error"})}};if(g||!h)return n.jsx("div",{className:"flex items-center justify-center h-full",children:n.jsx("div",{className:"text-slate-400",children:"Loading settings..."})});if(w)return n.jsxs("div",{className:"flex flex-col items-center justify-center h-full space-y-4",children:[n.jsx(Kt,{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:w.message}),n.jsx(me,{onClick:()=>S(),children:"Retry"})]});const J=[{id:"general",label:"General",content:n.jsxs(be,{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(Ce,{label:"Project Name",value:o,disabled:!0}),n.jsx(Xl,{label:"Provider",value:h.provider,onChange:q=>A("provider",q),options:[{label:"Anthropic (Claude)",value:"claude"},{label:"OpenAI (Codex)",value:"codex"}]}),n.jsx(Ce,{label:"Default Branch",value:h.defaultBranch,onChange:q=>A("defaultBranch",q.target.value)}),n.jsx(Ce,{label:"Branch Prefix",value:h.branchPrefix,onChange:q=>A("branchPrefix",q.target.value)}),n.jsx("div",{className:"md:col-span-2",children:n.jsx(fa,{label:"Enable Automated Reviews",checked:h.reviewerEnabled,onChange:q=>A("reviewerEnabled",q)})})]})]})},{id:"runtime",label:"Runtime",content:n.jsxs(be,{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:h.minReviewScore,onChange:q=>A("minReviewScore",Number(q.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:h.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(Ce,{label:"Max Runtime (Executor)",type:"number",value:String(h.maxRuntime),onChange:q=>A("maxRuntime",Number(q.target.value||0)),rightIcon:n.jsx("span",{className:"text-xs",children:"sec"})}),n.jsx(Ce,{label:"Max Runtime (Reviewer)",type:"number",value:String(h.reviewerMaxRuntime),onChange:q=>A("reviewerMaxRuntime",Number(q.target.value||0)),rightIcon:n.jsx("span",{className:"text-xs",children:"sec"})}),n.jsx(Ce,{label:"Max Log Size",type:"number",value:String(h.maxLogSize),onChange:q=>A("maxLogSize",Number(q.target.value||0)),rightIcon:n.jsx("span",{className:"text-xs",children:"bytes"})})]})]})},{id:"env",label:"Provider Env",content:n.jsxs(be,{className:"p-6",children:[n.jsx("h3",{className:"text-lg font-medium text-slate-200 mb-2",children:"Provider Environment Variables"}),n.jsx(Qy,{envVars:h.providerEnv,onChange:q=>A("providerEnv",q)})]})},{id:"notifications",label:"Notifications",content:n.jsxs(be,{className:"p-6",children:[n.jsx("h3",{className:"text-lg font-medium text-slate-200 mb-2",children:"Notification Webhooks"}),n.jsx(Xy,{notifications:h.notifications,onChange:q=>A("notifications",q)})]})},{id:"slack",label:"Slack Bot",content:n.jsxs(be,{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(fa,{checked:h.slack.enabled,onChange:q=>A("slack",{...h.slack,enabled:q})})]}),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(Ce,{label:"Bot Token (xoxb-...)",type:"password",value:h.slack.botToken,onChange:q=>A("slack",{...h.slack,botToken:q.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(Ce,{label:"#eng Channel ID",value:h.slack.channels.eng,onChange:q=>A("slack",{...h.slack,channels:{...h.slack.channels,eng:q.target.value}}),placeholder:"C01ABCDEF"}),n.jsx(Ce,{label:"#prs Channel ID",value:h.slack.channels.prs,onChange:q=>A("slack",{...h.slack,channels:{...h.slack.channels,prs:q.target.value}}),placeholder:"C01ABCDEF"}),n.jsx(Ce,{label:"#incidents Channel ID",value:h.slack.channels.incidents,onChange:q=>A("slack",{...h.slack,channels:{...h.slack.channels,incidents:q.target.value}}),placeholder:"C01ABCDEF"}),n.jsx(Ce,{label:"#releases Channel ID",value:h.slack.channels.releases,onChange:q=>A("slack",{...h.slack,channels:{...h.slack.channels,releases:q.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(fa,{label:"Auto-create project channels",checked:h.slack.autoCreateProjectChannels,onChange:q=>A("slack",{...h.slack,autoCreateProjectChannels:q})}),n.jsx(fa,{label:"Enable agent deliberation",checked:h.slack.discussionEnabled,onChange:q=>A("slack",{...h.slack,discussionEnabled:q})})]})]})},{id:"roadmap",label:"Roadmap",content:n.jsxs(be,{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(fa,{checked:h.roadmapScanner.enabled,onChange:L})]}),h.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(Ce,{label:"Roadmap Path",value:h.roadmapScanner.roadmapPath,onChange:q=>A("roadmapScanner",{...h.roadmapScanner,roadmapPath:q.target.value})}),n.jsx(Ce,{label:"Auto Scan Interval",type:"number",value:String(h.roadmapScanner.autoScanInterval),onChange:q=>A("roadmapScanner",{...h.roadmapScanner,autoScanInterval:Math.max(30,Number(q.target.value||30))}),rightIcon:n.jsx("span",{className:"text-xs",children:"sec (min 30)"})})]})]})},{id:"advanced",label:"Advanced",content:n.jsxs(be,{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(Ce,{label:"Templates Directory",value:h.templatesDir,onChange:q=>A("templatesDir",q.target.value),helperText:"Directory for custom template overrides"}),n.jsx(Ce,{label:"Cron Schedule Offset",type:"number",min:"0",max:"59",value:String(h.cronScheduleOffset),onChange:q=>{const C=Math.min(59,Math.max(0,Number(q.target.value||0)));A("cronScheduleOffset",C)},helperText:"Minutes offset (0-59) for cron schedules"}),n.jsx(Ce,{label:"Max Retries",type:"number",min:"1",value:String(h.maxRetries),onChange:q=>{const C=Math.max(1,Number(q.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(d0,{label:"Branch Patterns",value:h.branchPatterns,onChange:q=>A("branchPatterns",q),placeholder:"e.g., feat/",helpText:"Patterns to match for PR reviews"}),n.jsx(d0,{label:"PRD Priority",value:h.prdPriority,onChange:q=>A("prdPriority",q),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(Ly,{tabs:J}),n.jsxs("div",{className:"flex items-center justify-end space-x-4 pt-6 mt-6 border-t border-slate-800",children:[n.jsxs(me,{variant:"ghost",className:"text-slate-400 hover:text-slate-300",onClick:H,children:[n.jsx(hu,{className:"h-4 w-4 mr-2"}),"Reset"]}),n.jsxs(me,{onClick:V,loading:x,children:[n.jsx(ub,{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(D0,{className:"h-5 w-5 mr-2 text-indigo-500"}),"System Health"]}),n.jsx(be,{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((q,C)=>{const G=q.status==="pass",F=q.status==="warn",I=G?"bg-green-500/10 text-green-400 border-green-500/20":F?"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:q.name}),n.jsx("p",{className:"text-xs text-slate-500",children:q.detail})]}),n.jsx("span",{className:`inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium border ${I}`,children:q.status.toUpperCase()})]},`${q.name}-${C}`)})})]})]})},Zy=()=>(uy(),n.jsx(Kp,{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(sy,{}),n.jsxs("div",{className:"flex-1 flex flex-col min-w-0 z-10",children:[n.jsx(iy,{}),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(wp,{children:[n.jsx(Qt,{path:"/",element:n.jsx(Cy,{})}),n.jsx(Qt,{path:"/prs",element:n.jsx(Ay,{})}),n.jsx(Qt,{path:"/board",element:n.jsx(Sy,{})}),n.jsx(Qt,{path:"/scheduling",element:n.jsx(By,{})}),n.jsx(Qt,{path:"/logs",element:n.jsx(Ty,{})}),n.jsx(Qt,{path:"/roadmap",element:n.jsx(_y,{})}),n.jsx(Qt,{path:"/integrations",element:n.jsx(Ey,{})}),n.jsx(Qt,{path:"/agents",element:n.jsx(vy,{})}),n.jsx(Qt,{path:"/settings",element:n.jsx(Vy,{})}),n.jsx(Qt,{path:"*",element:n.jsx(Np,{to:"/",replace:!0})})]})})})]}),n.jsx(ry,{})]})})),Z0=document.getElementById("root");if(!Z0)throw new Error("Could not find root element to mount to");const $y=Eg.createRoot(Z0);$y.render(n.jsx(Xe.StrictMode,{children:n.jsx(Zy,{})}));
|