@jonit-dev/night-watch-cli 1.7.88 → 1.7.90

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,370 @@
1
+ (function(){const c=document.createElement("link").relList;if(c&&c.supports&&c.supports("modulepreload"))return;for(const m of document.querySelectorAll('link[rel="modulepreload"]'))r(m);new MutationObserver(m=>{for(const x of m)if(x.type==="childList")for(const f of x.addedNodes)f.tagName==="LINK"&&f.rel==="modulepreload"&&r(f)}).observe(document,{childList:!0,subtree:!0});function d(m){const x={};return m.integrity&&(x.integrity=m.integrity),m.referrerPolicy&&(x.referrerPolicy=m.referrerPolicy),m.crossOrigin==="use-credentials"?x.credentials="include":m.crossOrigin==="anonymous"?x.credentials="omit":x.credentials="same-origin",x}function r(m){if(m.ep)return;m.ep=!0;const x=d(m);fetch(m.href,x)}})();function Tc(u){return u&&u.__esModule&&Object.prototype.hasOwnProperty.call(u,"default")?u.default:u}var cc={exports:{}},os={};/**
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 Gm;function Ep(){if(Gm)return os;Gm=1;var u=Symbol.for("react.transitional.element"),c=Symbol.for("react.fragment");function d(r,m,x){var f=null;if(x!==void 0&&(f=""+x),m.key!==void 0&&(f=""+m.key),"key"in m){x={};for(var v in m)v!=="key"&&(x[v]=m[v])}else x=m;return m=x.ref,{$$typeof:u,type:r,key:f,ref:m!==void 0?m:null,props:x}}return os.Fragment=c,os.jsx=d,os.jsxs=d,os}var Qm;function wp(){return Qm||(Qm=1,cc.exports=Ep()),cc.exports}var s=wp(),oc={exports:{}},fe={};/**
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 Vm;function Tp(){if(Vm)return fe;Vm=1;var u=Symbol.for("react.transitional.element"),c=Symbol.for("react.portal"),d=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),m=Symbol.for("react.profiler"),x=Symbol.for("react.consumer"),f=Symbol.for("react.context"),v=Symbol.for("react.forward_ref"),b=Symbol.for("react.suspense"),p=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),y=Symbol.for("react.activity"),D=Symbol.iterator;function z(N){return N===null||typeof N!="object"?null:(N=D&&N[D]||N["@@iterator"],typeof N=="function"?N:null)}var U={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_=Object.assign,Y={};function Q(N,L,J){this.props=N,this.context=L,this.refs=Y,this.updater=J||U}Q.prototype.isReactComponent={},Q.prototype.setState=function(N,L){if(typeof N!="object"&&typeof N!="function"&&N!=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,N,L,"setState")},Q.prototype.forceUpdate=function(N){this.updater.enqueueForceUpdate(this,N,"forceUpdate")};function B(){}B.prototype=Q.prototype;function S(N,L,J){this.props=N,this.context=L,this.refs=Y,this.updater=J||U}var le=S.prototype=new B;le.constructor=S,_(le,Q.prototype),le.isPureReactComponent=!0;var Z=Array.isArray;function $(){}var P={H:null,A:null,T:null,S:null},ie=Object.prototype.hasOwnProperty;function ue(N,L,J){var I=J.ref;return{$$typeof:u,type:N,key:L,ref:I!==void 0?I:null,props:J}}function X(N,L){return ue(N.type,L,N.props)}function pe(N){return typeof N=="object"&&N!==null&&N.$$typeof===u}function ye(N){var L={"=":"=0",":":"=2"};return"$"+N.replace(/[=:]/g,function(J){return L[J]})}var we=/\/+/g;function F(N,L){return typeof N=="object"&&N!==null&&N.key!=null?ye(""+N.key):L.toString(36)}function ct(N){switch(N.status){case"fulfilled":return N.value;case"rejected":throw N.reason;default:switch(typeof N.status=="string"?N.then($,$):(N.status="pending",N.then(function(L){N.status==="pending"&&(N.status="fulfilled",N.value=L)},function(L){N.status==="pending"&&(N.status="rejected",N.reason=L)})),N.status){case"fulfilled":return N.value;case"rejected":throw N.reason}}throw N}function q(N,L,J,I,ce){var me=typeof N;(me==="undefined"||me==="boolean")&&(N=null);var Ne=!1;if(N===null)Ne=!0;else switch(me){case"bigint":case"string":case"number":Ne=!0;break;case"object":switch(N.$$typeof){case u:case c:Ne=!0;break;case g:return Ne=N._init,q(Ne(N._payload),L,J,I,ce)}}if(Ne)return ce=ce(N),Ne=I===""?"."+F(N,0):I,Z(ce)?(J="",Ne!=null&&(J=Ne.replace(we,"$&/")+"/"),q(ce,L,J,"",function(tl){return tl})):ce!=null&&(pe(ce)&&(ce=X(ce,J+(ce.key==null||N&&N.key===ce.key?"":(""+ce.key).replace(we,"$&/")+"/")+Ne)),L.push(ce)),1;Ne=0;var et=I===""?".":I+":";if(Z(N))for(var Ye=0;Ye<N.length;Ye++)I=N[Ye],me=et+F(I,Ye),Ne+=q(I,L,J,me,ce);else if(Ye=z(N),typeof Ye=="function")for(N=Ye.call(N),Ye=0;!(I=N.next()).done;)I=I.value,me=et+F(I,Ye++),Ne+=q(I,L,J,me,ce);else if(me==="object"){if(typeof N.then=="function")return q(ct(N),L,J,I,ce);throw L=String(N),Error("Objects are not valid as a React child (found: "+(L==="[object Object]"?"object with keys {"+Object.keys(N).join(", ")+"}":L)+"). If you meant to render a collection of children, use an array instead.")}return Ne}function K(N,L,J){if(N==null)return N;var I=[],ce=0;return q(N,I,"","",function(me){return L.call(J,me,ce++)}),I}function ae(N){if(N._status===-1){var L=N._result;L=L(),L.then(function(J){(N._status===0||N._status===-1)&&(N._status=1,N._result=J)},function(J){(N._status===0||N._status===-1)&&(N._status=2,N._result=J)}),N._status===-1&&(N._status=0,N._result=L)}if(N._status===1)return N._result.default;throw N._result}var Re=typeof reportError=="function"?reportError:function(N){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var L=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof N=="object"&&N!==null&&typeof N.message=="string"?String(N.message):String(N),error:N});if(!window.dispatchEvent(L))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",N);return}console.error(N)},_e={map:K,forEach:function(N,L,J){K(N,function(){L.apply(this,arguments)},J)},count:function(N){var L=0;return K(N,function(){L++}),L},toArray:function(N){return K(N,function(L){return L})||[]},only:function(N){if(!pe(N))throw Error("React.Children.only expected to receive a single React element child.");return N}};return fe.Activity=y,fe.Children=_e,fe.Component=Q,fe.Fragment=d,fe.Profiler=m,fe.PureComponent=S,fe.StrictMode=r,fe.Suspense=b,fe.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=P,fe.__COMPILER_RUNTIME={__proto__:null,c:function(N){return P.H.useMemoCache(N)}},fe.cache=function(N){return function(){return N.apply(null,arguments)}},fe.cacheSignal=function(){return null},fe.cloneElement=function(N,L,J){if(N==null)throw Error("The argument must be a React element, but you passed "+N+".");var I=_({},N.props),ce=N.key;if(L!=null)for(me in L.key!==void 0&&(ce=""+L.key),L)!ie.call(L,me)||me==="key"||me==="__self"||me==="__source"||me==="ref"&&L.ref===void 0||(I[me]=L[me]);var me=arguments.length-2;if(me===1)I.children=J;else if(1<me){for(var Ne=Array(me),et=0;et<me;et++)Ne[et]=arguments[et+2];I.children=Ne}return ue(N.type,ce,I)},fe.createContext=function(N){return N={$$typeof:f,_currentValue:N,_currentValue2:N,_threadCount:0,Provider:null,Consumer:null},N.Provider=N,N.Consumer={$$typeof:x,_context:N},N},fe.createElement=function(N,L,J){var I,ce={},me=null;if(L!=null)for(I in L.key!==void 0&&(me=""+L.key),L)ie.call(L,I)&&I!=="key"&&I!=="__self"&&I!=="__source"&&(ce[I]=L[I]);var Ne=arguments.length-2;if(Ne===1)ce.children=J;else if(1<Ne){for(var et=Array(Ne),Ye=0;Ye<Ne;Ye++)et[Ye]=arguments[Ye+2];ce.children=et}if(N&&N.defaultProps)for(I in Ne=N.defaultProps,Ne)ce[I]===void 0&&(ce[I]=Ne[I]);return ue(N,me,ce)},fe.createRef=function(){return{current:null}},fe.forwardRef=function(N){return{$$typeof:v,render:N}},fe.isValidElement=pe,fe.lazy=function(N){return{$$typeof:g,_payload:{_status:-1,_result:N},_init:ae}},fe.memo=function(N,L){return{$$typeof:p,type:N,compare:L===void 0?null:L}},fe.startTransition=function(N){var L=P.T,J={};P.T=J;try{var I=N(),ce=P.S;ce!==null&&ce(J,I),typeof I=="object"&&I!==null&&typeof I.then=="function"&&I.then($,Re)}catch(me){Re(me)}finally{L!==null&&J.types!==null&&(L.types=J.types),P.T=L}},fe.unstable_useCacheRefresh=function(){return P.H.useCacheRefresh()},fe.use=function(N){return P.H.use(N)},fe.useActionState=function(N,L,J){return P.H.useActionState(N,L,J)},fe.useCallback=function(N,L){return P.H.useCallback(N,L)},fe.useContext=function(N){return P.H.useContext(N)},fe.useDebugValue=function(){},fe.useDeferredValue=function(N,L){return P.H.useDeferredValue(N,L)},fe.useEffect=function(N,L){return P.H.useEffect(N,L)},fe.useEffectEvent=function(N){return P.H.useEffectEvent(N)},fe.useId=function(){return P.H.useId()},fe.useImperativeHandle=function(N,L,J){return P.H.useImperativeHandle(N,L,J)},fe.useInsertionEffect=function(N,L){return P.H.useInsertionEffect(N,L)},fe.useLayoutEffect=function(N,L){return P.H.useLayoutEffect(N,L)},fe.useMemo=function(N,L){return P.H.useMemo(N,L)},fe.useOptimistic=function(N,L){return P.H.useOptimistic(N,L)},fe.useReducer=function(N,L,J){return P.H.useReducer(N,L,J)},fe.useRef=function(N){return P.H.useRef(N)},fe.useState=function(N){return P.H.useState(N)},fe.useSyncExternalStore=function(N,L,J){return P.H.useSyncExternalStore(N,L,J)},fe.useTransition=function(){return P.H.useTransition()},fe.version="19.2.4",fe}var Xm;function Cc(){return Xm||(Xm=1,oc.exports=Tp()),oc.exports}var w=Cc();const be=Tc(w);var dc={exports:{}},ds={},fc={exports:{}},mc={};/**
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 Zm;function Cp(){return Zm||(Zm=1,(function(u){function c(q,K){var ae=q.length;q.push(K);e:for(;0<ae;){var Re=ae-1>>>1,_e=q[Re];if(0<m(_e,K))q[Re]=K,q[ae]=_e,ae=Re;else break e}}function d(q){return q.length===0?null:q[0]}function r(q){if(q.length===0)return null;var K=q[0],ae=q.pop();if(ae!==K){q[0]=ae;e:for(var Re=0,_e=q.length,N=_e>>>1;Re<N;){var L=2*(Re+1)-1,J=q[L],I=L+1,ce=q[I];if(0>m(J,ae))I<_e&&0>m(ce,J)?(q[Re]=ce,q[I]=ae,Re=I):(q[Re]=J,q[L]=ae,Re=L);else if(I<_e&&0>m(ce,ae))q[Re]=ce,q[I]=ae,Re=I;else break e}}return K}function m(q,K){var ae=q.sortIndex-K.sortIndex;return ae!==0?ae:q.id-K.id}if(u.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var x=performance;u.unstable_now=function(){return x.now()}}else{var f=Date,v=f.now();u.unstable_now=function(){return f.now()-v}}var b=[],p=[],g=1,y=null,D=3,z=!1,U=!1,_=!1,Y=!1,Q=typeof setTimeout=="function"?setTimeout:null,B=typeof clearTimeout=="function"?clearTimeout:null,S=typeof setImmediate<"u"?setImmediate:null;function le(q){for(var K=d(p);K!==null;){if(K.callback===null)r(p);else if(K.startTime<=q)r(p),K.sortIndex=K.expirationTime,c(b,K);else break;K=d(p)}}function Z(q){if(_=!1,le(q),!U)if(d(b)!==null)U=!0,$||($=!0,ye());else{var K=d(p);K!==null&&ct(Z,K.startTime-q)}}var $=!1,P=-1,ie=5,ue=-1;function X(){return Y?!0:!(u.unstable_now()-ue<ie)}function pe(){if(Y=!1,$){var q=u.unstable_now();ue=q;var K=!0;try{e:{U=!1,_&&(_=!1,B(P),P=-1),z=!0;var ae=D;try{t:{for(le(q),y=d(b);y!==null&&!(y.expirationTime>q&&X());){var Re=y.callback;if(typeof Re=="function"){y.callback=null,D=y.priorityLevel;var _e=Re(y.expirationTime<=q);if(q=u.unstable_now(),typeof _e=="function"){y.callback=_e,le(q),K=!0;break t}y===d(b)&&r(b),le(q)}else r(b);y=d(b)}if(y!==null)K=!0;else{var N=d(p);N!==null&&ct(Z,N.startTime-q),K=!1}}break e}finally{y=null,D=ae,z=!1}K=void 0}}finally{K?ye():$=!1}}}var ye;if(typeof S=="function")ye=function(){S(pe)};else if(typeof MessageChannel<"u"){var we=new MessageChannel,F=we.port2;we.port1.onmessage=pe,ye=function(){F.postMessage(null)}}else ye=function(){Q(pe,0)};function ct(q,K){P=Q(function(){q(u.unstable_now())},K)}u.unstable_IdlePriority=5,u.unstable_ImmediatePriority=1,u.unstable_LowPriority=4,u.unstable_NormalPriority=3,u.unstable_Profiling=null,u.unstable_UserBlockingPriority=2,u.unstable_cancelCallback=function(q){q.callback=null},u.unstable_forceFrameRate=function(q){0>q||125<q?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):ie=0<q?Math.floor(1e3/q):5},u.unstable_getCurrentPriorityLevel=function(){return D},u.unstable_next=function(q){switch(D){case 1:case 2:case 3:var K=3;break;default:K=D}var ae=D;D=K;try{return q()}finally{D=ae}},u.unstable_requestPaint=function(){Y=!0},u.unstable_runWithPriority=function(q,K){switch(q){case 1:case 2:case 3:case 4:case 5:break;default:q=3}var ae=D;D=q;try{return K()}finally{D=ae}},u.unstable_scheduleCallback=function(q,K,ae){var Re=u.unstable_now();switch(typeof ae=="object"&&ae!==null?(ae=ae.delay,ae=typeof ae=="number"&&0<ae?Re+ae:Re):ae=Re,q){case 1:var _e=-1;break;case 2:_e=250;break;case 5:_e=1073741823;break;case 4:_e=1e4;break;default:_e=5e3}return _e=ae+_e,q={id:g++,callback:K,priorityLevel:q,startTime:ae,expirationTime:_e,sortIndex:-1},ae>Re?(q.sortIndex=ae,c(p,q),d(b)===null&&q===d(p)&&(_?(B(P),P=-1):_=!0,ct(Z,ae-Re))):(q.sortIndex=_e,c(b,q),U||z||(U=!0,$||($=!0,ye()))),q},u.unstable_shouldYield=X,u.unstable_wrapCallback=function(q){var K=D;return function(){var ae=D;D=K;try{return q.apply(this,arguments)}finally{D=ae}}}})(mc)),mc}var $m;function Rp(){return $m||($m=1,fc.exports=Cp()),fc.exports}var hc={exports:{}},xt={};/**
26
+ * @license React
27
+ * react-dom.production.js
28
+ *
29
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
30
+ *
31
+ * This source code is licensed under the MIT license found in the
32
+ * LICENSE file in the root directory of this source tree.
33
+ */var Km;function Ap(){if(Km)return xt;Km=1;var u=Cc();function c(b){var p="https://react.dev/errors/"+b;if(1<arguments.length){p+="?args[]="+encodeURIComponent(arguments[1]);for(var g=2;g<arguments.length;g++)p+="&args[]="+encodeURIComponent(arguments[g])}return"Minified React error #"+b+"; visit "+p+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function d(){}var r={d:{f:d,r:function(){throw Error(c(522))},D:d,C:d,L:d,m:d,X:d,S:d,M:d},p:0,findDOMNode:null},m=Symbol.for("react.portal");function x(b,p,g){var y=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:m,key:y==null?null:""+y,children:b,containerInfo:p,implementation:g}}var f=u.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function v(b,p){if(b==="font")return"";if(typeof p=="string")return p==="use-credentials"?p:""}return xt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,xt.createPortal=function(b,p){var g=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!p||p.nodeType!==1&&p.nodeType!==9&&p.nodeType!==11)throw Error(c(299));return x(b,p,null,g)},xt.flushSync=function(b){var p=f.T,g=r.p;try{if(f.T=null,r.p=2,b)return b()}finally{f.T=p,r.p=g,r.d.f()}},xt.preconnect=function(b,p){typeof b=="string"&&(p?(p=p.crossOrigin,p=typeof p=="string"?p==="use-credentials"?p:"":void 0):p=null,r.d.C(b,p))},xt.prefetchDNS=function(b){typeof b=="string"&&r.d.D(b)},xt.preinit=function(b,p){if(typeof b=="string"&&p&&typeof p.as=="string"){var g=p.as,y=v(g,p.crossOrigin),D=typeof p.integrity=="string"?p.integrity:void 0,z=typeof p.fetchPriority=="string"?p.fetchPriority:void 0;g==="style"?r.d.S(b,typeof p.precedence=="string"?p.precedence:void 0,{crossOrigin:y,integrity:D,fetchPriority:z}):g==="script"&&r.d.X(b,{crossOrigin:y,integrity:D,fetchPriority:z,nonce:typeof p.nonce=="string"?p.nonce:void 0})}},xt.preinitModule=function(b,p){if(typeof b=="string")if(typeof p=="object"&&p!==null){if(p.as==null||p.as==="script"){var g=v(p.as,p.crossOrigin);r.d.M(b,{crossOrigin:g,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0})}}else p==null&&r.d.M(b)},xt.preload=function(b,p){if(typeof b=="string"&&typeof p=="object"&&p!==null&&typeof p.as=="string"){var g=p.as,y=v(g,p.crossOrigin);r.d.L(b,g,{crossOrigin:y,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0,type:typeof p.type=="string"?p.type:void 0,fetchPriority:typeof p.fetchPriority=="string"?p.fetchPriority:void 0,referrerPolicy:typeof p.referrerPolicy=="string"?p.referrerPolicy:void 0,imageSrcSet:typeof p.imageSrcSet=="string"?p.imageSrcSet:void 0,imageSizes:typeof p.imageSizes=="string"?p.imageSizes:void 0,media:typeof p.media=="string"?p.media:void 0})}},xt.preloadModule=function(b,p){if(typeof b=="string")if(p){var g=v(p.as,p.crossOrigin);r.d.m(b,{as:typeof p.as=="string"&&p.as!=="script"?p.as:void 0,crossOrigin:g,integrity:typeof p.integrity=="string"?p.integrity:void 0})}else r.d.m(b)},xt.requestFormReset=function(b){r.d.r(b)},xt.unstable_batchedUpdates=function(b,p){return b(p)},xt.useFormState=function(b,p,g){return f.H.useFormState(b,p,g)},xt.useFormStatus=function(){return f.H.useHostTransitionStatus()},xt.version="19.2.4",xt}var Jm;function vh(){if(Jm)return hc.exports;Jm=1;function u(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(u)}catch(c){console.error(c)}}return u(),hc.exports=Ap(),hc.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 Fm;function Mp(){if(Fm)return ds;Fm=1;var u=Rp(),c=Cc(),d=vh();function r(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var l=2;l<arguments.length;l++)t+="&args[]="+encodeURIComponent(arguments[l])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function m(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function x(e){var t=e,l=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(l=t.return),e=t.return;while(e)}return t.tag===3?l:null}function f(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 b(e){if(x(e)!==e)throw Error(r(188))}function p(e){var t=e.alternate;if(!t){if(t=x(e),t===null)throw Error(r(188));return t!==e?null:e}for(var l=e,a=t;;){var n=l.return;if(n===null)break;var i=n.alternate;if(i===null){if(a=n.return,a!==null){l=a;continue}break}if(n.child===i.child){for(i=n.child;i;){if(i===l)return b(n),e;if(i===a)return b(n),t;i=i.sibling}throw Error(r(188))}if(l.return!==a.return)l=n,a=i;else{for(var o=!1,h=n.child;h;){if(h===l){o=!0,l=n,a=i;break}if(h===a){o=!0,a=n,l=i;break}h=h.sibling}if(!o){for(h=i.child;h;){if(h===l){o=!0,l=i,a=n;break}if(h===a){o=!0,a=i,l=n;break}h=h.sibling}if(!o)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 g(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=g(e),t!==null)return t;e=e.sibling}return null}var y=Object.assign,D=Symbol.for("react.element"),z=Symbol.for("react.transitional.element"),U=Symbol.for("react.portal"),_=Symbol.for("react.fragment"),Y=Symbol.for("react.strict_mode"),Q=Symbol.for("react.profiler"),B=Symbol.for("react.consumer"),S=Symbol.for("react.context"),le=Symbol.for("react.forward_ref"),Z=Symbol.for("react.suspense"),$=Symbol.for("react.suspense_list"),P=Symbol.for("react.memo"),ie=Symbol.for("react.lazy"),ue=Symbol.for("react.activity"),X=Symbol.for("react.memo_cache_sentinel"),pe=Symbol.iterator;function ye(e){return e===null||typeof e!="object"?null:(e=pe&&e[pe]||e["@@iterator"],typeof e=="function"?e:null)}var we=Symbol.for("react.client.reference");function F(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===we?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case _:return"Fragment";case Q:return"Profiler";case Y:return"StrictMode";case Z:return"Suspense";case $:return"SuspenseList";case ue:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case U:return"Portal";case S:return e.displayName||"Context";case B:return(e._context.displayName||"Context")+".Consumer";case le:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case P:return t=e.displayName||null,t!==null?t:F(e.type)||"Memo";case ie:t=e._payload,e=e._init;try{return F(e(t))}catch{}}return null}var ct=Array.isArray,q=c.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,K=d.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ae={pending:!1,data:null,method:null,action:null},Re=[],_e=-1;function N(e){return{current:e}}function L(e){0>_e||(e.current=Re[_e],Re[_e]=null,_e--)}function J(e,t){_e++,Re[_e]=e.current,e.current=t}var I=N(null),ce=N(null),me=N(null),Ne=N(null);function et(e,t){switch(J(me,t),J(ce,e),J(I,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?dm(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=dm(t),e=fm(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}L(I),J(I,e)}function Ye(){L(I),L(ce),L(me)}function tl(e){e.memoizedState!==null&&J(Ne,e);var t=I.current,l=fm(t,e.type);t!==l&&(J(ce,e),J(I,l))}function T(e){ce.current===e&&(L(I),L(ce)),Ne.current===e&&(L(Ne),is._currentValue=ae)}var W,de;function Te(e){if(W===void 0)try{throw Error()}catch(l){var t=l.stack.trim().match(/\n( *(at )?)/);W=t&&t[1]||"",de=-1<l.stack.indexOf(`
42
+ at`)?" (<anonymous>)":-1<l.stack.indexOf("@")?"@unknown:0:0":""}return`
43
+ `+W+e+de}var tt=!1;function vt(e,t){if(!e||tt)return"";tt=!0;var l=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var a={DetermineComponentFrameRoot:function(){try{if(t){var G=function(){throw Error()};if(Object.defineProperty(G.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(G,[])}catch(O){var M=O}Reflect.construct(e,[],G)}else{try{G.call()}catch(O){M=O}e.call(G.prototype)}}else{try{throw Error()}catch(O){M=O}(G=e())&&typeof G.catch=="function"&&G.catch(function(){})}}catch(O){if(O&&M&&typeof O.stack=="string")return[O.stack,M.stack]}return[null,null]}};a.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var n=Object.getOwnPropertyDescriptor(a.DetermineComponentFrameRoot,"name");n&&n.configurable&&Object.defineProperty(a.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var i=a.DetermineComponentFrameRoot(),o=i[0],h=i[1];if(o&&h){var j=o.split(`
44
+ `),A=h.split(`
45
+ `);for(n=a=0;a<j.length&&!j[a].includes("DetermineComponentFrameRoot");)a++;for(;n<A.length&&!A[n].includes("DetermineComponentFrameRoot");)n++;if(a===j.length||n===A.length)for(a=j.length-1,n=A.length-1;1<=a&&0<=n&&j[a]!==A[n];)n--;for(;1<=a&&0<=n;a--,n--)if(j[a]!==A[n]){if(a!==1||n!==1)do if(a--,n--,0>n||j[a]!==A[n]){var H=`
46
+ `+j[a].replace(" at new "," at ");return e.displayName&&H.includes("<anonymous>")&&(H=H.replace("<anonymous>",e.displayName)),H}while(1<=a&&0<=n);break}}}finally{tt=!1,Error.prepareStackTrace=l}return(l=e?e.displayName||e.name:"")?Te(l):""}function Lt(e,t){switch(e.tag){case 26:case 27:case 5:return Te(e.type);case 16:return Te("Lazy");case 13:return e.child!==t&&t!==null?Te("Suspense Fallback"):Te("Suspense");case 19:return Te("SuspenseList");case 0:case 15:return vt(e.type,!1);case 11:return vt(e.type.render,!1);case 1:return vt(e.type,!0);case 31:return Te("Activity");default:return""}}function V(e){try{var t="",l=null;do t+=Lt(e,l),l=e,e=e.return;while(e);return t}catch(a){return`
47
+ Error generating stack: `+a.message+`
48
+ `+a.stack}}var se=Object.prototype.hasOwnProperty,Ge=u.unstable_scheduleCallback,bt=u.unstable_cancelCallback,ll=u.unstable_shouldYield,al=u.unstable_requestPaint,Je=u.unstable_now,_l=u.unstable_getCurrentPriorityLevel,Yc=u.unstable_ImmediatePriority,Gc=u.unstable_UserBlockingPriority,Ss=u.unstable_NormalPriority,s0=u.unstable_LowPriority,Qc=u.unstable_IdlePriority,i0=u.log,u0=u.unstable_setDisableYieldValue,gn=null,Rt=null;function Dl(e){if(typeof i0=="function"&&u0(e),Rt&&typeof Rt.setStrictMode=="function")try{Rt.setStrictMode(gn,e)}catch{}}var At=Math.clz32?Math.clz32:o0,r0=Math.log,c0=Math.LN2;function o0(e){return e>>>=0,e===0?32:31-(r0(e)/c0|0)|0}var Ns=256,Es=262144,ws=4194304;function ia(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 Ts(e,t,l){var a=e.pendingLanes;if(a===0)return 0;var n=0,i=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var h=a&134217727;return h!==0?(a=h&~i,a!==0?n=ia(a):(o&=h,o!==0?n=ia(o):l||(l=h&~e,l!==0&&(n=ia(l))))):(h=a&~i,h!==0?n=ia(h):o!==0?n=ia(o):l||(l=a&~e,l!==0&&(n=ia(l)))),n===0?0:t!==0&&t!==n&&(t&i)===0&&(i=n&-n,l=t&-t,i>=l||i===32&&(l&4194048)!==0)?t:n}function bn(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function d0(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 Vc(){var e=ws;return ws<<=1,(ws&62914560)===0&&(ws=4194304),e}function Pi(e){for(var t=[],l=0;31>l;l++)t.push(e);return t}function yn(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function f0(e,t,l,a,n,i){var o=e.pendingLanes;e.pendingLanes=l,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=l,e.entangledLanes&=l,e.errorRecoveryDisabledLanes&=l,e.shellSuspendCounter=0;var h=e.entanglements,j=e.expirationTimes,A=e.hiddenUpdates;for(l=o&~l;0<l;){var H=31-At(l),G=1<<H;h[H]=0,j[H]=-1;var M=A[H];if(M!==null)for(A[H]=null,H=0;H<M.length;H++){var O=M[H];O!==null&&(O.lane&=-536870913)}l&=~G}a!==0&&Xc(e,a,0),i!==0&&n===0&&e.tag!==0&&(e.suspendedLanes|=i&~(o&~t))}function Xc(e,t,l){e.pendingLanes|=t,e.suspendedLanes&=~t;var a=31-At(t);e.entangledLanes|=t,e.entanglements[a]=e.entanglements[a]|1073741824|l&261930}function Zc(e,t){var l=e.entangledLanes|=t;for(e=e.entanglements;l;){var a=31-At(l),n=1<<a;n&t|e[a]&t&&(e[a]|=t),l&=~n}}function $c(e,t){var l=t&-t;return l=(l&42)!==0?1:Wi(l),(l&(e.suspendedLanes|t))!==0?0:l}function Wi(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 Ii(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Kc(){var e=K.p;return e!==0?e:(e=window.event,e===void 0?32:Um(e.type))}function Jc(e,t){var l=K.p;try{return K.p=e,t()}finally{K.p=l}}var zl=Math.random().toString(36).slice(2),ot="__reactFiber$"+zl,yt="__reactProps$"+zl,wa="__reactContainer$"+zl,eu="__reactEvents$"+zl,m0="__reactListeners$"+zl,h0="__reactHandles$"+zl,Fc="__reactResources$"+zl,jn="__reactMarker$"+zl;function tu(e){delete e[ot],delete e[yt],delete e[eu],delete e[m0],delete e[h0]}function Ta(e){var t=e[ot];if(t)return t;for(var l=e.parentNode;l;){if(t=l[wa]||l[ot]){if(l=t.alternate,t.child!==null||l!==null&&l.child!==null)for(e=bm(e);e!==null;){if(l=e[ot])return l;e=bm(e)}return t}e=l,l=e.parentNode}return null}function Ca(e){if(e=e[ot]||e[wa]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Sn(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(r(33))}function Ra(e){var t=e[Fc];return t||(t=e[Fc]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function ut(e){e[jn]=!0}var Pc=new Set,Wc={};function ua(e,t){Aa(e,t),Aa(e+"Capture",t)}function Aa(e,t){for(Wc[e]=t,e=0;e<t.length;e++)Pc.add(t[e])}var x0=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]*$"),Ic={},eo={};function p0(e){return se.call(eo,e)?!0:se.call(Ic,e)?!1:x0.test(e)?eo[e]=!0:(Ic[e]=!0,!1)}function Cs(e,t,l){if(p0(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 Rs(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 cl(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 Bt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function to(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function v0(e,t,l){var a=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof a<"u"&&typeof a.get=="function"&&typeof a.set=="function"){var n=a.get,i=a.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return n.call(this)},set:function(o){l=""+o,i.call(this,o)}}),Object.defineProperty(e,t,{enumerable:a.enumerable}),{getValue:function(){return l},setValue:function(o){l=""+o},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function lu(e){if(!e._valueTracker){var t=to(e)?"checked":"value";e._valueTracker=v0(e,t,""+e[t])}}function lo(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var l=t.getValue(),a="";return e&&(a=to(e)?e.checked?"true":"false":e.value),e=a,e!==l?(t.setValue(e),!0):!1}function As(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 g0=/[\n"\\]/g;function kt(e){return e.replace(g0,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function au(e,t,l,a,n,i,o,h){e.name="",o!=null&&typeof o!="function"&&typeof o!="symbol"&&typeof o!="boolean"?e.type=o:e.removeAttribute("type"),t!=null?o==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+Bt(t)):e.value!==""+Bt(t)&&(e.value=""+Bt(t)):o!=="submit"&&o!=="reset"||e.removeAttribute("value"),t!=null?nu(e,o,Bt(t)):l!=null?nu(e,o,Bt(l)):a!=null&&e.removeAttribute("value"),n==null&&i!=null&&(e.defaultChecked=!!i),n!=null&&(e.checked=n&&typeof n!="function"&&typeof n!="symbol"),h!=null&&typeof h!="function"&&typeof h!="symbol"&&typeof h!="boolean"?e.name=""+Bt(h):e.removeAttribute("name")}function ao(e,t,l,a,n,i,o,h){if(i!=null&&typeof i!="function"&&typeof i!="symbol"&&typeof i!="boolean"&&(e.type=i),t!=null||l!=null){if(!(i!=="submit"&&i!=="reset"||t!=null)){lu(e);return}l=l!=null?""+Bt(l):"",t=t!=null?""+Bt(t):l,h||t===e.value||(e.value=t),e.defaultValue=t}a=a??n,a=typeof a!="function"&&typeof a!="symbol"&&!!a,e.checked=h?e.checked:!!a,e.defaultChecked=!!a,o!=null&&typeof o!="function"&&typeof o!="symbol"&&typeof o!="boolean"&&(e.name=o),lu(e)}function nu(e,t,l){t==="number"&&As(e.ownerDocument)===e||e.defaultValue===""+l||(e.defaultValue=""+l)}function Ma(e,t,l,a){if(e=e.options,t){t={};for(var n=0;n<l.length;n++)t["$"+l[n]]=!0;for(l=0;l<e.length;l++)n=t.hasOwnProperty("$"+e[l].value),e[l].selected!==n&&(e[l].selected=n),n&&a&&(e[l].defaultSelected=!0)}else{for(l=""+Bt(l),t=null,n=0;n<e.length;n++){if(e[n].value===l){e[n].selected=!0,a&&(e[n].defaultSelected=!0);return}t!==null||e[n].disabled||(t=e[n])}t!==null&&(t.selected=!0)}}function no(e,t,l){if(t!=null&&(t=""+Bt(t),t!==e.value&&(e.value=t),l==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=l!=null?""+Bt(l):""}function so(e,t,l,a){if(t==null){if(a!=null){if(l!=null)throw Error(r(92));if(ct(a)){if(1<a.length)throw Error(r(93));a=a[0]}l=a}l==null&&(l=""),t=l}l=Bt(t),e.defaultValue=l,a=e.textContent,a===l&&a!==""&&a!==null&&(e.value=a),lu(e)}function _a(e,t){if(t){var l=e.firstChild;if(l&&l===e.lastChild&&l.nodeType===3){l.nodeValue=t;return}}e.textContent=t}var b0=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 io(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||b0.has(t)?t==="float"?e.cssFloat=l:e[t]=(""+l).trim():e[t]=l+"px"}function uo(e,t,l){if(t!=null&&typeof t!="object")throw Error(r(62));if(e=e.style,l!=null){for(var a in l)!l.hasOwnProperty(a)||t!=null&&t.hasOwnProperty(a)||(a.indexOf("--")===0?e.setProperty(a,""):a==="float"?e.cssFloat="":e[a]="");for(var n in t)a=t[n],t.hasOwnProperty(n)&&l[n]!==a&&io(e,n,a)}else for(var i in t)t.hasOwnProperty(i)&&io(e,i,t[i])}function su(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 y0=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"]]),j0=/^[\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 j0.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function ol(){}var iu=null;function uu(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Da=null,za=null;function ro(e){var t=Ca(e);if(t&&(e=t.stateNode)){var l=e[yt]||null;e:switch(e=t.stateNode,t.type){case"input":if(au(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="'+kt(""+t)+'"][type="radio"]'),t=0;t<l.length;t++){var a=l[t];if(a!==e&&a.form===e.form){var n=a[yt]||null;if(!n)throw Error(r(90));au(a,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name)}}for(t=0;t<l.length;t++)a=l[t],a.form===e.form&&lo(a)}break e;case"textarea":no(e,l.value,l.defaultValue);break e;case"select":t=l.value,t!=null&&Ma(e,!!l.multiple,t,!1)}}}var ru=!1;function co(e,t,l){if(ru)return e(t,l);ru=!0;try{var a=e(t);return a}finally{if(ru=!1,(Da!==null||za!==null)&&(vi(),Da&&(t=Da,e=za,za=Da=null,ro(t),e)))for(t=0;t<e.length;t++)ro(e[t])}}function Nn(e,t){var l=e.stateNode;if(l===null)return null;var a=l[yt]||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 dl=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),cu=!1;if(dl)try{var En={};Object.defineProperty(En,"passive",{get:function(){cu=!0}}),window.addEventListener("test",En,En),window.removeEventListener("test",En,En)}catch{cu=!1}var Ol=null,ou=null,_s=null;function oo(){if(_s)return _s;var e,t=ou,l=t.length,a,n="value"in Ol?Ol.value:Ol.textContent,i=n.length;for(e=0;e<l&&t[e]===n[e];e++);var o=l-e;for(a=1;a<=o&&t[l-a]===n[i-a];a++);return _s=n.slice(e,1<a?1-a:void 0)}function Ds(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function zs(){return!0}function fo(){return!1}function jt(e){function t(l,a,n,i,o){this._reactName=l,this._targetInst=n,this.type=a,this.nativeEvent=i,this.target=o,this.currentTarget=null;for(var h in e)e.hasOwnProperty(h)&&(l=e[h],this[h]=l?l(i):i[h]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?zs:fo,this.isPropagationStopped=fo,this}return y(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=zs)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=zs)},persist:function(){},isPersistent:zs}),t}var ra={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Os=jt(ra),wn=y({},ra,{view:0,detail:0}),S0=jt(wn),du,fu,Tn,Us=y({},wn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:hu,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!==Tn&&(Tn&&e.type==="mousemove"?(du=e.screenX-Tn.screenX,fu=e.screenY-Tn.screenY):fu=du=0,Tn=e),du)},movementY:function(e){return"movementY"in e?e.movementY:fu}}),mo=jt(Us),N0=y({},Us,{dataTransfer:0}),E0=jt(N0),w0=y({},wn,{relatedTarget:0}),mu=jt(w0),T0=y({},ra,{animationName:0,elapsedTime:0,pseudoElement:0}),C0=jt(T0),R0=y({},ra,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),A0=jt(R0),M0=y({},ra,{data:0}),ho=jt(M0),_0={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},D0={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"},z0={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function O0(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=z0[e])?!!t[e]:!1}function hu(){return O0}var U0=y({},wn,{key:function(e){if(e.key){var t=_0[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Ds(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?D0[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:hu,charCode:function(e){return e.type==="keypress"?Ds(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Ds(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),q0=jt(U0),H0=y({},Us,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),xo=jt(H0),L0=y({},wn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:hu}),B0=jt(L0),k0=y({},ra,{propertyName:0,elapsedTime:0,pseudoElement:0}),Y0=jt(k0),G0=y({},Us,{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}),Q0=jt(G0),V0=y({},ra,{newState:0,oldState:0}),X0=jt(V0),Z0=[9,13,27,32],xu=dl&&"CompositionEvent"in window,Cn=null;dl&&"documentMode"in document&&(Cn=document.documentMode);var $0=dl&&"TextEvent"in window&&!Cn,po=dl&&(!xu||Cn&&8<Cn&&11>=Cn),vo=" ",go=!1;function bo(e,t){switch(e){case"keyup":return Z0.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function yo(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Oa=!1;function K0(e,t){switch(e){case"compositionend":return yo(t);case"keypress":return t.which!==32?null:(go=!0,vo);case"textInput":return e=t.data,e===vo&&go?null:e;default:return null}}function J0(e,t){if(Oa)return e==="compositionend"||!xu&&bo(e,t)?(e=oo(),_s=ou=Ol=null,Oa=!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 po&&t.locale!=="ko"?null:t.data;default:return null}}var F0={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 jo(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!F0[e.type]:t==="textarea"}function So(e,t,l,a){Da?za?za.push(a):za=[a]:Da=a,t=Ei(t,"onChange"),0<t.length&&(l=new Os("onChange","change",null,l,a),e.push({event:l,listeners:t}))}var Rn=null,An=null;function P0(e){sm(e,0)}function qs(e){var t=Sn(e);if(lo(t))return e}function No(e,t){if(e==="change")return t}var Eo=!1;if(dl){var pu;if(dl){var vu="oninput"in document;if(!vu){var wo=document.createElement("div");wo.setAttribute("oninput","return;"),vu=typeof wo.oninput=="function"}pu=vu}else pu=!1;Eo=pu&&(!document.documentMode||9<document.documentMode)}function To(){Rn&&(Rn.detachEvent("onpropertychange",Co),An=Rn=null)}function Co(e){if(e.propertyName==="value"&&qs(An)){var t=[];So(t,An,e,uu(e)),co(P0,t)}}function W0(e,t,l){e==="focusin"?(To(),Rn=t,An=l,Rn.attachEvent("onpropertychange",Co)):e==="focusout"&&To()}function I0(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return qs(An)}function ex(e,t){if(e==="click")return qs(t)}function tx(e,t){if(e==="input"||e==="change")return qs(t)}function lx(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Mt=typeof Object.is=="function"?Object.is:lx;function Mn(e,t){if(Mt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var l=Object.keys(e),a=Object.keys(t);if(l.length!==a.length)return!1;for(a=0;a<l.length;a++){var n=l[a];if(!se.call(t,n)||!Mt(e[n],t[n]))return!1}return!0}function Ro(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Ao(e,t){var l=Ro(e);e=0;for(var a;l;){if(l.nodeType===3){if(a=e+l.textContent.length,e<=t&&a>=t)return{node:l,offset:t-e};e=a}e:{for(;l;){if(l.nextSibling){l=l.nextSibling;break e}l=l.parentNode}l=void 0}l=Ro(l)}}function Mo(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Mo(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function _o(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=As(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=As(e.document)}return t}function gu(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 ax=dl&&"documentMode"in document&&11>=document.documentMode,Ua=null,bu=null,_n=null,yu=!1;function Do(e,t,l){var a=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;yu||Ua==null||Ua!==As(a)||(a=Ua,"selectionStart"in a&&gu(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}),_n&&Mn(_n,a)||(_n=a,a=Ei(bu,"onSelect"),0<a.length&&(t=new Os("onSelect","select",null,t,l),e.push({event:t,listeners:a}),t.target=Ua)))}function ca(e,t){var l={};return l[e.toLowerCase()]=t.toLowerCase(),l["Webkit"+e]="webkit"+t,l["Moz"+e]="moz"+t,l}var qa={animationend:ca("Animation","AnimationEnd"),animationiteration:ca("Animation","AnimationIteration"),animationstart:ca("Animation","AnimationStart"),transitionrun:ca("Transition","TransitionRun"),transitionstart:ca("Transition","TransitionStart"),transitioncancel:ca("Transition","TransitionCancel"),transitionend:ca("Transition","TransitionEnd")},ju={},zo={};dl&&(zo=document.createElement("div").style,"AnimationEvent"in window||(delete qa.animationend.animation,delete qa.animationiteration.animation,delete qa.animationstart.animation),"TransitionEvent"in window||delete qa.transitionend.transition);function oa(e){if(ju[e])return ju[e];if(!qa[e])return e;var t=qa[e],l;for(l in t)if(t.hasOwnProperty(l)&&l in zo)return ju[e]=t[l];return e}var Oo=oa("animationend"),Uo=oa("animationiteration"),qo=oa("animationstart"),nx=oa("transitionrun"),sx=oa("transitionstart"),ix=oa("transitioncancel"),Ho=oa("transitionend"),Lo=new Map,Su="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(" ");Su.push("scrollEnd");function Pt(e,t){Lo.set(e,t),ua(t,[e])}var Hs=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)},Yt=[],Ha=0,Nu=0;function Ls(){for(var e=Ha,t=Nu=Ha=0;t<e;){var l=Yt[t];Yt[t++]=null;var a=Yt[t];Yt[t++]=null;var n=Yt[t];Yt[t++]=null;var i=Yt[t];if(Yt[t++]=null,a!==null&&n!==null){var o=a.pending;o===null?n.next=n:(n.next=o.next,o.next=n),a.pending=n}i!==0&&Bo(l,n,i)}}function Bs(e,t,l,a){Yt[Ha++]=e,Yt[Ha++]=t,Yt[Ha++]=l,Yt[Ha++]=a,Nu|=a,e.lanes|=a,e=e.alternate,e!==null&&(e.lanes|=a)}function Eu(e,t,l,a){return Bs(e,t,l,a),ks(e)}function da(e,t){return Bs(e,null,null,t),ks(e)}function Bo(e,t,l){e.lanes|=l;var a=e.alternate;a!==null&&(a.lanes|=l);for(var n=!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||(n=!0)),e=i,i=i.return;return e.tag===3?(i=e.stateNode,n&&t!==null&&(n=31-At(l),e=i.hiddenUpdates,a=e[n],a===null?e[n]=[t]:a.push(t),t.lane=l|536870912),i):null}function ks(e){if(50<In)throw In=0,zr=null,Error(r(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var La={};function ux(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 _t(e,t,l,a){return new ux(e,t,l,a)}function wu(e){return e=e.prototype,!(!e||!e.isReactComponent)}function fl(e,t){var l=e.alternate;return l===null?(l=_t(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 ko(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 Ys(e,t,l,a,n,i){var o=0;if(a=e,typeof e=="function")wu(e)&&(o=1);else if(typeof e=="string")o=fp(e,l,I.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case ue:return e=_t(31,l,t,n),e.elementType=ue,e.lanes=i,e;case _:return fa(l.children,n,i,t);case Y:o=8,n|=24;break;case Q:return e=_t(12,l,t,n|2),e.elementType=Q,e.lanes=i,e;case Z:return e=_t(13,l,t,n),e.elementType=Z,e.lanes=i,e;case $:return e=_t(19,l,t,n),e.elementType=$,e.lanes=i,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case S:o=10;break e;case B:o=9;break e;case le:o=11;break e;case P:o=14;break e;case ie:o=16,a=null;break e}o=29,l=Error(r(130,e===null?"null":typeof e,"")),a=null}return t=_t(o,l,t,n),t.elementType=e,t.type=a,t.lanes=i,t}function fa(e,t,l,a){return e=_t(7,e,a,t),e.lanes=l,e}function Tu(e,t,l){return e=_t(6,e,null,t),e.lanes=l,e}function Yo(e){var t=_t(18,null,null,0);return t.stateNode=e,t}function Cu(e,t,l){return t=_t(4,e.children!==null?e.children:[],e.key,t),t.lanes=l,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Go=new WeakMap;function Gt(e,t){if(typeof e=="object"&&e!==null){var l=Go.get(e);return l!==void 0?l:(t={value:e,source:t,stack:V(t)},Go.set(e,t),t)}return{value:e,source:t,stack:V(t)}}var Ba=[],ka=0,Gs=null,Dn=0,Qt=[],Vt=0,Ul=null,nl=1,sl="";function ml(e,t){Ba[ka++]=Dn,Ba[ka++]=Gs,Gs=e,Dn=t}function Qo(e,t,l){Qt[Vt++]=nl,Qt[Vt++]=sl,Qt[Vt++]=Ul,Ul=e;var a=nl;e=sl;var n=32-At(a)-1;a&=~(1<<n),l+=1;var i=32-At(t)+n;if(30<i){var o=n-n%5;i=(a&(1<<o)-1).toString(32),a>>=o,n-=o,nl=1<<32-At(t)+n|l<<n|a,sl=i+e}else nl=1<<i|l<<n|a,sl=e}function Ru(e){e.return!==null&&(ml(e,1),Qo(e,1,0))}function Au(e){for(;e===Gs;)Gs=Ba[--ka],Ba[ka]=null,Dn=Ba[--ka],Ba[ka]=null;for(;e===Ul;)Ul=Qt[--Vt],Qt[Vt]=null,sl=Qt[--Vt],Qt[Vt]=null,nl=Qt[--Vt],Qt[Vt]=null}function Vo(e,t){Qt[Vt++]=nl,Qt[Vt++]=sl,Qt[Vt++]=Ul,nl=t.id,sl=t.overflow,Ul=e}var dt=null,Qe=null,Ee=!1,ql=null,Xt=!1,Mu=Error(r(519));function Hl(e){var t=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw zn(Gt(t,e)),Mu}function Xo(e){var t=e.stateNode,l=e.type,a=e.memoizedProps;switch(t[ot]=e,t[yt]=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<ts.length;l++)ge(ts[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),ao(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),so(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||cm(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=ol),t=!0):t=!1,t||Hl(e,!0)}function Zo(e){for(dt=e.return;dt;)switch(dt.tag){case 5:case 31:case 13:Xt=!1;return;case 27:case 3:Xt=!0;return;default:dt=dt.return}}function Ya(e){if(e!==dt)return!1;if(!Ee)return Zo(e),Ee=!0,!1;var t=e.tag,l;if((l=t!==3&&t!==27)&&((l=t===5)&&(l=e.type,l=!(l!=="form"&&l!=="button")||Kr(e.type,e.memoizedProps)),l=!l),l&&Qe&&Hl(e),Zo(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));Qe=gm(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));Qe=gm(e)}else t===27?(t=Qe,Pl(e.type)?(e=Ir,Ir=null,Qe=e):Qe=t):Qe=dt?$t(e.stateNode.nextSibling):null;return!0}function ma(){Qe=dt=null,Ee=!1}function _u(){var e=ql;return e!==null&&(wt===null?wt=e:wt.push.apply(wt,e),ql=null),e}function zn(e){ql===null?ql=[e]:ql.push(e)}var Du=N(null),ha=null,hl=null;function Ll(e,t,l){J(Du,t._currentValue),t._currentValue=l}function xl(e){e._currentValue=Du.current,L(Du)}function zu(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 Ou(e,t,l,a){var n=e.child;for(n!==null&&(n.return=e);n!==null;){var i=n.dependencies;if(i!==null){var o=n.child;i=i.firstContext;e:for(;i!==null;){var h=i;i=n;for(var j=0;j<t.length;j++)if(h.context===t[j]){i.lanes|=l,h=i.alternate,h!==null&&(h.lanes|=l),zu(i.return,l,e),a||(o=null);break e}i=h.next}}else if(n.tag===18){if(o=n.return,o===null)throw Error(r(341));o.lanes|=l,i=o.alternate,i!==null&&(i.lanes|=l),zu(o,l,e),o=null}else o=n.child;if(o!==null)o.return=n;else for(o=n;o!==null;){if(o===e){o=null;break}if(n=o.sibling,n!==null){n.return=o.return,o=n;break}o=o.return}n=o}}function Ga(e,t,l,a){e=null;for(var n=t,i=!1;n!==null;){if(!i){if((n.flags&524288)!==0)i=!0;else if((n.flags&262144)!==0)break}if(n.tag===10){var o=n.alternate;if(o===null)throw Error(r(387));if(o=o.memoizedProps,o!==null){var h=n.type;Mt(n.pendingProps.value,o.value)||(e!==null?e.push(h):e=[h])}}else if(n===Ne.current){if(o=n.alternate,o===null)throw Error(r(387));o.memoizedState.memoizedState!==n.memoizedState.memoizedState&&(e!==null?e.push(is):e=[is])}n=n.return}e!==null&&Ou(t,e,l,a),t.flags|=262144}function Qs(e){for(e=e.firstContext;e!==null;){if(!Mt(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function xa(e){ha=e,hl=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function ft(e){return $o(ha,e)}function Vs(e,t){return ha===null&&xa(e),$o(e,t)}function $o(e,t){var l=t._currentValue;if(t={context:t,memoizedValue:l,next:null},hl===null){if(e===null)throw Error(r(308));hl=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else hl=hl.next=t;return l}var rx=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(l,a){e.push(a)}};this.abort=function(){t.aborted=!0,e.forEach(function(l){return l()})}},cx=u.unstable_scheduleCallback,ox=u.unstable_NormalPriority,lt={$$typeof:S,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Uu(){return{controller:new rx,data:new Map,refCount:0}}function On(e){e.refCount--,e.refCount===0&&cx(ox,function(){e.controller.abort()})}var Un=null,qu=0,Qa=0,Va=null;function dx(e,t){if(Un===null){var l=Un=[];qu=0,Qa=Br(),Va={status:"pending",value:void 0,then:function(a){l.push(a)}}}return qu++,t.then(Ko,Ko),t}function Ko(){if(--qu===0&&Un!==null){Va!==null&&(Va.status="fulfilled");var e=Un;Un=null,Qa=0,Va=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function fx(e,t){var l=[],a={status:"pending",value:null,reason:null,then:function(n){l.push(n)}};return e.then(function(){a.status="fulfilled",a.value=t;for(var n=0;n<l.length;n++)(0,l[n])(t)},function(n){for(a.status="rejected",a.reason=n,n=0;n<l.length;n++)(0,l[n])(void 0)}),a}var Jo=q.S;q.S=function(e,t){zf=Je(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&dx(e,t),Jo!==null&&Jo(e,t)};var pa=N(null);function Hu(){var e=pa.current;return e!==null?e:ke.pooledCache}function Xs(e,t){t===null?J(pa,pa.current):J(pa,t.pool)}function Fo(){var e=Hu();return e===null?null:{parent:lt._currentValue,pool:e}}var Xa=Error(r(460)),Lu=Error(r(474)),Zs=Error(r(542)),$s={then:function(){}};function Po(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Wo(e,t,l){switch(l=e[l],l===void 0?e.push(t):l!==t&&(t.then(ol,ol),t=l),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,ed(e),e;default:if(typeof t.status=="string")t.then(ol,ol);else{if(e=ke,e!==null&&100<e.shellSuspendCounter)throw Error(r(482));e=t,e.status="pending",e.then(function(a){if(t.status==="pending"){var n=t;n.status="fulfilled",n.value=a}},function(a){if(t.status==="pending"){var n=t;n.status="rejected",n.reason=a}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,ed(e),e}throw ga=t,Xa}}function va(e){try{var t=e._init;return t(e._payload)}catch(l){throw l!==null&&typeof l=="object"&&typeof l.then=="function"?(ga=l,Xa):l}}var ga=null;function Io(){if(ga===null)throw Error(r(459));var e=ga;return ga=null,e}function ed(e){if(e===Xa||e===Zs)throw Error(r(483))}var Za=null,qn=0;function Ks(e){var t=qn;return qn+=1,Za===null&&(Za=[]),Wo(Za,e,t)}function Hn(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Js(e,t){throw t.$$typeof===D?Error(r(525)):(e=Object.prototype.toString.call(t),Error(r(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function td(e){function t(C,E){if(e){var R=C.deletions;R===null?(C.deletions=[E],C.flags|=16):R.push(E)}}function l(C,E){if(!e)return null;for(;E!==null;)t(C,E),E=E.sibling;return null}function a(C){for(var E=new Map;C!==null;)C.key!==null?E.set(C.key,C):E.set(C.index,C),C=C.sibling;return E}function n(C,E){return C=fl(C,E),C.index=0,C.sibling=null,C}function i(C,E,R){return C.index=R,e?(R=C.alternate,R!==null?(R=R.index,R<E?(C.flags|=67108866,E):R):(C.flags|=67108866,E)):(C.flags|=1048576,E)}function o(C){return e&&C.alternate===null&&(C.flags|=67108866),C}function h(C,E,R,k){return E===null||E.tag!==6?(E=Tu(R,C.mode,k),E.return=C,E):(E=n(E,R),E.return=C,E)}function j(C,E,R,k){var ne=R.type;return ne===_?H(C,E,R.props.children,k,R.key):E!==null&&(E.elementType===ne||typeof ne=="object"&&ne!==null&&ne.$$typeof===ie&&va(ne)===E.type)?(E=n(E,R.props),Hn(E,R),E.return=C,E):(E=Ys(R.type,R.key,R.props,null,C.mode,k),Hn(E,R),E.return=C,E)}function A(C,E,R,k){return E===null||E.tag!==4||E.stateNode.containerInfo!==R.containerInfo||E.stateNode.implementation!==R.implementation?(E=Cu(R,C.mode,k),E.return=C,E):(E=n(E,R.children||[]),E.return=C,E)}function H(C,E,R,k,ne){return E===null||E.tag!==7?(E=fa(R,C.mode,k,ne),E.return=C,E):(E=n(E,R),E.return=C,E)}function G(C,E,R){if(typeof E=="string"&&E!==""||typeof E=="number"||typeof E=="bigint")return E=Tu(""+E,C.mode,R),E.return=C,E;if(typeof E=="object"&&E!==null){switch(E.$$typeof){case z:return R=Ys(E.type,E.key,E.props,null,C.mode,R),Hn(R,E),R.return=C,R;case U:return E=Cu(E,C.mode,R),E.return=C,E;case ie:return E=va(E),G(C,E,R)}if(ct(E)||ye(E))return E=fa(E,C.mode,R,null),E.return=C,E;if(typeof E.then=="function")return G(C,Ks(E),R);if(E.$$typeof===S)return G(C,Vs(C,E),R);Js(C,E)}return null}function M(C,E,R,k){var ne=E!==null?E.key:null;if(typeof R=="string"&&R!==""||typeof R=="number"||typeof R=="bigint")return ne!==null?null:h(C,E,""+R,k);if(typeof R=="object"&&R!==null){switch(R.$$typeof){case z:return R.key===ne?j(C,E,R,k):null;case U:return R.key===ne?A(C,E,R,k):null;case ie:return R=va(R),M(C,E,R,k)}if(ct(R)||ye(R))return ne!==null?null:H(C,E,R,k,null);if(typeof R.then=="function")return M(C,E,Ks(R),k);if(R.$$typeof===S)return M(C,E,Vs(C,R),k);Js(C,R)}return null}function O(C,E,R,k,ne){if(typeof k=="string"&&k!==""||typeof k=="number"||typeof k=="bigint")return C=C.get(R)||null,h(E,C,""+k,ne);if(typeof k=="object"&&k!==null){switch(k.$$typeof){case z:return C=C.get(k.key===null?R:k.key)||null,j(E,C,k,ne);case U:return C=C.get(k.key===null?R:k.key)||null,A(E,C,k,ne);case ie:return k=va(k),O(C,E,R,k,ne)}if(ct(k)||ye(k))return C=C.get(R)||null,H(E,C,k,ne,null);if(typeof k.then=="function")return O(C,E,R,Ks(k),ne);if(k.$$typeof===S)return O(C,E,R,Vs(E,k),ne);Js(E,k)}return null}function ee(C,E,R,k){for(var ne=null,Ae=null,te=E,xe=E=0,Se=null;te!==null&&xe<R.length;xe++){te.index>xe?(Se=te,te=null):Se=te.sibling;var Me=M(C,te,R[xe],k);if(Me===null){te===null&&(te=Se);break}e&&te&&Me.alternate===null&&t(C,te),E=i(Me,E,xe),Ae===null?ne=Me:Ae.sibling=Me,Ae=Me,te=Se}if(xe===R.length)return l(C,te),Ee&&ml(C,xe),ne;if(te===null){for(;xe<R.length;xe++)te=G(C,R[xe],k),te!==null&&(E=i(te,E,xe),Ae===null?ne=te:Ae.sibling=te,Ae=te);return Ee&&ml(C,xe),ne}for(te=a(te);xe<R.length;xe++)Se=O(te,C,xe,R[xe],k),Se!==null&&(e&&Se.alternate!==null&&te.delete(Se.key===null?xe:Se.key),E=i(Se,E,xe),Ae===null?ne=Se:Ae.sibling=Se,Ae=Se);return e&&te.forEach(function(la){return t(C,la)}),Ee&&ml(C,xe),ne}function re(C,E,R,k){if(R==null)throw Error(r(151));for(var ne=null,Ae=null,te=E,xe=E=0,Se=null,Me=R.next();te!==null&&!Me.done;xe++,Me=R.next()){te.index>xe?(Se=te,te=null):Se=te.sibling;var la=M(C,te,Me.value,k);if(la===null){te===null&&(te=Se);break}e&&te&&la.alternate===null&&t(C,te),E=i(la,E,xe),Ae===null?ne=la:Ae.sibling=la,Ae=la,te=Se}if(Me.done)return l(C,te),Ee&&ml(C,xe),ne;if(te===null){for(;!Me.done;xe++,Me=R.next())Me=G(C,Me.value,k),Me!==null&&(E=i(Me,E,xe),Ae===null?ne=Me:Ae.sibling=Me,Ae=Me);return Ee&&ml(C,xe),ne}for(te=a(te);!Me.done;xe++,Me=R.next())Me=O(te,C,xe,Me.value,k),Me!==null&&(e&&Me.alternate!==null&&te.delete(Me.key===null?xe:Me.key),E=i(Me,E,xe),Ae===null?ne=Me:Ae.sibling=Me,Ae=Me);return e&&te.forEach(function(Np){return t(C,Np)}),Ee&&ml(C,xe),ne}function Le(C,E,R,k){if(typeof R=="object"&&R!==null&&R.type===_&&R.key===null&&(R=R.props.children),typeof R=="object"&&R!==null){switch(R.$$typeof){case z:e:{for(var ne=R.key;E!==null;){if(E.key===ne){if(ne=R.type,ne===_){if(E.tag===7){l(C,E.sibling),k=n(E,R.props.children),k.return=C,C=k;break e}}else if(E.elementType===ne||typeof ne=="object"&&ne!==null&&ne.$$typeof===ie&&va(ne)===E.type){l(C,E.sibling),k=n(E,R.props),Hn(k,R),k.return=C,C=k;break e}l(C,E);break}else t(C,E);E=E.sibling}R.type===_?(k=fa(R.props.children,C.mode,k,R.key),k.return=C,C=k):(k=Ys(R.type,R.key,R.props,null,C.mode,k),Hn(k,R),k.return=C,C=k)}return o(C);case U:e:{for(ne=R.key;E!==null;){if(E.key===ne)if(E.tag===4&&E.stateNode.containerInfo===R.containerInfo&&E.stateNode.implementation===R.implementation){l(C,E.sibling),k=n(E,R.children||[]),k.return=C,C=k;break e}else{l(C,E);break}else t(C,E);E=E.sibling}k=Cu(R,C.mode,k),k.return=C,C=k}return o(C);case ie:return R=va(R),Le(C,E,R,k)}if(ct(R))return ee(C,E,R,k);if(ye(R)){if(ne=ye(R),typeof ne!="function")throw Error(r(150));return R=ne.call(R),re(C,E,R,k)}if(typeof R.then=="function")return Le(C,E,Ks(R),k);if(R.$$typeof===S)return Le(C,E,Vs(C,R),k);Js(C,R)}return typeof R=="string"&&R!==""||typeof R=="number"||typeof R=="bigint"?(R=""+R,E!==null&&E.tag===6?(l(C,E.sibling),k=n(E,R),k.return=C,C=k):(l(C,E),k=Tu(R,C.mode,k),k.return=C,C=k),o(C)):l(C,E)}return function(C,E,R,k){try{qn=0;var ne=Le(C,E,R,k);return Za=null,ne}catch(te){if(te===Xa||te===Zs)throw te;var Ae=_t(29,te,null,C.mode);return Ae.lanes=k,Ae.return=C,Ae}finally{}}}var ba=td(!0),ld=td(!1),Bl=!1;function Bu(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function ku(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 kl(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Yl(e,t,l){var a=e.updateQueue;if(a===null)return null;if(a=a.shared,(De&2)!==0){var n=a.pending;return n===null?t.next=t:(t.next=n.next,n.next=t),a.pending=t,t=ks(e),Bo(e,null,l),t}return Bs(e,a,t,l),ks(e)}function Ln(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,Zc(e,l)}}function Yu(e,t){var l=e.updateQueue,a=e.alternate;if(a!==null&&(a=a.updateQueue,l===a)){var n=null,i=null;if(l=l.firstBaseUpdate,l!==null){do{var o={lane:l.lane,tag:l.tag,payload:l.payload,callback:null,next:null};i===null?n=i=o:i=i.next=o,l=l.next}while(l!==null);i===null?n=i=t:i=i.next=t}else n=i=t;l={baseState:a.baseState,firstBaseUpdate:n,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 Gu=!1;function Bn(){if(Gu){var e=Va;if(e!==null)throw e}}function kn(e,t,l,a){Gu=!1;var n=e.updateQueue;Bl=!1;var i=n.firstBaseUpdate,o=n.lastBaseUpdate,h=n.shared.pending;if(h!==null){n.shared.pending=null;var j=h,A=j.next;j.next=null,o===null?i=A:o.next=A,o=j;var H=e.alternate;H!==null&&(H=H.updateQueue,h=H.lastBaseUpdate,h!==o&&(h===null?H.firstBaseUpdate=A:h.next=A,H.lastBaseUpdate=j))}if(i!==null){var G=n.baseState;o=0,H=A=j=null,h=i;do{var M=h.lane&-536870913,O=M!==h.lane;if(O?(je&M)===M:(a&M)===M){M!==0&&M===Qa&&(Gu=!0),H!==null&&(H=H.next={lane:0,tag:h.tag,payload:h.payload,callback:null,next:null});e:{var ee=e,re=h;M=t;var Le=l;switch(re.tag){case 1:if(ee=re.payload,typeof ee=="function"){G=ee.call(Le,G,M);break e}G=ee;break e;case 3:ee.flags=ee.flags&-65537|128;case 0:if(ee=re.payload,M=typeof ee=="function"?ee.call(Le,G,M):ee,M==null)break e;G=y({},G,M);break e;case 2:Bl=!0}}M=h.callback,M!==null&&(e.flags|=64,O&&(e.flags|=8192),O=n.callbacks,O===null?n.callbacks=[M]:O.push(M))}else O={lane:M,tag:h.tag,payload:h.payload,callback:h.callback,next:null},H===null?(A=H=O,j=G):H=H.next=O,o|=M;if(h=h.next,h===null){if(h=n.shared.pending,h===null)break;O=h,h=O.next,O.next=null,n.lastBaseUpdate=O,n.shared.pending=null}}while(!0);H===null&&(j=G),n.baseState=j,n.firstBaseUpdate=A,n.lastBaseUpdate=H,i===null&&(n.shared.lanes=0),Zl|=o,e.lanes=o,e.memoizedState=G}}function ad(e,t){if(typeof e!="function")throw Error(r(191,e));e.call(t)}function nd(e,t){var l=e.callbacks;if(l!==null)for(e.callbacks=null,e=0;e<l.length;e++)ad(l[e],t)}var $a=N(null),Fs=N(0);function sd(e,t){e=El,J(Fs,e),J($a,t),El=e|t.baseLanes}function Qu(){J(Fs,El),J($a,$a.current)}function Vu(){El=Fs.current,L($a),L(Fs)}var Dt=N(null),Zt=null;function Gl(e){var t=e.alternate;J(We,We.current&1),J(Dt,e),Zt===null&&(t===null||$a.current!==null||t.memoizedState!==null)&&(Zt=e)}function Xu(e){J(We,We.current),J(Dt,e),Zt===null&&(Zt=e)}function id(e){e.tag===22?(J(We,We.current),J(Dt,e),Zt===null&&(Zt=e)):Ql()}function Ql(){J(We,We.current),J(Dt,Dt.current)}function zt(e){L(Dt),Zt===e&&(Zt=null),L(We)}var We=N(0);function Ps(e){for(var t=e;t!==null;){if(t.tag===13){var l=t.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||Pr(l)||Wr(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 pl=0,he=null,qe=null,at=null,Ws=!1,Ka=!1,ya=!1,Is=0,Yn=0,Ja=null,mx=0;function Fe(){throw Error(r(321))}function Zu(e,t){if(t===null)return!1;for(var l=0;l<t.length&&l<e.length;l++)if(!Mt(e[l],t[l]))return!1;return!0}function $u(e,t,l,a,n,i){return pl=i,he=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,q.H=e===null||e.memoizedState===null?Qd:rr,ya=!1,i=l(a,n),ya=!1,Ka&&(i=rd(t,l,a,n)),ud(e),i}function ud(e){q.H=Vn;var t=qe!==null&&qe.next!==null;if(pl=0,at=qe=he=null,Ws=!1,Yn=0,Ja=null,t)throw Error(r(300));e===null||nt||(e=e.dependencies,e!==null&&Qs(e)&&(nt=!0))}function rd(e,t,l,a){he=e;var n=0;do{if(Ka&&(Ja=null),Yn=0,Ka=!1,25<=n)throw Error(r(301));if(n+=1,at=qe=null,e.updateQueue!=null){var i=e.updateQueue;i.lastEffect=null,i.events=null,i.stores=null,i.memoCache!=null&&(i.memoCache.index=0)}q.H=Vd,i=t(l,a)}while(Ka);return i}function hx(){var e=q.H,t=e.useState()[0];return t=typeof t.then=="function"?Gn(t):t,e=e.useState()[0],(qe!==null?qe.memoizedState:null)!==e&&(he.flags|=1024),t}function Ku(){var e=Is!==0;return Is=0,e}function Ju(e,t,l){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~l}function Fu(e){if(Ws){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Ws=!1}pl=0,at=qe=he=null,Ka=!1,Yn=Is=0,Ja=null}function gt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return at===null?he.memoizedState=at=e:at=at.next=e,at}function Ie(){if(qe===null){var e=he.alternate;e=e!==null?e.memoizedState:null}else e=qe.next;var t=at===null?he.memoizedState:at.next;if(t!==null)at=t,qe=e;else{if(e===null)throw he.alternate===null?Error(r(467)):Error(r(310));qe=e,e={memoizedState:qe.memoizedState,baseState:qe.baseState,baseQueue:qe.baseQueue,queue:qe.queue,next:null},at===null?he.memoizedState=at=e:at=at.next=e}return at}function ei(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Gn(e){var t=Yn;return Yn+=1,Ja===null&&(Ja=[]),e=Wo(Ja,e,t),t=he,(at===null?t.memoizedState:at.next)===null&&(t=t.alternate,q.H=t===null||t.memoizedState===null?Qd:rr),e}function ti(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Gn(e);if(e.$$typeof===S)return ft(e)}throw Error(r(438,String(e)))}function Pu(e){var t=null,l=he.updateQueue;if(l!==null&&(t=l.memoCache),t==null){var a=he.alternate;a!==null&&(a=a.updateQueue,a!==null&&(a=a.memoCache,a!=null&&(t={data:a.data.map(function(n){return n.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),l===null&&(l=ei(),he.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]=X;return t.index++,l}function vl(e,t){return typeof t=="function"?t(e):t}function li(e){var t=Ie();return Wu(t,qe,e)}function Wu(e,t,l){var a=e.queue;if(a===null)throw Error(r(311));a.lastRenderedReducer=l;var n=e.baseQueue,i=a.pending;if(i!==null){if(n!==null){var o=n.next;n.next=i.next,i.next=o}t.baseQueue=n=i,a.pending=null}if(i=e.baseState,n===null)e.memoizedState=i;else{t=n.next;var h=o=null,j=null,A=t,H=!1;do{var G=A.lane&-536870913;if(G!==A.lane?(je&G)===G:(pl&G)===G){var M=A.revertLane;if(M===0)j!==null&&(j=j.next={lane:0,revertLane:0,gesture:null,action:A.action,hasEagerState:A.hasEagerState,eagerState:A.eagerState,next:null}),G===Qa&&(H=!0);else if((pl&M)===M){A=A.next,M===Qa&&(H=!0);continue}else G={lane:0,revertLane:A.revertLane,gesture:null,action:A.action,hasEagerState:A.hasEagerState,eagerState:A.eagerState,next:null},j===null?(h=j=G,o=i):j=j.next=G,he.lanes|=M,Zl|=M;G=A.action,ya&&l(i,G),i=A.hasEagerState?A.eagerState:l(i,G)}else M={lane:G,revertLane:A.revertLane,gesture:A.gesture,action:A.action,hasEagerState:A.hasEagerState,eagerState:A.eagerState,next:null},j===null?(h=j=M,o=i):j=j.next=M,he.lanes|=G,Zl|=G;A=A.next}while(A!==null&&A!==t);if(j===null?o=i:j.next=h,!Mt(i,e.memoizedState)&&(nt=!0,H&&(l=Va,l!==null)))throw l;e.memoizedState=i,e.baseState=o,e.baseQueue=j,a.lastRenderedState=i}return n===null&&(a.lanes=0),[e.memoizedState,a.dispatch]}function Iu(e){var t=Ie(),l=t.queue;if(l===null)throw Error(r(311));l.lastRenderedReducer=e;var a=l.dispatch,n=l.pending,i=t.memoizedState;if(n!==null){l.pending=null;var o=n=n.next;do i=e(i,o.action),o=o.next;while(o!==n);Mt(i,t.memoizedState)||(nt=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),l.lastRenderedState=i}return[i,a]}function cd(e,t,l){var a=he,n=Ie(),i=Ee;if(i){if(l===void 0)throw Error(r(407));l=l()}else l=t();var o=!Mt((qe||n).memoizedState,l);if(o&&(n.memoizedState=l,nt=!0),n=n.queue,lr(fd.bind(null,a,n,e),[e]),n.getSnapshot!==t||o||at!==null&&at.memoizedState.tag&1){if(a.flags|=2048,Fa(9,{destroy:void 0},dd.bind(null,a,n,l,t),null),ke===null)throw Error(r(349));i||(pl&127)!==0||od(a,t,l)}return l}function od(e,t,l){e.flags|=16384,e={getSnapshot:t,value:l},t=he.updateQueue,t===null?(t=ei(),he.updateQueue=t,t.stores=[e]):(l=t.stores,l===null?t.stores=[e]:l.push(e))}function dd(e,t,l,a){t.value=l,t.getSnapshot=a,md(t)&&hd(e)}function fd(e,t,l){return l(function(){md(t)&&hd(e)})}function md(e){var t=e.getSnapshot;e=e.value;try{var l=t();return!Mt(e,l)}catch{return!0}}function hd(e){var t=da(e,2);t!==null&&Tt(t,e,2)}function er(e){var t=gt();if(typeof e=="function"){var l=e;if(e=l(),ya){Dl(!0);try{l()}finally{Dl(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:vl,lastRenderedState:e},t}function xd(e,t,l,a){return e.baseState=l,Wu(e,qe,typeof a=="function"?a:vl)}function xx(e,t,l,a,n){if(si(e))throw Error(r(485));if(e=t.action,e!==null){var i={payload:n,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(o){i.listeners.push(o)}};q.T!==null?l(!0):i.isTransition=!1,a(i),l=t.pending,l===null?(i.next=t.pending=i,pd(t,i)):(i.next=l.next,t.pending=l.next=i)}}function pd(e,t){var l=t.action,a=t.payload,n=e.state;if(t.isTransition){var i=q.T,o={};q.T=o;try{var h=l(n,a),j=q.S;j!==null&&j(o,h),vd(e,t,h)}catch(A){tr(e,t,A)}finally{i!==null&&o.types!==null&&(i.types=o.types),q.T=i}}else try{i=l(n,a),vd(e,t,i)}catch(A){tr(e,t,A)}}function vd(e,t,l){l!==null&&typeof l=="object"&&typeof l.then=="function"?l.then(function(a){gd(e,t,a)},function(a){return tr(e,t,a)}):gd(e,t,l)}function gd(e,t,l){t.status="fulfilled",t.value=l,bd(t),e.state=l,t=e.pending,t!==null&&(l=t.next,l===t?e.pending=null:(l=l.next,t.next=l,pd(e,l)))}function tr(e,t,l){var a=e.pending;if(e.pending=null,a!==null){a=a.next;do t.status="rejected",t.reason=l,bd(t),t=t.next;while(t!==a)}e.action=null}function bd(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function yd(e,t){return t}function jd(e,t){if(Ee){var l=ke.formState;if(l!==null){e:{var a=he;if(Ee){if(Qe){t:{for(var n=Qe,i=Xt;n.nodeType!==8;){if(!i){n=null;break t}if(n=$t(n.nextSibling),n===null){n=null;break t}}i=n.data,n=i==="F!"||i==="F"?n:null}if(n){Qe=$t(n.nextSibling),a=n.data==="F!";break e}}Hl(a)}a=!1}a&&(t=l[0])}}return l=gt(),l.memoizedState=l.baseState=t,a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:yd,lastRenderedState:t},l.queue=a,l=kd.bind(null,he,a),a.dispatch=l,a=er(!1),i=ur.bind(null,he,!1,a.queue),a=gt(),n={state:t,dispatch:null,action:e,pending:null},a.queue=n,l=xx.bind(null,he,n,i,l),n.dispatch=l,a.memoizedState=e,[t,l,!1]}function Sd(e){var t=Ie();return Nd(t,qe,e)}function Nd(e,t,l){if(t=Wu(e,t,yd)[0],e=li(vl)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var a=Gn(t)}catch(o){throw o===Xa?Zs:o}else a=t;t=Ie();var n=t.queue,i=n.dispatch;return l!==t.memoizedState&&(he.flags|=2048,Fa(9,{destroy:void 0},px.bind(null,n,l),null)),[a,i,e]}function px(e,t){e.action=t}function Ed(e){var t=Ie(),l=qe;if(l!==null)return Nd(t,l,e);Ie(),t=t.memoizedState,l=Ie();var a=l.queue.dispatch;return l.memoizedState=e,[t,a,!1]}function Fa(e,t,l,a){return e={tag:e,create:l,deps:a,inst:t,next:null},t=he.updateQueue,t===null&&(t=ei(),he.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 wd(){return Ie().memoizedState}function ai(e,t,l,a){var n=gt();he.flags|=e,n.memoizedState=Fa(1|t,{destroy:void 0},l,a===void 0?null:a)}function ni(e,t,l,a){var n=Ie();a=a===void 0?null:a;var i=n.memoizedState.inst;qe!==null&&a!==null&&Zu(a,qe.memoizedState.deps)?n.memoizedState=Fa(t,i,l,a):(he.flags|=e,n.memoizedState=Fa(1|t,i,l,a))}function Td(e,t){ai(8390656,8,e,t)}function lr(e,t){ni(2048,8,e,t)}function vx(e){he.flags|=4;var t=he.updateQueue;if(t===null)t=ei(),he.updateQueue=t,t.events=[e];else{var l=t.events;l===null?t.events=[e]:l.push(e)}}function Cd(e){var t=Ie().memoizedState;return vx({ref:t,nextImpl:e}),function(){if((De&2)!==0)throw Error(r(440));return t.impl.apply(void 0,arguments)}}function Rd(e,t){return ni(4,2,e,t)}function Ad(e,t){return ni(4,4,e,t)}function Md(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 _d(e,t,l){l=l!=null?l.concat([e]):null,ni(4,4,Md.bind(null,t,e),l)}function ar(){}function Dd(e,t){var l=Ie();t=t===void 0?null:t;var a=l.memoizedState;return t!==null&&Zu(t,a[1])?a[0]:(l.memoizedState=[e,t],e)}function zd(e,t){var l=Ie();t=t===void 0?null:t;var a=l.memoizedState;if(t!==null&&Zu(t,a[1]))return a[0];if(a=e(),ya){Dl(!0);try{e()}finally{Dl(!1)}}return l.memoizedState=[a,t],a}function nr(e,t,l){return l===void 0||(pl&1073741824)!==0&&(je&261930)===0?e.memoizedState=t:(e.memoizedState=l,e=Uf(),he.lanes|=e,Zl|=e,l)}function Od(e,t,l,a){return Mt(l,t)?l:$a.current!==null?(e=nr(e,l,a),Mt(e,t)||(nt=!0),e):(pl&42)===0||(pl&1073741824)!==0&&(je&261930)===0?(nt=!0,e.memoizedState=l):(e=Uf(),he.lanes|=e,Zl|=e,t)}function Ud(e,t,l,a,n){var i=K.p;K.p=i!==0&&8>i?i:8;var o=q.T,h={};q.T=h,ur(e,!1,t,l);try{var j=n(),A=q.S;if(A!==null&&A(h,j),j!==null&&typeof j=="object"&&typeof j.then=="function"){var H=fx(j,a);Qn(e,t,H,qt(e))}else Qn(e,t,a,qt(e))}catch(G){Qn(e,t,{then:function(){},status:"rejected",reason:G},qt())}finally{K.p=i,o!==null&&h.types!==null&&(o.types=h.types),q.T=o}}function gx(){}function sr(e,t,l,a){if(e.tag!==5)throw Error(r(476));var n=qd(e).queue;Ud(e,n,t,ae,l===null?gx:function(){return Hd(e),l(a)})}function qd(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:ae,baseState:ae,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:vl,lastRenderedState:ae},next:null};var l={};return t.next={memoizedState:l,baseState:l,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:vl,lastRenderedState:l},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Hd(e){var t=qd(e);t.next===null&&(t=e.alternate.memoizedState),Qn(e,t.next.queue,{},qt())}function ir(){return ft(is)}function Ld(){return Ie().memoizedState}function Bd(){return Ie().memoizedState}function bx(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var l=qt();e=kl(l);var a=Yl(t,e,l);a!==null&&(Tt(a,t,l),Ln(a,t,l)),t={cache:Uu()},e.payload=t;return}t=t.return}}function yx(e,t,l){var a=qt();l={lane:a,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},si(e)?Yd(t,l):(l=Eu(e,t,l,a),l!==null&&(Tt(l,e,a),Gd(l,t,a)))}function kd(e,t,l){var a=qt();Qn(e,t,l,a)}function Qn(e,t,l,a){var n={lane:a,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null};if(si(e))Yd(t,n);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var o=t.lastRenderedState,h=i(o,l);if(n.hasEagerState=!0,n.eagerState=h,Mt(h,o))return Bs(e,t,n,0),ke===null&&Ls(),!1}catch{}finally{}if(l=Eu(e,t,n,a),l!==null)return Tt(l,e,a),Gd(l,t,a),!0}return!1}function ur(e,t,l,a){if(a={lane:2,revertLane:Br(),gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},si(e)){if(t)throw Error(r(479))}else t=Eu(e,l,a,2),t!==null&&Tt(t,e,2)}function si(e){var t=e.alternate;return e===he||t!==null&&t===he}function Yd(e,t){Ka=Ws=!0;var l=e.pending;l===null?t.next=t:(t.next=l.next,l.next=t),e.pending=t}function Gd(e,t,l){if((l&4194048)!==0){var a=t.lanes;a&=e.pendingLanes,l|=a,t.lanes=l,Zc(e,l)}}var Vn={readContext:ft,use:ti,useCallback:Fe,useContext:Fe,useEffect:Fe,useImperativeHandle:Fe,useLayoutEffect:Fe,useInsertionEffect:Fe,useMemo:Fe,useReducer:Fe,useRef:Fe,useState:Fe,useDebugValue:Fe,useDeferredValue:Fe,useTransition:Fe,useSyncExternalStore:Fe,useId:Fe,useHostTransitionStatus:Fe,useFormState:Fe,useActionState:Fe,useOptimistic:Fe,useMemoCache:Fe,useCacheRefresh:Fe};Vn.useEffectEvent=Fe;var Qd={readContext:ft,use:ti,useCallback:function(e,t){return gt().memoizedState=[e,t===void 0?null:t],e},useContext:ft,useEffect:Td,useImperativeHandle:function(e,t,l){l=l!=null?l.concat([e]):null,ai(4194308,4,Md.bind(null,t,e),l)},useLayoutEffect:function(e,t){return ai(4194308,4,e,t)},useInsertionEffect:function(e,t){ai(4,2,e,t)},useMemo:function(e,t){var l=gt();t=t===void 0?null:t;var a=e();if(ya){Dl(!0);try{e()}finally{Dl(!1)}}return l.memoizedState=[a,t],a},useReducer:function(e,t,l){var a=gt();if(l!==void 0){var n=l(t);if(ya){Dl(!0);try{l(t)}finally{Dl(!1)}}}else n=t;return a.memoizedState=a.baseState=n,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:n},a.queue=e,e=e.dispatch=yx.bind(null,he,e),[a.memoizedState,e]},useRef:function(e){var t=gt();return e={current:e},t.memoizedState=e},useState:function(e){e=er(e);var t=e.queue,l=kd.bind(null,he,t);return t.dispatch=l,[e.memoizedState,l]},useDebugValue:ar,useDeferredValue:function(e,t){var l=gt();return nr(l,e,t)},useTransition:function(){var e=er(!1);return e=Ud.bind(null,he,e.queue,!0,!1),gt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,l){var a=he,n=gt();if(Ee){if(l===void 0)throw Error(r(407));l=l()}else{if(l=t(),ke===null)throw Error(r(349));(je&127)!==0||od(a,t,l)}n.memoizedState=l;var i={value:l,getSnapshot:t};return n.queue=i,Td(fd.bind(null,a,i,e),[e]),a.flags|=2048,Fa(9,{destroy:void 0},dd.bind(null,a,i,l,t),null),l},useId:function(){var e=gt(),t=ke.identifierPrefix;if(Ee){var l=sl,a=nl;l=(a&~(1<<32-At(a)-1)).toString(32)+l,t="_"+t+"R_"+l,l=Is++,0<l&&(t+="H"+l.toString(32)),t+="_"}else l=mx++,t="_"+t+"r_"+l.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:ir,useFormState:jd,useActionState:jd,useOptimistic:function(e){var t=gt();t.memoizedState=t.baseState=e;var l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=l,t=ur.bind(null,he,!0,l),l.dispatch=t,[e,t]},useMemoCache:Pu,useCacheRefresh:function(){return gt().memoizedState=bx.bind(null,he)},useEffectEvent:function(e){var t=gt(),l={impl:e};return t.memoizedState=l,function(){if((De&2)!==0)throw Error(r(440));return l.impl.apply(void 0,arguments)}}},rr={readContext:ft,use:ti,useCallback:Dd,useContext:ft,useEffect:lr,useImperativeHandle:_d,useInsertionEffect:Rd,useLayoutEffect:Ad,useMemo:zd,useReducer:li,useRef:wd,useState:function(){return li(vl)},useDebugValue:ar,useDeferredValue:function(e,t){var l=Ie();return Od(l,qe.memoizedState,e,t)},useTransition:function(){var e=li(vl)[0],t=Ie().memoizedState;return[typeof e=="boolean"?e:Gn(e),t]},useSyncExternalStore:cd,useId:Ld,useHostTransitionStatus:ir,useFormState:Sd,useActionState:Sd,useOptimistic:function(e,t){var l=Ie();return xd(l,qe,e,t)},useMemoCache:Pu,useCacheRefresh:Bd};rr.useEffectEvent=Cd;var Vd={readContext:ft,use:ti,useCallback:Dd,useContext:ft,useEffect:lr,useImperativeHandle:_d,useInsertionEffect:Rd,useLayoutEffect:Ad,useMemo:zd,useReducer:Iu,useRef:wd,useState:function(){return Iu(vl)},useDebugValue:ar,useDeferredValue:function(e,t){var l=Ie();return qe===null?nr(l,e,t):Od(l,qe.memoizedState,e,t)},useTransition:function(){var e=Iu(vl)[0],t=Ie().memoizedState;return[typeof e=="boolean"?e:Gn(e),t]},useSyncExternalStore:cd,useId:Ld,useHostTransitionStatus:ir,useFormState:Ed,useActionState:Ed,useOptimistic:function(e,t){var l=Ie();return qe!==null?xd(l,qe,e,t):(l.baseState=e,[e,l.queue.dispatch])},useMemoCache:Pu,useCacheRefresh:Bd};Vd.useEffectEvent=Cd;function cr(e,t,l,a){t=e.memoizedState,l=l(a,t),l=l==null?t:y({},t,l),e.memoizedState=l,e.lanes===0&&(e.updateQueue.baseState=l)}var or={enqueueSetState:function(e,t,l){e=e._reactInternals;var a=qt(),n=kl(a);n.payload=t,l!=null&&(n.callback=l),t=Yl(e,n,a),t!==null&&(Tt(t,e,a),Ln(t,e,a))},enqueueReplaceState:function(e,t,l){e=e._reactInternals;var a=qt(),n=kl(a);n.tag=1,n.payload=t,l!=null&&(n.callback=l),t=Yl(e,n,a),t!==null&&(Tt(t,e,a),Ln(t,e,a))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var l=qt(),a=kl(l);a.tag=2,t!=null&&(a.callback=t),t=Yl(e,a,l),t!==null&&(Tt(t,e,l),Ln(t,e,l))}};function Xd(e,t,l,a,n,i,o){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(a,i,o):t.prototype&&t.prototype.isPureReactComponent?!Mn(l,a)||!Mn(n,i):!0}function Zd(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&&or.enqueueReplaceState(t,t.state,null)}function ja(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=y({},l));for(var n in e)l[n]===void 0&&(l[n]=e[n])}return l}function $d(e){Hs(e)}function Kd(e){console.error(e)}function Jd(e){Hs(e)}function ii(e,t){try{var l=e.onUncaughtError;l(t.value,{componentStack:t.stack})}catch(a){setTimeout(function(){throw a})}}function Fd(e,t,l){try{var a=e.onCaughtError;a(l.value,{componentStack:l.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(n){setTimeout(function(){throw n})}}function dr(e,t,l){return l=kl(l),l.tag=3,l.payload={element:null},l.callback=function(){ii(e,t)},l}function Pd(e){return e=kl(e),e.tag=3,e}function Wd(e,t,l,a){var n=l.type.getDerivedStateFromError;if(typeof n=="function"){var i=a.value;e.payload=function(){return n(i)},e.callback=function(){Fd(t,l,a)}}var o=l.stateNode;o!==null&&typeof o.componentDidCatch=="function"&&(e.callback=function(){Fd(t,l,a),typeof n!="function"&&($l===null?$l=new Set([this]):$l.add(this));var h=a.stack;this.componentDidCatch(a.value,{componentStack:h!==null?h:""})})}function jx(e,t,l,a,n){if(l.flags|=32768,a!==null&&typeof a=="object"&&typeof a.then=="function"){if(t=l.alternate,t!==null&&Ga(t,l,n,!0),l=Dt.current,l!==null){switch(l.tag){case 31:case 13:return Zt===null?gi():l.alternate===null&&Pe===0&&(Pe=3),l.flags&=-257,l.flags|=65536,l.lanes=n,a===$s?l.flags|=16384:(t=l.updateQueue,t===null?l.updateQueue=new Set([a]):t.add(a),qr(e,a,n)),!1;case 22:return l.flags|=65536,a===$s?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)),qr(e,a,n)),!1}throw Error(r(435,l.tag))}return qr(e,a,n),gi(),!1}if(Ee)return t=Dt.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=n,a!==Mu&&(e=Error(r(422),{cause:a}),zn(Gt(e,l)))):(a!==Mu&&(t=Error(r(423),{cause:a}),zn(Gt(t,l))),e=e.current.alternate,e.flags|=65536,n&=-n,e.lanes|=n,a=Gt(a,l),n=dr(e.stateNode,a,n),Yu(e,n),Pe!==4&&(Pe=2)),!1;var i=Error(r(520),{cause:a});if(i=Gt(i,l),Wn===null?Wn=[i]:Wn.push(i),Pe!==4&&(Pe=2),t===null)return!0;a=Gt(a,l),l=t;do{switch(l.tag){case 3:return l.flags|=65536,e=n&-n,l.lanes|=e,e=dr(l.stateNode,a,e),Yu(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"&&($l===null||!$l.has(i))))return l.flags|=65536,n&=-n,l.lanes|=n,n=Pd(n),Wd(n,e,l,a),Yu(l,n),!1}l=l.return}while(l!==null);return!1}var fr=Error(r(461)),nt=!1;function mt(e,t,l,a){t.child=e===null?ld(t,null,l,a):ba(t,e.child,l,a)}function Id(e,t,l,a,n){l=l.render;var i=t.ref;if("ref"in a){var o={};for(var h in a)h!=="ref"&&(o[h]=a[h])}else o=a;return xa(t),a=$u(e,t,l,o,i,n),h=Ku(),e!==null&&!nt?(Ju(e,t,n),gl(e,t,n)):(Ee&&h&&Ru(t),t.flags|=1,mt(e,t,a,n),t.child)}function ef(e,t,l,a,n){if(e===null){var i=l.type;return typeof i=="function"&&!wu(i)&&i.defaultProps===void 0&&l.compare===null?(t.tag=15,t.type=i,tf(e,t,i,a,n)):(e=Ys(l.type,null,a,t,t.mode,n),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,!yr(e,n)){var o=i.memoizedProps;if(l=l.compare,l=l!==null?l:Mn,l(o,a)&&e.ref===t.ref)return gl(e,t,n)}return t.flags|=1,e=fl(i,a),e.ref=t.ref,e.return=t,t.child=e}function tf(e,t,l,a,n){if(e!==null){var i=e.memoizedProps;if(Mn(i,a)&&e.ref===t.ref)if(nt=!1,t.pendingProps=a=i,yr(e,n))(e.flags&131072)!==0&&(nt=!0);else return t.lanes=e.lanes,gl(e,t,n)}return mr(e,t,l,a,n)}function lf(e,t,l,a){var n=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,n=0;a!==null;)n=n|a.lanes|a.childLanes,a=a.sibling;a=n&~i}else a=0,t.child=null;return af(e,t,i,l,a)}if((l&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Xs(t,i!==null?i.cachePool:null),i!==null?sd(t,i):Qu(),id(t);else return a=t.lanes=536870912,af(e,t,i!==null?i.baseLanes|l:l,l,a)}else i!==null?(Xs(t,i.cachePool),sd(t,i),Ql(),t.memoizedState=null):(e!==null&&Xs(t,null),Qu(),Ql());return mt(e,t,n,l),t.child}function Xn(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function af(e,t,l,a,n){var i=Hu();return i=i===null?null:{parent:lt._currentValue,pool:i},t.memoizedState={baseLanes:l,cachePool:i},e!==null&&Xs(t,null),Qu(),id(t),e!==null&&Ga(e,t,a,!0),t.childLanes=n,null}function ui(e,t){return t=ci({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function nf(e,t,l){return ba(t,e.child,null,l),e=ui(t,t.pendingProps),e.flags|=2,zt(t),t.memoizedState=null,e}function Sx(e,t,l){var a=t.pendingProps,n=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Ee){if(a.mode==="hidden")return e=ui(t,a),t.lanes=536870912,Xn(null,e);if(Xu(t),(e=Qe)?(e=vm(e,Xt),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ul!==null?{id:nl,overflow:sl}:null,retryLane:536870912,hydrationErrors:null},l=Yo(e),l.return=t,t.child=l,dt=t,Qe=null)):e=null,e===null)throw Hl(t);return t.lanes=536870912,null}return ui(t,a)}var i=e.memoizedState;if(i!==null){var o=i.dehydrated;if(Xu(t),n)if(t.flags&256)t.flags&=-257,t=nf(e,t,l);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(r(558));else if(nt||Ga(e,t,l,!1),n=(l&e.childLanes)!==0,nt||n){if(a=ke,a!==null&&(o=$c(a,l),o!==0&&o!==i.retryLane))throw i.retryLane=o,da(e,o),Tt(a,e,o),fr;gi(),t=nf(e,t,l)}else e=i.treeContext,Qe=$t(o.nextSibling),dt=t,Ee=!0,ql=null,Xt=!1,e!==null&&Vo(t,e),t=ui(t,a),t.flags|=4096;return t}return e=fl(e.child,{mode:a.mode,children:a.children}),e.ref=t.ref,t.child=e,e.return=t,e}function ri(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 mr(e,t,l,a,n){return xa(t),l=$u(e,t,l,a,void 0,n),a=Ku(),e!==null&&!nt?(Ju(e,t,n),gl(e,t,n)):(Ee&&a&&Ru(t),t.flags|=1,mt(e,t,l,n),t.child)}function sf(e,t,l,a,n,i){return xa(t),t.updateQueue=null,l=rd(t,a,l,n),ud(e),a=Ku(),e!==null&&!nt?(Ju(e,t,i),gl(e,t,i)):(Ee&&a&&Ru(t),t.flags|=1,mt(e,t,l,i),t.child)}function uf(e,t,l,a,n){if(xa(t),t.stateNode===null){var i=La,o=l.contextType;typeof o=="object"&&o!==null&&(i=ft(o)),i=new l(a,i),t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,i.updater=or,t.stateNode=i,i._reactInternals=t,i=t.stateNode,i.props=a,i.state=t.memoizedState,i.refs={},Bu(t),o=l.contextType,i.context=typeof o=="object"&&o!==null?ft(o):La,i.state=t.memoizedState,o=l.getDerivedStateFromProps,typeof o=="function"&&(cr(t,l,o,a),i.state=t.memoizedState),typeof l.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(o=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),o!==i.state&&or.enqueueReplaceState(i,i.state,null),kn(t,a,i,n),Bn(),i.state=t.memoizedState),typeof i.componentDidMount=="function"&&(t.flags|=4194308),a=!0}else if(e===null){i=t.stateNode;var h=t.memoizedProps,j=ja(l,h);i.props=j;var A=i.context,H=l.contextType;o=La,typeof H=="object"&&H!==null&&(o=ft(H));var G=l.getDerivedStateFromProps;H=typeof G=="function"||typeof i.getSnapshotBeforeUpdate=="function",h=t.pendingProps!==h,H||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(h||A!==o)&&Zd(t,i,a,o),Bl=!1;var M=t.memoizedState;i.state=M,kn(t,a,i,n),Bn(),A=t.memoizedState,h||M!==A||Bl?(typeof G=="function"&&(cr(t,l,G,a),A=t.memoizedState),(j=Bl||Xd(t,l,j,a,M,A,o))?(H||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=A),i.props=a,i.state=A,i.context=o,a=j):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),a=!1)}else{i=t.stateNode,ku(e,t),o=t.memoizedProps,H=ja(l,o),i.props=H,G=t.pendingProps,M=i.context,A=l.contextType,j=La,typeof A=="object"&&A!==null&&(j=ft(A)),h=l.getDerivedStateFromProps,(A=typeof h=="function"||typeof i.getSnapshotBeforeUpdate=="function")||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(o!==G||M!==j)&&Zd(t,i,a,j),Bl=!1,M=t.memoizedState,i.state=M,kn(t,a,i,n),Bn();var O=t.memoizedState;o!==G||M!==O||Bl||e!==null&&e.dependencies!==null&&Qs(e.dependencies)?(typeof h=="function"&&(cr(t,l,h,a),O=t.memoizedState),(H=Bl||Xd(t,l,H,a,M,O,j)||e!==null&&e.dependencies!==null&&Qs(e.dependencies))?(A||typeof i.UNSAFE_componentWillUpdate!="function"&&typeof i.componentWillUpdate!="function"||(typeof i.componentWillUpdate=="function"&&i.componentWillUpdate(a,O,j),typeof i.UNSAFE_componentWillUpdate=="function"&&i.UNSAFE_componentWillUpdate(a,O,j)),typeof i.componentDidUpdate=="function"&&(t.flags|=4),typeof i.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof i.componentDidUpdate!="function"||o===e.memoizedProps&&M===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||o===e.memoizedProps&&M===e.memoizedState||(t.flags|=1024),t.memoizedProps=a,t.memoizedState=O),i.props=a,i.state=O,i.context=j,a=H):(typeof i.componentDidUpdate!="function"||o===e.memoizedProps&&M===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||o===e.memoizedProps&&M===e.memoizedState||(t.flags|=1024),a=!1)}return i=a,ri(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=ba(t,e.child,null,n),t.child=ba(t,null,l,n)):mt(e,t,l,n),t.memoizedState=i.state,e=t.child):e=gl(e,t,n),e}function rf(e,t,l,a){return ma(),t.flags|=256,mt(e,t,l,a),t.child}var hr={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function xr(e){return{baseLanes:e,cachePool:Fo()}}function pr(e,t,l){return e=e!==null?e.childLanes&~l:0,t&&(e|=Ut),e}function cf(e,t,l){var a=t.pendingProps,n=!1,i=(t.flags&128)!==0,o;if((o=i)||(o=e!==null&&e.memoizedState===null?!1:(We.current&2)!==0),o&&(n=!0,t.flags&=-129),o=(t.flags&32)!==0,t.flags&=-33,e===null){if(Ee){if(n?Gl(t):Ql(),(e=Qe)?(e=vm(e,Xt),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ul!==null?{id:nl,overflow:sl}:null,retryLane:536870912,hydrationErrors:null},l=Yo(e),l.return=t,t.child=l,dt=t,Qe=null)):e=null,e===null)throw Hl(t);return Wr(e)?t.lanes=32:t.lanes=536870912,null}var h=a.children;return a=a.fallback,n?(Ql(),n=t.mode,h=ci({mode:"hidden",children:h},n),a=fa(a,n,l,null),h.return=t,a.return=t,h.sibling=a,t.child=h,a=t.child,a.memoizedState=xr(l),a.childLanes=pr(e,o,l),t.memoizedState=hr,Xn(null,a)):(Gl(t),vr(t,h))}var j=e.memoizedState;if(j!==null&&(h=j.dehydrated,h!==null)){if(i)t.flags&256?(Gl(t),t.flags&=-257,t=gr(e,t,l)):t.memoizedState!==null?(Ql(),t.child=e.child,t.flags|=128,t=null):(Ql(),h=a.fallback,n=t.mode,a=ci({mode:"visible",children:a.children},n),h=fa(h,n,l,null),h.flags|=2,a.return=t,h.return=t,a.sibling=h,t.child=a,ba(t,e.child,null,l),a=t.child,a.memoizedState=xr(l),a.childLanes=pr(e,o,l),t.memoizedState=hr,t=Xn(null,a));else if(Gl(t),Wr(h)){if(o=h.nextSibling&&h.nextSibling.dataset,o)var A=o.dgst;o=A,a=Error(r(419)),a.stack="",a.digest=o,zn({value:a,source:null,stack:null}),t=gr(e,t,l)}else if(nt||Ga(e,t,l,!1),o=(l&e.childLanes)!==0,nt||o){if(o=ke,o!==null&&(a=$c(o,l),a!==0&&a!==j.retryLane))throw j.retryLane=a,da(e,a),Tt(o,e,a),fr;Pr(h)||gi(),t=gr(e,t,l)}else Pr(h)?(t.flags|=192,t.child=e.child,t=null):(e=j.treeContext,Qe=$t(h.nextSibling),dt=t,Ee=!0,ql=null,Xt=!1,e!==null&&Vo(t,e),t=vr(t,a.children),t.flags|=4096);return t}return n?(Ql(),h=a.fallback,n=t.mode,j=e.child,A=j.sibling,a=fl(j,{mode:"hidden",children:a.children}),a.subtreeFlags=j.subtreeFlags&65011712,A!==null?h=fl(A,h):(h=fa(h,n,l,null),h.flags|=2),h.return=t,a.return=t,a.sibling=h,t.child=a,Xn(null,a),a=t.child,h=e.child.memoizedState,h===null?h=xr(l):(n=h.cachePool,n!==null?(j=lt._currentValue,n=n.parent!==j?{parent:j,pool:j}:n):n=Fo(),h={baseLanes:h.baseLanes|l,cachePool:n}),a.memoizedState=h,a.childLanes=pr(e,o,l),t.memoizedState=hr,Xn(e.child,a)):(Gl(t),l=e.child,e=l.sibling,l=fl(l,{mode:"visible",children:a.children}),l.return=t,l.sibling=null,e!==null&&(o=t.deletions,o===null?(t.deletions=[e],t.flags|=16):o.push(e)),t.child=l,t.memoizedState=null,l)}function vr(e,t){return t=ci({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function ci(e,t){return e=_t(22,e,null,t),e.lanes=0,e}function gr(e,t,l){return ba(t,e.child,null,l),e=vr(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function of(e,t,l){e.lanes|=t;var a=e.alternate;a!==null&&(a.lanes|=t),zu(e.return,t,l)}function br(e,t,l,a,n,i){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:a,tail:l,tailMode:n,treeForkCount:i}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=a,o.tail=l,o.tailMode=n,o.treeForkCount=i)}function df(e,t,l){var a=t.pendingProps,n=a.revealOrder,i=a.tail;a=a.children;var o=We.current,h=(o&2)!==0;if(h?(o=o&1|2,t.flags|=128):o&=1,J(We,o),mt(e,t,a,l),a=Ee?Dn:0,!h&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&of(e,l,t);else if(e.tag===19)of(e,l,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(n){case"forwards":for(l=t.child,n=null;l!==null;)e=l.alternate,e!==null&&Ps(e)===null&&(n=l),l=l.sibling;l=n,l===null?(n=t.child,t.child=null):(n=l.sibling,l.sibling=null),br(t,!1,n,l,i,a);break;case"backwards":case"unstable_legacy-backwards":for(l=null,n=t.child,t.child=null;n!==null;){if(e=n.alternate,e!==null&&Ps(e)===null){t.child=n;break}e=n.sibling,n.sibling=l,l=n,n=e}br(t,!0,l,null,i,a);break;case"together":br(t,!1,null,null,void 0,a);break;default:t.memoizedState=null}return t.child}function gl(e,t,l){if(e!==null&&(t.dependencies=e.dependencies),Zl|=t.lanes,(l&t.childLanes)===0)if(e!==null){if(Ga(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=fl(e,e.pendingProps),t.child=l,l.return=t;e.sibling!==null;)e=e.sibling,l=l.sibling=fl(e,e.pendingProps),l.return=t;l.sibling=null}return t.child}function yr(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&Qs(e)))}function Nx(e,t,l){switch(t.tag){case 3:et(t,t.stateNode.containerInfo),Ll(t,lt,e.memoizedState.cache),ma();break;case 27:case 5:tl(t);break;case 4:et(t,t.stateNode.containerInfo);break;case 10:Ll(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Xu(t),null;break;case 13:var a=t.memoizedState;if(a!==null)return a.dehydrated!==null?(Gl(t),t.flags|=128,null):(l&t.child.childLanes)!==0?cf(e,t,l):(Gl(t),e=gl(e,t,l),e!==null?e.sibling:null);Gl(t);break;case 19:var n=(e.flags&128)!==0;if(a=(l&t.childLanes)!==0,a||(Ga(e,t,l,!1),a=(l&t.childLanes)!==0),n){if(a)return df(e,t,l);t.flags|=128}if(n=t.memoizedState,n!==null&&(n.rendering=null,n.tail=null,n.lastEffect=null),J(We,We.current),a)break;return null;case 22:return t.lanes=0,lf(e,t,l,t.pendingProps);case 24:Ll(t,lt,e.memoizedState.cache)}return gl(e,t,l)}function ff(e,t,l){if(e!==null)if(e.memoizedProps!==t.pendingProps)nt=!0;else{if(!yr(e,l)&&(t.flags&128)===0)return nt=!1,Nx(e,t,l);nt=(e.flags&131072)!==0}else nt=!1,Ee&&(t.flags&1048576)!==0&&Qo(t,Dn,t.index);switch(t.lanes=0,t.tag){case 16:e:{var a=t.pendingProps;if(e=va(t.elementType),t.type=e,typeof e=="function")wu(e)?(a=ja(e,a),t.tag=1,t=uf(null,t,e,a,l)):(t.tag=0,t=mr(null,t,e,a,l));else{if(e!=null){var n=e.$$typeof;if(n===le){t.tag=11,t=Id(null,t,e,a,l);break e}else if(n===P){t.tag=14,t=ef(null,t,e,a,l);break e}}throw t=F(e)||e,Error(r(306,t,""))}}return t;case 0:return mr(e,t,t.type,t.pendingProps,l);case 1:return a=t.type,n=ja(a,t.pendingProps),uf(e,t,a,n,l);case 3:e:{if(et(t,t.stateNode.containerInfo),e===null)throw Error(r(387));a=t.pendingProps;var i=t.memoizedState;n=i.element,ku(e,t),kn(t,a,null,l);var o=t.memoizedState;if(a=o.cache,Ll(t,lt,a),a!==i.cache&&Ou(t,[lt],l,!0),Bn(),a=o.element,i.isDehydrated)if(i={element:a,isDehydrated:!1,cache:o.cache},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){t=rf(e,t,a,l);break e}else if(a!==n){n=Gt(Error(r(424)),t),zn(n),t=rf(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(Qe=$t(e.firstChild),dt=t,Ee=!0,ql=null,Xt=!0,l=ld(t,null,a,l),t.child=l;l;)l.flags=l.flags&-3|4096,l=l.sibling}else{if(ma(),a===n){t=gl(e,t,l);break e}mt(e,t,a,l)}t=t.child}return t;case 26:return ri(e,t),e===null?(l=Nm(t.type,null,t.pendingProps,null))?t.memoizedState=l:Ee||(l=t.type,e=t.pendingProps,a=wi(me.current).createElement(l),a[ot]=t,a[yt]=e,ht(a,l,e),ut(a),t.stateNode=a):t.memoizedState=Nm(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return tl(t),e===null&&Ee&&(a=t.stateNode=ym(t.type,t.pendingProps,me.current),dt=t,Xt=!0,n=Qe,Pl(t.type)?(Ir=n,Qe=$t(a.firstChild)):Qe=n),mt(e,t,t.pendingProps.children,l),ri(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Ee&&((n=a=Qe)&&(a=Ix(a,t.type,t.pendingProps,Xt),a!==null?(t.stateNode=a,dt=t,Qe=$t(a.firstChild),Xt=!1,n=!0):n=!1),n||Hl(t)),tl(t),n=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,a=i.children,Kr(n,i)?a=null:o!==null&&Kr(n,o)&&(t.flags|=32),t.memoizedState!==null&&(n=$u(e,t,hx,null,null,l),is._currentValue=n),ri(e,t),mt(e,t,a,l),t.child;case 6:return e===null&&Ee&&((e=l=Qe)&&(l=ep(l,t.pendingProps,Xt),l!==null?(t.stateNode=l,dt=t,Qe=null,e=!0):e=!1),e||Hl(t)),null;case 13:return cf(e,t,l);case 4:return et(t,t.stateNode.containerInfo),a=t.pendingProps,e===null?t.child=ba(t,null,a,l):mt(e,t,a,l),t.child;case 11:return Id(e,t,t.type,t.pendingProps,l);case 7:return mt(e,t,t.pendingProps,l),t.child;case 8:return mt(e,t,t.pendingProps.children,l),t.child;case 12:return mt(e,t,t.pendingProps.children,l),t.child;case 10:return a=t.pendingProps,Ll(t,t.type,a.value),mt(e,t,a.children,l),t.child;case 9:return n=t.type._context,a=t.pendingProps.children,xa(t),n=ft(n),a=a(n),t.flags|=1,mt(e,t,a,l),t.child;case 14:return ef(e,t,t.type,t.pendingProps,l);case 15:return tf(e,t,t.type,t.pendingProps,l);case 19:return df(e,t,l);case 31:return Sx(e,t,l);case 22:return lf(e,t,l,t.pendingProps);case 24:return xa(t),a=ft(lt),e===null?(n=Hu(),n===null&&(n=ke,i=Uu(),n.pooledCache=i,i.refCount++,i!==null&&(n.pooledCacheLanes|=l),n=i),t.memoizedState={parent:a,cache:n},Bu(t),Ll(t,lt,n)):((e.lanes&l)!==0&&(ku(e,t),kn(t,null,null,l),Bn()),n=e.memoizedState,i=t.memoizedState,n.parent!==a?(n={parent:a,cache:a},t.memoizedState=n,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=n),Ll(t,lt,a)):(a=i.cache,Ll(t,lt,a),a!==n.cache&&Ou(t,[lt],l,!0))),mt(e,t,t.pendingProps.children,l),t.child;case 29:throw t.pendingProps}throw Error(r(156,t.tag))}function bl(e){e.flags|=4}function jr(e,t,l,a,n){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(n&335544128)===n)if(e.stateNode.complete)e.flags|=8192;else if(Bf())e.flags|=8192;else throw ga=$s,Lu}else e.flags&=-16777217}function mf(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Rm(t))if(Bf())e.flags|=8192;else throw ga=$s,Lu}function oi(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Vc():536870912,e.lanes|=t,en|=t)}function Zn(e,t){if(!Ee)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 Ve(e){var t=e.alternate!==null&&e.alternate.child===e.child,l=0,a=0;if(t)for(var n=e.child;n!==null;)l|=n.lanes|n.childLanes,a|=n.subtreeFlags&65011712,a|=n.flags&65011712,n.return=e,n=n.sibling;else for(n=e.child;n!==null;)l|=n.lanes|n.childLanes,a|=n.subtreeFlags,a|=n.flags,n.return=e,n=n.sibling;return e.subtreeFlags|=a,e.childLanes=l,t}function Ex(e,t,l){var a=t.pendingProps;switch(Au(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ve(t),null;case 1:return Ve(t),null;case 3:return l=t.stateNode,a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),xl(lt),Ye(),l.pendingContext&&(l.context=l.pendingContext,l.pendingContext=null),(e===null||e.child===null)&&(Ya(t)?bl(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,_u())),Ve(t),null;case 26:var n=t.type,i=t.memoizedState;return e===null?(bl(t),i!==null?(Ve(t),mf(t,i)):(Ve(t),jr(t,n,null,a,l))):i?i!==e.memoizedState?(bl(t),Ve(t),mf(t,i)):(Ve(t),t.flags&=-16777217):(e=e.memoizedProps,e!==a&&bl(t),Ve(t),jr(t,n,e,a,l)),null;case 27:if(T(t),l=me.current,n=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==a&&bl(t);else{if(!a){if(t.stateNode===null)throw Error(r(166));return Ve(t),null}e=I.current,Ya(t)?Xo(t):(e=ym(n,a,l),t.stateNode=e,bl(t))}return Ve(t),null;case 5:if(T(t),n=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==a&&bl(t);else{if(!a){if(t.stateNode===null)throw Error(r(166));return Ve(t),null}if(i=I.current,Ya(t))Xo(t);else{var o=wi(me.current);switch(i){case 1:i=o.createElementNS("http://www.w3.org/2000/svg",n);break;case 2:i=o.createElementNS("http://www.w3.org/1998/Math/MathML",n);break;default:switch(n){case"svg":i=o.createElementNS("http://www.w3.org/2000/svg",n);break;case"math":i=o.createElementNS("http://www.w3.org/1998/Math/MathML",n);break;case"script":i=o.createElement("div"),i.innerHTML="<script><\/script>",i=i.removeChild(i.firstChild);break;case"select":i=typeof a.is=="string"?o.createElement("select",{is:a.is}):o.createElement("select"),a.multiple?i.multiple=!0:a.size&&(i.size=a.size);break;default:i=typeof a.is=="string"?o.createElement(n,{is:a.is}):o.createElement(n)}}i[ot]=t,i[yt]=a;e:for(o=t.child;o!==null;){if(o.tag===5||o.tag===6)i.appendChild(o.stateNode);else if(o.tag!==4&&o.tag!==27&&o.child!==null){o.child.return=o,o=o.child;continue}if(o===t)break e;for(;o.sibling===null;){if(o.return===null||o.return===t)break e;o=o.return}o.sibling.return=o.return,o=o.sibling}t.stateNode=i;e:switch(ht(i,n,a),n){case"button":case"input":case"select":case"textarea":a=!!a.autoFocus;break e;case"img":a=!0;break e;default:a=!1}a&&bl(t)}}return Ve(t),jr(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,l),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==a&&bl(t);else{if(typeof a!="string"&&t.stateNode===null)throw Error(r(166));if(e=me.current,Ya(t)){if(e=t.stateNode,l=t.memoizedProps,a=null,n=dt,n!==null)switch(n.tag){case 27:case 5:a=n.memoizedProps}e[ot]=t,e=!!(e.nodeValue===l||a!==null&&a.suppressHydrationWarning===!0||cm(e.nodeValue,l)),e||Hl(t,!0)}else e=wi(e).createTextNode(a),e[ot]=t,t.stateNode=e}return Ve(t),null;case 31:if(l=t.memoizedState,e===null||e.memoizedState!==null){if(a=Ya(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[ot]=t}else ma(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Ve(t),e=!1}else l=_u(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=l),e=!0;if(!e)return t.flags&256?(zt(t),t):(zt(t),null);if((t.flags&128)!==0)throw Error(r(558))}return Ve(t),null;case 13:if(a=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(n=Ya(t),a!==null&&a.dehydrated!==null){if(e===null){if(!n)throw Error(r(318));if(n=t.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(r(317));n[ot]=t}else ma(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Ve(t),n=!1}else n=_u(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),n=!0;if(!n)return t.flags&256?(zt(t),t):(zt(t),null)}return zt(t),(t.flags&128)!==0?(t.lanes=l,t):(l=a!==null,e=e!==null&&e.memoizedState!==null,l&&(a=t.child,n=null,a.alternate!==null&&a.alternate.memoizedState!==null&&a.alternate.memoizedState.cachePool!==null&&(n=a.alternate.memoizedState.cachePool.pool),i=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(i=a.memoizedState.cachePool.pool),i!==n&&(a.flags|=2048)),l!==e&&l&&(t.child.flags|=8192),oi(t,t.updateQueue),Ve(t),null);case 4:return Ye(),e===null&&Qr(t.stateNode.containerInfo),Ve(t),null;case 10:return xl(t.type),Ve(t),null;case 19:if(L(We),a=t.memoizedState,a===null)return Ve(t),null;if(n=(t.flags&128)!==0,i=a.rendering,i===null)if(n)Zn(a,!1);else{if(Pe!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(i=Ps(e),i!==null){for(t.flags|=128,Zn(a,!1),e=i.updateQueue,t.updateQueue=e,oi(t,e),t.subtreeFlags=0,e=l,l=t.child;l!==null;)ko(l,e),l=l.sibling;return J(We,We.current&1|2),Ee&&ml(t,a.treeForkCount),t.child}e=e.sibling}a.tail!==null&&Je()>xi&&(t.flags|=128,n=!0,Zn(a,!1),t.lanes=4194304)}else{if(!n)if(e=Ps(i),e!==null){if(t.flags|=128,n=!0,e=e.updateQueue,t.updateQueue=e,oi(t,e),Zn(a,!0),a.tail===null&&a.tailMode==="hidden"&&!i.alternate&&!Ee)return Ve(t),null}else 2*Je()-a.renderingStartTime>xi&&l!==536870912&&(t.flags|=128,n=!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=Je(),e.sibling=null,l=We.current,J(We,n?l&1|2:l&1),Ee&&ml(t,a.treeForkCount),e):(Ve(t),null);case 22:case 23:return zt(t),Vu(),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&&(Ve(t),t.subtreeFlags&6&&(t.flags|=8192)):Ve(t),l=t.updateQueue,l!==null&&oi(t,l.retryQueue),l=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(l=e.memoizedState.cachePool.pool),a=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(a=t.memoizedState.cachePool.pool),a!==l&&(t.flags|=2048),e!==null&&L(pa),null;case 24:return l=null,e!==null&&(l=e.memoizedState.cache),t.memoizedState.cache!==l&&(t.flags|=2048),xl(lt),Ve(t),null;case 25:return null;case 30:return null}throw Error(r(156,t.tag))}function wx(e,t){switch(Au(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return xl(lt),Ye(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return T(t),null;case 31:if(t.memoizedState!==null){if(zt(t),t.alternate===null)throw Error(r(340));ma()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(zt(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(r(340));ma()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return L(We),null;case 4:return Ye(),null;case 10:return xl(t.type),null;case 22:case 23:return zt(t),Vu(),e!==null&&L(pa),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return xl(lt),null;case 25:return null;default:return null}}function hf(e,t){switch(Au(t),t.tag){case 3:xl(lt),Ye();break;case 26:case 27:case 5:T(t);break;case 4:Ye();break;case 31:t.memoizedState!==null&&zt(t);break;case 13:zt(t);break;case 19:L(We);break;case 10:xl(t.type);break;case 22:case 23:zt(t),Vu(),e!==null&&L(pa);break;case 24:xl(lt)}}function $n(e,t){try{var l=t.updateQueue,a=l!==null?l.lastEffect:null;if(a!==null){var n=a.next;l=n;do{if((l.tag&e)===e){a=void 0;var i=l.create,o=l.inst;a=i(),o.destroy=a}l=l.next}while(l!==n)}}catch(h){Ue(t,t.return,h)}}function Vl(e,t,l){try{var a=t.updateQueue,n=a!==null?a.lastEffect:null;if(n!==null){var i=n.next;a=i;do{if((a.tag&e)===e){var o=a.inst,h=o.destroy;if(h!==void 0){o.destroy=void 0,n=t;var j=l,A=h;try{A()}catch(H){Ue(n,j,H)}}}a=a.next}while(a!==i)}}catch(H){Ue(t,t.return,H)}}function xf(e){var t=e.updateQueue;if(t!==null){var l=e.stateNode;try{nd(t,l)}catch(a){Ue(e,e.return,a)}}}function pf(e,t,l){l.props=ja(e.type,e.memoizedProps),l.state=e.memoizedState;try{l.componentWillUnmount()}catch(a){Ue(e,t,a)}}function Kn(e,t){try{var l=e.ref;if(l!==null){switch(e.tag){case 26:case 27:case 5:var a=e.stateNode;break;case 30:a=e.stateNode;break;default:a=e.stateNode}typeof l=="function"?e.refCleanup=l(a):l.current=a}}catch(n){Ue(e,t,n)}}function il(e,t){var l=e.ref,a=e.refCleanup;if(l!==null)if(typeof a=="function")try{a()}catch(n){Ue(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof l=="function")try{l(null)}catch(n){Ue(e,t,n)}else l.current=null}function vf(e){var t=e.type,l=e.memoizedProps,a=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":l.autoFocus&&a.focus();break e;case"img":l.src?a.src=l.src:l.srcSet&&(a.srcset=l.srcSet)}}catch(n){Ue(e,e.return,n)}}function Sr(e,t,l){try{var a=e.stateNode;$x(a,e.type,l,t),a[yt]=t}catch(n){Ue(e,e.return,n)}}function gf(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Pl(e.type)||e.tag===4}function Nr(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||gf(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&&Pl(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 Er(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=ol));else if(a!==4&&(a===27&&Pl(e.type)&&(l=e.stateNode,t=null),e=e.child,e!==null))for(Er(e,t,l),e=e.sibling;e!==null;)Er(e,t,l),e=e.sibling}function di(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&&Pl(e.type)&&(l=e.stateNode),e=e.child,e!==null))for(di(e,t,l),e=e.sibling;e!==null;)di(e,t,l),e=e.sibling}function bf(e){var t=e.stateNode,l=e.memoizedProps;try{for(var a=e.type,n=t.attributes;n.length;)t.removeAttributeNode(n[0]);ht(t,a,l),t[ot]=e,t[yt]=l}catch(i){Ue(e,e.return,i)}}var yl=!1,st=!1,wr=!1,yf=typeof WeakSet=="function"?WeakSet:Set,rt=null;function Tx(e,t){if(e=e.containerInfo,Zr=Di,e=_o(e),gu(e)){if("selectionStart"in e)var l={start:e.selectionStart,end:e.selectionEnd};else e:{l=(l=e.ownerDocument)&&l.defaultView||window;var a=l.getSelection&&l.getSelection();if(a&&a.rangeCount!==0){l=a.anchorNode;var n=a.anchorOffset,i=a.focusNode;a=a.focusOffset;try{l.nodeType,i.nodeType}catch{l=null;break e}var o=0,h=-1,j=-1,A=0,H=0,G=e,M=null;t:for(;;){for(var O;G!==l||n!==0&&G.nodeType!==3||(h=o+n),G!==i||a!==0&&G.nodeType!==3||(j=o+a),G.nodeType===3&&(o+=G.nodeValue.length),(O=G.firstChild)!==null;)M=G,G=O;for(;;){if(G===e)break t;if(M===l&&++A===n&&(h=o),M===i&&++H===a&&(j=o),(O=G.nextSibling)!==null)break;G=M,M=G.parentNode}G=O}l=h===-1||j===-1?null:{start:h,end:j}}else l=null}l=l||{start:0,end:0}}else l=null;for($r={focusedElem:e,selectionRange:l},Di=!1,rt=t;rt!==null;)if(t=rt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,rt=e;else for(;rt!==null;){switch(t=rt,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++)n=e[l],n.ref.impl=n.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&i!==null){e=void 0,l=t,n=i.memoizedProps,i=i.memoizedState,a=l.stateNode;try{var ee=ja(l.type,n);e=a.getSnapshotBeforeUpdate(ee,i),a.__reactInternalSnapshotBeforeUpdate=e}catch(re){Ue(l,l.return,re)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,l=e.nodeType,l===9)Fr(e);else if(l===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Fr(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,rt=e;break}rt=t.return}}function jf(e,t,l){var a=l.flags;switch(l.tag){case 0:case 11:case 15:Sl(e,l),a&4&&$n(5,l);break;case 1:if(Sl(e,l),a&4)if(e=l.stateNode,t===null)try{e.componentDidMount()}catch(o){Ue(l,l.return,o)}else{var n=ja(l.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(n,t,e.__reactInternalSnapshotBeforeUpdate)}catch(o){Ue(l,l.return,o)}}a&64&&xf(l),a&512&&Kn(l,l.return);break;case 3:if(Sl(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{nd(e,t)}catch(o){Ue(l,l.return,o)}}break;case 27:t===null&&a&4&&bf(l);case 26:case 5:Sl(e,l),t===null&&a&4&&vf(l),a&512&&Kn(l,l.return);break;case 12:Sl(e,l);break;case 31:Sl(e,l),a&4&&Ef(e,l);break;case 13:Sl(e,l),a&4&&wf(e,l),a&64&&(e=l.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(l=Ux.bind(null,l),tp(e,l))));break;case 22:if(a=l.memoizedState!==null||yl,!a){t=t!==null&&t.memoizedState!==null||st,n=yl;var i=st;yl=a,(st=t)&&!i?Nl(e,l,(l.subtreeFlags&8772)!==0):Sl(e,l),yl=n,st=i}break;case 30:break;default:Sl(e,l)}}function Sf(e){var t=e.alternate;t!==null&&(e.alternate=null,Sf(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&tu(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 Xe=null,St=!1;function jl(e,t,l){for(l=l.child;l!==null;)Nf(e,t,l),l=l.sibling}function Nf(e,t,l){if(Rt&&typeof Rt.onCommitFiberUnmount=="function")try{Rt.onCommitFiberUnmount(gn,l)}catch{}switch(l.tag){case 26:st||il(l,t),jl(e,t,l),l.memoizedState?l.memoizedState.count--:l.stateNode&&(l=l.stateNode,l.parentNode.removeChild(l));break;case 27:st||il(l,t);var a=Xe,n=St;Pl(l.type)&&(Xe=l.stateNode,St=!1),jl(e,t,l),as(l.stateNode),Xe=a,St=n;break;case 5:st||il(l,t);case 6:if(a=Xe,n=St,Xe=null,jl(e,t,l),Xe=a,St=n,Xe!==null)if(St)try{(Xe.nodeType===9?Xe.body:Xe.nodeName==="HTML"?Xe.ownerDocument.body:Xe).removeChild(l.stateNode)}catch(i){Ue(l,t,i)}else try{Xe.removeChild(l.stateNode)}catch(i){Ue(l,t,i)}break;case 18:Xe!==null&&(St?(e=Xe,xm(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,l.stateNode),cn(e)):xm(Xe,l.stateNode));break;case 4:a=Xe,n=St,Xe=l.stateNode.containerInfo,St=!0,jl(e,t,l),Xe=a,St=n;break;case 0:case 11:case 14:case 15:Vl(2,l,t),st||Vl(4,l,t),jl(e,t,l);break;case 1:st||(il(l,t),a=l.stateNode,typeof a.componentWillUnmount=="function"&&pf(l,t,a)),jl(e,t,l);break;case 21:jl(e,t,l);break;case 22:st=(a=st)||l.memoizedState!==null,jl(e,t,l),st=a;break;default:jl(e,t,l)}}function Ef(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{cn(e)}catch(l){Ue(t,t.return,l)}}}function wf(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{cn(e)}catch(l){Ue(t,t.return,l)}}function Cx(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new yf),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new yf),t;default:throw Error(r(435,e.tag))}}function fi(e,t){var l=Cx(e);t.forEach(function(a){if(!l.has(a)){l.add(a);var n=qx.bind(null,e,a);a.then(n,n)}})}function Nt(e,t){var l=t.deletions;if(l!==null)for(var a=0;a<l.length;a++){var n=l[a],i=e,o=t,h=o;e:for(;h!==null;){switch(h.tag){case 27:if(Pl(h.type)){Xe=h.stateNode,St=!1;break e}break;case 5:Xe=h.stateNode,St=!1;break e;case 3:case 4:Xe=h.stateNode.containerInfo,St=!0;break e}h=h.return}if(Xe===null)throw Error(r(160));Nf(i,o,n),Xe=null,St=!1,i=n.alternate,i!==null&&(i.return=null),n.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Tf(t,e),t=t.sibling}var Wt=null;function Tf(e,t){var l=e.alternate,a=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Nt(t,e),Et(e),a&4&&(Vl(3,e,e.return),$n(3,e),Vl(5,e,e.return));break;case 1:Nt(t,e),Et(e),a&512&&(st||l===null||il(l,l.return)),a&64&&yl&&(e=e.updateQueue,e!==null&&(a=e.callbacks,a!==null&&(l=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=l===null?a:l.concat(a))));break;case 26:var n=Wt;if(Nt(t,e),Et(e),a&512&&(st||l===null||il(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,n=n.ownerDocument||n;t:switch(a){case"title":i=n.getElementsByTagName("title")[0],(!i||i[jn]||i[ot]||i.namespaceURI==="http://www.w3.org/2000/svg"||i.hasAttribute("itemprop"))&&(i=n.createElement(a),n.head.insertBefore(i,n.querySelector("head > title"))),ht(i,a,l),i[ot]=e,ut(i),a=i;break e;case"link":var o=Tm("link","href",n).get(a+(l.href||""));if(o){for(var h=0;h<o.length;h++)if(i=o[h],i.getAttribute("href")===(l.href==null||l.href===""?null:l.href)&&i.getAttribute("rel")===(l.rel==null?null:l.rel)&&i.getAttribute("title")===(l.title==null?null:l.title)&&i.getAttribute("crossorigin")===(l.crossOrigin==null?null:l.crossOrigin)){o.splice(h,1);break t}}i=n.createElement(a),ht(i,a,l),n.head.appendChild(i);break;case"meta":if(o=Tm("meta","content",n).get(a+(l.content||""))){for(h=0;h<o.length;h++)if(i=o[h],i.getAttribute("content")===(l.content==null?null:""+l.content)&&i.getAttribute("name")===(l.name==null?null:l.name)&&i.getAttribute("property")===(l.property==null?null:l.property)&&i.getAttribute("http-equiv")===(l.httpEquiv==null?null:l.httpEquiv)&&i.getAttribute("charset")===(l.charSet==null?null:l.charSet)){o.splice(h,1);break t}}i=n.createElement(a),ht(i,a,l),n.head.appendChild(i);break;default:throw Error(r(468,a))}i[ot]=e,ut(i),a=i}e.stateNode=a}else Cm(n,e.type,e.stateNode);else e.stateNode=wm(n,a,e.memoizedProps);else i!==a?(i===null?l.stateNode!==null&&(l=l.stateNode,l.parentNode.removeChild(l)):i.count--,a===null?Cm(n,e.type,e.stateNode):wm(n,a,e.memoizedProps)):a===null&&e.stateNode!==null&&Sr(e,e.memoizedProps,l.memoizedProps)}break;case 27:Nt(t,e),Et(e),a&512&&(st||l===null||il(l,l.return)),l!==null&&a&4&&Sr(e,e.memoizedProps,l.memoizedProps);break;case 5:if(Nt(t,e),Et(e),a&512&&(st||l===null||il(l,l.return)),e.flags&32){n=e.stateNode;try{_a(n,"")}catch(ee){Ue(e,e.return,ee)}}a&4&&e.stateNode!=null&&(n=e.memoizedProps,Sr(e,n,l!==null?l.memoizedProps:n)),a&1024&&(wr=!0);break;case 6:if(Nt(t,e),Et(e),a&4){if(e.stateNode===null)throw Error(r(162));a=e.memoizedProps,l=e.stateNode;try{l.nodeValue=a}catch(ee){Ue(e,e.return,ee)}}break;case 3:if(Ri=null,n=Wt,Wt=Ti(t.containerInfo),Nt(t,e),Wt=n,Et(e),a&4&&l!==null&&l.memoizedState.isDehydrated)try{cn(t.containerInfo)}catch(ee){Ue(e,e.return,ee)}wr&&(wr=!1,Cf(e));break;case 4:a=Wt,Wt=Ti(e.stateNode.containerInfo),Nt(t,e),Et(e),Wt=a;break;case 12:Nt(t,e),Et(e);break;case 31:Nt(t,e),Et(e),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,fi(e,a)));break;case 13:Nt(t,e),Et(e),e.child.flags&8192&&e.memoizedState!==null!=(l!==null&&l.memoizedState!==null)&&(hi=Je()),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,fi(e,a)));break;case 22:n=e.memoizedState!==null;var j=l!==null&&l.memoizedState!==null,A=yl,H=st;if(yl=A||n,st=H||j,Nt(t,e),st=H,yl=A,Et(e),a&8192)e:for(t=e.stateNode,t._visibility=n?t._visibility&-2:t._visibility|1,n&&(l===null||j||yl||st||Sa(e)),l=null,t=e;;){if(t.tag===5||t.tag===26){if(l===null){j=l=t;try{if(i=j.stateNode,n)o=i.style,typeof o.setProperty=="function"?o.setProperty("display","none","important"):o.display="none";else{h=j.stateNode;var G=j.memoizedProps.style,M=G!=null&&G.hasOwnProperty("display")?G.display:null;h.style.display=M==null||typeof M=="boolean"?"":(""+M).trim()}}catch(ee){Ue(j,j.return,ee)}}}else if(t.tag===6){if(l===null){j=t;try{j.stateNode.nodeValue=n?"":j.memoizedProps}catch(ee){Ue(j,j.return,ee)}}}else if(t.tag===18){if(l===null){j=t;try{var O=j.stateNode;n?pm(O,!0):pm(j.stateNode,!1)}catch(ee){Ue(j,j.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,fi(e,l))));break;case 19:Nt(t,e),Et(e),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,fi(e,a)));break;case 30:break;case 21:break;default:Nt(t,e),Et(e)}}function Et(e){var t=e.flags;if(t&2){try{for(var l,a=e.return;a!==null;){if(gf(a)){l=a;break}a=a.return}if(l==null)throw Error(r(160));switch(l.tag){case 27:var n=l.stateNode,i=Nr(e);di(e,i,n);break;case 5:var o=l.stateNode;l.flags&32&&(_a(o,""),l.flags&=-33);var h=Nr(e);di(e,h,o);break;case 3:case 4:var j=l.stateNode.containerInfo,A=Nr(e);Er(e,A,j);break;default:throw Error(r(161))}}catch(H){Ue(e,e.return,H)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Cf(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Cf(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function Sl(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)jf(e,t.alternate,t),t=t.sibling}function Sa(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Vl(4,t,t.return),Sa(t);break;case 1:il(t,t.return);var l=t.stateNode;typeof l.componentWillUnmount=="function"&&pf(t,t.return,l),Sa(t);break;case 27:as(t.stateNode);case 26:case 5:il(t,t.return),Sa(t);break;case 22:t.memoizedState===null&&Sa(t);break;case 30:Sa(t);break;default:Sa(t)}e=e.sibling}}function Nl(e,t,l){for(l=l&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var a=t.alternate,n=e,i=t,o=i.flags;switch(i.tag){case 0:case 11:case 15:Nl(n,i,l),$n(4,i);break;case 1:if(Nl(n,i,l),a=i,n=a.stateNode,typeof n.componentDidMount=="function")try{n.componentDidMount()}catch(A){Ue(a,a.return,A)}if(a=i,n=a.updateQueue,n!==null){var h=a.stateNode;try{var j=n.shared.hiddenCallbacks;if(j!==null)for(n.shared.hiddenCallbacks=null,n=0;n<j.length;n++)ad(j[n],h)}catch(A){Ue(a,a.return,A)}}l&&o&64&&xf(i),Kn(i,i.return);break;case 27:bf(i);case 26:case 5:Nl(n,i,l),l&&a===null&&o&4&&vf(i),Kn(i,i.return);break;case 12:Nl(n,i,l);break;case 31:Nl(n,i,l),l&&o&4&&Ef(n,i);break;case 13:Nl(n,i,l),l&&o&4&&wf(n,i);break;case 22:i.memoizedState===null&&Nl(n,i,l),Kn(i,i.return);break;case 30:break;default:Nl(n,i,l)}t=t.sibling}}function Tr(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&&On(l))}function Cr(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&On(e))}function It(e,t,l,a){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Rf(e,t,l,a),t=t.sibling}function Rf(e,t,l,a){var n=t.flags;switch(t.tag){case 0:case 11:case 15:It(e,t,l,a),n&2048&&$n(9,t);break;case 1:It(e,t,l,a);break;case 3:It(e,t,l,a),n&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&On(e)));break;case 12:if(n&2048){It(e,t,l,a),e=t.stateNode;try{var i=t.memoizedProps,o=i.id,h=i.onPostCommit;typeof h=="function"&&h(o,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(j){Ue(t,t.return,j)}}else It(e,t,l,a);break;case 31:It(e,t,l,a);break;case 13:It(e,t,l,a);break;case 23:break;case 22:i=t.stateNode,o=t.alternate,t.memoizedState!==null?i._visibility&2?It(e,t,l,a):Jn(e,t):i._visibility&2?It(e,t,l,a):(i._visibility|=2,Pa(e,t,l,a,(t.subtreeFlags&10256)!==0||!1)),n&2048&&Tr(o,t);break;case 24:It(e,t,l,a),n&2048&&Cr(t.alternate,t);break;default:It(e,t,l,a)}}function Pa(e,t,l,a,n){for(n=n&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var i=e,o=t,h=l,j=a,A=o.flags;switch(o.tag){case 0:case 11:case 15:Pa(i,o,h,j,n),$n(8,o);break;case 23:break;case 22:var H=o.stateNode;o.memoizedState!==null?H._visibility&2?Pa(i,o,h,j,n):Jn(i,o):(H._visibility|=2,Pa(i,o,h,j,n)),n&&A&2048&&Tr(o.alternate,o);break;case 24:Pa(i,o,h,j,n),n&&A&2048&&Cr(o.alternate,o);break;default:Pa(i,o,h,j,n)}t=t.sibling}}function Jn(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var l=e,a=t,n=a.flags;switch(a.tag){case 22:Jn(l,a),n&2048&&Tr(a.alternate,a);break;case 24:Jn(l,a),n&2048&&Cr(a.alternate,a);break;default:Jn(l,a)}t=t.sibling}}var Fn=8192;function Wa(e,t,l){if(e.subtreeFlags&Fn)for(e=e.child;e!==null;)Af(e,t,l),e=e.sibling}function Af(e,t,l){switch(e.tag){case 26:Wa(e,t,l),e.flags&Fn&&e.memoizedState!==null&&mp(l,Wt,e.memoizedState,e.memoizedProps);break;case 5:Wa(e,t,l);break;case 3:case 4:var a=Wt;Wt=Ti(e.stateNode.containerInfo),Wa(e,t,l),Wt=a;break;case 22:e.memoizedState===null&&(a=e.alternate,a!==null&&a.memoizedState!==null?(a=Fn,Fn=16777216,Wa(e,t,l),Fn=a):Wa(e,t,l));break;default:Wa(e,t,l)}}function Mf(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function Pn(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];rt=a,Df(a,e)}Mf(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)_f(e),e=e.sibling}function _f(e){switch(e.tag){case 0:case 11:case 15:Pn(e),e.flags&2048&&Vl(9,e,e.return);break;case 3:Pn(e);break;case 12:Pn(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,mi(e)):Pn(e);break;default:Pn(e)}}function mi(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var l=0;l<t.length;l++){var a=t[l];rt=a,Df(a,e)}Mf(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Vl(8,t,t.return),mi(t);break;case 22:l=t.stateNode,l._visibility&2&&(l._visibility&=-3,mi(t));break;default:mi(t)}e=e.sibling}}function Df(e,t){for(;rt!==null;){var l=rt;switch(l.tag){case 0:case 11:case 15:Vl(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:On(l.memoizedState.cache)}if(a=l.child,a!==null)a.return=l,rt=a;else e:for(l=e;rt!==null;){a=rt;var n=a.sibling,i=a.return;if(Sf(a),a===l){rt=null;break e}if(n!==null){n.return=i,rt=n;break e}rt=i}}}var Rx={getCacheForType:function(e){var t=ft(lt),l=t.data.get(e);return l===void 0&&(l=e(),t.data.set(e,l)),l},cacheSignal:function(){return ft(lt).controller.signal}},Ax=typeof WeakMap=="function"?WeakMap:Map,De=0,ke=null,ve=null,je=0,Oe=0,Ot=null,Xl=!1,Ia=!1,Rr=!1,El=0,Pe=0,Zl=0,Na=0,Ar=0,Ut=0,en=0,Wn=null,wt=null,Mr=!1,hi=0,zf=0,xi=1/0,pi=null,$l=null,it=0,Kl=null,tn=null,wl=0,_r=0,Dr=null,Of=null,In=0,zr=null;function qt(){return(De&2)!==0&&je!==0?je&-je:q.T!==null?Br():Kc()}function Uf(){if(Ut===0)if((je&536870912)===0||Ee){var e=Es;Es<<=1,(Es&3932160)===0&&(Es=262144),Ut=e}else Ut=536870912;return e=Dt.current,e!==null&&(e.flags|=32),Ut}function Tt(e,t,l){(e===ke&&(Oe===2||Oe===9)||e.cancelPendingCommit!==null)&&(ln(e,0),Jl(e,je,Ut,!1)),yn(e,l),((De&2)===0||e!==ke)&&(e===ke&&((De&2)===0&&(Na|=l),Pe===4&&Jl(e,je,Ut,!1)),ul(e))}function qf(e,t,l){if((De&6)!==0)throw Error(r(327));var a=!l&&(t&127)===0&&(t&e.expiredLanes)===0||bn(e,t),n=a?Dx(e,t):Ur(e,t,!0),i=a;do{if(n===0){Ia&&!a&&Jl(e,t,0,!1);break}else{if(l=e.current.alternate,i&&!Mx(l)){n=Ur(e,t,!1),i=!1;continue}if(n===2){if(i=t,e.errorRecoveryDisabledLanes&i)var o=0;else o=e.pendingLanes&-536870913,o=o!==0?o:o&536870912?536870912:0;if(o!==0){t=o;e:{var h=e;n=Wn;var j=h.current.memoizedState.isDehydrated;if(j&&(ln(h,o).flags|=256),o=Ur(h,o,!1),o!==2){if(Rr&&!j){h.errorRecoveryDisabledLanes|=i,Na|=i,n=4;break e}i=wt,wt=n,i!==null&&(wt===null?wt=i:wt.push.apply(wt,i))}n=o}if(i=!1,n!==2)continue}}if(n===1){ln(e,0),Jl(e,t,0,!0);break}e:{switch(a=e,i=n,i){case 0:case 1:throw Error(r(345));case 4:if((t&4194048)!==t)break;case 6:Jl(a,t,Ut,!Xl);break e;case 2:wt=null;break;case 3:case 5:break;default:throw Error(r(329))}if((t&62914560)===t&&(n=hi+300-Je(),10<n)){if(Jl(a,t,Ut,!Xl),Ts(a,0,!0)!==0)break e;wl=t,a.timeoutHandle=mm(Hf.bind(null,a,l,wt,pi,Mr,t,Ut,Na,en,Xl,i,"Throttled",-0,0),n);break e}Hf(a,l,wt,pi,Mr,t,Ut,Na,en,Xl,i,null,-0,0)}}break}while(!0);ul(e)}function Hf(e,t,l,a,n,i,o,h,j,A,H,G,M,O){if(e.timeoutHandle=-1,G=t.subtreeFlags,G&8192||(G&16785408)===16785408){G={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:ol},Af(t,i,G);var ee=(i&62914560)===i?hi-Je():(i&4194048)===i?zf-Je():0;if(ee=hp(G,ee),ee!==null){wl=i,e.cancelPendingCommit=ee(Xf.bind(null,e,t,i,l,a,n,o,h,j,H,G,null,M,O)),Jl(e,i,o,!A);return}}Xf(e,t,i,l,a,n,o,h,j)}function Mx(e){for(var t=e;;){var l=t.tag;if((l===0||l===11||l===15)&&t.flags&16384&&(l=t.updateQueue,l!==null&&(l=l.stores,l!==null)))for(var a=0;a<l.length;a++){var n=l[a],i=n.getSnapshot;n=n.value;try{if(!Mt(i(),n))return!1}catch{return!1}}if(l=t.child,t.subtreeFlags&16384&&l!==null)l.return=t,t=l;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Jl(e,t,l,a){t&=~Ar,t&=~Na,e.suspendedLanes|=t,e.pingedLanes&=~t,a&&(e.warmLanes|=t),a=e.expirationTimes;for(var n=t;0<n;){var i=31-At(n),o=1<<i;a[i]=-1,n&=~o}l!==0&&Xc(e,l,t)}function vi(){return(De&6)===0?(es(0),!1):!0}function Or(){if(ve!==null){if(Oe===0)var e=ve.return;else e=ve,hl=ha=null,Fu(e),Za=null,qn=0,e=ve;for(;e!==null;)hf(e.alternate,e),e=e.return;ve=null}}function ln(e,t){var l=e.timeoutHandle;l!==-1&&(e.timeoutHandle=-1,Fx(l)),l=e.cancelPendingCommit,l!==null&&(e.cancelPendingCommit=null,l()),wl=0,Or(),ke=e,ve=l=fl(e.current,null),je=t,Oe=0,Ot=null,Xl=!1,Ia=bn(e,t),Rr=!1,en=Ut=Ar=Na=Zl=Pe=0,wt=Wn=null,Mr=!1,(t&8)!==0&&(t|=t&32);var a=e.entangledLanes;if(a!==0)for(e=e.entanglements,a&=t;0<a;){var n=31-At(a),i=1<<n;t|=e[n],a&=~i}return El=t,Ls(),l}function Lf(e,t){he=null,q.H=Vn,t===Xa||t===Zs?(t=Io(),Oe=3):t===Lu?(t=Io(),Oe=4):Oe=t===fr?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,Ot=t,ve===null&&(Pe=1,ii(e,Gt(t,e.current)))}function Bf(){var e=Dt.current;return e===null?!0:(je&4194048)===je?Zt===null:(je&62914560)===je||(je&536870912)!==0?e===Zt:!1}function kf(){var e=q.H;return q.H=Vn,e===null?Vn:e}function Yf(){var e=q.A;return q.A=Rx,e}function gi(){Pe=4,Xl||(je&4194048)!==je&&Dt.current!==null||(Ia=!0),(Zl&134217727)===0&&(Na&134217727)===0||ke===null||Jl(ke,je,Ut,!1)}function Ur(e,t,l){var a=De;De|=2;var n=kf(),i=Yf();(ke!==e||je!==t)&&(pi=null,ln(e,t)),t=!1;var o=Pe;e:do try{if(Oe!==0&&ve!==null){var h=ve,j=Ot;switch(Oe){case 8:Or(),o=6;break e;case 3:case 2:case 9:case 6:Dt.current===null&&(t=!0);var A=Oe;if(Oe=0,Ot=null,an(e,h,j,A),l&&Ia){o=0;break e}break;default:A=Oe,Oe=0,Ot=null,an(e,h,j,A)}}_x(),o=Pe;break}catch(H){Lf(e,H)}while(!0);return t&&e.shellSuspendCounter++,hl=ha=null,De=a,q.H=n,q.A=i,ve===null&&(ke=null,je=0,Ls()),o}function _x(){for(;ve!==null;)Gf(ve)}function Dx(e,t){var l=De;De|=2;var a=kf(),n=Yf();ke!==e||je!==t?(pi=null,xi=Je()+500,ln(e,t)):Ia=bn(e,t);e:do try{if(Oe!==0&&ve!==null){t=ve;var i=Ot;t:switch(Oe){case 1:Oe=0,Ot=null,an(e,t,i,1);break;case 2:case 9:if(Po(i)){Oe=0,Ot=null,Qf(t);break}t=function(){Oe!==2&&Oe!==9||ke!==e||(Oe=7),ul(e)},i.then(t,t);break e;case 3:Oe=7;break e;case 4:Oe=5;break e;case 7:Po(i)?(Oe=0,Ot=null,Qf(t)):(Oe=0,Ot=null,an(e,t,i,7));break;case 5:var o=null;switch(ve.tag){case 26:o=ve.memoizedState;case 5:case 27:var h=ve;if(o?Rm(o):h.stateNode.complete){Oe=0,Ot=null;var j=h.sibling;if(j!==null)ve=j;else{var A=h.return;A!==null?(ve=A,bi(A)):ve=null}break t}}Oe=0,Ot=null,an(e,t,i,5);break;case 6:Oe=0,Ot=null,an(e,t,i,6);break;case 8:Or(),Pe=6;break e;default:throw Error(r(462))}}zx();break}catch(H){Lf(e,H)}while(!0);return hl=ha=null,q.H=a,q.A=n,De=l,ve!==null?0:(ke=null,je=0,Ls(),Pe)}function zx(){for(;ve!==null&&!ll();)Gf(ve)}function Gf(e){var t=ff(e.alternate,e,El);e.memoizedProps=e.pendingProps,t===null?bi(e):ve=t}function Qf(e){var t=e,l=t.alternate;switch(t.tag){case 15:case 0:t=sf(l,t,t.pendingProps,t.type,void 0,je);break;case 11:t=sf(l,t,t.pendingProps,t.type.render,t.ref,je);break;case 5:Fu(t);default:hf(l,t),t=ve=ko(t,El),t=ff(l,t,El)}e.memoizedProps=e.pendingProps,t===null?bi(e):ve=t}function an(e,t,l,a){hl=ha=null,Fu(t),Za=null,qn=0;var n=t.return;try{if(jx(e,n,t,l,je)){Pe=1,ii(e,Gt(l,e.current)),ve=null;return}}catch(i){if(n!==null)throw ve=n,i;Pe=1,ii(e,Gt(l,e.current)),ve=null;return}t.flags&32768?(Ee||a===1?e=!0:Ia||(je&536870912)!==0?e=!1:(Xl=e=!0,(a===2||a===9||a===3||a===6)&&(a=Dt.current,a!==null&&a.tag===13&&(a.flags|=16384))),Vf(t,e)):bi(t)}function bi(e){var t=e;do{if((t.flags&32768)!==0){Vf(t,Xl);return}e=t.return;var l=Ex(t.alternate,t,El);if(l!==null){ve=l;return}if(t=t.sibling,t!==null){ve=t;return}ve=t=e}while(t!==null);Pe===0&&(Pe=5)}function Vf(e,t){do{var l=wx(e.alternate,e);if(l!==null){l.flags&=32767,ve=l;return}if(l=e.return,l!==null&&(l.flags|=32768,l.subtreeFlags=0,l.deletions=null),!t&&(e=e.sibling,e!==null)){ve=e;return}ve=e=l}while(e!==null);Pe=6,ve=null}function Xf(e,t,l,a,n,i,o,h,j){e.cancelPendingCommit=null;do yi();while(it!==0);if((De&6)!==0)throw Error(r(327));if(t!==null){if(t===e.current)throw Error(r(177));if(i=t.lanes|t.childLanes,i|=Nu,f0(e,l,i,o,h,j),e===ke&&(ve=ke=null,je=0),tn=t,Kl=e,wl=l,_r=i,Dr=n,Of=a,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,Hx(Ss,function(){return Ff(),null})):(e.callbackNode=null,e.callbackPriority=0),a=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||a){a=q.T,q.T=null,n=K.p,K.p=2,o=De,De|=4;try{Tx(e,t,l)}finally{De=o,K.p=n,q.T=a}}it=1,Zf(),$f(),Kf()}}function Zf(){if(it===1){it=0;var e=Kl,t=tn,l=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||l){l=q.T,q.T=null;var a=K.p;K.p=2;var n=De;De|=4;try{Tf(t,e);var i=$r,o=_o(e.containerInfo),h=i.focusedElem,j=i.selectionRange;if(o!==h&&h&&h.ownerDocument&&Mo(h.ownerDocument.documentElement,h)){if(j!==null&&gu(h)){var A=j.start,H=j.end;if(H===void 0&&(H=A),"selectionStart"in h)h.selectionStart=A,h.selectionEnd=Math.min(H,h.value.length);else{var G=h.ownerDocument||document,M=G&&G.defaultView||window;if(M.getSelection){var O=M.getSelection(),ee=h.textContent.length,re=Math.min(j.start,ee),Le=j.end===void 0?re:Math.min(j.end,ee);!O.extend&&re>Le&&(o=Le,Le=re,re=o);var C=Ao(h,re),E=Ao(h,Le);if(C&&E&&(O.rangeCount!==1||O.anchorNode!==C.node||O.anchorOffset!==C.offset||O.focusNode!==E.node||O.focusOffset!==E.offset)){var R=G.createRange();R.setStart(C.node,C.offset),O.removeAllRanges(),re>Le?(O.addRange(R),O.extend(E.node,E.offset)):(R.setEnd(E.node,E.offset),O.addRange(R))}}}}for(G=[],O=h;O=O.parentNode;)O.nodeType===1&&G.push({element:O,left:O.scrollLeft,top:O.scrollTop});for(typeof h.focus=="function"&&h.focus(),h=0;h<G.length;h++){var k=G[h];k.element.scrollLeft=k.left,k.element.scrollTop=k.top}}Di=!!Zr,$r=Zr=null}finally{De=n,K.p=a,q.T=l}}e.current=t,it=2}}function $f(){if(it===2){it=0;var e=Kl,t=tn,l=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||l){l=q.T,q.T=null;var a=K.p;K.p=2;var n=De;De|=4;try{jf(e,t.alternate,t)}finally{De=n,K.p=a,q.T=l}}it=3}}function Kf(){if(it===4||it===3){it=0,al();var e=Kl,t=tn,l=wl,a=Of;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?it=5:(it=0,tn=Kl=null,Jf(e,e.pendingLanes));var n=e.pendingLanes;if(n===0&&($l=null),Ii(l),t=t.stateNode,Rt&&typeof Rt.onCommitFiberRoot=="function")try{Rt.onCommitFiberRoot(gn,t,void 0,(t.current.flags&128)===128)}catch{}if(a!==null){t=q.T,n=K.p,K.p=2,q.T=null;try{for(var i=e.onRecoverableError,o=0;o<a.length;o++){var h=a[o];i(h.value,{componentStack:h.stack})}}finally{q.T=t,K.p=n}}(wl&3)!==0&&yi(),ul(e),n=e.pendingLanes,(l&261930)!==0&&(n&42)!==0?e===zr?In++:(In=0,zr=e):In=0,es(0)}}function Jf(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,On(t)))}function yi(){return Zf(),$f(),Kf(),Ff()}function Ff(){if(it!==5)return!1;var e=Kl,t=_r;_r=0;var l=Ii(wl),a=q.T,n=K.p;try{K.p=32>l?32:l,q.T=null,l=Dr,Dr=null;var i=Kl,o=wl;if(it=0,tn=Kl=null,wl=0,(De&6)!==0)throw Error(r(331));var h=De;if(De|=4,_f(i.current),Rf(i,i.current,o,l),De=h,es(0,!1),Rt&&typeof Rt.onPostCommitFiberRoot=="function")try{Rt.onPostCommitFiberRoot(gn,i)}catch{}return!0}finally{K.p=n,q.T=a,Jf(e,t)}}function Pf(e,t,l){t=Gt(l,t),t=dr(e.stateNode,t,2),e=Yl(e,t,2),e!==null&&(yn(e,2),ul(e))}function Ue(e,t,l){if(e.tag===3)Pf(e,e,l);else for(;t!==null;){if(t.tag===3){Pf(t,e,l);break}else if(t.tag===1){var a=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof a.componentDidCatch=="function"&&($l===null||!$l.has(a))){e=Gt(l,e),l=Pd(2),a=Yl(t,l,2),a!==null&&(Wd(l,a,t,e),yn(a,2),ul(a));break}}t=t.return}}function qr(e,t,l){var a=e.pingCache;if(a===null){a=e.pingCache=new Ax;var n=new Set;a.set(t,n)}else n=a.get(t),n===void 0&&(n=new Set,a.set(t,n));n.has(l)||(Rr=!0,n.add(l),e=Ox.bind(null,e,t,l),t.then(e,e))}function Ox(e,t,l){var a=e.pingCache;a!==null&&a.delete(t),e.pingedLanes|=e.suspendedLanes&l,e.warmLanes&=~l,ke===e&&(je&l)===l&&(Pe===4||Pe===3&&(je&62914560)===je&&300>Je()-hi?(De&2)===0&&ln(e,0):Ar|=l,en===je&&(en=0)),ul(e)}function Wf(e,t){t===0&&(t=Vc()),e=da(e,t),e!==null&&(yn(e,t),ul(e))}function Ux(e){var t=e.memoizedState,l=0;t!==null&&(l=t.retryLane),Wf(e,l)}function qx(e,t){var l=0;switch(e.tag){case 31:case 13:var a=e.stateNode,n=e.memoizedState;n!==null&&(l=n.retryLane);break;case 19:a=e.stateNode;break;case 22:a=e.stateNode._retryCache;break;default:throw Error(r(314))}a!==null&&a.delete(t),Wf(e,l)}function Hx(e,t){return Ge(e,t)}var ji=null,nn=null,Hr=!1,Si=!1,Lr=!1,Fl=0;function ul(e){e!==nn&&e.next===null&&(nn===null?ji=nn=e:nn=nn.next=e),Si=!0,Hr||(Hr=!0,Bx())}function es(e,t){if(!Lr&&Si){Lr=!0;do for(var l=!1,a=ji;a!==null;){if(e!==0){var n=a.pendingLanes;if(n===0)var i=0;else{var o=a.suspendedLanes,h=a.pingedLanes;i=(1<<31-At(42|e)+1)-1,i&=n&~(o&~h),i=i&201326741?i&201326741|1:i?i|2:0}i!==0&&(l=!0,lm(a,i))}else i=je,i=Ts(a,a===ke?i:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),(i&3)===0||bn(a,i)||(l=!0,lm(a,i));a=a.next}while(l);Lr=!1}}function Lx(){If()}function If(){Si=Hr=!1;var e=0;Fl!==0&&Jx()&&(e=Fl);for(var t=Je(),l=null,a=ji;a!==null;){var n=a.next,i=em(a,t);i===0?(a.next=null,l===null?ji=n:l.next=n,n===null&&(nn=l)):(l=a,(e!==0||(i&3)!==0)&&(Si=!0)),a=n}it!==0&&it!==5||es(e),Fl!==0&&(Fl=0)}function em(e,t){for(var l=e.suspendedLanes,a=e.pingedLanes,n=e.expirationTimes,i=e.pendingLanes&-62914561;0<i;){var o=31-At(i),h=1<<o,j=n[o];j===-1?((h&l)===0||(h&a)!==0)&&(n[o]=d0(h,t)):j<=t&&(e.expiredLanes|=h),i&=~h}if(t=ke,l=je,l=Ts(e,e===t?l:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a=e.callbackNode,l===0||e===t&&(Oe===2||Oe===9)||e.cancelPendingCommit!==null)return a!==null&&a!==null&&bt(a),e.callbackNode=null,e.callbackPriority=0;if((l&3)===0||bn(e,l)){if(t=l&-l,t===e.callbackPriority)return t;switch(a!==null&&bt(a),Ii(l)){case 2:case 8:l=Gc;break;case 32:l=Ss;break;case 268435456:l=Qc;break;default:l=Ss}return a=tm.bind(null,e),l=Ge(l,a),e.callbackPriority=t,e.callbackNode=l,t}return a!==null&&a!==null&&bt(a),e.callbackPriority=2,e.callbackNode=null,2}function tm(e,t){if(it!==0&&it!==5)return e.callbackNode=null,e.callbackPriority=0,null;var l=e.callbackNode;if(yi()&&e.callbackNode!==l)return null;var a=je;return a=Ts(e,e===ke?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a===0?null:(qf(e,a,t),em(e,Je()),e.callbackNode!=null&&e.callbackNode===l?tm.bind(null,e):null)}function lm(e,t){if(yi())return null;qf(e,t,!0)}function Bx(){Px(function(){(De&6)!==0?Ge(Yc,Lx):If()})}function Br(){if(Fl===0){var e=Qa;e===0&&(e=Ns,Ns<<=1,(Ns&261888)===0&&(Ns=256)),Fl=e}return Fl}function am(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:Ms(""+e)}function nm(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 kx(e,t,l,a,n){if(t==="submit"&&l&&l.stateNode===n){var i=am((n[yt]||null).action),o=a.submitter;o&&(t=(t=o[yt]||null)?am(t.formAction):o.getAttribute("formAction"),t!==null&&(i=t,o=null));var h=new Os("action","action",null,a,n);e.push({event:h,listeners:[{instance:null,listener:function(){if(a.defaultPrevented){if(Fl!==0){var j=o?nm(n,o):new FormData(n);sr(l,{pending:!0,data:j,method:n.method,action:i},null,j)}}else typeof i=="function"&&(h.preventDefault(),j=o?nm(n,o):new FormData(n),sr(l,{pending:!0,data:j,method:n.method,action:i},i,j))},currentTarget:n}]})}}for(var kr=0;kr<Su.length;kr++){var Yr=Su[kr],Yx=Yr.toLowerCase(),Gx=Yr[0].toUpperCase()+Yr.slice(1);Pt(Yx,"on"+Gx)}Pt(Oo,"onAnimationEnd"),Pt(Uo,"onAnimationIteration"),Pt(qo,"onAnimationStart"),Pt("dblclick","onDoubleClick"),Pt("focusin","onFocus"),Pt("focusout","onBlur"),Pt(nx,"onTransitionRun"),Pt(sx,"onTransitionStart"),Pt(ix,"onTransitionCancel"),Pt(Ho,"onTransitionEnd"),Aa("onMouseEnter",["mouseout","mouseover"]),Aa("onMouseLeave",["mouseout","mouseover"]),Aa("onPointerEnter",["pointerout","pointerover"]),Aa("onPointerLeave",["pointerout","pointerover"]),ua("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),ua("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),ua("onBeforeInput",["compositionend","keypress","textInput","paste"]),ua("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),ua("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),ua("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ts="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(" "),Qx=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(ts));function sm(e,t){t=(t&4)!==0;for(var l=0;l<e.length;l++){var a=e[l],n=a.event;a=a.listeners;e:{var i=void 0;if(t)for(var o=a.length-1;0<=o;o--){var h=a[o],j=h.instance,A=h.currentTarget;if(h=h.listener,j!==i&&n.isPropagationStopped())break e;i=h,n.currentTarget=A;try{i(n)}catch(H){Hs(H)}n.currentTarget=null,i=j}else for(o=0;o<a.length;o++){if(h=a[o],j=h.instance,A=h.currentTarget,h=h.listener,j!==i&&n.isPropagationStopped())break e;i=h,n.currentTarget=A;try{i(n)}catch(H){Hs(H)}n.currentTarget=null,i=j}}}}function ge(e,t){var l=t[eu];l===void 0&&(l=t[eu]=new Set);var a=e+"__bubble";l.has(a)||(im(t,e,2,!1),l.add(a))}function Gr(e,t,l){var a=0;t&&(a|=4),im(l,e,a,t)}var Ni="_reactListening"+Math.random().toString(36).slice(2);function Qr(e){if(!e[Ni]){e[Ni]=!0,Pc.forEach(function(l){l!=="selectionchange"&&(Qx.has(l)||Gr(l,!1,e),Gr(l,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Ni]||(t[Ni]=!0,Gr("selectionchange",!1,t))}}function im(e,t,l,a){switch(Um(t)){case 2:var n=vp;break;case 8:n=gp;break;default:n=nc}l=n.bind(null,t,l,e),n=void 0,!cu||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(n=!0),a?n!==void 0?e.addEventListener(t,l,{capture:!0,passive:n}):e.addEventListener(t,l,!0):n!==void 0?e.addEventListener(t,l,{passive:n}):e.addEventListener(t,l,!1)}function Vr(e,t,l,a,n){var i=a;if((t&1)===0&&(t&2)===0&&a!==null)e:for(;;){if(a===null)return;var o=a.tag;if(o===3||o===4){var h=a.stateNode.containerInfo;if(h===n)break;if(o===4)for(o=a.return;o!==null;){var j=o.tag;if((j===3||j===4)&&o.stateNode.containerInfo===n)return;o=o.return}for(;h!==null;){if(o=Ta(h),o===null)return;if(j=o.tag,j===5||j===6||j===26||j===27){a=i=o;continue e}h=h.parentNode}}a=a.return}co(function(){var A=i,H=uu(l),G=[];e:{var M=Lo.get(e);if(M!==void 0){var O=Os,ee=e;switch(e){case"keypress":if(Ds(l)===0)break e;case"keydown":case"keyup":O=q0;break;case"focusin":ee="focus",O=mu;break;case"focusout":ee="blur",O=mu;break;case"beforeblur":case"afterblur":O=mu;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":O=mo;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":O=E0;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":O=B0;break;case Oo:case Uo:case qo:O=C0;break;case Ho:O=Y0;break;case"scroll":case"scrollend":O=S0;break;case"wheel":O=Q0;break;case"copy":case"cut":case"paste":O=A0;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":O=xo;break;case"toggle":case"beforetoggle":O=X0}var re=(t&4)!==0,Le=!re&&(e==="scroll"||e==="scrollend"),C=re?M!==null?M+"Capture":null:M;re=[];for(var E=A,R;E!==null;){var k=E;if(R=k.stateNode,k=k.tag,k!==5&&k!==26&&k!==27||R===null||C===null||(k=Nn(E,C),k!=null&&re.push(ls(E,k,R))),Le)break;E=E.return}0<re.length&&(M=new O(M,ee,null,l,H),G.push({event:M,listeners:re}))}}if((t&7)===0){e:{if(M=e==="mouseover"||e==="pointerover",O=e==="mouseout"||e==="pointerout",M&&l!==iu&&(ee=l.relatedTarget||l.fromElement)&&(Ta(ee)||ee[wa]))break e;if((O||M)&&(M=H.window===H?H:(M=H.ownerDocument)?M.defaultView||M.parentWindow:window,O?(ee=l.relatedTarget||l.toElement,O=A,ee=ee?Ta(ee):null,ee!==null&&(Le=x(ee),re=ee.tag,ee!==Le||re!==5&&re!==27&&re!==6)&&(ee=null)):(O=null,ee=A),O!==ee)){if(re=mo,k="onMouseLeave",C="onMouseEnter",E="mouse",(e==="pointerout"||e==="pointerover")&&(re=xo,k="onPointerLeave",C="onPointerEnter",E="pointer"),Le=O==null?M:Sn(O),R=ee==null?M:Sn(ee),M=new re(k,E+"leave",O,l,H),M.target=Le,M.relatedTarget=R,k=null,Ta(H)===A&&(re=new re(C,E+"enter",ee,l,H),re.target=R,re.relatedTarget=Le,k=re),Le=k,O&&ee)t:{for(re=Vx,C=O,E=ee,R=0,k=C;k;k=re(k))R++;k=0;for(var ne=E;ne;ne=re(ne))k++;for(;0<R-k;)C=re(C),R--;for(;0<k-R;)E=re(E),k--;for(;R--;){if(C===E||E!==null&&C===E.alternate){re=C;break t}C=re(C),E=re(E)}re=null}else re=null;O!==null&&um(G,M,O,re,!1),ee!==null&&Le!==null&&um(G,Le,ee,re,!0)}}e:{if(M=A?Sn(A):window,O=M.nodeName&&M.nodeName.toLowerCase(),O==="select"||O==="input"&&M.type==="file")var Ae=No;else if(jo(M))if(Eo)Ae=tx;else{Ae=I0;var te=W0}else O=M.nodeName,!O||O.toLowerCase()!=="input"||M.type!=="checkbox"&&M.type!=="radio"?A&&su(A.elementType)&&(Ae=No):Ae=ex;if(Ae&&(Ae=Ae(e,A))){So(G,Ae,l,H);break e}te&&te(e,M,A),e==="focusout"&&A&&M.type==="number"&&A.memoizedProps.value!=null&&nu(M,"number",M.value)}switch(te=A?Sn(A):window,e){case"focusin":(jo(te)||te.contentEditable==="true")&&(Ua=te,bu=A,_n=null);break;case"focusout":_n=bu=Ua=null;break;case"mousedown":yu=!0;break;case"contextmenu":case"mouseup":case"dragend":yu=!1,Do(G,l,H);break;case"selectionchange":if(ax)break;case"keydown":case"keyup":Do(G,l,H)}var xe;if(xu)e:{switch(e){case"compositionstart":var Se="onCompositionStart";break e;case"compositionend":Se="onCompositionEnd";break e;case"compositionupdate":Se="onCompositionUpdate";break e}Se=void 0}else Oa?bo(e,l)&&(Se="onCompositionEnd"):e==="keydown"&&l.keyCode===229&&(Se="onCompositionStart");Se&&(po&&l.locale!=="ko"&&(Oa||Se!=="onCompositionStart"?Se==="onCompositionEnd"&&Oa&&(xe=oo()):(Ol=H,ou="value"in Ol?Ol.value:Ol.textContent,Oa=!0)),te=Ei(A,Se),0<te.length&&(Se=new ho(Se,e,null,l,H),G.push({event:Se,listeners:te}),xe?Se.data=xe:(xe=yo(l),xe!==null&&(Se.data=xe)))),(xe=$0?K0(e,l):J0(e,l))&&(Se=Ei(A,"onBeforeInput"),0<Se.length&&(te=new ho("onBeforeInput","beforeinput",null,l,H),G.push({event:te,listeners:Se}),te.data=xe)),kx(G,e,A,l,H)}sm(G,t)})}function ls(e,t,l){return{instance:e,listener:t,currentTarget:l}}function Ei(e,t){for(var l=t+"Capture",a=[];e!==null;){var n=e,i=n.stateNode;if(n=n.tag,n!==5&&n!==26&&n!==27||i===null||(n=Nn(e,l),n!=null&&a.unshift(ls(e,n,i)),n=Nn(e,t),n!=null&&a.push(ls(e,n,i))),e.tag===3)return a;e=e.return}return[]}function Vx(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function um(e,t,l,a,n){for(var i=t._reactName,o=[];l!==null&&l!==a;){var h=l,j=h.alternate,A=h.stateNode;if(h=h.tag,j!==null&&j===a)break;h!==5&&h!==26&&h!==27||A===null||(j=A,n?(A=Nn(l,i),A!=null&&o.unshift(ls(l,A,j))):n||(A=Nn(l,i),A!=null&&o.push(ls(l,A,j)))),l=l.return}o.length!==0&&e.push({event:t,listeners:o})}var Xx=/\r\n?/g,Zx=/\u0000|\uFFFD/g;function rm(e){return(typeof e=="string"?e:""+e).replace(Xx,`
49
+ `).replace(Zx,"")}function cm(e,t){return t=rm(t),rm(e)===t}function He(e,t,l,a,n,i){switch(l){case"children":typeof a=="string"?t==="body"||t==="textarea"&&a===""||_a(e,a):(typeof a=="number"||typeof a=="bigint")&&t!=="body"&&_a(e,""+a);break;case"className":Rs(e,"class",a);break;case"tabIndex":Rs(e,"tabindex",a);break;case"dir":case"role":case"viewBox":case"width":case"height":Rs(e,l,a);break;case"style":uo(e,a,i);break;case"data":if(t!=="object"){Rs(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"&&He(e,t,"name",n.name,n,null),He(e,t,"formEncType",n.formEncType,n,null),He(e,t,"formMethod",n.formMethod,n,null),He(e,t,"formTarget",n.formTarget,n,null)):(He(e,t,"encType",n.encType,n,null),He(e,t,"method",n.method,n,null),He(e,t,"target",n.target,n,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=ol);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(n.children!=null)throw Error(r(60));e.innerHTML=l}}break;case"multiple":e.multiple=a&&typeof a!="function"&&typeof a!="symbol";break;case"muted":e.muted=a&&typeof a!="function"&&typeof a!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(a==null||typeof a=="function"||typeof a=="boolean"||typeof a=="symbol"){e.removeAttribute("xlink:href");break}l=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),Cs(e,"popover",a);break;case"xlinkActuate":cl(e,"http://www.w3.org/1999/xlink","xlink:actuate",a);break;case"xlinkArcrole":cl(e,"http://www.w3.org/1999/xlink","xlink:arcrole",a);break;case"xlinkRole":cl(e,"http://www.w3.org/1999/xlink","xlink:role",a);break;case"xlinkShow":cl(e,"http://www.w3.org/1999/xlink","xlink:show",a);break;case"xlinkTitle":cl(e,"http://www.w3.org/1999/xlink","xlink:title",a);break;case"xlinkType":cl(e,"http://www.w3.org/1999/xlink","xlink:type",a);break;case"xmlBase":cl(e,"http://www.w3.org/XML/1998/namespace","xml:base",a);break;case"xmlLang":cl(e,"http://www.w3.org/XML/1998/namespace","xml:lang",a);break;case"xmlSpace":cl(e,"http://www.w3.org/XML/1998/namespace","xml:space",a);break;case"is":Cs(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=y0.get(l)||l,Cs(e,l,a))}}function Xr(e,t,l,a,n,i){switch(l){case"style":uo(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(n.children!=null)throw Error(r(60));e.innerHTML=l}}break;case"children":typeof a=="string"?_a(e,a):(typeof a=="number"||typeof a=="bigint")&&_a(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=ol);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Wc.hasOwnProperty(l))e:{if(l[0]==="o"&&l[1]==="n"&&(n=l.endsWith("Capture"),t=l.slice(2,n?l.length-7:void 0),i=e[yt]||null,i=i!=null?i[l]:null,typeof i=="function"&&e.removeEventListener(t,i,n),typeof a=="function")){typeof i!="function"&&i!==null&&(l in e?e[l]=null:e.hasAttribute(l)&&e.removeAttribute(l)),e.addEventListener(t,a,n);break e}l in e?e[l]=a:a===!0?e.setAttribute(l,""):Cs(e,l,a)}}}function ht(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,n=!1,i;for(i in l)if(l.hasOwnProperty(i)){var o=l[i];if(o!=null)switch(i){case"src":a=!0;break;case"srcSet":n=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,t));default:He(e,t,i,o,l,null)}}n&&He(e,t,"srcSet",l.srcSet,l,null),a&&He(e,t,"src",l.src,l,null);return;case"input":ge("invalid",e);var h=i=o=n=null,j=null,A=null;for(a in l)if(l.hasOwnProperty(a)){var H=l[a];if(H!=null)switch(a){case"name":n=H;break;case"type":o=H;break;case"checked":j=H;break;case"defaultChecked":A=H;break;case"value":i=H;break;case"defaultValue":h=H;break;case"children":case"dangerouslySetInnerHTML":if(H!=null)throw Error(r(137,t));break;default:He(e,t,a,H,l,null)}}ao(e,i,h,j,A,o,n,!1);return;case"select":ge("invalid",e),a=o=i=null;for(n in l)if(l.hasOwnProperty(n)&&(h=l[n],h!=null))switch(n){case"value":i=h;break;case"defaultValue":o=h;break;case"multiple":a=h;default:He(e,t,n,h,l,null)}t=i,l=o,e.multiple=!!a,t!=null?Ma(e,!!a,t,!1):l!=null&&Ma(e,!!a,l,!0);return;case"textarea":ge("invalid",e),i=n=a=null;for(o in l)if(l.hasOwnProperty(o)&&(h=l[o],h!=null))switch(o){case"value":a=h;break;case"defaultValue":n=h;break;case"children":i=h;break;case"dangerouslySetInnerHTML":if(h!=null)throw Error(r(91));break;default:He(e,t,o,h,l,null)}so(e,a,n,i);return;case"option":for(j in l)if(l.hasOwnProperty(j)&&(a=l[j],a!=null))switch(j){case"selected":e.selected=a&&typeof a!="function"&&typeof a!="symbol";break;default:He(e,t,j,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<ts.length;a++)ge(ts[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(A in l)if(l.hasOwnProperty(A)&&(a=l[A],a!=null))switch(A){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,t));default:He(e,t,A,a,l,null)}return;default:if(su(t)){for(H in l)l.hasOwnProperty(H)&&(a=l[H],a!==void 0&&Xr(e,t,H,a,l,void 0));return}}for(h in l)l.hasOwnProperty(h)&&(a=l[h],a!=null&&He(e,t,h,a,l,null))}function $x(e,t,l,a){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var n=null,i=null,o=null,h=null,j=null,A=null,H=null;for(O in l){var G=l[O];if(l.hasOwnProperty(O)&&G!=null)switch(O){case"checked":break;case"value":break;case"defaultValue":j=G;default:a.hasOwnProperty(O)||He(e,t,O,null,a,G)}}for(var M in a){var O=a[M];if(G=l[M],a.hasOwnProperty(M)&&(O!=null||G!=null))switch(M){case"type":i=O;break;case"name":n=O;break;case"checked":A=O;break;case"defaultChecked":H=O;break;case"value":o=O;break;case"defaultValue":h=O;break;case"children":case"dangerouslySetInnerHTML":if(O!=null)throw Error(r(137,t));break;default:O!==G&&He(e,t,M,O,a,G)}}au(e,o,h,j,A,H,i,n);return;case"select":O=o=h=M=null;for(i in l)if(j=l[i],l.hasOwnProperty(i)&&j!=null)switch(i){case"value":break;case"multiple":O=j;default:a.hasOwnProperty(i)||He(e,t,i,null,a,j)}for(n in a)if(i=a[n],j=l[n],a.hasOwnProperty(n)&&(i!=null||j!=null))switch(n){case"value":M=i;break;case"defaultValue":h=i;break;case"multiple":o=i;default:i!==j&&He(e,t,n,i,a,j)}t=h,l=o,a=O,M!=null?Ma(e,!!l,M,!1):!!a!=!!l&&(t!=null?Ma(e,!!l,t,!0):Ma(e,!!l,l?[]:"",!1));return;case"textarea":O=M=null;for(h in l)if(n=l[h],l.hasOwnProperty(h)&&n!=null&&!a.hasOwnProperty(h))switch(h){case"value":break;case"children":break;default:He(e,t,h,null,a,n)}for(o in a)if(n=a[o],i=l[o],a.hasOwnProperty(o)&&(n!=null||i!=null))switch(o){case"value":M=n;break;case"defaultValue":O=n;break;case"children":break;case"dangerouslySetInnerHTML":if(n!=null)throw Error(r(91));break;default:n!==i&&He(e,t,o,n,a,i)}no(e,M,O);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:He(e,t,ee,null,a,M)}for(j in a)if(M=a[j],O=l[j],a.hasOwnProperty(j)&&M!==O&&(M!=null||O!=null))switch(j){case"selected":e.selected=M&&typeof M!="function"&&typeof M!="symbol";break;default:He(e,t,j,M,a,O)}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 re in l)M=l[re],l.hasOwnProperty(re)&&M!=null&&!a.hasOwnProperty(re)&&He(e,t,re,null,a,M);for(A in a)if(M=a[A],O=l[A],a.hasOwnProperty(A)&&M!==O&&(M!=null||O!=null))switch(A){case"children":case"dangerouslySetInnerHTML":if(M!=null)throw Error(r(137,t));break;default:He(e,t,A,M,a,O)}return;default:if(su(t)){for(var Le in l)M=l[Le],l.hasOwnProperty(Le)&&M!==void 0&&!a.hasOwnProperty(Le)&&Xr(e,t,Le,void 0,a,M);for(H in a)M=a[H],O=l[H],!a.hasOwnProperty(H)||M===O||M===void 0&&O===void 0||Xr(e,t,H,M,a,O);return}}for(var C in l)M=l[C],l.hasOwnProperty(C)&&M!=null&&!a.hasOwnProperty(C)&&He(e,t,C,null,a,M);for(G in a)M=a[G],O=l[G],!a.hasOwnProperty(G)||M===O||M==null&&O==null||He(e,t,G,M,a,O)}function om(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function Kx(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,l=performance.getEntriesByType("resource"),a=0;a<l.length;a++){var n=l[a],i=n.transferSize,o=n.initiatorType,h=n.duration;if(i&&h&&om(o)){for(o=0,h=n.responseEnd,a+=1;a<l.length;a++){var j=l[a],A=j.startTime;if(A>h)break;var H=j.transferSize,G=j.initiatorType;H&&om(G)&&(j=j.responseEnd,o+=H*(j<h?1:(h-A)/(j-A)))}if(--a,t+=8*(i+o)/(n.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var Zr=null,$r=null;function wi(e){return e.nodeType===9?e:e.ownerDocument}function dm(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 fm(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 Kr(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 Jr=null;function Jx(){var e=window.event;return e&&e.type==="popstate"?e===Jr?!1:(Jr=e,!0):(Jr=null,!1)}var mm=typeof setTimeout=="function"?setTimeout:void 0,Fx=typeof clearTimeout=="function"?clearTimeout:void 0,hm=typeof Promise=="function"?Promise:void 0,Px=typeof queueMicrotask=="function"?queueMicrotask:typeof hm<"u"?function(e){return hm.resolve(null).then(e).catch(Wx)}:mm;function Wx(e){setTimeout(function(){throw e})}function Pl(e){return e==="head"}function xm(e,t){var l=t,a=0;do{var n=l.nextSibling;if(e.removeChild(l),n&&n.nodeType===8)if(l=n.data,l==="/$"||l==="/&"){if(a===0){e.removeChild(n),cn(t);return}a--}else if(l==="$"||l==="$?"||l==="$~"||l==="$!"||l==="&")a++;else if(l==="html")as(e.ownerDocument.documentElement);else if(l==="head"){l=e.ownerDocument.head,as(l);for(var i=l.firstChild;i;){var o=i.nextSibling,h=i.nodeName;i[jn]||h==="SCRIPT"||h==="STYLE"||h==="LINK"&&i.rel.toLowerCase()==="stylesheet"||l.removeChild(i),i=o}}else l==="body"&&as(e.ownerDocument.body);l=n}while(l);cn(t)}function pm(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 Fr(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":Fr(l),tu(l);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(l.rel.toLowerCase()==="stylesheet")continue}e.removeChild(l)}}function Ix(e,t,l,a){for(;e.nodeType===1;){var n=l;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!a&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(a){if(!e[jn])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!==n.rel||e.getAttribute("href")!==(n.href==null||n.href===""?null:n.href)||e.getAttribute("crossorigin")!==(n.crossOrigin==null?null:n.crossOrigin)||e.getAttribute("title")!==(n.title==null?null:n.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(i=e.getAttribute("src"),(i!==(n.src==null?null:n.src)||e.getAttribute("type")!==(n.type==null?null:n.type)||e.getAttribute("crossorigin")!==(n.crossOrigin==null?null:n.crossOrigin))&&i&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var i=n.name==null?null:""+n.name;if(n.type==="hidden"&&e.getAttribute("name")===i)return e}else return e;if(e=$t(e.nextSibling),e===null)break}return null}function ep(e,t,l){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!l||(e=$t(e.nextSibling),e===null))return null;return e}function vm(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=$t(e.nextSibling),e===null))return null;return e}function Pr(e){return e.data==="$?"||e.data==="$~"}function Wr(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function tp(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 $t(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 Ir=null;function gm(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var l=e.data;if(l==="/$"||l==="/&"){if(t===0)return $t(e.nextSibling);t--}else l!=="$"&&l!=="$!"&&l!=="$?"&&l!=="$~"&&l!=="&"||t++}e=e.nextSibling}return null}function bm(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 ym(e,t,l){switch(t=wi(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 as(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);tu(e)}var Kt=new Map,jm=new Set;function Ti(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Tl=K.d;K.d={f:lp,r:ap,D:np,C:sp,L:ip,m:up,X:cp,S:rp,M:op};function lp(){var e=Tl.f(),t=vi();return e||t}function ap(e){var t=Ca(e);t!==null&&t.tag===5&&t.type==="form"?Hd(t):Tl.r(e)}var sn=typeof document>"u"?null:document;function Sm(e,t,l){var a=sn;if(a&&typeof t=="string"&&t){var n=kt(t);n='link[rel="'+e+'"][href="'+n+'"]',typeof l=="string"&&(n+='[crossorigin="'+l+'"]'),jm.has(n)||(jm.add(n),e={rel:e,crossOrigin:l,href:t},a.querySelector(n)===null&&(t=a.createElement("link"),ht(t,"link",e),ut(t),a.head.appendChild(t)))}}function np(e){Tl.D(e),Sm("dns-prefetch",e,null)}function sp(e,t){Tl.C(e,t),Sm("preconnect",e,t)}function ip(e,t,l){Tl.L(e,t,l);var a=sn;if(a&&e&&t){var n='link[rel="preload"][as="'+kt(t)+'"]';t==="image"&&l&&l.imageSrcSet?(n+='[imagesrcset="'+kt(l.imageSrcSet)+'"]',typeof l.imageSizes=="string"&&(n+='[imagesizes="'+kt(l.imageSizes)+'"]')):n+='[href="'+kt(e)+'"]';var i=n;switch(t){case"style":i=un(e);break;case"script":i=rn(e)}Kt.has(i)||(e=y({rel:"preload",href:t==="image"&&l&&l.imageSrcSet?void 0:e,as:t},l),Kt.set(i,e),a.querySelector(n)!==null||t==="style"&&a.querySelector(ns(i))||t==="script"&&a.querySelector(ss(i))||(t=a.createElement("link"),ht(t,"link",e),ut(t),a.head.appendChild(t)))}}function up(e,t){Tl.m(e,t);var l=sn;if(l&&e){var a=t&&typeof t.as=="string"?t.as:"script",n='link[rel="modulepreload"][as="'+kt(a)+'"][href="'+kt(e)+'"]',i=n;switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":i=rn(e)}if(!Kt.has(i)&&(e=y({rel:"modulepreload",href:e},t),Kt.set(i,e),l.querySelector(n)===null)){switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(l.querySelector(ss(i)))return}a=l.createElement("link"),ht(a,"link",e),ut(a),l.head.appendChild(a)}}}function rp(e,t,l){Tl.S(e,t,l);var a=sn;if(a&&e){var n=Ra(a).hoistableStyles,i=un(e);t=t||"default";var o=n.get(i);if(!o){var h={loading:0,preload:null};if(o=a.querySelector(ns(i)))h.loading=5;else{e=y({rel:"stylesheet",href:e,"data-precedence":t},l),(l=Kt.get(i))&&ec(e,l);var j=o=a.createElement("link");ut(j),ht(j,"link",e),j._p=new Promise(function(A,H){j.onload=A,j.onerror=H}),j.addEventListener("load",function(){h.loading|=1}),j.addEventListener("error",function(){h.loading|=2}),h.loading|=4,Ci(o,t,a)}o={type:"stylesheet",instance:o,count:1,state:h},n.set(i,o)}}}function cp(e,t){Tl.X(e,t);var l=sn;if(l&&e){var a=Ra(l).hoistableScripts,n=rn(e),i=a.get(n);i||(i=l.querySelector(ss(n)),i||(e=y({src:e,async:!0},t),(t=Kt.get(n))&&tc(e,t),i=l.createElement("script"),ut(i),ht(i,"link",e),l.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},a.set(n,i))}}function op(e,t){Tl.M(e,t);var l=sn;if(l&&e){var a=Ra(l).hoistableScripts,n=rn(e),i=a.get(n);i||(i=l.querySelector(ss(n)),i||(e=y({src:e,async:!0,type:"module"},t),(t=Kt.get(n))&&tc(e,t),i=l.createElement("script"),ut(i),ht(i,"link",e),l.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},a.set(n,i))}}function Nm(e,t,l,a){var n=(n=me.current)?Ti(n):null;if(!n)throw Error(r(446));switch(e){case"meta":case"title":return null;case"style":return typeof l.precedence=="string"&&typeof l.href=="string"?(t=un(l.href),l=Ra(n).hoistableStyles,a=l.get(t),a||(a={type:"style",instance:null,count:0,state:null},l.set(t,a)),a):{type:"void",instance:null,count:0,state:null};case"link":if(l.rel==="stylesheet"&&typeof l.href=="string"&&typeof l.precedence=="string"){e=un(l.href);var i=Ra(n).hoistableStyles,o=i.get(e);if(o||(n=n.ownerDocument||n,o={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},i.set(e,o),(i=n.querySelector(ns(e)))&&!i._p&&(o.instance=i,o.state.loading=5),Kt.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},Kt.set(e,l),i||dp(n,e,l,o.state))),t&&a===null)throw Error(r(528,""));return o}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=rn(l),l=Ra(n).hoistableScripts,a=l.get(t),a||(a={type:"script",instance:null,count:0,state:null},l.set(t,a)),a):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,e))}}function un(e){return'href="'+kt(e)+'"'}function ns(e){return'link[rel="stylesheet"]['+e+"]"}function Em(e){return y({},e,{"data-precedence":e.precedence,precedence:null})}function dp(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}),ht(t,"link",l),ut(t),e.head.appendChild(t))}function rn(e){return'[src="'+kt(e)+'"]'}function ss(e){return"script[async]"+e}function wm(e,t,l){if(t.count++,t.instance===null)switch(t.type){case"style":var a=e.querySelector('style[data-href~="'+kt(l.href)+'"]');if(a)return t.instance=a,ut(a),a;var n=y({},l,{"data-href":l.href,"data-precedence":l.precedence,href:null,precedence:null});return a=(e.ownerDocument||e).createElement("style"),ut(a),ht(a,"style",n),Ci(a,l.precedence,e),t.instance=a;case"stylesheet":n=un(l.href);var i=e.querySelector(ns(n));if(i)return t.state.loading|=4,t.instance=i,ut(i),i;a=Em(l),(n=Kt.get(n))&&ec(a,n),i=(e.ownerDocument||e).createElement("link"),ut(i);var o=i;return o._p=new Promise(function(h,j){o.onload=h,o.onerror=j}),ht(i,"link",a),t.state.loading|=4,Ci(i,l.precedence,e),t.instance=i;case"script":return i=rn(l.src),(n=e.querySelector(ss(i)))?(t.instance=n,ut(n),n):(a=l,(n=Kt.get(i))&&(a=y({},l),tc(a,n)),e=e.ownerDocument||e,n=e.createElement("script"),ut(n),ht(n,"link",a),e.head.appendChild(n),t.instance=n);case"void":return null;default:throw Error(r(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(a=t.instance,t.state.loading|=4,Ci(a,l.precedence,e));return t.instance}function Ci(e,t,l){for(var a=l.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),n=a.length?a[a.length-1]:null,i=n,o=0;o<a.length;o++){var h=a[o];if(h.dataset.precedence===t)i=h;else if(i!==n)break}i?i.parentNode.insertBefore(e,i.nextSibling):(t=l.nodeType===9?l.head:l,t.insertBefore(e,t.firstChild))}function ec(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function tc(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var Ri=null;function Tm(e,t,l){if(Ri===null){var a=new Map,n=Ri=new Map;n.set(l,a)}else n=Ri,a=n.get(l),a||(a=new Map,n.set(l,a));if(a.has(e))return a;for(a.set(e,null),l=l.getElementsByTagName(e),n=0;n<l.length;n++){var i=l[n];if(!(i[jn]||i[ot]||e==="link"&&i.getAttribute("rel")==="stylesheet")&&i.namespaceURI!=="http://www.w3.org/2000/svg"){var o=i.getAttribute(t)||"";o=e+o;var h=a.get(o);h?h.push(i):a.set(o,[i])}}return a}function Cm(e,t,l){e=e.ownerDocument||e,e.head.insertBefore(l,t==="title"?e.querySelector("head > title"):null)}function fp(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 Rm(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function mp(e,t,l,a){if(l.type==="stylesheet"&&(typeof a.media!="string"||matchMedia(a.media).matches!==!1)&&(l.state.loading&4)===0){if(l.instance===null){var n=un(a.href),i=t.querySelector(ns(n));if(i){t=i._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=Ai.bind(e),t.then(e,e)),l.state.loading|=4,l.instance=i,ut(i);return}i=t.ownerDocument||t,a=Em(a),(n=Kt.get(n))&&ec(a,n),i=i.createElement("link"),ut(i);var o=i;o._p=new Promise(function(h,j){o.onload=h,o.onerror=j}),ht(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=Ai.bind(e),t.addEventListener("load",l),t.addEventListener("error",l))}}var lc=0;function hp(e,t){return e.stylesheets&&e.count===0&&_i(e,e.stylesheets),0<e.count||0<e.imgCount?function(l){var a=setTimeout(function(){if(e.stylesheets&&_i(e,e.stylesheets),e.unsuspend){var i=e.unsuspend;e.unsuspend=null,i()}},6e4+t);0<e.imgBytes&&lc===0&&(lc=62500*Kx());var n=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&_i(e,e.stylesheets),e.unsuspend)){var i=e.unsuspend;e.unsuspend=null,i()}},(e.imgBytes>lc?50:800)+t);return e.unsuspend=l,function(){e.unsuspend=null,clearTimeout(a),clearTimeout(n)}}:null}function Ai(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)_i(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Mi=null;function _i(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Mi=new Map,t.forEach(xp,e),Mi=null,Ai.call(e))}function xp(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 n=e.querySelectorAll("link[data-precedence],style[data-precedence]"),i=0;i<n.length;i++){var o=n[i];(o.nodeName==="LINK"||o.getAttribute("media")!=="not all")&&(l.set(o.dataset.precedence,o),a=o)}a&&l.set(null,a)}n=t.instance,o=n.getAttribute("data-precedence"),i=l.get(o)||a,i===a&&l.set(null,n),l.set(o,n),this.count++,a=Ai.bind(this),n.addEventListener("load",a),n.addEventListener("error",a),i?i.parentNode.insertBefore(n,i.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(n,e.firstChild)),t.state.loading|=4}}var is={$$typeof:S,Provider:null,Consumer:null,_currentValue:ae,_currentValue2:ae,_threadCount:0};function pp(e,t,l,a,n,i,o,h,j){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=Pi(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Pi(0),this.hiddenUpdates=Pi(null),this.identifierPrefix=a,this.onUncaughtError=n,this.onCaughtError=i,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=j,this.incompleteTransitions=new Map}function Am(e,t,l,a,n,i,o,h,j,A,H,G){return e=new pp(e,t,l,o,j,A,H,G,h),t=1,i===!0&&(t|=24),i=_t(3,null,null,t),e.current=i,i.stateNode=e,t=Uu(),t.refCount++,e.pooledCache=t,t.refCount++,i.memoizedState={element:a,isDehydrated:l,cache:t},Bu(i),e}function Mm(e){return e?(e=La,e):La}function _m(e,t,l,a,n,i){n=Mm(n),a.context===null?a.context=n:a.pendingContext=n,a=kl(t),a.payload={element:l},i=i===void 0?null:i,i!==null&&(a.callback=i),l=Yl(e,a,t),l!==null&&(Tt(l,e,t),Ln(l,e,t))}function Dm(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var l=e.retryLane;e.retryLane=l!==0&&l<t?l:t}}function ac(e,t){Dm(e,t),(e=e.alternate)&&Dm(e,t)}function zm(e){if(e.tag===13||e.tag===31){var t=da(e,67108864);t!==null&&Tt(t,e,67108864),ac(e,67108864)}}function Om(e){if(e.tag===13||e.tag===31){var t=qt();t=Wi(t);var l=da(e,t);l!==null&&Tt(l,e,t),ac(e,t)}}var Di=!0;function vp(e,t,l,a){var n=q.T;q.T=null;var i=K.p;try{K.p=2,nc(e,t,l,a)}finally{K.p=i,q.T=n}}function gp(e,t,l,a){var n=q.T;q.T=null;var i=K.p;try{K.p=8,nc(e,t,l,a)}finally{K.p=i,q.T=n}}function nc(e,t,l,a){if(Di){var n=sc(a);if(n===null)Vr(e,t,a,zi,l),qm(e,a);else if(yp(n,e,t,l,a))a.stopPropagation();else if(qm(e,a),t&4&&-1<bp.indexOf(e)){for(;n!==null;){var i=Ca(n);if(i!==null)switch(i.tag){case 3:if(i=i.stateNode,i.current.memoizedState.isDehydrated){var o=ia(i.pendingLanes);if(o!==0){var h=i;for(h.pendingLanes|=2,h.entangledLanes|=2;o;){var j=1<<31-At(o);h.entanglements[1]|=j,o&=~j}ul(i),(De&6)===0&&(xi=Je()+500,es(0))}}break;case 31:case 13:h=da(i,2),h!==null&&Tt(h,i,2),vi(),ac(i,2)}if(i=sc(a),i===null&&Vr(e,t,a,zi,l),i===n)break;n=i}n!==null&&a.stopPropagation()}else Vr(e,t,a,null,l)}}function sc(e){return e=uu(e),ic(e)}var zi=null;function ic(e){if(zi=null,e=Ta(e),e!==null){var t=x(e);if(t===null)e=null;else{var l=t.tag;if(l===13){if(e=f(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 zi=e,null}function Um(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(_l()){case Yc:return 2;case Gc:return 8;case Ss:case s0:return 32;case Qc:return 268435456;default:return 32}default:return 32}}var uc=!1,Wl=null,Il=null,ea=null,us=new Map,rs=new Map,ta=[],bp="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 qm(e,t){switch(e){case"focusin":case"focusout":Wl=null;break;case"dragenter":case"dragleave":Il=null;break;case"mouseover":case"mouseout":ea=null;break;case"pointerover":case"pointerout":us.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":rs.delete(t.pointerId)}}function cs(e,t,l,a,n,i){return e===null||e.nativeEvent!==i?(e={blockedOn:t,domEventName:l,eventSystemFlags:a,nativeEvent:i,targetContainers:[n]},t!==null&&(t=Ca(t),t!==null&&zm(t)),e):(e.eventSystemFlags|=a,t=e.targetContainers,n!==null&&t.indexOf(n)===-1&&t.push(n),e)}function yp(e,t,l,a,n){switch(t){case"focusin":return Wl=cs(Wl,e,t,l,a,n),!0;case"dragenter":return Il=cs(Il,e,t,l,a,n),!0;case"mouseover":return ea=cs(ea,e,t,l,a,n),!0;case"pointerover":var i=n.pointerId;return us.set(i,cs(us.get(i)||null,e,t,l,a,n)),!0;case"gotpointercapture":return i=n.pointerId,rs.set(i,cs(rs.get(i)||null,e,t,l,a,n)),!0}return!1}function Hm(e){var t=Ta(e.target);if(t!==null){var l=x(t);if(l!==null){if(t=l.tag,t===13){if(t=f(l),t!==null){e.blockedOn=t,Jc(e.priority,function(){Om(l)});return}}else if(t===31){if(t=v(l),t!==null){e.blockedOn=t,Jc(e.priority,function(){Om(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 Oi(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var l=sc(e.nativeEvent);if(l===null){l=e.nativeEvent;var a=new l.constructor(l.type,l);iu=a,l.target.dispatchEvent(a),iu=null}else return t=Ca(l),t!==null&&zm(t),e.blockedOn=l,!1;t.shift()}return!0}function Lm(e,t,l){Oi(e)&&l.delete(t)}function jp(){uc=!1,Wl!==null&&Oi(Wl)&&(Wl=null),Il!==null&&Oi(Il)&&(Il=null),ea!==null&&Oi(ea)&&(ea=null),us.forEach(Lm),rs.forEach(Lm)}function Ui(e,t){e.blockedOn===t&&(e.blockedOn=null,uc||(uc=!0,u.unstable_scheduleCallback(u.unstable_NormalPriority,jp)))}var qi=null;function Bm(e){qi!==e&&(qi=e,u.unstable_scheduleCallback(u.unstable_NormalPriority,function(){qi===e&&(qi=null);for(var t=0;t<e.length;t+=3){var l=e[t],a=e[t+1],n=e[t+2];if(typeof a!="function"){if(ic(a||l)===null)continue;break}var i=Ca(l);i!==null&&(e.splice(t,3),t-=3,sr(i,{pending:!0,data:n,method:l.method,action:a},a,n))}}))}function cn(e){function t(j){return Ui(j,e)}Wl!==null&&Ui(Wl,e),Il!==null&&Ui(Il,e),ea!==null&&Ui(ea,e),us.forEach(t),rs.forEach(t);for(var l=0;l<ta.length;l++){var a=ta[l];a.blockedOn===e&&(a.blockedOn=null)}for(;0<ta.length&&(l=ta[0],l.blockedOn===null);)Hm(l),l.blockedOn===null&&ta.shift();if(l=(e.ownerDocument||e).$$reactFormReplay,l!=null)for(a=0;a<l.length;a+=3){var n=l[a],i=l[a+1],o=n[yt]||null;if(typeof i=="function")o||Bm(l);else if(o){var h=null;if(i&&i.hasAttribute("formAction")){if(n=i,o=i[yt]||null)h=o.formAction;else if(ic(n)!==null)continue}else h=o.action;typeof h=="function"?l[a+1]=h:(l.splice(a,3),a-=3),Bm(l)}}}function km(){function e(i){i.canIntercept&&i.info==="react-transition"&&i.intercept({handler:function(){return new Promise(function(o){return n=o})},focusReset:"manual",scroll:"manual"})}function t(){n!==null&&(n(),n=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,n=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(l,100),function(){a=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),n!==null&&(n(),n=null)}}}function rc(e){this._internalRoot=e}Hi.prototype.render=rc.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(r(409));var l=t.current,a=qt();_m(l,a,e,t,null,null)},Hi.prototype.unmount=rc.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;_m(e.current,2,null,e,null,null),vi(),t[wa]=null}};function Hi(e){this._internalRoot=e}Hi.prototype.unstable_scheduleHydration=function(e){if(e){var t=Kc();e={blockedOn:null,target:e,priority:t};for(var l=0;l<ta.length&&t!==0&&t<ta[l].priority;l++);ta.splice(l,0,e),l===0&&Hm(e)}};var Ym=c.version;if(Ym!=="19.2.4")throw Error(r(527,Ym,"19.2.4"));K.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(r(188)):(e=Object.keys(e).join(","),Error(r(268,e)));return e=p(t),e=e!==null?g(e):null,e=e===null?null:e.stateNode,e};var Sp={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:q,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Li=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Li.isDisabled&&Li.supportsFiber)try{gn=Li.inject(Sp),Rt=Li}catch{}}return ds.createRoot=function(e,t){if(!m(e))throw Error(r(299));var l=!1,a="",n=$d,i=Kd,o=Jd;return t!=null&&(t.unstable_strictMode===!0&&(l=!0),t.identifierPrefix!==void 0&&(a=t.identifierPrefix),t.onUncaughtError!==void 0&&(n=t.onUncaughtError),t.onCaughtError!==void 0&&(i=t.onCaughtError),t.onRecoverableError!==void 0&&(o=t.onRecoverableError)),t=Am(e,1,!1,null,null,l,a,null,n,i,o,km),e[wa]=t.current,Qr(e),new rc(t)},ds.hydrateRoot=function(e,t,l){if(!m(e))throw Error(r(299));var a=!1,n="",i=$d,o=Kd,h=Jd,j=null;return l!=null&&(l.unstable_strictMode===!0&&(a=!0),l.identifierPrefix!==void 0&&(n=l.identifierPrefix),l.onUncaughtError!==void 0&&(i=l.onUncaughtError),l.onCaughtError!==void 0&&(o=l.onCaughtError),l.onRecoverableError!==void 0&&(h=l.onRecoverableError),l.formState!==void 0&&(j=l.formState)),t=Am(e,1,!0,t,l??null,a,n,j,i,o,h,km),t.context=Mm(null),l=t.current,a=qt(),a=Wi(a),n=kl(a),n.callback=null,Yl(l,n,a),l=a,t.current.lanes=l,yn(t,l),ul(t),e[wa]=t.current,Qr(e),new Hi(t)},ds.version="19.2.4",ds}var Pm;function _p(){if(Pm)return dc.exports;Pm=1;function u(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(u)}catch(c){console.error(c)}}return u(),dc.exports=Mp(),dc.exports}var Dp=_p();const zp=Tc(Dp);/**
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 Wm="popstate";function Op(u={}){function c(m,x){let{pathname:f="/",search:v="",hash:b=""}=Ea(m.location.hash.substring(1));return!f.startsWith("/")&&!f.startsWith(".")&&(f="/"+f),jc("",{pathname:f,search:v,hash:b},x.state&&x.state.usr||null,x.state&&x.state.key||"default")}function d(m,x){let f=m.document.querySelector("base"),v="";if(f&&f.getAttribute("href")){let b=m.location.href,p=b.indexOf("#");v=p===-1?b:b.slice(0,p)}return v+"#"+(typeof x=="string"?x:vs(x))}function r(m,x){Ft(m.pathname.charAt(0)==="/",`relative pathnames are not supported in hash history.push(${JSON.stringify(x)})`)}return qp(c,d,r,u)}function Ze(u,c){if(u===!1||u===null||typeof u>"u")throw new Error(c)}function Ft(u,c){if(!u){typeof console<"u"&&console.warn(c);try{throw new Error(c)}catch{}}}function Up(){return Math.random().toString(36).substring(2,10)}function Im(u,c){return{usr:u.state,key:u.key,idx:c}}function jc(u,c,d=null,r){return{pathname:typeof u=="string"?u:u.pathname,search:"",hash:"",...typeof c=="string"?Ea(c):c,state:d,key:c&&c.key||r||Up()}}function vs({pathname:u="/",search:c="",hash:d=""}){return c&&c!=="?"&&(u+=c.charAt(0)==="?"?c:"?"+c),d&&d!=="#"&&(u+=d.charAt(0)==="#"?d:"#"+d),u}function Ea(u){let c={};if(u){let d=u.indexOf("#");d>=0&&(c.hash=u.substring(d),u=u.substring(0,d));let r=u.indexOf("?");r>=0&&(c.search=u.substring(r),u=u.substring(0,r)),u&&(c.pathname=u)}return c}function qp(u,c,d,r={}){let{window:m=document.defaultView,v5Compat:x=!1}=r,f=m.history,v="POP",b=null,p=g();p==null&&(p=0,f.replaceState({...f.state,idx:p},""));function g(){return(f.state||{idx:null}).idx}function y(){v="POP";let Y=g(),Q=Y==null?null:Y-p;p=Y,b&&b({action:v,location:_.location,delta:Q})}function D(Y,Q){v="PUSH";let B=jc(_.location,Y,Q);d&&d(B,Y),p=g()+1;let S=Im(B,p),le=_.createHref(B);try{f.pushState(S,"",le)}catch(Z){if(Z instanceof DOMException&&Z.name==="DataCloneError")throw Z;m.location.assign(le)}x&&b&&b({action:v,location:_.location,delta:1})}function z(Y,Q){v="REPLACE";let B=jc(_.location,Y,Q);d&&d(B,Y),p=g();let S=Im(B,p),le=_.createHref(B);f.replaceState(S,"",le),x&&b&&b({action:v,location:_.location,delta:0})}function U(Y){return Hp(Y)}let _={get action(){return v},get location(){return u(m,f)},listen(Y){if(b)throw new Error("A history only accepts one active listener");return m.addEventListener(Wm,y),b=Y,()=>{m.removeEventListener(Wm,y),b=null}},createHref(Y){return c(m,Y)},createURL:U,encodeLocation(Y){let Q=U(Y);return{pathname:Q.pathname,search:Q.search,hash:Q.hash}},push:D,replace:z,go(Y){return f.go(Y)}};return _}function Hp(u,c=!1){let d="http://localhost";typeof window<"u"&&(d=window.location.origin!=="null"?window.location.origin:window.location.href),Ze(d,"No window.location.(origin|href) available to create URL");let r=typeof u=="string"?u:vs(u);return r=r.replace(/ $/,"%20"),!c&&r.startsWith("//")&&(r=d+r),new URL(r,d)}function gh(u,c,d="/"){return Lp(u,c,d,!1)}function Lp(u,c,d,r){let m=typeof c=="string"?Ea(c):c,x=Al(m.pathname||"/",d);if(x==null)return null;let f=bh(u);Bp(f);let v=null;for(let b=0;v==null&&b<f.length;++b){let p=Fp(x);v=Kp(f[b],p,r)}return v}function bh(u,c=[],d=[],r="",m=!1){let x=(f,v,b=m,p)=>{let g={relativePath:p===void 0?f.path||"":p,caseSensitive:f.caseSensitive===!0,childrenIndex:v,route:f};if(g.relativePath.startsWith("/")){if(!g.relativePath.startsWith(r)&&b)return;Ze(g.relativePath.startsWith(r),`Absolute route path "${g.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),g.relativePath=g.relativePath.slice(r.length)}let y=Rl([r,g.relativePath]),D=d.concat(g);f.children&&f.children.length>0&&(Ze(f.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${y}".`),bh(f.children,c,D,y,b)),!(f.path==null&&!f.index)&&c.push({path:y,score:Zp(y,f.index),routesMeta:D})};return u.forEach((f,v)=>{var b;if(f.path===""||!((b=f.path)!=null&&b.includes("?")))x(f,v);else for(let p of yh(f.path))x(f,v,!0,p)}),c}function yh(u){let c=u.split("/");if(c.length===0)return[];let[d,...r]=c,m=d.endsWith("?"),x=d.replace(/\?$/,"");if(r.length===0)return m?[x,""]:[x];let f=yh(r.join("/")),v=[];return v.push(...f.map(b=>b===""?x:[x,b].join("/"))),m&&v.push(...f),v.map(b=>u.startsWith("/")&&b===""?"/":b)}function Bp(u){u.sort((c,d)=>c.score!==d.score?d.score-c.score:$p(c.routesMeta.map(r=>r.childrenIndex),d.routesMeta.map(r=>r.childrenIndex)))}var kp=/^:[\w-]+$/,Yp=3,Gp=2,Qp=1,Vp=10,Xp=-2,eh=u=>u==="*";function Zp(u,c){let d=u.split("/"),r=d.length;return d.some(eh)&&(r+=Xp),c&&(r+=Gp),d.filter(m=>!eh(m)).reduce((m,x)=>m+(kp.test(x)?Yp:x===""?Qp:Vp),r)}function $p(u,c){return u.length===c.length&&u.slice(0,-1).every((r,m)=>r===c[m])?u[u.length-1]-c[c.length-1]:0}function Kp(u,c,d=!1){let{routesMeta:r}=u,m={},x="/",f=[];for(let v=0;v<r.length;++v){let b=r[v],p=v===r.length-1,g=x==="/"?c:c.slice(x.length)||"/",y=Vi({path:b.relativePath,caseSensitive:b.caseSensitive,end:p},g),D=b.route;if(!y&&p&&d&&!r[r.length-1].route.index&&(y=Vi({path:b.relativePath,caseSensitive:b.caseSensitive,end:!1},g)),!y)return null;Object.assign(m,y.params),f.push({params:m,pathname:Rl([x,y.pathname]),pathnameBase:ev(Rl([x,y.pathnameBase])),route:D}),y.pathnameBase!=="/"&&(x=Rl([x,y.pathnameBase]))}return f}function Vi(u,c){typeof u=="string"&&(u={path:u,caseSensitive:!1,end:!0});let[d,r]=Jp(u.path,u.caseSensitive,u.end),m=c.match(d);if(!m)return null;let x=m[0],f=x.replace(/(.)\/+$/,"$1"),v=m.slice(1);return{params:r.reduce((p,{paramName:g,isOptional:y},D)=>{if(g==="*"){let U=v[D]||"";f=x.slice(0,x.length-U.length).replace(/(.)\/+$/,"$1")}const z=v[D];return y&&!z?p[g]=void 0:p[g]=(z||"").replace(/%2F/g,"/"),p},{}),pathname:x,pathnameBase:f,pattern:u}}function Jp(u,c=!1,d=!0){Ft(u==="*"||!u.endsWith("*")||u.endsWith("/*"),`Route path "${u}" will be treated as if it were "${u.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${u.replace(/\*$/,"/*")}".`);let r=[],m="^"+u.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(f,v,b)=>(r.push({paramName:v,isOptional:b!=null}),b?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return u.endsWith("*")?(r.push({paramName:"*"}),m+=u==="*"||u==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):d?m+="\\/*$":u!==""&&u!=="/"&&(m+="(?:(?=\\/|$))"),[new RegExp(m,c?void 0:"i"),r]}function Fp(u){try{return u.split("/").map(c=>decodeURIComponent(c).replace(/\//g,"%2F")).join("/")}catch(c){return Ft(!1,`The URL path "${u}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${c}).`),u}}function Al(u,c){if(c==="/")return u;if(!u.toLowerCase().startsWith(c.toLowerCase()))return null;let d=c.endsWith("/")?c.length-1:c.length,r=u.charAt(d);return r&&r!=="/"?null:u.slice(d)||"/"}var Pp=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function Wp(u,c="/"){let{pathname:d,search:r="",hash:m=""}=typeof u=="string"?Ea(u):u,x;return d?(d=d.replace(/\/\/+/g,"/"),d.startsWith("/")?x=th(d.substring(1),"/"):x=th(d,c)):x=c,{pathname:x,search:tv(r),hash:lv(m)}}function th(u,c){let d=c.replace(/\/+$/,"").split("/");return u.split("/").forEach(m=>{m===".."?d.length>1&&d.pop():m!=="."&&d.push(m)}),d.length>1?d.join("/"):"/"}function xc(u,c,d,r){return`Cannot include a '${u}' character in a manually specified \`to.${c}\` 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 Ip(u){return u.filter((c,d)=>d===0||c.route.path&&c.route.path.length>0)}function Rc(u){let c=Ip(u);return c.map((d,r)=>r===c.length-1?d.pathname:d.pathnameBase)}function Ac(u,c,d,r=!1){let m;typeof u=="string"?m=Ea(u):(m={...u},Ze(!m.pathname||!m.pathname.includes("?"),xc("?","pathname","search",m)),Ze(!m.pathname||!m.pathname.includes("#"),xc("#","pathname","hash",m)),Ze(!m.search||!m.search.includes("#"),xc("#","search","hash",m)));let x=u===""||m.pathname==="",f=x?"/":m.pathname,v;if(f==null)v=d;else{let y=c.length-1;if(!r&&f.startsWith("..")){let D=f.split("/");for(;D[0]==="..";)D.shift(),y-=1;m.pathname=D.join("/")}v=y>=0?c[y]:"/"}let b=Wp(m,v),p=f&&f!=="/"&&f.endsWith("/"),g=(x||f===".")&&d.endsWith("/");return!b.pathname.endsWith("/")&&(p||g)&&(b.pathname+="/"),b}var Rl=u=>u.join("/").replace(/\/\/+/g,"/"),ev=u=>u.replace(/\/+$/,"").replace(/^\/*/,"/"),tv=u=>!u||u==="?"?"":u.startsWith("?")?u:"?"+u,lv=u=>!u||u==="#"?"":u.startsWith("#")?u:"#"+u,av=class{constructor(u,c,d,r=!1){this.status=u,this.statusText=c||"",this.internal=r,d instanceof Error?(this.data=d.toString(),this.error=d):this.data=d}};function nv(u){return u!=null&&typeof u.status=="number"&&typeof u.statusText=="string"&&typeof u.internal=="boolean"&&"data"in u}function sv(u){return u.map(c=>c.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var jh=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Sh(u,c){let d=u;if(typeof d!="string"||!Pp.test(d))return{absoluteURL:void 0,isExternal:!1,to:d};let r=d,m=!1;if(jh)try{let x=new URL(window.location.href),f=d.startsWith("//")?new URL(x.protocol+d):new URL(d),v=Al(f.pathname,c);f.origin===x.origin&&v!=null?d=v+f.search+f.hash:m=!0}catch{Ft(!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:m,to:d}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var Nh=["POST","PUT","PATCH","DELETE"];new Set(Nh);var iv=["GET",...Nh];new Set(iv);var hn=w.createContext(null);hn.displayName="DataRouter";var $i=w.createContext(null);$i.displayName="DataRouterState";var uv=w.createContext(!1),Eh=w.createContext({isTransitioning:!1});Eh.displayName="ViewTransition";var rv=w.createContext(new Map);rv.displayName="Fetchers";var cv=w.createContext(null);cv.displayName="Await";var Ht=w.createContext(null);Ht.displayName="Navigation";var bs=w.createContext(null);bs.displayName="Location";var rl=w.createContext({outlet:null,matches:[],isDataRoute:!1});rl.displayName="Route";var Mc=w.createContext(null);Mc.displayName="RouteError";var wh="REACT_ROUTER_ERROR",ov="REDIRECT",dv="ROUTE_ERROR_RESPONSE";function fv(u){if(u.startsWith(`${wh}:${ov}:{`))try{let c=JSON.parse(u.slice(28));if(typeof c=="object"&&c&&typeof c.status=="number"&&typeof c.statusText=="string"&&typeof c.location=="string"&&typeof c.reloadDocument=="boolean"&&typeof c.replace=="boolean")return c}catch{}}function mv(u){if(u.startsWith(`${wh}:${dv}:{`))try{let c=JSON.parse(u.slice(40));if(typeof c=="object"&&c&&typeof c.status=="number"&&typeof c.statusText=="string")return new av(c.status,c.statusText,c.data)}catch{}}function hv(u,{relative:c}={}){Ze(xn(),"useHref() may be used only in the context of a <Router> component.");let{basename:d,navigator:r}=w.useContext(Ht),{hash:m,pathname:x,search:f}=ys(u,{relative:c}),v=x;return d!=="/"&&(v=x==="/"?d:Rl([d,x])),r.createHref({pathname:v,search:f,hash:m})}function xn(){return w.useContext(bs)!=null}function sa(){return Ze(xn(),"useLocation() may be used only in the context of a <Router> component."),w.useContext(bs).location}var Th="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Ch(u){w.useContext(Ht).static||w.useLayoutEffect(u)}function _c(){let{isDataRoute:u}=w.useContext(rl);return u?Cv():xv()}function xv(){Ze(xn(),"useNavigate() may be used only in the context of a <Router> component.");let u=w.useContext(hn),{basename:c,navigator:d}=w.useContext(Ht),{matches:r}=w.useContext(rl),{pathname:m}=sa(),x=JSON.stringify(Rc(r)),f=w.useRef(!1);return Ch(()=>{f.current=!0}),w.useCallback((b,p={})=>{if(Ft(f.current,Th),!f.current)return;if(typeof b=="number"){d.go(b);return}let g=Ac(b,JSON.parse(x),m,p.relative==="path");u==null&&c!=="/"&&(g.pathname=g.pathname==="/"?c:Rl([c,g.pathname])),(p.replace?d.replace:d.push)(g,p.state,p)},[c,d,x,m,u])}w.createContext(null);function ys(u,{relative:c}={}){let{matches:d}=w.useContext(rl),{pathname:r}=sa(),m=JSON.stringify(Rc(d));return w.useMemo(()=>Ac(u,JSON.parse(m),r,c==="path"),[u,m,r,c])}function pv(u,c){return Rh(u,c)}function Rh(u,c,d,r,m){var B;Ze(xn(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:x}=w.useContext(Ht),{matches:f}=w.useContext(rl),v=f[f.length-1],b=v?v.params:{},p=v?v.pathname:"/",g=v?v.pathnameBase:"/",y=v&&v.route;{let S=y&&y.path||"";Mh(p,!y||S.endsWith("*")||S.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${p}" (under <Route path="${S}">) 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="${S}"> to <Route path="${S==="/"?"*":`${S}/*`}">.`)}let D=sa(),z;if(c){let S=typeof c=="string"?Ea(c):c;Ze(g==="/"||((B=S.pathname)==null?void 0:B.startsWith(g)),`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 "${g}" but pathname "${S.pathname}" was given in the \`location\` prop.`),z=S}else z=D;let U=z.pathname||"/",_=U;if(g!=="/"){let S=g.replace(/^\//,"").split("/");_="/"+U.replace(/^\//,"").split("/").slice(S.length).join("/")}let Y=gh(u,{pathname:_});Ft(y||Y!=null,`No routes matched location "${z.pathname}${z.search}${z.hash}" `),Ft(Y==null||Y[Y.length-1].route.element!==void 0||Y[Y.length-1].route.Component!==void 0||Y[Y.length-1].route.lazy!==void 0,`Matched leaf route at location "${z.pathname}${z.search}${z.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 Q=jv(Y&&Y.map(S=>Object.assign({},S,{params:Object.assign({},b,S.params),pathname:Rl([g,x.encodeLocation?x.encodeLocation(S.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:S.pathname]),pathnameBase:S.pathnameBase==="/"?g:Rl([g,x.encodeLocation?x.encodeLocation(S.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:S.pathnameBase])})),f,d,r,m);return c&&Q?w.createElement(bs.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...z},navigationType:"POP"}},Q):Q}function vv(){let u=Tv(),c=nv(u)?`${u.status} ${u.statusText}`:u instanceof Error?u.message:JSON.stringify(u),d=u instanceof Error?u.stack:null,r="rgba(200,200,200, 0.5)",m={padding:"0.5rem",backgroundColor:r},x={padding:"2px 4px",backgroundColor:r},f=null;return console.error("Error handled by React Router default ErrorBoundary:",u),f=w.createElement(w.Fragment,null,w.createElement("p",null,"💿 Hey developer 👋"),w.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",w.createElement("code",{style:x},"ErrorBoundary")," or"," ",w.createElement("code",{style:x},"errorElement")," prop on your route.")),w.createElement(w.Fragment,null,w.createElement("h2",null,"Unexpected Application Error!"),w.createElement("h3",{style:{fontStyle:"italic"}},c),d?w.createElement("pre",{style:m},d):null,f)}var gv=w.createElement(vv,null),Ah=class extends w.Component{constructor(u){super(u),this.state={location:u.location,revalidation:u.revalidation,error:u.error}}static getDerivedStateFromError(u){return{error:u}}static getDerivedStateFromProps(u,c){return c.location!==u.location||c.revalidation!=="idle"&&u.revalidation==="idle"?{error:u.error,location:u.location,revalidation:u.revalidation}:{error:u.error!==void 0?u.error:c.error,location:c.location,revalidation:u.revalidation||c.revalidation}}componentDidCatch(u,c){this.props.onError?this.props.onError(u,c):console.error("React Router caught the following error during render",u)}render(){let u=this.state.error;if(this.context&&typeof u=="object"&&u&&"digest"in u&&typeof u.digest=="string"){const d=mv(u.digest);d&&(u=d)}let c=u!==void 0?w.createElement(rl.Provider,{value:this.props.routeContext},w.createElement(Mc.Provider,{value:u,children:this.props.component})):this.props.children;return this.context?w.createElement(bv,{error:u},c):c}};Ah.contextType=uv;var pc=new WeakMap;function bv({children:u,error:c}){let{basename:d}=w.useContext(Ht);if(typeof c=="object"&&c&&"digest"in c&&typeof c.digest=="string"){let r=fv(c.digest);if(r){let m=pc.get(c);if(m)throw m;let x=Sh(r.location,d);if(jh&&!pc.get(c))if(x.isExternal||r.reloadDocument)window.location.href=x.absoluteURL||x.to;else{const f=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(x.to,{replace:r.replace}));throw pc.set(c,f),f}return w.createElement("meta",{httpEquiv:"refresh",content:`0;url=${x.absoluteURL||x.to}`})}}return u}function yv({routeContext:u,match:c,children:d}){let r=w.useContext(hn);return r&&r.static&&r.staticContext&&(c.route.errorElement||c.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=c.route.id),w.createElement(rl.Provider,{value:u},d)}function jv(u,c=[],d=null,r=null,m=null){if(u==null){if(!d)return null;if(d.errors)u=d.matches;else if(c.length===0&&!d.initialized&&d.matches.length>0)u=d.matches;else return null}let x=u,f=d==null?void 0:d.errors;if(f!=null){let g=x.findIndex(y=>y.route.id&&(f==null?void 0:f[y.route.id])!==void 0);Ze(g>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(f).join(",")}`),x=x.slice(0,Math.min(x.length,g+1))}let v=!1,b=-1;if(d)for(let g=0;g<x.length;g++){let y=x[g];if((y.route.HydrateFallback||y.route.hydrateFallbackElement)&&(b=g),y.route.id){let{loaderData:D,errors:z}=d,U=y.route.loader&&!D.hasOwnProperty(y.route.id)&&(!z||z[y.route.id]===void 0);if(y.route.lazy||U){v=!0,b>=0?x=x.slice(0,b+1):x=[x[0]];break}}}let p=d&&r?(g,y)=>{var D,z;r(g,{location:d.location,params:((z=(D=d.matches)==null?void 0:D[0])==null?void 0:z.params)??{},unstable_pattern:sv(d.matches),errorInfo:y})}:void 0;return x.reduceRight((g,y,D)=>{let z,U=!1,_=null,Y=null;d&&(z=f&&y.route.id?f[y.route.id]:void 0,_=y.route.errorElement||gv,v&&(b<0&&D===0?(Mh("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),U=!0,Y=null):b===D&&(U=!0,Y=y.route.hydrateFallbackElement||null)));let Q=c.concat(x.slice(0,D+1)),B=()=>{let S;return z?S=_:U?S=Y:y.route.Component?S=w.createElement(y.route.Component,null):y.route.element?S=y.route.element:S=g,w.createElement(yv,{match:y,routeContext:{outlet:g,matches:Q,isDataRoute:d!=null},children:S})};return d&&(y.route.ErrorBoundary||y.route.errorElement||D===0)?w.createElement(Ah,{location:d.location,revalidation:d.revalidation,component:_,error:z,children:B(),routeContext:{outlet:null,matches:Q,isDataRoute:!0},onError:p}):B()},null)}function Dc(u){return`${u} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Sv(u){let c=w.useContext(hn);return Ze(c,Dc(u)),c}function Nv(u){let c=w.useContext($i);return Ze(c,Dc(u)),c}function Ev(u){let c=w.useContext(rl);return Ze(c,Dc(u)),c}function zc(u){let c=Ev(u),d=c.matches[c.matches.length-1];return Ze(d.route.id,`${u} can only be used on routes that contain a unique "id"`),d.route.id}function wv(){return zc("useRouteId")}function Tv(){var r;let u=w.useContext(Mc),c=Nv("useRouteError"),d=zc("useRouteError");return u!==void 0?u:(r=c.errors)==null?void 0:r[d]}function Cv(){let{router:u}=Sv("useNavigate"),c=zc("useNavigate"),d=w.useRef(!1);return Ch(()=>{d.current=!0}),w.useCallback(async(m,x={})=>{Ft(d.current,Th),d.current&&(typeof m=="number"?await u.navigate(m):await u.navigate(m,{fromRouteId:c,...x}))},[u,c])}var lh={};function Mh(u,c,d){!c&&!lh[u]&&(lh[u]=!0,Ft(!1,d))}w.memo(Rv);function Rv({routes:u,future:c,state:d,onError:r}){return Rh(u,void 0,d,r,c)}function Av({to:u,replace:c,state:d,relative:r}){Ze(xn(),"<Navigate> may be used only in the context of a <Router> component.");let{static:m}=w.useContext(Ht);Ft(!m,"<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:x}=w.useContext(rl),{pathname:f}=sa(),v=_c(),b=Ac(u,Rc(x),f,r==="path"),p=JSON.stringify(b);return w.useEffect(()=>{v(JSON.parse(p),{replace:c,state:d,relative:r})},[v,p,r,c,d]),null}function Cl(u){Ze(!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 Mv({basename:u="/",children:c=null,location:d,navigationType:r="POP",navigator:m,static:x=!1,unstable_useTransitions:f}){Ze(!xn(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let v=u.replace(/^\/*/,"/"),b=w.useMemo(()=>({basename:v,navigator:m,static:x,unstable_useTransitions:f,future:{}}),[v,m,x,f]);typeof d=="string"&&(d=Ea(d));let{pathname:p="/",search:g="",hash:y="",state:D=null,key:z="default"}=d,U=w.useMemo(()=>{let _=Al(p,v);return _==null?null:{location:{pathname:_,search:g,hash:y,state:D,key:z},navigationType:r}},[v,p,g,y,D,z,r]);return Ft(U!=null,`<Router basename="${v}"> is not able to match the URL "${p}${g}${y}" because it does not start with the basename, so the <Router> won't render anything.`),U==null?null:w.createElement(Ht.Provider,{value:b},w.createElement(bs.Provider,{children:c,value:U}))}function _v({children:u,location:c}){return pv(Sc(u),c)}function Sc(u,c=[]){let d=[];return w.Children.forEach(u,(r,m)=>{if(!w.isValidElement(r))return;let x=[...c,m];if(r.type===w.Fragment){d.push.apply(d,Sc(r.props.children,x));return}Ze(r.type===Cl,`[${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>`),Ze(!r.props.index||!r.props.children,"An index route cannot have child routes.");let f={id:r.props.id||x.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&&(f.children=Sc(r.props.children,x)),d.push(f)}),d}var Gi="get",Qi="application/x-www-form-urlencoded";function Ki(u){return typeof HTMLElement<"u"&&u instanceof HTMLElement}function Dv(u){return Ki(u)&&u.tagName.toLowerCase()==="button"}function zv(u){return Ki(u)&&u.tagName.toLowerCase()==="form"}function Ov(u){return Ki(u)&&u.tagName.toLowerCase()==="input"}function Uv(u){return!!(u.metaKey||u.altKey||u.ctrlKey||u.shiftKey)}function qv(u,c){return u.button===0&&(!c||c==="_self")&&!Uv(u)}var Bi=null;function Hv(){if(Bi===null)try{new FormData(document.createElement("form"),0),Bi=!1}catch{Bi=!0}return Bi}var Lv=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function vc(u){return u!=null&&!Lv.has(u)?(Ft(!1,`"${u}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Qi}"`),null):u}function Bv(u,c){let d,r,m,x,f;if(zv(u)){let v=u.getAttribute("action");r=v?Al(v,c):null,d=u.getAttribute("method")||Gi,m=vc(u.getAttribute("enctype"))||Qi,x=new FormData(u)}else if(Dv(u)||Ov(u)&&(u.type==="submit"||u.type==="image")){let v=u.form;if(v==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let b=u.getAttribute("formaction")||v.getAttribute("action");if(r=b?Al(b,c):null,d=u.getAttribute("formmethod")||v.getAttribute("method")||Gi,m=vc(u.getAttribute("formenctype"))||vc(v.getAttribute("enctype"))||Qi,x=new FormData(v,u),!Hv()){let{name:p,type:g,value:y}=u;if(g==="image"){let D=p?`${p}.`:"";x.append(`${D}x`,"0"),x.append(`${D}y`,"0")}else p&&x.append(p,y)}}else{if(Ki(u))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');d=Gi,r=null,m=Qi,f=u}return x&&m==="text/plain"&&(f=x,x=void 0),{action:r,method:d.toLowerCase(),encType:m,formData:x,body:f}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Oc(u,c){if(u===!1||u===null||typeof u>"u")throw new Error(c)}function kv(u,c,d,r){let m=typeof u=="string"?new URL(u,typeof window>"u"?"server://singlefetch/":window.location.origin):u;return d?m.pathname.endsWith("/")?m.pathname=`${m.pathname}_.${r}`:m.pathname=`${m.pathname}.${r}`:m.pathname==="/"?m.pathname=`_root.${r}`:c&&Al(m.pathname,c)==="/"?m.pathname=`${c.replace(/\/$/,"")}/_root.${r}`:m.pathname=`${m.pathname.replace(/\/$/,"")}.${r}`,m}async function Yv(u,c){if(u.id in c)return c[u.id];try{let d=await import(u.module);return c[u.id]=d,d}catch(d){return console.error(`Error loading route module \`${u.module}\`, reloading page...`),console.error(d),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function Gv(u){return u==null?!1:u.href==null?u.rel==="preload"&&typeof u.imageSrcSet=="string"&&typeof u.imageSizes=="string":typeof u.rel=="string"&&typeof u.href=="string"}async function Qv(u,c,d){let r=await Promise.all(u.map(async m=>{let x=c.routes[m.route.id];if(x){let f=await Yv(x,d);return f.links?f.links():[]}return[]}));return $v(r.flat(1).filter(Gv).filter(m=>m.rel==="stylesheet"||m.rel==="preload").map(m=>m.rel==="stylesheet"?{...m,rel:"prefetch",as:"style"}:{...m,rel:"prefetch"}))}function ah(u,c,d,r,m,x){let f=(b,p)=>d[p]?b.route.id!==d[p].route.id:!0,v=(b,p)=>{var g;return d[p].pathname!==b.pathname||((g=d[p].route.path)==null?void 0:g.endsWith("*"))&&d[p].params["*"]!==b.params["*"]};return x==="assets"?c.filter((b,p)=>f(b,p)||v(b,p)):x==="data"?c.filter((b,p)=>{var y;let g=r.routes[b.route.id];if(!g||!g.hasLoader)return!1;if(f(b,p)||v(b,p))return!0;if(b.route.shouldRevalidate){let D=b.route.shouldRevalidate({currentUrl:new URL(m.pathname+m.search+m.hash,window.origin),currentParams:((y=d[0])==null?void 0:y.params)||{},nextUrl:new URL(u,window.origin),nextParams:b.params,defaultShouldRevalidate:!0});if(typeof D=="boolean")return D}return!0}):[]}function Vv(u,c,{includeHydrateFallback:d}={}){return Xv(u.map(r=>{let m=c.routes[r.route.id];if(!m)return[];let x=[m.module];return m.clientActionModule&&(x=x.concat(m.clientActionModule)),m.clientLoaderModule&&(x=x.concat(m.clientLoaderModule)),d&&m.hydrateFallbackModule&&(x=x.concat(m.hydrateFallbackModule)),m.imports&&(x=x.concat(m.imports)),x}).flat(1))}function Xv(u){return[...new Set(u)]}function Zv(u){let c={},d=Object.keys(u).sort();for(let r of d)c[r]=u[r];return c}function $v(u,c){let d=new Set;return new Set(c),u.reduce((r,m)=>{let x=JSON.stringify(Zv(m));return d.has(x)||(d.add(x),r.push({key:x,link:m})),r},[])}function _h(){let u=w.useContext(hn);return Oc(u,"You must render this element inside a <DataRouterContext.Provider> element"),u}function Kv(){let u=w.useContext($i);return Oc(u,"You must render this element inside a <DataRouterStateContext.Provider> element"),u}var Uc=w.createContext(void 0);Uc.displayName="FrameworkContext";function Dh(){let u=w.useContext(Uc);return Oc(u,"You must render this element inside a <HydratedRouter> element"),u}function Jv(u,c){let d=w.useContext(Uc),[r,m]=w.useState(!1),[x,f]=w.useState(!1),{onFocus:v,onBlur:b,onMouseEnter:p,onMouseLeave:g,onTouchStart:y}=c,D=w.useRef(null);w.useEffect(()=>{if(u==="render"&&f(!0),u==="viewport"){let _=Q=>{Q.forEach(B=>{f(B.isIntersecting)})},Y=new IntersectionObserver(_,{threshold:.5});return D.current&&Y.observe(D.current),()=>{Y.disconnect()}}},[u]),w.useEffect(()=>{if(r){let _=setTimeout(()=>{f(!0)},100);return()=>{clearTimeout(_)}}},[r]);let z=()=>{m(!0)},U=()=>{m(!1),f(!1)};return d?u!=="intent"?[x,D,{}]:[x,D,{onFocus:fs(v,z),onBlur:fs(b,U),onMouseEnter:fs(p,z),onMouseLeave:fs(g,U),onTouchStart:fs(y,z)}]:[!1,D,{}]}function fs(u,c){return d=>{u&&u(d),d.defaultPrevented||c(d)}}function Fv({page:u,...c}){let{router:d}=_h(),r=w.useMemo(()=>gh(d.routes,u,d.basename),[d.routes,u,d.basename]);return r?w.createElement(Wv,{page:u,matches:r,...c}):null}function Pv(u){let{manifest:c,routeModules:d}=Dh(),[r,m]=w.useState([]);return w.useEffect(()=>{let x=!1;return Qv(u,c,d).then(f=>{x||m(f)}),()=>{x=!0}},[u,c,d]),r}function Wv({page:u,matches:c,...d}){let r=sa(),{future:m,manifest:x,routeModules:f}=Dh(),{basename:v}=_h(),{loaderData:b,matches:p}=Kv(),g=w.useMemo(()=>ah(u,c,p,x,r,"data"),[u,c,p,x,r]),y=w.useMemo(()=>ah(u,c,p,x,r,"assets"),[u,c,p,x,r]),D=w.useMemo(()=>{if(u===r.pathname+r.search+r.hash)return[];let _=new Set,Y=!1;if(c.forEach(B=>{var le;let S=x.routes[B.route.id];!S||!S.hasLoader||(!g.some(Z=>Z.route.id===B.route.id)&&B.route.id in b&&((le=f[B.route.id])!=null&&le.shouldRevalidate)||S.hasClientLoader?Y=!0:_.add(B.route.id))}),_.size===0)return[];let Q=kv(u,v,m.unstable_trailingSlashAwareDataRequests,"data");return Y&&_.size>0&&Q.searchParams.set("_routes",c.filter(B=>_.has(B.route.id)).map(B=>B.route.id).join(",")),[Q.pathname+Q.search]},[v,m.unstable_trailingSlashAwareDataRequests,b,r,x,g,c,u,f]),z=w.useMemo(()=>Vv(y,x),[y,x]),U=Pv(y);return w.createElement(w.Fragment,null,D.map(_=>w.createElement("link",{key:_,rel:"prefetch",as:"fetch",href:_,...d})),z.map(_=>w.createElement("link",{key:_,rel:"modulepreload",href:_,...d})),U.map(({key:_,link:Y})=>w.createElement("link",{key:_,nonce:d.nonce,...Y,crossOrigin:Y.crossOrigin??d.crossOrigin})))}function Iv(...u){return c=>{u.forEach(d=>{typeof d=="function"?d(c):d!=null&&(d.current=c)})}}var eg=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{eg&&(window.__reactRouterVersion="7.13.0")}catch{}function tg({basename:u,children:c,unstable_useTransitions:d,window:r}){let m=w.useRef();m.current==null&&(m.current=Op({window:r,v5Compat:!0}));let x=m.current,[f,v]=w.useState({action:x.action,location:x.location}),b=w.useCallback(p=>{d===!1?v(p):w.startTransition(()=>v(p))},[d]);return w.useLayoutEffect(()=>x.listen(b),[x,b]),w.createElement(Mv,{basename:u,children:c,location:f.location,navigationType:f.action,navigator:x,unstable_useTransitions:d})}var zh=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Oh=w.forwardRef(function({onClick:c,discover:d="render",prefetch:r="none",relative:m,reloadDocument:x,replace:f,state:v,target:b,to:p,preventScrollReset:g,viewTransition:y,unstable_defaultShouldRevalidate:D,...z},U){let{basename:_,unstable_useTransitions:Y}=w.useContext(Ht),Q=typeof p=="string"&&zh.test(p),B=Sh(p,_);p=B.to;let S=hv(p,{relative:m}),[le,Z,$]=Jv(r,z),P=ng(p,{replace:f,state:v,target:b,preventScrollReset:g,relative:m,viewTransition:y,unstable_defaultShouldRevalidate:D,unstable_useTransitions:Y});function ie(X){c&&c(X),X.defaultPrevented||P(X)}let ue=w.createElement("a",{...z,...$,href:B.absoluteURL||S,onClick:B.isExternal||x?c:ie,ref:Iv(U,Z),target:b,"data-discover":!Q&&d==="render"?"true":void 0});return le&&!Q?w.createElement(w.Fragment,null,ue,w.createElement(Fv,{page:S})):ue});Oh.displayName="Link";var Uh=w.forwardRef(function({"aria-current":c="page",caseSensitive:d=!1,className:r="",end:m=!1,style:x,to:f,viewTransition:v,children:b,...p},g){let y=ys(f,{relative:p.relative}),D=sa(),z=w.useContext($i),{navigator:U,basename:_}=w.useContext(Ht),Y=z!=null&&cg(y)&&v===!0,Q=U.encodeLocation?U.encodeLocation(y).pathname:y.pathname,B=D.pathname,S=z&&z.navigation&&z.navigation.location?z.navigation.location.pathname:null;d||(B=B.toLowerCase(),S=S?S.toLowerCase():null,Q=Q.toLowerCase()),S&&_&&(S=Al(S,_)||S);const le=Q!=="/"&&Q.endsWith("/")?Q.length-1:Q.length;let Z=B===Q||!m&&B.startsWith(Q)&&B.charAt(le)==="/",$=S!=null&&(S===Q||!m&&S.startsWith(Q)&&S.charAt(Q.length)==="/"),P={isActive:Z,isPending:$,isTransitioning:Y},ie=Z?c:void 0,ue;typeof r=="function"?ue=r(P):ue=[r,Z?"active":null,$?"pending":null,Y?"transitioning":null].filter(Boolean).join(" ");let X=typeof x=="function"?x(P):x;return w.createElement(Oh,{...p,"aria-current":ie,className:ue,ref:g,style:X,to:f,viewTransition:v},typeof b=="function"?b(P):b)});Uh.displayName="NavLink";var lg=w.forwardRef(({discover:u="render",fetcherKey:c,navigate:d,reloadDocument:r,replace:m,state:x,method:f=Gi,action:v,onSubmit:b,relative:p,preventScrollReset:g,viewTransition:y,unstable_defaultShouldRevalidate:D,...z},U)=>{let{unstable_useTransitions:_}=w.useContext(Ht),Y=ug(),Q=rg(v,{relative:p}),B=f.toLowerCase()==="get"?"get":"post",S=typeof v=="string"&&zh.test(v),le=Z=>{if(b&&b(Z),Z.defaultPrevented)return;Z.preventDefault();let $=Z.nativeEvent.submitter,P=($==null?void 0:$.getAttribute("formmethod"))||f,ie=()=>Y($||Z.currentTarget,{fetcherKey:c,method:P,navigate:d,replace:m,state:x,relative:p,preventScrollReset:g,viewTransition:y,unstable_defaultShouldRevalidate:D});_&&d!==!1?w.startTransition(()=>ie()):ie()};return w.createElement("form",{ref:U,method:B,action:Q,onSubmit:r?b:le,...z,"data-discover":!S&&u==="render"?"true":void 0})});lg.displayName="Form";function ag(u){return`${u} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function qh(u){let c=w.useContext(hn);return Ze(c,ag(u)),c}function ng(u,{target:c,replace:d,state:r,preventScrollReset:m,relative:x,viewTransition:f,unstable_defaultShouldRevalidate:v,unstable_useTransitions:b}={}){let p=_c(),g=sa(),y=ys(u,{relative:x});return w.useCallback(D=>{if(qv(D,c)){D.preventDefault();let z=d!==void 0?d:vs(g)===vs(y),U=()=>p(u,{replace:z,state:r,preventScrollReset:m,relative:x,viewTransition:f,unstable_defaultShouldRevalidate:v});b?w.startTransition(()=>U()):U()}},[g,p,y,d,r,c,u,m,x,f,v,b])}var sg=0,ig=()=>`__${String(++sg)}__`;function ug(){let{router:u}=qh("useSubmit"),{basename:c}=w.useContext(Ht),d=wv(),r=u.fetch,m=u.navigate;return w.useCallback(async(x,f={})=>{let{action:v,method:b,encType:p,formData:g,body:y}=Bv(x,c);if(f.navigate===!1){let D=f.fetcherKey||ig();await r(D,d,f.action||v,{unstable_defaultShouldRevalidate:f.unstable_defaultShouldRevalidate,preventScrollReset:f.preventScrollReset,formData:g,body:y,formMethod:f.method||b,formEncType:f.encType||p,flushSync:f.flushSync})}else await m(f.action||v,{unstable_defaultShouldRevalidate:f.unstable_defaultShouldRevalidate,preventScrollReset:f.preventScrollReset,formData:g,body:y,formMethod:f.method||b,formEncType:f.encType||p,replace:f.replace,state:f.state,fromRouteId:d,flushSync:f.flushSync,viewTransition:f.viewTransition})},[r,m,c,d])}function rg(u,{relative:c}={}){let{basename:d}=w.useContext(Ht),r=w.useContext(rl);Ze(r,"useFormAction must be used inside a RouteContext");let[m]=r.matches.slice(-1),x={...ys(u||".",{relative:c})},f=sa();if(u==null){x.search=f.search;let v=new URLSearchParams(x.search),b=v.getAll("index");if(b.some(g=>g==="")){v.delete("index"),b.filter(y=>y).forEach(y=>v.append("index",y));let g=v.toString();x.search=g?`?${g}`:""}}return(!u||u===".")&&m.route.index&&(x.search=x.search?x.search.replace(/^\?/,"?index&"):"?index"),d!=="/"&&(x.pathname=x.pathname==="/"?d:Rl([d,x.pathname])),vs(x)}function cg(u,{relative:c}={}){let d=w.useContext(Eh);Ze(d!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=qh("useViewTransitionState"),m=ys(u,{relative:c});if(!d.isTransitioning)return!1;let x=Al(d.currentLocation.pathname,r)||d.currentLocation.pathname,f=Al(d.nextLocation.pathname,r)||d.nextLocation.pathname;return Vi(m.pathname,f)!=null||Vi(m.pathname,x)!=null}var og=vh();const dg=Tc(og);/**
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 Hh=(...u)=>u.filter((c,d,r)=>!!c&&c.trim()!==""&&r.indexOf(c)===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 fg=u=>u.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 mg=u=>u.replace(/^([A-Z])|[\s-_]+(\w)/g,(c,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 nh=u=>{const c=mg(u);return c.charAt(0).toUpperCase()+c.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 hg={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 xg=u=>{for(const c in u)if(c.startsWith("aria-")||c==="role"||c==="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 pg=w.forwardRef(({color:u="currentColor",size:c=24,strokeWidth:d=2,absoluteStrokeWidth:r,className:m="",children:x,iconNode:f,...v},b)=>w.createElement("svg",{ref:b,...hg,width:c,height:c,stroke:u,strokeWidth:r?Number(d)*24/Number(c):d,className:Hh("lucide",m),...!x&&!xg(v)&&{"aria-hidden":"true"},...v},[...f.map(([p,g])=>w.createElement(p,g)),...Array.isArray(x)?x:[x]]));/**
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 oe=(u,c)=>{const d=w.forwardRef(({className:r,...m},x)=>w.createElement(pg,{ref:x,iconNode:c,className:Hh(`lucide-${fg(nh(u))}`,`lucide-${u}`,r),...m}));return d.displayName=nh(u),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 vg=[["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"}]],Lh=oe("activity",vg);/**
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 gg=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],bg=oe("arrow-down",gg);/**
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 yg=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],sh=oe("arrow-right",yg);/**
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 jg=[["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"}]],Sg=oe("arrow-up-down",jg);/**
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 Ng=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],Eg=oe("arrow-up",Ng);/**
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 wg=[["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"}]],Tg=oe("bell",wg);/**
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 Cg=[["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"}]],ih=oe("briefcase",Cg);/**
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 Rg=[["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"}]],qc=oe("calendar",Rg);/**
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 Ag=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Nc=oe("check",Ag);/**
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 Mg=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Bh=oe("chevron-down",Mg);/**
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 _g=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],Dg=oe("chevron-left",_g);/**
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 zg=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Og=oe("chevron-right",zg);/**
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 Ug=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],qg=oe("chevron-up",Ug);/**
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 Hg=[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]],Lg=oe("chevrons-up-down",Hg);/**
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 Bg=[["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"}]],Ml=oe("circle-alert",Bg);/**
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 kg=[["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"}]],uh=oe("circle-arrow-down",kg);/**
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 Yg=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],js=oe("circle-check-big",Yg);/**
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 Gg=[["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"}]],Qg=oe("circle-x",Gg);/**
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 Vg=[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2",key:"116196"}],["path",{d:"M12 11h4",key:"1jrz19"}],["path",{d:"M12 16h4",key:"n85exb"}],["path",{d:"M8 11h.01",key:"1dfujw"}],["path",{d:"M8 16h.01",key:"18s6g9"}]],rh=oe("clipboard-list",Vg);/**
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 Xg=[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],Xi=oe("clock",Xg);/**
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 Zg=[["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"}]],kh=oe("external-link",Zg);/**
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 $g=[["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"}]],Kg=oe("eye-off",$g);/**
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 Jg=[["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"}]],Fg=oe("eye",Jg);/**
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 Pg=[["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"}]],Ec=oe("file-text",Pg);/**
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 Wg=[["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"}]],Ig=oe("git-pull-request",Wg);/**
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 eb=[["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"}]],tb=oe("house",eb);/**
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 lb=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],ab=oe("info",lb);/**
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 nb=[["path",{d:"M5 3v14",key:"9nsxs2"}],["path",{d:"M12 3v8",key:"1h2ygw"}],["path",{d:"M19 3v18",key:"1sk56x"}]],sb=oe("kanban",nb);/**
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 ib=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],Yh=oe("loader-circle",ib);/**
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 ub=[["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"}]],Gh=oe("map",ub);/**
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 rb=[["path",{d:"M5 12h14",key:"1ays0h"}]],cb=oe("minus",rb);/**
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 ob=[["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"}]],Qh=oe("pause",ob);/**
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 db=[["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"}]],Hc=oe("pen",db);/**
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 fb=[["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"}]],gs=oe("play",fb);/**
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 mb=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],pn=oe("plus",mb);/**
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 hb=[["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"}]],Vh=oe("rotate-ccw",hb);/**
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 xb=[["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"}]],pb=oe("save",xb);/**
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 vb=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],Ji=oe("search",vb);/**
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 gb=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],bb=oe("settings",gb);/**
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 yb=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],ch=oe("square",yb);/**
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 jb=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],Sb=oe("terminal",jb);/**
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 Nb=[["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"}]],Eb=oe("test-tube-diagonal",Nb);/**
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 wb=[["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"}]],Lc=oe("trash-2",wb);/**
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 Tb=[["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"}]],Fi=oe("triangle-alert",Tb);/**
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 Cb=[["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"}]],Rb=oe("wifi",Cb);/**
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 Ab=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],vn=oe("x",Ab),Bc="";let Xh=!1,wc=null;function Mb(u){Xh=u}function _b(u){wc=u}function Db(u){return encodeURIComponent(u.replace(/\//g,"~"))}function $e(u){return Xh&&wc?u.replace("/api/",`/api/projects/${Db(wc)}/`):u}function zb(){return Ke("/api/mode")}function Ob(){return Ke("/api/projects")}async function Ke(u,c){const d=`${Bc}${u}`,r=await fetch(d,{headers:{"Content-Type":"application/json",...c==null?void 0:c.headers},...c});if(!r.ok){const m=await r.json().catch(()=>({error:"Unknown error"}));throw new Error(m.error||`HTTP ${r.status}: ${r.statusText}`)}return r.json()}function gc(){return Ke($e("/api/status"))}function Zh(){return Ke($e("/api/prs"))}function Ub(u,c){const d=`?lines=${encodeURIComponent(c)}`;return Ke($e(`/api/logs/${encodeURIComponent(u)}${d}`))}function $h(){return Ke($e("/api/config"))}function aa(u){return Ke($e("/api/config"),{method:"PUT",body:JSON.stringify(u)})}function qb(){return Ke($e("/api/doctor"))}function Kh(){return Ke($e("/api/schedule-info"))}function Hb(){return Ke($e("/api/actions/run"),{method:"POST"})}function Jh(){return Ke($e("/api/actions/review"),{method:"POST"})}function Lb(){return Ke($e("/api/actions/qa"),{method:"POST"})}function Bb(){return Ke($e("/api/actions/audit"),{method:"POST"})}function kb(){return Ke($e("/api/actions/planner"),{method:"POST"})}function ps(){return Ke($e("/api/actions/install-cron"),{method:"POST"})}function Yb(){return Ke($e("/api/actions/uninstall-cron"),{method:"POST"})}function Gb(u="all"){return Ke($e("/api/actions/cancel"),{method:"POST",body:JSON.stringify({type:u})})}const na=["Draft","Ready","In Progress","Review","Done"];function Fh(){return Ke($e("/api/board/status"))}function Qb(u){return Ke($e("/api/board/issues"),{method:"POST",body:JSON.stringify(u)})}function Ph(u,c){return Ke($e(`/api/board/issues/${u}/move`),{method:"PATCH",body:JSON.stringify({column:c})})}async function Vb(u){const c=`${Bc}${$e(`/api/board/issues/${u}`)}`,d=await fetch(c,{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 Xb(){return Ke($e("/api/actions/clear-lock"),{method:"POST"})}function Zb(u,c=[],d){const r=(d==null?void 0:d.enabled)??!0,m=w.useRef(u);m.current=u,w.useEffect(()=>{if(!r)return;const x=`${Bc}${$e("/api/status/events")}`,f=new EventSource(x);return f.addEventListener("status_changed",v=>{try{const b=JSON.parse(v.data);m.current(b)}catch{}}),()=>{f.close()}},[r,...c])}function $b(){return Ke($e("/api/roadmap"))}function Kb(){return Ke($e("/api/roadmap/scan"),{method:"POST"})}function Wh(u){return Ke($e("/api/roadmap/toggle"),{method:"PUT",body:JSON.stringify({enabled:u})})}function el(u,c=[],d){const r=(d==null?void 0:d.enabled)??!0,[m,x]=w.useState(null),[f,v]=w.useState(!0),[b,p]=w.useState(null),g=w.useRef(u);g.current=u;const y=w.useRef(()=>{(async()=>{p(null);try{const z=await g.current();x(z)}catch(z){p(z instanceof Error?z:new Error("Unknown error"))}})()});return y.current=y.current.bind(y),w.useEffect(()=>{if(!r)return;let D=!1;return v(!0),p(null),(async()=>{try{const U=await g.current();D||x(U)}catch(U){D||p(U instanceof Error?U:new Error("Unknown error"))}finally{D||v(!1)}})(),()=>{D=!0}},[...c,r]),{data:m,loading:f,error:b,refetch:y.current}}const oh=u=>{let c;const d=new Set,r=(p,g)=>{const y=typeof p=="function"?p(c):p;if(!Object.is(y,c)){const D=c;c=g??(typeof y!="object"||y===null)?y:Object.assign({},c,y),d.forEach(z=>z(c,D))}},m=()=>c,v={setState:r,getState:m,getInitialState:()=>b,subscribe:p=>(d.add(p),()=>d.delete(p))},b=c=u(r,m,v);return v},Jb=u=>u?oh(u):oh,Fb=u=>u;function Pb(u,c=Fb){const d=be.useSyncExternalStore(u.subscribe,()=>c(u.getState()),()=>c(u.getInitialState()));return be.useDebugValue(d),d}const dh=u=>{const c=Jb(u),d=r=>Pb(c,r);return Object.assign(d,c),d},Wb=u=>u?dh(u):dh,Ib=typeof localStorage<"u"?localStorage.getItem("nw-selected-project"):null,pt=Wb(u=>({projectName:"Night Watch",setProjectName:c=>u({projectName:c}),toasts:[],addToast:c=>{const d=Math.random().toString(36).substring(7);u(r=>({toasts:[...r.toasts,{...c,id:d}]})),setTimeout(()=>{u(r=>({toasts:r.toasts.filter(m=>m.id!==d)}))},5e3)},removeToast:c=>u(d=>({toasts:d.toasts.filter(r=>r.id!==c)})),status:null,setStatus:c=>u(d=>!d.status||new Date(c.timestamp)>new Date(d.status.timestamp)?{status:c}:d),globalModeLoading:!0,setGlobalModeLoading:c=>u({globalModeLoading:c}),isGlobalMode:!1,setGlobalMode:c=>{Mb(c),u({isGlobalMode:c})},projects:[],setProjects:c=>u({projects:c}),selectedProjectId:Ib,selectProject:c=>{_b(c),c?localStorage.setItem("nw-selected-project",c):localStorage.removeItem("nw-selected-project"),u(d=>{const r=d.projects.find(m=>m.name===c);return{selectedProjectId:c,...r?{projectName:r.name}:{}}})}})),ey=()=>{const[u,c]=w.useState(!1),{projectName:d,isGlobalMode:r,projects:m,selectedProjectId:x,selectProject:f,globalModeLoading:v}=pt(),{data:b}=el(Zh,[x],{enabled:!v}),p=(b==null?void 0:b.length)??0,g=w.useMemo(()=>[{icon:tb,label:"Dashboard",path:"/",section:"Overview"},{icon:Sb,label:"Logs",path:"/logs"},{icon:sb,label:"Board",path:"/board",section:"Work"},{icon:Ig,label:"Pull Requests",path:"/prs",badge:p},{icon:Gh,label:"Roadmap",path:"/roadmap"},{icon:qc,label:"Schedules",path:"/scheduling",section:"Automation"},{icon:bb,label:"Settings",path:"/settings",section:"Config"}],[p]);return s.jsxs("aside",{className:`
331
+ relative flex flex-col transition-all duration-300 ease-[cubic-bezier(0.25,0.1,0.25,1)]
332
+ ${u?"w-20":"w-72"} h-screen flex-shrink-0 z-50
333
+ bg-[#030712]/80 backdrop-blur-xl border-r border-white/5
334
+ `,children:[s.jsx("div",{className:`p-6 border-b border-white/5 ${u?"items-center justify-center flex":""}`,children:u?s.jsx("div",{className:"relative group",children:s.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"})}):s.jsxs("div",{className:"relative w-full",children:[s.jsx("label",{className:"text-[10px] font-bold text-slate-500 uppercase tracking-widest mb-3 block pl-1",children:r?"Projects":"Workspace"}),r?s.jsxs("div",{className:"relative",children:[s.jsx(ih,{className:"absolute left-3.5 top-1/2 -translate-y-1/2 h-4 w-4 text-indigo-400 pointer-events-none"}),s.jsx("select",{value:x||"",onChange:y=>f(y.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:m.filter(y=>y.valid).map(y=>s.jsx("option",{value:y.name,children:y.name},y.name))}),s.jsx(Lg,{className:"absolute right-3 top-1/2 -translate-y-1/2 h-3.5 w-3.5 text-slate-500 pointer-events-none"})]}):s.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:[s.jsx(ih,{className:"h-4 w-4 text-indigo-400 mr-3"}),s.jsx("span",{className:"truncate",children:d})]})]})}),s.jsx("nav",{className:"flex-1 py-6 overflow-y-auto overflow-x-hidden scrollbar-hide",children:s.jsx("ul",{className:"space-y-1.5 px-4",children:g.map(y=>s.jsxs(be.Fragment,{children:[y.section&&!u&&s.jsx("li",{className:"text-[10px] font-bold text-slate-600 uppercase tracking-widest px-3.5 pt-4 pb-1",children:y.section}),s.jsx("li",{children:s.jsx(Uh,{to:y.path,className:({isActive:D})=>`
335
+ flex items-center px-3.5 py-3 rounded-xl transition-all duration-200 group relative
336
+ ${D?"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"}
337
+ ${u?"justify-center":""}
338
+ `,children:({isActive:D})=>s.jsxs(s.Fragment,{children:[s.jsx(y.icon,{className:`h-5 w-5 transition-colors ${D?"text-indigo-400 drop-shadow-[0_0_8px_rgba(99,102,241,0.5)]":"text-slate-500 group-hover:text-slate-300"} ${u?"":"mr-3.5"}`}),!u&&s.jsx("span",{className:"flex-1 text-sm font-medium tracking-wide",children:y.label}),y.badge&&(u?s.jsx("span",{className:"absolute top-2 right-2 h-2 w-2 bg-indigo-500 rounded-full border border-[#030712] shadow-sm"}):s.jsx("span",{className:`text-[10px] font-bold px-2 py-0.5 rounded-md ${D?"bg-indigo-500/20 text-indigo-300":"bg-white/5 text-slate-400 border border-white/5"}`,children:y.badge})),D&&!u&&s.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)]"}),u&&s.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:y.label})]})})})]},y.path))})}),s.jsx("div",{className:"p-4 border-t border-white/5 flex justify-end",children:s.jsx("button",{onClick:()=>c(!u),className:"p-2 rounded-lg hover:bg-white/5 text-slate-500 hover:text-slate-300 transition-colors",children:u?s.jsx(Og,{className:"h-5 w-5"}):s.jsx(Dg,{className:"h-5 w-5"})})})]})},ty=()=>{const{projectName:u}=pt();return s.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:[s.jsxs("div",{className:"flex items-center space-x-6",children:[s.jsxs("div",{children:[s.jsx("div",{className:"text-xs font-mono text-indigo-400 mb-0.5 tracking-tight",children:"Active Project"}),s.jsx("h1",{className:"text-xl font-semibold text-white tracking-tight leading-none",children:u})]}),s.jsx("div",{className:"h-8 w-px bg-white/10 mx-2"}),s.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:[s.jsx(Rb,{className:"h-3.5 w-3.5"}),s.jsx("span",{className:"uppercase tracking-wider text-[10px]",children:"Online"})]})]}),s.jsxs("div",{className:"flex items-center space-x-5",children:[s.jsxs("div",{className:"relative hidden md:block group",children:[s.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]"}),s.jsx(Ji,{className:"absolute left-3.5 top-2.5 h-4 w-4 text-slate-500 group-focus-within:text-indigo-400 transition-colors"})]}),s.jsx("div",{className:"flex items-center space-x-3",children:s.jsxs("button",{className:"p-2.5 text-slate-400 hover:text-white hover:bg-white/5 rounded-full relative transition-all",children:[s.jsx(Tg,{className:"h-5 w-5"}),s.jsx("span",{className:"absolute top-2.5 right-2.5 h-2 w-2 bg-red-500 rounded-full ring-2 ring-[#030712]"})]})}),s.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"})]})]})},ly=({toast:u,onDismiss:c})=>{const d={success:s.jsx(js,{className:"h-5 w-5 text-green-400"}),error:s.jsx(Ml,{className:"h-5 w-5 text-red-400"}),info:s.jsx(ab,{className:"h-5 w-5 text-blue-400"}),warning:s.jsx(Fi,{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 s.jsx("div",{className:`
339
+ pointer-events-auto w-full max-w-sm overflow-hidden rounded-lg
340
+ bg-slate-900 border border-slate-800 border-l-4 ${r[u.type]}
341
+ shadow-lg ring-1 ring-black ring-opacity-5 transition-all
342
+ animate-in slide-in-from-right-full fade-in duration-300
343
+ `,children:s.jsx("div",{className:"p-4",children:s.jsxs("div",{className:"flex items-start",children:[s.jsx("div",{className:"flex-shrink-0",children:d[u.type]}),s.jsxs("div",{className:"ml-3 w-0 flex-1 pt-0.5",children:[s.jsx("p",{className:"text-sm font-medium text-slate-200",children:u.title}),u.message&&s.jsx("p",{className:"mt-1 text-sm text-slate-400",children:u.message})]}),s.jsx("div",{className:"ml-4 flex flex-shrink-0",children:s.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:()=>c(u.id),children:[s.jsx("span",{className:"sr-only",children:"Close"}),s.jsx(vn,{className:"h-5 w-5"})]})})]})})})},ay=()=>{const{toasts:u,removeToast:c}=pt();return s.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:u.map(d=>s.jsx(ly,{toast:d,onDismiss:c},d.id))})};function ny(){const{setGlobalMode:u,setGlobalModeLoading:c,setProjects:d,selectProject:r,selectedProjectId:m}=pt();w.useEffect(()=>{c(!0),zb().then(async({globalMode:x})=>{if(u(x),!x)return;const f=await Ob();d(f);const v=f.filter(b=>b.valid);m&&v.some(b=>b.name===m)?r(m):v.length>0&&r(v[0].name)}).catch(()=>{u(!1)}).finally(()=>{c(!1)})},[])}function fh(u){if(!(u!=null&&u.timestamp))return Number.NEGATIVE_INFINITY;const c=new Date(u.timestamp).getTime();return Number.isNaN(c)?Number.NEGATIVE_INFINITY:c}function ki(u,c){return u?c?fh(u)>=fh(c)?u:c:u:c}function sy(){const{setStatus:u,setProjectName:c,selectedProjectId:d,globalModeLoading:r,status:m}=pt(),x=w.useRef(null);x.current=pt.getState().status,Zb(f=>{ki(f,x.current)===f&&u(f)},[d,r],{enabled:!r}),w.useEffect(()=>{if(r)return;gc().then(v=>{ki(v,x.current)===v&&u(v)}).catch(()=>{});const f=setInterval(()=>{gc().then(v=>{ki(v,x.current)===v&&u(v)}).catch(()=>{})},3e4);return()=>clearInterval(f)},[d,r,u]),w.useEffect(()=>{const f=()=>{gc().then(v=>{ki(v,x.current)===v&&u(v)}).catch(()=>{})};return window.addEventListener("focus",f),()=>window.removeEventListener("focus",f)},[d,u]),w.useEffect(()=>{m!=null&&m.projectName&&c(m.projectName)},[m==null?void 0:m.projectName,c])}const ze=({children:u,className:c="",onClick:d})=>s.jsxs("div",{className:`
344
+ relative bg-[#0b101b] rounded-xl border border-white/5
345
+ shadow-[0_4px_20px_-4px_rgba(0,0,0,0.5)]
346
+ transition-all duration-300
347
+ ${d?"cursor-pointer hover:border-indigo-500/30 hover:shadow-indigo-500/5 group":""}
348
+ ${c}
349
+ `,onClick:d,children:[d&&s.jsx("div",{className:"absolute inset-0 bg-indigo-500/0 group-hover:bg-indigo-500/[0.02] transition-colors rounded-xl pointer-events-none"}),s.jsx("div",{className:"relative z-10",children:u})]}),Be=({children:u,variant:c="primary",size:d="md",loading:r=!1,className:m="",disabled:x,...f})=>{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]",b={primary:"bg-indigo-600 text-white hover:bg-indigo-500 focus:ring-indigo-500 shadow-[0_0_15px_-3px_rgba(79,70,229,0.4)] border border-indigo-500/50 hover:shadow-[0_0_20px_-3px_rgba(79,70,229,0.5)]",secondary:"bg-[#1f2937] text-slate-200 hover:bg-[#374151] focus:ring-slate-500 border border-white/5",danger:"bg-red-600/10 text-red-400 hover:bg-red-600/20 focus:ring-red-500 border border-red-900/50 hover:border-red-500/50",ghost:"bg-transparent text-slate-400 hover:bg-white/5 hover:text-slate-200 focus:ring-slate-400",outline:"border border-slate-700/50 bg-transparent text-slate-300 hover:bg-white/5 hover:border-slate-500 focus:ring-slate-400"},p={sm:"h-8 px-3 text-xs tracking-wide",md:"h-10 px-4 py-2 text-sm",lg:"h-12 px-6 text-base",icon:"h-9 w-9"};return s.jsxs("button",{className:`${v} ${b[c]} ${p[d]} ${m}`,disabled:x||r,...f,children:[r&&s.jsx(Yh,{className:"mr-2 h-4 w-4 animate-spin"}),u]})},fn=({children:u,variant:c="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 s.jsx("span",{className:`inline-flex items-center px-2 py-0.5 rounded text-[11px] font-medium tracking-wide ${r[c]} ${d}`,children:u})},Ih={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"}},iy=({defaultColumn:u,onClose:c,onCreated:d})=>{const[r,m]=w.useState(""),[x,f]=w.useState(""),[v,b]=w.useState(u),[p,g]=w.useState(!1),[y,D]=w.useState(null),{addToast:z}=pt(),U=async _=>{if(_.preventDefault(),!!r.trim()){g(!0),D(null);try{await Qb({title:r.trim(),body:x,column:v}),z({title:"Issue created",message:`"${r.trim()}" added to ${v}`,type:"success"}),d(),c()}catch(Y){D(Y instanceof Error?Y.message:"Failed to create issue")}finally{g(!1)}}};return s.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4",children:[s.jsx("div",{className:"absolute inset-0 bg-black/60 backdrop-blur-sm",onClick:c}),s.jsxs("div",{className:"relative bg-[#0f172a] border border-white/10 rounded-2xl shadow-2xl w-full max-w-lg",children:[s.jsxs("div",{className:"flex items-center justify-between p-6 border-b border-white/5",children:[s.jsx("h2",{className:"text-lg font-semibold text-slate-100",children:"New Board Issue"}),s.jsx("button",{onClick:c,className:"p-1.5 rounded-lg hover:bg-white/5 text-slate-500 hover:text-slate-300 transition-colors",children:s.jsx(vn,{className:"h-5 w-5"})})]}),s.jsxs("form",{onSubmit:U,className:"p-6 space-y-4",children:[s.jsxs("div",{children:[s.jsx("label",{className:"text-xs font-medium text-slate-400 uppercase tracking-wide block mb-1.5",children:"Title"}),s.jsx("input",{type:"text",value:r,onChange:_=>m(_.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"})]}),s.jsxs("div",{children:[s.jsx("label",{className:"text-xs font-medium text-slate-400 uppercase tracking-wide block mb-1.5",children:"Column"}),s.jsx("select",{value:v,onChange:_=>b(_.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:na.map(_=>s.jsx("option",{value:_,children:_},_))})]}),s.jsxs("div",{children:[s.jsx("label",{className:"text-xs font-medium text-slate-400 uppercase tracking-wide block mb-1.5",children:"Body (optional)"}),s.jsx("textarea",{value:x,onChange:_=>f(_.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"})]}),y&&s.jsx("p",{className:"text-sm text-red-400",children:y}),s.jsxs("div",{className:"flex justify-end space-x-3 pt-2",children:[s.jsx(Be,{variant:"ghost",type:"button",onClick:c,children:"Cancel"}),s.jsx(Be,{type:"submit",disabled:p||!r.trim(),children:p?"Creating...":"Create Issue"})]})]})]})]})},uy=({issue:u,onClose:c,onMoved:d,onClosed:r})=>{const[m,x]=w.useState(!1),[f,v]=w.useState(!1),{addToast:b}=pt(),p=async D=>{if(D!==u.column){x(!0);try{await Ph(u.number,D),b({title:"Issue moved",message:`#${u.number} moved to ${D}`,type:"success"}),d(),c()}catch(z){b({title:"Move failed",message:z instanceof Error?z.message:"Failed to move issue",type:"error"})}finally{x(!1)}}},g=async()=>{if(confirm(`Close issue #${u.number}: "${u.title}"?`)){v(!0);try{await Vb(u.number),b({title:"Issue closed",message:`#${u.number} closed on GitHub`,type:"success"}),r(),c()}catch(D){b({title:"Close failed",message:D instanceof Error?D.message:"Failed to close issue",type:"error"})}finally{v(!1)}}},y=u.column??"Draft";return s.jsxs("div",{className:"fixed inset-0 z-50 flex justify-end",children:[s.jsx("div",{className:"absolute inset-0 bg-black/40 backdrop-blur-sm",onClick:c}),s.jsxs("div",{className:"relative bg-[#0a0f1e] border-l border-white/10 w-full max-w-xl flex flex-col shadow-2xl overflow-hidden",children:[s.jsxs("div",{className:"flex items-start justify-between p-6 border-b border-white/5 flex-shrink-0",children:[s.jsxs("div",{className:"flex-1 min-w-0 pr-4",children:[s.jsxs("div",{className:"flex items-center space-x-2 mb-2",children:[s.jsxs("span",{className:"text-slate-500 text-sm font-mono",children:["#",u.number]}),s.jsx(fn,{variant:Ih[y].badge,children:y})]}),s.jsx("h2",{className:"text-lg font-semibold text-slate-100 leading-snug",children:u.title}),u.assignees.length>0&&s.jsxs("p",{className:"text-xs text-slate-500 mt-1",children:["Assigned to: ",u.assignees.join(", ")]})]}),s.jsx("button",{onClick:c,className:"p-1.5 rounded-lg hover:bg-white/5 text-slate-500 hover:text-slate-300 transition-colors flex-shrink-0",children:s.jsx(vn,{className:"h-5 w-5"})})]}),s.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:[s.jsxs("div",{className:"flex items-center space-x-2",children:[s.jsx("span",{className:"text-xs text-slate-500",children:"Move to:"}),na.filter(D=>D!==u.column).map(D=>s.jsx("button",{onClick:()=>p(D),disabled:m,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:D},D))]}),s.jsxs("div",{className:"flex items-center space-x-2 ml-auto",children:[u.url&&!u.url.startsWith("local://")&&s.jsxs("a",{href:u.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:[s.jsx(kh,{className:"h-3.5 w-3.5"}),s.jsx("span",{children:"GitHub"})]}),s.jsx("button",{onClick:g,disabled:f,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:f?"Closing...":"Close Issue"})]})]}),s.jsx("div",{className:"flex-1 overflow-y-auto p-6",children:u.body?s.jsx("pre",{className:"text-sm text-slate-300 whitespace-pre-wrap font-mono leading-relaxed break-words",children:u.body}):s.jsx("p",{className:"text-slate-500 text-sm italic",children:"No description provided."})})]})]})},ry=({issue:u,onClick:c,onDragStart:d})=>{const[r,m]=w.useState(!1);return s.jsx("div",{className:"relative",draggable:!0,onDragStart:x=>{x.dataTransfer.setData("issueNumber",String(u.number)),x.dataTransfer.effectAllowed="move",m(!0),d(u)},onDragEnd:()=>m(!1),children:s.jsxs(ze,{className:`p-3 cursor-grab hover:border-indigo-500/30 transition-all select-none ${r?"opacity-30":""}`,onClick:c,children:[s.jsxs("span",{className:"text-[10px] font-mono text-slate-600",children:["#",u.number]}),s.jsx("p",{className:"text-xs font-medium text-slate-200 line-clamp-2 mt-0.5 leading-snug",children:u.title}),u.assignees.length>0&&s.jsx("p",{className:"text-[10px] text-slate-500 mt-1.5 truncate",children:u.assignees.join(", ")})]})})},cy=({name:u,issues:c,draggingIssue:d,onIssueClick:r,onNewIssue:m,onMoveIssue:x,onDragStart:f})=>{const v=Ih[u],[b,p]=w.useState(!1),g=d!==null&&d.column!==u;return s.jsxs("div",{className:`flex flex-col min-w-[220px] max-w-[220px] h-full rounded-xl transition-colors ${b&&g?"bg-indigo-500/5 ring-1 ring-indigo-500/30":""}`,onDragOver:y=>{g&&(y.preventDefault(),y.dataTransfer.dropEffect="move",p(!0))},onDragLeave:()=>p(!1),onDrop:y=>{y.preventDefault(),p(!1),d&&d.column!==u&&x(d,u)},children:[s.jsxs("div",{className:"flex items-center justify-between mb-3 flex-shrink-0",children:[s.jsxs("div",{className:"flex items-center space-x-2",children:[s.jsx("span",{className:`w-2.5 h-2.5 rounded-full ${v.dot}`}),s.jsx("span",{className:"text-xs font-semibold text-slate-400 uppercase tracking-wider",children:u}),s.jsx("span",{className:"text-[10px] font-bold text-slate-600 bg-slate-800 rounded-full px-1.5 py-0.5",children:c.length})]}),s.jsx("button",{onClick:()=>m(u),className:"p-1 rounded-md hover:bg-white/5 text-slate-600 hover:text-slate-400 transition-colors",title:`Add issue to ${u}`,children:s.jsx(pn,{className:"h-3.5 w-3.5"})})]}),s.jsx("div",{className:"flex-1 overflow-y-auto space-y-2 pr-1 scrollbar-hide min-h-0",children:c.length===0?s.jsx("div",{className:`border-2 border-dashed rounded-xl h-24 flex items-center justify-center transition-colors ${b&&g?"border-indigo-500/40":"border-slate-800"}`,children:s.jsx("span",{className:"text-xs text-slate-700",children:b&&g?"Drop here":"No issues"})}):c.map(y=>s.jsx(ry,{issue:y,onClick:()=>r(y),onDragStart:f},y.id))})]})},oy=()=>{const[u,c]=w.useState(null),[d,r]=w.useState(null),[m,x]=w.useState(null),[f,v]=w.useState(null),b=w.useRef(!1),{addToast:p,selectedProjectId:g,globalModeLoading:y}=pt(),{data:D,loading:z,error:U,refetch:_}=el(Fh,[g],{enabled:!y});w.useEffect(()=>{const B=setInterval(()=>{b.current||_()},3e4);return()=>clearInterval(B)},[_]);const Y=w.useCallback(async(B,S)=>{x(null);const le=f??(D==null?void 0:D.columns);if(!le)return;const Z=le,$={};for(const ie of na)$[ie]=(le[ie]??[]).filter(ue=>ue.number!==B.number);const P={...B,column:S};$[S]=[...$[S]??[],P],v($),c(ie=>(ie==null?void 0:ie.number)===B.number?P:ie),b.current=!0;try{await Ph(B.number,S),_(),setTimeout(()=>{v(null),b.current=!1},800)}catch(ie){v(Z),c(ue=>(ue==null?void 0:ue.number)===B.number?B:ue),b.current=!1,p({title:"Move failed",message:ie instanceof Error?ie.message:"Failed to move issue",type:"error"})}},[p,_,f,D]);if(y||z)return s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx("div",{className:"text-slate-400",children:"Loading board..."})});if(U&&U.message.includes("Board not configured"))return s.jsxs("div",{className:"flex flex-col items-center justify-center h-full space-y-4",children:[s.jsx("div",{className:"text-4xl",children:"📋"}),s.jsx("h2",{className:"text-xl font-semibold text-slate-200",children:"Board not configured"}),s.jsxs("p",{className:"text-slate-500 text-sm max-w-sm text-center",children:["Run ",s.jsx("code",{className:"font-mono bg-slate-800 px-2 py-0.5 rounded text-indigo-300",children:"night-watch board setup"})," in your project to create a GitHub Projects board."]})]});if(U)return s.jsxs("div",{className:"flex flex-col items-center justify-center h-full space-y-4",children:[s.jsx("div",{className:"text-slate-300",children:"Failed to load board"}),s.jsx("div",{className:"text-sm text-slate-500",children:U.message}),s.jsx(Be,{onClick:()=>_(),children:"Retry"})]});if(!D)return null;const Q=f??D.columns;return s.jsxs("div",{className:"flex flex-col h-full",children:[s.jsxs("div",{className:"flex items-center justify-between mb-6 flex-shrink-0",children:[s.jsxs("div",{children:[s.jsx("h1",{className:"text-2xl font-bold text-slate-100",children:"Board"}),s.jsxs("p",{className:"text-sm text-slate-500 mt-1",children:[na.reduce((B,S)=>{var le;return B+(((le=Q[S])==null?void 0:le.length)??0)},0)," issues across ",na.length," columns"]})]}),s.jsxs(Be,{onClick:()=>r("Ready"),children:[s.jsx(pn,{className:"h-4 w-4 mr-2"}),"New Issue"]})]}),s.jsx("div",{className:"flex-1 overflow-x-auto overflow-y-hidden",onDragEnd:()=>x(null),children:s.jsx("div",{className:"flex space-x-4 h-full pb-4",style:{minWidth:`${na.length*236}px`},children:na.map(B=>s.jsx(cy,{name:B,issues:Q[B]??[],draggingIssue:m,onIssueClick:c,onNewIssue:r,onMoveIssue:Y,onDragStart:x},B))})}),u&&s.jsx(uy,{issue:u,onClose:()=>c(null),onMoved:()=>_(),onClosed:()=>_()}),d&&s.jsx(iy,{defaultColumn:d,onClose:()=>r(null),onCreated:()=>_()})]})},dy=[{name:"executor",displayName:"Executor",processName:"executor",cancelType:"run",runningLabel:"Running",idleLabel:"Idle"},{name:"reviewer",displayName:"Reviewer",processName:"reviewer",cancelType:"review",runningLabel:"Running",idleLabel:"Idle"},{name:"qa",displayName:"QA",processName:"qa",runningLabel:"Running",idleLabel:"Idle"},{name:"auditor",displayName:"Auditor",processName:"audit",runningLabel:"Running",idleLabel:"Idle"},{name:"planner",displayName:"Planner",processName:"planner",runningLabel:"Writing PRDs",idleLabel:"Idle"}],fy=({processes:u,activePrd:c,onCancelProcess:d,onForceClear:r,onViewLog:m,cancellingProcess:x,clearingLock:f})=>{const v=p=>u.find(g=>g.name===p),b=(p,g)=>p.length<=g?p:p.slice(0,g-1)+"...";return s.jsx("div",{className:"grid grid-cols-2 md:grid-cols-5 gap-3",children:dy.map(p=>{const g=v(p.processName),y=(g==null?void 0:g.running)??!1,D=g==null?void 0:g.pid,z=x===p.cancelType,U=y&&p.cancelType,_=!y&&p.name==="executor"&&c,Y=y?D?`PID: ${D}`:p.runningLabel:p.idleLabel,Q=y&&p.name==="executor"&&c?b(c,20):null;return s.jsxs("div",{className:`flex items-center gap-2 p-2.5 rounded-lg border transition-colors ${y?"bg-green-950/30 border-green-800/50":"bg-slate-950/50 border-slate-800"}`,children:[s.jsx("div",{className:`h-2.5 w-2.5 rounded-full flex-shrink-0 ${y?"bg-green-500 animate-pulse shadow-[0_0_8px_rgba(34,197,94,0.5)]":"bg-slate-700"}`}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("div",{className:`text-sm font-medium ${y?"text-slate-200":"text-slate-400"}`,children:p.displayName}),s.jsx("div",{className:"text-xs text-slate-500 truncate",children:Q?s.jsxs("span",{className:"flex items-center gap-1",children:[s.jsx(Ec,{className:"h-3 w-3 flex-shrink-0"}),Q]}):Y})]}),s.jsxs("div",{className:"flex-shrink-0",children:[U&&s.jsx("button",{onClick:()=>p.cancelType&&d(p.cancelType),disabled:z,className:"p-1 text-red-400 hover:text-red-300 hover:bg-red-500/10 rounded transition-colors disabled:opacity-50",title:"Stop process",children:s.jsx(ch,{className:"h-3.5 w-3.5"})}),_&&s.jsx("button",{onClick:r,disabled:f,className:"p-1 text-amber-400 hover:text-amber-300 hover:bg-amber-500/10 rounded transition-colors disabled:opacity-50",title:"Force clear stale state",children:s.jsx(ch,{className:"h-3.5 w-3.5"})}),!U&&!_&&y&&s.jsx("button",{onClick:m,className:"p-1 text-slate-400 hover:text-slate-300 hover:bg-white/5 rounded transition-colors",title:"View log",children:s.jsx(Ec,{className:"h-3.5 w-3.5"})})]})]},p.name)})})},my={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"},hy=()=>{var P,ie;const u=_c(),[c,d]=w.useState(null),[r,m]=w.useState(!1),{setProjectName:x,addToast:f,selectedProjectId:v,globalModeLoading:b,status:p}=pt(),{data:g}=el(Kh,[v],{enabled:!b}),{data:y,loading:D}=el(()=>Fh().catch(()=>null),[v],{enabled:!b}),z=p;if(be.useEffect(()=>{z!=null&&z.projectName&&x(z.projectName)},[z,x]),b)return s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx("div",{className:"text-slate-400",children:"Loading..."})});if(!z)return s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx("div",{className:"text-slate-400",children:"Loading..."})});const U=z.prs.length,_=z.prs.filter(ue=>ue.reviewScore!==null&&ue.reviewScore<70).length,Y=((P=y==null?void 0:y.columns.Ready)==null?void 0:P.length)??0,Q=((ie=y==null?void 0:y.columns["In Progress"])==null?void 0:ie.length)??0,B=async ue=>{d(ue);try{const X=await Gb(ue),pe=X.results.every(ye=>ye.success);f({title:pe?"Process Cancelled":"Cancel Failed",message:X.results.map(ye=>ye.message).join("; "),type:pe?"success":"error"})}catch(X){f({title:"Cancel Failed",message:X instanceof Error?X.message:"Failed to cancel process",type:"error"})}finally{d(null)}},S=async()=>{m(!0);try{await Xb(),f({title:"Lock Cleared",message:"Stale executor state removed",type:"success"})}catch(ue){f({title:"Clear Failed",message:ue instanceof Error?ue.message:"Failed to clear lock",type:"error"})}finally{m(!1)}},le=ue=>{if(!ue)return"Not scheduled";try{const X=new Date(ue),pe=new Date,ye=X.getTime()-pe.getTime(),we=Math.floor(ye/6e4);return we<0?"Running now...":we<60?`in ${we} min`:we<1440?`in ${Math.floor(we/60)} hr${we>=120?"s":""}`:`in ${Math.floor(we/1440)} day${we>=2880?"s":""}`}catch{return"Unknown"}},$=(()=>{var pe,ye,we;if(g!=null&&g.paused)return null;const ue=[{agent:"Executor",nextRun:(g==null?void 0:g.executor.nextRun)??null},{agent:"Reviewer",nextRun:(g==null?void 0:g.reviewer.nextRun)??null},{agent:"QA",nextRun:((pe=g==null?void 0:g.qa)==null?void 0:pe.nextRun)??null},{agent:"Auditor",nextRun:((ye=g==null?void 0:g.audit)==null?void 0:ye.nextRun)??null},{agent:"Planner",nextRun:((we=g==null?void 0:g.planner)==null?void 0:we.nextRun)??null}];let X=null;for(const F of ue)F.nextRun&&(!X||new Date(F.nextRun)<new Date(X.nextRun))&&(X=F);return X?{agent:X.agent,time:le(X.nextRun)}:null})();return s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4",children:[s.jsxs(ze,{className:"p-5",onClick:()=>u("/board"),children:[s.jsxs("div",{className:"flex justify-between items-start",children:[s.jsxs("div",{children:[s.jsx("p",{className:"text-sm font-medium text-slate-500",children:"Board Ready"}),s.jsx("h3",{className:"text-3xl font-bold text-slate-100 mt-1",children:Y})]}),s.jsx("div",{className:"p-2 bg-green-500/10 rounded-lg text-green-400",children:s.jsx(js,{className:"h-5 w-5"})})]}),s.jsx("p",{className:"text-xs text-slate-500 mt-4",children:"issues ready to start"})]}),s.jsxs(ze,{className:"p-5",onClick:()=>u("/board"),children:[s.jsxs("div",{className:"flex justify-between items-start",children:[s.jsxs("div",{children:[s.jsx("p",{className:"text-sm font-medium text-slate-500",children:"In Progress"}),s.jsx("h3",{className:"text-3xl font-bold text-slate-100 mt-1",children:Q})]}),s.jsx("div",{className:"p-2 bg-blue-500/10 rounded-lg text-blue-400",children:s.jsx(Lh,{className:"h-5 w-5"})})]}),s.jsx("p",{className:"text-xs text-slate-500 mt-4",children:"issues in progress"})]}),s.jsxs(ze,{className:"p-5",onClick:()=>u("/prs"),children:[s.jsxs("div",{className:"flex justify-between items-start",children:[s.jsxs("div",{children:[s.jsx("p",{className:"text-sm font-medium text-slate-500",children:"Open PRs"}),s.jsx("h3",{className:"text-3xl font-bold text-slate-100 mt-1",children:U})]}),s.jsx("div",{className:"p-2 bg-purple-500/10 rounded-lg text-purple-400",children:s.jsx(Xi,{className:"h-5 w-5"})})]}),s.jsx("p",{className:`text-xs mt-4 ${_>0?"text-red-400 font-medium":"text-slate-500"}`,children:_>0?`${_} need work`:"All passing"})]}),s.jsxs(ze,{className:"p-5",children:[s.jsxs("div",{className:"flex justify-between items-start",children:[s.jsxs("div",{children:[s.jsx("p",{className:"text-sm font-medium text-slate-500",children:"Automation"}),s.jsx("h3",{className:"text-3xl font-bold text-slate-100 mt-1",children:g!=null&&g.paused?"Paused":z.crontab.installed?"Active":"Inactive"})]}),s.jsx("div",{className:`p-2 rounded-lg ${g!=null&&g.paused?"bg-amber-500/10 text-amber-400":z.crontab.installed?"bg-indigo-500/10 text-indigo-400":"bg-slate-700/50 text-slate-500"}`,children:s.jsx(qc,{className:"h-5 w-5"})})]}),s.jsx("p",{className:"text-xs text-slate-500 mt-4",children:g!=null&&g.paused?"All schedules paused":z.crontab.installed?`${z.crontab.entries.length} entr${z.crontab.entries.length===1?"y":"ies"} installed`:"No crontab entries"})]})]}),s.jsxs(ze,{className:"p-4",children:[s.jsxs("div",{className:"flex items-center justify-between mb-3",children:[s.jsx("h2",{className:"text-base font-semibold text-slate-200",children:"Agents"}),s.jsx("button",{onClick:()=>u("/logs"),className:"text-xs text-slate-400 hover:text-slate-300 transition-colors",children:"View logs"})]}),s.jsx(fy,{processes:z.processes,activePrd:z.activePrd,onCancelProcess:B,onForceClear:S,onViewLog:()=>u("/logs"),cancellingProcess:c,clearingLock:r})]}),$&&s.jsxs("div",{className:"flex items-center justify-between px-4 py-3 bg-slate-900/50 rounded-lg border border-slate-800",children:[s.jsxs("div",{className:"flex items-center gap-2 text-sm text-slate-400",children:[s.jsx("span",{children:"Next automation:"}),s.jsx("span",{className:"text-slate-200 font-medium",children:$.agent}),s.jsx("span",{children:$.time})]}),s.jsxs("button",{onClick:()=>u("/scheduling"),className:"text-sm text-indigo-400 hover:text-indigo-300 flex items-center transition-colors",children:["Manage Schedules ",s.jsx(sh,{className:"ml-1 h-3 w-3"})]})]}),s.jsxs("div",{className:"mt-6",children:[s.jsxs("div",{className:"flex items-center justify-between mb-4",children:[s.jsx("h2",{className:"text-lg font-semibold text-slate-200",children:"GitHub Board"}),s.jsxs("button",{onClick:()=>u("/board"),className:"text-sm text-indigo-400 hover:text-indigo-300 flex items-center transition-colors",children:["View board ",s.jsx(sh,{className:"ml-1 h-3 w-3"})]})]}),s.jsx(ze,{className:"p-4",children:D?s.jsx("div",{className:"flex items-center justify-center py-8",children:s.jsx("div",{className:"text-slate-400 text-sm",children:"Loading board..."})}):y?s.jsx("div",{className:"flex flex-wrap gap-3",children:na.map(ue=>{var pe;const X=((pe=y.columns[ue])==null?void 0:pe.length)??0;return s.jsxs("button",{onClick:()=>u("/board"),className:`inline-flex items-center space-x-2 px-3 py-2 rounded-lg ring-1 ring-inset transition-colors hover:opacity-80 ${my[ue]}`,children:[s.jsx("span",{className:"text-xs font-medium",children:ue}),s.jsx("span",{className:"text-xs font-bold",children:X})]},ue)})}):s.jsxs("p",{className:"text-sm text-slate-500 italic",children:["Board not configured — run ",s.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."]})})]})]})},xy=()=>{const[u,c]=w.useState(!0),[d,r]=w.useState(""),[m,x]=w.useState("executor"),f=w.useRef(null),{selectedProjectId:v,globalModeLoading:b}=pt(),p=pt(B=>B.status),{data:g,loading:y,error:D,refetch:z}=el(()=>Ub(m,500),[m,v],{enabled:!b}),U=(g==null?void 0:g.lines)||[];w.useEffect(()=>{u&&f.current&&(f.current.scrollTop=f.current.scrollHeight)},[U,u]),w.useEffect(()=>{if(!u)return;const B=window.setInterval(()=>{z()},3e3);return()=>window.clearInterval(B)},[u,m,z]);const _=U.filter(B=>B.toLowerCase().includes(d.toLowerCase())),Y=B=>{x(B),r("")},Q=B=>{if(!(p!=null&&p.processes))return!1;const S=p.processes.find(le=>le.name===B);return(S==null?void 0:S.running)??!1};return D?s.jsxs("div",{className:"flex flex-col items-center justify-center h-full space-y-4",children:[s.jsx(Ml,{className:"h-12 w-12 text-red-400"}),s.jsx("div",{className:"text-slate-300",children:"Failed to load logs"}),s.jsx("div",{className:"text-sm text-slate-500",children:D.message}),s.jsx(Be,{onClick:()=>z(),children:"Retry"})]}):s.jsxs("div",{className:"flex flex-col h-[calc(100vh-8rem)]",children:[s.jsxs("div",{className:"flex items-center justify-between mb-4 bg-slate-900 p-2 rounded-lg border border-slate-800 shadow-sm",children:[s.jsxs("div",{className:"flex items-center space-x-2",children:[s.jsxs("div",{className:"relative group",children:[s.jsx("input",{type:"text",placeholder:"Filter logs...",className:"pl-9 pr-4 py-1.5 rounded-md border border-slate-700 bg-slate-950 text-slate-200 text-sm focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:border-transparent w-64 placeholder:text-slate-600",value:d,onChange:B=>r(B.target.value)}),s.jsx(Ji,{className:"absolute left-2.5 top-2 h-4 w-4 text-slate-500 group-focus-within:text-indigo-400"})]}),s.jsx("div",{className:"h-6 w-px bg-slate-700 mx-2"}),s.jsxs("div",{className:"flex space-x-1",children:[s.jsx("button",{onClick:()=>Y("executor"),className:`px-3 py-1.5 rounded text-sm font-medium transition-colors ${m==="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:s.jsxs("div",{className:"flex items-center space-x-2",children:[s.jsx("span",{children:"Executor"}),Q("executor")&&s.jsx("div",{className:"h-2 w-2 bg-green-500 rounded-full animate-pulse"})]})}),s.jsx("button",{onClick:()=>Y("reviewer"),className:`px-3 py-1.5 rounded text-sm font-medium transition-colors ${m==="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:s.jsxs("div",{className:"flex items-center space-x-2",children:[s.jsx("span",{children:"Reviewer"}),Q("reviewer")&&s.jsx("div",{className:"h-2 w-2 bg-green-500 rounded-full animate-pulse"})]})}),s.jsx("button",{onClick:()=>Y("qa"),className:`px-3 py-1.5 rounded text-sm font-medium transition-colors ${m==="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:s.jsxs("div",{className:"flex items-center space-x-2",children:[s.jsx("span",{children:"QA"}),Q("qa")&&s.jsx("div",{className:"h-2 w-2 bg-green-500 rounded-full animate-pulse"})]})}),s.jsx("button",{onClick:()=>Y("audit"),className:`px-3 py-1.5 rounded text-sm font-medium transition-colors ${m==="audit"?"bg-slate-800 text-slate-200 shadow-sm border border-slate-700":"text-slate-400 hover:bg-slate-800 hover:text-slate-200"}`,children:s.jsxs("div",{className:"flex items-center space-x-2",children:[s.jsx("span",{children:"Auditor"}),Q("audit")&&s.jsx("div",{className:"h-2 w-2 bg-green-500 rounded-full animate-pulse"})]})}),s.jsx("button",{onClick:()=>Y("planner"),className:`px-3 py-1.5 rounded text-sm font-medium transition-colors ${m==="planner"?"bg-slate-800 text-slate-200 shadow-sm border border-slate-700":"text-slate-400 hover:bg-slate-800 hover:text-slate-200"}`,children:s.jsxs("div",{className:"flex items-center space-x-2",children:[s.jsx("span",{children:"Planner"}),Q("planner")&&s.jsx("div",{className:"h-2 w-2 bg-green-500 rounded-full animate-pulse"})]})})]})]}),s.jsxs("div",{className:"flex items-center space-x-2",children:[s.jsxs(Be,{size:"sm",variant:"ghost",onClick:()=>z(),children:[s.jsx(uh,{className:"h-4 w-4 mr-2"}),"Refresh"]}),s.jsxs(Be,{size:"sm",variant:"ghost",onClick:()=>c(!u),children:[u?s.jsx(Qh,{className:"h-4 w-4 mr-2"}):s.jsx(gs,{className:"h-4 w-4 mr-2"}),u?"Pause":"Resume"]})]})]}),s.jsxs("div",{className:"flex-1 bg-slate-900 rounded-xl overflow-hidden shadow-inner border border-slate-800 flex flex-col relative",children:[s.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:[s.jsxs("span",{children:["File: ",m,".log"]}),s.jsxs("span",{children:[_.length," lines"]})]}),s.jsxs("div",{ref:f,className:"flex-1 overflow-y-auto p-4 font-mono text-sm terminal-scroll bg-slate-900",children:[y?s.jsx("div",{className:"flex items-center justify-center h-full text-slate-500",children:"Loading logs..."}):_.length===0?s.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"}):_.map((B,S)=>{const le=B.includes("[ERROR]"),Z=B.includes("[WARN]");return s.jsxs("div",{className:`leading-6 hover:bg-slate-800/50 px-2 rounded -mx-2 ${le?"text-red-400":Z?"text-amber-400":"text-slate-300"}`,children:[s.jsx("span",{className:"text-slate-600 select-none w-10 inline-block text-right mr-4 text-xs opacity-50",children:S+1}),B]},S)}),u&&s.jsx("div",{className:"h-4"})," "]}),!u&&s.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:()=>c(!0),children:[s.jsx(uh,{className:"h-4 w-4 mr-2"}),"Scroll to bottom"]})]})]})},py=()=>{const[u,c]=w.useState(null),[d,r]=w.useState(!1),[m,x]=w.useState("all"),[f,v]=w.useState("number"),[b,p]=w.useState("desc"),{addToast:g,selectedProjectId:y,globalModeLoading:D}=pt(),{data:z,loading:U,error:_,refetch:Y}=el(Zh,[y],{enabled:!D}),Q=z??[],B=X=>{switch(X){case"pass":return s.jsx(js,{className:"h-4 w-4 text-green-500"});case"fail":return s.jsx(Qg,{className:"h-4 w-4 text-red-500"});case"pending":return s.jsx(Yh,{className:"h-4 w-4 text-amber-500 animate-spin"});default:return s.jsx(Ml,{className:"h-4 w-4 text-slate-500"})}},S=X=>{switch(X){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"}},le=X=>X===null?"No review decision yet":X===100?"PR has been approved":X===0?"Changes have been requested":`Review score: ${X}`,Z=w.useMemo(()=>Q.filter(X=>{switch(m){case"needs-work":return X.ciStatus==="fail"||X.reviewScore===0;case"pending":return X.ciStatus==="pending"||X.ciStatus==="unknown"||X.reviewScore===null;case"passed":return X.ciStatus==="pass"&&X.reviewScore===100;case"all":default:return!0}}),[Q,m]),$=w.useMemo(()=>[...Z].sort((pe,ye)=>{let we=0;switch(f){case"number":we=pe.number-ye.number;break;case"title":we=pe.title.localeCompare(ye.title);break;case"branch":we=pe.branch.localeCompare(ye.branch);break;case"ciStatus":{const F={fail:0,pending:1,unknown:2,pass:3};we=(F[pe.ciStatus]??2)-(F[ye.ciStatus]??2);break}case"reviewScore":{const F=pe.reviewScore??-1,ct=ye.reviewScore??-1;we=F-ct;break}}return b==="asc"?we:-we}),[Z,f,b]),P=X=>{f===X?p(b==="asc"?"desc":"asc"):(v(X),p("desc"))},ie=X=>f!==X?s.jsx(Sg,{className:"h-3 w-3 text-slate-600"}):b==="asc"?s.jsx(Eg,{className:"h-3 w-3 text-indigo-400"}):s.jsx(bg,{className:"h-3 w-3 text-indigo-400"});if(U)return s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx("div",{className:"text-slate-400",children:"Loading PRs..."})});if(_)return s.jsxs("div",{className:"flex flex-col items-center justify-center h-full space-y-4",children:[s.jsx(Ml,{className:"h-12 w-12 text-red-400"}),s.jsx("div",{className:"text-slate-300",children:"Failed to load PRs"}),s.jsx("div",{className:"text-sm text-slate-500",children:_.message}),s.jsx(Be,{onClick:()=>Y(),children:"Retry"})]});const ue=async()=>{r(!0);try{const X=await Jh();g({title:"Reviewer Started",message:X.pid?`Started with PID ${X.pid}`:"Reviewer started",type:"success"})}catch(X){g({title:"Reviewer Failed",message:X instanceof Error?X.message:"Failed to start reviewer",type:"error"})}finally{r(!1)}};return s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:"flex space-x-1",children:[s.jsx("button",{onClick:()=>x("all"),className:`px-3 py-1 rounded-full text-xs font-medium cursor-pointer border transition-colors ${m==="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"}),s.jsx("button",{onClick:()=>x("needs-work"),className:`px-3 py-1 rounded-full text-xs font-medium cursor-pointer border transition-colors ${m==="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"}),s.jsx("button",{onClick:()=>x("pending"),className:`px-3 py-1 rounded-full text-xs font-medium cursor-pointer border transition-colors ${m==="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"}),s.jsx("button",{onClick:()=>x("passed"),className:`px-3 py-1 rounded-full text-xs font-medium cursor-pointer border transition-colors ${m==="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"})]}),s.jsxs(Be,{size:"sm",onClick:ue,disabled:d,children:[s.jsx(Ji,{className:"h-4 w-4 mr-2"}),d?"Starting...":"Run Reviewer Now"]})]}),s.jsx("div",{className:"bg-slate-900 rounded-lg shadow-sm border border-slate-800 overflow-hidden",children:s.jsxs("table",{className:"min-w-full divide-y divide-slate-800",children:[s.jsx("thead",{className:"bg-slate-950/50",children:s.jsxs("tr",{children:[s.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:()=>P("number"),children:s.jsxs("div",{className:"flex items-center space-x-1",children:[s.jsx("span",{children:"Title"}),ie("number")]})}),s.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:()=>P("branch"),children:s.jsxs("div",{className:"flex items-center space-x-1",children:[s.jsx("span",{children:"Branch"}),ie("branch")]})}),s.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:()=>P("ciStatus"),children:s.jsxs("div",{className:"flex items-center space-x-1",children:[s.jsx("span",{children:"CI Status"}),ie("ciStatus")]})}),s.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:()=>P("reviewScore"),children:s.jsxs("div",{className:"flex items-center space-x-1",children:[s.jsx("span",{children:"Review Score"}),ie("reviewScore")]})}),s.jsx("th",{className:"px-6 py-3 text-right text-xs font-medium text-slate-500 uppercase tracking-wider",children:"Actions"})]})}),s.jsxs("tbody",{className:"divide-y divide-slate-800",children:[$.map(X=>s.jsxs("tr",{className:"hover:bg-slate-800/50 cursor-pointer transition-colors",onClick:()=>c(u===X.number?null:X.number),children:[s.jsx("td",{className:"px-6 py-4",children:s.jsxs("div",{className:"flex items-center",children:[s.jsxs("span",{className:"text-slate-500 font-mono mr-2",children:["#",X.number]}),s.jsx("span",{className:"font-medium text-slate-200",children:X.title})]})}),s.jsx("td",{className:"px-6 py-4",children:s.jsx("span",{className:"px-2 py-1 bg-slate-800 text-slate-400 border border-slate-700 rounded text-xs font-mono",children:X.branch})}),s.jsx("td",{className:"px-6 py-4",children:s.jsxs("div",{className:"flex items-center space-x-2",title:S(X.ciStatus),children:[B(X.ciStatus),s.jsx("span",{className:"text-sm capitalize text-slate-400",children:X.ciStatus})]})}),s.jsx("td",{className:"px-6 py-4",children:X.reviewScore!==null?s.jsxs("div",{className:"flex items-center space-x-2",title:le(X.reviewScore),children:[s.jsx("div",{className:"w-24 h-2 bg-slate-800 rounded-full overflow-hidden",children:s.jsx("div",{className:`h-full ${X.reviewScore>=70?"bg-green-500":"bg-red-500"}`,style:{width:`${X.reviewScore}%`}})}),s.jsx("span",{className:`text-sm font-bold ${X.reviewScore>=70?"text-green-500":"text-red-500"}`,children:X.reviewScore})]}):s.jsx("span",{className:"text-slate-600 text-sm",title:"No review decision yet",children:"—"})}),s.jsx("td",{className:"px-6 py-4 text-right",children:s.jsx("a",{href:X.url,target:"_blank",rel:"noopener noreferrer",className:"text-slate-500 hover:text-indigo-400",onClick:pe=>pe.stopPropagation(),children:s.jsx(kh,{className:"h-4 w-4"})})})]},X.number)),$.length===0&&s.jsx("tr",{children:s.jsx("td",{colSpan:5,className:"px-6 py-12 text-center text-slate-500",children:Q.length===0?"No open PRs found.":`No PRs match the "${m}" filter.`})})]})]})}),u&&s.jsx(ze,{className:"p-6 bg-slate-900 border-indigo-900/50 animate-in fade-in slide-in-from-top-4 duration-300",children:(()=>{const X=Q.find(pe=>pe.number===u);return X?s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"font-bold text-slate-200",children:X.title}),s.jsxs("p",{className:"text-sm text-slate-400 mt-1",children:["Branch: ",s.jsx("span",{className:"font-mono",children:X.branch})]})]}),s.jsxs("div",{className:"flex items-center space-x-4",children:[s.jsxs("div",{className:"text-center",title:S(X.ciStatus),children:[s.jsx("div",{className:"text-xs text-slate-500",children:"CI Status"}),s.jsxs("div",{className:"flex items-center space-x-1 mt-1",children:[B(X.ciStatus),s.jsx("span",{className:"text-sm capitalize text-slate-300",children:X.ciStatus})]})]}),X.reviewScore!==null&&s.jsxs("div",{className:"text-center",title:le(X.reviewScore),children:[s.jsx("div",{className:"text-xs text-slate-500",children:"Review Score"}),s.jsx("div",{className:`text-xl font-bold mt-1 ${X.reviewScore>=70?"text-green-500":"text-red-500"}`,children:X.reviewScore})]})]})]}):null})()})]})},Jt=be.forwardRef(({className:u="",label:c,checked:d,onChange:r,...m},x)=>{const f=v=>{r&&r(v.target.checked)};return s.jsxs("label",{className:`inline-flex items-center cursor-pointer ${u}`,children:[s.jsxs("div",{className:"relative",children:[s.jsx("input",{type:"checkbox",className:"sr-only peer",ref:x,checked:d,onChange:f,...m}),s.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"})]}),c&&s.jsx("span",{className:"ml-3 text-sm font-medium text-slate-300 select-none",children:c})]})});Jt.displayName="Switch";const vy=()=>{const{addToast:u,selectedProjectId:c,globalModeLoading:d}=pt(),[r,m]=w.useState(!1),[x,f]=w.useState(!1),{data:v,loading:b,error:p,refetch:g}=el($b,[c],{enabled:!d});w.useEffect(()=>{if(!(v!=null&&v.enabled))return;const B=setInterval(()=>{g()},1e4);return()=>clearInterval(B)},[v==null?void 0:v.enabled,g]);const y=async B=>{f(!0);try{await Wh(B),u({title:B?"Scanner Enabled":"Scanner Disabled",message:B?"Roadmap scanner is now active.":"Roadmap scanner has been paused.",type:B?"success":"info"}),g()}catch(S){u({title:"Toggle Failed",message:S instanceof Error?S.message:"Failed to toggle scanner",type:"error"})}finally{f(!1)}},D=async()=>{m(!0);try{const B=await Kb();B.created.length>0?u({title:"Scan Complete",message:`Created ${B.created.length} PRD(s): ${B.created.join(", ")}`,type:"success"}):u({title:"Scan Complete",message:"No new PRDs to create.",type:"info"}),B.errors.length>0&&u({title:"Scan Errors",message:B.errors.join("; "),type:"warning"}),g()}catch(B){u({title:"Scan Failed",message:B instanceof Error?B.message:"Failed to scan roadmap",type:"error"})}finally{m(!1)}};if(b)return s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx("div",{className:"text-slate-400",children:"Loading roadmap scanner..."})});if(p)return s.jsxs("div",{className:"flex flex-col items-center justify-center h-full space-y-4",children:[s.jsx(Ml,{className:"h-12 w-12 text-red-400"}),s.jsx("div",{className:"text-slate-300",children:"Failed to load roadmap data"}),s.jsx("div",{className:"text-sm text-slate-500",children:p.message}),s.jsx(Be,{onClick:()=>g(),children:"Retry"})]});if(!v)return null;if(v.status==="no-roadmap")return s.jsxs("div",{className:"space-y-6 max-w-6xl mx-auto",children:[s.jsx("div",{className:"flex items-center justify-between",children:s.jsx("h1",{className:"text-3xl font-bold text-slate-100",children:"Roadmap Scanner"})}),s.jsx(ze,{className:"p-12",children:s.jsxs("div",{className:"flex flex-col items-center text-center space-y-4",children:[s.jsx("div",{className:"p-4 bg-slate-800 rounded-full",children:s.jsx(Gh,{className:"h-10 w-10 text-slate-500"})}),s.jsx("h2",{className:"text-xl font-semibold text-slate-200",children:"No ROADMAP.md Found"}),s.jsxs("p",{className:"text-slate-400 max-w-md",children:["Create a ",s.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 (",s.jsx("code",{className:"text-slate-300 text-sm",children:"- [ ] Feature"}),") or heading-based items (",s.jsx("code",{className:"text-slate-300 text-sm",children:"### Feature"}),") to get started."]})]})})]});const z=v.totalItems>0?Math.round(v.processedItems/v.totalItems*100):0,U=by(v.status),_=yy(v.items),Y=v.lastScan?jy(v.lastScan):"Never",Q=v.autoScanInterval?Math.round(v.autoScanInterval/60):5;return s.jsxs("div",{className:"space-y-6 max-w-6xl mx-auto",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx("h1",{className:"text-3xl font-bold text-slate-100",children:"Roadmap Scanner"}),s.jsxs("div",{className:"flex items-center space-x-4",children:[s.jsx(Jt,{label:v.enabled?"Enabled":"Disabled",checked:v.enabled,onChange:y,disabled:x}),s.jsxs(Be,{onClick:D,loading:r,disabled:!v.enabled||v.status==="complete",children:[s.jsx(gs,{className:"h-4 w-4 mr-2"}),"Scan Now"]})]})]}),s.jsx(ze,{className:`p-6 border-2 ${U.borderColor}`,children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center space-x-4",children:[s.jsx(U.icon,{className:`h-8 w-8 ${U.textColor}`}),s.jsxs("div",{children:[s.jsx("div",{className:"text-sm text-slate-400",children:"Scanner Status"}),s.jsx("div",{className:`text-2xl font-bold ${U.textColor}`,children:U.label})]})]}),s.jsxs("div",{className:"text-right text-sm text-slate-400 space-y-1",children:[s.jsxs("div",{children:["Last scan: ",s.jsx("span",{className:"text-slate-300",children:Y})]}),v.enabled&&v.status!=="complete"&&s.jsxs("div",{children:["Auto-scan: ",s.jsxs("span",{className:"text-slate-300",children:["every ",Q," min"]})]}),v.enabled&&v.status==="complete"&&s.jsx("div",{className:"text-emerald-400",children:"Auto-scan paused - all items sliced"})]})]})}),s.jsxs(ze,{className:"p-6",children:[s.jsxs("div",{className:"flex items-center justify-between mb-3",children:[s.jsx("h3",{className:"text-sm font-medium text-slate-300",children:"Progress"}),s.jsxs("span",{className:"text-sm text-slate-400",children:[v.processedItems," / ",v.totalItems," items (",z,"%)"]})]}),s.jsx("div",{className:"w-full h-3 bg-slate-800 rounded-full overflow-hidden",children:s.jsx("div",{className:`h-full rounded-full transition-all duration-500 ${z===100?"bg-gradient-to-r from-emerald-500 to-emerald-400":"bg-gradient-to-r from-indigo-600 to-indigo-400"}`,style:{width:`${z}%`}})})]}),Object.entries(_).map(([B,S])=>s.jsxs(ze,{className:"p-6",children:[s.jsx("h3",{className:"text-lg font-semibold text-slate-200 mb-4",children:B}),s.jsx("div",{className:"space-y-2",children:S.map(le=>s.jsx(gy,{item:le},le.hash))})]},B))]})};function gy({item:u}){const c=u.checked,d=u.processed;return s.jsxs("div",{className:`flex items-center justify-between p-3 rounded-lg border ${c?"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:[s.jsxs("div",{className:"flex items-center space-x-3 min-w-0 flex-1",children:[c?s.jsx(cb,{className:"h-4 w-4 text-slate-600 flex-shrink-0"}):d?s.jsx(js,{className:"h-4 w-4 text-emerald-400 flex-shrink-0"}):s.jsx(Ec,{className:"h-4 w-4 text-slate-500 flex-shrink-0"}),s.jsxs("div",{className:"min-w-0",children:[s.jsx("div",{className:`text-sm font-medium truncate ${c?"line-through text-slate-600":"text-slate-200"}`,children:u.title}),u.description&&s.jsx("div",{className:"text-xs text-slate-500 truncate mt-0.5",children:u.description})]})]}),s.jsx("div",{className:"flex-shrink-0 ml-3",children:c?s.jsx(fn,{variant:"neutral",children:"Skipped"}):d?s.jsx(fn,{variant:"success",children:u.prdFile||"Processed"}):s.jsx(fn,{variant:"warning",children:"Pending"})})]})}function by(u){switch(u){case"complete":return{label:"Complete",icon:js,textColor:"text-emerald-400",borderColor:"border-emerald-500/20 bg-emerald-500/5"};case"idle":return{label:"Idle",icon:Xi,textColor:"text-blue-400",borderColor:"border-blue-500/20 bg-blue-500/5"};case"scanning":return{label:"Scanning",icon:gs,textColor:"text-indigo-400",borderColor:"border-indigo-500/20 bg-indigo-500/5"};case"disabled":return{label:"Disabled",icon:Ml,textColor:"text-slate-400",borderColor:"border-slate-500/20 bg-slate-500/5"};default:return{label:"No Roadmap",icon:Ml,textColor:"text-slate-500",borderColor:"border-slate-500/20"}}}function yy(u){const c={};for(const d of u){const r=d.section||"General";c[r]||(c[r]=[]),c[r].push(d)}return c}function jy(u){try{const c=new Date(u),r=new Date().getTime()-c.getTime(),m=Math.floor(r/6e4);if(m<1)return"Just now";if(m<60)return`${m} min ago`;const x=Math.floor(m/60);return x<24?`${x} hr ago`:`${Math.floor(x/24)} day(s) ago`}catch{return"Unknown"}}const e0=({tabs:u,activeTab:c,onChange:d,className:r=""})=>{var b,p;const[m,x]=be.useState((b=u[0])==null?void 0:b.id),f=c||m,v=g=>{d?d(g):x(g)};return s.jsxs("div",{className:`flex flex-col ${r}`,children:[s.jsx("div",{className:"border-b border-slate-800 mb-6",children:s.jsx("nav",{className:"-mb-px flex space-x-8 overflow-x-auto scrollbar-hide",children:u.map(g=>s.jsx("button",{onClick:()=>v(g.id),className:`
350
+ whitespace-nowrap py-4 px-1 border-b-2 font-medium text-sm transition-all duration-200
351
+ ${f===g.id?"border-indigo-500 text-indigo-400":"border-transparent text-slate-500 hover:text-slate-300 hover:border-slate-700"}
352
+ `,children:g.label},g.id))})}),s.jsx("div",{className:"flex-1 animate-in fade-in slide-in-from-bottom-2 duration-300",children:(p=u.find(g=>g.id===f))==null?void 0:p.content})]})},Zi=[{label:"Balanced (recommended)",value:"5 */2 * * *",description:"Every 2 hours at minute 5"},{label:"Every 6 hours (very safe)",value:"10 */6 * * *",description:"Every 6 hours at minute 10"},{label:"Every 4 hours",value:"10 */4 * * *",description:"Every 4 hours at minute 10"},{label:"Twice daily",value:"20 2,14 * * *",description:"At 02:20 and 14:20 UTC"},{label:"Daily",value:"30 3 * * *",description:"Once per day at 03:30 UTC"},{label:"Weekdays only",value:"30 9 * * 1-5",description:"At 09:30 UTC, Monday to Friday"},{label:"Weekly (Monday)",value:"40 3 * * 1",description:"At 03:40 UTC every Monday"},{label:"Custom",value:"__custom__",description:"Enter your own cron expression"}],kc=[{id:"night-surge",label:"Night Surge",description:"Dense overnight execution every 2h with daytime reviews.",schedules:{executor:"5 20,22,0,2,4,6 * * *",reviewer:"25 8,14,20 * * *",qa:"45 22,10 * * *",audit:"50 4 * * 1",slicer:"35 19,7 * * *"},hints:{executor:"8pm–6am every 2h (6 runs)",reviewer:"8:25am, 2:25pm, 8:25pm",qa:"10:45pm & 10:45am",audit:"Mon 4:50am",slicer:"7:35pm & 7:35am"}},{id:"always-on",label:"Always On (Recommended)",description:"24/7 with maximum cadence — executor every hour, reviewer every 3h.",schedules:{executor:"5 * * * *",reviewer:"25 */3 * * *",qa:"45 2,10,18 * * *",audit:"50 3 * * 1",slicer:"35 */6 * * *"},hints:{executor:"Every hour at :05",reviewer:"Every 3h at :25",qa:"2:45am, 10:45am & 6:45pm",audit:"Mon 3:50am",slicer:"Every 6h at :35"}},{id:"day-shift",label:"Day Shift",description:"Weekday daytime — hourly executor 8am–8pm, reviews 4x/day.",schedules:{executor:"5 8-20 * * 1-5",reviewer:"25 9,13,17,19 * * 1-5",qa:"45 10,14,18 * * 1-5",audit:"50 9 * * 1",slicer:"35 7 * * 1"},hints:{executor:"Hourly at :05, 8am–8pm weekdays",reviewer:"9:25am, 1:25pm, 5:25pm, 7:25pm",qa:"10:45am, 2:45pm & 6:45pm weekdays",audit:"Mon 9:50am",slicer:"Mon 7:35am"}},{id:"minimal",label:"Minimal",description:"Twice-daily executor and reviewer with weekly heavy jobs.",schedules:{executor:"5 2,14 * * *",reviewer:"25 8,20 * * *",qa:"45 3 * * 0",audit:"50 4 * * 0",slicer:"35 1 * * 1"},hints:{executor:"2:05am & 2:05pm",reviewer:"8:25am & 8:25pm",qa:"Sun 3:45am",audit:"Sun 4:50am",slicer:"Mon 1:35am"}}];function mn(u){return u?u.trim().replace(/\s+/g," "):""}function on(u,c){return mn(u)===mn(c)}function Sy(u){if(u)return kc.find(c=>c.id===u)}function t0(u,c,d,r,m,x){return on(u.schedules.executor,c)&&on(u.schedules.reviewer,d)&&on(u.schedules.qa,r)&&on(u.schedules.audit,m)&&on(u.schedules.slicer,x)}function Ny(u,c,d,r,m){return kc.find(x=>t0(x,u,c,d,r,m))}function xs(u,c,d,r,m,x){const f=Sy(u);return f&&t0(f,c,d,r,m,x)?f:Ny(c,d,r,m,x)}function mh(u){const c=mn(u),d=c.split(/\s+/);if(d.length!==5)return c;const[r,m,x,f,v]=d,b=/^\d+$/.test(r),p=Zi.find(g=>mn(g.value)===c);if(p)return p.label;if(r==="*/30"&&m==="*")return"Every 30 minutes";if(r==="0"&&m==="*")return"Every hour";if(r.startsWith("*/"))return`Every ${parseInt(r.replace("*/",""),10)} minutes`;if(b&&m.startsWith("*/")&&x==="*"&&f==="*"&&v==="*"){const g=parseInt(m.replace("*/",""),10);return r==="0"?`Every ${g} hours`:`Every ${g} hours at :${r.padStart(2,"0")}`}if(r==="0"&&m.startsWith("*/"))return`Every ${parseInt(m.replace("*/",""),10)} hours`;if(r==="0"&&m.includes("-")){const[g,y]=m.split("-");return`Every hour from ${ms(g)} to ${ms(y)}`}if(b&&m.includes("-")&&x==="*"&&f==="*"&&v==="*"){const[g,y]=m.split("-");return`Every hour from ${hs(g,r)} to ${hs(y,r)}`}if(r==="0"&&m.includes(",")){const g=m.split(",").map(ms);return g.length<=3?`At ${g.join(" and ")}`:`At ${g.slice(0,-1).join(", ")}, and ${g[g.length-1]}`}if(b&&m.includes(",")&&x==="*"&&f==="*"&&(v==="*"||v==="1-5")){const g=m.split(",").map(D=>hs(D,r)),y=v==="1-5"?"Weekdays at ":"At ";return g.length<=3?`${y}${g.join(" and ")}`:`${y}${g.slice(0,-1).join(", ")}, and ${g[g.length-1]}`}return r==="0"&&m!=="*"&&x==="*"&&f==="*"&&v==="*"?`Daily at ${ms(m)}`:b&&m!=="*"&&x==="*"&&f==="*"&&v==="*"?`Daily at ${hs(m,r)}`:r==="0"&&m!=="*"&&x==="*"&&f==="*"&&v==="1-5"?`Weekdays at ${ms(m)}`:b&&m!=="*"&&x==="*"&&f==="*"&&v==="1-5"?`Weekdays at ${hs(m,r)}`:c}function ms(u){const c=parseInt(u,10);return c===0?"12 AM":c<12?`${c} AM`:c===12?"12 PM":`${c-12} PM`}function hs(u,c){const d=c.padStart(2,"0"),r=parseInt(u,10);return Number.isNaN(r)?`${u}:${d}`:r===0?`12:${d} AM`:r<12?`${r}:${d} AM`:r===12?`12:${d} PM`:`${r-12}:${d} PM`}function Ey(u){const c=mn(u),d=Zi.find(r=>mn(r.value)===c);return(d==null?void 0:d.value)??"__custom__"}function wy(u){const c=new Date,d=u.getTime()-c.getTime(),r=Math.floor(d/6e4),m=Math.floor(r/60),x=Math.floor(m/24);return r<1?"less than a minute":r<60?`in ${r} minute${r>1?"s":""}`:m<24?`in ${m} hour${m>1?"s":""}`:`in ${x} day${x>1?"s":""}`}function Ty(u){const c={weekday:"short",month:"short",day:"numeric",hour:"numeric",minute:"2-digit",hour12:!0};return u.toLocaleDateString("en-US",c)}function Cy(u){const c=new Date,d=u.getTime()-c.getTime(),r=Math.floor(d/6e4);return r>=0&&r<30}const Ce=be.forwardRef(({className:u="",label:c,error:d,helperText:r,rightIcon:m,...x},f)=>{const v=be.useId(),b=x.id??v,p=d?`${b}-error`:void 0,g=!d&&r?`${b}-help`:void 0,y=[p,g].filter(Boolean).join(" ")||void 0;return s.jsxs("div",{className:"w-full",children:[c&&s.jsx("label",{htmlFor:b,className:"block text-sm font-medium text-slate-400 mb-1.5",children:c}),s.jsxs("div",{className:"relative",children:[s.jsx("input",{ref:f,id:b,"aria-describedby":y,"aria-invalid":d?!0:x["aria-invalid"],className:`
353
+ w-full rounded-lg bg-slate-950 border border-slate-800
354
+ px-3 py-2 text-sm text-slate-200
355
+ placeholder:text-slate-600
356
+ focus:outline-none focus:ring-2 focus:ring-indigo-500/50 focus:border-indigo-500
357
+ disabled:opacity-50 disabled:cursor-not-allowed
358
+ transition-all duration-200
359
+ ${d?"border-red-500/50 focus:ring-red-500/50 focus:border-red-500":""}
360
+ ${m?"pr-10":""}
361
+ ${u}
362
+ `,...x}),m&&s.jsx("div",{className:"absolute inset-y-0 right-0 flex items-center pr-3 pointer-events-none text-slate-500",children:m})]}),d?s.jsx("p",{id:p,className:"mt-1.5 text-xs text-red-400",children:d}):r?s.jsx("p",{id:g,className:"mt-1.5 text-xs text-slate-500",children:r}):null]})});Ce.displayName="Input";const Ct=be.forwardRef(({className:u="",label:c,error:d,helperText:r,options:m,value:x,onChange:f,children:v,...b},p)=>{const g=be.useId(),y=b.id??g,D=d?`${y}-error`:void 0,z=!d&&r?`${y}-help`:void 0,U=[D,z].filter(Boolean).join(" ")||void 0,_=Y=>{f&&f(Y.target.value)};return s.jsxs("div",{className:"w-full",children:[c&&s.jsx("label",{htmlFor:y,className:"block text-sm font-medium text-slate-400 mb-1.5",children:c}),s.jsxs("div",{className:"relative",children:[s.jsx("select",{ref:p,id:y,"aria-describedby":U,"aria-invalid":d?!0:b["aria-invalid"],className:`
363
+ w-full appearance-none rounded-lg bg-slate-950 border border-slate-800
364
+ px-3 py-2 pr-10 text-sm text-slate-200
365
+ focus:outline-none focus:ring-2 focus:ring-indigo-500/50 focus:border-indigo-500
366
+ disabled:opacity-50 disabled:cursor-not-allowed
367
+ transition-all duration-200
368
+ ${d?"border-red-500/50 focus:ring-red-500/50 focus:border-red-500":""}
369
+ ${u}
370
+ `,value:x,onChange:_,...b,children:m?m.map(Y=>s.jsx("option",{value:Y.value,children:Y.label},Y.value)):v}),s.jsx("div",{className:"pointer-events-none absolute inset-y-0 right-0 flex items-center px-2 text-slate-500",children:s.jsx(Bh,{className:"h-4 w-4"})})]}),d?s.jsx("p",{id:D,className:"mt-1.5 text-xs text-red-400",children:d}):r?s.jsx("p",{id:z,className:"mt-1.5 text-xs text-slate-500",children:r}):null]})});Ct.displayName="Select";const dn=({label:u,value:c,onChange:d,helperText:r,placeholder:m="5 */3 * * *"})=>{const x=Ey(c),f=x==="__custom__",v=g=>{g!=="__custom__"&&d(g)},b=g=>{d(g.target.value)},p=Zi.find(g=>g.value===x);return s.jsxs("div",{className:"space-y-3",children:[s.jsx(Ct,{label:u,value:x,onChange:v,options:Zi.map(g=>({label:g.label,value:g.value})),helperText:f?void 0:(p==null?void 0:p.description)||r}),f&&s.jsxs("div",{className:"space-y-2 mt-2",children:[s.jsx(Ce,{label:"Cron Expression",value:c,onChange:b,placeholder:m}),s.jsxs("div",{className:"text-xs text-slate-500 bg-slate-900/40 p-3 rounded-md border border-slate-800/60",children:[s.jsx("strong",{className:"text-slate-400",children:"Format:"})," minute hour day month weekday",s.jsx("br",{}),s.jsx("strong",{className:"text-slate-400",children:"Examples:"})," ",s.jsx("code",{className:"bg-slate-950 px-1 py-0.5 rounded text-indigo-300",children:"0 * * * *"})," (hourly),"," ",s.jsx("code",{className:"bg-slate-950 px-1 py-0.5 rounded text-indigo-300",children:"0 0 * * *"})," (daily at midnight)"]})]})]})},l0=({form:u,scheduleMode:c,selectedTemplateId:d,onFieldChange:r,onSwitchToTemplate:m,onSwitchToCustom:x,onApplyTemplate:f})=>s.jsxs(ze,{className:"p-6 space-y-6",children:[s.jsxs("div",{className:"flex items-start justify-between gap-4",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200 mb-1",children:"Job Schedules"}),s.jsx("p",{className:"text-sm text-slate-400",children:"Configure when automated jobs run using a preset template or custom cron expressions"})]}),s.jsxs("div",{className:"flex rounded-lg border border-slate-700 overflow-hidden shrink-0",children:[s.jsx("button",{type:"button",className:`px-4 py-1.5 text-sm font-medium transition-colors ${c==="template"?"bg-indigo-600 text-white":"bg-slate-800 text-slate-400 hover:text-slate-200"}`,onClick:m,children:"Template"}),s.jsx("button",{type:"button",className:`px-4 py-1.5 text-sm font-medium transition-colors ${c==="custom"?"bg-indigo-600 text-white":"bg-slate-800 text-slate-400 hover:text-slate-200"}`,onClick:x,children:"Custom"})]})]}),c==="template"?s.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3",children:kc.map(v=>{const b=d===v.id;return s.jsxs("button",{type:"button",onClick:()=>f(v),className:`text-left p-4 rounded-lg border transition-colors ${b?"border-indigo-500 bg-indigo-950/40":"border-slate-700 bg-slate-800/30 hover:border-slate-600"}`,children:[s.jsx("div",{className:"font-medium text-slate-200 mb-1",children:v.label}),s.jsx("p",{className:"text-xs text-slate-400 mb-3",children:v.description}),s.jsx("div",{className:"space-y-0.5",children:[["Executor",v.hints.executor],["Reviewer",v.hints.reviewer],["QA",v.hints.qa],["Audit",v.hints.audit],["Slicer",v.hints.slicer]].map(([p,g])=>s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{className:"text-xs text-slate-500 w-16 shrink-0",children:p}),s.jsx("span",{className:"text-xs text-slate-400",children:g})]},p))})]},v.id)})}):s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsx(dn,{label:"PRD Execution Schedule",value:u.cronSchedule,onChange:v=>r("cronSchedule",v)}),s.jsx(dn,{label:"PR Review Schedule",value:u.reviewerSchedule,onChange:v=>r("reviewerSchedule",v)}),s.jsx(dn,{label:"QA Schedule",value:u.qa.schedule,onChange:v=>r("qa",{...u.qa,schedule:v})}),s.jsx(dn,{label:"Audit Schedule",value:u.audit.schedule,onChange:v=>r("audit",{...u.audit,schedule:v})}),u.roadmapScanner.enabled&&s.jsx(dn,{label:"Planner Schedule",value:u.roadmapScanner.slicerSchedule||"35 */12 * * *",onChange:v=>r("roadmapScanner",{...u.roadmapScanner,slicerSchedule:v})})]}),s.jsxs("div",{className:"pt-4 border-t border-slate-800 grid grid-cols-1 md:grid-cols-3 gap-6",children:[s.jsx(Ct,{label:"Scheduling Priority",value:String(u.schedulingPriority),onChange:v=>r("schedulingPriority",Number(v)),options:[{label:"1 - Lowest",value:"1"},{label:"2 - Low",value:"2"},{label:"3 - Balanced",value:"3"},{label:"4 - High",value:"4"},{label:"5 - Highest",value:"5"}],helperText:"Higher-priority projects get earlier balanced start slots and win queue tie-breakers first."}),s.jsx("div",{className:"rounded-xl border border-slate-800 bg-slate-950/50 p-4",children:s.jsxs("div",{className:"flex items-center justify-between gap-4",children:[s.jsxs("div",{children:[s.jsx("div",{className:"text-sm font-medium text-slate-200",children:"Global Queue"}),s.jsx("p",{className:"text-xs text-slate-400 mt-1",children:"Queue overlapping jobs across projects instead of letting them burst the provider API."})]}),s.jsx(Jt,{checked:u.globalQueueEnabled??!0,onChange:v=>r("globalQueueEnabled",v)})]})}),s.jsx(Ce,{label:"Extra Start Delay",type:"number",min:"0",max:"59",value:String(u.cronScheduleOffset),onChange:v=>{const b=Math.min(59,Math.max(0,Number(v.target.value||0)));r("cronScheduleOffset",b)},helperText:"Manual delay in minutes added before cron jobs start. This stacks on top of automatic balancing."})]})]}),Ry=()=>{var ce,me,Ne,et,Ye,tl,T,W,de,Te,tt,vt,Lt;const{addToast:u,selectedProjectId:c,globalModeLoading:d}=pt(),[r,m]=w.useState("overview"),[x,f]=w.useState(!1),[v,b]=w.useState(!1),[p,g]=w.useState(null),[y,D]=w.useState(null),[z,U]=w.useState({form:{cronSchedule:"5 */3 * * *",reviewerSchedule:"25 */6 * * *",qa:{schedule:"45 2,14 * * *",enabled:!0},audit:{schedule:"50 3 * * 1",enabled:!0},roadmapScanner:{slicerSchedule:"35 */12 * * *",enabled:!0},scheduleBundleId:null,schedulingPriority:3,cronScheduleOffset:0,globalQueueEnabled:!0},scheduleMode:"template",selectedTemplateId:"always-on",isDirty:!1}),{data:_,loading:Y,error:Q,refetch:B}=el(Kh,[c],{enabled:!d}),{data:S,loading:le,refetch:Z}=el($h,[c],{enabled:!d});w.useEffect(()=>{const V=setInterval(()=>{B()},3e4);return()=>clearInterval(V)},[B]),w.useEffect(()=>{var V,se,Ge,bt,ll,al;if(S&&!z.isDirty){const _l=xs(S.scheduleBundleId,S.cronSchedule,S.reviewerSchedule,((V=S.qa)==null?void 0:V.schedule)||"45 2,14 * * *",((se=S.audit)==null?void 0:se.schedule)||"50 3 * * 1",((Ge=S.roadmapScanner)==null?void 0:Ge.slicerSchedule)||"35 */12 * * *");U({form:{cronSchedule:S.cronSchedule||"5 */3 * * *",reviewerSchedule:S.reviewerSchedule||"25 */6 * * *",qa:S.qa||{schedule:"45 2,14 * * *",enabled:!0},audit:S.audit||{schedule:"50 3 * * 1",enabled:!0},roadmapScanner:{enabled:((bt=S.roadmapScanner)==null?void 0:bt.enabled)??!0,slicerSchedule:((ll=S.roadmapScanner)==null?void 0:ll.slicerSchedule)||"35 */12 * * *"},scheduleBundleId:S.scheduleBundleId??null,schedulingPriority:S.schedulingPriority??3,cronScheduleOffset:S.cronScheduleOffset??0,globalQueueEnabled:((al=S.queue)==null?void 0:al.enabled)??!0},scheduleMode:_l?"template":"custom",selectedTemplateId:(_l==null?void 0:_l.id)??"",isDirty:!1})}},[S,z.isDirty]);const $=()=>{Z(),B()},P=(V,se)=>V instanceof Error?V.message:se,ie=async()=>{if(_){f(!0);try{_.paused?(await ps(),u({title:"Schedule Resumed",message:"Cron schedules have been reactivated.",type:"success"})):(await Yb(),u({title:"Schedule Paused",message:"Cron schedules have been deactivated.",type:"info"})),$()}catch(V){u({title:"Action Failed",message:P(V,"Failed to toggle schedule state"),type:"error"})}finally{f(!1)}}},ue=async(V,se)=>{if(S){g(V);try{V==="executor"?await aa({executorEnabled:se}):V==="reviewer"?await aa({reviewerEnabled:se}):V==="qa"?await aa({qa:{...S.qa,enabled:se}}):V==="audit"?await aa({audit:{...S.audit,enabled:se}}):await aa({roadmapScanner:{...S.roadmapScanner,enabled:se}});let Ge="";try{await ps()}catch(bt){Ge=P(bt,"Failed to reinstall cron schedules")}$(),u(Ge?{title:"Job Saved (Cron Reinstall Failed)",message:Ge,type:"warning"}:{title:"Job Updated",message:`${V[0].toUpperCase()+V.slice(1)} ${se?"enabled":"disabled"}.`,type:"success"})}catch(Ge){u({title:"Update Failed",message:P(Ge,"Failed to update job configuration"),type:"error"})}finally{g(null)}}},X=async V=>{D(V);try{await{executor:Hb,reviewer:Jh,qa:Lb,audit:Bb,planner:kb}[V](),u({title:"Job Triggered",message:`${V[0].toUpperCase()+V.slice(1)} job has been queued.`,type:"success"}),B()}catch(se){u({title:"Trigger Failed",message:P(se,`Failed to trigger ${V} job`),type:"error"})}finally{D(null)}},pe=(V,se)=>{U(Ge=>({...Ge,form:{...Ge.form,[V]:se},isDirty:!0}))},ye=()=>{if(!z.form)return;const V=xs(z.form.scheduleBundleId,z.form.cronSchedule,z.form.reviewerSchedule,z.form.qa.schedule,z.form.audit.schedule,z.form.roadmapScanner.slicerSchedule||"35 */12 * * *");U(se=>({...se,scheduleMode:"template",selectedTemplateId:(V==null?void 0:V.id)??"always-on",form:{...se.form,scheduleBundleId:(V==null?void 0:V.id)??null},isDirty:!0}))},we=()=>{U(V=>({...V,scheduleMode:"custom",selectedTemplateId:"",form:{...V.form,scheduleBundleId:null},isDirty:!0}))},F=V=>{U(se=>({...se,selectedTemplateId:V.id,scheduleMode:"template",form:{...se.form,cronSchedule:V.schedules.executor,reviewerSchedule:V.schedules.reviewer,scheduleBundleId:V.id,qa:{...se.form.qa,schedule:V.schedules.qa},audit:{...se.form.audit,schedule:V.schedules.audit},roadmapScanner:{...se.form.roadmapScanner,slicerSchedule:V.schedules.slicer}},isDirty:!0}))},ct=async()=>{if(S){b(!0);try{await aa({cronSchedule:z.form.cronSchedule,reviewerSchedule:z.form.reviewerSchedule,scheduleBundleId:z.scheduleMode==="template"?z.form.scheduleBundleId:null,cronScheduleOffset:z.form.cronScheduleOffset,schedulingPriority:z.form.schedulingPriority,qa:{...S.qa,schedule:z.form.qa.schedule},audit:{...S.audit,schedule:z.form.audit.schedule},roadmapScanner:{...S.roadmapScanner,slicerSchedule:z.form.roadmapScanner.slicerSchedule||"35 */12 * * *"},queue:{...S.queue,enabled:z.form.globalQueueEnabled??!0},executorEnabled:S.executorEnabled,reviewerEnabled:S.reviewerEnabled});let V="";try{await ps()}catch(se){V=P(se,"Failed to reinstall cron schedules")}U(se=>({...se,isDirty:!1})),$(),u(V?{title:"Schedules Saved (Cron Reinstall Failed)",message:V,type:"warning"}:{title:"Schedule Updated",message:"Cron schedules have been saved and installed.",type:"success"})}catch(V){u({title:"Save Failed",message:P(V,"Failed to save schedules"),type:"error"})}finally{b(!1)}}},q=V=>{if(!V)return s.jsx("span",{className:"text-slate-500",children:"Not scheduled"});const se=new Date(V),Ge=Cy(se);return s.jsxs("div",{className:"flex items-center space-x-2",children:[Ge&&s.jsxs("span",{className:"relative flex h-3 w-3",children:[s.jsx("span",{className:"animate-ping absolute inline-flex h-full w-full rounded-full bg-green-400 opacity-75"}),s.jsx("span",{className:"relative inline-flex rounded-full h-3 w-3 bg-green-500"})]}),s.jsxs("div",{className:"text-sm",children:[s.jsx("span",{className:"text-slate-200 font-medium",children:wy(se)}),s.jsxs("span",{className:"text-slate-500 ml-2",children:["(",Ty(se),")"]})]})]})},K=V=>{if(!V||V.delayMinutes<=0)return s.jsx("div",{className:"text-xs text-slate-500 mt-2",children:"Starts directly at the scheduled time."});const se=[];return V.balancedDelayMinutes>0&&se.push(`auto +${V.balancedDelayMinutes}m`),V.manualDelayMinutes>0&&se.push(`manual +${V.manualDelayMinutes}m`),s.jsxs("div",{className:"text-xs text-slate-500 mt-2",children:["Delayed after cron fire:",s.jsxs("span",{className:"text-slate-300",children:[" ",se.join(" - ")]})]})};if(Y||le)return s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx("div",{className:"text-slate-400",children:"Loading scheduling information..."})});if(Q||!_||!S)return s.jsxs("div",{className:"flex flex-col items-center justify-center h-full space-y-4",children:[s.jsx(Ml,{className:"h-12 w-12 text-red-400"}),s.jsx("div",{className:"text-slate-300",children:"Failed to load schedule information"}),s.jsx("div",{className:"text-sm text-slate-500",children:(Q==null?void 0:Q.message)||"Unknown error"}),s.jsx(Be,{onClick:()=>{B(),Z()},children:"Retry"})]});const ae=_.paused,Re=ae?"bg-amber-500/10 text-amber-400 border-amber-500/20":"bg-green-500/10 text-green-400 border-green-500/20",_e=ae?"Paused":"Active",N=xs(S.scheduleBundleId,S.cronSchedule,S.reviewerSchedule,((ce=S.qa)==null?void 0:ce.schedule)||"45 2,14 * * *",((me=S.audit)==null?void 0:me.schedule)||"50 3 * * 1",((Ne=S.roadmapScanner)==null?void 0:Ne.slicerSchedule)||"35 */12 * * *"),L=(V,se,Ge)=>!N||!on(N.schedules[V],se)?mh(Ge):`${N.label} - ${N.hints[V]}`,J=[{id:"executor",name:"Executor",description:"Creates implementation PRs from PRDs",icon:s.jsx(Xi,{className:"h-4 w-4"}),enabled:(S==null?void 0:S.executorEnabled)!==!1,schedule:_.executor.schedule,nextRun:_.executor.nextRun,delayInfo:_.executor},{id:"reviewer",name:"Reviewer",description:"Reviews PRs and manages merge readiness",icon:s.jsx(Ji,{className:"h-4 w-4"}),enabled:(S==null?void 0:S.reviewerEnabled)??!1,schedule:_.reviewer.schedule,nextRun:_.reviewer.nextRun,delayInfo:_.reviewer},{id:"qa",name:"QA",description:"Generates and runs quality checks on PRs",icon:s.jsx(Eb,{className:"h-4 w-4"}),enabled:((et=S==null?void 0:S.qa)==null?void 0:et.enabled)??!1,schedule:(Ye=_.qa)==null?void 0:Ye.schedule,nextRun:(tl=_.qa)==null?void 0:tl.nextRun,delayInfo:_.qa},{id:"audit",name:"Auditor",description:"Runs automated audit reports",icon:s.jsx(rh,{className:"h-4 w-4"}),enabled:((T=S==null?void 0:S.audit)==null?void 0:T.enabled)??!1,schedule:(W=_.audit)==null?void 0:W.schedule,nextRun:(de=_.audit)==null?void 0:de.nextRun,delayInfo:_.audit},{id:"planner",name:"Planner",description:"Creates PRDs from audit findings and pending roadmap items",icon:s.jsx(rh,{className:"h-4 w-4"}),enabled:((Te=S==null?void 0:S.roadmapScanner)==null?void 0:Te.enabled)??!1,schedule:((tt=_.planner)==null?void 0:tt.schedule)||((vt=S.roadmapScanner)==null?void 0:vt.slicerSchedule)||"35 */12 * * *",nextRun:(Lt=_.planner)==null?void 0:Lt.nextRun,delayInfo:_.planner}],I=[{id:"overview",label:"Overview",content:s.jsxs("div",{className:"space-y-6",children:[s.jsx(ze,{className:`p-6 border-2 ${Re}`,children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center space-x-4",children:[s.jsx(Xi,{className:"h-8 w-8"}),s.jsxs("div",{children:[s.jsx("div",{className:"text-sm text-slate-400",children:"Automation Status"}),s.jsx("div",{className:"text-2xl font-bold",children:_e}),s.jsx("div",{className:"text-sm text-slate-500 mt-1",children:"Automatic balancing spreads registered projects before queueing overlaps."})]})]}),s.jsx(Be,{variant:ae?"primary":"outline",size:"lg",onClick:ie,loading:x,children:ae?s.jsxs(s.Fragment,{children:[s.jsx(gs,{className:"h-5 w-5 mr-2"}),"Resume"]}):s.jsxs(s.Fragment,{children:[s.jsx(Qh,{className:"h-5 w-5 mr-2"}),"Pause"]})})]})}),s.jsxs(ze,{className:"p-6",children:[s.jsx("h3",{className:"text-lg font-semibold text-slate-200 mb-4",children:"Agents"}),s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:J.map(V=>{var se,Ge,bt,ll,al,Je;return s.jsxs("div",{className:`p-4 rounded-lg border ${V.enabled?"border-slate-800":"border-slate-800 opacity-50"}`,children:[s.jsxs("div",{className:"flex items-center justify-between mb-3",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[V.icon,s.jsx("h4",{className:"text-base font-semibold text-slate-200",children:V.name})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("button",{title:`Run ${V.name} now`,disabled:y!==null,onClick:()=>X(V.id),className:"p-1.5 rounded-md text-slate-400 hover:text-green-400 hover:bg-green-500/10 disabled:opacity-40 disabled:cursor-not-allowed transition-colors",children:y===V.id?s.jsx("div",{className:"h-4 w-4 border-2 border-current border-t-transparent rounded-full animate-spin"}):s.jsx(gs,{className:"h-4 w-4"})}),s.jsx(Jt,{checked:V.enabled,disabled:p!==null,"aria-label":`Toggle ${V.name.toLowerCase()} automation`,onChange:_l=>ue(V.id,_l)})]})]}),V.enabled?s.jsxs("div",{className:"space-y-3 mt-3",children:[s.jsxs("div",{children:[s.jsx("div",{className:"text-sm text-slate-400",children:"Schedule"}),s.jsx("div",{className:"text-sm text-slate-200 font-medium",children:L(V.id==="planner"?"slicer":V.id,V.id==="qa"?((se=S==null?void 0:S.qa)==null?void 0:se.schedule)||"":V.id==="audit"?((Ge=S==null?void 0:S.audit)==null?void 0:Ge.schedule)||"":V.id==="planner"?((bt=S==null?void 0:S.roadmapScanner)==null?void 0:bt.slicerSchedule)||"35 */12 * * *":V.schedule,V.id==="qa"?((ll=S==null?void 0:S.qa)==null?void 0:ll.schedule)||"":V.id==="audit"?((al=S==null?void 0:S.audit)==null?void 0:al.schedule)||"":V.id==="planner"?((Je=S==null?void 0:S.roadmapScanner)==null?void 0:Je.slicerSchedule)||"35 */12 * * *":V.schedule)})]}),K(V.delayInfo),s.jsxs("div",{children:[s.jsx("div",{className:"text-sm text-slate-400",children:"Next Run"}),q(V.nextRun)]}),s.jsxs("div",{className:`flex items-center space-x-2 text-sm ${V.enabled?"text-green-400":"text-amber-400"}`,children:[s.jsx(Nc,{className:"h-4 w-4"}),s.jsx("span",{children:V.enabled?"Active":"Disabled"})]})]}):s.jsxs("div",{className:"text-slate-500 text-sm",children:[V.name," is disabled."]})]},V.id)})})]})]})},{id:"schedules",label:"Schedules",content:s.jsxs("div",{className:"space-y-6",children:[s.jsx(l0,{form:z.form,scheduleMode:z.scheduleMode,selectedTemplateId:z.selectedTemplateId,onFieldChange:pe,onSwitchToTemplate:ye,onSwitchToCustom:we,onApplyTemplate:F}),s.jsxs("div",{className:"flex justify-end pt-4",children:[s.jsx(Be,{variant:"ghost",onClick:()=>{var V,se,Ge,bt,ll,al;if(S){const Je=xs(S.scheduleBundleId,S.cronSchedule,S.reviewerSchedule,((V=S.qa)==null?void 0:V.schedule)||"45 2,14 * * *",((se=S.audit)==null?void 0:se.schedule)||"50 3 * * 1",((Ge=S.roadmapScanner)==null?void 0:Ge.slicerSchedule)||"35 */12 * * *");U({form:{cronSchedule:S.cronSchedule||"5 */3 * * *",reviewerSchedule:S.reviewerSchedule||"25 */6 * * *",qa:S.qa||{schedule:"45 2,14 * * *",enabled:!0},audit:S.audit||{schedule:"50 3 * * 1",enabled:!0},roadmapScanner:{enabled:((bt=S.roadmapScanner)==null?void 0:bt.enabled)??!0,slicerSchedule:((ll=S.roadmapScanner)==null?void 0:ll.slicerSchedule)||"35 */12 * * *"},scheduleBundleId:S.scheduleBundleId??null,schedulingPriority:S.schedulingPriority??3,cronScheduleOffset:S.cronScheduleOffset??0,globalQueueEnabled:((al=S.queue)==null?void 0:al.enabled)??!0},scheduleMode:Je?"template":"custom",selectedTemplateId:(Je==null?void 0:Je.id)??"",isDirty:!1})}},disabled:!z.isDirty,children:"Reset"}),s.jsxs(Be,{onClick:ct,loading:v,disabled:!z.isDirty,children:[s.jsx(Nc,{className:"h-4 w-4 mr-2"}),"Save & Install"]})]})]})},{id:"crontab",label:"Crontab",content:s.jsxs(ze,{className:"p-6",children:[s.jsxs("div",{className:"flex items-center space-x-2 mb-4",children:[s.jsx(qc,{className:"h-5 w-5 text-slate-400"}),s.jsx("h3",{className:"text-lg font-semibold text-slate-200",children:"Active Crontab Entries"})]}),_.entries.length===0?s.jsx("div",{className:"text-slate-500 text-sm",children:"No crontab entries found."}):s.jsx("div",{className:"space-y-2",children:_.entries.map((V,se)=>s.jsx("div",{className:"bg-slate-950/50 rounded-lg p-3 font-mono text-sm text-slate-300 border border-slate-800",children:V},se))})]})}];return s.jsxs("div",{className:"space-y-6 max-w-6xl mx-auto",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx("h1",{className:"text-3xl font-bold text-slate-100",children:"Scheduling"}),N&&s.jsxs("div",{className:"text-right",children:[s.jsx("div",{className:"text-xs uppercase tracking-wide text-slate-500",children:"Schedule Bundle"}),s.jsx("div",{className:"text-sm font-medium text-indigo-300",children:N.label}),s.jsxs("div",{className:"text-xs text-slate-500",children:["Priority ",_.schedulingPriority,"/5 across registered projects"]})]})]}),s.jsx(e0,{tabs:I,activeTab:r,onChange:m})]})},hh=({presetId:u,preset:c,isBuiltIn:d,onEdit:r,onDelete:m,onReset:x})=>{var p,g,y;const f=c.envVars?Object.keys(c.envVars).length:0,b=(u.startsWith("glm-")||((p=c.model)==null?void 0:p.startsWith("glm-")))&&!((y=(g=c.envVars)==null?void 0:g.ANTHROPIC_API_KEY)!=null&&y.trim());return s.jsxs("div",{className:"flex flex-col p-4 rounded-lg border border-slate-800 bg-slate-950/40 hover:border-slate-700 transition-colors",children:[s.jsxs("div",{className:"flex items-start justify-between gap-2 mb-3",children:[s.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[s.jsx("h4",{className:"text-sm font-medium text-slate-200",children:c.name}),d&&s.jsx(fn,{variant:"info",className:"text-[10px]",children:"Built-in"}),b&&s.jsxs("span",{className:"flex items-center gap-1 px-1.5 py-0.5 rounded text-[10px] bg-amber-900/40 text-amber-400 border border-amber-800/50",title:"GLM presets require ANTHROPIC_API_KEY in env vars",children:[s.jsx(Fi,{className:"h-3 w-3"}),"Missing ANTHROPIC_API_KEY"]})]}),s.jsxs("div",{className:"flex items-center gap-1",children:[s.jsx("button",{type:"button",onClick:r,className:"p-1.5 text-slate-400 hover:text-slate-200 hover:bg-slate-800 rounded transition-colors","aria-label":`Edit ${c.name} preset`,title:"Edit preset",children:s.jsx(Hc,{className:"h-4 w-4"})}),d?x&&s.jsx("button",{type:"button",onClick:x,className:"p-1.5 text-slate-400 hover:text-indigo-400 hover:bg-slate-800 rounded transition-colors","aria-label":`Reset ${c.name} to defaults`,title:"Reset to defaults",children:s.jsx(Vh,{className:"h-4 w-4"})}):m&&s.jsx("button",{type:"button",onClick:m,className:"p-1.5 text-slate-400 hover:text-red-400 hover:bg-slate-800 rounded transition-colors","aria-label":`Delete ${c.name} preset`,title:"Delete preset",children:s.jsx(Lc,{className:"h-4 w-4"})})]})]}),s.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[s.jsx("span",{className:"text-xs text-slate-500",children:"Command:"}),s.jsxs("code",{className:"px-2 py-0.5 bg-slate-800 rounded text-xs text-indigo-400 font-mono",children:[c.command,c.subcommand&&` ${c.subcommand}`]})]}),c.model&&s.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[s.jsx("span",{className:"text-xs text-slate-500",children:"Model:"}),s.jsx(fn,{variant:"neutral",className:"text-[10px] font-mono",children:c.model})]}),s.jsxs("div",{className:"flex items-center gap-3 mt-auto pt-2 border-t border-slate-800/50",children:[s.jsxs("span",{className:"text-xs text-slate-600 font-mono",children:["id: ",u]}),f>0&&s.jsxs("span",{className:"text-xs text-slate-500",children:[f," env var",f!==1?"s":""]})]})]})},Ay=({isOpen:u,onClose:c,title:d,children:r})=>(w.useEffect(()=>{const m=x=>{x.key==="Escape"&&c()};return u&&(document.addEventListener("keydown",m),document.body.style.overflow="hidden"),()=>{document.removeEventListener("keydown",m),document.body.style.overflow="unset"}},[u,c]),u?dg.createPortal(s.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4 sm:p-6",children:[s.jsx("div",{className:"fixed inset-0 bg-black/70 backdrop-blur-sm transition-opacity",onClick:c,"aria-hidden":"true"}),s.jsxs("div",{className:"relative w-full max-w-2xl transform rounded-xl bg-slate-900 border border-slate-800 shadow-2xl transition-all flex flex-col max-h-[90vh]",children:[s.jsxs("div",{className:"flex items-center justify-between border-b border-slate-800 px-6 py-4",children:[s.jsx("h3",{className:"text-lg font-semibold text-slate-100",children:d}),s.jsx("button",{onClick:c,className:"rounded-full p-1 text-slate-400 hover:bg-slate-800 hover:text-slate-300 focus:outline-none focus:ring-2 focus:ring-indigo-500",children:s.jsx(vn,{className:"h-5 w-5"})})]}),s.jsx("div",{className:"flex-1 overflow-y-auto px-6 py-6 text-slate-300",children:r})]})]}),document.body):null),My=u=>["TOKEN","SECRET","KEY","PASSWORD","AUTH","API_KEY"].some(d=>u.toUpperCase().includes(d)),_y=({value:u,isSensitive:c})=>{const[d,r]=be.useState(!1);return c?s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{className:"text-sm text-slate-300 font-mono",children:d?u:"***********"}),s.jsx("button",{type:"button",onClick:()=>r(!d),className:"text-slate-500 hover:text-slate-300","aria-label":d?"Hide sensitive value":"Show sensitive value",title:d?"Hide sensitive value":"Show sensitive value",children:d?s.jsx(Kg,{className:"h-4 w-4"}):s.jsx(Fg,{className:"h-4 w-4"})})]}):s.jsx("span",{className:"text-sm text-slate-300 font-mono truncate max-w-xs",children:u})},a0=({envVars:u,onChange:c,compact:d=!1})=>{const[r,m]=be.useState(""),[x,f]=be.useState(""),[v,b]=be.useState(null),[p,g]=be.useState(""),y=()=>{if(r.trim()){if(!/^[A-Z_][A-Z0-9_]*$/.test(r)){alert("Key must be uppercase with underscores (e.g., API_KEY)");return}c({...u,[r]:x}),m(""),f("")}},D=Q=>{const B={...u};delete B[Q],c(B)},z=Q=>{b(Q),g(u[Q]??"")},U=()=>{v&&(c({...u,[v]:p}),b(null),g(""))},_=()=>{b(null),g("")},Y=Object.entries(u);return s.jsxs("div",{className:"space-y-4",children:[!d&&s.jsx("div",{className:"text-sm text-slate-400 mb-4",children:"Configure environment variables passed to the provider CLI (API keys, base URLs)"}),s.jsx("div",{className:"space-y-2",children:Y.length===0?s.jsx("p",{className:"text-slate-500 text-sm italic",children:"No environment variables configured."}):Y.map(([Q,B])=>s.jsxs("div",{className:"flex items-center justify-between p-3 rounded-md border border-slate-800 bg-slate-950/40",children:[s.jsxs("div",{className:"flex items-center gap-4 flex-1 min-w-0",children:[s.jsx("span",{className:"text-sm font-mono text-indigo-400 w-48 truncate",children:Q}),v===Q?s.jsxs("div",{className:"flex items-center gap-2 flex-1",children:[s.jsx("input",{type:"text",value:p,onChange:S=>g(S.target.value),className:"flex-1 bg-slate-800 border border-slate-700 rounded px-2 py-1 text-sm text-slate-200"}),s.jsx("button",{type:"button",onClick:U,className:"p-1 text-green-400 hover:text-green-300","aria-label":`Save ${Q} value`,title:`Save ${Q} value`,children:s.jsx(Nc,{className:"h-4 w-4"})}),s.jsx("button",{type:"button",onClick:_,className:"p-1 text-slate-400 hover:text-slate-300","aria-label":`Cancel editing ${Q}`,title:`Cancel editing ${Q}`,children:s.jsx(vn,{className:"h-4 w-4"})})]}):s.jsx(_y,{value:B,isSensitive:My(Q)})]}),v!==Q&&s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("button",{type:"button",onClick:()=>z(Q),className:"p-1 text-slate-400 hover:text-slate-200","aria-label":`Edit ${Q}`,title:`Edit ${Q}`,children:s.jsx(Hc,{className:"h-4 w-4"})}),s.jsx("button",{type:"button",onClick:()=>D(Q),className:"p-1 text-red-400 hover:text-red-300","aria-label":`Delete ${Q}`,title:`Delete ${Q}`,children:s.jsx(Lc,{className:"h-4 w-4"})})]})]},Q))}),s.jsxs("div",{className:`flex items-end gap-3 ${d?"":"pt-4 border-t border-slate-800"}`,children:[s.jsxs("div",{className:"flex-1",children:[!d&&s.jsx("label",{className:"block text-xs font-medium text-slate-500 mb-1",children:"Key"}),s.jsx("input",{type:"text",value:r,onChange:Q=>m(Q.target.value.toUpperCase()),placeholder:d?"ENV_VAR_NAME":"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"})]}),s.jsxs("div",{className:"flex-1",children:[!d&&s.jsx("label",{className:"block text-xs font-medium text-slate-500 mb-1",children:"Value"}),s.jsx("input",{type:"text",value:x,onChange:Q=>f(Q.target.value),placeholder:d?"value":"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"})]}),s.jsxs(Be,{onClick:y,disabled:!r.trim(),size:d?"sm":"md",children:[s.jsx(pn,{className:"h-4 w-4 mr-1"}),"Add"]})]})]})};function Dy(u,c){var d;return!!(u!=null&&u.startsWith("glm-")||(d=c==null?void 0:c.model)!=null&&d.startsWith("glm-"))}function zy(u,c){var d,r;return Dy(u,c)?!((r=(d=c==null?void 0:c.envVars)==null?void 0:d.ANTHROPIC_API_KEY)!=null&&r.trim()):!1}const xh={claude:{name:"Claude",command:"claude",promptFlag:"-p",autoApproveFlag:"--dangerously-skip-permissions"},codex:{name:"Codex",command:"codex",subcommand:"exec",autoApproveFlag:"--yolo",workdirFlag:"-C"},custom:{name:"",command:""}},Oy=({isOpen:u,onClose:c,onSave:d,presetId:r,preset:m,isBuiltIn:x,existingIds:f})=>{const[v,b]=be.useState(""),[p,g]=be.useState({name:"",command:"",subcommand:"",promptFlag:"",autoApproveFlag:"",workdirFlag:"",modelFlag:"",model:"",envVars:{}}),[y,D]=be.useState(!1),[z,U]=be.useState("custom"),[_,Y]=be.useState(null),Q=zy(r??v,p);be.useEffect(()=>{u&&(r&&m?(b(r),g({name:m.name,command:m.command,subcommand:m.subcommand??"",promptFlag:m.promptFlag??"",autoApproveFlag:m.autoApproveFlag??"",workdirFlag:m.workdirFlag??"",modelFlag:m.modelFlag??"",model:m.model??"",envVars:m.envVars??{}}),r==="claude"||m.command==="claude"?U("claude"):r==="codex"||m.command==="codex"?U("codex"):U("custom")):(b(""),g({name:"",command:"",subcommand:"",promptFlag:"",autoApproveFlag:"",workdirFlag:"",modelFlag:"",model:"",envVars:{}}),U("custom")),Y(null),D(!!(m!=null&&m.envVars&&Object.keys(m.envVars).length>0)))},[u,r,m]);const B=$=>{if(U($),$!=="custom"&&xh[$]){const P=xh[$];g(ie=>({...ie,...P,envVars:ie.envVars})),!r&&!v&&b($)}},S=($,P)=>{g(ie=>({...ie,[$]:P})),Y(null)},le=()=>{if(!p.name.trim())return Y("Name is required"),!1;if(!p.command.trim())return Y("Command is required"),!1;if(!r){if(!v.trim())return Y("Preset ID is required"),!1;if(!/^[a-z0-9_-]+$/.test(v))return Y("Preset ID must be lowercase letters, numbers, hyphens, and underscores only"),!1;if(f.includes(v))return Y("A preset with this ID already exists"),!1}return!0},Z=()=>{var P,ie,ue,X,pe,ye;if(!le())return;const $={name:p.name.trim(),command:p.command.trim()};(P=p.subcommand)!=null&&P.trim()&&($.subcommand=p.subcommand.trim()),(ie=p.promptFlag)!=null&&ie.trim()&&($.promptFlag=p.promptFlag.trim()),(ue=p.autoApproveFlag)!=null&&ue.trim()&&($.autoApproveFlag=p.autoApproveFlag.trim()),(X=p.workdirFlag)!=null&&X.trim()&&($.workdirFlag=p.workdirFlag.trim()),(pe=p.modelFlag)!=null&&pe.trim()&&($.modelFlag=p.modelFlag.trim()),(ye=p.model)!=null&&ye.trim()&&($.model=p.model.trim()),p.envVars&&Object.keys(p.envVars).length>0&&($.envVars=p.envVars),d(r||v,$),c()};return s.jsx(Ay,{isOpen:u,onClose:c,title:r?`Edit Preset: ${m==null?void 0:m.name}`:"Add Provider Preset",children:s.jsxs("div",{className:"space-y-6",children:[_&&s.jsx("div",{className:"p-3 rounded-md bg-red-500/10 border border-red-500/20 text-red-400 text-sm",children:_}),Q&&s.jsx("div",{className:"p-3 rounded-md bg-amber-500/10 border border-amber-500/20 text-amber-300 text-sm",children:s.jsxs("div",{className:"flex items-start gap-2",children:[s.jsx(Fi,{className:"h-4 w-4 shrink-0 mt-0.5"}),s.jsxs("div",{children:[s.jsx("div",{className:"font-medium",children:"GLM presets require `ANTHROPIC_API_KEY`."}),s.jsx("div",{className:"text-amber-200/80",children:"Add `ANTHROPIC_API_KEY` in Environment Variables before using this preset."})]})]})}),!x&&s.jsx("div",{children:s.jsx(Ct,{label:"Template",value:z,onChange:B,options:[{label:"Start from scratch",value:"custom"},{label:"Claude (Anthropic)",value:"claude"},{label:"Codex (OpenAI)",value:"codex"}],helperText:"Start with a pre-configured template or customize from scratch"})}),!r&&s.jsx(Ce,{label:"Preset ID",value:v,onChange:$=>b($.target.value.toLowerCase().replace(/[^a-z0-9_-]/g,"")),placeholder:"e.g., my-custom-provider",helperText:"Unique identifier for this preset (lowercase, numbers, hyphens, underscores)"}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[s.jsx(Ce,{label:"Display Name",value:p.name,onChange:$=>S("name",$.target.value),placeholder:"e.g., My Custom Provider",required:!0}),s.jsx(Ce,{label:"Command",value:p.command,onChange:$=>S("command",$.target.value),placeholder:"e.g., claude, codex, npx",required:!0})]}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[s.jsx(Ce,{label:"Model",value:p.model??"",onChange:$=>S("model",$.target.value),placeholder:"e.g., claude-opus-4-6",helperText:"Default model to use"}),s.jsx(Ce,{label:"Model Flag",value:p.modelFlag??"",onChange:$=>S("modelFlag",$.target.value),placeholder:"e.g., --model",helperText:"Flag for specifying the model"})]}),s.jsxs("div",{className:"border-t border-slate-800 pt-4",children:[s.jsxs("button",{type:"button",onClick:()=>D(!y),className:"flex items-center gap-2 text-sm text-slate-400 hover:text-slate-200 transition-colors",children:[y?s.jsx(qg,{className:"h-4 w-4"}):s.jsx(Bh,{className:"h-4 w-4"}),"Advanced Options"]}),y&&s.jsxs("div",{className:"mt-4 space-y-4",children:[s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[s.jsx(Ce,{label:"Subcommand",value:p.subcommand??"",onChange:$=>S("subcommand",$.target.value),placeholder:"e.g., exec",helperText:"Subcommand after base command"}),s.jsx(Ce,{label:"Prompt Flag",value:p.promptFlag??"",onChange:$=>S("promptFlag",$.target.value),placeholder:"e.g., -p",helperText:"Flag for passing the prompt"})]}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[s.jsx(Ce,{label:"Auto-Approve Flag",value:p.autoApproveFlag??"",onChange:$=>S("autoApproveFlag",$.target.value),placeholder:"e.g., --dangerously-skip-permissions",helperText:"Flag to enable auto-approve mode"}),s.jsx(Ce,{label:"Workdir Flag",value:p.workdirFlag??"",onChange:$=>S("workdirFlag",$.target.value),placeholder:"e.g., -C",helperText:"Flag for setting working directory"})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-slate-400 mb-2",children:"Environment Variables"}),s.jsx(a0,{envVars:p.envVars??{},onChange:$=>S("envVars",$),compact:!0})]})]})]}),s.jsxs("div",{className:"flex justify-end gap-3 pt-4 border-t border-slate-800",children:[s.jsx(Be,{variant:"ghost",onClick:c,children:"Cancel"}),s.jsx(Be,{onClick:Z,children:r?"Save Changes":"Add Preset"})]})]})})},Yi=["claude","claude-sonnet-4-6","claude-opus-4-6","codex","glm-47","glm-5"],bc=u=>{var c,d,r,m,x,f,v;return{provider:u.provider,providerLabel:u.providerLabel??"",providerPresets:u.providerPresets??{},defaultBranch:u.defaultBranch,prdDir:u.prdDir||"docs/prds",branchPrefix:u.branchPrefix,branchPatterns:u.branchPatterns||[],executorEnabled:u.executorEnabled??!0,reviewerEnabled:u.reviewerEnabled,minReviewScore:u.minReviewScore,maxRuntime:u.maxRuntime,reviewerMaxRuntime:u.reviewerMaxRuntime,maxLogSize:u.maxLogSize,cronSchedule:u.cronSchedule||"5 */3 * * *",reviewerSchedule:u.reviewerSchedule||"25 */6 * * *",scheduleBundleId:u.scheduleBundleId??null,cronScheduleOffset:u.cronScheduleOffset??0,schedulingPriority:u.schedulingPriority??3,maxRetries:u.maxRetries??3,reviewerMaxRetries:u.reviewerMaxRetries??2,reviewerRetryDelay:u.reviewerRetryDelay??30,providerEnv:u.providerEnv||{},notifications:u.notifications||{webhooks:[]},prdPriority:u.prdPriority||[],roadmapScanner:{enabled:((c=u.roadmapScanner)==null?void 0:c.enabled)??!0,roadmapPath:((d=u.roadmapScanner)==null?void 0:d.roadmapPath)??"ROADMAP.md",autoScanInterval:((r=u.roadmapScanner)==null?void 0:r.autoScanInterval)??300,slicerSchedule:((m=u.roadmapScanner)==null?void 0:m.slicerSchedule)??"35 */12 * * *",slicerMaxRuntime:((x=u.roadmapScanner)==null?void 0:x.slicerMaxRuntime)??600,priorityMode:((f=u.roadmapScanner)==null?void 0:f.priorityMode)??"roadmap-first",issueColumn:((v=u.roadmapScanner)==null?void 0:v.issueColumn)??"Draft"},templatesDir:u.templatesDir||".night-watch/templates",boardProvider:u.boardProvider||{enabled:!0,provider:"github"},jobProviders:u.jobProviders||{},autoMerge:u.autoMerge??!1,autoMergeMethod:u.autoMergeMethod??"squash",fallbackOnRateLimit:u.fallbackOnRateLimit??!0,primaryFallbackModel:u.primaryFallbackModel??u.claudeModel??"sonnet",secondaryFallbackModel:u.secondaryFallbackModel??u.primaryFallbackModel??u.claudeModel??"sonnet",primaryFallbackPreset:u.primaryFallbackPreset??"",secondaryFallbackPreset:u.secondaryFallbackPreset??"",claudeModel:u.primaryFallbackModel??u.claudeModel??"sonnet",qa:u.qa||{enabled:!0,schedule:"45 2,14 * * *",maxRuntime:3600,branchPatterns:[],artifacts:"both",skipLabel:"skip-qa",autoInstallPlaywright:!0},audit:u.audit||{enabled:!0,schedule:"50 3 * * 1",maxRuntime:1800},queue:u.queue||{enabled:!0,maxConcurrency:1,maxWaitTime:7200,priority:{executor:50,reviewer:40,slicer:30,qa:20,audit:10}}}},ph=u=>{const c=xs(u.scheduleBundleId,u.cronSchedule,u.reviewerSchedule,u.qa.schedule,u.audit.schedule,u.roadmapScanner.slicerSchedule??"35 */12 * * *");return c?{mode:"template",selectedTemplateId:c.id}:{mode:"custom",selectedTemplateId:""}},Uy=({notifications:u,onChange:c})=>{const[d,r]=be.useState(null),[m,x]=be.useState(!1),[f,v]=be.useState({type:"slack",url:"",events:[]}),b=[{label:"Run Started",value:"run_started"},{label:"Run Succeeded",value:"run_succeeded"},{label:"Run Failed",value:"run_failed"},{label:"Run Timeout",value:"run_timeout"},{label:"Review Completed",value:"review_completed"},{label:"PR Auto-Merged",value:"pr_auto_merged"},{label:"Rate Limit Fallback",value:"rate_limit_fallback"},{label:"QA Completed",value:"qa_completed"}],p=()=>{c({webhooks:[...u.webhooks,f]}),v({type:"slack",url:"",events:[]}),x(!1)},g=(U,_)=>{const Y=[...u.webhooks];Y[U]=_,c({webhooks:Y})},y=U=>{c({webhooks:u.webhooks.filter((_,Y)=>Y!==U)})},D=(U,_)=>U.includes(_)?U.filter(Y=>Y!==_):[...U,_],z=({webhook:U,onChange:_,onSave:Y,onCancel:Q,isNew:B})=>s.jsxs("div",{className:"p-4 rounded-md border border-slate-700 bg-slate-900/50 space-y-4",children:[s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[s.jsx(Ct,{label:"Type",value:U.type,onChange:S=>{const le=S;_(le==="telegram"?{type:le,botToken:"",chatId:"",events:U.events}:{type:le,url:"",events:U.events})},options:[{label:"Slack",value:"slack"},{label:"Discord",value:"discord"},{label:"Telegram",value:"telegram"}]}),U.type==="telegram"?s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"relative",children:s.jsx(Ce,{label:"Bot Token",type:"password",value:U.botToken||"",onChange:S=>_({...U,botToken:S.target.value}),placeholder:"123456789:ABCdefGHIjklMNOpqrsTUVwxyz"})}),s.jsx(Ce,{label:"Chat ID",value:U.chatId||"",onChange:S=>_({...U,chatId:S.target.value}),placeholder:"123456789"})]}):s.jsx("div",{className:"md:col-span-2",children:s.jsx(Ce,{label:"Webhook URL",type:"password",value:U.url||"",onChange:S=>_({...U,url:S.target.value}),placeholder:"https://hooks.slack.com/services/..."})})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-slate-400 mb-2",children:"Events"}),s.jsx("div",{className:"flex flex-wrap gap-2",children:b.map(S=>s.jsx("button",{type:"button",onClick:()=>_({...U,events:D(U.events,S.value)}),className:`px-3 py-1.5 rounded-md text-sm transition-colors ${U.events.includes(S.value)?"bg-indigo-600 text-white":"bg-slate-800 text-slate-400 hover:bg-slate-700"}`,children:S.label},S.value))})]}),s.jsxs("div",{className:"flex justify-end gap-2",children:[s.jsx(Be,{variant:"ghost",onClick:Q,children:"Cancel"}),s.jsx(Be,{onClick:Y,disabled:U.events.length===0||(U.type==="telegram"?!U.botToken||!U.chatId:!U.url),children:B?"Add Webhook":"Save Changes"})]})]});return s.jsxs("div",{className:"space-y-4",children:[s.jsx("div",{className:"text-sm text-slate-400 mb-4",children:"Receive notifications when events occur via Slack, Discord, or Telegram"}),s.jsx("div",{className:"space-y-3",children:u.webhooks.length===0?s.jsx("p",{className:"text-slate-500 text-sm italic",children:"No webhooks configured."}):u.webhooks.map((U,_)=>s.jsx("div",{children:d===_?s.jsx(z,{webhook:U,onChange:Y=>g(_,Y),onSave:()=>r(null),onCancel:()=>r(null)}):s.jsxs("div",{className:"flex items-center justify-between p-4 rounded-md border border-slate-800 bg-slate-950/40",children:[s.jsxs("div",{className:"flex-1",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[s.jsx("span",{className:"text-sm font-medium text-slate-200 capitalize",children:U.type}),U.type==="telegram"&&s.jsxs("span",{className:"text-xs text-slate-500",children:["Chat ID: ",U.chatId]})]}),s.jsx("div",{className:"flex flex-wrap gap-1",children:U.events.map(Y=>s.jsx("span",{className:"px-2 py-0.5 bg-slate-800 rounded text-xs text-slate-400",children:Y.replace("_"," ")},Y))})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("button",{type:"button",onClick:()=>r(_),className:"p-2 text-slate-400 hover:text-slate-200","aria-label":`Edit ${U.type} webhook`,title:`Edit ${U.type} webhook`,children:s.jsx(Hc,{className:"h-4 w-4"})}),s.jsx("button",{type:"button",onClick:()=>y(_),className:"p-2 text-red-400 hover:text-red-300","aria-label":`Delete ${U.type} webhook`,title:`Delete ${U.type} webhook`,children:s.jsx(Lc,{className:"h-4 w-4"})})]})]})},_))}),m?s.jsx(z,{webhook:f,onChange:v,onSave:p,onCancel:()=>x(!1),isNew:!0}):s.jsxs(Be,{variant:"ghost",onClick:()=>x(!0),children:[s.jsx(pn,{className:"h-4 w-4 mr-2"}),"Add Webhook"]})]})},yc=({label:u,value:c,onChange:d,placeholder:r,helpText:m})=>{const[x,f]=be.useState(""),v=()=>{x.trim()&&!c.includes(x.trim())&&(d([...c,x.trim()]),f(""))},b=g=>{d(c.filter(y=>y!==g))},p=g=>{g.key==="Enter"&&(g.preventDefault(),v())};return s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-slate-400 mb-2",children:u}),s.jsx("div",{className:"flex flex-wrap gap-2 mb-2",children:c.map(g=>s.jsxs("span",{className:"inline-flex items-center gap-1 px-2 py-1 bg-slate-800 rounded text-sm text-slate-300",children:[g,s.jsx("button",{type:"button",onClick:()=>b(g),className:"text-slate-500 hover:text-red-400","aria-label":`Remove ${g}`,title:`Remove ${g}`,children:s.jsx(vn,{className:"h-3 w-3"})})]},g))}),s.jsxs("div",{className:"flex gap-2",children:[s.jsx("input",{type:"text",value:x,onChange:g=>f(g.target.value),onKeyDown:p,placeholder:r,className:"flex-1 bg-slate-800 border border-slate-700 rounded px-3 py-2 text-sm text-slate-200 placeholder-slate-500"}),s.jsx(Be,{onClick:v,disabled:!x.trim(),"aria-label":`Add ${u.toLowerCase()} value`,children:s.jsx(pn,{className:"h-4 w-4"})})]}),m&&s.jsx("p",{className:"text-xs text-slate-500 mt-1",children:m})]})},qy=()=>{const{addToast:u,projectName:c,selectedProjectId:d,globalModeLoading:r}=pt(),[m,x]=be.useState(!1),[f,v]=be.useState(null),b=be.useRef(!1),[p,g]=be.useState("template"),[y,D]=be.useState("always-on"),[z,U]=be.useState(!1),[_,Y]=be.useState(null),[Q,B]=be.useState(null),[S,le]=be.useState(null),{data:Z,loading:$,error:P,refetch:ie}=el($h,[d],{enabled:!r}),{data:ue,loading:X,refetch:pe}=el(qb,[d],{enabled:!r}),ye=ue??[],we=be.useCallback(T=>{const W=ph(T);g(W.mode),D(W.selectedTemplateId)},[]);be.useEffect(()=>{if(Z)if(b.current)b.current=!1;else{const T=bc(Z);v(T),we(T)}},[Z,we]);const F=(T,W)=>{v(de=>de&&{...de,[T]:W})},ct=()=>{if(g("template"),!f)return;const T=ph(f);T.mode==="template"&&(D(T.selectedTemplateId),F("scheduleBundleId",T.selectedTemplateId))},q=()=>{g("custom"),F("scheduleBundleId",null),D("")},K=T=>{D(T.id),v(W=>W&&{...W,cronSchedule:T.schedules.executor,reviewerSchedule:T.schedules.reviewer,scheduleBundleId:T.id,qa:{...W.qa,schedule:T.schedules.qa},audit:{...W.audit,schedule:T.schedules.audit},roadmapScanner:{...W.roadmapScanner,slicerSchedule:T.schedules.slicer},fallbackOnRateLimit:!0})},ae=async()=>{var de,Te,tt;if(!f)return;const T=f.cronSchedule!==(Z==null?void 0:Z.cronSchedule)||f.reviewerSchedule!==(Z==null?void 0:Z.reviewerSchedule)||f.cronScheduleOffset!==((Z==null?void 0:Z.cronScheduleOffset)??0)||f.schedulingPriority!==((Z==null?void 0:Z.schedulingPriority)??3)||f.executorEnabled!==((Z==null?void 0:Z.executorEnabled)??!0)||f.reviewerEnabled!==((Z==null?void 0:Z.reviewerEnabled)??!0)||f.queue.enabled!==(((de=Z==null?void 0:Z.queue)==null?void 0:de.enabled)??!0)||f.qa.enabled!==((Z==null?void 0:Z.qa.enabled)??!0)||f.qa.schedule!==(Z==null?void 0:Z.qa.schedule)||f.audit.enabled!==((Z==null?void 0:Z.audit.enabled)??!0)||f.audit.schedule!==(Z==null?void 0:Z.audit.schedule)||f.roadmapScanner.enabled!==(((Te=Z==null?void 0:Z.roadmapScanner)==null?void 0:Te.enabled)??!0)||(f.roadmapScanner.slicerSchedule||"35 */12 * * *")!==(((tt=Z==null?void 0:Z.roadmapScanner)==null?void 0:tt.slicerSchedule)||"35 */12 * * *"),W={};for(const[vt,Lt]of Object.entries(f.jobProviders))Lt!=null&&Lt!==""&&(W[vt]=Lt);x(!0);try{const vt=await aa({provider:f.provider,providerLabel:f.providerLabel.trim(),providerPresets:Object.keys(f.providerPresets).length>0?f.providerPresets:void 0,defaultBranch:f.defaultBranch,prdDir:f.prdDir,branchPrefix:f.branchPrefix,branchPatterns:f.branchPatterns,executorEnabled:f.executorEnabled,reviewerEnabled:f.reviewerEnabled,minReviewScore:f.minReviewScore,maxRuntime:f.maxRuntime,reviewerMaxRuntime:f.reviewerMaxRuntime,maxLogSize:f.maxLogSize,cronSchedule:f.cronSchedule,reviewerSchedule:f.reviewerSchedule,scheduleBundleId:p==="template"?f.scheduleBundleId:null,cronScheduleOffset:f.cronScheduleOffset,schedulingPriority:f.schedulingPriority,maxRetries:f.maxRetries,reviewerMaxRetries:f.reviewerMaxRetries,reviewerRetryDelay:f.reviewerRetryDelay,providerEnv:f.providerEnv,notifications:f.notifications,prdPriority:f.prdPriority,roadmapScanner:f.roadmapScanner,templatesDir:f.templatesDir,boardProvider:f.boardProvider,jobProviders:W,autoMerge:f.autoMerge,autoMergeMethod:f.autoMergeMethod,fallbackOnRateLimit:f.fallbackOnRateLimit,primaryFallbackModel:f.primaryFallbackModel,secondaryFallbackModel:f.secondaryFallbackModel,primaryFallbackPreset:f.primaryFallbackPreset||void 0,secondaryFallbackPreset:f.secondaryFallbackPreset||void 0,claudeModel:f.primaryFallbackModel,qa:f.qa,audit:f.audit,queue:f.queue}),Lt=bc(vt);v(Lt),we(Lt);let V="";if(T)try{await ps()}catch(se){V=se instanceof Error?se.message:"failed to reinstall cron schedules"}u(V?{title:"Settings Saved (Cron Reinstall Failed)",message:V,type:"warning"}:{title:"Settings Saved",message:T?"Configuration updated and cron schedules reinstalled.":"Configuration updated successfully.",type:"success"}),b.current=!0,ie(),pe()}catch(vt){u({title:"Save Failed",message:vt instanceof Error?vt.message:"Failed to save configuration",type:"error"})}finally{x(!1)}},Re=()=>{if(Z){const T=bc(Z);v(T),we(T),u({title:"Reset Complete",message:"Unsaved changes were discarded.",type:"info"})}},_e=async T=>{try{const W=await Wh(T);F("roadmapScanner",W.roadmapScanner);let de="";try{await ps()}catch(Te){de=Te instanceof Error?Te.message:"Failed to reinstall cron schedules"}u(de?{title:"Planner Saved (Cron Reinstall Failed)",message:de,type:"warning"}:{title:T?"Roadmap Scanner Enabled":"Roadmap Scanner Disabled",message:`Roadmap scanner has been ${T?"enabled":"disabled"}.`,type:"success"})}catch(W){u({title:"Toggle Failed",message:W instanceof Error?W.message:"Failed to toggle roadmap scanner",type:"error"})}},N=T=>({claude:{name:"Claude",command:"claude",promptFlag:"-p",autoApproveFlag:"--dangerously-skip-permissions"},"claude-sonnet-4-6":{name:"Claude Sonnet 4.6",command:"claude",promptFlag:"-p",autoApproveFlag:"--dangerously-skip-permissions",modelFlag:"--model",model:"claude-sonnet-4-6"},"claude-opus-4-6":{name:"Claude Opus 4.6",command:"claude",promptFlag:"-p",autoApproveFlag:"--dangerously-skip-permissions",modelFlag:"--model",model:"claude-opus-4-6"},codex:{name:"Codex",command:"codex",subcommand:"exec",autoApproveFlag:"--yolo",workdirFlag:"-C"},"glm-47":{name:"GLM-4.7",command:"claude",promptFlag:"-p",autoApproveFlag:"--dangerously-skip-permissions",modelFlag:"--model",model:"glm-4.7",envVars:{ANTHROPIC_BASE_URL:"https://api.z.ai/api/anthropic",API_TIMEOUT_MS:"3000000",ANTHROPIC_DEFAULT_OPUS_MODEL:"glm-4.7",ANTHROPIC_DEFAULT_SONNET_MODEL:"glm-4.7"}},"glm-5":{name:"GLM-5",command:"claude",promptFlag:"-p",autoApproveFlag:"--dangerously-skip-permissions",modelFlag:"--model",model:"glm-5",envVars:{ANTHROPIC_BASE_URL:"https://api.z.ai/api/anthropic",API_TIMEOUT_MS:"3000000",ANTHROPIC_DEFAULT_OPUS_MODEL:"glm-5",ANTHROPIC_DEFAULT_SONNET_MODEL:"glm-5"}}})[T]??null,L=()=>({...{claude:{name:"Claude",command:"claude",promptFlag:"-p",autoApproveFlag:"--dangerously-skip-permissions"},"claude-sonnet-4-6":{name:"Claude Sonnet 4.6",command:"claude",promptFlag:"-p",autoApproveFlag:"--dangerously-skip-permissions",modelFlag:"--model",model:"claude-sonnet-4-6"},"claude-opus-4-6":{name:"Claude Opus 4.6",command:"claude",promptFlag:"-p",autoApproveFlag:"--dangerously-skip-permissions",modelFlag:"--model",model:"claude-opus-4-6"},codex:{name:"Codex",command:"codex",subcommand:"exec",autoApproveFlag:"--yolo",workdirFlag:"-C"},"glm-47":{name:"GLM-4.7",command:"claude",promptFlag:"-p",autoApproveFlag:"--dangerously-skip-permissions",modelFlag:"--model",model:"glm-4.7",envVars:{ANTHROPIC_BASE_URL:"https://api.z.ai/api/anthropic",API_TIMEOUT_MS:"3000000",ANTHROPIC_DEFAULT_OPUS_MODEL:"glm-4.7",ANTHROPIC_DEFAULT_SONNET_MODEL:"glm-4.7"}},"glm-5":{name:"GLM-5",command:"claude",promptFlag:"-p",autoApproveFlag:"--dangerously-skip-permissions",modelFlag:"--model",model:"glm-5",envVars:{ANTHROPIC_BASE_URL:"https://api.z.ai/api/anthropic",API_TIMEOUT_MS:"3000000",ANTHROPIC_DEFAULT_OPUS_MODEL:"glm-5",ANTHROPIC_DEFAULT_SONNET_MODEL:"glm-5"}}},...f==null?void 0:f.providerPresets}),J=T=>{const W=L();return Object.entries(W).map(([de,Te])=>({label:Te.name,value:de}))},I=(T,W)=>{const de=[];W.provider===T&&de.push("Global Provider");const Te={executor:"Executor",reviewer:"Reviewer",qa:"QA",audit:"Audit",slicer:"Planner"};for(const[tt,vt]of Object.entries(W.jobProviders))vt===T&&de.push(Te[tt]??tt);return de},ce=T=>{const de=L()[T];de&&(Y(T),B(de),U(!0))},me=async(T,W)=>{if(!f)return;const de=!_,Te={...f.providerPresets,[T]:W};F("providerPresets",Te);try{await aa({providerPresets:{[T]:W}}),u({title:de?"Preset Added":"Preset Updated",message:de?`${W.name} has been added. You can now assign it to jobs.`:`${W.name} has been saved.`,type:"success"})}catch(tt){u({title:"Save Failed",message:tt instanceof Error?tt.message:"Failed to save preset",type:"error"}),F("providerPresets",f.providerPresets)}},Ne=T=>{var Te,tt;if(!f)return;if(Yi.includes(T)){u({title:"Cannot Delete",message:"Built-in presets cannot be deleted.",type:"error"});return}const W=I(T,f);if(W.length>0){le({presetId:T,presetName:((Te=L()[T])==null?void 0:Te.name)??T,references:W});return}const de={...f.providerPresets};delete de[T],F("providerPresets",de),u({title:"Preset Deleted",message:`${((tt=L()[T])==null?void 0:tt.name)??T} has been removed.`,type:"success"})},et=T=>{if(!f)return;const W={...f.providerPresets};delete W[T],F("providerPresets",W),u({title:"Preset Reset",message:`${T} has been reset to built-in defaults.`,type:"success"})},Ye=()=>{if(!S||!f)return;const{presetId:T}=S,W={...f.providerPresets};delete W[T],F("providerPresets",W);const de={...f.jobProviders};for(const Te of Object.keys(de))de[Te]===T&&delete de[Te];F("jobProviders",de),f.provider===T&&F("provider","claude"),le(null),u({title:"Preset Deleted",message:`${S.presetName} has been removed and all references cleared.`,type:"success"})};if($||!f)return s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx("div",{className:"text-slate-400",children:"Loading settings..."})});if(P)return s.jsxs("div",{className:"flex flex-col items-center justify-center h-full space-y-4",children:[s.jsx(Ml,{className:"h-12 w-12 text-red-400"}),s.jsx("div",{className:"text-slate-300",children:"Failed to load settings"}),s.jsx("div",{className:"text-sm text-slate-500",children:P.message}),s.jsx(Be,{onClick:()=>ie(),children:"Retry"})]});const tl=[{id:"general",label:"General",content:s.jsx(ze,{className:"p-6 space-y-6",children:s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200",children:"Project Configuration"}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6 mt-4",children:[s.jsx(Ce,{label:"Project Name",value:c,disabled:!0}),s.jsx(Ce,{label:"Default Branch",value:f.defaultBranch,onChange:T=>F("defaultBranch",T.target.value)}),s.jsx(Ce,{label:"PRD Directory",value:f.prdDir,onChange:T=>F("prdDir",T.target.value),helperText:"Directory containing PRD files (relative to project root)"}),s.jsx(Ce,{label:"Branch Prefix",value:f.branchPrefix,onChange:T=>F("branchPrefix",T.target.value)}),s.jsx("div",{className:"md:col-span-2",children:s.jsx(Jt,{label:"Enable PRD Executor",checked:f.executorEnabled,onChange:T=>F("executorEnabled",T)})}),s.jsx("div",{className:"md:col-span-2",children:s.jsx(Jt,{label:"Enable Automated Reviews",checked:f.reviewerEnabled,onChange:T=>F("reviewerEnabled",T)})}),s.jsx("div",{className:"md:col-span-2",children:s.jsx(Jt,{label:"Auto-merge approved PRs",checked:f.autoMerge,onChange:T=>F("autoMerge",T)})}),f.autoMerge&&s.jsx(Ct,{label:"Merge Method",value:f.autoMergeMethod,onChange:T=>F("autoMergeMethod",T),options:[{label:"Squash",value:"squash"},{label:"Merge",value:"merge"},{label:"Rebase",value:"rebase"}]})]}),s.jsx("div",{className:"pt-4 mt-4 border-t border-slate-800",children:s.jsx(yc,{label:"Branch Patterns",value:f.branchPatterns,onChange:T=>F("branchPatterns",T),placeholder:"e.g., feat/",helpText:"Branch patterns matched by reviewer and related automation jobs"})})]})})},{id:"providers",label:"Providers",content:s.jsxs("div",{className:"space-y-6",children:[s.jsxs(ze,{className:"p-6 space-y-6",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200",children:"Provider Presets"}),s.jsx("p",{className:"text-sm text-slate-400 mt-1",children:"Configure AI provider presets with custom commands, models, and environment variables"})]}),s.jsxs(Be,{onClick:()=>{Y(null),B(null),U(!0)},children:[s.jsx(pn,{className:"h-4 w-4 mr-2"}),"Add Provider"]})]}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:[Yi.map(T=>{const de=f.providerPresets[T]||N(T);return de?s.jsx(hh,{presetId:T,preset:de,isBuiltIn:!0,onEdit:()=>ce(T),onReset:()=>et(T)},T):null}),Object.entries(f.providerPresets).filter(([T])=>!Yi.includes(T)).map(([T,W])=>s.jsx(hh,{presetId:T,preset:W,isBuiltIn:!1,onEdit:()=>ce(T),onDelete:()=>Ne(T)},T))]})]}),s.jsxs(ze,{className:"p-6 space-y-6",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200",children:"Job Assignments"}),s.jsx("p",{className:"text-sm text-slate-400 mt-1",children:"Assign provider presets to specific job types. Jobs without an assignment use the global provider."})]}),s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"flex items-center justify-between p-4 rounded-md border border-indigo-500/30 bg-indigo-500/5 gap-4",children:[s.jsxs("div",{children:[s.jsx("span",{className:"text-sm font-medium text-slate-200",children:"Global Provider"}),s.jsx("p",{className:"text-xs text-slate-500 mt-1",children:"Default preset for all jobs without a specific assignment"})]}),s.jsx("div",{className:"w-64",children:s.jsx(Ct,{value:f.provider,onChange:T=>F("provider",T),options:J(f.providerPresets)})})]}),[{key:"executor",label:"Executor"},{key:"reviewer",label:"Reviewer"},{key:"qa",label:"QA"},{key:"audit",label:"Audit"},{key:"slicer",label:"Planner"}].map(({key:T,label:W})=>s.jsxs("div",{className:"flex items-center justify-between p-3 rounded-md border border-slate-800 bg-slate-950/40 gap-4",children:[s.jsx("span",{className:"text-sm font-medium text-slate-200 whitespace-nowrap",children:W}),s.jsx("div",{className:"w-64",children:s.jsx(Ct,{value:f.jobProviders[T]??"",onChange:de=>{const Te={...f.jobProviders};de===""?delete Te[T]:Te[T]=de,F("jobProviders",Te)},options:[{label:"Use Global (default)",value:""},...J(f.providerPresets)]})})]},T))]})]}),s.jsxs(ze,{className:"p-6 space-y-6",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200",children:"Rate Limit Fallback"}),s.jsx("p",{className:"text-sm text-slate-400 mt-1",children:"Preset to use when the active provider is rate-limited"})]}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsx(Ct,{label:"Primary Fallback Preset",value:f.primaryFallbackPreset,onChange:T=>F("primaryFallbackPreset",T),options:[{label:"— None —",value:""},...Object.entries(L()).map(([T,W])=>({label:W.name,value:T}))],helperText:"Preset to use as the primary rate-limit fallback"}),s.jsx(Ct,{label:"Secondary Fallback Preset",value:f.secondaryFallbackPreset,onChange:T=>F("secondaryFallbackPreset",T),options:[{label:"— None —",value:""},...Object.entries(L()).map(([T,W])=>({label:W.name,value:T}))],helperText:"Used only if the primary fallback preset is also rate-limited"})]})]}),s.jsxs(ze,{className:"p-6",children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200 mb-2",children:"Global Provider Environment Variables"}),s.jsx("p",{className:"text-sm text-slate-400 mb-4",children:"Environment variables passed to all provider CLIs. Preset-level env vars take precedence."}),s.jsx(a0,{envVars:f.providerEnv,onChange:T=>F("providerEnv",T)})]})]})},{id:"runtime",label:"Runtime",content:s.jsxs("div",{className:"space-y-6",children:[s.jsxs(ze,{className:"p-6 space-y-6",children:[s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-slate-400 mb-2",children:"Min Review Score (0-100)"}),s.jsxs("div",{className:"flex items-center space-x-4",children:[s.jsx("input",{type:"range",min:"0",max:"100",value:f.minReviewScore,onChange:T=>F("minReviewScore",Number(T.target.value)),className:"w-full h-2 bg-slate-800 rounded-lg appearance-none cursor-pointer accent-indigo-500"}),s.jsx("span",{className:"text-sm font-bold text-slate-200 w-10",children:f.minReviewScore})]}),s.jsx("p",{className:"text-xs text-slate-500 mt-1",children:'PRs below this score will be marked as "Needs Work".'})]}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsx(Ce,{label:"Max Runtime (Executor)",type:"number",value:String(f.maxRuntime),onChange:T=>F("maxRuntime",Number(T.target.value||0)),rightIcon:s.jsx("span",{className:"text-xs",children:"sec"})}),s.jsx(Ce,{label:"Max Runtime (Reviewer)",type:"number",value:String(f.reviewerMaxRuntime),onChange:T=>F("reviewerMaxRuntime",Number(T.target.value||0)),rightIcon:s.jsx("span",{className:"text-xs",children:"sec"})}),s.jsx(Ce,{label:"Max Log Size",type:"number",value:String(f.maxLogSize),onChange:T=>F("maxLogSize",Number(T.target.value||0)),rightIcon:s.jsx("span",{className:"text-xs",children:"bytes"})})]})]}),s.jsxs(ze,{className:"p-6 space-y-6",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200",children:"Retry Settings"}),s.jsx("p",{className:"text-sm text-slate-400 mt-1",children:"Configure automatic retry behavior for the PR reviewer when fixes do not fully resolve issues."})]}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsx(Ce,{label:"Max Retry Attempts",type:"number",min:"0",max:"10",value:String(f.reviewerMaxRetries),onChange:T=>{const W=Math.min(10,Math.max(0,Number(T.target.value||0)));F("reviewerMaxRetries",W)},helperText:"Additional fix attempts after initial review. 0 = no retries."}),s.jsx(Ce,{label:"Retry Delay (seconds)",type:"number",min:"0",max:"300",value:String(f.reviewerRetryDelay),onChange:T=>{const W=Math.min(300,Math.max(0,Number(T.target.value||0)));F("reviewerRetryDelay",W)},helperText:"Wait time between retry attempts to let CI settle."})]})]})]})},{id:"schedules",label:"Schedules",content:s.jsx(l0,{form:{cronSchedule:f.cronSchedule,reviewerSchedule:f.reviewerSchedule,qa:f.qa,audit:f.audit,roadmapScanner:{enabled:f.roadmapScanner.enabled,slicerSchedule:f.roadmapScanner.slicerSchedule||"35 */12 * * *"},scheduleBundleId:f.scheduleBundleId,schedulingPriority:f.schedulingPriority,cronScheduleOffset:f.cronScheduleOffset,globalQueueEnabled:f.queue.enabled},scheduleMode:p,selectedTemplateId:y,onFieldChange:(T,W)=>{T==="globalQueueEnabled"?F("queue",{...f.queue,enabled:W}):F(T,W)},onSwitchToTemplate:ct,onSwitchToCustom:q,onApplyTemplate:K})},{id:"notifications",label:"Notifications",content:s.jsxs(ze,{className:"p-6",children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200 mb-2",children:"Notification Webhooks"}),s.jsx(Uy,{notifications:f.notifications,onChange:T=>F("notifications",T)})]})},{id:"roadmap",label:"Planner",content:s.jsxs(ze,{className:"p-6 space-y-6",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200",children:"Planner"}),s.jsx("p",{className:"text-sm text-slate-400",children:"Generate one PRD per run using ROADMAP.md first, then audit findings when roadmap work is exhausted"})]}),s.jsx(Jt,{checked:f.roadmapScanner.enabled,"aria-label":"Enable planner",onChange:_e})]}),f.roadmapScanner.enabled&&s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6 pt-4 border-t border-slate-800",children:[s.jsx(Ce,{label:"Roadmap File Path",value:f.roadmapScanner.roadmapPath,onChange:T=>F("roadmapScanner",{...f.roadmapScanner,roadmapPath:T.target.value}),helperText:"Primary planning source (relative to project root)."}),s.jsx(dn,{label:"Planner Schedule",value:f.roadmapScanner.slicerSchedule||"35 */12 * * *",onChange:T=>F("roadmapScanner",{...f.roadmapScanner,slicerSchedule:T})})]}),s.jsxs("div",{className:"pt-4 border-t border-slate-800",children:[s.jsx("h4",{className:"text-md font-medium text-slate-200 mb-4",children:"Planner Execution"}),s.jsx("p",{className:"text-sm text-slate-400 mb-4",children:"Planner creates one PRD at a time and can auto-create a board issue for handoff."}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsx(Ce,{label:"Planner Max Runtime",type:"number",value:String(f.roadmapScanner.slicerMaxRuntime||""),onChange:T=>F("roadmapScanner",{...f.roadmapScanner,slicerMaxRuntime:Number(T.target.value||0)}),rightIcon:s.jsx("span",{className:"text-xs",children:"sec"}),helperText:"Maximum runtime for planner tasks"}),s.jsx(Ct,{label:"Planner Priority Mode",value:f.roadmapScanner.priorityMode||"roadmap-first",onChange:T=>F("roadmapScanner",{...f.roadmapScanner,priorityMode:T==="audit-first"?"audit-first":"roadmap-first"}),options:[{label:"Roadmap first (recommended)",value:"roadmap-first"},{label:"Audit first",value:"audit-first"}],helperText:"Choose whether planner consumes roadmap items or audit findings first."}),s.jsx(Ct,{label:"Planner Issue Column",value:f.roadmapScanner.issueColumn||"Draft",onChange:T=>F("roadmapScanner",{...f.roadmapScanner,issueColumn:T==="Ready"?"Ready":"Draft"}),options:[{label:"Draft (default)",value:"Draft"},{label:"Ready",value:"Ready"}],helperText:"Column where planner-created issues are added after PRD generation."})]})]})]})]})},{id:"board",label:"Board",content:s.jsxs(ze,{className:"p-6 space-y-6",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200",children:"Board Provider"}),s.jsx("p",{className:"text-sm text-slate-400",children:"Track PRDs and their status using GitHub Projects or local SQLite"})]}),s.jsx(Jt,{checked:f.boardProvider.enabled,onChange:T=>F("boardProvider",{...f.boardProvider,enabled:T})})]}),f.boardProvider.enabled&&s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6 pt-4 border-t border-slate-800",children:[s.jsx(Ct,{label:"Board Provider",value:f.boardProvider.provider,onChange:T=>F("boardProvider",{...f.boardProvider,provider:T}),options:[{label:"GitHub Projects",value:"github"},{label:"Local (SQLite)",value:"local"}]}),f.boardProvider.provider==="github"&&s.jsxs(s.Fragment,{children:[s.jsx(Ce,{label:"Project Number",type:"number",value:String(f.boardProvider.projectNumber||""),onChange:T=>F("boardProvider",{...f.boardProvider,projectNumber:T.target.value?Number(T.target.value):void 0}),helperText:"GitHub Projects V2 project number"}),s.jsx(Ce,{label:"Repository",value:f.boardProvider.repo||"",onChange:T=>F("boardProvider",{...f.boardProvider,repo:T.target.value||void 0}),helperText:"owner/repo (auto-detected if empty)"})]}),f.boardProvider.provider==="local"&&s.jsx("div",{className:"md:col-span-2",children:s.jsx("p",{className:"text-sm text-slate-400",children:"Local board uses SQLite for storage — no additional configuration needed."})})]})]})},{id:"qa",label:"QA",content:s.jsxs(ze,{className:"p-6 space-y-6",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200",children:"Quality Assurance"}),s.jsx("p",{className:"text-sm text-slate-400",children:"Automated UI testing using Playwright"})]}),s.jsx(Jt,{checked:f.qa.enabled,onChange:T=>F("qa",{...f.qa,enabled:T})})]}),f.qa.enabled&&s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6 pt-4 border-t border-slate-800",children:[s.jsx(Ce,{label:"Max Runtime",type:"number",value:String(f.qa.maxRuntime),onChange:T=>F("qa",{...f.qa,maxRuntime:Number(T.target.value||0)}),rightIcon:s.jsx("span",{className:"text-xs",children:"sec"}),helperText:"Maximum runtime for QA tasks (default: 3600 seconds)"}),s.jsx(Ct,{label:"Artifacts",value:f.qa.artifacts,onChange:T=>F("qa",{...f.qa,artifacts:T}),options:[{label:"Screenshots",value:"screenshot"},{label:"Videos",value:"video"},{label:"Both",value:"both"}],helperText:"What artifacts to capture for UI tests"}),s.jsx(Ce,{label:"Skip Label",value:f.qa.skipLabel,onChange:T=>F("qa",{...f.qa,skipLabel:T.target.value}),helperText:"GitHub label to skip QA (PRs with this label are excluded)"})]}),s.jsxs("div",{className:"pt-4 border-t border-slate-800 space-y-4",children:[s.jsx(yc,{label:"QA Branch Patterns",value:f.qa.branchPatterns,onChange:T=>F("qa",{...f.qa,branchPatterns:T}),placeholder:"e.g., qa/, test/",helpText:"Branch patterns to match for QA (defaults to top-level branchPatterns if empty)"}),s.jsxs("div",{className:"flex items-center justify-between p-3 rounded-md border border-slate-800 bg-slate-950/40",children:[s.jsxs("div",{children:[s.jsx("span",{className:"text-sm font-medium text-slate-200",children:"Auto-install Playwright"}),s.jsx("p",{className:"text-xs text-slate-500 mt-1",children:"Automatically install Playwright browsers if missing during QA run"})]}),s.jsx(Jt,{checked:f.qa.autoInstallPlaywright,onChange:T=>F("qa",{...f.qa,autoInstallPlaywright:T})})]})]})]})]})},{id:"audit",label:"Audit",content:s.jsxs(ze,{className:"p-6 space-y-6",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200",children:"Code Audit"}),s.jsx("p",{className:"text-sm text-slate-400",children:"Automated code quality and security audits"})]}),s.jsx(Jt,{checked:f.audit.enabled,onChange:T=>F("audit",{...f.audit,enabled:T})})]}),f.audit.enabled&&s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6 pt-4 border-t border-slate-800",children:s.jsx(Ce,{label:"Max Runtime",type:"number",value:String(f.audit.maxRuntime),onChange:T=>F("audit",{...f.audit,maxRuntime:Number(T.target.value||0)}),rightIcon:s.jsx("span",{className:"text-xs",children:"sec"}),helperText:"Maximum runtime for audit tasks (default: 1800 seconds)"})})]})},{id:"advanced",label:"Advanced",content:s.jsxs(ze,{className:"p-6 space-y-6",children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200",children:"Advanced Settings"}),s.jsx("p",{className:"text-sm text-slate-400",children:"Templates, retry policy, and PRD execution priority"}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsx(Ce,{label:"Templates Directory",value:f.templatesDir,onChange:T=>F("templatesDir",T.target.value),helperText:"Directory for custom template overrides"}),s.jsx(Ce,{label:"Max Retries",type:"number",min:"1",value:String(f.maxRetries),onChange:T=>{const W=Math.max(1,Number(T.target.value||1));F("maxRetries",W)},helperText:"Retry attempts for rate-limited API calls"})]}),s.jsx("div",{className:"pt-4 border-t border-slate-800 space-y-4",children:s.jsx(yc,{label:"PRD Priority",value:f.prdPriority,onChange:T=>F("prdPriority",T),placeholder:"e.g., feature-x",helpText:"PRDs matching these names are executed first"})})]})}];return s.jsxs("div",{className:"max-w-4xl mx-auto pb-10",children:[s.jsx("h2",{className:"text-2xl font-bold text-slate-100 mb-6",children:"Settings"}),s.jsx(e0,{tabs:tl}),s.jsxs("div",{className:"flex items-center justify-end space-x-4 pt-6 mt-6 border-t border-slate-800",children:[s.jsxs(Be,{variant:"ghost",className:"text-slate-400 hover:text-slate-300",onClick:Re,children:[s.jsx(Vh,{className:"h-4 w-4 mr-2"}),"Reset"]}),s.jsxs(Be,{onClick:ae,loading:m,children:[s.jsx(pb,{className:"h-4 w-4 mr-2"}),"Save Changes"]})]}),s.jsxs("div",{className:"mt-12",children:[s.jsxs("h3",{className:"text-lg font-bold text-slate-200 mb-4 flex items-center",children:[s.jsx(Lh,{className:"h-5 w-5 mr-2 text-indigo-500"}),"System Health"]}),s.jsx(ze,{className:"divide-y divide-slate-800",children:X?s.jsx("div",{className:"p-4 text-sm text-slate-500",children:"Loading health checks..."}):ye.map((T,W)=>{const de=T.status==="pass",Te=T.status==="warn",tt=de?"bg-green-500/10 text-green-400 border-green-500/20":Te?"bg-amber-500/10 text-amber-400 border-amber-500/20":"bg-red-500/10 text-red-400 border-red-500/20";return s.jsxs("div",{className:"p-4 flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("p",{className:"text-sm font-medium text-slate-200",children:T.name}),s.jsx("p",{className:"text-xs text-slate-500",children:T.detail})]}),s.jsx("span",{className:`inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium border ${tt}`,children:T.status.toUpperCase()})]},`${T.name}-${W}`)})})]}),s.jsx(Oy,{isOpen:z,onClose:()=>{U(!1),Y(null),B(null)},onSave:me,presetId:_,preset:Q,isBuiltIn:_?Yi.includes(_):!1,existingIds:Object.keys(L())}),S&&s.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4",children:[s.jsx("div",{className:"fixed inset-0 bg-black/70 backdrop-blur-sm",onClick:()=>le(null),"aria-hidden":"true"}),s.jsxs("div",{className:"relative w-full max-w-md transform rounded-xl bg-slate-900 border border-slate-800 shadow-2xl p-6",children:[s.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[s.jsx(Fi,{className:"h-6 w-6 text-amber-400"}),s.jsx("h3",{className:"text-lg font-semibold text-slate-100",children:"Cannot Delete Preset"})]}),s.jsxs("p",{className:"text-sm text-slate-300 mb-4",children:[s.jsx("strong",{children:S.presetName})," is currently assigned to the following jobs:"]}),s.jsx("ul",{className:"list-disc list-inside text-sm text-slate-400 mb-4",children:S.references.map(T=>s.jsx("li",{children:T},T))}),s.jsx("p",{className:"text-sm text-slate-400 mb-6",children:'Please remove these assignments before deleting the preset, or use "Force Delete" to remove the preset and clear all references.'}),s.jsxs("div",{className:"flex justify-end gap-3",children:[s.jsx(Be,{variant:"ghost",onClick:()=>le(null),children:"Cancel"}),s.jsx(Be,{variant:"secondary",onClick:Ye,className:"bg-red-600 hover:bg-red-700",children:"Force Delete"})]})]})]})]})},Hy=()=>(ny(),sy(),s.jsx(tg,{children:s.jsxs("div",{className:"flex h-screen bg-[#030712] text-slate-300 overflow-hidden relative",children:[s.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"}),s.jsx(ey,{}),s.jsxs("div",{className:"flex-1 flex flex-col min-w-0 z-10",children:[s.jsx(ty,{}),s.jsx("main",{className:"flex-1 overflow-auto p-6 scroll-smooth relative",children:s.jsx("div",{className:"max-w-7xl mx-auto w-full",children:s.jsxs(_v,{children:[s.jsx(Cl,{path:"/",element:s.jsx(hy,{})}),s.jsx(Cl,{path:"/prs",element:s.jsx(py,{})}),s.jsx(Cl,{path:"/board",element:s.jsx(oy,{})}),s.jsx(Cl,{path:"/scheduling",element:s.jsx(Ry,{})}),s.jsx(Cl,{path:"/logs",element:s.jsx(xy,{})}),s.jsx(Cl,{path:"/roadmap",element:s.jsx(vy,{})}),s.jsx(Cl,{path:"/settings",element:s.jsx(qy,{})}),s.jsx(Cl,{path:"*",element:s.jsx(Av,{to:"/",replace:!0})})]})})})]}),s.jsx(ay,{})]})})),n0=document.getElementById("root");if(!n0)throw new Error("Could not find root element to mount to");const Ly=zp.createRoot(n0);Ly.render(s.jsx(be.StrictMode,{children:s.jsx(Hy,{})}));