@jonit-dev/night-watch-cli 1.7.86 → 1.7.87

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,365 @@
1
+ (function(){const o=document.createElement("link").relList;if(o&&o.supports&&o.supports("modulepreload"))return;for(const h of document.querySelectorAll('link[rel="modulepreload"]'))c(h);new MutationObserver(h=>{for(const x of h)if(x.type==="childList")for(const f of x.addedNodes)f.tagName==="LINK"&&f.rel==="modulepreload"&&c(f)}).observe(document,{childList:!0,subtree:!0});function d(h){const x={};return h.integrity&&(x.integrity=h.integrity),h.referrerPolicy&&(x.referrerPolicy=h.referrerPolicy),h.crossOrigin==="use-credentials"?x.credentials="include":h.crossOrigin==="anonymous"?x.credentials="omit":x.credentials="same-origin",x}function c(h){if(h.ep)return;h.ep=!0;const x=d(h);fetch(h.href,x)}})();function uh(u){return u&&u.__esModule&&Object.prototype.hasOwnProperty.call(u,"default")?u.default:u}var nr={exports:{}},ss={};/**
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 Om;function hv(){if(Om)return ss;Om=1;var u=Symbol.for("react.transitional.element"),o=Symbol.for("react.fragment");function d(c,h,x){var f=null;if(x!==void 0&&(f=""+x),h.key!==void 0&&(f=""+h.key),"key"in h){x={};for(var p in h)p!=="key"&&(x[p]=h[p])}else x=h;return h=x.ref,{$$typeof:u,type:c,key:f,ref:h!==void 0?h:null,props:x}}return ss.Fragment=o,ss.jsx=d,ss.jsxs=d,ss}var Um;function xv(){return Um||(Um=1,nr.exports=hv()),nr.exports}var i=xv(),sr={exports:{}},oe={};/**
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 qm;function vv(){if(qm)return oe;qm=1;var u=Symbol.for("react.transitional.element"),o=Symbol.for("react.portal"),d=Symbol.for("react.fragment"),c=Symbol.for("react.strict_mode"),h=Symbol.for("react.profiler"),x=Symbol.for("react.consumer"),f=Symbol.for("react.context"),p=Symbol.for("react.forward_ref"),y=Symbol.for("react.suspense"),v=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),b=Symbol.for("react.activity"),M=Symbol.iterator;function _(E){return E===null||typeof E!="object"?null:(E=M&&E[M]||E["@@iterator"],typeof E=="function"?E:null)}var H={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},j=Object.assign,U={};function V(E,L,K){this.props=E,this.context=L,this.refs=U,this.updater=K||H}V.prototype.isReactComponent={},V.prototype.setState=function(E,L){if(typeof E!="object"&&typeof E!="function"&&E!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,E,L,"setState")},V.prototype.forceUpdate=function(E){this.updater.enqueueForceUpdate(this,E,"forceUpdate")};function G(){}G.prototype=V.prototype;function Y(E,L,K){this.props=E,this.context=L,this.refs=U,this.updater=K||H}var le=Y.prototype=new G;le.constructor=Y,j(le,V.prototype),le.isPureReactComponent=!0;var ue=Array.isArray;function Z(){}var I={H:null,A:null,T:null,S:null},P=Object.prototype.hasOwnProperty;function se(E,L,K){var J=K.ref;return{$$typeof:u,type:E,key:L,ref:J!==void 0?J:null,props:K}}function $(E,L){return se(E.type,L,E.props)}function je(E){return typeof E=="object"&&E!==null&&E.$$typeof===u}function ge(E){var L={"=":"=0",":":"=2"};return"$"+E.replace(/[=:]/g,function(K){return L[K]})}var qe=/\/+/g;function D(E,L){return typeof E=="object"&&E!==null&&E.key!=null?ge(""+E.key):L.toString(36)}function ae(E){switch(E.status){case"fulfilled":return E.value;case"rejected":throw E.reason;default:switch(typeof E.status=="string"?E.then(Z,Z):(E.status="pending",E.then(function(L){E.status==="pending"&&(E.status="fulfilled",E.value=L)},function(L){E.status==="pending"&&(E.status="rejected",E.reason=L)})),E.status){case"fulfilled":return E.value;case"rejected":throw E.reason}}throw E}function z(E,L,K,J,ce){var me=typeof E;(me==="undefined"||me==="boolean")&&(E=null);var Ne=!1;if(E===null)Ne=!0;else switch(me){case"bigint":case"string":case"number":Ne=!0;break;case"object":switch(E.$$typeof){case u:case o:Ne=!0;break;case g:return Ne=E._init,z(Ne(E._payload),L,K,J,ce)}}if(Ne)return ce=ce(E),Ne=J===""?"."+D(E,0):J,ue(ce)?(K="",Ne!=null&&(K=Ne.replace(qe,"$&/")+"/"),z(ce,L,K,"",function(wl){return wl})):ce!=null&&(je(ce)&&(ce=$(ce,K+(ce.key==null||E&&E.key===ce.key?"":(""+ce.key).replace(qe,"$&/")+"/")+Ne)),L.push(ce)),1;Ne=0;var tt=J===""?".":J+":";if(ue(E))for(var ke=0;ke<E.length;ke++)J=E[ke],me=tt+D(J,ke),Ne+=z(J,L,K,me,ce);else if(ke=_(E),typeof ke=="function")for(E=ke.call(E),ke=0;!(J=E.next()).done;)J=J.value,me=tt+D(J,ke++),Ne+=z(J,L,K,me,ce);else if(me==="object"){if(typeof E.then=="function")return z(ae(E),L,K,J,ce);throw L=String(E),Error("Objects are not valid as a React child (found: "+(L==="[object Object]"?"object with keys {"+Object.keys(E).join(", ")+"}":L)+"). If you meant to render a collection of children, use an array instead.")}return Ne}function Q(E,L,K){if(E==null)return E;var J=[],ce=0;return z(E,J,"","",function(me){return L.call(K,me,ce++)}),J}function ee(E){if(E._status===-1){var L=E._result;L=L(),L.then(function(K){(E._status===0||E._status===-1)&&(E._status=1,E._result=K)},function(K){(E._status===0||E._status===-1)&&(E._status=2,E._result=K)}),E._status===-1&&(E._status=0,E._result=L)}if(E._status===1)return E._result.default;throw E._result}var he=typeof reportError=="function"?reportError:function(E){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var L=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(L))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",E);return}console.error(E)},xe={map:Q,forEach:function(E,L,K){Q(E,function(){L.apply(this,arguments)},K)},count:function(E){var L=0;return Q(E,function(){L++}),L},toArray:function(E){return Q(E,function(L){return L})||[]},only:function(E){if(!je(E))throw Error("React.Children.only expected to receive a single React element child.");return E}};return oe.Activity=b,oe.Children=xe,oe.Component=V,oe.Fragment=d,oe.Profiler=h,oe.PureComponent=Y,oe.StrictMode=c,oe.Suspense=y,oe.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=I,oe.__COMPILER_RUNTIME={__proto__:null,c:function(E){return I.H.useMemoCache(E)}},oe.cache=function(E){return function(){return E.apply(null,arguments)}},oe.cacheSignal=function(){return null},oe.cloneElement=function(E,L,K){if(E==null)throw Error("The argument must be a React element, but you passed "+E+".");var J=j({},E.props),ce=E.key;if(L!=null)for(me in L.key!==void 0&&(ce=""+L.key),L)!P.call(L,me)||me==="key"||me==="__self"||me==="__source"||me==="ref"&&L.ref===void 0||(J[me]=L[me]);var me=arguments.length-2;if(me===1)J.children=K;else if(1<me){for(var Ne=Array(me),tt=0;tt<me;tt++)Ne[tt]=arguments[tt+2];J.children=Ne}return se(E.type,ce,J)},oe.createContext=function(E){return E={$$typeof:f,_currentValue:E,_currentValue2:E,_threadCount:0,Provider:null,Consumer:null},E.Provider=E,E.Consumer={$$typeof:x,_context:E},E},oe.createElement=function(E,L,K){var J,ce={},me=null;if(L!=null)for(J in L.key!==void 0&&(me=""+L.key),L)P.call(L,J)&&J!=="key"&&J!=="__self"&&J!=="__source"&&(ce[J]=L[J]);var Ne=arguments.length-2;if(Ne===1)ce.children=K;else if(1<Ne){for(var tt=Array(Ne),ke=0;ke<Ne;ke++)tt[ke]=arguments[ke+2];ce.children=tt}if(E&&E.defaultProps)for(J in Ne=E.defaultProps,Ne)ce[J]===void 0&&(ce[J]=Ne[J]);return se(E,me,ce)},oe.createRef=function(){return{current:null}},oe.forwardRef=function(E){return{$$typeof:p,render:E}},oe.isValidElement=je,oe.lazy=function(E){return{$$typeof:g,_payload:{_status:-1,_result:E},_init:ee}},oe.memo=function(E,L){return{$$typeof:v,type:E,compare:L===void 0?null:L}},oe.startTransition=function(E){var L=I.T,K={};I.T=K;try{var J=E(),ce=I.S;ce!==null&&ce(K,J),typeof J=="object"&&J!==null&&typeof J.then=="function"&&J.then(Z,he)}catch(me){he(me)}finally{L!==null&&K.types!==null&&(L.types=K.types),I.T=L}},oe.unstable_useCacheRefresh=function(){return I.H.useCacheRefresh()},oe.use=function(E){return I.H.use(E)},oe.useActionState=function(E,L,K){return I.H.useActionState(E,L,K)},oe.useCallback=function(E,L){return I.H.useCallback(E,L)},oe.useContext=function(E){return I.H.useContext(E)},oe.useDebugValue=function(){},oe.useDeferredValue=function(E,L){return I.H.useDeferredValue(E,L)},oe.useEffect=function(E,L){return I.H.useEffect(E,L)},oe.useEffectEvent=function(E){return I.H.useEffectEvent(E)},oe.useId=function(){return I.H.useId()},oe.useImperativeHandle=function(E,L,K){return I.H.useImperativeHandle(E,L,K)},oe.useInsertionEffect=function(E,L){return I.H.useInsertionEffect(E,L)},oe.useLayoutEffect=function(E,L){return I.H.useLayoutEffect(E,L)},oe.useMemo=function(E,L){return I.H.useMemo(E,L)},oe.useOptimistic=function(E,L){return I.H.useOptimistic(E,L)},oe.useReducer=function(E,L,K){return I.H.useReducer(E,L,K)},oe.useRef=function(E){return I.H.useRef(E)},oe.useState=function(E){return I.H.useState(E)},oe.useSyncExternalStore=function(E,L,K){return I.H.useSyncExternalStore(E,L,K)},oe.useTransition=function(){return I.H.useTransition()},oe.version="19.2.4",oe}var Hm;function Sr(){return Hm||(Hm=1,sr.exports=vv()),sr.exports}var w=Sr();const Ue=uh(w);var ir={exports:{}},is={},ur={exports:{}},cr={};/**
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 Bm;function pv(){return Bm||(Bm=1,(function(u){function o(z,Q){var ee=z.length;z.push(Q);e:for(;0<ee;){var he=ee-1>>>1,xe=z[he];if(0<h(xe,Q))z[he]=Q,z[ee]=xe,ee=he;else break e}}function d(z){return z.length===0?null:z[0]}function c(z){if(z.length===0)return null;var Q=z[0],ee=z.pop();if(ee!==Q){z[0]=ee;e:for(var he=0,xe=z.length,E=xe>>>1;he<E;){var L=2*(he+1)-1,K=z[L],J=L+1,ce=z[J];if(0>h(K,ee))J<xe&&0>h(ce,K)?(z[he]=ce,z[J]=ee,he=J):(z[he]=K,z[L]=ee,he=L);else if(J<xe&&0>h(ce,ee))z[he]=ce,z[J]=ee,he=J;else break e}}return Q}function h(z,Q){var ee=z.sortIndex-Q.sortIndex;return ee!==0?ee:z.id-Q.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,p=f.now();u.unstable_now=function(){return f.now()-p}}var y=[],v=[],g=1,b=null,M=3,_=!1,H=!1,j=!1,U=!1,V=typeof setTimeout=="function"?setTimeout:null,G=typeof clearTimeout=="function"?clearTimeout:null,Y=typeof setImmediate<"u"?setImmediate:null;function le(z){for(var Q=d(v);Q!==null;){if(Q.callback===null)c(v);else if(Q.startTime<=z)c(v),Q.sortIndex=Q.expirationTime,o(y,Q);else break;Q=d(v)}}function ue(z){if(j=!1,le(z),!H)if(d(y)!==null)H=!0,Z||(Z=!0,ge());else{var Q=d(v);Q!==null&&ae(ue,Q.startTime-z)}}var Z=!1,I=-1,P=5,se=-1;function $(){return U?!0:!(u.unstable_now()-se<P)}function je(){if(U=!1,Z){var z=u.unstable_now();se=z;var Q=!0;try{e:{H=!1,j&&(j=!1,G(I),I=-1),_=!0;var ee=M;try{t:{for(le(z),b=d(y);b!==null&&!(b.expirationTime>z&&$());){var he=b.callback;if(typeof he=="function"){b.callback=null,M=b.priorityLevel;var xe=he(b.expirationTime<=z);if(z=u.unstable_now(),typeof xe=="function"){b.callback=xe,le(z),Q=!0;break t}b===d(y)&&c(y),le(z)}else c(y);b=d(y)}if(b!==null)Q=!0;else{var E=d(v);E!==null&&ae(ue,E.startTime-z),Q=!1}}break e}finally{b=null,M=ee,_=!1}Q=void 0}}finally{Q?ge():Z=!1}}}var ge;if(typeof Y=="function")ge=function(){Y(je)};else if(typeof MessageChannel<"u"){var qe=new MessageChannel,D=qe.port2;qe.port1.onmessage=je,ge=function(){D.postMessage(null)}}else ge=function(){V(je,0)};function ae(z,Q){I=V(function(){z(u.unstable_now())},Q)}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(z){z.callback=null},u.unstable_forceFrameRate=function(z){0>z||125<z?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):P=0<z?Math.floor(1e3/z):5},u.unstable_getCurrentPriorityLevel=function(){return M},u.unstable_next=function(z){switch(M){case 1:case 2:case 3:var Q=3;break;default:Q=M}var ee=M;M=Q;try{return z()}finally{M=ee}},u.unstable_requestPaint=function(){U=!0},u.unstable_runWithPriority=function(z,Q){switch(z){case 1:case 2:case 3:case 4:case 5:break;default:z=3}var ee=M;M=z;try{return Q()}finally{M=ee}},u.unstable_scheduleCallback=function(z,Q,ee){var he=u.unstable_now();switch(typeof ee=="object"&&ee!==null?(ee=ee.delay,ee=typeof ee=="number"&&0<ee?he+ee:he):ee=he,z){case 1:var xe=-1;break;case 2:xe=250;break;case 5:xe=1073741823;break;case 4:xe=1e4;break;default:xe=5e3}return xe=ee+xe,z={id:g++,callback:Q,priorityLevel:z,startTime:ee,expirationTime:xe,sortIndex:-1},ee>he?(z.sortIndex=ee,o(v,z),d(y)===null&&z===d(v)&&(j?(G(I),I=-1):j=!0,ae(ue,ee-he))):(z.sortIndex=xe,o(y,z),H||_||(H=!0,Z||(Z=!0,ge()))),z},u.unstable_shouldYield=$,u.unstable_wrapCallback=function(z){var Q=M;return function(){var ee=M;M=Q;try{return z.apply(this,arguments)}finally{M=ee}}}})(cr)),cr}var Lm;function gv(){return Lm||(Lm=1,ur.exports=pv()),ur.exports}var rr={exports:{}},ot={};/**
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 yv(){if(km)return ot;km=1;var u=Sr();function o(y){var v="https://react.dev/errors/"+y;if(1<arguments.length){v+="?args[]="+encodeURIComponent(arguments[1]);for(var g=2;g<arguments.length;g++)v+="&args[]="+encodeURIComponent(arguments[g])}return"Minified React error #"+y+"; visit "+v+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function d(){}var c={d:{f:d,r:function(){throw Error(o(522))},D:d,C:d,L:d,m:d,X:d,S:d,M:d},p:0,findDOMNode:null},h=Symbol.for("react.portal");function x(y,v,g){var b=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:h,key:b==null?null:""+b,children:y,containerInfo:v,implementation:g}}var f=u.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function p(y,v){if(y==="font")return"";if(typeof v=="string")return v==="use-credentials"?v:""}return ot.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=c,ot.createPortal=function(y,v){var g=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!v||v.nodeType!==1&&v.nodeType!==9&&v.nodeType!==11)throw Error(o(299));return x(y,v,null,g)},ot.flushSync=function(y){var v=f.T,g=c.p;try{if(f.T=null,c.p=2,y)return y()}finally{f.T=v,c.p=g,c.d.f()}},ot.preconnect=function(y,v){typeof y=="string"&&(v?(v=v.crossOrigin,v=typeof v=="string"?v==="use-credentials"?v:"":void 0):v=null,c.d.C(y,v))},ot.prefetchDNS=function(y){typeof y=="string"&&c.d.D(y)},ot.preinit=function(y,v){if(typeof y=="string"&&v&&typeof v.as=="string"){var g=v.as,b=p(g,v.crossOrigin),M=typeof v.integrity=="string"?v.integrity:void 0,_=typeof v.fetchPriority=="string"?v.fetchPriority:void 0;g==="style"?c.d.S(y,typeof v.precedence=="string"?v.precedence:void 0,{crossOrigin:b,integrity:M,fetchPriority:_}):g==="script"&&c.d.X(y,{crossOrigin:b,integrity:M,fetchPriority:_,nonce:typeof v.nonce=="string"?v.nonce:void 0})}},ot.preinitModule=function(y,v){if(typeof y=="string")if(typeof v=="object"&&v!==null){if(v.as==null||v.as==="script"){var g=p(v.as,v.crossOrigin);c.d.M(y,{crossOrigin:g,integrity:typeof v.integrity=="string"?v.integrity:void 0,nonce:typeof v.nonce=="string"?v.nonce:void 0})}}else v==null&&c.d.M(y)},ot.preload=function(y,v){if(typeof y=="string"&&typeof v=="object"&&v!==null&&typeof v.as=="string"){var g=v.as,b=p(g,v.crossOrigin);c.d.L(y,g,{crossOrigin:b,integrity:typeof v.integrity=="string"?v.integrity:void 0,nonce:typeof v.nonce=="string"?v.nonce:void 0,type:typeof v.type=="string"?v.type:void 0,fetchPriority:typeof v.fetchPriority=="string"?v.fetchPriority:void 0,referrerPolicy:typeof v.referrerPolicy=="string"?v.referrerPolicy:void 0,imageSrcSet:typeof v.imageSrcSet=="string"?v.imageSrcSet:void 0,imageSizes:typeof v.imageSizes=="string"?v.imageSizes:void 0,media:typeof v.media=="string"?v.media:void 0})}},ot.preloadModule=function(y,v){if(typeof y=="string")if(v){var g=p(v.as,v.crossOrigin);c.d.m(y,{as:typeof v.as=="string"&&v.as!=="script"?v.as:void 0,crossOrigin:g,integrity:typeof v.integrity=="string"?v.integrity:void 0})}else c.d.m(y)},ot.requestFormReset=function(y){c.d.r(y)},ot.unstable_batchedUpdates=function(y,v){return y(v)},ot.useFormState=function(y,v,g){return f.H.useFormState(y,v,g)},ot.useFormStatus=function(){return f.H.useHostTransitionStatus()},ot.version="19.2.4",ot}var Ym;function bv(){if(Ym)return rr.exports;Ym=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(o){console.error(o)}}return u(),rr.exports=yv(),rr.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 Gm;function Sv(){if(Gm)return is;Gm=1;var u=gv(),o=Sr(),d=bv();function c(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 h(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 p(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 y(e){if(x(e)!==e)throw Error(c(188))}function v(e){var t=e.alternate;if(!t){if(t=x(e),t===null)throw Error(c(188));return t!==e?null:e}for(var l=e,a=t;;){var n=l.return;if(n===null)break;var s=n.alternate;if(s===null){if(a=n.return,a!==null){l=a;continue}break}if(n.child===s.child){for(s=n.child;s;){if(s===l)return y(n),e;if(s===a)return y(n),t;s=s.sibling}throw Error(c(188))}if(l.return!==a.return)l=n,a=s;else{for(var r=!1,m=n.child;m;){if(m===l){r=!0,l=n,a=s;break}if(m===a){r=!0,a=n,l=s;break}m=m.sibling}if(!r){for(m=s.child;m;){if(m===l){r=!0,l=s,a=n;break}if(m===a){r=!0,a=s,l=n;break}m=m.sibling}if(!r)throw Error(c(189))}}if(l.alternate!==a)throw Error(c(190))}if(l.tag!==3)throw Error(c(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 b=Object.assign,M=Symbol.for("react.element"),_=Symbol.for("react.transitional.element"),H=Symbol.for("react.portal"),j=Symbol.for("react.fragment"),U=Symbol.for("react.strict_mode"),V=Symbol.for("react.profiler"),G=Symbol.for("react.consumer"),Y=Symbol.for("react.context"),le=Symbol.for("react.forward_ref"),ue=Symbol.for("react.suspense"),Z=Symbol.for("react.suspense_list"),I=Symbol.for("react.memo"),P=Symbol.for("react.lazy"),se=Symbol.for("react.activity"),$=Symbol.for("react.memo_cache_sentinel"),je=Symbol.iterator;function ge(e){return e===null||typeof e!="object"?null:(e=je&&e[je]||e["@@iterator"],typeof e=="function"?e:null)}var qe=Symbol.for("react.client.reference");function D(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===qe?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case j:return"Fragment";case V:return"Profiler";case U:return"StrictMode";case ue:return"Suspense";case Z:return"SuspenseList";case se:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case H:return"Portal";case Y:return e.displayName||"Context";case G: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 I:return t=e.displayName||null,t!==null?t:D(e.type)||"Memo";case P:t=e._payload,e=e._init;try{return D(e(t))}catch{}}return null}var ae=Array.isArray,z=o.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Q=d.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ee={pending:!1,data:null,method:null,action:null},he=[],xe=-1;function E(e){return{current:e}}function L(e){0>xe||(e.current=he[xe],he[xe]=null,xe--)}function K(e,t){xe++,he[xe]=e.current,e.current=t}var J=E(null),ce=E(null),me=E(null),Ne=E(null);function tt(e,t){switch(K(me,t),K(ce,e),K(J,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?am(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=am(t),e=nm(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}L(J),K(J,e)}function ke(){L(J),L(ce),L(me)}function wl(e){e.memoizedState!==null&&K(Ne,e);var t=J.current,l=nm(t,e.type);t!==l&&(K(ce,e),K(J,l))}function Il(e){ce.current===e&&(L(J),L(ce)),Ne.current===e&&(L(Ne),ts._currentValue=ee)}var X,ie;function Ce(e){if(X===void 0)try{throw Error()}catch(l){var t=l.stack.trim().match(/\n( *(at )?)/);X=t&&t[1]||"",ie=-1<l.stack.indexOf(`
42
+ at`)?" (<anonymous>)":-1<l.stack.indexOf("@")?"@unknown:0:0":""}return`
43
+ `+X+e+ie}var ft=!1;function Ot(e,t){if(!e||ft)return"";ft=!0;var l=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var a={DetermineComponentFrameRoot:function(){try{if(t){var k=function(){throw Error()};if(Object.defineProperty(k.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(k,[])}catch(O){var A=O}Reflect.construct(e,[],k)}else{try{k.call()}catch(O){A=O}e.call(k.prototype)}}else{try{throw Error()}catch(O){A=O}(k=e())&&typeof k.catch=="function"&&k.catch(function(){})}}catch(O){if(O&&A&&typeof O.stack=="string")return[O.stack,A.stack]}return[null,null]}};a.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var n=Object.getOwnPropertyDescriptor(a.DetermineComponentFrameRoot,"name");n&&n.configurable&&Object.defineProperty(a.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var s=a.DetermineComponentFrameRoot(),r=s[0],m=s[1];if(r&&m){var S=r.split(`
44
+ `),T=m.split(`
45
+ `);for(n=a=0;a<S.length&&!S[a].includes("DetermineComponentFrameRoot");)a++;for(;n<T.length&&!T[n].includes("DetermineComponentFrameRoot");)n++;if(a===S.length||n===T.length)for(a=S.length-1,n=T.length-1;1<=a&&0<=n&&S[a]!==T[n];)n--;for(;1<=a&&0<=n;a--,n--)if(S[a]!==T[n]){if(a!==1||n!==1)do if(a--,n--,0>n||S[a]!==T[n]){var q=`
46
+ `+S[a].replace(" at new "," at ");return e.displayName&&q.includes("<anonymous>")&&(q=q.replace("<anonymous>",e.displayName)),q}while(1<=a&&0<=n);break}}}finally{ft=!1,Error.prepareStackTrace=l}return(l=e?e.displayName||e.name:"")?Ce(l):""}function Ft(e,t){switch(e.tag){case 26:case 27:case 5:return Ce(e.type);case 16:return Ce("Lazy");case 13:return e.child!==t&&t!==null?Ce("Suspense Fallback"):Ce("Suspense");case 19:return Ce("SuspenseList");case 0:case 15:return Ot(e.type,!1);case 11:return Ot(e.type.render,!1);case 1:return Ot(e.type,!0);case 31:return Ce("Activity");default:return""}}function ll(e){try{var t="",l=null;do t+=Ft(e,l),l=e,e=e.return;while(e);return t}catch(a){return`
47
+ Error generating stack: `+a.message+`
48
+ `+a.stack}}var bt=Object.prototype.hasOwnProperty,ba=u.unstable_scheduleCallback,Sa=u.unstable_cancelCallback,Zh=u.unstable_shouldYield,$h=u.unstable_requestPaint,St=u.unstable_now,Kh=u.unstable_getCurrentPriorityLevel,Dr=u.unstable_ImmediatePriority,Or=u.unstable_UserBlockingPriority,ps=u.unstable_NormalPriority,Jh=u.unstable_LowPriority,Ur=u.unstable_IdlePriority,Fh=u.log,Wh=u.unstable_setDisableYieldValue,mn=null,jt=null;function Rl(e){if(typeof Fh=="function"&&Wh(e),jt&&typeof jt.setStrictMode=="function")try{jt.setStrictMode(mn,e)}catch{}}var Nt=Math.clz32?Math.clz32:e0,Ph=Math.log,Ih=Math.LN2;function e0(e){return e>>>=0,e===0?32:31-(Ph(e)/Ih|0)|0}var gs=256,ys=262144,bs=4194304;function ea(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 Ss(e,t,l){var a=e.pendingLanes;if(a===0)return 0;var n=0,s=e.suspendedLanes,r=e.pingedLanes;e=e.warmLanes;var m=a&134217727;return m!==0?(a=m&~s,a!==0?n=ea(a):(r&=m,r!==0?n=ea(r):l||(l=m&~e,l!==0&&(n=ea(l))))):(m=a&~s,m!==0?n=ea(m):r!==0?n=ea(r):l||(l=a&~e,l!==0&&(n=ea(l)))),n===0?0:t!==0&&t!==n&&(t&s)===0&&(s=n&-n,l=t&-t,s>=l||s===32&&(l&4194048)!==0)?t:n}function hn(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function t0(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 qr(){var e=bs;return bs<<=1,(bs&62914560)===0&&(bs=4194304),e}function Zi(e){for(var t=[],l=0;31>l;l++)t.push(e);return t}function xn(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function l0(e,t,l,a,n,s){var r=e.pendingLanes;e.pendingLanes=l,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=l,e.entangledLanes&=l,e.errorRecoveryDisabledLanes&=l,e.shellSuspendCounter=0;var m=e.entanglements,S=e.expirationTimes,T=e.hiddenUpdates;for(l=r&~l;0<l;){var q=31-Nt(l),k=1<<q;m[q]=0,S[q]=-1;var A=T[q];if(A!==null)for(T[q]=null,q=0;q<A.length;q++){var O=A[q];O!==null&&(O.lane&=-536870913)}l&=~k}a!==0&&Hr(e,a,0),s!==0&&n===0&&e.tag!==0&&(e.suspendedLanes|=s&~(r&~t))}function Hr(e,t,l){e.pendingLanes|=t,e.suspendedLanes&=~t;var a=31-Nt(t);e.entangledLanes|=t,e.entanglements[a]=e.entanglements[a]|1073741824|l&261930}function Br(e,t){var l=e.entangledLanes|=t;for(e=e.entanglements;l;){var a=31-Nt(l),n=1<<a;n&t|e[a]&t&&(e[a]|=t),l&=~n}}function Lr(e,t){var l=t&-t;return l=(l&42)!==0?1:$i(l),(l&(e.suspendedLanes|t))!==0?0:l}function $i(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function Ki(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function kr(){var e=Q.p;return e!==0?e:(e=window.event,e===void 0?32:Cm(e.type))}function Yr(e,t){var l=Q.p;try{return Q.p=e,t()}finally{Q.p=l}}var Cl=Math.random().toString(36).slice(2),nt="__reactFiber$"+Cl,mt="__reactProps$"+Cl,ja="__reactContainer$"+Cl,Ji="__reactEvents$"+Cl,a0="__reactListeners$"+Cl,n0="__reactHandles$"+Cl,Gr="__reactResources$"+Cl,vn="__reactMarker$"+Cl;function Fi(e){delete e[nt],delete e[mt],delete e[Ji],delete e[a0],delete e[n0]}function Na(e){var t=e[nt];if(t)return t;for(var l=e.parentNode;l;){if(t=l[ja]||l[nt]){if(l=t.alternate,t.child!==null||l!==null&&l.child!==null)for(e=dm(e);e!==null;){if(l=e[nt])return l;e=dm(e)}return t}e=l,l=e.parentNode}return null}function Ea(e){if(e=e[nt]||e[ja]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function pn(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(c(33))}function wa(e){var t=e[Gr];return t||(t=e[Gr]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function lt(e){e[vn]=!0}var Qr=new Set,Xr={};function ta(e,t){Ra(e,t),Ra(e+"Capture",t)}function Ra(e,t){for(Xr[e]=t,e=0;e<t.length;e++)Qr.add(t[e])}var s0=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]*$"),Vr={},Zr={};function i0(e){return bt.call(Zr,e)?!0:bt.call(Vr,e)?!1:s0.test(e)?Zr[e]=!0:(Vr[e]=!0,!1)}function js(e,t,l){if(i0(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 Ns(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 al(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 Ut(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function $r(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function u0(e,t,l){var a=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof a<"u"&&typeof a.get=="function"&&typeof a.set=="function"){var n=a.get,s=a.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return n.call(this)},set:function(r){l=""+r,s.call(this,r)}}),Object.defineProperty(e,t,{enumerable:a.enumerable}),{getValue:function(){return l},setValue:function(r){l=""+r},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Wi(e){if(!e._valueTracker){var t=$r(e)?"checked":"value";e._valueTracker=u0(e,t,""+e[t])}}function Kr(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var l=t.getValue(),a="";return e&&(a=$r(e)?e.checked?"true":"false":e.value),e=a,e!==l?(t.setValue(e),!0):!1}function Es(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 c0=/[\n"\\]/g;function qt(e){return e.replace(c0,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Pi(e,t,l,a,n,s,r,m){e.name="",r!=null&&typeof r!="function"&&typeof r!="symbol"&&typeof r!="boolean"?e.type=r:e.removeAttribute("type"),t!=null?r==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+Ut(t)):e.value!==""+Ut(t)&&(e.value=""+Ut(t)):r!=="submit"&&r!=="reset"||e.removeAttribute("value"),t!=null?Ii(e,r,Ut(t)):l!=null?Ii(e,r,Ut(l)):a!=null&&e.removeAttribute("value"),n==null&&s!=null&&(e.defaultChecked=!!s),n!=null&&(e.checked=n&&typeof n!="function"&&typeof n!="symbol"),m!=null&&typeof m!="function"&&typeof m!="symbol"&&typeof m!="boolean"?e.name=""+Ut(m):e.removeAttribute("name")}function Jr(e,t,l,a,n,s,r,m){if(s!=null&&typeof s!="function"&&typeof s!="symbol"&&typeof s!="boolean"&&(e.type=s),t!=null||l!=null){if(!(s!=="submit"&&s!=="reset"||t!=null)){Wi(e);return}l=l!=null?""+Ut(l):"",t=t!=null?""+Ut(t):l,m||t===e.value||(e.value=t),e.defaultValue=t}a=a??n,a=typeof a!="function"&&typeof a!="symbol"&&!!a,e.checked=m?e.checked:!!a,e.defaultChecked=!!a,r!=null&&typeof r!="function"&&typeof r!="symbol"&&typeof r!="boolean"&&(e.name=r),Wi(e)}function Ii(e,t,l){t==="number"&&Es(e.ownerDocument)===e||e.defaultValue===""+l||(e.defaultValue=""+l)}function Ca(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=""+Ut(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 Fr(e,t,l){if(t!=null&&(t=""+Ut(t),t!==e.value&&(e.value=t),l==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=l!=null?""+Ut(l):""}function Wr(e,t,l,a){if(t==null){if(a!=null){if(l!=null)throw Error(c(92));if(ae(a)){if(1<a.length)throw Error(c(93));a=a[0]}l=a}l==null&&(l=""),t=l}l=Ut(t),e.defaultValue=l,a=e.textContent,a===l&&a!==""&&a!==null&&(e.value=a),Wi(e)}function Ta(e,t){if(t){var l=e.firstChild;if(l&&l===e.lastChild&&l.nodeType===3){l.nodeValue=t;return}}e.textContent=t}var r0=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 Pr(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||r0.has(t)?t==="float"?e.cssFloat=l:e[t]=(""+l).trim():e[t]=l+"px"}function Ir(e,t,l){if(t!=null&&typeof t!="object")throw Error(c(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&&Pr(e,n,a)}else for(var s in t)t.hasOwnProperty(s)&&Pr(e,s,t[s])}function eu(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 o0=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"]]),d0=/^[\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 ws(e){return d0.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function nl(){}var tu=null;function lu(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Ma=null,Aa=null;function eo(e){var t=Ea(e);if(t&&(e=t.stateNode)){var l=e[mt]||null;e:switch(e=t.stateNode,t.type){case"input":if(Pi(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="'+qt(""+t)+'"][type="radio"]'),t=0;t<l.length;t++){var a=l[t];if(a!==e&&a.form===e.form){var n=a[mt]||null;if(!n)throw Error(c(90));Pi(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&&Kr(a)}break e;case"textarea":Fr(e,l.value,l.defaultValue);break e;case"select":t=l.value,t!=null&&Ca(e,!!l.multiple,t,!1)}}}var au=!1;function to(e,t,l){if(au)return e(t,l);au=!0;try{var a=e(t);return a}finally{if(au=!1,(Ma!==null||Aa!==null)&&(fi(),Ma&&(t=Ma,e=Aa,Aa=Ma=null,eo(t),e)))for(t=0;t<e.length;t++)eo(e[t])}}function gn(e,t){var l=e.stateNode;if(l===null)return null;var a=l[mt]||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(c(231,t,typeof l));return l}var sl=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),nu=!1;if(sl)try{var yn={};Object.defineProperty(yn,"passive",{get:function(){nu=!0}}),window.addEventListener("test",yn,yn),window.removeEventListener("test",yn,yn)}catch{nu=!1}var Tl=null,su=null,Rs=null;function lo(){if(Rs)return Rs;var e,t=su,l=t.length,a,n="value"in Tl?Tl.value:Tl.textContent,s=n.length;for(e=0;e<l&&t[e]===n[e];e++);var r=l-e;for(a=1;a<=r&&t[l-a]===n[s-a];a++);return Rs=n.slice(e,1<a?1-a:void 0)}function Cs(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 Ts(){return!0}function ao(){return!1}function ht(e){function t(l,a,n,s,r){this._reactName=l,this._targetInst=n,this.type=a,this.nativeEvent=s,this.target=r,this.currentTarget=null;for(var m in e)e.hasOwnProperty(m)&&(l=e[m],this[m]=l?l(s):s[m]);return this.isDefaultPrevented=(s.defaultPrevented!=null?s.defaultPrevented:s.returnValue===!1)?Ts:ao,this.isPropagationStopped=ao,this}return b(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=Ts)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=Ts)},persist:function(){},isPersistent:Ts}),t}var la={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Ms=ht(la),bn=b({},la,{view:0,detail:0}),f0=ht(bn),iu,uu,Sn,As=b({},bn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:ru,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!==Sn&&(Sn&&e.type==="mousemove"?(iu=e.screenX-Sn.screenX,uu=e.screenY-Sn.screenY):uu=iu=0,Sn=e),iu)},movementY:function(e){return"movementY"in e?e.movementY:uu}}),no=ht(As),m0=b({},As,{dataTransfer:0}),h0=ht(m0),x0=b({},bn,{relatedTarget:0}),cu=ht(x0),v0=b({},la,{animationName:0,elapsedTime:0,pseudoElement:0}),p0=ht(v0),g0=b({},la,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),y0=ht(g0),b0=b({},la,{data:0}),so=ht(b0),S0={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},j0={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"},N0={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function E0(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=N0[e])?!!t[e]:!1}function ru(){return E0}var w0=b({},bn,{key:function(e){if(e.key){var t=S0[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Cs(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?j0[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:ru,charCode:function(e){return e.type==="keypress"?Cs(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Cs(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),R0=ht(w0),C0=b({},As,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),io=ht(C0),T0=b({},bn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:ru}),M0=ht(T0),A0=b({},la,{propertyName:0,elapsedTime:0,pseudoElement:0}),_0=ht(A0),z0=b({},As,{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}),D0=ht(z0),O0=b({},la,{newState:0,oldState:0}),U0=ht(O0),q0=[9,13,27,32],ou=sl&&"CompositionEvent"in window,jn=null;sl&&"documentMode"in document&&(jn=document.documentMode);var H0=sl&&"TextEvent"in window&&!jn,uo=sl&&(!ou||jn&&8<jn&&11>=jn),co=" ",ro=!1;function oo(e,t){switch(e){case"keyup":return q0.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function fo(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var _a=!1;function B0(e,t){switch(e){case"compositionend":return fo(t);case"keypress":return t.which!==32?null:(ro=!0,co);case"textInput":return e=t.data,e===co&&ro?null:e;default:return null}}function L0(e,t){if(_a)return e==="compositionend"||!ou&&oo(e,t)?(e=lo(),Rs=su=Tl=null,_a=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return uo&&t.locale!=="ko"?null:t.data;default:return null}}var k0={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 mo(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!k0[e.type]:t==="textarea"}function ho(e,t,l,a){Ma?Aa?Aa.push(a):Aa=[a]:Ma=a,t=yi(t,"onChange"),0<t.length&&(l=new Ms("onChange","change",null,l,a),e.push({event:l,listeners:t}))}var Nn=null,En=null;function Y0(e){Wf(e,0)}function _s(e){var t=pn(e);if(Kr(t))return e}function xo(e,t){if(e==="change")return t}var vo=!1;if(sl){var du;if(sl){var fu="oninput"in document;if(!fu){var po=document.createElement("div");po.setAttribute("oninput","return;"),fu=typeof po.oninput=="function"}du=fu}else du=!1;vo=du&&(!document.documentMode||9<document.documentMode)}function go(){Nn&&(Nn.detachEvent("onpropertychange",yo),En=Nn=null)}function yo(e){if(e.propertyName==="value"&&_s(En)){var t=[];ho(t,En,e,lu(e)),to(Y0,t)}}function G0(e,t,l){e==="focusin"?(go(),Nn=t,En=l,Nn.attachEvent("onpropertychange",yo)):e==="focusout"&&go()}function Q0(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return _s(En)}function X0(e,t){if(e==="click")return _s(t)}function V0(e,t){if(e==="input"||e==="change")return _s(t)}function Z0(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Et=typeof Object.is=="function"?Object.is:Z0;function wn(e,t){if(Et(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(!bt.call(t,n)||!Et(e[n],t[n]))return!1}return!0}function bo(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function So(e,t){var l=bo(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=bo(l)}}function jo(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?jo(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function No(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Es(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=Es(e.document)}return t}function mu(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 $0=sl&&"documentMode"in document&&11>=document.documentMode,za=null,hu=null,Rn=null,xu=!1;function Eo(e,t,l){var a=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;xu||za==null||za!==Es(a)||(a=za,"selectionStart"in a&&mu(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}),Rn&&wn(Rn,a)||(Rn=a,a=yi(hu,"onSelect"),0<a.length&&(t=new Ms("onSelect","select",null,t,l),e.push({event:t,listeners:a}),t.target=za)))}function aa(e,t){var l={};return l[e.toLowerCase()]=t.toLowerCase(),l["Webkit"+e]="webkit"+t,l["Moz"+e]="moz"+t,l}var Da={animationend:aa("Animation","AnimationEnd"),animationiteration:aa("Animation","AnimationIteration"),animationstart:aa("Animation","AnimationStart"),transitionrun:aa("Transition","TransitionRun"),transitionstart:aa("Transition","TransitionStart"),transitioncancel:aa("Transition","TransitionCancel"),transitionend:aa("Transition","TransitionEnd")},vu={},wo={};sl&&(wo=document.createElement("div").style,"AnimationEvent"in window||(delete Da.animationend.animation,delete Da.animationiteration.animation,delete Da.animationstart.animation),"TransitionEvent"in window||delete Da.transitionend.transition);function na(e){if(vu[e])return vu[e];if(!Da[e])return e;var t=Da[e],l;for(l in t)if(t.hasOwnProperty(l)&&l in wo)return vu[e]=t[l];return e}var Ro=na("animationend"),Co=na("animationiteration"),To=na("animationstart"),K0=na("transitionrun"),J0=na("transitionstart"),F0=na("transitioncancel"),Mo=na("transitionend"),Ao=new Map,pu="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(" ");pu.push("scrollEnd");function Zt(e,t){Ao.set(e,t),ta(t,[e])}var zs=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)},Ht=[],Oa=0,gu=0;function Ds(){for(var e=Oa,t=gu=Oa=0;t<e;){var l=Ht[t];Ht[t++]=null;var a=Ht[t];Ht[t++]=null;var n=Ht[t];Ht[t++]=null;var s=Ht[t];if(Ht[t++]=null,a!==null&&n!==null){var r=a.pending;r===null?n.next=n:(n.next=r.next,r.next=n),a.pending=n}s!==0&&_o(l,n,s)}}function Os(e,t,l,a){Ht[Oa++]=e,Ht[Oa++]=t,Ht[Oa++]=l,Ht[Oa++]=a,gu|=a,e.lanes|=a,e=e.alternate,e!==null&&(e.lanes|=a)}function yu(e,t,l,a){return Os(e,t,l,a),Us(e)}function sa(e,t){return Os(e,null,null,t),Us(e)}function _o(e,t,l){e.lanes|=l;var a=e.alternate;a!==null&&(a.lanes|=l);for(var n=!1,s=e.return;s!==null;)s.childLanes|=l,a=s.alternate,a!==null&&(a.childLanes|=l),s.tag===22&&(e=s.stateNode,e===null||e._visibility&1||(n=!0)),e=s,s=s.return;return e.tag===3?(s=e.stateNode,n&&t!==null&&(n=31-Nt(l),e=s.hiddenUpdates,a=e[n],a===null?e[n]=[t]:a.push(t),t.lane=l|536870912),s):null}function Us(e){if(50<Kn)throw Kn=0,Tc=null,Error(c(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Ua={};function W0(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 wt(e,t,l,a){return new W0(e,t,l,a)}function bu(e){return e=e.prototype,!(!e||!e.isReactComponent)}function il(e,t){var l=e.alternate;return l===null?(l=wt(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 zo(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 qs(e,t,l,a,n,s){var r=0;if(a=e,typeof e=="function")bu(e)&&(r=1);else if(typeof e=="string")r=lv(e,l,J.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case se:return e=wt(31,l,t,n),e.elementType=se,e.lanes=s,e;case j:return ia(l.children,n,s,t);case U:r=8,n|=24;break;case V:return e=wt(12,l,t,n|2),e.elementType=V,e.lanes=s,e;case ue:return e=wt(13,l,t,n),e.elementType=ue,e.lanes=s,e;case Z:return e=wt(19,l,t,n),e.elementType=Z,e.lanes=s,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Y:r=10;break e;case G:r=9;break e;case le:r=11;break e;case I:r=14;break e;case P:r=16,a=null;break e}r=29,l=Error(c(130,e===null?"null":typeof e,"")),a=null}return t=wt(r,l,t,n),t.elementType=e,t.type=a,t.lanes=s,t}function ia(e,t,l,a){return e=wt(7,e,a,t),e.lanes=l,e}function Su(e,t,l){return e=wt(6,e,null,t),e.lanes=l,e}function Do(e){var t=wt(18,null,null,0);return t.stateNode=e,t}function ju(e,t,l){return t=wt(4,e.children!==null?e.children:[],e.key,t),t.lanes=l,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Oo=new WeakMap;function Bt(e,t){if(typeof e=="object"&&e!==null){var l=Oo.get(e);return l!==void 0?l:(t={value:e,source:t,stack:ll(t)},Oo.set(e,t),t)}return{value:e,source:t,stack:ll(t)}}var qa=[],Ha=0,Hs=null,Cn=0,Lt=[],kt=0,Ml=null,Wt=1,Pt="";function ul(e,t){qa[Ha++]=Cn,qa[Ha++]=Hs,Hs=e,Cn=t}function Uo(e,t,l){Lt[kt++]=Wt,Lt[kt++]=Pt,Lt[kt++]=Ml,Ml=e;var a=Wt;e=Pt;var n=32-Nt(a)-1;a&=~(1<<n),l+=1;var s=32-Nt(t)+n;if(30<s){var r=n-n%5;s=(a&(1<<r)-1).toString(32),a>>=r,n-=r,Wt=1<<32-Nt(t)+n|l<<n|a,Pt=s+e}else Wt=1<<s|l<<n|a,Pt=e}function Nu(e){e.return!==null&&(ul(e,1),Uo(e,1,0))}function Eu(e){for(;e===Hs;)Hs=qa[--Ha],qa[Ha]=null,Cn=qa[--Ha],qa[Ha]=null;for(;e===Ml;)Ml=Lt[--kt],Lt[kt]=null,Pt=Lt[--kt],Lt[kt]=null,Wt=Lt[--kt],Lt[kt]=null}function qo(e,t){Lt[kt++]=Wt,Lt[kt++]=Pt,Lt[kt++]=Ml,Wt=t.id,Pt=t.overflow,Ml=e}var st=null,He=null,Se=!1,Al=null,Yt=!1,wu=Error(c(519));function _l(e){var t=Error(c(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Tn(Bt(t,e)),wu}function Ho(e){var t=e.stateNode,l=e.type,a=e.memoizedProps;switch(t[nt]=e,t[mt]=a,l){case"dialog":pe("cancel",t),pe("close",t);break;case"iframe":case"object":case"embed":pe("load",t);break;case"video":case"audio":for(l=0;l<Fn.length;l++)pe(Fn[l],t);break;case"source":pe("error",t);break;case"img":case"image":case"link":pe("error",t),pe("load",t);break;case"details":pe("toggle",t);break;case"input":pe("invalid",t),Jr(t,a.value,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name,!0);break;case"select":pe("invalid",t);break;case"textarea":pe("invalid",t),Wr(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||tm(t.textContent,l)?(a.popover!=null&&(pe("beforetoggle",t),pe("toggle",t)),a.onScroll!=null&&pe("scroll",t),a.onScrollEnd!=null&&pe("scrollend",t),a.onClick!=null&&(t.onclick=nl),t=!0):t=!1,t||_l(e,!0)}function Bo(e){for(st=e.return;st;)switch(st.tag){case 5:case 31:case 13:Yt=!1;return;case 27:case 3:Yt=!0;return;default:st=st.return}}function Ba(e){if(e!==st)return!1;if(!Se)return Bo(e),Se=!0,!1;var t=e.tag,l;if((l=t!==3&&t!==27)&&((l=t===5)&&(l=e.type,l=!(l!=="form"&&l!=="button")||Qc(e.type,e.memoizedProps)),l=!l),l&&He&&_l(e),Bo(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(c(317));He=om(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(c(317));He=om(e)}else t===27?(t=He,Vl(e.type)?(e=Kc,Kc=null,He=e):He=t):He=st?Qt(e.stateNode.nextSibling):null;return!0}function ua(){He=st=null,Se=!1}function Ru(){var e=Al;return e!==null&&(gt===null?gt=e:gt.push.apply(gt,e),Al=null),e}function Tn(e){Al===null?Al=[e]:Al.push(e)}var Cu=E(null),ca=null,cl=null;function zl(e,t,l){K(Cu,t._currentValue),t._currentValue=l}function rl(e){e._currentValue=Cu.current,L(Cu)}function Tu(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 Mu(e,t,l,a){var n=e.child;for(n!==null&&(n.return=e);n!==null;){var s=n.dependencies;if(s!==null){var r=n.child;s=s.firstContext;e:for(;s!==null;){var m=s;s=n;for(var S=0;S<t.length;S++)if(m.context===t[S]){s.lanes|=l,m=s.alternate,m!==null&&(m.lanes|=l),Tu(s.return,l,e),a||(r=null);break e}s=m.next}}else if(n.tag===18){if(r=n.return,r===null)throw Error(c(341));r.lanes|=l,s=r.alternate,s!==null&&(s.lanes|=l),Tu(r,l,e),r=null}else r=n.child;if(r!==null)r.return=n;else for(r=n;r!==null;){if(r===e){r=null;break}if(n=r.sibling,n!==null){n.return=r.return,r=n;break}r=r.return}n=r}}function La(e,t,l,a){e=null;for(var n=t,s=!1;n!==null;){if(!s){if((n.flags&524288)!==0)s=!0;else if((n.flags&262144)!==0)break}if(n.tag===10){var r=n.alternate;if(r===null)throw Error(c(387));if(r=r.memoizedProps,r!==null){var m=n.type;Et(n.pendingProps.value,r.value)||(e!==null?e.push(m):e=[m])}}else if(n===Ne.current){if(r=n.alternate,r===null)throw Error(c(387));r.memoizedState.memoizedState!==n.memoizedState.memoizedState&&(e!==null?e.push(ts):e=[ts])}n=n.return}e!==null&&Mu(t,e,l,a),t.flags|=262144}function Bs(e){for(e=e.firstContext;e!==null;){if(!Et(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function ra(e){ca=e,cl=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function it(e){return Lo(ca,e)}function Ls(e,t){return ca===null&&ra(e),Lo(e,t)}function Lo(e,t){var l=t._currentValue;if(t={context:t,memoizedValue:l,next:null},cl===null){if(e===null)throw Error(c(308));cl=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else cl=cl.next=t;return l}var P0=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()})}},I0=u.unstable_scheduleCallback,ex=u.unstable_NormalPriority,Ke={$$typeof:Y,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Au(){return{controller:new P0,data:new Map,refCount:0}}function Mn(e){e.refCount--,e.refCount===0&&I0(ex,function(){e.controller.abort()})}var An=null,_u=0,ka=0,Ya=null;function tx(e,t){if(An===null){var l=An=[];_u=0,ka=Oc(),Ya={status:"pending",value:void 0,then:function(a){l.push(a)}}}return _u++,t.then(ko,ko),t}function ko(){if(--_u===0&&An!==null){Ya!==null&&(Ya.status="fulfilled");var e=An;An=null,ka=0,Ya=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function lx(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 Yo=z.S;z.S=function(e,t){wf=St(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&tx(e,t),Yo!==null&&Yo(e,t)};var oa=E(null);function zu(){var e=oa.current;return e!==null?e:Oe.pooledCache}function ks(e,t){t===null?K(oa,oa.current):K(oa,t.pool)}function Go(){var e=zu();return e===null?null:{parent:Ke._currentValue,pool:e}}var Ga=Error(c(460)),Du=Error(c(474)),Ys=Error(c(542)),Gs={then:function(){}};function Qo(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Xo(e,t,l){switch(l=e[l],l===void 0?e.push(t):l!==t&&(t.then(nl,nl),t=l),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Zo(e),e;default:if(typeof t.status=="string")t.then(nl,nl);else{if(e=Oe,e!==null&&100<e.shellSuspendCounter)throw Error(c(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,Zo(e),e}throw fa=t,Ga}}function da(e){try{var t=e._init;return t(e._payload)}catch(l){throw l!==null&&typeof l=="object"&&typeof l.then=="function"?(fa=l,Ga):l}}var fa=null;function Vo(){if(fa===null)throw Error(c(459));var e=fa;return fa=null,e}function Zo(e){if(e===Ga||e===Ys)throw Error(c(483))}var Qa=null,_n=0;function Qs(e){var t=_n;return _n+=1,Qa===null&&(Qa=[]),Xo(Qa,e,t)}function zn(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Xs(e,t){throw t.$$typeof===M?Error(c(525)):(e=Object.prototype.toString.call(t),Error(c(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function $o(e){function t(R,N){if(e){var C=R.deletions;C===null?(R.deletions=[N],R.flags|=16):C.push(N)}}function l(R,N){if(!e)return null;for(;N!==null;)t(R,N),N=N.sibling;return null}function a(R){for(var N=new Map;R!==null;)R.key!==null?N.set(R.key,R):N.set(R.index,R),R=R.sibling;return N}function n(R,N){return R=il(R,N),R.index=0,R.sibling=null,R}function s(R,N,C){return R.index=C,e?(C=R.alternate,C!==null?(C=C.index,C<N?(R.flags|=67108866,N):C):(R.flags|=67108866,N)):(R.flags|=1048576,N)}function r(R){return e&&R.alternate===null&&(R.flags|=67108866),R}function m(R,N,C,B){return N===null||N.tag!==6?(N=Su(C,R.mode,B),N.return=R,N):(N=n(N,C),N.return=R,N)}function S(R,N,C,B){var te=C.type;return te===j?q(R,N,C.props.children,B,C.key):N!==null&&(N.elementType===te||typeof te=="object"&&te!==null&&te.$$typeof===P&&da(te)===N.type)?(N=n(N,C.props),zn(N,C),N.return=R,N):(N=qs(C.type,C.key,C.props,null,R.mode,B),zn(N,C),N.return=R,N)}function T(R,N,C,B){return N===null||N.tag!==4||N.stateNode.containerInfo!==C.containerInfo||N.stateNode.implementation!==C.implementation?(N=ju(C,R.mode,B),N.return=R,N):(N=n(N,C.children||[]),N.return=R,N)}function q(R,N,C,B,te){return N===null||N.tag!==7?(N=ia(C,R.mode,B,te),N.return=R,N):(N=n(N,C),N.return=R,N)}function k(R,N,C){if(typeof N=="string"&&N!==""||typeof N=="number"||typeof N=="bigint")return N=Su(""+N,R.mode,C),N.return=R,N;if(typeof N=="object"&&N!==null){switch(N.$$typeof){case _:return C=qs(N.type,N.key,N.props,null,R.mode,C),zn(C,N),C.return=R,C;case H:return N=ju(N,R.mode,C),N.return=R,N;case P:return N=da(N),k(R,N,C)}if(ae(N)||ge(N))return N=ia(N,R.mode,C,null),N.return=R,N;if(typeof N.then=="function")return k(R,Qs(N),C);if(N.$$typeof===Y)return k(R,Ls(R,N),C);Xs(R,N)}return null}function A(R,N,C,B){var te=N!==null?N.key:null;if(typeof C=="string"&&C!==""||typeof C=="number"||typeof C=="bigint")return te!==null?null:m(R,N,""+C,B);if(typeof C=="object"&&C!==null){switch(C.$$typeof){case _:return C.key===te?S(R,N,C,B):null;case H:return C.key===te?T(R,N,C,B):null;case P:return C=da(C),A(R,N,C,B)}if(ae(C)||ge(C))return te!==null?null:q(R,N,C,B,null);if(typeof C.then=="function")return A(R,N,Qs(C),B);if(C.$$typeof===Y)return A(R,N,Ls(R,C),B);Xs(R,C)}return null}function O(R,N,C,B,te){if(typeof B=="string"&&B!==""||typeof B=="number"||typeof B=="bigint")return R=R.get(C)||null,m(N,R,""+B,te);if(typeof B=="object"&&B!==null){switch(B.$$typeof){case _:return R=R.get(B.key===null?C:B.key)||null,S(N,R,B,te);case H:return R=R.get(B.key===null?C:B.key)||null,T(N,R,B,te);case P:return B=da(B),O(R,N,C,B,te)}if(ae(B)||ge(B))return R=R.get(C)||null,q(N,R,B,te,null);if(typeof B.then=="function")return O(R,N,C,Qs(B),te);if(B.$$typeof===Y)return O(R,N,C,Ls(N,B),te);Xs(N,B)}return null}function F(R,N,C,B){for(var te=null,Ee=null,W=N,fe=N=0,be=null;W!==null&&fe<C.length;fe++){W.index>fe?(be=W,W=null):be=W.sibling;var we=A(R,W,C[fe],B);if(we===null){W===null&&(W=be);break}e&&W&&we.alternate===null&&t(R,W),N=s(we,N,fe),Ee===null?te=we:Ee.sibling=we,Ee=we,W=be}if(fe===C.length)return l(R,W),Se&&ul(R,fe),te;if(W===null){for(;fe<C.length;fe++)W=k(R,C[fe],B),W!==null&&(N=s(W,N,fe),Ee===null?te=W:Ee.sibling=W,Ee=W);return Se&&ul(R,fe),te}for(W=a(W);fe<C.length;fe++)be=O(W,R,fe,C[fe],B),be!==null&&(e&&be.alternate!==null&&W.delete(be.key===null?fe:be.key),N=s(be,N,fe),Ee===null?te=be:Ee.sibling=be,Ee=be);return e&&W.forEach(function(Fl){return t(R,Fl)}),Se&&ul(R,fe),te}function ne(R,N,C,B){if(C==null)throw Error(c(151));for(var te=null,Ee=null,W=N,fe=N=0,be=null,we=C.next();W!==null&&!we.done;fe++,we=C.next()){W.index>fe?(be=W,W=null):be=W.sibling;var Fl=A(R,W,we.value,B);if(Fl===null){W===null&&(W=be);break}e&&W&&Fl.alternate===null&&t(R,W),N=s(Fl,N,fe),Ee===null?te=Fl:Ee.sibling=Fl,Ee=Fl,W=be}if(we.done)return l(R,W),Se&&ul(R,fe),te;if(W===null){for(;!we.done;fe++,we=C.next())we=k(R,we.value,B),we!==null&&(N=s(we,N,fe),Ee===null?te=we:Ee.sibling=we,Ee=we);return Se&&ul(R,fe),te}for(W=a(W);!we.done;fe++,we=C.next())we=O(W,R,fe,we.value,B),we!==null&&(e&&we.alternate!==null&&W.delete(we.key===null?fe:we.key),N=s(we,N,fe),Ee===null?te=we:Ee.sibling=we,Ee=we);return e&&W.forEach(function(mv){return t(R,mv)}),Se&&ul(R,fe),te}function De(R,N,C,B){if(typeof C=="object"&&C!==null&&C.type===j&&C.key===null&&(C=C.props.children),typeof C=="object"&&C!==null){switch(C.$$typeof){case _:e:{for(var te=C.key;N!==null;){if(N.key===te){if(te=C.type,te===j){if(N.tag===7){l(R,N.sibling),B=n(N,C.props.children),B.return=R,R=B;break e}}else if(N.elementType===te||typeof te=="object"&&te!==null&&te.$$typeof===P&&da(te)===N.type){l(R,N.sibling),B=n(N,C.props),zn(B,C),B.return=R,R=B;break e}l(R,N);break}else t(R,N);N=N.sibling}C.type===j?(B=ia(C.props.children,R.mode,B,C.key),B.return=R,R=B):(B=qs(C.type,C.key,C.props,null,R.mode,B),zn(B,C),B.return=R,R=B)}return r(R);case H:e:{for(te=C.key;N!==null;){if(N.key===te)if(N.tag===4&&N.stateNode.containerInfo===C.containerInfo&&N.stateNode.implementation===C.implementation){l(R,N.sibling),B=n(N,C.children||[]),B.return=R,R=B;break e}else{l(R,N);break}else t(R,N);N=N.sibling}B=ju(C,R.mode,B),B.return=R,R=B}return r(R);case P:return C=da(C),De(R,N,C,B)}if(ae(C))return F(R,N,C,B);if(ge(C)){if(te=ge(C),typeof te!="function")throw Error(c(150));return C=te.call(C),ne(R,N,C,B)}if(typeof C.then=="function")return De(R,N,Qs(C),B);if(C.$$typeof===Y)return De(R,N,Ls(R,C),B);Xs(R,C)}return typeof C=="string"&&C!==""||typeof C=="number"||typeof C=="bigint"?(C=""+C,N!==null&&N.tag===6?(l(R,N.sibling),B=n(N,C),B.return=R,R=B):(l(R,N),B=Su(C,R.mode,B),B.return=R,R=B),r(R)):l(R,N)}return function(R,N,C,B){try{_n=0;var te=De(R,N,C,B);return Qa=null,te}catch(W){if(W===Ga||W===Ys)throw W;var Ee=wt(29,W,null,R.mode);return Ee.lanes=B,Ee.return=R,Ee}finally{}}}var ma=$o(!0),Ko=$o(!1),Dl=!1;function Ou(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Uu(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 Ol(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Ul(e,t,l){var a=e.updateQueue;if(a===null)return null;if(a=a.shared,(Re&2)!==0){var n=a.pending;return n===null?t.next=t:(t.next=n.next,n.next=t),a.pending=t,t=Us(e),_o(e,null,l),t}return Os(e,a,t,l),Us(e)}function Dn(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,Br(e,l)}}function qu(e,t){var l=e.updateQueue,a=e.alternate;if(a!==null&&(a=a.updateQueue,l===a)){var n=null,s=null;if(l=l.firstBaseUpdate,l!==null){do{var r={lane:l.lane,tag:l.tag,payload:l.payload,callback:null,next:null};s===null?n=s=r:s=s.next=r,l=l.next}while(l!==null);s===null?n=s=t:s=s.next=t}else n=s=t;l={baseState:a.baseState,firstBaseUpdate:n,lastBaseUpdate:s,shared:a.shared,callbacks:a.callbacks},e.updateQueue=l;return}e=l.lastBaseUpdate,e===null?l.firstBaseUpdate=t:e.next=t,l.lastBaseUpdate=t}var Hu=!1;function On(){if(Hu){var e=Ya;if(e!==null)throw e}}function Un(e,t,l,a){Hu=!1;var n=e.updateQueue;Dl=!1;var s=n.firstBaseUpdate,r=n.lastBaseUpdate,m=n.shared.pending;if(m!==null){n.shared.pending=null;var S=m,T=S.next;S.next=null,r===null?s=T:r.next=T,r=S;var q=e.alternate;q!==null&&(q=q.updateQueue,m=q.lastBaseUpdate,m!==r&&(m===null?q.firstBaseUpdate=T:m.next=T,q.lastBaseUpdate=S))}if(s!==null){var k=n.baseState;r=0,q=T=S=null,m=s;do{var A=m.lane&-536870913,O=A!==m.lane;if(O?(ye&A)===A:(a&A)===A){A!==0&&A===ka&&(Hu=!0),q!==null&&(q=q.next={lane:0,tag:m.tag,payload:m.payload,callback:null,next:null});e:{var F=e,ne=m;A=t;var De=l;switch(ne.tag){case 1:if(F=ne.payload,typeof F=="function"){k=F.call(De,k,A);break e}k=F;break e;case 3:F.flags=F.flags&-65537|128;case 0:if(F=ne.payload,A=typeof F=="function"?F.call(De,k,A):F,A==null)break e;k=b({},k,A);break e;case 2:Dl=!0}}A=m.callback,A!==null&&(e.flags|=64,O&&(e.flags|=8192),O=n.callbacks,O===null?n.callbacks=[A]:O.push(A))}else O={lane:A,tag:m.tag,payload:m.payload,callback:m.callback,next:null},q===null?(T=q=O,S=k):q=q.next=O,r|=A;if(m=m.next,m===null){if(m=n.shared.pending,m===null)break;O=m,m=O.next,O.next=null,n.lastBaseUpdate=O,n.shared.pending=null}}while(!0);q===null&&(S=k),n.baseState=S,n.firstBaseUpdate=T,n.lastBaseUpdate=q,s===null&&(n.shared.lanes=0),kl|=r,e.lanes=r,e.memoizedState=k}}function Jo(e,t){if(typeof e!="function")throw Error(c(191,e));e.call(t)}function Fo(e,t){var l=e.callbacks;if(l!==null)for(e.callbacks=null,e=0;e<l.length;e++)Jo(l[e],t)}var Xa=E(null),Vs=E(0);function Wo(e,t){e=gl,K(Vs,e),K(Xa,t),gl=e|t.baseLanes}function Bu(){K(Vs,gl),K(Xa,Xa.current)}function Lu(){gl=Vs.current,L(Xa),L(Vs)}var Rt=E(null),Gt=null;function ql(e){var t=e.alternate;K(Ze,Ze.current&1),K(Rt,e),Gt===null&&(t===null||Xa.current!==null||t.memoizedState!==null)&&(Gt=e)}function ku(e){K(Ze,Ze.current),K(Rt,e),Gt===null&&(Gt=e)}function Po(e){e.tag===22?(K(Ze,Ze.current),K(Rt,e),Gt===null&&(Gt=e)):Hl()}function Hl(){K(Ze,Ze.current),K(Rt,Rt.current)}function Ct(e){L(Rt),Gt===e&&(Gt=null),L(Ze)}var Ze=E(0);function Zs(e){for(var t=e;t!==null;){if(t.tag===13){var l=t.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||Zc(l)||$c(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 ol=0,de=null,_e=null,Je=null,$s=!1,Va=!1,ha=!1,Ks=0,qn=0,Za=null,ax=0;function Xe(){throw Error(c(321))}function Yu(e,t){if(t===null)return!1;for(var l=0;l<t.length&&l<e.length;l++)if(!Et(e[l],t[l]))return!1;return!0}function Gu(e,t,l,a,n,s){return ol=s,de=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,z.H=e===null||e.memoizedState===null?Ud:ac,ha=!1,s=l(a,n),ha=!1,Va&&(s=ed(t,l,a,n)),Io(e),s}function Io(e){z.H=Ln;var t=_e!==null&&_e.next!==null;if(ol=0,Je=_e=de=null,$s=!1,qn=0,Za=null,t)throw Error(c(300));e===null||Fe||(e=e.dependencies,e!==null&&Bs(e)&&(Fe=!0))}function ed(e,t,l,a){de=e;var n=0;do{if(Va&&(Za=null),qn=0,Va=!1,25<=n)throw Error(c(301));if(n+=1,Je=_e=null,e.updateQueue!=null){var s=e.updateQueue;s.lastEffect=null,s.events=null,s.stores=null,s.memoCache!=null&&(s.memoCache.index=0)}z.H=qd,s=t(l,a)}while(Va);return s}function nx(){var e=z.H,t=e.useState()[0];return t=typeof t.then=="function"?Hn(t):t,e=e.useState()[0],(_e!==null?_e.memoizedState:null)!==e&&(de.flags|=1024),t}function Qu(){var e=Ks!==0;return Ks=0,e}function Xu(e,t,l){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~l}function Vu(e){if($s){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}$s=!1}ol=0,Je=_e=de=null,Va=!1,qn=Ks=0,Za=null}function dt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Je===null?de.memoizedState=Je=e:Je=Je.next=e,Je}function $e(){if(_e===null){var e=de.alternate;e=e!==null?e.memoizedState:null}else e=_e.next;var t=Je===null?de.memoizedState:Je.next;if(t!==null)Je=t,_e=e;else{if(e===null)throw de.alternate===null?Error(c(467)):Error(c(310));_e=e,e={memoizedState:_e.memoizedState,baseState:_e.baseState,baseQueue:_e.baseQueue,queue:_e.queue,next:null},Je===null?de.memoizedState=Je=e:Je=Je.next=e}return Je}function Js(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Hn(e){var t=qn;return qn+=1,Za===null&&(Za=[]),e=Xo(Za,e,t),t=de,(Je===null?t.memoizedState:Je.next)===null&&(t=t.alternate,z.H=t===null||t.memoizedState===null?Ud:ac),e}function Fs(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Hn(e);if(e.$$typeof===Y)return it(e)}throw Error(c(438,String(e)))}function Zu(e){var t=null,l=de.updateQueue;if(l!==null&&(t=l.memoCache),t==null){var a=de.alternate;a!==null&&(a=a.updateQueue,a!==null&&(a=a.memoCache,a!=null&&(t={data:a.data.map(function(n){return n.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),l===null&&(l=Js(),de.updateQueue=l),l.memoCache=t,l=t.data[t.index],l===void 0)for(l=t.data[t.index]=Array(e),a=0;a<e;a++)l[a]=$;return t.index++,l}function dl(e,t){return typeof t=="function"?t(e):t}function Ws(e){var t=$e();return $u(t,_e,e)}function $u(e,t,l){var a=e.queue;if(a===null)throw Error(c(311));a.lastRenderedReducer=l;var n=e.baseQueue,s=a.pending;if(s!==null){if(n!==null){var r=n.next;n.next=s.next,s.next=r}t.baseQueue=n=s,a.pending=null}if(s=e.baseState,n===null)e.memoizedState=s;else{t=n.next;var m=r=null,S=null,T=t,q=!1;do{var k=T.lane&-536870913;if(k!==T.lane?(ye&k)===k:(ol&k)===k){var A=T.revertLane;if(A===0)S!==null&&(S=S.next={lane:0,revertLane:0,gesture:null,action:T.action,hasEagerState:T.hasEagerState,eagerState:T.eagerState,next:null}),k===ka&&(q=!0);else if((ol&A)===A){T=T.next,A===ka&&(q=!0);continue}else k={lane:0,revertLane:T.revertLane,gesture:null,action:T.action,hasEagerState:T.hasEagerState,eagerState:T.eagerState,next:null},S===null?(m=S=k,r=s):S=S.next=k,de.lanes|=A,kl|=A;k=T.action,ha&&l(s,k),s=T.hasEagerState?T.eagerState:l(s,k)}else A={lane:k,revertLane:T.revertLane,gesture:T.gesture,action:T.action,hasEagerState:T.hasEagerState,eagerState:T.eagerState,next:null},S===null?(m=S=A,r=s):S=S.next=A,de.lanes|=k,kl|=k;T=T.next}while(T!==null&&T!==t);if(S===null?r=s:S.next=m,!Et(s,e.memoizedState)&&(Fe=!0,q&&(l=Ya,l!==null)))throw l;e.memoizedState=s,e.baseState=r,e.baseQueue=S,a.lastRenderedState=s}return n===null&&(a.lanes=0),[e.memoizedState,a.dispatch]}function Ku(e){var t=$e(),l=t.queue;if(l===null)throw Error(c(311));l.lastRenderedReducer=e;var a=l.dispatch,n=l.pending,s=t.memoizedState;if(n!==null){l.pending=null;var r=n=n.next;do s=e(s,r.action),r=r.next;while(r!==n);Et(s,t.memoizedState)||(Fe=!0),t.memoizedState=s,t.baseQueue===null&&(t.baseState=s),l.lastRenderedState=s}return[s,a]}function td(e,t,l){var a=de,n=$e(),s=Se;if(s){if(l===void 0)throw Error(c(407));l=l()}else l=t();var r=!Et((_e||n).memoizedState,l);if(r&&(n.memoizedState=l,Fe=!0),n=n.queue,Wu(nd.bind(null,a,n,e),[e]),n.getSnapshot!==t||r||Je!==null&&Je.memoizedState.tag&1){if(a.flags|=2048,$a(9,{destroy:void 0},ad.bind(null,a,n,l,t),null),Oe===null)throw Error(c(349));s||(ol&127)!==0||ld(a,t,l)}return l}function ld(e,t,l){e.flags|=16384,e={getSnapshot:t,value:l},t=de.updateQueue,t===null?(t=Js(),de.updateQueue=t,t.stores=[e]):(l=t.stores,l===null?t.stores=[e]:l.push(e))}function ad(e,t,l,a){t.value=l,t.getSnapshot=a,sd(t)&&id(e)}function nd(e,t,l){return l(function(){sd(t)&&id(e)})}function sd(e){var t=e.getSnapshot;e=e.value;try{var l=t();return!Et(e,l)}catch{return!0}}function id(e){var t=sa(e,2);t!==null&&yt(t,e,2)}function Ju(e){var t=dt();if(typeof e=="function"){var l=e;if(e=l(),ha){Rl(!0);try{l()}finally{Rl(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:dl,lastRenderedState:e},t}function ud(e,t,l,a){return e.baseState=l,$u(e,_e,typeof a=="function"?a:dl)}function sx(e,t,l,a,n){if(ei(e))throw Error(c(485));if(e=t.action,e!==null){var s={payload:n,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(r){s.listeners.push(r)}};z.T!==null?l(!0):s.isTransition=!1,a(s),l=t.pending,l===null?(s.next=t.pending=s,cd(t,s)):(s.next=l.next,t.pending=l.next=s)}}function cd(e,t){var l=t.action,a=t.payload,n=e.state;if(t.isTransition){var s=z.T,r={};z.T=r;try{var m=l(n,a),S=z.S;S!==null&&S(r,m),rd(e,t,m)}catch(T){Fu(e,t,T)}finally{s!==null&&r.types!==null&&(s.types=r.types),z.T=s}}else try{s=l(n,a),rd(e,t,s)}catch(T){Fu(e,t,T)}}function rd(e,t,l){l!==null&&typeof l=="object"&&typeof l.then=="function"?l.then(function(a){od(e,t,a)},function(a){return Fu(e,t,a)}):od(e,t,l)}function od(e,t,l){t.status="fulfilled",t.value=l,dd(t),e.state=l,t=e.pending,t!==null&&(l=t.next,l===t?e.pending=null:(l=l.next,t.next=l,cd(e,l)))}function Fu(e,t,l){var a=e.pending;if(e.pending=null,a!==null){a=a.next;do t.status="rejected",t.reason=l,dd(t),t=t.next;while(t!==a)}e.action=null}function dd(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function fd(e,t){return t}function md(e,t){if(Se){var l=Oe.formState;if(l!==null){e:{var a=de;if(Se){if(He){t:{for(var n=He,s=Yt;n.nodeType!==8;){if(!s){n=null;break t}if(n=Qt(n.nextSibling),n===null){n=null;break t}}s=n.data,n=s==="F!"||s==="F"?n:null}if(n){He=Qt(n.nextSibling),a=n.data==="F!";break e}}_l(a)}a=!1}a&&(t=l[0])}}return l=dt(),l.memoizedState=l.baseState=t,a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:fd,lastRenderedState:t},l.queue=a,l=zd.bind(null,de,a),a.dispatch=l,a=Ju(!1),s=lc.bind(null,de,!1,a.queue),a=dt(),n={state:t,dispatch:null,action:e,pending:null},a.queue=n,l=sx.bind(null,de,n,s,l),n.dispatch=l,a.memoizedState=e,[t,l,!1]}function hd(e){var t=$e();return xd(t,_e,e)}function xd(e,t,l){if(t=$u(e,t,fd)[0],e=Ws(dl)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var a=Hn(t)}catch(r){throw r===Ga?Ys:r}else a=t;t=$e();var n=t.queue,s=n.dispatch;return l!==t.memoizedState&&(de.flags|=2048,$a(9,{destroy:void 0},ix.bind(null,n,l),null)),[a,s,e]}function ix(e,t){e.action=t}function vd(e){var t=$e(),l=_e;if(l!==null)return xd(t,l,e);$e(),t=t.memoizedState,l=$e();var a=l.queue.dispatch;return l.memoizedState=e,[t,a,!1]}function $a(e,t,l,a){return e={tag:e,create:l,deps:a,inst:t,next:null},t=de.updateQueue,t===null&&(t=Js(),de.updateQueue=t),l=t.lastEffect,l===null?t.lastEffect=e.next=e:(a=l.next,l.next=e,e.next=a,t.lastEffect=e),e}function pd(){return $e().memoizedState}function Ps(e,t,l,a){var n=dt();de.flags|=e,n.memoizedState=$a(1|t,{destroy:void 0},l,a===void 0?null:a)}function Is(e,t,l,a){var n=$e();a=a===void 0?null:a;var s=n.memoizedState.inst;_e!==null&&a!==null&&Yu(a,_e.memoizedState.deps)?n.memoizedState=$a(t,s,l,a):(de.flags|=e,n.memoizedState=$a(1|t,s,l,a))}function gd(e,t){Ps(8390656,8,e,t)}function Wu(e,t){Is(2048,8,e,t)}function ux(e){de.flags|=4;var t=de.updateQueue;if(t===null)t=Js(),de.updateQueue=t,t.events=[e];else{var l=t.events;l===null?t.events=[e]:l.push(e)}}function yd(e){var t=$e().memoizedState;return ux({ref:t,nextImpl:e}),function(){if((Re&2)!==0)throw Error(c(440));return t.impl.apply(void 0,arguments)}}function bd(e,t){return Is(4,2,e,t)}function Sd(e,t){return Is(4,4,e,t)}function jd(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 Nd(e,t,l){l=l!=null?l.concat([e]):null,Is(4,4,jd.bind(null,t,e),l)}function Pu(){}function Ed(e,t){var l=$e();t=t===void 0?null:t;var a=l.memoizedState;return t!==null&&Yu(t,a[1])?a[0]:(l.memoizedState=[e,t],e)}function wd(e,t){var l=$e();t=t===void 0?null:t;var a=l.memoizedState;if(t!==null&&Yu(t,a[1]))return a[0];if(a=e(),ha){Rl(!0);try{e()}finally{Rl(!1)}}return l.memoizedState=[a,t],a}function Iu(e,t,l){return l===void 0||(ol&1073741824)!==0&&(ye&261930)===0?e.memoizedState=t:(e.memoizedState=l,e=Cf(),de.lanes|=e,kl|=e,l)}function Rd(e,t,l,a){return Et(l,t)?l:Xa.current!==null?(e=Iu(e,l,a),Et(e,t)||(Fe=!0),e):(ol&42)===0||(ol&1073741824)!==0&&(ye&261930)===0?(Fe=!0,e.memoizedState=l):(e=Cf(),de.lanes|=e,kl|=e,t)}function Cd(e,t,l,a,n){var s=Q.p;Q.p=s!==0&&8>s?s:8;var r=z.T,m={};z.T=m,lc(e,!1,t,l);try{var S=n(),T=z.S;if(T!==null&&T(m,S),S!==null&&typeof S=="object"&&typeof S.then=="function"){var q=lx(S,a);Bn(e,t,q,At(e))}else Bn(e,t,a,At(e))}catch(k){Bn(e,t,{then:function(){},status:"rejected",reason:k},At())}finally{Q.p=s,r!==null&&m.types!==null&&(r.types=m.types),z.T=r}}function cx(){}function ec(e,t,l,a){if(e.tag!==5)throw Error(c(476));var n=Td(e).queue;Cd(e,n,t,ee,l===null?cx:function(){return Md(e),l(a)})}function Td(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:ee,baseState:ee,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:dl,lastRenderedState:ee},next:null};var l={};return t.next={memoizedState:l,baseState:l,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:dl,lastRenderedState:l},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Md(e){var t=Td(e);t.next===null&&(t=e.alternate.memoizedState),Bn(e,t.next.queue,{},At())}function tc(){return it(ts)}function Ad(){return $e().memoizedState}function _d(){return $e().memoizedState}function rx(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var l=At();e=Ol(l);var a=Ul(t,e,l);a!==null&&(yt(a,t,l),Dn(a,t,l)),t={cache:Au()},e.payload=t;return}t=t.return}}function ox(e,t,l){var a=At();l={lane:a,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},ei(e)?Dd(t,l):(l=yu(e,t,l,a),l!==null&&(yt(l,e,a),Od(l,t,a)))}function zd(e,t,l){var a=At();Bn(e,t,l,a)}function Bn(e,t,l,a){var n={lane:a,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null};if(ei(e))Dd(t,n);else{var s=e.alternate;if(e.lanes===0&&(s===null||s.lanes===0)&&(s=t.lastRenderedReducer,s!==null))try{var r=t.lastRenderedState,m=s(r,l);if(n.hasEagerState=!0,n.eagerState=m,Et(m,r))return Os(e,t,n,0),Oe===null&&Ds(),!1}catch{}finally{}if(l=yu(e,t,n,a),l!==null)return yt(l,e,a),Od(l,t,a),!0}return!1}function lc(e,t,l,a){if(a={lane:2,revertLane:Oc(),gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},ei(e)){if(t)throw Error(c(479))}else t=yu(e,l,a,2),t!==null&&yt(t,e,2)}function ei(e){var t=e.alternate;return e===de||t!==null&&t===de}function Dd(e,t){Va=$s=!0;var l=e.pending;l===null?t.next=t:(t.next=l.next,l.next=t),e.pending=t}function Od(e,t,l){if((l&4194048)!==0){var a=t.lanes;a&=e.pendingLanes,l|=a,t.lanes=l,Br(e,l)}}var Ln={readContext:it,use:Fs,useCallback:Xe,useContext:Xe,useEffect:Xe,useImperativeHandle:Xe,useLayoutEffect:Xe,useInsertionEffect:Xe,useMemo:Xe,useReducer:Xe,useRef:Xe,useState:Xe,useDebugValue:Xe,useDeferredValue:Xe,useTransition:Xe,useSyncExternalStore:Xe,useId:Xe,useHostTransitionStatus:Xe,useFormState:Xe,useActionState:Xe,useOptimistic:Xe,useMemoCache:Xe,useCacheRefresh:Xe};Ln.useEffectEvent=Xe;var Ud={readContext:it,use:Fs,useCallback:function(e,t){return dt().memoizedState=[e,t===void 0?null:t],e},useContext:it,useEffect:gd,useImperativeHandle:function(e,t,l){l=l!=null?l.concat([e]):null,Ps(4194308,4,jd.bind(null,t,e),l)},useLayoutEffect:function(e,t){return Ps(4194308,4,e,t)},useInsertionEffect:function(e,t){Ps(4,2,e,t)},useMemo:function(e,t){var l=dt();t=t===void 0?null:t;var a=e();if(ha){Rl(!0);try{e()}finally{Rl(!1)}}return l.memoizedState=[a,t],a},useReducer:function(e,t,l){var a=dt();if(l!==void 0){var n=l(t);if(ha){Rl(!0);try{l(t)}finally{Rl(!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=ox.bind(null,de,e),[a.memoizedState,e]},useRef:function(e){var t=dt();return e={current:e},t.memoizedState=e},useState:function(e){e=Ju(e);var t=e.queue,l=zd.bind(null,de,t);return t.dispatch=l,[e.memoizedState,l]},useDebugValue:Pu,useDeferredValue:function(e,t){var l=dt();return Iu(l,e,t)},useTransition:function(){var e=Ju(!1);return e=Cd.bind(null,de,e.queue,!0,!1),dt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,l){var a=de,n=dt();if(Se){if(l===void 0)throw Error(c(407));l=l()}else{if(l=t(),Oe===null)throw Error(c(349));(ye&127)!==0||ld(a,t,l)}n.memoizedState=l;var s={value:l,getSnapshot:t};return n.queue=s,gd(nd.bind(null,a,s,e),[e]),a.flags|=2048,$a(9,{destroy:void 0},ad.bind(null,a,s,l,t),null),l},useId:function(){var e=dt(),t=Oe.identifierPrefix;if(Se){var l=Pt,a=Wt;l=(a&~(1<<32-Nt(a)-1)).toString(32)+l,t="_"+t+"R_"+l,l=Ks++,0<l&&(t+="H"+l.toString(32)),t+="_"}else l=ax++,t="_"+t+"r_"+l.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:tc,useFormState:md,useActionState:md,useOptimistic:function(e){var t=dt();t.memoizedState=t.baseState=e;var l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=l,t=lc.bind(null,de,!0,l),l.dispatch=t,[e,t]},useMemoCache:Zu,useCacheRefresh:function(){return dt().memoizedState=rx.bind(null,de)},useEffectEvent:function(e){var t=dt(),l={impl:e};return t.memoizedState=l,function(){if((Re&2)!==0)throw Error(c(440));return l.impl.apply(void 0,arguments)}}},ac={readContext:it,use:Fs,useCallback:Ed,useContext:it,useEffect:Wu,useImperativeHandle:Nd,useInsertionEffect:bd,useLayoutEffect:Sd,useMemo:wd,useReducer:Ws,useRef:pd,useState:function(){return Ws(dl)},useDebugValue:Pu,useDeferredValue:function(e,t){var l=$e();return Rd(l,_e.memoizedState,e,t)},useTransition:function(){var e=Ws(dl)[0],t=$e().memoizedState;return[typeof e=="boolean"?e:Hn(e),t]},useSyncExternalStore:td,useId:Ad,useHostTransitionStatus:tc,useFormState:hd,useActionState:hd,useOptimistic:function(e,t){var l=$e();return ud(l,_e,e,t)},useMemoCache:Zu,useCacheRefresh:_d};ac.useEffectEvent=yd;var qd={readContext:it,use:Fs,useCallback:Ed,useContext:it,useEffect:Wu,useImperativeHandle:Nd,useInsertionEffect:bd,useLayoutEffect:Sd,useMemo:wd,useReducer:Ku,useRef:pd,useState:function(){return Ku(dl)},useDebugValue:Pu,useDeferredValue:function(e,t){var l=$e();return _e===null?Iu(l,e,t):Rd(l,_e.memoizedState,e,t)},useTransition:function(){var e=Ku(dl)[0],t=$e().memoizedState;return[typeof e=="boolean"?e:Hn(e),t]},useSyncExternalStore:td,useId:Ad,useHostTransitionStatus:tc,useFormState:vd,useActionState:vd,useOptimistic:function(e,t){var l=$e();return _e!==null?ud(l,_e,e,t):(l.baseState=e,[e,l.queue.dispatch])},useMemoCache:Zu,useCacheRefresh:_d};qd.useEffectEvent=yd;function nc(e,t,l,a){t=e.memoizedState,l=l(a,t),l=l==null?t:b({},t,l),e.memoizedState=l,e.lanes===0&&(e.updateQueue.baseState=l)}var sc={enqueueSetState:function(e,t,l){e=e._reactInternals;var a=At(),n=Ol(a);n.payload=t,l!=null&&(n.callback=l),t=Ul(e,n,a),t!==null&&(yt(t,e,a),Dn(t,e,a))},enqueueReplaceState:function(e,t,l){e=e._reactInternals;var a=At(),n=Ol(a);n.tag=1,n.payload=t,l!=null&&(n.callback=l),t=Ul(e,n,a),t!==null&&(yt(t,e,a),Dn(t,e,a))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var l=At(),a=Ol(l);a.tag=2,t!=null&&(a.callback=t),t=Ul(e,a,l),t!==null&&(yt(t,e,l),Dn(t,e,l))}};function Hd(e,t,l,a,n,s,r){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(a,s,r):t.prototype&&t.prototype.isPureReactComponent?!wn(l,a)||!wn(n,s):!0}function Bd(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&&sc.enqueueReplaceState(t,t.state,null)}function xa(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=b({},l));for(var n in e)l[n]===void 0&&(l[n]=e[n])}return l}function Ld(e){zs(e)}function kd(e){console.error(e)}function Yd(e){zs(e)}function ti(e,t){try{var l=e.onUncaughtError;l(t.value,{componentStack:t.stack})}catch(a){setTimeout(function(){throw a})}}function Gd(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 ic(e,t,l){return l=Ol(l),l.tag=3,l.payload={element:null},l.callback=function(){ti(e,t)},l}function Qd(e){return e=Ol(e),e.tag=3,e}function Xd(e,t,l,a){var n=l.type.getDerivedStateFromError;if(typeof n=="function"){var s=a.value;e.payload=function(){return n(s)},e.callback=function(){Gd(t,l,a)}}var r=l.stateNode;r!==null&&typeof r.componentDidCatch=="function"&&(e.callback=function(){Gd(t,l,a),typeof n!="function"&&(Yl===null?Yl=new Set([this]):Yl.add(this));var m=a.stack;this.componentDidCatch(a.value,{componentStack:m!==null?m:""})})}function dx(e,t,l,a,n){if(l.flags|=32768,a!==null&&typeof a=="object"&&typeof a.then=="function"){if(t=l.alternate,t!==null&&La(t,l,n,!0),l=Rt.current,l!==null){switch(l.tag){case 31:case 13:return Gt===null?mi():l.alternate===null&&Ve===0&&(Ve=3),l.flags&=-257,l.flags|=65536,l.lanes=n,a===Gs?l.flags|=16384:(t=l.updateQueue,t===null?l.updateQueue=new Set([a]):t.add(a),_c(e,a,n)),!1;case 22:return l.flags|=65536,a===Gs?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)),_c(e,a,n)),!1}throw Error(c(435,l.tag))}return _c(e,a,n),mi(),!1}if(Se)return t=Rt.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=n,a!==wu&&(e=Error(c(422),{cause:a}),Tn(Bt(e,l)))):(a!==wu&&(t=Error(c(423),{cause:a}),Tn(Bt(t,l))),e=e.current.alternate,e.flags|=65536,n&=-n,e.lanes|=n,a=Bt(a,l),n=ic(e.stateNode,a,n),qu(e,n),Ve!==4&&(Ve=2)),!1;var s=Error(c(520),{cause:a});if(s=Bt(s,l),$n===null?$n=[s]:$n.push(s),Ve!==4&&(Ve=2),t===null)return!0;a=Bt(a,l),l=t;do{switch(l.tag){case 3:return l.flags|=65536,e=n&-n,l.lanes|=e,e=ic(l.stateNode,a,e),qu(l,e),!1;case 1:if(t=l.type,s=l.stateNode,(l.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||s!==null&&typeof s.componentDidCatch=="function"&&(Yl===null||!Yl.has(s))))return l.flags|=65536,n&=-n,l.lanes|=n,n=Qd(n),Xd(n,e,l,a),qu(l,n),!1}l=l.return}while(l!==null);return!1}var uc=Error(c(461)),Fe=!1;function ut(e,t,l,a){t.child=e===null?Ko(t,null,l,a):ma(t,e.child,l,a)}function Vd(e,t,l,a,n){l=l.render;var s=t.ref;if("ref"in a){var r={};for(var m in a)m!=="ref"&&(r[m]=a[m])}else r=a;return ra(t),a=Gu(e,t,l,r,s,n),m=Qu(),e!==null&&!Fe?(Xu(e,t,n),fl(e,t,n)):(Se&&m&&Nu(t),t.flags|=1,ut(e,t,a,n),t.child)}function Zd(e,t,l,a,n){if(e===null){var s=l.type;return typeof s=="function"&&!bu(s)&&s.defaultProps===void 0&&l.compare===null?(t.tag=15,t.type=s,$d(e,t,s,a,n)):(e=qs(l.type,null,a,t,t.mode,n),e.ref=t.ref,e.return=t,t.child=e)}if(s=e.child,!xc(e,n)){var r=s.memoizedProps;if(l=l.compare,l=l!==null?l:wn,l(r,a)&&e.ref===t.ref)return fl(e,t,n)}return t.flags|=1,e=il(s,a),e.ref=t.ref,e.return=t,t.child=e}function $d(e,t,l,a,n){if(e!==null){var s=e.memoizedProps;if(wn(s,a)&&e.ref===t.ref)if(Fe=!1,t.pendingProps=a=s,xc(e,n))(e.flags&131072)!==0&&(Fe=!0);else return t.lanes=e.lanes,fl(e,t,n)}return cc(e,t,l,a,n)}function Kd(e,t,l,a){var n=a.children,s=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),a.mode==="hidden"){if((t.flags&128)!==0){if(s=s!==null?s.baseLanes|l:l,e!==null){for(a=t.child=e.child,n=0;a!==null;)n=n|a.lanes|a.childLanes,a=a.sibling;a=n&~s}else a=0,t.child=null;return Jd(e,t,s,l,a)}if((l&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&ks(t,s!==null?s.cachePool:null),s!==null?Wo(t,s):Bu(),Po(t);else return a=t.lanes=536870912,Jd(e,t,s!==null?s.baseLanes|l:l,l,a)}else s!==null?(ks(t,s.cachePool),Wo(t,s),Hl(),t.memoizedState=null):(e!==null&&ks(t,null),Bu(),Hl());return ut(e,t,n,l),t.child}function kn(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Jd(e,t,l,a,n){var s=zu();return s=s===null?null:{parent:Ke._currentValue,pool:s},t.memoizedState={baseLanes:l,cachePool:s},e!==null&&ks(t,null),Bu(),Po(t),e!==null&&La(e,t,a,!0),t.childLanes=n,null}function li(e,t){return t=ni({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Fd(e,t,l){return ma(t,e.child,null,l),e=li(t,t.pendingProps),e.flags|=2,Ct(t),t.memoizedState=null,e}function fx(e,t,l){var a=t.pendingProps,n=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Se){if(a.mode==="hidden")return e=li(t,a),t.lanes=536870912,kn(null,e);if(ku(t),(e=He)?(e=rm(e,Yt),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ml!==null?{id:Wt,overflow:Pt}:null,retryLane:536870912,hydrationErrors:null},l=Do(e),l.return=t,t.child=l,st=t,He=null)):e=null,e===null)throw _l(t);return t.lanes=536870912,null}return li(t,a)}var s=e.memoizedState;if(s!==null){var r=s.dehydrated;if(ku(t),n)if(t.flags&256)t.flags&=-257,t=Fd(e,t,l);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(c(558));else if(Fe||La(e,t,l,!1),n=(l&e.childLanes)!==0,Fe||n){if(a=Oe,a!==null&&(r=Lr(a,l),r!==0&&r!==s.retryLane))throw s.retryLane=r,sa(e,r),yt(a,e,r),uc;mi(),t=Fd(e,t,l)}else e=s.treeContext,He=Qt(r.nextSibling),st=t,Se=!0,Al=null,Yt=!1,e!==null&&qo(t,e),t=li(t,a),t.flags|=4096;return t}return e=il(e.child,{mode:a.mode,children:a.children}),e.ref=t.ref,t.child=e,e.return=t,e}function ai(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(c(284));(e===null||e.ref!==l)&&(t.flags|=4194816)}}function cc(e,t,l,a,n){return ra(t),l=Gu(e,t,l,a,void 0,n),a=Qu(),e!==null&&!Fe?(Xu(e,t,n),fl(e,t,n)):(Se&&a&&Nu(t),t.flags|=1,ut(e,t,l,n),t.child)}function Wd(e,t,l,a,n,s){return ra(t),t.updateQueue=null,l=ed(t,a,l,n),Io(e),a=Qu(),e!==null&&!Fe?(Xu(e,t,s),fl(e,t,s)):(Se&&a&&Nu(t),t.flags|=1,ut(e,t,l,s),t.child)}function Pd(e,t,l,a,n){if(ra(t),t.stateNode===null){var s=Ua,r=l.contextType;typeof r=="object"&&r!==null&&(s=it(r)),s=new l(a,s),t.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,s.updater=sc,t.stateNode=s,s._reactInternals=t,s=t.stateNode,s.props=a,s.state=t.memoizedState,s.refs={},Ou(t),r=l.contextType,s.context=typeof r=="object"&&r!==null?it(r):Ua,s.state=t.memoizedState,r=l.getDerivedStateFromProps,typeof r=="function"&&(nc(t,l,r,a),s.state=t.memoizedState),typeof l.getDerivedStateFromProps=="function"||typeof s.getSnapshotBeforeUpdate=="function"||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(r=s.state,typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount(),r!==s.state&&sc.enqueueReplaceState(s,s.state,null),Un(t,a,s,n),On(),s.state=t.memoizedState),typeof s.componentDidMount=="function"&&(t.flags|=4194308),a=!0}else if(e===null){s=t.stateNode;var m=t.memoizedProps,S=xa(l,m);s.props=S;var T=s.context,q=l.contextType;r=Ua,typeof q=="object"&&q!==null&&(r=it(q));var k=l.getDerivedStateFromProps;q=typeof k=="function"||typeof s.getSnapshotBeforeUpdate=="function",m=t.pendingProps!==m,q||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(m||T!==r)&&Bd(t,s,a,r),Dl=!1;var A=t.memoizedState;s.state=A,Un(t,a,s,n),On(),T=t.memoizedState,m||A!==T||Dl?(typeof k=="function"&&(nc(t,l,k,a),T=t.memoizedState),(S=Dl||Hd(t,l,S,a,A,T,r))?(q||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount()),typeof s.componentDidMount=="function"&&(t.flags|=4194308)):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=a,t.memoizedState=T),s.props=a,s.state=T,s.context=r,a=S):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),a=!1)}else{s=t.stateNode,Uu(e,t),r=t.memoizedProps,q=xa(l,r),s.props=q,k=t.pendingProps,A=s.context,T=l.contextType,S=Ua,typeof T=="object"&&T!==null&&(S=it(T)),m=l.getDerivedStateFromProps,(T=typeof m=="function"||typeof s.getSnapshotBeforeUpdate=="function")||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(r!==k||A!==S)&&Bd(t,s,a,S),Dl=!1,A=t.memoizedState,s.state=A,Un(t,a,s,n),On();var O=t.memoizedState;r!==k||A!==O||Dl||e!==null&&e.dependencies!==null&&Bs(e.dependencies)?(typeof m=="function"&&(nc(t,l,m,a),O=t.memoizedState),(q=Dl||Hd(t,l,q,a,A,O,S)||e!==null&&e.dependencies!==null&&Bs(e.dependencies))?(T||typeof s.UNSAFE_componentWillUpdate!="function"&&typeof s.componentWillUpdate!="function"||(typeof s.componentWillUpdate=="function"&&s.componentWillUpdate(a,O,S),typeof s.UNSAFE_componentWillUpdate=="function"&&s.UNSAFE_componentWillUpdate(a,O,S)),typeof s.componentDidUpdate=="function"&&(t.flags|=4),typeof s.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof s.componentDidUpdate!="function"||r===e.memoizedProps&&A===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||r===e.memoizedProps&&A===e.memoizedState||(t.flags|=1024),t.memoizedProps=a,t.memoizedState=O),s.props=a,s.state=O,s.context=S,a=q):(typeof s.componentDidUpdate!="function"||r===e.memoizedProps&&A===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||r===e.memoizedProps&&A===e.memoizedState||(t.flags|=1024),a=!1)}return s=a,ai(e,t),a=(t.flags&128)!==0,s||a?(s=t.stateNode,l=a&&typeof l.getDerivedStateFromError!="function"?null:s.render(),t.flags|=1,e!==null&&a?(t.child=ma(t,e.child,null,n),t.child=ma(t,null,l,n)):ut(e,t,l,n),t.memoizedState=s.state,e=t.child):e=fl(e,t,n),e}function Id(e,t,l,a){return ua(),t.flags|=256,ut(e,t,l,a),t.child}var rc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function oc(e){return{baseLanes:e,cachePool:Go()}}function dc(e,t,l){return e=e!==null?e.childLanes&~l:0,t&&(e|=Mt),e}function ef(e,t,l){var a=t.pendingProps,n=!1,s=(t.flags&128)!==0,r;if((r=s)||(r=e!==null&&e.memoizedState===null?!1:(Ze.current&2)!==0),r&&(n=!0,t.flags&=-129),r=(t.flags&32)!==0,t.flags&=-33,e===null){if(Se){if(n?ql(t):Hl(),(e=He)?(e=rm(e,Yt),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ml!==null?{id:Wt,overflow:Pt}:null,retryLane:536870912,hydrationErrors:null},l=Do(e),l.return=t,t.child=l,st=t,He=null)):e=null,e===null)throw _l(t);return $c(e)?t.lanes=32:t.lanes=536870912,null}var m=a.children;return a=a.fallback,n?(Hl(),n=t.mode,m=ni({mode:"hidden",children:m},n),a=ia(a,n,l,null),m.return=t,a.return=t,m.sibling=a,t.child=m,a=t.child,a.memoizedState=oc(l),a.childLanes=dc(e,r,l),t.memoizedState=rc,kn(null,a)):(ql(t),fc(t,m))}var S=e.memoizedState;if(S!==null&&(m=S.dehydrated,m!==null)){if(s)t.flags&256?(ql(t),t.flags&=-257,t=mc(e,t,l)):t.memoizedState!==null?(Hl(),t.child=e.child,t.flags|=128,t=null):(Hl(),m=a.fallback,n=t.mode,a=ni({mode:"visible",children:a.children},n),m=ia(m,n,l,null),m.flags|=2,a.return=t,m.return=t,a.sibling=m,t.child=a,ma(t,e.child,null,l),a=t.child,a.memoizedState=oc(l),a.childLanes=dc(e,r,l),t.memoizedState=rc,t=kn(null,a));else if(ql(t),$c(m)){if(r=m.nextSibling&&m.nextSibling.dataset,r)var T=r.dgst;r=T,a=Error(c(419)),a.stack="",a.digest=r,Tn({value:a,source:null,stack:null}),t=mc(e,t,l)}else if(Fe||La(e,t,l,!1),r=(l&e.childLanes)!==0,Fe||r){if(r=Oe,r!==null&&(a=Lr(r,l),a!==0&&a!==S.retryLane))throw S.retryLane=a,sa(e,a),yt(r,e,a),uc;Zc(m)||mi(),t=mc(e,t,l)}else Zc(m)?(t.flags|=192,t.child=e.child,t=null):(e=S.treeContext,He=Qt(m.nextSibling),st=t,Se=!0,Al=null,Yt=!1,e!==null&&qo(t,e),t=fc(t,a.children),t.flags|=4096);return t}return n?(Hl(),m=a.fallback,n=t.mode,S=e.child,T=S.sibling,a=il(S,{mode:"hidden",children:a.children}),a.subtreeFlags=S.subtreeFlags&65011712,T!==null?m=il(T,m):(m=ia(m,n,l,null),m.flags|=2),m.return=t,a.return=t,a.sibling=m,t.child=a,kn(null,a),a=t.child,m=e.child.memoizedState,m===null?m=oc(l):(n=m.cachePool,n!==null?(S=Ke._currentValue,n=n.parent!==S?{parent:S,pool:S}:n):n=Go(),m={baseLanes:m.baseLanes|l,cachePool:n}),a.memoizedState=m,a.childLanes=dc(e,r,l),t.memoizedState=rc,kn(e.child,a)):(ql(t),l=e.child,e=l.sibling,l=il(l,{mode:"visible",children:a.children}),l.return=t,l.sibling=null,e!==null&&(r=t.deletions,r===null?(t.deletions=[e],t.flags|=16):r.push(e)),t.child=l,t.memoizedState=null,l)}function fc(e,t){return t=ni({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function ni(e,t){return e=wt(22,e,null,t),e.lanes=0,e}function mc(e,t,l){return ma(t,e.child,null,l),e=fc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function tf(e,t,l){e.lanes|=t;var a=e.alternate;a!==null&&(a.lanes|=t),Tu(e.return,t,l)}function hc(e,t,l,a,n,s){var r=e.memoizedState;r===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:a,tail:l,tailMode:n,treeForkCount:s}:(r.isBackwards=t,r.rendering=null,r.renderingStartTime=0,r.last=a,r.tail=l,r.tailMode=n,r.treeForkCount=s)}function lf(e,t,l){var a=t.pendingProps,n=a.revealOrder,s=a.tail;a=a.children;var r=Ze.current,m=(r&2)!==0;if(m?(r=r&1|2,t.flags|=128):r&=1,K(Ze,r),ut(e,t,a,l),a=Se?Cn:0,!m&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&tf(e,l,t);else if(e.tag===19)tf(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&&Zs(e)===null&&(n=l),l=l.sibling;l=n,l===null?(n=t.child,t.child=null):(n=l.sibling,l.sibling=null),hc(t,!1,n,l,s,a);break;case"backwards":case"unstable_legacy-backwards":for(l=null,n=t.child,t.child=null;n!==null;){if(e=n.alternate,e!==null&&Zs(e)===null){t.child=n;break}e=n.sibling,n.sibling=l,l=n,n=e}hc(t,!0,l,null,s,a);break;case"together":hc(t,!1,null,null,void 0,a);break;default:t.memoizedState=null}return t.child}function fl(e,t,l){if(e!==null&&(t.dependencies=e.dependencies),kl|=t.lanes,(l&t.childLanes)===0)if(e!==null){if(La(e,t,l,!1),(l&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(c(153));if(t.child!==null){for(e=t.child,l=il(e,e.pendingProps),t.child=l,l.return=t;e.sibling!==null;)e=e.sibling,l=l.sibling=il(e,e.pendingProps),l.return=t;l.sibling=null}return t.child}function xc(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&Bs(e)))}function mx(e,t,l){switch(t.tag){case 3:tt(t,t.stateNode.containerInfo),zl(t,Ke,e.memoizedState.cache),ua();break;case 27:case 5:wl(t);break;case 4:tt(t,t.stateNode.containerInfo);break;case 10:zl(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,ku(t),null;break;case 13:var a=t.memoizedState;if(a!==null)return a.dehydrated!==null?(ql(t),t.flags|=128,null):(l&t.child.childLanes)!==0?ef(e,t,l):(ql(t),e=fl(e,t,l),e!==null?e.sibling:null);ql(t);break;case 19:var n=(e.flags&128)!==0;if(a=(l&t.childLanes)!==0,a||(La(e,t,l,!1),a=(l&t.childLanes)!==0),n){if(a)return lf(e,t,l);t.flags|=128}if(n=t.memoizedState,n!==null&&(n.rendering=null,n.tail=null,n.lastEffect=null),K(Ze,Ze.current),a)break;return null;case 22:return t.lanes=0,Kd(e,t,l,t.pendingProps);case 24:zl(t,Ke,e.memoizedState.cache)}return fl(e,t,l)}function af(e,t,l){if(e!==null)if(e.memoizedProps!==t.pendingProps)Fe=!0;else{if(!xc(e,l)&&(t.flags&128)===0)return Fe=!1,mx(e,t,l);Fe=(e.flags&131072)!==0}else Fe=!1,Se&&(t.flags&1048576)!==0&&Uo(t,Cn,t.index);switch(t.lanes=0,t.tag){case 16:e:{var a=t.pendingProps;if(e=da(t.elementType),t.type=e,typeof e=="function")bu(e)?(a=xa(e,a),t.tag=1,t=Pd(null,t,e,a,l)):(t.tag=0,t=cc(null,t,e,a,l));else{if(e!=null){var n=e.$$typeof;if(n===le){t.tag=11,t=Vd(null,t,e,a,l);break e}else if(n===I){t.tag=14,t=Zd(null,t,e,a,l);break e}}throw t=D(e)||e,Error(c(306,t,""))}}return t;case 0:return cc(e,t,t.type,t.pendingProps,l);case 1:return a=t.type,n=xa(a,t.pendingProps),Pd(e,t,a,n,l);case 3:e:{if(tt(t,t.stateNode.containerInfo),e===null)throw Error(c(387));a=t.pendingProps;var s=t.memoizedState;n=s.element,Uu(e,t),Un(t,a,null,l);var r=t.memoizedState;if(a=r.cache,zl(t,Ke,a),a!==s.cache&&Mu(t,[Ke],l,!0),On(),a=r.element,s.isDehydrated)if(s={element:a,isDehydrated:!1,cache:r.cache},t.updateQueue.baseState=s,t.memoizedState=s,t.flags&256){t=Id(e,t,a,l);break e}else if(a!==n){n=Bt(Error(c(424)),t),Tn(n),t=Id(e,t,a,l);break e}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(He=Qt(e.firstChild),st=t,Se=!0,Al=null,Yt=!0,l=Ko(t,null,a,l),t.child=l;l;)l.flags=l.flags&-3|4096,l=l.sibling}else{if(ua(),a===n){t=fl(e,t,l);break e}ut(e,t,a,l)}t=t.child}return t;case 26:return ai(e,t),e===null?(l=xm(t.type,null,t.pendingProps,null))?t.memoizedState=l:Se||(l=t.type,e=t.pendingProps,a=bi(me.current).createElement(l),a[nt]=t,a[mt]=e,ct(a,l,e),lt(a),t.stateNode=a):t.memoizedState=xm(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return wl(t),e===null&&Se&&(a=t.stateNode=fm(t.type,t.pendingProps,me.current),st=t,Yt=!0,n=He,Vl(t.type)?(Kc=n,He=Qt(a.firstChild)):He=n),ut(e,t,t.pendingProps.children,l),ai(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Se&&((n=a=He)&&(a=Qx(a,t.type,t.pendingProps,Yt),a!==null?(t.stateNode=a,st=t,He=Qt(a.firstChild),Yt=!1,n=!0):n=!1),n||_l(t)),wl(t),n=t.type,s=t.pendingProps,r=e!==null?e.memoizedProps:null,a=s.children,Qc(n,s)?a=null:r!==null&&Qc(n,r)&&(t.flags|=32),t.memoizedState!==null&&(n=Gu(e,t,nx,null,null,l),ts._currentValue=n),ai(e,t),ut(e,t,a,l),t.child;case 6:return e===null&&Se&&((e=l=He)&&(l=Xx(l,t.pendingProps,Yt),l!==null?(t.stateNode=l,st=t,He=null,e=!0):e=!1),e||_l(t)),null;case 13:return ef(e,t,l);case 4:return tt(t,t.stateNode.containerInfo),a=t.pendingProps,e===null?t.child=ma(t,null,a,l):ut(e,t,a,l),t.child;case 11:return Vd(e,t,t.type,t.pendingProps,l);case 7:return ut(e,t,t.pendingProps,l),t.child;case 8:return ut(e,t,t.pendingProps.children,l),t.child;case 12:return ut(e,t,t.pendingProps.children,l),t.child;case 10:return a=t.pendingProps,zl(t,t.type,a.value),ut(e,t,a.children,l),t.child;case 9:return n=t.type._context,a=t.pendingProps.children,ra(t),n=it(n),a=a(n),t.flags|=1,ut(e,t,a,l),t.child;case 14:return Zd(e,t,t.type,t.pendingProps,l);case 15:return $d(e,t,t.type,t.pendingProps,l);case 19:return lf(e,t,l);case 31:return fx(e,t,l);case 22:return Kd(e,t,l,t.pendingProps);case 24:return ra(t),a=it(Ke),e===null?(n=zu(),n===null&&(n=Oe,s=Au(),n.pooledCache=s,s.refCount++,s!==null&&(n.pooledCacheLanes|=l),n=s),t.memoizedState={parent:a,cache:n},Ou(t),zl(t,Ke,n)):((e.lanes&l)!==0&&(Uu(e,t),Un(t,null,null,l),On()),n=e.memoizedState,s=t.memoizedState,n.parent!==a?(n={parent:a,cache:a},t.memoizedState=n,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=n),zl(t,Ke,a)):(a=s.cache,zl(t,Ke,a),a!==n.cache&&Mu(t,[Ke],l,!0))),ut(e,t,t.pendingProps.children,l),t.child;case 29:throw t.pendingProps}throw Error(c(156,t.tag))}function ml(e){e.flags|=4}function vc(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(_f())e.flags|=8192;else throw fa=Gs,Du}else e.flags&=-16777217}function nf(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!bm(t))if(_f())e.flags|=8192;else throw fa=Gs,Du}function si(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?qr():536870912,e.lanes|=t,Wa|=t)}function Yn(e,t){if(!Se)switch(e.tailMode){case"hidden":t=e.tail;for(var l=null;t!==null;)t.alternate!==null&&(l=t),t=t.sibling;l===null?e.tail=null:l.sibling=null;break;case"collapsed":l=e.tail;for(var a=null;l!==null;)l.alternate!==null&&(a=l),l=l.sibling;a===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:a.sibling=null}}function Be(e){var t=e.alternate!==null&&e.alternate.child===e.child,l=0,a=0;if(t)for(var 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 hx(e,t,l){var a=t.pendingProps;switch(Eu(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Be(t),null;case 1:return Be(t),null;case 3:return l=t.stateNode,a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),rl(Ke),ke(),l.pendingContext&&(l.context=l.pendingContext,l.pendingContext=null),(e===null||e.child===null)&&(Ba(t)?ml(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Ru())),Be(t),null;case 26:var n=t.type,s=t.memoizedState;return e===null?(ml(t),s!==null?(Be(t),nf(t,s)):(Be(t),vc(t,n,null,a,l))):s?s!==e.memoizedState?(ml(t),Be(t),nf(t,s)):(Be(t),t.flags&=-16777217):(e=e.memoizedProps,e!==a&&ml(t),Be(t),vc(t,n,e,a,l)),null;case 27:if(Il(t),l=me.current,n=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==a&&ml(t);else{if(!a){if(t.stateNode===null)throw Error(c(166));return Be(t),null}e=J.current,Ba(t)?Ho(t):(e=fm(n,a,l),t.stateNode=e,ml(t))}return Be(t),null;case 5:if(Il(t),n=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==a&&ml(t);else{if(!a){if(t.stateNode===null)throw Error(c(166));return Be(t),null}if(s=J.current,Ba(t))Ho(t);else{var r=bi(me.current);switch(s){case 1:s=r.createElementNS("http://www.w3.org/2000/svg",n);break;case 2:s=r.createElementNS("http://www.w3.org/1998/Math/MathML",n);break;default:switch(n){case"svg":s=r.createElementNS("http://www.w3.org/2000/svg",n);break;case"math":s=r.createElementNS("http://www.w3.org/1998/Math/MathML",n);break;case"script":s=r.createElement("div"),s.innerHTML="<script><\/script>",s=s.removeChild(s.firstChild);break;case"select":s=typeof a.is=="string"?r.createElement("select",{is:a.is}):r.createElement("select"),a.multiple?s.multiple=!0:a.size&&(s.size=a.size);break;default:s=typeof a.is=="string"?r.createElement(n,{is:a.is}):r.createElement(n)}}s[nt]=t,s[mt]=a;e:for(r=t.child;r!==null;){if(r.tag===5||r.tag===6)s.appendChild(r.stateNode);else if(r.tag!==4&&r.tag!==27&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===t)break e;for(;r.sibling===null;){if(r.return===null||r.return===t)break e;r=r.return}r.sibling.return=r.return,r=r.sibling}t.stateNode=s;e:switch(ct(s,n,a),n){case"button":case"input":case"select":case"textarea":a=!!a.autoFocus;break e;case"img":a=!0;break e;default:a=!1}a&&ml(t)}}return Be(t),vc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,l),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==a&&ml(t);else{if(typeof a!="string"&&t.stateNode===null)throw Error(c(166));if(e=me.current,Ba(t)){if(e=t.stateNode,l=t.memoizedProps,a=null,n=st,n!==null)switch(n.tag){case 27:case 5:a=n.memoizedProps}e[nt]=t,e=!!(e.nodeValue===l||a!==null&&a.suppressHydrationWarning===!0||tm(e.nodeValue,l)),e||_l(t,!0)}else e=bi(e).createTextNode(a),e[nt]=t,t.stateNode=e}return Be(t),null;case 31:if(l=t.memoizedState,e===null||e.memoizedState!==null){if(a=Ba(t),l!==null){if(e===null){if(!a)throw Error(c(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(c(557));e[nt]=t}else ua(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Be(t),e=!1}else l=Ru(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=l),e=!0;if(!e)return t.flags&256?(Ct(t),t):(Ct(t),null);if((t.flags&128)!==0)throw Error(c(558))}return Be(t),null;case 13:if(a=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(n=Ba(t),a!==null&&a.dehydrated!==null){if(e===null){if(!n)throw Error(c(318));if(n=t.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(c(317));n[nt]=t}else ua(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Be(t),n=!1}else n=Ru(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),n=!0;if(!n)return t.flags&256?(Ct(t),t):(Ct(t),null)}return Ct(t),(t.flags&128)!==0?(t.lanes=l,t):(l=a!==null,e=e!==null&&e.memoizedState!==null,l&&(a=t.child,n=null,a.alternate!==null&&a.alternate.memoizedState!==null&&a.alternate.memoizedState.cachePool!==null&&(n=a.alternate.memoizedState.cachePool.pool),s=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(s=a.memoizedState.cachePool.pool),s!==n&&(a.flags|=2048)),l!==e&&l&&(t.child.flags|=8192),si(t,t.updateQueue),Be(t),null);case 4:return ke(),e===null&&Bc(t.stateNode.containerInfo),Be(t),null;case 10:return rl(t.type),Be(t),null;case 19:if(L(Ze),a=t.memoizedState,a===null)return Be(t),null;if(n=(t.flags&128)!==0,s=a.rendering,s===null)if(n)Yn(a,!1);else{if(Ve!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(s=Zs(e),s!==null){for(t.flags|=128,Yn(a,!1),e=s.updateQueue,t.updateQueue=e,si(t,e),t.subtreeFlags=0,e=l,l=t.child;l!==null;)zo(l,e),l=l.sibling;return K(Ze,Ze.current&1|2),Se&&ul(t,a.treeForkCount),t.child}e=e.sibling}a.tail!==null&&St()>oi&&(t.flags|=128,n=!0,Yn(a,!1),t.lanes=4194304)}else{if(!n)if(e=Zs(s),e!==null){if(t.flags|=128,n=!0,e=e.updateQueue,t.updateQueue=e,si(t,e),Yn(a,!0),a.tail===null&&a.tailMode==="hidden"&&!s.alternate&&!Se)return Be(t),null}else 2*St()-a.renderingStartTime>oi&&l!==536870912&&(t.flags|=128,n=!0,Yn(a,!1),t.lanes=4194304);a.isBackwards?(s.sibling=t.child,t.child=s):(e=a.last,e!==null?e.sibling=s:t.child=s,a.last=s)}return a.tail!==null?(e=a.tail,a.rendering=e,a.tail=e.sibling,a.renderingStartTime=St(),e.sibling=null,l=Ze.current,K(Ze,n?l&1|2:l&1),Se&&ul(t,a.treeForkCount),e):(Be(t),null);case 22:case 23:return Ct(t),Lu(),a=t.memoizedState!==null,e!==null?e.memoizedState!==null!==a&&(t.flags|=8192):a&&(t.flags|=8192),a?(l&536870912)!==0&&(t.flags&128)===0&&(Be(t),t.subtreeFlags&6&&(t.flags|=8192)):Be(t),l=t.updateQueue,l!==null&&si(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(oa),null;case 24:return l=null,e!==null&&(l=e.memoizedState.cache),t.memoizedState.cache!==l&&(t.flags|=2048),rl(Ke),Be(t),null;case 25:return null;case 30:return null}throw Error(c(156,t.tag))}function xx(e,t){switch(Eu(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return rl(Ke),ke(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Il(t),null;case 31:if(t.memoizedState!==null){if(Ct(t),t.alternate===null)throw Error(c(340));ua()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Ct(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(c(340));ua()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return L(Ze),null;case 4:return ke(),null;case 10:return rl(t.type),null;case 22:case 23:return Ct(t),Lu(),e!==null&&L(oa),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return rl(Ke),null;case 25:return null;default:return null}}function sf(e,t){switch(Eu(t),t.tag){case 3:rl(Ke),ke();break;case 26:case 27:case 5:Il(t);break;case 4:ke();break;case 31:t.memoizedState!==null&&Ct(t);break;case 13:Ct(t);break;case 19:L(Ze);break;case 10:rl(t.type);break;case 22:case 23:Ct(t),Lu(),e!==null&&L(oa);break;case 24:rl(Ke)}}function Gn(e,t){try{var l=t.updateQueue,a=l!==null?l.lastEffect:null;if(a!==null){var n=a.next;l=n;do{if((l.tag&e)===e){a=void 0;var s=l.create,r=l.inst;a=s(),r.destroy=a}l=l.next}while(l!==n)}}catch(m){Me(t,t.return,m)}}function Bl(e,t,l){try{var a=t.updateQueue,n=a!==null?a.lastEffect:null;if(n!==null){var s=n.next;a=s;do{if((a.tag&e)===e){var r=a.inst,m=r.destroy;if(m!==void 0){r.destroy=void 0,n=t;var S=l,T=m;try{T()}catch(q){Me(n,S,q)}}}a=a.next}while(a!==s)}}catch(q){Me(t,t.return,q)}}function uf(e){var t=e.updateQueue;if(t!==null){var l=e.stateNode;try{Fo(t,l)}catch(a){Me(e,e.return,a)}}}function cf(e,t,l){l.props=xa(e.type,e.memoizedProps),l.state=e.memoizedState;try{l.componentWillUnmount()}catch(a){Me(e,t,a)}}function Qn(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){Me(e,t,n)}}function It(e,t){var l=e.ref,a=e.refCleanup;if(l!==null)if(typeof a=="function")try{a()}catch(n){Me(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){Me(e,t,n)}else l.current=null}function rf(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){Me(e,e.return,n)}}function pc(e,t,l){try{var a=e.stateNode;Hx(a,e.type,l,t),a[mt]=t}catch(n){Me(e,e.return,n)}}function of(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Vl(e.type)||e.tag===4}function gc(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||of(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&&Vl(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 yc(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=nl));else if(a!==4&&(a===27&&Vl(e.type)&&(l=e.stateNode,t=null),e=e.child,e!==null))for(yc(e,t,l),e=e.sibling;e!==null;)yc(e,t,l),e=e.sibling}function ii(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&&Vl(e.type)&&(l=e.stateNode),e=e.child,e!==null))for(ii(e,t,l),e=e.sibling;e!==null;)ii(e,t,l),e=e.sibling}function df(e){var t=e.stateNode,l=e.memoizedProps;try{for(var a=e.type,n=t.attributes;n.length;)t.removeAttributeNode(n[0]);ct(t,a,l),t[nt]=e,t[mt]=l}catch(s){Me(e,e.return,s)}}var hl=!1,We=!1,bc=!1,ff=typeof WeakSet=="function"?WeakSet:Set,at=null;function vx(e,t){if(e=e.containerInfo,Yc=Ci,e=No(e),mu(e)){if("selectionStart"in e)var l={start:e.selectionStart,end:e.selectionEnd};else e:{l=(l=e.ownerDocument)&&l.defaultView||window;var a=l.getSelection&&l.getSelection();if(a&&a.rangeCount!==0){l=a.anchorNode;var n=a.anchorOffset,s=a.focusNode;a=a.focusOffset;try{l.nodeType,s.nodeType}catch{l=null;break e}var r=0,m=-1,S=-1,T=0,q=0,k=e,A=null;t:for(;;){for(var O;k!==l||n!==0&&k.nodeType!==3||(m=r+n),k!==s||a!==0&&k.nodeType!==3||(S=r+a),k.nodeType===3&&(r+=k.nodeValue.length),(O=k.firstChild)!==null;)A=k,k=O;for(;;){if(k===e)break t;if(A===l&&++T===n&&(m=r),A===s&&++q===a&&(S=r),(O=k.nextSibling)!==null)break;k=A,A=k.parentNode}k=O}l=m===-1||S===-1?null:{start:m,end:S}}else l=null}l=l||{start:0,end:0}}else l=null;for(Gc={focusedElem:e,selectionRange:l},Ci=!1,at=t;at!==null;)if(t=at,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,at=e;else for(;at!==null;){switch(t=at,s=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(l=0;l<e.length;l++)n=e[l],n.ref.impl=n.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&s!==null){e=void 0,l=t,n=s.memoizedProps,s=s.memoizedState,a=l.stateNode;try{var F=xa(l.type,n);e=a.getSnapshotBeforeUpdate(F,s),a.__reactInternalSnapshotBeforeUpdate=e}catch(ne){Me(l,l.return,ne)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,l=e.nodeType,l===9)Vc(e);else if(l===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Vc(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(c(163))}if(e=t.sibling,e!==null){e.return=t.return,at=e;break}at=t.return}}function mf(e,t,l){var a=l.flags;switch(l.tag){case 0:case 11:case 15:vl(e,l),a&4&&Gn(5,l);break;case 1:if(vl(e,l),a&4)if(e=l.stateNode,t===null)try{e.componentDidMount()}catch(r){Me(l,l.return,r)}else{var n=xa(l.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(n,t,e.__reactInternalSnapshotBeforeUpdate)}catch(r){Me(l,l.return,r)}}a&64&&uf(l),a&512&&Qn(l,l.return);break;case 3:if(vl(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{Fo(e,t)}catch(r){Me(l,l.return,r)}}break;case 27:t===null&&a&4&&df(l);case 26:case 5:vl(e,l),t===null&&a&4&&rf(l),a&512&&Qn(l,l.return);break;case 12:vl(e,l);break;case 31:vl(e,l),a&4&&vf(e,l);break;case 13:vl(e,l),a&4&&pf(e,l),a&64&&(e=l.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(l=wx.bind(null,l),Vx(e,l))));break;case 22:if(a=l.memoizedState!==null||hl,!a){t=t!==null&&t.memoizedState!==null||We,n=hl;var s=We;hl=a,(We=t)&&!s?pl(e,l,(l.subtreeFlags&8772)!==0):vl(e,l),hl=n,We=s}break;case 30:break;default:vl(e,l)}}function hf(e){var t=e.alternate;t!==null&&(e.alternate=null,hf(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Fi(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var Ye=null,xt=!1;function xl(e,t,l){for(l=l.child;l!==null;)xf(e,t,l),l=l.sibling}function xf(e,t,l){if(jt&&typeof jt.onCommitFiberUnmount=="function")try{jt.onCommitFiberUnmount(mn,l)}catch{}switch(l.tag){case 26:We||It(l,t),xl(e,t,l),l.memoizedState?l.memoizedState.count--:l.stateNode&&(l=l.stateNode,l.parentNode.removeChild(l));break;case 27:We||It(l,t);var a=Ye,n=xt;Vl(l.type)&&(Ye=l.stateNode,xt=!1),xl(e,t,l),Pn(l.stateNode),Ye=a,xt=n;break;case 5:We||It(l,t);case 6:if(a=Ye,n=xt,Ye=null,xl(e,t,l),Ye=a,xt=n,Ye!==null)if(xt)try{(Ye.nodeType===9?Ye.body:Ye.nodeName==="HTML"?Ye.ownerDocument.body:Ye).removeChild(l.stateNode)}catch(s){Me(l,t,s)}else try{Ye.removeChild(l.stateNode)}catch(s){Me(l,t,s)}break;case 18:Ye!==null&&(xt?(e=Ye,um(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,l.stateNode),sn(e)):um(Ye,l.stateNode));break;case 4:a=Ye,n=xt,Ye=l.stateNode.containerInfo,xt=!0,xl(e,t,l),Ye=a,xt=n;break;case 0:case 11:case 14:case 15:Bl(2,l,t),We||Bl(4,l,t),xl(e,t,l);break;case 1:We||(It(l,t),a=l.stateNode,typeof a.componentWillUnmount=="function"&&cf(l,t,a)),xl(e,t,l);break;case 21:xl(e,t,l);break;case 22:We=(a=We)||l.memoizedState!==null,xl(e,t,l),We=a;break;default:xl(e,t,l)}}function vf(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{sn(e)}catch(l){Me(t,t.return,l)}}}function pf(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{sn(e)}catch(l){Me(t,t.return,l)}}function px(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new ff),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new ff),t;default:throw Error(c(435,e.tag))}}function ui(e,t){var l=px(e);t.forEach(function(a){if(!l.has(a)){l.add(a);var n=Rx.bind(null,e,a);a.then(n,n)}})}function vt(e,t){var l=t.deletions;if(l!==null)for(var a=0;a<l.length;a++){var n=l[a],s=e,r=t,m=r;e:for(;m!==null;){switch(m.tag){case 27:if(Vl(m.type)){Ye=m.stateNode,xt=!1;break e}break;case 5:Ye=m.stateNode,xt=!1;break e;case 3:case 4:Ye=m.stateNode.containerInfo,xt=!0;break e}m=m.return}if(Ye===null)throw Error(c(160));xf(s,r,n),Ye=null,xt=!1,s=n.alternate,s!==null&&(s.return=null),n.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)gf(t,e),t=t.sibling}var $t=null;function gf(e,t){var l=e.alternate,a=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:vt(t,e),pt(e),a&4&&(Bl(3,e,e.return),Gn(3,e),Bl(5,e,e.return));break;case 1:vt(t,e),pt(e),a&512&&(We||l===null||It(l,l.return)),a&64&&hl&&(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=$t;if(vt(t,e),pt(e),a&512&&(We||l===null||It(l,l.return)),a&4){var s=l!==null?l.memoizedState:null;if(a=e.memoizedState,l===null)if(a===null)if(e.stateNode===null){e:{a=e.type,l=e.memoizedProps,n=n.ownerDocument||n;t:switch(a){case"title":s=n.getElementsByTagName("title")[0],(!s||s[vn]||s[nt]||s.namespaceURI==="http://www.w3.org/2000/svg"||s.hasAttribute("itemprop"))&&(s=n.createElement(a),n.head.insertBefore(s,n.querySelector("head > title"))),ct(s,a,l),s[nt]=e,lt(s),a=s;break e;case"link":var r=gm("link","href",n).get(a+(l.href||""));if(r){for(var m=0;m<r.length;m++)if(s=r[m],s.getAttribute("href")===(l.href==null||l.href===""?null:l.href)&&s.getAttribute("rel")===(l.rel==null?null:l.rel)&&s.getAttribute("title")===(l.title==null?null:l.title)&&s.getAttribute("crossorigin")===(l.crossOrigin==null?null:l.crossOrigin)){r.splice(m,1);break t}}s=n.createElement(a),ct(s,a,l),n.head.appendChild(s);break;case"meta":if(r=gm("meta","content",n).get(a+(l.content||""))){for(m=0;m<r.length;m++)if(s=r[m],s.getAttribute("content")===(l.content==null?null:""+l.content)&&s.getAttribute("name")===(l.name==null?null:l.name)&&s.getAttribute("property")===(l.property==null?null:l.property)&&s.getAttribute("http-equiv")===(l.httpEquiv==null?null:l.httpEquiv)&&s.getAttribute("charset")===(l.charSet==null?null:l.charSet)){r.splice(m,1);break t}}s=n.createElement(a),ct(s,a,l),n.head.appendChild(s);break;default:throw Error(c(468,a))}s[nt]=e,lt(s),a=s}e.stateNode=a}else ym(n,e.type,e.stateNode);else e.stateNode=pm(n,a,e.memoizedProps);else s!==a?(s===null?l.stateNode!==null&&(l=l.stateNode,l.parentNode.removeChild(l)):s.count--,a===null?ym(n,e.type,e.stateNode):pm(n,a,e.memoizedProps)):a===null&&e.stateNode!==null&&pc(e,e.memoizedProps,l.memoizedProps)}break;case 27:vt(t,e),pt(e),a&512&&(We||l===null||It(l,l.return)),l!==null&&a&4&&pc(e,e.memoizedProps,l.memoizedProps);break;case 5:if(vt(t,e),pt(e),a&512&&(We||l===null||It(l,l.return)),e.flags&32){n=e.stateNode;try{Ta(n,"")}catch(F){Me(e,e.return,F)}}a&4&&e.stateNode!=null&&(n=e.memoizedProps,pc(e,n,l!==null?l.memoizedProps:n)),a&1024&&(bc=!0);break;case 6:if(vt(t,e),pt(e),a&4){if(e.stateNode===null)throw Error(c(162));a=e.memoizedProps,l=e.stateNode;try{l.nodeValue=a}catch(F){Me(e,e.return,F)}}break;case 3:if(Ni=null,n=$t,$t=Si(t.containerInfo),vt(t,e),$t=n,pt(e),a&4&&l!==null&&l.memoizedState.isDehydrated)try{sn(t.containerInfo)}catch(F){Me(e,e.return,F)}bc&&(bc=!1,yf(e));break;case 4:a=$t,$t=Si(e.stateNode.containerInfo),vt(t,e),pt(e),$t=a;break;case 12:vt(t,e),pt(e);break;case 31:vt(t,e),pt(e),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,ui(e,a)));break;case 13:vt(t,e),pt(e),e.child.flags&8192&&e.memoizedState!==null!=(l!==null&&l.memoizedState!==null)&&(ri=St()),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,ui(e,a)));break;case 22:n=e.memoizedState!==null;var S=l!==null&&l.memoizedState!==null,T=hl,q=We;if(hl=T||n,We=q||S,vt(t,e),We=q,hl=T,pt(e),a&8192)e:for(t=e.stateNode,t._visibility=n?t._visibility&-2:t._visibility|1,n&&(l===null||S||hl||We||va(e)),l=null,t=e;;){if(t.tag===5||t.tag===26){if(l===null){S=l=t;try{if(s=S.stateNode,n)r=s.style,typeof r.setProperty=="function"?r.setProperty("display","none","important"):r.display="none";else{m=S.stateNode;var k=S.memoizedProps.style,A=k!=null&&k.hasOwnProperty("display")?k.display:null;m.style.display=A==null||typeof A=="boolean"?"":(""+A).trim()}}catch(F){Me(S,S.return,F)}}}else if(t.tag===6){if(l===null){S=t;try{S.stateNode.nodeValue=n?"":S.memoizedProps}catch(F){Me(S,S.return,F)}}}else if(t.tag===18){if(l===null){S=t;try{var O=S.stateNode;n?cm(O,!0):cm(S.stateNode,!1)}catch(F){Me(S,S.return,F)}}}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,ui(e,l))));break;case 19:vt(t,e),pt(e),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,ui(e,a)));break;case 30:break;case 21:break;default:vt(t,e),pt(e)}}function pt(e){var t=e.flags;if(t&2){try{for(var l,a=e.return;a!==null;){if(of(a)){l=a;break}a=a.return}if(l==null)throw Error(c(160));switch(l.tag){case 27:var n=l.stateNode,s=gc(e);ii(e,s,n);break;case 5:var r=l.stateNode;l.flags&32&&(Ta(r,""),l.flags&=-33);var m=gc(e);ii(e,m,r);break;case 3:case 4:var S=l.stateNode.containerInfo,T=gc(e);yc(e,T,S);break;default:throw Error(c(161))}}catch(q){Me(e,e.return,q)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function yf(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;yf(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function vl(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)mf(e,t.alternate,t),t=t.sibling}function va(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Bl(4,t,t.return),va(t);break;case 1:It(t,t.return);var l=t.stateNode;typeof l.componentWillUnmount=="function"&&cf(t,t.return,l),va(t);break;case 27:Pn(t.stateNode);case 26:case 5:It(t,t.return),va(t);break;case 22:t.memoizedState===null&&va(t);break;case 30:va(t);break;default:va(t)}e=e.sibling}}function pl(e,t,l){for(l=l&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var a=t.alternate,n=e,s=t,r=s.flags;switch(s.tag){case 0:case 11:case 15:pl(n,s,l),Gn(4,s);break;case 1:if(pl(n,s,l),a=s,n=a.stateNode,typeof n.componentDidMount=="function")try{n.componentDidMount()}catch(T){Me(a,a.return,T)}if(a=s,n=a.updateQueue,n!==null){var m=a.stateNode;try{var S=n.shared.hiddenCallbacks;if(S!==null)for(n.shared.hiddenCallbacks=null,n=0;n<S.length;n++)Jo(S[n],m)}catch(T){Me(a,a.return,T)}}l&&r&64&&uf(s),Qn(s,s.return);break;case 27:df(s);case 26:case 5:pl(n,s,l),l&&a===null&&r&4&&rf(s),Qn(s,s.return);break;case 12:pl(n,s,l);break;case 31:pl(n,s,l),l&&r&4&&vf(n,s);break;case 13:pl(n,s,l),l&&r&4&&pf(n,s);break;case 22:s.memoizedState===null&&pl(n,s,l),Qn(s,s.return);break;case 30:break;default:pl(n,s,l)}t=t.sibling}}function Sc(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&&Mn(l))}function jc(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Mn(e))}function Kt(e,t,l,a){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)bf(e,t,l,a),t=t.sibling}function bf(e,t,l,a){var n=t.flags;switch(t.tag){case 0:case 11:case 15:Kt(e,t,l,a),n&2048&&Gn(9,t);break;case 1:Kt(e,t,l,a);break;case 3:Kt(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&&Mn(e)));break;case 12:if(n&2048){Kt(e,t,l,a),e=t.stateNode;try{var s=t.memoizedProps,r=s.id,m=s.onPostCommit;typeof m=="function"&&m(r,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(S){Me(t,t.return,S)}}else Kt(e,t,l,a);break;case 31:Kt(e,t,l,a);break;case 13:Kt(e,t,l,a);break;case 23:break;case 22:s=t.stateNode,r=t.alternate,t.memoizedState!==null?s._visibility&2?Kt(e,t,l,a):Xn(e,t):s._visibility&2?Kt(e,t,l,a):(s._visibility|=2,Ka(e,t,l,a,(t.subtreeFlags&10256)!==0||!1)),n&2048&&Sc(r,t);break;case 24:Kt(e,t,l,a),n&2048&&jc(t.alternate,t);break;default:Kt(e,t,l,a)}}function Ka(e,t,l,a,n){for(n=n&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var s=e,r=t,m=l,S=a,T=r.flags;switch(r.tag){case 0:case 11:case 15:Ka(s,r,m,S,n),Gn(8,r);break;case 23:break;case 22:var q=r.stateNode;r.memoizedState!==null?q._visibility&2?Ka(s,r,m,S,n):Xn(s,r):(q._visibility|=2,Ka(s,r,m,S,n)),n&&T&2048&&Sc(r.alternate,r);break;case 24:Ka(s,r,m,S,n),n&&T&2048&&jc(r.alternate,r);break;default:Ka(s,r,m,S,n)}t=t.sibling}}function Xn(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:Xn(l,a),n&2048&&Sc(a.alternate,a);break;case 24:Xn(l,a),n&2048&&jc(a.alternate,a);break;default:Xn(l,a)}t=t.sibling}}var Vn=8192;function Ja(e,t,l){if(e.subtreeFlags&Vn)for(e=e.child;e!==null;)Sf(e,t,l),e=e.sibling}function Sf(e,t,l){switch(e.tag){case 26:Ja(e,t,l),e.flags&Vn&&e.memoizedState!==null&&av(l,$t,e.memoizedState,e.memoizedProps);break;case 5:Ja(e,t,l);break;case 3:case 4:var a=$t;$t=Si(e.stateNode.containerInfo),Ja(e,t,l),$t=a;break;case 22:e.memoizedState===null&&(a=e.alternate,a!==null&&a.memoizedState!==null?(a=Vn,Vn=16777216,Ja(e,t,l),Vn=a):Ja(e,t,l));break;default:Ja(e,t,l)}}function jf(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function Zn(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var l=0;l<t.length;l++){var a=t[l];at=a,Ef(a,e)}jf(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Nf(e),e=e.sibling}function Nf(e){switch(e.tag){case 0:case 11:case 15:Zn(e),e.flags&2048&&Bl(9,e,e.return);break;case 3:Zn(e);break;case 12:Zn(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,ci(e)):Zn(e);break;default:Zn(e)}}function ci(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];at=a,Ef(a,e)}jf(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Bl(8,t,t.return),ci(t);break;case 22:l=t.stateNode,l._visibility&2&&(l._visibility&=-3,ci(t));break;default:ci(t)}e=e.sibling}}function Ef(e,t){for(;at!==null;){var l=at;switch(l.tag){case 0:case 11:case 15:Bl(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:Mn(l.memoizedState.cache)}if(a=l.child,a!==null)a.return=l,at=a;else e:for(l=e;at!==null;){a=at;var n=a.sibling,s=a.return;if(hf(a),a===l){at=null;break e}if(n!==null){n.return=s,at=n;break e}at=s}}}var gx={getCacheForType:function(e){var t=it(Ke),l=t.data.get(e);return l===void 0&&(l=e(),t.data.set(e,l)),l},cacheSignal:function(){return it(Ke).controller.signal}},yx=typeof WeakMap=="function"?WeakMap:Map,Re=0,Oe=null,ve=null,ye=0,Te=0,Tt=null,Ll=!1,Fa=!1,Nc=!1,gl=0,Ve=0,kl=0,pa=0,Ec=0,Mt=0,Wa=0,$n=null,gt=null,wc=!1,ri=0,wf=0,oi=1/0,di=null,Yl=null,et=0,Gl=null,Pa=null,yl=0,Rc=0,Cc=null,Rf=null,Kn=0,Tc=null;function At(){return(Re&2)!==0&&ye!==0?ye&-ye:z.T!==null?Oc():kr()}function Cf(){if(Mt===0)if((ye&536870912)===0||Se){var e=ys;ys<<=1,(ys&3932160)===0&&(ys=262144),Mt=e}else Mt=536870912;return e=Rt.current,e!==null&&(e.flags|=32),Mt}function yt(e,t,l){(e===Oe&&(Te===2||Te===9)||e.cancelPendingCommit!==null)&&(Ia(e,0),Ql(e,ye,Mt,!1)),xn(e,l),((Re&2)===0||e!==Oe)&&(e===Oe&&((Re&2)===0&&(pa|=l),Ve===4&&Ql(e,ye,Mt,!1)),el(e))}function Tf(e,t,l){if((Re&6)!==0)throw Error(c(327));var a=!l&&(t&127)===0&&(t&e.expiredLanes)===0||hn(e,t),n=a?jx(e,t):Ac(e,t,!0),s=a;do{if(n===0){Fa&&!a&&Ql(e,t,0,!1);break}else{if(l=e.current.alternate,s&&!bx(l)){n=Ac(e,t,!1),s=!1;continue}if(n===2){if(s=t,e.errorRecoveryDisabledLanes&s)var r=0;else r=e.pendingLanes&-536870913,r=r!==0?r:r&536870912?536870912:0;if(r!==0){t=r;e:{var m=e;n=$n;var S=m.current.memoizedState.isDehydrated;if(S&&(Ia(m,r).flags|=256),r=Ac(m,r,!1),r!==2){if(Nc&&!S){m.errorRecoveryDisabledLanes|=s,pa|=s,n=4;break e}s=gt,gt=n,s!==null&&(gt===null?gt=s:gt.push.apply(gt,s))}n=r}if(s=!1,n!==2)continue}}if(n===1){Ia(e,0),Ql(e,t,0,!0);break}e:{switch(a=e,s=n,s){case 0:case 1:throw Error(c(345));case 4:if((t&4194048)!==t)break;case 6:Ql(a,t,Mt,!Ll);break e;case 2:gt=null;break;case 3:case 5:break;default:throw Error(c(329))}if((t&62914560)===t&&(n=ri+300-St(),10<n)){if(Ql(a,t,Mt,!Ll),Ss(a,0,!0)!==0)break e;yl=t,a.timeoutHandle=sm(Mf.bind(null,a,l,gt,di,wc,t,Mt,pa,Wa,Ll,s,"Throttled",-0,0),n);break e}Mf(a,l,gt,di,wc,t,Mt,pa,Wa,Ll,s,null,-0,0)}}break}while(!0);el(e)}function Mf(e,t,l,a,n,s,r,m,S,T,q,k,A,O){if(e.timeoutHandle=-1,k=t.subtreeFlags,k&8192||(k&16785408)===16785408){k={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:nl},Sf(t,s,k);var F=(s&62914560)===s?ri-St():(s&4194048)===s?wf-St():0;if(F=nv(k,F),F!==null){yl=s,e.cancelPendingCommit=F(Hf.bind(null,e,t,s,l,a,n,r,m,S,q,k,null,A,O)),Ql(e,s,r,!T);return}}Hf(e,t,s,l,a,n,r,m,S)}function bx(e){for(var t=e;;){var l=t.tag;if((l===0||l===11||l===15)&&t.flags&16384&&(l=t.updateQueue,l!==null&&(l=l.stores,l!==null)))for(var a=0;a<l.length;a++){var n=l[a],s=n.getSnapshot;n=n.value;try{if(!Et(s(),n))return!1}catch{return!1}}if(l=t.child,t.subtreeFlags&16384&&l!==null)l.return=t,t=l;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Ql(e,t,l,a){t&=~Ec,t&=~pa,e.suspendedLanes|=t,e.pingedLanes&=~t,a&&(e.warmLanes|=t),a=e.expirationTimes;for(var n=t;0<n;){var s=31-Nt(n),r=1<<s;a[s]=-1,n&=~r}l!==0&&Hr(e,l,t)}function fi(){return(Re&6)===0?(Jn(0),!1):!0}function Mc(){if(ve!==null){if(Te===0)var e=ve.return;else e=ve,cl=ca=null,Vu(e),Qa=null,_n=0,e=ve;for(;e!==null;)sf(e.alternate,e),e=e.return;ve=null}}function Ia(e,t){var l=e.timeoutHandle;l!==-1&&(e.timeoutHandle=-1,kx(l)),l=e.cancelPendingCommit,l!==null&&(e.cancelPendingCommit=null,l()),yl=0,Mc(),Oe=e,ve=l=il(e.current,null),ye=t,Te=0,Tt=null,Ll=!1,Fa=hn(e,t),Nc=!1,Wa=Mt=Ec=pa=kl=Ve=0,gt=$n=null,wc=!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-Nt(a),s=1<<n;t|=e[n],a&=~s}return gl=t,Ds(),l}function Af(e,t){de=null,z.H=Ln,t===Ga||t===Ys?(t=Vo(),Te=3):t===Du?(t=Vo(),Te=4):Te=t===uc?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,Tt=t,ve===null&&(Ve=1,ti(e,Bt(t,e.current)))}function _f(){var e=Rt.current;return e===null?!0:(ye&4194048)===ye?Gt===null:(ye&62914560)===ye||(ye&536870912)!==0?e===Gt:!1}function zf(){var e=z.H;return z.H=Ln,e===null?Ln:e}function Df(){var e=z.A;return z.A=gx,e}function mi(){Ve=4,Ll||(ye&4194048)!==ye&&Rt.current!==null||(Fa=!0),(kl&134217727)===0&&(pa&134217727)===0||Oe===null||Ql(Oe,ye,Mt,!1)}function Ac(e,t,l){var a=Re;Re|=2;var n=zf(),s=Df();(Oe!==e||ye!==t)&&(di=null,Ia(e,t)),t=!1;var r=Ve;e:do try{if(Te!==0&&ve!==null){var m=ve,S=Tt;switch(Te){case 8:Mc(),r=6;break e;case 3:case 2:case 9:case 6:Rt.current===null&&(t=!0);var T=Te;if(Te=0,Tt=null,en(e,m,S,T),l&&Fa){r=0;break e}break;default:T=Te,Te=0,Tt=null,en(e,m,S,T)}}Sx(),r=Ve;break}catch(q){Af(e,q)}while(!0);return t&&e.shellSuspendCounter++,cl=ca=null,Re=a,z.H=n,z.A=s,ve===null&&(Oe=null,ye=0,Ds()),r}function Sx(){for(;ve!==null;)Of(ve)}function jx(e,t){var l=Re;Re|=2;var a=zf(),n=Df();Oe!==e||ye!==t?(di=null,oi=St()+500,Ia(e,t)):Fa=hn(e,t);e:do try{if(Te!==0&&ve!==null){t=ve;var s=Tt;t:switch(Te){case 1:Te=0,Tt=null,en(e,t,s,1);break;case 2:case 9:if(Qo(s)){Te=0,Tt=null,Uf(t);break}t=function(){Te!==2&&Te!==9||Oe!==e||(Te=7),el(e)},s.then(t,t);break e;case 3:Te=7;break e;case 4:Te=5;break e;case 7:Qo(s)?(Te=0,Tt=null,Uf(t)):(Te=0,Tt=null,en(e,t,s,7));break;case 5:var r=null;switch(ve.tag){case 26:r=ve.memoizedState;case 5:case 27:var m=ve;if(r?bm(r):m.stateNode.complete){Te=0,Tt=null;var S=m.sibling;if(S!==null)ve=S;else{var T=m.return;T!==null?(ve=T,hi(T)):ve=null}break t}}Te=0,Tt=null,en(e,t,s,5);break;case 6:Te=0,Tt=null,en(e,t,s,6);break;case 8:Mc(),Ve=6;break e;default:throw Error(c(462))}}Nx();break}catch(q){Af(e,q)}while(!0);return cl=ca=null,z.H=a,z.A=n,Re=l,ve!==null?0:(Oe=null,ye=0,Ds(),Ve)}function Nx(){for(;ve!==null&&!Zh();)Of(ve)}function Of(e){var t=af(e.alternate,e,gl);e.memoizedProps=e.pendingProps,t===null?hi(e):ve=t}function Uf(e){var t=e,l=t.alternate;switch(t.tag){case 15:case 0:t=Wd(l,t,t.pendingProps,t.type,void 0,ye);break;case 11:t=Wd(l,t,t.pendingProps,t.type.render,t.ref,ye);break;case 5:Vu(t);default:sf(l,t),t=ve=zo(t,gl),t=af(l,t,gl)}e.memoizedProps=e.pendingProps,t===null?hi(e):ve=t}function en(e,t,l,a){cl=ca=null,Vu(t),Qa=null,_n=0;var n=t.return;try{if(dx(e,n,t,l,ye)){Ve=1,ti(e,Bt(l,e.current)),ve=null;return}}catch(s){if(n!==null)throw ve=n,s;Ve=1,ti(e,Bt(l,e.current)),ve=null;return}t.flags&32768?(Se||a===1?e=!0:Fa||(ye&536870912)!==0?e=!1:(Ll=e=!0,(a===2||a===9||a===3||a===6)&&(a=Rt.current,a!==null&&a.tag===13&&(a.flags|=16384))),qf(t,e)):hi(t)}function hi(e){var t=e;do{if((t.flags&32768)!==0){qf(t,Ll);return}e=t.return;var l=hx(t.alternate,t,gl);if(l!==null){ve=l;return}if(t=t.sibling,t!==null){ve=t;return}ve=t=e}while(t!==null);Ve===0&&(Ve=5)}function qf(e,t){do{var l=xx(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);Ve=6,ve=null}function Hf(e,t,l,a,n,s,r,m,S){e.cancelPendingCommit=null;do xi();while(et!==0);if((Re&6)!==0)throw Error(c(327));if(t!==null){if(t===e.current)throw Error(c(177));if(s=t.lanes|t.childLanes,s|=gu,l0(e,l,s,r,m,S),e===Oe&&(ve=Oe=null,ye=0),Pa=t,Gl=e,yl=l,Rc=s,Cc=n,Rf=a,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,Cx(ps,function(){return Gf(),null})):(e.callbackNode=null,e.callbackPriority=0),a=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||a){a=z.T,z.T=null,n=Q.p,Q.p=2,r=Re,Re|=4;try{vx(e,t,l)}finally{Re=r,Q.p=n,z.T=a}}et=1,Bf(),Lf(),kf()}}function Bf(){if(et===1){et=0;var e=Gl,t=Pa,l=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||l){l=z.T,z.T=null;var a=Q.p;Q.p=2;var n=Re;Re|=4;try{gf(t,e);var s=Gc,r=No(e.containerInfo),m=s.focusedElem,S=s.selectionRange;if(r!==m&&m&&m.ownerDocument&&jo(m.ownerDocument.documentElement,m)){if(S!==null&&mu(m)){var T=S.start,q=S.end;if(q===void 0&&(q=T),"selectionStart"in m)m.selectionStart=T,m.selectionEnd=Math.min(q,m.value.length);else{var k=m.ownerDocument||document,A=k&&k.defaultView||window;if(A.getSelection){var O=A.getSelection(),F=m.textContent.length,ne=Math.min(S.start,F),De=S.end===void 0?ne:Math.min(S.end,F);!O.extend&&ne>De&&(r=De,De=ne,ne=r);var R=So(m,ne),N=So(m,De);if(R&&N&&(O.rangeCount!==1||O.anchorNode!==R.node||O.anchorOffset!==R.offset||O.focusNode!==N.node||O.focusOffset!==N.offset)){var C=k.createRange();C.setStart(R.node,R.offset),O.removeAllRanges(),ne>De?(O.addRange(C),O.extend(N.node,N.offset)):(C.setEnd(N.node,N.offset),O.addRange(C))}}}}for(k=[],O=m;O=O.parentNode;)O.nodeType===1&&k.push({element:O,left:O.scrollLeft,top:O.scrollTop});for(typeof m.focus=="function"&&m.focus(),m=0;m<k.length;m++){var B=k[m];B.element.scrollLeft=B.left,B.element.scrollTop=B.top}}Ci=!!Yc,Gc=Yc=null}finally{Re=n,Q.p=a,z.T=l}}e.current=t,et=2}}function Lf(){if(et===2){et=0;var e=Gl,t=Pa,l=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||l){l=z.T,z.T=null;var a=Q.p;Q.p=2;var n=Re;Re|=4;try{mf(e,t.alternate,t)}finally{Re=n,Q.p=a,z.T=l}}et=3}}function kf(){if(et===4||et===3){et=0,$h();var e=Gl,t=Pa,l=yl,a=Rf;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?et=5:(et=0,Pa=Gl=null,Yf(e,e.pendingLanes));var n=e.pendingLanes;if(n===0&&(Yl=null),Ki(l),t=t.stateNode,jt&&typeof jt.onCommitFiberRoot=="function")try{jt.onCommitFiberRoot(mn,t,void 0,(t.current.flags&128)===128)}catch{}if(a!==null){t=z.T,n=Q.p,Q.p=2,z.T=null;try{for(var s=e.onRecoverableError,r=0;r<a.length;r++){var m=a[r];s(m.value,{componentStack:m.stack})}}finally{z.T=t,Q.p=n}}(yl&3)!==0&&xi(),el(e),n=e.pendingLanes,(l&261930)!==0&&(n&42)!==0?e===Tc?Kn++:(Kn=0,Tc=e):Kn=0,Jn(0)}}function Yf(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Mn(t)))}function xi(){return Bf(),Lf(),kf(),Gf()}function Gf(){if(et!==5)return!1;var e=Gl,t=Rc;Rc=0;var l=Ki(yl),a=z.T,n=Q.p;try{Q.p=32>l?32:l,z.T=null,l=Cc,Cc=null;var s=Gl,r=yl;if(et=0,Pa=Gl=null,yl=0,(Re&6)!==0)throw Error(c(331));var m=Re;if(Re|=4,Nf(s.current),bf(s,s.current,r,l),Re=m,Jn(0,!1),jt&&typeof jt.onPostCommitFiberRoot=="function")try{jt.onPostCommitFiberRoot(mn,s)}catch{}return!0}finally{Q.p=n,z.T=a,Yf(e,t)}}function Qf(e,t,l){t=Bt(l,t),t=ic(e.stateNode,t,2),e=Ul(e,t,2),e!==null&&(xn(e,2),el(e))}function Me(e,t,l){if(e.tag===3)Qf(e,e,l);else for(;t!==null;){if(t.tag===3){Qf(t,e,l);break}else if(t.tag===1){var a=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof a.componentDidCatch=="function"&&(Yl===null||!Yl.has(a))){e=Bt(l,e),l=Qd(2),a=Ul(t,l,2),a!==null&&(Xd(l,a,t,e),xn(a,2),el(a));break}}t=t.return}}function _c(e,t,l){var a=e.pingCache;if(a===null){a=e.pingCache=new yx;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)||(Nc=!0,n.add(l),e=Ex.bind(null,e,t,l),t.then(e,e))}function Ex(e,t,l){var a=e.pingCache;a!==null&&a.delete(t),e.pingedLanes|=e.suspendedLanes&l,e.warmLanes&=~l,Oe===e&&(ye&l)===l&&(Ve===4||Ve===3&&(ye&62914560)===ye&&300>St()-ri?(Re&2)===0&&Ia(e,0):Ec|=l,Wa===ye&&(Wa=0)),el(e)}function Xf(e,t){t===0&&(t=qr()),e=sa(e,t),e!==null&&(xn(e,t),el(e))}function wx(e){var t=e.memoizedState,l=0;t!==null&&(l=t.retryLane),Xf(e,l)}function Rx(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(c(314))}a!==null&&a.delete(t),Xf(e,l)}function Cx(e,t){return ba(e,t)}var vi=null,tn=null,zc=!1,pi=!1,Dc=!1,Xl=0;function el(e){e!==tn&&e.next===null&&(tn===null?vi=tn=e:tn=tn.next=e),pi=!0,zc||(zc=!0,Mx())}function Jn(e,t){if(!Dc&&pi){Dc=!0;do for(var l=!1,a=vi;a!==null;){if(e!==0){var n=a.pendingLanes;if(n===0)var s=0;else{var r=a.suspendedLanes,m=a.pingedLanes;s=(1<<31-Nt(42|e)+1)-1,s&=n&~(r&~m),s=s&201326741?s&201326741|1:s?s|2:0}s!==0&&(l=!0,Kf(a,s))}else s=ye,s=Ss(a,a===Oe?s:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),(s&3)===0||hn(a,s)||(l=!0,Kf(a,s));a=a.next}while(l);Dc=!1}}function Tx(){Vf()}function Vf(){pi=zc=!1;var e=0;Xl!==0&&Lx()&&(e=Xl);for(var t=St(),l=null,a=vi;a!==null;){var n=a.next,s=Zf(a,t);s===0?(a.next=null,l===null?vi=n:l.next=n,n===null&&(tn=l)):(l=a,(e!==0||(s&3)!==0)&&(pi=!0)),a=n}et!==0&&et!==5||Jn(e),Xl!==0&&(Xl=0)}function Zf(e,t){for(var l=e.suspendedLanes,a=e.pingedLanes,n=e.expirationTimes,s=e.pendingLanes&-62914561;0<s;){var r=31-Nt(s),m=1<<r,S=n[r];S===-1?((m&l)===0||(m&a)!==0)&&(n[r]=t0(m,t)):S<=t&&(e.expiredLanes|=m),s&=~m}if(t=Oe,l=ye,l=Ss(e,e===t?l:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a=e.callbackNode,l===0||e===t&&(Te===2||Te===9)||e.cancelPendingCommit!==null)return a!==null&&a!==null&&Sa(a),e.callbackNode=null,e.callbackPriority=0;if((l&3)===0||hn(e,l)){if(t=l&-l,t===e.callbackPriority)return t;switch(a!==null&&Sa(a),Ki(l)){case 2:case 8:l=Or;break;case 32:l=ps;break;case 268435456:l=Ur;break;default:l=ps}return a=$f.bind(null,e),l=ba(l,a),e.callbackPriority=t,e.callbackNode=l,t}return a!==null&&a!==null&&Sa(a),e.callbackPriority=2,e.callbackNode=null,2}function $f(e,t){if(et!==0&&et!==5)return e.callbackNode=null,e.callbackPriority=0,null;var l=e.callbackNode;if(xi()&&e.callbackNode!==l)return null;var a=ye;return a=Ss(e,e===Oe?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a===0?null:(Tf(e,a,t),Zf(e,St()),e.callbackNode!=null&&e.callbackNode===l?$f.bind(null,e):null)}function Kf(e,t){if(xi())return null;Tf(e,t,!0)}function Mx(){Yx(function(){(Re&6)!==0?ba(Dr,Tx):Vf()})}function Oc(){if(Xl===0){var e=ka;e===0&&(e=gs,gs<<=1,(gs&261888)===0&&(gs=256)),Xl=e}return Xl}function Jf(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:ws(""+e)}function Ff(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 Ax(e,t,l,a,n){if(t==="submit"&&l&&l.stateNode===n){var s=Jf((n[mt]||null).action),r=a.submitter;r&&(t=(t=r[mt]||null)?Jf(t.formAction):r.getAttribute("formAction"),t!==null&&(s=t,r=null));var m=new Ms("action","action",null,a,n);e.push({event:m,listeners:[{instance:null,listener:function(){if(a.defaultPrevented){if(Xl!==0){var S=r?Ff(n,r):new FormData(n);ec(l,{pending:!0,data:S,method:n.method,action:s},null,S)}}else typeof s=="function"&&(m.preventDefault(),S=r?Ff(n,r):new FormData(n),ec(l,{pending:!0,data:S,method:n.method,action:s},s,S))},currentTarget:n}]})}}for(var Uc=0;Uc<pu.length;Uc++){var qc=pu[Uc],_x=qc.toLowerCase(),zx=qc[0].toUpperCase()+qc.slice(1);Zt(_x,"on"+zx)}Zt(Ro,"onAnimationEnd"),Zt(Co,"onAnimationIteration"),Zt(To,"onAnimationStart"),Zt("dblclick","onDoubleClick"),Zt("focusin","onFocus"),Zt("focusout","onBlur"),Zt(K0,"onTransitionRun"),Zt(J0,"onTransitionStart"),Zt(F0,"onTransitionCancel"),Zt(Mo,"onTransitionEnd"),Ra("onMouseEnter",["mouseout","mouseover"]),Ra("onMouseLeave",["mouseout","mouseover"]),Ra("onPointerEnter",["pointerout","pointerover"]),Ra("onPointerLeave",["pointerout","pointerover"]),ta("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),ta("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),ta("onBeforeInput",["compositionend","keypress","textInput","paste"]),ta("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),ta("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),ta("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Fn="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(" "),Dx=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Fn));function Wf(e,t){t=(t&4)!==0;for(var l=0;l<e.length;l++){var a=e[l],n=a.event;a=a.listeners;e:{var s=void 0;if(t)for(var r=a.length-1;0<=r;r--){var m=a[r],S=m.instance,T=m.currentTarget;if(m=m.listener,S!==s&&n.isPropagationStopped())break e;s=m,n.currentTarget=T;try{s(n)}catch(q){zs(q)}n.currentTarget=null,s=S}else for(r=0;r<a.length;r++){if(m=a[r],S=m.instance,T=m.currentTarget,m=m.listener,S!==s&&n.isPropagationStopped())break e;s=m,n.currentTarget=T;try{s(n)}catch(q){zs(q)}n.currentTarget=null,s=S}}}}function pe(e,t){var l=t[Ji];l===void 0&&(l=t[Ji]=new Set);var a=e+"__bubble";l.has(a)||(Pf(t,e,2,!1),l.add(a))}function Hc(e,t,l){var a=0;t&&(a|=4),Pf(l,e,a,t)}var gi="_reactListening"+Math.random().toString(36).slice(2);function Bc(e){if(!e[gi]){e[gi]=!0,Qr.forEach(function(l){l!=="selectionchange"&&(Dx.has(l)||Hc(l,!1,e),Hc(l,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[gi]||(t[gi]=!0,Hc("selectionchange",!1,t))}}function Pf(e,t,l,a){switch(Cm(t)){case 2:var n=uv;break;case 8:n=cv;break;default:n=Ic}l=n.bind(null,t,l,e),n=void 0,!nu||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 Lc(e,t,l,a,n){var s=a;if((t&1)===0&&(t&2)===0&&a!==null)e:for(;;){if(a===null)return;var r=a.tag;if(r===3||r===4){var m=a.stateNode.containerInfo;if(m===n)break;if(r===4)for(r=a.return;r!==null;){var S=r.tag;if((S===3||S===4)&&r.stateNode.containerInfo===n)return;r=r.return}for(;m!==null;){if(r=Na(m),r===null)return;if(S=r.tag,S===5||S===6||S===26||S===27){a=s=r;continue e}m=m.parentNode}}a=a.return}to(function(){var T=s,q=lu(l),k=[];e:{var A=Ao.get(e);if(A!==void 0){var O=Ms,F=e;switch(e){case"keypress":if(Cs(l)===0)break e;case"keydown":case"keyup":O=R0;break;case"focusin":F="focus",O=cu;break;case"focusout":F="blur",O=cu;break;case"beforeblur":case"afterblur":O=cu;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=no;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":O=h0;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":O=M0;break;case Ro:case Co:case To:O=p0;break;case Mo:O=_0;break;case"scroll":case"scrollend":O=f0;break;case"wheel":O=D0;break;case"copy":case"cut":case"paste":O=y0;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":O=io;break;case"toggle":case"beforetoggle":O=U0}var ne=(t&4)!==0,De=!ne&&(e==="scroll"||e==="scrollend"),R=ne?A!==null?A+"Capture":null:A;ne=[];for(var N=T,C;N!==null;){var B=N;if(C=B.stateNode,B=B.tag,B!==5&&B!==26&&B!==27||C===null||R===null||(B=gn(N,R),B!=null&&ne.push(Wn(N,B,C))),De)break;N=N.return}0<ne.length&&(A=new O(A,F,null,l,q),k.push({event:A,listeners:ne}))}}if((t&7)===0){e:{if(A=e==="mouseover"||e==="pointerover",O=e==="mouseout"||e==="pointerout",A&&l!==tu&&(F=l.relatedTarget||l.fromElement)&&(Na(F)||F[ja]))break e;if((O||A)&&(A=q.window===q?q:(A=q.ownerDocument)?A.defaultView||A.parentWindow:window,O?(F=l.relatedTarget||l.toElement,O=T,F=F?Na(F):null,F!==null&&(De=x(F),ne=F.tag,F!==De||ne!==5&&ne!==27&&ne!==6)&&(F=null)):(O=null,F=T),O!==F)){if(ne=no,B="onMouseLeave",R="onMouseEnter",N="mouse",(e==="pointerout"||e==="pointerover")&&(ne=io,B="onPointerLeave",R="onPointerEnter",N="pointer"),De=O==null?A:pn(O),C=F==null?A:pn(F),A=new ne(B,N+"leave",O,l,q),A.target=De,A.relatedTarget=C,B=null,Na(q)===T&&(ne=new ne(R,N+"enter",F,l,q),ne.target=C,ne.relatedTarget=De,B=ne),De=B,O&&F)t:{for(ne=Ox,R=O,N=F,C=0,B=R;B;B=ne(B))C++;B=0;for(var te=N;te;te=ne(te))B++;for(;0<C-B;)R=ne(R),C--;for(;0<B-C;)N=ne(N),B--;for(;C--;){if(R===N||N!==null&&R===N.alternate){ne=R;break t}R=ne(R),N=ne(N)}ne=null}else ne=null;O!==null&&If(k,A,O,ne,!1),F!==null&&De!==null&&If(k,De,F,ne,!0)}}e:{if(A=T?pn(T):window,O=A.nodeName&&A.nodeName.toLowerCase(),O==="select"||O==="input"&&A.type==="file")var Ee=xo;else if(mo(A))if(vo)Ee=V0;else{Ee=Q0;var W=G0}else O=A.nodeName,!O||O.toLowerCase()!=="input"||A.type!=="checkbox"&&A.type!=="radio"?T&&eu(T.elementType)&&(Ee=xo):Ee=X0;if(Ee&&(Ee=Ee(e,T))){ho(k,Ee,l,q);break e}W&&W(e,A,T),e==="focusout"&&T&&A.type==="number"&&T.memoizedProps.value!=null&&Ii(A,"number",A.value)}switch(W=T?pn(T):window,e){case"focusin":(mo(W)||W.contentEditable==="true")&&(za=W,hu=T,Rn=null);break;case"focusout":Rn=hu=za=null;break;case"mousedown":xu=!0;break;case"contextmenu":case"mouseup":case"dragend":xu=!1,Eo(k,l,q);break;case"selectionchange":if($0)break;case"keydown":case"keyup":Eo(k,l,q)}var fe;if(ou)e:{switch(e){case"compositionstart":var be="onCompositionStart";break e;case"compositionend":be="onCompositionEnd";break e;case"compositionupdate":be="onCompositionUpdate";break e}be=void 0}else _a?oo(e,l)&&(be="onCompositionEnd"):e==="keydown"&&l.keyCode===229&&(be="onCompositionStart");be&&(uo&&l.locale!=="ko"&&(_a||be!=="onCompositionStart"?be==="onCompositionEnd"&&_a&&(fe=lo()):(Tl=q,su="value"in Tl?Tl.value:Tl.textContent,_a=!0)),W=yi(T,be),0<W.length&&(be=new so(be,e,null,l,q),k.push({event:be,listeners:W}),fe?be.data=fe:(fe=fo(l),fe!==null&&(be.data=fe)))),(fe=H0?B0(e,l):L0(e,l))&&(be=yi(T,"onBeforeInput"),0<be.length&&(W=new so("onBeforeInput","beforeinput",null,l,q),k.push({event:W,listeners:be}),W.data=fe)),Ax(k,e,T,l,q)}Wf(k,t)})}function Wn(e,t,l){return{instance:e,listener:t,currentTarget:l}}function yi(e,t){for(var l=t+"Capture",a=[];e!==null;){var n=e,s=n.stateNode;if(n=n.tag,n!==5&&n!==26&&n!==27||s===null||(n=gn(e,l),n!=null&&a.unshift(Wn(e,n,s)),n=gn(e,t),n!=null&&a.push(Wn(e,n,s))),e.tag===3)return a;e=e.return}return[]}function Ox(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function If(e,t,l,a,n){for(var s=t._reactName,r=[];l!==null&&l!==a;){var m=l,S=m.alternate,T=m.stateNode;if(m=m.tag,S!==null&&S===a)break;m!==5&&m!==26&&m!==27||T===null||(S=T,n?(T=gn(l,s),T!=null&&r.unshift(Wn(l,T,S))):n||(T=gn(l,s),T!=null&&r.push(Wn(l,T,S)))),l=l.return}r.length!==0&&e.push({event:t,listeners:r})}var Ux=/\r\n?/g,qx=/\u0000|\uFFFD/g;function em(e){return(typeof e=="string"?e:""+e).replace(Ux,`
49
+ `).replace(qx,"")}function tm(e,t){return t=em(t),em(e)===t}function ze(e,t,l,a,n,s){switch(l){case"children":typeof a=="string"?t==="body"||t==="textarea"&&a===""||Ta(e,a):(typeof a=="number"||typeof a=="bigint")&&t!=="body"&&Ta(e,""+a);break;case"className":Ns(e,"class",a);break;case"tabIndex":Ns(e,"tabindex",a);break;case"dir":case"role":case"viewBox":case"width":case"height":Ns(e,l,a);break;case"style":Ir(e,a,s);break;case"data":if(t!=="object"){Ns(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=ws(""+a),e.setAttribute(l,a);break;case"action":case"formAction":if(typeof a=="function"){e.setAttribute(l,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof s=="function"&&(l==="formAction"?(t!=="input"&&ze(e,t,"name",n.name,n,null),ze(e,t,"formEncType",n.formEncType,n,null),ze(e,t,"formMethod",n.formMethod,n,null),ze(e,t,"formTarget",n.formTarget,n,null)):(ze(e,t,"encType",n.encType,n,null),ze(e,t,"method",n.method,n,null),ze(e,t,"target",n.target,n,null)));if(a==null||typeof a=="symbol"||typeof a=="boolean"){e.removeAttribute(l);break}a=ws(""+a),e.setAttribute(l,a);break;case"onClick":a!=null&&(e.onclick=nl);break;case"onScroll":a!=null&&pe("scroll",e);break;case"onScrollEnd":a!=null&&pe("scrollend",e);break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(c(61));if(l=a.__html,l!=null){if(n.children!=null)throw Error(c(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=ws(""+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":pe("beforetoggle",e),pe("toggle",e),js(e,"popover",a);break;case"xlinkActuate":al(e,"http://www.w3.org/1999/xlink","xlink:actuate",a);break;case"xlinkArcrole":al(e,"http://www.w3.org/1999/xlink","xlink:arcrole",a);break;case"xlinkRole":al(e,"http://www.w3.org/1999/xlink","xlink:role",a);break;case"xlinkShow":al(e,"http://www.w3.org/1999/xlink","xlink:show",a);break;case"xlinkTitle":al(e,"http://www.w3.org/1999/xlink","xlink:title",a);break;case"xlinkType":al(e,"http://www.w3.org/1999/xlink","xlink:type",a);break;case"xmlBase":al(e,"http://www.w3.org/XML/1998/namespace","xml:base",a);break;case"xmlLang":al(e,"http://www.w3.org/XML/1998/namespace","xml:lang",a);break;case"xmlSpace":al(e,"http://www.w3.org/XML/1998/namespace","xml:space",a);break;case"is":js(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=o0.get(l)||l,js(e,l,a))}}function kc(e,t,l,a,n,s){switch(l){case"style":Ir(e,a,s);break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(c(61));if(l=a.__html,l!=null){if(n.children!=null)throw Error(c(60));e.innerHTML=l}}break;case"children":typeof a=="string"?Ta(e,a):(typeof a=="number"||typeof a=="bigint")&&Ta(e,""+a);break;case"onScroll":a!=null&&pe("scroll",e);break;case"onScrollEnd":a!=null&&pe("scrollend",e);break;case"onClick":a!=null&&(e.onclick=nl);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Xr.hasOwnProperty(l))e:{if(l[0]==="o"&&l[1]==="n"&&(n=l.endsWith("Capture"),t=l.slice(2,n?l.length-7:void 0),s=e[mt]||null,s=s!=null?s[l]:null,typeof s=="function"&&e.removeEventListener(t,s,n),typeof a=="function")){typeof s!="function"&&s!==null&&(l in e?e[l]=null:e.hasAttribute(l)&&e.removeAttribute(l)),e.addEventListener(t,a,n);break e}l in e?e[l]=a:a===!0?e.setAttribute(l,""):js(e,l,a)}}}function ct(e,t,l){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":pe("error",e),pe("load",e);var a=!1,n=!1,s;for(s in l)if(l.hasOwnProperty(s)){var r=l[s];if(r!=null)switch(s){case"src":a=!0;break;case"srcSet":n=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(c(137,t));default:ze(e,t,s,r,l,null)}}n&&ze(e,t,"srcSet",l.srcSet,l,null),a&&ze(e,t,"src",l.src,l,null);return;case"input":pe("invalid",e);var m=s=r=n=null,S=null,T=null;for(a in l)if(l.hasOwnProperty(a)){var q=l[a];if(q!=null)switch(a){case"name":n=q;break;case"type":r=q;break;case"checked":S=q;break;case"defaultChecked":T=q;break;case"value":s=q;break;case"defaultValue":m=q;break;case"children":case"dangerouslySetInnerHTML":if(q!=null)throw Error(c(137,t));break;default:ze(e,t,a,q,l,null)}}Jr(e,s,m,S,T,r,n,!1);return;case"select":pe("invalid",e),a=r=s=null;for(n in l)if(l.hasOwnProperty(n)&&(m=l[n],m!=null))switch(n){case"value":s=m;break;case"defaultValue":r=m;break;case"multiple":a=m;default:ze(e,t,n,m,l,null)}t=s,l=r,e.multiple=!!a,t!=null?Ca(e,!!a,t,!1):l!=null&&Ca(e,!!a,l,!0);return;case"textarea":pe("invalid",e),s=n=a=null;for(r in l)if(l.hasOwnProperty(r)&&(m=l[r],m!=null))switch(r){case"value":a=m;break;case"defaultValue":n=m;break;case"children":s=m;break;case"dangerouslySetInnerHTML":if(m!=null)throw Error(c(91));break;default:ze(e,t,r,m,l,null)}Wr(e,a,n,s);return;case"option":for(S in l)if(l.hasOwnProperty(S)&&(a=l[S],a!=null))switch(S){case"selected":e.selected=a&&typeof a!="function"&&typeof a!="symbol";break;default:ze(e,t,S,a,l,null)}return;case"dialog":pe("beforetoggle",e),pe("toggle",e),pe("cancel",e),pe("close",e);break;case"iframe":case"object":pe("load",e);break;case"video":case"audio":for(a=0;a<Fn.length;a++)pe(Fn[a],e);break;case"image":pe("error",e),pe("load",e);break;case"details":pe("toggle",e);break;case"embed":case"source":case"link":pe("error",e),pe("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(T in l)if(l.hasOwnProperty(T)&&(a=l[T],a!=null))switch(T){case"children":case"dangerouslySetInnerHTML":throw Error(c(137,t));default:ze(e,t,T,a,l,null)}return;default:if(eu(t)){for(q in l)l.hasOwnProperty(q)&&(a=l[q],a!==void 0&&kc(e,t,q,a,l,void 0));return}}for(m in l)l.hasOwnProperty(m)&&(a=l[m],a!=null&&ze(e,t,m,a,l,null))}function Hx(e,t,l,a){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var n=null,s=null,r=null,m=null,S=null,T=null,q=null;for(O in l){var k=l[O];if(l.hasOwnProperty(O)&&k!=null)switch(O){case"checked":break;case"value":break;case"defaultValue":S=k;default:a.hasOwnProperty(O)||ze(e,t,O,null,a,k)}}for(var A in a){var O=a[A];if(k=l[A],a.hasOwnProperty(A)&&(O!=null||k!=null))switch(A){case"type":s=O;break;case"name":n=O;break;case"checked":T=O;break;case"defaultChecked":q=O;break;case"value":r=O;break;case"defaultValue":m=O;break;case"children":case"dangerouslySetInnerHTML":if(O!=null)throw Error(c(137,t));break;default:O!==k&&ze(e,t,A,O,a,k)}}Pi(e,r,m,S,T,q,s,n);return;case"select":O=r=m=A=null;for(s in l)if(S=l[s],l.hasOwnProperty(s)&&S!=null)switch(s){case"value":break;case"multiple":O=S;default:a.hasOwnProperty(s)||ze(e,t,s,null,a,S)}for(n in a)if(s=a[n],S=l[n],a.hasOwnProperty(n)&&(s!=null||S!=null))switch(n){case"value":A=s;break;case"defaultValue":m=s;break;case"multiple":r=s;default:s!==S&&ze(e,t,n,s,a,S)}t=m,l=r,a=O,A!=null?Ca(e,!!l,A,!1):!!a!=!!l&&(t!=null?Ca(e,!!l,t,!0):Ca(e,!!l,l?[]:"",!1));return;case"textarea":O=A=null;for(m in l)if(n=l[m],l.hasOwnProperty(m)&&n!=null&&!a.hasOwnProperty(m))switch(m){case"value":break;case"children":break;default:ze(e,t,m,null,a,n)}for(r in a)if(n=a[r],s=l[r],a.hasOwnProperty(r)&&(n!=null||s!=null))switch(r){case"value":A=n;break;case"defaultValue":O=n;break;case"children":break;case"dangerouslySetInnerHTML":if(n!=null)throw Error(c(91));break;default:n!==s&&ze(e,t,r,n,a,s)}Fr(e,A,O);return;case"option":for(var F in l)if(A=l[F],l.hasOwnProperty(F)&&A!=null&&!a.hasOwnProperty(F))switch(F){case"selected":e.selected=!1;break;default:ze(e,t,F,null,a,A)}for(S in a)if(A=a[S],O=l[S],a.hasOwnProperty(S)&&A!==O&&(A!=null||O!=null))switch(S){case"selected":e.selected=A&&typeof A!="function"&&typeof A!="symbol";break;default:ze(e,t,S,A,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 ne in l)A=l[ne],l.hasOwnProperty(ne)&&A!=null&&!a.hasOwnProperty(ne)&&ze(e,t,ne,null,a,A);for(T in a)if(A=a[T],O=l[T],a.hasOwnProperty(T)&&A!==O&&(A!=null||O!=null))switch(T){case"children":case"dangerouslySetInnerHTML":if(A!=null)throw Error(c(137,t));break;default:ze(e,t,T,A,a,O)}return;default:if(eu(t)){for(var De in l)A=l[De],l.hasOwnProperty(De)&&A!==void 0&&!a.hasOwnProperty(De)&&kc(e,t,De,void 0,a,A);for(q in a)A=a[q],O=l[q],!a.hasOwnProperty(q)||A===O||A===void 0&&O===void 0||kc(e,t,q,A,a,O);return}}for(var R in l)A=l[R],l.hasOwnProperty(R)&&A!=null&&!a.hasOwnProperty(R)&&ze(e,t,R,null,a,A);for(k in a)A=a[k],O=l[k],!a.hasOwnProperty(k)||A===O||A==null&&O==null||ze(e,t,k,A,a,O)}function lm(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function Bx(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,l=performance.getEntriesByType("resource"),a=0;a<l.length;a++){var n=l[a],s=n.transferSize,r=n.initiatorType,m=n.duration;if(s&&m&&lm(r)){for(r=0,m=n.responseEnd,a+=1;a<l.length;a++){var S=l[a],T=S.startTime;if(T>m)break;var q=S.transferSize,k=S.initiatorType;q&&lm(k)&&(S=S.responseEnd,r+=q*(S<m?1:(m-T)/(S-T)))}if(--a,t+=8*(s+r)/(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 Yc=null,Gc=null;function bi(e){return e.nodeType===9?e:e.ownerDocument}function am(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 nm(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 Qc(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 Xc=null;function Lx(){var e=window.event;return e&&e.type==="popstate"?e===Xc?!1:(Xc=e,!0):(Xc=null,!1)}var sm=typeof setTimeout=="function"?setTimeout:void 0,kx=typeof clearTimeout=="function"?clearTimeout:void 0,im=typeof Promise=="function"?Promise:void 0,Yx=typeof queueMicrotask=="function"?queueMicrotask:typeof im<"u"?function(e){return im.resolve(null).then(e).catch(Gx)}:sm;function Gx(e){setTimeout(function(){throw e})}function Vl(e){return e==="head"}function um(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),sn(t);return}a--}else if(l==="$"||l==="$?"||l==="$~"||l==="$!"||l==="&")a++;else if(l==="html")Pn(e.ownerDocument.documentElement);else if(l==="head"){l=e.ownerDocument.head,Pn(l);for(var s=l.firstChild;s;){var r=s.nextSibling,m=s.nodeName;s[vn]||m==="SCRIPT"||m==="STYLE"||m==="LINK"&&s.rel.toLowerCase()==="stylesheet"||l.removeChild(s),s=r}}else l==="body"&&Pn(e.ownerDocument.body);l=n}while(l);sn(t)}function cm(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 Vc(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":Vc(l),Fi(l);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(l.rel.toLowerCase()==="stylesheet")continue}e.removeChild(l)}}function Qx(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[vn])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(s=e.getAttribute("rel"),s==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(s!==n.rel||e.getAttribute("href")!==(n.href==null||n.href===""?null:n.href)||e.getAttribute("crossorigin")!==(n.crossOrigin==null?null:n.crossOrigin)||e.getAttribute("title")!==(n.title==null?null:n.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(s=e.getAttribute("src"),(s!==(n.src==null?null:n.src)||e.getAttribute("type")!==(n.type==null?null:n.type)||e.getAttribute("crossorigin")!==(n.crossOrigin==null?null:n.crossOrigin))&&s&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var s=n.name==null?null:""+n.name;if(n.type==="hidden"&&e.getAttribute("name")===s)return e}else return e;if(e=Qt(e.nextSibling),e===null)break}return null}function Xx(e,t,l){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!l||(e=Qt(e.nextSibling),e===null))return null;return e}function rm(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=Qt(e.nextSibling),e===null))return null;return e}function Zc(e){return e.data==="$?"||e.data==="$~"}function $c(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function Vx(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 Qt(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 Kc=null;function om(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var l=e.data;if(l==="/$"||l==="/&"){if(t===0)return Qt(e.nextSibling);t--}else l!=="$"&&l!=="$!"&&l!=="$?"&&l!=="$~"&&l!=="&"||t++}e=e.nextSibling}return null}function dm(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 fm(e,t,l){switch(t=bi(l),e){case"html":if(e=t.documentElement,!e)throw Error(c(452));return e;case"head":if(e=t.head,!e)throw Error(c(453));return e;case"body":if(e=t.body,!e)throw Error(c(454));return e;default:throw Error(c(451))}}function Pn(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Fi(e)}var Xt=new Map,mm=new Set;function Si(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var bl=Q.d;Q.d={f:Zx,r:$x,D:Kx,C:Jx,L:Fx,m:Wx,X:Ix,S:Px,M:ev};function Zx(){var e=bl.f(),t=fi();return e||t}function $x(e){var t=Ea(e);t!==null&&t.tag===5&&t.type==="form"?Md(t):bl.r(e)}var ln=typeof document>"u"?null:document;function hm(e,t,l){var a=ln;if(a&&typeof t=="string"&&t){var n=qt(t);n='link[rel="'+e+'"][href="'+n+'"]',typeof l=="string"&&(n+='[crossorigin="'+l+'"]'),mm.has(n)||(mm.add(n),e={rel:e,crossOrigin:l,href:t},a.querySelector(n)===null&&(t=a.createElement("link"),ct(t,"link",e),lt(t),a.head.appendChild(t)))}}function Kx(e){bl.D(e),hm("dns-prefetch",e,null)}function Jx(e,t){bl.C(e,t),hm("preconnect",e,t)}function Fx(e,t,l){bl.L(e,t,l);var a=ln;if(a&&e&&t){var n='link[rel="preload"][as="'+qt(t)+'"]';t==="image"&&l&&l.imageSrcSet?(n+='[imagesrcset="'+qt(l.imageSrcSet)+'"]',typeof l.imageSizes=="string"&&(n+='[imagesizes="'+qt(l.imageSizes)+'"]')):n+='[href="'+qt(e)+'"]';var s=n;switch(t){case"style":s=an(e);break;case"script":s=nn(e)}Xt.has(s)||(e=b({rel:"preload",href:t==="image"&&l&&l.imageSrcSet?void 0:e,as:t},l),Xt.set(s,e),a.querySelector(n)!==null||t==="style"&&a.querySelector(In(s))||t==="script"&&a.querySelector(es(s))||(t=a.createElement("link"),ct(t,"link",e),lt(t),a.head.appendChild(t)))}}function Wx(e,t){bl.m(e,t);var l=ln;if(l&&e){var a=t&&typeof t.as=="string"?t.as:"script",n='link[rel="modulepreload"][as="'+qt(a)+'"][href="'+qt(e)+'"]',s=n;switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":s=nn(e)}if(!Xt.has(s)&&(e=b({rel:"modulepreload",href:e},t),Xt.set(s,e),l.querySelector(n)===null)){switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(l.querySelector(es(s)))return}a=l.createElement("link"),ct(a,"link",e),lt(a),l.head.appendChild(a)}}}function Px(e,t,l){bl.S(e,t,l);var a=ln;if(a&&e){var n=wa(a).hoistableStyles,s=an(e);t=t||"default";var r=n.get(s);if(!r){var m={loading:0,preload:null};if(r=a.querySelector(In(s)))m.loading=5;else{e=b({rel:"stylesheet",href:e,"data-precedence":t},l),(l=Xt.get(s))&&Jc(e,l);var S=r=a.createElement("link");lt(S),ct(S,"link",e),S._p=new Promise(function(T,q){S.onload=T,S.onerror=q}),S.addEventListener("load",function(){m.loading|=1}),S.addEventListener("error",function(){m.loading|=2}),m.loading|=4,ji(r,t,a)}r={type:"stylesheet",instance:r,count:1,state:m},n.set(s,r)}}}function Ix(e,t){bl.X(e,t);var l=ln;if(l&&e){var a=wa(l).hoistableScripts,n=nn(e),s=a.get(n);s||(s=l.querySelector(es(n)),s||(e=b({src:e,async:!0},t),(t=Xt.get(n))&&Fc(e,t),s=l.createElement("script"),lt(s),ct(s,"link",e),l.head.appendChild(s)),s={type:"script",instance:s,count:1,state:null},a.set(n,s))}}function ev(e,t){bl.M(e,t);var l=ln;if(l&&e){var a=wa(l).hoistableScripts,n=nn(e),s=a.get(n);s||(s=l.querySelector(es(n)),s||(e=b({src:e,async:!0,type:"module"},t),(t=Xt.get(n))&&Fc(e,t),s=l.createElement("script"),lt(s),ct(s,"link",e),l.head.appendChild(s)),s={type:"script",instance:s,count:1,state:null},a.set(n,s))}}function xm(e,t,l,a){var n=(n=me.current)?Si(n):null;if(!n)throw Error(c(446));switch(e){case"meta":case"title":return null;case"style":return typeof l.precedence=="string"&&typeof l.href=="string"?(t=an(l.href),l=wa(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=an(l.href);var s=wa(n).hoistableStyles,r=s.get(e);if(r||(n=n.ownerDocument||n,r={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},s.set(e,r),(s=n.querySelector(In(e)))&&!s._p&&(r.instance=s,r.state.loading=5),Xt.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},Xt.set(e,l),s||tv(n,e,l,r.state))),t&&a===null)throw Error(c(528,""));return r}if(t&&a!==null)throw Error(c(529,""));return null;case"script":return t=l.async,l=l.src,typeof l=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=nn(l),l=wa(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(c(444,e))}}function an(e){return'href="'+qt(e)+'"'}function In(e){return'link[rel="stylesheet"]['+e+"]"}function vm(e){return b({},e,{"data-precedence":e.precedence,precedence:null})}function tv(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}),ct(t,"link",l),lt(t),e.head.appendChild(t))}function nn(e){return'[src="'+qt(e)+'"]'}function es(e){return"script[async]"+e}function pm(e,t,l){if(t.count++,t.instance===null)switch(t.type){case"style":var a=e.querySelector('style[data-href~="'+qt(l.href)+'"]');if(a)return t.instance=a,lt(a),a;var n=b({},l,{"data-href":l.href,"data-precedence":l.precedence,href:null,precedence:null});return a=(e.ownerDocument||e).createElement("style"),lt(a),ct(a,"style",n),ji(a,l.precedence,e),t.instance=a;case"stylesheet":n=an(l.href);var s=e.querySelector(In(n));if(s)return t.state.loading|=4,t.instance=s,lt(s),s;a=vm(l),(n=Xt.get(n))&&Jc(a,n),s=(e.ownerDocument||e).createElement("link"),lt(s);var r=s;return r._p=new Promise(function(m,S){r.onload=m,r.onerror=S}),ct(s,"link",a),t.state.loading|=4,ji(s,l.precedence,e),t.instance=s;case"script":return s=nn(l.src),(n=e.querySelector(es(s)))?(t.instance=n,lt(n),n):(a=l,(n=Xt.get(s))&&(a=b({},l),Fc(a,n)),e=e.ownerDocument||e,n=e.createElement("script"),lt(n),ct(n,"link",a),e.head.appendChild(n),t.instance=n);case"void":return null;default:throw Error(c(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(a=t.instance,t.state.loading|=4,ji(a,l.precedence,e));return t.instance}function ji(e,t,l){for(var a=l.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),n=a.length?a[a.length-1]:null,s=n,r=0;r<a.length;r++){var m=a[r];if(m.dataset.precedence===t)s=m;else if(s!==n)break}s?s.parentNode.insertBefore(e,s.nextSibling):(t=l.nodeType===9?l.head:l,t.insertBefore(e,t.firstChild))}function Jc(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function Fc(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var Ni=null;function gm(e,t,l){if(Ni===null){var a=new Map,n=Ni=new Map;n.set(l,a)}else n=Ni,a=n.get(l),a||(a=new Map,n.set(l,a));if(a.has(e))return a;for(a.set(e,null),l=l.getElementsByTagName(e),n=0;n<l.length;n++){var s=l[n];if(!(s[vn]||s[nt]||e==="link"&&s.getAttribute("rel")==="stylesheet")&&s.namespaceURI!=="http://www.w3.org/2000/svg"){var r=s.getAttribute(t)||"";r=e+r;var m=a.get(r);m?m.push(s):a.set(r,[s])}}return a}function ym(e,t,l){e=e.ownerDocument||e,e.head.insertBefore(l,t==="title"?e.querySelector("head > title"):null)}function lv(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 bm(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function av(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=an(a.href),s=t.querySelector(In(n));if(s){t=s._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=Ei.bind(e),t.then(e,e)),l.state.loading|=4,l.instance=s,lt(s);return}s=t.ownerDocument||t,a=vm(a),(n=Xt.get(n))&&Jc(a,n),s=s.createElement("link"),lt(s);var r=s;r._p=new Promise(function(m,S){r.onload=m,r.onerror=S}),ct(s,"link",a),l.instance=s}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(l,t),(t=l.state.preload)&&(l.state.loading&3)===0&&(e.count++,l=Ei.bind(e),t.addEventListener("load",l),t.addEventListener("error",l))}}var Wc=0;function nv(e,t){return e.stylesheets&&e.count===0&&Ri(e,e.stylesheets),0<e.count||0<e.imgCount?function(l){var a=setTimeout(function(){if(e.stylesheets&&Ri(e,e.stylesheets),e.unsuspend){var s=e.unsuspend;e.unsuspend=null,s()}},6e4+t);0<e.imgBytes&&Wc===0&&(Wc=62500*Bx());var n=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Ri(e,e.stylesheets),e.unsuspend)){var s=e.unsuspend;e.unsuspend=null,s()}},(e.imgBytes>Wc?50:800)+t);return e.unsuspend=l,function(){e.unsuspend=null,clearTimeout(a),clearTimeout(n)}}:null}function Ei(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Ri(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var wi=null;function Ri(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,wi=new Map,t.forEach(sv,e),wi=null,Ei.call(e))}function sv(e,t){if(!(t.state.loading&4)){var l=wi.get(e);if(l)var a=l.get(null);else{l=new Map,wi.set(e,l);for(var n=e.querySelectorAll("link[data-precedence],style[data-precedence]"),s=0;s<n.length;s++){var r=n[s];(r.nodeName==="LINK"||r.getAttribute("media")!=="not all")&&(l.set(r.dataset.precedence,r),a=r)}a&&l.set(null,a)}n=t.instance,r=n.getAttribute("data-precedence"),s=l.get(r)||a,s===a&&l.set(null,n),l.set(r,n),this.count++,a=Ei.bind(this),n.addEventListener("load",a),n.addEventListener("error",a),s?s.parentNode.insertBefore(n,s.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(n,e.firstChild)),t.state.loading|=4}}var ts={$$typeof:Y,Provider:null,Consumer:null,_currentValue:ee,_currentValue2:ee,_threadCount:0};function iv(e,t,l,a,n,s,r,m,S){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=Zi(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Zi(0),this.hiddenUpdates=Zi(null),this.identifierPrefix=a,this.onUncaughtError=n,this.onCaughtError=s,this.onRecoverableError=r,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=S,this.incompleteTransitions=new Map}function Sm(e,t,l,a,n,s,r,m,S,T,q,k){return e=new iv(e,t,l,r,S,T,q,k,m),t=1,s===!0&&(t|=24),s=wt(3,null,null,t),e.current=s,s.stateNode=e,t=Au(),t.refCount++,e.pooledCache=t,t.refCount++,s.memoizedState={element:a,isDehydrated:l,cache:t},Ou(s),e}function jm(e){return e?(e=Ua,e):Ua}function Nm(e,t,l,a,n,s){n=jm(n),a.context===null?a.context=n:a.pendingContext=n,a=Ol(t),a.payload={element:l},s=s===void 0?null:s,s!==null&&(a.callback=s),l=Ul(e,a,t),l!==null&&(yt(l,e,t),Dn(l,e,t))}function Em(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var l=e.retryLane;e.retryLane=l!==0&&l<t?l:t}}function Pc(e,t){Em(e,t),(e=e.alternate)&&Em(e,t)}function wm(e){if(e.tag===13||e.tag===31){var t=sa(e,67108864);t!==null&&yt(t,e,67108864),Pc(e,67108864)}}function Rm(e){if(e.tag===13||e.tag===31){var t=At();t=$i(t);var l=sa(e,t);l!==null&&yt(l,e,t),Pc(e,t)}}var Ci=!0;function uv(e,t,l,a){var n=z.T;z.T=null;var s=Q.p;try{Q.p=2,Ic(e,t,l,a)}finally{Q.p=s,z.T=n}}function cv(e,t,l,a){var n=z.T;z.T=null;var s=Q.p;try{Q.p=8,Ic(e,t,l,a)}finally{Q.p=s,z.T=n}}function Ic(e,t,l,a){if(Ci){var n=er(a);if(n===null)Lc(e,t,a,Ti,l),Tm(e,a);else if(ov(n,e,t,l,a))a.stopPropagation();else if(Tm(e,a),t&4&&-1<rv.indexOf(e)){for(;n!==null;){var s=Ea(n);if(s!==null)switch(s.tag){case 3:if(s=s.stateNode,s.current.memoizedState.isDehydrated){var r=ea(s.pendingLanes);if(r!==0){var m=s;for(m.pendingLanes|=2,m.entangledLanes|=2;r;){var S=1<<31-Nt(r);m.entanglements[1]|=S,r&=~S}el(s),(Re&6)===0&&(oi=St()+500,Jn(0))}}break;case 31:case 13:m=sa(s,2),m!==null&&yt(m,s,2),fi(),Pc(s,2)}if(s=er(a),s===null&&Lc(e,t,a,Ti,l),s===n)break;n=s}n!==null&&a.stopPropagation()}else Lc(e,t,a,null,l)}}function er(e){return e=lu(e),tr(e)}var Ti=null;function tr(e){if(Ti=null,e=Na(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=p(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 Ti=e,null}function Cm(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(Kh()){case Dr:return 2;case Or:return 8;case ps:case Jh:return 32;case Ur:return 268435456;default:return 32}default:return 32}}var lr=!1,Zl=null,$l=null,Kl=null,ls=new Map,as=new Map,Jl=[],rv="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 Tm(e,t){switch(e){case"focusin":case"focusout":Zl=null;break;case"dragenter":case"dragleave":$l=null;break;case"mouseover":case"mouseout":Kl=null;break;case"pointerover":case"pointerout":ls.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":as.delete(t.pointerId)}}function ns(e,t,l,a,n,s){return e===null||e.nativeEvent!==s?(e={blockedOn:t,domEventName:l,eventSystemFlags:a,nativeEvent:s,targetContainers:[n]},t!==null&&(t=Ea(t),t!==null&&wm(t)),e):(e.eventSystemFlags|=a,t=e.targetContainers,n!==null&&t.indexOf(n)===-1&&t.push(n),e)}function ov(e,t,l,a,n){switch(t){case"focusin":return Zl=ns(Zl,e,t,l,a,n),!0;case"dragenter":return $l=ns($l,e,t,l,a,n),!0;case"mouseover":return Kl=ns(Kl,e,t,l,a,n),!0;case"pointerover":var s=n.pointerId;return ls.set(s,ns(ls.get(s)||null,e,t,l,a,n)),!0;case"gotpointercapture":return s=n.pointerId,as.set(s,ns(as.get(s)||null,e,t,l,a,n)),!0}return!1}function Mm(e){var t=Na(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,Yr(e.priority,function(){Rm(l)});return}}else if(t===31){if(t=p(l),t!==null){e.blockedOn=t,Yr(e.priority,function(){Rm(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 Mi(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var l=er(e.nativeEvent);if(l===null){l=e.nativeEvent;var a=new l.constructor(l.type,l);tu=a,l.target.dispatchEvent(a),tu=null}else return t=Ea(l),t!==null&&wm(t),e.blockedOn=l,!1;t.shift()}return!0}function Am(e,t,l){Mi(e)&&l.delete(t)}function dv(){lr=!1,Zl!==null&&Mi(Zl)&&(Zl=null),$l!==null&&Mi($l)&&($l=null),Kl!==null&&Mi(Kl)&&(Kl=null),ls.forEach(Am),as.forEach(Am)}function Ai(e,t){e.blockedOn===t&&(e.blockedOn=null,lr||(lr=!0,u.unstable_scheduleCallback(u.unstable_NormalPriority,dv)))}var _i=null;function _m(e){_i!==e&&(_i=e,u.unstable_scheduleCallback(u.unstable_NormalPriority,function(){_i===e&&(_i=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(tr(a||l)===null)continue;break}var s=Ea(l);s!==null&&(e.splice(t,3),t-=3,ec(s,{pending:!0,data:n,method:l.method,action:a},a,n))}}))}function sn(e){function t(S){return Ai(S,e)}Zl!==null&&Ai(Zl,e),$l!==null&&Ai($l,e),Kl!==null&&Ai(Kl,e),ls.forEach(t),as.forEach(t);for(var l=0;l<Jl.length;l++){var a=Jl[l];a.blockedOn===e&&(a.blockedOn=null)}for(;0<Jl.length&&(l=Jl[0],l.blockedOn===null);)Mm(l),l.blockedOn===null&&Jl.shift();if(l=(e.ownerDocument||e).$$reactFormReplay,l!=null)for(a=0;a<l.length;a+=3){var n=l[a],s=l[a+1],r=n[mt]||null;if(typeof s=="function")r||_m(l);else if(r){var m=null;if(s&&s.hasAttribute("formAction")){if(n=s,r=s[mt]||null)m=r.formAction;else if(tr(n)!==null)continue}else m=r.action;typeof m=="function"?l[a+1]=m:(l.splice(a,3),a-=3),_m(l)}}}function zm(){function e(s){s.canIntercept&&s.info==="react-transition"&&s.intercept({handler:function(){return new Promise(function(r){return n=r})},focusReset:"manual",scroll:"manual"})}function t(){n!==null&&(n(),n=null),a||setTimeout(l,20)}function l(){if(!a&&!navigation.transition){var s=navigation.currentEntry;s&&s.url!=null&&navigation.navigate(s.url,{state:s.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var a=!1,n=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(l,100),function(){a=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),n!==null&&(n(),n=null)}}}function ar(e){this._internalRoot=e}zi.prototype.render=ar.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(c(409));var l=t.current,a=At();Nm(l,a,e,t,null,null)},zi.prototype.unmount=ar.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Nm(e.current,2,null,e,null,null),fi(),t[ja]=null}};function zi(e){this._internalRoot=e}zi.prototype.unstable_scheduleHydration=function(e){if(e){var t=kr();e={blockedOn:null,target:e,priority:t};for(var l=0;l<Jl.length&&t!==0&&t<Jl[l].priority;l++);Jl.splice(l,0,e),l===0&&Mm(e)}};var Dm=o.version;if(Dm!=="19.2.4")throw Error(c(527,Dm,"19.2.4"));Q.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(c(188)):(e=Object.keys(e).join(","),Error(c(268,e)));return e=v(t),e=e!==null?g(e):null,e=e===null?null:e.stateNode,e};var fv={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:z,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Di=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Di.isDisabled&&Di.supportsFiber)try{mn=Di.inject(fv),jt=Di}catch{}}return is.createRoot=function(e,t){if(!h(e))throw Error(c(299));var l=!1,a="",n=Ld,s=kd,r=Yd;return t!=null&&(t.unstable_strictMode===!0&&(l=!0),t.identifierPrefix!==void 0&&(a=t.identifierPrefix),t.onUncaughtError!==void 0&&(n=t.onUncaughtError),t.onCaughtError!==void 0&&(s=t.onCaughtError),t.onRecoverableError!==void 0&&(r=t.onRecoverableError)),t=Sm(e,1,!1,null,null,l,a,null,n,s,r,zm),e[ja]=t.current,Bc(e),new ar(t)},is.hydrateRoot=function(e,t,l){if(!h(e))throw Error(c(299));var a=!1,n="",s=Ld,r=kd,m=Yd,S=null;return l!=null&&(l.unstable_strictMode===!0&&(a=!0),l.identifierPrefix!==void 0&&(n=l.identifierPrefix),l.onUncaughtError!==void 0&&(s=l.onUncaughtError),l.onCaughtError!==void 0&&(r=l.onCaughtError),l.onRecoverableError!==void 0&&(m=l.onRecoverableError),l.formState!==void 0&&(S=l.formState)),t=Sm(e,1,!0,t,l??null,a,n,S,s,r,m,zm),t.context=jm(null),l=t.current,a=At(),a=$i(a),n=Ol(a),n.callback=null,Ul(l,n,a),l=a,t.current.lanes=l,xn(t,l),el(t),e[ja]=t.current,Bc(e),new zi(t)},is.version="19.2.4",is}var Qm;function jv(){if(Qm)return ir.exports;Qm=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(o){console.error(o)}}return u(),ir.exports=Sv(),ir.exports}var Nv=jv();const Ev=uh(Nv);/**
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 Xm="popstate";function wv(u={}){function o(h,x){let{pathname:f="/",search:p="",hash:y=""}=ya(h.location.hash.substring(1));return!f.startsWith("/")&&!f.startsWith(".")&&(f="/"+f),vr("",{pathname:f,search:p,hash:y},x.state&&x.state.usr||null,x.state&&x.state.key||"default")}function d(h,x){let f=h.document.querySelector("base"),p="";if(f&&f.getAttribute("href")){let y=h.location.href,v=y.indexOf("#");p=v===-1?y:y.slice(0,v)}return p+"#"+(typeof x=="string"?x:ds(x))}function c(h,x){Vt(h.pathname.charAt(0)==="/",`relative pathnames are not supported in hash history.push(${JSON.stringify(x)})`)}return Cv(o,d,c,u)}function Ge(u,o){if(u===!1||u===null||typeof u>"u")throw new Error(o)}function Vt(u,o){if(!u){typeof console<"u"&&console.warn(o);try{throw new Error(o)}catch{}}}function Rv(){return Math.random().toString(36).substring(2,10)}function Vm(u,o){return{usr:u.state,key:u.key,idx:o}}function vr(u,o,d=null,c){return{pathname:typeof u=="string"?u:u.pathname,search:"",hash:"",...typeof o=="string"?ya(o):o,state:d,key:o&&o.key||c||Rv()}}function ds({pathname:u="/",search:o="",hash:d=""}){return o&&o!=="?"&&(u+=o.charAt(0)==="?"?o:"?"+o),d&&d!=="#"&&(u+=d.charAt(0)==="#"?d:"#"+d),u}function ya(u){let o={};if(u){let d=u.indexOf("#");d>=0&&(o.hash=u.substring(d),u=u.substring(0,d));let c=u.indexOf("?");c>=0&&(o.search=u.substring(c),u=u.substring(0,c)),u&&(o.pathname=u)}return o}function Cv(u,o,d,c={}){let{window:h=document.defaultView,v5Compat:x=!1}=c,f=h.history,p="POP",y=null,v=g();v==null&&(v=0,f.replaceState({...f.state,idx:v},""));function g(){return(f.state||{idx:null}).idx}function b(){p="POP";let U=g(),V=U==null?null:U-v;v=U,y&&y({action:p,location:j.location,delta:V})}function M(U,V){p="PUSH";let G=vr(j.location,U,V);d&&d(G,U),v=g()+1;let Y=Vm(G,v),le=j.createHref(G);try{f.pushState(Y,"",le)}catch(ue){if(ue instanceof DOMException&&ue.name==="DataCloneError")throw ue;h.location.assign(le)}x&&y&&y({action:p,location:j.location,delta:1})}function _(U,V){p="REPLACE";let G=vr(j.location,U,V);d&&d(G,U),v=g();let Y=Vm(G,v),le=j.createHref(G);f.replaceState(Y,"",le),x&&y&&y({action:p,location:j.location,delta:0})}function H(U){return Tv(U)}let j={get action(){return p},get location(){return u(h,f)},listen(U){if(y)throw new Error("A history only accepts one active listener");return h.addEventListener(Xm,b),y=U,()=>{h.removeEventListener(Xm,b),y=null}},createHref(U){return o(h,U)},createURL:H,encodeLocation(U){let V=H(U);return{pathname:V.pathname,search:V.search,hash:V.hash}},push:M,replace:_,go(U){return f.go(U)}};return j}function Tv(u,o=!1){let d="http://localhost";typeof window<"u"&&(d=window.location.origin!=="null"?window.location.origin:window.location.href),Ge(d,"No window.location.(origin|href) available to create URL");let c=typeof u=="string"?u:ds(u);return c=c.replace(/ $/,"%20"),!o&&c.startsWith("//")&&(c=d+c),new URL(c,d)}function ch(u,o,d="/"){return Mv(u,o,d,!1)}function Mv(u,o,d,c){let h=typeof o=="string"?ya(o):o,x=Nl(h.pathname||"/",d);if(x==null)return null;let f=rh(u);Av(f);let p=null;for(let y=0;p==null&&y<f.length;++y){let v=Yv(x);p=Lv(f[y],v,c)}return p}function rh(u,o=[],d=[],c="",h=!1){let x=(f,p,y=h,v)=>{let g={relativePath:v===void 0?f.path||"":v,caseSensitive:f.caseSensitive===!0,childrenIndex:p,route:f};if(g.relativePath.startsWith("/")){if(!g.relativePath.startsWith(c)&&y)return;Ge(g.relativePath.startsWith(c),`Absolute route path "${g.relativePath}" nested under path "${c}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),g.relativePath=g.relativePath.slice(c.length)}let b=jl([c,g.relativePath]),M=d.concat(g);f.children&&f.children.length>0&&(Ge(f.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${b}".`),rh(f.children,o,M,b,y)),!(f.path==null&&!f.index)&&o.push({path:b,score:Hv(b,f.index),routesMeta:M})};return u.forEach((f,p)=>{var y;if(f.path===""||!((y=f.path)!=null&&y.includes("?")))x(f,p);else for(let v of oh(f.path))x(f,p,!0,v)}),o}function oh(u){let o=u.split("/");if(o.length===0)return[];let[d,...c]=o,h=d.endsWith("?"),x=d.replace(/\?$/,"");if(c.length===0)return h?[x,""]:[x];let f=oh(c.join("/")),p=[];return p.push(...f.map(y=>y===""?x:[x,y].join("/"))),h&&p.push(...f),p.map(y=>u.startsWith("/")&&y===""?"/":y)}function Av(u){u.sort((o,d)=>o.score!==d.score?d.score-o.score:Bv(o.routesMeta.map(c=>c.childrenIndex),d.routesMeta.map(c=>c.childrenIndex)))}var _v=/^:[\w-]+$/,zv=3,Dv=2,Ov=1,Uv=10,qv=-2,Zm=u=>u==="*";function Hv(u,o){let d=u.split("/"),c=d.length;return d.some(Zm)&&(c+=qv),o&&(c+=Dv),d.filter(h=>!Zm(h)).reduce((h,x)=>h+(_v.test(x)?zv:x===""?Ov:Uv),c)}function Bv(u,o){return u.length===o.length&&u.slice(0,-1).every((c,h)=>c===o[h])?u[u.length-1]-o[o.length-1]:0}function Lv(u,o,d=!1){let{routesMeta:c}=u,h={},x="/",f=[];for(let p=0;p<c.length;++p){let y=c[p],v=p===c.length-1,g=x==="/"?o:o.slice(x.length)||"/",b=Li({path:y.relativePath,caseSensitive:y.caseSensitive,end:v},g),M=y.route;if(!b&&v&&d&&!c[c.length-1].route.index&&(b=Li({path:y.relativePath,caseSensitive:y.caseSensitive,end:!1},g)),!b)return null;Object.assign(h,b.params),f.push({params:h,pathname:jl([x,b.pathname]),pathnameBase:Vv(jl([x,b.pathnameBase])),route:M}),b.pathnameBase!=="/"&&(x=jl([x,b.pathnameBase]))}return f}function Li(u,o){typeof u=="string"&&(u={path:u,caseSensitive:!1,end:!0});let[d,c]=kv(u.path,u.caseSensitive,u.end),h=o.match(d);if(!h)return null;let x=h[0],f=x.replace(/(.)\/+$/,"$1"),p=h.slice(1);return{params:c.reduce((v,{paramName:g,isOptional:b},M)=>{if(g==="*"){let H=p[M]||"";f=x.slice(0,x.length-H.length).replace(/(.)\/+$/,"$1")}const _=p[M];return b&&!_?v[g]=void 0:v[g]=(_||"").replace(/%2F/g,"/"),v},{}),pathname:x,pathnameBase:f,pattern:u}}function kv(u,o=!1,d=!0){Vt(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 c=[],h="^"+u.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(f,p,y)=>(c.push({paramName:p,isOptional:y!=null}),y?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return u.endsWith("*")?(c.push({paramName:"*"}),h+=u==="*"||u==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):d?h+="\\/*$":u!==""&&u!=="/"&&(h+="(?:(?=\\/|$))"),[new RegExp(h,o?void 0:"i"),c]}function Yv(u){try{return u.split("/").map(o=>decodeURIComponent(o).replace(/\//g,"%2F")).join("/")}catch(o){return Vt(!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 (${o}).`),u}}function Nl(u,o){if(o==="/")return u;if(!u.toLowerCase().startsWith(o.toLowerCase()))return null;let d=o.endsWith("/")?o.length-1:o.length,c=u.charAt(d);return c&&c!=="/"?null:u.slice(d)||"/"}var Gv=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function Qv(u,o="/"){let{pathname:d,search:c="",hash:h=""}=typeof u=="string"?ya(u):u,x;return d?(d=d.replace(/\/\/+/g,"/"),d.startsWith("/")?x=$m(d.substring(1),"/"):x=$m(d,o)):x=o,{pathname:x,search:Zv(c),hash:$v(h)}}function $m(u,o){let d=o.replace(/\/+$/,"").split("/");return u.split("/").forEach(h=>{h===".."?d.length>1&&d.pop():h!=="."&&d.push(h)}),d.length>1?d.join("/"):"/"}function or(u,o,d,c){return`Cannot include a '${u}' character in a manually specified \`to.${o}\` field [${JSON.stringify(c)}]. 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 Xv(u){return u.filter((o,d)=>d===0||o.route.path&&o.route.path.length>0)}function jr(u){let o=Xv(u);return o.map((d,c)=>c===o.length-1?d.pathname:d.pathnameBase)}function Nr(u,o,d,c=!1){let h;typeof u=="string"?h=ya(u):(h={...u},Ge(!h.pathname||!h.pathname.includes("?"),or("?","pathname","search",h)),Ge(!h.pathname||!h.pathname.includes("#"),or("#","pathname","hash",h)),Ge(!h.search||!h.search.includes("#"),or("#","search","hash",h)));let x=u===""||h.pathname==="",f=x?"/":h.pathname,p;if(f==null)p=d;else{let b=o.length-1;if(!c&&f.startsWith("..")){let M=f.split("/");for(;M[0]==="..";)M.shift(),b-=1;h.pathname=M.join("/")}p=b>=0?o[b]:"/"}let y=Qv(h,p),v=f&&f!=="/"&&f.endsWith("/"),g=(x||f===".")&&d.endsWith("/");return!y.pathname.endsWith("/")&&(v||g)&&(y.pathname+="/"),y}var jl=u=>u.join("/").replace(/\/\/+/g,"/"),Vv=u=>u.replace(/\/+$/,"").replace(/^\/*/,"/"),Zv=u=>!u||u==="?"?"":u.startsWith("?")?u:"?"+u,$v=u=>!u||u==="#"?"":u.startsWith("#")?u:"#"+u,Kv=class{constructor(u,o,d,c=!1){this.status=u,this.statusText=o||"",this.internal=c,d instanceof Error?(this.data=d.toString(),this.error=d):this.data=d}};function Jv(u){return u!=null&&typeof u.status=="number"&&typeof u.statusText=="string"&&typeof u.internal=="boolean"&&"data"in u}function Fv(u){return u.map(o=>o.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var dh=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function fh(u,o){let d=u;if(typeof d!="string"||!Gv.test(d))return{absoluteURL:void 0,isExternal:!1,to:d};let c=d,h=!1;if(dh)try{let x=new URL(window.location.href),f=d.startsWith("//")?new URL(x.protocol+d):new URL(d),p=Nl(f.pathname,o);f.origin===x.origin&&p!=null?d=p+f.search+f.hash:h=!0}catch{Vt(!1,`<Link to="${d}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:c,isExternal:h,to:d}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var mh=["POST","PUT","PATCH","DELETE"];new Set(mh);var Wv=["GET",...mh];new Set(Wv);var dn=w.createContext(null);dn.displayName="DataRouter";var Gi=w.createContext(null);Gi.displayName="DataRouterState";var Pv=w.createContext(!1),hh=w.createContext({isTransitioning:!1});hh.displayName="ViewTransition";var Iv=w.createContext(new Map);Iv.displayName="Fetchers";var ep=w.createContext(null);ep.displayName="Await";var Dt=w.createContext(null);Dt.displayName="Navigation";var fs=w.createContext(null);fs.displayName="Location";var tl=w.createContext({outlet:null,matches:[],isDataRoute:!1});tl.displayName="Route";var Er=w.createContext(null);Er.displayName="RouteError";var xh="REACT_ROUTER_ERROR",tp="REDIRECT",lp="ROUTE_ERROR_RESPONSE";function ap(u){if(u.startsWith(`${xh}:${tp}:{`))try{let o=JSON.parse(u.slice(28));if(typeof o=="object"&&o&&typeof o.status=="number"&&typeof o.statusText=="string"&&typeof o.location=="string"&&typeof o.reloadDocument=="boolean"&&typeof o.replace=="boolean")return o}catch{}}function np(u){if(u.startsWith(`${xh}:${lp}:{`))try{let o=JSON.parse(u.slice(40));if(typeof o=="object"&&o&&typeof o.status=="number"&&typeof o.statusText=="string")return new Kv(o.status,o.statusText,o.data)}catch{}}function sp(u,{relative:o}={}){Ge(fn(),"useHref() may be used only in the context of a <Router> component.");let{basename:d,navigator:c}=w.useContext(Dt),{hash:h,pathname:x,search:f}=ms(u,{relative:o}),p=x;return d!=="/"&&(p=x==="/"?d:jl([d,x])),c.createHref({pathname:p,search:f,hash:h})}function fn(){return w.useContext(fs)!=null}function Pl(){return Ge(fn(),"useLocation() may be used only in the context of a <Router> component."),w.useContext(fs).location}var vh="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function ph(u){w.useContext(Dt).static||w.useLayoutEffect(u)}function wr(){let{isDataRoute:u}=w.useContext(tl);return u?gp():ip()}function ip(){Ge(fn(),"useNavigate() may be used only in the context of a <Router> component.");let u=w.useContext(dn),{basename:o,navigator:d}=w.useContext(Dt),{matches:c}=w.useContext(tl),{pathname:h}=Pl(),x=JSON.stringify(jr(c)),f=w.useRef(!1);return ph(()=>{f.current=!0}),w.useCallback((y,v={})=>{if(Vt(f.current,vh),!f.current)return;if(typeof y=="number"){d.go(y);return}let g=Nr(y,JSON.parse(x),h,v.relative==="path");u==null&&o!=="/"&&(g.pathname=g.pathname==="/"?o:jl([o,g.pathname])),(v.replace?d.replace:d.push)(g,v.state,v)},[o,d,x,h,u])}w.createContext(null);function ms(u,{relative:o}={}){let{matches:d}=w.useContext(tl),{pathname:c}=Pl(),h=JSON.stringify(jr(d));return w.useMemo(()=>Nr(u,JSON.parse(h),c,o==="path"),[u,h,c,o])}function up(u,o){return gh(u,o)}function gh(u,o,d,c,h){var G;Ge(fn(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:x}=w.useContext(Dt),{matches:f}=w.useContext(tl),p=f[f.length-1],y=p?p.params:{},v=p?p.pathname:"/",g=p?p.pathnameBase:"/",b=p&&p.route;{let Y=b&&b.path||"";bh(v,!b||Y.endsWith("*")||Y.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${v}" (under <Route path="${Y}">) 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="${Y}"> to <Route path="${Y==="/"?"*":`${Y}/*`}">.`)}let M=Pl(),_;if(o){let Y=typeof o=="string"?ya(o):o;Ge(g==="/"||((G=Y.pathname)==null?void 0:G.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 "${Y.pathname}" was given in the \`location\` prop.`),_=Y}else _=M;let H=_.pathname||"/",j=H;if(g!=="/"){let Y=g.replace(/^\//,"").split("/");j="/"+H.replace(/^\//,"").split("/").slice(Y.length).join("/")}let U=ch(u,{pathname:j});Vt(b||U!=null,`No routes matched location "${_.pathname}${_.search}${_.hash}" `),Vt(U==null||U[U.length-1].route.element!==void 0||U[U.length-1].route.Component!==void 0||U[U.length-1].route.lazy!==void 0,`Matched leaf route at location "${_.pathname}${_.search}${_.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let V=fp(U&&U.map(Y=>Object.assign({},Y,{params:Object.assign({},y,Y.params),pathname:jl([g,x.encodeLocation?x.encodeLocation(Y.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:Y.pathname]),pathnameBase:Y.pathnameBase==="/"?g:jl([g,x.encodeLocation?x.encodeLocation(Y.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:Y.pathnameBase])})),f,d,c,h);return o&&V?w.createElement(fs.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",..._},navigationType:"POP"}},V):V}function cp(){let u=pp(),o=Jv(u)?`${u.status} ${u.statusText}`:u instanceof Error?u.message:JSON.stringify(u),d=u instanceof Error?u.stack:null,c="rgba(200,200,200, 0.5)",h={padding:"0.5rem",backgroundColor:c},x={padding:"2px 4px",backgroundColor:c},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"}},o),d?w.createElement("pre",{style:h},d):null,f)}var rp=w.createElement(cp,null),yh=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,o){return o.location!==u.location||o.revalidation!=="idle"&&u.revalidation==="idle"?{error:u.error,location:u.location,revalidation:u.revalidation}:{error:u.error!==void 0?u.error:o.error,location:o.location,revalidation:u.revalidation||o.revalidation}}componentDidCatch(u,o){this.props.onError?this.props.onError(u,o):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=np(u.digest);d&&(u=d)}let o=u!==void 0?w.createElement(tl.Provider,{value:this.props.routeContext},w.createElement(Er.Provider,{value:u,children:this.props.component})):this.props.children;return this.context?w.createElement(op,{error:u},o):o}};yh.contextType=Pv;var dr=new WeakMap;function op({children:u,error:o}){let{basename:d}=w.useContext(Dt);if(typeof o=="object"&&o&&"digest"in o&&typeof o.digest=="string"){let c=ap(o.digest);if(c){let h=dr.get(o);if(h)throw h;let x=fh(c.location,d);if(dh&&!dr.get(o))if(x.isExternal||c.reloadDocument)window.location.href=x.absoluteURL||x.to;else{const f=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(x.to,{replace:c.replace}));throw dr.set(o,f),f}return w.createElement("meta",{httpEquiv:"refresh",content:`0;url=${x.absoluteURL||x.to}`})}}return u}function dp({routeContext:u,match:o,children:d}){let c=w.useContext(dn);return c&&c.static&&c.staticContext&&(o.route.errorElement||o.route.ErrorBoundary)&&(c.staticContext._deepestRenderedBoundaryId=o.route.id),w.createElement(tl.Provider,{value:u},d)}function fp(u,o=[],d=null,c=null,h=null){if(u==null){if(!d)return null;if(d.errors)u=d.matches;else if(o.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(b=>b.route.id&&(f==null?void 0:f[b.route.id])!==void 0);Ge(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 p=!1,y=-1;if(d)for(let g=0;g<x.length;g++){let b=x[g];if((b.route.HydrateFallback||b.route.hydrateFallbackElement)&&(y=g),b.route.id){let{loaderData:M,errors:_}=d,H=b.route.loader&&!M.hasOwnProperty(b.route.id)&&(!_||_[b.route.id]===void 0);if(b.route.lazy||H){p=!0,y>=0?x=x.slice(0,y+1):x=[x[0]];break}}}let v=d&&c?(g,b)=>{var M,_;c(g,{location:d.location,params:((_=(M=d.matches)==null?void 0:M[0])==null?void 0:_.params)??{},unstable_pattern:Fv(d.matches),errorInfo:b})}:void 0;return x.reduceRight((g,b,M)=>{let _,H=!1,j=null,U=null;d&&(_=f&&b.route.id?f[b.route.id]:void 0,j=b.route.errorElement||rp,p&&(y<0&&M===0?(bh("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),H=!0,U=null):y===M&&(H=!0,U=b.route.hydrateFallbackElement||null)));let V=o.concat(x.slice(0,M+1)),G=()=>{let Y;return _?Y=j:H?Y=U:b.route.Component?Y=w.createElement(b.route.Component,null):b.route.element?Y=b.route.element:Y=g,w.createElement(dp,{match:b,routeContext:{outlet:g,matches:V,isDataRoute:d!=null},children:Y})};return d&&(b.route.ErrorBoundary||b.route.errorElement||M===0)?w.createElement(yh,{location:d.location,revalidation:d.revalidation,component:j,error:_,children:G(),routeContext:{outlet:null,matches:V,isDataRoute:!0},onError:v}):G()},null)}function Rr(u){return`${u} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function mp(u){let o=w.useContext(dn);return Ge(o,Rr(u)),o}function hp(u){let o=w.useContext(Gi);return Ge(o,Rr(u)),o}function xp(u){let o=w.useContext(tl);return Ge(o,Rr(u)),o}function Cr(u){let o=xp(u),d=o.matches[o.matches.length-1];return Ge(d.route.id,`${u} can only be used on routes that contain a unique "id"`),d.route.id}function vp(){return Cr("useRouteId")}function pp(){var c;let u=w.useContext(Er),o=hp("useRouteError"),d=Cr("useRouteError");return u!==void 0?u:(c=o.errors)==null?void 0:c[d]}function gp(){let{router:u}=mp("useNavigate"),o=Cr("useNavigate"),d=w.useRef(!1);return ph(()=>{d.current=!0}),w.useCallback(async(h,x={})=>{Vt(d.current,vh),d.current&&(typeof h=="number"?await u.navigate(h):await u.navigate(h,{fromRouteId:o,...x}))},[u,o])}var Km={};function bh(u,o,d){!o&&!Km[u]&&(Km[u]=!0,Vt(!1,d))}w.memo(yp);function yp({routes:u,future:o,state:d,onError:c}){return gh(u,void 0,d,c,o)}function bp({to:u,replace:o,state:d,relative:c}){Ge(fn(),"<Navigate> may be used only in the context of a <Router> component.");let{static:h}=w.useContext(Dt);Vt(!h,"<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(tl),{pathname:f}=Pl(),p=wr(),y=Nr(u,jr(x),f,c==="path"),v=JSON.stringify(y);return w.useEffect(()=>{p(JSON.parse(v),{replace:o,state:d,relative:c})},[p,v,c,o,d]),null}function Sl(u){Ge(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function Sp({basename:u="/",children:o=null,location:d,navigationType:c="POP",navigator:h,static:x=!1,unstable_useTransitions:f}){Ge(!fn(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let p=u.replace(/^\/*/,"/"),y=w.useMemo(()=>({basename:p,navigator:h,static:x,unstable_useTransitions:f,future:{}}),[p,h,x,f]);typeof d=="string"&&(d=ya(d));let{pathname:v="/",search:g="",hash:b="",state:M=null,key:_="default"}=d,H=w.useMemo(()=>{let j=Nl(v,p);return j==null?null:{location:{pathname:j,search:g,hash:b,state:M,key:_},navigationType:c}},[p,v,g,b,M,_,c]);return Vt(H!=null,`<Router basename="${p}"> is not able to match the URL "${v}${g}${b}" because it does not start with the basename, so the <Router> won't render anything.`),H==null?null:w.createElement(Dt.Provider,{value:y},w.createElement(fs.Provider,{children:o,value:H}))}function jp({children:u,location:o}){return up(pr(u),o)}function pr(u,o=[]){let d=[];return w.Children.forEach(u,(c,h)=>{if(!w.isValidElement(c))return;let x=[...o,h];if(c.type===w.Fragment){d.push.apply(d,pr(c.props.children,x));return}Ge(c.type===Sl,`[${typeof c.type=="string"?c.type:c.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),Ge(!c.props.index||!c.props.children,"An index route cannot have child routes.");let f={id:c.props.id||x.join("-"),caseSensitive:c.props.caseSensitive,element:c.props.element,Component:c.props.Component,index:c.props.index,path:c.props.path,middleware:c.props.middleware,loader:c.props.loader,action:c.props.action,hydrateFallbackElement:c.props.hydrateFallbackElement,HydrateFallback:c.props.HydrateFallback,errorElement:c.props.errorElement,ErrorBoundary:c.props.ErrorBoundary,hasErrorBoundary:c.props.hasErrorBoundary===!0||c.props.ErrorBoundary!=null||c.props.errorElement!=null,shouldRevalidate:c.props.shouldRevalidate,handle:c.props.handle,lazy:c.props.lazy};c.props.children&&(f.children=pr(c.props.children,x)),d.push(f)}),d}var qi="get",Hi="application/x-www-form-urlencoded";function Qi(u){return typeof HTMLElement<"u"&&u instanceof HTMLElement}function Np(u){return Qi(u)&&u.tagName.toLowerCase()==="button"}function Ep(u){return Qi(u)&&u.tagName.toLowerCase()==="form"}function wp(u){return Qi(u)&&u.tagName.toLowerCase()==="input"}function Rp(u){return!!(u.metaKey||u.altKey||u.ctrlKey||u.shiftKey)}function Cp(u,o){return u.button===0&&(!o||o==="_self")&&!Rp(u)}var Oi=null;function Tp(){if(Oi===null)try{new FormData(document.createElement("form"),0),Oi=!1}catch{Oi=!0}return Oi}var Mp=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function fr(u){return u!=null&&!Mp.has(u)?(Vt(!1,`"${u}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Hi}"`),null):u}function Ap(u,o){let d,c,h,x,f;if(Ep(u)){let p=u.getAttribute("action");c=p?Nl(p,o):null,d=u.getAttribute("method")||qi,h=fr(u.getAttribute("enctype"))||Hi,x=new FormData(u)}else if(Np(u)||wp(u)&&(u.type==="submit"||u.type==="image")){let p=u.form;if(p==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let y=u.getAttribute("formaction")||p.getAttribute("action");if(c=y?Nl(y,o):null,d=u.getAttribute("formmethod")||p.getAttribute("method")||qi,h=fr(u.getAttribute("formenctype"))||fr(p.getAttribute("enctype"))||Hi,x=new FormData(p,u),!Tp()){let{name:v,type:g,value:b}=u;if(g==="image"){let M=v?`${v}.`:"";x.append(`${M}x`,"0"),x.append(`${M}y`,"0")}else v&&x.append(v,b)}}else{if(Qi(u))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');d=qi,c=null,h=Hi,f=u}return x&&h==="text/plain"&&(f=x,x=void 0),{action:c,method:d.toLowerCase(),encType:h,formData:x,body:f}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Tr(u,o){if(u===!1||u===null||typeof u>"u")throw new Error(o)}function _p(u,o,d,c){let h=typeof u=="string"?new URL(u,typeof window>"u"?"server://singlefetch/":window.location.origin):u;return d?h.pathname.endsWith("/")?h.pathname=`${h.pathname}_.${c}`:h.pathname=`${h.pathname}.${c}`:h.pathname==="/"?h.pathname=`_root.${c}`:o&&Nl(h.pathname,o)==="/"?h.pathname=`${o.replace(/\/$/,"")}/_root.${c}`:h.pathname=`${h.pathname.replace(/\/$/,"")}.${c}`,h}async function zp(u,o){if(u.id in o)return o[u.id];try{let d=await import(u.module);return o[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 Dp(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 Op(u,o,d){let c=await Promise.all(u.map(async h=>{let x=o.routes[h.route.id];if(x){let f=await zp(x,d);return f.links?f.links():[]}return[]}));return Bp(c.flat(1).filter(Dp).filter(h=>h.rel==="stylesheet"||h.rel==="preload").map(h=>h.rel==="stylesheet"?{...h,rel:"prefetch",as:"style"}:{...h,rel:"prefetch"}))}function Jm(u,o,d,c,h,x){let f=(y,v)=>d[v]?y.route.id!==d[v].route.id:!0,p=(y,v)=>{var g;return d[v].pathname!==y.pathname||((g=d[v].route.path)==null?void 0:g.endsWith("*"))&&d[v].params["*"]!==y.params["*"]};return x==="assets"?o.filter((y,v)=>f(y,v)||p(y,v)):x==="data"?o.filter((y,v)=>{var b;let g=c.routes[y.route.id];if(!g||!g.hasLoader)return!1;if(f(y,v)||p(y,v))return!0;if(y.route.shouldRevalidate){let M=y.route.shouldRevalidate({currentUrl:new URL(h.pathname+h.search+h.hash,window.origin),currentParams:((b=d[0])==null?void 0:b.params)||{},nextUrl:new URL(u,window.origin),nextParams:y.params,defaultShouldRevalidate:!0});if(typeof M=="boolean")return M}return!0}):[]}function Up(u,o,{includeHydrateFallback:d}={}){return qp(u.map(c=>{let h=o.routes[c.route.id];if(!h)return[];let x=[h.module];return h.clientActionModule&&(x=x.concat(h.clientActionModule)),h.clientLoaderModule&&(x=x.concat(h.clientLoaderModule)),d&&h.hydrateFallbackModule&&(x=x.concat(h.hydrateFallbackModule)),h.imports&&(x=x.concat(h.imports)),x}).flat(1))}function qp(u){return[...new Set(u)]}function Hp(u){let o={},d=Object.keys(u).sort();for(let c of d)o[c]=u[c];return o}function Bp(u,o){let d=new Set;return new Set(o),u.reduce((c,h)=>{let x=JSON.stringify(Hp(h));return d.has(x)||(d.add(x),c.push({key:x,link:h})),c},[])}function Sh(){let u=w.useContext(dn);return Tr(u,"You must render this element inside a <DataRouterContext.Provider> element"),u}function Lp(){let u=w.useContext(Gi);return Tr(u,"You must render this element inside a <DataRouterStateContext.Provider> element"),u}var Mr=w.createContext(void 0);Mr.displayName="FrameworkContext";function jh(){let u=w.useContext(Mr);return Tr(u,"You must render this element inside a <HydratedRouter> element"),u}function kp(u,o){let d=w.useContext(Mr),[c,h]=w.useState(!1),[x,f]=w.useState(!1),{onFocus:p,onBlur:y,onMouseEnter:v,onMouseLeave:g,onTouchStart:b}=o,M=w.useRef(null);w.useEffect(()=>{if(u==="render"&&f(!0),u==="viewport"){let j=V=>{V.forEach(G=>{f(G.isIntersecting)})},U=new IntersectionObserver(j,{threshold:.5});return M.current&&U.observe(M.current),()=>{U.disconnect()}}},[u]),w.useEffect(()=>{if(c){let j=setTimeout(()=>{f(!0)},100);return()=>{clearTimeout(j)}}},[c]);let _=()=>{h(!0)},H=()=>{h(!1),f(!1)};return d?u!=="intent"?[x,M,{}]:[x,M,{onFocus:us(p,_),onBlur:us(y,H),onMouseEnter:us(v,_),onMouseLeave:us(g,H),onTouchStart:us(b,_)}]:[!1,M,{}]}function us(u,o){return d=>{u&&u(d),d.defaultPrevented||o(d)}}function Yp({page:u,...o}){let{router:d}=Sh(),c=w.useMemo(()=>ch(d.routes,u,d.basename),[d.routes,u,d.basename]);return c?w.createElement(Qp,{page:u,matches:c,...o}):null}function Gp(u){let{manifest:o,routeModules:d}=jh(),[c,h]=w.useState([]);return w.useEffect(()=>{let x=!1;return Op(u,o,d).then(f=>{x||h(f)}),()=>{x=!0}},[u,o,d]),c}function Qp({page:u,matches:o,...d}){let c=Pl(),{future:h,manifest:x,routeModules:f}=jh(),{basename:p}=Sh(),{loaderData:y,matches:v}=Lp(),g=w.useMemo(()=>Jm(u,o,v,x,c,"data"),[u,o,v,x,c]),b=w.useMemo(()=>Jm(u,o,v,x,c,"assets"),[u,o,v,x,c]),M=w.useMemo(()=>{if(u===c.pathname+c.search+c.hash)return[];let j=new Set,U=!1;if(o.forEach(G=>{var le;let Y=x.routes[G.route.id];!Y||!Y.hasLoader||(!g.some(ue=>ue.route.id===G.route.id)&&G.route.id in y&&((le=f[G.route.id])!=null&&le.shouldRevalidate)||Y.hasClientLoader?U=!0:j.add(G.route.id))}),j.size===0)return[];let V=_p(u,p,h.unstable_trailingSlashAwareDataRequests,"data");return U&&j.size>0&&V.searchParams.set("_routes",o.filter(G=>j.has(G.route.id)).map(G=>G.route.id).join(",")),[V.pathname+V.search]},[p,h.unstable_trailingSlashAwareDataRequests,y,c,x,g,o,u,f]),_=w.useMemo(()=>Up(b,x),[b,x]),H=Gp(b);return w.createElement(w.Fragment,null,M.map(j=>w.createElement("link",{key:j,rel:"prefetch",as:"fetch",href:j,...d})),_.map(j=>w.createElement("link",{key:j,rel:"modulepreload",href:j,...d})),H.map(({key:j,link:U})=>w.createElement("link",{key:j,nonce:d.nonce,...U,crossOrigin:U.crossOrigin??d.crossOrigin})))}function Xp(...u){return o=>{u.forEach(d=>{typeof d=="function"?d(o):d!=null&&(d.current=o)})}}var Vp=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{Vp&&(window.__reactRouterVersion="7.13.0")}catch{}function Zp({basename:u,children:o,unstable_useTransitions:d,window:c}){let h=w.useRef();h.current==null&&(h.current=wv({window:c,v5Compat:!0}));let x=h.current,[f,p]=w.useState({action:x.action,location:x.location}),y=w.useCallback(v=>{d===!1?p(v):w.startTransition(()=>p(v))},[d]);return w.useLayoutEffect(()=>x.listen(y),[x,y]),w.createElement(Sp,{basename:u,children:o,location:f.location,navigationType:f.action,navigator:x,unstable_useTransitions:d})}var Nh=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Eh=w.forwardRef(function({onClick:o,discover:d="render",prefetch:c="none",relative:h,reloadDocument:x,replace:f,state:p,target:y,to:v,preventScrollReset:g,viewTransition:b,unstable_defaultShouldRevalidate:M,..._},H){let{basename:j,unstable_useTransitions:U}=w.useContext(Dt),V=typeof v=="string"&&Nh.test(v),G=fh(v,j);v=G.to;let Y=sp(v,{relative:h}),[le,ue,Z]=kp(c,_),I=Jp(v,{replace:f,state:p,target:y,preventScrollReset:g,relative:h,viewTransition:b,unstable_defaultShouldRevalidate:M,unstable_useTransitions:U});function P($){o&&o($),$.defaultPrevented||I($)}let se=w.createElement("a",{..._,...Z,href:G.absoluteURL||Y,onClick:G.isExternal||x?o:P,ref:Xp(H,ue),target:y,"data-discover":!V&&d==="render"?"true":void 0});return le&&!V?w.createElement(w.Fragment,null,se,w.createElement(Yp,{page:Y})):se});Eh.displayName="Link";var wh=w.forwardRef(function({"aria-current":o="page",caseSensitive:d=!1,className:c="",end:h=!1,style:x,to:f,viewTransition:p,children:y,...v},g){let b=ms(f,{relative:v.relative}),M=Pl(),_=w.useContext(Gi),{navigator:H,basename:j}=w.useContext(Dt),U=_!=null&&eg(b)&&p===!0,V=H.encodeLocation?H.encodeLocation(b).pathname:b.pathname,G=M.pathname,Y=_&&_.navigation&&_.navigation.location?_.navigation.location.pathname:null;d||(G=G.toLowerCase(),Y=Y?Y.toLowerCase():null,V=V.toLowerCase()),Y&&j&&(Y=Nl(Y,j)||Y);const le=V!=="/"&&V.endsWith("/")?V.length-1:V.length;let ue=G===V||!h&&G.startsWith(V)&&G.charAt(le)==="/",Z=Y!=null&&(Y===V||!h&&Y.startsWith(V)&&Y.charAt(V.length)==="/"),I={isActive:ue,isPending:Z,isTransitioning:U},P=ue?o:void 0,se;typeof c=="function"?se=c(I):se=[c,ue?"active":null,Z?"pending":null,U?"transitioning":null].filter(Boolean).join(" ");let $=typeof x=="function"?x(I):x;return w.createElement(Eh,{...v,"aria-current":P,className:se,ref:g,style:$,to:f,viewTransition:p},typeof y=="function"?y(I):y)});wh.displayName="NavLink";var $p=w.forwardRef(({discover:u="render",fetcherKey:o,navigate:d,reloadDocument:c,replace:h,state:x,method:f=qi,action:p,onSubmit:y,relative:v,preventScrollReset:g,viewTransition:b,unstable_defaultShouldRevalidate:M,..._},H)=>{let{unstable_useTransitions:j}=w.useContext(Dt),U=Pp(),V=Ip(p,{relative:v}),G=f.toLowerCase()==="get"?"get":"post",Y=typeof p=="string"&&Nh.test(p),le=ue=>{if(y&&y(ue),ue.defaultPrevented)return;ue.preventDefault();let Z=ue.nativeEvent.submitter,I=(Z==null?void 0:Z.getAttribute("formmethod"))||f,P=()=>U(Z||ue.currentTarget,{fetcherKey:o,method:I,navigate:d,replace:h,state:x,relative:v,preventScrollReset:g,viewTransition:b,unstable_defaultShouldRevalidate:M});j&&d!==!1?w.startTransition(()=>P()):P()};return w.createElement("form",{ref:H,method:G,action:V,onSubmit:c?y:le,..._,"data-discover":!Y&&u==="render"?"true":void 0})});$p.displayName="Form";function Kp(u){return`${u} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Rh(u){let o=w.useContext(dn);return Ge(o,Kp(u)),o}function Jp(u,{target:o,replace:d,state:c,preventScrollReset:h,relative:x,viewTransition:f,unstable_defaultShouldRevalidate:p,unstable_useTransitions:y}={}){let v=wr(),g=Pl(),b=ms(u,{relative:x});return w.useCallback(M=>{if(Cp(M,o)){M.preventDefault();let _=d!==void 0?d:ds(g)===ds(b),H=()=>v(u,{replace:_,state:c,preventScrollReset:h,relative:x,viewTransition:f,unstable_defaultShouldRevalidate:p});y?w.startTransition(()=>H()):H()}},[g,v,b,d,c,o,u,h,x,f,p,y])}var Fp=0,Wp=()=>`__${String(++Fp)}__`;function Pp(){let{router:u}=Rh("useSubmit"),{basename:o}=w.useContext(Dt),d=vp(),c=u.fetch,h=u.navigate;return w.useCallback(async(x,f={})=>{let{action:p,method:y,encType:v,formData:g,body:b}=Ap(x,o);if(f.navigate===!1){let M=f.fetcherKey||Wp();await c(M,d,f.action||p,{unstable_defaultShouldRevalidate:f.unstable_defaultShouldRevalidate,preventScrollReset:f.preventScrollReset,formData:g,body:b,formMethod:f.method||y,formEncType:f.encType||v,flushSync:f.flushSync})}else await h(f.action||p,{unstable_defaultShouldRevalidate:f.unstable_defaultShouldRevalidate,preventScrollReset:f.preventScrollReset,formData:g,body:b,formMethod:f.method||y,formEncType:f.encType||v,replace:f.replace,state:f.state,fromRouteId:d,flushSync:f.flushSync,viewTransition:f.viewTransition})},[c,h,o,d])}function Ip(u,{relative:o}={}){let{basename:d}=w.useContext(Dt),c=w.useContext(tl);Ge(c,"useFormAction must be used inside a RouteContext");let[h]=c.matches.slice(-1),x={...ms(u||".",{relative:o})},f=Pl();if(u==null){x.search=f.search;let p=new URLSearchParams(x.search),y=p.getAll("index");if(y.some(g=>g==="")){p.delete("index"),y.filter(b=>b).forEach(b=>p.append("index",b));let g=p.toString();x.search=g?`?${g}`:""}}return(!u||u===".")&&h.route.index&&(x.search=x.search?x.search.replace(/^\?/,"?index&"):"?index"),d!=="/"&&(x.pathname=x.pathname==="/"?d:jl([d,x.pathname])),ds(x)}function eg(u,{relative:o}={}){let d=w.useContext(hh);Ge(d!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:c}=Rh("useViewTransitionState"),h=ms(u,{relative:o});if(!d.isTransitioning)return!1;let x=Nl(d.currentLocation.pathname,c)||d.currentLocation.pathname,f=Nl(d.nextLocation.pathname,c)||d.nextLocation.pathname;return Li(h.pathname,f)!=null||Li(h.pathname,x)!=null}/**
61
+ * @license lucide-react v0.564.0 - ISC
62
+ *
63
+ * This source code is licensed under the ISC license.
64
+ * See the LICENSE file in the root directory of this source tree.
65
+ */const Ch=(...u)=>u.filter((o,d,c)=>!!o&&o.trim()!==""&&c.indexOf(o)===d).join(" ").trim();/**
66
+ * @license lucide-react v0.564.0 - ISC
67
+ *
68
+ * This source code is licensed under the ISC license.
69
+ * See the LICENSE file in the root directory of this source tree.
70
+ */const tg=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 lg=u=>u.replace(/^([A-Z])|[\s-_]+(\w)/g,(o,d,c)=>c?c.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 Fm=u=>{const o=lg(u);return o.charAt(0).toUpperCase()+o.slice(1)};/**
81
+ * @license lucide-react v0.564.0 - ISC
82
+ *
83
+ * This source code is licensed under the ISC license.
84
+ * See the LICENSE file in the root directory of this source tree.
85
+ */var ag={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 ng=u=>{for(const o in u)if(o.startsWith("aria-")||o==="role"||o==="title")return!0;return!1};/**
91
+ * @license lucide-react v0.564.0 - ISC
92
+ *
93
+ * This source code is licensed under the ISC license.
94
+ * See the LICENSE file in the root directory of this source tree.
95
+ */const sg=w.forwardRef(({color:u="currentColor",size:o=24,strokeWidth:d=2,absoluteStrokeWidth:c,className:h="",children:x,iconNode:f,...p},y)=>w.createElement("svg",{ref:y,...ag,width:o,height:o,stroke:u,strokeWidth:c?Number(d)*24/Number(o):d,className:Ch("lucide",h),...!x&&!ng(p)&&{"aria-hidden":"true"},...p},[...f.map(([v,g])=>w.createElement(v,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 re=(u,o)=>{const d=w.forwardRef(({className:c,...h},x)=>w.createElement(sg,{ref:x,iconNode:o,className:Ch(`lucide-${tg(Fm(u))}`,`lucide-${u}`,c),...h}));return d.displayName=Fm(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 ig=[["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"}]],Th=re("activity",ig);/**
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 ug=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],cg=re("arrow-down",ug);/**
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 rg=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],Wm=re("arrow-right",rg);/**
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 og=[["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"}]],dg=re("arrow-up-down",og);/**
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 fg=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],mg=re("arrow-up",fg);/**
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 hg=[["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"}]],xg=re("bell",hg);/**
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 vg=[["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"}]],Pm=re("briefcase",vg);/**
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 pg=[["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"}]],Ar=re("calendar",pg);/**
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 gg=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],gr=re("check",gg);/**
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 yg=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],bg=re("chevron-down",yg);/**
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 Sg=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],jg=re("chevron-left",Sg);/**
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 Ng=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Eg=re("chevron-right",Ng);/**
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 wg=[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]],Rg=re("chevrons-up-down",wg);/**
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 Cg=[["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"}]],El=re("circle-alert",Cg);/**
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 Tg=[["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"}]],Im=re("circle-arrow-down",Tg);/**
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 Mg=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],hs=re("circle-check-big",Mg);/**
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 Ag=[["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"}]],_g=re("circle-x",Ag);/**
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 zg=[["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"}]],eh=re("clipboard-list",zg);/**
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 Dg=[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],ki=re("clock",Dg);/**
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 Og=[["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"}]],Mh=re("external-link",Og);/**
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 Ug=[["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"}]],qg=re("eye-off",Ug);/**
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 Hg=[["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"}]],Bg=re("eye",Hg);/**
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 Lg=[["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"}]],yr=re("file-text",Lg);/**
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 kg=[["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"}]],Yg=re("git-pull-request",kg);/**
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 Gg=[["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"}]],Qg=re("house",Gg);/**
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 Xg=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],Vg=re("info",Xg);/**
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 Zg=[["path",{d:"M5 3v14",key:"9nsxs2"}],["path",{d:"M12 3v8",key:"1h2ygw"}],["path",{d:"M19 3v18",key:"1sk56x"}]],$g=re("kanban",Zg);/**
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 Kg=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],Ah=re("loader-circle",Kg);/**
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 Jg=[["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"}]],_h=re("map",Jg);/**
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 Fg=[["path",{d:"M5 12h14",key:"1ays0h"}]],Wg=re("minus",Fg);/**
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 Pg=[["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"}]],zh=re("pause",Pg);/**
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 Ig=[["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"}]],Dh=re("pen",Ig);/**
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 ey=[["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"}]],Xi=re("play",ey);/**
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 ty=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],xs=re("plus",ty);/**
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 ly=[["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"}]],ay=re("rotate-ccw",ly);/**
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 ny=[["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"}]],sy=re("save",ny);/**
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 iy=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],Vi=re("search",iy);/**
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 uy=[["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"}]],cy=re("settings",uy);/**
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 ry=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],th=re("square",ry);/**
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 oy=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],dy=re("terminal",oy);/**
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 fy=[["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"}]],my=re("test-tube-diagonal",fy);/**
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 hy=[["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"}]],Oh=re("trash-2",hy);/**
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 xy=[["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"}]],vy=re("triangle-alert",xy);/**
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 py=[["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"}]],gy=re("wifi",py);/**
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 yy=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],vs=re("x",yy),_r="";let Uh=!1,br=null;function by(u){Uh=u}function Sy(u){br=u}function jy(u){return encodeURIComponent(u.replace(/\//g,"~"))}function Pe(u){return Uh&&br?u.replace("/api/",`/api/projects/${jy(br)}/`):u}function Ny(){return Ie("/api/mode")}function Ey(){return Ie("/api/projects")}async function Ie(u,o){const d=`${_r}${u}`,c=await fetch(d,{headers:{"Content-Type":"application/json",...o==null?void 0:o.headers},...o});if(!c.ok){const h=await c.json().catch(()=>({error:"Unknown error"}));throw new Error(h.error||`HTTP ${c.status}: ${c.statusText}`)}return c.json()}function mr(){return Ie(Pe("/api/status"))}function qh(){return Ie(Pe("/api/prs"))}function wy(u,o){const d=`?lines=${encodeURIComponent(o)}`;return Ie(Pe(`/api/logs/${encodeURIComponent(u)}${d}`))}function Hh(){return Ie(Pe("/api/config"))}function ga(u){return Ie(Pe("/api/config"),{method:"PUT",body:JSON.stringify(u)})}function Ry(){return Ie(Pe("/api/doctor"))}function Bh(){return Ie(Pe("/api/schedule-info"))}function Cy(){return Ie(Pe("/api/actions/review"),{method:"POST"})}function os(){return Ie(Pe("/api/actions/install-cron"),{method:"POST"})}function Ty(){return Ie(Pe("/api/actions/uninstall-cron"),{method:"POST"})}function My(u="all"){return Ie(Pe("/api/actions/cancel"),{method:"POST",body:JSON.stringify({type:u})})}const Wl=["Draft","Ready","In Progress","Review","Done"];function Lh(){return Ie(Pe("/api/board/status"))}function Ay(u){return Ie(Pe("/api/board/issues"),{method:"POST",body:JSON.stringify(u)})}function kh(u,o){return Ie(Pe(`/api/board/issues/${u}/move`),{method:"PATCH",body:JSON.stringify({column:o})})}async function _y(u){const o=`${_r}${Pe(`/api/board/issues/${u}`)}`,d=await fetch(o,{headers:{"Content-Type":"application/json"},method:"DELETE"});if(!d.ok){const c=await d.json().catch(()=>({error:"Unknown error"}));throw new Error(c.error||`HTTP ${d.status}: ${d.statusText}`)}}function zy(){return Ie(Pe("/api/actions/clear-lock"),{method:"POST"})}function Dy(u,o=[],d){const c=(d==null?void 0:d.enabled)??!0,h=w.useRef(u);h.current=u,w.useEffect(()=>{if(!c)return;const x=`${_r}${Pe("/api/status/events")}`,f=new EventSource(x);return f.addEventListener("status_changed",p=>{try{const y=JSON.parse(p.data);h.current(y)}catch{}}),()=>{f.close()}},[c,...o])}function Oy(){return Ie(Pe("/api/roadmap"))}function Uy(){return Ie(Pe("/api/roadmap/scan"),{method:"POST"})}function Yh(u){return Ie(Pe("/api/roadmap/toggle"),{method:"PUT",body:JSON.stringify({enabled:u})})}function Jt(u,o=[],d){const c=(d==null?void 0:d.enabled)??!0,[h,x]=w.useState(null),[f,p]=w.useState(!0),[y,v]=w.useState(null),g=w.useRef(u);g.current=u;const b=w.useRef(()=>{(async()=>{v(null);try{const _=await g.current();x(_)}catch(_){v(_ instanceof Error?_:new Error("Unknown error"))}})()});return b.current=b.current.bind(b),w.useEffect(()=>{if(!c)return;let M=!1;return p(!0),v(null),(async()=>{try{const H=await g.current();M||x(H)}catch(H){M||v(H instanceof Error?H:new Error("Unknown error"))}finally{M||p(!1)}})(),()=>{M=!0}},[...o,c]),{data:h,loading:f,error:y,refetch:b.current}}const lh=u=>{let o;const d=new Set,c=(v,g)=>{const b=typeof v=="function"?v(o):v;if(!Object.is(b,o)){const M=o;o=g??(typeof b!="object"||b===null)?b:Object.assign({},o,b),d.forEach(_=>_(o,M))}},h=()=>o,p={setState:c,getState:h,getInitialState:()=>y,subscribe:v=>(d.add(v),()=>d.delete(v))},y=o=u(c,h,p);return p},qy=u=>u?lh(u):lh,Hy=u=>u;function By(u,o=Hy){const d=Ue.useSyncExternalStore(u.subscribe,()=>o(u.getState()),()=>o(u.getInitialState()));return Ue.useDebugValue(d),d}const ah=u=>{const o=qy(u),d=c=>By(o,c);return Object.assign(d,o),d},Ly=u=>u?ah(u):ah,ky=typeof localStorage<"u"?localStorage.getItem("nw-selected-project"):null,rt=Ly(u=>({projectName:"Night Watch",setProjectName:o=>u({projectName:o}),toasts:[],addToast:o=>{const d=Math.random().toString(36).substring(7);u(c=>({toasts:[...c.toasts,{...o,id:d}]})),setTimeout(()=>{u(c=>({toasts:c.toasts.filter(h=>h.id!==d)}))},5e3)},removeToast:o=>u(d=>({toasts:d.toasts.filter(c=>c.id!==o)})),status:null,setStatus:o=>u(d=>!d.status||new Date(o.timestamp)>new Date(d.status.timestamp)?{status:o}:d),globalModeLoading:!0,setGlobalModeLoading:o=>u({globalModeLoading:o}),isGlobalMode:!1,setGlobalMode:o=>{by(o),u({isGlobalMode:o})},projects:[],setProjects:o=>u({projects:o}),selectedProjectId:ky,selectProject:o=>{Sy(o),o?localStorage.setItem("nw-selected-project",o):localStorage.removeItem("nw-selected-project"),u(d=>{const c=d.projects.find(h=>h.name===o);return{selectedProjectId:o,...c?{projectName:c.name}:{}}})}})),Yy=()=>{const[u,o]=w.useState(!1),{projectName:d,isGlobalMode:c,projects:h,selectedProjectId:x,selectProject:f,globalModeLoading:p}=rt(),{data:y}=Jt(qh,[x],{enabled:!p}),v=(y==null?void 0:y.length)??0,g=w.useMemo(()=>[{icon:Qg,label:"Dashboard",path:"/",section:"Overview"},{icon:dy,label:"Logs",path:"/logs"},{icon:$g,label:"Board",path:"/board",section:"Work"},{icon:Yg,label:"Pull Requests",path:"/prs",badge:v},{icon:_h,label:"Roadmap",path:"/roadmap"},{icon:Ar,label:"Automation",path:"/scheduling",section:"Automation"},{icon:cy,label:"Settings",path:"/settings",section:"Config"}],[v]);return i.jsxs("aside",{className:`
326
+ relative flex flex-col transition-all duration-300 ease-[cubic-bezier(0.25,0.1,0.25,1)]
327
+ ${u?"w-20":"w-72"} h-screen flex-shrink-0 z-50
328
+ bg-[#030712]/80 backdrop-blur-xl border-r border-white/5
329
+ `,children:[i.jsx("div",{className:`p-6 border-b border-white/5 ${u?"items-center justify-center flex":""}`,children:u?i.jsx("div",{className:"relative group",children:i.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"})}):i.jsxs("div",{className:"relative w-full",children:[i.jsx("label",{className:"text-[10px] font-bold text-slate-500 uppercase tracking-widest mb-3 block pl-1",children:c?"Projects":"Workspace"}),c?i.jsxs("div",{className:"relative",children:[i.jsx(Pm,{className:"absolute left-3.5 top-1/2 -translate-y-1/2 h-4 w-4 text-indigo-400 pointer-events-none"}),i.jsx("select",{value:x||"",onChange:b=>f(b.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:h.filter(b=>b.valid).map(b=>i.jsx("option",{value:b.name,children:b.name},b.name))}),i.jsx(Rg,{className:"absolute right-3 top-1/2 -translate-y-1/2 h-3.5 w-3.5 text-slate-500 pointer-events-none"})]}):i.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:[i.jsx(Pm,{className:"h-4 w-4 text-indigo-400 mr-3"}),i.jsx("span",{className:"truncate",children:d})]})]})}),i.jsx("nav",{className:"flex-1 py-6 overflow-y-auto overflow-x-hidden scrollbar-hide",children:i.jsx("ul",{className:"space-y-1.5 px-4",children:g.map(b=>i.jsxs(Ue.Fragment,{children:[b.section&&!u&&i.jsx("li",{className:"text-[10px] font-bold text-slate-600 uppercase tracking-widest px-3.5 pt-4 pb-1",children:b.section}),i.jsx("li",{children:i.jsx(wh,{to:b.path,className:({isActive:M})=>`
330
+ flex items-center px-3.5 py-3 rounded-xl transition-all duration-200 group relative
331
+ ${M?"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"}
332
+ ${u?"justify-center":""}
333
+ `,children:({isActive:M})=>i.jsxs(i.Fragment,{children:[i.jsx(b.icon,{className:`h-5 w-5 transition-colors ${M?"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&&i.jsx("span",{className:"flex-1 text-sm font-medium tracking-wide",children:b.label}),b.badge&&(u?i.jsx("span",{className:"absolute top-2 right-2 h-2 w-2 bg-indigo-500 rounded-full border border-[#030712] shadow-sm"}):i.jsx("span",{className:`text-[10px] font-bold px-2 py-0.5 rounded-md ${M?"bg-indigo-500/20 text-indigo-300":"bg-white/5 text-slate-400 border border-white/5"}`,children:b.badge})),M&&!u&&i.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&&i.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:b.label})]})})})]},b.path))})}),i.jsx("div",{className:"p-4 border-t border-white/5 flex justify-end",children:i.jsx("button",{onClick:()=>o(!u),className:"p-2 rounded-lg hover:bg-white/5 text-slate-500 hover:text-slate-300 transition-colors",children:u?i.jsx(Eg,{className:"h-5 w-5"}):i.jsx(jg,{className:"h-5 w-5"})})})]})},Gy=()=>{const{projectName:u}=rt();return i.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:[i.jsxs("div",{className:"flex items-center space-x-6",children:[i.jsxs("div",{children:[i.jsx("div",{className:"text-xs font-mono text-indigo-400 mb-0.5 tracking-tight",children:"Active Project"}),i.jsx("h1",{className:"text-xl font-semibold text-white tracking-tight leading-none",children:u})]}),i.jsx("div",{className:"h-8 w-px bg-white/10 mx-2"}),i.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:[i.jsx(gy,{className:"h-3.5 w-3.5"}),i.jsx("span",{className:"uppercase tracking-wider text-[10px]",children:"Online"})]})]}),i.jsxs("div",{className:"flex items-center space-x-5",children:[i.jsxs("div",{className:"relative hidden md:block group",children:[i.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]"}),i.jsx(Vi,{className:"absolute left-3.5 top-2.5 h-4 w-4 text-slate-500 group-focus-within:text-indigo-400 transition-colors"})]}),i.jsx("div",{className:"flex items-center space-x-3",children:i.jsxs("button",{className:"p-2.5 text-slate-400 hover:text-white hover:bg-white/5 rounded-full relative transition-all",children:[i.jsx(xg,{className:"h-5 w-5"}),i.jsx("span",{className:"absolute top-2.5 right-2.5 h-2 w-2 bg-red-500 rounded-full ring-2 ring-[#030712]"})]})}),i.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"})]})]})},Qy=({toast:u,onDismiss:o})=>{const d={success:i.jsx(hs,{className:"h-5 w-5 text-green-400"}),error:i.jsx(El,{className:"h-5 w-5 text-red-400"}),info:i.jsx(Vg,{className:"h-5 w-5 text-blue-400"}),warning:i.jsx(vy,{className:"h-5 w-5 text-amber-400"})},c={success:"border-l-green-500",error:"border-l-red-500",info:"border-l-blue-500",warning:"border-l-amber-500"};return i.jsx("div",{className:`
334
+ pointer-events-auto w-full max-w-sm overflow-hidden rounded-lg
335
+ bg-slate-900 border border-slate-800 border-l-4 ${c[u.type]}
336
+ shadow-lg ring-1 ring-black ring-opacity-5 transition-all
337
+ animate-in slide-in-from-right-full fade-in duration-300
338
+ `,children:i.jsx("div",{className:"p-4",children:i.jsxs("div",{className:"flex items-start",children:[i.jsx("div",{className:"flex-shrink-0",children:d[u.type]}),i.jsxs("div",{className:"ml-3 w-0 flex-1 pt-0.5",children:[i.jsx("p",{className:"text-sm font-medium text-slate-200",children:u.title}),u.message&&i.jsx("p",{className:"mt-1 text-sm text-slate-400",children:u.message})]}),i.jsx("div",{className:"ml-4 flex flex-shrink-0",children:i.jsxs("button",{type:"button",className:"inline-flex rounded-md text-slate-400 hover:text-slate-200 focus:outline-none focus:ring-2 focus:ring-indigo-500",onClick:()=>o(u.id),children:[i.jsx("span",{className:"sr-only",children:"Close"}),i.jsx(vs,{className:"h-5 w-5"})]})})]})})})},Xy=()=>{const{toasts:u,removeToast:o}=rt();return i.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=>i.jsx(Qy,{toast:d,onDismiss:o},d.id))})};function Vy(){const{setGlobalMode:u,setGlobalModeLoading:o,setProjects:d,selectProject:c,selectedProjectId:h}=rt();w.useEffect(()=>{o(!0),Ny().then(async({globalMode:x})=>{if(u(x),!x)return;const f=await Ey();d(f);const p=f.filter(y=>y.valid);h&&p.some(y=>y.name===h)?c(h):p.length>0&&c(p[0].name)}).catch(()=>{u(!1)}).finally(()=>{o(!1)})},[])}function nh(u){if(!(u!=null&&u.timestamp))return Number.NEGATIVE_INFINITY;const o=new Date(u.timestamp).getTime();return Number.isNaN(o)?Number.NEGATIVE_INFINITY:o}function Ui(u,o){return u?o?nh(u)>=nh(o)?u:o:u:o}function Zy(){var x;const{setStatus:u,setProjectName:o,selectedProjectId:d,globalModeLoading:c}=rt(),h=w.useRef(null);h.current=rt.getState().status,Dy(f=>{Ui(f,h.current)===f&&u(f)},[d,c],{enabled:!c}),w.useEffect(()=>{if(c)return;mr().then(p=>{Ui(p,h.current)===p&&u(p)}).catch(()=>{});const f=setInterval(()=>{mr().then(p=>{Ui(p,h.current)===p&&u(p)}).catch(()=>{})},3e4);return()=>clearInterval(f)},[d,c,u]),w.useEffect(()=>{const f=()=>{mr().then(p=>{Ui(p,h.current)===p&&u(p)}).catch(()=>{})};return window.addEventListener("focus",f),()=>window.removeEventListener("focus",f)},[d,u]),w.useEffect(()=>{const f=rt.getState().status;f!=null&&f.projectName&&o(f.projectName)},[(x=h.current)==null?void 0:x.projectName,o])}const Ae=({children:u,className:o="",onClick:d})=>i.jsxs("div",{className:`
339
+ relative bg-[#0b101b] rounded-xl border border-white/5
340
+ shadow-[0_4px_20px_-4px_rgba(0,0,0,0.5)]
341
+ transition-all duration-300
342
+ ${d?"cursor-pointer hover:border-indigo-500/30 hover:shadow-indigo-500/5 group":""}
343
+ ${o}
344
+ `,onClick:d,children:[d&&i.jsx("div",{className:"absolute inset-0 bg-indigo-500/0 group-hover:bg-indigo-500/[0.02] transition-colors rounded-xl pointer-events-none"}),i.jsx("div",{className:"relative z-10",children:u})]}),Qe=({children:u,variant:o="primary",size:d="md",loading:c=!1,className:h="",disabled:x,...f})=>{const p="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]",y={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"},v={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 i.jsxs("button",{className:`${p} ${y[o]} ${v[d]} ${h}`,disabled:x||c,...f,children:[c&&i.jsx(Ah,{className:"mr-2 h-4 w-4 animate-spin"}),u]})},Bi=({children:u,variant:o="default",className:d=""})=>{const c={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 i.jsx("span",{className:`inline-flex items-center px-2 py-0.5 rounded text-[11px] font-medium tracking-wide ${c[o]} ${d}`,children:u})},Gh={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"}},$y=({defaultColumn:u,onClose:o,onCreated:d})=>{const[c,h]=w.useState(""),[x,f]=w.useState(""),[p,y]=w.useState(u),[v,g]=w.useState(!1),[b,M]=w.useState(null),{addToast:_}=rt(),H=async j=>{if(j.preventDefault(),!!c.trim()){g(!0),M(null);try{await Ay({title:c.trim(),body:x,column:p}),_({title:"Issue created",message:`"${c.trim()}" added to ${p}`,type:"success"}),d(),o()}catch(U){M(U instanceof Error?U.message:"Failed to create issue")}finally{g(!1)}}};return i.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4",children:[i.jsx("div",{className:"absolute inset-0 bg-black/60 backdrop-blur-sm",onClick:o}),i.jsxs("div",{className:"relative bg-[#0f172a] border border-white/10 rounded-2xl shadow-2xl w-full max-w-lg",children:[i.jsxs("div",{className:"flex items-center justify-between p-6 border-b border-white/5",children:[i.jsx("h2",{className:"text-lg font-semibold text-slate-100",children:"New Board Issue"}),i.jsx("button",{onClick:o,className:"p-1.5 rounded-lg hover:bg-white/5 text-slate-500 hover:text-slate-300 transition-colors",children:i.jsx(vs,{className:"h-5 w-5"})})]}),i.jsxs("form",{onSubmit:H,className:"p-6 space-y-4",children:[i.jsxs("div",{children:[i.jsx("label",{className:"text-xs font-medium text-slate-400 uppercase tracking-wide block mb-1.5",children:"Title"}),i.jsx("input",{type:"text",value:c,onChange:j=>h(j.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"})]}),i.jsxs("div",{children:[i.jsx("label",{className:"text-xs font-medium text-slate-400 uppercase tracking-wide block mb-1.5",children:"Column"}),i.jsx("select",{value:p,onChange:j=>y(j.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:Wl.map(j=>i.jsx("option",{value:j,children:j},j))})]}),i.jsxs("div",{children:[i.jsx("label",{className:"text-xs font-medium text-slate-400 uppercase tracking-wide block mb-1.5",children:"Body (optional)"}),i.jsx("textarea",{value:x,onChange:j=>f(j.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"})]}),b&&i.jsx("p",{className:"text-sm text-red-400",children:b}),i.jsxs("div",{className:"flex justify-end space-x-3 pt-2",children:[i.jsx(Qe,{variant:"ghost",type:"button",onClick:o,children:"Cancel"}),i.jsx(Qe,{type:"submit",disabled:v||!c.trim(),children:v?"Creating...":"Create Issue"})]})]})]})]})},Ky=({issue:u,onClose:o,onMoved:d,onClosed:c})=>{const[h,x]=w.useState(!1),[f,p]=w.useState(!1),{addToast:y}=rt(),v=async M=>{if(M!==u.column){x(!0);try{await kh(u.number,M),y({title:"Issue moved",message:`#${u.number} moved to ${M}`,type:"success"}),d(),o()}catch(_){y({title:"Move failed",message:_ instanceof Error?_.message:"Failed to move issue",type:"error"})}finally{x(!1)}}},g=async()=>{if(confirm(`Close issue #${u.number}: "${u.title}"?`)){p(!0);try{await _y(u.number),y({title:"Issue closed",message:`#${u.number} closed on GitHub`,type:"success"}),c(),o()}catch(M){y({title:"Close failed",message:M instanceof Error?M.message:"Failed to close issue",type:"error"})}finally{p(!1)}}},b=u.column??"Draft";return i.jsxs("div",{className:"fixed inset-0 z-50 flex justify-end",children:[i.jsx("div",{className:"absolute inset-0 bg-black/40 backdrop-blur-sm",onClick:o}),i.jsxs("div",{className:"relative bg-[#0a0f1e] border-l border-white/10 w-full max-w-xl flex flex-col shadow-2xl overflow-hidden",children:[i.jsxs("div",{className:"flex items-start justify-between p-6 border-b border-white/5 flex-shrink-0",children:[i.jsxs("div",{className:"flex-1 min-w-0 pr-4",children:[i.jsxs("div",{className:"flex items-center space-x-2 mb-2",children:[i.jsxs("span",{className:"text-slate-500 text-sm font-mono",children:["#",u.number]}),i.jsx(Bi,{variant:Gh[b].badge,children:b})]}),i.jsx("h2",{className:"text-lg font-semibold text-slate-100 leading-snug",children:u.title}),u.assignees.length>0&&i.jsxs("p",{className:"text-xs text-slate-500 mt-1",children:["Assigned to: ",u.assignees.join(", ")]})]}),i.jsx("button",{onClick:o,className:"p-1.5 rounded-lg hover:bg-white/5 text-slate-500 hover:text-slate-300 transition-colors flex-shrink-0",children:i.jsx(vs,{className:"h-5 w-5"})})]}),i.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:[i.jsxs("div",{className:"flex items-center space-x-2",children:[i.jsx("span",{className:"text-xs text-slate-500",children:"Move to:"}),Wl.filter(M=>M!==u.column).map(M=>i.jsx("button",{onClick:()=>v(M),disabled:h,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:M},M))]}),i.jsxs("div",{className:"flex items-center space-x-2 ml-auto",children:[u.url&&!u.url.startsWith("local://")&&i.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:[i.jsx(Mh,{className:"h-3.5 w-3.5"}),i.jsx("span",{children:"GitHub"})]}),i.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"})]})]}),i.jsx("div",{className:"flex-1 overflow-y-auto p-6",children:u.body?i.jsx("pre",{className:"text-sm text-slate-300 whitespace-pre-wrap font-mono leading-relaxed break-words",children:u.body}):i.jsx("p",{className:"text-slate-500 text-sm italic",children:"No description provided."})})]})]})},Jy=({issue:u,onClick:o,onDragStart:d})=>{const[c,h]=w.useState(!1);return i.jsx("div",{className:"relative",draggable:!0,onDragStart:x=>{x.dataTransfer.setData("issueNumber",String(u.number)),x.dataTransfer.effectAllowed="move",h(!0),d(u)},onDragEnd:()=>h(!1),children:i.jsxs(Ae,{className:`p-3 cursor-grab hover:border-indigo-500/30 transition-all select-none ${c?"opacity-30":""}`,onClick:o,children:[i.jsxs("span",{className:"text-[10px] font-mono text-slate-600",children:["#",u.number]}),i.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&&i.jsx("p",{className:"text-[10px] text-slate-500 mt-1.5 truncate",children:u.assignees.join(", ")})]})})},Fy=({name:u,issues:o,draggingIssue:d,onIssueClick:c,onNewIssue:h,onMoveIssue:x,onDragStart:f})=>{const p=Gh[u],[y,v]=w.useState(!1),g=d!==null&&d.column!==u;return i.jsxs("div",{className:`flex flex-col min-w-[220px] max-w-[220px] h-full rounded-xl transition-colors ${y&&g?"bg-indigo-500/5 ring-1 ring-indigo-500/30":""}`,onDragOver:b=>{g&&(b.preventDefault(),b.dataTransfer.dropEffect="move",v(!0))},onDragLeave:()=>v(!1),onDrop:b=>{b.preventDefault(),v(!1),d&&d.column!==u&&x(d,u)},children:[i.jsxs("div",{className:"flex items-center justify-between mb-3 flex-shrink-0",children:[i.jsxs("div",{className:"flex items-center space-x-2",children:[i.jsx("span",{className:`w-2.5 h-2.5 rounded-full ${p.dot}`}),i.jsx("span",{className:"text-xs font-semibold text-slate-400 uppercase tracking-wider",children:u}),i.jsx("span",{className:"text-[10px] font-bold text-slate-600 bg-slate-800 rounded-full px-1.5 py-0.5",children:o.length})]}),i.jsx("button",{onClick:()=>h(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:i.jsx(xs,{className:"h-3.5 w-3.5"})})]}),i.jsx("div",{className:"flex-1 overflow-y-auto space-y-2 pr-1 scrollbar-hide min-h-0",children:o.length===0?i.jsx("div",{className:`border-2 border-dashed rounded-xl h-24 flex items-center justify-center transition-colors ${y&&g?"border-indigo-500/40":"border-slate-800"}`,children:i.jsx("span",{className:"text-xs text-slate-700",children:y&&g?"Drop here":"No issues"})}):o.map(b=>i.jsx(Jy,{issue:b,onClick:()=>c(b),onDragStart:f},b.id))})]})},Wy=()=>{const[u,o]=w.useState(null),[d,c]=w.useState(null),[h,x]=w.useState(null),[f,p]=w.useState(null),y=w.useRef(!1),{addToast:v,selectedProjectId:g,globalModeLoading:b}=rt(),{data:M,loading:_,error:H,refetch:j}=Jt(Lh,[g],{enabled:!b});w.useEffect(()=>{const G=setInterval(()=>{y.current||j()},3e4);return()=>clearInterval(G)},[j]);const U=w.useCallback(async(G,Y)=>{x(null);const le=f??(M==null?void 0:M.columns);if(!le)return;const ue=le,Z={};for(const P of Wl)Z[P]=(le[P]??[]).filter(se=>se.number!==G.number);const I={...G,column:Y};Z[Y]=[...Z[Y]??[],I],p(Z),o(P=>(P==null?void 0:P.number)===G.number?I:P),y.current=!0;try{await kh(G.number,Y),j(),setTimeout(()=>{p(null),y.current=!1},800)}catch(P){p(ue),o(se=>(se==null?void 0:se.number)===G.number?G:se),y.current=!1,v({title:"Move failed",message:P instanceof Error?P.message:"Failed to move issue",type:"error"})}},[v,j,f,M]);if(b||_)return i.jsx("div",{className:"flex items-center justify-center h-full",children:i.jsx("div",{className:"text-slate-400",children:"Loading board..."})});if(H&&H.message.includes("Board not configured"))return i.jsxs("div",{className:"flex flex-col items-center justify-center h-full space-y-4",children:[i.jsx("div",{className:"text-4xl",children:"📋"}),i.jsx("h2",{className:"text-xl font-semibold text-slate-200",children:"Board not configured"}),i.jsxs("p",{className:"text-slate-500 text-sm max-w-sm text-center",children:["Run ",i.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(H)return i.jsxs("div",{className:"flex flex-col items-center justify-center h-full space-y-4",children:[i.jsx("div",{className:"text-slate-300",children:"Failed to load board"}),i.jsx("div",{className:"text-sm text-slate-500",children:H.message}),i.jsx(Qe,{onClick:()=>j(),children:"Retry"})]});if(!M)return null;const V=f??M.columns;return i.jsxs("div",{className:"flex flex-col h-full",children:[i.jsxs("div",{className:"flex items-center justify-between mb-6 flex-shrink-0",children:[i.jsxs("div",{children:[i.jsx("h1",{className:"text-2xl font-bold text-slate-100",children:"Board"}),i.jsxs("p",{className:"text-sm text-slate-500 mt-1",children:[Wl.reduce((G,Y)=>{var le;return G+(((le=V[Y])==null?void 0:le.length)??0)},0)," issues across ",Wl.length," columns"]})]}),i.jsxs(Qe,{onClick:()=>c("Ready"),children:[i.jsx(xs,{className:"h-4 w-4 mr-2"}),"New Issue"]})]}),i.jsx("div",{className:"flex-1 overflow-x-auto overflow-y-hidden",onDragEnd:()=>x(null),children:i.jsx("div",{className:"flex space-x-4 h-full pb-4",style:{minWidth:`${Wl.length*236}px`},children:Wl.map(G=>i.jsx(Fy,{name:G,issues:V[G]??[],draggingIssue:h,onIssueClick:o,onNewIssue:c,onMoveIssue:U,onDragStart:x},G))})}),u&&i.jsx(Ky,{issue:u,onClose:()=>o(null),onMoved:()=>j(),onClosed:()=>j()}),d&&i.jsx($y,{defaultColumn:d,onClose:()=>c(null),onCreated:()=>j()})]})},Py=[{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"}],Iy=({processes:u,activePrd:o,onCancelProcess:d,onForceClear:c,onViewLog:h,cancellingProcess:x,clearingLock:f})=>{const p=v=>u.find(g=>g.name===v),y=(v,g)=>v.length<=g?v:v.slice(0,g-1)+"...";return i.jsx("div",{className:"grid grid-cols-2 md:grid-cols-5 gap-3",children:Py.map(v=>{const g=p(v.processName),b=(g==null?void 0:g.running)??!1,M=g==null?void 0:g.pid,_=x===v.cancelType,H=b&&v.cancelType,j=!b&&v.name==="executor"&&o,U=b?M?`PID: ${M}`:v.runningLabel:v.idleLabel,V=b&&v.name==="executor"&&o?y(o,20):null;return i.jsxs("div",{className:`flex items-center gap-2 p-2.5 rounded-lg border transition-colors ${b?"bg-green-950/30 border-green-800/50":"bg-slate-950/50 border-slate-800"}`,children:[i.jsx("div",{className:`h-2.5 w-2.5 rounded-full flex-shrink-0 ${b?"bg-green-500 animate-pulse shadow-[0_0_8px_rgba(34,197,94,0.5)]":"bg-slate-700"}`}),i.jsxs("div",{className:"flex-1 min-w-0",children:[i.jsx("div",{className:`text-sm font-medium ${b?"text-slate-200":"text-slate-400"}`,children:v.displayName}),i.jsx("div",{className:"text-xs text-slate-500 truncate",children:V?i.jsxs("span",{className:"flex items-center gap-1",children:[i.jsx(yr,{className:"h-3 w-3 flex-shrink-0"}),V]}):U})]}),i.jsxs("div",{className:"flex-shrink-0",children:[H&&i.jsx("button",{onClick:()=>v.cancelType&&d(v.cancelType),disabled:_,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:i.jsx(th,{className:"h-3.5 w-3.5"})}),j&&i.jsx("button",{onClick:c,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:i.jsx(th,{className:"h-3.5 w-3.5"})}),!H&&!j&&b&&i.jsx("button",{onClick:h,className:"p-1 text-slate-400 hover:text-slate-300 hover:bg-white/5 rounded transition-colors",title:"View log",children:i.jsx(yr,{className:"h-3.5 w-3.5"})})]})]},v.name)})})},eb={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"},tb=()=>{var Z,I;const u=wr(),[o,d]=w.useState(null),[c,h]=w.useState(!1),{setProjectName:x,addToast:f,selectedProjectId:p,globalModeLoading:y,status:v}=rt(),{data:g}=Jt(Bh,[p],{enabled:!y}),{data:b}=Jt(()=>Lh().catch(()=>null),[p],{enabled:!y}),M=v;if(Ue.useEffect(()=>{M!=null&&M.projectName&&x(M.projectName)},[M,x]),y)return i.jsx("div",{className:"flex items-center justify-center h-full",children:i.jsx("div",{className:"text-slate-400",children:"Loading..."})});if(!M)return i.jsx("div",{className:"flex items-center justify-center h-full",children:i.jsx("div",{className:"text-slate-400",children:"Loading..."})});const _=M.prs.length,H=M.prs.filter(P=>P.reviewScore!==null&&P.reviewScore<70).length,j=((Z=b==null?void 0:b.columns.Ready)==null?void 0:Z.length)??0,U=((I=b==null?void 0:b.columns["In Progress"])==null?void 0:I.length)??0,V=async P=>{d(P);try{const se=await My(P),$=se.results.every(je=>je.success);f({title:$?"Process Cancelled":"Cancel Failed",message:se.results.map(je=>je.message).join("; "),type:$?"success":"error"})}catch(se){f({title:"Cancel Failed",message:se instanceof Error?se.message:"Failed to cancel process",type:"error"})}finally{d(null)}},G=async()=>{h(!0);try{await zy(),f({title:"Lock Cleared",message:"Stale executor state removed",type:"success"})}catch(P){f({title:"Clear Failed",message:P instanceof Error?P.message:"Failed to clear lock",type:"error"})}finally{h(!1)}},Y=P=>{if(!P)return"Not scheduled";try{const se=new Date(P),$=new Date,je=se.getTime()-$.getTime(),ge=Math.floor(je/6e4);return ge<0?"Running now...":ge<60?`in ${ge} min`:ge<1440?`in ${Math.floor(ge/60)} hr${ge>=120?"s":""}`:`in ${Math.floor(ge/1440)} day${ge>=2880?"s":""}`}catch{return"Unknown"}},ue=(()=>{var $,je,ge;if(g!=null&&g.paused)return null;const P=[{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:(($=g==null?void 0:g.qa)==null?void 0:$.nextRun)??null},{agent:"Auditor",nextRun:((je=g==null?void 0:g.audit)==null?void 0:je.nextRun)??null},{agent:"Planner",nextRun:((ge=g==null?void 0:g.planner)==null?void 0:ge.nextRun)??null}];let se=null;for(const qe of P)qe.nextRun&&(!se||new Date(qe.nextRun)<new Date(se.nextRun))&&(se=qe);return se?{agent:se.agent,time:Y(se.nextRun)}:null})();return i.jsxs("div",{className:"space-y-6",children:[i.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4",children:[i.jsxs(Ae,{className:"p-5",onClick:()=>u("/board"),children:[i.jsxs("div",{className:"flex justify-between items-start",children:[i.jsxs("div",{children:[i.jsx("p",{className:"text-sm font-medium text-slate-500",children:"Board Ready"}),i.jsx("h3",{className:"text-3xl font-bold text-slate-100 mt-1",children:j})]}),i.jsx("div",{className:"p-2 bg-green-500/10 rounded-lg text-green-400",children:i.jsx(hs,{className:"h-5 w-5"})})]}),i.jsx("p",{className:"text-xs text-slate-500 mt-4",children:"issues ready to start"})]}),i.jsxs(Ae,{className:"p-5",onClick:()=>u("/board"),children:[i.jsxs("div",{className:"flex justify-between items-start",children:[i.jsxs("div",{children:[i.jsx("p",{className:"text-sm font-medium text-slate-500",children:"In Progress"}),i.jsx("h3",{className:"text-3xl font-bold text-slate-100 mt-1",children:U})]}),i.jsx("div",{className:"p-2 bg-blue-500/10 rounded-lg text-blue-400",children:i.jsx(Th,{className:"h-5 w-5"})})]}),i.jsx("p",{className:"text-xs text-slate-500 mt-4",children:"issues in progress"})]}),i.jsxs(Ae,{className:"p-5",onClick:()=>u("/prs"),children:[i.jsxs("div",{className:"flex justify-between items-start",children:[i.jsxs("div",{children:[i.jsx("p",{className:"text-sm font-medium text-slate-500",children:"Open PRs"}),i.jsx("h3",{className:"text-3xl font-bold text-slate-100 mt-1",children:_})]}),i.jsx("div",{className:"p-2 bg-purple-500/10 rounded-lg text-purple-400",children:i.jsx(ki,{className:"h-5 w-5"})})]}),i.jsx("p",{className:`text-xs mt-4 ${H>0?"text-red-400 font-medium":"text-slate-500"}`,children:H>0?`${H} need work`:"All passing"})]}),i.jsxs(Ae,{className:"p-5",children:[i.jsxs("div",{className:"flex justify-between items-start",children:[i.jsxs("div",{children:[i.jsx("p",{className:"text-sm font-medium text-slate-500",children:"Automation"}),i.jsx("h3",{className:"text-3xl font-bold text-slate-100 mt-1",children:g!=null&&g.paused?"Paused":M.crontab.installed?"Active":"Inactive"})]}),i.jsx("div",{className:`p-2 rounded-lg ${g!=null&&g.paused?"bg-amber-500/10 text-amber-400":M.crontab.installed?"bg-indigo-500/10 text-indigo-400":"bg-slate-700/50 text-slate-500"}`,children:i.jsx(Ar,{className:"h-5 w-5"})})]}),i.jsx("p",{className:"text-xs text-slate-500 mt-4",children:g!=null&&g.paused?"All schedules paused":M.crontab.installed?`${M.crontab.entries.length} entr${M.crontab.entries.length===1?"y":"ies"} installed`:"No crontab entries"})]})]}),i.jsxs(Ae,{className:"p-4",children:[i.jsxs("div",{className:"flex items-center justify-between mb-3",children:[i.jsx("h2",{className:"text-base font-semibold text-slate-200",children:"Agents"}),i.jsx("button",{onClick:()=>u("/logs"),className:"text-xs text-slate-400 hover:text-slate-300 transition-colors",children:"View logs"})]}),i.jsx(Iy,{processes:M.processes,activePrd:M.activePrd,onCancelProcess:V,onForceClear:G,onViewLog:()=>u("/logs"),cancellingProcess:o,clearingLock:c})]}),ue&&i.jsxs("div",{className:"flex items-center justify-between px-4 py-3 bg-slate-900/50 rounded-lg border border-slate-800",children:[i.jsxs("div",{className:"flex items-center gap-2 text-sm text-slate-400",children:[i.jsx("span",{children:"Next automation:"}),i.jsx("span",{className:"text-slate-200 font-medium",children:ue.agent}),i.jsx("span",{children:ue.time})]}),i.jsxs("button",{onClick:()=>u("/scheduling"),className:"text-sm text-indigo-400 hover:text-indigo-300 flex items-center transition-colors",children:["Manage Schedules ",i.jsx(Wm,{className:"ml-1 h-3 w-3"})]})]}),i.jsxs("div",{className:"mt-6",children:[i.jsxs("div",{className:"flex items-center justify-between mb-4",children:[i.jsx("h2",{className:"text-lg font-semibold text-slate-200",children:"GitHub Board"}),i.jsxs("button",{onClick:()=>u("/board"),className:"text-sm text-indigo-400 hover:text-indigo-300 flex items-center transition-colors",children:["View board ",i.jsx(Wm,{className:"ml-1 h-3 w-3"})]})]}),i.jsx(Ae,{className:"p-4",children:b?i.jsx("div",{className:"flex flex-wrap gap-3",children:Wl.map(P=>{var $;const se=(($=b.columns[P])==null?void 0:$.length)??0;return i.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 ${eb[P]}`,children:[i.jsx("span",{className:"text-xs font-medium",children:P}),i.jsx("span",{className:"text-xs font-bold",children:se})]},P)})}):i.jsxs("p",{className:"text-sm text-slate-500 italic",children:["Board not configured — run ",i.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."]})})]})]})},lb=()=>{const[u,o]=w.useState(!0),[d,c]=w.useState(""),[h,x]=w.useState("executor"),f=w.useRef(null),{selectedProjectId:p,globalModeLoading:y}=rt(),v=rt(G=>G.status),{data:g,loading:b,error:M,refetch:_}=Jt(()=>wy(h,500),[h,p],{enabled:!y}),H=(g==null?void 0:g.lines)||[];w.useEffect(()=>{u&&f.current&&(f.current.scrollTop=f.current.scrollHeight)},[H,u]),w.useEffect(()=>{if(!u)return;const G=window.setInterval(()=>{_()},3e3);return()=>window.clearInterval(G)},[u,h,_]);const j=H.filter(G=>G.toLowerCase().includes(d.toLowerCase())),U=G=>{x(G),c("")},V=G=>{if(!(v!=null&&v.processes))return!1;const Y=v.processes.find(le=>le.name===G);return(Y==null?void 0:Y.running)??!1};return M?i.jsxs("div",{className:"flex flex-col items-center justify-center h-full space-y-4",children:[i.jsx(El,{className:"h-12 w-12 text-red-400"}),i.jsx("div",{className:"text-slate-300",children:"Failed to load logs"}),i.jsx("div",{className:"text-sm text-slate-500",children:M.message}),i.jsx(Qe,{onClick:()=>_(),children:"Retry"})]}):i.jsxs("div",{className:"flex flex-col h-[calc(100vh-8rem)]",children:[i.jsxs("div",{className:"flex items-center justify-between mb-4 bg-slate-900 p-2 rounded-lg border border-slate-800 shadow-sm",children:[i.jsxs("div",{className:"flex items-center space-x-2",children:[i.jsxs("div",{className:"relative group",children:[i.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:G=>c(G.target.value)}),i.jsx(Vi,{className:"absolute left-2.5 top-2 h-4 w-4 text-slate-500 group-focus-within:text-indigo-400"})]}),i.jsx("div",{className:"h-6 w-px bg-slate-700 mx-2"}),i.jsxs("div",{className:"flex space-x-1",children:[i.jsx("button",{onClick:()=>U("executor"),className:`px-3 py-1.5 rounded text-sm font-medium transition-colors ${h==="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:i.jsxs("div",{className:"flex items-center space-x-2",children:[i.jsx("span",{children:"Executor"}),V("executor")&&i.jsx("div",{className:"h-2 w-2 bg-green-500 rounded-full animate-pulse"})]})}),i.jsx("button",{onClick:()=>U("reviewer"),className:`px-3 py-1.5 rounded text-sm font-medium transition-colors ${h==="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:i.jsxs("div",{className:"flex items-center space-x-2",children:[i.jsx("span",{children:"Reviewer"}),V("reviewer")&&i.jsx("div",{className:"h-2 w-2 bg-green-500 rounded-full animate-pulse"})]})}),i.jsx("button",{onClick:()=>U("qa"),className:`px-3 py-1.5 rounded text-sm font-medium transition-colors ${h==="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:i.jsxs("div",{className:"flex items-center space-x-2",children:[i.jsx("span",{children:"QA"}),V("qa")&&i.jsx("div",{className:"h-2 w-2 bg-green-500 rounded-full animate-pulse"})]})}),i.jsx("button",{onClick:()=>U("audit"),className:`px-3 py-1.5 rounded text-sm font-medium transition-colors ${h==="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:i.jsxs("div",{className:"flex items-center space-x-2",children:[i.jsx("span",{children:"Auditor"}),V("audit")&&i.jsx("div",{className:"h-2 w-2 bg-green-500 rounded-full animate-pulse"})]})}),i.jsx("button",{onClick:()=>U("planner"),className:`px-3 py-1.5 rounded text-sm font-medium transition-colors ${h==="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:i.jsxs("div",{className:"flex items-center space-x-2",children:[i.jsx("span",{children:"Planner"}),V("planner")&&i.jsx("div",{className:"h-2 w-2 bg-green-500 rounded-full animate-pulse"})]})})]})]}),i.jsxs("div",{className:"flex items-center space-x-2",children:[i.jsxs(Qe,{size:"sm",variant:"ghost",onClick:()=>_(),children:[i.jsx(Im,{className:"h-4 w-4 mr-2"}),"Refresh"]}),i.jsxs(Qe,{size:"sm",variant:"ghost",onClick:()=>o(!u),children:[u?i.jsx(zh,{className:"h-4 w-4 mr-2"}):i.jsx(Xi,{className:"h-4 w-4 mr-2"}),u?"Pause":"Resume"]})]})]}),i.jsxs("div",{className:"flex-1 bg-slate-900 rounded-xl overflow-hidden shadow-inner border border-slate-800 flex flex-col relative",children:[i.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:[i.jsxs("span",{children:["File: ",h,".log"]}),i.jsxs("span",{children:[j.length," lines"]})]}),i.jsxs("div",{ref:f,className:"flex-1 overflow-y-auto p-4 font-mono text-sm terminal-scroll bg-slate-900",children:[b?i.jsx("div",{className:"flex items-center justify-center h-full text-slate-500",children:"Loading logs..."}):j.length===0?i.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"}):j.map((G,Y)=>{const le=G.includes("[ERROR]"),ue=G.includes("[WARN]");return i.jsxs("div",{className:`leading-6 hover:bg-slate-800/50 px-2 rounded -mx-2 ${le?"text-red-400":ue?"text-amber-400":"text-slate-300"}`,children:[i.jsx("span",{className:"text-slate-600 select-none w-10 inline-block text-right mr-4 text-xs opacity-50",children:Y+1}),G]},Y)}),u&&i.jsx("div",{className:"h-4"})," "]}),!u&&i.jsxs("div",{className:"absolute bottom-4 right-4 bg-indigo-600 text-white px-3 py-1.5 rounded-full shadow-lg shadow-indigo-900/40 text-xs font-medium flex items-center cursor-pointer hover:bg-indigo-500 transition-colors",onClick:()=>o(!0),children:[i.jsx(Im,{className:"h-4 w-4 mr-2"}),"Scroll to bottom"]})]})]})},ab=()=>{const[u,o]=w.useState(null),[d,c]=w.useState(!1),[h,x]=w.useState("all"),[f,p]=w.useState("number"),[y,v]=w.useState("desc"),{addToast:g,selectedProjectId:b,globalModeLoading:M}=rt(),{data:_,loading:H,error:j,refetch:U}=Jt(qh,[b],{enabled:!M}),V=_??[],G=$=>{switch($){case"pass":return i.jsx(hs,{className:"h-4 w-4 text-green-500"});case"fail":return i.jsx(_g,{className:"h-4 w-4 text-red-500"});case"pending":return i.jsx(Ah,{className:"h-4 w-4 text-amber-500 animate-spin"});default:return i.jsx(El,{className:"h-4 w-4 text-slate-500"})}},Y=$=>{switch($){case"pass":return"All CI checks passed";case"fail":return"One or more CI checks failed";case"pending":return"CI checks are still running";default:return"No CI data available"}},le=$=>$===null?"No review decision yet":$===100?"PR has been approved":$===0?"Changes have been requested":`Review score: ${$}`,ue=w.useMemo(()=>V.filter($=>{switch(h){case"needs-work":return $.ciStatus==="fail"||$.reviewScore===0;case"pending":return $.ciStatus==="pending"||$.ciStatus==="unknown"||$.reviewScore===null;case"passed":return $.ciStatus==="pass"&&$.reviewScore===100;case"all":default:return!0}}),[V,h]),Z=w.useMemo(()=>[...ue].sort((je,ge)=>{let qe=0;switch(f){case"number":qe=je.number-ge.number;break;case"title":qe=je.title.localeCompare(ge.title);break;case"branch":qe=je.branch.localeCompare(ge.branch);break;case"ciStatus":{const D={fail:0,pending:1,unknown:2,pass:3};qe=(D[je.ciStatus]??2)-(D[ge.ciStatus]??2);break}case"reviewScore":{const D=je.reviewScore??-1,ae=ge.reviewScore??-1;qe=D-ae;break}}return y==="asc"?qe:-qe}),[ue,f,y]),I=$=>{f===$?v(y==="asc"?"desc":"asc"):(p($),v("desc"))},P=$=>f!==$?i.jsx(dg,{className:"h-3 w-3 text-slate-600"}):y==="asc"?i.jsx(mg,{className:"h-3 w-3 text-indigo-400"}):i.jsx(cg,{className:"h-3 w-3 text-indigo-400"});if(H)return i.jsx("div",{className:"flex items-center justify-center h-full",children:i.jsx("div",{className:"text-slate-400",children:"Loading PRs..."})});if(j)return i.jsxs("div",{className:"flex flex-col items-center justify-center h-full space-y-4",children:[i.jsx(El,{className:"h-12 w-12 text-red-400"}),i.jsx("div",{className:"text-slate-300",children:"Failed to load PRs"}),i.jsx("div",{className:"text-sm text-slate-500",children:j.message}),i.jsx(Qe,{onClick:()=>U(),children:"Retry"})]});const se=async()=>{c(!0);try{const $=await Cy();g({title:"Reviewer Started",message:$.pid?`Started with PID ${$.pid}`:"Reviewer started",type:"success"})}catch($){g({title:"Reviewer Failed",message:$ instanceof Error?$.message:"Failed to start reviewer",type:"error"})}finally{c(!1)}};return i.jsxs("div",{className:"space-y-6",children:[i.jsxs("div",{className:"flex items-center justify-between",children:[i.jsxs("div",{className:"flex space-x-1",children:[i.jsx("button",{onClick:()=>x("all"),className:`px-3 py-1 rounded-full text-xs font-medium cursor-pointer border transition-colors ${h==="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"}),i.jsx("button",{onClick:()=>x("needs-work"),className:`px-3 py-1 rounded-full text-xs font-medium cursor-pointer border transition-colors ${h==="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"}),i.jsx("button",{onClick:()=>x("pending"),className:`px-3 py-1 rounded-full text-xs font-medium cursor-pointer border transition-colors ${h==="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"}),i.jsx("button",{onClick:()=>x("passed"),className:`px-3 py-1 rounded-full text-xs font-medium cursor-pointer border transition-colors ${h==="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"})]}),i.jsxs(Qe,{size:"sm",onClick:se,disabled:d,children:[i.jsx(Vi,{className:"h-4 w-4 mr-2"}),d?"Starting...":"Run Reviewer Now"]})]}),i.jsx("div",{className:"bg-slate-900 rounded-lg shadow-sm border border-slate-800 overflow-hidden",children:i.jsxs("table",{className:"min-w-full divide-y divide-slate-800",children:[i.jsx("thead",{className:"bg-slate-950/50",children:i.jsxs("tr",{children:[i.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:()=>I("number"),children:i.jsxs("div",{className:"flex items-center space-x-1",children:[i.jsx("span",{children:"Title"}),P("number")]})}),i.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:()=>I("branch"),children:i.jsxs("div",{className:"flex items-center space-x-1",children:[i.jsx("span",{children:"Branch"}),P("branch")]})}),i.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:()=>I("ciStatus"),children:i.jsxs("div",{className:"flex items-center space-x-1",children:[i.jsx("span",{children:"CI Status"}),P("ciStatus")]})}),i.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:()=>I("reviewScore"),children:i.jsxs("div",{className:"flex items-center space-x-1",children:[i.jsx("span",{children:"Review Score"}),P("reviewScore")]})}),i.jsx("th",{className:"px-6 py-3 text-right text-xs font-medium text-slate-500 uppercase tracking-wider",children:"Actions"})]})}),i.jsxs("tbody",{className:"divide-y divide-slate-800",children:[Z.map($=>i.jsxs("tr",{className:"hover:bg-slate-800/50 cursor-pointer transition-colors",onClick:()=>o(u===$.number?null:$.number),children:[i.jsx("td",{className:"px-6 py-4",children:i.jsxs("div",{className:"flex items-center",children:[i.jsxs("span",{className:"text-slate-500 font-mono mr-2",children:["#",$.number]}),i.jsx("span",{className:"font-medium text-slate-200",children:$.title})]})}),i.jsx("td",{className:"px-6 py-4",children:i.jsx("span",{className:"px-2 py-1 bg-slate-800 text-slate-400 border border-slate-700 rounded text-xs font-mono",children:$.branch})}),i.jsx("td",{className:"px-6 py-4",children:i.jsxs("div",{className:"flex items-center space-x-2",title:Y($.ciStatus),children:[G($.ciStatus),i.jsx("span",{className:"text-sm capitalize text-slate-400",children:$.ciStatus})]})}),i.jsx("td",{className:"px-6 py-4",children:$.reviewScore!==null?i.jsxs("div",{className:"flex items-center space-x-2",title:le($.reviewScore),children:[i.jsx("div",{className:"w-24 h-2 bg-slate-800 rounded-full overflow-hidden",children:i.jsx("div",{className:`h-full ${$.reviewScore>=70?"bg-green-500":"bg-red-500"}`,style:{width:`${$.reviewScore}%`}})}),i.jsx("span",{className:`text-sm font-bold ${$.reviewScore>=70?"text-green-500":"text-red-500"}`,children:$.reviewScore})]}):i.jsx("span",{className:"text-slate-600 text-sm",title:"No review decision yet",children:"—"})}),i.jsx("td",{className:"px-6 py-4 text-right",children:i.jsx("a",{href:$.url,target:"_blank",rel:"noopener noreferrer",className:"text-slate-500 hover:text-indigo-400",onClick:je=>je.stopPropagation(),children:i.jsx(Mh,{className:"h-4 w-4"})})})]},$.number)),Z.length===0&&i.jsx("tr",{children:i.jsx("td",{colSpan:5,className:"px-6 py-12 text-center text-slate-500",children:V.length===0?"No open PRs found.":`No PRs match the "${h}" filter.`})})]})]})}),u&&i.jsx(Ae,{className:"p-6 bg-slate-900 border-indigo-900/50 animate-in fade-in slide-in-from-top-4 duration-300",children:(()=>{const $=V.find(je=>je.number===u);return $?i.jsxs("div",{className:"flex items-center justify-between",children:[i.jsxs("div",{children:[i.jsx("h3",{className:"font-bold text-slate-200",children:$.title}),i.jsxs("p",{className:"text-sm text-slate-400 mt-1",children:["Branch: ",i.jsx("span",{className:"font-mono",children:$.branch})]})]}),i.jsxs("div",{className:"flex items-center space-x-4",children:[i.jsxs("div",{className:"text-center",title:Y($.ciStatus),children:[i.jsx("div",{className:"text-xs text-slate-500",children:"CI Status"}),i.jsxs("div",{className:"flex items-center space-x-1 mt-1",children:[G($.ciStatus),i.jsx("span",{className:"text-sm capitalize text-slate-300",children:$.ciStatus})]})]}),$.reviewScore!==null&&i.jsxs("div",{className:"text-center",title:le($.reviewScore),children:[i.jsx("div",{className:"text-xs text-slate-500",children:"Review Score"}),i.jsx("div",{className:`text-xl font-bold mt-1 ${$.reviewScore>=70?"text-green-500":"text-red-500"}`,children:$.reviewScore})]})]})]}):null})()})]})},_t=Ue.forwardRef(({className:u="",label:o,checked:d,onChange:c,...h},x)=>{const f=p=>{c&&c(p.target.checked)};return i.jsxs("label",{className:`inline-flex items-center cursor-pointer ${u}`,children:[i.jsxs("div",{className:"relative",children:[i.jsx("input",{type:"checkbox",className:"sr-only peer",ref:x,checked:d,onChange:f,...h}),i.jsx("div",{className:"w-11 h-6 bg-slate-800 peer-focus:outline-none peer-focus:ring-2 peer-focus:ring-indigo-500/50 rounded-full peer peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-slate-400 after:border-slate-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all peer-checked:bg-indigo-600 peer-checked:after:bg-white peer-disabled:opacity-50 peer-disabled:cursor-not-allowed"})]}),o&&i.jsx("span",{className:"ml-3 text-sm font-medium text-slate-300 select-none",children:o})]})});_t.displayName="Switch";const nb=()=>{const{addToast:u,selectedProjectId:o,globalModeLoading:d}=rt(),[c,h]=w.useState(!1),[x,f]=w.useState(!1),{data:p,loading:y,error:v,refetch:g}=Jt(Oy,[o],{enabled:!d});w.useEffect(()=>{if(!(p!=null&&p.enabled))return;const G=setInterval(()=>{g()},1e4);return()=>clearInterval(G)},[p==null?void 0:p.enabled,g]);const b=async G=>{f(!0);try{await Yh(G),u({title:G?"Scanner Enabled":"Scanner Disabled",message:G?"Roadmap scanner is now active.":"Roadmap scanner has been paused.",type:G?"success":"info"}),g()}catch(Y){u({title:"Toggle Failed",message:Y instanceof Error?Y.message:"Failed to toggle scanner",type:"error"})}finally{f(!1)}},M=async()=>{h(!0);try{const G=await Uy();G.created.length>0?u({title:"Scan Complete",message:`Created ${G.created.length} PRD(s): ${G.created.join(", ")}`,type:"success"}):u({title:"Scan Complete",message:"No new PRDs to create.",type:"info"}),G.errors.length>0&&u({title:"Scan Errors",message:G.errors.join("; "),type:"warning"}),g()}catch(G){u({title:"Scan Failed",message:G instanceof Error?G.message:"Failed to scan roadmap",type:"error"})}finally{h(!1)}};if(y)return i.jsx("div",{className:"flex items-center justify-center h-full",children:i.jsx("div",{className:"text-slate-400",children:"Loading roadmap scanner..."})});if(v)return i.jsxs("div",{className:"flex flex-col items-center justify-center h-full space-y-4",children:[i.jsx(El,{className:"h-12 w-12 text-red-400"}),i.jsx("div",{className:"text-slate-300",children:"Failed to load roadmap data"}),i.jsx("div",{className:"text-sm text-slate-500",children:v.message}),i.jsx(Qe,{onClick:()=>g(),children:"Retry"})]});if(!p)return null;if(p.status==="no-roadmap")return i.jsxs("div",{className:"space-y-6 max-w-6xl mx-auto",children:[i.jsx("div",{className:"flex items-center justify-between",children:i.jsx("h1",{className:"text-3xl font-bold text-slate-100",children:"Roadmap Scanner"})}),i.jsx(Ae,{className:"p-12",children:i.jsxs("div",{className:"flex flex-col items-center text-center space-y-4",children:[i.jsx("div",{className:"p-4 bg-slate-800 rounded-full",children:i.jsx(_h,{className:"h-10 w-10 text-slate-500"})}),i.jsx("h2",{className:"text-xl font-semibold text-slate-200",children:"No ROADMAP.md Found"}),i.jsxs("p",{className:"text-slate-400 max-w-md",children:["Create a ",i.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 (",i.jsx("code",{className:"text-slate-300 text-sm",children:"- [ ] Feature"}),") or heading-based items (",i.jsx("code",{className:"text-slate-300 text-sm",children:"### Feature"}),") to get started."]})]})})]});const _=p.totalItems>0?Math.round(p.processedItems/p.totalItems*100):0,H=ib(p.status),j=ub(p.items),U=p.lastScan?cb(p.lastScan):"Never",V=p.autoScanInterval?Math.round(p.autoScanInterval/60):5;return i.jsxs("div",{className:"space-y-6 max-w-6xl mx-auto",children:[i.jsxs("div",{className:"flex items-center justify-between",children:[i.jsx("h1",{className:"text-3xl font-bold text-slate-100",children:"Roadmap Scanner"}),i.jsxs("div",{className:"flex items-center space-x-4",children:[i.jsx(_t,{label:p.enabled?"Enabled":"Disabled",checked:p.enabled,onChange:b,disabled:x}),i.jsxs(Qe,{onClick:M,loading:c,disabled:!p.enabled||p.status==="complete",children:[i.jsx(Xi,{className:"h-4 w-4 mr-2"}),"Scan Now"]})]})]}),i.jsx(Ae,{className:`p-6 border-2 ${H.borderColor}`,children:i.jsxs("div",{className:"flex items-center justify-between",children:[i.jsxs("div",{className:"flex items-center space-x-4",children:[i.jsx(H.icon,{className:`h-8 w-8 ${H.textColor}`}),i.jsxs("div",{children:[i.jsx("div",{className:"text-sm text-slate-400",children:"Scanner Status"}),i.jsx("div",{className:`text-2xl font-bold ${H.textColor}`,children:H.label})]})]}),i.jsxs("div",{className:"text-right text-sm text-slate-400 space-y-1",children:[i.jsxs("div",{children:["Last scan: ",i.jsx("span",{className:"text-slate-300",children:U})]}),p.enabled&&p.status!=="complete"&&i.jsxs("div",{children:["Auto-scan: ",i.jsxs("span",{className:"text-slate-300",children:["every ",V," min"]})]}),p.enabled&&p.status==="complete"&&i.jsx("div",{className:"text-emerald-400",children:"Auto-scan paused - all items sliced"})]})]})}),i.jsxs(Ae,{className:"p-6",children:[i.jsxs("div",{className:"flex items-center justify-between mb-3",children:[i.jsx("h3",{className:"text-sm font-medium text-slate-300",children:"Progress"}),i.jsxs("span",{className:"text-sm text-slate-400",children:[p.processedItems," / ",p.totalItems," items (",_,"%)"]})]}),i.jsx("div",{className:"w-full h-3 bg-slate-800 rounded-full overflow-hidden",children:i.jsx("div",{className:`h-full rounded-full transition-all duration-500 ${_===100?"bg-gradient-to-r from-emerald-500 to-emerald-400":"bg-gradient-to-r from-indigo-600 to-indigo-400"}`,style:{width:`${_}%`}})})]}),Object.entries(j).map(([G,Y])=>i.jsxs(Ae,{className:"p-6",children:[i.jsx("h3",{className:"text-lg font-semibold text-slate-200 mb-4",children:G}),i.jsx("div",{className:"space-y-2",children:Y.map(le=>i.jsx(sb,{item:le},le.hash))})]},G))]})};function sb({item:u}){const o=u.checked,d=u.processed;return i.jsxs("div",{className:`flex items-center justify-between p-3 rounded-lg border ${o?"bg-slate-950/30 border-slate-800/50":d?"bg-emerald-500/5 border-emerald-500/10":"bg-slate-950/50 border-slate-800"}`,children:[i.jsxs("div",{className:"flex items-center space-x-3 min-w-0 flex-1",children:[o?i.jsx(Wg,{className:"h-4 w-4 text-slate-600 flex-shrink-0"}):d?i.jsx(hs,{className:"h-4 w-4 text-emerald-400 flex-shrink-0"}):i.jsx(yr,{className:"h-4 w-4 text-slate-500 flex-shrink-0"}),i.jsxs("div",{className:"min-w-0",children:[i.jsx("div",{className:`text-sm font-medium truncate ${o?"line-through text-slate-600":"text-slate-200"}`,children:u.title}),u.description&&i.jsx("div",{className:"text-xs text-slate-500 truncate mt-0.5",children:u.description})]})]}),i.jsx("div",{className:"flex-shrink-0 ml-3",children:o?i.jsx(Bi,{variant:"neutral",children:"Skipped"}):d?i.jsx(Bi,{variant:"success",children:u.prdFile||"Processed"}):i.jsx(Bi,{variant:"warning",children:"Pending"})})]})}function ib(u){switch(u){case"complete":return{label:"Complete",icon:hs,textColor:"text-emerald-400",borderColor:"border-emerald-500/20 bg-emerald-500/5"};case"idle":return{label:"Idle",icon:ki,textColor:"text-blue-400",borderColor:"border-blue-500/20 bg-blue-500/5"};case"scanning":return{label:"Scanning",icon:Xi,textColor:"text-indigo-400",borderColor:"border-indigo-500/20 bg-indigo-500/5"};case"disabled":return{label:"Disabled",icon:El,textColor:"text-slate-400",borderColor:"border-slate-500/20 bg-slate-500/5"};default:return{label:"No Roadmap",icon:El,textColor:"text-slate-500",borderColor:"border-slate-500/20"}}}function ub(u){const o={};for(const d of u){const c=d.section||"General";o[c]||(o[c]=[]),o[c].push(d)}return o}function cb(u){try{const o=new Date(u),c=new Date().getTime()-o.getTime(),h=Math.floor(c/6e4);if(h<1)return"Just now";if(h<60)return`${h} min ago`;const x=Math.floor(h/60);return x<24?`${x} hr ago`:`${Math.floor(x/24)} day(s) ago`}catch{return"Unknown"}}const Yi=[{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"}],zr=[{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 on(u){return u.trim().replace(/\s+/g," ")}function un(u,o){return on(u)===on(o)}function rb(u){if(u)return zr.find(o=>o.id===u)}function Qh(u,o,d,c,h,x){return un(u.schedules.executor,o)&&un(u.schedules.reviewer,d)&&un(u.schedules.qa,c)&&un(u.schedules.audit,h)&&un(u.schedules.slicer,x)}function ob(u,o,d,c,h){return zr.find(x=>Qh(x,u,o,d,c,h))}function cn(u,o,d,c,h,x){const f=rb(u);return f&&Qh(f,o,d,c,h,x)?f:ob(o,d,c,h,x)}function sh(u){const o=on(u),d=o.split(/\s+/);if(d.length!==5)return o;const[c,h,x,f,p]=d,y=/^\d+$/.test(c),v=Yi.find(g=>on(g.value)===o);if(v)return v.label;if(c==="*/30"&&h==="*")return"Every 30 minutes";if(c==="0"&&h==="*")return"Every hour";if(c.startsWith("*/"))return`Every ${parseInt(c.replace("*/",""),10)} minutes`;if(y&&h.startsWith("*/")&&x==="*"&&f==="*"&&p==="*"){const g=parseInt(h.replace("*/",""),10);return c==="0"?`Every ${g} hours`:`Every ${g} hours at :${c.padStart(2,"0")}`}if(c==="0"&&h.startsWith("*/"))return`Every ${parseInt(h.replace("*/",""),10)} hours`;if(c==="0"&&h.includes("-")){const[g,b]=h.split("-");return`Every hour from ${cs(g)} to ${cs(b)}`}if(y&&h.includes("-")&&x==="*"&&f==="*"&&p==="*"){const[g,b]=h.split("-");return`Every hour from ${rs(g,c)} to ${rs(b,c)}`}if(c==="0"&&h.includes(",")){const g=h.split(",").map(cs);return g.length<=3?`At ${g.join(" and ")}`:`At ${g.slice(0,-1).join(", ")}, and ${g[g.length-1]}`}if(y&&h.includes(",")&&x==="*"&&f==="*"&&(p==="*"||p==="1-5")){const g=h.split(",").map(M=>rs(M,c)),b=p==="1-5"?"Weekdays at ":"At ";return g.length<=3?`${b}${g.join(" and ")}`:`${b}${g.slice(0,-1).join(", ")}, and ${g[g.length-1]}`}return c==="0"&&h!=="*"&&x==="*"&&f==="*"&&p==="*"?`Daily at ${cs(h)}`:y&&h!=="*"&&x==="*"&&f==="*"&&p==="*"?`Daily at ${rs(h,c)}`:c==="0"&&h!=="*"&&x==="*"&&f==="*"&&p==="1-5"?`Weekdays at ${cs(h)}`:y&&h!=="*"&&x==="*"&&f==="*"&&p==="1-5"?`Weekdays at ${rs(h,c)}`:o}function cs(u){const o=parseInt(u,10);return o===0?"12 AM":o<12?`${o} AM`:o===12?"12 PM":`${o-12} PM`}function rs(u,o){const d=o.padStart(2,"0"),c=parseInt(u,10);return Number.isNaN(c)?`${u}:${d}`:c===0?`12:${d} AM`:c<12?`${c}:${d} AM`:c===12?`12:${d} PM`:`${c-12}:${d} PM`}function db(u){const o=on(u),d=Yi.find(c=>on(c.value)===o);return(d==null?void 0:d.value)??"__custom__"}function fb(u){const o=new Date,d=u.getTime()-o.getTime(),c=Math.floor(d/6e4),h=Math.floor(c/60),x=Math.floor(h/24);return c<1?"less than a minute":c<60?`in ${c} minute${c>1?"s":""}`:h<24?`in ${h} hour${h>1?"s":""}`:`in ${x} day${x>1?"s":""}`}function mb(u){const o={weekday:"short",month:"short",day:"numeric",hour:"numeric",minute:"2-digit",hour12:!0};return u.toLocaleDateString("en-US",o)}function hb(u){const o=new Date,d=u.getTime()-o.getTime(),c=Math.floor(d/6e4);return c>=0&&c<30}const Le=Ue.forwardRef(({className:u="",label:o,error:d,helperText:c,rightIcon:h,...x},f)=>{const p=Ue.useId(),y=x.id??p,v=d?`${y}-error`:void 0,g=!d&&c?`${y}-help`:void 0,b=[v,g].filter(Boolean).join(" ")||void 0;return i.jsxs("div",{className:"w-full",children:[o&&i.jsx("label",{htmlFor:y,className:"block text-sm font-medium text-slate-400 mb-1.5",children:o}),i.jsxs("div",{className:"relative",children:[i.jsx("input",{ref:f,id:y,"aria-describedby":b,"aria-invalid":d?!0:x["aria-invalid"],className:`
345
+ w-full rounded-lg bg-slate-950 border border-slate-800
346
+ px-3 py-2 text-sm text-slate-200
347
+ placeholder:text-slate-600
348
+ focus:outline-none focus:ring-2 focus:ring-indigo-500/50 focus:border-indigo-500
349
+ disabled:opacity-50 disabled:cursor-not-allowed
350
+ transition-all duration-200
351
+ ${d?"border-red-500/50 focus:ring-red-500/50 focus:border-red-500":""}
352
+ ${h?"pr-10":""}
353
+ ${u}
354
+ `,...x}),h&&i.jsx("div",{className:"absolute inset-y-0 right-0 flex items-center pr-3 pointer-events-none text-slate-500",children:h})]}),d?i.jsx("p",{id:v,className:"mt-1.5 text-xs text-red-400",children:d}):c?i.jsx("p",{id:g,className:"mt-1.5 text-xs text-slate-500",children:c}):null]})});Le.displayName="Input";const zt=Ue.forwardRef(({className:u="",label:o,error:d,helperText:c,options:h,value:x,onChange:f,children:p,...y},v)=>{const g=Ue.useId(),b=y.id??g,M=d?`${b}-error`:void 0,_=!d&&c?`${b}-help`:void 0,H=[M,_].filter(Boolean).join(" ")||void 0,j=U=>{f&&f(U.target.value)};return i.jsxs("div",{className:"w-full",children:[o&&i.jsx("label",{htmlFor:b,className:"block text-sm font-medium text-slate-400 mb-1.5",children:o}),i.jsxs("div",{className:"relative",children:[i.jsx("select",{ref:v,id:b,"aria-describedby":H,"aria-invalid":d?!0:y["aria-invalid"],className:`
355
+ w-full appearance-none rounded-lg bg-slate-950 border border-slate-800
356
+ px-3 py-2 pr-10 text-sm text-slate-200
357
+ focus:outline-none focus:ring-2 focus:ring-indigo-500/50 focus:border-indigo-500
358
+ disabled:opacity-50 disabled:cursor-not-allowed
359
+ transition-all duration-200
360
+ ${d?"border-red-500/50 focus:ring-red-500/50 focus:border-red-500":""}
361
+ ${u}
362
+ `,value:x,onChange:j,...y,children:h?h.map(U=>i.jsx("option",{value:U.value,children:U.label},U.value)):p}),i.jsx("div",{className:"pointer-events-none absolute inset-y-0 right-0 flex items-center px-2 text-slate-500",children:i.jsx(bg,{className:"h-4 w-4"})})]}),d?i.jsx("p",{id:M,className:"mt-1.5 text-xs text-red-400",children:d}):c?i.jsx("p",{id:_,className:"mt-1.5 text-xs text-slate-500",children:c}):null]})});zt.displayName="Select";const rn=({label:u,value:o,onChange:d,helperText:c,placeholder:h="5 */3 * * *"})=>{const x=db(o),f=x==="__custom__",p=g=>{g!=="__custom__"&&d(g)},y=g=>{d(g.target.value)},v=Yi.find(g=>g.value===x);return i.jsxs("div",{className:"space-y-3",children:[i.jsx(zt,{label:u,value:x,onChange:p,options:Yi.map(g=>({label:g.label,value:g.value})),helperText:f?void 0:(v==null?void 0:v.description)||c}),f&&i.jsxs("div",{className:"space-y-2 mt-2",children:[i.jsx(Le,{label:"Cron Expression",value:o,onChange:y,placeholder:h}),i.jsxs("div",{className:"text-xs text-slate-500 bg-slate-900/40 p-3 rounded-md border border-slate-800/60",children:[i.jsx("strong",{className:"text-slate-400",children:"Format:"})," minute hour day month weekday",i.jsx("br",{}),i.jsx("strong",{className:"text-slate-400",children:"Examples:"})," ",i.jsx("code",{className:"bg-slate-950 px-1 py-0.5 rounded text-indigo-300",children:"0 * * * *"})," (hourly),"," ",i.jsx("code",{className:"bg-slate-950 px-1 py-0.5 rounded text-indigo-300",children:"0 0 * * *"})," (daily at midnight)"]})]})]})},Xh=({form:u,scheduleMode:o,selectedTemplateId:d,onFieldChange:c,onSwitchToTemplate:h,onSwitchToCustom:x,onApplyTemplate:f})=>i.jsxs(Ae,{className:"p-6 space-y-6",children:[i.jsxs("div",{className:"flex items-start justify-between gap-4",children:[i.jsxs("div",{children:[i.jsx("h3",{className:"text-lg font-medium text-slate-200 mb-1",children:"Job Schedules"}),i.jsx("p",{className:"text-sm text-slate-400",children:"Configure when automated jobs run using a preset template or custom cron expressions"})]}),i.jsxs("div",{className:"flex rounded-lg border border-slate-700 overflow-hidden shrink-0",children:[i.jsx("button",{type:"button",className:`px-4 py-1.5 text-sm font-medium transition-colors ${o==="template"?"bg-indigo-600 text-white":"bg-slate-800 text-slate-400 hover:text-slate-200"}`,onClick:h,children:"Template"}),i.jsx("button",{type:"button",className:`px-4 py-1.5 text-sm font-medium transition-colors ${o==="custom"?"bg-indigo-600 text-white":"bg-slate-800 text-slate-400 hover:text-slate-200"}`,onClick:x,children:"Custom"})]})]}),o==="template"?i.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3",children:zr.map(p=>{const y=d===p.id;return i.jsxs("button",{type:"button",onClick:()=>f(p),className:`text-left p-4 rounded-lg border transition-colors ${y?"border-indigo-500 bg-indigo-950/40":"border-slate-700 bg-slate-800/30 hover:border-slate-600"}`,children:[i.jsx("div",{className:"font-medium text-slate-200 mb-1",children:p.label}),i.jsx("p",{className:"text-xs text-slate-400 mb-3",children:p.description}),i.jsx("div",{className:"space-y-0.5",children:[["Executor",p.hints.executor],["Reviewer",p.hints.reviewer],["QA",p.hints.qa],["Audit",p.hints.audit],["Slicer",p.hints.slicer]].map(([v,g])=>i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("span",{className:"text-xs text-slate-500 w-16 shrink-0",children:v}),i.jsx("span",{className:"text-xs text-slate-400",children:g})]},v))})]},p.id)})}):i.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[i.jsx(rn,{label:"PRD Execution Schedule",value:u.cronSchedule,onChange:p=>c("cronSchedule",p)}),i.jsx(rn,{label:"PR Review Schedule",value:u.reviewerSchedule,onChange:p=>c("reviewerSchedule",p)}),i.jsx(rn,{label:"QA Schedule",value:u.qa.schedule,onChange:p=>c("qa",{...u.qa,schedule:p})}),i.jsx(rn,{label:"Audit Schedule",value:u.audit.schedule,onChange:p=>c("audit",{...u.audit,schedule:p})}),u.roadmapScanner.enabled&&i.jsx(rn,{label:"Planner Schedule",value:u.roadmapScanner.slicerSchedule||"35 */12 * * *",onChange:p=>c("roadmapScanner",{...u.roadmapScanner,slicerSchedule:p})})]}),i.jsxs("div",{className:"pt-4 border-t border-slate-800 grid grid-cols-1 md:grid-cols-3 gap-6",children:[i.jsx(zt,{label:"Scheduling Priority",value:String(u.schedulingPriority),onChange:p=>c("schedulingPriority",Number(p)),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."}),i.jsx("div",{className:"rounded-xl border border-slate-800 bg-slate-950/50 p-4",children:i.jsxs("div",{className:"flex items-center justify-between gap-4",children:[i.jsxs("div",{children:[i.jsx("div",{className:"text-sm font-medium text-slate-200",children:"Global Queue"}),i.jsx("p",{className:"text-xs text-slate-400 mt-1",children:"Queue overlapping jobs across projects instead of letting them burst the provider API."})]}),i.jsx(_t,{checked:u.globalQueueEnabled??!0,onChange:p=>c("globalQueueEnabled",p)})]})}),i.jsx(Le,{label:"Extra Start Delay",type:"number",min:"0",max:"59",value:String(u.cronScheduleOffset),onChange:p=>{const y=Math.min(59,Math.max(0,Number(p.target.value||0)));c("cronScheduleOffset",y)},helperText:"Manual delay in minutes added before cron jobs start. This stacks on top of automatic balancing."})]})]}),xb=()=>{var he,xe,E,L,K,J,ce,me,Ne,tt,ke,wl,Il;const{addToast:u,selectedProjectId:o,globalModeLoading:d}=rt(),[c,h]=w.useState(!1),[x,f]=w.useState(!1),[p,y]=w.useState(null),[v,g]=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:b,loading:M,error:_,refetch:H}=Jt(Bh,[o],{enabled:!d}),{data:j,loading:U,refetch:V}=Jt(Hh,[o],{enabled:!d});w.useEffect(()=>{const X=setInterval(()=>{H()},3e4);return()=>clearInterval(X)},[H]),w.useEffect(()=>{var X,ie,Ce,ft,Ot,Ft;if(j&&!v.isDirty){const bt=cn(j.scheduleBundleId,j.cronSchedule,j.reviewerSchedule,((X=j.qa)==null?void 0:X.schedule)||"45 2,14 * * *",((ie=j.audit)==null?void 0:ie.schedule)||"50 3 * * 1",((Ce=j.roadmapScanner)==null?void 0:Ce.slicerSchedule)||"35 */12 * * *");g({form:{cronSchedule:j.cronSchedule||"5 */3 * * *",reviewerSchedule:j.reviewerSchedule||"25 */6 * * *",qa:j.qa||{schedule:"45 2,14 * * *",enabled:!0},audit:j.audit||{schedule:"50 3 * * 1",enabled:!0},roadmapScanner:{enabled:((ft=j.roadmapScanner)==null?void 0:ft.enabled)??!0,slicerSchedule:((Ot=j.roadmapScanner)==null?void 0:Ot.slicerSchedule)||"35 */12 * * *"},scheduleBundleId:j.scheduleBundleId??null,schedulingPriority:j.schedulingPriority??3,cronScheduleOffset:j.cronScheduleOffset??0,globalQueueEnabled:((Ft=j.queue)==null?void 0:Ft.enabled)??!0},scheduleMode:bt?"template":"custom",selectedTemplateId:(bt==null?void 0:bt.id)??"",isDirty:!1})}},[j,v.isDirty]);const G=()=>{V(),H()},Y=(X,ie)=>X instanceof Error?X.message:ie,le=async()=>{if(b){h(!0);try{b.paused?(await os(),u({title:"Schedule Resumed",message:"Cron schedules have been reactivated.",type:"success"})):(await Ty(),u({title:"Schedule Paused",message:"Cron schedules have been deactivated.",type:"info"})),G()}catch(X){u({title:"Action Failed",message:Y(X,"Failed to toggle schedule state"),type:"error"})}finally{h(!1)}}},ue=async(X,ie)=>{if(j){y(X);try{X==="executor"?await ga({executorEnabled:ie}):X==="reviewer"?await ga({reviewerEnabled:ie}):X==="qa"?await ga({qa:{...j.qa,enabled:ie}}):X==="audit"?await ga({audit:{...j.audit,enabled:ie}}):await ga({roadmapScanner:{...j.roadmapScanner,enabled:ie}});let Ce="";try{await os()}catch(ft){Ce=Y(ft,"Failed to reinstall cron schedules")}G(),u(Ce?{title:"Job Saved (Cron Reinstall Failed)",message:Ce,type:"warning"}:{title:"Job Updated",message:`${X[0].toUpperCase()+X.slice(1)} ${ie?"enabled":"disabled"}.`,type:"success"})}catch(Ce){u({title:"Update Failed",message:Y(Ce,"Failed to update job configuration"),type:"error"})}finally{y(null)}}},Z=(X,ie)=>{g(Ce=>({...Ce,form:{...Ce.form,[X]:ie},isDirty:!0}))},I=()=>{if(!v.form)return;const X=cn(v.form.scheduleBundleId,v.form.cronSchedule,v.form.reviewerSchedule,v.form.qa.schedule,v.form.audit.schedule,v.form.roadmapScanner.slicerSchedule||"35 */12 * * *");g(ie=>({...ie,scheduleMode:"template",selectedTemplateId:(X==null?void 0:X.id)??"always-on",form:{...ie.form,scheduleBundleId:(X==null?void 0:X.id)??null},isDirty:!0}))},P=()=>{g(X=>({...X,scheduleMode:"custom",selectedTemplateId:"",form:{...X.form,scheduleBundleId:null},isDirty:!0}))},se=X=>{g(ie=>({...ie,selectedTemplateId:X.id,scheduleMode:"template",form:{...ie.form,cronSchedule:X.schedules.executor,reviewerSchedule:X.schedules.reviewer,scheduleBundleId:X.id,qa:{...ie.form.qa,schedule:X.schedules.qa},audit:{...ie.form.audit,schedule:X.schedules.audit},roadmapScanner:{...ie.form.roadmapScanner,slicerSchedule:X.schedules.slicer}},isDirty:!0}))},$=async()=>{if(j){f(!0);try{await ga({cronSchedule:v.form.cronSchedule,reviewerSchedule:v.form.reviewerSchedule,scheduleBundleId:v.scheduleMode==="template"?v.form.scheduleBundleId:null,cronScheduleOffset:v.form.cronScheduleOffset,schedulingPriority:v.form.schedulingPriority,qa:{...j.qa,schedule:v.form.qa.schedule},audit:{...j.audit,schedule:v.form.audit.schedule},roadmapScanner:{...j.roadmapScanner,slicerSchedule:v.form.roadmapScanner.slicerSchedule||"35 */12 * * *"},queue:{...j.queue,enabled:v.form.globalQueueEnabled??!0},executorEnabled:j.executorEnabled,reviewerEnabled:j.reviewerEnabled});let X="";try{await os()}catch(ie){X=Y(ie,"Failed to reinstall cron schedules")}g(ie=>({...ie,isDirty:!1})),G(),u(X?{title:"Schedules Saved (Cron Reinstall Failed)",message:X,type:"warning"}:{title:"Schedule Updated",message:"Cron schedules have been saved and installed.",type:"success"})}catch(X){u({title:"Save Failed",message:Y(X,"Failed to save schedules"),type:"error"})}finally{f(!1)}}},je=X=>{if(!X)return i.jsx("span",{className:"text-slate-500",children:"Not scheduled"});const ie=new Date(X),Ce=hb(ie);return i.jsxs("div",{className:"flex items-center space-x-2",children:[Ce&&i.jsxs("span",{className:"relative flex h-3 w-3",children:[i.jsx("span",{className:"animate-ping absolute inline-flex h-full w-full rounded-full bg-green-400 opacity-75"}),i.jsx("span",{className:"relative inline-flex rounded-full h-3 w-3 bg-green-500"})]}),i.jsxs("div",{className:"text-sm",children:[i.jsx("span",{className:"text-slate-200 font-medium",children:fb(ie)}),i.jsxs("span",{className:"text-slate-500 ml-2",children:["(",mb(ie),")"]})]})]})},ge=X=>{if(!X||X.delayMinutes<=0)return i.jsx("div",{className:"text-xs text-slate-500 mt-2",children:"Starts directly at the scheduled time."});const ie=[];return X.balancedDelayMinutes>0&&ie.push(`auto +${X.balancedDelayMinutes}m`),X.manualDelayMinutes>0&&ie.push(`manual +${X.manualDelayMinutes}m`),i.jsxs("div",{className:"text-xs text-slate-500 mt-2",children:["Delayed after cron fire:",i.jsxs("span",{className:"text-slate-300",children:[" ",ie.join(" - ")]})]})};if(M||U)return i.jsx("div",{className:"flex items-center justify-center h-full",children:i.jsx("div",{className:"text-slate-400",children:"Loading scheduling information..."})});if(_||!b||!j)return i.jsxs("div",{className:"flex flex-col items-center justify-center h-full space-y-4",children:[i.jsx(El,{className:"h-12 w-12 text-red-400"}),i.jsx("div",{className:"text-slate-300",children:"Failed to load schedule information"}),i.jsx("div",{className:"text-sm text-slate-500",children:(_==null?void 0:_.message)||"Unknown error"}),i.jsx(Qe,{onClick:()=>{H(),V()},children:"Retry"})]});const qe=b.paused,D=qe?"bg-amber-500/10 text-amber-400 border-amber-500/20":"bg-green-500/10 text-green-400 border-green-500/20",ae=qe?"Paused":"Active",z=cn(j.scheduleBundleId,j.cronSchedule,j.reviewerSchedule,((he=j.qa)==null?void 0:he.schedule)||"45 2,14 * * *",((xe=j.audit)==null?void 0:xe.schedule)||"50 3 * * 1",((E=j.roadmapScanner)==null?void 0:E.slicerSchedule)||"35 */12 * * *"),Q=(X,ie,Ce)=>!z||!un(z.schedules[X],ie)?sh(Ce):`${z.label} - ${z.hints[X]}`,ee=[{id:"executor",name:"Executor",description:"Creates implementation PRs from PRDs",icon:i.jsx(ki,{className:"h-4 w-4"}),enabled:(j==null?void 0:j.executorEnabled)!==!1,schedule:b.executor.schedule,nextRun:b.executor.nextRun,delayInfo:b.executor},{id:"reviewer",name:"Reviewer",description:"Reviews PRs and manages merge readiness",icon:i.jsx(Vi,{className:"h-4 w-4"}),enabled:(j==null?void 0:j.reviewerEnabled)??!1,schedule:b.reviewer.schedule,nextRun:b.reviewer.nextRun,delayInfo:b.reviewer},{id:"qa",name:"QA",description:"Generates and runs quality checks on PRs",icon:i.jsx(my,{className:"h-4 w-4"}),enabled:((L=j==null?void 0:j.qa)==null?void 0:L.enabled)??!1,schedule:(K=b.qa)==null?void 0:K.schedule,nextRun:(J=b.qa)==null?void 0:J.nextRun,delayInfo:b.qa},{id:"audit",name:"Auditor",description:"Runs automated audit reports",icon:i.jsx(eh,{className:"h-4 w-4"}),enabled:((ce=j==null?void 0:j.audit)==null?void 0:ce.enabled)??!1,schedule:(me=b.audit)==null?void 0:me.schedule,nextRun:(Ne=b.audit)==null?void 0:Ne.nextRun,delayInfo:b.audit},{id:"planner",name:"Planner",description:"Creates PRDs from audit findings and pending roadmap items",icon:i.jsx(eh,{className:"h-4 w-4"}),enabled:((tt=j==null?void 0:j.roadmapScanner)==null?void 0:tt.enabled)??!1,schedule:((ke=b.planner)==null?void 0:ke.schedule)||((wl=j.roadmapScanner)==null?void 0:wl.slicerSchedule)||"35 */12 * * *",nextRun:(Il=b.planner)==null?void 0:Il.nextRun,delayInfo:b.planner}];return i.jsxs("div",{className:"space-y-6 max-w-6xl mx-auto",children:[i.jsxs("div",{className:"flex items-center justify-between",children:[i.jsx("h1",{className:"text-3xl font-bold text-slate-100",children:"Scheduling"}),z&&i.jsxs("div",{className:"text-right",children:[i.jsx("div",{className:"text-xs uppercase tracking-wide text-slate-500",children:"Schedule Bundle"}),i.jsx("div",{className:"text-sm font-medium text-indigo-300",children:z.label}),i.jsxs("div",{className:"text-xs text-slate-500",children:["Priority ",b.schedulingPriority,"/5 across registered projects"]})]})]}),i.jsx(Ae,{className:`p-6 border-2 ${D}`,children:i.jsxs("div",{className:"flex items-center justify-between",children:[i.jsxs("div",{className:"flex items-center space-x-4",children:[i.jsx(ki,{className:"h-8 w-8"}),i.jsxs("div",{children:[i.jsx("div",{className:"text-sm text-slate-400",children:"Automation Status"}),i.jsx("div",{className:"text-2xl font-bold",children:ae}),i.jsx("div",{className:"text-sm text-slate-500 mt-1",children:"Automatic balancing spreads registered projects before queueing overlaps."})]})]}),i.jsx(Qe,{variant:qe?"primary":"outline",size:"lg",onClick:le,loading:c,children:qe?i.jsxs(i.Fragment,{children:[i.jsx(Xi,{className:"h-5 w-5 mr-2"}),"Resume"]}):i.jsxs(i.Fragment,{children:[i.jsx(zh,{className:"h-5 w-5 mr-2"}),"Pause"]})})]})}),i.jsxs(Ae,{className:"p-6",children:[i.jsx("h3",{className:"text-lg font-semibold text-slate-200 mb-4",children:"Agents"}),i.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:ee.map(X=>{var ie,Ce,ft,Ot,Ft,ll;return i.jsxs("div",{className:`p-4 rounded-lg border ${X.enabled?"border-slate-800":"border-slate-800 opacity-50"}`,children:[i.jsxs("div",{className:"flex items-center justify-between mb-3",children:[i.jsxs("div",{className:"flex items-center gap-3",children:[X.icon,i.jsx("h4",{className:"text-base font-semibold text-slate-200",children:X.name})]}),i.jsx(_t,{checked:X.enabled,disabled:p!==null,"aria-label":`Toggle ${X.name.toLowerCase()} automation`,onChange:bt=>ue(X.id,bt)})]}),X.enabled?i.jsxs("div",{className:"space-y-3 mt-3",children:[i.jsxs("div",{children:[i.jsx("div",{className:"text-sm text-slate-400",children:"Schedule"}),i.jsx("div",{className:"text-sm text-slate-200 font-medium",children:Q(X.id,X.id==="qa"?((ie=j==null?void 0:j.qa)==null?void 0:ie.schedule)||"":X.id==="audit"?((Ce=j==null?void 0:j.audit)==null?void 0:Ce.schedule)||"":X.id==="planner"?((ft=j==null?void 0:j.roadmapScanner)==null?void 0:ft.slicerSchedule)||"35 */12 * * *":X.schedule,X.id==="qa"?((Ot=j==null?void 0:j.qa)==null?void 0:Ot.schedule)||"":X.id==="audit"?((Ft=j==null?void 0:j.audit)==null?void 0:Ft.schedule)||"":X.id==="planner"?((ll=j==null?void 0:j.roadmapScanner)==null?void 0:ll.slicerSchedule)||"35 */12 * * *":X.schedule)})]}),ge(X.delayInfo),i.jsxs("div",{children:[i.jsx("div",{className:"text-sm text-slate-400",children:"Next Run"}),je(X.nextRun)]}),i.jsxs("div",{className:`flex items-center space-x-2 text-sm ${X.enabled?"text-green-400":"text-amber-400"}`,children:[i.jsx(gr,{className:"h-4 w-4"}),i.jsx("span",{children:X.enabled?"Active":"Disabled"})]})]}):i.jsxs("div",{className:"text-slate-500 text-sm",children:[X.name," is disabled."]})]},X.id)})})]}),i.jsxs("div",{children:[i.jsx("h3",{className:"text-lg font-semibold text-slate-200 mb-4",children:"Configure Schedules"}),i.jsx("p",{className:"text-sm text-slate-400 mb-4",children:"Adjust schedule templates or individual cron expressions for each job type."})]}),i.jsx(Xh,{form:v.form,scheduleMode:v.scheduleMode,selectedTemplateId:v.selectedTemplateId,onFieldChange:Z,onSwitchToTemplate:I,onSwitchToCustom:P,onApplyTemplate:se}),i.jsxs("div",{className:"flex justify-end pt-4",children:[i.jsx(Qe,{variant:"ghost",onClick:()=>{var X,ie,Ce,ft,Ot,Ft,ll,bt,ba,Sa;j&&g({form:{cronSchedule:j.cronSchedule||"5 */3 * * *",reviewerSchedule:j.reviewerSchedule||"25 */6 * * *",qa:j.qa||{schedule:"45 2,14 * * *",enabled:!0},audit:j.audit||{schedule:"50 3 * * 1",enabled:!0},roadmapScanner:{enabled:((X=j.roadmapScanner)==null?void 0:X.enabled)??!0,slicerSchedule:((ie=j.roadmapScanner)==null?void 0:ie.slicerSchedule)||"35 */12 * * *"},scheduleBundleId:j.scheduleBundleId??null,schedulingPriority:j.schedulingPriority??3,cronScheduleOffset:j.cronScheduleOffset??0,globalQueueEnabled:((Ce=j.queue)==null?void 0:Ce.enabled)??!0},scheduleMode:cn(j.scheduleBundleId,j.cronSchedule,j.reviewerSchedule,((ft=j.qa)==null?void 0:ft.schedule)||"45 2,14 * * *",((Ot=j.audit)==null?void 0:Ot.schedule)||"50 3 * * 1",((Ft=j.roadmapScanner)==null?void 0:Ft.slicerSchedule)||"35 */12 * * *")?"template":"custom",selectedTemplateId:((Sa=cn(j.scheduleBundleId,j.cronSchedule,j.reviewerSchedule,((ll=j.qa)==null?void 0:ll.schedule)||"45 2,14 * * *",((bt=j.audit)==null?void 0:bt.schedule)||"50 3 * * 1",((ba=j.roadmapScanner)==null?void 0:ba.slicerSchedule)||"35 */12 * * *"))==null?void 0:Sa.id)??"",isDirty:!1})},disabled:!v.isDirty,children:"Reset"}),i.jsxs(Qe,{onClick:$,loading:x,disabled:!v.isDirty,children:[i.jsx(gr,{className:"h-4 w-4 mr-2"}),"Save & Install"]})]}),i.jsxs(Ae,{className:"p-6",children:[i.jsxs("div",{className:"flex items-center space-x-2 mb-4",children:[i.jsx(Ar,{className:"h-5 w-5 text-slate-400"}),i.jsx("h3",{className:"text-lg font-semibold text-slate-200",children:"Active Crontab Entries"})]}),b.entries.length===0?i.jsx("div",{className:"text-slate-500 text-sm",children:"No crontab entries found."}):i.jsx("div",{className:"space-y-2",children:b.entries.map((X,ie)=>i.jsx("div",{className:"bg-slate-950/50 rounded-lg p-3 font-mono text-sm text-slate-300 border border-slate-800",children:X},ie))})]})]})},vb=({tabs:u,activeTab:o,onChange:d,className:c=""})=>{var y,v;const[h,x]=Ue.useState((y=u[0])==null?void 0:y.id),f=o||h,p=g=>{d?d(g):x(g)};return i.jsxs("div",{className:`flex flex-col ${c}`,children:[i.jsx("div",{className:"border-b border-slate-800 mb-6",children:i.jsx("nav",{className:"-mb-px flex space-x-8 overflow-x-auto scrollbar-hide",children:u.map(g=>i.jsx("button",{onClick:()=>p(g.id),className:`
363
+ whitespace-nowrap py-4 px-1 border-b-2 font-medium text-sm transition-all duration-200
364
+ ${f===g.id?"border-indigo-500 text-indigo-400":"border-transparent text-slate-500 hover:text-slate-300 hover:border-slate-700"}
365
+ `,children:g.label},g.id))})}),i.jsx("div",{className:"flex-1 animate-in fade-in slide-in-from-bottom-2 duration-300",children:(v=u.find(g=>g.id===f))==null?void 0:v.content})]})},hr=u=>{var o,d,c,h,x,f,p;return{provider:u.provider,providerLabel:u.providerLabel??"",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:((o=u.roadmapScanner)==null?void 0:o.enabled)??!0,roadmapPath:((d=u.roadmapScanner)==null?void 0:d.roadmapPath)??"ROADMAP.md",autoScanInterval:((c=u.roadmapScanner)==null?void 0:c.autoScanInterval)??300,slicerSchedule:((h=u.roadmapScanner)==null?void 0:h.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:((p=u.roadmapScanner)==null?void 0:p.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",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}}}},ih=u=>{const o=cn(u.scheduleBundleId,u.cronSchedule,u.reviewerSchedule,u.qa.schedule,u.audit.schedule,u.roadmapScanner.slicerSchedule??"35 */12 * * *");return o?{mode:"template",selectedTemplateId:o.id}:{mode:"custom",selectedTemplateId:""}},pb=u=>["TOKEN","SECRET","KEY","PASSWORD","AUTH","API_KEY"].some(d=>u.toUpperCase().includes(d)),gb=({value:u,isSensitive:o})=>{const[d,c]=Ue.useState(!1);return o?i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("span",{className:"text-sm text-slate-300 font-mono",children:d?u:"••••••••••••"}),i.jsx("button",{type:"button",onClick:()=>c(!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?i.jsx(qg,{className:"h-4 w-4"}):i.jsx(Bg,{className:"h-4 w-4"})})]}):i.jsx("span",{className:"text-sm text-slate-300 font-mono truncate max-w-xs",children:u})},yb=({envVars:u,onChange:o})=>{const[d,c]=Ue.useState(""),[h,x]=Ue.useState(""),[f,p]=Ue.useState(null),[y,v]=Ue.useState(""),g=()=>{if(d.trim()){if(!/^[A-Z_][A-Z0-9_]*$/.test(d)){alert("Key must be uppercase with underscores (e.g., API_KEY)");return}o({...u,[d]:h}),c(""),x("")}},b=U=>{const V={...u};delete V[U],o(V)},M=U=>{p(U),v(u[U])},_=()=>{f&&(o({...u,[f]:y}),p(null),v(""))},H=()=>{p(null),v("")},j=Object.entries(u);return i.jsxs("div",{className:"space-y-4",children:[i.jsx("div",{className:"text-sm text-slate-400 mb-4",children:"Configure environment variables passed to the provider CLI (API keys, base URLs)"}),i.jsx("div",{className:"space-y-2",children:j.length===0?i.jsx("p",{className:"text-slate-500 text-sm italic",children:"No provider environment variables configured."}):j.map(([U,V])=>i.jsxs("div",{className:"flex items-center justify-between p-3 rounded-md border border-slate-800 bg-slate-950/40",children:[i.jsxs("div",{className:"flex items-center gap-4 flex-1 min-w-0",children:[i.jsx("span",{className:"text-sm font-mono text-indigo-400 w-48 truncate",children:U}),f===U?i.jsxs("div",{className:"flex items-center gap-2 flex-1",children:[i.jsx("input",{type:"text",value:y,onChange:G=>v(G.target.value),className:"flex-1 bg-slate-800 border border-slate-700 rounded px-2 py-1 text-sm text-slate-200"}),i.jsx("button",{type:"button",onClick:_,className:"p-1 text-green-400 hover:text-green-300","aria-label":`Save ${U} value`,title:`Save ${U} value`,children:i.jsx(gr,{className:"h-4 w-4"})}),i.jsx("button",{type:"button",onClick:H,className:"p-1 text-slate-400 hover:text-slate-300","aria-label":`Cancel editing ${U}`,title:`Cancel editing ${U}`,children:i.jsx(vs,{className:"h-4 w-4"})})]}):i.jsx(gb,{value:V,isSensitive:pb(U)})]}),f!==U&&i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("button",{type:"button",onClick:()=>M(U),className:"p-1 text-slate-400 hover:text-slate-200","aria-label":`Edit ${U}`,title:`Edit ${U}`,children:i.jsx(Dh,{className:"h-4 w-4"})}),i.jsx("button",{type:"button",onClick:()=>b(U),className:"p-1 text-red-400 hover:text-red-300","aria-label":`Delete ${U}`,title:`Delete ${U}`,children:i.jsx(Oh,{className:"h-4 w-4"})})]})]},U))}),i.jsxs("div",{className:"flex items-end gap-3 pt-4 border-t border-slate-800",children:[i.jsxs("div",{className:"flex-1",children:[i.jsx("label",{className:"block text-xs font-medium text-slate-500 mb-1",children:"Key"}),i.jsx("input",{type:"text",value:d,onChange:U=>c(U.target.value.toUpperCase()),placeholder:"e.g., ANTHROPIC_BASE_URL",className:"w-full bg-slate-800 border border-slate-700 rounded px-3 py-2 text-sm text-slate-200 placeholder-slate-500"})]}),i.jsxs("div",{className:"flex-1",children:[i.jsx("label",{className:"block text-xs font-medium text-slate-500 mb-1",children:"Value"}),i.jsx("input",{type:"text",value:h,onChange:U=>x(U.target.value),placeholder:"e.g., https://api.example.com",className:"w-full bg-slate-800 border border-slate-700 rounded px-3 py-2 text-sm text-slate-200 placeholder-slate-500"})]}),i.jsxs(Qe,{onClick:g,disabled:!d.trim(),children:[i.jsx(xs,{className:"h-4 w-4 mr-1"}),"Add"]})]})]})},bb=({notifications:u,onChange:o})=>{const[d,c]=Ue.useState(null),[h,x]=Ue.useState(!1),[f,p]=Ue.useState({type:"slack",url:"",events:[]}),y=[{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"}],v=()=>{o({webhooks:[...u.webhooks,f]}),p({type:"slack",url:"",events:[]}),x(!1)},g=(H,j)=>{const U=[...u.webhooks];U[H]=j,o({webhooks:U})},b=H=>{o({webhooks:u.webhooks.filter((j,U)=>U!==H)})},M=(H,j)=>H.includes(j)?H.filter(U=>U!==j):[...H,j],_=({webhook:H,onChange:j,onSave:U,onCancel:V,isNew:G})=>i.jsxs("div",{className:"p-4 rounded-md border border-slate-700 bg-slate-900/50 space-y-4",children:[i.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[i.jsx(zt,{label:"Type",value:H.type,onChange:Y=>{const le=Y;j(le==="telegram"?{type:le,botToken:"",chatId:"",events:H.events}:{type:le,url:"",events:H.events})},options:[{label:"Slack",value:"slack"},{label:"Discord",value:"discord"},{label:"Telegram",value:"telegram"}]}),H.type==="telegram"?i.jsxs(i.Fragment,{children:[i.jsx("div",{className:"relative",children:i.jsx(Le,{label:"Bot Token",type:"password",value:H.botToken||"",onChange:Y=>j({...H,botToken:Y.target.value}),placeholder:"123456789:ABCdefGHIjklMNOpqrsTUVwxyz"})}),i.jsx(Le,{label:"Chat ID",value:H.chatId||"",onChange:Y=>j({...H,chatId:Y.target.value}),placeholder:"123456789"})]}):i.jsx("div",{className:"md:col-span-2",children:i.jsx(Le,{label:"Webhook URL",type:"password",value:H.url||"",onChange:Y=>j({...H,url:Y.target.value}),placeholder:"https://hooks.slack.com/services/..."})})]}),i.jsxs("div",{children:[i.jsx("label",{className:"block text-sm font-medium text-slate-400 mb-2",children:"Events"}),i.jsx("div",{className:"flex flex-wrap gap-2",children:y.map(Y=>i.jsx("button",{type:"button",onClick:()=>j({...H,events:M(H.events,Y.value)}),className:`px-3 py-1.5 rounded-md text-sm transition-colors ${H.events.includes(Y.value)?"bg-indigo-600 text-white":"bg-slate-800 text-slate-400 hover:bg-slate-700"}`,children:Y.label},Y.value))})]}),i.jsxs("div",{className:"flex justify-end gap-2",children:[i.jsx(Qe,{variant:"ghost",onClick:V,children:"Cancel"}),i.jsx(Qe,{onClick:U,disabled:H.events.length===0||(H.type==="telegram"?!H.botToken||!H.chatId:!H.url),children:G?"Add Webhook":"Save Changes"})]})]});return i.jsxs("div",{className:"space-y-4",children:[i.jsx("div",{className:"text-sm text-slate-400 mb-4",children:"Receive notifications when events occur via Slack, Discord, or Telegram"}),i.jsx("div",{className:"space-y-3",children:u.webhooks.length===0?i.jsx("p",{className:"text-slate-500 text-sm italic",children:"No webhooks configured."}):u.webhooks.map((H,j)=>i.jsx("div",{children:d===j?i.jsx(_,{webhook:H,onChange:U=>g(j,U),onSave:()=>c(null),onCancel:()=>c(null)}):i.jsxs("div",{className:"flex items-center justify-between p-4 rounded-md border border-slate-800 bg-slate-950/40",children:[i.jsxs("div",{className:"flex-1",children:[i.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[i.jsx("span",{className:"text-sm font-medium text-slate-200 capitalize",children:H.type}),H.type==="telegram"&&i.jsxs("span",{className:"text-xs text-slate-500",children:["Chat ID: ",H.chatId]})]}),i.jsx("div",{className:"flex flex-wrap gap-1",children:H.events.map(U=>i.jsx("span",{className:"px-2 py-0.5 bg-slate-800 rounded text-xs text-slate-400",children:U.replace("_"," ")},U))})]}),i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("button",{type:"button",onClick:()=>c(j),className:"p-2 text-slate-400 hover:text-slate-200","aria-label":`Edit ${H.type} webhook`,title:`Edit ${H.type} webhook`,children:i.jsx(Dh,{className:"h-4 w-4"})}),i.jsx("button",{type:"button",onClick:()=>b(j),className:"p-2 text-red-400 hover:text-red-300","aria-label":`Delete ${H.type} webhook`,title:`Delete ${H.type} webhook`,children:i.jsx(Oh,{className:"h-4 w-4"})})]})]})},j))}),h?i.jsx(_,{webhook:f,onChange:p,onSave:v,onCancel:()=>x(!1),isNew:!0}):i.jsxs(Qe,{variant:"ghost",onClick:()=>x(!0),children:[i.jsx(xs,{className:"h-4 w-4 mr-2"}),"Add Webhook"]})]})},xr=({label:u,value:o,onChange:d,placeholder:c,helpText:h})=>{const[x,f]=Ue.useState(""),p=()=>{x.trim()&&!o.includes(x.trim())&&(d([...o,x.trim()]),f(""))},y=g=>{d(o.filter(b=>b!==g))},v=g=>{g.key==="Enter"&&(g.preventDefault(),p())};return i.jsxs("div",{children:[i.jsx("label",{className:"block text-sm font-medium text-slate-400 mb-2",children:u}),i.jsx("div",{className:"flex flex-wrap gap-2 mb-2",children:o.map(g=>i.jsxs("span",{className:"inline-flex items-center gap-1 px-2 py-1 bg-slate-800 rounded text-sm text-slate-300",children:[g,i.jsx("button",{type:"button",onClick:()=>y(g),className:"text-slate-500 hover:text-red-400","aria-label":`Remove ${g}`,title:`Remove ${g}`,children:i.jsx(vs,{className:"h-3 w-3"})})]},g))}),i.jsxs("div",{className:"flex gap-2",children:[i.jsx("input",{type:"text",value:x,onChange:g=>f(g.target.value),onKeyDown:v,placeholder:c,className:"flex-1 bg-slate-800 border border-slate-700 rounded px-3 py-2 text-sm text-slate-200 placeholder-slate-500"}),i.jsx(Qe,{onClick:p,disabled:!x.trim(),"aria-label":`Add ${u.toLowerCase()} value`,children:i.jsx(xs,{className:"h-4 w-4"})})]}),h&&i.jsx("p",{className:"text-xs text-slate-500 mt-1",children:h})]})},Sb=()=>{const{addToast:u,projectName:o,selectedProjectId:d,globalModeLoading:c}=rt(),[h,x]=Ue.useState(!1),[f,p]=Ue.useState(null),y=Ue.useRef(!1),[v,g]=Ue.useState("template"),[b,M]=Ue.useState("always-on"),{data:_,loading:H,error:j,refetch:U}=Jt(Hh,[d],{enabled:!c}),{data:V,loading:G,refetch:Y}=Jt(Ry,[d],{enabled:!c}),le=V??[],ue=Ue.useCallback(D=>{const ae=ih(D);g(ae.mode),M(ae.selectedTemplateId)},[]);Ue.useEffect(()=>{if(_)if(y.current)y.current=!1;else{const D=hr(_);p(D),ue(D)}},[_,ue]);const Z=(D,ae)=>{p(z=>z&&{...z,[D]:ae})},I=()=>{if(g("template"),!f)return;const D=ih(f);D.mode==="template"&&(M(D.selectedTemplateId),Z("scheduleBundleId",D.selectedTemplateId))},P=()=>{g("custom"),Z("scheduleBundleId",null),M("")},se=D=>{M(D.id),p(ae=>ae&&{...ae,cronSchedule:D.schedules.executor,reviewerSchedule:D.schedules.reviewer,scheduleBundleId:D.id,qa:{...ae.qa,schedule:D.schedules.qa},audit:{...ae.audit,schedule:D.schedules.audit},roadmapScanner:{...ae.roadmapScanner,slicerSchedule:D.schedules.slicer},fallbackOnRateLimit:!0})},$=async()=>{var z,Q,ee;if(!f)return;const D=f.cronSchedule!==(_==null?void 0:_.cronSchedule)||f.reviewerSchedule!==(_==null?void 0:_.reviewerSchedule)||f.cronScheduleOffset!==((_==null?void 0:_.cronScheduleOffset)??0)||f.schedulingPriority!==((_==null?void 0:_.schedulingPriority)??3)||f.executorEnabled!==((_==null?void 0:_.executorEnabled)??!0)||f.reviewerEnabled!==((_==null?void 0:_.reviewerEnabled)??!0)||f.queue.enabled!==(((z=_==null?void 0:_.queue)==null?void 0:z.enabled)??!0)||f.qa.enabled!==((_==null?void 0:_.qa.enabled)??!0)||f.qa.schedule!==(_==null?void 0:_.qa.schedule)||f.audit.enabled!==((_==null?void 0:_.audit.enabled)??!0)||f.audit.schedule!==(_==null?void 0:_.audit.schedule)||f.roadmapScanner.enabled!==(((Q=_==null?void 0:_.roadmapScanner)==null?void 0:Q.enabled)??!0)||(f.roadmapScanner.slicerSchedule||"35 */12 * * *")!==(((ee=_==null?void 0:_.roadmapScanner)==null?void 0:ee.slicerSchedule)||"35 */12 * * *"),ae={};for(const[he,xe]of Object.entries(f.jobProviders))xe!=null&&xe!==""&&(ae[he]=xe);x(!0);try{const he=await ga({provider:f.provider,providerLabel:f.providerLabel.trim(),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:v==="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:ae,autoMerge:f.autoMerge,autoMergeMethod:f.autoMergeMethod,fallbackOnRateLimit:f.fallbackOnRateLimit,primaryFallbackModel:f.primaryFallbackModel,secondaryFallbackModel:f.secondaryFallbackModel,claudeModel:f.primaryFallbackModel,qa:f.qa,audit:f.audit,queue:f.queue}),xe=hr(he);p(xe),ue(xe);let E="";if(D)try{await os()}catch(L){E=L instanceof Error?L.message:"failed to reinstall cron schedules"}u(E?{title:"Settings Saved (Cron Reinstall Failed)",message:E,type:"warning"}:{title:"Settings Saved",message:D?"Configuration updated and cron schedules reinstalled.":"Configuration updated successfully.",type:"success"}),y.current=!0,U(),Y()}catch(he){u({title:"Save Failed",message:he instanceof Error?he.message:"Failed to save configuration",type:"error"})}finally{x(!1)}},je=()=>{if(_){const D=hr(_);p(D),ue(D),u({title:"Reset Complete",message:"Unsaved changes were discarded.",type:"info"})}},ge=async D=>{try{const ae=await Yh(D);Z("roadmapScanner",ae.roadmapScanner);let z="";try{await os()}catch(Q){z=Q instanceof Error?Q.message:"Failed to reinstall cron schedules"}u(z?{title:"Planner Saved (Cron Reinstall Failed)",message:z,type:"warning"}:{title:D?"Roadmap Scanner Enabled":"Roadmap Scanner Disabled",message:`Roadmap scanner has been ${D?"enabled":"disabled"}.`,type:"success"})}catch(ae){u({title:"Toggle Failed",message:ae instanceof Error?ae.message:"Failed to toggle roadmap scanner",type:"error"})}};if(H||!f)return i.jsx("div",{className:"flex items-center justify-center h-full",children:i.jsx("div",{className:"text-slate-400",children:"Loading settings..."})});if(j)return i.jsxs("div",{className:"flex flex-col items-center justify-center h-full space-y-4",children:[i.jsx(El,{className:"h-12 w-12 text-red-400"}),i.jsx("div",{className:"text-slate-300",children:"Failed to load settings"}),i.jsx("div",{className:"text-sm text-slate-500",children:j.message}),i.jsx(Qe,{onClick:()=>U(),children:"Retry"})]});const qe=[{id:"general",label:"General",content:i.jsx(Ae,{className:"p-6 space-y-6",children:i.jsxs("div",{children:[i.jsx("h3",{className:"text-lg font-medium text-slate-200",children:"Project Configuration"}),i.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6 mt-4",children:[i.jsx(Le,{label:"Project Name",value:o,disabled:!0}),i.jsx(Le,{label:"Default Branch",value:f.defaultBranch,onChange:D=>Z("defaultBranch",D.target.value)}),i.jsx(Le,{label:"PRD Directory",value:f.prdDir,onChange:D=>Z("prdDir",D.target.value),helperText:"Directory containing PRD files (relative to project root)"}),i.jsx(Le,{label:"Branch Prefix",value:f.branchPrefix,onChange:D=>Z("branchPrefix",D.target.value)}),i.jsx("div",{className:"md:col-span-2",children:i.jsx(_t,{label:"Enable PRD Executor",checked:f.executorEnabled,onChange:D=>Z("executorEnabled",D)})}),i.jsx("div",{className:"md:col-span-2",children:i.jsx(_t,{label:"Enable Automated Reviews",checked:f.reviewerEnabled,onChange:D=>Z("reviewerEnabled",D)})}),i.jsx("div",{className:"md:col-span-2",children:i.jsx(_t,{label:"Auto-merge approved PRs",checked:f.autoMerge,onChange:D=>Z("autoMerge",D)})}),f.autoMerge&&i.jsx(zt,{label:"Merge Method",value:f.autoMergeMethod,onChange:D=>Z("autoMergeMethod",D),options:[{label:"Squash",value:"squash"},{label:"Merge",value:"merge"},{label:"Rebase",value:"rebase"}]})]}),i.jsx("div",{className:"pt-4 mt-4 border-t border-slate-800",children:i.jsx(xr,{label:"Branch Patterns",value:f.branchPatterns,onChange:D=>Z("branchPatterns",D),placeholder:"e.g., feat/",helpText:"Branch patterns matched by reviewer and related automation jobs"})})]})})},{id:"providers",label:"Providers",content:i.jsxs("div",{className:"space-y-6",children:[i.jsxs(Ae,{className:"p-6 space-y-6",children:[i.jsxs("div",{children:[i.jsx("h3",{className:"text-lg font-medium text-slate-200",children:"Global Provider"}),i.jsx("p",{className:"text-sm text-slate-400 mt-1",children:"Default AI provider used for all jobs unless overridden below"})]}),i.jsx("div",{className:"rounded-xl border border-slate-800 bg-slate-950/70 p-4",children:i.jsx("p",{className:"text-sm text-slate-300",children:"Primary and secondary fallback settings only control native Claude retry behavior after a Claude proxy rate limit. To use Codex, set the global provider above or assign Codex in the per-job provider overrides below."})}),i.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[i.jsx(zt,{label:"Provider",value:f.provider,onChange:D=>Z("provider",D),options:[{label:"Anthropic (Claude)",value:"claude"},{label:"OpenAI (Codex)",value:"codex"}]}),i.jsx(Le,{label:"Provider Label",value:f.providerLabel,onChange:D=>Z("providerLabel",D.target.value),placeholder:"e.g. GLM-5 (auto-derived if blank)",helperText:"Human-friendly name shown in PR comments, review footers, and commit attribution"}),i.jsx(zt,{label:"Primary Native Claude Fallback",value:f.primaryFallbackModel,onChange:D=>{const ae=D;Z("primaryFallbackModel",ae),Z("claudeModel",ae)},options:[{label:"Sonnet (claude-sonnet-4-6)",value:"sonnet"},{label:"Opus (claude-opus-4-6)",value:"opus"}],helperText:"Claude-only. First native Claude model used for direct Claude execution and the first rate-limit fallback attempt"}),i.jsx(zt,{label:"Secondary Native Claude Fallback",value:f.secondaryFallbackModel,onChange:D=>Z("secondaryFallbackModel",D),options:[{label:"Sonnet (claude-sonnet-4-6)",value:"sonnet"},{label:"Opus (claude-opus-4-6)",value:"opus"}],helperText:"Claude-only. Used only if the primary native Claude fallback is also rate-limited"}),i.jsxs("div",{className:"md:col-span-2",children:[i.jsx(_t,{label:"Fallback on Rate Limit",checked:f.fallbackOnRateLimit,onChange:D=>Z("fallbackOnRateLimit",D)}),i.jsx("p",{className:"text-xs text-slate-500 mt-2",children:"When enabled, Night Watch retries with the primary native Claude fallback model, then the secondary one if the primary is also rate-limited"})]})]})]}),i.jsxs(Ae,{className:"p-6 space-y-6",children:[i.jsxs("div",{children:[i.jsx("h3",{className:"text-lg font-medium text-slate-200",children:"Per-Job Provider Overrides"}),i.jsx("p",{className:"text-sm text-slate-400 mt-1",children:'Override the AI provider for specific job types. Leave as "Use Global" to use the default provider.'})]}),i.jsx("div",{className:"space-y-4",children:[{key:"executor",label:"Executor"},{key:"reviewer",label:"Reviewer"},{key:"qa",label:"QA"},{key:"audit",label:"Audit"},{key:"slicer",label:"Planner"}].map(({key:D,label:ae})=>i.jsxs("div",{className:"flex items-center justify-between p-3 rounded-md border border-slate-800 bg-slate-950/40 gap-4",children:[i.jsx("span",{className:"text-sm font-medium text-slate-200 whitespace-nowrap",children:ae}),i.jsx("div",{className:"w-64",children:i.jsx(zt,{value:f.jobProviders[D]??"",onChange:z=>{const Q={...f.jobProviders};z===""?delete Q[D]:Q[D]=z,Z("jobProviders",Q)},options:[{label:"Use Global (default)",value:""},{label:"Anthropic (Claude)",value:"claude"},{label:"OpenAI (Codex)",value:"codex"}]})})]},D))})]}),i.jsxs(Ae,{className:"p-6",children:[i.jsx("h3",{className:"text-lg font-medium text-slate-200 mb-2",children:"Provider Environment Variables"}),i.jsx(yb,{envVars:f.providerEnv,onChange:D=>Z("providerEnv",D)})]})]})},{id:"runtime",label:"Runtime",content:i.jsxs("div",{className:"space-y-6",children:[i.jsxs(Ae,{className:"p-6 space-y-6",children:[i.jsxs("div",{children:[i.jsx("label",{className:"block text-sm font-medium text-slate-400 mb-2",children:"Min Review Score (0-100)"}),i.jsxs("div",{className:"flex items-center space-x-4",children:[i.jsx("input",{type:"range",min:"0",max:"100",value:f.minReviewScore,onChange:D=>Z("minReviewScore",Number(D.target.value)),className:"w-full h-2 bg-slate-800 rounded-lg appearance-none cursor-pointer accent-indigo-500"}),i.jsx("span",{className:"text-sm font-bold text-slate-200 w-10",children:f.minReviewScore})]}),i.jsx("p",{className:"text-xs text-slate-500 mt-1",children:'PRs below this score will be marked as "Needs Work".'})]}),i.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[i.jsx(Le,{label:"Max Runtime (Executor)",type:"number",value:String(f.maxRuntime),onChange:D=>Z("maxRuntime",Number(D.target.value||0)),rightIcon:i.jsx("span",{className:"text-xs",children:"sec"})}),i.jsx(Le,{label:"Max Runtime (Reviewer)",type:"number",value:String(f.reviewerMaxRuntime),onChange:D=>Z("reviewerMaxRuntime",Number(D.target.value||0)),rightIcon:i.jsx("span",{className:"text-xs",children:"sec"})}),i.jsx(Le,{label:"Max Log Size",type:"number",value:String(f.maxLogSize),onChange:D=>Z("maxLogSize",Number(D.target.value||0)),rightIcon:i.jsx("span",{className:"text-xs",children:"bytes"})})]})]}),i.jsxs(Ae,{className:"p-6 space-y-6",children:[i.jsxs("div",{children:[i.jsx("h3",{className:"text-lg font-medium text-slate-200",children:"Retry Settings"}),i.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."})]}),i.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[i.jsx(Le,{label:"Max Retry Attempts",type:"number",min:"0",max:"10",value:String(f.reviewerMaxRetries),onChange:D=>{const ae=Math.min(10,Math.max(0,Number(D.target.value||0)));Z("reviewerMaxRetries",ae)},helperText:"Additional fix attempts after initial review. 0 = no retries."}),i.jsx(Le,{label:"Retry Delay (seconds)",type:"number",min:"0",max:"300",value:String(f.reviewerRetryDelay),onChange:D=>{const ae=Math.min(300,Math.max(0,Number(D.target.value||0)));Z("reviewerRetryDelay",ae)},helperText:"Wait time between retry attempts to let CI settle."})]})]})]})},{id:"schedules",label:"Schedules",content:i.jsx(Xh,{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:v,selectedTemplateId:b,onFieldChange:(D,ae)=>{D==="globalQueueEnabled"?Z("queue",{...f.queue,enabled:ae}):Z(D,ae)},onSwitchToTemplate:I,onSwitchToCustom:P,onApplyTemplate:se})},{id:"notifications",label:"Notifications",content:i.jsxs(Ae,{className:"p-6",children:[i.jsx("h3",{className:"text-lg font-medium text-slate-200 mb-2",children:"Notification Webhooks"}),i.jsx(bb,{notifications:f.notifications,onChange:D=>Z("notifications",D)})]})},{id:"roadmap",label:"Planner",content:i.jsxs(Ae,{className:"p-6 space-y-6",children:[i.jsxs("div",{className:"flex items-center justify-between",children:[i.jsxs("div",{children:[i.jsx("h3",{className:"text-lg font-medium text-slate-200",children:"Planner"}),i.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"})]}),i.jsx(_t,{checked:f.roadmapScanner.enabled,"aria-label":"Enable planner",onChange:ge})]}),f.roadmapScanner.enabled&&i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6 pt-4 border-t border-slate-800",children:[i.jsx(Le,{label:"Roadmap File Path",value:f.roadmapScanner.roadmapPath,onChange:D=>Z("roadmapScanner",{...f.roadmapScanner,roadmapPath:D.target.value}),helperText:"Primary planning source (relative to project root)."}),i.jsx(rn,{label:"Planner Schedule",value:f.roadmapScanner.slicerSchedule||"35 */12 * * *",onChange:D=>Z("roadmapScanner",{...f.roadmapScanner,slicerSchedule:D})})]}),i.jsxs("div",{className:"pt-4 border-t border-slate-800",children:[i.jsx("h4",{className:"text-md font-medium text-slate-200 mb-4",children:"Planner Execution"}),i.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."}),i.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[i.jsx(Le,{label:"Planner Max Runtime",type:"number",value:String(f.roadmapScanner.slicerMaxRuntime||""),onChange:D=>Z("roadmapScanner",{...f.roadmapScanner,slicerMaxRuntime:Number(D.target.value||0)}),rightIcon:i.jsx("span",{className:"text-xs",children:"sec"}),helperText:"Maximum runtime for planner tasks"}),i.jsx(zt,{label:"Planner Priority Mode",value:f.roadmapScanner.priorityMode||"roadmap-first",onChange:D=>Z("roadmapScanner",{...f.roadmapScanner,priorityMode:D==="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."}),i.jsx(zt,{label:"Planner Issue Column",value:f.roadmapScanner.issueColumn||"Draft",onChange:D=>Z("roadmapScanner",{...f.roadmapScanner,issueColumn:D==="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:i.jsxs(Ae,{className:"p-6 space-y-6",children:[i.jsxs("div",{className:"flex items-center justify-between",children:[i.jsxs("div",{children:[i.jsx("h3",{className:"text-lg font-medium text-slate-200",children:"Board Provider"}),i.jsx("p",{className:"text-sm text-slate-400",children:"Track PRDs and their status using GitHub Projects or local SQLite"})]}),i.jsx(_t,{checked:f.boardProvider.enabled,onChange:D=>Z("boardProvider",{...f.boardProvider,enabled:D})})]}),f.boardProvider.enabled&&i.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6 pt-4 border-t border-slate-800",children:[i.jsx(zt,{label:"Board Provider",value:f.boardProvider.provider,onChange:D=>Z("boardProvider",{...f.boardProvider,provider:D}),options:[{label:"GitHub Projects",value:"github"},{label:"Local (SQLite)",value:"local"}]}),f.boardProvider.provider==="github"&&i.jsxs(i.Fragment,{children:[i.jsx(Le,{label:"Project Number",type:"number",value:String(f.boardProvider.projectNumber||""),onChange:D=>Z("boardProvider",{...f.boardProvider,projectNumber:D.target.value?Number(D.target.value):void 0}),helperText:"GitHub Projects V2 project number"}),i.jsx(Le,{label:"Repository",value:f.boardProvider.repo||"",onChange:D=>Z("boardProvider",{...f.boardProvider,repo:D.target.value||void 0}),helperText:"owner/repo (auto-detected if empty)"})]}),f.boardProvider.provider==="local"&&i.jsx("div",{className:"md:col-span-2",children:i.jsx("p",{className:"text-sm text-slate-400",children:"Local board uses SQLite for storage — no additional configuration needed."})})]})]})},{id:"qa",label:"QA",content:i.jsxs(Ae,{className:"p-6 space-y-6",children:[i.jsxs("div",{className:"flex items-center justify-between",children:[i.jsxs("div",{children:[i.jsx("h3",{className:"text-lg font-medium text-slate-200",children:"Quality Assurance"}),i.jsx("p",{className:"text-sm text-slate-400",children:"Automated UI testing using Playwright"})]}),i.jsx(_t,{checked:f.qa.enabled,onChange:D=>Z("qa",{...f.qa,enabled:D})})]}),f.qa.enabled&&i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6 pt-4 border-t border-slate-800",children:[i.jsx(Le,{label:"Max Runtime",type:"number",value:String(f.qa.maxRuntime),onChange:D=>Z("qa",{...f.qa,maxRuntime:Number(D.target.value||0)}),rightIcon:i.jsx("span",{className:"text-xs",children:"sec"}),helperText:"Maximum runtime for QA tasks (default: 3600 seconds)"}),i.jsx(zt,{label:"Artifacts",value:f.qa.artifacts,onChange:D=>Z("qa",{...f.qa,artifacts:D}),options:[{label:"Screenshots",value:"screenshot"},{label:"Videos",value:"video"},{label:"Both",value:"both"}],helperText:"What artifacts to capture for UI tests"}),i.jsx(Le,{label:"Skip Label",value:f.qa.skipLabel,onChange:D=>Z("qa",{...f.qa,skipLabel:D.target.value}),helperText:"GitHub label to skip QA (PRs with this label are excluded)"})]}),i.jsxs("div",{className:"pt-4 border-t border-slate-800 space-y-4",children:[i.jsx(xr,{label:"QA Branch Patterns",value:f.qa.branchPatterns,onChange:D=>Z("qa",{...f.qa,branchPatterns:D}),placeholder:"e.g., qa/, test/",helpText:"Branch patterns to match for QA (defaults to top-level branchPatterns if empty)"}),i.jsxs("div",{className:"flex items-center justify-between p-3 rounded-md border border-slate-800 bg-slate-950/40",children:[i.jsxs("div",{children:[i.jsx("span",{className:"text-sm font-medium text-slate-200",children:"Auto-install Playwright"}),i.jsx("p",{className:"text-xs text-slate-500 mt-1",children:"Automatically install Playwright browsers if missing during QA run"})]}),i.jsx(_t,{checked:f.qa.autoInstallPlaywright,onChange:D=>Z("qa",{...f.qa,autoInstallPlaywright:D})})]})]})]})]})},{id:"audit",label:"Audit",content:i.jsxs(Ae,{className:"p-6 space-y-6",children:[i.jsxs("div",{className:"flex items-center justify-between",children:[i.jsxs("div",{children:[i.jsx("h3",{className:"text-lg font-medium text-slate-200",children:"Code Audit"}),i.jsx("p",{className:"text-sm text-slate-400",children:"Automated code quality and security audits"})]}),i.jsx(_t,{checked:f.audit.enabled,onChange:D=>Z("audit",{...f.audit,enabled:D})})]}),f.audit.enabled&&i.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6 pt-4 border-t border-slate-800",children:i.jsx(Le,{label:"Max Runtime",type:"number",value:String(f.audit.maxRuntime),onChange:D=>Z("audit",{...f.audit,maxRuntime:Number(D.target.value||0)}),rightIcon:i.jsx("span",{className:"text-xs",children:"sec"}),helperText:"Maximum runtime for audit tasks (default: 1800 seconds)"})})]})},{id:"advanced",label:"Advanced",content:i.jsxs(Ae,{className:"p-6 space-y-6",children:[i.jsx("h3",{className:"text-lg font-medium text-slate-200",children:"Advanced Settings"}),i.jsx("p",{className:"text-sm text-slate-400",children:"Templates, retry policy, and PRD execution priority"}),i.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[i.jsx(Le,{label:"Templates Directory",value:f.templatesDir,onChange:D=>Z("templatesDir",D.target.value),helperText:"Directory for custom template overrides"}),i.jsx(Le,{label:"Max Retries",type:"number",min:"1",value:String(f.maxRetries),onChange:D=>{const ae=Math.max(1,Number(D.target.value||1));Z("maxRetries",ae)},helperText:"Retry attempts for rate-limited API calls"})]}),i.jsx("div",{className:"pt-4 border-t border-slate-800 space-y-4",children:i.jsx(xr,{label:"PRD Priority",value:f.prdPriority,onChange:D=>Z("prdPriority",D),placeholder:"e.g., feature-x",helpText:"PRDs matching these names are executed first"})})]})}];return i.jsxs("div",{className:"max-w-4xl mx-auto pb-10",children:[i.jsx("h2",{className:"text-2xl font-bold text-slate-100 mb-6",children:"Settings"}),i.jsx(vb,{tabs:qe}),i.jsxs("div",{className:"flex items-center justify-end space-x-4 pt-6 mt-6 border-t border-slate-800",children:[i.jsxs(Qe,{variant:"ghost",className:"text-slate-400 hover:text-slate-300",onClick:je,children:[i.jsx(ay,{className:"h-4 w-4 mr-2"}),"Reset"]}),i.jsxs(Qe,{onClick:$,loading:h,children:[i.jsx(sy,{className:"h-4 w-4 mr-2"}),"Save Changes"]})]}),i.jsxs("div",{className:"mt-12",children:[i.jsxs("h3",{className:"text-lg font-bold text-slate-200 mb-4 flex items-center",children:[i.jsx(Th,{className:"h-5 w-5 mr-2 text-indigo-500"}),"System Health"]}),i.jsx(Ae,{className:"divide-y divide-slate-800",children:G?i.jsx("div",{className:"p-4 text-sm text-slate-500",children:"Loading health checks..."}):le.map((D,ae)=>{const z=D.status==="pass",Q=D.status==="warn",ee=z?"bg-green-500/10 text-green-400 border-green-500/20":Q?"bg-amber-500/10 text-amber-400 border-amber-500/20":"bg-red-500/10 text-red-400 border-red-500/20";return i.jsxs("div",{className:"p-4 flex items-center justify-between",children:[i.jsxs("div",{children:[i.jsx("p",{className:"text-sm font-medium text-slate-200",children:D.name}),i.jsx("p",{className:"text-xs text-slate-500",children:D.detail})]}),i.jsx("span",{className:`inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium border ${ee}`,children:D.status.toUpperCase()})]},`${D.name}-${ae}`)})})]})]})},jb=()=>(Vy(),Zy(),i.jsx(Zp,{children:i.jsxs("div",{className:"flex h-screen bg-[#030712] text-slate-300 overflow-hidden relative",children:[i.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"}),i.jsx(Yy,{}),i.jsxs("div",{className:"flex-1 flex flex-col min-w-0 z-10",children:[i.jsx(Gy,{}),i.jsx("main",{className:"flex-1 overflow-auto p-6 scroll-smooth relative",children:i.jsx("div",{className:"max-w-7xl mx-auto w-full",children:i.jsxs(jp,{children:[i.jsx(Sl,{path:"/",element:i.jsx(tb,{})}),i.jsx(Sl,{path:"/prs",element:i.jsx(ab,{})}),i.jsx(Sl,{path:"/board",element:i.jsx(Wy,{})}),i.jsx(Sl,{path:"/scheduling",element:i.jsx(xb,{})}),i.jsx(Sl,{path:"/logs",element:i.jsx(lb,{})}),i.jsx(Sl,{path:"/roadmap",element:i.jsx(nb,{})}),i.jsx(Sl,{path:"/settings",element:i.jsx(Sb,{})}),i.jsx(Sl,{path:"*",element:i.jsx(bp,{to:"/",replace:!0})})]})})})]}),i.jsx(Xy,{})]})})),Vh=document.getElementById("root");if(!Vh)throw new Error("Could not find root element to mount to");const Nb=Ev.createRoot(Vh);Nb.render(i.jsx(Ue.StrictMode,{children:i.jsx(jb,{})}));