@jonit-dev/night-watch-cli 1.8.14-beta.0 → 1.8.14-beta.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.js +2230 -577
- package/dist/cli.js.map +1 -1
- package/dist/commands/dashboard/tab-config.js +2 -2
- package/dist/commands/dashboard/tab-config.js.map +1 -1
- package/dist/commands/dashboard/tab-schedules.d.ts +1 -1
- package/dist/commands/dashboard/tab-schedules.d.ts.map +1 -1
- package/dist/commands/dashboard/tab-schedules.js +15 -6
- package/dist/commands/dashboard/tab-schedules.js.map +1 -1
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +5 -0
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/install.d.ts +8 -0
- package/dist/commands/install.d.ts.map +1 -1
- package/dist/commands/install.js +50 -3
- package/dist/commands/install.js.map +1 -1
- package/dist/commands/logs.d.ts.map +1 -1
- package/dist/commands/logs.js +24 -4
- package/dist/commands/logs.js.map +1 -1
- package/dist/commands/manager.d.ts +23 -0
- package/dist/commands/manager.d.ts.map +1 -0
- package/dist/commands/manager.js +220 -0
- package/dist/commands/manager.js.map +1 -0
- package/dist/commands/merge.d.ts.map +1 -1
- package/dist/commands/merge.js +4 -0
- package/dist/commands/merge.js.map +1 -1
- package/dist/commands/plan.js +1 -1
- package/dist/commands/plan.js.map +1 -1
- package/dist/commands/prd.d.ts.map +1 -1
- package/dist/commands/prd.js +6 -4
- package/dist/commands/prd.js.map +1 -1
- package/dist/commands/queue.d.ts.map +1 -1
- package/dist/commands/queue.js +15 -7
- package/dist/commands/queue.js.map +1 -1
- package/dist/commands/run.d.ts.map +1 -1
- package/dist/commands/run.js +2 -1
- package/dist/commands/run.js.map +1 -1
- package/dist/commands/serve.d.ts +1 -0
- package/dist/commands/serve.d.ts.map +1 -1
- package/dist/commands/serve.js +10 -4
- package/dist/commands/serve.js.map +1 -1
- package/dist/commands/status.d.ts.map +1 -1
- package/dist/commands/status.js +24 -0
- package/dist/commands/status.js.map +1 -1
- package/dist/commands/uninstall.d.ts.map +1 -1
- package/dist/commands/uninstall.js +2 -0
- package/dist/commands/uninstall.js.map +1 -1
- package/dist/commands/ux.d.ts +14 -0
- package/dist/commands/ux.d.ts.map +1 -0
- package/dist/commands/ux.js +169 -0
- package/dist/commands/ux.js.map +1 -0
- package/dist/scripts/night-watch-audit-cron.sh +3 -3
- package/dist/scripts/night-watch-cron.sh +8 -7
- package/dist/scripts/night-watch-helpers.sh +23 -0
- package/dist/scripts/night-watch-manager-cron.sh +61 -0
- package/dist/scripts/night-watch-merger-cron.sh +254 -19
- package/dist/scripts/night-watch-plan-cron.sh +3 -3
- package/dist/scripts/night-watch-pr-resolver-cron.sh +8 -11
- package/dist/scripts/night-watch-pr-reviewer-cron.sh +51 -21
- package/dist/scripts/night-watch-qa-cron.sh +3 -3
- package/dist/scripts/night-watch-slicer-cron.sh +3 -3
- package/dist/templates/night-watch.config.json +14 -0
- package/dist/web/assets/index-6Yf-Q6Di.js +442 -0
- package/dist/web/assets/index-BbiKFOgi.css +1 -0
- package/dist/web/assets/index-BheLL2O2.css +1 -0
- package/dist/web/assets/index-BsTuwxzi.js +447 -0
- package/dist/web/assets/index-DatF4suf.css +1 -0
- package/dist/web/assets/index-Q3IYCcdZ.js +447 -0
- package/dist/web/assets/index-uBao8iYf.js +447 -0
- package/dist/web/index.html +2 -2
- package/package.json +1 -1
|
@@ -0,0 +1,447 @@
|
|
|
1
|
+
var Ey=Object.defineProperty;var bg=n=>{throw TypeError(n)};var Cy=(n,r,o)=>r in n?Ey(n,r,{enumerable:!0,configurable:!0,writable:!0,value:o}):n[r]=o;var jg=(n,r,o)=>Cy(n,typeof r!="symbol"?r+"":r,o),Cf=(n,r,o)=>r.has(n)||bg("Cannot "+o);var ee=(n,r,o)=>(Cf(n,r,"read from private field"),o?o.call(n):r.get(n)),at=(n,r,o)=>r.has(n)?bg("Cannot add the same private member more than once"):r instanceof WeakSet?r.add(n):r.set(n,o),Oe=(n,r,o,u)=>(Cf(n,r,"write to private field"),u?u.call(n,o):r.set(n,o),o),Te=(n,r,o)=>(Cf(n,r,"access private method"),o);(function(){const r=document.createElement("link").relList;if(r&&r.supports&&r.supports("modulepreload"))return;for(const h of document.querySelectorAll('link[rel="modulepreload"]'))u(h);new MutationObserver(h=>{for(const f of h)if(f.type==="childList")for(const b of f.addedNodes)b.tagName==="LINK"&&b.rel==="modulepreload"&&u(b)}).observe(document,{childList:!0,subtree:!0});function o(h){const f={};return h.integrity&&(f.integrity=h.integrity),h.referrerPolicy&&(f.referrerPolicy=h.referrerPolicy),h.crossOrigin==="use-credentials"?f.credentials="include":h.crossOrigin==="anonymous"?f.credentials="omit":f.credentials="same-origin",f}function u(h){if(h.ep)return;h.ep=!0;const f=o(h);fetch(h.href,f)}})();function ah(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}function Ty(n){if(Object.prototype.hasOwnProperty.call(n,"__esModule"))return n;var r=n.default;if(typeof r=="function"){var o=function u(){return this instanceof u?Reflect.construct(r,arguments,this.constructor):r.apply(this,arguments)};o.prototype=r.prototype}else o={};return Object.defineProperty(o,"__esModule",{value:!0}),Object.keys(n).forEach(function(u){var h=Object.getOwnPropertyDescriptor(n,u);Object.defineProperty(o,u,h.get?h:{enumerable:!0,get:function(){return n[u]}})}),o}var Tf={exports:{}},Ki={};/**
|
|
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 Ng;function My(){if(Ng)return Ki;Ng=1;var n=Symbol.for("react.transitional.element"),r=Symbol.for("react.fragment");function o(u,h,f){var b=null;if(f!==void 0&&(b=""+f),h.key!==void 0&&(b=""+h.key),"key"in h){f={};for(var j in h)j!=="key"&&(f[j]=h[j])}else f=h;return h=f.ref,{$$typeof:n,type:u,key:b,ref:h!==void 0?h:null,props:f}}return Ki.Fragment=r,Ki.jsx=o,Ki.jsxs=o,Ki}var wg;function Oy(){return wg||(wg=1,Tf.exports=My()),Tf.exports}var s=Oy(),Mf={exports:{}},qe={};/**
|
|
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 Sg;function Ry(){if(Sg)return qe;Sg=1;var n=Symbol.for("react.transitional.element"),r=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),u=Symbol.for("react.strict_mode"),h=Symbol.for("react.profiler"),f=Symbol.for("react.consumer"),b=Symbol.for("react.context"),j=Symbol.for("react.forward_ref"),y=Symbol.for("react.suspense"),x=Symbol.for("react.memo"),E=Symbol.for("react.lazy"),M=Symbol.for("react.activity"),D=Symbol.iterator;function A(U){return U===null||typeof U!="object"?null:(U=D&&U[D]||U["@@iterator"],typeof U=="function"?U:null)}var N={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},O=Object.assign,R={};function W(U,se,me){this.props=U,this.context=se,this.refs=R,this.updater=me||N}W.prototype.isReactComponent={},W.prototype.setState=function(U,se){if(typeof U!="object"&&typeof U!="function"&&U!=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,U,se,"setState")},W.prototype.forceUpdate=function(U){this.updater.enqueueForceUpdate(this,U,"forceUpdate")};function L(){}L.prototype=W.prototype;function J(U,se,me){this.props=U,this.context=se,this.refs=R,this.updater=me||N}var w=J.prototype=new L;w.constructor=J,O(w,W.prototype),w.isPureReactComponent=!0;var H=Array.isArray;function q(){}var G={H:null,A:null,T:null,S:null},Z=Object.prototype.hasOwnProperty;function le(U,se,me){var ve=me.ref;return{$$typeof:n,type:U,key:se,ref:ve!==void 0?ve:null,props:me}}function S(U,se){return le(U.type,se,U.props)}function te(U){return typeof U=="object"&&U!==null&&U.$$typeof===n}function ae(U){var se={"=":"=0",":":"=2"};return"$"+U.replace(/[=:]/g,function(me){return se[me]})}var ie=/\/+/g;function ge(U,se){return typeof U=="object"&&U!==null&&U.key!=null?ae(""+U.key):se.toString(36)}function pe(U){switch(U.status){case"fulfilled":return U.value;case"rejected":throw U.reason;default:switch(typeof U.status=="string"?U.then(q,q):(U.status="pending",U.then(function(se){U.status==="pending"&&(U.status="fulfilled",U.value=se)},function(se){U.status==="pending"&&(U.status="rejected",U.reason=se)})),U.status){case"fulfilled":return U.value;case"rejected":throw U.reason}}throw U}function P(U,se,me,ve,Re){var xe=typeof U;(xe==="undefined"||xe==="boolean")&&(U=null);var we=!1;if(U===null)we=!0;else switch(xe){case"bigint":case"string":case"number":we=!0;break;case"object":switch(U.$$typeof){case n:case r:we=!0;break;case E:return we=U._init,P(we(U._payload),se,me,ve,Re)}}if(we)return Re=Re(U),we=ve===""?"."+ge(U,0):ve,H(Re)?(me="",we!=null&&(me=we.replace(ie,"$&/")+"/"),P(Re,se,me,"",function(St){return St})):Re!=null&&(te(Re)&&(Re=S(Re,me+(Re.key==null||U&&U.key===Re.key?"":(""+Re.key).replace(ie,"$&/")+"/")+we)),se.push(Re)),1;we=0;var lt=ve===""?".":ve+":";if(H(U))for(var Ye=0;Ye<U.length;Ye++)ve=U[Ye],xe=lt+ge(ve,Ye),we+=P(ve,se,me,xe,Re);else if(Ye=A(U),typeof Ye=="function")for(U=Ye.call(U),Ye=0;!(ve=U.next()).done;)ve=ve.value,xe=lt+ge(ve,Ye++),we+=P(ve,se,me,xe,Re);else if(xe==="object"){if(typeof U.then=="function")return P(pe(U),se,me,ve,Re);throw se=String(U),Error("Objects are not valid as a React child (found: "+(se==="[object Object]"?"object with keys {"+Object.keys(U).join(", ")+"}":se)+"). If you meant to render a collection of children, use an array instead.")}return we}function K(U,se,me){if(U==null)return U;var ve=[],Re=0;return P(U,ve,"","",function(xe){return se.call(me,xe,Re++)}),ve}function he(U){if(U._status===-1){var se=U._result;se=se(),se.then(function(me){(U._status===0||U._status===-1)&&(U._status=1,U._result=me)},function(me){(U._status===0||U._status===-1)&&(U._status=2,U._result=me)}),U._status===-1&&(U._status=0,U._result=se)}if(U._status===1)return U._result.default;throw U._result}var fe=typeof reportError=="function"?reportError:function(U){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var se=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof U=="object"&&U!==null&&typeof U.message=="string"?String(U.message):String(U),error:U});if(!window.dispatchEvent(se))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",U);return}console.error(U)},Ne={map:K,forEach:function(U,se,me){K(U,function(){se.apply(this,arguments)},me)},count:function(U){var se=0;return K(U,function(){se++}),se},toArray:function(U){return K(U,function(se){return se})||[]},only:function(U){if(!te(U))throw Error("React.Children.only expected to receive a single React element child.");return U}};return qe.Activity=M,qe.Children=Ne,qe.Component=W,qe.Fragment=o,qe.Profiler=h,qe.PureComponent=J,qe.StrictMode=u,qe.Suspense=y,qe.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=G,qe.__COMPILER_RUNTIME={__proto__:null,c:function(U){return G.H.useMemoCache(U)}},qe.cache=function(U){return function(){return U.apply(null,arguments)}},qe.cacheSignal=function(){return null},qe.cloneElement=function(U,se,me){if(U==null)throw Error("The argument must be a React element, but you passed "+U+".");var ve=O({},U.props),Re=U.key;if(se!=null)for(xe in se.key!==void 0&&(Re=""+se.key),se)!Z.call(se,xe)||xe==="key"||xe==="__self"||xe==="__source"||xe==="ref"&&se.ref===void 0||(ve[xe]=se[xe]);var xe=arguments.length-2;if(xe===1)ve.children=me;else if(1<xe){for(var we=Array(xe),lt=0;lt<xe;lt++)we[lt]=arguments[lt+2];ve.children=we}return le(U.type,Re,ve)},qe.createContext=function(U){return U={$$typeof:b,_currentValue:U,_currentValue2:U,_threadCount:0,Provider:null,Consumer:null},U.Provider=U,U.Consumer={$$typeof:f,_context:U},U},qe.createElement=function(U,se,me){var ve,Re={},xe=null;if(se!=null)for(ve in se.key!==void 0&&(xe=""+se.key),se)Z.call(se,ve)&&ve!=="key"&&ve!=="__self"&&ve!=="__source"&&(Re[ve]=se[ve]);var we=arguments.length-2;if(we===1)Re.children=me;else if(1<we){for(var lt=Array(we),Ye=0;Ye<we;Ye++)lt[Ye]=arguments[Ye+2];Re.children=lt}if(U&&U.defaultProps)for(ve in we=U.defaultProps,we)Re[ve]===void 0&&(Re[ve]=we[ve]);return le(U,xe,Re)},qe.createRef=function(){return{current:null}},qe.forwardRef=function(U){return{$$typeof:j,render:U}},qe.isValidElement=te,qe.lazy=function(U){return{$$typeof:E,_payload:{_status:-1,_result:U},_init:he}},qe.memo=function(U,se){return{$$typeof:x,type:U,compare:se===void 0?null:se}},qe.startTransition=function(U){var se=G.T,me={};G.T=me;try{var ve=U(),Re=G.S;Re!==null&&Re(me,ve),typeof ve=="object"&&ve!==null&&typeof ve.then=="function"&&ve.then(q,fe)}catch(xe){fe(xe)}finally{se!==null&&me.types!==null&&(se.types=me.types),G.T=se}},qe.unstable_useCacheRefresh=function(){return G.H.useCacheRefresh()},qe.use=function(U){return G.H.use(U)},qe.useActionState=function(U,se,me){return G.H.useActionState(U,se,me)},qe.useCallback=function(U,se){return G.H.useCallback(U,se)},qe.useContext=function(U){return G.H.useContext(U)},qe.useDebugValue=function(){},qe.useDeferredValue=function(U,se){return G.H.useDeferredValue(U,se)},qe.useEffect=function(U,se){return G.H.useEffect(U,se)},qe.useEffectEvent=function(U){return G.H.useEffectEvent(U)},qe.useId=function(){return G.H.useId()},qe.useImperativeHandle=function(U,se,me){return G.H.useImperativeHandle(U,se,me)},qe.useInsertionEffect=function(U,se){return G.H.useInsertionEffect(U,se)},qe.useLayoutEffect=function(U,se){return G.H.useLayoutEffect(U,se)},qe.useMemo=function(U,se){return G.H.useMemo(U,se)},qe.useOptimistic=function(U,se){return G.H.useOptimistic(U,se)},qe.useReducer=function(U,se,me){return G.H.useReducer(U,se,me)},qe.useRef=function(U){return G.H.useRef(U)},qe.useState=function(U){return G.H.useState(U)},qe.useSyncExternalStore=function(U,se,me){return G.H.useSyncExternalStore(U,se,me)},qe.useTransition=function(){return G.H.useTransition()},qe.version="19.2.4",qe}var Eg;function nh(){return Eg||(Eg=1,Mf.exports=Ry()),Mf.exports}var z=nh();const ze=ah(z);var Of={exports:{}},ec={},Rf={exports:{}},Df={};/**
|
|
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 Cg;function Dy(){return Cg||(Cg=1,(function(n){function r(P,K){var he=P.length;P.push(K);e:for(;0<he;){var fe=he-1>>>1,Ne=P[fe];if(0<h(Ne,K))P[fe]=K,P[he]=Ne,he=fe;else break e}}function o(P){return P.length===0?null:P[0]}function u(P){if(P.length===0)return null;var K=P[0],he=P.pop();if(he!==K){P[0]=he;e:for(var fe=0,Ne=P.length,U=Ne>>>1;fe<U;){var se=2*(fe+1)-1,me=P[se],ve=se+1,Re=P[ve];if(0>h(me,he))ve<Ne&&0>h(Re,me)?(P[fe]=Re,P[ve]=he,fe=ve):(P[fe]=me,P[se]=he,fe=se);else if(ve<Ne&&0>h(Re,he))P[fe]=Re,P[ve]=he,fe=ve;else break e}}return K}function h(P,K){var he=P.sortIndex-K.sortIndex;return he!==0?he:P.id-K.id}if(n.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var f=performance;n.unstable_now=function(){return f.now()}}else{var b=Date,j=b.now();n.unstable_now=function(){return b.now()-j}}var y=[],x=[],E=1,M=null,D=3,A=!1,N=!1,O=!1,R=!1,W=typeof setTimeout=="function"?setTimeout:null,L=typeof clearTimeout=="function"?clearTimeout:null,J=typeof setImmediate<"u"?setImmediate:null;function w(P){for(var K=o(x);K!==null;){if(K.callback===null)u(x);else if(K.startTime<=P)u(x),K.sortIndex=K.expirationTime,r(y,K);else break;K=o(x)}}function H(P){if(O=!1,w(P),!N)if(o(y)!==null)N=!0,q||(q=!0,ae());else{var K=o(x);K!==null&&pe(H,K.startTime-P)}}var q=!1,G=-1,Z=5,le=-1;function S(){return R?!0:!(n.unstable_now()-le<Z)}function te(){if(R=!1,q){var P=n.unstable_now();le=P;var K=!0;try{e:{N=!1,O&&(O=!1,L(G),G=-1),A=!0;var he=D;try{t:{for(w(P),M=o(y);M!==null&&!(M.expirationTime>P&&S());){var fe=M.callback;if(typeof fe=="function"){M.callback=null,D=M.priorityLevel;var Ne=fe(M.expirationTime<=P);if(P=n.unstable_now(),typeof Ne=="function"){M.callback=Ne,w(P),K=!0;break t}M===o(y)&&u(y),w(P)}else u(y);M=o(y)}if(M!==null)K=!0;else{var U=o(x);U!==null&&pe(H,U.startTime-P),K=!1}}break e}finally{M=null,D=he,A=!1}K=void 0}}finally{K?ae():q=!1}}}var ae;if(typeof J=="function")ae=function(){J(te)};else if(typeof MessageChannel<"u"){var ie=new MessageChannel,ge=ie.port2;ie.port1.onmessage=te,ae=function(){ge.postMessage(null)}}else ae=function(){W(te,0)};function pe(P,K){G=W(function(){P(n.unstable_now())},K)}n.unstable_IdlePriority=5,n.unstable_ImmediatePriority=1,n.unstable_LowPriority=4,n.unstable_NormalPriority=3,n.unstable_Profiling=null,n.unstable_UserBlockingPriority=2,n.unstable_cancelCallback=function(P){P.callback=null},n.unstable_forceFrameRate=function(P){0>P||125<P?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):Z=0<P?Math.floor(1e3/P):5},n.unstable_getCurrentPriorityLevel=function(){return D},n.unstable_next=function(P){switch(D){case 1:case 2:case 3:var K=3;break;default:K=D}var he=D;D=K;try{return P()}finally{D=he}},n.unstable_requestPaint=function(){R=!0},n.unstable_runWithPriority=function(P,K){switch(P){case 1:case 2:case 3:case 4:case 5:break;default:P=3}var he=D;D=P;try{return K()}finally{D=he}},n.unstable_scheduleCallback=function(P,K,he){var fe=n.unstable_now();switch(typeof he=="object"&&he!==null?(he=he.delay,he=typeof he=="number"&&0<he?fe+he:fe):he=fe,P){case 1:var Ne=-1;break;case 2:Ne=250;break;case 5:Ne=1073741823;break;case 4:Ne=1e4;break;default:Ne=5e3}return Ne=he+Ne,P={id:E++,callback:K,priorityLevel:P,startTime:he,expirationTime:Ne,sortIndex:-1},he>fe?(P.sortIndex=he,r(x,P),o(y)===null&&P===o(x)&&(O?(L(G),G=-1):O=!0,pe(H,he-fe))):(P.sortIndex=Ne,r(y,P),N||A||(N=!0,q||(q=!0,ae()))),P},n.unstable_shouldYield=S,n.unstable_wrapCallback=function(P){var K=D;return function(){var he=D;D=K;try{return P.apply(this,arguments)}finally{D=he}}}})(Df)),Df}var Tg;function ky(){return Tg||(Tg=1,Rf.exports=Dy()),Rf.exports}var kf={exports:{}},ca={};/**
|
|
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 Mg;function Ay(){if(Mg)return ca;Mg=1;var n=nh();function r(y){var x="https://react.dev/errors/"+y;if(1<arguments.length){x+="?args[]="+encodeURIComponent(arguments[1]);for(var E=2;E<arguments.length;E++)x+="&args[]="+encodeURIComponent(arguments[E])}return"Minified React error #"+y+"; visit "+x+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function o(){}var u={d:{f:o,r:function(){throw Error(r(522))},D:o,C:o,L:o,m:o,X:o,S:o,M:o},p:0,findDOMNode:null},h=Symbol.for("react.portal");function f(y,x,E){var M=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:h,key:M==null?null:""+M,children:y,containerInfo:x,implementation:E}}var b=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function j(y,x){if(y==="font")return"";if(typeof x=="string")return x==="use-credentials"?x:""}return ca.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=u,ca.createPortal=function(y,x){var E=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!x||x.nodeType!==1&&x.nodeType!==9&&x.nodeType!==11)throw Error(r(299));return f(y,x,null,E)},ca.flushSync=function(y){var x=b.T,E=u.p;try{if(b.T=null,u.p=2,y)return y()}finally{b.T=x,u.p=E,u.d.f()}},ca.preconnect=function(y,x){typeof y=="string"&&(x?(x=x.crossOrigin,x=typeof x=="string"?x==="use-credentials"?x:"":void 0):x=null,u.d.C(y,x))},ca.prefetchDNS=function(y){typeof y=="string"&&u.d.D(y)},ca.preinit=function(y,x){if(typeof y=="string"&&x&&typeof x.as=="string"){var E=x.as,M=j(E,x.crossOrigin),D=typeof x.integrity=="string"?x.integrity:void 0,A=typeof x.fetchPriority=="string"?x.fetchPriority:void 0;E==="style"?u.d.S(y,typeof x.precedence=="string"?x.precedence:void 0,{crossOrigin:M,integrity:D,fetchPriority:A}):E==="script"&&u.d.X(y,{crossOrigin:M,integrity:D,fetchPriority:A,nonce:typeof x.nonce=="string"?x.nonce:void 0})}},ca.preinitModule=function(y,x){if(typeof y=="string")if(typeof x=="object"&&x!==null){if(x.as==null||x.as==="script"){var E=j(x.as,x.crossOrigin);u.d.M(y,{crossOrigin:E,integrity:typeof x.integrity=="string"?x.integrity:void 0,nonce:typeof x.nonce=="string"?x.nonce:void 0})}}else x==null&&u.d.M(y)},ca.preload=function(y,x){if(typeof y=="string"&&typeof x=="object"&&x!==null&&typeof x.as=="string"){var E=x.as,M=j(E,x.crossOrigin);u.d.L(y,E,{crossOrigin:M,integrity:typeof x.integrity=="string"?x.integrity:void 0,nonce:typeof x.nonce=="string"?x.nonce:void 0,type:typeof x.type=="string"?x.type:void 0,fetchPriority:typeof x.fetchPriority=="string"?x.fetchPriority:void 0,referrerPolicy:typeof x.referrerPolicy=="string"?x.referrerPolicy:void 0,imageSrcSet:typeof x.imageSrcSet=="string"?x.imageSrcSet:void 0,imageSizes:typeof x.imageSizes=="string"?x.imageSizes:void 0,media:typeof x.media=="string"?x.media:void 0})}},ca.preloadModule=function(y,x){if(typeof y=="string")if(x){var E=j(x.as,x.crossOrigin);u.d.m(y,{as:typeof x.as=="string"&&x.as!=="script"?x.as:void 0,crossOrigin:E,integrity:typeof x.integrity=="string"?x.integrity:void 0})}else u.d.m(y)},ca.requestFormReset=function(y){u.d.r(y)},ca.unstable_batchedUpdates=function(y,x){return y(x)},ca.useFormState=function(y,x,E){return b.H.useFormState(y,x,E)},ca.useFormStatus=function(){return b.H.useHostTransitionStatus()},ca.version="19.2.4",ca}var Og;function $x(){if(Og)return kf.exports;Og=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(r){console.error(r)}}return n(),kf.exports=Ay(),kf.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 Rg;function _y(){if(Rg)return ec;Rg=1;var n=ky(),r=nh(),o=$x();function u(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var a=2;a<arguments.length;a++)t+="&args[]="+encodeURIComponent(arguments[a])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function h(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function f(e){var t=e,a=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(a=t.return),e=t.return;while(e)}return t.tag===3?a:null}function b(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function j(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function y(e){if(f(e)!==e)throw Error(u(188))}function x(e){var t=e.alternate;if(!t){if(t=f(e),t===null)throw Error(u(188));return t!==e?null:e}for(var a=e,l=t;;){var c=a.return;if(c===null)break;var d=c.alternate;if(d===null){if(l=c.return,l!==null){a=l;continue}break}if(c.child===d.child){for(d=c.child;d;){if(d===a)return y(c),e;if(d===l)return y(c),t;d=d.sibling}throw Error(u(188))}if(a.return!==l.return)a=c,l=d;else{for(var p=!1,T=c.child;T;){if(T===a){p=!0,a=c,l=d;break}if(T===l){p=!0,l=c,a=d;break}T=T.sibling}if(!p){for(T=d.child;T;){if(T===a){p=!0,a=d,l=c;break}if(T===l){p=!0,l=d,a=c;break}T=T.sibling}if(!p)throw Error(u(189))}}if(a.alternate!==l)throw Error(u(190))}if(a.tag!==3)throw Error(u(188));return a.stateNode.current===a?e:t}function E(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=E(e),t!==null)return t;e=e.sibling}return null}var M=Object.assign,D=Symbol.for("react.element"),A=Symbol.for("react.transitional.element"),N=Symbol.for("react.portal"),O=Symbol.for("react.fragment"),R=Symbol.for("react.strict_mode"),W=Symbol.for("react.profiler"),L=Symbol.for("react.consumer"),J=Symbol.for("react.context"),w=Symbol.for("react.forward_ref"),H=Symbol.for("react.suspense"),q=Symbol.for("react.suspense_list"),G=Symbol.for("react.memo"),Z=Symbol.for("react.lazy"),le=Symbol.for("react.activity"),S=Symbol.for("react.memo_cache_sentinel"),te=Symbol.iterator;function ae(e){return e===null||typeof e!="object"?null:(e=te&&e[te]||e["@@iterator"],typeof e=="function"?e:null)}var ie=Symbol.for("react.client.reference");function ge(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===ie?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case O:return"Fragment";case W:return"Profiler";case R:return"StrictMode";case H:return"Suspense";case q:return"SuspenseList";case le:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case N:return"Portal";case J:return e.displayName||"Context";case L:return(e._context.displayName||"Context")+".Consumer";case w:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case G:return t=e.displayName||null,t!==null?t:ge(e.type)||"Memo";case Z:t=e._payload,e=e._init;try{return ge(e(t))}catch{}}return null}var pe=Array.isArray,P=r.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,K=o.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,he={pending:!1,data:null,method:null,action:null},fe=[],Ne=-1;function U(e){return{current:e}}function se(e){0>Ne||(e.current=fe[Ne],fe[Ne]=null,Ne--)}function me(e,t){Ne++,fe[Ne]=e.current,e.current=t}var ve=U(null),Re=U(null),xe=U(null),we=U(null);function lt(e,t){switch(me(xe,t),me(Re,e),me(ve,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?P0(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=P0(t),e=Y0(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}se(ve),me(ve,e)}function Ye(){se(ve),se(Re),se(xe)}function St(e){e.memoizedState!==null&&me(we,e);var t=ve.current,a=Y0(t,e.type);t!==a&&(me(Re,e),me(ve,a))}function oa(e){Re.current===e&&(se(ve),se(Re)),we.current===e&&(se(we),Ii._currentValue=he)}var Ma,$a;function ua(e){if(Ma===void 0)try{throw Error()}catch(a){var t=a.stack.trim().match(/\n( *(at )?)/);Ma=t&&t[1]||"",$a=-1<a.stack.indexOf(`
|
|
42
|
+
at`)?" (<anonymous>)":-1<a.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
43
|
+
`+Ma+e+$a}var ma=!1;function vn(e,t){if(!e||ma)return"";ma=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var l={DetermineComponentFrameRoot:function(){try{if(t){var ue=function(){throw Error()};if(Object.defineProperty(ue.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ue,[])}catch(ne){var X=ne}Reflect.construct(e,[],ue)}else{try{ue.call()}catch(ne){X=ne}e.call(ue.prototype)}}else{try{throw Error()}catch(ne){X=ne}(ue=e())&&typeof ue.catch=="function"&&ue.catch(function(){})}}catch(ne){if(ne&&X&&typeof ne.stack=="string")return[ne.stack,X.stack]}return[null,null]}};l.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var c=Object.getOwnPropertyDescriptor(l.DetermineComponentFrameRoot,"name");c&&c.configurable&&Object.defineProperty(l.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var d=l.DetermineComponentFrameRoot(),p=d[0],T=d[1];if(p&&T){var _=p.split(`
|
|
44
|
+
`),Q=T.split(`
|
|
45
|
+
`);for(c=l=0;l<_.length&&!_[l].includes("DetermineComponentFrameRoot");)l++;for(;c<Q.length&&!Q[c].includes("DetermineComponentFrameRoot");)c++;if(l===_.length||c===Q.length)for(l=_.length-1,c=Q.length-1;1<=l&&0<=c&&_[l]!==Q[c];)c--;for(;1<=l&&0<=c;l--,c--)if(_[l]!==Q[c]){if(l!==1||c!==1)do if(l--,c--,0>c||_[l]!==Q[c]){var re=`
|
|
46
|
+
`+_[l].replace(" at new "," at ");return e.displayName&&re.includes("<anonymous>")&&(re=re.replace("<anonymous>",e.displayName)),re}while(1<=l&&0<=c);break}}}finally{ma=!1,Error.prepareStackTrace=a}return(a=e?e.displayName||e.name:"")?ua(a):""}function yn(e,t){switch(e.tag){case 26:case 27:case 5:return ua(e.type);case 16:return ua("Lazy");case 13:return e.child!==t&&t!==null?ua("Suspense Fallback"):ua("Suspense");case 19:return ua("SuspenseList");case 0:case 15:return vn(e.type,!1);case 11:return vn(e.type.render,!1);case 1:return vn(e.type,!0);case 31:return ua("Activity");default:return""}}function bn(e){try{var t="",a=null;do t+=yn(e,a),a=e,e=e.return;while(e);return t}catch(l){return`
|
|
47
|
+
Error generating stack: `+l.message+`
|
|
48
|
+
`+l.stack}}var _t=Object.prototype.hasOwnProperty,da=n.unstable_scheduleCallback,An=n.unstable_cancelCallback,_n=n.unstable_shouldYield,zn=n.unstable_requestPaint,yt=n.unstable_now,Oa=n.unstable_getCurrentPriorityLevel,Zs=n.unstable_ImmediatePriority,Ws=n.unstable_UserBlockingPriority,es=n.unstable_NormalPriority,Xr=n.unstable_LowPriority,dl=n.unstable_IdlePriority,Ie=n.log,fl=n.unstable_setDisableYieldValue,mt=null,$t=null;function zt(e){if(typeof Ie=="function"&&fl(e),$t&&typeof $t.setStrictMode=="function")try{$t.setStrictMode(mt,e)}catch{}}var Lt=Math.clz32?Math.clz32:Qs,ts=Math.log,Is=Math.LN2;function Qs(e){return e>>>=0,e===0?32:31-(ts(e)/Is|0)|0}var oe=256,ye=262144,Ue=4194304;function gt(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 xt(e,t,a){var l=e.pendingLanes;if(l===0)return 0;var c=0,d=e.suspendedLanes,p=e.pingedLanes;e=e.warmLanes;var T=l&134217727;return T!==0?(l=T&~d,l!==0?c=gt(l):(p&=T,p!==0?c=gt(p):a||(a=T&~e,a!==0&&(c=gt(a))))):(T=l&~d,T!==0?c=gt(T):p!==0?c=gt(p):a||(a=l&~e,a!==0&&(c=gt(a)))),c===0?0:t!==0&&t!==c&&(t&d)===0&&(d=c&-c,a=t&-t,d>=a||d===32&&(a&4194048)!==0)?t:c}function ga(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Xs(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 Jr(){var e=Ue;return Ue<<=1,(Ue&62914560)===0&&(Ue=4194304),e}function Js(e){for(var t=[],a=0;31>a;a++)t.push(e);return t}function hl(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Sc(e,t,a,l,c,d){var p=e.pendingLanes;e.pendingLanes=a,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=a,e.entangledLanes&=a,e.errorRecoveryDisabledLanes&=a,e.shellSuspendCounter=0;var T=e.entanglements,_=e.expirationTimes,Q=e.hiddenUpdates;for(a=p&~a;0<a;){var re=31-Lt(a),ue=1<<re;T[re]=0,_[re]=-1;var X=Q[re];if(X!==null)for(Q[re]=null,re=0;re<X.length;re++){var ne=X[re];ne!==null&&(ne.lane&=-536870913)}a&=~ue}l!==0&&ht(e,l,0),d!==0&&c===0&&e.tag!==0&&(e.suspendedLanes|=d&~(p&~t))}function ht(e,t,a){e.pendingLanes|=t,e.suspendedLanes&=~t;var l=31-Lt(t);e.entangledLanes|=t,e.entanglements[l]=e.entanglements[l]|1073741824|a&261930}function xa(e,t){var a=e.entangledLanes|=t;for(e=e.entanglements;a;){var l=31-Lt(a),c=1<<l;c&t|e[l]&t&&(e[l]|=t),a&=~c}}function Kr(e,t){var a=t&-t;return a=(a&42)!==0?1:Ks(a),(a&(e.suspendedLanes|t))!==0?0:a}function Ks(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 sa(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function er(){var e=K.p;return e!==0?e:(e=window.event,e===void 0?32:hg(e.type))}function ei(e,t){var a=K.p;try{return K.p=e,t()}finally{K.p=a}}var an=Math.random().toString(36).slice(2),Mt="__reactFiber$"+an,Pt="__reactProps$"+an,Ln="__reactContainer$"+an,as="__reactEvents$"+an,Ec="__reactListeners$"+an,Cc="__reactHandles$"+an,Tc="__reactResources$"+an,ns="__reactMarker$"+an;function tr(e){delete e[Mt],delete e[Pt],delete e[as],delete e[Ec],delete e[Cc]}function Un(e){var t=e[Mt];if(t)return t;for(var a=e.parentNode;a;){if(t=a[Ln]||a[Mt]){if(a=t.alternate,t.child!==null||a!==null&&a.child!==null)for(e=X0(e);e!==null;){if(a=e[Mt])return a;e=X0(e)}return t}e=a,a=e.parentNode}return null}function ke(e){if(e=e[Mt]||e[Ln]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function pa(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(u(33))}function nn(e){var t=e[Tc];return t||(t=e[Tc]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function Ut(e){e[ns]=!0}var Mc=new Set,ti={};function jn(e,t){ml(e,t),ml(e+"Capture",t)}function ml(e,t){for(ti[e]=t,e=0;e<t.length;e++)Mc.add(t[e])}var Oc=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]*$"),Rc={},Hn={};function ai(e){return _t.call(Hn,e)?!0:_t.call(Rc,e)?!1:Oc.test(e)?Hn[e]=!0:(Rc[e]=!0,!1)}function Jt(e,t,a){if(ai(t))if(a===null)e.removeAttribute(t);else{switch(typeof a){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var l=t.toLowerCase().slice(0,5);if(l!=="data-"&&l!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+a)}}function ar(e,t,a){if(a===null)e.removeAttribute(t);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+a)}}function st(e,t,a,l){if(l===null)e.removeAttribute(a);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(a);return}e.setAttributeNS(t,a,""+l)}}function Ot(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Nn(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function ni(e,t,a){var l=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof l<"u"&&typeof l.get=="function"&&typeof l.set=="function"){var c=l.get,d=l.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return c.call(this)},set:function(p){a=""+p,d.call(this,p)}}),Object.defineProperty(e,t,{enumerable:l.enumerable}),{getValue:function(){return a},setValue:function(p){a=""+p},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function ls(e){if(!e._valueTracker){var t=Nn(e)?"checked":"value";e._valueTracker=ni(e,t,""+e[t])}}function gl(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var a=t.getValue(),l="";return e&&(l=Nn(e)?e.checked?"true":"false":e.value),e=l,e!==a?(t.setValue(e),!0):!1}function ln(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 nr=/[\n"\\]/g;function Kt(e){return e.replace(nr,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function lr(e,t,a,l,c,d,p,T){e.name="",p!=null&&typeof p!="function"&&typeof p!="symbol"&&typeof p!="boolean"?e.type=p:e.removeAttribute("type"),t!=null?p==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+Ot(t)):e.value!==""+Ot(t)&&(e.value=""+Ot(t)):p!=="submit"&&p!=="reset"||e.removeAttribute("value"),t!=null?ss(e,p,Ot(t)):a!=null?ss(e,p,Ot(a)):l!=null&&e.removeAttribute("value"),c==null&&d!=null&&(e.defaultChecked=!!d),c!=null&&(e.checked=c&&typeof c!="function"&&typeof c!="symbol"),T!=null&&typeof T!="function"&&typeof T!="symbol"&&typeof T!="boolean"?e.name=""+Ot(T):e.removeAttribute("name")}function xl(e,t,a,l,c,d,p,T){if(d!=null&&typeof d!="function"&&typeof d!="symbol"&&typeof d!="boolean"&&(e.type=d),t!=null||a!=null){if(!(d!=="submit"&&d!=="reset"||t!=null)){ls(e);return}a=a!=null?""+Ot(a):"",t=t!=null?""+Ot(t):a,T||t===e.value||(e.value=t),e.defaultValue=t}l=l??c,l=typeof l!="function"&&typeof l!="symbol"&&!!l,e.checked=T?e.checked:!!l,e.defaultChecked=!!l,p!=null&&typeof p!="function"&&typeof p!="symbol"&&typeof p!="boolean"&&(e.name=p),ls(e)}function ss(e,t,a){t==="number"&&ln(e.ownerDocument)===e||e.defaultValue===""+a||(e.defaultValue=""+a)}function qn(e,t,a,l){if(e=e.options,t){t={};for(var c=0;c<a.length;c++)t["$"+a[c]]=!0;for(a=0;a<e.length;a++)c=t.hasOwnProperty("$"+e[a].value),e[a].selected!==c&&(e[a].selected=c),c&&l&&(e[a].defaultSelected=!0)}else{for(a=""+Ot(a),t=null,c=0;c<e.length;c++){if(e[c].value===a){e[c].selected=!0,l&&(e[c].defaultSelected=!0);return}t!==null||e[c].disabled||(t=e[c])}t!==null&&(t.selected=!0)}}function rs(e,t,a){if(t!=null&&(t=""+Ot(t),t!==e.value&&(e.value=t),a==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=a!=null?""+Ot(a):""}function li(e,t,a,l){if(t==null){if(l!=null){if(a!=null)throw Error(u(92));if(pe(l)){if(1<l.length)throw Error(u(93));l=l[0]}a=l}a==null&&(a=""),t=a}a=Ot(t),e.defaultValue=a,l=e.textContent,l===a&&l!==""&&l!==null&&(e.value=l),ls(e)}function sn(e,t){if(t){var a=e.firstChild;if(a&&a===e.lastChild&&a.nodeType===3){a.nodeValue=t;return}}e.textContent=t}var is=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 cs(e,t,a){var l=t.indexOf("--")===0;a==null||typeof a=="boolean"||a===""?l?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":l?e.setProperty(t,a):typeof a!="number"||a===0||is.has(t)?t==="float"?e.cssFloat=a:e[t]=(""+a).trim():e[t]=a+"px"}function Dc(e,t,a){if(t!=null&&typeof t!="object")throw Error(u(62));if(e=e.style,a!=null){for(var l in a)!a.hasOwnProperty(l)||t!=null&&t.hasOwnProperty(l)||(l.indexOf("--")===0?e.setProperty(l,""):l==="float"?e.cssFloat="":e[l]="");for(var c in t)l=t[c],t.hasOwnProperty(c)&&a[c]!==l&&cs(e,c,l)}else for(var d in t)t.hasOwnProperty(d)&&cs(e,d,t[d])}function sr(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 wu=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"]]),kc=/^[\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 os(e){return kc.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Pa(){}var si=null;function rr(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Vn=null,pl=null;function Ac(e){var t=ke(e);if(t&&(e=t.stateNode)){var a=e[Pt]||null;e:switch(e=t.stateNode,t.type){case"input":if(lr(e,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name),t=a.name,a.type==="radio"&&t!=null){for(a=e;a.parentNode;)a=a.parentNode;for(a=a.querySelectorAll('input[name="'+Kt(""+t)+'"][type="radio"]'),t=0;t<a.length;t++){var l=a[t];if(l!==e&&l.form===e.form){var c=l[Pt]||null;if(!c)throw Error(u(90));lr(l,c.value,c.defaultValue,c.defaultValue,c.checked,c.defaultChecked,c.type,c.name)}}for(t=0;t<a.length;t++)l=a[t],l.form===e.form&&gl(l)}break e;case"textarea":rs(e,a.value,a.defaultValue);break e;case"select":t=a.value,t!=null&&qn(e,!!a.multiple,t,!1)}}}var ri=!1;function ii(e,t,a){if(ri)return e(t,a);ri=!0;try{var l=e(t);return l}finally{if(ri=!1,(Vn!==null||pl!==null)&&(Mo(),Vn&&(t=Vn,e=pl,pl=Vn=null,Ac(t),e)))for(t=0;t<e.length;t++)Ac(e[t])}}function us(e,t){var a=e.stateNode;if(a===null)return null;var l=a[Pt]||null;if(l===null)return null;a=l[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(l=!l.disabled)||(e=e.type,l=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!l;break e;default:e=!1}if(e)return null;if(a&&typeof a!="function")throw Error(u(231,t,typeof a));return a}var rn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),ci=!1;if(rn)try{var ds={};Object.defineProperty(ds,"passive",{get:function(){ci=!0}}),window.addEventListener("test",ds,ds),window.removeEventListener("test",ds,ds)}catch{ci=!1}var wn=null,ir=null,cr=null;function Yt(){if(cr)return cr;var e,t=ir,a=t.length,l,c="value"in wn?wn.value:wn.textContent,d=c.length;for(e=0;e<a&&t[e]===c[e];e++);var p=a-e;for(l=1;l<=p&&t[a-l]===c[d-l];l++);return cr=c.slice(e,1<l?1-l:void 0)}function fs(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 cn(){return!0}function Bn(){return!1}function Rt(e){function t(a,l,c,d,p){this._reactName=a,this._targetInst=c,this.type=l,this.nativeEvent=d,this.target=p,this.currentTarget=null;for(var T in e)e.hasOwnProperty(T)&&(a=e[T],this[T]=a?a(d):d[T]);return this.isDefaultPrevented=(d.defaultPrevented!=null?d.defaultPrevented:d.returnValue===!1)?cn:Bn,this.isPropagationStopped=Bn,this}return M(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():typeof a.returnValue!="unknown"&&(a.returnValue=!1),this.isDefaultPrevented=cn)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=cn)},persist:function(){},isPersistent:cn}),t}var Sn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},hs=Rt(Sn),ms=M({},Sn,{view:0,detail:0}),oi=Rt(ms),or,gs,xs,ur=M({},ms,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:vs,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!==xs&&(xs&&e.type==="mousemove"?(or=e.screenX-xs.screenX,gs=e.screenY-xs.screenY):gs=or=0,xs=e),or)},movementY:function(e){return"movementY"in e?e.movementY:gs}}),_c=Rt(ur),Su=M({},ur,{dataTransfer:0}),Eu=Rt(Su),Cu=M({},ms,{relatedTarget:0}),dr=Rt(Cu),Tu=M({},Sn,{animationName:0,elapsedTime:0,pseudoElement:0}),vl=Rt(Tu),Mu=M({},Sn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),yl=Rt(Mu),ps=M({},Sn,{data:0}),bl=Rt(ps),Ou={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Ru={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"},Du={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function ku(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Du[e])?!!t[e]:!1}function vs(){return ku}var Au=M({},ms,{key:function(e){if(e.key){var t=Ou[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=fs(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Ru[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:vs,charCode:function(e){return e.type==="keypress"?fs(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?fs(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),_u=Rt(Au),zu=M({},ur,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),zc=Rt(zu),Lu=M({},ms,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:vs}),Uu=Rt(Lu),Lc=M({},Sn,{propertyName:0,elapsedTime:0,pseudoElement:0}),Hu=Rt(Lc),qu=M({},ur,{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}),Vu=Rt(qu),Bu=M({},Sn,{newState:0,oldState:0}),$u=Rt(Bu),Uc=[9,13,27,32],ui=rn&&"CompositionEvent"in window,ys=null;rn&&"documentMode"in document&&(ys=document.documentMode);var Pu=rn&&"TextEvent"in window&&!ys,Hc=rn&&(!ui||ys&&8<ys&&11>=ys),qc=" ",Vc=!1;function Bc(e,t){switch(e){case"keyup":return Uc.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function $c(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var jl=!1;function Yu(e,t){switch(e){case"compositionend":return $c(t);case"keypress":return t.which!==32?null:(Vc=!0,qc);case"textInput":return e=t.data,e===qc&&Vc?null:e;default:return null}}function Fu(e,t){if(jl)return e==="compositionend"||!ui&&Bc(e,t)?(e=Yt(),cr=ir=wn=null,jl=!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 Hc&&t.locale!=="ko"?null:t.data;default:return null}}var Gu={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 Pc(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Gu[e.type]:t==="textarea"}function di(e,t,a,l){Vn?pl?pl.push(l):pl=[l]:Vn=l,t=zo(t,"onChange"),0<t.length&&(a=new hs("onChange","change",null,a,l),e.push({event:a,listeners:t}))}var Nl=null,bs=null;function va(e){U0(e,0)}function on(e){var t=pa(e);if(gl(t))return e}function Yc(e,t){if(e==="change")return t}var En=!1;if(rn){var fi;if(rn){var Ra="oninput"in document;if(!Ra){var hi=document.createElement("div");hi.setAttribute("oninput","return;"),Ra=typeof hi.oninput=="function"}fi=Ra}else fi=!1;En=fi&&(!document.documentMode||9<document.documentMode)}function mi(){Nl&&(Nl.detachEvent("onpropertychange",gi),bs=Nl=null)}function gi(e){if(e.propertyName==="value"&&on(bs)){var t=[];di(t,bs,e,rr(e)),ii(va,t)}}function Fe(e,t,a){e==="focusin"?(mi(),Nl=t,bs=a,Nl.attachEvent("onpropertychange",gi)):e==="focusout"&&mi()}function wl(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return on(bs)}function Zu(e,t){if(e==="click")return on(t)}function pt(e,t){if(e==="input"||e==="change")return on(t)}function js(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var ra=typeof Object.is=="function"?Object.is:js;function Ns(e,t){if(ra(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var a=Object.keys(e),l=Object.keys(t);if(a.length!==l.length)return!1;for(l=0;l<a.length;l++){var c=a[l];if(!_t.call(t,c)||!ra(e[c],t[c]))return!1}return!0}function Fc(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Gc(e,t){var a=Fc(e);e=0;for(var l;a;){if(a.nodeType===3){if(l=e+a.textContent.length,e<=t&&l>=t)return{node:a,offset:t-e};e=l}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=Fc(a)}}function Qe(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Qe(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Wu(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=ln(e.document);t instanceof e.HTMLIFrameElement;){try{var a=typeof t.contentWindow.location.href=="string"}catch{a=!1}if(a)e=t.contentWindow;else break;t=ln(e.document)}return t}function fr(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 Zc=rn&&"documentMode"in document&&11>=document.documentMode,Sl=null,hr=null,ea=null,mr=!1;function ws(e,t,a){var l=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;mr||Sl==null||Sl!==ln(l)||(l=Sl,"selectionStart"in l&&fr(l)?l={start:l.selectionStart,end:l.selectionEnd}:(l=(l.ownerDocument&&l.ownerDocument.defaultView||window).getSelection(),l={anchorNode:l.anchorNode,anchorOffset:l.anchorOffset,focusNode:l.focusNode,focusOffset:l.focusOffset}),ea&&Ns(ea,l)||(ea=l,l=zo(hr,"onSelect"),0<l.length&&(t=new hs("onSelect","select",null,t,a),e.push({event:t,listeners:l}),t.target=Sl)))}function $n(e,t){var a={};return a[e.toLowerCase()]=t.toLowerCase(),a["Webkit"+e]="webkit"+t,a["Moz"+e]="moz"+t,a}var El={animationend:$n("Animation","AnimationEnd"),animationiteration:$n("Animation","AnimationIteration"),animationstart:$n("Animation","AnimationStart"),transitionrun:$n("Transition","TransitionRun"),transitionstart:$n("Transition","TransitionStart"),transitioncancel:$n("Transition","TransitionCancel"),transitionend:$n("Transition","TransitionEnd")},xi={},Wc={};rn&&(Wc=document.createElement("div").style,"AnimationEvent"in window||(delete El.animationend.animation,delete El.animationiteration.animation,delete El.animationstart.animation),"TransitionEvent"in window||delete El.transitionend.transition);function Pn(e){if(xi[e])return xi[e];if(!El[e])return e;var t=El[e],a;for(a in t)if(t.hasOwnProperty(a)&&a in Wc)return xi[e]=t[a];return e}var Ic=Pn("animationend"),Qc=Pn("animationiteration"),gr=Pn("animationstart"),Iu=Pn("transitionrun"),Qu=Pn("transitionstart"),Xc=Pn("transitioncancel"),pi=Pn("transitionend"),vi=new Map,yi="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(" ");yi.push("scrollEnd");function ya(e,t){vi.set(e,t),jn(t,[e])}var Cl=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)},fa=[],Ya=0,Ss=0;function Tl(){for(var e=Ya,t=Ss=Ya=0;t<e;){var a=fa[t];fa[t++]=null;var l=fa[t];fa[t++]=null;var c=fa[t];fa[t++]=null;var d=fa[t];if(fa[t++]=null,l!==null&&c!==null){var p=l.pending;p===null?c.next=c:(c.next=p.next,p.next=c),l.pending=c}d!==0&&Es(a,c,d)}}function Fa(e,t,a,l){fa[Ya++]=e,fa[Ya++]=t,fa[Ya++]=a,fa[Ya++]=l,Ss|=l,e.lanes|=l,e=e.alternate,e!==null&&(e.lanes|=l)}function xr(e,t,a,l){return Fa(e,t,a,l),Cs(e)}function Ga(e,t){return Fa(e,null,null,t),Cs(e)}function Es(e,t,a){e.lanes|=a;var l=e.alternate;l!==null&&(l.lanes|=a);for(var c=!1,d=e.return;d!==null;)d.childLanes|=a,l=d.alternate,l!==null&&(l.childLanes|=a),d.tag===22&&(e=d.stateNode,e===null||e._visibility&1||(c=!0)),e=d,d=d.return;return e.tag===3?(d=e.stateNode,c&&t!==null&&(c=31-Lt(a),e=d.hiddenUpdates,l=e[c],l===null?e[c]=[t]:l.push(t),t.lane=a|536870912),d):null}function Cs(e){if(50<$i)throw $i=0,Id=null,Error(u(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Da={};function pr(e,t,a,l){this.tag=e,this.key=a,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=l,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ta(e,t,a,l){return new pr(e,t,a,l)}function vr(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Za(e,t){var a=e.alternate;return a===null?(a=ta(e.tag,t,e.key,e.mode),a.elementType=e.elementType,a.type=e.type,a.stateNode=e.stateNode,a.alternate=e,e.alternate=a):(a.pendingProps=t,a.type=e.type,a.flags=0,a.subtreeFlags=0,a.deletions=null),a.flags=e.flags&65011712,a.childLanes=e.childLanes,a.lanes=e.lanes,a.child=e.child,a.memoizedProps=e.memoizedProps,a.memoizedState=e.memoizedState,a.updateQueue=e.updateQueue,t=e.dependencies,a.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},a.sibling=e.sibling,a.index=e.index,a.ref=e.ref,a.refCleanup=e.refCleanup,a}function Jc(e,t){e.flags&=65011714;var a=e.alternate;return a===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=a.childLanes,e.lanes=a.lanes,e.child=a.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=a.memoizedProps,e.memoizedState=a.memoizedState,e.updateQueue=a.updateQueue,e.type=a.type,t=a.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function yr(e,t,a,l,c,d){var p=0;if(l=e,typeof e=="function")vr(e)&&(p=1);else if(typeof e=="string")p=hy(e,a,ve.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case le:return e=ta(31,a,t,c),e.elementType=le,e.lanes=d,e;case O:return Wa(a.children,c,d,t);case R:p=8,c|=24;break;case W:return e=ta(12,a,t,c|2),e.elementType=W,e.lanes=d,e;case H:return e=ta(13,a,t,c),e.elementType=H,e.lanes=d,e;case q:return e=ta(19,a,t,c),e.elementType=q,e.lanes=d,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case J:p=10;break e;case L:p=9;break e;case w:p=11;break e;case G:p=14;break e;case Z:p=16,l=null;break e}p=29,a=Error(u(130,e===null?"null":typeof e,"")),l=null}return t=ta(p,a,t,c),t.elementType=e,t.type=l,t.lanes=d,t}function Wa(e,t,a,l){return e=ta(7,e,l,t),e.lanes=a,e}function bi(e,t,a){return e=ta(6,e,null,t),e.lanes=a,e}function Kc(e){var t=ta(18,null,null,0);return t.stateNode=e,t}function Ml(e,t,a){return t=ta(4,e.children!==null?e.children:[],e.key,t),t.lanes=a,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var ji=new WeakMap;function ba(e,t){if(typeof e=="object"&&e!==null){var a=ji.get(e);return a!==void 0?a:(t={value:e,source:t,stack:bn(t)},ji.set(e,t),t)}return{value:e,source:t,stack:bn(t)}}var Yn=[],Fn=0,Ts=null,un=0,ia=[],Me=0,ja=null,Ia=1,g="";function i(e,t){Yn[Fn++]=un,Yn[Fn++]=Ts,Ts=e,un=t}function m(e,t,a){ia[Me++]=Ia,ia[Me++]=g,ia[Me++]=ja,ja=e;var l=Ia;e=g;var c=32-Lt(l)-1;l&=~(1<<c),a+=1;var d=32-Lt(t)+c;if(30<d){var p=c-c%5;d=(l&(1<<p)-1).toString(32),l>>=p,c-=p,Ia=1<<32-Lt(t)+c|a<<c|l,g=d+e}else Ia=1<<d|a<<c|l,g=e}function v(e){e.return!==null&&(i(e,1),m(e,1,0))}function C(e){for(;e===Ts;)Ts=Yn[--Fn],Yn[Fn]=null,un=Yn[--Fn],Yn[Fn]=null;for(;e===ja;)ja=ia[--Me],ia[Me]=null,g=ia[--Me],ia[Me]=null,Ia=ia[--Me],ia[Me]=null}function k(e,t){ia[Me++]=Ia,ia[Me++]=g,ia[Me++]=ja,Ia=t.id,g=t.overflow,ja=e}var V=null,B=null,Y=!1,de=null,be=!1,He=Error(u(519));function Ge(e){var t=Error(u(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw dn(ba(t,e)),He}function Ae(e){var t=e.stateNode,a=e.type,l=e.memoizedProps;switch(t[Mt]=e,t[Pt]=l,a){case"dialog":Pe("cancel",t),Pe("close",t);break;case"iframe":case"object":case"embed":Pe("load",t);break;case"video":case"audio":for(a=0;a<Yi.length;a++)Pe(Yi[a],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),xl(t,l.value,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name,!0);break;case"select":Pe("invalid",t);break;case"textarea":Pe("invalid",t),li(t,l.value,l.defaultValue,l.children)}a=l.children,typeof a!="string"&&typeof a!="number"&&typeof a!="bigint"||t.textContent===""+a||l.suppressHydrationWarning===!0||B0(t.textContent,a)?(l.popover!=null&&(Pe("beforetoggle",t),Pe("toggle",t)),l.onScroll!=null&&Pe("scroll",t),l.onScrollEnd!=null&&Pe("scrollend",t),l.onClick!=null&&(t.onclick=Pa),t=!0):t=!1,t||Ge(e,!0)}function wt(e){for(V=e.return;V;)switch(V.tag){case 5:case 31:case 13:be=!1;return;case 27:case 3:be=!0;return;default:V=V.return}}function Wt(e){if(e!==V)return!1;if(!Y)return wt(e),Y=!0,!1;var t=e.tag,a;if((a=t!==3&&t!==27)&&((a=t===5)&&(a=e.type,a=!(a!=="form"&&a!=="button")||df(e.type,e.memoizedProps)),a=!a),a&&B&&Ge(e),wt(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(u(317));B=Q0(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(u(317));B=Q0(e)}else t===27?(t=B,Bl(e.type)?(e=xf,xf=null,B=e):B=t):B=V?Ka(e.stateNode.nextSibling):null;return!0}function It(){B=V=null,Y=!1}function Cn(){var e=de;return e!==null&&(Ea===null?Ea=e:Ea.push.apply(Ea,e),de=null),e}function dn(e){de===null?de=[e]:de.push(e)}var br=U(null),Gn=null,Qa=null;function Tn(e,t,a){me(br,t._currentValue),t._currentValue=a}function fn(e){e._currentValue=br.current,se(br)}function Ni(e,t,a){for(;e!==null;){var l=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,l!==null&&(l.childLanes|=t)):l!==null&&(l.childLanes&t)!==t&&(l.childLanes|=t),e===a)break;e=e.return}}function Zn(e,t,a,l){var c=e.child;for(c!==null&&(c.return=e);c!==null;){var d=c.dependencies;if(d!==null){var p=c.child;d=d.firstContext;e:for(;d!==null;){var T=d;d=c;for(var _=0;_<t.length;_++)if(T.context===t[_]){d.lanes|=a,T=d.alternate,T!==null&&(T.lanes|=a),Ni(d.return,a,e),l||(p=null);break e}d=T.next}}else if(c.tag===18){if(p=c.return,p===null)throw Error(u(341));p.lanes|=a,d=p.alternate,d!==null&&(d.lanes|=a),Ni(p,a,e),p=null}else p=c.child;if(p!==null)p.return=c;else for(p=c;p!==null;){if(p===e){p=null;break}if(c=p.sibling,c!==null){c.return=p.return,p=c;break}p=p.return}c=p}}function Xa(e,t,a,l){e=null;for(var c=t,d=!1;c!==null;){if(!d){if((c.flags&524288)!==0)d=!0;else if((c.flags&262144)!==0)break}if(c.tag===10){var p=c.alternate;if(p===null)throw Error(u(387));if(p=p.memoizedProps,p!==null){var T=c.type;ra(c.pendingProps.value,p.value)||(e!==null?e.push(T):e=[T])}}else if(c===we.current){if(p=c.alternate,p===null)throw Error(u(387));p.memoizedState.memoizedState!==c.memoizedState.memoizedState&&(e!==null?e.push(Ii):e=[Ii])}c=c.return}e!==null&&Zn(t,e,a,l),t.flags|=262144}function jr(e){for(e=e.firstContext;e!==null;){if(!ra(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Ms(e){Gn=e,Qa=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function aa(e){return Ch(Gn,e)}function eo(e,t){return Gn===null&&Ms(e),Ch(e,t)}function Ch(e,t){var a=t._currentValue;if(t={context:t,memoizedValue:a,next:null},Qa===null){if(e===null)throw Error(u(308));Qa=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Qa=Qa.next=t;return a}var ov=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(a,l){e.push(l)}};this.abort=function(){t.aborted=!0,e.forEach(function(a){return a()})}},uv=n.unstable_scheduleCallback,dv=n.unstable_NormalPriority,Ht={$$typeof:J,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Xu(){return{controller:new ov,data:new Map,refCount:0}}function wi(e){e.refCount--,e.refCount===0&&uv(dv,function(){e.controller.abort()})}var Si=null,Ju=0,Nr=0,wr=null;function fv(e,t){if(Si===null){var a=Si=[];Ju=0,Nr=tf(),wr={status:"pending",value:void 0,then:function(l){a.push(l)}}}return Ju++,t.then(Th,Th),t}function Th(){if(--Ju===0&&Si!==null){wr!==null&&(wr.status="fulfilled");var e=Si;Si=null,Nr=0,wr=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function hv(e,t){var a=[],l={status:"pending",value:null,reason:null,then:function(c){a.push(c)}};return e.then(function(){l.status="fulfilled",l.value=t;for(var c=0;c<a.length;c++)(0,a[c])(t)},function(c){for(l.status="rejected",l.reason=c,c=0;c<a.length;c++)(0,a[c])(void 0)}),l}var Mh=P.S;P.S=function(e,t){d0=yt(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&fv(e,t),Mh!==null&&Mh(e,t)};var Os=U(null);function Ku(){var e=Os.current;return e!==null?e:ft.pooledCache}function to(e,t){t===null?me(Os,Os.current):me(Os,t.pool)}function Oh(){var e=Ku();return e===null?null:{parent:Ht._currentValue,pool:e}}var Sr=Error(u(460)),ed=Error(u(474)),ao=Error(u(542)),no={then:function(){}};function Rh(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Dh(e,t,a){switch(a=e[a],a===void 0?e.push(t):a!==t&&(t.then(Pa,Pa),t=a),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Ah(e),e;default:if(typeof t.status=="string")t.then(Pa,Pa);else{if(e=ft,e!==null&&100<e.shellSuspendCounter)throw Error(u(482));e=t,e.status="pending",e.then(function(l){if(t.status==="pending"){var c=t;c.status="fulfilled",c.value=l}},function(l){if(t.status==="pending"){var c=t;c.status="rejected",c.reason=l}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Ah(e),e}throw Ds=t,Sr}}function Rs(e){try{var t=e._init;return t(e._payload)}catch(a){throw a!==null&&typeof a=="object"&&typeof a.then=="function"?(Ds=a,Sr):a}}var Ds=null;function kh(){if(Ds===null)throw Error(u(459));var e=Ds;return Ds=null,e}function Ah(e){if(e===Sr||e===ao)throw Error(u(483))}var Er=null,Ei=0;function lo(e){var t=Ei;return Ei+=1,Er===null&&(Er=[]),Dh(Er,e,t)}function Ci(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function so(e,t){throw t.$$typeof===D?Error(u(525)):(e=Object.prototype.toString.call(t),Error(u(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function _h(e){function t(F,$){if(e){var I=F.deletions;I===null?(F.deletions=[$],F.flags|=16):I.push($)}}function a(F,$){if(!e)return null;for(;$!==null;)t(F,$),$=$.sibling;return null}function l(F){for(var $=new Map;F!==null;)F.key!==null?$.set(F.key,F):$.set(F.index,F),F=F.sibling;return $}function c(F,$){return F=Za(F,$),F.index=0,F.sibling=null,F}function d(F,$,I){return F.index=I,e?(I=F.alternate,I!==null?(I=I.index,I<$?(F.flags|=67108866,$):I):(F.flags|=67108866,$)):(F.flags|=1048576,$)}function p(F){return e&&F.alternate===null&&(F.flags|=67108866),F}function T(F,$,I,ce){return $===null||$.tag!==6?($=bi(I,F.mode,ce),$.return=F,$):($=c($,I),$.return=F,$)}function _(F,$,I,ce){var De=I.type;return De===O?re(F,$,I.props.children,ce,I.key):$!==null&&($.elementType===De||typeof De=="object"&&De!==null&&De.$$typeof===Z&&Rs(De)===$.type)?($=c($,I.props),Ci($,I),$.return=F,$):($=yr(I.type,I.key,I.props,null,F.mode,ce),Ci($,I),$.return=F,$)}function Q(F,$,I,ce){return $===null||$.tag!==4||$.stateNode.containerInfo!==I.containerInfo||$.stateNode.implementation!==I.implementation?($=Ml(I,F.mode,ce),$.return=F,$):($=c($,I.children||[]),$.return=F,$)}function re(F,$,I,ce,De){return $===null||$.tag!==7?($=Wa(I,F.mode,ce,De),$.return=F,$):($=c($,I),$.return=F,$)}function ue(F,$,I){if(typeof $=="string"&&$!==""||typeof $=="number"||typeof $=="bigint")return $=bi(""+$,F.mode,I),$.return=F,$;if(typeof $=="object"&&$!==null){switch($.$$typeof){case A:return I=yr($.type,$.key,$.props,null,F.mode,I),Ci(I,$),I.return=F,I;case N:return $=Ml($,F.mode,I),$.return=F,$;case Z:return $=Rs($),ue(F,$,I)}if(pe($)||ae($))return $=Wa($,F.mode,I,null),$.return=F,$;if(typeof $.then=="function")return ue(F,lo($),I);if($.$$typeof===J)return ue(F,eo(F,$),I);so(F,$)}return null}function X(F,$,I,ce){var De=$!==null?$.key:null;if(typeof I=="string"&&I!==""||typeof I=="number"||typeof I=="bigint")return De!==null?null:T(F,$,""+I,ce);if(typeof I=="object"&&I!==null){switch(I.$$typeof){case A:return I.key===De?_(F,$,I,ce):null;case N:return I.key===De?Q(F,$,I,ce):null;case Z:return I=Rs(I),X(F,$,I,ce)}if(pe(I)||ae(I))return De!==null?null:re(F,$,I,ce,null);if(typeof I.then=="function")return X(F,$,lo(I),ce);if(I.$$typeof===J)return X(F,$,eo(F,I),ce);so(F,I)}return null}function ne(F,$,I,ce,De){if(typeof ce=="string"&&ce!==""||typeof ce=="number"||typeof ce=="bigint")return F=F.get(I)||null,T($,F,""+ce,De);if(typeof ce=="object"&&ce!==null){switch(ce.$$typeof){case A:return F=F.get(ce.key===null?I:ce.key)||null,_($,F,ce,De);case N:return F=F.get(ce.key===null?I:ce.key)||null,Q($,F,ce,De);case Z:return ce=Rs(ce),ne(F,$,I,ce,De)}if(pe(ce)||ae(ce))return F=F.get(I)||null,re($,F,ce,De,null);if(typeof ce.then=="function")return ne(F,$,I,lo(ce),De);if(ce.$$typeof===J)return ne(F,$,I,eo($,ce),De);so($,ce)}return null}function je(F,$,I,ce){for(var De=null,Je=null,Se=$,Be=$=0,We=null;Se!==null&&Be<I.length;Be++){Se.index>Be?(We=Se,Se=null):We=Se.sibling;var Ke=X(F,Se,I[Be],ce);if(Ke===null){Se===null&&(Se=We);break}e&&Se&&Ke.alternate===null&&t(F,Se),$=d(Ke,$,Be),Je===null?De=Ke:Je.sibling=Ke,Je=Ke,Se=We}if(Be===I.length)return a(F,Se),Y&&i(F,Be),De;if(Se===null){for(;Be<I.length;Be++)Se=ue(F,I[Be],ce),Se!==null&&($=d(Se,$,Be),Je===null?De=Se:Je.sibling=Se,Je=Se);return Y&&i(F,Be),De}for(Se=l(Se);Be<I.length;Be++)We=ne(Se,F,Be,I[Be],ce),We!==null&&(e&&We.alternate!==null&&Se.delete(We.key===null?Be:We.key),$=d(We,$,Be),Je===null?De=We:Je.sibling=We,Je=We);return e&&Se.forEach(function(Gl){return t(F,Gl)}),Y&&i(F,Be),De}function _e(F,$,I,ce){if(I==null)throw Error(u(151));for(var De=null,Je=null,Se=$,Be=$=0,We=null,Ke=I.next();Se!==null&&!Ke.done;Be++,Ke=I.next()){Se.index>Be?(We=Se,Se=null):We=Se.sibling;var Gl=X(F,Se,Ke.value,ce);if(Gl===null){Se===null&&(Se=We);break}e&&Se&&Gl.alternate===null&&t(F,Se),$=d(Gl,$,Be),Je===null?De=Gl:Je.sibling=Gl,Je=Gl,Se=We}if(Ke.done)return a(F,Se),Y&&i(F,Be),De;if(Se===null){for(;!Ke.done;Be++,Ke=I.next())Ke=ue(F,Ke.value,ce),Ke!==null&&($=d(Ke,$,Be),Je===null?De=Ke:Je.sibling=Ke,Je=Ke);return Y&&i(F,Be),De}for(Se=l(Se);!Ke.done;Be++,Ke=I.next())Ke=ne(Se,F,Be,Ke.value,ce),Ke!==null&&(e&&Ke.alternate!==null&&Se.delete(Ke.key===null?Be:Ke.key),$=d(Ke,$,Be),Je===null?De=Ke:Je.sibling=Ke,Je=Ke);return e&&Se.forEach(function(Sy){return t(F,Sy)}),Y&&i(F,Be),De}function dt(F,$,I,ce){if(typeof I=="object"&&I!==null&&I.type===O&&I.key===null&&(I=I.props.children),typeof I=="object"&&I!==null){switch(I.$$typeof){case A:e:{for(var De=I.key;$!==null;){if($.key===De){if(De=I.type,De===O){if($.tag===7){a(F,$.sibling),ce=c($,I.props.children),ce.return=F,F=ce;break e}}else if($.elementType===De||typeof De=="object"&&De!==null&&De.$$typeof===Z&&Rs(De)===$.type){a(F,$.sibling),ce=c($,I.props),Ci(ce,I),ce.return=F,F=ce;break e}a(F,$);break}else t(F,$);$=$.sibling}I.type===O?(ce=Wa(I.props.children,F.mode,ce,I.key),ce.return=F,F=ce):(ce=yr(I.type,I.key,I.props,null,F.mode,ce),Ci(ce,I),ce.return=F,F=ce)}return p(F);case N:e:{for(De=I.key;$!==null;){if($.key===De)if($.tag===4&&$.stateNode.containerInfo===I.containerInfo&&$.stateNode.implementation===I.implementation){a(F,$.sibling),ce=c($,I.children||[]),ce.return=F,F=ce;break e}else{a(F,$);break}else t(F,$);$=$.sibling}ce=Ml(I,F.mode,ce),ce.return=F,F=ce}return p(F);case Z:return I=Rs(I),dt(F,$,I,ce)}if(pe(I))return je(F,$,I,ce);if(ae(I)){if(De=ae(I),typeof De!="function")throw Error(u(150));return I=De.call(I),_e(F,$,I,ce)}if(typeof I.then=="function")return dt(F,$,lo(I),ce);if(I.$$typeof===J)return dt(F,$,eo(F,I),ce);so(F,I)}return typeof I=="string"&&I!==""||typeof I=="number"||typeof I=="bigint"?(I=""+I,$!==null&&$.tag===6?(a(F,$.sibling),ce=c($,I),ce.return=F,F=ce):(a(F,$),ce=bi(I,F.mode,ce),ce.return=F,F=ce),p(F)):a(F,$)}return function(F,$,I,ce){try{Ei=0;var De=dt(F,$,I,ce);return Er=null,De}catch(Se){if(Se===Sr||Se===ao)throw Se;var Je=ta(29,Se,null,F.mode);return Je.lanes=ce,Je.return=F,Je}finally{}}}var ks=_h(!0),zh=_h(!1),Ol=!1;function td(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function ad(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 Rl(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Dl(e,t,a){var l=e.updateQueue;if(l===null)return null;if(l=l.shared,(tt&2)!==0){var c=l.pending;return c===null?t.next=t:(t.next=c.next,c.next=t),l.pending=t,t=Cs(e),Es(e,null,a),t}return Fa(e,l,t,a),Cs(e)}function Ti(e,t,a){if(t=t.updateQueue,t!==null&&(t=t.shared,(a&4194048)!==0)){var l=t.lanes;l&=e.pendingLanes,a|=l,t.lanes=a,xa(e,a)}}function nd(e,t){var a=e.updateQueue,l=e.alternate;if(l!==null&&(l=l.updateQueue,a===l)){var c=null,d=null;if(a=a.firstBaseUpdate,a!==null){do{var p={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};d===null?c=d=p:d=d.next=p,a=a.next}while(a!==null);d===null?c=d=t:d=d.next=t}else c=d=t;a={baseState:l.baseState,firstBaseUpdate:c,lastBaseUpdate:d,shared:l.shared,callbacks:l.callbacks},e.updateQueue=a;return}e=a.lastBaseUpdate,e===null?a.firstBaseUpdate=t:e.next=t,a.lastBaseUpdate=t}var ld=!1;function Mi(){if(ld){var e=wr;if(e!==null)throw e}}function Oi(e,t,a,l){ld=!1;var c=e.updateQueue;Ol=!1;var d=c.firstBaseUpdate,p=c.lastBaseUpdate,T=c.shared.pending;if(T!==null){c.shared.pending=null;var _=T,Q=_.next;_.next=null,p===null?d=Q:p.next=Q,p=_;var re=e.alternate;re!==null&&(re=re.updateQueue,T=re.lastBaseUpdate,T!==p&&(T===null?re.firstBaseUpdate=Q:T.next=Q,re.lastBaseUpdate=_))}if(d!==null){var ue=c.baseState;p=0,re=Q=_=null,T=d;do{var X=T.lane&-536870913,ne=X!==T.lane;if(ne?(Ze&X)===X:(l&X)===X){X!==0&&X===Nr&&(ld=!0),re!==null&&(re=re.next={lane:0,tag:T.tag,payload:T.payload,callback:null,next:null});e:{var je=e,_e=T;X=t;var dt=a;switch(_e.tag){case 1:if(je=_e.payload,typeof je=="function"){ue=je.call(dt,ue,X);break e}ue=je;break e;case 3:je.flags=je.flags&-65537|128;case 0:if(je=_e.payload,X=typeof je=="function"?je.call(dt,ue,X):je,X==null)break e;ue=M({},ue,X);break e;case 2:Ol=!0}}X=T.callback,X!==null&&(e.flags|=64,ne&&(e.flags|=8192),ne=c.callbacks,ne===null?c.callbacks=[X]:ne.push(X))}else ne={lane:X,tag:T.tag,payload:T.payload,callback:T.callback,next:null},re===null?(Q=re=ne,_=ue):re=re.next=ne,p|=X;if(T=T.next,T===null){if(T=c.shared.pending,T===null)break;ne=T,T=ne.next,ne.next=null,c.lastBaseUpdate=ne,c.shared.pending=null}}while(!0);re===null&&(_=ue),c.baseState=_,c.firstBaseUpdate=Q,c.lastBaseUpdate=re,d===null&&(c.shared.lanes=0),Ll|=p,e.lanes=p,e.memoizedState=ue}}function Lh(e,t){if(typeof e!="function")throw Error(u(191,e));e.call(t)}function Uh(e,t){var a=e.callbacks;if(a!==null)for(e.callbacks=null,e=0;e<a.length;e++)Lh(a[e],t)}var Cr=U(null),ro=U(0);function Hh(e,t){e=al,me(ro,e),me(Cr,t),al=e|t.baseLanes}function sd(){me(ro,al),me(Cr,Cr.current)}function rd(){al=ro.current,se(Cr),se(ro)}var ka=U(null),Ja=null;function kl(e){var t=e.alternate;me(Dt,Dt.current&1),me(ka,e),Ja===null&&(t===null||Cr.current!==null||t.memoizedState!==null)&&(Ja=e)}function id(e){me(Dt,Dt.current),me(ka,e),Ja===null&&(Ja=e)}function qh(e){e.tag===22?(me(Dt,Dt.current),me(ka,e),Ja===null&&(Ja=e)):Al()}function Al(){me(Dt,Dt.current),me(ka,ka.current)}function Aa(e){se(ka),Ja===e&&(Ja=null),se(Dt)}var Dt=U(0);function io(e){for(var t=e;t!==null;){if(t.tag===13){var a=t.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||mf(a)||gf(a)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder==="forwards"||t.memoizedProps.revealOrder==="backwards"||t.memoizedProps.revealOrder==="unstable_legacy-backwards"||t.memoizedProps.revealOrder==="together")){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Wn=0,Ve=null,ot=null,qt=null,co=!1,Tr=!1,As=!1,oo=0,Ri=0,Mr=null,mv=0;function Et(){throw Error(u(321))}function cd(e,t){if(t===null)return!1;for(var a=0;a<t.length&&a<e.length;a++)if(!ra(e[a],t[a]))return!1;return!0}function od(e,t,a,l,c,d){return Wn=d,Ve=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,P.H=e===null||e.memoizedState===null?Nm:Sd,As=!1,d=a(l,c),As=!1,Tr&&(d=Bh(t,a,l,c)),Vh(e),d}function Vh(e){P.H=Ai;var t=ot!==null&&ot.next!==null;if(Wn=0,qt=ot=Ve=null,co=!1,Ri=0,Mr=null,t)throw Error(u(300));e===null||Vt||(e=e.dependencies,e!==null&&jr(e)&&(Vt=!0))}function Bh(e,t,a,l){Ve=e;var c=0;do{if(Tr&&(Mr=null),Ri=0,Tr=!1,25<=c)throw Error(u(301));if(c+=1,qt=ot=null,e.updateQueue!=null){var d=e.updateQueue;d.lastEffect=null,d.events=null,d.stores=null,d.memoCache!=null&&(d.memoCache.index=0)}P.H=wm,d=t(a,l)}while(Tr);return d}function gv(){var e=P.H,t=e.useState()[0];return t=typeof t.then=="function"?Di(t):t,e=e.useState()[0],(ot!==null?ot.memoizedState:null)!==e&&(Ve.flags|=1024),t}function ud(){var e=oo!==0;return oo=0,e}function dd(e,t,a){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a}function fd(e){if(co){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}co=!1}Wn=0,qt=ot=Ve=null,Tr=!1,Ri=oo=0,Mr=null}function ha(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return qt===null?Ve.memoizedState=qt=e:qt=qt.next=e,qt}function kt(){if(ot===null){var e=Ve.alternate;e=e!==null?e.memoizedState:null}else e=ot.next;var t=qt===null?Ve.memoizedState:qt.next;if(t!==null)qt=t,ot=e;else{if(e===null)throw Ve.alternate===null?Error(u(467)):Error(u(310));ot=e,e={memoizedState:ot.memoizedState,baseState:ot.baseState,baseQueue:ot.baseQueue,queue:ot.queue,next:null},qt===null?Ve.memoizedState=qt=e:qt=qt.next=e}return qt}function uo(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Di(e){var t=Ri;return Ri+=1,Mr===null&&(Mr=[]),e=Dh(Mr,e,t),t=Ve,(qt===null?t.memoizedState:qt.next)===null&&(t=t.alternate,P.H=t===null||t.memoizedState===null?Nm:Sd),e}function fo(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Di(e);if(e.$$typeof===J)return aa(e)}throw Error(u(438,String(e)))}function hd(e){var t=null,a=Ve.updateQueue;if(a!==null&&(t=a.memoCache),t==null){var l=Ve.alternate;l!==null&&(l=l.updateQueue,l!==null&&(l=l.memoCache,l!=null&&(t={data:l.data.map(function(c){return c.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),a===null&&(a=uo(),Ve.updateQueue=a),a.memoCache=t,a=t.data[t.index],a===void 0)for(a=t.data[t.index]=Array(e),l=0;l<e;l++)a[l]=S;return t.index++,a}function In(e,t){return typeof t=="function"?t(e):t}function ho(e){var t=kt();return md(t,ot,e)}function md(e,t,a){var l=e.queue;if(l===null)throw Error(u(311));l.lastRenderedReducer=a;var c=e.baseQueue,d=l.pending;if(d!==null){if(c!==null){var p=c.next;c.next=d.next,d.next=p}t.baseQueue=c=d,l.pending=null}if(d=e.baseState,c===null)e.memoizedState=d;else{t=c.next;var T=p=null,_=null,Q=t,re=!1;do{var ue=Q.lane&-536870913;if(ue!==Q.lane?(Ze&ue)===ue:(Wn&ue)===ue){var X=Q.revertLane;if(X===0)_!==null&&(_=_.next={lane:0,revertLane:0,gesture:null,action:Q.action,hasEagerState:Q.hasEagerState,eagerState:Q.eagerState,next:null}),ue===Nr&&(re=!0);else if((Wn&X)===X){Q=Q.next,X===Nr&&(re=!0);continue}else ue={lane:0,revertLane:Q.revertLane,gesture:null,action:Q.action,hasEagerState:Q.hasEagerState,eagerState:Q.eagerState,next:null},_===null?(T=_=ue,p=d):_=_.next=ue,Ve.lanes|=X,Ll|=X;ue=Q.action,As&&a(d,ue),d=Q.hasEagerState?Q.eagerState:a(d,ue)}else X={lane:ue,revertLane:Q.revertLane,gesture:Q.gesture,action:Q.action,hasEagerState:Q.hasEagerState,eagerState:Q.eagerState,next:null},_===null?(T=_=X,p=d):_=_.next=X,Ve.lanes|=ue,Ll|=ue;Q=Q.next}while(Q!==null&&Q!==t);if(_===null?p=d:_.next=T,!ra(d,e.memoizedState)&&(Vt=!0,re&&(a=wr,a!==null)))throw a;e.memoizedState=d,e.baseState=p,e.baseQueue=_,l.lastRenderedState=d}return c===null&&(l.lanes=0),[e.memoizedState,l.dispatch]}function gd(e){var t=kt(),a=t.queue;if(a===null)throw Error(u(311));a.lastRenderedReducer=e;var l=a.dispatch,c=a.pending,d=t.memoizedState;if(c!==null){a.pending=null;var p=c=c.next;do d=e(d,p.action),p=p.next;while(p!==c);ra(d,t.memoizedState)||(Vt=!0),t.memoizedState=d,t.baseQueue===null&&(t.baseState=d),a.lastRenderedState=d}return[d,l]}function $h(e,t,a){var l=Ve,c=kt(),d=Y;if(d){if(a===void 0)throw Error(u(407));a=a()}else a=t();var p=!ra((ot||c).memoizedState,a);if(p&&(c.memoizedState=a,Vt=!0),c=c.queue,vd(Fh.bind(null,l,c,e),[e]),c.getSnapshot!==t||p||qt!==null&&qt.memoizedState.tag&1){if(l.flags|=2048,Or(9,{destroy:void 0},Yh.bind(null,l,c,a,t),null),ft===null)throw Error(u(349));d||(Wn&127)!==0||Ph(l,t,a)}return a}function Ph(e,t,a){e.flags|=16384,e={getSnapshot:t,value:a},t=Ve.updateQueue,t===null?(t=uo(),Ve.updateQueue=t,t.stores=[e]):(a=t.stores,a===null?t.stores=[e]:a.push(e))}function Yh(e,t,a,l){t.value=a,t.getSnapshot=l,Gh(t)&&Zh(e)}function Fh(e,t,a){return a(function(){Gh(t)&&Zh(e)})}function Gh(e){var t=e.getSnapshot;e=e.value;try{var a=t();return!ra(e,a)}catch{return!0}}function Zh(e){var t=Ga(e,2);t!==null&&Ca(t,e,2)}function xd(e){var t=ha();if(typeof e=="function"){var a=e;if(e=a(),As){zt(!0);try{a()}finally{zt(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:In,lastRenderedState:e},t}function Wh(e,t,a,l){return e.baseState=a,md(e,ot,typeof l=="function"?l:In)}function xv(e,t,a,l,c){if(xo(e))throw Error(u(485));if(e=t.action,e!==null){var d={payload:c,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(p){d.listeners.push(p)}};P.T!==null?a(!0):d.isTransition=!1,l(d),a=t.pending,a===null?(d.next=t.pending=d,Ih(t,d)):(d.next=a.next,t.pending=a.next=d)}}function Ih(e,t){var a=t.action,l=t.payload,c=e.state;if(t.isTransition){var d=P.T,p={};P.T=p;try{var T=a(c,l),_=P.S;_!==null&&_(p,T),Qh(e,t,T)}catch(Q){pd(e,t,Q)}finally{d!==null&&p.types!==null&&(d.types=p.types),P.T=d}}else try{d=a(c,l),Qh(e,t,d)}catch(Q){pd(e,t,Q)}}function Qh(e,t,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(function(l){Xh(e,t,l)},function(l){return pd(e,t,l)}):Xh(e,t,a)}function Xh(e,t,a){t.status="fulfilled",t.value=a,Jh(t),e.state=a,t=e.pending,t!==null&&(a=t.next,a===t?e.pending=null:(a=a.next,t.next=a,Ih(e,a)))}function pd(e,t,a){var l=e.pending;if(e.pending=null,l!==null){l=l.next;do t.status="rejected",t.reason=a,Jh(t),t=t.next;while(t!==l)}e.action=null}function Jh(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Kh(e,t){return t}function em(e,t){if(Y){var a=ft.formState;if(a!==null){e:{var l=Ve;if(Y){if(B){t:{for(var c=B,d=be;c.nodeType!==8;){if(!d){c=null;break t}if(c=Ka(c.nextSibling),c===null){c=null;break t}}d=c.data,c=d==="F!"||d==="F"?c:null}if(c){B=Ka(c.nextSibling),l=c.data==="F!";break e}}Ge(l)}l=!1}l&&(t=a[0])}}return a=ha(),a.memoizedState=a.baseState=t,l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Kh,lastRenderedState:t},a.queue=l,a=ym.bind(null,Ve,l),l.dispatch=a,l=xd(!1),d=wd.bind(null,Ve,!1,l.queue),l=ha(),c={state:t,dispatch:null,action:e,pending:null},l.queue=c,a=xv.bind(null,Ve,c,d,a),c.dispatch=a,l.memoizedState=e,[t,a,!1]}function tm(e){var t=kt();return am(t,ot,e)}function am(e,t,a){if(t=md(e,t,Kh)[0],e=ho(In)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var l=Di(t)}catch(p){throw p===Sr?ao:p}else l=t;t=kt();var c=t.queue,d=c.dispatch;return a!==t.memoizedState&&(Ve.flags|=2048,Or(9,{destroy:void 0},pv.bind(null,c,a),null)),[l,d,e]}function pv(e,t){e.action=t}function nm(e){var t=kt(),a=ot;if(a!==null)return am(t,a,e);kt(),t=t.memoizedState,a=kt();var l=a.queue.dispatch;return a.memoizedState=e,[t,l,!1]}function Or(e,t,a,l){return e={tag:e,create:a,deps:l,inst:t,next:null},t=Ve.updateQueue,t===null&&(t=uo(),Ve.updateQueue=t),a=t.lastEffect,a===null?t.lastEffect=e.next=e:(l=a.next,a.next=e,e.next=l,t.lastEffect=e),e}function lm(){return kt().memoizedState}function mo(e,t,a,l){var c=ha();Ve.flags|=e,c.memoizedState=Or(1|t,{destroy:void 0},a,l===void 0?null:l)}function go(e,t,a,l){var c=kt();l=l===void 0?null:l;var d=c.memoizedState.inst;ot!==null&&l!==null&&cd(l,ot.memoizedState.deps)?c.memoizedState=Or(t,d,a,l):(Ve.flags|=e,c.memoizedState=Or(1|t,d,a,l))}function sm(e,t){mo(8390656,8,e,t)}function vd(e,t){go(2048,8,e,t)}function vv(e){Ve.flags|=4;var t=Ve.updateQueue;if(t===null)t=uo(),Ve.updateQueue=t,t.events=[e];else{var a=t.events;a===null?t.events=[e]:a.push(e)}}function rm(e){var t=kt().memoizedState;return vv({ref:t,nextImpl:e}),function(){if((tt&2)!==0)throw Error(u(440));return t.impl.apply(void 0,arguments)}}function im(e,t){return go(4,2,e,t)}function cm(e,t){return go(4,4,e,t)}function om(e,t){if(typeof t=="function"){e=e();var a=t(e);return function(){typeof a=="function"?a():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function um(e,t,a){a=a!=null?a.concat([e]):null,go(4,4,om.bind(null,t,e),a)}function yd(){}function dm(e,t){var a=kt();t=t===void 0?null:t;var l=a.memoizedState;return t!==null&&cd(t,l[1])?l[0]:(a.memoizedState=[e,t],e)}function fm(e,t){var a=kt();t=t===void 0?null:t;var l=a.memoizedState;if(t!==null&&cd(t,l[1]))return l[0];if(l=e(),As){zt(!0);try{e()}finally{zt(!1)}}return a.memoizedState=[l,t],l}function bd(e,t,a){return a===void 0||(Wn&1073741824)!==0&&(Ze&261930)===0?e.memoizedState=t:(e.memoizedState=a,e=h0(),Ve.lanes|=e,Ll|=e,a)}function hm(e,t,a,l){return ra(a,t)?a:Cr.current!==null?(e=bd(e,a,l),ra(e,t)||(Vt=!0),e):(Wn&42)===0||(Wn&1073741824)!==0&&(Ze&261930)===0?(Vt=!0,e.memoizedState=a):(e=h0(),Ve.lanes|=e,Ll|=e,t)}function mm(e,t,a,l,c){var d=K.p;K.p=d!==0&&8>d?d:8;var p=P.T,T={};P.T=T,wd(e,!1,t,a);try{var _=c(),Q=P.S;if(Q!==null&&Q(T,_),_!==null&&typeof _=="object"&&typeof _.then=="function"){var re=hv(_,l);ki(e,t,re,La(e))}else ki(e,t,l,La(e))}catch(ue){ki(e,t,{then:function(){},status:"rejected",reason:ue},La())}finally{K.p=d,p!==null&&T.types!==null&&(p.types=T.types),P.T=p}}function yv(){}function jd(e,t,a,l){if(e.tag!==5)throw Error(u(476));var c=gm(e).queue;mm(e,c,t,he,a===null?yv:function(){return xm(e),a(l)})}function gm(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:he,baseState:he,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:In,lastRenderedState:he},next:null};var a={};return t.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:In,lastRenderedState:a},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function xm(e){var t=gm(e);t.next===null&&(t=e.alternate.memoizedState),ki(e,t.next.queue,{},La())}function Nd(){return aa(Ii)}function pm(){return kt().memoizedState}function vm(){return kt().memoizedState}function bv(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var a=La();e=Rl(a);var l=Dl(t,e,a);l!==null&&(Ca(l,t,a),Ti(l,t,a)),t={cache:Xu()},e.payload=t;return}t=t.return}}function jv(e,t,a){var l=La();a={lane:l,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},xo(e)?bm(t,a):(a=xr(e,t,a,l),a!==null&&(Ca(a,e,l),jm(a,t,l)))}function ym(e,t,a){var l=La();ki(e,t,a,l)}function ki(e,t,a,l){var c={lane:l,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(xo(e))bm(t,c);else{var d=e.alternate;if(e.lanes===0&&(d===null||d.lanes===0)&&(d=t.lastRenderedReducer,d!==null))try{var p=t.lastRenderedState,T=d(p,a);if(c.hasEagerState=!0,c.eagerState=T,ra(T,p))return Fa(e,t,c,0),ft===null&&Tl(),!1}catch{}finally{}if(a=xr(e,t,c,l),a!==null)return Ca(a,e,l),jm(a,t,l),!0}return!1}function wd(e,t,a,l){if(l={lane:2,revertLane:tf(),gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},xo(e)){if(t)throw Error(u(479))}else t=xr(e,a,l,2),t!==null&&Ca(t,e,2)}function xo(e){var t=e.alternate;return e===Ve||t!==null&&t===Ve}function bm(e,t){Tr=co=!0;var a=e.pending;a===null?t.next=t:(t.next=a.next,a.next=t),e.pending=t}function jm(e,t,a){if((a&4194048)!==0){var l=t.lanes;l&=e.pendingLanes,a|=l,t.lanes=a,xa(e,a)}}var Ai={readContext:aa,use:fo,useCallback:Et,useContext:Et,useEffect:Et,useImperativeHandle:Et,useLayoutEffect:Et,useInsertionEffect:Et,useMemo:Et,useReducer:Et,useRef:Et,useState:Et,useDebugValue:Et,useDeferredValue:Et,useTransition:Et,useSyncExternalStore:Et,useId:Et,useHostTransitionStatus:Et,useFormState:Et,useActionState:Et,useOptimistic:Et,useMemoCache:Et,useCacheRefresh:Et};Ai.useEffectEvent=Et;var Nm={readContext:aa,use:fo,useCallback:function(e,t){return ha().memoizedState=[e,t===void 0?null:t],e},useContext:aa,useEffect:sm,useImperativeHandle:function(e,t,a){a=a!=null?a.concat([e]):null,mo(4194308,4,om.bind(null,t,e),a)},useLayoutEffect:function(e,t){return mo(4194308,4,e,t)},useInsertionEffect:function(e,t){mo(4,2,e,t)},useMemo:function(e,t){var a=ha();t=t===void 0?null:t;var l=e();if(As){zt(!0);try{e()}finally{zt(!1)}}return a.memoizedState=[l,t],l},useReducer:function(e,t,a){var l=ha();if(a!==void 0){var c=a(t);if(As){zt(!0);try{a(t)}finally{zt(!1)}}}else c=t;return l.memoizedState=l.baseState=c,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:c},l.queue=e,e=e.dispatch=jv.bind(null,Ve,e),[l.memoizedState,e]},useRef:function(e){var t=ha();return e={current:e},t.memoizedState=e},useState:function(e){e=xd(e);var t=e.queue,a=ym.bind(null,Ve,t);return t.dispatch=a,[e.memoizedState,a]},useDebugValue:yd,useDeferredValue:function(e,t){var a=ha();return bd(a,e,t)},useTransition:function(){var e=xd(!1);return e=mm.bind(null,Ve,e.queue,!0,!1),ha().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,a){var l=Ve,c=ha();if(Y){if(a===void 0)throw Error(u(407));a=a()}else{if(a=t(),ft===null)throw Error(u(349));(Ze&127)!==0||Ph(l,t,a)}c.memoizedState=a;var d={value:a,getSnapshot:t};return c.queue=d,sm(Fh.bind(null,l,d,e),[e]),l.flags|=2048,Or(9,{destroy:void 0},Yh.bind(null,l,d,a,t),null),a},useId:function(){var e=ha(),t=ft.identifierPrefix;if(Y){var a=g,l=Ia;a=(l&~(1<<32-Lt(l)-1)).toString(32)+a,t="_"+t+"R_"+a,a=oo++,0<a&&(t+="H"+a.toString(32)),t+="_"}else a=mv++,t="_"+t+"r_"+a.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:Nd,useFormState:em,useActionState:em,useOptimistic:function(e){var t=ha();t.memoizedState=t.baseState=e;var a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=a,t=wd.bind(null,Ve,!0,a),a.dispatch=t,[e,t]},useMemoCache:hd,useCacheRefresh:function(){return ha().memoizedState=bv.bind(null,Ve)},useEffectEvent:function(e){var t=ha(),a={impl:e};return t.memoizedState=a,function(){if((tt&2)!==0)throw Error(u(440));return a.impl.apply(void 0,arguments)}}},Sd={readContext:aa,use:fo,useCallback:dm,useContext:aa,useEffect:vd,useImperativeHandle:um,useInsertionEffect:im,useLayoutEffect:cm,useMemo:fm,useReducer:ho,useRef:lm,useState:function(){return ho(In)},useDebugValue:yd,useDeferredValue:function(e,t){var a=kt();return hm(a,ot.memoizedState,e,t)},useTransition:function(){var e=ho(In)[0],t=kt().memoizedState;return[typeof e=="boolean"?e:Di(e),t]},useSyncExternalStore:$h,useId:pm,useHostTransitionStatus:Nd,useFormState:tm,useActionState:tm,useOptimistic:function(e,t){var a=kt();return Wh(a,ot,e,t)},useMemoCache:hd,useCacheRefresh:vm};Sd.useEffectEvent=rm;var wm={readContext:aa,use:fo,useCallback:dm,useContext:aa,useEffect:vd,useImperativeHandle:um,useInsertionEffect:im,useLayoutEffect:cm,useMemo:fm,useReducer:gd,useRef:lm,useState:function(){return gd(In)},useDebugValue:yd,useDeferredValue:function(e,t){var a=kt();return ot===null?bd(a,e,t):hm(a,ot.memoizedState,e,t)},useTransition:function(){var e=gd(In)[0],t=kt().memoizedState;return[typeof e=="boolean"?e:Di(e),t]},useSyncExternalStore:$h,useId:pm,useHostTransitionStatus:Nd,useFormState:nm,useActionState:nm,useOptimistic:function(e,t){var a=kt();return ot!==null?Wh(a,ot,e,t):(a.baseState=e,[e,a.queue.dispatch])},useMemoCache:hd,useCacheRefresh:vm};wm.useEffectEvent=rm;function Ed(e,t,a,l){t=e.memoizedState,a=a(l,t),a=a==null?t:M({},t,a),e.memoizedState=a,e.lanes===0&&(e.updateQueue.baseState=a)}var Cd={enqueueSetState:function(e,t,a){e=e._reactInternals;var l=La(),c=Rl(l);c.payload=t,a!=null&&(c.callback=a),t=Dl(e,c,l),t!==null&&(Ca(t,e,l),Ti(t,e,l))},enqueueReplaceState:function(e,t,a){e=e._reactInternals;var l=La(),c=Rl(l);c.tag=1,c.payload=t,a!=null&&(c.callback=a),t=Dl(e,c,l),t!==null&&(Ca(t,e,l),Ti(t,e,l))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var a=La(),l=Rl(a);l.tag=2,t!=null&&(l.callback=t),t=Dl(e,l,a),t!==null&&(Ca(t,e,a),Ti(t,e,a))}};function Sm(e,t,a,l,c,d,p){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(l,d,p):t.prototype&&t.prototype.isPureReactComponent?!Ns(a,l)||!Ns(c,d):!0}function Em(e,t,a,l){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(a,l),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(a,l),t.state!==e&&Cd.enqueueReplaceState(t,t.state,null)}function _s(e,t){var a=t;if("ref"in t){a={};for(var l in t)l!=="ref"&&(a[l]=t[l])}if(e=e.defaultProps){a===t&&(a=M({},a));for(var c in e)a[c]===void 0&&(a[c]=e[c])}return a}function Cm(e){Cl(e)}function Tm(e){console.error(e)}function Mm(e){Cl(e)}function po(e,t){try{var a=e.onUncaughtError;a(t.value,{componentStack:t.stack})}catch(l){setTimeout(function(){throw l})}}function Om(e,t,a){try{var l=e.onCaughtError;l(a.value,{componentStack:a.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(c){setTimeout(function(){throw c})}}function Td(e,t,a){return a=Rl(a),a.tag=3,a.payload={element:null},a.callback=function(){po(e,t)},a}function Rm(e){return e=Rl(e),e.tag=3,e}function Dm(e,t,a,l){var c=a.type.getDerivedStateFromError;if(typeof c=="function"){var d=l.value;e.payload=function(){return c(d)},e.callback=function(){Om(t,a,l)}}var p=a.stateNode;p!==null&&typeof p.componentDidCatch=="function"&&(e.callback=function(){Om(t,a,l),typeof c!="function"&&(Ul===null?Ul=new Set([this]):Ul.add(this));var T=l.stack;this.componentDidCatch(l.value,{componentStack:T!==null?T:""})})}function Nv(e,t,a,l,c){if(a.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){if(t=a.alternate,t!==null&&Xa(t,a,c,!0),a=ka.current,a!==null){switch(a.tag){case 31:case 13:return Ja===null?Oo():a.alternate===null&&Ct===0&&(Ct=3),a.flags&=-257,a.flags|=65536,a.lanes=c,l===no?a.flags|=16384:(t=a.updateQueue,t===null?a.updateQueue=new Set([l]):t.add(l),Jd(e,l,c)),!1;case 22:return a.flags|=65536,l===no?a.flags|=16384:(t=a.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([l])},a.updateQueue=t):(a=t.retryQueue,a===null?t.retryQueue=new Set([l]):a.add(l)),Jd(e,l,c)),!1}throw Error(u(435,a.tag))}return Jd(e,l,c),Oo(),!1}if(Y)return t=ka.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=c,l!==He&&(e=Error(u(422),{cause:l}),dn(ba(e,a)))):(l!==He&&(t=Error(u(423),{cause:l}),dn(ba(t,a))),e=e.current.alternate,e.flags|=65536,c&=-c,e.lanes|=c,l=ba(l,a),c=Td(e.stateNode,l,c),nd(e,c),Ct!==4&&(Ct=2)),!1;var d=Error(u(520),{cause:l});if(d=ba(d,a),Bi===null?Bi=[d]:Bi.push(d),Ct!==4&&(Ct=2),t===null)return!0;l=ba(l,a),a=t;do{switch(a.tag){case 3:return a.flags|=65536,e=c&-c,a.lanes|=e,e=Td(a.stateNode,l,e),nd(a,e),!1;case 1:if(t=a.type,d=a.stateNode,(a.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||d!==null&&typeof d.componentDidCatch=="function"&&(Ul===null||!Ul.has(d))))return a.flags|=65536,c&=-c,a.lanes|=c,c=Rm(c),Dm(c,e,a,l),nd(a,c),!1}a=a.return}while(a!==null);return!1}var Md=Error(u(461)),Vt=!1;function na(e,t,a,l){t.child=e===null?zh(t,null,a,l):ks(t,e.child,a,l)}function km(e,t,a,l,c){a=a.render;var d=t.ref;if("ref"in l){var p={};for(var T in l)T!=="ref"&&(p[T]=l[T])}else p=l;return Ms(t),l=od(e,t,a,p,d,c),T=ud(),e!==null&&!Vt?(dd(e,t,c),Qn(e,t,c)):(Y&&T&&v(t),t.flags|=1,na(e,t,l,c),t.child)}function Am(e,t,a,l,c){if(e===null){var d=a.type;return typeof d=="function"&&!vr(d)&&d.defaultProps===void 0&&a.compare===null?(t.tag=15,t.type=d,_m(e,t,d,l,c)):(e=yr(a.type,null,l,t,t.mode,c),e.ref=t.ref,e.return=t,t.child=e)}if(d=e.child,!Ld(e,c)){var p=d.memoizedProps;if(a=a.compare,a=a!==null?a:Ns,a(p,l)&&e.ref===t.ref)return Qn(e,t,c)}return t.flags|=1,e=Za(d,l),e.ref=t.ref,e.return=t,t.child=e}function _m(e,t,a,l,c){if(e!==null){var d=e.memoizedProps;if(Ns(d,l)&&e.ref===t.ref)if(Vt=!1,t.pendingProps=l=d,Ld(e,c))(e.flags&131072)!==0&&(Vt=!0);else return t.lanes=e.lanes,Qn(e,t,c)}return Od(e,t,a,l,c)}function zm(e,t,a,l){var c=l.children,d=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),l.mode==="hidden"){if((t.flags&128)!==0){if(d=d!==null?d.baseLanes|a:a,e!==null){for(l=t.child=e.child,c=0;l!==null;)c=c|l.lanes|l.childLanes,l=l.sibling;l=c&~d}else l=0,t.child=null;return Lm(e,t,d,a,l)}if((a&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&to(t,d!==null?d.cachePool:null),d!==null?Hh(t,d):sd(),qh(t);else return l=t.lanes=536870912,Lm(e,t,d!==null?d.baseLanes|a:a,a,l)}else d!==null?(to(t,d.cachePool),Hh(t,d),Al(),t.memoizedState=null):(e!==null&&to(t,null),sd(),Al());return na(e,t,c,a),t.child}function _i(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Lm(e,t,a,l,c){var d=Ku();return d=d===null?null:{parent:Ht._currentValue,pool:d},t.memoizedState={baseLanes:a,cachePool:d},e!==null&&to(t,null),sd(),qh(t),e!==null&&Xa(e,t,l,!0),t.childLanes=c,null}function vo(e,t){return t=bo({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Um(e,t,a){return ks(t,e.child,null,a),e=vo(t,t.pendingProps),e.flags|=2,Aa(t),t.memoizedState=null,e}function wv(e,t,a){var l=t.pendingProps,c=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Y){if(l.mode==="hidden")return e=vo(t,l),t.lanes=536870912,_i(null,e);if(id(t),(e=B)?(e=I0(e,be),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:ja!==null?{id:Ia,overflow:g}:null,retryLane:536870912,hydrationErrors:null},a=Kc(e),a.return=t,t.child=a,V=t,B=null)):e=null,e===null)throw Ge(t);return t.lanes=536870912,null}return vo(t,l)}var d=e.memoizedState;if(d!==null){var p=d.dehydrated;if(id(t),c)if(t.flags&256)t.flags&=-257,t=Um(e,t,a);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(u(558));else if(Vt||Xa(e,t,a,!1),c=(a&e.childLanes)!==0,Vt||c){if(l=ft,l!==null&&(p=Kr(l,a),p!==0&&p!==d.retryLane))throw d.retryLane=p,Ga(e,p),Ca(l,e,p),Md;Oo(),t=Um(e,t,a)}else e=d.treeContext,B=Ka(p.nextSibling),V=t,Y=!0,de=null,be=!1,e!==null&&k(t,e),t=vo(t,l),t.flags|=4096;return t}return e=Za(e.child,{mode:l.mode,children:l.children}),e.ref=t.ref,t.child=e,e.return=t,e}function yo(e,t){var a=t.ref;if(a===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof a!="function"&&typeof a!="object")throw Error(u(284));(e===null||e.ref!==a)&&(t.flags|=4194816)}}function Od(e,t,a,l,c){return Ms(t),a=od(e,t,a,l,void 0,c),l=ud(),e!==null&&!Vt?(dd(e,t,c),Qn(e,t,c)):(Y&&l&&v(t),t.flags|=1,na(e,t,a,c),t.child)}function Hm(e,t,a,l,c,d){return Ms(t),t.updateQueue=null,a=Bh(t,l,a,c),Vh(e),l=ud(),e!==null&&!Vt?(dd(e,t,d),Qn(e,t,d)):(Y&&l&&v(t),t.flags|=1,na(e,t,a,d),t.child)}function qm(e,t,a,l,c){if(Ms(t),t.stateNode===null){var d=Da,p=a.contextType;typeof p=="object"&&p!==null&&(d=aa(p)),d=new a(l,d),t.memoizedState=d.state!==null&&d.state!==void 0?d.state:null,d.updater=Cd,t.stateNode=d,d._reactInternals=t,d=t.stateNode,d.props=l,d.state=t.memoizedState,d.refs={},td(t),p=a.contextType,d.context=typeof p=="object"&&p!==null?aa(p):Da,d.state=t.memoizedState,p=a.getDerivedStateFromProps,typeof p=="function"&&(Ed(t,a,p,l),d.state=t.memoizedState),typeof a.getDerivedStateFromProps=="function"||typeof d.getSnapshotBeforeUpdate=="function"||typeof d.UNSAFE_componentWillMount!="function"&&typeof d.componentWillMount!="function"||(p=d.state,typeof d.componentWillMount=="function"&&d.componentWillMount(),typeof d.UNSAFE_componentWillMount=="function"&&d.UNSAFE_componentWillMount(),p!==d.state&&Cd.enqueueReplaceState(d,d.state,null),Oi(t,l,d,c),Mi(),d.state=t.memoizedState),typeof d.componentDidMount=="function"&&(t.flags|=4194308),l=!0}else if(e===null){d=t.stateNode;var T=t.memoizedProps,_=_s(a,T);d.props=_;var Q=d.context,re=a.contextType;p=Da,typeof re=="object"&&re!==null&&(p=aa(re));var ue=a.getDerivedStateFromProps;re=typeof ue=="function"||typeof d.getSnapshotBeforeUpdate=="function",T=t.pendingProps!==T,re||typeof d.UNSAFE_componentWillReceiveProps!="function"&&typeof d.componentWillReceiveProps!="function"||(T||Q!==p)&&Em(t,d,l,p),Ol=!1;var X=t.memoizedState;d.state=X,Oi(t,l,d,c),Mi(),Q=t.memoizedState,T||X!==Q||Ol?(typeof ue=="function"&&(Ed(t,a,ue,l),Q=t.memoizedState),(_=Ol||Sm(t,a,_,l,X,Q,p))?(re||typeof d.UNSAFE_componentWillMount!="function"&&typeof d.componentWillMount!="function"||(typeof d.componentWillMount=="function"&&d.componentWillMount(),typeof d.UNSAFE_componentWillMount=="function"&&d.UNSAFE_componentWillMount()),typeof d.componentDidMount=="function"&&(t.flags|=4194308)):(typeof d.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=l,t.memoizedState=Q),d.props=l,d.state=Q,d.context=p,l=_):(typeof d.componentDidMount=="function"&&(t.flags|=4194308),l=!1)}else{d=t.stateNode,ad(e,t),p=t.memoizedProps,re=_s(a,p),d.props=re,ue=t.pendingProps,X=d.context,Q=a.contextType,_=Da,typeof Q=="object"&&Q!==null&&(_=aa(Q)),T=a.getDerivedStateFromProps,(Q=typeof T=="function"||typeof d.getSnapshotBeforeUpdate=="function")||typeof d.UNSAFE_componentWillReceiveProps!="function"&&typeof d.componentWillReceiveProps!="function"||(p!==ue||X!==_)&&Em(t,d,l,_),Ol=!1,X=t.memoizedState,d.state=X,Oi(t,l,d,c),Mi();var ne=t.memoizedState;p!==ue||X!==ne||Ol||e!==null&&e.dependencies!==null&&jr(e.dependencies)?(typeof T=="function"&&(Ed(t,a,T,l),ne=t.memoizedState),(re=Ol||Sm(t,a,re,l,X,ne,_)||e!==null&&e.dependencies!==null&&jr(e.dependencies))?(Q||typeof d.UNSAFE_componentWillUpdate!="function"&&typeof d.componentWillUpdate!="function"||(typeof d.componentWillUpdate=="function"&&d.componentWillUpdate(l,ne,_),typeof d.UNSAFE_componentWillUpdate=="function"&&d.UNSAFE_componentWillUpdate(l,ne,_)),typeof d.componentDidUpdate=="function"&&(t.flags|=4),typeof d.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof d.componentDidUpdate!="function"||p===e.memoizedProps&&X===e.memoizedState||(t.flags|=4),typeof d.getSnapshotBeforeUpdate!="function"||p===e.memoizedProps&&X===e.memoizedState||(t.flags|=1024),t.memoizedProps=l,t.memoizedState=ne),d.props=l,d.state=ne,d.context=_,l=re):(typeof d.componentDidUpdate!="function"||p===e.memoizedProps&&X===e.memoizedState||(t.flags|=4),typeof d.getSnapshotBeforeUpdate!="function"||p===e.memoizedProps&&X===e.memoizedState||(t.flags|=1024),l=!1)}return d=l,yo(e,t),l=(t.flags&128)!==0,d||l?(d=t.stateNode,a=l&&typeof a.getDerivedStateFromError!="function"?null:d.render(),t.flags|=1,e!==null&&l?(t.child=ks(t,e.child,null,c),t.child=ks(t,null,a,c)):na(e,t,a,c),t.memoizedState=d.state,e=t.child):e=Qn(e,t,c),e}function Vm(e,t,a,l){return It(),t.flags|=256,na(e,t,a,l),t.child}var Rd={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Dd(e){return{baseLanes:e,cachePool:Oh()}}function kd(e,t,a){return e=e!==null?e.childLanes&~a:0,t&&(e|=za),e}function Bm(e,t,a){var l=t.pendingProps,c=!1,d=(t.flags&128)!==0,p;if((p=d)||(p=e!==null&&e.memoizedState===null?!1:(Dt.current&2)!==0),p&&(c=!0,t.flags&=-129),p=(t.flags&32)!==0,t.flags&=-33,e===null){if(Y){if(c?kl(t):Al(),(e=B)?(e=I0(e,be),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:ja!==null?{id:Ia,overflow:g}:null,retryLane:536870912,hydrationErrors:null},a=Kc(e),a.return=t,t.child=a,V=t,B=null)):e=null,e===null)throw Ge(t);return gf(e)?t.lanes=32:t.lanes=536870912,null}var T=l.children;return l=l.fallback,c?(Al(),c=t.mode,T=bo({mode:"hidden",children:T},c),l=Wa(l,c,a,null),T.return=t,l.return=t,T.sibling=l,t.child=T,l=t.child,l.memoizedState=Dd(a),l.childLanes=kd(e,p,a),t.memoizedState=Rd,_i(null,l)):(kl(t),Ad(t,T))}var _=e.memoizedState;if(_!==null&&(T=_.dehydrated,T!==null)){if(d)t.flags&256?(kl(t),t.flags&=-257,t=_d(e,t,a)):t.memoizedState!==null?(Al(),t.child=e.child,t.flags|=128,t=null):(Al(),T=l.fallback,c=t.mode,l=bo({mode:"visible",children:l.children},c),T=Wa(T,c,a,null),T.flags|=2,l.return=t,T.return=t,l.sibling=T,t.child=l,ks(t,e.child,null,a),l=t.child,l.memoizedState=Dd(a),l.childLanes=kd(e,p,a),t.memoizedState=Rd,t=_i(null,l));else if(kl(t),gf(T)){if(p=T.nextSibling&&T.nextSibling.dataset,p)var Q=p.dgst;p=Q,l=Error(u(419)),l.stack="",l.digest=p,dn({value:l,source:null,stack:null}),t=_d(e,t,a)}else if(Vt||Xa(e,t,a,!1),p=(a&e.childLanes)!==0,Vt||p){if(p=ft,p!==null&&(l=Kr(p,a),l!==0&&l!==_.retryLane))throw _.retryLane=l,Ga(e,l),Ca(p,e,l),Md;mf(T)||Oo(),t=_d(e,t,a)}else mf(T)?(t.flags|=192,t.child=e.child,t=null):(e=_.treeContext,B=Ka(T.nextSibling),V=t,Y=!0,de=null,be=!1,e!==null&&k(t,e),t=Ad(t,l.children),t.flags|=4096);return t}return c?(Al(),T=l.fallback,c=t.mode,_=e.child,Q=_.sibling,l=Za(_,{mode:"hidden",children:l.children}),l.subtreeFlags=_.subtreeFlags&65011712,Q!==null?T=Za(Q,T):(T=Wa(T,c,a,null),T.flags|=2),T.return=t,l.return=t,l.sibling=T,t.child=l,_i(null,l),l=t.child,T=e.child.memoizedState,T===null?T=Dd(a):(c=T.cachePool,c!==null?(_=Ht._currentValue,c=c.parent!==_?{parent:_,pool:_}:c):c=Oh(),T={baseLanes:T.baseLanes|a,cachePool:c}),l.memoizedState=T,l.childLanes=kd(e,p,a),t.memoizedState=Rd,_i(e.child,l)):(kl(t),a=e.child,e=a.sibling,a=Za(a,{mode:"visible",children:l.children}),a.return=t,a.sibling=null,e!==null&&(p=t.deletions,p===null?(t.deletions=[e],t.flags|=16):p.push(e)),t.child=a,t.memoizedState=null,a)}function Ad(e,t){return t=bo({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function bo(e,t){return e=ta(22,e,null,t),e.lanes=0,e}function _d(e,t,a){return ks(t,e.child,null,a),e=Ad(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function $m(e,t,a){e.lanes|=t;var l=e.alternate;l!==null&&(l.lanes|=t),Ni(e.return,t,a)}function zd(e,t,a,l,c,d){var p=e.memoizedState;p===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:l,tail:a,tailMode:c,treeForkCount:d}:(p.isBackwards=t,p.rendering=null,p.renderingStartTime=0,p.last=l,p.tail=a,p.tailMode=c,p.treeForkCount=d)}function Pm(e,t,a){var l=t.pendingProps,c=l.revealOrder,d=l.tail;l=l.children;var p=Dt.current,T=(p&2)!==0;if(T?(p=p&1|2,t.flags|=128):p&=1,me(Dt,p),na(e,t,l,a),l=Y?un:0,!T&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&$m(e,a,t);else if(e.tag===19)$m(e,a,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(c){case"forwards":for(a=t.child,c=null;a!==null;)e=a.alternate,e!==null&&io(e)===null&&(c=a),a=a.sibling;a=c,a===null?(c=t.child,t.child=null):(c=a.sibling,a.sibling=null),zd(t,!1,c,a,d,l);break;case"backwards":case"unstable_legacy-backwards":for(a=null,c=t.child,t.child=null;c!==null;){if(e=c.alternate,e!==null&&io(e)===null){t.child=c;break}e=c.sibling,c.sibling=a,a=c,c=e}zd(t,!0,a,null,d,l);break;case"together":zd(t,!1,null,null,void 0,l);break;default:t.memoizedState=null}return t.child}function Qn(e,t,a){if(e!==null&&(t.dependencies=e.dependencies),Ll|=t.lanes,(a&t.childLanes)===0)if(e!==null){if(Xa(e,t,a,!1),(a&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(u(153));if(t.child!==null){for(e=t.child,a=Za(e,e.pendingProps),t.child=a,a.return=t;e.sibling!==null;)e=e.sibling,a=a.sibling=Za(e,e.pendingProps),a.return=t;a.sibling=null}return t.child}function Ld(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&jr(e)))}function Sv(e,t,a){switch(t.tag){case 3:lt(t,t.stateNode.containerInfo),Tn(t,Ht,e.memoizedState.cache),It();break;case 27:case 5:St(t);break;case 4:lt(t,t.stateNode.containerInfo);break;case 10:Tn(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,id(t),null;break;case 13:var l=t.memoizedState;if(l!==null)return l.dehydrated!==null?(kl(t),t.flags|=128,null):(a&t.child.childLanes)!==0?Bm(e,t,a):(kl(t),e=Qn(e,t,a),e!==null?e.sibling:null);kl(t);break;case 19:var c=(e.flags&128)!==0;if(l=(a&t.childLanes)!==0,l||(Xa(e,t,a,!1),l=(a&t.childLanes)!==0),c){if(l)return Pm(e,t,a);t.flags|=128}if(c=t.memoizedState,c!==null&&(c.rendering=null,c.tail=null,c.lastEffect=null),me(Dt,Dt.current),l)break;return null;case 22:return t.lanes=0,zm(e,t,a,t.pendingProps);case 24:Tn(t,Ht,e.memoizedState.cache)}return Qn(e,t,a)}function Ym(e,t,a){if(e!==null)if(e.memoizedProps!==t.pendingProps)Vt=!0;else{if(!Ld(e,a)&&(t.flags&128)===0)return Vt=!1,Sv(e,t,a);Vt=(e.flags&131072)!==0}else Vt=!1,Y&&(t.flags&1048576)!==0&&m(t,un,t.index);switch(t.lanes=0,t.tag){case 16:e:{var l=t.pendingProps;if(e=Rs(t.elementType),t.type=e,typeof e=="function")vr(e)?(l=_s(e,l),t.tag=1,t=qm(null,t,e,l,a)):(t.tag=0,t=Od(null,t,e,l,a));else{if(e!=null){var c=e.$$typeof;if(c===w){t.tag=11,t=km(null,t,e,l,a);break e}else if(c===G){t.tag=14,t=Am(null,t,e,l,a);break e}}throw t=ge(e)||e,Error(u(306,t,""))}}return t;case 0:return Od(e,t,t.type,t.pendingProps,a);case 1:return l=t.type,c=_s(l,t.pendingProps),qm(e,t,l,c,a);case 3:e:{if(lt(t,t.stateNode.containerInfo),e===null)throw Error(u(387));l=t.pendingProps;var d=t.memoizedState;c=d.element,ad(e,t),Oi(t,l,null,a);var p=t.memoizedState;if(l=p.cache,Tn(t,Ht,l),l!==d.cache&&Zn(t,[Ht],a,!0),Mi(),l=p.element,d.isDehydrated)if(d={element:l,isDehydrated:!1,cache:p.cache},t.updateQueue.baseState=d,t.memoizedState=d,t.flags&256){t=Vm(e,t,l,a);break e}else if(l!==c){c=ba(Error(u(424)),t),dn(c),t=Vm(e,t,l,a);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(B=Ka(e.firstChild),V=t,Y=!0,de=null,be=!0,a=zh(t,null,l,a),t.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling}else{if(It(),l===c){t=Qn(e,t,a);break e}na(e,t,l,a)}t=t.child}return t;case 26:return yo(e,t),e===null?(a=tg(t.type,null,t.pendingProps,null))?t.memoizedState=a:Y||(a=t.type,e=t.pendingProps,l=Lo(xe.current).createElement(a),l[Mt]=t,l[Pt]=e,la(l,a,e),Ut(l),t.stateNode=l):t.memoizedState=tg(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return St(t),e===null&&Y&&(l=t.stateNode=J0(t.type,t.pendingProps,xe.current),V=t,be=!0,c=B,Bl(t.type)?(xf=c,B=Ka(l.firstChild)):B=c),na(e,t,t.pendingProps.children,a),yo(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Y&&((c=l=B)&&(l=ey(l,t.type,t.pendingProps,be),l!==null?(t.stateNode=l,V=t,B=Ka(l.firstChild),be=!1,c=!0):c=!1),c||Ge(t)),St(t),c=t.type,d=t.pendingProps,p=e!==null?e.memoizedProps:null,l=d.children,df(c,d)?l=null:p!==null&&df(c,p)&&(t.flags|=32),t.memoizedState!==null&&(c=od(e,t,gv,null,null,a),Ii._currentValue=c),yo(e,t),na(e,t,l,a),t.child;case 6:return e===null&&Y&&((e=a=B)&&(a=ty(a,t.pendingProps,be),a!==null?(t.stateNode=a,V=t,B=null,e=!0):e=!1),e||Ge(t)),null;case 13:return Bm(e,t,a);case 4:return lt(t,t.stateNode.containerInfo),l=t.pendingProps,e===null?t.child=ks(t,null,l,a):na(e,t,l,a),t.child;case 11:return km(e,t,t.type,t.pendingProps,a);case 7:return na(e,t,t.pendingProps,a),t.child;case 8:return na(e,t,t.pendingProps.children,a),t.child;case 12:return na(e,t,t.pendingProps.children,a),t.child;case 10:return l=t.pendingProps,Tn(t,t.type,l.value),na(e,t,l.children,a),t.child;case 9:return c=t.type._context,l=t.pendingProps.children,Ms(t),c=aa(c),l=l(c),t.flags|=1,na(e,t,l,a),t.child;case 14:return Am(e,t,t.type,t.pendingProps,a);case 15:return _m(e,t,t.type,t.pendingProps,a);case 19:return Pm(e,t,a);case 31:return wv(e,t,a);case 22:return zm(e,t,a,t.pendingProps);case 24:return Ms(t),l=aa(Ht),e===null?(c=Ku(),c===null&&(c=ft,d=Xu(),c.pooledCache=d,d.refCount++,d!==null&&(c.pooledCacheLanes|=a),c=d),t.memoizedState={parent:l,cache:c},td(t),Tn(t,Ht,c)):((e.lanes&a)!==0&&(ad(e,t),Oi(t,null,null,a),Mi()),c=e.memoizedState,d=t.memoizedState,c.parent!==l?(c={parent:l,cache:l},t.memoizedState=c,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=c),Tn(t,Ht,l)):(l=d.cache,Tn(t,Ht,l),l!==c.cache&&Zn(t,[Ht],a,!0))),na(e,t,t.pendingProps.children,a),t.child;case 29:throw t.pendingProps}throw Error(u(156,t.tag))}function Xn(e){e.flags|=4}function Ud(e,t,a,l,c){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(c&335544128)===c)if(e.stateNode.complete)e.flags|=8192;else if(p0())e.flags|=8192;else throw Ds=no,ed}else e.flags&=-16777217}function Fm(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!rg(t))if(p0())e.flags|=8192;else throw Ds=no,ed}function jo(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Jr():536870912,e.lanes|=t,Ar|=t)}function zi(e,t){if(!Y)switch(e.tailMode){case"hidden":t=e.tail;for(var a=null;t!==null;)t.alternate!==null&&(a=t),t=t.sibling;a===null?e.tail=null:a.sibling=null;break;case"collapsed":a=e.tail;for(var l=null;a!==null;)a.alternate!==null&&(l=a),a=a.sibling;l===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:l.sibling=null}}function vt(e){var t=e.alternate!==null&&e.alternate.child===e.child,a=0,l=0;if(t)for(var c=e.child;c!==null;)a|=c.lanes|c.childLanes,l|=c.subtreeFlags&65011712,l|=c.flags&65011712,c.return=e,c=c.sibling;else for(c=e.child;c!==null;)a|=c.lanes|c.childLanes,l|=c.subtreeFlags,l|=c.flags,c.return=e,c=c.sibling;return e.subtreeFlags|=l,e.childLanes=a,t}function Ev(e,t,a){var l=t.pendingProps;switch(C(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return vt(t),null;case 1:return vt(t),null;case 3:return a=t.stateNode,l=null,e!==null&&(l=e.memoizedState.cache),t.memoizedState.cache!==l&&(t.flags|=2048),fn(Ht),Ye(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(e===null||e.child===null)&&(Wt(t)?Xn(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Cn())),vt(t),null;case 26:var c=t.type,d=t.memoizedState;return e===null?(Xn(t),d!==null?(vt(t),Fm(t,d)):(vt(t),Ud(t,c,null,l,a))):d?d!==e.memoizedState?(Xn(t),vt(t),Fm(t,d)):(vt(t),t.flags&=-16777217):(e=e.memoizedProps,e!==l&&Xn(t),vt(t),Ud(t,c,e,l,a)),null;case 27:if(oa(t),a=xe.current,c=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==l&&Xn(t);else{if(!l){if(t.stateNode===null)throw Error(u(166));return vt(t),null}e=ve.current,Wt(t)?Ae(t):(e=J0(c,l,a),t.stateNode=e,Xn(t))}return vt(t),null;case 5:if(oa(t),c=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==l&&Xn(t);else{if(!l){if(t.stateNode===null)throw Error(u(166));return vt(t),null}if(d=ve.current,Wt(t))Ae(t);else{var p=Lo(xe.current);switch(d){case 1:d=p.createElementNS("http://www.w3.org/2000/svg",c);break;case 2:d=p.createElementNS("http://www.w3.org/1998/Math/MathML",c);break;default:switch(c){case"svg":d=p.createElementNS("http://www.w3.org/2000/svg",c);break;case"math":d=p.createElementNS("http://www.w3.org/1998/Math/MathML",c);break;case"script":d=p.createElement("div"),d.innerHTML="<script><\/script>",d=d.removeChild(d.firstChild);break;case"select":d=typeof l.is=="string"?p.createElement("select",{is:l.is}):p.createElement("select"),l.multiple?d.multiple=!0:l.size&&(d.size=l.size);break;default:d=typeof l.is=="string"?p.createElement(c,{is:l.is}):p.createElement(c)}}d[Mt]=t,d[Pt]=l;e:for(p=t.child;p!==null;){if(p.tag===5||p.tag===6)d.appendChild(p.stateNode);else if(p.tag!==4&&p.tag!==27&&p.child!==null){p.child.return=p,p=p.child;continue}if(p===t)break e;for(;p.sibling===null;){if(p.return===null||p.return===t)break e;p=p.return}p.sibling.return=p.return,p=p.sibling}t.stateNode=d;e:switch(la(d,c,l),c){case"button":case"input":case"select":case"textarea":l=!!l.autoFocus;break e;case"img":l=!0;break e;default:l=!1}l&&Xn(t)}}return vt(t),Ud(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,a),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==l&&Xn(t);else{if(typeof l!="string"&&t.stateNode===null)throw Error(u(166));if(e=xe.current,Wt(t)){if(e=t.stateNode,a=t.memoizedProps,l=null,c=V,c!==null)switch(c.tag){case 27:case 5:l=c.memoizedProps}e[Mt]=t,e=!!(e.nodeValue===a||l!==null&&l.suppressHydrationWarning===!0||B0(e.nodeValue,a)),e||Ge(t,!0)}else e=Lo(e).createTextNode(l),e[Mt]=t,t.stateNode=e}return vt(t),null;case 31:if(a=t.memoizedState,e===null||e.memoizedState!==null){if(l=Wt(t),a!==null){if(e===null){if(!l)throw Error(u(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(u(557));e[Mt]=t}else It(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;vt(t),e=!1}else a=Cn(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),e=!0;if(!e)return t.flags&256?(Aa(t),t):(Aa(t),null);if((t.flags&128)!==0)throw Error(u(558))}return vt(t),null;case 13:if(l=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(c=Wt(t),l!==null&&l.dehydrated!==null){if(e===null){if(!c)throw Error(u(318));if(c=t.memoizedState,c=c!==null?c.dehydrated:null,!c)throw Error(u(317));c[Mt]=t}else It(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;vt(t),c=!1}else c=Cn(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=c),c=!0;if(!c)return t.flags&256?(Aa(t),t):(Aa(t),null)}return Aa(t),(t.flags&128)!==0?(t.lanes=a,t):(a=l!==null,e=e!==null&&e.memoizedState!==null,a&&(l=t.child,c=null,l.alternate!==null&&l.alternate.memoizedState!==null&&l.alternate.memoizedState.cachePool!==null&&(c=l.alternate.memoizedState.cachePool.pool),d=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(d=l.memoizedState.cachePool.pool),d!==c&&(l.flags|=2048)),a!==e&&a&&(t.child.flags|=8192),jo(t,t.updateQueue),vt(t),null);case 4:return Ye(),e===null&&sf(t.stateNode.containerInfo),vt(t),null;case 10:return fn(t.type),vt(t),null;case 19:if(se(Dt),l=t.memoizedState,l===null)return vt(t),null;if(c=(t.flags&128)!==0,d=l.rendering,d===null)if(c)zi(l,!1);else{if(Ct!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(d=io(e),d!==null){for(t.flags|=128,zi(l,!1),e=d.updateQueue,t.updateQueue=e,jo(t,e),t.subtreeFlags=0,e=a,a=t.child;a!==null;)Jc(a,e),a=a.sibling;return me(Dt,Dt.current&1|2),Y&&i(t,l.treeForkCount),t.child}e=e.sibling}l.tail!==null&&yt()>Co&&(t.flags|=128,c=!0,zi(l,!1),t.lanes=4194304)}else{if(!c)if(e=io(d),e!==null){if(t.flags|=128,c=!0,e=e.updateQueue,t.updateQueue=e,jo(t,e),zi(l,!0),l.tail===null&&l.tailMode==="hidden"&&!d.alternate&&!Y)return vt(t),null}else 2*yt()-l.renderingStartTime>Co&&a!==536870912&&(t.flags|=128,c=!0,zi(l,!1),t.lanes=4194304);l.isBackwards?(d.sibling=t.child,t.child=d):(e=l.last,e!==null?e.sibling=d:t.child=d,l.last=d)}return l.tail!==null?(e=l.tail,l.rendering=e,l.tail=e.sibling,l.renderingStartTime=yt(),e.sibling=null,a=Dt.current,me(Dt,c?a&1|2:a&1),Y&&i(t,l.treeForkCount),e):(vt(t),null);case 22:case 23:return Aa(t),rd(),l=t.memoizedState!==null,e!==null?e.memoizedState!==null!==l&&(t.flags|=8192):l&&(t.flags|=8192),l?(a&536870912)!==0&&(t.flags&128)===0&&(vt(t),t.subtreeFlags&6&&(t.flags|=8192)):vt(t),a=t.updateQueue,a!==null&&jo(t,a.retryQueue),a=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),l=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(l=t.memoizedState.cachePool.pool),l!==a&&(t.flags|=2048),e!==null&&se(Os),null;case 24:return a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),fn(Ht),vt(t),null;case 25:return null;case 30:return null}throw Error(u(156,t.tag))}function Cv(e,t){switch(C(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return fn(Ht),Ye(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return oa(t),null;case 31:if(t.memoizedState!==null){if(Aa(t),t.alternate===null)throw Error(u(340));It()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Aa(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(u(340));It()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return se(Dt),null;case 4:return Ye(),null;case 10:return fn(t.type),null;case 22:case 23:return Aa(t),rd(),e!==null&&se(Os),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return fn(Ht),null;case 25:return null;default:return null}}function Gm(e,t){switch(C(t),t.tag){case 3:fn(Ht),Ye();break;case 26:case 27:case 5:oa(t);break;case 4:Ye();break;case 31:t.memoizedState!==null&&Aa(t);break;case 13:Aa(t);break;case 19:se(Dt);break;case 10:fn(t.type);break;case 22:case 23:Aa(t),rd(),e!==null&&se(Os);break;case 24:fn(Ht)}}function Li(e,t){try{var a=t.updateQueue,l=a!==null?a.lastEffect:null;if(l!==null){var c=l.next;a=c;do{if((a.tag&e)===e){l=void 0;var d=a.create,p=a.inst;l=d(),p.destroy=l}a=a.next}while(a!==c)}}catch(T){it(t,t.return,T)}}function _l(e,t,a){try{var l=t.updateQueue,c=l!==null?l.lastEffect:null;if(c!==null){var d=c.next;l=d;do{if((l.tag&e)===e){var p=l.inst,T=p.destroy;if(T!==void 0){p.destroy=void 0,c=t;var _=a,Q=T;try{Q()}catch(re){it(c,_,re)}}}l=l.next}while(l!==d)}}catch(re){it(t,t.return,re)}}function Zm(e){var t=e.updateQueue;if(t!==null){var a=e.stateNode;try{Uh(t,a)}catch(l){it(e,e.return,l)}}}function Wm(e,t,a){a.props=_s(e.type,e.memoizedProps),a.state=e.memoizedState;try{a.componentWillUnmount()}catch(l){it(e,t,l)}}function Ui(e,t){try{var a=e.ref;if(a!==null){switch(e.tag){case 26:case 27:case 5:var l=e.stateNode;break;case 30:l=e.stateNode;break;default:l=e.stateNode}typeof a=="function"?e.refCleanup=a(l):a.current=l}}catch(c){it(e,t,c)}}function Mn(e,t){var a=e.ref,l=e.refCleanup;if(a!==null)if(typeof l=="function")try{l()}catch(c){it(e,t,c)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof a=="function")try{a(null)}catch(c){it(e,t,c)}else a.current=null}function Im(e){var t=e.type,a=e.memoizedProps,l=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":a.autoFocus&&l.focus();break e;case"img":a.src?l.src=a.src:a.srcSet&&(l.srcset=a.srcSet)}}catch(c){it(e,e.return,c)}}function Hd(e,t,a){try{var l=e.stateNode;Wv(l,e.type,a,t),l[Pt]=t}catch(c){it(e,e.return,c)}}function Qm(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Bl(e.type)||e.tag===4}function qd(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Qm(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&&Bl(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 Vd(e,t,a){var l=e.tag;if(l===5||l===6)e=e.stateNode,t?(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a).insertBefore(e,t):(t=a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,t.appendChild(e),a=a._reactRootContainer,a!=null||t.onclick!==null||(t.onclick=Pa));else if(l!==4&&(l===27&&Bl(e.type)&&(a=e.stateNode,t=null),e=e.child,e!==null))for(Vd(e,t,a),e=e.sibling;e!==null;)Vd(e,t,a),e=e.sibling}function No(e,t,a){var l=e.tag;if(l===5||l===6)e=e.stateNode,t?a.insertBefore(e,t):a.appendChild(e);else if(l!==4&&(l===27&&Bl(e.type)&&(a=e.stateNode),e=e.child,e!==null))for(No(e,t,a),e=e.sibling;e!==null;)No(e,t,a),e=e.sibling}function Xm(e){var t=e.stateNode,a=e.memoizedProps;try{for(var l=e.type,c=t.attributes;c.length;)t.removeAttributeNode(c[0]);la(t,l,a),t[Mt]=e,t[Pt]=a}catch(d){it(e,e.return,d)}}var Jn=!1,Bt=!1,Bd=!1,Jm=typeof WeakSet=="function"?WeakSet:Set,Qt=null;function Tv(e,t){if(e=e.containerInfo,of=Po,e=Wu(e),fr(e)){if("selectionStart"in e)var a={start:e.selectionStart,end:e.selectionEnd};else e:{a=(a=e.ownerDocument)&&a.defaultView||window;var l=a.getSelection&&a.getSelection();if(l&&l.rangeCount!==0){a=l.anchorNode;var c=l.anchorOffset,d=l.focusNode;l=l.focusOffset;try{a.nodeType,d.nodeType}catch{a=null;break e}var p=0,T=-1,_=-1,Q=0,re=0,ue=e,X=null;t:for(;;){for(var ne;ue!==a||c!==0&&ue.nodeType!==3||(T=p+c),ue!==d||l!==0&&ue.nodeType!==3||(_=p+l),ue.nodeType===3&&(p+=ue.nodeValue.length),(ne=ue.firstChild)!==null;)X=ue,ue=ne;for(;;){if(ue===e)break t;if(X===a&&++Q===c&&(T=p),X===d&&++re===l&&(_=p),(ne=ue.nextSibling)!==null)break;ue=X,X=ue.parentNode}ue=ne}a=T===-1||_===-1?null:{start:T,end:_}}else a=null}a=a||{start:0,end:0}}else a=null;for(uf={focusedElem:e,selectionRange:a},Po=!1,Qt=t;Qt!==null;)if(t=Qt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Qt=e;else for(;Qt!==null;){switch(t=Qt,d=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(a=0;a<e.length;a++)c=e[a],c.ref.impl=c.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&d!==null){e=void 0,a=t,c=d.memoizedProps,d=d.memoizedState,l=a.stateNode;try{var je=_s(a.type,c);e=l.getSnapshotBeforeUpdate(je,d),l.__reactInternalSnapshotBeforeUpdate=e}catch(_e){it(a,a.return,_e)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,a=e.nodeType,a===9)hf(e);else if(a===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":hf(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(u(163))}if(e=t.sibling,e!==null){e.return=t.return,Qt=e;break}Qt=t.return}}function Km(e,t,a){var l=a.flags;switch(a.tag){case 0:case 11:case 15:el(e,a),l&4&&Li(5,a);break;case 1:if(el(e,a),l&4)if(e=a.stateNode,t===null)try{e.componentDidMount()}catch(p){it(a,a.return,p)}else{var c=_s(a.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(c,t,e.__reactInternalSnapshotBeforeUpdate)}catch(p){it(a,a.return,p)}}l&64&&Zm(a),l&512&&Ui(a,a.return);break;case 3:if(el(e,a),l&64&&(e=a.updateQueue,e!==null)){if(t=null,a.child!==null)switch(a.child.tag){case 27:case 5:t=a.child.stateNode;break;case 1:t=a.child.stateNode}try{Uh(e,t)}catch(p){it(a,a.return,p)}}break;case 27:t===null&&l&4&&Xm(a);case 26:case 5:el(e,a),t===null&&l&4&&Im(a),l&512&&Ui(a,a.return);break;case 12:el(e,a);break;case 31:el(e,a),l&4&&a0(e,a);break;case 13:el(e,a),l&4&&n0(e,a),l&64&&(e=a.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(a=Lv.bind(null,a),ay(e,a))));break;case 22:if(l=a.memoizedState!==null||Jn,!l){t=t!==null&&t.memoizedState!==null||Bt,c=Jn;var d=Bt;Jn=l,(Bt=t)&&!d?tl(e,a,(a.subtreeFlags&8772)!==0):el(e,a),Jn=c,Bt=d}break;case 30:break;default:el(e,a)}}function e0(e){var t=e.alternate;t!==null&&(e.alternate=null,e0(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&tr(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 bt=null,Na=!1;function Kn(e,t,a){for(a=a.child;a!==null;)t0(e,t,a),a=a.sibling}function t0(e,t,a){if($t&&typeof $t.onCommitFiberUnmount=="function")try{$t.onCommitFiberUnmount(mt,a)}catch{}switch(a.tag){case 26:Bt||Mn(a,t),Kn(e,t,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:Bt||Mn(a,t);var l=bt,c=Na;Bl(a.type)&&(bt=a.stateNode,Na=!1),Kn(e,t,a),Gi(a.stateNode),bt=l,Na=c;break;case 5:Bt||Mn(a,t);case 6:if(l=bt,c=Na,bt=null,Kn(e,t,a),bt=l,Na=c,bt!==null)if(Na)try{(bt.nodeType===9?bt.body:bt.nodeName==="HTML"?bt.ownerDocument.body:bt).removeChild(a.stateNode)}catch(d){it(a,t,d)}else try{bt.removeChild(a.stateNode)}catch(d){it(a,t,d)}break;case 18:bt!==null&&(Na?(e=bt,Z0(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,a.stateNode),Br(e)):Z0(bt,a.stateNode));break;case 4:l=bt,c=Na,bt=a.stateNode.containerInfo,Na=!0,Kn(e,t,a),bt=l,Na=c;break;case 0:case 11:case 14:case 15:_l(2,a,t),Bt||_l(4,a,t),Kn(e,t,a);break;case 1:Bt||(Mn(a,t),l=a.stateNode,typeof l.componentWillUnmount=="function"&&Wm(a,t,l)),Kn(e,t,a);break;case 21:Kn(e,t,a);break;case 22:Bt=(l=Bt)||a.memoizedState!==null,Kn(e,t,a),Bt=l;break;default:Kn(e,t,a)}}function a0(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Br(e)}catch(a){it(t,t.return,a)}}}function n0(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Br(e)}catch(a){it(t,t.return,a)}}function Mv(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Jm),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Jm),t;default:throw Error(u(435,e.tag))}}function wo(e,t){var a=Mv(e);t.forEach(function(l){if(!a.has(l)){a.add(l);var c=Uv.bind(null,e,l);l.then(c,c)}})}function wa(e,t){var a=t.deletions;if(a!==null)for(var l=0;l<a.length;l++){var c=a[l],d=e,p=t,T=p;e:for(;T!==null;){switch(T.tag){case 27:if(Bl(T.type)){bt=T.stateNode,Na=!1;break e}break;case 5:bt=T.stateNode,Na=!1;break e;case 3:case 4:bt=T.stateNode.containerInfo,Na=!0;break e}T=T.return}if(bt===null)throw Error(u(160));t0(d,p,c),bt=null,Na=!1,d=c.alternate,d!==null&&(d.return=null),c.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)l0(t,e),t=t.sibling}var hn=null;function l0(e,t){var a=e.alternate,l=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:wa(t,e),Sa(e),l&4&&(_l(3,e,e.return),Li(3,e),_l(5,e,e.return));break;case 1:wa(t,e),Sa(e),l&512&&(Bt||a===null||Mn(a,a.return)),l&64&&Jn&&(e=e.updateQueue,e!==null&&(l=e.callbacks,l!==null&&(a=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=a===null?l:a.concat(l))));break;case 26:var c=hn;if(wa(t,e),Sa(e),l&512&&(Bt||a===null||Mn(a,a.return)),l&4){var d=a!==null?a.memoizedState:null;if(l=e.memoizedState,a===null)if(l===null)if(e.stateNode===null){e:{l=e.type,a=e.memoizedProps,c=c.ownerDocument||c;t:switch(l){case"title":d=c.getElementsByTagName("title")[0],(!d||d[ns]||d[Mt]||d.namespaceURI==="http://www.w3.org/2000/svg"||d.hasAttribute("itemprop"))&&(d=c.createElement(l),c.head.insertBefore(d,c.querySelector("head > title"))),la(d,l,a),d[Mt]=e,Ut(d),l=d;break e;case"link":var p=lg("link","href",c).get(l+(a.href||""));if(p){for(var T=0;T<p.length;T++)if(d=p[T],d.getAttribute("href")===(a.href==null||a.href===""?null:a.href)&&d.getAttribute("rel")===(a.rel==null?null:a.rel)&&d.getAttribute("title")===(a.title==null?null:a.title)&&d.getAttribute("crossorigin")===(a.crossOrigin==null?null:a.crossOrigin)){p.splice(T,1);break t}}d=c.createElement(l),la(d,l,a),c.head.appendChild(d);break;case"meta":if(p=lg("meta","content",c).get(l+(a.content||""))){for(T=0;T<p.length;T++)if(d=p[T],d.getAttribute("content")===(a.content==null?null:""+a.content)&&d.getAttribute("name")===(a.name==null?null:a.name)&&d.getAttribute("property")===(a.property==null?null:a.property)&&d.getAttribute("http-equiv")===(a.httpEquiv==null?null:a.httpEquiv)&&d.getAttribute("charset")===(a.charSet==null?null:a.charSet)){p.splice(T,1);break t}}d=c.createElement(l),la(d,l,a),c.head.appendChild(d);break;default:throw Error(u(468,l))}d[Mt]=e,Ut(d),l=d}e.stateNode=l}else sg(c,e.type,e.stateNode);else e.stateNode=ng(c,l,e.memoizedProps);else d!==l?(d===null?a.stateNode!==null&&(a=a.stateNode,a.parentNode.removeChild(a)):d.count--,l===null?sg(c,e.type,e.stateNode):ng(c,l,e.memoizedProps)):l===null&&e.stateNode!==null&&Hd(e,e.memoizedProps,a.memoizedProps)}break;case 27:wa(t,e),Sa(e),l&512&&(Bt||a===null||Mn(a,a.return)),a!==null&&l&4&&Hd(e,e.memoizedProps,a.memoizedProps);break;case 5:if(wa(t,e),Sa(e),l&512&&(Bt||a===null||Mn(a,a.return)),e.flags&32){c=e.stateNode;try{sn(c,"")}catch(je){it(e,e.return,je)}}l&4&&e.stateNode!=null&&(c=e.memoizedProps,Hd(e,c,a!==null?a.memoizedProps:c)),l&1024&&(Bd=!0);break;case 6:if(wa(t,e),Sa(e),l&4){if(e.stateNode===null)throw Error(u(162));l=e.memoizedProps,a=e.stateNode;try{a.nodeValue=l}catch(je){it(e,e.return,je)}}break;case 3:if(qo=null,c=hn,hn=Uo(t.containerInfo),wa(t,e),hn=c,Sa(e),l&4&&a!==null&&a.memoizedState.isDehydrated)try{Br(t.containerInfo)}catch(je){it(e,e.return,je)}Bd&&(Bd=!1,s0(e));break;case 4:l=hn,hn=Uo(e.stateNode.containerInfo),wa(t,e),Sa(e),hn=l;break;case 12:wa(t,e),Sa(e);break;case 31:wa(t,e),Sa(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,wo(e,l)));break;case 13:wa(t,e),Sa(e),e.child.flags&8192&&e.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&(Eo=yt()),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,wo(e,l)));break;case 22:c=e.memoizedState!==null;var _=a!==null&&a.memoizedState!==null,Q=Jn,re=Bt;if(Jn=Q||c,Bt=re||_,wa(t,e),Bt=re,Jn=Q,Sa(e),l&8192)e:for(t=e.stateNode,t._visibility=c?t._visibility&-2:t._visibility|1,c&&(a===null||_||Jn||Bt||zs(e)),a=null,t=e;;){if(t.tag===5||t.tag===26){if(a===null){_=a=t;try{if(d=_.stateNode,c)p=d.style,typeof p.setProperty=="function"?p.setProperty("display","none","important"):p.display="none";else{T=_.stateNode;var ue=_.memoizedProps.style,X=ue!=null&&ue.hasOwnProperty("display")?ue.display:null;T.style.display=X==null||typeof X=="boolean"?"":(""+X).trim()}}catch(je){it(_,_.return,je)}}}else if(t.tag===6){if(a===null){_=t;try{_.stateNode.nodeValue=c?"":_.memoizedProps}catch(je){it(_,_.return,je)}}}else if(t.tag===18){if(a===null){_=t;try{var ne=_.stateNode;c?W0(ne,!0):W0(_.stateNode,!1)}catch(je){it(_,_.return,je)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;a===t&&(a=null),t=t.return}a===t&&(a=null),t.sibling.return=t.return,t=t.sibling}l&4&&(l=e.updateQueue,l!==null&&(a=l.retryQueue,a!==null&&(l.retryQueue=null,wo(e,a))));break;case 19:wa(t,e),Sa(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,wo(e,l)));break;case 30:break;case 21:break;default:wa(t,e),Sa(e)}}function Sa(e){var t=e.flags;if(t&2){try{for(var a,l=e.return;l!==null;){if(Qm(l)){a=l;break}l=l.return}if(a==null)throw Error(u(160));switch(a.tag){case 27:var c=a.stateNode,d=qd(e);No(e,d,c);break;case 5:var p=a.stateNode;a.flags&32&&(sn(p,""),a.flags&=-33);var T=qd(e);No(e,T,p);break;case 3:case 4:var _=a.stateNode.containerInfo,Q=qd(e);Vd(e,Q,_);break;default:throw Error(u(161))}}catch(re){it(e,e.return,re)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function s0(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;s0(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function el(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)Km(e,t.alternate,t),t=t.sibling}function zs(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:_l(4,t,t.return),zs(t);break;case 1:Mn(t,t.return);var a=t.stateNode;typeof a.componentWillUnmount=="function"&&Wm(t,t.return,a),zs(t);break;case 27:Gi(t.stateNode);case 26:case 5:Mn(t,t.return),zs(t);break;case 22:t.memoizedState===null&&zs(t);break;case 30:zs(t);break;default:zs(t)}e=e.sibling}}function tl(e,t,a){for(a=a&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var l=t.alternate,c=e,d=t,p=d.flags;switch(d.tag){case 0:case 11:case 15:tl(c,d,a),Li(4,d);break;case 1:if(tl(c,d,a),l=d,c=l.stateNode,typeof c.componentDidMount=="function")try{c.componentDidMount()}catch(Q){it(l,l.return,Q)}if(l=d,c=l.updateQueue,c!==null){var T=l.stateNode;try{var _=c.shared.hiddenCallbacks;if(_!==null)for(c.shared.hiddenCallbacks=null,c=0;c<_.length;c++)Lh(_[c],T)}catch(Q){it(l,l.return,Q)}}a&&p&64&&Zm(d),Ui(d,d.return);break;case 27:Xm(d);case 26:case 5:tl(c,d,a),a&&l===null&&p&4&&Im(d),Ui(d,d.return);break;case 12:tl(c,d,a);break;case 31:tl(c,d,a),a&&p&4&&a0(c,d);break;case 13:tl(c,d,a),a&&p&4&&n0(c,d);break;case 22:d.memoizedState===null&&tl(c,d,a),Ui(d,d.return);break;case 30:break;default:tl(c,d,a)}t=t.sibling}}function $d(e,t){var a=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==a&&(e!=null&&e.refCount++,a!=null&&wi(a))}function Pd(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&wi(e))}function mn(e,t,a,l){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)r0(e,t,a,l),t=t.sibling}function r0(e,t,a,l){var c=t.flags;switch(t.tag){case 0:case 11:case 15:mn(e,t,a,l),c&2048&&Li(9,t);break;case 1:mn(e,t,a,l);break;case 3:mn(e,t,a,l),c&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&wi(e)));break;case 12:if(c&2048){mn(e,t,a,l),e=t.stateNode;try{var d=t.memoizedProps,p=d.id,T=d.onPostCommit;typeof T=="function"&&T(p,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(_){it(t,t.return,_)}}else mn(e,t,a,l);break;case 31:mn(e,t,a,l);break;case 13:mn(e,t,a,l);break;case 23:break;case 22:d=t.stateNode,p=t.alternate,t.memoizedState!==null?d._visibility&2?mn(e,t,a,l):Hi(e,t):d._visibility&2?mn(e,t,a,l):(d._visibility|=2,Rr(e,t,a,l,(t.subtreeFlags&10256)!==0||!1)),c&2048&&$d(p,t);break;case 24:mn(e,t,a,l),c&2048&&Pd(t.alternate,t);break;default:mn(e,t,a,l)}}function Rr(e,t,a,l,c){for(c=c&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var d=e,p=t,T=a,_=l,Q=p.flags;switch(p.tag){case 0:case 11:case 15:Rr(d,p,T,_,c),Li(8,p);break;case 23:break;case 22:var re=p.stateNode;p.memoizedState!==null?re._visibility&2?Rr(d,p,T,_,c):Hi(d,p):(re._visibility|=2,Rr(d,p,T,_,c)),c&&Q&2048&&$d(p.alternate,p);break;case 24:Rr(d,p,T,_,c),c&&Q&2048&&Pd(p.alternate,p);break;default:Rr(d,p,T,_,c)}t=t.sibling}}function Hi(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var a=e,l=t,c=l.flags;switch(l.tag){case 22:Hi(a,l),c&2048&&$d(l.alternate,l);break;case 24:Hi(a,l),c&2048&&Pd(l.alternate,l);break;default:Hi(a,l)}t=t.sibling}}var qi=8192;function Dr(e,t,a){if(e.subtreeFlags&qi)for(e=e.child;e!==null;)i0(e,t,a),e=e.sibling}function i0(e,t,a){switch(e.tag){case 26:Dr(e,t,a),e.flags&qi&&e.memoizedState!==null&&my(a,hn,e.memoizedState,e.memoizedProps);break;case 5:Dr(e,t,a);break;case 3:case 4:var l=hn;hn=Uo(e.stateNode.containerInfo),Dr(e,t,a),hn=l;break;case 22:e.memoizedState===null&&(l=e.alternate,l!==null&&l.memoizedState!==null?(l=qi,qi=16777216,Dr(e,t,a),qi=l):Dr(e,t,a));break;default:Dr(e,t,a)}}function c0(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 Vi(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var a=0;a<t.length;a++){var l=t[a];Qt=l,u0(l,e)}c0(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)o0(e),e=e.sibling}function o0(e){switch(e.tag){case 0:case 11:case 15:Vi(e),e.flags&2048&&_l(9,e,e.return);break;case 3:Vi(e);break;case 12:Vi(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,So(e)):Vi(e);break;default:Vi(e)}}function So(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var a=0;a<t.length;a++){var l=t[a];Qt=l,u0(l,e)}c0(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:_l(8,t,t.return),So(t);break;case 22:a=t.stateNode,a._visibility&2&&(a._visibility&=-3,So(t));break;default:So(t)}e=e.sibling}}function u0(e,t){for(;Qt!==null;){var a=Qt;switch(a.tag){case 0:case 11:case 15:_l(8,a,t);break;case 23:case 22:if(a.memoizedState!==null&&a.memoizedState.cachePool!==null){var l=a.memoizedState.cachePool.pool;l!=null&&l.refCount++}break;case 24:wi(a.memoizedState.cache)}if(l=a.child,l!==null)l.return=a,Qt=l;else e:for(a=e;Qt!==null;){l=Qt;var c=l.sibling,d=l.return;if(e0(l),l===a){Qt=null;break e}if(c!==null){c.return=d,Qt=c;break e}Qt=d}}}var Ov={getCacheForType:function(e){var t=aa(Ht),a=t.data.get(e);return a===void 0&&(a=e(),t.data.set(e,a)),a},cacheSignal:function(){return aa(Ht).controller.signal}},Rv=typeof WeakMap=="function"?WeakMap:Map,tt=0,ft=null,$e=null,Ze=0,rt=0,_a=null,zl=!1,kr=!1,Yd=!1,al=0,Ct=0,Ll=0,Ls=0,Fd=0,za=0,Ar=0,Bi=null,Ea=null,Gd=!1,Eo=0,d0=0,Co=1/0,To=null,Ul=null,Ft=0,Hl=null,_r=null,nl=0,Zd=0,Wd=null,f0=null,$i=0,Id=null;function La(){return(tt&2)!==0&&Ze!==0?Ze&-Ze:P.T!==null?tf():er()}function h0(){if(za===0)if((Ze&536870912)===0||Y){var e=ye;ye<<=1,(ye&3932160)===0&&(ye=262144),za=e}else za=536870912;return e=ka.current,e!==null&&(e.flags|=32),za}function Ca(e,t,a){(e===ft&&(rt===2||rt===9)||e.cancelPendingCommit!==null)&&(zr(e,0),ql(e,Ze,za,!1)),hl(e,a),((tt&2)===0||e!==ft)&&(e===ft&&((tt&2)===0&&(Ls|=a),Ct===4&&ql(e,Ze,za,!1)),On(e))}function m0(e,t,a){if((tt&6)!==0)throw Error(u(327));var l=!a&&(t&127)===0&&(t&e.expiredLanes)===0||ga(e,t),c=l?Av(e,t):Xd(e,t,!0),d=l;do{if(c===0){kr&&!l&&ql(e,t,0,!1);break}else{if(a=e.current.alternate,d&&!Dv(a)){c=Xd(e,t,!1),d=!1;continue}if(c===2){if(d=t,e.errorRecoveryDisabledLanes&d)var p=0;else p=e.pendingLanes&-536870913,p=p!==0?p:p&536870912?536870912:0;if(p!==0){t=p;e:{var T=e;c=Bi;var _=T.current.memoizedState.isDehydrated;if(_&&(zr(T,p).flags|=256),p=Xd(T,p,!1),p!==2){if(Yd&&!_){T.errorRecoveryDisabledLanes|=d,Ls|=d,c=4;break e}d=Ea,Ea=c,d!==null&&(Ea===null?Ea=d:Ea.push.apply(Ea,d))}c=p}if(d=!1,c!==2)continue}}if(c===1){zr(e,0),ql(e,t,0,!0);break}e:{switch(l=e,d=c,d){case 0:case 1:throw Error(u(345));case 4:if((t&4194048)!==t)break;case 6:ql(l,t,za,!zl);break e;case 2:Ea=null;break;case 3:case 5:break;default:throw Error(u(329))}if((t&62914560)===t&&(c=Eo+300-yt(),10<c)){if(ql(l,t,za,!zl),xt(l,0,!0)!==0)break e;nl=t,l.timeoutHandle=F0(g0.bind(null,l,a,Ea,To,Gd,t,za,Ls,Ar,zl,d,"Throttled",-0,0),c);break e}g0(l,a,Ea,To,Gd,t,za,Ls,Ar,zl,d,null,-0,0)}}break}while(!0);On(e)}function g0(e,t,a,l,c,d,p,T,_,Q,re,ue,X,ne){if(e.timeoutHandle=-1,ue=t.subtreeFlags,ue&8192||(ue&16785408)===16785408){ue={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Pa},i0(t,d,ue);var je=(d&62914560)===d?Eo-yt():(d&4194048)===d?d0-yt():0;if(je=gy(ue,je),je!==null){nl=d,e.cancelPendingCommit=je(w0.bind(null,e,t,d,a,l,c,p,T,_,re,ue,null,X,ne)),ql(e,d,p,!Q);return}}w0(e,t,d,a,l,c,p,T,_)}function Dv(e){for(var t=e;;){var a=t.tag;if((a===0||a===11||a===15)&&t.flags&16384&&(a=t.updateQueue,a!==null&&(a=a.stores,a!==null)))for(var l=0;l<a.length;l++){var c=a[l],d=c.getSnapshot;c=c.value;try{if(!ra(d(),c))return!1}catch{return!1}}if(a=t.child,t.subtreeFlags&16384&&a!==null)a.return=t,t=a;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function ql(e,t,a,l){t&=~Fd,t&=~Ls,e.suspendedLanes|=t,e.pingedLanes&=~t,l&&(e.warmLanes|=t),l=e.expirationTimes;for(var c=t;0<c;){var d=31-Lt(c),p=1<<d;l[d]=-1,c&=~p}a!==0&&ht(e,a,t)}function Mo(){return(tt&6)===0?(Pi(0),!1):!0}function Qd(){if($e!==null){if(rt===0)var e=$e.return;else e=$e,Qa=Gn=null,fd(e),Er=null,Ei=0,e=$e;for(;e!==null;)Gm(e.alternate,e),e=e.return;$e=null}}function zr(e,t){var a=e.timeoutHandle;a!==-1&&(e.timeoutHandle=-1,Xv(a)),a=e.cancelPendingCommit,a!==null&&(e.cancelPendingCommit=null,a()),nl=0,Qd(),ft=e,$e=a=Za(e.current,null),Ze=t,rt=0,_a=null,zl=!1,kr=ga(e,t),Yd=!1,Ar=za=Fd=Ls=Ll=Ct=0,Ea=Bi=null,Gd=!1,(t&8)!==0&&(t|=t&32);var l=e.entangledLanes;if(l!==0)for(e=e.entanglements,l&=t;0<l;){var c=31-Lt(l),d=1<<c;t|=e[c],l&=~d}return al=t,Tl(),a}function x0(e,t){Ve=null,P.H=Ai,t===Sr||t===ao?(t=kh(),rt=3):t===ed?(t=kh(),rt=4):rt=t===Md?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,_a=t,$e===null&&(Ct=1,po(e,ba(t,e.current)))}function p0(){var e=ka.current;return e===null?!0:(Ze&4194048)===Ze?Ja===null:(Ze&62914560)===Ze||(Ze&536870912)!==0?e===Ja:!1}function v0(){var e=P.H;return P.H=Ai,e===null?Ai:e}function y0(){var e=P.A;return P.A=Ov,e}function Oo(){Ct=4,zl||(Ze&4194048)!==Ze&&ka.current!==null||(kr=!0),(Ll&134217727)===0&&(Ls&134217727)===0||ft===null||ql(ft,Ze,za,!1)}function Xd(e,t,a){var l=tt;tt|=2;var c=v0(),d=y0();(ft!==e||Ze!==t)&&(To=null,zr(e,t)),t=!1;var p=Ct;e:do try{if(rt!==0&&$e!==null){var T=$e,_=_a;switch(rt){case 8:Qd(),p=6;break e;case 3:case 2:case 9:case 6:ka.current===null&&(t=!0);var Q=rt;if(rt=0,_a=null,Lr(e,T,_,Q),a&&kr){p=0;break e}break;default:Q=rt,rt=0,_a=null,Lr(e,T,_,Q)}}kv(),p=Ct;break}catch(re){x0(e,re)}while(!0);return t&&e.shellSuspendCounter++,Qa=Gn=null,tt=l,P.H=c,P.A=d,$e===null&&(ft=null,Ze=0,Tl()),p}function kv(){for(;$e!==null;)b0($e)}function Av(e,t){var a=tt;tt|=2;var l=v0(),c=y0();ft!==e||Ze!==t?(To=null,Co=yt()+500,zr(e,t)):kr=ga(e,t);e:do try{if(rt!==0&&$e!==null){t=$e;var d=_a;t:switch(rt){case 1:rt=0,_a=null,Lr(e,t,d,1);break;case 2:case 9:if(Rh(d)){rt=0,_a=null,j0(t);break}t=function(){rt!==2&&rt!==9||ft!==e||(rt=7),On(e)},d.then(t,t);break e;case 3:rt=7;break e;case 4:rt=5;break e;case 7:Rh(d)?(rt=0,_a=null,j0(t)):(rt=0,_a=null,Lr(e,t,d,7));break;case 5:var p=null;switch($e.tag){case 26:p=$e.memoizedState;case 5:case 27:var T=$e;if(p?rg(p):T.stateNode.complete){rt=0,_a=null;var _=T.sibling;if(_!==null)$e=_;else{var Q=T.return;Q!==null?($e=Q,Ro(Q)):$e=null}break t}}rt=0,_a=null,Lr(e,t,d,5);break;case 6:rt=0,_a=null,Lr(e,t,d,6);break;case 8:Qd(),Ct=6;break e;default:throw Error(u(462))}}_v();break}catch(re){x0(e,re)}while(!0);return Qa=Gn=null,P.H=l,P.A=c,tt=a,$e!==null?0:(ft=null,Ze=0,Tl(),Ct)}function _v(){for(;$e!==null&&!_n();)b0($e)}function b0(e){var t=Ym(e.alternate,e,al);e.memoizedProps=e.pendingProps,t===null?Ro(e):$e=t}function j0(e){var t=e,a=t.alternate;switch(t.tag){case 15:case 0:t=Hm(a,t,t.pendingProps,t.type,void 0,Ze);break;case 11:t=Hm(a,t,t.pendingProps,t.type.render,t.ref,Ze);break;case 5:fd(t);default:Gm(a,t),t=$e=Jc(t,al),t=Ym(a,t,al)}e.memoizedProps=e.pendingProps,t===null?Ro(e):$e=t}function Lr(e,t,a,l){Qa=Gn=null,fd(t),Er=null,Ei=0;var c=t.return;try{if(Nv(e,c,t,a,Ze)){Ct=1,po(e,ba(a,e.current)),$e=null;return}}catch(d){if(c!==null)throw $e=c,d;Ct=1,po(e,ba(a,e.current)),$e=null;return}t.flags&32768?(Y||l===1?e=!0:kr||(Ze&536870912)!==0?e=!1:(zl=e=!0,(l===2||l===9||l===3||l===6)&&(l=ka.current,l!==null&&l.tag===13&&(l.flags|=16384))),N0(t,e)):Ro(t)}function Ro(e){var t=e;do{if((t.flags&32768)!==0){N0(t,zl);return}e=t.return;var a=Ev(t.alternate,t,al);if(a!==null){$e=a;return}if(t=t.sibling,t!==null){$e=t;return}$e=t=e}while(t!==null);Ct===0&&(Ct=5)}function N0(e,t){do{var a=Cv(e.alternate,e);if(a!==null){a.flags&=32767,$e=a;return}if(a=e.return,a!==null&&(a.flags|=32768,a.subtreeFlags=0,a.deletions=null),!t&&(e=e.sibling,e!==null)){$e=e;return}$e=e=a}while(e!==null);Ct=6,$e=null}function w0(e,t,a,l,c,d,p,T,_){e.cancelPendingCommit=null;do Do();while(Ft!==0);if((tt&6)!==0)throw Error(u(327));if(t!==null){if(t===e.current)throw Error(u(177));if(d=t.lanes|t.childLanes,d|=Ss,Sc(e,a,d,p,T,_),e===ft&&($e=ft=null,Ze=0),_r=t,Hl=e,nl=a,Zd=d,Wd=c,f0=l,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,Hv(es,function(){return M0(),null})):(e.callbackNode=null,e.callbackPriority=0),l=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||l){l=P.T,P.T=null,c=K.p,K.p=2,p=tt,tt|=4;try{Tv(e,t,a)}finally{tt=p,K.p=c,P.T=l}}Ft=1,S0(),E0(),C0()}}function S0(){if(Ft===1){Ft=0;var e=Hl,t=_r,a=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||a){a=P.T,P.T=null;var l=K.p;K.p=2;var c=tt;tt|=4;try{l0(t,e);var d=uf,p=Wu(e.containerInfo),T=d.focusedElem,_=d.selectionRange;if(p!==T&&T&&T.ownerDocument&&Qe(T.ownerDocument.documentElement,T)){if(_!==null&&fr(T)){var Q=_.start,re=_.end;if(re===void 0&&(re=Q),"selectionStart"in T)T.selectionStart=Q,T.selectionEnd=Math.min(re,T.value.length);else{var ue=T.ownerDocument||document,X=ue&&ue.defaultView||window;if(X.getSelection){var ne=X.getSelection(),je=T.textContent.length,_e=Math.min(_.start,je),dt=_.end===void 0?_e:Math.min(_.end,je);!ne.extend&&_e>dt&&(p=dt,dt=_e,_e=p);var F=Gc(T,_e),$=Gc(T,dt);if(F&&$&&(ne.rangeCount!==1||ne.anchorNode!==F.node||ne.anchorOffset!==F.offset||ne.focusNode!==$.node||ne.focusOffset!==$.offset)){var I=ue.createRange();I.setStart(F.node,F.offset),ne.removeAllRanges(),_e>dt?(ne.addRange(I),ne.extend($.node,$.offset)):(I.setEnd($.node,$.offset),ne.addRange(I))}}}}for(ue=[],ne=T;ne=ne.parentNode;)ne.nodeType===1&&ue.push({element:ne,left:ne.scrollLeft,top:ne.scrollTop});for(typeof T.focus=="function"&&T.focus(),T=0;T<ue.length;T++){var ce=ue[T];ce.element.scrollLeft=ce.left,ce.element.scrollTop=ce.top}}Po=!!of,uf=of=null}finally{tt=c,K.p=l,P.T=a}}e.current=t,Ft=2}}function E0(){if(Ft===2){Ft=0;var e=Hl,t=_r,a=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||a){a=P.T,P.T=null;var l=K.p;K.p=2;var c=tt;tt|=4;try{Km(e,t.alternate,t)}finally{tt=c,K.p=l,P.T=a}}Ft=3}}function C0(){if(Ft===4||Ft===3){Ft=0,zn();var e=Hl,t=_r,a=nl,l=f0;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?Ft=5:(Ft=0,_r=Hl=null,T0(e,e.pendingLanes));var c=e.pendingLanes;if(c===0&&(Ul=null),sa(a),t=t.stateNode,$t&&typeof $t.onCommitFiberRoot=="function")try{$t.onCommitFiberRoot(mt,t,void 0,(t.current.flags&128)===128)}catch{}if(l!==null){t=P.T,c=K.p,K.p=2,P.T=null;try{for(var d=e.onRecoverableError,p=0;p<l.length;p++){var T=l[p];d(T.value,{componentStack:T.stack})}}finally{P.T=t,K.p=c}}(nl&3)!==0&&Do(),On(e),c=e.pendingLanes,(a&261930)!==0&&(c&42)!==0?e===Id?$i++:($i=0,Id=e):$i=0,Pi(0)}}function T0(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,wi(t)))}function Do(){return S0(),E0(),C0(),M0()}function M0(){if(Ft!==5)return!1;var e=Hl,t=Zd;Zd=0;var a=sa(nl),l=P.T,c=K.p;try{K.p=32>a?32:a,P.T=null,a=Wd,Wd=null;var d=Hl,p=nl;if(Ft=0,_r=Hl=null,nl=0,(tt&6)!==0)throw Error(u(331));var T=tt;if(tt|=4,o0(d.current),r0(d,d.current,p,a),tt=T,Pi(0,!1),$t&&typeof $t.onPostCommitFiberRoot=="function")try{$t.onPostCommitFiberRoot(mt,d)}catch{}return!0}finally{K.p=c,P.T=l,T0(e,t)}}function O0(e,t,a){t=ba(a,t),t=Td(e.stateNode,t,2),e=Dl(e,t,2),e!==null&&(hl(e,2),On(e))}function it(e,t,a){if(e.tag===3)O0(e,e,a);else for(;t!==null;){if(t.tag===3){O0(t,e,a);break}else if(t.tag===1){var l=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof l.componentDidCatch=="function"&&(Ul===null||!Ul.has(l))){e=ba(a,e),a=Rm(2),l=Dl(t,a,2),l!==null&&(Dm(a,l,t,e),hl(l,2),On(l));break}}t=t.return}}function Jd(e,t,a){var l=e.pingCache;if(l===null){l=e.pingCache=new Rv;var c=new Set;l.set(t,c)}else c=l.get(t),c===void 0&&(c=new Set,l.set(t,c));c.has(a)||(Yd=!0,c.add(a),e=zv.bind(null,e,t,a),t.then(e,e))}function zv(e,t,a){var l=e.pingCache;l!==null&&l.delete(t),e.pingedLanes|=e.suspendedLanes&a,e.warmLanes&=~a,ft===e&&(Ze&a)===a&&(Ct===4||Ct===3&&(Ze&62914560)===Ze&&300>yt()-Eo?(tt&2)===0&&zr(e,0):Fd|=a,Ar===Ze&&(Ar=0)),On(e)}function R0(e,t){t===0&&(t=Jr()),e=Ga(e,t),e!==null&&(hl(e,t),On(e))}function Lv(e){var t=e.memoizedState,a=0;t!==null&&(a=t.retryLane),R0(e,a)}function Uv(e,t){var a=0;switch(e.tag){case 31:case 13:var l=e.stateNode,c=e.memoizedState;c!==null&&(a=c.retryLane);break;case 19:l=e.stateNode;break;case 22:l=e.stateNode._retryCache;break;default:throw Error(u(314))}l!==null&&l.delete(t),R0(e,a)}function Hv(e,t){return da(e,t)}var ko=null,Ur=null,Kd=!1,Ao=!1,ef=!1,Vl=0;function On(e){e!==Ur&&e.next===null&&(Ur===null?ko=Ur=e:Ur=Ur.next=e),Ao=!0,Kd||(Kd=!0,Vv())}function Pi(e,t){if(!ef&&Ao){ef=!0;do for(var a=!1,l=ko;l!==null;){if(e!==0){var c=l.pendingLanes;if(c===0)var d=0;else{var p=l.suspendedLanes,T=l.pingedLanes;d=(1<<31-Lt(42|e)+1)-1,d&=c&~(p&~T),d=d&201326741?d&201326741|1:d?d|2:0}d!==0&&(a=!0,_0(l,d))}else d=Ze,d=xt(l,l===ft?d:0,l.cancelPendingCommit!==null||l.timeoutHandle!==-1),(d&3)===0||ga(l,d)||(a=!0,_0(l,d));l=l.next}while(a);ef=!1}}function qv(){D0()}function D0(){Ao=Kd=!1;var e=0;Vl!==0&&Qv()&&(e=Vl);for(var t=yt(),a=null,l=ko;l!==null;){var c=l.next,d=k0(l,t);d===0?(l.next=null,a===null?ko=c:a.next=c,c===null&&(Ur=a)):(a=l,(e!==0||(d&3)!==0)&&(Ao=!0)),l=c}Ft!==0&&Ft!==5||Pi(e),Vl!==0&&(Vl=0)}function k0(e,t){for(var a=e.suspendedLanes,l=e.pingedLanes,c=e.expirationTimes,d=e.pendingLanes&-62914561;0<d;){var p=31-Lt(d),T=1<<p,_=c[p];_===-1?((T&a)===0||(T&l)!==0)&&(c[p]=Xs(T,t)):_<=t&&(e.expiredLanes|=T),d&=~T}if(t=ft,a=Ze,a=xt(e,e===t?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l=e.callbackNode,a===0||e===t&&(rt===2||rt===9)||e.cancelPendingCommit!==null)return l!==null&&l!==null&&An(l),e.callbackNode=null,e.callbackPriority=0;if((a&3)===0||ga(e,a)){if(t=a&-a,t===e.callbackPriority)return t;switch(l!==null&&An(l),sa(a)){case 2:case 8:a=Ws;break;case 32:a=es;break;case 268435456:a=dl;break;default:a=es}return l=A0.bind(null,e),a=da(a,l),e.callbackPriority=t,e.callbackNode=a,t}return l!==null&&l!==null&&An(l),e.callbackPriority=2,e.callbackNode=null,2}function A0(e,t){if(Ft!==0&&Ft!==5)return e.callbackNode=null,e.callbackPriority=0,null;var a=e.callbackNode;if(Do()&&e.callbackNode!==a)return null;var l=Ze;return l=xt(e,e===ft?l:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l===0?null:(m0(e,l,t),k0(e,yt()),e.callbackNode!=null&&e.callbackNode===a?A0.bind(null,e):null)}function _0(e,t){if(Do())return null;m0(e,t,!0)}function Vv(){Jv(function(){(tt&6)!==0?da(Zs,qv):D0()})}function tf(){if(Vl===0){var e=Nr;e===0&&(e=oe,oe<<=1,(oe&261888)===0&&(oe=256)),Vl=e}return Vl}function z0(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:os(""+e)}function L0(e,t){var a=t.ownerDocument.createElement("input");return a.name=t.name,a.value=t.value,e.id&&a.setAttribute("form",e.id),t.parentNode.insertBefore(a,t),e=new FormData(e),a.parentNode.removeChild(a),e}function Bv(e,t,a,l,c){if(t==="submit"&&a&&a.stateNode===c){var d=z0((c[Pt]||null).action),p=l.submitter;p&&(t=(t=p[Pt]||null)?z0(t.formAction):p.getAttribute("formAction"),t!==null&&(d=t,p=null));var T=new hs("action","action",null,l,c);e.push({event:T,listeners:[{instance:null,listener:function(){if(l.defaultPrevented){if(Vl!==0){var _=p?L0(c,p):new FormData(c);jd(a,{pending:!0,data:_,method:c.method,action:d},null,_)}}else typeof d=="function"&&(T.preventDefault(),_=p?L0(c,p):new FormData(c),jd(a,{pending:!0,data:_,method:c.method,action:d},d,_))},currentTarget:c}]})}}for(var af=0;af<yi.length;af++){var nf=yi[af],$v=nf.toLowerCase(),Pv=nf[0].toUpperCase()+nf.slice(1);ya($v,"on"+Pv)}ya(Ic,"onAnimationEnd"),ya(Qc,"onAnimationIteration"),ya(gr,"onAnimationStart"),ya("dblclick","onDoubleClick"),ya("focusin","onFocus"),ya("focusout","onBlur"),ya(Iu,"onTransitionRun"),ya(Qu,"onTransitionStart"),ya(Xc,"onTransitionCancel"),ya(pi,"onTransitionEnd"),ml("onMouseEnter",["mouseout","mouseover"]),ml("onMouseLeave",["mouseout","mouseover"]),ml("onPointerEnter",["pointerout","pointerover"]),ml("onPointerLeave",["pointerout","pointerover"]),jn("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),jn("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),jn("onBeforeInput",["compositionend","keypress","textInput","paste"]),jn("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),jn("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),jn("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Yi="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(" "),Yv=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Yi));function U0(e,t){t=(t&4)!==0;for(var a=0;a<e.length;a++){var l=e[a],c=l.event;l=l.listeners;e:{var d=void 0;if(t)for(var p=l.length-1;0<=p;p--){var T=l[p],_=T.instance,Q=T.currentTarget;if(T=T.listener,_!==d&&c.isPropagationStopped())break e;d=T,c.currentTarget=Q;try{d(c)}catch(re){Cl(re)}c.currentTarget=null,d=_}else for(p=0;p<l.length;p++){if(T=l[p],_=T.instance,Q=T.currentTarget,T=T.listener,_!==d&&c.isPropagationStopped())break e;d=T,c.currentTarget=Q;try{d(c)}catch(re){Cl(re)}c.currentTarget=null,d=_}}}}function Pe(e,t){var a=t[as];a===void 0&&(a=t[as]=new Set);var l=e+"__bubble";a.has(l)||(H0(t,e,2,!1),a.add(l))}function lf(e,t,a){var l=0;t&&(l|=4),H0(a,e,l,t)}var _o="_reactListening"+Math.random().toString(36).slice(2);function sf(e){if(!e[_o]){e[_o]=!0,Mc.forEach(function(a){a!=="selectionchange"&&(Yv.has(a)||lf(a,!1,e),lf(a,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[_o]||(t[_o]=!0,lf("selectionchange",!1,t))}}function H0(e,t,a,l){switch(hg(t)){case 2:var c=vy;break;case 8:c=yy;break;default:c=jf}a=c.bind(null,t,a,e),c=void 0,!ci||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(c=!0),l?c!==void 0?e.addEventListener(t,a,{capture:!0,passive:c}):e.addEventListener(t,a,!0):c!==void 0?e.addEventListener(t,a,{passive:c}):e.addEventListener(t,a,!1)}function rf(e,t,a,l,c){var d=l;if((t&1)===0&&(t&2)===0&&l!==null)e:for(;;){if(l===null)return;var p=l.tag;if(p===3||p===4){var T=l.stateNode.containerInfo;if(T===c)break;if(p===4)for(p=l.return;p!==null;){var _=p.tag;if((_===3||_===4)&&p.stateNode.containerInfo===c)return;p=p.return}for(;T!==null;){if(p=Un(T),p===null)return;if(_=p.tag,_===5||_===6||_===26||_===27){l=d=p;continue e}T=T.parentNode}}l=l.return}ii(function(){var Q=d,re=rr(a),ue=[];e:{var X=vi.get(e);if(X!==void 0){var ne=hs,je=e;switch(e){case"keypress":if(fs(a)===0)break e;case"keydown":case"keyup":ne=_u;break;case"focusin":je="focus",ne=dr;break;case"focusout":je="blur",ne=dr;break;case"beforeblur":case"afterblur":ne=dr;break;case"click":if(a.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":ne=_c;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ne=Eu;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ne=Uu;break;case Ic:case Qc:case gr:ne=vl;break;case pi:ne=Hu;break;case"scroll":case"scrollend":ne=oi;break;case"wheel":ne=Vu;break;case"copy":case"cut":case"paste":ne=yl;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ne=zc;break;case"toggle":case"beforetoggle":ne=$u}var _e=(t&4)!==0,dt=!_e&&(e==="scroll"||e==="scrollend"),F=_e?X!==null?X+"Capture":null:X;_e=[];for(var $=Q,I;$!==null;){var ce=$;if(I=ce.stateNode,ce=ce.tag,ce!==5&&ce!==26&&ce!==27||I===null||F===null||(ce=us($,F),ce!=null&&_e.push(Fi($,ce,I))),dt)break;$=$.return}0<_e.length&&(X=new ne(X,je,null,a,re),ue.push({event:X,listeners:_e}))}}if((t&7)===0){e:{if(X=e==="mouseover"||e==="pointerover",ne=e==="mouseout"||e==="pointerout",X&&a!==si&&(je=a.relatedTarget||a.fromElement)&&(Un(je)||je[Ln]))break e;if((ne||X)&&(X=re.window===re?re:(X=re.ownerDocument)?X.defaultView||X.parentWindow:window,ne?(je=a.relatedTarget||a.toElement,ne=Q,je=je?Un(je):null,je!==null&&(dt=f(je),_e=je.tag,je!==dt||_e!==5&&_e!==27&&_e!==6)&&(je=null)):(ne=null,je=Q),ne!==je)){if(_e=_c,ce="onMouseLeave",F="onMouseEnter",$="mouse",(e==="pointerout"||e==="pointerover")&&(_e=zc,ce="onPointerLeave",F="onPointerEnter",$="pointer"),dt=ne==null?X:pa(ne),I=je==null?X:pa(je),X=new _e(ce,$+"leave",ne,a,re),X.target=dt,X.relatedTarget=I,ce=null,Un(re)===Q&&(_e=new _e(F,$+"enter",je,a,re),_e.target=I,_e.relatedTarget=dt,ce=_e),dt=ce,ne&&je)t:{for(_e=Fv,F=ne,$=je,I=0,ce=F;ce;ce=_e(ce))I++;ce=0;for(var De=$;De;De=_e(De))ce++;for(;0<I-ce;)F=_e(F),I--;for(;0<ce-I;)$=_e($),ce--;for(;I--;){if(F===$||$!==null&&F===$.alternate){_e=F;break t}F=_e(F),$=_e($)}_e=null}else _e=null;ne!==null&&q0(ue,X,ne,_e,!1),je!==null&&dt!==null&&q0(ue,dt,je,_e,!0)}}e:{if(X=Q?pa(Q):window,ne=X.nodeName&&X.nodeName.toLowerCase(),ne==="select"||ne==="input"&&X.type==="file")var Je=Yc;else if(Pc(X))if(En)Je=pt;else{Je=wl;var Se=Fe}else ne=X.nodeName,!ne||ne.toLowerCase()!=="input"||X.type!=="checkbox"&&X.type!=="radio"?Q&&sr(Q.elementType)&&(Je=Yc):Je=Zu;if(Je&&(Je=Je(e,Q))){di(ue,Je,a,re);break e}Se&&Se(e,X,Q),e==="focusout"&&Q&&X.type==="number"&&Q.memoizedProps.value!=null&&ss(X,"number",X.value)}switch(Se=Q?pa(Q):window,e){case"focusin":(Pc(Se)||Se.contentEditable==="true")&&(Sl=Se,hr=Q,ea=null);break;case"focusout":ea=hr=Sl=null;break;case"mousedown":mr=!0;break;case"contextmenu":case"mouseup":case"dragend":mr=!1,ws(ue,a,re);break;case"selectionchange":if(Zc)break;case"keydown":case"keyup":ws(ue,a,re)}var Be;if(ui)e:{switch(e){case"compositionstart":var We="onCompositionStart";break e;case"compositionend":We="onCompositionEnd";break e;case"compositionupdate":We="onCompositionUpdate";break e}We=void 0}else jl?Bc(e,a)&&(We="onCompositionEnd"):e==="keydown"&&a.keyCode===229&&(We="onCompositionStart");We&&(Hc&&a.locale!=="ko"&&(jl||We!=="onCompositionStart"?We==="onCompositionEnd"&&jl&&(Be=Yt()):(wn=re,ir="value"in wn?wn.value:wn.textContent,jl=!0)),Se=zo(Q,We),0<Se.length&&(We=new bl(We,e,null,a,re),ue.push({event:We,listeners:Se}),Be?We.data=Be:(Be=$c(a),Be!==null&&(We.data=Be)))),(Be=Pu?Yu(e,a):Fu(e,a))&&(We=zo(Q,"onBeforeInput"),0<We.length&&(Se=new bl("onBeforeInput","beforeinput",null,a,re),ue.push({event:Se,listeners:We}),Se.data=Be)),Bv(ue,e,Q,a,re)}U0(ue,t)})}function Fi(e,t,a){return{instance:e,listener:t,currentTarget:a}}function zo(e,t){for(var a=t+"Capture",l=[];e!==null;){var c=e,d=c.stateNode;if(c=c.tag,c!==5&&c!==26&&c!==27||d===null||(c=us(e,a),c!=null&&l.unshift(Fi(e,c,d)),c=us(e,t),c!=null&&l.push(Fi(e,c,d))),e.tag===3)return l;e=e.return}return[]}function Fv(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function q0(e,t,a,l,c){for(var d=t._reactName,p=[];a!==null&&a!==l;){var T=a,_=T.alternate,Q=T.stateNode;if(T=T.tag,_!==null&&_===l)break;T!==5&&T!==26&&T!==27||Q===null||(_=Q,c?(Q=us(a,d),Q!=null&&p.unshift(Fi(a,Q,_))):c||(Q=us(a,d),Q!=null&&p.push(Fi(a,Q,_)))),a=a.return}p.length!==0&&e.push({event:t,listeners:p})}var Gv=/\r\n?/g,Zv=/\u0000|\uFFFD/g;function V0(e){return(typeof e=="string"?e:""+e).replace(Gv,`
|
|
49
|
+
`).replace(Zv,"")}function B0(e,t){return t=V0(t),V0(e)===t}function ut(e,t,a,l,c,d){switch(a){case"children":typeof l=="string"?t==="body"||t==="textarea"&&l===""||sn(e,l):(typeof l=="number"||typeof l=="bigint")&&t!=="body"&&sn(e,""+l);break;case"className":ar(e,"class",l);break;case"tabIndex":ar(e,"tabindex",l);break;case"dir":case"role":case"viewBox":case"width":case"height":ar(e,a,l);break;case"style":Dc(e,l,d);break;case"data":if(t!=="object"){ar(e,"data",l);break}case"src":case"href":if(l===""&&(t!=="a"||a!=="href")){e.removeAttribute(a);break}if(l==null||typeof l=="function"||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(a);break}l=os(""+l),e.setAttribute(a,l);break;case"action":case"formAction":if(typeof l=="function"){e.setAttribute(a,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof d=="function"&&(a==="formAction"?(t!=="input"&&ut(e,t,"name",c.name,c,null),ut(e,t,"formEncType",c.formEncType,c,null),ut(e,t,"formMethod",c.formMethod,c,null),ut(e,t,"formTarget",c.formTarget,c,null)):(ut(e,t,"encType",c.encType,c,null),ut(e,t,"method",c.method,c,null),ut(e,t,"target",c.target,c,null)));if(l==null||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(a);break}l=os(""+l),e.setAttribute(a,l);break;case"onClick":l!=null&&(e.onclick=Pa);break;case"onScroll":l!=null&&Pe("scroll",e);break;case"onScrollEnd":l!=null&&Pe("scrollend",e);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(u(61));if(a=l.__html,a!=null){if(c.children!=null)throw Error(u(60));e.innerHTML=a}}break;case"multiple":e.multiple=l&&typeof l!="function"&&typeof l!="symbol";break;case"muted":e.muted=l&&typeof l!="function"&&typeof l!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(l==null||typeof l=="function"||typeof l=="boolean"||typeof l=="symbol"){e.removeAttribute("xlink:href");break}a=os(""+l),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",a);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":l!=null&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(a,""+l):e.removeAttribute(a);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":l&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(a,""):e.removeAttribute(a);break;case"capture":case"download":l===!0?e.setAttribute(a,""):l!==!1&&l!=null&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(a,l):e.removeAttribute(a);break;case"cols":case"rows":case"size":case"span":l!=null&&typeof l!="function"&&typeof l!="symbol"&&!isNaN(l)&&1<=l?e.setAttribute(a,l):e.removeAttribute(a);break;case"rowSpan":case"start":l==null||typeof l=="function"||typeof l=="symbol"||isNaN(l)?e.removeAttribute(a):e.setAttribute(a,l);break;case"popover":Pe("beforetoggle",e),Pe("toggle",e),Jt(e,"popover",l);break;case"xlinkActuate":st(e,"http://www.w3.org/1999/xlink","xlink:actuate",l);break;case"xlinkArcrole":st(e,"http://www.w3.org/1999/xlink","xlink:arcrole",l);break;case"xlinkRole":st(e,"http://www.w3.org/1999/xlink","xlink:role",l);break;case"xlinkShow":st(e,"http://www.w3.org/1999/xlink","xlink:show",l);break;case"xlinkTitle":st(e,"http://www.w3.org/1999/xlink","xlink:title",l);break;case"xlinkType":st(e,"http://www.w3.org/1999/xlink","xlink:type",l);break;case"xmlBase":st(e,"http://www.w3.org/XML/1998/namespace","xml:base",l);break;case"xmlLang":st(e,"http://www.w3.org/XML/1998/namespace","xml:lang",l);break;case"xmlSpace":st(e,"http://www.w3.org/XML/1998/namespace","xml:space",l);break;case"is":Jt(e,"is",l);break;case"innerText":case"textContent":break;default:(!(2<a.length)||a[0]!=="o"&&a[0]!=="O"||a[1]!=="n"&&a[1]!=="N")&&(a=wu.get(a)||a,Jt(e,a,l))}}function cf(e,t,a,l,c,d){switch(a){case"style":Dc(e,l,d);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(u(61));if(a=l.__html,a!=null){if(c.children!=null)throw Error(u(60));e.innerHTML=a}}break;case"children":typeof l=="string"?sn(e,l):(typeof l=="number"||typeof l=="bigint")&&sn(e,""+l);break;case"onScroll":l!=null&&Pe("scroll",e);break;case"onScrollEnd":l!=null&&Pe("scrollend",e);break;case"onClick":l!=null&&(e.onclick=Pa);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!ti.hasOwnProperty(a))e:{if(a[0]==="o"&&a[1]==="n"&&(c=a.endsWith("Capture"),t=a.slice(2,c?a.length-7:void 0),d=e[Pt]||null,d=d!=null?d[a]:null,typeof d=="function"&&e.removeEventListener(t,d,c),typeof l=="function")){typeof d!="function"&&d!==null&&(a in e?e[a]=null:e.hasAttribute(a)&&e.removeAttribute(a)),e.addEventListener(t,l,c);break e}a in e?e[a]=l:l===!0?e.setAttribute(a,""):Jt(e,a,l)}}}function la(e,t,a){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 l=!1,c=!1,d;for(d in a)if(a.hasOwnProperty(d)){var p=a[d];if(p!=null)switch(d){case"src":l=!0;break;case"srcSet":c=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(u(137,t));default:ut(e,t,d,p,a,null)}}c&&ut(e,t,"srcSet",a.srcSet,a,null),l&&ut(e,t,"src",a.src,a,null);return;case"input":Pe("invalid",e);var T=d=p=c=null,_=null,Q=null;for(l in a)if(a.hasOwnProperty(l)){var re=a[l];if(re!=null)switch(l){case"name":c=re;break;case"type":p=re;break;case"checked":_=re;break;case"defaultChecked":Q=re;break;case"value":d=re;break;case"defaultValue":T=re;break;case"children":case"dangerouslySetInnerHTML":if(re!=null)throw Error(u(137,t));break;default:ut(e,t,l,re,a,null)}}xl(e,d,T,_,Q,p,c,!1);return;case"select":Pe("invalid",e),l=p=d=null;for(c in a)if(a.hasOwnProperty(c)&&(T=a[c],T!=null))switch(c){case"value":d=T;break;case"defaultValue":p=T;break;case"multiple":l=T;default:ut(e,t,c,T,a,null)}t=d,a=p,e.multiple=!!l,t!=null?qn(e,!!l,t,!1):a!=null&&qn(e,!!l,a,!0);return;case"textarea":Pe("invalid",e),d=c=l=null;for(p in a)if(a.hasOwnProperty(p)&&(T=a[p],T!=null))switch(p){case"value":l=T;break;case"defaultValue":c=T;break;case"children":d=T;break;case"dangerouslySetInnerHTML":if(T!=null)throw Error(u(91));break;default:ut(e,t,p,T,a,null)}li(e,l,c,d);return;case"option":for(_ in a)if(a.hasOwnProperty(_)&&(l=a[_],l!=null))switch(_){case"selected":e.selected=l&&typeof l!="function"&&typeof l!="symbol";break;default:ut(e,t,_,l,a,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(l=0;l<Yi.length;l++)Pe(Yi[l],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(Q in a)if(a.hasOwnProperty(Q)&&(l=a[Q],l!=null))switch(Q){case"children":case"dangerouslySetInnerHTML":throw Error(u(137,t));default:ut(e,t,Q,l,a,null)}return;default:if(sr(t)){for(re in a)a.hasOwnProperty(re)&&(l=a[re],l!==void 0&&cf(e,t,re,l,a,void 0));return}}for(T in a)a.hasOwnProperty(T)&&(l=a[T],l!=null&&ut(e,t,T,l,a,null))}function Wv(e,t,a,l){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var c=null,d=null,p=null,T=null,_=null,Q=null,re=null;for(ne in a){var ue=a[ne];if(a.hasOwnProperty(ne)&&ue!=null)switch(ne){case"checked":break;case"value":break;case"defaultValue":_=ue;default:l.hasOwnProperty(ne)||ut(e,t,ne,null,l,ue)}}for(var X in l){var ne=l[X];if(ue=a[X],l.hasOwnProperty(X)&&(ne!=null||ue!=null))switch(X){case"type":d=ne;break;case"name":c=ne;break;case"checked":Q=ne;break;case"defaultChecked":re=ne;break;case"value":p=ne;break;case"defaultValue":T=ne;break;case"children":case"dangerouslySetInnerHTML":if(ne!=null)throw Error(u(137,t));break;default:ne!==ue&&ut(e,t,X,ne,l,ue)}}lr(e,p,T,_,Q,re,d,c);return;case"select":ne=p=T=X=null;for(d in a)if(_=a[d],a.hasOwnProperty(d)&&_!=null)switch(d){case"value":break;case"multiple":ne=_;default:l.hasOwnProperty(d)||ut(e,t,d,null,l,_)}for(c in l)if(d=l[c],_=a[c],l.hasOwnProperty(c)&&(d!=null||_!=null))switch(c){case"value":X=d;break;case"defaultValue":T=d;break;case"multiple":p=d;default:d!==_&&ut(e,t,c,d,l,_)}t=T,a=p,l=ne,X!=null?qn(e,!!a,X,!1):!!l!=!!a&&(t!=null?qn(e,!!a,t,!0):qn(e,!!a,a?[]:"",!1));return;case"textarea":ne=X=null;for(T in a)if(c=a[T],a.hasOwnProperty(T)&&c!=null&&!l.hasOwnProperty(T))switch(T){case"value":break;case"children":break;default:ut(e,t,T,null,l,c)}for(p in l)if(c=l[p],d=a[p],l.hasOwnProperty(p)&&(c!=null||d!=null))switch(p){case"value":X=c;break;case"defaultValue":ne=c;break;case"children":break;case"dangerouslySetInnerHTML":if(c!=null)throw Error(u(91));break;default:c!==d&&ut(e,t,p,c,l,d)}rs(e,X,ne);return;case"option":for(var je in a)if(X=a[je],a.hasOwnProperty(je)&&X!=null&&!l.hasOwnProperty(je))switch(je){case"selected":e.selected=!1;break;default:ut(e,t,je,null,l,X)}for(_ in l)if(X=l[_],ne=a[_],l.hasOwnProperty(_)&&X!==ne&&(X!=null||ne!=null))switch(_){case"selected":e.selected=X&&typeof X!="function"&&typeof X!="symbol";break;default:ut(e,t,_,X,l,ne)}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 _e in a)X=a[_e],a.hasOwnProperty(_e)&&X!=null&&!l.hasOwnProperty(_e)&&ut(e,t,_e,null,l,X);for(Q in l)if(X=l[Q],ne=a[Q],l.hasOwnProperty(Q)&&X!==ne&&(X!=null||ne!=null))switch(Q){case"children":case"dangerouslySetInnerHTML":if(X!=null)throw Error(u(137,t));break;default:ut(e,t,Q,X,l,ne)}return;default:if(sr(t)){for(var dt in a)X=a[dt],a.hasOwnProperty(dt)&&X!==void 0&&!l.hasOwnProperty(dt)&&cf(e,t,dt,void 0,l,X);for(re in l)X=l[re],ne=a[re],!l.hasOwnProperty(re)||X===ne||X===void 0&&ne===void 0||cf(e,t,re,X,l,ne);return}}for(var F in a)X=a[F],a.hasOwnProperty(F)&&X!=null&&!l.hasOwnProperty(F)&&ut(e,t,F,null,l,X);for(ue in l)X=l[ue],ne=a[ue],!l.hasOwnProperty(ue)||X===ne||X==null&&ne==null||ut(e,t,ue,X,l,ne)}function $0(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function Iv(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,a=performance.getEntriesByType("resource"),l=0;l<a.length;l++){var c=a[l],d=c.transferSize,p=c.initiatorType,T=c.duration;if(d&&T&&$0(p)){for(p=0,T=c.responseEnd,l+=1;l<a.length;l++){var _=a[l],Q=_.startTime;if(Q>T)break;var re=_.transferSize,ue=_.initiatorType;re&&$0(ue)&&(_=_.responseEnd,p+=re*(_<T?1:(T-Q)/(_-Q)))}if(--l,t+=8*(d+p)/(c.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 of=null,uf=null;function Lo(e){return e.nodeType===9?e:e.ownerDocument}function P0(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 Y0(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 df(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 ff=null;function Qv(){var e=window.event;return e&&e.type==="popstate"?e===ff?!1:(ff=e,!0):(ff=null,!1)}var F0=typeof setTimeout=="function"?setTimeout:void 0,Xv=typeof clearTimeout=="function"?clearTimeout:void 0,G0=typeof Promise=="function"?Promise:void 0,Jv=typeof queueMicrotask=="function"?queueMicrotask:typeof G0<"u"?function(e){return G0.resolve(null).then(e).catch(Kv)}:F0;function Kv(e){setTimeout(function(){throw e})}function Bl(e){return e==="head"}function Z0(e,t){var a=t,l=0;do{var c=a.nextSibling;if(e.removeChild(a),c&&c.nodeType===8)if(a=c.data,a==="/$"||a==="/&"){if(l===0){e.removeChild(c),Br(t);return}l--}else if(a==="$"||a==="$?"||a==="$~"||a==="$!"||a==="&")l++;else if(a==="html")Gi(e.ownerDocument.documentElement);else if(a==="head"){a=e.ownerDocument.head,Gi(a);for(var d=a.firstChild;d;){var p=d.nextSibling,T=d.nodeName;d[ns]||T==="SCRIPT"||T==="STYLE"||T==="LINK"&&d.rel.toLowerCase()==="stylesheet"||a.removeChild(d),d=p}}else a==="body"&&Gi(e.ownerDocument.body);a=c}while(a);Br(t)}function W0(e,t){var a=e;e=0;do{var l=a.nextSibling;if(a.nodeType===1?t?(a._stashedDisplay=a.style.display,a.style.display="none"):(a.style.display=a._stashedDisplay||"",a.getAttribute("style")===""&&a.removeAttribute("style")):a.nodeType===3&&(t?(a._stashedText=a.nodeValue,a.nodeValue=""):a.nodeValue=a._stashedText||""),l&&l.nodeType===8)if(a=l.data,a==="/$"){if(e===0)break;e--}else a!=="$"&&a!=="$?"&&a!=="$~"&&a!=="$!"||e++;a=l}while(a)}function hf(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var a=t;switch(t=t.nextSibling,a.nodeName){case"HTML":case"HEAD":case"BODY":hf(a),tr(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}e.removeChild(a)}}function ey(e,t,a,l){for(;e.nodeType===1;){var c=a;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!l&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(l){if(!e[ns])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(d=e.getAttribute("rel"),d==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(d!==c.rel||e.getAttribute("href")!==(c.href==null||c.href===""?null:c.href)||e.getAttribute("crossorigin")!==(c.crossOrigin==null?null:c.crossOrigin)||e.getAttribute("title")!==(c.title==null?null:c.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(d=e.getAttribute("src"),(d!==(c.src==null?null:c.src)||e.getAttribute("type")!==(c.type==null?null:c.type)||e.getAttribute("crossorigin")!==(c.crossOrigin==null?null:c.crossOrigin))&&d&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var d=c.name==null?null:""+c.name;if(c.type==="hidden"&&e.getAttribute("name")===d)return e}else return e;if(e=Ka(e.nextSibling),e===null)break}return null}function ty(e,t,a){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!a||(e=Ka(e.nextSibling),e===null))return null;return e}function I0(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=Ka(e.nextSibling),e===null))return null;return e}function mf(e){return e.data==="$?"||e.data==="$~"}function gf(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function ay(e,t){var a=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||a.readyState!=="loading")t();else{var l=function(){t(),a.removeEventListener("DOMContentLoaded",l)};a.addEventListener("DOMContentLoaded",l),e._reactRetry=l}}function Ka(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 xf=null;function Q0(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var a=e.data;if(a==="/$"||a==="/&"){if(t===0)return Ka(e.nextSibling);t--}else a!=="$"&&a!=="$!"&&a!=="$?"&&a!=="$~"&&a!=="&"||t++}e=e.nextSibling}return null}function X0(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var a=e.data;if(a==="$"||a==="$!"||a==="$?"||a==="$~"||a==="&"){if(t===0)return e;t--}else a!=="/$"&&a!=="/&"||t++}e=e.previousSibling}return null}function J0(e,t,a){switch(t=Lo(a),e){case"html":if(e=t.documentElement,!e)throw Error(u(452));return e;case"head":if(e=t.head,!e)throw Error(u(453));return e;case"body":if(e=t.body,!e)throw Error(u(454));return e;default:throw Error(u(451))}}function Gi(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);tr(e)}var en=new Map,K0=new Set;function Uo(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var ll=K.d;K.d={f:ny,r:ly,D:sy,C:ry,L:iy,m:cy,X:uy,S:oy,M:dy};function ny(){var e=ll.f(),t=Mo();return e||t}function ly(e){var t=ke(e);t!==null&&t.tag===5&&t.type==="form"?xm(t):ll.r(e)}var Hr=typeof document>"u"?null:document;function eg(e,t,a){var l=Hr;if(l&&typeof t=="string"&&t){var c=Kt(t);c='link[rel="'+e+'"][href="'+c+'"]',typeof a=="string"&&(c+='[crossorigin="'+a+'"]'),K0.has(c)||(K0.add(c),e={rel:e,crossOrigin:a,href:t},l.querySelector(c)===null&&(t=l.createElement("link"),la(t,"link",e),Ut(t),l.head.appendChild(t)))}}function sy(e){ll.D(e),eg("dns-prefetch",e,null)}function ry(e,t){ll.C(e,t),eg("preconnect",e,t)}function iy(e,t,a){ll.L(e,t,a);var l=Hr;if(l&&e&&t){var c='link[rel="preload"][as="'+Kt(t)+'"]';t==="image"&&a&&a.imageSrcSet?(c+='[imagesrcset="'+Kt(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(c+='[imagesizes="'+Kt(a.imageSizes)+'"]')):c+='[href="'+Kt(e)+'"]';var d=c;switch(t){case"style":d=qr(e);break;case"script":d=Vr(e)}en.has(d)||(e=M({rel:"preload",href:t==="image"&&a&&a.imageSrcSet?void 0:e,as:t},a),en.set(d,e),l.querySelector(c)!==null||t==="style"&&l.querySelector(Zi(d))||t==="script"&&l.querySelector(Wi(d))||(t=l.createElement("link"),la(t,"link",e),Ut(t),l.head.appendChild(t)))}}function cy(e,t){ll.m(e,t);var a=Hr;if(a&&e){var l=t&&typeof t.as=="string"?t.as:"script",c='link[rel="modulepreload"][as="'+Kt(l)+'"][href="'+Kt(e)+'"]',d=c;switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":d=Vr(e)}if(!en.has(d)&&(e=M({rel:"modulepreload",href:e},t),en.set(d,e),a.querySelector(c)===null)){switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(Wi(d)))return}l=a.createElement("link"),la(l,"link",e),Ut(l),a.head.appendChild(l)}}}function oy(e,t,a){ll.S(e,t,a);var l=Hr;if(l&&e){var c=nn(l).hoistableStyles,d=qr(e);t=t||"default";var p=c.get(d);if(!p){var T={loading:0,preload:null};if(p=l.querySelector(Zi(d)))T.loading=5;else{e=M({rel:"stylesheet",href:e,"data-precedence":t},a),(a=en.get(d))&&pf(e,a);var _=p=l.createElement("link");Ut(_),la(_,"link",e),_._p=new Promise(function(Q,re){_.onload=Q,_.onerror=re}),_.addEventListener("load",function(){T.loading|=1}),_.addEventListener("error",function(){T.loading|=2}),T.loading|=4,Ho(p,t,l)}p={type:"stylesheet",instance:p,count:1,state:T},c.set(d,p)}}}function uy(e,t){ll.X(e,t);var a=Hr;if(a&&e){var l=nn(a).hoistableScripts,c=Vr(e),d=l.get(c);d||(d=a.querySelector(Wi(c)),d||(e=M({src:e,async:!0},t),(t=en.get(c))&&vf(e,t),d=a.createElement("script"),Ut(d),la(d,"link",e),a.head.appendChild(d)),d={type:"script",instance:d,count:1,state:null},l.set(c,d))}}function dy(e,t){ll.M(e,t);var a=Hr;if(a&&e){var l=nn(a).hoistableScripts,c=Vr(e),d=l.get(c);d||(d=a.querySelector(Wi(c)),d||(e=M({src:e,async:!0,type:"module"},t),(t=en.get(c))&&vf(e,t),d=a.createElement("script"),Ut(d),la(d,"link",e),a.head.appendChild(d)),d={type:"script",instance:d,count:1,state:null},l.set(c,d))}}function tg(e,t,a,l){var c=(c=xe.current)?Uo(c):null;if(!c)throw Error(u(446));switch(e){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(t=qr(a.href),a=nn(c).hoistableStyles,l=a.get(t),l||(l={type:"style",instance:null,count:0,state:null},a.set(t,l)),l):{type:"void",instance:null,count:0,state:null};case"link":if(a.rel==="stylesheet"&&typeof a.href=="string"&&typeof a.precedence=="string"){e=qr(a.href);var d=nn(c).hoistableStyles,p=d.get(e);if(p||(c=c.ownerDocument||c,p={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},d.set(e,p),(d=c.querySelector(Zi(e)))&&!d._p&&(p.instance=d,p.state.loading=5),en.has(e)||(a={rel:"preload",as:"style",href:a.href,crossOrigin:a.crossOrigin,integrity:a.integrity,media:a.media,hrefLang:a.hrefLang,referrerPolicy:a.referrerPolicy},en.set(e,a),d||fy(c,e,a,p.state))),t&&l===null)throw Error(u(528,""));return p}if(t&&l!==null)throw Error(u(529,""));return null;case"script":return t=a.async,a=a.src,typeof a=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Vr(a),a=nn(c).hoistableScripts,l=a.get(t),l||(l={type:"script",instance:null,count:0,state:null},a.set(t,l)),l):{type:"void",instance:null,count:0,state:null};default:throw Error(u(444,e))}}function qr(e){return'href="'+Kt(e)+'"'}function Zi(e){return'link[rel="stylesheet"]['+e+"]"}function ag(e){return M({},e,{"data-precedence":e.precedence,precedence:null})}function fy(e,t,a,l){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?l.loading=1:(t=e.createElement("link"),l.preload=t,t.addEventListener("load",function(){return l.loading|=1}),t.addEventListener("error",function(){return l.loading|=2}),la(t,"link",a),Ut(t),e.head.appendChild(t))}function Vr(e){return'[src="'+Kt(e)+'"]'}function Wi(e){return"script[async]"+e}function ng(e,t,a){if(t.count++,t.instance===null)switch(t.type){case"style":var l=e.querySelector('style[data-href~="'+Kt(a.href)+'"]');if(l)return t.instance=l,Ut(l),l;var c=M({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return l=(e.ownerDocument||e).createElement("style"),Ut(l),la(l,"style",c),Ho(l,a.precedence,e),t.instance=l;case"stylesheet":c=qr(a.href);var d=e.querySelector(Zi(c));if(d)return t.state.loading|=4,t.instance=d,Ut(d),d;l=ag(a),(c=en.get(c))&&pf(l,c),d=(e.ownerDocument||e).createElement("link"),Ut(d);var p=d;return p._p=new Promise(function(T,_){p.onload=T,p.onerror=_}),la(d,"link",l),t.state.loading|=4,Ho(d,a.precedence,e),t.instance=d;case"script":return d=Vr(a.src),(c=e.querySelector(Wi(d)))?(t.instance=c,Ut(c),c):(l=a,(c=en.get(d))&&(l=M({},a),vf(l,c)),e=e.ownerDocument||e,c=e.createElement("script"),Ut(c),la(c,"link",l),e.head.appendChild(c),t.instance=c);case"void":return null;default:throw Error(u(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(l=t.instance,t.state.loading|=4,Ho(l,a.precedence,e));return t.instance}function Ho(e,t,a){for(var l=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),c=l.length?l[l.length-1]:null,d=c,p=0;p<l.length;p++){var T=l[p];if(T.dataset.precedence===t)d=T;else if(d!==c)break}d?d.parentNode.insertBefore(e,d.nextSibling):(t=a.nodeType===9?a.head:a,t.insertBefore(e,t.firstChild))}function pf(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function vf(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var qo=null;function lg(e,t,a){if(qo===null){var l=new Map,c=qo=new Map;c.set(a,l)}else c=qo,l=c.get(a),l||(l=new Map,c.set(a,l));if(l.has(e))return l;for(l.set(e,null),a=a.getElementsByTagName(e),c=0;c<a.length;c++){var d=a[c];if(!(d[ns]||d[Mt]||e==="link"&&d.getAttribute("rel")==="stylesheet")&&d.namespaceURI!=="http://www.w3.org/2000/svg"){var p=d.getAttribute(t)||"";p=e+p;var T=l.get(p);T?T.push(d):l.set(p,[d])}}return l}function sg(e,t,a){e=e.ownerDocument||e,e.head.insertBefore(a,t==="title"?e.querySelector("head > title"):null)}function hy(e,t,a){if(a===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;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 rg(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function my(e,t,a,l){if(a.type==="stylesheet"&&(typeof l.media!="string"||matchMedia(l.media).matches!==!1)&&(a.state.loading&4)===0){if(a.instance===null){var c=qr(l.href),d=t.querySelector(Zi(c));if(d){t=d._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=Vo.bind(e),t.then(e,e)),a.state.loading|=4,a.instance=d,Ut(d);return}d=t.ownerDocument||t,l=ag(l),(c=en.get(c))&&pf(l,c),d=d.createElement("link"),Ut(d);var p=d;p._p=new Promise(function(T,_){p.onload=T,p.onerror=_}),la(d,"link",l),a.instance=d}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(a,t),(t=a.state.preload)&&(a.state.loading&3)===0&&(e.count++,a=Vo.bind(e),t.addEventListener("load",a),t.addEventListener("error",a))}}var yf=0;function gy(e,t){return e.stylesheets&&e.count===0&&$o(e,e.stylesheets),0<e.count||0<e.imgCount?function(a){var l=setTimeout(function(){if(e.stylesheets&&$o(e,e.stylesheets),e.unsuspend){var d=e.unsuspend;e.unsuspend=null,d()}},6e4+t);0<e.imgBytes&&yf===0&&(yf=62500*Iv());var c=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&$o(e,e.stylesheets),e.unsuspend)){var d=e.unsuspend;e.unsuspend=null,d()}},(e.imgBytes>yf?50:800)+t);return e.unsuspend=a,function(){e.unsuspend=null,clearTimeout(l),clearTimeout(c)}}:null}function Vo(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)$o(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Bo=null;function $o(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Bo=new Map,t.forEach(xy,e),Bo=null,Vo.call(e))}function xy(e,t){if(!(t.state.loading&4)){var a=Bo.get(e);if(a)var l=a.get(null);else{a=new Map,Bo.set(e,a);for(var c=e.querySelectorAll("link[data-precedence],style[data-precedence]"),d=0;d<c.length;d++){var p=c[d];(p.nodeName==="LINK"||p.getAttribute("media")!=="not all")&&(a.set(p.dataset.precedence,p),l=p)}l&&a.set(null,l)}c=t.instance,p=c.getAttribute("data-precedence"),d=a.get(p)||l,d===l&&a.set(null,c),a.set(p,c),this.count++,l=Vo.bind(this),c.addEventListener("load",l),c.addEventListener("error",l),d?d.parentNode.insertBefore(c,d.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(c,e.firstChild)),t.state.loading|=4}}var Ii={$$typeof:J,Provider:null,Consumer:null,_currentValue:he,_currentValue2:he,_threadCount:0};function py(e,t,a,l,c,d,p,T,_){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=Js(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Js(0),this.hiddenUpdates=Js(null),this.identifierPrefix=l,this.onUncaughtError=c,this.onCaughtError=d,this.onRecoverableError=p,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=_,this.incompleteTransitions=new Map}function ig(e,t,a,l,c,d,p,T,_,Q,re,ue){return e=new py(e,t,a,p,_,Q,re,ue,T),t=1,d===!0&&(t|=24),d=ta(3,null,null,t),e.current=d,d.stateNode=e,t=Xu(),t.refCount++,e.pooledCache=t,t.refCount++,d.memoizedState={element:l,isDehydrated:a,cache:t},td(d),e}function cg(e){return e?(e=Da,e):Da}function og(e,t,a,l,c,d){c=cg(c),l.context===null?l.context=c:l.pendingContext=c,l=Rl(t),l.payload={element:a},d=d===void 0?null:d,d!==null&&(l.callback=d),a=Dl(e,l,t),a!==null&&(Ca(a,e,t),Ti(a,e,t))}function ug(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var a=e.retryLane;e.retryLane=a!==0&&a<t?a:t}}function bf(e,t){ug(e,t),(e=e.alternate)&&ug(e,t)}function dg(e){if(e.tag===13||e.tag===31){var t=Ga(e,67108864);t!==null&&Ca(t,e,67108864),bf(e,67108864)}}function fg(e){if(e.tag===13||e.tag===31){var t=La();t=Ks(t);var a=Ga(e,t);a!==null&&Ca(a,e,t),bf(e,t)}}var Po=!0;function vy(e,t,a,l){var c=P.T;P.T=null;var d=K.p;try{K.p=2,jf(e,t,a,l)}finally{K.p=d,P.T=c}}function yy(e,t,a,l){var c=P.T;P.T=null;var d=K.p;try{K.p=8,jf(e,t,a,l)}finally{K.p=d,P.T=c}}function jf(e,t,a,l){if(Po){var c=Nf(l);if(c===null)rf(e,t,l,Yo,a),mg(e,l);else if(jy(c,e,t,a,l))l.stopPropagation();else if(mg(e,l),t&4&&-1<by.indexOf(e)){for(;c!==null;){var d=ke(c);if(d!==null)switch(d.tag){case 3:if(d=d.stateNode,d.current.memoizedState.isDehydrated){var p=gt(d.pendingLanes);if(p!==0){var T=d;for(T.pendingLanes|=2,T.entangledLanes|=2;p;){var _=1<<31-Lt(p);T.entanglements[1]|=_,p&=~_}On(d),(tt&6)===0&&(Co=yt()+500,Pi(0))}}break;case 31:case 13:T=Ga(d,2),T!==null&&Ca(T,d,2),Mo(),bf(d,2)}if(d=Nf(l),d===null&&rf(e,t,l,Yo,a),d===c)break;c=d}c!==null&&l.stopPropagation()}else rf(e,t,l,null,a)}}function Nf(e){return e=rr(e),wf(e)}var Yo=null;function wf(e){if(Yo=null,e=Un(e),e!==null){var t=f(e);if(t===null)e=null;else{var a=t.tag;if(a===13){if(e=b(t),e!==null)return e;e=null}else if(a===31){if(e=j(t),e!==null)return e;e=null}else if(a===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return Yo=e,null}function hg(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(Oa()){case Zs:return 2;case Ws:return 8;case es:case Xr:return 32;case dl:return 268435456;default:return 32}default:return 32}}var Sf=!1,$l=null,Pl=null,Yl=null,Qi=new Map,Xi=new Map,Fl=[],by="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 mg(e,t){switch(e){case"focusin":case"focusout":$l=null;break;case"dragenter":case"dragleave":Pl=null;break;case"mouseover":case"mouseout":Yl=null;break;case"pointerover":case"pointerout":Qi.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Xi.delete(t.pointerId)}}function Ji(e,t,a,l,c,d){return e===null||e.nativeEvent!==d?(e={blockedOn:t,domEventName:a,eventSystemFlags:l,nativeEvent:d,targetContainers:[c]},t!==null&&(t=ke(t),t!==null&&dg(t)),e):(e.eventSystemFlags|=l,t=e.targetContainers,c!==null&&t.indexOf(c)===-1&&t.push(c),e)}function jy(e,t,a,l,c){switch(t){case"focusin":return $l=Ji($l,e,t,a,l,c),!0;case"dragenter":return Pl=Ji(Pl,e,t,a,l,c),!0;case"mouseover":return Yl=Ji(Yl,e,t,a,l,c),!0;case"pointerover":var d=c.pointerId;return Qi.set(d,Ji(Qi.get(d)||null,e,t,a,l,c)),!0;case"gotpointercapture":return d=c.pointerId,Xi.set(d,Ji(Xi.get(d)||null,e,t,a,l,c)),!0}return!1}function gg(e){var t=Un(e.target);if(t!==null){var a=f(t);if(a!==null){if(t=a.tag,t===13){if(t=b(a),t!==null){e.blockedOn=t,ei(e.priority,function(){fg(a)});return}}else if(t===31){if(t=j(a),t!==null){e.blockedOn=t,ei(e.priority,function(){fg(a)});return}}else if(t===3&&a.stateNode.current.memoizedState.isDehydrated){e.blockedOn=a.tag===3?a.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Fo(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var a=Nf(e.nativeEvent);if(a===null){a=e.nativeEvent;var l=new a.constructor(a.type,a);si=l,a.target.dispatchEvent(l),si=null}else return t=ke(a),t!==null&&dg(t),e.blockedOn=a,!1;t.shift()}return!0}function xg(e,t,a){Fo(e)&&a.delete(t)}function Ny(){Sf=!1,$l!==null&&Fo($l)&&($l=null),Pl!==null&&Fo(Pl)&&(Pl=null),Yl!==null&&Fo(Yl)&&(Yl=null),Qi.forEach(xg),Xi.forEach(xg)}function Go(e,t){e.blockedOn===t&&(e.blockedOn=null,Sf||(Sf=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,Ny)))}var Zo=null;function pg(e){Zo!==e&&(Zo=e,n.unstable_scheduleCallback(n.unstable_NormalPriority,function(){Zo===e&&(Zo=null);for(var t=0;t<e.length;t+=3){var a=e[t],l=e[t+1],c=e[t+2];if(typeof l!="function"){if(wf(l||a)===null)continue;break}var d=ke(a);d!==null&&(e.splice(t,3),t-=3,jd(d,{pending:!0,data:c,method:a.method,action:l},l,c))}}))}function Br(e){function t(_){return Go(_,e)}$l!==null&&Go($l,e),Pl!==null&&Go(Pl,e),Yl!==null&&Go(Yl,e),Qi.forEach(t),Xi.forEach(t);for(var a=0;a<Fl.length;a++){var l=Fl[a];l.blockedOn===e&&(l.blockedOn=null)}for(;0<Fl.length&&(a=Fl[0],a.blockedOn===null);)gg(a),a.blockedOn===null&&Fl.shift();if(a=(e.ownerDocument||e).$$reactFormReplay,a!=null)for(l=0;l<a.length;l+=3){var c=a[l],d=a[l+1],p=c[Pt]||null;if(typeof d=="function")p||pg(a);else if(p){var T=null;if(d&&d.hasAttribute("formAction")){if(c=d,p=d[Pt]||null)T=p.formAction;else if(wf(c)!==null)continue}else T=p.action;typeof T=="function"?a[l+1]=T:(a.splice(l,3),l-=3),pg(a)}}}function vg(){function e(d){d.canIntercept&&d.info==="react-transition"&&d.intercept({handler:function(){return new Promise(function(p){return c=p})},focusReset:"manual",scroll:"manual"})}function t(){c!==null&&(c(),c=null),l||setTimeout(a,20)}function a(){if(!l&&!navigation.transition){var d=navigation.currentEntry;d&&d.url!=null&&navigation.navigate(d.url,{state:d.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var l=!1,c=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(a,100),function(){l=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),c!==null&&(c(),c=null)}}}function Ef(e){this._internalRoot=e}Wo.prototype.render=Ef.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(u(409));var a=t.current,l=La();og(a,l,e,t,null,null)},Wo.prototype.unmount=Ef.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;og(e.current,2,null,e,null,null),Mo(),t[Ln]=null}};function Wo(e){this._internalRoot=e}Wo.prototype.unstable_scheduleHydration=function(e){if(e){var t=er();e={blockedOn:null,target:e,priority:t};for(var a=0;a<Fl.length&&t!==0&&t<Fl[a].priority;a++);Fl.splice(a,0,e),a===0&&gg(e)}};var yg=r.version;if(yg!=="19.2.4")throw Error(u(527,yg,"19.2.4"));K.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(u(188)):(e=Object.keys(e).join(","),Error(u(268,e)));return e=x(t),e=e!==null?E(e):null,e=e===null?null:e.stateNode,e};var wy={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:P,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Io=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Io.isDisabled&&Io.supportsFiber)try{mt=Io.inject(wy),$t=Io}catch{}}return ec.createRoot=function(e,t){if(!h(e))throw Error(u(299));var a=!1,l="",c=Cm,d=Tm,p=Mm;return t!=null&&(t.unstable_strictMode===!0&&(a=!0),t.identifierPrefix!==void 0&&(l=t.identifierPrefix),t.onUncaughtError!==void 0&&(c=t.onUncaughtError),t.onCaughtError!==void 0&&(d=t.onCaughtError),t.onRecoverableError!==void 0&&(p=t.onRecoverableError)),t=ig(e,1,!1,null,null,a,l,null,c,d,p,vg),e[Ln]=t.current,sf(e),new Ef(t)},ec.hydrateRoot=function(e,t,a){if(!h(e))throw Error(u(299));var l=!1,c="",d=Cm,p=Tm,T=Mm,_=null;return a!=null&&(a.unstable_strictMode===!0&&(l=!0),a.identifierPrefix!==void 0&&(c=a.identifierPrefix),a.onUncaughtError!==void 0&&(d=a.onUncaughtError),a.onCaughtError!==void 0&&(p=a.onCaughtError),a.onRecoverableError!==void 0&&(T=a.onRecoverableError),a.formState!==void 0&&(_=a.formState)),t=ig(e,1,!0,t,a??null,l,c,_,d,p,T,vg),t.context=cg(null),a=t.current,l=La(),l=Ks(l),c=Rl(l),c.callback=null,Dl(a,c,l),a=l,t.current.lanes=a,hl(t,a),On(t),e[Ln]=t.current,sf(e),new Wo(t)},ec.version="19.2.4",ec}var Dg;function zy(){if(Dg)return Of.exports;Dg=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(r){console.error(r)}}return n(),Of.exports=_y(),Of.exports}var Ly=zy();const Uy=ah(Ly);/**
|
|
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 kg="popstate";function Hy(n={}){function r(h,f){let{pathname:b="/",search:j="",hash:y=""}=Ys(h.location.hash.substring(1));return!b.startsWith("/")&&!b.startsWith(".")&&(b="/"+b),Yf("",{pathname:b,search:j,hash:y},f.state&&f.state.usr||null,f.state&&f.state.key||"default")}function o(h,f){let b=h.document.querySelector("base"),j="";if(b&&b.getAttribute("href")){let y=h.location.href,x=y.indexOf("#");j=x===-1?y:y.slice(0,x)}return j+"#"+(typeof f=="string"?f:xc(f))}function u(h,f){tn(h.pathname.charAt(0)==="/",`relative pathnames are not supported in hash history.push(${JSON.stringify(f)})`)}return Vy(r,o,u,n)}function jt(n,r){if(n===!1||n===null||typeof n>"u")throw new Error(r)}function tn(n,r){if(!n){typeof console<"u"&&console.warn(r);try{throw new Error(r)}catch{}}}function qy(){return Math.random().toString(36).substring(2,10)}function Ag(n,r){return{usr:n.state,key:n.key,idx:r}}function Yf(n,r,o=null,u){return{pathname:typeof n=="string"?n:n.pathname,search:"",hash:"",...typeof r=="string"?Ys(r):r,state:o,key:r&&r.key||u||qy()}}function xc({pathname:n="/",search:r="",hash:o=""}){return r&&r!=="?"&&(n+=r.charAt(0)==="?"?r:"?"+r),o&&o!=="#"&&(n+=o.charAt(0)==="#"?o:"#"+o),n}function Ys(n){let r={};if(n){let o=n.indexOf("#");o>=0&&(r.hash=n.substring(o),n=n.substring(0,o));let u=n.indexOf("?");u>=0&&(r.search=n.substring(u),n=n.substring(0,u)),n&&(r.pathname=n)}return r}function Vy(n,r,o,u={}){let{window:h=document.defaultView,v5Compat:f=!1}=u,b=h.history,j="POP",y=null,x=E();x==null&&(x=0,b.replaceState({...b.state,idx:x},""));function E(){return(b.state||{idx:null}).idx}function M(){j="POP";let R=E(),W=R==null?null:R-x;x=R,y&&y({action:j,location:O.location,delta:W})}function D(R,W){j="PUSH";let L=Yf(O.location,R,W);o&&o(L,R),x=E()+1;let J=Ag(L,x),w=O.createHref(L);try{b.pushState(J,"",w)}catch(H){if(H instanceof DOMException&&H.name==="DataCloneError")throw H;h.location.assign(w)}f&&y&&y({action:j,location:O.location,delta:1})}function A(R,W){j="REPLACE";let L=Yf(O.location,R,W);o&&o(L,R),x=E();let J=Ag(L,x),w=O.createHref(L);b.replaceState(J,"",w),f&&y&&y({action:j,location:O.location,delta:0})}function N(R){return By(R)}let O={get action(){return j},get location(){return n(h,b)},listen(R){if(y)throw new Error("A history only accepts one active listener");return h.addEventListener(kg,M),y=R,()=>{h.removeEventListener(kg,M),y=null}},createHref(R){return r(h,R)},createURL:N,encodeLocation(R){let W=N(R);return{pathname:W.pathname,search:W.search,hash:W.hash}},push:D,replace:A,go(R){return b.go(R)}};return O}function By(n,r=!1){let o="http://localhost";typeof window<"u"&&(o=window.location.origin!=="null"?window.location.origin:window.location.href),jt(o,"No window.location.(origin|href) available to create URL");let u=typeof n=="string"?n:xc(n);return u=u.replace(/ $/,"%20"),!r&&u.startsWith("//")&&(u=o+u),new URL(u,o)}function Px(n,r,o="/"){return $y(n,r,o,!1)}function $y(n,r,o,u){let h=typeof r=="string"?Ys(r):r,f=ul(h.pathname||"/",o);if(f==null)return null;let b=Yx(n);Py(b);let j=null;for(let y=0;j==null&&y<b.length;++y){let x=eb(f);j=Jy(b[y],x,u)}return j}function Yx(n,r=[],o=[],u="",h=!1){let f=(b,j,y=h,x)=>{let E={relativePath:x===void 0?b.path||"":x,caseSensitive:b.caseSensitive===!0,childrenIndex:j,route:b};if(E.relativePath.startsWith("/")){if(!E.relativePath.startsWith(u)&&y)return;jt(E.relativePath.startsWith(u),`Absolute route path "${E.relativePath}" nested under path "${u}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),E.relativePath=E.relativePath.slice(u.length)}let M=ol([u,E.relativePath]),D=o.concat(E);b.children&&b.children.length>0&&(jt(b.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${M}".`),Yx(b.children,r,D,M,y)),!(b.path==null&&!b.index)&&r.push({path:M,score:Qy(M,b.index),routesMeta:D})};return n.forEach((b,j)=>{var y;if(b.path===""||!((y=b.path)!=null&&y.includes("?")))f(b,j);else for(let x of Fx(b.path))f(b,j,!0,x)}),r}function Fx(n){let r=n.split("/");if(r.length===0)return[];let[o,...u]=r,h=o.endsWith("?"),f=o.replace(/\?$/,"");if(u.length===0)return h?[f,""]:[f];let b=Fx(u.join("/")),j=[];return j.push(...b.map(y=>y===""?f:[f,y].join("/"))),h&&j.push(...b),j.map(y=>n.startsWith("/")&&y===""?"/":y)}function Py(n){n.sort((r,o)=>r.score!==o.score?o.score-r.score:Xy(r.routesMeta.map(u=>u.childrenIndex),o.routesMeta.map(u=>u.childrenIndex)))}var Yy=/^:[\w-]+$/,Fy=3,Gy=2,Zy=1,Wy=10,Iy=-2,_g=n=>n==="*";function Qy(n,r){let o=n.split("/"),u=o.length;return o.some(_g)&&(u+=Iy),r&&(u+=Gy),o.filter(h=>!_g(h)).reduce((h,f)=>h+(Yy.test(f)?Fy:f===""?Zy:Wy),u)}function Xy(n,r){return n.length===r.length&&n.slice(0,-1).every((u,h)=>u===r[h])?n[n.length-1]-r[r.length-1]:0}function Jy(n,r,o=!1){let{routesMeta:u}=n,h={},f="/",b=[];for(let j=0;j<u.length;++j){let y=u[j],x=j===u.length-1,E=f==="/"?r:r.slice(f.length)||"/",M=cu({path:y.relativePath,caseSensitive:y.caseSensitive,end:x},E),D=y.route;if(!M&&x&&o&&!u[u.length-1].route.index&&(M=cu({path:y.relativePath,caseSensitive:y.caseSensitive,end:!1},E)),!M)return null;Object.assign(h,M.params),b.push({params:h,pathname:ol([f,M.pathname]),pathnameBase:lb(ol([f,M.pathnameBase])),route:D}),M.pathnameBase!=="/"&&(f=ol([f,M.pathnameBase]))}return b}function cu(n,r){typeof n=="string"&&(n={path:n,caseSensitive:!1,end:!0});let[o,u]=Ky(n.path,n.caseSensitive,n.end),h=r.match(o);if(!h)return null;let f=h[0],b=f.replace(/(.)\/+$/,"$1"),j=h.slice(1);return{params:u.reduce((x,{paramName:E,isOptional:M},D)=>{if(E==="*"){let N=j[D]||"";b=f.slice(0,f.length-N.length).replace(/(.)\/+$/,"$1")}const A=j[D];return M&&!A?x[E]=void 0:x[E]=(A||"").replace(/%2F/g,"/"),x},{}),pathname:f,pathnameBase:b,pattern:n}}function Ky(n,r=!1,o=!0){tn(n==="*"||!n.endsWith("*")||n.endsWith("/*"),`Route path "${n}" will be treated as if it were "${n.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${n.replace(/\*$/,"/*")}".`);let u=[],h="^"+n.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(b,j,y)=>(u.push({paramName:j,isOptional:y!=null}),y?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return n.endsWith("*")?(u.push({paramName:"*"}),h+=n==="*"||n==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):o?h+="\\/*$":n!==""&&n!=="/"&&(h+="(?:(?=\\/|$))"),[new RegExp(h,r?void 0:"i"),u]}function eb(n){try{return n.split("/").map(r=>decodeURIComponent(r).replace(/\//g,"%2F")).join("/")}catch(r){return tn(!1,`The URL path "${n}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${r}).`),n}}function ul(n,r){if(r==="/")return n;if(!n.toLowerCase().startsWith(r.toLowerCase()))return null;let o=r.endsWith("/")?r.length-1:r.length,u=n.charAt(o);return u&&u!=="/"?null:n.slice(o)||"/"}var tb=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function ab(n,r="/"){let{pathname:o,search:u="",hash:h=""}=typeof n=="string"?Ys(n):n,f;return o?(o=o.replace(/\/\/+/g,"/"),o.startsWith("/")?f=zg(o.substring(1),"/"):f=zg(o,r)):f=r,{pathname:f,search:sb(u),hash:rb(h)}}function zg(n,r){let o=r.replace(/\/+$/,"").split("/");return n.split("/").forEach(h=>{h===".."?o.length>1&&o.pop():h!=="."&&o.push(h)}),o.length>1?o.join("/"):"/"}function Af(n,r,o,u){return`Cannot include a '${n}' character in a manually specified \`to.${r}\` field [${JSON.stringify(u)}]. Please separate it out to the \`to.${o}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function nb(n){return n.filter((r,o)=>o===0||r.route.path&&r.route.path.length>0)}function lh(n){let r=nb(n);return r.map((o,u)=>u===r.length-1?o.pathname:o.pathnameBase)}function sh(n,r,o,u=!1){let h;typeof n=="string"?h=Ys(n):(h={...n},jt(!h.pathname||!h.pathname.includes("?"),Af("?","pathname","search",h)),jt(!h.pathname||!h.pathname.includes("#"),Af("#","pathname","hash",h)),jt(!h.search||!h.search.includes("#"),Af("#","search","hash",h)));let f=n===""||h.pathname==="",b=f?"/":h.pathname,j;if(b==null)j=o;else{let M=r.length-1;if(!u&&b.startsWith("..")){let D=b.split("/");for(;D[0]==="..";)D.shift(),M-=1;h.pathname=D.join("/")}j=M>=0?r[M]:"/"}let y=ab(h,j),x=b&&b!=="/"&&b.endsWith("/"),E=(f||b===".")&&o.endsWith("/");return!y.pathname.endsWith("/")&&(x||E)&&(y.pathname+="/"),y}var ol=n=>n.join("/").replace(/\/\/+/g,"/"),lb=n=>n.replace(/\/+$/,"").replace(/^\/*/,"/"),sb=n=>!n||n==="?"?"":n.startsWith("?")?n:"?"+n,rb=n=>!n||n==="#"?"":n.startsWith("#")?n:"#"+n,ib=class{constructor(n,r,o,u=!1){this.status=n,this.statusText=r||"",this.internal=u,o instanceof Error?(this.data=o.toString(),this.error=o):this.data=o}};function cb(n){return n!=null&&typeof n.status=="number"&&typeof n.statusText=="string"&&typeof n.internal=="boolean"&&"data"in n}function ob(n){return n.map(r=>r.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var Gx=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Zx(n,r){let o=n;if(typeof o!="string"||!tb.test(o))return{absoluteURL:void 0,isExternal:!1,to:o};let u=o,h=!1;if(Gx)try{let f=new URL(window.location.href),b=o.startsWith("//")?new URL(f.protocol+o):new URL(o),j=ul(b.pathname,r);b.origin===f.origin&&j!=null?o=j+b.search+b.hash:h=!0}catch{tn(!1,`<Link to="${o}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:u,isExternal:h,to:o}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var Wx=["POST","PUT","PATCH","DELETE"];new Set(Wx);var ub=["GET",...Wx];new Set(ub);var Zr=z.createContext(null);Zr.displayName="DataRouter";var gu=z.createContext(null);gu.displayName="DataRouterState";var db=z.createContext(!1),Ix=z.createContext({isTransitioning:!1});Ix.displayName="ViewTransition";var fb=z.createContext(new Map);fb.displayName="Fetchers";var hb=z.createContext(null);hb.displayName="Await";var Ba=z.createContext(null);Ba.displayName="Navigation";var jc=z.createContext(null);jc.displayName="Location";var Dn=z.createContext({outlet:null,matches:[],isDataRoute:!1});Dn.displayName="Route";var rh=z.createContext(null);rh.displayName="RouteError";var Qx="REACT_ROUTER_ERROR",mb="REDIRECT",gb="ROUTE_ERROR_RESPONSE";function xb(n){if(n.startsWith(`${Qx}:${mb}:{`))try{let r=JSON.parse(n.slice(28));if(typeof r=="object"&&r&&typeof r.status=="number"&&typeof r.statusText=="string"&&typeof r.location=="string"&&typeof r.reloadDocument=="boolean"&&typeof r.replace=="boolean")return r}catch{}}function pb(n){if(n.startsWith(`${Qx}:${gb}:{`))try{let r=JSON.parse(n.slice(40));if(typeof r=="object"&&r&&typeof r.status=="number"&&typeof r.statusText=="string")return new ib(r.status,r.statusText,r.data)}catch{}}function vb(n,{relative:r}={}){jt(Wr(),"useHref() may be used only in the context of a <Router> component.");let{basename:o,navigator:u}=z.useContext(Ba),{hash:h,pathname:f,search:b}=Nc(n,{relative:r}),j=f;return o!=="/"&&(j=f==="/"?o:ol([o,f])),u.createHref({pathname:j,search:b,hash:h})}function Wr(){return z.useContext(jc)!=null}function kn(){return jt(Wr(),"useLocation() may be used only in the context of a <Router> component."),z.useContext(jc).location}var Xx="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Jx(n){z.useContext(Ba).static||z.useLayoutEffect(n)}function xu(){let{isDataRoute:n}=z.useContext(Dn);return n?Db():yb()}function yb(){jt(Wr(),"useNavigate() may be used only in the context of a <Router> component.");let n=z.useContext(Zr),{basename:r,navigator:o}=z.useContext(Ba),{matches:u}=z.useContext(Dn),{pathname:h}=kn(),f=JSON.stringify(lh(u)),b=z.useRef(!1);return Jx(()=>{b.current=!0}),z.useCallback((y,x={})=>{if(tn(b.current,Xx),!b.current)return;if(typeof y=="number"){o.go(y);return}let E=sh(y,JSON.parse(f),h,x.relative==="path");n==null&&r!=="/"&&(E.pathname=E.pathname==="/"?r:ol([r,E.pathname])),(x.replace?o.replace:o.push)(E,x.state,x)},[r,o,f,h,n])}z.createContext(null);function Nc(n,{relative:r}={}){let{matches:o}=z.useContext(Dn),{pathname:u}=kn(),h=JSON.stringify(lh(o));return z.useMemo(()=>sh(n,JSON.parse(h),u,r==="path"),[n,h,u,r])}function bb(n,r){return Kx(n,r)}function Kx(n,r,o,u,h){var L;jt(Wr(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:f}=z.useContext(Ba),{matches:b}=z.useContext(Dn),j=b[b.length-1],y=j?j.params:{},x=j?j.pathname:"/",E=j?j.pathnameBase:"/",M=j&&j.route;{let J=M&&M.path||"";tp(x,!M||J.endsWith("*")||J.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${x}" (under <Route path="${J}">) 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="${J}"> to <Route path="${J==="/"?"*":`${J}/*`}">.`)}let D=kn(),A;if(r){let J=typeof r=="string"?Ys(r):r;jt(E==="/"||((L=J.pathname)==null?void 0:L.startsWith(E)),`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 "${E}" but pathname "${J.pathname}" was given in the \`location\` prop.`),A=J}else A=D;let N=A.pathname||"/",O=N;if(E!=="/"){let J=E.replace(/^\//,"").split("/");O="/"+N.replace(/^\//,"").split("/").slice(J.length).join("/")}let R=Px(n,{pathname:O});tn(M||R!=null,`No routes matched location "${A.pathname}${A.search}${A.hash}" `),tn(R==null||R[R.length-1].route.element!==void 0||R[R.length-1].route.Component!==void 0||R[R.length-1].route.lazy!==void 0,`Matched leaf route at location "${A.pathname}${A.search}${A.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 W=Eb(R&&R.map(J=>Object.assign({},J,{params:Object.assign({},y,J.params),pathname:ol([E,f.encodeLocation?f.encodeLocation(J.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:J.pathname]),pathnameBase:J.pathnameBase==="/"?E:ol([E,f.encodeLocation?f.encodeLocation(J.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:J.pathnameBase])})),b,o,u,h);return r&&W?z.createElement(jc.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...A},navigationType:"POP"}},W):W}function jb(){let n=Rb(),r=cb(n)?`${n.status} ${n.statusText}`:n instanceof Error?n.message:JSON.stringify(n),o=n instanceof Error?n.stack:null,u="rgba(200,200,200, 0.5)",h={padding:"0.5rem",backgroundColor:u},f={padding:"2px 4px",backgroundColor:u},b=null;return console.error("Error handled by React Router default ErrorBoundary:",n),b=z.createElement(z.Fragment,null,z.createElement("p",null,"💿 Hey developer 👋"),z.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",z.createElement("code",{style:f},"ErrorBoundary")," or"," ",z.createElement("code",{style:f},"errorElement")," prop on your route.")),z.createElement(z.Fragment,null,z.createElement("h2",null,"Unexpected Application Error!"),z.createElement("h3",{style:{fontStyle:"italic"}},r),o?z.createElement("pre",{style:h},o):null,b)}var Nb=z.createElement(jb,null),ep=class extends z.Component{constructor(n){super(n),this.state={location:n.location,revalidation:n.revalidation,error:n.error}}static getDerivedStateFromError(n){return{error:n}}static getDerivedStateFromProps(n,r){return r.location!==n.location||r.revalidation!=="idle"&&n.revalidation==="idle"?{error:n.error,location:n.location,revalidation:n.revalidation}:{error:n.error!==void 0?n.error:r.error,location:r.location,revalidation:n.revalidation||r.revalidation}}componentDidCatch(n,r){this.props.onError?this.props.onError(n,r):console.error("React Router caught the following error during render",n)}render(){let n=this.state.error;if(this.context&&typeof n=="object"&&n&&"digest"in n&&typeof n.digest=="string"){const o=pb(n.digest);o&&(n=o)}let r=n!==void 0?z.createElement(Dn.Provider,{value:this.props.routeContext},z.createElement(rh.Provider,{value:n,children:this.props.component})):this.props.children;return this.context?z.createElement(wb,{error:n},r):r}};ep.contextType=db;var _f=new WeakMap;function wb({children:n,error:r}){let{basename:o}=z.useContext(Ba);if(typeof r=="object"&&r&&"digest"in r&&typeof r.digest=="string"){let u=xb(r.digest);if(u){let h=_f.get(r);if(h)throw h;let f=Zx(u.location,o);if(Gx&&!_f.get(r))if(f.isExternal||u.reloadDocument)window.location.href=f.absoluteURL||f.to;else{const b=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(f.to,{replace:u.replace}));throw _f.set(r,b),b}return z.createElement("meta",{httpEquiv:"refresh",content:`0;url=${f.absoluteURL||f.to}`})}}return n}function Sb({routeContext:n,match:r,children:o}){let u=z.useContext(Zr);return u&&u.static&&u.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(u.staticContext._deepestRenderedBoundaryId=r.route.id),z.createElement(Dn.Provider,{value:n},o)}function Eb(n,r=[],o=null,u=null,h=null){if(n==null){if(!o)return null;if(o.errors)n=o.matches;else if(r.length===0&&!o.initialized&&o.matches.length>0)n=o.matches;else return null}let f=n,b=o==null?void 0:o.errors;if(b!=null){let E=f.findIndex(M=>M.route.id&&(b==null?void 0:b[M.route.id])!==void 0);jt(E>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(b).join(",")}`),f=f.slice(0,Math.min(f.length,E+1))}let j=!1,y=-1;if(o)for(let E=0;E<f.length;E++){let M=f[E];if((M.route.HydrateFallback||M.route.hydrateFallbackElement)&&(y=E),M.route.id){let{loaderData:D,errors:A}=o,N=M.route.loader&&!D.hasOwnProperty(M.route.id)&&(!A||A[M.route.id]===void 0);if(M.route.lazy||N){j=!0,y>=0?f=f.slice(0,y+1):f=[f[0]];break}}}let x=o&&u?(E,M)=>{var D,A;u(E,{location:o.location,params:((A=(D=o.matches)==null?void 0:D[0])==null?void 0:A.params)??{},unstable_pattern:ob(o.matches),errorInfo:M})}:void 0;return f.reduceRight((E,M,D)=>{let A,N=!1,O=null,R=null;o&&(A=b&&M.route.id?b[M.route.id]:void 0,O=M.route.errorElement||Nb,j&&(y<0&&D===0?(tp("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),N=!0,R=null):y===D&&(N=!0,R=M.route.hydrateFallbackElement||null)));let W=r.concat(f.slice(0,D+1)),L=()=>{let J;return A?J=O:N?J=R:M.route.Component?J=z.createElement(M.route.Component,null):M.route.element?J=M.route.element:J=E,z.createElement(Sb,{match:M,routeContext:{outlet:E,matches:W,isDataRoute:o!=null},children:J})};return o&&(M.route.ErrorBoundary||M.route.errorElement||D===0)?z.createElement(ep,{location:o.location,revalidation:o.revalidation,component:O,error:A,children:L(),routeContext:{outlet:null,matches:W,isDataRoute:!0},onError:x}):L()},null)}function ih(n){return`${n} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Cb(n){let r=z.useContext(Zr);return jt(r,ih(n)),r}function Tb(n){let r=z.useContext(gu);return jt(r,ih(n)),r}function Mb(n){let r=z.useContext(Dn);return jt(r,ih(n)),r}function ch(n){let r=Mb(n),o=r.matches[r.matches.length-1];return jt(o.route.id,`${n} can only be used on routes that contain a unique "id"`),o.route.id}function Ob(){return ch("useRouteId")}function Rb(){var u;let n=z.useContext(rh),r=Tb("useRouteError"),o=ch("useRouteError");return n!==void 0?n:(u=r.errors)==null?void 0:u[o]}function Db(){let{router:n}=Cb("useNavigate"),r=ch("useNavigate"),o=z.useRef(!1);return Jx(()=>{o.current=!0}),z.useCallback(async(h,f={})=>{tn(o.current,Xx),o.current&&(typeof h=="number"?await n.navigate(h):await n.navigate(h,{fromRouteId:r,...f}))},[n,r])}var Lg={};function tp(n,r,o){!r&&!Lg[n]&&(Lg[n]=!0,tn(!1,o))}z.memo(kb);function kb({routes:n,future:r,state:o,onError:u}){return Kx(n,void 0,o,u,r)}function Ab({to:n,replace:r,state:o,relative:u}){jt(Wr(),"<Navigate> may be used only in the context of a <Router> component.");let{static:h}=z.useContext(Ba);tn(!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:f}=z.useContext(Dn),{pathname:b}=kn(),j=xu(),y=sh(n,lh(f),b,u==="path"),x=JSON.stringify(y);return z.useEffect(()=>{j(JSON.parse(x),{replace:r,state:o,relative:u})},[j,x,u,r,o]),null}function Rn(n){jt(!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 _b({basename:n="/",children:r=null,location:o,navigationType:u="POP",navigator:h,static:f=!1,unstable_useTransitions:b}){jt(!Wr(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let j=n.replace(/^\/*/,"/"),y=z.useMemo(()=>({basename:j,navigator:h,static:f,unstable_useTransitions:b,future:{}}),[j,h,f,b]);typeof o=="string"&&(o=Ys(o));let{pathname:x="/",search:E="",hash:M="",state:D=null,key:A="default"}=o,N=z.useMemo(()=>{let O=ul(x,j);return O==null?null:{location:{pathname:O,search:E,hash:M,state:D,key:A},navigationType:u}},[j,x,E,M,D,A,u]);return tn(N!=null,`<Router basename="${j}"> is not able to match the URL "${x}${E}${M}" because it does not start with the basename, so the <Router> won't render anything.`),N==null?null:z.createElement(Ba.Provider,{value:y},z.createElement(jc.Provider,{children:r,value:N}))}function zb({children:n,location:r}){return bb(Ff(n),r)}function Ff(n,r=[]){let o=[];return z.Children.forEach(n,(u,h)=>{if(!z.isValidElement(u))return;let f=[...r,h];if(u.type===z.Fragment){o.push.apply(o,Ff(u.props.children,f));return}jt(u.type===Rn,`[${typeof u.type=="string"?u.type:u.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),jt(!u.props.index||!u.props.children,"An index route cannot have child routes.");let b={id:u.props.id||f.join("-"),caseSensitive:u.props.caseSensitive,element:u.props.element,Component:u.props.Component,index:u.props.index,path:u.props.path,middleware:u.props.middleware,loader:u.props.loader,action:u.props.action,hydrateFallbackElement:u.props.hydrateFallbackElement,HydrateFallback:u.props.HydrateFallback,errorElement:u.props.errorElement,ErrorBoundary:u.props.ErrorBoundary,hasErrorBoundary:u.props.hasErrorBoundary===!0||u.props.ErrorBoundary!=null||u.props.errorElement!=null,shouldRevalidate:u.props.shouldRevalidate,handle:u.props.handle,lazy:u.props.lazy};u.props.children&&(b.children=Ff(u.props.children,f)),o.push(b)}),o}var su="get",ru="application/x-www-form-urlencoded";function pu(n){return typeof HTMLElement<"u"&&n instanceof HTMLElement}function Lb(n){return pu(n)&&n.tagName.toLowerCase()==="button"}function Ub(n){return pu(n)&&n.tagName.toLowerCase()==="form"}function Hb(n){return pu(n)&&n.tagName.toLowerCase()==="input"}function qb(n){return!!(n.metaKey||n.altKey||n.ctrlKey||n.shiftKey)}function Vb(n,r){return n.button===0&&(!r||r==="_self")&&!qb(n)}var Qo=null;function Bb(){if(Qo===null)try{new FormData(document.createElement("form"),0),Qo=!1}catch{Qo=!0}return Qo}var $b=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function zf(n){return n!=null&&!$b.has(n)?(tn(!1,`"${n}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${ru}"`),null):n}function Pb(n,r){let o,u,h,f,b;if(Ub(n)){let j=n.getAttribute("action");u=j?ul(j,r):null,o=n.getAttribute("method")||su,h=zf(n.getAttribute("enctype"))||ru,f=new FormData(n)}else if(Lb(n)||Hb(n)&&(n.type==="submit"||n.type==="image")){let j=n.form;if(j==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let y=n.getAttribute("formaction")||j.getAttribute("action");if(u=y?ul(y,r):null,o=n.getAttribute("formmethod")||j.getAttribute("method")||su,h=zf(n.getAttribute("formenctype"))||zf(j.getAttribute("enctype"))||ru,f=new FormData(j,n),!Bb()){let{name:x,type:E,value:M}=n;if(E==="image"){let D=x?`${x}.`:"";f.append(`${D}x`,"0"),f.append(`${D}y`,"0")}else x&&f.append(x,M)}}else{if(pu(n))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');o=su,u=null,h=ru,b=n}return f&&h==="text/plain"&&(b=f,f=void 0),{action:u,method:o.toLowerCase(),encType:h,formData:f,body:b}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function oh(n,r){if(n===!1||n===null||typeof n>"u")throw new Error(r)}function Yb(n,r,o,u){let h=typeof n=="string"?new URL(n,typeof window>"u"?"server://singlefetch/":window.location.origin):n;return o?h.pathname.endsWith("/")?h.pathname=`${h.pathname}_.${u}`:h.pathname=`${h.pathname}.${u}`:h.pathname==="/"?h.pathname=`_root.${u}`:r&&ul(h.pathname,r)==="/"?h.pathname=`${r.replace(/\/$/,"")}/_root.${u}`:h.pathname=`${h.pathname.replace(/\/$/,"")}.${u}`,h}async function Fb(n,r){if(n.id in r)return r[n.id];try{let o=await import(n.module);return r[n.id]=o,o}catch(o){return console.error(`Error loading route module \`${n.module}\`, reloading page...`),console.error(o),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function Gb(n){return n==null?!1:n.href==null?n.rel==="preload"&&typeof n.imageSrcSet=="string"&&typeof n.imageSizes=="string":typeof n.rel=="string"&&typeof n.href=="string"}async function Zb(n,r,o){let u=await Promise.all(n.map(async h=>{let f=r.routes[h.route.id];if(f){let b=await Fb(f,o);return b.links?b.links():[]}return[]}));return Xb(u.flat(1).filter(Gb).filter(h=>h.rel==="stylesheet"||h.rel==="preload").map(h=>h.rel==="stylesheet"?{...h,rel:"prefetch",as:"style"}:{...h,rel:"prefetch"}))}function Ug(n,r,o,u,h,f){let b=(y,x)=>o[x]?y.route.id!==o[x].route.id:!0,j=(y,x)=>{var E;return o[x].pathname!==y.pathname||((E=o[x].route.path)==null?void 0:E.endsWith("*"))&&o[x].params["*"]!==y.params["*"]};return f==="assets"?r.filter((y,x)=>b(y,x)||j(y,x)):f==="data"?r.filter((y,x)=>{var M;let E=u.routes[y.route.id];if(!E||!E.hasLoader)return!1;if(b(y,x)||j(y,x))return!0;if(y.route.shouldRevalidate){let D=y.route.shouldRevalidate({currentUrl:new URL(h.pathname+h.search+h.hash,window.origin),currentParams:((M=o[0])==null?void 0:M.params)||{},nextUrl:new URL(n,window.origin),nextParams:y.params,defaultShouldRevalidate:!0});if(typeof D=="boolean")return D}return!0}):[]}function Wb(n,r,{includeHydrateFallback:o}={}){return Ib(n.map(u=>{let h=r.routes[u.route.id];if(!h)return[];let f=[h.module];return h.clientActionModule&&(f=f.concat(h.clientActionModule)),h.clientLoaderModule&&(f=f.concat(h.clientLoaderModule)),o&&h.hydrateFallbackModule&&(f=f.concat(h.hydrateFallbackModule)),h.imports&&(f=f.concat(h.imports)),f}).flat(1))}function Ib(n){return[...new Set(n)]}function Qb(n){let r={},o=Object.keys(n).sort();for(let u of o)r[u]=n[u];return r}function Xb(n,r){let o=new Set;return new Set(r),n.reduce((u,h)=>{let f=JSON.stringify(Qb(h));return o.has(f)||(o.add(f),u.push({key:f,link:h})),u},[])}function ap(){let n=z.useContext(Zr);return oh(n,"You must render this element inside a <DataRouterContext.Provider> element"),n}function Jb(){let n=z.useContext(gu);return oh(n,"You must render this element inside a <DataRouterStateContext.Provider> element"),n}var uh=z.createContext(void 0);uh.displayName="FrameworkContext";function np(){let n=z.useContext(uh);return oh(n,"You must render this element inside a <HydratedRouter> element"),n}function Kb(n,r){let o=z.useContext(uh),[u,h]=z.useState(!1),[f,b]=z.useState(!1),{onFocus:j,onBlur:y,onMouseEnter:x,onMouseLeave:E,onTouchStart:M}=r,D=z.useRef(null);z.useEffect(()=>{if(n==="render"&&b(!0),n==="viewport"){let O=W=>{W.forEach(L=>{b(L.isIntersecting)})},R=new IntersectionObserver(O,{threshold:.5});return D.current&&R.observe(D.current),()=>{R.disconnect()}}},[n]),z.useEffect(()=>{if(u){let O=setTimeout(()=>{b(!0)},100);return()=>{clearTimeout(O)}}},[u]);let A=()=>{h(!0)},N=()=>{h(!1),b(!1)};return o?n!=="intent"?[f,D,{}]:[f,D,{onFocus:tc(j,A),onBlur:tc(y,N),onMouseEnter:tc(x,A),onMouseLeave:tc(E,N),onTouchStart:tc(M,A)}]:[!1,D,{}]}function tc(n,r){return o=>{n&&n(o),o.defaultPrevented||r(o)}}function e1({page:n,...r}){let{router:o}=ap(),u=z.useMemo(()=>Px(o.routes,n,o.basename),[o.routes,n,o.basename]);return u?z.createElement(a1,{page:n,matches:u,...r}):null}function t1(n){let{manifest:r,routeModules:o}=np(),[u,h]=z.useState([]);return z.useEffect(()=>{let f=!1;return Zb(n,r,o).then(b=>{f||h(b)}),()=>{f=!0}},[n,r,o]),u}function a1({page:n,matches:r,...o}){let u=kn(),{future:h,manifest:f,routeModules:b}=np(),{basename:j}=ap(),{loaderData:y,matches:x}=Jb(),E=z.useMemo(()=>Ug(n,r,x,f,u,"data"),[n,r,x,f,u]),M=z.useMemo(()=>Ug(n,r,x,f,u,"assets"),[n,r,x,f,u]),D=z.useMemo(()=>{if(n===u.pathname+u.search+u.hash)return[];let O=new Set,R=!1;if(r.forEach(L=>{var w;let J=f.routes[L.route.id];!J||!J.hasLoader||(!E.some(H=>H.route.id===L.route.id)&&L.route.id in y&&((w=b[L.route.id])!=null&&w.shouldRevalidate)||J.hasClientLoader?R=!0:O.add(L.route.id))}),O.size===0)return[];let W=Yb(n,j,h.unstable_trailingSlashAwareDataRequests,"data");return R&&O.size>0&&W.searchParams.set("_routes",r.filter(L=>O.has(L.route.id)).map(L=>L.route.id).join(",")),[W.pathname+W.search]},[j,h.unstable_trailingSlashAwareDataRequests,y,u,f,E,r,n,b]),A=z.useMemo(()=>Wb(M,f),[M,f]),N=t1(M);return z.createElement(z.Fragment,null,D.map(O=>z.createElement("link",{key:O,rel:"prefetch",as:"fetch",href:O,...o})),A.map(O=>z.createElement("link",{key:O,rel:"modulepreload",href:O,...o})),N.map(({key:O,link:R})=>z.createElement("link",{key:O,nonce:o.nonce,...R,crossOrigin:R.crossOrigin??o.crossOrigin})))}function n1(...n){return r=>{n.forEach(o=>{typeof o=="function"?o(r):o!=null&&(o.current=r)})}}var l1=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{l1&&(window.__reactRouterVersion="7.13.0")}catch{}function s1({basename:n,children:r,unstable_useTransitions:o,window:u}){let h=z.useRef();h.current==null&&(h.current=Hy({window:u,v5Compat:!0}));let f=h.current,[b,j]=z.useState({action:f.action,location:f.location}),y=z.useCallback(x=>{o===!1?j(x):z.startTransition(()=>j(x))},[o]);return z.useLayoutEffect(()=>f.listen(y),[f,y]),z.createElement(_b,{basename:n,children:r,location:b.location,navigationType:b.action,navigator:f,unstable_useTransitions:o})}var lp=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,sp=z.forwardRef(function({onClick:r,discover:o="render",prefetch:u="none",relative:h,reloadDocument:f,replace:b,state:j,target:y,to:x,preventScrollReset:E,viewTransition:M,unstable_defaultShouldRevalidate:D,...A},N){let{basename:O,unstable_useTransitions:R}=z.useContext(Ba),W=typeof x=="string"&&lp.test(x),L=Zx(x,O);x=L.to;let J=vb(x,{relative:h}),[w,H,q]=Kb(u,A),G=c1(x,{replace:b,state:j,target:y,preventScrollReset:E,relative:h,viewTransition:M,unstable_defaultShouldRevalidate:D,unstable_useTransitions:R});function Z(S){r&&r(S),S.defaultPrevented||G(S)}let le=z.createElement("a",{...A,...q,href:L.absoluteURL||J,onClick:L.isExternal||f?r:Z,ref:n1(N,H),target:y,"data-discover":!W&&o==="render"?"true":void 0});return w&&!W?z.createElement(z.Fragment,null,le,z.createElement(e1,{page:J})):le});sp.displayName="Link";var rp=z.forwardRef(function({"aria-current":r="page",caseSensitive:o=!1,className:u="",end:h=!1,style:f,to:b,viewTransition:j,children:y,...x},E){let M=Nc(b,{relative:x.relative}),D=kn(),A=z.useContext(gu),{navigator:N,basename:O}=z.useContext(Ba),R=A!=null&&h1(M)&&j===!0,W=N.encodeLocation?N.encodeLocation(M).pathname:M.pathname,L=D.pathname,J=A&&A.navigation&&A.navigation.location?A.navigation.location.pathname:null;o||(L=L.toLowerCase(),J=J?J.toLowerCase():null,W=W.toLowerCase()),J&&O&&(J=ul(J,O)||J);const w=W!=="/"&&W.endsWith("/")?W.length-1:W.length;let H=L===W||!h&&L.startsWith(W)&&L.charAt(w)==="/",q=J!=null&&(J===W||!h&&J.startsWith(W)&&J.charAt(W.length)==="/"),G={isActive:H,isPending:q,isTransitioning:R},Z=H?r:void 0,le;typeof u=="function"?le=u(G):le=[u,H?"active":null,q?"pending":null,R?"transitioning":null].filter(Boolean).join(" ");let S=typeof f=="function"?f(G):f;return z.createElement(sp,{...x,"aria-current":Z,className:le,ref:E,style:S,to:b,viewTransition:j},typeof y=="function"?y(G):y)});rp.displayName="NavLink";var r1=z.forwardRef(({discover:n="render",fetcherKey:r,navigate:o,reloadDocument:u,replace:h,state:f,method:b=su,action:j,onSubmit:y,relative:x,preventScrollReset:E,viewTransition:M,unstable_defaultShouldRevalidate:D,...A},N)=>{let{unstable_useTransitions:O}=z.useContext(Ba),R=d1(),W=f1(j,{relative:x}),L=b.toLowerCase()==="get"?"get":"post",J=typeof j=="string"&&lp.test(j),w=H=>{if(y&&y(H),H.defaultPrevented)return;H.preventDefault();let q=H.nativeEvent.submitter,G=(q==null?void 0:q.getAttribute("formmethod"))||b,Z=()=>R(q||H.currentTarget,{fetcherKey:r,method:G,navigate:o,replace:h,state:f,relative:x,preventScrollReset:E,viewTransition:M,unstable_defaultShouldRevalidate:D});O&&o!==!1?z.startTransition(()=>Z()):Z()};return z.createElement("form",{ref:N,method:L,action:W,onSubmit:u?y:w,...A,"data-discover":!J&&n==="render"?"true":void 0})});r1.displayName="Form";function i1(n){return`${n} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function ip(n){let r=z.useContext(Zr);return jt(r,i1(n)),r}function c1(n,{target:r,replace:o,state:u,preventScrollReset:h,relative:f,viewTransition:b,unstable_defaultShouldRevalidate:j,unstable_useTransitions:y}={}){let x=xu(),E=kn(),M=Nc(n,{relative:f});return z.useCallback(D=>{if(Vb(D,r)){D.preventDefault();let A=o!==void 0?o:xc(E)===xc(M),N=()=>x(n,{replace:A,state:u,preventScrollReset:h,relative:f,viewTransition:b,unstable_defaultShouldRevalidate:j});y?z.startTransition(()=>N()):N()}},[E,x,M,o,u,r,n,h,f,b,j,y])}var o1=0,u1=()=>`__${String(++o1)}__`;function d1(){let{router:n}=ip("useSubmit"),{basename:r}=z.useContext(Ba),o=Ob(),u=n.fetch,h=n.navigate;return z.useCallback(async(f,b={})=>{let{action:j,method:y,encType:x,formData:E,body:M}=Pb(f,r);if(b.navigate===!1){let D=b.fetcherKey||u1();await u(D,o,b.action||j,{unstable_defaultShouldRevalidate:b.unstable_defaultShouldRevalidate,preventScrollReset:b.preventScrollReset,formData:E,body:M,formMethod:b.method||y,formEncType:b.encType||x,flushSync:b.flushSync})}else await h(b.action||j,{unstable_defaultShouldRevalidate:b.unstable_defaultShouldRevalidate,preventScrollReset:b.preventScrollReset,formData:E,body:M,formMethod:b.method||y,formEncType:b.encType||x,replace:b.replace,state:b.state,fromRouteId:o,flushSync:b.flushSync,viewTransition:b.viewTransition})},[u,h,r,o])}function f1(n,{relative:r}={}){let{basename:o}=z.useContext(Ba),u=z.useContext(Dn);jt(u,"useFormAction must be used inside a RouteContext");let[h]=u.matches.slice(-1),f={...Nc(n||".",{relative:r})},b=kn();if(n==null){f.search=b.search;let j=new URLSearchParams(f.search),y=j.getAll("index");if(y.some(E=>E==="")){j.delete("index"),y.filter(M=>M).forEach(M=>j.append("index",M));let E=j.toString();f.search=E?`?${E}`:""}}return(!n||n===".")&&h.route.index&&(f.search=f.search?f.search.replace(/^\?/,"?index&"):"?index"),o!=="/"&&(f.pathname=f.pathname==="/"?o:ol([o,f.pathname])),xc(f)}function h1(n,{relative:r}={}){let o=z.useContext(Ix);jt(o!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:u}=ip("useViewTransitionState"),h=Nc(n,{relative:r});if(!o.isTransitioning)return!1;let f=ul(o.currentLocation.pathname,u)||o.currentLocation.pathname,b=ul(o.nextLocation.pathname,u)||o.nextLocation.pathname;return cu(h.pathname,b)!=null||cu(h.pathname,f)!=null}var m1=$x();const g1=ah(m1);/**
|
|
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 cp=(...n)=>n.filter((r,o,u)=>!!r&&r.trim()!==""&&u.indexOf(r)===o).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 x1=n=>n.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 p1=n=>n.replace(/^([A-Z])|[\s-_]+(\w)/g,(r,o,u)=>u?u.toUpperCase():o.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 Hg=n=>{const r=p1(n);return r.charAt(0).toUpperCase()+r.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 v1={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 y1=n=>{for(const r in n)if(r.startsWith("aria-")||r==="role"||r==="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 b1=z.forwardRef(({color:n="currentColor",size:r=24,strokeWidth:o=2,absoluteStrokeWidth:u,className:h="",children:f,iconNode:b,...j},y)=>z.createElement("svg",{ref:y,...v1,width:r,height:r,stroke:n,strokeWidth:u?Number(o)*24/Number(r):o,className:cp("lucide",h),...!f&&!y1(j)&&{"aria-hidden":"true"},...j},[...b.map(([x,E])=>z.createElement(x,E)),...Array.isArray(f)?f:[f]]));/**
|
|
96
|
+
* @license lucide-react v0.564.0 - ISC
|
|
97
|
+
*
|
|
98
|
+
* This source code is licensed under the ISC license.
|
|
99
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
100
|
+
*/const Ce=(n,r)=>{const o=z.forwardRef(({className:u,...h},f)=>z.createElement(b1,{ref:f,iconNode:r,className:cp(`lucide-${x1(Hg(n))}`,`lucide-${n}`,u),...h}));return o.displayName=Hg(n),o};/**
|
|
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 j1=[["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"}]],op=Ce("activity",j1);/**
|
|
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 N1=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],w1=Ce("arrow-down",N1);/**
|
|
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 S1=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],Gf=Ce("arrow-right",S1);/**
|
|
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 E1=[["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"}]],C1=Ce("arrow-up-down",E1);/**
|
|
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 T1=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],M1=Ce("arrow-up",T1);/**
|
|
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 O1=[["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"}]],R1=Ce("bell",O1);/**
|
|
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 D1=[["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"}]],qg=Ce("briefcase",D1);/**
|
|
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 k1=[["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"}]],up=Ce("calendar",k1);/**
|
|
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 A1=[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]],vu=Ce("chart-column",A1);/**
|
|
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 _1=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],z1=Ce("check",_1);/**
|
|
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 L1=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],dh=Ce("chevron-down",L1);/**
|
|
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 U1=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],H1=Ce("chevron-left",U1);/**
|
|
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 q1=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],V1=Ce("chevron-right",q1);/**
|
|
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 B1=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],$1=Ce("chevron-up",B1);/**
|
|
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 P1=[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]],Y1=Ce("chevrons-up-down",P1);/**
|
|
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 F1=[["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"}]],pn=Ce("circle-alert",F1);/**
|
|
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 G1=[["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"}]],Vg=Ce("circle-arrow-down",G1);/**
|
|
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 Z1=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],dp=Ce("circle-check",Z1);/**
|
|
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 W1=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],wc=Ce("circle-check-big",W1);/**
|
|
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 I1=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"10",x2:"10",y1:"15",y2:"9",key:"c1nkhi"}],["line",{x1:"14",x2:"14",y1:"15",y2:"9",key:"h65svq"}]],Q1=Ce("circle-pause",I1);/**
|
|
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 X1=[["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"}]],J1=Ce("circle-x",X1);/**
|
|
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 K1=[["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"}]],fh=Ce("clipboard-list",K1);/**
|
|
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 ej=[["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"}]],Bg=Ce("clipboard",ej);/**
|
|
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 tj=[["path",{d:"M12 6v6h4",key:"135r8i"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],aj=Ce("clock-3",tj);/**
|
|
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 nj=[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],fp=Ce("clock",nj);/**
|
|
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 lj=[["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"}]],hp=Ce("external-link",lj);/**
|
|
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 sj=[["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"}]],rj=Ce("eye-off",sj);/**
|
|
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 ij=[["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"}]],hh=Ce("eye",ij);/**
|
|
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 cj=[["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"}]],Zf=Ce("file-text",cj);/**
|
|
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 oj=[["circle",{cx:"18",cy:"18",r:"3",key:"1xkwt0"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M6 21V9a9 9 0 0 0 9 9",key:"7kw0sc"}]],mh=Ce("git-merge",oj);/**
|
|
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 uj=[["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"}]],yu=Ce("git-pull-request",uj);/**
|
|
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 dj=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]],fj=Ce("globe",dj);/**
|
|
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 hj=[["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"}]],mj=Ce("house",hj);/**
|
|
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 gj=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],xj=Ce("info",gj);/**
|
|
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 pj=[["path",{d:"M5 3v14",key:"9nsxs2"}],["path",{d:"M12 3v8",key:"1h2ygw"}],["path",{d:"M19 3v18",key:"1sk56x"}]],vj=Ce("kanban",pj);/**
|
|
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 yj=[["path",{d:"M21 5H3",key:"1fi0y6"}],["path",{d:"M7 12H3",key:"13ou7f"}],["path",{d:"M7 19H3",key:"wbqt3n"}],["path",{d:"M12 18a5 5 0 0 0 9-3 4.5 4.5 0 0 0-4.5-4.5c-1.33 0-2.54.54-3.41 1.41L11 14",key:"qth677"}],["path",{d:"M11 10v4h4",key:"172dkj"}]],$g=Ce("list-restart",yj);/**
|
|
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 bj=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],gh=Ce("loader-circle",bj);/**
|
|
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 jj=[["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"}]],mp=Ce("map",jj);/**
|
|
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 Nj=[["path",{d:"M5 12h14",key:"1ays0h"}]],wj=Ce("minus",Nj);/**
|
|
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 Sj=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M9 21V9",key:"1oto5p"}]],xh=Ce("panels-top-left",Sj);/**
|
|
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 Ej=[["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"}]],ou=Ce("pause",Ej);/**
|
|
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 Cj=[["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"}]],bu=Ce("pen",Cj);/**
|
|
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 Tj=[["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"}]],xn=Ce("play",Tj);/**
|
|
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 Mj=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Kl=Ce("plus",Mj);/**
|
|
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 Oj=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],pc=Ce("refresh-cw",Oj);/**
|
|
326
|
+
* @license lucide-react v0.564.0 - ISC
|
|
327
|
+
*
|
|
328
|
+
* This source code is licensed under the ISC license.
|
|
329
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
330
|
+
*/const Rj=[["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"}]],ph=Ce("rotate-ccw",Rj);/**
|
|
331
|
+
* @license lucide-react v0.564.0 - ISC
|
|
332
|
+
*
|
|
333
|
+
* This source code is licensed under the ISC license.
|
|
334
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
335
|
+
*/const Dj=[["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"}]],gp=Ce("save",Dj);/**
|
|
336
|
+
* @license lucide-react v0.564.0 - ISC
|
|
337
|
+
*
|
|
338
|
+
* This source code is licensed under the ISC license.
|
|
339
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
340
|
+
*/const kj=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],Ir=Ce("search",kj);/**
|
|
341
|
+
* @license lucide-react v0.564.0 - ISC
|
|
342
|
+
*
|
|
343
|
+
* This source code is licensed under the ISC license.
|
|
344
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
345
|
+
*/const Aj=[["path",{d:"M14 17H5",key:"gfn3mx"}],["path",{d:"M19 7h-9",key:"6i9tg"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}],["circle",{cx:"7",cy:"7",r:"3",key:"dfmy0x"}]],Pg=Ce("settings-2",Aj);/**
|
|
346
|
+
* @license lucide-react v0.564.0 - ISC
|
|
347
|
+
*
|
|
348
|
+
* This source code is licensed under the ISC license.
|
|
349
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
350
|
+
*/const _j=[["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"}]],zj=Ce("settings",_j);/**
|
|
351
|
+
* @license lucide-react v0.564.0 - ISC
|
|
352
|
+
*
|
|
353
|
+
* This source code is licensed under the ISC license.
|
|
354
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
355
|
+
*/const Lj=[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]],Uj=Ce("sparkles",Lj);/**
|
|
356
|
+
* @license lucide-react v0.564.0 - ISC
|
|
357
|
+
*
|
|
358
|
+
* This source code is licensed under the ISC license.
|
|
359
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
360
|
+
*/const Hj=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],Yg=Ce("square",Hj);/**
|
|
361
|
+
* @license lucide-react v0.564.0 - ISC
|
|
362
|
+
*
|
|
363
|
+
* This source code is licensed under the ISC license.
|
|
364
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
365
|
+
*/const qj=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],Vj=Ce("terminal",qj);/**
|
|
366
|
+
* @license lucide-react v0.564.0 - ISC
|
|
367
|
+
*
|
|
368
|
+
* This source code is licensed under the ISC license.
|
|
369
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
370
|
+
*/const Bj=[["path",{d:"M10 2h4",key:"n1abiw"}],["path",{d:"M4.6 11a8 8 0 0 0 1.7 8.7 8 8 0 0 0 8.7 1.7",key:"10he05"}],["path",{d:"M7.4 7.4a8 8 0 0 1 10.3 1 8 8 0 0 1 .9 10.2",key:"15f7sh"}],["path",{d:"m2 2 20 20",key:"1ooewy"}],["path",{d:"M12 12v-2",key:"fwoke6"}]],$j=Ce("timer-off",Bj);/**
|
|
371
|
+
* @license lucide-react v0.564.0 - ISC
|
|
372
|
+
*
|
|
373
|
+
* This source code is licensed under the ISC license.
|
|
374
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
375
|
+
*/const Pj=[["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"}]],Fs=Ce("trash-2",Pj);/**
|
|
376
|
+
* @license lucide-react v0.564.0 - ISC
|
|
377
|
+
*
|
|
378
|
+
* This source code is licensed under the ISC license.
|
|
379
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
380
|
+
*/const Yj=[["path",{d:"M16 17h6v-6",key:"t6n2it"}],["path",{d:"m22 17-8.5-8.5-5 5L2 7",key:"x473p"}]],Fj=Ce("trending-down",Yj);/**
|
|
381
|
+
* @license lucide-react v0.564.0 - ISC
|
|
382
|
+
*
|
|
383
|
+
* This source code is licensed under the ISC license.
|
|
384
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
385
|
+
*/const Gj=[["path",{d:"M16 7h6v6",key:"box55l"}],["path",{d:"m22 7-8.5 8.5-5-5L2 17",key:"1t1m79"}]],Zj=Ce("trending-up",Gj);/**
|
|
386
|
+
* @license lucide-react v0.564.0 - ISC
|
|
387
|
+
*
|
|
388
|
+
* This source code is licensed under the ISC license.
|
|
389
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
390
|
+
*/const Wj=[["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"}]],Ps=Ce("triangle-alert",Wj);/**
|
|
391
|
+
* @license lucide-react v0.564.0 - ISC
|
|
392
|
+
*
|
|
393
|
+
* This source code is licensed under the ISC license.
|
|
394
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
395
|
+
*/const Ij=[["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"}]],Qj=Ce("wifi",Ij);/**
|
|
396
|
+
* @license lucide-react v0.564.0 - ISC
|
|
397
|
+
*
|
|
398
|
+
* This source code is licensed under the ISC license.
|
|
399
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
400
|
+
*/const Xj=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Qr=Ce("x",Xj);/**
|
|
401
|
+
* @license lucide-react v0.564.0 - ISC
|
|
402
|
+
*
|
|
403
|
+
* This source code is licensed under the ISC license.
|
|
404
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
405
|
+
*/const Jj=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]],Fg=Ce("zap",Jj),xp=[{id:"executor",label:"Executor",processName:"executor",color:{bg:"bg-blue-500",border:"border-blue-500/60"}},{id:"reviewer",label:"Reviewer",processName:"reviewer",color:{bg:"bg-green-500",border:"border-green-500/60"}},{id:"qa",label:"QA",processName:"qa",color:{bg:"bg-purple-500",border:"border-purple-500/60"}},{id:"audit",label:"Audit",processName:"audit",color:{bg:"bg-orange-500",border:"border-orange-500/60"}},{id:"slicer",label:"Planner",processName:"planner",color:{bg:"bg-yellow-500",border:"border-yellow-500/60"}},{id:"analytics",label:"Analytics",processName:"analytics",color:{bg:"bg-pink-500",border:"border-pink-500/60"}},{id:"pr-resolver",label:"PR Resolver",processName:"pr-resolver",color:{bg:"bg-teal-500",border:"border-teal-500/60"}},{id:"merger",label:"Merger",processName:"merger",color:{bg:"bg-cyan-500",border:"border-cyan-500/60"}},{id:"manager",label:"Manager",processName:"manager",color:{bg:"bg-indigo-500",border:"border-indigo-500/60"}}],pp=[{id:"executor",label:"Executor",processName:"executor",color:{bg:"bg-blue-500",border:"border-blue-500/60"},triggerEndpoint:"/api/actions/run",scheduleTemplateKey:"executor",getEnabled:n=>n.executorEnabled??!0,getSchedule:n=>n.cronSchedule??"5 */2 * * *",settingsSection:"general",buildEnabledPatch:n=>({executorEnabled:n})},{id:"reviewer",label:"Reviewer",processName:"reviewer",color:{bg:"bg-green-500",border:"border-green-500/60"},triggerEndpoint:"/api/actions/review",scheduleTemplateKey:"reviewer",getEnabled:n=>n.reviewerEnabled??!0,getSchedule:n=>n.reviewerSchedule??"25 */3 * * *",settingsSection:"general",buildEnabledPatch:n=>({reviewerEnabled:n})},{id:"qa",label:"QA",processName:"qa",color:{bg:"bg-purple-500",border:"border-purple-500/60"},triggerEndpoint:"/api/actions/qa",scheduleTemplateKey:"qa",getEnabled:n=>{var r;return((r=n.qa)==null?void 0:r.enabled)??!0},getSchedule:n=>{var r;return((r=n.qa)==null?void 0:r.schedule)??"45 2,10,18 * * *"},settingsSection:"general",buildEnabledPatch:(n,r)=>({qa:{...r.qa??{},enabled:n}})},{id:"audit",label:"Audit",processName:"audit",color:{bg:"bg-orange-500",border:"border-orange-500/60"},triggerEndpoint:"/api/actions/audit",scheduleTemplateKey:"audit",getEnabled:n=>{var r;return((r=n.audit)==null?void 0:r.enabled)??!1},getSchedule:n=>{var r;return((r=n.audit)==null?void 0:r.schedule)??"50 3 * * 1"},settingsSection:"advanced",buildEnabledPatch:(n,r)=>({audit:{...r.audit??{},enabled:n}})},{id:"slicer",label:"Planner",processName:"planner",color:{bg:"bg-yellow-500",border:"border-yellow-500/60"},triggerEndpoint:"/api/actions/planner",scheduleTemplateKey:"slicer",getEnabled:n=>{var r;return((r=n.roadmapScanner)==null?void 0:r.enabled)??!0},getSchedule:n=>{var r;return((r=n.roadmapScanner)==null?void 0:r.slicerSchedule)??"35 */6 * * *"},settingsSection:"advanced",buildEnabledPatch:(n,r)=>({roadmapScanner:{...r.roadmapScanner??{},enabled:n}})},{id:"analytics",label:"Analytics",processName:"analytics",color:{bg:"bg-pink-500",border:"border-pink-500/60"},triggerEndpoint:"/api/actions/analytics",scheduleTemplateKey:"analytics",getEnabled:n=>{var r;return((r=n.analytics)==null?void 0:r.enabled)??!1},getSchedule:n=>{var r;return((r=n.analytics)==null?void 0:r.schedule)??"0 6 * * 1"},settingsSection:"advanced",buildEnabledPatch:(n,r)=>({analytics:{...r.analytics??{},enabled:n}})},{id:"pr-resolver",label:"PR Resolver",processName:"pr-resolver",color:{bg:"bg-teal-500",border:"border-teal-500/60"},triggerEndpoint:"/api/actions/resolve",scheduleTemplateKey:"prResolver",getEnabled:n=>{var r;return((r=n.prResolver)==null?void 0:r.enabled)??!0},getSchedule:n=>{var r;return((r=n.prResolver)==null?void 0:r.schedule)??"15 6,14,22 * * *"},settingsSection:"advanced",buildEnabledPatch:(n,r)=>({prResolver:{...r.prResolver??{},enabled:n}})},{id:"merger",label:"Merger",processName:"merger",color:{bg:"bg-cyan-500",border:"border-cyan-500/60"},triggerEndpoint:"/api/actions/merge",scheduleTemplateKey:"merger",getEnabled:n=>{var r;return((r=n.merger)==null?void 0:r.enabled)??!1},getSchedule:n=>{var r;return((r=n.merger)==null?void 0:r.schedule)??"55 */4 * * *"},settingsSection:"advanced",buildEnabledPatch:(n,r)=>({merger:{...r.merger??{},enabled:n}})},{id:"manager",label:"Manager",processName:"manager",color:{bg:"bg-indigo-500",border:"border-indigo-500/60"},triggerEndpoint:"/api/actions/manager",scheduleTemplateKey:"manager",getEnabled:n=>{var r;return((r=n.manager)==null?void 0:r.enabled)??!0},getSchedule:n=>{var r;return((r=n.manager)==null?void 0:r.schedule)??"15 7 * * *"},settingsSection:"advanced",buildEnabledPatch:(n,r)=>({manager:{...r.manager??{},enabled:n}})}];function Kj(n){return pp.find(r=>r.id===n)}const vh="";let yh=!1,uu=null;function eN(n){yh=n}function Gg(n){uu=n}function tN(){return yh}function bh(n){return encodeURIComponent(n.replace(/\//g,"~"))}function Nt(n){return yh&&uu?n.replace("/api/",`/api/projects/${bh(uu)}/`):n}function aN(){return nt("/api/mode")}function vp(){return nt("/api/projects")}function nN(n){const r=bh(n);return nt(`/api/projects/${r}`,{method:"DELETE"})}async function nt(n,r){const o=`${vh}${n}`,u=await fetch(o,{headers:{"Content-Type":"application/json",...r==null?void 0:r.headers},...r});if(!u.ok){const h=await u.json().catch(()=>({error:"Unknown error"}));throw new Error(h.error||`HTTP ${u.status}: ${u.statusText}`)}return u.json()}function Lf(){return nt(Nt("/api/status"))}function lN(){return nt(Nt("/api/feedback/summary"))}function sN(){return nt(Nt("/api/feedback/patterns"))}function rN(n,r){return nt(Nt(`/api/feedback/augmentations/${n}`),{method:"PATCH",body:JSON.stringify(r)})}function yp(){return nt(Nt("/api/prs"))}function iN(n,r){const o=`?lines=${encodeURIComponent(r)}`;return nt(Nt(`/api/logs/${encodeURIComponent(n)}${o}`))}function jh(){return nt(Nt("/api/config"))}async function cN(){if(tN()){const r=(await vp()).filter(u=>u.valid);return(await Promise.all(r.map(async u=>{try{const h=await nt(`/api/projects/${bh(u.name)}/config`);return{projectId:u.name,config:h}}catch(h){return console.error(`Failed to fetch config for project ${u.name}`,h),null}}))).filter(u=>u!==null)}else{const n=await jh();return[{projectId:uu||"current",config:n}]}}function du(n){return nt(Nt("/api/config"),{method:"PUT",body:JSON.stringify(n)})}function oN(){return nt(Nt("/api/doctor"))}function bp(){return nt(Nt("/api/schedule-info"))}function uN(){return nt(Nt("/api/actions/review"),{method:"POST"})}function jp(n){const r=Kj(n);return r?nt(Nt(r.triggerEndpoint),{method:"POST"}):Promise.reject(new Error(`Unknown job ID: ${n}`))}function mc(){return nt(Nt("/api/actions/install-cron"),{method:"POST"})}function Np(){return nt(Nt("/api/actions/uninstall-cron"),{method:"POST"})}function dN(n="all"){return nt(Nt("/api/actions/cancel"),{method:"POST",body:JSON.stringify({type:n})})}const Jl=["Draft","Ready","In Progress","Review","Done"];function wp(){return nt(Nt("/api/board/status"))}function fN(n){return nt(Nt("/api/board/issues"),{method:"POST",body:JSON.stringify(n)})}function Sp(n,r){return nt(Nt(`/api/board/issues/${n}/move`),{method:"PATCH",body:JSON.stringify({column:r})})}async function hN(n){const r=`${vh}${Nt(`/api/board/issues/${n}`)}`,o=await fetch(r,{headers:{"Content-Type":"application/json"},method:"DELETE"});if(!o.ok){const u=await o.json().catch(()=>({error:"Unknown error"}));throw new Error(u.error||`HTTP ${o.status}: ${o.statusText}`)}}function mN(){return nt(Nt("/api/actions/clear-lock"),{method:"POST"})}function gN(n,r=[],o){const u=(o==null?void 0:o.enabled)??!0,h=z.useRef(n);h.current=n,z.useEffect(()=>{if(!u)return;const f=`${vh}${Nt("/api/status/events")}`,b=new EventSource(f);return b.addEventListener("status_changed",j=>{try{const y=JSON.parse(j.data);h.current(y)}catch{}}),()=>{b.close()}},[u,...r])}function Zg(){return nt("/api/queue/status")}function xN(n){const r=`?window=${encodeURIComponent(n)}`;return nt(`/api/queue/analytics${r}`)}function pN(n){return nt("/api/queue/clear",{method:"POST",body:JSON.stringify({force:!1})})}function vN(){return nt("/api/global-notifications")}function Wg(n){return nt("/api/global-notifications",{method:"PUT",body:JSON.stringify(n)})}function yN(){return nt(Nt("/api/roadmap"))}function bN(){return nt(Nt("/api/roadmap/scan"),{method:"POST"})}function Ep(n){return nt(Nt("/api/roadmap/toggle"),{method:"PUT",body:JSON.stringify({enabled:n})})}function qa(n,r=[],o){const u=(o==null?void 0:o.enabled)??!0,[h,f]=z.useState(null),[b,j]=z.useState(!0),[y,x]=z.useState(null),E=z.useRef(n);E.current=n;const M=z.useRef(()=>{(async()=>{x(null);try{const A=await E.current();f(A)}catch(A){x(A instanceof Error?A:new Error("Unknown error"))}})()});return z.useEffect(()=>{if(!u)return;let D=!1;return j(!0),x(null),(async()=>{try{const N=await E.current();D||f(N)}catch(N){D||x(N instanceof Error?N:new Error("Unknown error"))}finally{D||j(!1)}})(),()=>{D=!0}},[...r,u]),{data:h,loading:b,error:y,refetch:M.current}}const Ig=n=>{let r;const o=new Set,u=(x,E)=>{const M=typeof x=="function"?x(r):x;if(!Object.is(M,r)){const D=r;r=E??(typeof M!="object"||M===null)?M:Object.assign({},r,M),o.forEach(A=>A(r,D))}},h=()=>r,j={setState:u,getState:h,getInitialState:()=>y,subscribe:x=>(o.add(x),()=>o.delete(x))},y=r=n(u,h,j);return j},jN=n=>n?Ig(n):Ig,NN=n=>n;function wN(n,r=NN){const o=ze.useSyncExternalStore(n.subscribe,()=>r(n.getState()),()=>r(n.getInitialState()));return ze.useDebugValue(o),o}const Qg=n=>{const r=jN(n),o=u=>wN(r,u);return Object.assign(o,r),o},SN=n=>n?Qg(n):Qg,EN=typeof localStorage<"u"?localStorage.getItem("nw-selected-project"):null,Zt=SN((n,r)=>({projectName:"Night Watch",setProjectName:o=>n({projectName:o}),toasts:[],addToast:o=>{const u=Math.random().toString(36).substring(7);n(h=>({toasts:[...h.toasts,{...o,id:u}]})),setTimeout(()=>{n(h=>({toasts:h.toasts.filter(f=>f.id!==u)}))},5e3)},removeToast:o=>n(u=>({toasts:u.toasts.filter(h=>h.id!==o)})),status:null,setStatus:o=>n(u=>o?!u.status||new Date(o.timestamp)>new Date(u.status.timestamp)?{status:o}:u:{status:null}),globalModeLoading:!0,setGlobalModeLoading:o=>n({globalModeLoading:o}),isGlobalMode:!1,setGlobalMode:o=>{eN(o),n({isGlobalMode:o})},projects:[],setProjects:o=>n({projects:o}),selectedProjectId:EN,selectProject:o=>{Gg(o),o?localStorage.setItem("nw-selected-project",o):localStorage.removeItem("nw-selected-project"),n(u=>{const h=u.projects.find(f=>f.name===o);return{selectedProjectId:o,...h?{projectName:h.name}:{}}})},removeProjectFromList:o=>{n(u=>{var j;const h=u.projects.filter(y=>y.name!==o),f=u.selectedProjectId===o,b=f?((j=h[0])==null?void 0:j.name)??null:u.selectedProjectId;return f&&(Gg(b),b?localStorage.setItem("nw-selected-project",b):localStorage.removeItem("nw-selected-project")),{projects:h,selectedProjectId:b,...f&&h[0]?{projectName:h[0].name}:{}}})},getJobStates:()=>{const{status:o}=r(),u=o==null?void 0:o.config;return pp.map(h=>({id:h.id,label:h.label,processName:h.processName,color:h.color,enabled:u?h.getEnabled(u):!0,schedule:u?h.getSchedule(u):"",triggerEndpoint:h.triggerEndpoint}))}})),CN=()=>{const[n,r]=z.useState(!1),{projectName:o,isGlobalMode:u,projects:h,selectedProjectId:f,selectProject:b,globalModeLoading:j}=Zt(),{data:y}=qa(yp,[f],{enabled:!j}),x=(y==null?void 0:y.length)??0,E=z.useMemo(()=>[{icon:mj,label:"Dashboard",path:"/",section:"Overview"},{icon:vu,label:"Analytics",path:"/analytics"},{icon:Vj,label:"Logs",path:"/logs"},{icon:vj,label:"Board",path:"/board",section:"Work"},{icon:yu,label:"Pull Requests",path:"/prs",badge:x},{icon:mp,label:"Roadmap",path:"/roadmap"},{icon:up,label:"Automation",path:"/scheduling",section:"Automation"},{icon:zj,label:"Settings",path:"/settings",section:"Config"}],[x]);return s.jsxs("aside",{className:`
|
|
406
|
+
relative flex flex-col transition-all duration-300 ease-[cubic-bezier(0.25,0.1,0.25,1)]
|
|
407
|
+
${n?"w-20":"w-72"} h-screen flex-shrink-0 z-50
|
|
408
|
+
bg-[#030712]/80 backdrop-blur-xl border-r border-white/5
|
|
409
|
+
`,children:[s.jsx("div",{className:`p-6 border-b border-white/5 ${n?"items-center justify-center flex":""}`,children:n?s.jsx("div",{className:"relative group",children:s.jsx("div",{className:"h-10 w-10 bg-indigo-600 rounded-xl flex items-center justify-center text-white font-bold cursor-pointer shadow-lg shadow-indigo-500/20 group-hover:bg-indigo-500 transition-colors bg-gradient-to-br from-indigo-500 to-indigo-700",title:"Switch Project",children:"NW"})}):s.jsxs("div",{className:"relative w-full",children:[s.jsx("label",{className:"text-[10px] font-bold text-slate-500 uppercase tracking-widest mb-3 block pl-1",children:u?"Projects":"Workspace"}),u?s.jsxs("div",{className:"relative",children:[s.jsx(qg,{className:"absolute left-3.5 top-1/2 -translate-y-1/2 h-4 w-4 text-indigo-400 pointer-events-none"}),s.jsx("select",{value:f||"",onChange:M=>b(M.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(M=>M.valid).map(M=>s.jsx("option",{value:M.name,children:M.name},M.name))}),s.jsx(Y1,{className:"absolute right-3 top-1/2 -translate-y-1/2 h-3.5 w-3.5 text-slate-500 pointer-events-none"})]}):s.jsxs("div",{className:"w-full bg-[#111827] border border-white/10 text-slate-200 rounded-lg py-3 px-3.5 text-sm font-medium shadow-sm flex items-center",children:[s.jsx(qg,{className:"h-4 w-4 text-indigo-400 mr-3"}),s.jsx("span",{className:"truncate",children:o})]})]})}),s.jsx("nav",{className:"flex-1 py-6 overflow-y-auto overflow-x-hidden scrollbar-hide",children:s.jsx("ul",{className:"space-y-1.5 px-4",children:E.map(M=>s.jsxs(ze.Fragment,{children:[M.section&&!n&&s.jsx("li",{className:"text-[10px] font-bold text-slate-600 uppercase tracking-widest px-3.5 pt-4 pb-1",children:M.section}),s.jsx("li",{children:s.jsx(rp,{to:M.path,className:({isActive:D})=>`
|
|
410
|
+
flex items-center px-3.5 py-3 rounded-xl transition-all duration-200 group relative
|
|
411
|
+
${D?"bg-indigo-500/10 text-indigo-300 shadow-[inset_0_1px_0_0_rgba(255,255,255,0.05)]":"text-slate-400 hover:bg-white/5 hover:text-slate-200"}
|
|
412
|
+
${n?"justify-center":""}
|
|
413
|
+
`,children:({isActive:D})=>s.jsxs(s.Fragment,{children:[s.jsx(M.icon,{className:`h-5 w-5 transition-colors ${D?"text-indigo-400 drop-shadow-[0_0_8px_rgba(99,102,241,0.5)]":"text-slate-500 group-hover:text-slate-300"} ${n?"":"mr-3.5"}`}),!n&&s.jsx("span",{className:"flex-1 text-sm font-medium tracking-wide",children:M.label}),M.badge&&(n?s.jsx("span",{className:"absolute top-2 right-2 h-2 w-2 bg-indigo-500 rounded-full border border-[#030712] shadow-sm"}):s.jsx("span",{className:`text-[10px] font-bold px-2 py-0.5 rounded-md ${D?"bg-indigo-500/20 text-indigo-300":"bg-white/5 text-slate-400 border border-white/5"}`,children:M.badge})),D&&!n&&s.jsx("div",{className:"absolute left-0 top-1/2 -translate-y-1/2 w-1 h-6 bg-indigo-500 rounded-r-full shadow-[0_0_10px_rgba(99,102,241,0.4)]"}),n&&s.jsx("div",{className:"absolute left-full ml-4 px-3 py-1.5 bg-[#111827] text-white text-xs font-medium rounded-md border border-white/10 shadow-xl opacity-0 group-hover:opacity-100 pointer-events-none whitespace-nowrap z-50 transition-opacity translate-x-2 group-hover:translate-x-0",children:M.label})]})})})]},M.path))})}),s.jsx("div",{className:"p-4 border-t border-white/5 flex justify-end",children:s.jsx("button",{onClick:()=>r(!n),className:"p-2 rounded-lg hover:bg-white/5 text-slate-500 hover:text-slate-300 transition-colors",children:n?s.jsx(V1,{className:"h-5 w-5"}):s.jsx(H1,{className:"h-5 w-5"})})})]})},TN=()=>{const{projectName:n}=Zt();return s.jsxs("header",{className:"h-20 flex items-center justify-between px-8 z-40 sticky top-0 bg-[#030712]/80 backdrop-blur-md border-b border-white/5",children:[s.jsxs("div",{className:"flex items-center space-x-6",children:[s.jsxs("div",{children:[s.jsx("div",{className:"text-xs font-mono text-indigo-400 mb-0.5 tracking-tight",children:"Active Project"}),s.jsx("h1",{className:"text-xl font-semibold text-white tracking-tight leading-none",children:n})]}),s.jsx("div",{className:"h-8 w-px bg-white/10 mx-2"}),s.jsxs("div",{className:"flex items-center space-x-2 text-xs font-medium px-3 py-1.5 rounded-full border transition-colors bg-emerald-500/5 text-emerald-400 border-emerald-500/20 shadow-[0_0_10px_-4px_rgba(16,185,129,0.3)]",children:[s.jsx(Qj,{className:"h-3.5 w-3.5"}),s.jsx("span",{className:"uppercase tracking-wider text-[10px]",children:"Online"})]})]}),s.jsxs("div",{className:"flex items-center space-x-5",children:[s.jsxs("div",{className:"relative hidden md:block group",children:[s.jsx("input",{type:"text",placeholder:"Search ( / )",className:"w-72 pl-10 pr-4 py-2 rounded-lg border border-white/5 bg-white/5 text-sm text-slate-200 focus:outline-none focus:ring-1 focus:ring-indigo-500/50 focus:border-indigo-500/50 transition-all placeholder:text-slate-600 focus:bg-[#0b101b]"}),s.jsx(Ir,{className:"absolute left-3.5 top-2.5 h-4 w-4 text-slate-500 group-focus-within:text-indigo-400 transition-colors"})]}),s.jsx("div",{className:"flex items-center space-x-3",children:s.jsxs("button",{className:"p-2.5 text-slate-400 hover:text-white hover:bg-white/5 rounded-full relative transition-all",children:[s.jsx(R1,{className:"h-5 w-5"}),s.jsx("span",{className:"absolute top-2.5 right-2.5 h-2 w-2 bg-red-500 rounded-full ring-2 ring-[#030712]"})]})}),s.jsx("div",{className:"h-9 w-9 rounded-full bg-gradient-to-tr from-indigo-600 to-purple-600 ring-2 ring-white/10 flex items-center justify-center text-white font-bold text-xs shadow-lg",children:"AD"})]})]})},MN=({toast:n,onDismiss:r})=>{const o={success:s.jsx(wc,{className:"h-5 w-5 text-green-400"}),error:s.jsx(pn,{className:"h-5 w-5 text-red-400"}),info:s.jsx(xj,{className:"h-5 w-5 text-blue-400"}),warning:s.jsx(Ps,{className:"h-5 w-5 text-amber-400"})},u={success:"border-l-green-500",error:"border-l-red-500",info:"border-l-blue-500",warning:"border-l-amber-500"};return s.jsx("div",{className:`
|
|
414
|
+
pointer-events-auto w-full max-w-sm overflow-hidden rounded-lg
|
|
415
|
+
bg-slate-900 border border-slate-800 border-l-4 ${u[n.type]}
|
|
416
|
+
shadow-lg ring-1 ring-black ring-opacity-5 transition-all
|
|
417
|
+
animate-in slide-in-from-right-full fade-in duration-300
|
|
418
|
+
`,children:s.jsx("div",{className:"p-4",children:s.jsxs("div",{className:"flex items-start",children:[s.jsx("div",{className:"flex-shrink-0",children:o[n.type]}),s.jsxs("div",{className:"ml-3 w-0 flex-1 pt-0.5",children:[s.jsx("p",{className:"text-sm font-medium text-slate-200",children:n.title}),n.message&&s.jsx("p",{className:"mt-1 text-sm text-slate-400",children:n.message})]}),s.jsx("div",{className:"ml-4 flex flex-shrink-0",children:s.jsxs("button",{type:"button",className:"inline-flex rounded-md text-slate-400 hover:text-slate-200 focus:outline-none focus:ring-2 focus:ring-indigo-500",onClick:()=>r(n.id),children:[s.jsx("span",{className:"sr-only",children:"Close"}),s.jsx(Qr,{className:"h-5 w-5"})]})})]})})})},ON=()=>{const{toasts:n,removeToast:r}=Zt();return s.jsx("div",{"aria-live":"assertive",className:"pointer-events-none fixed inset-0 flex flex-col items-end px-4 py-6 sm:items-end sm:p-6 z-[100] gap-4",children:n.map(o=>s.jsx(MN,{toast:o,onDismiss:r},o.id))})};function RN(){const{setGlobalMode:n,setGlobalModeLoading:r,setProjects:o,selectProject:u,selectedProjectId:h}=Zt();z.useEffect(()=>{r(!0),aN().then(async({globalMode:f})=>{if(n(f),!f)return;const b=await vp();o(b);const j=b.filter(y=>y.valid);h&&j.some(y=>y.name===h)?u(h):j.length>0&&u(j[0].name)}).catch(()=>{n(!1)}).finally(()=>{r(!1)})},[])}function Xg(n){if(!(n!=null&&n.timestamp))return Number.NEGATIVE_INFINITY;const r=new Date(n.timestamp).getTime();return Number.isNaN(r)?Number.NEGATIVE_INFINITY:r}function Xo(n,r){return n?r?Xg(n)>=Xg(r)?n:r:n:r}function DN(){const{setStatus:n,setProjectName:r,selectedProjectId:o,globalModeLoading:u,status:h}=Zt(),f=z.useRef(null);f.current=Zt.getState().status,gN(b=>{Xo(b,f.current)===b&&n(b)},[o,u],{enabled:!u}),z.useEffect(()=>{if(u)return;n(null),f.current=null,Lf().then(j=>{Xo(j,f.current)===j&&n(j)}).catch(()=>{});const b=setInterval(()=>{Lf().then(j=>{Xo(j,f.current)===j&&n(j)}).catch(()=>{})},3e4);return()=>clearInterval(b)},[o,u,n]),z.useEffect(()=>{const b=()=>{Lf().then(j=>{Xo(j,f.current)===j&&n(j)}).catch(()=>{})};return window.addEventListener("focus",b),()=>window.removeEventListener("focus",b)},[o,n]),z.useEffect(()=>{h!=null&&h.projectName&&r(h.projectName)},[h==null?void 0:h.projectName,r])}const Tt=({children:n,variant:r="default",className:o=""})=>{const u={default:"bg-indigo-500/10 text-indigo-400 ring-1 ring-inset ring-indigo-500/20",success:"bg-emerald-500/10 text-emerald-400 ring-1 ring-inset ring-emerald-500/20",warning:"bg-amber-500/10 text-amber-400 ring-1 ring-inset ring-amber-500/20",error:"bg-red-500/10 text-red-400 ring-1 ring-inset ring-red-500/20",neutral:"bg-slate-500/10 text-slate-400 ring-1 ring-inset ring-slate-500/20",info:"bg-blue-500/10 text-blue-400 ring-1 ring-inset ring-blue-500/20"};return s.jsx("span",{className:`inline-flex items-center px-2 py-0.5 rounded text-[11px] font-medium tracking-wide ${u[r]} ${o}`,children:n})},Le=({children:n,variant:r="primary",size:o="md",loading:u=!1,className:h="",disabled:f,...b})=>{const j="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"},x={sm:"h-8 px-3 text-xs tracking-wide",md:"h-10 px-4 py-2 text-sm",lg:"h-12 px-6 text-base",icon:"h-9 w-9"};return s.jsxs("button",{className:`${j} ${y[r]} ${x[o]} ${h}`,disabled:f||u,...b,children:[u&&s.jsx(gh,{className:"mr-2 h-4 w-4 animate-spin"}),n]})},et=({children:n,className:r="",onClick:o})=>s.jsxs("div",{className:`
|
|
419
|
+
relative bg-[#0b101b] rounded-xl border border-white/5
|
|
420
|
+
shadow-[0_4px_20px_-4px_rgba(0,0,0,0.5)]
|
|
421
|
+
transition-all duration-300
|
|
422
|
+
${o?"cursor-pointer hover:border-indigo-500/30 hover:shadow-indigo-500/5 group":""}
|
|
423
|
+
${r}
|
|
424
|
+
`,onClick:o,children:[o&&s.jsx("div",{className:"absolute inset-0 bg-indigo-500/0 group-hover:bg-indigo-500/[0.02] transition-colors rounded-xl pointer-events-none"}),s.jsx("div",{className:"relative z-10",children:n})]}),kN=({rows:n})=>s.jsx("div",{className:"mt-6 w-full max-w-xl space-y-3","aria-hidden":"true",children:Array.from({length:n}).map((r,o)=>s.jsx("div",{className:"h-3 overflow-hidden rounded-full bg-slate-900/80 ring-1 ring-white/5",children:s.jsx("div",{className:"h-full w-1/2 animate-pulse rounded-full bg-gradient-to-r from-slate-800 via-indigo-500/30 to-slate-800",style:{animationDelay:`${o*120}ms`}})},o))}),Jg=({message:n,detail:r,rows:o})=>s.jsxs("div",{className:"flex flex-col items-center justify-center text-center",children:[s.jsx("div",{className:"relative mb-4 flex h-12 w-12 items-center justify-center rounded-xl border border-indigo-400/20 bg-indigo-500/10 text-indigo-300 shadow-[0_0_30px_-12px_rgba(99,102,241,0.9)]",children:s.jsx(gh,{className:"h-5 w-5 animate-spin"})}),s.jsx("div",{className:"text-sm font-medium text-slate-200",children:n}),r?s.jsx("div",{className:"mt-1 max-w-md text-xs text-slate-500",children:r}):null,o>0?s.jsx(kN,{rows:o}):null]}),Ha=({message:n="Loading...",detail:r,variant:o="page",rows:u=3})=>{const h=s.jsx(Jg,{message:n,detail:r,rows:u});return o==="inline"?s.jsx("div",{className:"flex min-h-24 items-center justify-center py-6",children:s.jsx(Jg,{message:n,detail:r,rows:0})}):o==="card"?s.jsx(et,{className:"p-8",children:h}):s.jsx("div",{className:"flex min-h-[420px] items-center justify-center",children:s.jsx(et,{className:"w-full max-w-2xl p-10",children:h})})};function AN(n){return`${Math.round(n*100)}%`}function Kg(n){return new Date(n).toLocaleDateString([],{month:"short",day:"numeric"})}function ex(n){return(n==null?void 0:n.replace(/_/g," "))||"uncategorized"}const _N=({activePatterns:n,augmentations:r,topFailurePatterns:o,updatingAugmentationId:u=null,onAugmentationAction:h})=>s.jsxs("div",{className:"space-y-6","data-testid":"feedback-pattern-list",children:[s.jsxs("div",{className:"grid grid-cols-1 gap-6 lg:grid-cols-2",children:[s.jsxs("section",{className:"space-y-3",children:[s.jsxs("div",{className:"flex items-center justify-between gap-3",children:[s.jsx("h3",{className:"text-sm font-semibold text-slate-200",children:"Active Patterns"}),s.jsx(Tt,{variant:"neutral",children:n.length})]}),n.length===0?s.jsx("p",{className:"rounded-lg border border-slate-800 bg-slate-950/40 px-3 py-4 text-sm text-slate-500",children:"No active feedback patterns."}):s.jsx("div",{className:"divide-y divide-slate-800/70 rounded-lg border border-slate-800",children:n.map(f=>s.jsxs("div",{className:"p-3",children:[s.jsxs("div",{className:"flex items-start justify-between gap-3",children:[s.jsxs("div",{className:"min-w-0",children:[s.jsx("div",{className:"truncate text-sm font-medium text-slate-200",title:f.title,children:f.title}),s.jsx("p",{className:"mt-1 line-clamp-2 text-xs text-slate-500",children:f.description})]}),s.jsx(Tt,{variant:"info",className:"shrink-0 capitalize",children:f.jobType})]}),s.jsxs("div",{className:"mt-3 flex flex-wrap items-center gap-2 text-[11px] text-slate-500",children:[s.jsx("span",{className:"capitalize",children:ex(f.category)}),s.jsxs("span",{children:[f.sampleCount," samples"]}),s.jsxs("span",{children:[AN(f.confidence)," confidence"]})]})]},f.id))})]}),s.jsxs("section",{className:"space-y-3",children:[s.jsxs("div",{className:"flex items-center justify-between gap-3",children:[s.jsx("h3",{className:"text-sm font-semibold text-slate-200",children:"Top Failure Patterns"}),s.jsx(Tt,{variant:"neutral",children:o.length})]}),o.length===0?s.jsx("p",{className:"rounded-lg border border-slate-800 bg-slate-950/40 px-3 py-4 text-sm text-slate-500",children:"No repeated failure signatures yet."}):s.jsx("div",{className:"divide-y divide-slate-800/70 rounded-lg border border-slate-800",children:o.map(f=>s.jsxs("div",{className:"p-3",children:[s.jsxs("div",{className:"flex items-start justify-between gap-3",children:[s.jsxs("div",{className:"min-w-0",children:[s.jsx("div",{className:"truncate text-sm font-medium text-slate-200",title:f.signature??f.key,children:f.signature||ex(f.category)}),s.jsxs("div",{className:"mt-1 flex flex-wrap items-center gap-2 text-[11px] text-slate-500",children:[s.jsx("span",{className:"capitalize",children:f.jobType}),s.jsx("span",{className:"font-mono",children:f.providerKey})]})]}),s.jsx(Tt,{variant:"warning",className:"shrink-0",children:f.sampleCount})]}),s.jsxs("div",{className:"mt-2 flex items-center gap-1.5 text-[11px] text-slate-500",children:[s.jsx(aj,{className:"h-3 w-3"}),s.jsxs("span",{children:["Last seen ",Kg(f.lastSeenAt)]})]})]},f.key))})]})]}),s.jsxs("section",{className:"space-y-3",children:[s.jsxs("div",{className:"flex items-center justify-between gap-3",children:[s.jsx("h3",{className:"text-sm font-semibold text-slate-200",children:"Active Augmentations"}),s.jsx(Tt,{variant:r.length>0?"success":"neutral",children:r.length})]}),r.length===0?s.jsx("p",{className:"rounded-lg border border-slate-800 bg-slate-950/40 px-3 py-4 text-sm text-slate-500",children:"No active prompt augmentations."}):s.jsx("div",{className:"overflow-x-auto rounded-lg border border-slate-800",children:s.jsxs("table",{className:"w-full min-w-[720px] text-left text-sm",children:[s.jsx("thead",{className:"border-b border-slate-800 bg-slate-900/30 text-[11px] uppercase tracking-wider text-slate-500",children:s.jsxs("tr",{children:[s.jsx("th",{className:"px-4 py-3 font-semibold",children:"Prompt Snippet"}),s.jsx("th",{className:"px-4 py-3 font-semibold",children:"Job"}),s.jsx("th",{className:"px-4 py-3 text-right font-semibold",children:"Use"}),s.jsx("th",{className:"px-4 py-3 text-right font-semibold",children:"Expires"}),s.jsx("th",{className:"px-4 py-3 text-right font-semibold",children:"Actions"})]})}),s.jsx("tbody",{className:"divide-y divide-slate-800/60",children:r.map(f=>{const b=u===f.id,j=f.appliedCount>0?`${Math.round(f.successCount/f.appliedCount*100)}%`:"new";return s.jsxs("tr",{className:"hover:bg-slate-800/20",children:[s.jsx("td",{className:"px-4 py-3",children:s.jsx("div",{className:"line-clamp-2 max-w-xl text-sm text-slate-300",title:f.promptText,children:f.promptText})}),s.jsx("td",{className:"px-4 py-3",children:s.jsx(Tt,{variant:"info",className:"capitalize",children:f.jobType})}),s.jsxs("td",{className:"px-4 py-3 text-right text-xs text-slate-400",children:[f.appliedCount," applied · ",j]}),s.jsx("td",{className:"px-4 py-3 text-right text-xs text-slate-500",children:f.expiresAt?Kg(f.expiresAt):"No expiry"}),s.jsx("td",{className:"px-4 py-3",children:s.jsxs("div",{className:"flex justify-end gap-2",children:[s.jsxs(Le,{variant:"outline",size:"sm",disabled:b,onClick:()=>h(f.id,"disable"),children:[s.jsx(Q1,{className:"mr-1.5 h-3.5 w-3.5"}),"Disable"]}),s.jsxs(Le,{variant:"ghost",size:"sm",disabled:b,onClick:()=>h(f.id,"expire"),className:"text-slate-500 hover:text-amber-300",children:[s.jsx($j,{className:"mr-1.5 h-3.5 w-3.5"}),"Expire"]})]})})]},f.id)})})]})})]})]});function Pr(n){return n===null?"—":`${Math.round(n*100)}%`}function tx(n){return n===null?"—":n<60?`${Math.round(n)}s`:`${Math.floor(n/60)}m ${Math.round(n%60)}s`}function zN(n,r){return Object.entries(n).sort(([,o],[,u])=>u-o).slice(0,r)}function Jo(n){return Object.entries(n).sort(([,r],[,o])=>o.totalCount-r.totalCount).slice(0,5).map(([r,o])=>[r,`${Pr(o.successRate)} · ${o.totalCount} runs`])}function ax(n,r){if(n===null||r===null)return"Waiting for comparable data";const o=Math.round((n-r)*100);return o===0?"Flat vs 30 days":`${o>0?"+":""}${o} pts vs 30 days`}function LN(n,r){return n===null||r===null?"neutral":n>=r?"success":"warning"}const Zl=({label:n,value:r,detail:o})=>s.jsxs("div",{className:"rounded-lg border border-slate-800 bg-slate-950/40 p-4",children:[s.jsx("div",{className:"text-[11px] font-semibold uppercase tracking-[0.16em] text-slate-500",children:n}),s.jsx("div",{className:"mt-2 text-2xl font-bold text-slate-100",children:r}),s.jsx("div",{className:"mt-1 text-xs text-slate-500",children:o})]}),Cp=({variant:n="full",onViewDetails:r})=>{const{addToast:o,selectedProjectId:u,globalModeLoading:h}=Zt(),[f,b]=ze.useState(null),j=n==="compact",{data:y,loading:x,error:E,refetch:M}=qa(lN,[u],{enabled:!h}),{data:D,loading:A,error:N,refetch:O}=qa(sN,[u],{enabled:!h&&!j}),R=()=>{M(),j||O()},W=async(ie,ge)=>{b(ie);try{await rN(ie,{action:ge}),o({title:ge==="expire"?"Augmentation Expired":"Augmentation Disabled",message:"Prompt augmentation state was updated.",type:"success"}),R()}catch(pe){o({title:"Update Failed",message:pe instanceof Error?pe.message:"Failed to update augmentation",type:"error"})}finally{b(null)}},L=x||!j&&A,J=E||(j?null:N),w=(y==null?void 0:y.windows.last7Days)??null,H=(y==null?void 0:y.windows.last30Days)??null,q=((D==null?void 0:D.patterns)??[]).filter(ie=>ie.status==="active").sort((ie,ge)=>ge.confidence-ie.confidence||ge.sampleCount-ie.sampleCount).slice(0,5),G=(D==null?void 0:D.topFailurePatterns.slice(0,5))??[],Z=zN((H==null?void 0:H.byFailureCategory)??{},5),le=Math.max(...Z.map(([,ie])=>ie),1),S=((H==null?void 0:H.totalCount)??0)>0||((w==null?void 0:w.totalCount)??0)>0,te=LN((w==null?void 0:w.successRate)??null,(H==null?void 0:H.successRate)??null),ae=te==="success"?s.jsx(Zj,{className:"h-4 w-4"}):te==="warning"?s.jsx(Fj,{className:"h-4 w-4"}):null;return s.jsxs("section",{className:"space-y-4","aria-labelledby":"feedback-performance-heading",children:[s.jsxs("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[s.jsxs("div",{children:[s.jsx("h2",{id:"feedback-performance-heading",className:"text-lg font-semibold text-slate-200",children:j?"Basic Analytics":"Analytics"}),s.jsx("p",{className:"mt-1 text-sm text-slate-500",children:j?"High-level job health. Full breakdowns live in Analytics.":"Outcome trends, repeated failures, provider breakdowns, and prompt augmentations."})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[j&&r?s.jsxs(Le,{variant:"outline",size:"sm",onClick:r,children:["View analytics",s.jsx(Gf,{className:"ml-1.5 h-4 w-4"})]}):null,s.jsxs(Le,{variant:"outline",size:"sm",onClick:R,disabled:L,children:[s.jsx(pc,{className:`mr-1.5 h-4 w-4 ${L?"animate-spin":""}`}),"Refresh"]})]})]}),s.jsx(et,{className:"p-5",children:L?s.jsx(Ha,{variant:"inline",message:"Loading analytics",detail:j?void 0:"Preparing trends, failure patterns, and provider breakdowns."}):J?s.jsxs("div",{className:"flex items-center gap-3 rounded-lg border border-red-900/50 bg-red-950/20 p-4 text-sm text-red-300",children:[s.jsx(pn,{className:"h-5 w-5 shrink-0"}),s.jsx("span",{children:J.message})]}):!y||!S?s.jsxs("div",{className:"py-10 text-center",children:[s.jsx("div",{className:"text-sm font-medium text-slate-300",children:"No feedback outcomes recorded yet."}),s.jsx("p",{className:"mx-auto mt-2 max-w-md text-sm text-slate-500",children:"This panel will populate after executor, reviewer, QA, audit, planner, or merge jobs complete."})]}):j?s.jsxs("div",{className:"grid grid-cols-1 gap-3 md:grid-cols-4",children:[s.jsx(Zl,{label:"7 Day Success",value:Pr((w==null?void 0:w.successRate)??null),detail:`${(w==null?void 0:w.successCount)??0} of ${(w==null?void 0:w.totalCount)??0} completed`}),s.jsx(Zl,{label:"30 Day Success",value:Pr((H==null?void 0:H.successRate)??null),detail:ax((w==null?void 0:w.successRate)??null,(H==null?void 0:H.successRate)??null)}),s.jsx(Zl,{label:"Failures",value:String(((H==null?void 0:H.failureCount)??0)+((H==null?void 0:H.timeoutCount)??0)),detail:"Last 30 days"}),s.jsx(Zl,{label:"Avg Duration",value:tx((H==null?void 0:H.averageDurationSeconds)??null),detail:"Last 30 days"})]}):s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"grid grid-cols-1 gap-3 md:grid-cols-4",children:[s.jsx(Zl,{label:"7 Day Success",value:Pr((w==null?void 0:w.successRate)??null),detail:`${(w==null?void 0:w.successCount)??0} of ${(w==null?void 0:w.totalCount)??0} completed`}),s.jsx(Zl,{label:"30 Day Success",value:Pr((H==null?void 0:H.successRate)??null),detail:`${(H==null?void 0:H.successCount)??0} of ${(H==null?void 0:H.totalCount)??0} completed`}),s.jsx(Zl,{label:"Failure Load",value:String(((H==null?void 0:H.failureCount)??0)+((H==null?void 0:H.timeoutCount)??0)),detail:`${(H==null?void 0:H.rateLimitedCount)??0} rate limited`}),s.jsx(Zl,{label:"Avg Duration",value:tx((H==null?void 0:H.averageDurationSeconds)??null),detail:"Last 30 days"})]}),s.jsxs("div",{className:"grid grid-cols-1 gap-6 lg:grid-cols-2",children:[s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"flex items-center justify-between gap-3",children:[s.jsx("h3",{className:"text-sm font-semibold text-slate-200",children:"Success-Rate Trend"}),s.jsxs(Tt,{variant:te,className:"gap-1",children:[ae,ax((w==null?void 0:w.successRate)??null,(H==null?void 0:H.successRate)??null)]})]}),s.jsx("div",{className:"space-y-3",children:[{label:"Last 7 days",value:(w==null?void 0:w.successRate)??0},{label:"Last 30 days",value:(H==null?void 0:H.successRate)??0}].map(ie=>s.jsxs("div",{className:"space-y-1",children:[s.jsxs("div",{className:"flex justify-between text-xs",children:[s.jsx("span",{className:"text-slate-400",children:ie.label}),s.jsx("span",{className:"font-mono text-slate-300",children:Pr(ie.value)})]}),s.jsx("div",{className:"h-2 overflow-hidden rounded-full bg-slate-900",children:s.jsx("div",{className:"h-full rounded-full bg-emerald-500",style:{width:`${Math.max(4,Math.round(ie.value*100))}%`}})})]},ie.label))})]}),s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"flex items-center justify-between gap-3",children:[s.jsx("h3",{className:"text-sm font-semibold text-slate-200",children:"Failure Categories"}),s.jsx(Tt,{variant:"neutral",children:Z.length})]}),Z.length===0?s.jsx("p",{className:"rounded-lg border border-slate-800 bg-slate-950/40 px-3 py-4 text-sm text-slate-500",children:"No categorized failures in the last 30 days."}):s.jsx("div",{className:"space-y-3",children:Z.map(([ie,ge])=>s.jsxs("div",{className:"space-y-1",children:[s.jsxs("div",{className:"flex justify-between gap-3 text-xs",children:[s.jsx("span",{className:"truncate capitalize text-slate-400",children:ie.replace(/_/g," ")}),s.jsx("span",{className:"font-mono text-slate-300",children:ge})]}),s.jsx("div",{className:"h-2 overflow-hidden rounded-full bg-slate-900",children:s.jsx("div",{className:"h-full rounded-full bg-red-500",style:{width:`${Math.max(8,Math.round(ge/le*100))}%`}})})]},ie))})]})]}),s.jsxs("div",{className:"grid grid-cols-1 gap-6 lg:grid-cols-2",children:[s.jsxs("div",{className:"space-y-3",children:[s.jsxs("div",{className:"flex items-center justify-between gap-3",children:[s.jsx("h3",{className:"text-sm font-semibold text-slate-200",children:"Job Breakdown"}),s.jsx(Tt,{variant:"neutral",children:Object.keys((H==null?void 0:H.byJobType)??{}).length})]}),Jo((H==null?void 0:H.byJobType)??{}).length===0?s.jsx("p",{className:"rounded-lg border border-slate-800 bg-slate-950/40 px-3 py-4 text-sm text-slate-500",children:"No job-specific outcomes in the last 30 days."}):s.jsx("div",{className:"divide-y divide-slate-800/70 rounded-lg border border-slate-800",children:Jo((H==null?void 0:H.byJobType)??{}).map(([ie,ge])=>s.jsxs("div",{className:"flex items-center justify-between gap-3 px-3 py-2 text-sm",children:[s.jsx("span",{className:"capitalize text-slate-300",children:ie}),s.jsx("span",{className:"text-xs text-slate-500",children:ge})]},ie))})]}),s.jsxs("div",{className:"space-y-3",children:[s.jsxs("div",{className:"flex items-center justify-between gap-3",children:[s.jsx("h3",{className:"text-sm font-semibold text-slate-200",children:"Provider Breakdown"}),s.jsx(Tt,{variant:"neutral",children:Object.keys((H==null?void 0:H.byProvider)??{}).length})]}),Jo((H==null?void 0:H.byProvider)??{}).length===0?s.jsx("p",{className:"rounded-lg border border-slate-800 bg-slate-950/40 px-3 py-4 text-sm text-slate-500",children:"No provider-specific outcomes in the last 30 days."}):s.jsx("div",{className:"divide-y divide-slate-800/70 rounded-lg border border-slate-800",children:Jo((H==null?void 0:H.byProvider)??{}).map(([ie,ge])=>s.jsxs("div",{className:"flex items-center justify-between gap-3 px-3 py-2 text-sm",children:[s.jsx("span",{className:"font-mono text-slate-300",children:ie}),s.jsx("span",{className:"text-xs text-slate-500",children:ge})]},ie))})]})]})]})}),j?null:s.jsx(et,{className:"p-5",children:s.jsx(_N,{activePatterns:q,augmentations:(y==null?void 0:y.activeAugmentations)??[],topFailurePatterns:G,updatingAugmentationId:f,onAugmentationAction:W})})]})},UN=()=>s.jsx(Cp,{variant:"full"}),Tp={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"}},HN=({defaultColumn:n,onClose:r,onCreated:o})=>{const[u,h]=z.useState(""),[f,b]=z.useState(""),[j,y]=z.useState(n),[x,E]=z.useState(!1),[M,D]=z.useState(null),{addToast:A}=Zt(),N=async O=>{if(O.preventDefault(),!!u.trim()){E(!0),D(null);try{await fN({title:u.trim(),body:f,column:j}),A({title:"Issue created",message:`"${u.trim()}" added to ${j}`,type:"success"}),o(),r()}catch(R){D(R instanceof Error?R.message:"Failed to create issue")}finally{E(!1)}}};return s.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4",children:[s.jsx("div",{className:"absolute inset-0 bg-black/60 backdrop-blur-sm",onClick:r}),s.jsxs("div",{className:"relative bg-[#0f172a] border border-white/10 rounded-2xl shadow-2xl w-full max-w-lg",children:[s.jsxs("div",{className:"flex items-center justify-between p-6 border-b border-white/5",children:[s.jsx("h2",{className:"text-lg font-semibold text-slate-100",children:"New Board Issue"}),s.jsx("button",{onClick:r,className:"p-1.5 rounded-lg hover:bg-white/5 text-slate-500 hover:text-slate-300 transition-colors",children:s.jsx(Qr,{className:"h-5 w-5"})})]}),s.jsxs("form",{onSubmit:N,className:"p-6 space-y-4",children:[s.jsxs("div",{children:[s.jsx("label",{className:"text-xs font-medium text-slate-400 uppercase tracking-wide block mb-1.5",children:"Title"}),s.jsx("input",{type:"text",value:u,onChange:O=>h(O.target.value),placeholder:"Issue title...",required:!0,className:"w-full bg-slate-950/50 border border-white/10 text-slate-200 rounded-lg px-3 py-2.5 text-sm placeholder-slate-600 focus:outline-none focus:border-indigo-500/50 focus:ring-1 focus:ring-indigo-500/20"})]}),s.jsxs("div",{children:[s.jsx("label",{className:"text-xs font-medium text-slate-400 uppercase tracking-wide block mb-1.5",children:"Column"}),s.jsx("select",{value:j,onChange:O=>y(O.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:Jl.map(O=>s.jsx("option",{value:O,children:O},O))})]}),s.jsxs("div",{children:[s.jsx("label",{className:"text-xs font-medium text-slate-400 uppercase tracking-wide block mb-1.5",children:"Body (optional)"}),s.jsx("textarea",{value:f,onChange:O=>b(O.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"})]}),M&&s.jsx("p",{className:"text-sm text-red-400",children:M}),s.jsxs("div",{className:"flex justify-end space-x-3 pt-2",children:[s.jsx(Le,{variant:"ghost",type:"button",onClick:r,children:"Cancel"}),s.jsx(Le,{type:"submit",disabled:x||!u.trim(),children:x?"Creating...":"Create Issue"})]})]})]})]})},qN=({issue:n,onClose:r,onMoved:o,onClosed:u})=>{const[h,f]=z.useState(!1),[b,j]=z.useState(!1),[y,x]=z.useState(!1),{addToast:E}=Zt(),M=async N=>{if(N!==n.column){f(!0);try{await Sp(n.number,N),E({title:"Issue moved",message:`#${n.number} moved to ${N}`,type:"success"}),o(),r()}catch(O){E({title:"Move failed",message:O instanceof Error?O.message:"Failed to move issue",type:"error"})}finally{f(!1)}}},D=async()=>{x(!1),j(!0);try{await hN(n.number),E({title:"Issue closed",message:`#${n.number} closed on GitHub`,type:"success"}),u(),r()}catch(N){E({title:"Close failed",message:N instanceof Error?N.message:"Failed to close issue",type:"error"})}finally{j(!1)}},A=n.column??"Draft";return s.jsxs("div",{className:"fixed inset-0 z-50 flex justify-end",children:[s.jsx("div",{className:"absolute inset-0 bg-black/40 backdrop-blur-sm",onClick:r}),s.jsxs("div",{className:"relative bg-[#0a0f1e] border-l border-white/10 w-full max-w-xl flex flex-col shadow-2xl overflow-hidden",children:[s.jsxs("div",{className:"flex items-start justify-between p-6 border-b border-white/5 flex-shrink-0",children:[s.jsxs("div",{className:"flex-1 min-w-0 pr-4",children:[s.jsxs("div",{className:"flex items-center space-x-2 mb-2",children:[s.jsxs("span",{className:"text-slate-500 text-sm font-mono",children:["#",n.number]}),s.jsx(Tt,{variant:Tp[A].badge,children:A})]}),s.jsx("h2",{className:"text-lg font-semibold text-slate-100 leading-snug",children:n.title}),n.assignees.length>0&&s.jsxs("p",{className:"text-xs text-slate-500 mt-1",children:["Assigned to: ",n.assignees.join(", ")]})]}),s.jsx("button",{onClick:r,className:"p-1.5 rounded-lg hover:bg-white/5 text-slate-500 hover:text-slate-300 transition-colors flex-shrink-0",children:s.jsx(Qr,{className:"h-5 w-5"})})]}),s.jsxs("div",{className:"flex items-center space-x-3 px-6 py-3 border-b border-white/5 flex-shrink-0 flex-wrap gap-y-2",children:[s.jsxs("div",{className:"flex items-center space-x-2",children:[s.jsx("span",{className:"text-xs text-slate-500",children:"Move to:"}),Jl.filter(N=>N!==n.column).map(N=>s.jsx("button",{onClick:()=>M(N),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:N},N))]}),s.jsxs("div",{className:"flex items-center space-x-2 ml-auto",children:[n.url&&!n.url.startsWith("local://")&&s.jsxs("a",{href:n.url,target:"_blank",rel:"noopener noreferrer",className:"flex items-center space-x-1 text-xs text-indigo-400 hover:text-indigo-300 transition-colors",children:[s.jsx(hp,{className:"h-3.5 w-3.5"}),s.jsx("span",{children:"GitHub"})]}),s.jsx("button",{onClick:()=>x(!0),disabled:b,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:b?"Closing...":"Close Issue"})]})]}),y&&s.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center",children:[s.jsx("div",{className:"absolute inset-0 bg-black/40 backdrop-blur-sm",onClick:()=>x(!1)}),s.jsxs("div",{className:"relative bg-[#0a0f1e] border border-white/10 rounded-xl p-6 max-w-sm w-full mx-4 shadow-2xl",children:[s.jsx("h3",{className:"text-sm font-semibold text-slate-100 mb-2",children:"Close issue?"}),s.jsxs("p",{className:"text-sm text-slate-400 mb-4",children:["Close issue #",n.number,': "',n.title,'"?']}),s.jsxs("div",{className:"flex justify-end space-x-3",children:[s.jsx(Le,{variant:"ghost",onClick:()=>x(!1),children:"Cancel"}),s.jsx(Le,{onClick:D,children:"Confirm"})]})]})]}),s.jsx("div",{className:"flex-1 overflow-y-auto p-6",children:n.body?s.jsx("pre",{className:"text-sm text-slate-300 whitespace-pre-wrap font-mono leading-relaxed break-words",children:n.body}):s.jsx("p",{className:"text-slate-500 text-sm italic",children:"No description provided."})})]})]})},VN=({issue:n,onClick:r,onDragStart:o})=>{const[u,h]=z.useState(!1);return s.jsx("div",{className:"relative",draggable:!0,onDragStart:f=>{f.dataTransfer.setData("issueNumber",String(n.number)),f.dataTransfer.effectAllowed="move",h(!0),o(n)},onDragEnd:()=>h(!1),children:s.jsxs(et,{className:`p-3 cursor-grab hover:border-indigo-500/30 transition-all select-none ${u?"opacity-30":""}`,onClick:r,children:[s.jsxs("span",{className:"text-[10px] font-mono text-slate-600",children:["#",n.number]}),s.jsx("p",{className:"text-xs font-medium text-slate-200 line-clamp-2 mt-0.5 leading-snug",children:n.title}),n.assignees.length>0&&s.jsx("p",{className:"text-[10px] text-slate-500 mt-1.5 truncate",children:n.assignees.join(", ")})]})})},BN=({name:n,issues:r,draggingIssue:o,onIssueClick:u,onNewIssue:h,onMoveIssue:f,onDragStart:b})=>{const j=Tp[n],[y,x]=z.useState(!1),E=o!==null&&o.column!==n;return s.jsxs("div",{className:`flex flex-col min-w-[220px] max-w-[220px] h-full rounded-xl transition-colors ${y&&E?"bg-indigo-500/5 ring-1 ring-indigo-500/30":""}`,onDragOver:M=>{E&&(M.preventDefault(),M.dataTransfer.dropEffect="move",x(!0))},onDragLeave:()=>x(!1),onDrop:M=>{M.preventDefault(),x(!1),o&&o.column!==n&&f(o,n)},children:[s.jsxs("div",{className:"flex items-center justify-between mb-3 flex-shrink-0",children:[s.jsxs("div",{className:"flex items-center space-x-2",children:[s.jsx("span",{className:`w-2.5 h-2.5 rounded-full ${j.dot}`}),s.jsx("span",{className:"text-xs font-semibold text-slate-400 uppercase tracking-wider",children:n}),s.jsx("span",{className:"text-[10px] font-bold text-slate-600 bg-slate-800 rounded-full px-1.5 py-0.5",children:r.length})]}),s.jsx("button",{onClick:()=>h(n),className:"p-1 rounded-md hover:bg-white/5 text-slate-600 hover:text-slate-400 transition-colors",title:`Add issue to ${n}`,children:s.jsx(Kl,{className:"h-3.5 w-3.5"})})]}),s.jsx("div",{className:"flex-1 overflow-y-auto space-y-2 pr-1 scrollbar-hide min-h-0",children:r.length===0?s.jsx("div",{className:`border-2 border-dashed rounded-xl h-24 flex items-center justify-center transition-colors ${y&&E?"border-indigo-500/40":"border-slate-800"}`,children:s.jsx("span",{className:"text-xs text-slate-700",children:y&&E?"Drop here":"No issues"})}):r.map(M=>s.jsx(VN,{issue:M,onClick:()=>u(M),onDragStart:b},M.id))})]})},$N=()=>{const[n,r]=z.useState(null),[o,u]=z.useState(null),[h,f]=z.useState(null),[b,j]=z.useState(null),y=z.useRef(!1),{addToast:x,selectedProjectId:E,globalModeLoading:M}=Zt(),{data:D,loading:A,error:N,refetch:O}=qa(wp,[E],{enabled:!M});z.useEffect(()=>{const L=setInterval(()=>{y.current||O()},3e4);return()=>clearInterval(L)},[O]);const R=z.useCallback(async(L,J)=>{f(null);const w=b??(D==null?void 0:D.columns);if(!w)return;const H=w,q={};for(const Z of Jl)q[Z]=(w[Z]??[]).filter(le=>le.number!==L.number);const G={...L,column:J};q[J]=[...q[J]??[],G],j(q),r(Z=>(Z==null?void 0:Z.number)===L.number?G:Z),y.current=!0;try{await Sp(L.number,J),O(),setTimeout(()=>{j(null),y.current=!1},800)}catch(Z){j(H),r(le=>(le==null?void 0:le.number)===L.number?L:le),y.current=!1,x({title:"Move failed",message:Z instanceof Error?Z.message:"Failed to move issue",type:"error"})}},[x,O,b,D]);if(M||A)return s.jsx(Ha,{message:"Loading board",detail:"Fetching columns and issue cards."});if(N&&N.message.includes("Board not configured"))return s.jsxs("div",{className:"flex flex-col items-center justify-center h-full space-y-4",children:[s.jsx("div",{className:"text-4xl",children:"📋"}),s.jsx("h2",{className:"text-xl font-semibold text-slate-200",children:"Board not configured"}),s.jsxs("p",{className:"text-slate-500 text-sm max-w-sm text-center",children:["Run ",s.jsx("code",{className:"font-mono bg-slate-800 px-2 py-0.5 rounded text-indigo-300",children:"night-watch board setup"})," in your project to create a GitHub Projects board."]})]});if(N)return s.jsxs("div",{className:"flex flex-col items-center justify-center h-full space-y-4",children:[s.jsx("div",{className:"text-slate-300",children:"Failed to load board"}),s.jsx("div",{className:"text-sm text-slate-500",children:N.message}),s.jsx(Le,{onClick:()=>O(),children:"Retry"})]});if(!D)return null;const W=b??D.columns;return s.jsxs("div",{className:"flex flex-col h-full",children:[s.jsxs("div",{className:"flex items-center justify-between mb-6 flex-shrink-0",children:[s.jsxs("div",{children:[s.jsx("h1",{className:"text-2xl font-bold text-slate-100",children:"Board"}),s.jsxs("p",{className:"text-sm text-slate-500 mt-1",children:[Jl.reduce((L,J)=>{var w;return L+(((w=W[J])==null?void 0:w.length)??0)},0)," issues across ",Jl.length," columns"]})]}),s.jsxs(Le,{onClick:()=>u("Ready"),children:[s.jsx(Kl,{className:"h-4 w-4 mr-2"}),"New Issue"]})]}),s.jsx("div",{className:"flex-1 overflow-x-auto overflow-y-hidden",onDragEnd:()=>f(null),children:s.jsx("div",{className:"flex space-x-4 h-full pb-4",style:{minWidth:`${Jl.length*236}px`},children:Jl.map(L=>s.jsx(BN,{name:L,issues:W[L]??[],draggingIssue:h,onIssueClick:r,onNewIssue:u,onMoveIssue:R,onDragStart:f},L))})}),n&&s.jsx(qN,{issue:n,onClose:()=>r(null),onMoved:()=>O(),onClosed:()=>O()}),o&&s.jsx(HN,{defaultColumn:o,onClose:()=>u(null),onCreated:()=>O()})]})},PN=[{name:"executor",displayName:"Executor",processName:"executor",triggerId:"executor",cancelType:"run",runningLabel:"Running",idleLabel:"Idle"},{name:"reviewer",displayName:"Reviewer",processName:"reviewer",triggerId:"reviewer",cancelType:"review",runningLabel:"Running",idleLabel:"Idle"},{name:"qa",displayName:"QA",processName:"qa",triggerId:"qa",runningLabel:"Running",idleLabel:"Idle"},{name:"auditor",displayName:"Auditor",processName:"audit",triggerId:"audit",runningLabel:"Running",idleLabel:"Idle"},{name:"planner",displayName:"Planner",processName:"planner",triggerId:"planner",runningLabel:"Writing PRDs",idleLabel:"Idle"},{name:"analytics",displayName:"Analytics",processName:"analytics",triggerId:"analytics",runningLabel:"Running",idleLabel:"Idle"},{name:"pr-resolver",displayName:"PR Resolver",processName:"pr-resolver",triggerId:"pr-resolver",runningLabel:"Resolving",idleLabel:"Idle"},{name:"merger",displayName:"Merger",processName:"merger",triggerId:"merger",runningLabel:"Running",idleLabel:"Idle"},{name:"manager",displayName:"Manager",processName:"manager",triggerId:"manager",runningLabel:"Monitoring",idleLabel:"Idle"}],YN=({processes:n,activePrd:r,onCancelProcess:o,onForceClear:u,onViewLog:h,cancellingProcess:f,clearingLock:b,onTriggerJob:j,triggeringJob:y})=>{const x=M=>n.find(D=>D.name===M),E=(M,D)=>M.length<=D?M:M.slice(0,D-1)+"...";return s.jsx("div",{className:"grid grid-cols-2 md:grid-cols-3 lg:grid-cols-9 gap-3",children:PN.map(M=>{const D=x(M.processName),A=(D==null?void 0:D.running)??!1,N=D==null?void 0:D.pid,O=f===M.cancelType,R=A&&M.cancelType,W=!A&&M.name==="executor"&&r,L=A?N?`PID: ${N}`:M.runningLabel:M.idleLabel,J=A&&M.name==="executor"&&r?E(r,20):null;return s.jsxs("div",{className:`flex items-center gap-2 p-2.5 rounded-lg border transition-colors ${A?"bg-green-950/30 border-green-800/50":"bg-slate-950/50 border-slate-800"}`,children:[s.jsx("div",{className:`h-2.5 w-2.5 rounded-full flex-shrink-0 ${A?"bg-green-500 animate-pulse shadow-[0_0_8px_rgba(34,197,94,0.5)]":"bg-slate-700"}`}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("div",{className:`text-sm font-medium ${A?"text-slate-200":"text-slate-400"}`,children:M.displayName}),s.jsx("div",{className:"text-xs text-slate-500 truncate",children:J?s.jsxs("span",{className:"flex items-center gap-1",children:[s.jsx(Zf,{className:"h-3 w-3 flex-shrink-0"}),J]}):L})]}),s.jsxs("div",{className:"flex-shrink-0",children:[R&&s.jsx("button",{onClick:()=>M.cancelType&&o(M.cancelType),disabled:O,className:"p-1 text-red-400 hover:text-red-300 hover:bg-red-500/10 rounded transition-colors disabled:opacity-50",title:"Stop process",children:s.jsx(Yg,{className:"h-3.5 w-3.5"})}),W&&s.jsx("button",{onClick:u,disabled:b,className:"p-1 text-amber-400 hover:text-amber-300 hover:bg-amber-500/10 rounded transition-colors disabled:opacity-50",title:"Force clear stale state",children:s.jsx(Yg,{className:"h-3.5 w-3.5"})}),!R&&!W&&A&&s.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:s.jsx(Zf,{className:"h-3.5 w-3.5"})}),!A&&!W&&s.jsx("button",{onClick:()=>j(M.triggerId),disabled:y!==null,className:"p-1 text-slate-500 hover:text-green-400 hover:bg-green-500/10 rounded transition-colors disabled:opacity-50",title:`Run ${M.displayName}`,children:y===M.triggerId?s.jsx("div",{className:"h-3.5 w-3.5 border-2 border-current border-t-transparent rounded-full animate-spin"}):s.jsx(xn,{className:"h-3.5 w-3.5"})})]})]},M.name)})})},FN={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"},GN=()=>{var ge,pe;const n=xu(),[r,o]=z.useState(null),[u,h]=z.useState(!1),[f,b]=z.useState(null),[j,y]=z.useState(!1),{setProjectName:x,addToast:E,selectedProjectId:M,globalModeLoading:D,status:A}=Zt(),{data:N,loading:O}=qa(bp,[M],{enabled:!D}),{data:R,loading:W}=qa(()=>wp().catch(()=>null),[M],{enabled:!D}),L=A;if(ze.useEffect(()=>{L!=null&&L.projectName&&x(L.projectName)},[L,x]),D||!L||O||W)return s.jsx(Ha,{message:"Loading dashboard",detail:"Collecting status, schedule, board, and analytics data."});const J=L.prs.length,w=L.prs.filter(P=>P.reviewScore!==null&&P.reviewScore<70).length,H=((ge=R==null?void 0:R.columns.Ready)==null?void 0:ge.length)??0,q=((pe=R==null?void 0:R.columns["In Progress"])==null?void 0:pe.length)??0,G=async P=>{o(P);try{const K=await dN(P),he=K.results.every(fe=>fe.success);E({title:he?"Process Cancelled":"Cancel Failed",message:K.results.map(fe=>fe.message).join("; "),type:he?"success":"error"})}catch(K){E({title:"Cancel Failed",message:K instanceof Error?K.message:"Failed to cancel process",type:"error"})}finally{o(null)}},Z=async()=>{h(!0);try{await mN(),E({title:"Lock Cleared",message:"Stale executor state removed",type:"success"})}catch(P){E({title:"Clear Failed",message:P instanceof Error?P.message:"Failed to clear lock",type:"error"})}finally{h(!1)}},le=async P=>{b(P);try{await jp(P==="planner"?"slicer":P),E({title:"Job Triggered",message:`${P[0].toUpperCase()+P.slice(1)} job has been queued.`,type:"success"})}catch(K){E({title:"Trigger Failed",message:K instanceof Error?K.message:`Failed to trigger ${P}`,type:"error"})}finally{b(null)}},S=async()=>{if(N){y(!0);try{N.paused?(await mc(),E({title:"Schedule Resumed",message:"Cron schedules are active.",type:"success"})):(await Np(),E({title:"Schedule Paused",message:"Cron schedules are deactivated.",type:"info"}))}catch(P){E({title:"Action Failed",message:P instanceof Error?P.message:"Toggle failed",type:"error"})}finally{y(!1)}}},te=P=>{if(!P)return"Not scheduled";try{const K=new Date(P),he=new Date,fe=K.getTime()-he.getTime(),Ne=Math.floor(fe/6e4);return Ne<0?"Running now...":Ne<60?`in ${Ne} min`:Ne<1440?`in ${Math.floor(Ne/60)} hr${Ne>=120?"s":""}`:`in ${Math.floor(Ne/1440)} day${Ne>=2880?"s":""}`}catch{return"Unknown"}},ie=(()=>{var he,fe,Ne,U,se,me,ve;if(N!=null&&N.paused)return null;const P=[{agent:"Executor",nextRun:(N==null?void 0:N.executor.nextRun)??null},{agent:"Reviewer",nextRun:(N==null?void 0:N.reviewer.nextRun)??null},{agent:"QA",nextRun:((he=N==null?void 0:N.qa)==null?void 0:he.nextRun)??null},{agent:"Auditor",nextRun:((fe=N==null?void 0:N.audit)==null?void 0:fe.nextRun)??null},{agent:"Planner",nextRun:((Ne=N==null?void 0:N.planner)==null?void 0:Ne.nextRun)??null},{agent:"Analytics",nextRun:((U=N==null?void 0:N.analytics)==null?void 0:U.nextRun)??null},{agent:"PR Resolver",nextRun:((se=N==null?void 0:N.prResolver)==null?void 0:se.nextRun)??null},{agent:"Merger",nextRun:((me=N==null?void 0:N.merger)==null?void 0:me.nextRun)??null},{agent:"Manager",nextRun:((ve=N==null?void 0:N.manager)==null?void 0:ve.nextRun)??null}];let K=null;for(const Re of P)Re.nextRun&&(!K||new Date(Re.nextRun)<new Date(K.nextRun))&&(K=Re);return K?{agent:K.agent,time:te(K.nextRun)}:null})();return s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4",children:[s.jsxs(et,{className:"p-5",onClick:()=>n("/board"),children:[s.jsxs("div",{className:"flex justify-between items-start",children:[s.jsxs("div",{children:[s.jsx("p",{className:"text-sm font-medium text-slate-500",children:"Board Ready"}),s.jsx("h3",{className:"text-3xl font-bold text-slate-100 mt-1",children:H})]}),s.jsx("div",{className:"p-2 bg-green-500/10 rounded-lg text-green-400",children:s.jsx(wc,{className:"h-5 w-5"})})]}),s.jsx("p",{className:"text-xs text-slate-500 mt-4",children:"issues ready to start"})]}),s.jsxs(et,{className:"p-5",onClick:()=>n("/board"),children:[s.jsxs("div",{className:"flex justify-between items-start",children:[s.jsxs("div",{children:[s.jsx("p",{className:"text-sm font-medium text-slate-500",children:"In Progress"}),s.jsx("h3",{className:"text-3xl font-bold text-slate-100 mt-1",children:q})]}),s.jsx("div",{className:"p-2 bg-blue-500/10 rounded-lg text-blue-400",children:s.jsx(op,{className:"h-5 w-5"})})]}),s.jsx("p",{className:"text-xs text-slate-500 mt-4",children:"issues in progress"})]}),s.jsxs(et,{className:"p-5",onClick:()=>n("/prs"),children:[s.jsxs("div",{className:"flex justify-between items-start",children:[s.jsxs("div",{children:[s.jsx("p",{className:"text-sm font-medium text-slate-500",children:"Open PRs"}),s.jsx("h3",{className:"text-3xl font-bold text-slate-100 mt-1",children:J})]}),s.jsx("div",{className:"p-2 bg-purple-500/10 rounded-lg text-purple-400",children:s.jsx(fp,{className:"h-5 w-5"})})]}),s.jsx("p",{className:`text-xs mt-4 ${w>0?"text-red-400 font-medium":"text-slate-500"}`,children:w>0?`${w} need work`:"All passing"})]}),s.jsxs(et,{className:"p-5",children:[s.jsxs("div",{className:"flex justify-between items-start",children:[s.jsxs("div",{children:[s.jsx("p",{className:"text-sm font-medium text-slate-500",children:"Automation"}),s.jsx("h3",{className:"text-3xl font-bold text-slate-100 mt-1",children:N!=null&&N.paused?"Paused":L.crontab.installed?"Active":"Inactive"})]}),s.jsx("button",{onClick:S,disabled:j||!N||!L.crontab.installed,title:N!=null&&N.paused?"Resume scheduling":"Pause scheduling",className:`p-2 rounded-lg transition-colors disabled:opacity-50 disabled:cursor-not-allowed ${N!=null&&N.paused?"bg-emerald-500/10 text-emerald-400 hover:bg-emerald-500/20":L.crontab.installed?"bg-indigo-500/10 text-indigo-400 hover:bg-indigo-500/20":"bg-slate-700/50 text-slate-500"}`,children:j?s.jsx(pc,{className:"h-5 w-5 animate-spin"}):N!=null&&N.paused?s.jsx(xn,{className:"h-5 w-5 fill-current"}):L.crontab.installed?s.jsx(ou,{className:"h-5 w-5"}):s.jsx(up,{className:"h-5 w-5"})})]}),s.jsx("p",{className:"text-xs text-slate-500 mt-4",children:N!=null&&N.paused?"All schedules paused":L.crontab.installed?`${L.crontab.entries.length} entr${L.crontab.entries.length===1?"y":"ies"} installed`:"No crontab entries"})]})]}),s.jsxs(et,{className:"p-4",children:[s.jsxs("div",{className:"flex items-center justify-between mb-3",children:[s.jsx("h2",{className:"text-base font-semibold text-slate-200",children:"Agents"}),s.jsx("button",{onClick:()=>n("/logs"),className:"text-xs text-slate-400 hover:text-slate-300 transition-colors",children:"View logs"})]}),s.jsx(YN,{processes:L.processes,activePrd:L.activePrd,onCancelProcess:G,onForceClear:Z,onViewLog:()=>n("/logs"),cancellingProcess:r,clearingLock:u,onTriggerJob:le,triggeringJob:f})]}),ie?s.jsxs("div",{className:"flex items-center justify-between px-4 py-3 bg-slate-900/50 rounded-lg border border-slate-800",children:[s.jsxs("div",{className:"flex items-center gap-2 text-sm text-slate-400",children:[s.jsx("span",{children:"Next automation:"}),s.jsx("span",{className:"text-slate-200 font-medium",children:ie.agent}),s.jsx("span",{children:ie.time})]}),s.jsxs("button",{onClick:()=>n("/scheduling"),className:"text-sm text-indigo-400 hover:text-indigo-300 flex items-center transition-colors",children:["Manage Schedules ",s.jsx(Gf,{className:"ml-1 h-3 w-3"})]})]}):N!=null&&N.paused?s.jsxs("div",{className:"flex items-center justify-between px-4 py-3 bg-amber-900/20 rounded-lg border border-amber-800/40",children:[s.jsxs("div",{className:"flex items-center gap-2 text-sm text-amber-400",children:[s.jsx(ou,{className:"h-3.5 w-3.5"}),s.jsx("span",{children:"Automation is paused"})]}),s.jsxs("button",{onClick:S,disabled:j,className:"text-sm text-emerald-400 hover:text-emerald-300 flex items-center transition-colors disabled:opacity-50",children:[j?s.jsx(pc,{className:"h-3.5 w-3.5 mr-1.5 animate-spin"}):s.jsx(xn,{className:"h-3.5 w-3.5 mr-1.5 fill-current"}),"Resume"]})]}):null,s.jsx(Cp,{variant:"compact",onViewDetails:()=>n("/analytics")}),s.jsxs("div",{className:"mt-6",children:[s.jsxs("div",{className:"flex items-center justify-between mb-4",children:[s.jsx("h2",{className:"text-lg font-semibold text-slate-200",children:"GitHub Board"}),s.jsxs("button",{onClick:()=>n("/board"),className:"text-sm text-indigo-400 hover:text-indigo-300 flex items-center transition-colors",children:["View board ",s.jsx(Gf,{className:"ml-1 h-3 w-3"})]})]}),s.jsx(et,{className:"p-4",children:W?s.jsx(Ha,{variant:"inline",message:"Loading board"}):R?s.jsx("div",{className:"flex flex-wrap gap-3",children:Jl.map(P=>{var he;const K=((he=R.columns[P])==null?void 0:he.length)??0;return s.jsxs("button",{onClick:()=>n("/board"),className:`inline-flex items-center space-x-2 px-3 py-2 rounded-lg ring-1 ring-inset transition-colors hover:opacity-80 ${FN[P]}`,children:[s.jsx("span",{className:"text-xs font-medium",children:P}),s.jsx("span",{className:"text-xs font-bold",children:K})]},P)})}):s.jsxs("p",{className:"text-sm text-slate-500 italic",children:["Board not configured — run ",s.jsx("code",{className:"font-mono bg-slate-800 px-1.5 py-0.5 rounded text-indigo-300 text-xs",children:"night-watch board setup"})," to enable."]})})]})]})},ZN=()=>{const[n,r]=z.useState(!0),[o,u]=z.useState(""),[h,f]=z.useState("executor"),b=z.useRef(null),{selectedProjectId:j,globalModeLoading:y}=Zt(),x=Zt(L=>L.status),{data:E,loading:M,error:D,refetch:A}=qa(()=>iN(h,500),[h,j],{enabled:!y}),N=(E==null?void 0:E.lines)||[];z.useEffect(()=>{n&&b.current&&(b.current.scrollTop=b.current.scrollHeight)},[N,n]),z.useEffect(()=>{if(!n)return;const L=window.setInterval(()=>{A()},3e3);return()=>window.clearInterval(L)},[n,h,A]);const O=N.filter(L=>L.toLowerCase().includes(o.toLowerCase())),R=L=>{f(L),u("")},W=L=>{if(!(x!=null&&x.processes))return!1;const J=x.processes.find(w=>w.name===L);return(J==null?void 0:J.running)??!1};return D?s.jsxs("div",{className:"flex flex-col items-center justify-center h-full space-y-4",children:[s.jsx(pn,{className:"h-12 w-12 text-red-400"}),s.jsx("div",{className:"text-slate-300",children:"Failed to load logs"}),s.jsx("div",{className:"text-sm text-slate-500",children:D.message}),s.jsx(Le,{onClick:()=>A(),children:"Retry"})]}):s.jsxs("div",{className:"flex flex-col h-[calc(100vh-8rem)]",children:[s.jsxs("div",{className:"flex items-center justify-between mb-4 bg-slate-900 p-2 rounded-lg border border-slate-800 shadow-sm",children:[s.jsxs("div",{className:"flex items-center space-x-2",children:[s.jsxs("div",{className:"relative group",children:[s.jsx("input",{type:"text",placeholder:"Filter logs...",className:"pl-9 pr-4 py-1.5 rounded-md border border-slate-700 bg-slate-950 text-slate-200 text-sm focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:border-transparent w-64 placeholder:text-slate-600",value:o,onChange:L=>u(L.target.value)}),s.jsx(Ir,{className:"absolute left-2.5 top-2 h-4 w-4 text-slate-500 group-focus-within:text-indigo-400"})]}),s.jsx("div",{className:"h-6 w-px bg-slate-700 mx-2"}),s.jsx("div",{className:"flex space-x-1",children:xp.map(({processName:L,label:J})=>s.jsx("button",{onClick:()=>R(L),className:`px-3 py-1.5 rounded text-sm font-medium transition-colors ${h===L?"bg-slate-800 text-slate-200 shadow-sm border border-slate-700":"text-slate-400 hover:bg-slate-800 hover:text-slate-200"}`,children:s.jsxs("div",{className:"flex items-center space-x-2",children:[s.jsx("span",{children:J}),W(L)&&s.jsx("div",{className:"h-2 w-2 bg-green-500 rounded-full animate-pulse"})]})},L))})]}),s.jsxs("div",{className:"flex items-center space-x-2",children:[s.jsxs(Le,{size:"sm",variant:"ghost",onClick:()=>A(),children:[s.jsx(Vg,{className:"h-4 w-4 mr-2"}),"Refresh"]}),s.jsxs(Le,{size:"sm",variant:"ghost",onClick:()=>r(!n),children:[n?s.jsx(ou,{className:"h-4 w-4 mr-2"}):s.jsx(xn,{className:"h-4 w-4 mr-2"}),n?"Pause":"Resume"]})]})]}),s.jsxs("div",{className:"flex-1 bg-slate-900 rounded-xl overflow-hidden shadow-inner border border-slate-800 flex flex-col relative",children:[s.jsxs("div",{className:"bg-slate-950/50 backdrop-blur text-xs text-slate-500 px-4 py-1.5 flex justify-between border-b border-slate-800",children:[s.jsxs("span",{children:["File: ",h,".log"]}),s.jsxs("span",{children:[O.length," lines"]})]}),s.jsxs("div",{ref:b,className:"flex-1 overflow-y-auto p-4 font-mono text-sm terminal-scroll bg-slate-900",children:[M?s.jsx(Ha,{variant:"inline",message:"Loading logs"}):O.length===0?s.jsx("div",{className:"flex items-center justify-center h-full text-slate-500",children:o?"No logs match your filter":"No logs yet — logs will appear after the first run"}):O.map((L,J)=>{const w=L.includes("[ERROR]"),H=L.includes("[WARN]");return s.jsxs("div",{className:`leading-6 hover:bg-slate-800/50 px-2 rounded -mx-2 ${w?"text-red-400":H?"text-amber-400":"text-slate-300"}`,children:[s.jsx("span",{className:"text-slate-600 select-none w-10 inline-block text-right mr-4 text-xs opacity-50",children:J+1}),L]},J)}),n&&s.jsx("div",{className:"h-4"})," "]}),!n&&s.jsxs("div",{className:"absolute bottom-4 right-4 bg-indigo-600 text-white px-3 py-1.5 rounded-full shadow-lg shadow-indigo-900/40 text-xs font-medium flex items-center cursor-pointer hover:bg-indigo-500 transition-colors",onClick:()=>r(!0),children:[s.jsx(Vg,{className:"h-4 w-4 mr-2"}),"Scroll to bottom"]})]})]})},WN=()=>{const[n,r]=z.useState(null),[o,u]=z.useState(!1),[h,f]=z.useState("all"),[b,j]=z.useState("number"),[y,x]=z.useState("desc"),{addToast:E,selectedProjectId:M,globalModeLoading:D}=Zt(),{data:A,loading:N,error:O,refetch:R}=qa(yp,[M],{enabled:!D}),W=A??[],L=S=>{switch(S){case"pass":return s.jsx(wc,{className:"h-4 w-4 text-green-500"});case"fail":return s.jsx(J1,{className:"h-4 w-4 text-red-500"});case"pending":return s.jsx(gh,{className:"h-4 w-4 text-amber-500 animate-spin"});default:return s.jsx(pn,{className:"h-4 w-4 text-slate-500"})}},J=S=>{switch(S){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"}},w=S=>S===null?"No review decision yet":S===100?"PR has been approved":S===0?"Changes have been requested":`Review score: ${S}`,H=z.useMemo(()=>W.filter(S=>{switch(h){case"needs-work":return S.ciStatus==="fail"||S.reviewScore===0;case"pending":return S.ciStatus==="pending"||S.ciStatus==="unknown"||S.reviewScore===null;case"passed":return S.ciStatus==="pass"&&S.reviewScore===100;case"all":default:return!0}}),[W,h]),q=z.useMemo(()=>[...H].sort((te,ae)=>{let ie=0;switch(b){case"number":ie=te.number-ae.number;break;case"title":ie=te.title.localeCompare(ae.title);break;case"branch":ie=te.branch.localeCompare(ae.branch);break;case"ciStatus":{const ge={fail:0,pending:1,unknown:2,pass:3};ie=(ge[te.ciStatus]??2)-(ge[ae.ciStatus]??2);break}case"reviewScore":{const ge=te.reviewScore??-1,pe=ae.reviewScore??-1;ie=ge-pe;break}}return y==="asc"?ie:-ie}),[H,b,y]),G=S=>{b===S?x(y==="asc"?"desc":"asc"):(j(S),x("desc"))},Z=S=>b!==S?s.jsx(C1,{className:"h-3 w-3 text-slate-600"}):y==="asc"?s.jsx(M1,{className:"h-3 w-3 text-indigo-400"}):s.jsx(w1,{className:"h-3 w-3 text-indigo-400"});if(N)return s.jsx(Ha,{message:"Loading pull requests",detail:"Fetching review status and CI results."});if(O)return s.jsxs("div",{className:"flex flex-col items-center justify-center h-full space-y-4",children:[s.jsx(pn,{className:"h-12 w-12 text-red-400"}),s.jsx("div",{className:"text-slate-300",children:"Failed to load PRs"}),s.jsx("div",{className:"text-sm text-slate-500",children:O.message}),s.jsx(Le,{onClick:()=>R(),children:"Retry"})]});const le=async()=>{u(!0);try{const S=await uN();E({title:"Reviewer Started",message:S.pid?`Started with PID ${S.pid}`:"Reviewer started",type:"success"})}catch(S){E({title:"Reviewer Failed",message:S instanceof Error?S.message:"Failed to start reviewer",type:"error"})}finally{u(!1)}};return s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:"flex space-x-1",children:[s.jsx("button",{onClick:()=>f("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"}),s.jsx("button",{onClick:()=>f("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"}),s.jsx("button",{onClick:()=>f("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"}),s.jsx("button",{onClick:()=>f("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"})]}),s.jsxs(Le,{size:"sm",onClick:le,disabled:o,children:[s.jsx(Ir,{className:"h-4 w-4 mr-2"}),o?"Starting...":"Run Reviewer Now"]})]}),s.jsx("div",{className:"bg-slate-900 rounded-lg shadow-sm border border-slate-800 overflow-hidden",children:s.jsxs("table",{className:"min-w-full divide-y divide-slate-800",children:[s.jsx("thead",{className:"bg-slate-950/50",children:s.jsxs("tr",{children:[s.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-slate-500 uppercase tracking-wider cursor-pointer hover:text-slate-300",onClick:()=>G("number"),children:s.jsxs("div",{className:"flex items-center space-x-1",children:[s.jsx("span",{children:"Title"}),Z("number")]})}),s.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-slate-500 uppercase tracking-wider cursor-pointer hover:text-slate-300",onClick:()=>G("branch"),children:s.jsxs("div",{className:"flex items-center space-x-1",children:[s.jsx("span",{children:"Branch"}),Z("branch")]})}),s.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-slate-500 uppercase tracking-wider cursor-pointer hover:text-slate-300",onClick:()=>G("ciStatus"),children:s.jsxs("div",{className:"flex items-center space-x-1",children:[s.jsx("span",{children:"CI Status"}),Z("ciStatus")]})}),s.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-slate-500 uppercase tracking-wider cursor-pointer hover:text-slate-300",onClick:()=>G("reviewScore"),children:s.jsxs("div",{className:"flex items-center space-x-1",children:[s.jsx("span",{children:"Review Score"}),Z("reviewScore")]})}),s.jsx("th",{className:"px-6 py-3 text-right text-xs font-medium text-slate-500 uppercase tracking-wider",children:"Actions"})]})}),s.jsxs("tbody",{className:"divide-y divide-slate-800",children:[q.map(S=>s.jsxs("tr",{className:"hover:bg-slate-800/50 cursor-pointer transition-colors",onClick:()=>r(n===S.number?null:S.number),children:[s.jsx("td",{className:"px-6 py-4",children:s.jsxs("div",{className:"flex items-center",children:[s.jsxs("span",{className:"text-slate-500 font-mono mr-2",children:["#",S.number]}),s.jsx("span",{className:"font-medium text-slate-200",children:S.title})]})}),s.jsx("td",{className:"px-6 py-4",children:s.jsx("span",{className:"px-2 py-1 bg-slate-800 text-slate-400 border border-slate-700 rounded text-xs font-mono",children:S.branch})}),s.jsx("td",{className:"px-6 py-4",children:s.jsxs("div",{className:"flex items-center space-x-2",title:J(S.ciStatus),children:[L(S.ciStatus),s.jsx("span",{className:"text-sm capitalize text-slate-400",children:S.ciStatus})]})}),s.jsx("td",{className:"px-6 py-4",children:S.reviewScore!==null?s.jsxs("div",{className:"flex items-center space-x-2",title:w(S.reviewScore),children:[s.jsx("div",{className:"w-24 h-2 bg-slate-800 rounded-full overflow-hidden",children:s.jsx("div",{className:`h-full ${S.reviewScore>=70?"bg-green-500":"bg-red-500"}`,style:{width:`${S.reviewScore}%`}})}),s.jsx("span",{className:`text-sm font-bold ${S.reviewScore>=70?"text-green-500":"text-red-500"}`,children:S.reviewScore})]}):s.jsx("span",{className:"text-slate-600 text-sm",title:"No review decision yet",children:"—"})}),s.jsx("td",{className:"px-6 py-4 text-right",children:s.jsx("a",{href:S.url,target:"_blank",rel:"noopener noreferrer",className:"text-slate-500 hover:text-indigo-400",onClick:te=>te.stopPropagation(),children:s.jsx(hp,{className:"h-4 w-4"})})})]},S.number)),q.length===0&&s.jsx("tr",{children:s.jsx("td",{colSpan:5,className:"px-6 py-12 text-center text-slate-500",children:W.length===0?"No open PRs found.":`No PRs match the "${h}" filter.`})})]})]})}),n&&s.jsx(et,{className:"p-6 bg-slate-900 border-indigo-900/50 animate-in fade-in slide-in-from-top-4 duration-300",children:(()=>{const S=W.find(te=>te.number===n);return S?s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"font-bold text-slate-200",children:S.title}),s.jsxs("p",{className:"text-sm text-slate-400 mt-1",children:["Branch: ",s.jsx("span",{className:"font-mono",children:S.branch})]})]}),s.jsxs("div",{className:"flex items-center space-x-4",children:[s.jsxs("div",{className:"text-center",title:J(S.ciStatus),children:[s.jsx("div",{className:"text-xs text-slate-500",children:"CI Status"}),s.jsxs("div",{className:"flex items-center space-x-1 mt-1",children:[L(S.ciStatus),s.jsx("span",{className:"text-sm capitalize text-slate-300",children:S.ciStatus})]})]}),S.reviewScore!==null&&s.jsxs("div",{className:"text-center",title:w(S.reviewScore),children:[s.jsx("div",{className:"text-xs text-slate-500",children:"Review Score"}),s.jsx("div",{className:`text-xl font-bold mt-1 ${S.reviewScore>=70?"text-green-500":"text-red-500"}`,children:S.reviewScore})]})]})]}):null})()})]})},Gt=ze.forwardRef(({className:n="",label:r,checked:o,onChange:u,...h},f)=>{const b=j=>{u&&u(j.target.checked)};return s.jsxs("label",{className:`inline-flex items-center cursor-pointer ${n}`,children:[s.jsxs("div",{className:"relative",children:[s.jsx("input",{type:"checkbox",className:"sr-only peer",ref:f,checked:o,onChange:b,...h}),s.jsx("div",{className:"w-11 h-6 bg-slate-800 peer-focus:outline-none peer-focus:ring-2 peer-focus:ring-indigo-500/50 rounded-full peer peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-slate-400 after:border-slate-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all peer-checked:bg-indigo-600 peer-checked:after:bg-white peer-disabled:opacity-50 peer-disabled:cursor-not-allowed"})]}),r&&s.jsx("span",{className:"ml-3 text-sm font-medium text-slate-300 select-none",children:r})]})});Gt.displayName="Switch";const IN=()=>{const{addToast:n,selectedProjectId:r,globalModeLoading:o}=Zt(),[u,h]=z.useState(!1),[f,b]=z.useState(!1),{data:j,loading:y,error:x,refetch:E}=qa(yN,[r],{enabled:!o});z.useEffect(()=>{if(!(j!=null&&j.enabled))return;const L=setInterval(()=>{E()},1e4);return()=>clearInterval(L)},[j==null?void 0:j.enabled,E]);const M=async L=>{b(!0);try{await Ep(L),n({title:L?"Scanner Enabled":"Scanner Disabled",message:L?"Roadmap scanner is now active.":"Roadmap scanner has been paused.",type:L?"success":"info"}),E()}catch(J){n({title:"Toggle Failed",message:J instanceof Error?J.message:"Failed to toggle scanner",type:"error"})}finally{b(!1)}},D=async()=>{h(!0);try{const L=await bN();L.created.length>0?n({title:"Scan Complete",message:`Created ${L.created.length} PRD(s): ${L.created.join(", ")}`,type:"success"}):n({title:"Scan Complete",message:"No new PRDs to create.",type:"info"}),L.errors.length>0&&n({title:"Scan Errors",message:L.errors.join("; "),type:"warning"}),E()}catch(L){n({title:"Scan Failed",message:L instanceof Error?L.message:"Failed to scan roadmap",type:"error"})}finally{h(!1)}};if(y)return s.jsx(Ha,{message:"Loading roadmap scanner",detail:"Checking scanner status and roadmap items."});if(x)return s.jsxs("div",{className:"flex flex-col items-center justify-center h-full space-y-4",children:[s.jsx(pn,{className:"h-12 w-12 text-red-400"}),s.jsx("div",{className:"text-slate-300",children:"Failed to load roadmap data"}),s.jsx("div",{className:"text-sm text-slate-500",children:x.message}),s.jsx(Le,{onClick:()=>E(),children:"Retry"})]});if(!j)return null;if(j.status==="no-roadmap")return s.jsxs("div",{className:"space-y-6 max-w-6xl mx-auto",children:[s.jsx("div",{className:"flex items-center justify-between",children:s.jsx("h1",{className:"text-3xl font-bold text-slate-100",children:"Roadmap Scanner"})}),s.jsx(et,{className:"p-12",children:s.jsxs("div",{className:"flex flex-col items-center text-center space-y-4",children:[s.jsx("div",{className:"p-4 bg-slate-800 rounded-full",children:s.jsx(mp,{className:"h-10 w-10 text-slate-500"})}),s.jsx("h2",{className:"text-xl font-semibold text-slate-200",children:"No ROADMAP.md Found"}),s.jsxs("p",{className:"text-slate-400 max-w-md",children:["Create a ",s.jsx("code",{className:"text-indigo-400 bg-indigo-500/10 px-1.5 py-0.5 rounded text-sm",children:"ROADMAP.md"})," in your project root with checklist items (",s.jsx("code",{className:"text-slate-300 text-sm",children:"- [ ] Feature"}),") or heading-based items (",s.jsx("code",{className:"text-slate-300 text-sm",children:"### Feature"}),") to get started."]})]})})]});const A=j.totalItems>0?Math.round(j.processedItems/j.totalItems*100):0,N=XN(j.status),O=JN(j.items),R=j.lastScan?KN(j.lastScan):"Never",W=j.autoScanInterval?Math.round(j.autoScanInterval/60):5;return s.jsxs("div",{className:"space-y-6 max-w-6xl mx-auto",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx("h1",{className:"text-3xl font-bold text-slate-100",children:"Roadmap Scanner"}),s.jsxs("div",{className:"flex items-center space-x-4",children:[s.jsx(Gt,{label:j.enabled?"Enabled":"Disabled",checked:j.enabled,onChange:M,disabled:f}),s.jsxs(Le,{onClick:D,loading:u,disabled:!j.enabled||j.status==="complete",children:[s.jsx(xn,{className:"h-4 w-4 mr-2"}),"Scan Now"]})]})]}),s.jsx(et,{className:`p-6 border-2 ${N.borderColor}`,children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center space-x-4",children:[s.jsx(N.icon,{className:`h-8 w-8 ${N.textColor}`}),s.jsxs("div",{children:[s.jsx("div",{className:"text-sm text-slate-400",children:"Scanner Status"}),s.jsx("div",{className:`text-2xl font-bold ${N.textColor}`,children:N.label})]})]}),s.jsxs("div",{className:"text-right text-sm text-slate-400 space-y-1",children:[s.jsxs("div",{children:["Last scan: ",s.jsx("span",{className:"text-slate-300",children:R})]}),j.enabled&&j.status!=="complete"&&s.jsxs("div",{children:["Auto-scan: ",s.jsxs("span",{className:"text-slate-300",children:["every ",W," min"]})]}),j.enabled&&j.status==="complete"&&s.jsx("div",{className:"text-emerald-400",children:"Auto-scan paused - all items sliced"})]})]})}),s.jsxs(et,{className:"p-6",children:[s.jsxs("div",{className:"flex items-center justify-between mb-3",children:[s.jsx("h3",{className:"text-sm font-medium text-slate-300",children:"Progress"}),s.jsxs("span",{className:"text-sm text-slate-400",children:[j.processedItems," / ",j.totalItems," items (",A,"%)"]})]}),s.jsx("div",{className:"w-full h-3 bg-slate-800 rounded-full overflow-hidden",children:s.jsx("div",{className:`h-full rounded-full transition-all duration-500 ${A===100?"bg-gradient-to-r from-emerald-500 to-emerald-400":"bg-gradient-to-r from-indigo-600 to-indigo-400"}`,style:{width:`${A}%`}})})]}),Object.entries(O).map(([L,J])=>s.jsxs(et,{className:"p-6",children:[s.jsx("h3",{className:"text-lg font-semibold text-slate-200 mb-4",children:L}),s.jsx("div",{className:"space-y-2",children:J.map(w=>s.jsx(QN,{item:w},w.hash))})]},L))]})};function QN({item:n}){const r=n.checked,o=n.processed;return s.jsxs("div",{className:`flex items-center justify-between p-3 rounded-lg border ${r?"bg-slate-950/30 border-slate-800/50":o?"bg-emerald-500/5 border-emerald-500/10":"bg-slate-950/50 border-slate-800"}`,children:[s.jsxs("div",{className:"flex items-center space-x-3 min-w-0 flex-1",children:[r?s.jsx(wj,{className:"h-4 w-4 text-slate-600 flex-shrink-0"}):o?s.jsx(wc,{className:"h-4 w-4 text-emerald-400 flex-shrink-0"}):s.jsx(Zf,{className:"h-4 w-4 text-slate-500 flex-shrink-0"}),s.jsxs("div",{className:"min-w-0",children:[s.jsx("div",{className:`text-sm font-medium truncate ${r?"line-through text-slate-600":"text-slate-200"}`,children:n.title}),n.description&&s.jsx("div",{className:"text-xs text-slate-500 truncate mt-0.5",children:n.description})]})]}),s.jsx("div",{className:"flex-shrink-0 ml-3",children:r?s.jsx(Tt,{variant:"neutral",children:"Skipped"}):o?s.jsx(Tt,{variant:"success",children:n.prdFile||"Processed"}):s.jsx(Tt,{variant:"warning",children:"Pending"})})]})}function XN(n){switch(n){case"complete":return{label:"Complete",icon:wc,textColor:"text-emerald-400",borderColor:"border-emerald-500/20 bg-emerald-500/5"};case"idle":return{label:"Idle",icon:fp,textColor:"text-blue-400",borderColor:"border-blue-500/20 bg-blue-500/5"};case"scanning":return{label:"Scanning",icon:xn,textColor:"text-indigo-400",borderColor:"border-indigo-500/20 bg-indigo-500/5"};case"disabled":return{label:"Disabled",icon:pn,textColor:"text-slate-400",borderColor:"border-slate-500/20 bg-slate-500/5"};default:return{label:"No Roadmap",icon:pn,textColor:"text-slate-500",borderColor:"border-slate-500/20"}}}function JN(n){const r={};for(const o of n){const u=o.section||"General";r[u]||(r[u]=[]),r[u].push(o)}return r}function KN(n){try{const r=new Date(n),u=new Date().getTime()-r.getTime(),h=Math.floor(u/6e4);if(h<1)return"Just now";if(h<60)return`${h} min ago`;const f=Math.floor(h/60);return f<24?`${f} hr ago`:`${Math.floor(f/24)} day(s) ago`}catch{return"Unknown"}}const Xe=ze.forwardRef(({className:n="",label:r,error:o,helperText:u,options:h,value:f,onChange:b,children:j,...y},x)=>{const E=ze.useId(),M=y.id??E,D=o?`${M}-error`:void 0,A=!o&&u?`${M}-help`:void 0,N=[D,A].filter(Boolean).join(" ")||void 0,O=R=>{b&&b(R.target.value)};return s.jsxs("div",{className:"w-full",children:[r&&s.jsx("label",{htmlFor:M,className:"block text-sm font-medium text-slate-400 mb-1.5",children:r}),s.jsxs("div",{className:"relative",children:[s.jsx("select",{ref:x,id:M,"aria-describedby":N,"aria-invalid":o?!0:y["aria-invalid"],className:`
|
|
425
|
+
w-full appearance-none rounded-lg bg-slate-950 border border-slate-800
|
|
426
|
+
px-3 py-2 pr-10 text-sm text-slate-200
|
|
427
|
+
focus:outline-none focus:ring-2 focus:ring-indigo-500/50 focus:border-indigo-500
|
|
428
|
+
disabled:opacity-50 disabled:cursor-not-allowed
|
|
429
|
+
transition-all duration-200
|
|
430
|
+
${o?"border-red-500/50 focus:ring-red-500/50 focus:border-red-500":""}
|
|
431
|
+
${n}
|
|
432
|
+
`,value:f,onChange:O,...y,children:h?h.map(R=>s.jsx("option",{value:R.value,children:R.label},R.value)):j}),s.jsx("div",{className:"pointer-events-none absolute inset-y-0 right-0 flex items-center px-2 text-slate-500",children:s.jsx(dh,{className:"h-4 w-4"})})]}),o?s.jsx("p",{id:D,className:"mt-1.5 text-xs text-red-400",children:o}):u?s.jsx("p",{id:A,className:"mt-1.5 text-xs text-slate-500",children:u}):null]})});Xe.displayName="Select";const Ee=ze.forwardRef(({className:n="",label:r,error:o,helperText:u,rightIcon:h,...f},b)=>{const j=ze.useId(),y=f.id??j,x=o?`${y}-error`:void 0,E=!o&&u?`${y}-help`:void 0,M=[x,E].filter(Boolean).join(" ")||void 0;return s.jsxs("div",{className:"w-full",children:[r&&s.jsx("label",{htmlFor:y,className:"block text-sm font-medium text-slate-400 mb-1.5",children:r}),s.jsxs("div",{className:"relative",children:[s.jsx("input",{ref:b,id:y,"aria-describedby":M,"aria-invalid":o?!0:f["aria-invalid"],className:`
|
|
433
|
+
w-full rounded-lg bg-slate-950 border border-slate-800
|
|
434
|
+
px-3 py-2 text-sm text-slate-200
|
|
435
|
+
placeholder:text-slate-600
|
|
436
|
+
focus:outline-none focus:ring-2 focus:ring-indigo-500/50 focus:border-indigo-500
|
|
437
|
+
disabled:opacity-50 disabled:cursor-not-allowed
|
|
438
|
+
transition-all duration-200
|
|
439
|
+
${o?"border-red-500/50 focus:ring-red-500/50 focus:border-red-500":""}
|
|
440
|
+
${h?"pr-10":""}
|
|
441
|
+
${n}
|
|
442
|
+
`,...f}),h&&s.jsx("div",{className:"absolute inset-y-0 right-0 flex items-center pr-3 pointer-events-none text-slate-500",children:h})]}),o?s.jsx("p",{id:x,className:"mt-1.5 text-xs text-red-400",children:o}):u?s.jsx("p",{id:E,className:"mt-1.5 text-xs text-slate-500",children:u}):null]})});Ee.displayName="Input";const Mp=({tabs:n,activeTab:r,onChange:o,className:u=""})=>{var y,x;const[h,f]=ze.useState((y=n[0])==null?void 0:y.id),b=r||h,j=E=>{o?o(E):f(E)};return s.jsxs("div",{className:`flex flex-col ${u}`,children:[s.jsx("div",{className:"border-b border-slate-800 mb-6",children:s.jsx("nav",{className:"-mb-px flex space-x-8 overflow-x-auto scrollbar-hide",children:n.map(E=>s.jsx("button",{onClick:()=>j(E.id),className:`
|
|
443
|
+
whitespace-nowrap py-4 px-1 border-b-2 font-medium text-sm transition-all duration-200
|
|
444
|
+
${b===E.id?"border-indigo-500 text-indigo-400":"border-transparent text-slate-500 hover:text-slate-300 hover:border-slate-700"}
|
|
445
|
+
`,children:E.label},E.id))})}),s.jsx("div",{className:"flex-1 animate-in fade-in slide-in-from-bottom-2 duration-300",children:(x=n.find(E=>E.id===b))==null?void 0:x.content})]})};var Us={},Ua={},ac={},Hs={},Uf={},nx;function e2(){return nx||(nx=1,Object.defineProperty(Uf,"__esModule",{value:!0})),Uf}var nc={},lc={},lx;function Gs(){var r,o,u,h,f,Op,j;if(lx)return lc;lx=1,Object.defineProperty(lc,"__esModule",{value:!0}),lc.CronField=void 0;let n=(j=class{constructor(x,E={rawValue:""}){at(this,f);at(this,r,!1);at(this,o,!1);at(this,u,!1);at(this,h,[]);jg(this,"options",{rawValue:""});if(!Array.isArray(x))throw new Error(`${this.constructor.name} Validation error, values is not an array`);if(!(x.length>0))throw new Error(`${this.constructor.name} Validation error, values contains no values`);this.options={...E,rawValue:E.rawValue??""},Oe(this,h,x.sort(j.sorter)),Oe(this,u,this.options.wildcard!==void 0?this.options.wildcard:Te(this,f,Op).call(this)),Oe(this,r,this.options.rawValue.includes("L")||x.includes("L")),Oe(this,o,this.options.rawValue.includes("?")||x.includes("?"))}static get min(){throw new Error("min must be overridden")}static get max(){throw new Error("max must be overridden")}static get chars(){return Object.freeze([])}static get validChars(){return/^[?,*\dH/-]+$|^.*H\(\d+-\d+\)\/\d+.*$|^.*H\(\d+-\d+\).*$|^.*H\/\d+.*$/}static get constraints(){return{min:this.min,max:this.max,chars:this.chars,validChars:this.validChars}}get min(){return this.constructor.min}get max(){return this.constructor.max}get chars(){return this.constructor.chars}get hasLastChar(){return ee(this,r)}get hasQuestionMarkChar(){return ee(this,o)}get isWildcard(){return ee(this,u)}get values(){return ee(this,h)}static sorter(x,E){const M=typeof x=="number",D=typeof E=="number";return M&&D?x-E:!M&&!D?x.localeCompare(E):M?-1:1}static findNearestValueInList(x,E,M=!1){if(M){for(let D=x.length-1;D>=0;D--)if(x[D]<E)return x[D];return null}for(let D=0;D<x.length;D++)if(x[D]>E)return x[D];return null}findNearestValue(x,E=!1){return this.constructor.findNearestValueInList(this.values,x,E)}serialize(){return{wildcard:ee(this,u),values:ee(this,h)}}validate(){let x;const E=this.chars.length>0?` or chars ${this.chars.join("")}`:"",M=O=>R=>new RegExp(`^\\d{0,2}${R}$`).test(O),D=O=>(x=O,typeof O=="number"?O>=this.min&&O<=this.max:this.chars.some(M(O)));if(!ee(this,h).every(D))throw new Error(`${this.constructor.name} Validation error, got value ${x} expected range ${this.min}-${this.max}${E}`);const N=ee(this,h).find((O,R)=>ee(this,h).indexOf(O)!==R);if(N)throw new Error(`${this.constructor.name} Validation error, duplicate values found: ${N}`)}},r=new WeakMap,o=new WeakMap,u=new WeakMap,h=new WeakMap,f=new WeakSet,Op=function(){return this.options.rawValue.length>0?["*","?"].includes(this.options.rawValue):Array.from({length:this.max-this.min+1},(x,E)=>E+this.min).every(x=>ee(this,h).includes(x))},j);return lc.CronField=n,lc}var sx;function t2(){if(sx)return nc;sx=1,Object.defineProperty(nc,"__esModule",{value:!0}),nc.CronDayOfMonth=void 0;const n=Gs(),r=1,o=31,u=Object.freeze(["L"]);let h=class extends n.CronField{static get min(){return r}static get max(){return o}static get chars(){return u}static get validChars(){return/^[?,*\dLH/-]+$|^.*H\(\d+-\d+\)\/\d+.*$|^.*H\(\d+-\d+\).*$|^.*H\/\d+.*$/}constructor(b,j){super(b,j),this.validate()}get values(){return super.values}};return nc.CronDayOfMonth=h,nc}var sc={},rx;function a2(){if(rx)return sc;rx=1,Object.defineProperty(sc,"__esModule",{value:!0}),sc.CronDayOfWeek=void 0;const n=Gs(),r=0,o=7,u=Object.freeze(["L"]);let h=class extends n.CronField{static get min(){return r}static get max(){return o}static get chars(){return u}static get validChars(){return/^[?,*\dLH#/-]+$|^.*H\(\d+-\d+\)\/\d+.*$|^.*H\(\d+-\d+\).*$|^.*H\/\d+.*$/}constructor(b,j){super(b,j),this.validate()}get values(){return super.values}get nthDay(){return this.options.nthDayOfWeek??0}};return sc.CronDayOfWeek=h,sc}var rc={},ix;function n2(){if(ix)return rc;ix=1,Object.defineProperty(rc,"__esModule",{value:!0}),rc.CronHour=void 0;const n=Gs(),r=0,o=23,u=Object.freeze([]);let h=class extends n.CronField{static get min(){return r}static get max(){return o}static get chars(){return u}constructor(b,j){super(b,j),this.validate()}get values(){return super.values}};return rc.CronHour=h,rc}var ic={},cx;function l2(){if(cx)return ic;cx=1,Object.defineProperty(ic,"__esModule",{value:!0}),ic.CronMinute=void 0;const n=Gs(),r=0,o=59,u=Object.freeze([]);let h=class extends n.CronField{static get min(){return r}static get max(){return o}static get chars(){return u}constructor(b,j){super(b,j),this.validate()}get values(){return super.values}};return ic.CronMinute=h,ic}var cc={},Hf={},Ta={},ox;function s2(){if(ox)return Ta;ox=1,Object.defineProperty(Ta,"__esModule",{value:!0});class n extends Error{}class r extends n{constructor(i){super(`Invalid DateTime: ${i.toMessage()}`)}}class o extends n{constructor(i){super(`Invalid Interval: ${i.toMessage()}`)}}class u extends n{constructor(i){super(`Invalid Duration: ${i.toMessage()}`)}}class h extends n{}class f extends n{constructor(i){super(`Invalid unit ${i}`)}}class b extends n{}class j extends n{constructor(){super("Zone is an abstract class")}}const y="numeric",x="short",E="long",M={year:y,month:y,day:y},D={year:y,month:x,day:y},A={year:y,month:x,day:y,weekday:x},N={year:y,month:E,day:y},O={year:y,month:E,day:y,weekday:E},R={hour:y,minute:y},W={hour:y,minute:y,second:y},L={hour:y,minute:y,second:y,timeZoneName:x},J={hour:y,minute:y,second:y,timeZoneName:E},w={hour:y,minute:y,hourCycle:"h23"},H={hour:y,minute:y,second:y,hourCycle:"h23"},q={hour:y,minute:y,second:y,hourCycle:"h23",timeZoneName:x},G={hour:y,minute:y,second:y,hourCycle:"h23",timeZoneName:E},Z={year:y,month:y,day:y,hour:y,minute:y},le={year:y,month:y,day:y,hour:y,minute:y,second:y},S={year:y,month:x,day:y,hour:y,minute:y},te={year:y,month:x,day:y,hour:y,minute:y,second:y},ae={year:y,month:x,day:y,weekday:x,hour:y,minute:y},ie={year:y,month:E,day:y,hour:y,minute:y,timeZoneName:x},ge={year:y,month:E,day:y,hour:y,minute:y,second:y,timeZoneName:x},pe={year:y,month:E,day:y,weekday:E,hour:y,minute:y,timeZoneName:E},P={year:y,month:E,day:y,weekday:E,hour:y,minute:y,second:y,timeZoneName:E};class K{get type(){throw new j}get name(){throw new j}get ianaName(){return this.name}get isUniversal(){throw new j}offsetName(i,m){throw new j}formatOffset(i,m){throw new j}offset(i){throw new j}equals(i){throw new j}get isValid(){throw new j}}let he=null;class fe extends K{static get instance(){return he===null&&(he=new fe),he}get type(){return"system"}get name(){return new Intl.DateTimeFormat().resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(i,{format:m,locale:v}){return qn(i,m,v)}formatOffset(i,m){return is(this.offset(i),m)}offset(i){return-new Date(i).getTimezoneOffset()}equals(i){return i.type==="system"}get isValid(){return!0}}const Ne=new Map;function U(g){let i=Ne.get(g);return i===void 0&&(i=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:g,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",era:"short"}),Ne.set(g,i)),i}const se={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};function me(g,i){const m=g.format(i).replace(/\u200E/g,""),v=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(m),[,C,k,V,B,Y,de,be]=v;return[V,C,k,B,Y,de,be]}function ve(g,i){const m=g.formatToParts(i),v=[];for(let C=0;C<m.length;C++){const{type:k,value:V}=m[C],B=se[k];k==="era"?v[B]=V:ke(B)||(v[B]=parseInt(V,10))}return v}const Re=new Map;class xe extends K{static create(i){let m=Re.get(i);return m===void 0&&Re.set(i,m=new xe(i)),m}static resetCache(){Re.clear(),Ne.clear()}static isValidSpecifier(i){return this.isValidZone(i)}static isValidZone(i){if(!i)return!1;try{return new Intl.DateTimeFormat("en-US",{timeZone:i}).format(),!0}catch{return!1}}constructor(i){super(),this.zoneName=i,this.valid=xe.isValidZone(i)}get type(){return"iana"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(i,{format:m,locale:v}){return qn(i,m,v,this.name)}formatOffset(i,m){return is(this.offset(i),m)}offset(i){if(!this.valid)return NaN;const m=new Date(i);if(isNaN(m))return NaN;const v=U(this.name);let[C,k,V,B,Y,de,be]=v.formatToParts?ve(v,m):me(v,m);B==="BC"&&(C=-Math.abs(C)+1);const Ge=Kt({year:C,month:k,day:V,hour:Y===24?0:Y,minute:de,second:be,millisecond:0});let Ae=+m;const wt=Ae%1e3;return Ae-=wt>=0?wt:1e3+wt,(Ge-Ae)/(60*1e3)}equals(i){return i.type==="iana"&&i.name===this.name}get isValid(){return this.valid}}let we={};function lt(g,i={}){const m=JSON.stringify([g,i]);let v=we[m];return v||(v=new Intl.ListFormat(g,i),we[m]=v),v}const Ye=new Map;function St(g,i={}){const m=JSON.stringify([g,i]);let v=Ye.get(m);return v===void 0&&(v=new Intl.DateTimeFormat(g,i),Ye.set(m,v)),v}const oa=new Map;function Ma(g,i={}){const m=JSON.stringify([g,i]);let v=oa.get(m);return v===void 0&&(v=new Intl.NumberFormat(g,i),oa.set(m,v)),v}const $a=new Map;function ua(g,i={}){const{base:m,...v}=i,C=JSON.stringify([g,v]);let k=$a.get(C);return k===void 0&&(k=new Intl.RelativeTimeFormat(g,i),$a.set(C,k)),k}let ma=null;function vn(){return ma||(ma=new Intl.DateTimeFormat().resolvedOptions().locale,ma)}const yn=new Map;function bn(g){let i=yn.get(g);return i===void 0&&(i=new Intl.DateTimeFormat(g).resolvedOptions(),yn.set(g,i)),i}const _t=new Map;function da(g){let i=_t.get(g);if(!i){const m=new Intl.Locale(g);i="getWeekInfo"in m?m.getWeekInfo():m.weekInfo,"minimalDays"in i||(i={...dl,...i}),_t.set(g,i)}return i}function An(g){const i=g.indexOf("-x-");i!==-1&&(g=g.substring(0,i));const m=g.indexOf("-u-");if(m===-1)return[g];{let v,C;try{v=St(g).resolvedOptions(),C=g}catch{const Y=g.substring(0,m);v=St(Y).resolvedOptions(),C=Y}const{numberingSystem:k,calendar:V}=v;return[C,k,V]}}function _n(g,i,m){return(m||i)&&(g.includes("-u-")||(g+="-u"),m&&(g+=`-ca-${m}`),i&&(g+=`-nu-${i}`)),g}function zn(g){const i=[];for(let m=1;m<=12;m++){const v=Me.utc(2009,m,1);i.push(g(v))}return i}function yt(g){const i=[];for(let m=1;m<=7;m++){const v=Me.utc(2016,11,13+m);i.push(g(v))}return i}function Oa(g,i,m,v){const C=g.listingMode();return C==="error"?null:C==="en"?m(i):v(i)}function Zs(g){return g.numberingSystem&&g.numberingSystem!=="latn"?!1:g.numberingSystem==="latn"||!g.locale||g.locale.startsWith("en")||bn(g.locale).numberingSystem==="latn"}class Ws{constructor(i,m,v){this.padTo=v.padTo||0,this.floor=v.floor||!1;const{padTo:C,floor:k,...V}=v;if(!m||Object.keys(V).length>0){const B={useGrouping:!1,...v};v.padTo>0&&(B.minimumIntegerDigits=v.padTo),this.inf=Ma(i,B)}}format(i){if(this.inf){const m=this.floor?Math.floor(i):i;return this.inf.format(m)}else{const m=this.floor?Math.floor(i):ls(i,3);return st(m,this.padTo)}}}class es{constructor(i,m,v){this.opts=v,this.originalZone=void 0;let C;if(this.opts.timeZone)this.dt=i;else if(i.zone.type==="fixed"){const V=-1*(i.offset/60),B=V>=0?`Etc/GMT+${V}`:`Etc/GMT${V}`;i.offset!==0&&xe.create(B).valid?(C=B,this.dt=i):(C="UTC",this.dt=i.offset===0?i:i.setZone("UTC").plus({minutes:i.offset}),this.originalZone=i.zone)}else i.zone.type==="system"?this.dt=i:i.zone.type==="iana"?(this.dt=i,C=i.zone.name):(C="UTC",this.dt=i.setZone("UTC").plus({minutes:i.offset}),this.originalZone=i.zone);const k={...this.opts};k.timeZone=k.timeZone||C,this.dtf=St(m,k)}format(){return this.originalZone?this.formatToParts().map(({value:i})=>i).join(""):this.dtf.format(this.dt.toJSDate())}formatToParts(){const i=this.dtf.formatToParts(this.dt.toJSDate());return this.originalZone?i.map(m=>{if(m.type==="timeZoneName"){const v=this.originalZone.offsetName(this.dt.ts,{locale:this.dt.locale,format:this.opts.timeZoneName});return{...m,value:v}}else return m}):i}resolvedOptions(){return this.dtf.resolvedOptions()}}class Xr{constructor(i,m,v){this.opts={style:"long",...v},!m&&ti()&&(this.rtf=ua(i,v))}format(i,m){return this.rtf?this.rtf.format(i,m):wn(m,i,this.opts.numeric,this.opts.style!=="long")}formatToParts(i,m){return this.rtf?this.rtf.formatToParts(i,m):[]}}const dl={firstDay:1,minimalDays:4,weekend:[6,7]};class Ie{static fromOpts(i){return Ie.create(i.locale,i.numberingSystem,i.outputCalendar,i.weekSettings,i.defaultToEN)}static create(i,m,v,C,k=!1){const V=i||ht.defaultLocale,B=V||(k?"en-US":vn()),Y=m||ht.defaultNumberingSystem,de=v||ht.defaultOutputCalendar,be=ai(C)||ht.defaultWeekSettings;return new Ie(B,Y,de,be,V)}static resetCache(){ma=null,Ye.clear(),oa.clear(),$a.clear(),yn.clear(),_t.clear()}static fromObject({locale:i,numberingSystem:m,outputCalendar:v,weekSettings:C}={}){return Ie.create(i,m,v,C)}constructor(i,m,v,C,k){const[V,B,Y]=An(i);this.locale=V,this.numberingSystem=m||B||null,this.outputCalendar=v||Y||null,this.weekSettings=C,this.intl=_n(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=k,this.fastNumbersCached=null}get fastNumbers(){return this.fastNumbersCached==null&&(this.fastNumbersCached=Zs(this)),this.fastNumbersCached}listingMode(){const i=this.isEnglish(),m=(this.numberingSystem===null||this.numberingSystem==="latn")&&(this.outputCalendar===null||this.outputCalendar==="gregory");return i&&m?"en":"intl"}clone(i){return!i||Object.getOwnPropertyNames(i).length===0?this:Ie.create(i.locale||this.specifiedLocale,i.numberingSystem||this.numberingSystem,i.outputCalendar||this.outputCalendar,ai(i.weekSettings)||this.weekSettings,i.defaultToEN||!1)}redefaultToEN(i={}){return this.clone({...i,defaultToEN:!0})}redefaultToSystem(i={}){return this.clone({...i,defaultToEN:!1})}months(i,m=!1){return Oa(this,i,kc,()=>{const v=this.intl==="ja"||this.intl.startsWith("ja-");m&=!v;const C=m?{month:i,day:"numeric"}:{month:i},k=m?"format":"standalone";if(!this.monthsCache[k][i]){const V=v?B=>this.dtFormatter(B,C).format():B=>this.extract(B,C,"month");this.monthsCache[k][i]=zn(V)}return this.monthsCache[k][i]})}weekdays(i,m=!1){return Oa(this,i,rr,()=>{const v=m?{weekday:i,year:"numeric",month:"long",day:"numeric"}:{weekday:i},C=m?"format":"standalone";return this.weekdaysCache[C][i]||(this.weekdaysCache[C][i]=yt(k=>this.extract(k,v,"weekday"))),this.weekdaysCache[C][i]})}meridiems(){return Oa(this,void 0,()=>Vn,()=>{if(!this.meridiemCache){const i={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[Me.utc(2016,11,13,9),Me.utc(2016,11,13,19)].map(m=>this.extract(m,i,"dayperiod"))}return this.meridiemCache})}eras(i){return Oa(this,i,ii,()=>{const m={era:i};return this.eraCache[i]||(this.eraCache[i]=[Me.utc(-40,1,1),Me.utc(2017,1,1)].map(v=>this.extract(v,m,"era"))),this.eraCache[i]})}extract(i,m,v){const C=this.dtFormatter(i,m),k=C.formatToParts(),V=k.find(B=>B.type.toLowerCase()===v);return V?V.value:null}numberFormatter(i={}){return new Ws(this.intl,i.forceSimple||this.fastNumbers,i)}dtFormatter(i,m={}){return new es(i,this.intl,m)}relFormatter(i={}){return new Xr(this.intl,this.isEnglish(),i)}listFormatter(i={}){return lt(this.intl,i)}isEnglish(){return this.locale==="en"||this.locale.toLowerCase()==="en-us"||bn(this.intl).locale.startsWith("en-us")}getWeekSettings(){return this.weekSettings?this.weekSettings:jn()?da(this.locale):dl}getStartOfWeek(){return this.getWeekSettings().firstDay}getMinDaysInFirstWeek(){return this.getWeekSettings().minimalDays}getWeekendDays(){return this.getWeekSettings().weekend}equals(i){return this.locale===i.locale&&this.numberingSystem===i.numberingSystem&&this.outputCalendar===i.outputCalendar}toString(){return`Locale(${this.locale}, ${this.numberingSystem}, ${this.outputCalendar})`}}let fl=null;class mt extends K{static get utcInstance(){return fl===null&&(fl=new mt(0)),fl}static instance(i){return i===0?mt.utcInstance:new mt(i)}static parseSpecifier(i){if(i){const m=i.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(m)return new mt(rs(m[1],m[2]))}return null}constructor(i){super(),this.fixed=i}get type(){return"fixed"}get name(){return this.fixed===0?"UTC":`UTC${is(this.fixed,"narrow")}`}get ianaName(){return this.fixed===0?"Etc/UTC":`Etc/GMT${is(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(i,m){return is(this.fixed,m)}get isUniversal(){return!0}offset(){return this.fixed}equals(i){return i.type==="fixed"&&i.fixed===this.fixed}get isValid(){return!0}}class $t extends K{constructor(i){super(),this.zoneName=i}get type(){return"invalid"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(){return null}formatOffset(){return""}offset(){return NaN}equals(){return!1}get isValid(){return!1}}function zt(g,i){if(ke(g)||g===null)return i;if(g instanceof K)return g;if(Ut(g)){const m=g.toLowerCase();return m==="default"?i:m==="local"||m==="system"?fe.instance:m==="utc"||m==="gmt"?mt.utcInstance:mt.parseSpecifier(m)||xe.create(g)}else return pa(g)?mt.instance(g):typeof g=="object"&&"offset"in g&&typeof g.offset=="function"?g:new $t(g)}const Lt={arab:"[٠-٩]",arabext:"[۰-۹]",bali:"[᭐-᭙]",beng:"[০-৯]",deva:"[०-९]",fullwide:"[0-9]",gujr:"[૦-૯]",hanidec:"[〇|一|二|三|四|五|六|七|八|九]",khmr:"[០-៩]",knda:"[೦-೯]",laoo:"[໐-໙]",limb:"[᥆-᥏]",mlym:"[൦-൯]",mong:"[᠐-᠙]",mymr:"[၀-၉]",orya:"[୦-୯]",tamldec:"[௦-௯]",telu:"[౦-౯]",thai:"[๐-๙]",tibt:"[༠-༩]",latn:"\\d"},ts={arab:[1632,1641],arabext:[1776,1785],bali:[6992,7001],beng:[2534,2543],deva:[2406,2415],fullwide:[65296,65303],gujr:[2790,2799],khmr:[6112,6121],knda:[3302,3311],laoo:[3792,3801],limb:[6470,6479],mlym:[3430,3439],mong:[6160,6169],mymr:[4160,4169],orya:[2918,2927],tamldec:[3046,3055],telu:[3174,3183],thai:[3664,3673],tibt:[3872,3881]},Is=Lt.hanidec.replace(/[\[|\]]/g,"").split("");function Qs(g){let i=parseInt(g,10);if(isNaN(i)){i="";for(let m=0;m<g.length;m++){const v=g.charCodeAt(m);if(g[m].search(Lt.hanidec)!==-1)i+=Is.indexOf(g[m]);else for(const C in ts){const[k,V]=ts[C];v>=k&&v<=V&&(i+=v-k)}}return parseInt(i,10)}else return i}const oe=new Map;function ye(){oe.clear()}function Ue({numberingSystem:g},i=""){const m=g||"latn";let v=oe.get(m);v===void 0&&(v=new Map,oe.set(m,v));let C=v.get(i);return C===void 0&&(C=new RegExp(`${Lt[m]}${i}`),v.set(i,C)),C}let gt=()=>Date.now(),xt="system",ga=null,Xs=null,Jr=null,Js=60,hl,Sc=null;class ht{static get now(){return gt}static set now(i){gt=i}static set defaultZone(i){xt=i}static get defaultZone(){return zt(xt,fe.instance)}static get defaultLocale(){return ga}static set defaultLocale(i){ga=i}static get defaultNumberingSystem(){return Xs}static set defaultNumberingSystem(i){Xs=i}static get defaultOutputCalendar(){return Jr}static set defaultOutputCalendar(i){Jr=i}static get defaultWeekSettings(){return Sc}static set defaultWeekSettings(i){Sc=ai(i)}static get twoDigitCutoffYear(){return Js}static set twoDigitCutoffYear(i){Js=i%100}static get throwOnInvalid(){return hl}static set throwOnInvalid(i){hl=i}static resetCaches(){Ie.resetCache(),xe.resetCache(),Me.resetCache(),ye()}}class xa{constructor(i,m){this.reason=i,this.explanation=m}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}}const Kr=[0,31,59,90,120,151,181,212,243,273,304,334],Ks=[0,31,60,91,121,152,182,213,244,274,305,335];function sa(g,i){return new xa("unit out of range",`you specified ${i} (of type ${typeof i}) as a ${g}, which is invalid`)}function er(g,i,m){const v=new Date(Date.UTC(g,i-1,m));g<100&&g>=0&&v.setUTCFullYear(v.getUTCFullYear()-1900);const C=v.getUTCDay();return C===0?7:C}function ei(g,i,m){return m+(gl(g)?Ks:Kr)[i-1]}function an(g,i){const m=gl(g)?Ks:Kr,v=m.findIndex(k=>k<i),C=i-m[v];return{month:v+1,day:C}}function Mt(g,i){return(g-i+7)%7+1}function Pt(g,i=4,m=1){const{year:v,month:C,day:k}=g,V=ei(v,C,k),B=Mt(er(v,C,k),m);let Y=Math.floor((V-B+14-i)/7),de;return Y<1?(de=v-1,Y=xl(de,i,m)):Y>xl(v,i,m)?(de=v+1,Y=1):de=v,{weekYear:de,weekNumber:Y,weekday:B,...cs(g)}}function Ln(g,i=4,m=1){const{weekYear:v,weekNumber:C,weekday:k}=g,V=Mt(er(v,1,i),m),B=ln(v);let Y=C*7+k-V-7+i,de;Y<1?(de=v-1,Y+=ln(de)):Y>B?(de=v+1,Y-=ln(v)):de=v;const{month:be,day:He}=an(de,Y);return{year:de,month:be,day:He,...cs(g)}}function as(g){const{year:i,month:m,day:v}=g,C=ei(i,m,v);return{year:i,ordinal:C,...cs(g)}}function Ec(g){const{year:i,ordinal:m}=g,{month:v,day:C}=an(i,m);return{year:i,month:v,day:C,...cs(g)}}function Cc(g,i){if(!ke(g.localWeekday)||!ke(g.localWeekNumber)||!ke(g.localWeekYear)){if(!ke(g.weekday)||!ke(g.weekNumber)||!ke(g.weekYear))throw new h("Cannot mix locale-based week fields with ISO-based week fields");return ke(g.localWeekday)||(g.weekday=g.localWeekday),ke(g.localWeekNumber)||(g.weekNumber=g.localWeekNumber),ke(g.localWeekYear)||(g.weekYear=g.localWeekYear),delete g.localWeekday,delete g.localWeekNumber,delete g.localWeekYear,{minDaysInFirstWeek:i.getMinDaysInFirstWeek(),startOfWeek:i.getStartOfWeek()}}else return{minDaysInFirstWeek:4,startOfWeek:1}}function Tc(g,i=4,m=1){const v=nn(g.weekYear),C=Jt(g.weekNumber,1,xl(g.weekYear,i,m)),k=Jt(g.weekday,1,7);return v?C?k?!1:sa("weekday",g.weekday):sa("week",g.weekNumber):sa("weekYear",g.weekYear)}function ns(g){const i=nn(g.year),m=Jt(g.ordinal,1,ln(g.year));return i?m?!1:sa("ordinal",g.ordinal):sa("year",g.year)}function tr(g){const i=nn(g.year),m=Jt(g.month,1,12),v=Jt(g.day,1,nr(g.year,g.month));return i?m?v?!1:sa("day",g.day):sa("month",g.month):sa("year",g.year)}function Un(g){const{hour:i,minute:m,second:v,millisecond:C}=g,k=Jt(i,0,23)||i===24&&m===0&&v===0&&C===0,V=Jt(m,0,59),B=Jt(v,0,59),Y=Jt(C,0,999);return k?V?B?Y?!1:sa("millisecond",C):sa("second",v):sa("minute",m):sa("hour",i)}function ke(g){return typeof g>"u"}function pa(g){return typeof g=="number"}function nn(g){return typeof g=="number"&&g%1===0}function Ut(g){return typeof g=="string"}function Mc(g){return Object.prototype.toString.call(g)==="[object Date]"}function ti(){try{return typeof Intl<"u"&&!!Intl.RelativeTimeFormat}catch{return!1}}function jn(){try{return typeof Intl<"u"&&!!Intl.Locale&&("weekInfo"in Intl.Locale.prototype||"getWeekInfo"in Intl.Locale.prototype)}catch{return!1}}function ml(g){return Array.isArray(g)?g:[g]}function Oc(g,i,m){if(g.length!==0)return g.reduce((v,C)=>{const k=[i(C),C];return v&&m(v[0],k[0])===v[0]?v:k},null)[1]}function Rc(g,i){return i.reduce((m,v)=>(m[v]=g[v],m),{})}function Hn(g,i){return Object.prototype.hasOwnProperty.call(g,i)}function ai(g){if(g==null)return null;if(typeof g!="object")throw new b("Week settings must be an object");if(!Jt(g.firstDay,1,7)||!Jt(g.minimalDays,1,7)||!Array.isArray(g.weekend)||g.weekend.some(i=>!Jt(i,1,7)))throw new b("Invalid week settings");return{firstDay:g.firstDay,minimalDays:g.minimalDays,weekend:Array.from(g.weekend)}}function Jt(g,i,m){return nn(g)&&g>=i&&g<=m}function ar(g,i){return g-i*Math.floor(g/i)}function st(g,i=2){const m=g<0;let v;return m?v="-"+(""+-g).padStart(i,"0"):v=(""+g).padStart(i,"0"),v}function Ot(g){if(!(ke(g)||g===null||g===""))return parseInt(g,10)}function Nn(g){if(!(ke(g)||g===null||g===""))return parseFloat(g)}function ni(g){if(!(ke(g)||g===null||g==="")){const i=parseFloat("0."+g)*1e3;return Math.floor(i)}}function ls(g,i,m="round"){const v=10**i;switch(m){case"expand":return g>0?Math.ceil(g*v)/v:Math.floor(g*v)/v;case"trunc":return Math.trunc(g*v)/v;case"round":return Math.round(g*v)/v;case"floor":return Math.floor(g*v)/v;case"ceil":return Math.ceil(g*v)/v;default:throw new RangeError(`Value rounding ${m} is out of range`)}}function gl(g){return g%4===0&&(g%100!==0||g%400===0)}function ln(g){return gl(g)?366:365}function nr(g,i){const m=ar(i-1,12)+1,v=g+(i-m)/12;return m===2?gl(v)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][m-1]}function Kt(g){let i=Date.UTC(g.year,g.month-1,g.day,g.hour,g.minute,g.second,g.millisecond);return g.year<100&&g.year>=0&&(i=new Date(i),i.setUTCFullYear(g.year,g.month-1,g.day)),+i}function lr(g,i,m){return-Mt(er(g,1,i),m)+i-1}function xl(g,i=4,m=1){const v=lr(g,i,m),C=lr(g+1,i,m);return(ln(g)-v+C)/7}function ss(g){return g>99?g:g>ht.twoDigitCutoffYear?1900+g:2e3+g}function qn(g,i,m,v=null){const C=new Date(g),k={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};v&&(k.timeZone=v);const V={timeZoneName:i,...k},B=new Intl.DateTimeFormat(m,V).formatToParts(C).find(Y=>Y.type.toLowerCase()==="timezonename");return B?B.value:null}function rs(g,i){let m=parseInt(g,10);Number.isNaN(m)&&(m=0);const v=parseInt(i,10)||0,C=m<0||Object.is(m,-0)?-v:v;return m*60+C}function li(g){const i=Number(g);if(typeof g=="boolean"||g===""||!Number.isFinite(i))throw new b(`Invalid unit value ${g}`);return i}function sn(g,i){const m={};for(const v in g)if(Hn(g,v)){const C=g[v];if(C==null)continue;m[i(v)]=li(C)}return m}function is(g,i){const m=Math.trunc(Math.abs(g/60)),v=Math.trunc(Math.abs(g%60)),C=g>=0?"+":"-";switch(i){case"short":return`${C}${st(m,2)}:${st(v,2)}`;case"narrow":return`${C}${m}${v>0?`:${v}`:""}`;case"techie":return`${C}${st(m,2)}${st(v,2)}`;default:throw new RangeError(`Value format ${i} is out of range for property format`)}}function cs(g){return Rc(g,["hour","minute","second","millisecond"])}const Dc=["January","February","March","April","May","June","July","August","September","October","November","December"],sr=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wu=["J","F","M","A","M","J","J","A","S","O","N","D"];function kc(g){switch(g){case"narrow":return[...wu];case"short":return[...sr];case"long":return[...Dc];case"numeric":return["1","2","3","4","5","6","7","8","9","10","11","12"];case"2-digit":return["01","02","03","04","05","06","07","08","09","10","11","12"];default:return null}}const os=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],Pa=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],si=["M","T","W","T","F","S","S"];function rr(g){switch(g){case"narrow":return[...si];case"short":return[...Pa];case"long":return[...os];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}const Vn=["AM","PM"],pl=["Before Christ","Anno Domini"],Ac=["BC","AD"],ri=["B","A"];function ii(g){switch(g){case"narrow":return[...ri];case"short":return[...Ac];case"long":return[...pl];default:return null}}function us(g){return Vn[g.hour<12?0:1]}function rn(g,i){return rr(i)[g.weekday-1]}function ci(g,i){return kc(i)[g.month-1]}function ds(g,i){return ii(i)[g.year<0?0:1]}function wn(g,i,m="always",v=!1){const C={years:["year","yr."],quarters:["quarter","qtr."],months:["month","mo."],weeks:["week","wk."],days:["day","day","days"],hours:["hour","hr."],minutes:["minute","min."],seconds:["second","sec."]},k=["hours","minutes","seconds"].indexOf(g)===-1;if(m==="auto"&&k){const He=g==="days";switch(i){case 1:return He?"tomorrow":`next ${C[g][0]}`;case-1:return He?"yesterday":`last ${C[g][0]}`;case 0:return He?"today":`this ${C[g][0]}`}}const V=Object.is(i,-0)||i<0,B=Math.abs(i),Y=B===1,de=C[g],be=v?Y?de[1]:de[2]||de[1]:Y?C[g][0]:g;return V?`${B} ${be} ago`:`in ${B} ${be}`}function ir(g,i){let m="";for(const v of g)v.literal?m+=v.val:m+=i(v.val);return m}const cr={D:M,DD:D,DDD:N,DDDD:O,t:R,tt:W,ttt:L,tttt:J,T:w,TT:H,TTT:q,TTTT:G,f:Z,ff:S,fff:ie,ffff:pe,F:le,FF:te,FFF:ge,FFFF:P};class Yt{static create(i,m={}){return new Yt(i,m)}static parseFormat(i){let m=null,v="",C=!1;const k=[];for(let V=0;V<i.length;V++){const B=i.charAt(V);B==="'"?((v.length>0||C)&&k.push({literal:C||/^\s+$/.test(v),val:v===""?"'":v}),m=null,v="",C=!C):C||B===m?v+=B:(v.length>0&&k.push({literal:/^\s+$/.test(v),val:v}),v=B,m=B)}return v.length>0&&k.push({literal:C||/^\s+$/.test(v),val:v}),k}static macroTokenToFormatOpts(i){return cr[i]}constructor(i,m){this.opts=m,this.loc=i,this.systemLoc=null}formatWithSystemDefault(i,m){return this.systemLoc===null&&(this.systemLoc=this.loc.redefaultToSystem()),this.systemLoc.dtFormatter(i,{...this.opts,...m}).format()}dtFormatter(i,m={}){return this.loc.dtFormatter(i,{...this.opts,...m})}formatDateTime(i,m){return this.dtFormatter(i,m).format()}formatDateTimeParts(i,m){return this.dtFormatter(i,m).formatToParts()}formatInterval(i,m){return this.dtFormatter(i.start,m).dtf.formatRange(i.start.toJSDate(),i.end.toJSDate())}resolvedOptions(i,m){return this.dtFormatter(i,m).resolvedOptions()}num(i,m=0,v=void 0){if(this.opts.forceSimple)return st(i,m);const C={...this.opts};return m>0&&(C.padTo=m),v&&(C.signDisplay=v),this.loc.numberFormatter(C).format(i)}formatDateTimeFromString(i,m){const v=this.loc.listingMode()==="en",C=this.loc.outputCalendar&&this.loc.outputCalendar!=="gregory",k=(Ae,wt)=>this.loc.extract(i,Ae,wt),V=Ae=>i.isOffsetFixed&&i.offset===0&&Ae.allowZ?"Z":i.isValid?i.zone.formatOffset(i.ts,Ae.format):"",B=()=>v?us(i):k({hour:"numeric",hourCycle:"h12"},"dayperiod"),Y=(Ae,wt)=>v?ci(i,Ae):k(wt?{month:Ae}:{month:Ae,day:"numeric"},"month"),de=(Ae,wt)=>v?rn(i,Ae):k(wt?{weekday:Ae}:{weekday:Ae,month:"long",day:"numeric"},"weekday"),be=Ae=>{const wt=Yt.macroTokenToFormatOpts(Ae);return wt?this.formatWithSystemDefault(i,wt):Ae},He=Ae=>v?ds(i,Ae):k({era:Ae},"era"),Ge=Ae=>{switch(Ae){case"S":return this.num(i.millisecond);case"u":case"SSS":return this.num(i.millisecond,3);case"s":return this.num(i.second);case"ss":return this.num(i.second,2);case"uu":return this.num(Math.floor(i.millisecond/10),2);case"uuu":return this.num(Math.floor(i.millisecond/100));case"m":return this.num(i.minute);case"mm":return this.num(i.minute,2);case"h":return this.num(i.hour%12===0?12:i.hour%12);case"hh":return this.num(i.hour%12===0?12:i.hour%12,2);case"H":return this.num(i.hour);case"HH":return this.num(i.hour,2);case"Z":return V({format:"narrow",allowZ:this.opts.allowZ});case"ZZ":return V({format:"short",allowZ:this.opts.allowZ});case"ZZZ":return V({format:"techie",allowZ:this.opts.allowZ});case"ZZZZ":return i.zone.offsetName(i.ts,{format:"short",locale:this.loc.locale});case"ZZZZZ":return i.zone.offsetName(i.ts,{format:"long",locale:this.loc.locale});case"z":return i.zoneName;case"a":return B();case"d":return C?k({day:"numeric"},"day"):this.num(i.day);case"dd":return C?k({day:"2-digit"},"day"):this.num(i.day,2);case"c":return this.num(i.weekday);case"ccc":return de("short",!0);case"cccc":return de("long",!0);case"ccccc":return de("narrow",!0);case"E":return this.num(i.weekday);case"EEE":return de("short",!1);case"EEEE":return de("long",!1);case"EEEEE":return de("narrow",!1);case"L":return C?k({month:"numeric",day:"numeric"},"month"):this.num(i.month);case"LL":return C?k({month:"2-digit",day:"numeric"},"month"):this.num(i.month,2);case"LLL":return Y("short",!0);case"LLLL":return Y("long",!0);case"LLLLL":return Y("narrow",!0);case"M":return C?k({month:"numeric"},"month"):this.num(i.month);case"MM":return C?k({month:"2-digit"},"month"):this.num(i.month,2);case"MMM":return Y("short",!1);case"MMMM":return Y("long",!1);case"MMMMM":return Y("narrow",!1);case"y":return C?k({year:"numeric"},"year"):this.num(i.year);case"yy":return C?k({year:"2-digit"},"year"):this.num(i.year.toString().slice(-2),2);case"yyyy":return C?k({year:"numeric"},"year"):this.num(i.year,4);case"yyyyyy":return C?k({year:"numeric"},"year"):this.num(i.year,6);case"G":return He("short");case"GG":return He("long");case"GGGGG":return He("narrow");case"kk":return this.num(i.weekYear.toString().slice(-2),2);case"kkkk":return this.num(i.weekYear,4);case"W":return this.num(i.weekNumber);case"WW":return this.num(i.weekNumber,2);case"n":return this.num(i.localWeekNumber);case"nn":return this.num(i.localWeekNumber,2);case"ii":return this.num(i.localWeekYear.toString().slice(-2),2);case"iiii":return this.num(i.localWeekYear,4);case"o":return this.num(i.ordinal);case"ooo":return this.num(i.ordinal,3);case"q":return this.num(i.quarter);case"qq":return this.num(i.quarter,2);case"X":return this.num(Math.floor(i.ts/1e3));case"x":return this.num(i.ts);default:return be(Ae)}};return ir(Yt.parseFormat(m),Ge)}formatDurationFromString(i,m){const v=this.opts.signMode==="negativeLargestOnly"?-1:1,C=be=>{switch(be[0]){case"S":return"milliseconds";case"s":return"seconds";case"m":return"minutes";case"h":return"hours";case"d":return"days";case"w":return"weeks";case"M":return"months";case"y":return"years";default:return null}},k=(be,He)=>Ge=>{const Ae=C(Ge);if(Ae){const wt=He.isNegativeDuration&&Ae!==He.largestUnit?v:1;let Wt;return this.opts.signMode==="negativeLargestOnly"&&Ae!==He.largestUnit?Wt="never":this.opts.signMode==="all"?Wt="always":Wt="auto",this.num(be.get(Ae)*wt,Ge.length,Wt)}else return Ge},V=Yt.parseFormat(m),B=V.reduce((be,{literal:He,val:Ge})=>He?be:be.concat(Ge),[]),Y=i.shiftTo(...B.map(C).filter(be=>be)),de={isNegativeDuration:Y<0,largestUnit:Object.keys(Y.values)[0]};return ir(V,k(Y,de))}}const fs=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;function cn(...g){const i=g.reduce((m,v)=>m+v.source,"");return RegExp(`^${i}$`)}function Bn(...g){return i=>g.reduce(([m,v,C],k)=>{const[V,B,Y]=k(i,C);return[{...m,...V},B||v,Y]},[{},null,1]).slice(0,2)}function Rt(g,...i){if(g==null)return[null,null];for(const[m,v]of i){const C=m.exec(g);if(C)return v(C)}return[null,null]}function Sn(...g){return(i,m)=>{const v={};let C;for(C=0;C<g.length;C++)v[g[C]]=Ot(i[m+C]);return[v,null,m+C]}}const hs=/(?:([Zz])|([+-]\d\d)(?::?(\d\d))?)/,ms=`(?:${hs.source}?(?:\\[(${fs.source})\\])?)?`,oi=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,or=RegExp(`${oi.source}${ms}`),gs=RegExp(`(?:[Tt]${or.source})?`),xs=/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,ur=/(\d{4})-?W(\d\d)(?:-?(\d))?/,_c=/(\d{4})-?(\d{3})/,Su=Sn("weekYear","weekNumber","weekDay"),Eu=Sn("year","ordinal"),Cu=/(\d{4})-(\d\d)-(\d\d)/,dr=RegExp(`${oi.source} ?(?:${hs.source}|(${fs.source}))?`),Tu=RegExp(`(?: ${dr.source})?`);function vl(g,i,m){const v=g[i];return ke(v)?m:Ot(v)}function Mu(g,i){return[{year:vl(g,i),month:vl(g,i+1,1),day:vl(g,i+2,1)},null,i+3]}function yl(g,i){return[{hours:vl(g,i,0),minutes:vl(g,i+1,0),seconds:vl(g,i+2,0),milliseconds:ni(g[i+3])},null,i+4]}function ps(g,i){const m=!g[i]&&!g[i+1],v=rs(g[i+1],g[i+2]),C=m?null:mt.instance(v);return[{},C,i+3]}function bl(g,i){const m=g[i]?xe.create(g[i]):null;return[{},m,i+1]}const Ou=RegExp(`^T?${oi.source}$`),Ru=/^-?P(?:(?:(-?\d{1,20}(?:\.\d{1,20})?)Y)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20}(?:\.\d{1,20})?)W)?(?:(-?\d{1,20}(?:\.\d{1,20})?)D)?(?:T(?:(-?\d{1,20}(?:\.\d{1,20})?)H)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20})(?:[.,](-?\d{1,20}))?S)?)?)$/;function Du(g){const[i,m,v,C,k,V,B,Y,de]=g,be=i[0]==="-",He=Y&&Y[0]==="-",Ge=(Ae,wt=!1)=>Ae!==void 0&&(wt||Ae&&be)?-Ae:Ae;return[{years:Ge(Nn(m)),months:Ge(Nn(v)),weeks:Ge(Nn(C)),days:Ge(Nn(k)),hours:Ge(Nn(V)),minutes:Ge(Nn(B)),seconds:Ge(Nn(Y),Y==="-0"),milliseconds:Ge(ni(de),He)}]}const ku={GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function vs(g,i,m,v,C,k,V){const B={year:i.length===2?ss(Ot(i)):Ot(i),month:sr.indexOf(m)+1,day:Ot(v),hour:Ot(C),minute:Ot(k)};return V&&(B.second=Ot(V)),g&&(B.weekday=g.length>3?os.indexOf(g)+1:Pa.indexOf(g)+1),B}const Au=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/;function _u(g){const[,i,m,v,C,k,V,B,Y,de,be,He]=g,Ge=vs(i,C,v,m,k,V,B);let Ae;return Y?Ae=ku[Y]:de?Ae=0:Ae=rs(be,He),[Ge,new mt(Ae)]}function zu(g){return g.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}const zc=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/,Lu=/^(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/,Uu=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;function Lc(g){const[,i,m,v,C,k,V,B]=g;return[vs(i,C,v,m,k,V,B),mt.utcInstance]}function Hu(g){const[,i,m,v,C,k,V,B]=g;return[vs(i,B,m,v,C,k,V),mt.utcInstance]}const qu=cn(xs,gs),Vu=cn(ur,gs),Bu=cn(_c,gs),$u=cn(or),Uc=Bn(Mu,yl,ps,bl),ui=Bn(Su,yl,ps,bl),ys=Bn(Eu,yl,ps,bl),Pu=Bn(yl,ps,bl);function Hc(g){return Rt(g,[qu,Uc],[Vu,ui],[Bu,ys],[$u,Pu])}function qc(g){return Rt(zu(g),[Au,_u])}function Vc(g){return Rt(g,[zc,Lc],[Lu,Lc],[Uu,Hu])}function Bc(g){return Rt(g,[Ru,Du])}const $c=Bn(yl);function jl(g){return Rt(g,[Ou,$c])}const Yu=cn(Cu,Tu),Fu=cn(dr),Gu=Bn(yl,ps,bl);function Pc(g){return Rt(g,[Yu,Uc],[Fu,Gu])}const di="Invalid Duration",Nl={weeks:{days:7,hours:168,minutes:10080,seconds:10080*60,milliseconds:10080*60*1e3},days:{hours:24,minutes:1440,seconds:1440*60,milliseconds:1440*60*1e3},hours:{minutes:60,seconds:3600,milliseconds:3600*1e3},minutes:{seconds:60,milliseconds:60*1e3},seconds:{milliseconds:1e3}},bs={years:{quarters:4,months:12,weeks:52,days:365,hours:365*24,minutes:365*24*60,seconds:365*24*60*60,milliseconds:365*24*60*60*1e3},quarters:{months:3,weeks:13,days:91,hours:2184,minutes:2184*60,seconds:2184*60*60,milliseconds:2184*60*60*1e3},months:{weeks:4,days:30,hours:720,minutes:720*60,seconds:720*60*60,milliseconds:720*60*60*1e3},...Nl},va=146097/400,on=146097/4800,Yc={years:{quarters:4,months:12,weeks:va/7,days:va,hours:va*24,minutes:va*24*60,seconds:va*24*60*60,milliseconds:va*24*60*60*1e3},quarters:{months:3,weeks:va/28,days:va/4,hours:va*24/4,minutes:va*24*60/4,seconds:va*24*60*60/4,milliseconds:va*24*60*60*1e3/4},months:{weeks:on/7,days:on,hours:on*24,minutes:on*24*60,seconds:on*24*60*60,milliseconds:on*24*60*60*1e3},...Nl},En=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],fi=En.slice(0).reverse();function Ra(g,i,m=!1){const v={values:m?i.values:{...g.values,...i.values||{}},loc:g.loc.clone(i.loc),conversionAccuracy:i.conversionAccuracy||g.conversionAccuracy,matrix:i.matrix||g.matrix};return new Fe(v)}function hi(g,i){var m;let v=(m=i.milliseconds)!=null?m:0;for(const C of fi.slice(1))i[C]&&(v+=i[C]*g[C].milliseconds);return v}function mi(g,i){const m=hi(g,i)<0?-1:1;En.reduceRight((v,C)=>{if(ke(i[C]))return v;if(v){const k=i[v]*m,V=g[C][v],B=Math.floor(k/V);i[C]+=B*m,i[v]-=B*V*m}return C},null),En.reduce((v,C)=>{if(ke(i[C]))return v;if(v){const k=i[v]%1;i[v]-=k,i[C]+=k*g[v][C]}return C},null)}function gi(g){const i={};for(const[m,v]of Object.entries(g))v!==0&&(i[m]=v);return i}class Fe{constructor(i){const m=i.conversionAccuracy==="longterm"||!1;let v=m?Yc:bs;i.matrix&&(v=i.matrix),this.values=i.values,this.loc=i.loc||Ie.create(),this.conversionAccuracy=m?"longterm":"casual",this.invalid=i.invalid||null,this.matrix=v,this.isLuxonDuration=!0}static fromMillis(i,m){return Fe.fromObject({milliseconds:i},m)}static fromObject(i,m={}){if(i==null||typeof i!="object")throw new b(`Duration.fromObject: argument expected to be an object, got ${i===null?"null":typeof i}`);return new Fe({values:sn(i,Fe.normalizeUnit),loc:Ie.fromObject(m),conversionAccuracy:m.conversionAccuracy,matrix:m.matrix})}static fromDurationLike(i){if(pa(i))return Fe.fromMillis(i);if(Fe.isDuration(i))return i;if(typeof i=="object")return Fe.fromObject(i);throw new b(`Unknown duration argument ${i} of type ${typeof i}`)}static fromISO(i,m){const[v]=Bc(i);return v?Fe.fromObject(v,m):Fe.invalid("unparsable",`the input "${i}" can't be parsed as ISO 8601`)}static fromISOTime(i,m){const[v]=jl(i);return v?Fe.fromObject(v,m):Fe.invalid("unparsable",`the input "${i}" can't be parsed as ISO 8601`)}static invalid(i,m=null){if(!i)throw new b("need to specify a reason the Duration is invalid");const v=i instanceof xa?i:new xa(i,m);if(ht.throwOnInvalid)throw new u(v);return new Fe({invalid:v})}static normalizeUnit(i){const m={year:"years",years:"years",quarter:"quarters",quarters:"quarters",month:"months",months:"months",week:"weeks",weeks:"weeks",day:"days",days:"days",hour:"hours",hours:"hours",minute:"minutes",minutes:"minutes",second:"seconds",seconds:"seconds",millisecond:"milliseconds",milliseconds:"milliseconds"}[i&&i.toLowerCase()];if(!m)throw new f(i);return m}static isDuration(i){return i&&i.isLuxonDuration||!1}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}toFormat(i,m={}){const v={...m,floor:m.round!==!1&&m.floor!==!1};return this.isValid?Yt.create(this.loc,v).formatDurationFromString(this,i):di}toHuman(i={}){if(!this.isValid)return di;const m=i.showZeros!==!1,v=En.map(C=>{const k=this.values[C];return ke(k)||k===0&&!m?null:this.loc.numberFormatter({style:"unit",unitDisplay:"long",...i,unit:C.slice(0,-1)}).format(k)}).filter(C=>C);return this.loc.listFormatter({type:"conjunction",style:i.listStyle||"narrow",...i}).format(v)}toObject(){return this.isValid?{...this.values}:{}}toISO(){if(!this.isValid)return null;let i="P";return this.years!==0&&(i+=this.years+"Y"),(this.months!==0||this.quarters!==0)&&(i+=this.months+this.quarters*3+"M"),this.weeks!==0&&(i+=this.weeks+"W"),this.days!==0&&(i+=this.days+"D"),(this.hours!==0||this.minutes!==0||this.seconds!==0||this.milliseconds!==0)&&(i+="T"),this.hours!==0&&(i+=this.hours+"H"),this.minutes!==0&&(i+=this.minutes+"M"),(this.seconds!==0||this.milliseconds!==0)&&(i+=ls(this.seconds+this.milliseconds/1e3,3)+"S"),i==="P"&&(i+="T0S"),i}toISOTime(i={}){if(!this.isValid)return null;const m=this.toMillis();return m<0||m>=864e5?null:(i={suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended",...i,includeOffset:!1},Me.fromMillis(m,{zone:"UTC"}).toISOTime(i))}toJSON(){return this.toISO()}toString(){return this.toISO()}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Duration { values: ${JSON.stringify(this.values)} }`:`Duration { Invalid, reason: ${this.invalidReason} }`}toMillis(){return this.isValid?hi(this.matrix,this.values):NaN}valueOf(){return this.toMillis()}plus(i){if(!this.isValid)return this;const m=Fe.fromDurationLike(i),v={};for(const C of En)(Hn(m.values,C)||Hn(this.values,C))&&(v[C]=m.get(C)+this.get(C));return Ra(this,{values:v},!0)}minus(i){if(!this.isValid)return this;const m=Fe.fromDurationLike(i);return this.plus(m.negate())}mapUnits(i){if(!this.isValid)return this;const m={};for(const v of Object.keys(this.values))m[v]=li(i(this.values[v],v));return Ra(this,{values:m},!0)}get(i){return this[Fe.normalizeUnit(i)]}set(i){if(!this.isValid)return this;const m={...this.values,...sn(i,Fe.normalizeUnit)};return Ra(this,{values:m})}reconfigure({locale:i,numberingSystem:m,conversionAccuracy:v,matrix:C}={}){const V={loc:this.loc.clone({locale:i,numberingSystem:m}),matrix:C,conversionAccuracy:v};return Ra(this,V)}as(i){return this.isValid?this.shiftTo(i).get(i):NaN}normalize(){if(!this.isValid)return this;const i=this.toObject();return mi(this.matrix,i),Ra(this,{values:i},!0)}rescale(){if(!this.isValid)return this;const i=gi(this.normalize().shiftToAll().toObject());return Ra(this,{values:i},!0)}shiftTo(...i){if(!this.isValid)return this;if(i.length===0)return this;i=i.map(V=>Fe.normalizeUnit(V));const m={},v={},C=this.toObject();let k;for(const V of En)if(i.indexOf(V)>=0){k=V;let B=0;for(const de in v)B+=this.matrix[de][V]*v[de],v[de]=0;pa(C[V])&&(B+=C[V]);const Y=Math.trunc(B);m[V]=Y,v[V]=(B*1e3-Y*1e3)/1e3}else pa(C[V])&&(v[V]=C[V]);for(const V in v)v[V]!==0&&(m[k]+=V===k?v[V]:v[V]/this.matrix[k][V]);return mi(this.matrix,m),Ra(this,{values:m},!0)}shiftToAll(){return this.isValid?this.shiftTo("years","months","weeks","days","hours","minutes","seconds","milliseconds"):this}negate(){if(!this.isValid)return this;const i={};for(const m of Object.keys(this.values))i[m]=this.values[m]===0?0:-this.values[m];return Ra(this,{values:i},!0)}removeZeros(){if(!this.isValid)return this;const i=gi(this.values);return Ra(this,{values:i},!0)}get years(){return this.isValid?this.values.years||0:NaN}get quarters(){return this.isValid?this.values.quarters||0:NaN}get months(){return this.isValid?this.values.months||0:NaN}get weeks(){return this.isValid?this.values.weeks||0:NaN}get days(){return this.isValid?this.values.days||0:NaN}get hours(){return this.isValid?this.values.hours||0:NaN}get minutes(){return this.isValid?this.values.minutes||0:NaN}get seconds(){return this.isValid?this.values.seconds||0:NaN}get milliseconds(){return this.isValid?this.values.milliseconds||0:NaN}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}equals(i){if(!this.isValid||!i.isValid||!this.loc.equals(i.loc))return!1;function m(v,C){return v===void 0||v===0?C===void 0||C===0:v===C}for(const v of En)if(!m(this.values[v],i.values[v]))return!1;return!0}}const wl="Invalid Interval";function Zu(g,i){return!g||!g.isValid?pt.invalid("missing or invalid start"):!i||!i.isValid?pt.invalid("missing or invalid end"):i<g?pt.invalid("end before start",`The end of an interval must be after its start, but you had start=${g.toISO()} and end=${i.toISO()}`):null}class pt{constructor(i){this.s=i.start,this.e=i.end,this.invalid=i.invalid||null,this.isLuxonInterval=!0}static invalid(i,m=null){if(!i)throw new b("need to specify a reason the Interval is invalid");const v=i instanceof xa?i:new xa(i,m);if(ht.throwOnInvalid)throw new o(v);return new pt({invalid:v})}static fromDateTimes(i,m){const v=ja(i),C=ja(m),k=Zu(v,C);return k??new pt({start:v,end:C})}static after(i,m){const v=Fe.fromDurationLike(m),C=ja(i);return pt.fromDateTimes(C,C.plus(v))}static before(i,m){const v=Fe.fromDurationLike(m),C=ja(i);return pt.fromDateTimes(C.minus(v),C)}static fromISO(i,m){const[v,C]=(i||"").split("/",2);if(v&&C){let k,V;try{k=Me.fromISO(v,m),V=k.isValid}catch{V=!1}let B,Y;try{B=Me.fromISO(C,m),Y=B.isValid}catch{Y=!1}if(V&&Y)return pt.fromDateTimes(k,B);if(V){const de=Fe.fromISO(C,m);if(de.isValid)return pt.after(k,de)}else if(Y){const de=Fe.fromISO(v,m);if(de.isValid)return pt.before(B,de)}}return pt.invalid("unparsable",`the input "${i}" can't be parsed as ISO 8601`)}static isInterval(i){return i&&i.isLuxonInterval||!1}get start(){return this.isValid?this.s:null}get end(){return this.isValid?this.e:null}get lastDateTime(){return this.isValid&&this.e?this.e.minus(1):null}get isValid(){return this.invalidReason===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}length(i="milliseconds"){return this.isValid?this.toDuration(i).get(i):NaN}count(i="milliseconds",m){if(!this.isValid)return NaN;const v=this.start.startOf(i,m);let C;return m!=null&&m.useLocaleWeeks?C=this.end.reconfigure({locale:v.locale}):C=this.end,C=C.startOf(i,m),Math.floor(C.diff(v,i).get(i))+(C.valueOf()!==this.end.valueOf())}hasSame(i){return this.isValid?this.isEmpty()||this.e.minus(1).hasSame(this.s,i):!1}isEmpty(){return this.s.valueOf()===this.e.valueOf()}isAfter(i){return this.isValid?this.s>i:!1}isBefore(i){return this.isValid?this.e<=i:!1}contains(i){return this.isValid?this.s<=i&&this.e>i:!1}set({start:i,end:m}={}){return this.isValid?pt.fromDateTimes(i||this.s,m||this.e):this}splitAt(...i){if(!this.isValid)return[];const m=i.map(ja).filter(V=>this.contains(V)).sort((V,B)=>V.toMillis()-B.toMillis()),v=[];let{s:C}=this,k=0;for(;C<this.e;){const V=m[k]||this.e,B=+V>+this.e?this.e:V;v.push(pt.fromDateTimes(C,B)),C=B,k+=1}return v}splitBy(i){const m=Fe.fromDurationLike(i);if(!this.isValid||!m.isValid||m.as("milliseconds")===0)return[];let{s:v}=this,C=1,k;const V=[];for(;v<this.e;){const B=this.start.plus(m.mapUnits(Y=>Y*C));k=+B>+this.e?this.e:B,V.push(pt.fromDateTimes(v,k)),v=k,C+=1}return V}divideEqually(i){return this.isValid?this.splitBy(this.length()/i).slice(0,i):[]}overlaps(i){return this.e>i.s&&this.s<i.e}abutsStart(i){return this.isValid?+this.e==+i.s:!1}abutsEnd(i){return this.isValid?+i.e==+this.s:!1}engulfs(i){return this.isValid?this.s<=i.s&&this.e>=i.e:!1}equals(i){return!this.isValid||!i.isValid?!1:this.s.equals(i.s)&&this.e.equals(i.e)}intersection(i){if(!this.isValid)return this;const m=this.s>i.s?this.s:i.s,v=this.e<i.e?this.e:i.e;return m>=v?null:pt.fromDateTimes(m,v)}union(i){if(!this.isValid)return this;const m=this.s<i.s?this.s:i.s,v=this.e>i.e?this.e:i.e;return pt.fromDateTimes(m,v)}static merge(i){const[m,v]=i.sort((C,k)=>C.s-k.s).reduce(([C,k],V)=>k?k.overlaps(V)||k.abutsStart(V)?[C,k.union(V)]:[C.concat([k]),V]:[C,V],[[],null]);return v&&m.push(v),m}static xor(i){let m=null,v=0;const C=[],k=i.map(Y=>[{time:Y.s,type:"s"},{time:Y.e,type:"e"}]),V=Array.prototype.concat(...k),B=V.sort((Y,de)=>Y.time-de.time);for(const Y of B)v+=Y.type==="s"?1:-1,v===1?m=Y.time:(m&&+m!=+Y.time&&C.push(pt.fromDateTimes(m,Y.time)),m=null);return pt.merge(C)}difference(...i){return pt.xor([this].concat(i)).map(m=>this.intersection(m)).filter(m=>m&&!m.isEmpty())}toString(){return this.isValid?`[${this.s.toISO()} – ${this.e.toISO()})`:wl}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Interval { start: ${this.s.toISO()}, end: ${this.e.toISO()} }`:`Interval { Invalid, reason: ${this.invalidReason} }`}toLocaleString(i=M,m={}){return this.isValid?Yt.create(this.s.loc.clone(m),i).formatInterval(this):wl}toISO(i){return this.isValid?`${this.s.toISO(i)}/${this.e.toISO(i)}`:wl}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:wl}toISOTime(i){return this.isValid?`${this.s.toISOTime(i)}/${this.e.toISOTime(i)}`:wl}toFormat(i,{separator:m=" – "}={}){return this.isValid?`${this.s.toFormat(i)}${m}${this.e.toFormat(i)}`:wl}toDuration(i,m){return this.isValid?this.e.diff(this.s,i,m):Fe.invalid(this.invalidReason)}mapEndpoints(i){return pt.fromDateTimes(i(this.s),i(this.e))}}class js{static hasDST(i=ht.defaultZone){const m=Me.now().setZone(i).set({month:12});return!i.isUniversal&&m.offset!==m.set({month:6}).offset}static isValidIANAZone(i){return xe.isValidZone(i)}static normalizeZone(i){return zt(i,ht.defaultZone)}static getStartOfWeek({locale:i=null,locObj:m=null}={}){return(m||Ie.create(i)).getStartOfWeek()}static getMinimumDaysInFirstWeek({locale:i=null,locObj:m=null}={}){return(m||Ie.create(i)).getMinDaysInFirstWeek()}static getWeekendWeekdays({locale:i=null,locObj:m=null}={}){return(m||Ie.create(i)).getWeekendDays().slice()}static months(i="long",{locale:m=null,numberingSystem:v=null,locObj:C=null,outputCalendar:k="gregory"}={}){return(C||Ie.create(m,v,k)).months(i)}static monthsFormat(i="long",{locale:m=null,numberingSystem:v=null,locObj:C=null,outputCalendar:k="gregory"}={}){return(C||Ie.create(m,v,k)).months(i,!0)}static weekdays(i="long",{locale:m=null,numberingSystem:v=null,locObj:C=null}={}){return(C||Ie.create(m,v,null)).weekdays(i)}static weekdaysFormat(i="long",{locale:m=null,numberingSystem:v=null,locObj:C=null}={}){return(C||Ie.create(m,v,null)).weekdays(i,!0)}static meridiems({locale:i=null}={}){return Ie.create(i).meridiems()}static eras(i="short",{locale:m=null}={}){return Ie.create(m,null,"gregory").eras(i)}static features(){return{relative:ti(),localeWeek:jn()}}}function ra(g,i){const m=C=>C.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),v=m(i)-m(g);return Math.floor(Fe.fromMillis(v).as("days"))}function Ns(g,i,m){const v=[["years",(Y,de)=>de.year-Y.year],["quarters",(Y,de)=>de.quarter-Y.quarter+(de.year-Y.year)*4],["months",(Y,de)=>de.month-Y.month+(de.year-Y.year)*12],["weeks",(Y,de)=>{const be=ra(Y,de);return(be-be%7)/7}],["days",ra]],C={},k=g;let V,B;for(const[Y,de]of v)m.indexOf(Y)>=0&&(V=Y,C[Y]=de(g,i),B=k.plus(C),B>i?(C[Y]--,g=k.plus(C),g>i&&(B=g,C[Y]--,g=k.plus(C))):g=B);return[g,C,B,V]}function Fc(g,i,m,v){let[C,k,V,B]=Ns(g,i,m);const Y=i-C,de=m.filter(He=>["hours","minutes","seconds","milliseconds"].indexOf(He)>=0);de.length===0&&(V<i&&(V=C.plus({[B]:1})),V!==C&&(k[B]=(k[B]||0)+Y/(V-C)));const be=Fe.fromObject(k,v);return de.length>0?Fe.fromMillis(Y,v).shiftTo(...de).plus(be):be}const Gc="missing Intl.DateTimeFormat.formatToParts support";function Qe(g,i=m=>m){return{regex:g,deser:([m])=>i(Qs(m))}}const fr="[ ]",Zc=new RegExp(fr,"g");function Sl(g){return g.replace(/\./g,"\\.?").replace(Zc,fr)}function hr(g){return g.replace(/\./g,"").replace(Zc," ").toLowerCase()}function ea(g,i){return g===null?null:{regex:RegExp(g.map(Sl).join("|")),deser:([m])=>g.findIndex(v=>hr(m)===hr(v))+i}}function mr(g,i){return{regex:g,deser:([,m,v])=>rs(m,v),groups:i}}function ws(g){return{regex:g,deser:([i])=>i}}function $n(g){return g.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function El(g,i){const m=Ue(i),v=Ue(i,"{2}"),C=Ue(i,"{3}"),k=Ue(i,"{4}"),V=Ue(i,"{6}"),B=Ue(i,"{1,2}"),Y=Ue(i,"{1,3}"),de=Ue(i,"{1,6}"),be=Ue(i,"{1,9}"),He=Ue(i,"{2,4}"),Ge=Ue(i,"{4,6}"),Ae=It=>({regex:RegExp($n(It.val)),deser:([Cn])=>Cn,literal:!0}),Wt=(It=>{if(g.literal)return Ae(It);switch(It.val){case"G":return ea(i.eras("short"),0);case"GG":return ea(i.eras("long"),0);case"y":return Qe(de);case"yy":return Qe(He,ss);case"yyyy":return Qe(k);case"yyyyy":return Qe(Ge);case"yyyyyy":return Qe(V);case"M":return Qe(B);case"MM":return Qe(v);case"MMM":return ea(i.months("short",!0),1);case"MMMM":return ea(i.months("long",!0),1);case"L":return Qe(B);case"LL":return Qe(v);case"LLL":return ea(i.months("short",!1),1);case"LLLL":return ea(i.months("long",!1),1);case"d":return Qe(B);case"dd":return Qe(v);case"o":return Qe(Y);case"ooo":return Qe(C);case"HH":return Qe(v);case"H":return Qe(B);case"hh":return Qe(v);case"h":return Qe(B);case"mm":return Qe(v);case"m":return Qe(B);case"q":return Qe(B);case"qq":return Qe(v);case"s":return Qe(B);case"ss":return Qe(v);case"S":return Qe(Y);case"SSS":return Qe(C);case"u":return ws(be);case"uu":return ws(B);case"uuu":return Qe(m);case"a":return ea(i.meridiems(),0);case"kkkk":return Qe(k);case"kk":return Qe(He,ss);case"W":return Qe(B);case"WW":return Qe(v);case"E":case"c":return Qe(m);case"EEE":return ea(i.weekdays("short",!1),1);case"EEEE":return ea(i.weekdays("long",!1),1);case"ccc":return ea(i.weekdays("short",!0),1);case"cccc":return ea(i.weekdays("long",!0),1);case"Z":case"ZZ":return mr(new RegExp(`([+-]${B.source})(?::(${v.source}))?`),2);case"ZZZ":return mr(new RegExp(`([+-]${B.source})(${v.source})?`),2);case"z":return ws(/[a-z_+-/]{1,256}?/i);case" ":return ws(/[^\S\n\r]/);default:return Ae(It)}})(g)||{invalidReason:Gc};return Wt.token=g,Wt}const xi={year:{"2-digit":"yy",numeric:"yyyyy"},month:{numeric:"M","2-digit":"MM",short:"MMM",long:"MMMM"},day:{numeric:"d","2-digit":"dd"},weekday:{short:"EEE",long:"EEEE"},dayperiod:"a",dayPeriod:"a",hour12:{numeric:"h","2-digit":"hh"},hour24:{numeric:"H","2-digit":"HH"},minute:{numeric:"m","2-digit":"mm"},second:{numeric:"s","2-digit":"ss"},timeZoneName:{long:"ZZZZZ",short:"ZZZ"}};function Wc(g,i,m){const{type:v,value:C}=g;if(v==="literal"){const Y=/^\s+$/.test(C);return{literal:!Y,val:Y?" ":C}}const k=i[v];let V=v;v==="hour"&&(i.hour12!=null?V=i.hour12?"hour12":"hour24":i.hourCycle!=null?i.hourCycle==="h11"||i.hourCycle==="h12"?V="hour12":V="hour24":V=m.hour12?"hour12":"hour24");let B=xi[V];if(typeof B=="object"&&(B=B[k]),B)return{literal:!1,val:B}}function Pn(g){return[`^${g.map(m=>m.regex).reduce((m,v)=>`${m}(${v.source})`,"")}$`,g]}function Ic(g,i,m){const v=g.match(i);if(v){const C={};let k=1;for(const V in m)if(Hn(m,V)){const B=m[V],Y=B.groups?B.groups+1:1;!B.literal&&B.token&&(C[B.token.val[0]]=B.deser(v.slice(k,k+Y))),k+=Y}return[v,C]}else return[v,{}]}function Qc(g){const i=k=>{switch(k){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":case"H":return"hour";case"d":return"day";case"o":return"ordinal";case"L":case"M":return"month";case"y":return"year";case"E":case"c":return"weekday";case"W":return"weekNumber";case"k":return"weekYear";case"q":return"quarter";default:return null}};let m=null,v;return ke(g.z)||(m=xe.create(g.z)),ke(g.Z)||(m||(m=new mt(g.Z)),v=g.Z),ke(g.q)||(g.M=(g.q-1)*3+1),ke(g.h)||(g.h<12&&g.a===1?g.h+=12:g.h===12&&g.a===0&&(g.h=0)),g.G===0&&g.y&&(g.y=-g.y),ke(g.u)||(g.S=ni(g.u)),[Object.keys(g).reduce((k,V)=>{const B=i(V);return B&&(k[B]=g[V]),k},{}),m,v]}let gr=null;function Iu(){return gr||(gr=Me.fromMillis(1555555555555)),gr}function Qu(g,i){if(g.literal)return g;const m=Yt.macroTokenToFormatOpts(g.val),v=ya(m,i);return v==null||v.includes(void 0)?g:v}function Xc(g,i){return Array.prototype.concat(...g.map(m=>Qu(m,i)))}class pi{constructor(i,m){if(this.locale=i,this.format=m,this.tokens=Xc(Yt.parseFormat(m),i),this.units=this.tokens.map(v=>El(v,i)),this.disqualifyingUnit=this.units.find(v=>v.invalidReason),!this.disqualifyingUnit){const[v,C]=Pn(this.units);this.regex=RegExp(v,"i"),this.handlers=C}}explainFromTokens(i){if(this.isValid){const[m,v]=Ic(i,this.regex,this.handlers),[C,k,V]=v?Qc(v):[null,null,void 0];if(Hn(v,"a")&&Hn(v,"H"))throw new h("Can't include meridiem when specifying 24-hour format");return{input:i,tokens:this.tokens,regex:this.regex,rawMatches:m,matches:v,result:C,zone:k,specificOffset:V}}else return{input:i,tokens:this.tokens,invalidReason:this.invalidReason}}get isValid(){return!this.disqualifyingUnit}get invalidReason(){return this.disqualifyingUnit?this.disqualifyingUnit.invalidReason:null}}function vi(g,i,m){return new pi(g,m).explainFromTokens(i)}function yi(g,i,m){const{result:v,zone:C,specificOffset:k,invalidReason:V}=vi(g,i,m);return[v,C,k,V]}function ya(g,i){if(!g)return null;const v=Yt.create(i,g).dtFormatter(Iu()),C=v.formatToParts(),k=v.resolvedOptions();return C.map(V=>Wc(V,g,k))}const Cl="Invalid DateTime",fa=864e13;function Ya(g){return new xa("unsupported zone",`the zone "${g.name}" is not supported`)}function Ss(g){return g.weekData===null&&(g.weekData=Pt(g.c)),g.weekData}function Tl(g){return g.localWeekData===null&&(g.localWeekData=Pt(g.c,g.loc.getMinDaysInFirstWeek(),g.loc.getStartOfWeek())),g.localWeekData}function Fa(g,i){const m={ts:g.ts,zone:g.zone,c:g.c,o:g.o,loc:g.loc,invalid:g.invalid};return new Me({...m,...i,old:m})}function xr(g,i,m){let v=g-i*60*1e3;const C=m.offset(v);if(i===C)return[v,i];v-=(C-i)*60*1e3;const k=m.offset(v);return C===k?[v,C]:[g-Math.min(C,k)*60*1e3,Math.max(C,k)]}function Ga(g,i){g+=i*60*1e3;const m=new Date(g);return{year:m.getUTCFullYear(),month:m.getUTCMonth()+1,day:m.getUTCDate(),hour:m.getUTCHours(),minute:m.getUTCMinutes(),second:m.getUTCSeconds(),millisecond:m.getUTCMilliseconds()}}function Es(g,i,m){return xr(Kt(g),i,m)}function Cs(g,i){const m=g.o,v=g.c.year+Math.trunc(i.years),C=g.c.month+Math.trunc(i.months)+Math.trunc(i.quarters)*3,k={...g.c,year:v,month:C,day:Math.min(g.c.day,nr(v,C))+Math.trunc(i.days)+Math.trunc(i.weeks)*7},V=Fe.fromObject({years:i.years-Math.trunc(i.years),quarters:i.quarters-Math.trunc(i.quarters),months:i.months-Math.trunc(i.months),weeks:i.weeks-Math.trunc(i.weeks),days:i.days-Math.trunc(i.days),hours:i.hours,minutes:i.minutes,seconds:i.seconds,milliseconds:i.milliseconds}).as("milliseconds"),B=Kt(k);let[Y,de]=xr(B,m,g.zone);return V!==0&&(Y+=V,de=g.zone.offset(Y)),{ts:Y,o:de}}function Da(g,i,m,v,C,k){const{setZone:V,zone:B}=m;if(g&&Object.keys(g).length!==0||i){const Y=i||B,de=Me.fromObject(g,{...m,zone:Y,specificOffset:k});return V?de:de.setZone(B)}else return Me.invalid(new xa("unparsable",`the input "${C}" can't be parsed as ${v}`))}function pr(g,i,m=!0){return g.isValid?Yt.create(Ie.create("en-US"),{allowZ:m,forceSimple:!0}).formatDateTimeFromString(g,i):null}function ta(g,i,m){const v=g.c.year>9999||g.c.year<0;let C="";if(v&&g.c.year>=0&&(C+="+"),C+=st(g.c.year,v?6:4),m==="year")return C;if(i){if(C+="-",C+=st(g.c.month),m==="month")return C;C+="-"}else if(C+=st(g.c.month),m==="month")return C;return C+=st(g.c.day),C}function vr(g,i,m,v,C,k,V){let B=!m||g.c.millisecond!==0||g.c.second!==0,Y="";switch(V){case"day":case"month":case"year":break;default:if(Y+=st(g.c.hour),V==="hour")break;if(i){if(Y+=":",Y+=st(g.c.minute),V==="minute")break;B&&(Y+=":",Y+=st(g.c.second))}else{if(Y+=st(g.c.minute),V==="minute")break;B&&(Y+=st(g.c.second))}if(V==="second")break;B&&(!v||g.c.millisecond!==0)&&(Y+=".",Y+=st(g.c.millisecond,3))}return C&&(g.isOffsetFixed&&g.offset===0&&!k?Y+="Z":g.o<0?(Y+="-",Y+=st(Math.trunc(-g.o/60)),Y+=":",Y+=st(Math.trunc(-g.o%60))):(Y+="+",Y+=st(Math.trunc(g.o/60)),Y+=":",Y+=st(Math.trunc(g.o%60)))),k&&(Y+="["+g.zone.ianaName+"]"),Y}const Za={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},Jc={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},yr={ordinal:1,hour:0,minute:0,second:0,millisecond:0},Wa=["year","month","day","hour","minute","second","millisecond"],bi=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],Kc=["year","ordinal","hour","minute","second","millisecond"];function Ml(g){const i={year:"year",years:"year",month:"month",months:"month",day:"day",days:"day",hour:"hour",hours:"hour",minute:"minute",minutes:"minute",quarter:"quarter",quarters:"quarter",second:"second",seconds:"second",millisecond:"millisecond",milliseconds:"millisecond",weekday:"weekday",weekdays:"weekday",weeknumber:"weekNumber",weeksnumber:"weekNumber",weeknumbers:"weekNumber",weekyear:"weekYear",weekyears:"weekYear",ordinal:"ordinal"}[g.toLowerCase()];if(!i)throw new f(g);return i}function ji(g){switch(g.toLowerCase()){case"localweekday":case"localweekdays":return"localWeekday";case"localweeknumber":case"localweeknumbers":return"localWeekNumber";case"localweekyear":case"localweekyears":return"localWeekYear";default:return Ml(g)}}function ba(g){if(un===void 0&&(un=ht.now()),g.type!=="iana")return g.offset(un);const i=g.name;let m=ia.get(i);return m===void 0&&(m=g.offset(un),ia.set(i,m)),m}function Yn(g,i){const m=zt(i.zone,ht.defaultZone);if(!m.isValid)return Me.invalid(Ya(m));const v=Ie.fromObject(i);let C,k;if(ke(g.year))C=ht.now();else{for(const Y of Wa)ke(g[Y])&&(g[Y]=Za[Y]);const V=tr(g)||Un(g);if(V)return Me.invalid(V);const B=ba(m);[C,k]=Es(g,B,m)}return new Me({ts:C,zone:m,loc:v,o:k})}function Fn(g,i,m){const v=ke(m.round)?!0:m.round,C=ke(m.rounding)?"trunc":m.rounding,k=(B,Y)=>(B=ls(B,v||m.calendary?0:2,m.calendary?"round":C),i.loc.clone(m).relFormatter(m).format(B,Y)),V=B=>m.calendary?i.hasSame(g,B)?0:i.startOf(B).diff(g.startOf(B),B).get(B):i.diff(g,B).get(B);if(m.unit)return k(V(m.unit),m.unit);for(const B of m.units){const Y=V(B);if(Math.abs(Y)>=1)return k(Y,B)}return k(g>i?-0:0,m.units[m.units.length-1])}function Ts(g){let i={},m;return g.length>0&&typeof g[g.length-1]=="object"?(i=g[g.length-1],m=Array.from(g).slice(0,g.length-1)):m=Array.from(g),[i,m]}let un;const ia=new Map;class Me{constructor(i){const m=i.zone||ht.defaultZone;let v=i.invalid||(Number.isNaN(i.ts)?new xa("invalid input"):null)||(m.isValid?null:Ya(m));this.ts=ke(i.ts)?ht.now():i.ts;let C=null,k=null;if(!v)if(i.old&&i.old.ts===this.ts&&i.old.zone.equals(m))[C,k]=[i.old.c,i.old.o];else{const B=pa(i.o)&&!i.old?i.o:m.offset(this.ts);C=Ga(this.ts,B),v=Number.isNaN(C.year)?new xa("invalid input"):null,C=v?null:C,k=v?null:B}this._zone=m,this.loc=i.loc||Ie.create(),this.invalid=v,this.weekData=null,this.localWeekData=null,this.c=C,this.o=k,this.isLuxonDateTime=!0}static now(){return new Me({})}static local(){const[i,m]=Ts(arguments),[v,C,k,V,B,Y,de]=m;return Yn({year:v,month:C,day:k,hour:V,minute:B,second:Y,millisecond:de},i)}static utc(){const[i,m]=Ts(arguments),[v,C,k,V,B,Y,de]=m;return i.zone=mt.utcInstance,Yn({year:v,month:C,day:k,hour:V,minute:B,second:Y,millisecond:de},i)}static fromJSDate(i,m={}){const v=Mc(i)?i.valueOf():NaN;if(Number.isNaN(v))return Me.invalid("invalid input");const C=zt(m.zone,ht.defaultZone);return C.isValid?new Me({ts:v,zone:C,loc:Ie.fromObject(m)}):Me.invalid(Ya(C))}static fromMillis(i,m={}){if(pa(i))return i<-fa||i>fa?Me.invalid("Timestamp out of range"):new Me({ts:i,zone:zt(m.zone,ht.defaultZone),loc:Ie.fromObject(m)});throw new b(`fromMillis requires a numerical input, but received a ${typeof i} with value ${i}`)}static fromSeconds(i,m={}){if(pa(i))return new Me({ts:i*1e3,zone:zt(m.zone,ht.defaultZone),loc:Ie.fromObject(m)});throw new b("fromSeconds requires a numerical input")}static fromObject(i,m={}){i=i||{};const v=zt(m.zone,ht.defaultZone);if(!v.isValid)return Me.invalid(Ya(v));const C=Ie.fromObject(m),k=sn(i,ji),{minDaysInFirstWeek:V,startOfWeek:B}=Cc(k,C),Y=ht.now(),de=ke(m.specificOffset)?v.offset(Y):m.specificOffset,be=!ke(k.ordinal),He=!ke(k.year),Ge=!ke(k.month)||!ke(k.day),Ae=He||Ge,wt=k.weekYear||k.weekNumber;if((Ae||be)&&wt)throw new h("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(Ge&&be)throw new h("Can't mix ordinal dates with month/day");const Wt=wt||k.weekday&&!Ae;let It,Cn,dn=Ga(Y,de);Wt?(It=bi,Cn=Jc,dn=Pt(dn,V,B)):be?(It=Kc,Cn=yr,dn=as(dn)):(It=Wa,Cn=Za);let br=!1;for(const Xa of It){const jr=k[Xa];ke(jr)?br?k[Xa]=Cn[Xa]:k[Xa]=dn[Xa]:br=!0}const Gn=Wt?Tc(k,V,B):be?ns(k):tr(k),Qa=Gn||Un(k);if(Qa)return Me.invalid(Qa);const Tn=Wt?Ln(k,V,B):be?Ec(k):k,[fn,Ni]=Es(Tn,de,v),Zn=new Me({ts:fn,zone:v,o:Ni,loc:C});return k.weekday&&Ae&&i.weekday!==Zn.weekday?Me.invalid("mismatched weekday",`you can't specify both a weekday of ${k.weekday} and a date of ${Zn.toISO()}`):Zn.isValid?Zn:Me.invalid(Zn.invalid)}static fromISO(i,m={}){const[v,C]=Hc(i);return Da(v,C,m,"ISO 8601",i)}static fromRFC2822(i,m={}){const[v,C]=qc(i);return Da(v,C,m,"RFC 2822",i)}static fromHTTP(i,m={}){const[v,C]=Vc(i);return Da(v,C,m,"HTTP",m)}static fromFormat(i,m,v={}){if(ke(i)||ke(m))throw new b("fromFormat requires an input string and a format");const{locale:C=null,numberingSystem:k=null}=v,V=Ie.fromOpts({locale:C,numberingSystem:k,defaultToEN:!0}),[B,Y,de,be]=yi(V,i,m);return be?Me.invalid(be):Da(B,Y,v,`format ${m}`,i,de)}static fromString(i,m,v={}){return Me.fromFormat(i,m,v)}static fromSQL(i,m={}){const[v,C]=Pc(i);return Da(v,C,m,"SQL",i)}static invalid(i,m=null){if(!i)throw new b("need to specify a reason the DateTime is invalid");const v=i instanceof xa?i:new xa(i,m);if(ht.throwOnInvalid)throw new r(v);return new Me({invalid:v})}static isDateTime(i){return i&&i.isLuxonDateTime||!1}static parseFormatForOpts(i,m={}){const v=ya(i,Ie.fromObject(m));return v?v.map(C=>C?C.val:null).join(""):null}static expandFormat(i,m={}){return Xc(Yt.parseFormat(i),Ie.fromObject(m)).map(C=>C.val).join("")}static resetCache(){un=void 0,ia.clear()}get(i){return this[i]}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}get outputCalendar(){return this.isValid?this.loc.outputCalendar:null}get zone(){return this._zone}get zoneName(){return this.isValid?this.zone.name:null}get year(){return this.isValid?this.c.year:NaN}get quarter(){return this.isValid?Math.ceil(this.c.month/3):NaN}get month(){return this.isValid?this.c.month:NaN}get day(){return this.isValid?this.c.day:NaN}get hour(){return this.isValid?this.c.hour:NaN}get minute(){return this.isValid?this.c.minute:NaN}get second(){return this.isValid?this.c.second:NaN}get millisecond(){return this.isValid?this.c.millisecond:NaN}get weekYear(){return this.isValid?Ss(this).weekYear:NaN}get weekNumber(){return this.isValid?Ss(this).weekNumber:NaN}get weekday(){return this.isValid?Ss(this).weekday:NaN}get isWeekend(){return this.isValid&&this.loc.getWeekendDays().includes(this.weekday)}get localWeekday(){return this.isValid?Tl(this).weekday:NaN}get localWeekNumber(){return this.isValid?Tl(this).weekNumber:NaN}get localWeekYear(){return this.isValid?Tl(this).weekYear:NaN}get ordinal(){return this.isValid?as(this.c).ordinal:NaN}get monthShort(){return this.isValid?js.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?js.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?js.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?js.weekdays("long",{locObj:this.loc})[this.weekday-1]:null}get offset(){return this.isValid?+this.o:NaN}get offsetNameShort(){return this.isValid?this.zone.offsetName(this.ts,{format:"short",locale:this.locale}):null}get offsetNameLong(){return this.isValid?this.zone.offsetName(this.ts,{format:"long",locale:this.locale}):null}get isOffsetFixed(){return this.isValid?this.zone.isUniversal:null}get isInDST(){return this.isOffsetFixed?!1:this.offset>this.set({month:1,day:1}).offset||this.offset>this.set({month:5}).offset}getPossibleOffsets(){if(!this.isValid||this.isOffsetFixed)return[this];const i=864e5,m=6e4,v=Kt(this.c),C=this.zone.offset(v-i),k=this.zone.offset(v+i),V=this.zone.offset(v-C*m),B=this.zone.offset(v-k*m);if(V===B)return[this];const Y=v-V*m,de=v-B*m,be=Ga(Y,V),He=Ga(de,B);return be.hour===He.hour&&be.minute===He.minute&&be.second===He.second&&be.millisecond===He.millisecond?[Fa(this,{ts:Y}),Fa(this,{ts:de})]:[this]}get isInLeapYear(){return gl(this.year)}get daysInMonth(){return nr(this.year,this.month)}get daysInYear(){return this.isValid?ln(this.year):NaN}get weeksInWeekYear(){return this.isValid?xl(this.weekYear):NaN}get weeksInLocalWeekYear(){return this.isValid?xl(this.localWeekYear,this.loc.getMinDaysInFirstWeek(),this.loc.getStartOfWeek()):NaN}resolvedLocaleOptions(i={}){const{locale:m,numberingSystem:v,calendar:C}=Yt.create(this.loc.clone(i),i).resolvedOptions(this);return{locale:m,numberingSystem:v,outputCalendar:C}}toUTC(i=0,m={}){return this.setZone(mt.instance(i),m)}toLocal(){return this.setZone(ht.defaultZone)}setZone(i,{keepLocalTime:m=!1,keepCalendarTime:v=!1}={}){if(i=zt(i,ht.defaultZone),i.equals(this.zone))return this;if(i.isValid){let C=this.ts;if(m||v){const k=i.offset(this.ts),V=this.toObject();[C]=Es(V,k,i)}return Fa(this,{ts:C,zone:i})}else return Me.invalid(Ya(i))}reconfigure({locale:i,numberingSystem:m,outputCalendar:v}={}){const C=this.loc.clone({locale:i,numberingSystem:m,outputCalendar:v});return Fa(this,{loc:C})}setLocale(i){return this.reconfigure({locale:i})}set(i){if(!this.isValid)return this;const m=sn(i,ji),{minDaysInFirstWeek:v,startOfWeek:C}=Cc(m,this.loc),k=!ke(m.weekYear)||!ke(m.weekNumber)||!ke(m.weekday),V=!ke(m.ordinal),B=!ke(m.year),Y=!ke(m.month)||!ke(m.day),de=B||Y,be=m.weekYear||m.weekNumber;if((de||V)&&be)throw new h("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(Y&&V)throw new h("Can't mix ordinal dates with month/day");let He;k?He=Ln({...Pt(this.c,v,C),...m},v,C):ke(m.ordinal)?(He={...this.toObject(),...m},ke(m.day)&&(He.day=Math.min(nr(He.year,He.month),He.day))):He=Ec({...as(this.c),...m});const[Ge,Ae]=Es(He,this.o,this.zone);return Fa(this,{ts:Ge,o:Ae})}plus(i){if(!this.isValid)return this;const m=Fe.fromDurationLike(i);return Fa(this,Cs(this,m))}minus(i){if(!this.isValid)return this;const m=Fe.fromDurationLike(i).negate();return Fa(this,Cs(this,m))}startOf(i,{useLocaleWeeks:m=!1}={}){if(!this.isValid)return this;const v={},C=Fe.normalizeUnit(i);switch(C){case"years":v.month=1;case"quarters":case"months":v.day=1;case"weeks":case"days":v.hour=0;case"hours":v.minute=0;case"minutes":v.second=0;case"seconds":v.millisecond=0;break}if(C==="weeks")if(m){const k=this.loc.getStartOfWeek(),{weekday:V}=this;V<k&&(v.weekNumber=this.weekNumber-1),v.weekday=k}else v.weekday=1;if(C==="quarters"){const k=Math.ceil(this.month/3);v.month=(k-1)*3+1}return this.set(v)}endOf(i,m){return this.isValid?this.plus({[i]:1}).startOf(i,m).minus(1):this}toFormat(i,m={}){return this.isValid?Yt.create(this.loc.redefaultToEN(m)).formatDateTimeFromString(this,i):Cl}toLocaleString(i=M,m={}){return this.isValid?Yt.create(this.loc.clone(m),i).formatDateTime(this):Cl}toLocaleParts(i={}){return this.isValid?Yt.create(this.loc.clone(i),i).formatDateTimeParts(this):[]}toISO({format:i="extended",suppressSeconds:m=!1,suppressMilliseconds:v=!1,includeOffset:C=!0,extendedZone:k=!1,precision:V="milliseconds"}={}){if(!this.isValid)return null;V=Ml(V);const B=i==="extended";let Y=ta(this,B,V);return Wa.indexOf(V)>=3&&(Y+="T"),Y+=vr(this,B,m,v,C,k,V),Y}toISODate({format:i="extended",precision:m="day"}={}){return this.isValid?ta(this,i==="extended",Ml(m)):null}toISOWeekDate(){return pr(this,"kkkk-'W'WW-c")}toISOTime({suppressMilliseconds:i=!1,suppressSeconds:m=!1,includeOffset:v=!0,includePrefix:C=!1,extendedZone:k=!1,format:V="extended",precision:B="milliseconds"}={}){return this.isValid?(B=Ml(B),(C&&Wa.indexOf(B)>=3?"T":"")+vr(this,V==="extended",m,i,v,k,B)):null}toRFC2822(){return pr(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)}toHTTP(){return pr(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")}toSQLDate(){return this.isValid?ta(this,!0):null}toSQLTime({includeOffset:i=!0,includeZone:m=!1,includeOffsetSpace:v=!0}={}){let C="HH:mm:ss.SSS";return(m||i)&&(v&&(C+=" "),m?C+="z":i&&(C+="ZZ")),pr(this,C,!0)}toSQL(i={}){return this.isValid?`${this.toSQLDate()} ${this.toSQLTime(i)}`:null}toString(){return this.isValid?this.toISO():Cl}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`DateTime { ts: ${this.toISO()}, zone: ${this.zone.name}, locale: ${this.locale} }`:`DateTime { Invalid, reason: ${this.invalidReason} }`}valueOf(){return this.toMillis()}toMillis(){return this.isValid?this.ts:NaN}toSeconds(){return this.isValid?this.ts/1e3:NaN}toUnixInteger(){return this.isValid?Math.floor(this.ts/1e3):NaN}toJSON(){return this.toISO()}toBSON(){return this.toJSDate()}toObject(i={}){if(!this.isValid)return{};const m={...this.c};return i.includeConfig&&(m.outputCalendar=this.outputCalendar,m.numberingSystem=this.loc.numberingSystem,m.locale=this.loc.locale),m}toJSDate(){return new Date(this.isValid?this.ts:NaN)}diff(i,m="milliseconds",v={}){if(!this.isValid||!i.isValid)return Fe.invalid("created by diffing an invalid DateTime");const C={locale:this.locale,numberingSystem:this.numberingSystem,...v},k=ml(m).map(Fe.normalizeUnit),V=i.valueOf()>this.valueOf(),B=V?this:i,Y=V?i:this,de=Fc(B,Y,k,C);return V?de.negate():de}diffNow(i="milliseconds",m={}){return this.diff(Me.now(),i,m)}until(i){return this.isValid?pt.fromDateTimes(this,i):this}hasSame(i,m,v){if(!this.isValid)return!1;const C=i.valueOf(),k=this.setZone(i.zone,{keepLocalTime:!0});return k.startOf(m,v)<=C&&C<=k.endOf(m,v)}equals(i){return this.isValid&&i.isValid&&this.valueOf()===i.valueOf()&&this.zone.equals(i.zone)&&this.loc.equals(i.loc)}toRelative(i={}){if(!this.isValid)return null;const m=i.base||Me.fromObject({},{zone:this.zone}),v=i.padding?this<m?-i.padding:i.padding:0;let C=["years","months","days","hours","minutes","seconds"],k=i.unit;return Array.isArray(i.unit)&&(C=i.unit,k=void 0),Fn(m,this.plus(v),{...i,numeric:"always",units:C,unit:k})}toRelativeCalendar(i={}){return this.isValid?Fn(i.base||Me.fromObject({},{zone:this.zone}),this,{...i,numeric:"auto",units:["years","months","days"],calendary:!0}):null}static min(...i){if(!i.every(Me.isDateTime))throw new b("min requires all arguments be DateTimes");return Oc(i,m=>m.valueOf(),Math.min)}static max(...i){if(!i.every(Me.isDateTime))throw new b("max requires all arguments be DateTimes");return Oc(i,m=>m.valueOf(),Math.max)}static fromFormatExplain(i,m,v={}){const{locale:C=null,numberingSystem:k=null}=v,V=Ie.fromOpts({locale:C,numberingSystem:k,defaultToEN:!0});return vi(V,i,m)}static fromStringExplain(i,m,v={}){return Me.fromFormatExplain(i,m,v)}static buildFormatParser(i,m={}){const{locale:v=null,numberingSystem:C=null}=m,k=Ie.fromOpts({locale:v,numberingSystem:C,defaultToEN:!0});return new pi(k,i)}static fromFormatParser(i,m,v={}){if(ke(i)||ke(m))throw new b("fromFormatParser requires an input string and a format parser");const{locale:C=null,numberingSystem:k=null}=v,V=Ie.fromOpts({locale:C,numberingSystem:k,defaultToEN:!0});if(!V.equals(m.locale))throw new b(`fromFormatParser called with a locale of ${V}, but the format parser was created for ${m.locale}`);const{result:B,zone:Y,specificOffset:de,invalidReason:be}=m.explainFromTokens(i);return be?Me.invalid(be):Da(B,Y,v,`format ${m.format}`,i,de)}static get DATE_SHORT(){return M}static get DATE_MED(){return D}static get DATE_MED_WITH_WEEKDAY(){return A}static get DATE_FULL(){return N}static get DATE_HUGE(){return O}static get TIME_SIMPLE(){return R}static get TIME_WITH_SECONDS(){return W}static get TIME_WITH_SHORT_OFFSET(){return L}static get TIME_WITH_LONG_OFFSET(){return J}static get TIME_24_SIMPLE(){return w}static get TIME_24_WITH_SECONDS(){return H}static get TIME_24_WITH_SHORT_OFFSET(){return q}static get TIME_24_WITH_LONG_OFFSET(){return G}static get DATETIME_SHORT(){return Z}static get DATETIME_SHORT_WITH_SECONDS(){return le}static get DATETIME_MED(){return S}static get DATETIME_MED_WITH_SECONDS(){return te}static get DATETIME_MED_WITH_WEEKDAY(){return ae}static get DATETIME_FULL(){return ie}static get DATETIME_FULL_WITH_SECONDS(){return ge}static get DATETIME_HUGE(){return pe}static get DATETIME_HUGE_WITH_SECONDS(){return P}}function ja(g){if(Me.isDateTime(g))return g;if(g&&g.valueOf&&pa(g.valueOf()))return Me.fromJSDate(g);if(g&&typeof g=="object")return Me.fromObject(g);throw new b(`Unknown datetime argument: ${g}, of type ${typeof g}`)}const Ia="3.7.2";return Ta.DateTime=Me,Ta.Duration=Fe,Ta.FixedOffsetZone=mt,Ta.IANAZone=xe,Ta.Info=js,Ta.Interval=pt,Ta.InvalidZone=$t,Ta.Settings=ht,Ta.SystemZone=fe,Ta.VERSION=Ia,Ta.Zone=K,Ta}var ux;function Nh(){return ux||(ux=1,(function(n){var f,b,j,y,x,Wf,M,Ql;Object.defineProperty(n,"__esModule",{value:!0}),n.CronDate=n.DAYS_IN_MONTH=n.DateMathOp=n.TimeUnit=void 0;const r=s2();var o;(function(N){N.Second="Second",N.Minute="Minute",N.Hour="Hour",N.Day="Day",N.Month="Month",N.Year="Year"})(o||(n.TimeUnit=o={}));var u;(function(N){N.Add="Add",N.Subtract="Subtract"})(u||(n.DateMathOp=u={})),n.DAYS_IN_MONTH=Object.freeze([31,29,31,30,31,30,31,31,30,31,30,31]);const A=class A{constructor(O,R){at(this,M);at(this,f);at(this,b,null);at(this,j,null);at(this,y,{add:{[o.Year]:this.addYear.bind(this),[o.Month]:this.addMonth.bind(this),[o.Day]:this.addDay.bind(this),[o.Hour]:this.addHour.bind(this),[o.Minute]:this.addMinute.bind(this),[o.Second]:this.addSecond.bind(this)},subtract:{[o.Year]:this.subtractYear.bind(this),[o.Month]:this.subtractMonth.bind(this),[o.Day]:this.subtractDay.bind(this),[o.Hour]:this.subtractHour.bind(this),[o.Minute]:this.subtractMinute.bind(this),[o.Second]:this.subtractSecond.bind(this)}});const W={zone:R};if(O?O instanceof A?(Oe(this,f,ee(O,f)),Oe(this,b,ee(O,b)),Oe(this,j,ee(O,j))):O instanceof Date?Oe(this,f,r.DateTime.fromJSDate(O,W)):typeof O=="number"?Oe(this,f,r.DateTime.fromMillis(O,W)):(Oe(this,f,r.DateTime.fromISO(O,W)),ee(this,f).isValid||Oe(this,f,r.DateTime.fromRFC2822(O,W)),ee(this,f).isValid||Oe(this,f,r.DateTime.fromSQL(O,W)),ee(this,f).isValid||Oe(this,f,r.DateTime.fromFormat(O,"EEE, d MMM yyyy HH:mm:ss",W))):Oe(this,f,r.DateTime.local()),!ee(this,f).isValid)throw new Error(`CronDate: unhandled timestamp: ${O}`);R&&R!==ee(this,f).zoneName&&Oe(this,f,ee(this,f).setZone(R))}get dstStart(){return ee(this,b)}set dstStart(O){Oe(this,b,O)}get dstEnd(){return ee(this,j)}set dstEnd(O){Oe(this,j,O)}addYear(){Oe(this,f,ee(this,f).plus({years:1}))}addMonth(){Oe(this,f,ee(this,f).plus({months:1}).startOf("month"))}addDay(){Oe(this,f,ee(this,f).plus({days:1}).startOf("day"))}addHour(){Oe(this,f,ee(this,f).plus({hours:1}).startOf("hour"))}addMinute(){Oe(this,f,ee(this,f).plus({minutes:1}).startOf("minute"))}addSecond(){Oe(this,f,ee(this,f).plus({seconds:1}))}subtractYear(){Oe(this,f,ee(this,f).minus({years:1}))}subtractMonth(){Oe(this,f,ee(this,f).minus({months:1}).endOf("month").startOf("second"))}subtractDay(){Oe(this,f,ee(this,f).minus({days:1}).endOf("day").startOf("second"))}subtractHour(){Oe(this,f,ee(this,f).minus({hours:1}).endOf("hour").startOf("second"))}subtractMinute(){Oe(this,f,ee(this,f).minus({minutes:1}).endOf("minute").startOf("second"))}subtractSecond(){Oe(this,f,ee(this,f).minus({seconds:1}))}addUnit(O){ee(this,y).add[O]()}subtractUnit(O){ee(this,y).subtract[O]()}invokeDateOperation(O,R){if(O===u.Add){this.addUnit(R);return}if(O===u.Subtract){this.subtractUnit(R);return}throw new Error(`Invalid verb: ${O}`)}getDate(){return ee(this,f).day}getFullYear(){return ee(this,f).year}getDay(){const O=ee(this,f).weekday;return O===7?0:O}getMonth(){return ee(this,f).month-1}getHours(){return ee(this,f).hour}getMinutes(){return ee(this,f).minute}getSeconds(){return ee(this,f).second}getMilliseconds(){return ee(this,f).millisecond}getUTCOffset(){return ee(this,f).offset}setStartOfDay(){Oe(this,f,ee(this,f).startOf("day"))}setEndOfDay(){Oe(this,f,ee(this,f).endOf("day"))}getTime(){return ee(this,f).valueOf()}getUTCDate(){return Te(this,M,Ql).call(this).day}getUTCFullYear(){return Te(this,M,Ql).call(this).year}getUTCDay(){const O=Te(this,M,Ql).call(this).weekday;return O===7?0:O}getUTCMonth(){return Te(this,M,Ql).call(this).month-1}getUTCHours(){return Te(this,M,Ql).call(this).hour}getUTCMinutes(){return Te(this,M,Ql).call(this).minute}getUTCSeconds(){return Te(this,M,Ql).call(this).second}toISOString(){return ee(this,f).toUTC().toISO()}toJSON(){return ee(this,f).toJSON()}setDate(O){Oe(this,f,ee(this,f).set({day:O}))}setFullYear(O){Oe(this,f,ee(this,f).set({year:O}))}setDay(O){Oe(this,f,ee(this,f).set({weekday:O}))}setMonth(O){Oe(this,f,ee(this,f).set({month:O+1}))}setHours(O){Oe(this,f,ee(this,f).set({hour:O}))}setMinutes(O){Oe(this,f,ee(this,f).set({minute:O}))}setSeconds(O){Oe(this,f,ee(this,f).set({second:O}))}setMilliseconds(O){Oe(this,f,ee(this,f).set({millisecond:O}))}toString(){return this.toDate().toString()}toDate(){return ee(this,f).toJSDate()}isLastDayOfMonth(){var W;const{day:O,month:R}=ee(this,f);if(R===2){const L=Te(W=A,x,Wf).call(W,ee(this,f).year);return O===n.DAYS_IN_MONTH[R-1]-(L?0:1)}return O===n.DAYS_IN_MONTH[R-1]}isLastWeekdayOfMonth(){var L;const{day:O,month:R}=ee(this,f);let W;return R===2?W=n.DAYS_IN_MONTH[R-1]-(Te(L=A,x,Wf).call(L,ee(this,f).year)?0:1):W=n.DAYS_IN_MONTH[R-1],O>W-7}applyDateOperation(O,R,W){if(R===o.Month||R===o.Day){this.invokeDateOperation(O,R);return}const L=this.getHours();this.invokeDateOperation(O,R);const J=this.getHours(),w=J-L;w===2?W!==24&&(this.dstStart=J):w===0&&this.getMinutes()===0&&this.getSeconds()===0&&W!==24&&(this.dstEnd=J)}};f=new WeakMap,b=new WeakMap,j=new WeakMap,y=new WeakMap,x=new WeakSet,Wf=function(O){return O%4===0&&O%100!==0||O%400===0},M=new WeakSet,Ql=function(){return ee(this,f).toUTC()},at(A,x);let h=A;n.CronDate=h,n.default=h})(Hf)),Hf}var dx;function r2(){if(dx)return cc;dx=1,Object.defineProperty(cc,"__esModule",{value:!0}),cc.CronMonth=void 0;const n=Nh(),r=Gs(),o=1,u=12,h=Object.freeze([]);let f=class extends r.CronField{static get min(){return o}static get max(){return u}static get chars(){return h}static get daysInMonth(){return n.DAYS_IN_MONTH}constructor(j,y){super(j,y),this.validate()}get values(){return super.values}};return cc.CronMonth=f,cc}var oc={},fx;function i2(){if(fx)return oc;fx=1,Object.defineProperty(oc,"__esModule",{value:!0}),oc.CronSecond=void 0;const n=Gs(),r=0,o=59,u=Object.freeze([]);let h=class extends n.CronField{static get min(){return r}static get max(){return o}static get chars(){return u}constructor(b,j){super(b,j),this.validate()}get values(){return super.values}};return oc.CronSecond=h,oc}var hx;function wh(){return hx||(hx=1,(function(n){var r=Hs&&Hs.__createBinding||(Object.create?(function(u,h,f,b){b===void 0&&(b=f);var j=Object.getOwnPropertyDescriptor(h,f);(!j||("get"in j?!h.__esModule:j.writable||j.configurable))&&(j={enumerable:!0,get:function(){return h[f]}}),Object.defineProperty(u,b,j)}):(function(u,h,f,b){b===void 0&&(b=f),u[b]=h[f]})),o=Hs&&Hs.__exportStar||function(u,h){for(var f in u)f!=="default"&&!Object.prototype.hasOwnProperty.call(h,f)&&r(h,u,f)};Object.defineProperty(n,"__esModule",{value:!0}),o(e2(),n),o(t2(),n),o(a2(),n),o(Gs(),n),o(n2(),n),o(l2(),n),o(r2(),n),o(i2(),n)})(Hs)),Hs}var mx;function kp(){var o,u,h,f,b,j,y,x,Rp,Dp;if(mx)return ac;mx=1,Object.defineProperty(ac,"__esModule",{value:!0}),ac.CronFieldCollection=void 0;const n=wh();let r=(x=class{constructor({second:A,minute:N,hour:O,dayOfMonth:R,month:W,dayOfWeek:L}){at(this,o);at(this,u);at(this,h);at(this,f);at(this,b);at(this,j);if(!A)throw new Error("Validation error, Field second is missing");if(!N)throw new Error("Validation error, Field minute is missing");if(!O)throw new Error("Validation error, Field hour is missing");if(!R)throw new Error("Validation error, Field dayOfMonth is missing");if(!W)throw new Error("Validation error, Field month is missing");if(!L)throw new Error("Validation error, Field dayOfWeek is missing");if(W.values.length===1&&!R.hasLastChar&&!(parseInt(R.values[0],10)<=n.CronMonth.daysInMonth[W.values[0]-1]))throw new Error("Invalid explicit day of month definition");Oe(this,o,A),Oe(this,u,N),Oe(this,h,O),Oe(this,b,W),Oe(this,j,L),Oe(this,f,R)}static from(A,N){return new x({second:this.resolveField(n.CronSecond,A.second,N.second),minute:this.resolveField(n.CronMinute,A.minute,N.minute),hour:this.resolveField(n.CronHour,A.hour,N.hour),dayOfMonth:this.resolveField(n.CronDayOfMonth,A.dayOfMonth,N.dayOfMonth),month:this.resolveField(n.CronMonth,A.month,N.month),dayOfWeek:this.resolveField(n.CronDayOfWeek,A.dayOfWeek,N.dayOfWeek)})}static resolveField(A,N,O){return O?O instanceof n.CronField?O:new A(O):N}get second(){return ee(this,o)}get minute(){return ee(this,u)}get hour(){return ee(this,h)}get dayOfMonth(){return ee(this,f)}get month(){return ee(this,b)}get dayOfWeek(){return ee(this,j)}static compactField(A){if(A.length===0)return[];const N=[];let O;return A.forEach((R,W,L)=>{if(O===void 0){O={start:R,count:1};return}const J=L[W-1]||O.start,w=L[W+1];if(R==="L"||R==="W"){N.push(O),N.push({start:R,count:1}),O=void 0;return}if(O.step===void 0&&w!==void 0){const H=R-J,q=w-R;if(H<=q){O={...O,count:2,end:R,step:H};return}O.step=1}R-(O.end??0)===O.step?(O.count++,O.end=R):(O.count===1?N.push({start:O.start,count:1}):O.count===2?(N.push({start:O.start,count:1}),N.push({start:O.end??J,count:1})):N.push(O),O={start:R,count:1})}),O&&N.push(O),N}stringifyField(A){var W;let N=A.max,O=A.values;if(A instanceof n.CronDayOfWeek){N=6;const L=ee(this,j).values;O=L[L.length-1]===7?L.slice(0,-1):L}A instanceof n.CronDayOfMonth&&(N=ee(this,b).values.length===1?n.CronMonth.daysInMonth[ee(this,b).values[0]-1]:A.max);const R=x.compactField(O);if(R.length===1){const L=Te(W=x,y,Rp).call(W,A,R[0],N);if(L)return L}return R.map(L=>{var w;const J=L.count===1?L.start.toString():Te(w=x,y,Dp).call(w,L,N);return A instanceof n.CronDayOfWeek&&A.nthDay>0?`${J}#${A.nthDay}`:J}).join(",")}stringify(A=!1){const N=[];return A&&N.push(this.stringifyField(ee(this,o))),N.push(this.stringifyField(ee(this,u)),this.stringifyField(ee(this,h)),this.stringifyField(ee(this,f)),this.stringifyField(ee(this,b)),this.stringifyField(ee(this,j))),N.join(" ")}serialize(){return{second:ee(this,o).serialize(),minute:ee(this,u).serialize(),hour:ee(this,h).serialize(),dayOfMonth:ee(this,f).serialize(),month:ee(this,b).serialize(),dayOfWeek:ee(this,j).serialize()}}},o=new WeakMap,u=new WeakMap,h=new WeakMap,f=new WeakMap,b=new WeakMap,j=new WeakMap,y=new WeakSet,Rp=function(A,N,O){const R=N.step;return R?R===1&&N.start===A.min&&N.end&&N.end>=O?A.hasQuestionMarkChar?"?":"*":R!==1&&N.start===A.min&&N.end&&N.end>=O-R+1?`*/${R}`:null:null},Dp=function(A,N){const O=A.step;if(O===1)return`${A.start}-${A.end}`;const R=A.start===0?A.count-1:A.count;if(!O)throw new Error("Unexpected range step");if(!A.end)throw new Error("Unexpected range end");if(O*R>A.end){const W=(J,w)=>{if(typeof A.start!="number")throw new Error("Unexpected range start");return w%O===0?A.start+w:null};if(typeof A.start!="number")throw new Error("Unexpected range start");const L={length:A.end-A.start+1};return Array.from(L,W).filter(J=>J!==null).join(",")}return A.end===N-O+1?`${A.start}/${O}`:`${A.start}-${A.end}/${O}`},at(x,y),x);return ac.CronFieldCollection=r,ac}var qf={},gx;function qp(){return gx||(gx=1,(function(n){var h,f,b,j,y,x,E,M,D,Xl,N,Vs,Ap,_p,zp,Lp,If,Up,Hp,Yr;Object.defineProperty(n,"__esModule",{value:!0}),n.CronExpression=n.LOOPS_LIMIT_EXCEEDED_ERROR_MESSAGE=n.TIME_SPAN_OUT_OF_BOUNDS_ERROR_MESSAGE=void 0;const r=Nh();n.TIME_SPAN_OUT_OF_BOUNDS_ERROR_MESSAGE="Out of the time span range",n.LOOPS_LIMIT_EXCEEDED_ERROR_MESSAGE="Invalid expression, loop limit exceeded";const o=1e4,Z=class Z{constructor(S,te){at(this,N);at(this,h);at(this,f);at(this,b);at(this,j);at(this,y);at(this,x);at(this,E,null);at(this,M,!1);Oe(this,h,te),Oe(this,f,te.tz),Oe(this,j,te.startDate?new r.CronDate(te.startDate,ee(this,f)):null),Oe(this,y,te.endDate?new r.CronDate(te.endDate,ee(this,f)):null);let ae=te.currentDate??te.startDate;if(ae){const ie=new r.CronDate(ae,ee(this,f));ee(this,j)&&ie.getTime()<ee(this,j).getTime()?ae=ee(this,j):ee(this,y)&&ie.getTime()>ee(this,y).getTime()&&(ae=ee(this,y))}Oe(this,b,new r.CronDate(ae,ee(this,f))),Oe(this,x,S)}get fields(){return ee(this,x)}static fieldsToExpression(S,te){return new Z(S,te||{})}next(){return Te(this,N,Yr).call(this)}prev(){return Te(this,N,Yr).call(this,!0)}hasNext(){const S=ee(this,b);try{return Te(this,N,Yr).call(this),!0}catch{return!1}finally{Oe(this,b,S)}}hasPrev(){const S=ee(this,b);try{return Te(this,N,Yr).call(this,!0),!0}catch{return!1}finally{Oe(this,b,S)}}take(S){const te=[];if(S>=0)for(let ae=0;ae<S;ae++)try{te.push(this.next())}catch{return te}else for(let ae=0;ae>S;ae--)try{te.push(this.prev())}catch{return te}return te}reset(S){Oe(this,b,new r.CronDate(S||ee(this,h).currentDate))}stringify(S=!1){return ee(this,x).stringify(S)}includesDate(S){const{second:te,minute:ae,hour:ie,month:ge}=ee(this,x),pe=new r.CronDate(S,ee(this,f));return!(!te.values.includes(pe.getSeconds())||!ae.values.includes(pe.getMinutes())||!ie.values.includes(pe.getHours())||!ge.values.includes(pe.getMonth()+1)||!Te(this,N,If).call(this,pe)||ee(this,x).dayOfWeek.nthDay>0&&Math.ceil(pe.getDate()/7)!==ee(this,x).dayOfWeek.nthDay)}toString(){return ee(this,h).expression||this.stringify(!0)}[Symbol.iterator](){return{next:()=>({value:Te(this,N,Yr).call(this),done:!this.hasNext()})}}};h=new WeakMap,f=new WeakMap,b=new WeakMap,j=new WeakMap,y=new WeakMap,x=new WeakMap,E=new WeakMap,M=new WeakMap,D=new WeakSet,Xl=function(S,te){return te.some(ae=>ae===S)},N=new WeakSet,Vs=function(S,te){return S[te?S.length-1:0]},Ap=function(S){const te=`${S.getFullYear()}-${S.getMonth()+1}-${S.getDate()}`;if(ee(this,E)===te)return ee(this,M);const ae=new r.CronDate(S);ae.setStartOfDay();const ie=new r.CronDate(S);return ie.setEndOfDay(),Oe(this,E,te),Oe(this,M,ae.getUTCOffset()!==ie.getUTCOffset()),ee(this,M)},_p=function(S,te,ae){const ie=ee(this,x).second.values,ge=S.getSeconds(),pe=ee(this,x).second.findNearestValue(ge,ae);if(pe!==null){S.setSeconds(pe);return}S.applyDateOperation(te,r.TimeUnit.Minute,ee(this,x).hour.values.length),S.setSeconds(Te(this,N,Vs).call(this,ie,ae))},zp=function(S,te,ae){const ie=ee(this,x).minute.values,ge=ee(this,x).second.values,pe=S.getMinutes(),P=ee(this,x).minute.findNearestValue(pe,ae);if(P!==null){S.setMinutes(P),S.setSeconds(Te(this,N,Vs).call(this,ge,ae));return}S.applyDateOperation(te,r.TimeUnit.Hour,ee(this,x).hour.values.length),S.setMinutes(Te(this,N,Vs).call(this,ie,ae)),S.setSeconds(Te(this,N,Vs).call(this,ge,ae))},Lp=function(S,te){const ae=te.isLastWeekdayOfMonth();return S.some(ie=>{const ge=parseInt(ie.toString().charAt(0),10)%7;if(Number.isNaN(ge))throw new Error(`Invalid last weekday of the month expression: ${ie}`);return te.getDay()===ge&&ae})},If=function(S){var K,he,fe;const te=ee(this,x).dayOfMonth.isWildcard,ae=!te,ie=ee(this,x).dayOfWeek.isWildcard,ge=!ie,pe=Te(K=Z,D,Xl).call(K,S.getDate(),ee(this,x).dayOfMonth.values)||ee(this,x).dayOfMonth.hasLastChar&&S.isLastDayOfMonth(),P=Te(he=Z,D,Xl).call(he,S.getDay(),ee(this,x).dayOfWeek.values)||ee(this,x).dayOfWeek.hasLastChar&&Te(fe=Z,D,Lp).call(fe,ee(this,x).dayOfWeek.values,S);return!!(ae&&ge&&(pe||P)||pe&&!ge||te&&!ie&&P)},Up=function(S,te,ae){var Ne,U;const ie=ee(this,x).hour.values,ge=ie,pe=S.getHours(),P=Te(Ne=Z,D,Xl).call(Ne,pe,ie),K=S.dstStart===pe,he=S.dstEnd===pe;if(K)return Te(U=Z,D,Xl).call(U,pe-1,ie)?!0:(S.invokeDateOperation(te,r.TimeUnit.Hour),!1);if(he&&!ae)return S.dstEnd=null,S.applyDateOperation(r.DateMathOp.Add,r.TimeUnit.Hour,ge.length),!1;if(P)return!0;S.dstStart=null;const fe=ee(this,x).hour.findNearestValue(pe,ae);if(fe===null)return S.applyDateOperation(te,r.TimeUnit.Day,ge.length),!1;if(Te(this,N,Ap).call(this,S)){const se=ae?pe-fe:fe-pe;for(let me=0;me<se;me++)S.applyDateOperation(te,r.TimeUnit.Hour,ge.length)}else S.setHours(fe);return S.setMinutes(Te(this,N,Vs).call(this,ee(this,x).minute.values,ae)),S.setSeconds(Te(this,N,Vs).call(this,ee(this,x).second.values,ae)),!1},Hp=function(S){if(!ee(this,j)&&!ee(this,y))return;const te=S.getTime();if(ee(this,j)&&te<ee(this,j).getTime())throw new Error(n.TIME_SPAN_OUT_OF_BOUNDS_ERROR_MESSAGE);if(ee(this,y)&&te>ee(this,y).getTime())throw new Error(n.TIME_SPAN_OUT_OF_BOUNDS_ERROR_MESSAGE)},Yr=function(S=!1){var pe,P,K;const te=S?r.DateMathOp.Subtract:r.DateMathOp.Add,ae=new r.CronDate(ee(this,b)),ie=ae.getTime();let ge=0;for(;++ge<o;){if(Te(this,N,Hp).call(this,ae),!Te(this,N,If).call(this,ae)){ae.applyDateOperation(te,r.TimeUnit.Day,ee(this,x).hour.values.length);continue}if(!(ee(this,x).dayOfWeek.nthDay<=0||Math.ceil(ae.getDate()/7)===ee(this,x).dayOfWeek.nthDay)){ae.applyDateOperation(te,r.TimeUnit.Day,ee(this,x).hour.values.length);continue}if(!Te(pe=Z,D,Xl).call(pe,ae.getMonth()+1,ee(this,x).month.values)){ae.applyDateOperation(te,r.TimeUnit.Month,ee(this,x).hour.values.length);continue}if(Te(this,N,Up).call(this,ae,te,S)){if(!Te(P=Z,D,Xl).call(P,ae.getMinutes(),ee(this,x).minute.values)){Te(this,N,zp).call(this,ae,te,S);continue}if(!Te(K=Z,D,Xl).call(K,ae.getSeconds(),ee(this,x).second.values)){Te(this,N,_p).call(this,ae,te,S);continue}if(ie===ae.getTime()){(te==="Add"||ae.getMilliseconds()===0)&&ae.applyDateOperation(te,r.TimeUnit.Second,ee(this,x).hour.values.length);continue}break}}if(ge>o)throw new Error(n.LOOPS_LIMIT_EXCEEDED_ERROR_MESSAGE);return ae.getMilliseconds()!==0&&ae.setMilliseconds(0),Oe(this,b,ae),ae},at(Z,D);let u=Z;n.CronExpression=u,n.default=u})(qf)),qf}var Ko={},xx;function c2(){if(xx)return Ko;xx=1,Object.defineProperty(Ko,"__esModule",{value:!0}),Ko.seededRandom=o;function n(u){let h=2166136261;for(let f=0;f<u.length;f++)h^=u.charCodeAt(f),h=Math.imul(h,16777619);return()=>h>>>0}function r(u){return()=>{let h=u+=1831565813;return h=Math.imul(h^h>>>15,h|1),h^=h+Math.imul(h^h>>>7,h|61),((h^h>>>14)>>>0)/4294967296}}function o(u){const h=u?n(u)():Math.floor(Math.random()*1e10);return r(h)}return Ko}var px;function Xf(){var x,E,Vp,Bs,Bp,$p,Pp,Yp,Fp,Gp,Zp,Qf,Wp,Ip;if(px)return Ua;px=1,Object.defineProperty(Ua,"__esModule",{value:!0}),Ua.CronExpressionParser=Ua.DayOfWeek=Ua.Months=Ua.CronUnit=Ua.PredefinedExpressions=void 0;const n=kp(),r=qp(),o=c2(),u=wh();var h;(function(G){G["@yearly"]="0 0 0 1 1 *",G["@annually"]="0 0 0 1 1 *",G["@monthly"]="0 0 0 1 * *",G["@weekly"]="0 0 0 * * 0",G["@daily"]="0 0 0 * * *",G["@hourly"]="0 0 * * * *",G["@minutely"]="0 * * * * *",G["@secondly"]="* * * * * *",G["@weekdays"]="0 0 0 * * 1-5",G["@weekends"]="0 0 0 * * 0,6"})(h||(Ua.PredefinedExpressions=h={}));var f;(function(G){G.Second="Second",G.Minute="Minute",G.Hour="Hour",G.DayOfMonth="DayOfMonth",G.Month="Month",G.DayOfWeek="DayOfWeek"})(f||(Ua.CronUnit=f={}));var b;(function(G){G[G.jan=1]="jan",G[G.feb=2]="feb",G[G.mar=3]="mar",G[G.apr=4]="apr",G[G.may=5]="may",G[G.jun=6]="jun",G[G.jul=7]="jul",G[G.aug=8]="aug",G[G.sep=9]="sep",G[G.oct=10]="oct",G[G.nov=11]="nov",G[G.dec=12]="dec"})(b||(Ua.Months=b={}));var j;(function(G){G[G.sun=0]="sun",G[G.mon=1]="mon",G[G.tue=2]="tue",G[G.wed=3]="wed",G[G.thu=4]="thu",G[G.fri=5]="fri",G[G.sat=6]="sat"})(j||(Ua.DayOfWeek=j={}));let y=(E=class{static parse(Z,le={}){var me,ve,Re,xe,we,lt,Ye,St;const{strict:S=!1,hashSeed:te}=le,ae=(0,o.seededRandom)(te);Z=h[Z]||Z;const ie=Te(me=E,x,Vp).call(me,Z,S);if(!(ie.dayOfMonth==="*"||ie.dayOfWeek==="*"||!S))throw new Error("Cannot use both dayOfMonth and dayOfWeek together in strict mode!");const ge=Te(ve=E,x,Bs).call(ve,f.Second,ie.second,u.CronSecond.constraints,ae),pe=Te(Re=E,x,Bs).call(Re,f.Minute,ie.minute,u.CronMinute.constraints,ae),P=Te(xe=E,x,Bs).call(xe,f.Hour,ie.hour,u.CronHour.constraints,ae),K=Te(we=E,x,Bs).call(we,f.Month,ie.month,u.CronMonth.constraints,ae),he=Te(lt=E,x,Bs).call(lt,f.DayOfMonth,ie.dayOfMonth,u.CronDayOfMonth.constraints,ae),{dayOfWeek:fe,nthDayOfWeek:Ne}=Te(Ye=E,x,Wp).call(Ye,ie.dayOfWeek),U=Te(St=E,x,Bs).call(St,f.DayOfWeek,fe,u.CronDayOfWeek.constraints,ae),se=new n.CronFieldCollection({second:new u.CronSecond(ge,{rawValue:ie.second}),minute:new u.CronMinute(pe,{rawValue:ie.minute}),hour:new u.CronHour(P,{rawValue:ie.hour}),dayOfMonth:new u.CronDayOfMonth(he,{rawValue:ie.dayOfMonth}),month:new u.CronMonth(K,{rawValue:ie.month}),dayOfWeek:new u.CronDayOfWeek(U,{rawValue:ie.dayOfWeek,nthDayOfWeek:Ne})});return new r.CronExpression(se,{...le,expression:Z})}},x=new WeakSet,Vp=function(Z,le){if(le&&!Z.length)throw new Error("Invalid cron expression");Z=Z||"0 * * * * *";const S=Z.trim().split(/\s+/);if(le&&S.length<6)throw new Error("Invalid cron expression, expected 6 fields");if(S.length>6)throw new Error("Invalid cron expression, too many fields");const te=["*","*","*","*","*","0"];S.length<te.length&&S.unshift(...te.slice(S.length));const[ae,ie,ge,pe,P,K]=S;return{second:ae,minute:ie,hour:ge,dayOfMonth:pe,month:P,dayOfWeek:K}},Bs=function(Z,le,S,te){if((Z===f.Month||Z===f.DayOfWeek)&&(le=le.replace(/[a-z]{3}/gi,ae=>{ae=ae.toLowerCase();const ie=b[ae]||j[ae];if(ie===void 0)throw new Error(`Validation error, cannot resolve alias "${ae}"`);return ie.toString()})),!S.validChars.test(le))throw new Error(`Invalid characters, got value: ${le}`);return le=Te(this,x,Bp).call(this,le,S),le=Te(this,x,$p).call(this,le,S,te),Te(this,x,Pp).call(this,Z,le,S)},Bp=function(Z,le){return Z.replace(/[*?]/g,le.min+"-"+le.max)},$p=function(Z,le,S){const te=S();return Z.replace(/H(?:\((\d+)-(\d+)\))?(?:\/(\d+))?/g,(ae,ie,ge,pe)=>{if(ie&&ge&&pe){const P=parseInt(ie,10),K=parseInt(ge,10),he=parseInt(pe,10);if(P>K)throw new Error(`Invalid range: ${P}-${K}, min > max`);if(he<=0)throw new Error(`Invalid step: ${he}, must be positive`);const fe=Math.max(P,le.min),Ne=Math.floor(te*he),U=[];for(let se=Math.floor(fe/he)*he+Ne;se<=K;se+=he)se>=fe&&U.push(se);return U.join(",")}else if(ie&&ge){const P=parseInt(ie,10),K=parseInt(ge,10);if(P>K)throw new Error(`Invalid range: ${P}-${K}, min > max`);return String(Math.floor(te*(K-P+1))+P)}else if(pe){const P=parseInt(pe,10);if(P<=0)throw new Error(`Invalid step: ${P}, must be positive`);const K=Math.floor(te*P),he=[];for(let fe=Math.floor(le.min/P)*P+K;fe<=le.max;fe+=P)fe>=le.min&&he.push(fe);return he.join(",")}else return String(Math.floor(te*(le.max-le.min+1)+le.min))})},Pp=function(Z,le,S){const te=[];function ae(ge,pe){var P;if(Array.isArray(ge))te.push(...ge);else if(Te(P=E,x,Ip).call(P,pe,ge))te.push(ge);else{const K=parseInt(ge.toString(),10);if(!(K>=pe.min&&K<=pe.max))throw new Error(`Constraint error, got value ${ge} expected range ${pe.min}-${pe.max}`);te.push(Z===f.DayOfWeek?K%7:ge)}}return le.split(",").forEach(ge=>{var pe;if(!(ge.length>0))throw new Error("Invalid list value format");ae(Te(pe=E,x,Yp).call(pe,Z,ge,S),S)}),te},Yp=function(Z,le,S){var ae,ie;const te=le.split("/");if(te.length>2)throw new Error(`Invalid repeat: ${le}`);return te.length===2?(isNaN(parseInt(te[0],10))||(te[0]=`${te[0]}-${S.max}`),Te(ae=E,x,Qf).call(ae,Z,te[0],parseInt(te[1],10),S)):Te(ie=E,x,Qf).call(ie,Z,le,1,S)},Fp=function(Z,le,S){if(!(!isNaN(Z)&&!isNaN(le)&&Z>=S.min&&le<=S.max))throw new Error(`Constraint error, got range ${Z}-${le} expected range ${S.min}-${S.max}`);if(Z>le)throw new Error(`Invalid range: ${Z}-${le}, min(${Z}) > max(${le})`)},Gp=function(Z){if(!(!isNaN(Z)&&Z>0))throw new Error(`Constraint error, cannot repeat at every ${Z} time.`)},Zp=function(Z,le,S,te){const ae=[];Z===f.DayOfWeek&&S%7===0&&ae.push(0);for(let ie=le;ie<=S;ie+=te)ae.indexOf(ie)===-1&&ae.push(ie);return ae},Qf=function(Z,le,S,te){const ae=le.split("-");if(ae.length<=1)return isNaN(+le)?le:+le;const[ie,ge]=ae.map(pe=>parseInt(pe,10));return Te(this,x,Fp).call(this,ie,ge,te),Te(this,x,Gp).call(this,S),Te(this,x,Zp).call(this,Z,ie,ge,S)},Wp=function(Z){const le=Z.split("#");if(le.length<=1)return{dayOfWeek:le[0]};const S=+le[le.length-1],te=Z.match(/([,-/])/);if(te!==null)throw new Error(`Constraint error, invalid dayOfWeek \`#\` and \`${te==null?void 0:te[0]}\` special characters are incompatible`);if(!(le.length<=2&&!isNaN(S)&&S>=1&&S<=5))throw new Error("Constraint error, invalid dayOfWeek occurrence number (#)");return{dayOfWeek:le[0],nthDayOfWeek:S}},Ip=function(Z,le){return Z.chars.some(S=>le.toString().includes(S))},at(E,x),E);return Ua.CronExpressionParser=y,Ua}var gn={};const o2={},u2=Object.freeze(Object.defineProperty({__proto__:null,default:o2},Symbol.toStringTag,{value:"Module"})),vx=Ty(u2);var yx;function d2(){var f,b,Jf,Qp;if(yx)return gn;yx=1;var n=gn&&gn.__createBinding||(Object.create?(function(x,E,M,D){D===void 0&&(D=M);var A=Object.getOwnPropertyDescriptor(E,M);(!A||("get"in A?!E.__esModule:A.writable||A.configurable))&&(A={enumerable:!0,get:function(){return E[M]}}),Object.defineProperty(x,D,A)}):(function(x,E,M,D){D===void 0&&(D=M),x[D]=E[M]})),r=gn&&gn.__setModuleDefault||(Object.create?(function(x,E){Object.defineProperty(x,"default",{enumerable:!0,value:E})}):function(x,E){x.default=E}),o=gn&&gn.__importStar||(function(){var x=function(E){return x=Object.getOwnPropertyNames||function(M){var D=[];for(var A in M)Object.prototype.hasOwnProperty.call(M,A)&&(D[D.length]=A);return D},x(E)};return function(E){if(E&&E.__esModule)return E;var M={};if(E!=null)for(var D=x(E),A=0;A<D.length;A++)D[A]!=="default"&&n(M,E,D[A]);return r(M,E),M}})();Object.defineProperty(gn,"__esModule",{value:!0}),gn.CronFileParser=void 0;const u=Xf();let h=(b=class{static async parseFile(E){var A;const{readFile:M}=await Promise.resolve().then(()=>o(vx)),D=await M(E,"utf8");return Te(A=b,f,Jf).call(A,D)}static parseFileSync(E){var A;const{readFileSync:M}=vx,D=M(E,"utf8");return Te(A=b,f,Jf).call(A,D)}},f=new WeakSet,Jf=function(E){var A;const M=E.split(`
|
|
446
|
+
`),D={variables:{},expressions:[],errors:{}};for(const N of M){const O=N.trim();if(O.length===0||O.startsWith("#"))continue;const R=O.match(/^(.*)=(.*)$/);if(R){const[,W,L]=R;D.variables[W]=L.replace(/["']/g,"");continue}try{const W=Te(A=b,f,Qp).call(A,O);D.expressions.push(W.interval)}catch(W){D.errors[O]=W}}return D},Qp=function(E){const M=E.split(" ");return{interval:u.CronExpressionParser.parse(M.slice(0,5).join(" ")),command:M.slice(5,M.length)}},at(b,f),b);return gn.CronFileParser=h,gn}var bx;function f2(){return bx||(bx=1,(function(n){var r=Us&&Us.__createBinding||(Object.create?(function(x,E,M,D){D===void 0&&(D=M);var A=Object.getOwnPropertyDescriptor(E,M);(!A||("get"in A?!E.__esModule:A.writable||A.configurable))&&(A={enumerable:!0,get:function(){return E[M]}}),Object.defineProperty(x,D,A)}):(function(x,E,M,D){D===void 0&&(D=M),x[D]=E[M]})),o=Us&&Us.__exportStar||function(x,E){for(var M in x)M!=="default"&&!Object.prototype.hasOwnProperty.call(E,M)&&r(E,x,M)};Object.defineProperty(n,"__esModule",{value:!0}),n.CronFileParser=n.CronExpressionParser=n.CronExpression=n.CronFieldCollection=n.CronDate=void 0;const u=Xf();var h=Nh();Object.defineProperty(n,"CronDate",{enumerable:!0,get:function(){return h.CronDate}});var f=kp();Object.defineProperty(n,"CronFieldCollection",{enumerable:!0,get:function(){return f.CronFieldCollection}});var b=qp();Object.defineProperty(n,"CronExpression",{enumerable:!0,get:function(){return b.CronExpression}});var j=Xf();Object.defineProperty(n,"CronExpressionParser",{enumerable:!0,get:function(){return j.CronExpressionParser}});var y=d2();Object.defineProperty(n,"CronFileParser",{enumerable:!0,get:function(){return y.CronFileParser}}),o(wh(),n),n.default=u.CronExpressionParser})(Us)),Us}var h2=f2();const Xp=6048e5,m2=864e5,g2=6e4,x2=36e5,jx=Symbol.for("constructDateFrom");function Va(n,r){return typeof n=="function"?n(r):n&&typeof n=="object"&&jx in n?n[jx](r):n instanceof Date?new n.constructor(r):new Date(r)}function At(n,r){return Va(r||n,n)}function p2(n,r,o){return Va(n,+At(n)+r)}function eu(n,r,o){return p2(n,r*x2)}let v2={};function ju(){return v2}function vc(n,r){var j,y,x,E;const o=ju(),u=(r==null?void 0:r.weekStartsOn)??((y=(j=r==null?void 0:r.locale)==null?void 0:j.options)==null?void 0:y.weekStartsOn)??o.weekStartsOn??((E=(x=o.locale)==null?void 0:x.options)==null?void 0:E.weekStartsOn)??0,h=At(n,r==null?void 0:r.in),f=h.getDay(),b=(f<u?7:0)+f-u;return h.setDate(h.getDate()-b),h.setHours(0,0,0,0),h}function fu(n,r){return vc(n,{...r,weekStartsOn:1})}function Jp(n,r){const o=At(n,r==null?void 0:r.in),u=o.getFullYear(),h=Va(o,0);h.setFullYear(u+1,0,4),h.setHours(0,0,0,0);const f=fu(h),b=Va(o,0);b.setFullYear(u,0,4),b.setHours(0,0,0,0);const j=fu(b);return o.getTime()>=f.getTime()?u+1:o.getTime()>=j.getTime()?u:u-1}function Nx(n){const r=At(n),o=new Date(Date.UTC(r.getFullYear(),r.getMonth(),r.getDate(),r.getHours(),r.getMinutes(),r.getSeconds(),r.getMilliseconds()));return o.setUTCFullYear(r.getFullYear()),+n-+o}function y2(n,...r){const o=Va.bind(null,r.find(u=>typeof u=="object"));return r.map(o)}function wx(n,r){const o=At(n,r==null?void 0:r.in);return o.setHours(0,0,0,0),o}function b2(n,r,o){const[u,h]=y2(o==null?void 0:o.in,n,r),f=wx(u),b=wx(h),j=+f-Nx(f),y=+b-Nx(b);return Math.round((j-y)/m2)}function j2(n,r){const o=Jp(n,r),u=Va(n,0);return u.setFullYear(o,0,4),u.setHours(0,0,0,0),fu(u)}function N2(n,r){let o,u=r==null?void 0:r.in;return n.forEach(h=>{!u&&typeof h=="object"&&(u=Va.bind(null,h));const f=At(h,u);(!o||o<f||isNaN(+f))&&(o=f)}),Va(u,o||NaN)}function w2(n,r){let o,u=r==null?void 0:r.in;return n.forEach(h=>{!u&&typeof h=="object"&&(u=Va.bind(null,h));const f=At(h,u);(!o||o>f||isNaN(+f))&&(o=f)}),Va(u,o||NaN)}function S2(n){return n instanceof Date||typeof n=="object"&&Object.prototype.toString.call(n)==="[object Date]"}function E2(n){return!(!S2(n)&&typeof n!="number"||isNaN(+At(n)))}function C2(n){return r=>{const u=(n?Math[n]:Math.trunc)(r);return u===0?0:u}}function T2(n,r){return+At(n)-+At(r)}function Sx(n,r,o){const u=T2(n,r)/g2;return C2(o==null?void 0:o.roundingMethod)(u)}function M2(n,r){const o=At(n,r==null?void 0:r.in);return o.setFullYear(o.getFullYear(),0,1),o.setHours(0,0,0,0),o}const O2={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},R2=(n,r,o)=>{let u;const h=O2[n];return typeof h=="string"?u=h:r===1?u=h.one:u=h.other.replace("{{count}}",r.toString()),o!=null&&o.addSuffix?o.comparison&&o.comparison>0?"in "+u:u+" ago":u};function Vf(n){return(r={})=>{const o=r.width?String(r.width):n.defaultWidth;return n.formats[o]||n.formats[n.defaultWidth]}}const D2={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},k2={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},A2={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},_2={date:Vf({formats:D2,defaultWidth:"full"}),time:Vf({formats:k2,defaultWidth:"full"}),dateTime:Vf({formats:A2,defaultWidth:"full"})},z2={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},L2=(n,r,o,u)=>z2[n];function uc(n){return(r,o)=>{const u=o!=null&&o.context?String(o.context):"standalone";let h;if(u==="formatting"&&n.formattingValues){const b=n.defaultFormattingWidth||n.defaultWidth,j=o!=null&&o.width?String(o.width):b;h=n.formattingValues[j]||n.formattingValues[b]}else{const b=n.defaultWidth,j=o!=null&&o.width?String(o.width):n.defaultWidth;h=n.values[j]||n.values[b]}const f=n.argumentCallback?n.argumentCallback(r):r;return h[f]}}const U2={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},H2={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},q2={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},V2={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},B2={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},$2={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},P2=(n,r)=>{const o=Number(n),u=o%100;if(u>20||u<10)switch(u%10){case 1:return o+"st";case 2:return o+"nd";case 3:return o+"rd"}return o+"th"},Y2={ordinalNumber:P2,era:uc({values:U2,defaultWidth:"wide"}),quarter:uc({values:H2,defaultWidth:"wide",argumentCallback:n=>n-1}),month:uc({values:q2,defaultWidth:"wide"}),day:uc({values:V2,defaultWidth:"wide"}),dayPeriod:uc({values:B2,defaultWidth:"wide",formattingValues:$2,defaultFormattingWidth:"wide"})};function dc(n){return(r,o={})=>{const u=o.width,h=u&&n.matchPatterns[u]||n.matchPatterns[n.defaultMatchWidth],f=r.match(h);if(!f)return null;const b=f[0],j=u&&n.parsePatterns[u]||n.parsePatterns[n.defaultParseWidth],y=Array.isArray(j)?G2(j,M=>M.test(b)):F2(j,M=>M.test(b));let x;x=n.valueCallback?n.valueCallback(y):y,x=o.valueCallback?o.valueCallback(x):x;const E=r.slice(b.length);return{value:x,rest:E}}}function F2(n,r){for(const o in n)if(Object.prototype.hasOwnProperty.call(n,o)&&r(n[o]))return o}function G2(n,r){for(let o=0;o<n.length;o++)if(r(n[o]))return o}function Z2(n){return(r,o={})=>{const u=r.match(n.matchPattern);if(!u)return null;const h=u[0],f=r.match(n.parsePattern);if(!f)return null;let b=n.valueCallback?n.valueCallback(f[0]):f[0];b=o.valueCallback?o.valueCallback(b):b;const j=r.slice(h.length);return{value:b,rest:j}}}const W2=/^(\d+)(th|st|nd|rd)?/i,I2=/\d+/i,Q2={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},X2={any:[/^b/i,/^(a|c)/i]},J2={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},K2={any:[/1/i,/2/i,/3/i,/4/i]},ew={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},tw={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},aw={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},nw={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},lw={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},sw={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},rw={ordinalNumber:Z2({matchPattern:W2,parsePattern:I2,valueCallback:n=>parseInt(n,10)}),era:dc({matchPatterns:Q2,defaultMatchWidth:"wide",parsePatterns:X2,defaultParseWidth:"any"}),quarter:dc({matchPatterns:J2,defaultMatchWidth:"wide",parsePatterns:K2,defaultParseWidth:"any",valueCallback:n=>n+1}),month:dc({matchPatterns:ew,defaultMatchWidth:"wide",parsePatterns:tw,defaultParseWidth:"any"}),day:dc({matchPatterns:aw,defaultMatchWidth:"wide",parsePatterns:nw,defaultParseWidth:"any"}),dayPeriod:dc({matchPatterns:lw,defaultMatchWidth:"any",parsePatterns:sw,defaultParseWidth:"any"})},iw={code:"en-US",formatDistance:R2,formatLong:_2,formatRelative:L2,localize:Y2,match:rw,options:{weekStartsOn:0,firstWeekContainsDate:1}};function cw(n,r){const o=At(n,r==null?void 0:r.in);return b2(o,M2(o))+1}function ow(n,r){const o=At(n,r==null?void 0:r.in),u=+fu(o)-+j2(o);return Math.round(u/Xp)+1}function Kp(n,r){var E,M,D,A;const o=At(n,r==null?void 0:r.in),u=o.getFullYear(),h=ju(),f=(r==null?void 0:r.firstWeekContainsDate)??((M=(E=r==null?void 0:r.locale)==null?void 0:E.options)==null?void 0:M.firstWeekContainsDate)??h.firstWeekContainsDate??((A=(D=h.locale)==null?void 0:D.options)==null?void 0:A.firstWeekContainsDate)??1,b=Va((r==null?void 0:r.in)||n,0);b.setFullYear(u+1,0,f),b.setHours(0,0,0,0);const j=vc(b,r),y=Va((r==null?void 0:r.in)||n,0);y.setFullYear(u,0,f),y.setHours(0,0,0,0);const x=vc(y,r);return+o>=+j?u+1:+o>=+x?u:u-1}function uw(n,r){var j,y,x,E;const o=ju(),u=(r==null?void 0:r.firstWeekContainsDate)??((y=(j=r==null?void 0:r.locale)==null?void 0:j.options)==null?void 0:y.firstWeekContainsDate)??o.firstWeekContainsDate??((E=(x=o.locale)==null?void 0:x.options)==null?void 0:E.firstWeekContainsDate)??1,h=Kp(n,r),f=Va((r==null?void 0:r.in)||n,0);return f.setFullYear(h,0,u),f.setHours(0,0,0,0),vc(f,r)}function dw(n,r){const o=At(n,r==null?void 0:r.in),u=+vc(o,r)-+uw(o,r);return Math.round(u/Xp)+1}function ct(n,r){const o=n<0?"-":"",u=Math.abs(n).toString().padStart(r,"0");return o+u}const Wl={y(n,r){const o=n.getFullYear(),u=o>0?o:1-o;return ct(r==="yy"?u%100:u,r.length)},M(n,r){const o=n.getMonth();return r==="M"?String(o+1):ct(o+1,2)},d(n,r){return ct(n.getDate(),r.length)},a(n,r){const o=n.getHours()/12>=1?"pm":"am";switch(r){case"a":case"aa":return o.toUpperCase();case"aaa":return o;case"aaaaa":return o[0];case"aaaa":default:return o==="am"?"a.m.":"p.m."}},h(n,r){return ct(n.getHours()%12||12,r.length)},H(n,r){return ct(n.getHours(),r.length)},m(n,r){return ct(n.getMinutes(),r.length)},s(n,r){return ct(n.getSeconds(),r.length)},S(n,r){const o=r.length,u=n.getMilliseconds(),h=Math.trunc(u*Math.pow(10,o-3));return ct(h,r.length)}},$r={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Ex={G:function(n,r,o){const u=n.getFullYear()>0?1:0;switch(r){case"G":case"GG":case"GGG":return o.era(u,{width:"abbreviated"});case"GGGGG":return o.era(u,{width:"narrow"});case"GGGG":default:return o.era(u,{width:"wide"})}},y:function(n,r,o){if(r==="yo"){const u=n.getFullYear(),h=u>0?u:1-u;return o.ordinalNumber(h,{unit:"year"})}return Wl.y(n,r)},Y:function(n,r,o,u){const h=Kp(n,u),f=h>0?h:1-h;if(r==="YY"){const b=f%100;return ct(b,2)}return r==="Yo"?o.ordinalNumber(f,{unit:"year"}):ct(f,r.length)},R:function(n,r){const o=Jp(n);return ct(o,r.length)},u:function(n,r){const o=n.getFullYear();return ct(o,r.length)},Q:function(n,r,o){const u=Math.ceil((n.getMonth()+1)/3);switch(r){case"Q":return String(u);case"QQ":return ct(u,2);case"Qo":return o.ordinalNumber(u,{unit:"quarter"});case"QQQ":return o.quarter(u,{width:"abbreviated",context:"formatting"});case"QQQQQ":return o.quarter(u,{width:"narrow",context:"formatting"});case"QQQQ":default:return o.quarter(u,{width:"wide",context:"formatting"})}},q:function(n,r,o){const u=Math.ceil((n.getMonth()+1)/3);switch(r){case"q":return String(u);case"qq":return ct(u,2);case"qo":return o.ordinalNumber(u,{unit:"quarter"});case"qqq":return o.quarter(u,{width:"abbreviated",context:"standalone"});case"qqqqq":return o.quarter(u,{width:"narrow",context:"standalone"});case"qqqq":default:return o.quarter(u,{width:"wide",context:"standalone"})}},M:function(n,r,o){const u=n.getMonth();switch(r){case"M":case"MM":return Wl.M(n,r);case"Mo":return o.ordinalNumber(u+1,{unit:"month"});case"MMM":return o.month(u,{width:"abbreviated",context:"formatting"});case"MMMMM":return o.month(u,{width:"narrow",context:"formatting"});case"MMMM":default:return o.month(u,{width:"wide",context:"formatting"})}},L:function(n,r,o){const u=n.getMonth();switch(r){case"L":return String(u+1);case"LL":return ct(u+1,2);case"Lo":return o.ordinalNumber(u+1,{unit:"month"});case"LLL":return o.month(u,{width:"abbreviated",context:"standalone"});case"LLLLL":return o.month(u,{width:"narrow",context:"standalone"});case"LLLL":default:return o.month(u,{width:"wide",context:"standalone"})}},w:function(n,r,o,u){const h=dw(n,u);return r==="wo"?o.ordinalNumber(h,{unit:"week"}):ct(h,r.length)},I:function(n,r,o){const u=ow(n);return r==="Io"?o.ordinalNumber(u,{unit:"week"}):ct(u,r.length)},d:function(n,r,o){return r==="do"?o.ordinalNumber(n.getDate(),{unit:"date"}):Wl.d(n,r)},D:function(n,r,o){const u=cw(n);return r==="Do"?o.ordinalNumber(u,{unit:"dayOfYear"}):ct(u,r.length)},E:function(n,r,o){const u=n.getDay();switch(r){case"E":case"EE":case"EEE":return o.day(u,{width:"abbreviated",context:"formatting"});case"EEEEE":return o.day(u,{width:"narrow",context:"formatting"});case"EEEEEE":return o.day(u,{width:"short",context:"formatting"});case"EEEE":default:return o.day(u,{width:"wide",context:"formatting"})}},e:function(n,r,o,u){const h=n.getDay(),f=(h-u.weekStartsOn+8)%7||7;switch(r){case"e":return String(f);case"ee":return ct(f,2);case"eo":return o.ordinalNumber(f,{unit:"day"});case"eee":return o.day(h,{width:"abbreviated",context:"formatting"});case"eeeee":return o.day(h,{width:"narrow",context:"formatting"});case"eeeeee":return o.day(h,{width:"short",context:"formatting"});case"eeee":default:return o.day(h,{width:"wide",context:"formatting"})}},c:function(n,r,o,u){const h=n.getDay(),f=(h-u.weekStartsOn+8)%7||7;switch(r){case"c":return String(f);case"cc":return ct(f,r.length);case"co":return o.ordinalNumber(f,{unit:"day"});case"ccc":return o.day(h,{width:"abbreviated",context:"standalone"});case"ccccc":return o.day(h,{width:"narrow",context:"standalone"});case"cccccc":return o.day(h,{width:"short",context:"standalone"});case"cccc":default:return o.day(h,{width:"wide",context:"standalone"})}},i:function(n,r,o){const u=n.getDay(),h=u===0?7:u;switch(r){case"i":return String(h);case"ii":return ct(h,r.length);case"io":return o.ordinalNumber(h,{unit:"day"});case"iii":return o.day(u,{width:"abbreviated",context:"formatting"});case"iiiii":return o.day(u,{width:"narrow",context:"formatting"});case"iiiiii":return o.day(u,{width:"short",context:"formatting"});case"iiii":default:return o.day(u,{width:"wide",context:"formatting"})}},a:function(n,r,o){const h=n.getHours()/12>=1?"pm":"am";switch(r){case"a":case"aa":return o.dayPeriod(h,{width:"abbreviated",context:"formatting"});case"aaa":return o.dayPeriod(h,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return o.dayPeriod(h,{width:"narrow",context:"formatting"});case"aaaa":default:return o.dayPeriod(h,{width:"wide",context:"formatting"})}},b:function(n,r,o){const u=n.getHours();let h;switch(u===12?h=$r.noon:u===0?h=$r.midnight:h=u/12>=1?"pm":"am",r){case"b":case"bb":return o.dayPeriod(h,{width:"abbreviated",context:"formatting"});case"bbb":return o.dayPeriod(h,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return o.dayPeriod(h,{width:"narrow",context:"formatting"});case"bbbb":default:return o.dayPeriod(h,{width:"wide",context:"formatting"})}},B:function(n,r,o){const u=n.getHours();let h;switch(u>=17?h=$r.evening:u>=12?h=$r.afternoon:u>=4?h=$r.morning:h=$r.night,r){case"B":case"BB":case"BBB":return o.dayPeriod(h,{width:"abbreviated",context:"formatting"});case"BBBBB":return o.dayPeriod(h,{width:"narrow",context:"formatting"});case"BBBB":default:return o.dayPeriod(h,{width:"wide",context:"formatting"})}},h:function(n,r,o){if(r==="ho"){let u=n.getHours()%12;return u===0&&(u=12),o.ordinalNumber(u,{unit:"hour"})}return Wl.h(n,r)},H:function(n,r,o){return r==="Ho"?o.ordinalNumber(n.getHours(),{unit:"hour"}):Wl.H(n,r)},K:function(n,r,o){const u=n.getHours()%12;return r==="Ko"?o.ordinalNumber(u,{unit:"hour"}):ct(u,r.length)},k:function(n,r,o){let u=n.getHours();return u===0&&(u=24),r==="ko"?o.ordinalNumber(u,{unit:"hour"}):ct(u,r.length)},m:function(n,r,o){return r==="mo"?o.ordinalNumber(n.getMinutes(),{unit:"minute"}):Wl.m(n,r)},s:function(n,r,o){return r==="so"?o.ordinalNumber(n.getSeconds(),{unit:"second"}):Wl.s(n,r)},S:function(n,r){return Wl.S(n,r)},X:function(n,r,o){const u=n.getTimezoneOffset();if(u===0)return"Z";switch(r){case"X":return Tx(u);case"XXXX":case"XX":return $s(u);case"XXXXX":case"XXX":default:return $s(u,":")}},x:function(n,r,o){const u=n.getTimezoneOffset();switch(r){case"x":return Tx(u);case"xxxx":case"xx":return $s(u);case"xxxxx":case"xxx":default:return $s(u,":")}},O:function(n,r,o){const u=n.getTimezoneOffset();switch(r){case"O":case"OO":case"OOO":return"GMT"+Cx(u,":");case"OOOO":default:return"GMT"+$s(u,":")}},z:function(n,r,o){const u=n.getTimezoneOffset();switch(r){case"z":case"zz":case"zzz":return"GMT"+Cx(u,":");case"zzzz":default:return"GMT"+$s(u,":")}},t:function(n,r,o){const u=Math.trunc(+n/1e3);return ct(u,r.length)},T:function(n,r,o){return ct(+n,r.length)}};function Cx(n,r=""){const o=n>0?"-":"+",u=Math.abs(n),h=Math.trunc(u/60),f=u%60;return f===0?o+String(h):o+String(h)+r+ct(f,2)}function Tx(n,r){return n%60===0?(n>0?"-":"+")+ct(Math.abs(n)/60,2):$s(n,r)}function $s(n,r=""){const o=n>0?"-":"+",u=Math.abs(n),h=ct(Math.trunc(u/60),2),f=ct(u%60,2);return o+h+r+f}const Mx=(n,r)=>{switch(n){case"P":return r.date({width:"short"});case"PP":return r.date({width:"medium"});case"PPP":return r.date({width:"long"});case"PPPP":default:return r.date({width:"full"})}},ev=(n,r)=>{switch(n){case"p":return r.time({width:"short"});case"pp":return r.time({width:"medium"});case"ppp":return r.time({width:"long"});case"pppp":default:return r.time({width:"full"})}},fw=(n,r)=>{const o=n.match(/(P+)(p+)?/)||[],u=o[1],h=o[2];if(!h)return Mx(n,r);let f;switch(u){case"P":f=r.dateTime({width:"short"});break;case"PP":f=r.dateTime({width:"medium"});break;case"PPP":f=r.dateTime({width:"long"});break;case"PPPP":default:f=r.dateTime({width:"full"});break}return f.replace("{{date}}",Mx(u,r)).replace("{{time}}",ev(h,r))},hw={p:ev,P:fw},mw=/^D+$/,gw=/^Y+$/,xw=["D","DD","YY","YYYY"];function pw(n){return mw.test(n)}function vw(n){return gw.test(n)}function yw(n,r,o){const u=bw(n,r,o);if(console.warn(u),xw.includes(n))throw new RangeError(u)}function bw(n,r,o){const u=n[0]==="Y"?"years":"days of the month";return`Use \`${n.toLowerCase()}\` instead of \`${n}\` (in \`${r}\`) for formatting ${u} to the input \`${o}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const jw=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Nw=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,ww=/^'([^]*?)'?$/,Sw=/''/g,Ew=/[a-zA-Z]/;function qs(n,r,o){var E,M,D,A;const u=ju(),h=u.locale??iw,f=u.firstWeekContainsDate??((M=(E=u.locale)==null?void 0:E.options)==null?void 0:M.firstWeekContainsDate)??1,b=u.weekStartsOn??((A=(D=u.locale)==null?void 0:D.options)==null?void 0:A.weekStartsOn)??0,j=At(n,o==null?void 0:o.in);if(!E2(j))throw new RangeError("Invalid time value");let y=r.match(Nw).map(N=>{const O=N[0];if(O==="p"||O==="P"){const R=hw[O];return R(N,h.formatLong)}return N}).join("").match(jw).map(N=>{if(N==="''")return{isToken:!1,value:"'"};const O=N[0];if(O==="'")return{isToken:!1,value:Cw(N)};if(Ex[O])return{isToken:!0,value:N};if(O.match(Ew))throw new RangeError("Format string contains an unescaped latin alphabet character `"+O+"`");return{isToken:!1,value:N}});h.localize.preprocessor&&(y=h.localize.preprocessor(j,y));const x={firstWeekContainsDate:f,weekStartsOn:b,locale:h};return y.map(N=>{if(!N.isToken)return N.value;const O=N.value;(vw(O)||pw(O))&&yw(O,r,String(n));const R=Ex[O[0]];return R(j,O,h.localize,x)}).join("")}function Cw(n){const r=n.match(ww);return r?r[1].replace(Sw,"'"):n}function Tw(n,r){return+At(n)>+At(r)}function Mw(n,r){return+At(n)<+At(r)}function Ow(n,r){const o=At(n,r==null?void 0:r.in);return o.setMinutes(0,0,0),o}const Bf=xp,tu=[{bg:"bg-indigo-400",border:"border-indigo-400/60"},{bg:"bg-cyan-400",border:"border-cyan-400/60"},{bg:"bg-rose-400",border:"border-rose-400/60"},{bg:"bg-violet-400",border:"border-violet-400/60"},{bg:"bg-amber-400",border:"border-amber-400/60"}],sl=160,au=14,Rw=10,Dw=7,Ox=4,kw=({configs:n,currentProjectId:r,onEditJob:o,queueStatus:u,queueAnalytics:h})=>{const f=z.useMemo(()=>Ow(new Date),[]),b=z.useMemo(()=>eu(f,24),[f]),j=z.useMemo(()=>eu(f,-24),[f]),y=b,x=z.useMemo(()=>{const w=[];for(let H=0;H<=24;H++)w.push(eu(f,H));return w},[f]),E=z.useMemo(()=>{const w=[];return n.forEach(({projectId:H,config:q})=>{var le,S,te,ae,ie,ge;const G={executor:q.executorEnabled!==!1?q.cronSchedule:null,reviewer:q.reviewerEnabled?q.reviewerSchedule:null,qa:q.qa.enabled?q.qa.schedule:null,audit:q.audit.enabled?q.audit.schedule:null,slicer:q.roadmapScanner.enabled?q.roadmapScanner.slicerSchedule:null,analytics:(le=q.analytics)!=null&&le.enabled?(S=q.analytics)==null?void 0:S.schedule:null,"pr-resolver":(te=q.prResolver)!=null&&te.enabled?q.prResolver.schedule:null,merger:(ae=q.merger)!=null&&ae.enabled?(ie=q.merger)==null?void 0:ie.schedule:null,manager:(ge=q.manager)!=null&&ge.enabled?q.manager.schedule:null},Z=q.cronScheduleOffset||0;Object.entries(G).forEach(([pe,P])=>{if(P)try{const K=h2.CronExpressionParser.parse(P,{currentDate:f,endDate:b});for(;K.hasNext();){const he=K.next(),fe=new Date(he.getTime());fe.setMinutes(fe.getMinutes()+Z),Tw(fe,f)&&Mw(fe,b)&&w.push({projectId:H,jobType:pe,time:fe})}}catch(K){console.error(`Failed to parse cron "${P}" for ${H}/${pe}`,K)}})}),w},[n,f,b]),M=z.useMemo(()=>{const w=new Set;return n.length===0||(n.every(H=>H.config.executorEnabled===!1)&&w.add("executor"),n.every(H=>!H.config.reviewerEnabled)&&w.add("reviewer"),n.every(H=>!H.config.qa.enabled)&&w.add("qa"),n.every(H=>!H.config.audit.enabled)&&w.add("audit"),n.every(H=>!H.config.roadmapScanner.enabled)&&w.add("slicer"),n.every(H=>{var q;return!((q=H.config.analytics)!=null&&q.enabled)})&&w.add("analytics"),n.every(H=>{var q;return!((q=H.config.prResolver)!=null&&q.enabled)})&&w.add("pr-resolver"),n.every(H=>{var q;return!((q=H.config.merger)!=null&&q.enabled)})&&w.add("merger"),n.every(H=>{var q;return!((q=H.config.manager)!=null&&q.enabled)})&&w.add("manager")),w},[n]),D=z.useMemo(()=>{const w=new Map;let H=0;return n.forEach(q=>{q.projectId===r||(w.set(q.projectId,H%tu.length),H++)}),w},[n,r]),A=w=>Sx(w,f),N=z.useMemo(()=>{const w=[];for(let H=0;H<=24;H++)w.push(eu(j,H));return w},[j]),O=w=>{const H=w2([N2([w,j]),y]);return Sx(H,j)},R=z.useMemo(()=>{const w=(h==null?void 0:h.recentRuns)??[],H=new Map;for(const q of w){const G=q.providerKey||"default",Z=new Date(q.startedAt*1e3),le=q.finishedAt?new Date(q.finishedAt*1e3):new Date;le<j||Z>y||(H.has(G)||H.set(G,[]),H.get(G).push({id:q.id,jobType:q.jobType,status:q.status,projectPath:q.projectPath,startedAt:Z,finishedAt:le,throttledCount:q.throttledCount}))}if(u!=null&&u.running){const q=u.running.providerKey??"default";H.has(q)||H.set(q,[]),H.get(q).push({id:u.running.id,jobType:u.running.jobType,status:"running",projectPath:u.running.projectPath,startedAt:new Date((u.running.dispatchedAt??u.running.enqueuedAt)*1e3),finishedAt:new Date,throttledCount:0})}return Array.from(H.entries()).sort(([q],[G])=>q.localeCompare(G)).map(([q,G])=>({providerKey:q,runs:G.sort((Z,le)=>Z.startedAt.getTime()-le.startedAt.getTime())}))},[y,j,h,u]),W=w=>w.split(/[-_]/).map(H=>H.charAt(0).toUpperCase()+H.slice(1)).join(" "),L=n.length>1,J=s.jsx("div",{className:"absolute inset-0 flex pointer-events-none",children:x.map((w,H)=>s.jsx("div",{className:"h-full border-l border-slate-800/20",style:{width:60}},H))});return s.jsxs("div",{className:"w-full overflow-hidden rounded-xl border border-slate-800 bg-slate-950/50 flex flex-col",children:[s.jsxs("div",{className:"p-4 border-b border-slate-800 flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("h4",{className:"text-sm font-medium text-slate-200",children:"Execution Timeline (Next 24h)"}),s.jsx("p",{className:"text-xs text-slate-500 mt-0.5",children:"Upcoming scheduled runs across projects. Aligned columns = overlap."})]}),L&&s.jsxs("div",{className:"flex flex-wrap gap-2 justify-end max-w-sm",children:[s.jsxs("div",{className:"flex items-center gap-1 mr-1",children:[s.jsx("div",{className:"w-2 h-2 rounded-full bg-slate-400 shrink-0"}),s.jsx("span",{className:"text-[10px] text-slate-400 font-semibold",children:"current"})]}),n.filter(w=>w.projectId!==r).slice(0,5).map(w=>{const H=D.get(w.projectId)??0,q=tu[H],G=(w.projectId.split("/").pop()??w.projectId).slice(0,14);return s.jsxs("div",{className:"flex items-center gap-1",children:[s.jsx("div",{className:`w-2 h-2 rounded-full ${q.bg} shrink-0`}),s.jsx("span",{className:"text-[10px] text-slate-500",title:w.projectId,children:G})]},w.projectId)})]})]}),s.jsx("div",{className:"overflow-x-auto custom-scrollbar",children:s.jsxs("div",{className:"relative min-w-[1600px]",style:{width:1440+sl},children:[s.jsxs("div",{className:"h-8 border-b border-slate-800 flex",children:[s.jsx("div",{style:{width:sl},className:"shrink-0 border-r border-slate-800"}),s.jsx("div",{className:"flex-1 relative",children:x.map((w,H)=>s.jsx("div",{className:"absolute top-0 bottom-0 border-l border-slate-800/50 flex flex-col justify-end pb-1 px-1",style:{left:H*60},children:s.jsx("span",{className:"text-[10px] font-mono text-slate-500",children:qs(w,"HH:mm")})},H))})]}),s.jsxs("div",{className:"relative",children:[n.length===0&&s.jsx("div",{className:"flex items-center justify-center p-8",children:s.jsx("p",{className:"text-sm text-slate-500 italic",children:"No project data available for timeline."})}),Bf.map(w=>{const H=M.has(w.id),q=E.filter(Z=>Z.jobType===w.id);if(!L)return s.jsxs("div",{className:`flex border-b border-slate-800/30 ${H?"opacity-40":""}`,children:[s.jsxs("div",{style:{width:sl},className:"shrink-0 p-3 border-r border-slate-800/50 flex items-center gap-2",children:[s.jsx("div",{className:`w-2 h-2 rounded-full ${w.color.bg} shrink-0`}),s.jsx("span",{className:"text-xs font-semibold text-slate-300",children:w.label})]}),s.jsxs("div",{className:"flex-1 relative h-10",children:[J,q.length===0?s.jsx("div",{className:"absolute inset-0 flex items-center justify-center pointer-events-none",children:s.jsx("span",{className:"text-[10px] text-slate-600 italic",children:H?"Disabled":"No runs in this window"})}):q.map((Z,le)=>s.jsx("button",{type:"button",onClick:()=>o==null?void 0:o(Z.projectId,Z.jobType),style:{left:A(Z.time)-3},className:`absolute top-1/2 -translate-y-1/2 h-4 w-6 rounded border ${w.color.bg} ${w.color.border} opacity-90 hover:opacity-100 hover:scale-110 transition-all cursor-pointer shadow-lg group`,title:`${w.label} at ${qs(Z.time,"HH:mm")}`,children:s.jsx("div",{className:"absolute -top-5 left-1/2 -translate-x-1/2 px-1.5 py-0.5 rounded bg-slate-800 text-white text-[9px] whitespace-nowrap opacity-0 group-hover:opacity-100 transition-opacity pointer-events-none border border-slate-700 z-10",children:qs(Z.time,"HH:mm")})},le))]})]},w.id);const G=n.length*au+Ox*2;return s.jsxs("div",{className:`flex border-b border-slate-800/30 ${H?"opacity-40":""}`,children:[s.jsxs("div",{style:{width:sl,height:G},className:"shrink-0 border-r border-slate-800/50 flex flex-col px-2 py-1",children:[s.jsxs("div",{className:"flex items-center gap-1 mb-0.5",children:[s.jsx("div",{className:`w-1.5 h-1.5 rounded-full ${w.color.bg} shrink-0`}),s.jsx("span",{className:"text-[10px] font-bold text-slate-400 uppercase tracking-wide",children:w.label})]}),n.map(Z=>{const le=Z.projectId===r,S=(Z.projectId.split("/").pop()??Z.projectId).slice(0,14),te=D.get(Z.projectId)??0,ae=le?w.color.bg:tu[te].bg;return s.jsxs("div",{style:{height:au},className:"flex items-center gap-1 overflow-hidden",children:[s.jsx("div",{className:`w-1 h-1 rounded-full shrink-0 ${ae}`}),s.jsx("span",{className:`text-[9px] truncate ${le?"text-slate-200 font-semibold":"text-slate-600"}`,title:Z.projectId,children:le?`${S} ★`:S})]},Z.projectId)})]}),s.jsxs("div",{className:"flex-1 relative",style:{height:G},children:[J,n.map((Z,le)=>{const S=Z.projectId===r,te=q.filter(K=>K.projectId===Z.projectId),ae=Ox+le*au,ie=S?Rw:Dw,ge=Math.floor((au-ie)/2),pe=D.get(Z.projectId)??0,P=S?{bg:w.color.bg,border:w.color.border}:tu[pe];return s.jsxs(ze.Fragment,{children:[le>0&&s.jsx("div",{className:"absolute left-0 right-0 border-t border-slate-800/20 pointer-events-none",style:{top:ae}}),te.map((K,he)=>s.jsx("button",{type:"button",onClick:()=>o==null?void 0:o(Z.projectId,K.jobType),style:{left:A(K.time)-3,top:ae+ge,height:ie},className:`absolute w-6 rounded border ${P.bg} ${P.border} ${S?"opacity-90":"opacity-50"} hover:opacity-100 hover:z-10 transition-all cursor-pointer group`,title:`${Z.projectId} · ${w.label} @ ${qs(K.time,"HH:mm")}`,children:s.jsx("div",{className:"absolute -top-5 left-1/2 -translate-x-1/2 px-1.5 py-0.5 rounded bg-slate-800 text-white text-[9px] whitespace-nowrap opacity-0 group-hover:opacity-100 transition-opacity pointer-events-none border border-slate-700 z-20",children:qs(K.time,"HH:mm")})},he))]},Z.projectId)}),q.length===0&&!H&&s.jsx("div",{className:"absolute inset-0 flex items-center justify-center pointer-events-none",children:s.jsx("span",{className:"text-[10px] text-slate-700 italic",children:"No runs in this window"})})]})]},w.id)})]}),s.jsx("div",{className:"absolute top-0 bottom-0 w-px bg-rose-500/50 z-10 pointer-events-none",style:{left:sl+A(new Date)},children:s.jsx("div",{className:"absolute top-0 h-2 w-2 rounded-full bg-rose-500 -translate-x-1/2"})})]})}),s.jsxs("div",{className:"p-3 bg-slate-900/40 flex items-center gap-4 text-[10px] text-slate-500",children:[s.jsxs("div",{className:"flex items-center gap-1.5",children:[s.jsx("div",{className:"w-1.5 h-3 rounded bg-blue-500/50 border border-blue-500"}),s.jsx("span",{children:"Each block = one scheduled run"})]}),s.jsxs("div",{className:"flex items-center gap-1.5",children:[s.jsx("div",{className:"w-[1px] h-4 bg-rose-500"}),s.jsx("span",{children:"Current Time"})]}),L&&s.jsx("div",{className:"flex items-center gap-1.5",children:s.jsx("span",{children:"★ = current project · blocks in same column = scheduling overlap"})})]}),R.length>0&&s.jsxs("div",{className:"border-t border-slate-800",children:[s.jsxs("div",{className:"p-4 border-b border-slate-800 flex items-center justify-between gap-4",children:[s.jsxs("div",{children:[s.jsx("h4",{className:"text-sm font-medium text-slate-200",children:"Recent Execution Runs"}),s.jsx("p",{className:"text-xs text-slate-500 mt-0.5",children:"Last 24h of real runs grouped by provider bucket."})]}),s.jsxs("div",{className:"text-[10px] uppercase tracking-[0.2em] text-slate-500",children:[(h==null?void 0:h.recentRuns.length)??0," recorded runs"]})]}),s.jsx("div",{className:"overflow-x-auto custom-scrollbar","data-testid":"provider-execution-timeline",children:s.jsxs("div",{className:"relative min-w-[1600px]",style:{width:1440+sl},children:[s.jsxs("div",{className:"h-8 border-b border-slate-800 flex",children:[s.jsx("div",{style:{width:sl},className:"shrink-0 border-r border-slate-800"}),s.jsx("div",{className:"flex-1 relative flex",children:N.map((w,H)=>s.jsx("div",{className:"absolute top-0 bottom-0 border-l border-slate-800/50 flex flex-col justify-end pb-1 px-1",style:{left:H*60},children:s.jsx("span",{className:"text-[10px] font-mono text-slate-500",children:qs(w,"HH:mm")})},H))})]}),s.jsx("div",{className:"relative",children:R.map(({providerKey:w,runs:H})=>s.jsxs("div",{className:"flex border-b border-slate-800/30 min-h-14","data-testid":`provider-execution-lane-${w}`,children:[s.jsxs("div",{style:{width:sl},className:"shrink-0 p-3 border-r border-slate-800/50 flex flex-col justify-center",children:[s.jsx("span",{className:"text-xs font-semibold text-slate-300 truncate",title:w,children:W(w)}),s.jsx("span",{className:"text-[10px] text-slate-500 font-mono truncate",children:w})]}),s.jsxs("div",{className:"flex-1 relative h-14",children:[s.jsx("div",{className:"absolute inset-0 flex pointer-events-none",children:N.map((q,G)=>s.jsx("div",{className:"h-full border-l border-slate-800/20",style:{width:60}},G))}),H.map(q=>{const G=Bf.find(pe=>pe.id===q.jobType)??Bf[0],Z=O(q.startedAt),le=O(q.finishedAt),S=Math.max(le-Z,8),te=q.status==="running",ae=q.status==="error"||q.status==="failed"||q.status==="errored",ie=te?"bg-green-500":ae?"bg-red-500":G.color.bg,ge=te?"border-green-400/60":ae?"border-red-400/60":G.color.border;return s.jsx("div",{className:`absolute top-1/2 -translate-y-1/2 h-8 rounded border ${ie} ${ge} opacity-85 shadow-lg ${te?"animate-pulse":""}`,style:{left:Z,width:S},title:`${w} • ${G.label} • ${qs(q.startedAt,"MMM d HH:mm")} • ${q.status}`,"data-testid":"provider-execution-run",children:s.jsxs("div",{className:"h-full px-2 flex items-center justify-between gap-2 text-[10px] text-white/90 overflow-hidden whitespace-nowrap",children:[s.jsx("span",{className:"font-semibold uppercase tracking-wide",children:G.label}),s.jsx("span",{className:"text-white/70",children:q.status}),q.throttledCount>0&&s.jsxs("span",{className:"text-yellow-100",children:["throttle ",q.throttledCount,"x"]})]})},`${w}-${q.id}-${q.startedAt.getTime()}`)})]})]},w))}),s.jsx("div",{className:"absolute top-0 bottom-0 w-px bg-rose-500/50 z-10 pointer-events-none",style:{left:sl+O(new Date)},children:s.jsx("div",{className:"absolute top-0 h-2 w-2 rounded-full bg-rose-500 -translate-x-1/2"})})]})})]})]})},hu=[{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"}],Sh=[{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 * * *",prResolver:"15 9,15,21 * * *",merger:"55 */4 * * *",manager:"15 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",prResolver:"9:15am, 3:15pm, 9:15pm",merger:"Every 4h at :55",manager:"Daily at 7:15am"}},{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 * * *",prResolver:"15 6,14,22 * * *",merger:"55 */4 * * *",manager:"15 7 * * *"},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",prResolver:"6:15am, 2:15pm & 10:15pm",merger:"Every 4h at :55",manager:"Daily at 7:15am"}},{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",prResolver:"15 8,12,16 * * 1-5",merger:"55 */4 * * 1-5",manager:"15 7 * * 1-5"},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",prResolver:"8:15am, 12:15pm & 4:15pm weekdays",merger:"Every 4h at :55 weekdays",manager:"Weekdays at 7:15am"}},{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",prResolver:"15 8 * * 1,4",merger:"55 */8 * * *",manager:"15 7 * * 1"},hints:{executor:"2:05am & 2:05pm",reviewer:"8:25am & 8:25pm",qa:"Sun 3:45am",audit:"Sun 4:50am",slicer:"Mon 1:35am",prResolver:"Mon & Thu at 8:15am",merger:"Every 8h at :55",manager:"Mon 7:15am"}}];function Fr(n){return n?n.trim().replace(/\s+/g," "):""}function Il(n,r){return Fr(n)===Fr(r)}function Kf(n){if(n)return Sh.find(r=>r.id===n)}function tv(n,r,o,u,h,f,b,j,y){return Il(n.schedules.executor,r)&&Il(n.schedules.reviewer,o)&&Il(n.schedules.qa,u)&&Il(n.schedules.audit,h)&&Il(n.schedules.slicer,f)&&Il(n.schedules.prResolver,b)&&Il(n.schedules.merger,j)&&Il(n.schedules.manager,y)}function Aw(n,r,o,u,h,f,b,j){return Sh.find(y=>tv(y,n,r,o,u,h,f,b,j))}function _w(n,r,o,u,h,f,b,j,y){const x=Kf(n);return x&&tv(x,r,o,u,h,f,b,j,y)?x:Aw(r,o,u,h,f,b,j,y)}function Xt(n){const r=Fr(n),o=r.split(/\s+/);if(o.length!==5)return r;const[u,h,f,b,j]=o,y=/^\d+$/.test(u),x=hu.find(E=>Fr(E.value)===r);if(x)return x.label;if(u==="*/30"&&h==="*")return"Every 30 minutes";if(u==="0"&&h==="*")return"Every hour";if(u.startsWith("*/"))return`Every ${parseInt(u.replace("*/",""),10)} minutes`;if(y&&h.startsWith("*/")&&f==="*"&&b==="*"&&j==="*"){const E=parseInt(h.replace("*/",""),10);return u==="0"?`Every ${E} hours`:`Every ${E} hours at :${u.padStart(2,"0")}`}if(u==="0"&&h.startsWith("*/"))return`Every ${parseInt(h.replace("*/",""),10)} hours`;if(u==="0"&&h.includes("-")){const[E,M]=h.split("-");return`Every hour from ${fc(E)} to ${fc(M)}`}if(y&&h.includes("-")&&f==="*"&&b==="*"&&j==="*"){const[E,M]=h.split("-");return`Every hour from ${hc(E,u)} to ${hc(M,u)}`}if(u==="0"&&h.includes(",")){const E=h.split(",").map(fc);return E.length<=3?`At ${E.join(" and ")}`:`At ${E.slice(0,-1).join(", ")}, and ${E[E.length-1]}`}if(y&&h.includes(",")&&f==="*"&&b==="*"&&(j==="*"||j==="1-5")){const E=h.split(",").map(D=>hc(D,u)),M=j==="1-5"?"Weekdays at ":"At ";return E.length<=3?`${M}${E.join(" and ")}`:`${M}${E.slice(0,-1).join(", ")}, and ${E[E.length-1]}`}return u==="0"&&h!=="*"&&f==="*"&&b==="*"&&j==="*"?`Daily at ${fc(h)}`:y&&h!=="*"&&f==="*"&&b==="*"&&j==="*"?`Daily at ${hc(h,u)}`:u==="0"&&h!=="*"&&f==="*"&&b==="*"&&j==="1-5"?`Weekdays at ${fc(h)}`:y&&h!=="*"&&f==="*"&&b==="*"&&j==="1-5"?`Weekdays at ${hc(h,u)}`:r}function fc(n){const r=parseInt(n,10);return r===0?"12 AM":r<12?`${r} AM`:r===12?"12 PM":`${r-12} PM`}function hc(n,r){const o=r.padStart(2,"0"),u=parseInt(n,10);return Number.isNaN(u)?`${n}:${o}`:u===0?`12:${o} AM`:u<12?`${u}:${o} AM`:u===12?`12:${o} PM`:`${u-12}:${o} PM`}function zw(n){const r=Fr(n),o=hu.find(u=>Fr(u.value)===r);return(o==null?void 0:o.value)??"__custom__"}function Rx(n){const r=new Date,o=n.getTime()-r.getTime(),u=Math.floor(o/6e4),h=Math.floor(u/60),f=Math.floor(h/24);return u<1?"less than a minute":u<60?`in ${u} minute${u>1?"s":""}`:h<24?`in ${h} hour${h>1?"s":""}`:`in ${f} day${f>1?"s":""}`}const Lw=({label:n,value:r,onChange:o,helperText:u,placeholder:h="5 */3 * * *"})=>{const f=zw(r),b=f==="__custom__",j=E=>{E!=="__custom__"&&o(E)},y=E=>{o(E.target.value)},x=hu.find(E=>E.value===f);return s.jsxs("div",{className:"space-y-3",children:[s.jsx(Xe,{label:n,value:f,onChange:j,options:hu.map(E=>({label:E.label,value:E.value})),helperText:b?void 0:(x==null?void 0:x.description)||u}),b&&s.jsxs("div",{className:"space-y-2 mt-2",children:[s.jsx(Ee,{label:"Cron Expression",value:r,onChange:y,placeholder:h}),s.jsxs("div",{className:"text-xs text-slate-500 bg-slate-900/40 p-3 rounded-md border border-slate-800/60",children:[s.jsx("strong",{className:"text-slate-400",children:"Format:"})," minute hour day month weekday",s.jsx("br",{}),s.jsx("strong",{className:"text-slate-400",children:"Examples:"})," ",s.jsx("code",{className:"bg-slate-950 px-1 py-0.5 rounded text-indigo-300",children:"0 * * * *"})," (hourly),"," ",s.jsx("code",{className:"bg-slate-950 px-1 py-0.5 rounded text-indigo-300",children:"0 0 * * *"})," (daily at midnight)"]})]})]})},rl=({id:n,icon:r,title:o,description:u,value:h,onChange:f})=>s.jsxs("div",{id:n,className:"rounded-xl border border-slate-700 bg-slate-800/50 p-4 space-y-4",children:[s.jsxs("div",{className:"flex items-start gap-3",children:[s.jsx("div",{className:"mt-0.5 p-1.5 rounded-md bg-slate-800 text-slate-400",children:s.jsx(r,{size:14})}),s.jsxs("div",{children:[s.jsx("div",{className:"text-sm font-medium text-slate-200",children:o}),s.jsx("div",{className:"text-xs text-slate-500 mt-0.5",children:u})]})]}),s.jsx(Lw,{label:"",value:h,onChange:f})]}),Uw=({form:n,scheduleMode:r,selectedTemplateId:o,onFieldChange:u,onSwitchToTemplate:h,onSwitchToCustom:f,onApplyTemplate:b})=>s.jsxs(et,{className:"p-6 space-y-6",children:[s.jsxs("div",{className:"flex items-start justify-between gap-4",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200 mb-1",children:"Job Schedules"}),s.jsx("p",{className:"text-sm text-slate-400",children:"Configure when automated jobs run using a preset template or custom cron expressions"}),s.jsx("p",{className:"text-xs text-slate-500 mt-2 mb-2",children:"This tab only controls cadence. Runtime and provider settings live in the Jobs tab."})]}),s.jsxs("div",{className:"flex rounded-lg border border-slate-700 overflow-hidden shrink-0",children:[s.jsx("button",{type:"button",className:`px-4 py-1.5 text-sm font-medium transition-colors ${r==="template"?"bg-indigo-600 text-white":"bg-slate-800 text-slate-400 hover:text-slate-200"}`,onClick:h,children:"Template"}),s.jsx("button",{type:"button",className:`px-4 py-1.5 text-sm font-medium transition-colors ${r==="custom"?"bg-indigo-600 text-white":"bg-slate-800 text-slate-400 hover:text-slate-200"}`,onClick:f,children:"Custom"})]})]}),r==="template"?s.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3",children:Sh.map(j=>{const y=o===j.id;return s.jsxs("button",{type:"button",onClick:()=>b(j),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:[s.jsx("div",{className:"font-medium text-slate-200 mb-1",children:j.label}),s.jsx("p",{className:"text-xs text-slate-400 mb-3",children:j.description}),s.jsx("div",{className:"space-y-0.5",children:[["Executor",j.hints.executor],["Reviewer",j.hints.reviewer],["QA",j.hints.qa],["Audit",j.hints.audit],["Planner",j.hints.slicer],["PR Resolver",j.hints.prResolver],["Merger",j.hints.merger],["Manager",j.hints.manager]].map(([x,E])=>s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{className:"text-xs text-slate-500 w-16 shrink-0",children:x}),s.jsx("span",{className:"text-xs text-slate-400",children:E})]},x))})]},j.id)})}):s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[s.jsx(rl,{id:"job-schedule-executor",icon:xn,title:"PRD Executor",description:"Executes PRDs to generate code and create PRs",value:n.cronSchedule,onChange:j=>u("cronSchedule",j)}),s.jsx(rl,{id:"job-schedule-reviewer",icon:hh,title:"PR Reviewer",description:"Reviews PRs and provides feedback or automated fixes",value:n.reviewerSchedule,onChange:j=>u("reviewerSchedule",j)}),s.jsx(rl,{id:"job-schedule-qa",icon:dp,title:"Quality Assurance",description:"Automated UI testing using Playwright",value:n.qa.schedule,onChange:j=>u("qa",{...n.qa,schedule:j})}),s.jsx(rl,{id:"job-schedule-audit",icon:Ir,title:"Code Audit",description:"Automated code quality and security audits",value:n.audit.schedule,onChange:j=>u("audit",{...n.audit,schedule:j})}),s.jsx(rl,{id:"job-schedule-slicer",icon:xh,title:"Planner",description:"Generate PRDs from ROADMAP.md or audit findings",value:n.roadmapScanner.slicerSchedule,onChange:j=>u("roadmapScanner",{...n.roadmapScanner,slicerSchedule:j})}),n.analytics&&s.jsx(rl,{id:"job-schedule-analytics",icon:vu,title:"Analytics",description:"Fetch Amplitude data, analyze with AI, and create issues",value:n.analytics.schedule,onChange:j=>u("analytics",{...n.analytics,schedule:j})}),n.prResolver&&s.jsx(rl,{id:"job-schedule-pr-resolver",icon:mh,title:"PR Resolver",description:"Rebases PRs and applies review feedback",value:n.prResolver.schedule,onChange:j=>u("prResolver",{...n.prResolver,schedule:j})}),n.merger&&s.jsx(rl,{id:"job-schedule-merger",icon:yu,title:"Merge Orchestrator",description:"Scans, rebases, and merges approved PRs",value:n.merger.schedule,onChange:j=>u("merger",{...n.merger,schedule:j})}),n.manager&&s.jsx(rl,{id:"job-schedule-manager",icon:fh,title:"Manager",description:"Monitors roadmap, PRDs, docs, and system health",value:n.manager.schedule,onChange:j=>u("manager",{...n.manager,schedule:j})})]})]}),gc=({label:n,value:r=[],onChange:o,placeholder:u,helpText:h})=>{const[f,b]=ze.useState(""),j=()=>{f.trim()&&!r.includes(f.trim())&&(o([...r,f.trim()]),b(""))},y=E=>{o(r.filter(M=>M!==E))},x=E=>{E.key==="Enter"&&(E.preventDefault(),j())};return s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-slate-400 mb-2",children:n}),s.jsx("div",{className:"flex flex-wrap gap-2 mb-2",children:r.map(E=>s.jsxs("span",{className:"inline-flex items-center gap-1 px-2 py-1 bg-slate-800 rounded text-sm text-slate-300",children:[E,s.jsx("button",{type:"button",onClick:()=>y(E),className:"text-slate-500 hover:text-red-400","aria-label":`Remove ${E}`,title:`Remove ${E}`,children:s.jsx(Qr,{className:"h-3 w-3"})})]},E))}),s.jsxs("div",{className:"flex gap-2",children:[s.jsx("input",{type:"text",value:f,onChange:E=>b(E.target.value),onKeyDown:x,placeholder:u,className:"flex-1 bg-slate-800 border border-slate-700 rounded px-3 py-2 text-sm text-slate-200 placeholder-slate-500"}),s.jsx(Le,{onClick:j,disabled:!f.trim(),"aria-label":`Add ${n.toLowerCase()} value`,children:s.jsx(Kl,{className:"h-4 w-4"})})]}),h&&s.jsx("p",{className:"text-xs text-slate-500 mt-1",children:h})]})},il=({title:n,icon:r,description:o,enabled:u,onToggle:h,expanded:f,onExpandChange:b,scheduleSummary:j,providerLabel:y,children:x,id:E})=>s.jsxs("div",{id:E,className:`border border-slate-800 rounded-xl overflow-hidden transition-all duration-200 ${f?"bg-slate-900/50 ring-1 ring-indigo-500/20":"bg-slate-900/20 hover:bg-slate-900/40"}`,children:[s.jsxs("div",{className:"flex items-center justify-between p-4 cursor-pointer select-none",onClick:()=>b(!f),children:[s.jsxs("div",{className:"flex items-center gap-3 overflow-hidden",children:[s.jsx("div",{className:`p-2 rounded-lg ${f?"bg-indigo-500/20 text-indigo-400":"bg-slate-800 text-slate-400"}`,children:s.jsx(r,{className:"h-5 w-5"})}),s.jsxs("div",{className:"overflow-hidden",children:[s.jsx("h3",{className:"text-sm font-medium text-slate-200 truncate",children:n}),!f&&s.jsx("p",{className:"text-xs text-slate-500 truncate",children:o})]})]}),s.jsxs("div",{className:"flex items-center gap-4 shrink-0",children:[!f&&s.jsxs("div",{className:"hidden sm:flex items-center gap-2",children:[j&&s.jsx(Tt,{variant:"neutral",className:"bg-slate-800/50 text-[10px]",children:j}),y&&s.jsx(Tt,{variant:"info",className:"bg-blue-500/5 text-[10px]",children:y})]}),s.jsx("div",{onClick:M=>M.stopPropagation(),children:s.jsx(Gt,{checked:u,onChange:h})}),s.jsx(dh,{className:`h-5 w-5 text-slate-500 transition-transform duration-300 ${f?"rotate-180 text-indigo-400":""}`})]})]}),s.jsx("div",{className:`grid transition-all duration-300 ease-in-out ${f?"grid-rows-[1fr] opacity-100":"grid-rows-[0fr] opacity-0"}`,children:s.jsx("div",{className:"overflow-hidden",children:s.jsx("div",{className:"p-6 pt-0 space-y-6 border-t border-slate-800/50 mt-2",children:s.jsx("div",{className:"pt-6",children:x})})})})]}),cl=({summary:n,onOpen:r})=>s.jsxs("div",{className:"flex flex-col gap-4 rounded-xl border border-slate-800 bg-slate-950/50 p-4 md:flex-row md:items-center md:justify-between",children:[s.jsxs("div",{children:[s.jsx("div",{className:"text-[11px] font-semibold uppercase tracking-[0.18em] text-slate-500",children:"Cadence"}),s.jsx("div",{className:"mt-1 text-sm font-medium text-slate-200",children:n}),s.jsx("p",{className:"mt-1 text-xs text-slate-500",children:"Managed centrally in Automation > Schedules."})]}),s.jsx(Le,{variant:"outline",size:"sm",onClick:r,className:"border-slate-700 text-slate-300 hover:bg-slate-800",children:"Open Schedules"})]}),Hw=({form:n,updateField:r,handleRoadmapToggle:o,presetOptions:u,expandedJob:h,onExpandedJobChange:f,onOpenSchedule:b})=>{var x,E,M,D,A,N,O,R,W,L,J;const j=(w,H)=>{const q={...n.jobProviders};H===""?delete q[w]:q[w]=H,r("jobProviders",q)},y=[{label:"Use Global (default)",value:""},...u];return s.jsxs("div",{className:"space-y-8",children:[s.jsxs("section",{className:"space-y-4",children:[s.jsxs("div",{className:"flex items-center justify-between pb-2 border-b border-slate-800/50",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200",children:"Prompt Augmentation"}),s.jsx("p",{className:"text-sm text-slate-400 mt-1",children:"Tune how repeated feedback patterns become prompt snippets."})]}),s.jsx("div",{className:"hidden rounded-lg bg-amber-500/10 p-2 text-amber-400 sm:block",children:s.jsx(Uj,{className:"h-5 w-5"})})]}),s.jsx("div",{className:"rounded-xl border border-slate-800 bg-slate-950/40 p-4",children:s.jsxs("div",{className:"grid grid-cols-1 gap-6 md:grid-cols-2",children:[s.jsxs("div",{className:"flex items-center justify-between rounded-md border border-slate-800 bg-slate-950/40 p-3",children:[s.jsxs("div",{children:[s.jsx("span",{className:"text-sm font-medium text-slate-200",children:"Enable prompt augmentation"}),s.jsx("p",{className:"mt-0.5 text-xs text-slate-500",children:"Adds capped feedback snippets to future job prompts."})]}),s.jsx(Gt,{checked:n.feedback.enabled,onChange:w=>r("feedback",{...n.feedback,enabled:w})})]}),s.jsx(Ee,{label:"Activation Threshold",type:"number",min:"0",max:"1",step:"0.05",value:String(n.feedback.confidenceThreshold),onChange:w=>r("feedback",{...n.feedback,confidenceThreshold:Math.max(0,Math.min(1,Number(w.target.value||0)))}),helperText:"Minimum confidence required before a snippet can activate."}),s.jsx(Ee,{label:"TTL",type:"number",min:"1",value:String(n.feedback.augmentationTtlDays),onChange:w=>r("feedback",{...n.feedback,augmentationTtlDays:Math.max(1,Number(w.target.value||1))}),rightIcon:s.jsx("span",{className:"text-xs",children:"days"}),helperText:"How long an augmentation remains active before expiry."}),s.jsx(Ee,{label:"Max Snippets Per Job",type:"number",min:"0",value:String(n.feedback.maxActiveAugmentations),onChange:w=>r("feedback",{...n.feedback,maxActiveAugmentations:Math.max(0,Number(w.target.value||0))}),helperText:"Maximum active augmentation snippets applied to each job prompt."}),s.jsx(Ee,{label:"Success Streak Expiry",type:"number",min:"0",value:String(n.feedback.successStreakToExpire),onChange:w=>r("feedback",{...n.feedback,successStreakToExpire:Math.max(0,Number(w.target.value||0))}),helperText:"Consecutive successes before active snippets expire."})]})})]}),s.jsxs("section",{className:"space-y-4",children:[s.jsxs("div",{className:"flex items-center justify-between pb-2 border-b border-slate-800/50",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200",children:"Job Configurations"}),s.jsx("p",{className:"text-sm text-slate-400 mt-1",children:"Enable jobs, choose providers, and tune runtime behavior. Cadence stays in Automation > Schedules."})]}),s.jsx("span",{className:"text-xs text-slate-500",children:"9 total jobs"})]}),s.jsx(il,{id:"job-section-executor",title:"PRD Executor",icon:xn,description:"Executes PRDs to generate code and create PRs",enabled:n.executorEnabled,onToggle:w=>r("executorEnabled",w),expanded:h==="executor",onExpandChange:w=>f(w?"executor":null),scheduleSummary:Xt(n.cronSchedule),providerLabel:n.jobProviders.executor?(x=u.find(w=>w.value===n.jobProviders.executor))==null?void 0:x.label:"Global",children:s.jsxs("div",{className:"space-y-6",children:[s.jsx(cl,{summary:Xt(n.cronSchedule),onOpen:()=>b("executor")}),s.jsxs("div",{className:"grid grid-cols-1 gap-6 md:grid-cols-2",children:[s.jsx(Xe,{label:"Provider",value:n.jobProviders.executor??"",onChange:w=>j("executor",w),options:y}),s.jsx(Ee,{label:"Max Runtime",type:"number",value:String(n.maxRuntime),onChange:w=>r("maxRuntime",Number(w.target.value||0)),rightIcon:s.jsx("span",{className:"text-xs",children:"sec"}),helperText:"Maximum runtime for executor tasks"})]})]})}),s.jsx(il,{id:"job-section-reviewer",title:"PR Reviewer",icon:hh,description:"Reviews PRs and provides feedback or automated fixes",enabled:n.reviewerEnabled,onToggle:w=>r("reviewerEnabled",w),expanded:h==="reviewer",onExpandChange:w=>f(w?"reviewer":null),scheduleSummary:Xt(n.reviewerSchedule),providerLabel:n.jobProviders.reviewer?(E=u.find(w=>w.value===n.jobProviders.reviewer))==null?void 0:E.label:"Global",children:s.jsxs("div",{className:"space-y-6",children:[s.jsx(cl,{summary:Xt(n.reviewerSchedule),onOpen:()=>b("reviewer")}),s.jsxs("div",{className:"grid grid-cols-1 gap-6 md:grid-cols-2",children:[s.jsx(Xe,{label:"Provider",value:n.jobProviders.reviewer??"",onChange:w=>j("reviewer",w),options:y}),s.jsx(Ee,{label:"Max Runtime",type:"number",value:String(n.reviewerMaxRuntime),onChange:w=>r("reviewerMaxRuntime",Number(w.target.value||0)),rightIcon:s.jsx("span",{className:"text-xs",children:"sec"})}),s.jsx(Ee,{label:"Min Review Score",type:"number",min:"0",max:"100",value:String(n.minReviewScore),onChange:w=>r("minReviewScore",Number(w.target.value||0)),helperText:"PRs below this score will be marked as 'Needs Work'"}),s.jsx(Ee,{label:"Max Retries",type:"number",value:String(n.reviewerMaxRetries),onChange:w=>r("reviewerMaxRetries",Number(w.target.value||0)),helperText:"Fix attempts after initial review"}),s.jsx(Ee,{label:"Retry Delay",type:"number",value:String(n.reviewerRetryDelay),onChange:w=>r("reviewerRetryDelay",Number(w.target.value||0)),rightIcon:s.jsx("span",{className:"text-xs",children:"sec"})}),s.jsx("div",{className:"md:col-span-2",children:s.jsx(Ee,{label:"Max PRs Per Run",type:"number",value:String(n.reviewerMaxPrsPerRun),onChange:w=>r("reviewerMaxPrsPerRun",Number(w.target.value||0)),helperText:"Hard cap on PRs processed per run (0 = unlimited)"})})]})]})}),s.jsx(il,{id:"job-section-qa",title:"Quality Assurance",icon:dp,description:"Automated UI testing using Playwright",enabled:n.qa.enabled,onToggle:w=>r("qa",{...n.qa,enabled:w}),expanded:h==="qa",onExpandChange:w=>f(w?"qa":null),scheduleSummary:Xt(n.qa.schedule),providerLabel:n.jobProviders.qa?(M=u.find(w=>w.value===n.jobProviders.qa))==null?void 0:M.label:"Global",children:s.jsxs("div",{className:"space-y-6",children:[s.jsx(cl,{summary:Xt(n.qa.schedule),onOpen:()=>b("qa")}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsx(Xe,{label:"Provider",value:n.jobProviders.qa??"",onChange:w=>j("qa",w),options:y}),s.jsx(Ee,{label:"Max Runtime",type:"number",value:String(n.qa.maxRuntime),onChange:w=>r("qa",{...n.qa,maxRuntime:Number(w.target.value||0)}),rightIcon:s.jsx("span",{className:"text-xs",children:"sec"})}),s.jsx(Xe,{label:"Artifacts",value:n.qa.artifacts,onChange:w=>r("qa",{...n.qa,artifacts:w}),options:[{label:"Screenshots",value:"screenshot"},{label:"Videos",value:"video"},{label:"Both",value:"both"}]}),s.jsx(Ee,{label:"Skip Label",value:n.qa.skipLabel,onChange:w=>r("qa",{...n.qa,skipLabel:w.target.value}),helperText:"GitHub label to skip QA"}),s.jsxs("div",{className:"flex items-center justify-between p-3 rounded-md border border-slate-800 bg-slate-950/40 mt-1.5",children:[s.jsxs("div",{children:[s.jsx("span",{className:"text-sm font-medium text-slate-200",children:"Auto-install Playwright"}),s.jsx("p",{className:"text-xs text-slate-500 mt-0.5",children:"Install browsers if missing"})]}),s.jsx(Gt,{checked:n.qa.autoInstallPlaywright,onChange:w=>r("qa",{...n.qa,autoInstallPlaywright:w})})]})]}),s.jsx(gc,{label:"QA Branch Patterns",value:n.qa.branchPatterns,onChange:w=>r("qa",{...n.qa,branchPatterns:w}),placeholder:"e.g., qa/, test/",helpText:"Branch patterns to match for QA"})]})}),s.jsx(il,{id:"job-section-audit",title:"Code Audit",icon:Ir,description:"Automated code quality and security audits",enabled:n.audit.enabled,onToggle:w=>r("audit",{...n.audit,enabled:w}),expanded:h==="audit",onExpandChange:w=>f(w?"audit":null),scheduleSummary:Xt(n.audit.schedule),providerLabel:n.jobProviders.audit?(D=u.find(w=>w.value===n.jobProviders.audit))==null?void 0:D.label:"Global",children:s.jsxs("div",{className:"space-y-6",children:[s.jsx(cl,{summary:Xt(n.audit.schedule),onOpen:()=>b("audit")}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsx(Xe,{label:"Provider",value:n.jobProviders.audit??"",onChange:w=>j("audit",w),options:y}),s.jsx(Ee,{label:"Max Runtime",type:"number",value:String(n.audit.maxRuntime),onChange:w=>r("audit",{...n.audit,maxRuntime:Number(w.target.value||0)}),rightIcon:s.jsx("span",{className:"text-xs",children:"sec"})}),s.jsx(Gt,{label:"Create Board Issues",checked:n.audit.createIssues,onChange:w=>r("audit",{...n.audit,createIssues:w}),className:"self-end pb-2"}),s.jsx(Xe,{label:"Target Column",value:n.audit.targetColumn,disabled:!n.audit.createIssues,onChange:w=>r("audit",{...n.audit,targetColumn:w}),options:[{value:"Draft",label:"Draft"},{value:"Ready",label:"Ready"},{value:"In Progress",label:"In Progress"},{value:"Review",label:"Review"},{value:"Done",label:"Done"}]})]})]})}),s.jsx(il,{id:"job-section-slicer",title:"Planner",icon:xh,description:"Generate one PRD per run using ROADMAP.md or audit findings",enabled:n.roadmapScanner.enabled,onToggle:o,expanded:h==="slicer",onExpandChange:w=>f(w?"slicer":null),scheduleSummary:Xt(n.roadmapScanner.slicerSchedule),providerLabel:n.jobProviders.slicer?(A=u.find(w=>w.value===n.jobProviders.slicer))==null?void 0:A.label:"Global",children:s.jsxs("div",{className:"space-y-6",children:[s.jsx(cl,{summary:Xt(n.roadmapScanner.slicerSchedule),onOpen:()=>b("slicer")}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsx(Xe,{label:"Provider",value:n.jobProviders.slicer??"",onChange:w=>j("slicer",w),options:y}),s.jsx(Ee,{label:"Roadmap File Path",value:n.roadmapScanner.roadmapPath,onChange:w=>r("roadmapScanner",{...n.roadmapScanner,roadmapPath:w.target.value}),helperText:"Primary planning source (relative to project root)."}),s.jsx(Ee,{label:"Max Runtime",type:"number",value:String(n.roadmapScanner.slicerMaxRuntime||""),onChange:w=>r("roadmapScanner",{...n.roadmapScanner,slicerMaxRuntime:Number(w.target.value||0)}),rightIcon:s.jsx("span",{className:"text-xs",children:"sec"})}),s.jsx(Xe,{label:"Priority Mode",value:n.roadmapScanner.priorityMode||"roadmap-first",onChange:w=>r("roadmapScanner",{...n.roadmapScanner,priorityMode:w==="audit-first"?"audit-first":"roadmap-first"}),options:[{label:"Roadmap first (recommended)",value:"roadmap-first"},{label:"Audit first",value:"audit-first"}]}),s.jsx(Xe,{label:"Issue Column",value:n.roadmapScanner.issueColumn||"Ready",onChange:w=>r("roadmapScanner",{...n.roadmapScanner,issueColumn:w==="Draft"?"Draft":"Ready"}),options:[{label:"Ready (default)",value:"Ready"},{label:"Draft",value:"Draft"}]})]})]})}),s.jsx(il,{id:"job-section-analytics",title:"Analytics (Amplitude)",icon:vu,description:"Fetch Amplitude data, analyze with AI, and create board issues",enabled:n.analytics.enabled,onToggle:w=>r("analytics",{...n.analytics,enabled:w}),expanded:h==="analytics",onExpandChange:w=>f(w?"analytics":null),scheduleSummary:Xt(n.analytics.schedule),providerLabel:n.jobProviders.analytics?(N=u.find(w=>w.value===n.jobProviders.analytics))==null?void 0:N.label:"Global",children:s.jsxs("div",{className:"space-y-6",children:[s.jsx(cl,{summary:Xt(n.analytics.schedule),onOpen:()=>b("analytics")}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsx(Xe,{label:"Provider",value:n.jobProviders.analytics??"",onChange:w=>j("analytics",w),options:y}),s.jsx(Ee,{label:"Amplitude API Key",value:((O=n.providerEnv)==null?void 0:O.AMPLITUDE_API_KEY)??"",onChange:w=>r("providerEnv",{...n.providerEnv,AMPLITUDE_API_KEY:w.target.value}),placeholder:"Required"}),s.jsx(Ee,{label:"Amplitude Secret Key",type:"password",value:((R=n.providerEnv)==null?void 0:R.AMPLITUDE_SECRET_KEY)??"",onChange:w=>r("providerEnv",{...n.providerEnv,AMPLITUDE_SECRET_KEY:w.target.value}),placeholder:"Required"}),s.jsx(Ee,{label:"Max Runtime",type:"number",value:String(n.analytics.maxRuntime),onChange:w=>r("analytics",{...n.analytics,maxRuntime:Number(w.target.value||0)}),rightIcon:s.jsx("span",{className:"text-xs",children:"sec"})}),s.jsx(Ee,{label:"Lookback Days",type:"number",min:"1",max:"90",value:String(n.analytics.lookbackDays),onChange:w=>r("analytics",{...n.analytics,lookbackDays:Math.max(1,Math.min(90,Number(w.target.value||7)))})}),s.jsx(Xe,{label:"Target Column",value:n.analytics.targetColumn,onChange:w=>r("analytics",{...n.analytics,targetColumn:w}),options:[{value:"Draft",label:"Draft"},{value:"Ready",label:"Ready"},{value:"In Progress",label:"In Progress"},{value:"Review",label:"Review"},{value:"Done",label:"Done"}]}),s.jsxs("div",{className:"md:col-span-2",children:[s.jsx("label",{className:"block text-sm font-medium text-slate-400 mb-1.5",children:"Analysis Prompt (optional)"}),s.jsx("textarea",{rows:4,value:n.analytics.analysisPrompt??"",onChange:w=>r("analytics",{...n.analytics,analysisPrompt:w.target.value}),placeholder:"Custom prompt for AI analysis. Leave empty to use default.",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-y"})]})]})]})}),s.jsx(il,{id:"job-section-pr-resolver",title:"PR Resolver",icon:mh,description:"Repo-wide conflict resolver that rebases PRs and applies feedback",enabled:n.prResolver.enabled,onToggle:w=>r("prResolver",{...n.prResolver,enabled:w}),expanded:h==="pr-resolver",onExpandChange:w=>f(w?"pr-resolver":null),scheduleSummary:Xt(n.prResolver.schedule),providerLabel:n.jobProviders["pr-resolver"]?(W=u.find(w=>w.value===n.jobProviders["pr-resolver"]))==null?void 0:W.label:"Global",children:s.jsxs("div",{className:"space-y-6",children:[s.jsx(cl,{summary:Xt(n.prResolver.schedule),onOpen:()=>b("pr-resolver")}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsx(Xe,{label:"Provider",value:n.jobProviders["pr-resolver"]??"",onChange:w=>j("pr-resolver",w),options:y}),s.jsx(Ee,{label:"Max Runtime",type:"number",value:String(n.prResolver.maxRuntime),onChange:w=>r("prResolver",{...n.prResolver,maxRuntime:Number(w.target.value||0)}),rightIcon:s.jsx("span",{className:"text-xs",children:"sec"})}),s.jsx(Ee,{label:"Per-PR Timeout",type:"number",value:String(n.prResolver.perPrTimeout),onChange:w=>r("prResolver",{...n.prResolver,perPrTimeout:Math.max(0,Number(w.target.value||0))}),rightIcon:s.jsx("span",{className:"text-xs",children:"sec"})}),s.jsx(Ee,{label:"Max PRs Per Run",type:"number",min:"0",value:String(n.prResolver.maxPrsPerRun),onChange:w=>r("prResolver",{...n.prResolver,maxPrsPerRun:Math.max(0,Number(w.target.value||0))})}),s.jsx(Ee,{label:"Ready Label",value:n.prResolver.readyLabel,onChange:w=>r("prResolver",{...n.prResolver,readyLabel:w.target.value})})]}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[s.jsxs("div",{className:"flex items-center justify-between p-3 rounded-md border border-slate-800 bg-slate-950/40",children:[s.jsxs("div",{children:[s.jsx("span",{className:"text-sm font-medium text-slate-200",children:"AI conflict resolution"}),s.jsx("p",{className:"text-xs text-slate-500 mt-1",children:"AI help for non-trivial rebases"})]}),s.jsx(Gt,{checked:n.prResolver.aiConflictResolution,onChange:w=>r("prResolver",{...n.prResolver,aiConflictResolution:w})})]}),s.jsxs("div",{className:"flex items-center justify-between p-3 rounded-md border border-slate-800 bg-slate-950/40",children:[s.jsxs("div",{children:[s.jsx("span",{className:"text-sm font-medium text-slate-200",children:"AI review resolution"}),s.jsx("p",{className:"text-xs text-slate-500 mt-1",children:"Implement open review comments"})]}),s.jsx(Gt,{checked:n.prResolver.aiReviewResolution,onChange:w=>r("prResolver",{...n.prResolver,aiReviewResolution:w})})]})]}),s.jsx(gc,{label:"PR Resolver Branch Patterns",value:n.prResolver.branchPatterns,onChange:w=>r("prResolver",{...n.prResolver,branchPatterns:w}),placeholder:"e.g., feat/, night-watch/",helpText:"Branch patterns to filter PRs (empty = all)"})]})}),s.jsx(il,{id:"job-section-merger",title:"Merge Orchestrator",icon:yu,description:"Repo-wide PR merge coordinator — scans, rebases, and merges",enabled:n.merger.enabled,onToggle:w=>r("merger",{...n.merger,enabled:w}),expanded:h==="merger",onExpandChange:w=>f(w?"merger":null),scheduleSummary:Xt(n.merger.schedule),providerLabel:n.jobProviders.merger?(L=u.find(w=>w.value===n.jobProviders.merger))==null?void 0:L.label:"Global",children:s.jsxs("div",{className:"space-y-6",children:[s.jsx(cl,{summary:Xt(n.merger.schedule),onOpen:()=>b("merger")}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsx(Xe,{label:"Provider",value:n.jobProviders.merger??"",onChange:w=>j("merger",w),options:y}),s.jsx(Ee,{label:"Max Runtime",type:"number",value:String(n.merger.maxRuntime),onChange:w=>r("merger",{...n.merger,maxRuntime:Number(w.target.value||0)}),rightIcon:s.jsx("span",{className:"text-xs",children:"sec"})}),s.jsx(Xe,{label:"Merge Method",value:n.merger.mergeMethod,onChange:w=>r("merger",{...n.merger,mergeMethod:w}),options:[{label:"Squash",value:"squash"},{label:"Merge",value:"merge"},{label:"Rebase",value:"rebase"}]}),s.jsx(Ee,{label:"Min Review Score",type:"number",min:"0",max:"100",value:String(n.merger.minReviewScore),onChange:w=>r("merger",{...n.merger,minReviewScore:Math.max(0,Math.min(100,Number(w.target.value||0)))})}),s.jsx(Ee,{label:"Max PRs Per Run",type:"number",min:"0",value:String(n.merger.maxPrsPerRun),onChange:w=>r("merger",{...n.merger,maxPrsPerRun:Math.max(0,Number(w.target.value||0))})}),s.jsx(Xe,{label:"CI Policy",value:n.merger.ciPolicy,onChange:w=>r("merger",{...n.merger,ciPolicy:w}),options:[{label:"Fallback to Local Checks",value:"fallback-local"},{label:"Require GitHub CI",value:"ci-only"},{label:"Ignore CI",value:"ignore"}]}),s.jsx(Ee,{label:"Local Check Command",value:n.merger.localCheckCommand,onChange:w=>r("merger",{...n.merger,localCheckCommand:w.target.value}),helperText:"Used only when CI policy falls back to local checks."})]}),s.jsxs("div",{className:"flex items-center justify-between p-3 rounded-md border border-slate-800 bg-slate-950/40",children:[s.jsxs("div",{children:[s.jsx("span",{className:"text-sm font-medium text-slate-200",children:"Rebase before merge"}),s.jsx("p",{className:"text-xs text-slate-500 mt-1",children:"Rebase each PR against its base branch"})]}),s.jsx(Gt,{checked:n.merger.rebaseBeforeMerge,onChange:w=>r("merger",{...n.merger,rebaseBeforeMerge:w})})]}),s.jsx(gc,{label:"Merger Branch Patterns",value:n.merger.branchPatterns,onChange:w=>r("merger",{...n.merger,branchPatterns:w}),placeholder:"e.g., feat/, night-watch/"})]})}),s.jsx(il,{id:"job-section-manager",title:"Manager",icon:fh,description:"Monitors roadmap, PRDs, docs, board state, and system health",enabled:n.manager.enabled,onToggle:w=>r("manager",{...n.manager,enabled:w}),expanded:h==="manager",onExpandChange:w=>f(w?"manager":null),scheduleSummary:Xt(n.manager.schedule),providerLabel:n.jobProviders.manager?(J=u.find(w=>w.value===n.jobProviders.manager))==null?void 0:J.label:"Global",children:s.jsxs("div",{className:"space-y-6",children:[s.jsx(cl,{summary:Xt(n.manager.schedule),onOpen:()=>b("manager")}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsx(Xe,{label:"Provider",value:n.jobProviders.manager??"",onChange:w=>j("manager",w),options:y}),s.jsx(Ee,{label:"Max Runtime",type:"number",min:"0",value:String(n.manager.maxRuntime),onChange:w=>r("manager",{...n.manager,maxRuntime:Math.max(0,Number(w.target.value||0))}),rightIcon:s.jsx("span",{className:"text-xs",children:"sec"})}),s.jsx(Xe,{label:"Output Mode",value:n.manager.outputMode,onChange:w=>r("manager",{...n.manager,outputMode:w}),options:[{value:"board-draft",label:"Board Draft"},{value:"filesystem-prd",label:"Filesystem PRD"},{value:"report-only",label:"Report Only"}]}),s.jsx(Xe,{label:"Authority",value:n.manager.authority,onChange:w=>r("manager",{...n.manager,authority:w}),options:[{value:"draft",label:"Draft"},{value:"ready",label:"Ready"},{value:"workflow",label:"Workflow"}]}),s.jsx(Xe,{label:"Target Column",value:n.manager.targetColumn,onChange:w=>r("manager",{...n.manager,targetColumn:w}),options:[{value:"Draft",label:"Draft"},{value:"Ready",label:"Ready"},{value:"In Progress",label:"In Progress"},{value:"Review",label:"Review"},{value:"Done",label:"Done"}]}),s.jsx(Ee,{label:"Memory Path",value:n.manager.memoryPath,onChange:w=>r("manager",{...n.manager,memoryPath:w.target.value})}),s.jsx(Ee,{label:"Generated Docs Directory",value:n.manager.docsDir,onChange:w=>r("manager",{...n.manager,docsDir:w.target.value})}),s.jsx(Ee,{label:"Weekly Summary Day",type:"number",min:"0",max:"6",value:String(n.manager.weeklySummaryDay),onChange:w=>r("manager",{...n.manager,weeklySummaryDay:Math.max(0,Math.min(6,Number(w.target.value||0)))}),helperText:"0 = Sunday, 1 = Monday"}),s.jsxs("div",{className:"flex items-center justify-between p-3 rounded-md border border-slate-800 bg-slate-950/40",children:[s.jsxs("div",{children:[s.jsx("span",{className:"text-sm font-medium text-slate-200",children:"Weekly summary"}),s.jsx("p",{className:"text-xs text-slate-500 mt-1",children:"Send a periodic project health summary"})]}),s.jsx(Gt,{checked:n.manager.weeklySummaryEnabled,onChange:w=>r("manager",{...n.manager,weeklySummaryEnabled:w})})]})]})]})})]})]})},av="5 * * * *",nv="25 */3 * * *",qw={enabled:!0,roadmapPath:"ROADMAP.md",autoScanInterval:300,slicerSchedule:"35 */6 * * *",slicerMaxRuntime:600,priorityMode:"roadmap-first",issueColumn:"Ready"},Dx={enabled:!0,schedule:"45 2,10,18 * * *",maxRuntime:3600,branchPatterns:[],artifacts:"both",skipLabel:"skip-qa",autoInstallPlaywright:!0},Vw={enabled:!1,schedule:"50 3 * * 1",maxRuntime:1800,createIssues:!1,targetColumn:"Draft"},Bw={enabled:!1,schedule:"0 6 * * 1",maxRuntime:900,lookbackDays:7,targetColumn:"Draft",analysisPrompt:""},kx={enabled:!0,schedule:"15 6,14,22 * * *",maxRuntime:3600,branchPatterns:[],maxPrsPerRun:0,perPrTimeout:600,aiConflictResolution:!0,aiReviewResolution:!1,readyLabel:"ready-to-merge"},Ax={enabled:!1,schedule:"55 */4 * * *",maxRuntime:1800,mergeMethod:"squash",minReviewScore:80,branchPatterns:[],rebaseBeforeMerge:!0,maxPrsPerRun:0,ciPolicy:"fallback-local",localCheckCommand:"yarn install --frozen-lockfile && yarn verify && yarn test"},$w={enabled:!0,schedule:"15 7 * * *",maxRuntime:0,authority:"draft",outputMode:"board-draft",targetColumn:"Draft",memoryPath:".night-watch/manager/memory.md",docsDir:".night-watch/manager/docs",weeklySummaryEnabled:!0,weeklySummaryDay:1};function Gr(){return{...qw}}function lv(){return{...Dx,branchPatterns:[...Dx.branchPatterns]}}function sv(){return{...Vw}}function Eh(){return{...Bw}}function yc(){return{...kx,branchPatterns:[...kx.branchPatterns]}}function Nu(){return{...Ax,branchPatterns:[...Ax.branchPatterns]}}function bc(){return{...$w}}const mu=["claude","claude-sonnet-4-6","claude-opus-4-6","codex","glm-47","glm-5"],rv={claude:{name:"Claude",command:"claude",promptFlag:"-p",autoApproveFlag:"--dangerously-skip-permissions"},"claude-sonnet-4-6":{name:"Claude Sonnet 4.6",command:"claude",promptFlag:"-p",autoApproveFlag:"--dangerously-skip-permissions",modelFlag:"--model",model:"claude-sonnet-4-6"},"claude-opus-4-6":{name:"Claude Opus 4.6",command:"claude",promptFlag:"-p",autoApproveFlag:"--dangerously-skip-permissions",modelFlag:"--model",model:"claude-opus-4-6"},codex:{name:"Codex",command:"codex",subcommand:"exec",autoApproveFlag:"--yolo",workdirFlag:"-C"},"glm-47":{name:"GLM-4.7",command:"claude",promptFlag:"-p",autoApproveFlag:"--dangerously-skip-permissions",modelFlag:"--model",model:"glm-4.7",envVars:{ANTHROPIC_BASE_URL:"https://api.z.ai/api/anthropic",API_TIMEOUT_MS:"3000000",ANTHROPIC_DEFAULT_OPUS_MODEL:"glm-4.7",ANTHROPIC_DEFAULT_SONNET_MODEL:"glm-4.7"}},"glm-5":{name:"GLM-5",command:"claude",promptFlag:"-p",autoApproveFlag:"--dangerously-skip-permissions",modelFlag:"--model",model:"glm-5",envVars:{ANTHROPIC_BASE_URL:"https://api.z.ai/api/anthropic",API_TIMEOUT_MS:"3000000",ANTHROPIC_DEFAULT_OPUS_MODEL:"glm-5",ANTHROPIC_DEFAULT_SONNET_MODEL:"glm-5"}}},Pw={enabled:!0,mode:"conservative",maxConcurrency:1,maxWaitTime:7200,priority:{executor:50,reviewer:40,slicer:30,manager:25,qa:20,audit:10},providerBuckets:{}},Yw=["executor","reviewer","qa","audit","slicer","analytics","pr-resolver","merger","manager"],Fw=new Set(["overview","schedules","jobs"]),$f=n=>{if(!n)return null;const r=n==="planner"?"slicer":n;return["executor","reviewer","qa","audit","slicer","analytics","pr-resolver","merger","manager"].includes(r)?r:null},nu=n=>({cronSchedule:n.cronSchedule||av,reviewerSchedule:n.reviewerSchedule||nv,scheduleBundleId:n.scheduleBundleId??null,cronScheduleOffset:n.cronScheduleOffset??0,schedulingPriority:n.schedulingPriority??3,executorEnabled:n.executorEnabled??!0,reviewerEnabled:n.reviewerEnabled??!1,maxRuntime:n.maxRuntime??3600,reviewerMaxRuntime:n.reviewerMaxRuntime??1800,maxRetries:n.maxRetries??3,reviewerMaxRetries:n.reviewerMaxRetries??2,reviewerRetryDelay:n.reviewerRetryDelay??30,reviewerMaxPrsPerRun:n.reviewerMaxPrsPerRun??0,minReviewScore:n.minReviewScore??70,branchPatterns:n.branchPatterns||[],providerEnv:n.providerEnv||{},jobProviders:n.jobProviders||{},providerPresets:n.providerPresets??{},qa:n.qa||lv(),audit:n.audit||sv(),analytics:n.analytics||Eh(),feedback:n.feedback??{enabled:!0,confidenceThreshold:.75,augmentationTtlDays:14,maxActiveAugmentations:3,successStreakToExpire:3},prResolver:n.prResolver??yc(),merger:n.merger??Nu(),manager:n.manager??bc(),roadmapScanner:n.roadmapScanner||Gr(),queue:n.queue||Pw}),iu=n=>{var r,o,u;return _w(n.scheduleBundleId,n.cronSchedule,n.reviewerSchedule,n.qa.schedule,n.audit.schedule,n.roadmapScanner.slicerSchedule??Gr().slicerSchedule,((r=n.prResolver)==null?void 0:r.schedule)??yc().schedule,((o=n.merger)==null?void 0:o.schedule)??Nu().schedule,((u=n.manager)==null?void 0:u.schedule)??bc().schedule)},lu=n=>{const r=iu(n);return!n.scheduleBundleId&&r?{form:{...n,scheduleBundleId:r.id},detectedTemplate:r}:{form:n,detectedTemplate:r}},Gw=()=>{var dl,Ie,fl,mt,$t,zt,Lt,ts,Is,Qs;const n=kn(),{addToast:r,selectedProjectId:o,globalModeLoading:u}=Zt(),[h,f]=z.useState(!1),[b,j]=z.useState(!1),[y,x]=z.useState(!1),[E,M]=z.useState(null),[D,A]=z.useState([]),[N,O]=z.useState(null),[R,W]=z.useState(null),[L,J]=z.useState(!0),[w,H]=z.useState("overview"),[q,G]=z.useState(null),[Z,le]=z.useState(null),[S,te]=z.useState(null),[ae,ie]=z.useState("template"),[ge,pe]=z.useState(""),[P,K]=z.useState(!1),[he,fe]=z.useState(!1),Ne=z.useRef(null),U=z.useRef(!1),se=z.useRef(null),{data:me,loading:ve,error:Re,refetch:xe}=qa(bp,[o],{enabled:!u}),{data:we,loading:lt,refetch:Ye}=qa(jh,[o],{enabled:!u});z.useEffect(()=>{if(u)return;let oe=!1;J(!0),O(null),W(null),A([]);const ye=async(gt=!1)=>{gt&&J(!0),xe();const[xt,ga,Xs]=await Promise.all([Zg().catch(()=>null),xN(24).catch(()=>null),cN().catch(()=>[])]);oe||(O(xt),W(ga),A(Xs),J(!1))};ye(!0);const Ue=setInterval(()=>{ye()},3e4);return()=>{oe=!0,clearInterval(Ue)}},[o,u,xe]),z.useEffect(()=>{if(!we)return;if(U.current){U.current=!1;return}const{form:oe,detectedTemplate:ye}=lu(nu(we));te(oe),Ne.current=oe,ie(ye?"template":"custom"),pe((ye==null?void 0:ye.id)??""),K(!1)},[we]),z.useEffect(()=>{!S||!Ne.current||K(JSON.stringify(S)!==JSON.stringify(Ne.current))},[S]),z.useEffect(()=>{if(w!=="jobs"||!q)return;const oe=window.setTimeout(()=>{const ye=document.getElementById(`job-section-${q}`);ye&&ye.scrollIntoView({behavior:"smooth",block:"center"})},100);return()=>window.clearTimeout(oe)},[w,q]),z.useEffect(()=>{if(w!=="schedules"||ae!=="custom"||!Z)return;const oe=Z,ye=window.setTimeout(()=>{const Ue=document.getElementById(`job-schedule-${oe}`);Ue&&Ue.scrollIntoView({behavior:"smooth",block:"center"}),le(null)},100);return()=>window.clearTimeout(ye)},[w,ae,Z]);const St=(oe,ye)=>{te(Ue=>Ue&&{...Ue,[oe]:ye})},oa=()=>{if(ie("template"),!S)return;const oe=iu(S);if(oe){pe(oe.id),St("scheduleBundleId",oe.id);return}const ye=Kf(ge)??Kf("always-on");ye&&ua(ye)},Ma=()=>{ie("custom"),St("scheduleBundleId",null),pe("")},$a=oe=>{const ye=$f(oe);ye&&(ae!=="custom"&&Ma(),H("schedules"),le(ye))},ua=oe=>{pe(oe.id),te(ye=>ye&&{...ye,cronSchedule:oe.schedules.executor,reviewerSchedule:oe.schedules.reviewer,scheduleBundleId:oe.id,qa:{...ye.qa,schedule:oe.schedules.qa},audit:{...ye.audit,schedule:oe.schedules.audit},roadmapScanner:{...ye.roadmapScanner,slicerSchedule:oe.schedules.slicer},prResolver:{...ye.prResolver,schedule:oe.schedules.prResolver},merger:{...ye.merger,schedule:oe.schedules.merger},manager:{...ye.manager,schedule:oe.schedules.manager}})},ma=async()=>{if(S){fe(!0);try{const oe={};for(const xt of Yw){const ga=S.jobProviders[xt];typeof ga=="string"&&ga.trim().length>0?oe[xt]=ga:we!=null&&we.jobProviders[xt]&&(oe[xt]=null)}const ye=await du({cronSchedule:S.cronSchedule,reviewerSchedule:S.reviewerSchedule,scheduleBundleId:ae==="template"?S.scheduleBundleId:null,cronScheduleOffset:S.cronScheduleOffset,schedulingPriority:S.schedulingPriority,executorEnabled:S.executorEnabled,reviewerEnabled:S.reviewerEnabled,maxRuntime:S.maxRuntime,reviewerMaxRuntime:S.reviewerMaxRuntime,maxRetries:S.maxRetries,reviewerMaxRetries:S.reviewerMaxRetries,reviewerRetryDelay:S.reviewerRetryDelay,reviewerMaxPrsPerRun:S.reviewerMaxPrsPerRun,minReviewScore:S.minReviewScore,branchPatterns:S.branchPatterns,providerEnv:S.providerEnv,jobProviders:oe,qa:S.qa,audit:S.audit,analytics:S.analytics,feedback:S.feedback,prResolver:S.prResolver,merger:S.merger,manager:S.manager,roadmapScanner:S.roadmapScanner,queue:S.queue}),{form:Ue}=lu(nu(ye));te(Ue),Ne.current=Ue,K(!1);let gt="";try{await mc()}catch(xt){gt=xt instanceof Error?xt.message:"Failed to reinstall cron"}r(gt?{title:"Saved (Cron Reinstall Failed)",message:gt,type:"warning"}:{title:"Saved",message:"Configuration updated and cron schedules reinstalled.",type:"success"}),U.current=!0,Ye()}catch(oe){r({title:"Save Failed",message:oe instanceof Error?oe.message:"Failed to save configuration",type:"error"})}finally{fe(!1)}}},vn=()=>{if(Ne.current){te(Ne.current);const oe=Ne.current,ye=iu(oe);ie(ye?"template":"custom"),pe((ye==null?void 0:ye.id)??""),K(!1)}},yn=async oe=>{try{const ye=await Ep(oe),{form:Ue}=lu(nu(ye));te(Ue),Ne.current=Ue,K(!1);let gt="";try{await mc()}catch(xt){gt=xt instanceof Error?xt.message:"Failed to reinstall cron"}r(gt?{title:"Saved (Cron Reinstall Failed)",message:gt,type:"warning"}:{title:oe?"Roadmap Scanner Enabled":"Roadmap Scanner Disabled",message:`Roadmap scanner has been ${oe?"enabled":"disabled"}.`,type:"success"}),U.current=!0,Ye(),xe()}catch(ye){r({title:"Toggle Failed",message:ye instanceof Error?ye.message:"Failed to toggle roadmap scanner",type:"error"})}},bn=async()=>{if(me){f(!0);try{me.paused?(await mc(),r({title:"Schedule Resumed",message:"Cron schedules are active.",type:"success"})):(await Np(),r({title:"Schedule Paused",message:"Cron schedules are deactivated.",type:"info"})),xe()}catch(oe){r({title:"Action Failed",message:oe instanceof Error?oe.message:"Toggle failed",type:"error"})}finally{f(!1)}}},_t=async()=>{if(window.confirm("Are you sure you want to clear all pending jobs?")){j(!0);try{const oe=await pN();r({title:"Queue Cleared",message:`Removed ${oe.cleared} pending jobs.`,type:"success"}),Zg().then(O)}catch(oe){r({title:"Clear Failed",message:oe instanceof Error?oe.message:"Failed to clear queue",type:"error"})}finally{j(!1)}}},da=async oe=>{if(S){fe(!0);try{const ye=await du({queue:{...S.queue,...oe}}),{form:Ue}=lu(nu(ye));te(Ue),Ne.current=Ue,K(!1),r({title:"Settings Saved",message:"Queue configuration updated.",type:"success"}),U.current=!0,Ye(),xe()}catch(ye){r({title:"Save Failed",message:ye instanceof Error?ye.message:"Save failed",type:"error"})}finally{fe(!1)}}},An=async oe=>{const ye=oe==="planner"?"slicer":oe;M(oe);try{await jp(ye),r({title:"Job Triggered",message:`${oe} job queued successfully.`,type:"success"})}catch(Ue){r({title:"Trigger Failed",message:Ue instanceof Error?Ue.message:"Failed to trigger job",type:"error"})}finally{M(null)}},_n=oe=>{const ye=$f(oe);ye&&(H("jobs"),G(ye))};z.useEffect(()=>{if(!S||se.current===n.search)return;se.current=n.search;const oe=new URLSearchParams(n.search),ye=oe.get("tab"),Ue=ye==="queue"?"overview":ye,gt=oe.get("mode"),xt=$f(oe.get("jobType"));if(Ue&&Fw.has(Ue)){if(Ue==="jobs"){H("jobs"),xt&&G(xt);return}if(Ue==="schedules"){if(xt){$a(xt);return}H("schedules"),gt==="custom"&&ae!=="custom"&&Ma(),gt==="template"&&ae!=="template"&&oa();return}H(Ue);return}gt==="custom"&&ae!=="custom"&&(H("schedules"),Ma()),gt==="template"&&ae!=="template"&&(H("schedules"),oa())},[n.search,S,ae]);const zn=z.useMemo(()=>{const oe={...rv,...(S==null?void 0:S.providerPresets)??{}};return Object.entries(oe).map(([ye,Ue])=>({label:Ue.name||ye,value:ye}))},[S==null?void 0:S.providerPresets]);if(ve||lt||!S)return s.jsx(Ha,{message:"Loading automation",detail:"Fetching schedules, queue state, and job configuration."});if(Re||!me||!we)return s.jsxs("div",{className:"flex flex-col items-center justify-center min-h-[400px] space-y-4",children:[s.jsx(pn,{className:"h-10 w-10 text-red-500"}),s.jsx("div",{className:"text-slate-300 font-medium",children:"Failed to load scheduling data"}),s.jsx(Le,{onClick:()=>{xe(),Ye()},children:"Retry"})]});const yt=me.paused,Oa=S?iu(S):void 0,Zs=s.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-8",children:[s.jsxs("div",{className:"lg:col-span-2 space-y-8",children:[s.jsxs(et,{className:"overflow-hidden border-slate-800",children:[s.jsxs("div",{className:"p-5 border-b border-slate-800 flex items-center justify-between bg-slate-900/30",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx(Fg,{className:"h-5 w-5 text-indigo-400"}),s.jsx("h3",{className:"font-semibold text-slate-200",children:"Execution Queue"})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsxs(Le,{variant:"ghost",size:"sm",onClick:_t,loading:b,disabled:!(N!=null&&N.items.length),className:"text-slate-500 hover:text-red-400 hover:bg-red-400/10",children:[s.jsx(Fs,{className:"h-4 w-4 mr-1.5"}),"Clear"]}),s.jsx("div",{className:`p-1.5 rounded-lg cursor-pointer hover:bg-slate-800 transition-colors ${y?"text-indigo-400 bg-slate-800":"text-slate-500"}`,onClick:()=>x(!y),title:"Automation Settings",children:s.jsx(Pg,{className:"h-5 w-5"})})]})]}),s.jsx("div",{className:`transition-all duration-300 overflow-hidden ${y?"max-h-[500px]":"max-h-0"}`,children:s.jsxs("div",{className:"p-6 bg-slate-950/40 border-b border-slate-800 grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsx(Xe,{label:"Dispatch Mode",value:((dl=S==null?void 0:S.queue)==null?void 0:dl.mode)||"auto",onChange:oe=>da({mode:oe}),options:[{label:"Auto (Recommended)",value:"auto"},{label:"Conservative (1 at a time)",value:"conservative"},{label:"Provider-aware",value:"provider-aware"}]}),s.jsx(Ee,{label:"Max Concurrency",type:"number",min:"1",max:"20",value:String(((Ie=S==null?void 0:S.queue)==null?void 0:Ie.maxConcurrency)||1),onChange:oe=>da({maxConcurrency:Number(oe.target.value)})}),s.jsx("div",{className:"md:col-span-2 flex items-center gap-3",children:s.jsx(Gt,{label:"Coordinator Enabled",checked:((fl=S==null?void 0:S.queue)==null?void 0:fl.enabled)??!0,onChange:oe=>da({enabled:oe})})})]})}),s.jsx("div",{className:"p-0",children:L&&!N?s.jsx(Ha,{variant:"inline",message:"Loading queue"}):N!=null&&N.items.length?s.jsx("div",{className:"overflow-x-auto",children:s.jsxs("table",{className:"w-full text-left text-sm",children:[s.jsx("thead",{className:"text-[11px] uppercase tracking-wider text-slate-500 font-semibold bg-slate-900/20",children:s.jsxs("tr",{children:[s.jsx("th",{className:"px-6 py-3",children:"Job / Project"}),s.jsx("th",{className:"px-6 py-3",children:"Status"}),s.jsx("th",{className:"px-6 py-3",children:"Wait Time"}),s.jsx("th",{className:"px-6 py-3 text-right",children:"Actions"})]})}),s.jsx("tbody",{className:"divide-y divide-slate-800/40",children:N.items.map(oe=>s.jsxs("tr",{className:"hover:bg-slate-800/20 transition-colors group",children:[s.jsxs("td",{className:"px-6 py-4",children:[s.jsx("div",{className:"font-medium text-slate-200",children:oe.jobType}),s.jsx("div",{className:"text-[11px] text-slate-500 truncate max-w-[200px]",title:oe.projectPath,children:oe.projectName||oe.projectPath})]}),s.jsx("td",{className:"px-6 py-4",children:s.jsx(Tt,{variant:oe.status==="running"?"info":"neutral",className:"text-[10px]",children:oe.status})}),s.jsx("td",{className:"px-6 py-4 text-slate-400 font-mono text-xs",children:Rx(new Date(oe.enqueuedAt*1e3))}),s.jsx("td",{className:"px-6 py-4 text-right",children:s.jsx("button",{onClick:()=>_n(oe.jobType),className:"opacity-0 group-hover:opacity-100 p-2 text-slate-500 hover:text-indigo-400 transition-all",title:"Configure Job",children:s.jsx(Pg,{className:"h-4 w-4"})})})]},oe.id))})]})}):s.jsxs("div",{className:"py-12 flex flex-col items-center justify-center text-slate-500 text-sm italic",children:[s.jsx("div",{className:"mb-3 p-3 rounded-full bg-slate-900 border border-slate-800",children:s.jsx($g,{className:"h-6 w-6 opacity-30"})}),"Queue is empty"]})})]}),s.jsxs("section",{className:"space-y-4",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx("h3",{className:"text-lg font-semibold text-slate-200",children:"Operational Timeline"}),s.jsxs("div",{className:"text-xs text-slate-500 flex items-center gap-2",children:[s.jsx(pc,{className:"h-3 w-3 animate-spin-slow"})," Live Update"]})]}),L&&D.length===0?s.jsx(Ha,{variant:"card",message:"Loading timeline",rows:2}):s.jsx(kw,{configs:D,currentProjectId:o??void 0,onEditJob:(oe,ye)=>_n(ye),queueStatus:N,queueAnalytics:R})]}),s.jsxs("section",{className:"space-y-4",children:[s.jsx("h3",{className:"text-lg font-semibold text-slate-200",children:"Execution History (Last 24h)"}),s.jsx(et,{className:"border-slate-800 overflow-hidden",children:L&&!R?s.jsx(Ha,{variant:"inline",message:"Loading execution history"}):R!=null&&R.recentRuns.length?s.jsx("div",{className:"overflow-x-auto",children:s.jsxs("table",{className:"w-full text-left text-sm",children:[s.jsx("thead",{className:"text-[11px] uppercase tracking-wider text-slate-500 font-semibold bg-slate-900/20",children:s.jsxs("tr",{children:[s.jsx("th",{className:"px-6 py-4",children:"Job Type"}),s.jsx("th",{className:"px-6 py-4",children:"Status"}),s.jsx("th",{className:"px-6 py-4",children:"Duration"}),s.jsx("th",{className:"px-6 py-4",children:"Started"}),s.jsx("th",{className:"px-6 py-4 text-right",children:"Provider"})]})}),s.jsx("tbody",{className:"divide-y divide-slate-800/40",children:R.recentRuns.map(oe=>s.jsxs("tr",{className:"hover:bg-slate-800/10 transition-colors",children:[s.jsx("td",{className:"px-6 py-4",children:s.jsx("span",{className:"font-medium text-slate-300 capitalize",children:oe.jobType})}),s.jsx("td",{className:"px-6 py-4",children:s.jsx(Tt,{variant:oe.status==="finished"?"success":oe.status==="failed"?"error":"neutral",className:"text-[10px]",children:oe.status})}),s.jsx("td",{className:"px-6 py-4 text-slate-400",children:oe.durationSeconds?`${oe.durationSeconds}s`:"--"}),s.jsx("td",{className:"px-6 py-4 text-slate-500 text-xs",children:Rx(new Date(oe.startedAt*1e3))}),s.jsx("td",{className:"px-6 py-4 text-right text-slate-500 font-mono text-xs",children:oe.providerKey||"default"})]},oe.id))})]})}):s.jsx("div",{className:"py-20 text-center text-slate-500 italic text-sm",children:"No recorded runs in the last 24 hours."})})]})]}),s.jsxs("div",{className:"space-y-6",children:[s.jsxs(et,{className:"p-5 space-y-4 border-slate-800 bg-slate-900/20",children:[s.jsx("h4",{className:"text-xs font-bold text-slate-500 uppercase tracking-widest",children:"Automation Controls"}),s.jsxs("div",{className:"rounded-xl border border-slate-800 bg-slate-950/40 p-4",children:[s.jsx("div",{className:"text-[10px] text-slate-500 uppercase",children:"Schedule Template"}),s.jsx("div",{className:"mt-1 text-sm font-medium text-slate-200",children:(Oa==null?void 0:Oa.label)??"Custom"}),s.jsx("p",{className:"mt-1 text-xs text-slate-500",children:(Oa==null?void 0:Oa.description)??"Custom cron expressions are active for this project."})]}),s.jsx(Xe,{label:"Scheduling Priority",value:String(S.schedulingPriority),onChange:oe=>St("schedulingPriority",Number(oe)),options:[{label:"1 - Lowest",value:"1"},{label:"2 - Low",value:"2"},{label:"3 - Balanced",value:"3"},{label:"4 - High",value:"4"},{label:"5 - Highest",value:"5"}],helperText:"Higher-priority projects get earlier balanced start slots and win queue tie-breakers first."}),s.jsx(Ee,{label:"Extra Start Delay",type:"number",min:"0",max:"59",value:String(S.cronScheduleOffset),onChange:oe=>St("cronScheduleOffset",Math.min(59,Math.max(0,Number(oe.target.value||0)))),helperText:"Manual delay in minutes added before cron jobs start. This stacks on top of automatic balancing."})]}),s.jsxs(et,{className:"p-5 space-y-4 border-slate-800 bg-slate-900/20",children:[s.jsx("h4",{className:"text-xs font-bold text-slate-500 uppercase tracking-widest",children:"Efficiency Stats"}),s.jsxs("div",{className:"grid grid-cols-1 gap-4",children:[s.jsxs("div",{className:"p-4 rounded-xl border border-slate-800 bg-slate-950/40",children:[s.jsx("div",{className:"text-[10px] text-slate-500 uppercase",children:"Avg Wait Time"}),s.jsxs("div",{className:"text-xl font-bold text-slate-200 mt-1",children:[N!=null&&N.averageWaitSeconds?(N.averageWaitSeconds/60).toFixed(1):"0"," ",s.jsx("span",{className:"text-xs font-normal text-slate-500",children:"min"})]})]}),s.jsxs("div",{className:"p-4 rounded-xl border border-slate-800 bg-slate-950/40",children:[s.jsx("div",{className:"text-[10px] text-slate-500 uppercase",children:"Oldest Pending"}),s.jsxs("div",{className:"text-xl font-bold text-slate-200 mt-1",children:[N!=null&&N.oldestPendingAge?(N.oldestPendingAge/60).toFixed(1):"0"," ",s.jsx("span",{className:"text-xs font-normal text-slate-500",children:"min"})]})]})]})]}),s.jsxs(et,{className:"divide-y divide-slate-800 border-slate-800",children:[s.jsx("div",{className:"p-4 bg-slate-900/30",children:s.jsx("h4",{className:"text-xs font-bold text-slate-500 uppercase tracking-widest",children:"Manual Trigger"})}),s.jsx("div",{className:"p-2 space-y-1",children:[{id:"executor",label:"Run Executor",icon:xn,enabled:(S==null?void 0:S.executorEnabled)!==!1},{id:"reviewer",label:"Run Reviewer",icon:Ir,enabled:(S==null?void 0:S.reviewerEnabled)??!1},{id:"qa",label:"Run QA",icon:Fg,enabled:((mt=S==null?void 0:S.qa)==null?void 0:mt.enabled)??!1},{id:"audit",label:"Run Audit",icon:$g,enabled:(($t=S==null?void 0:S.audit)==null?void 0:$t.enabled)??!1},{id:"planner",label:"Run Planner",icon:xh,enabled:((zt=S==null?void 0:S.roadmapScanner)==null?void 0:zt.enabled)??!1},{id:"analytics",label:"Run Analytics",icon:vu,enabled:((Lt=S==null?void 0:S.analytics)==null?void 0:Lt.enabled)??!1},{id:"pr-resolver",label:"Run PR Resolver",icon:mh,enabled:((ts=S==null?void 0:S.prResolver)==null?void 0:ts.enabled)??!1},{id:"merger",label:"Run Merger",icon:yu,enabled:((Is=S==null?void 0:S.merger)==null?void 0:Is.enabled)??!1},{id:"manager",label:"Run Manager",icon:fh,enabled:((Qs=S==null?void 0:S.manager)==null?void 0:Qs.enabled)??!1}].map(oe=>s.jsxs("button",{onClick:()=>An(oe.id),disabled:E===oe.id||!oe.enabled,className:`w-full flex items-center justify-between p-3 rounded-lg text-sm transition-colors group disabled:cursor-not-allowed ${oe.enabled?"text-slate-300 hover:bg-slate-800/40":"text-slate-600 opacity-50"}`,children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx(oe.icon,{className:`h-4 w-4 ${oe.enabled?"text-slate-500 group-hover:text-indigo-400":"text-slate-700"}`}),oe.label]}),E===oe.id?s.jsx(pc,{className:"h-3 w-3 animate-spin text-indigo-400"}):oe.enabled?s.jsx(xn,{className:"h-3 w-3 opacity-0 group-hover:opacity-100 transition-all fill-current text-indigo-400"}):s.jsx("span",{className:"text-[10px] text-slate-600 uppercase tracking-wider",children:"Off"})]},oe.id))})]})]})]}),Ws=S?s.jsx(Uw,{form:{cronSchedule:S.cronSchedule,reviewerSchedule:S.reviewerSchedule,qa:S.qa,audit:S.audit,analytics:S.analytics,roadmapScanner:{...S.roadmapScanner,slicerSchedule:S.roadmapScanner.slicerSchedule??Gr().slicerSchedule},prResolver:S.prResolver,merger:S.merger,manager:S.manager},scheduleMode:ae,selectedTemplateId:ge,onFieldChange:(oe,ye)=>{St(oe,ye)},onSwitchToTemplate:oa,onSwitchToCustom:Ma,onApplyTemplate:ua}):null,Xr=[{id:"overview",label:"Overview",content:Zs},{id:"schedules",label:"Schedules",content:Ws},{id:"jobs",label:"Jobs",content:S?s.jsx(Hw,{form:S,updateField:St,handleRoadmapToggle:yn,presetOptions:zn,expandedJob:q,onExpandedJobChange:G,onOpenSchedule:$a}):null}];return s.jsxs("div",{className:"max-w-6xl mx-auto space-y-6 pb-20",children:[s.jsxs("div",{className:"flex flex-col md:flex-row md:items-center justify-between gap-6",children:[s.jsxs("div",{children:[s.jsxs("h2",{className:"text-2xl font-bold text-slate-100 flex items-center gap-3",children:["Automation",s.jsx(Tt,{variant:yt?"warning":"success",className:"px-3 py-1 text-xs uppercase tracking-wider",children:yt?"Paused":"Active"})]}),s.jsx("p",{className:"text-sm text-slate-400 mt-1",children:"Manage automation overview, schedules, jobs, and live queue"})]}),s.jsx(Le,{variant:yt?"primary":"outline",size:"lg",className:yt?"bg-emerald-600 hover:bg-emerald-700":"border-slate-700 hover:bg-slate-800",onClick:bn,loading:h,children:yt?s.jsxs(s.Fragment,{children:[s.jsx(xn,{className:"h-5 w-5 mr-2 fill-current"})," Resume Scheduling"]}):s.jsxs(s.Fragment,{children:[s.jsx(ou,{className:"h-5 w-5 mr-2"})," Pause Scheduling"]})})]}),s.jsx(Mp,{tabs:Xr,activeTab:w,onChange:H}),P&&s.jsx("div",{className:"fixed bottom-8 left-1/2 -translate-x-1/2 z-50 w-full max-w-2xl px-4 animate-in fade-in slide-in-from-bottom-4 duration-300",children:s.jsxs("div",{className:"bg-slate-900/90 backdrop-blur-md border border-indigo-500/30 rounded-2xl p-4 shadow-2xl flex items-center justify-between shadow-indigo-500/10",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"p-2 rounded-lg bg-indigo-500/20 text-indigo-400",children:s.jsx(Ps,{className:"h-5 w-5"})}),s.jsxs("div",{children:[s.jsx("div",{className:"text-sm font-semibold text-slate-200",children:"Unsaved changes"}),s.jsx("div",{className:"text-[11px] text-slate-400",children:"Save to apply and reinstall cron schedules"})]})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsxs(Le,{variant:"ghost",size:"sm",onClick:vn,className:"text-slate-400",children:[s.jsx(ph,{className:"h-4 w-4 mr-1.5"}),"Reset"]}),s.jsxs(Le,{variant:"primary",size:"sm",onClick:ma,loading:he,children:[s.jsx(gp,{className:"h-4 w-4 mr-1.5"}),"Save"]})]})]})})]})},Zw=({isOpen:n,onClose:r,title:o,children:u})=>(z.useEffect(()=>{const h=f=>{f.key==="Escape"&&r()};return n&&(document.addEventListener("keydown",h),document.body.style.overflow="hidden"),()=>{document.removeEventListener("keydown",h),document.body.style.overflow="unset"}},[n,r]),n?g1.createPortal(s.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4 sm:p-6",children:[s.jsx("div",{className:"fixed inset-0 bg-black/70 backdrop-blur-sm transition-opacity",onClick:r,"aria-hidden":"true"}),s.jsxs("div",{className:"relative w-full max-w-2xl transform rounded-xl bg-slate-900 border border-slate-800 shadow-2xl transition-all flex flex-col max-h-[90vh]",children:[s.jsxs("div",{className:"flex items-center justify-between border-b border-slate-800 px-6 py-4",children:[s.jsx("h3",{className:"text-lg font-semibold text-slate-100",children:o}),s.jsx("button",{onClick:r,className:"rounded-full p-1 text-slate-400 hover:bg-slate-800 hover:text-slate-300 focus:outline-none focus:ring-2 focus:ring-indigo-500",children:s.jsx(Qr,{className:"h-5 w-5"})})]}),s.jsx("div",{className:"flex-1 overflow-y-auto px-6 py-6 text-slate-300",children:u})]})]}),document.body):null),Ww=n=>["TOKEN","SECRET","KEY","PASSWORD","AUTH","API_KEY"].some(o=>n.toUpperCase().includes(o)),Iw=({value:n,isSensitive:r})=>{const[o,u]=ze.useState(!1);return r?s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{className:"text-sm text-slate-300 font-mono",children:o?n:"***********"}),s.jsx("button",{type:"button",onClick:()=>u(!o),className:"text-slate-500 hover:text-slate-300","aria-label":o?"Hide sensitive value":"Show sensitive value",title:o?"Hide sensitive value":"Show sensitive value",children:o?s.jsx(rj,{className:"h-4 w-4"}):s.jsx(hh,{className:"h-4 w-4"})})]}):s.jsx("span",{className:"text-sm text-slate-300 font-mono truncate max-w-xs",children:n})},iv=({envVars:n,onChange:r,compact:o=!1})=>{const[u,h]=ze.useState(""),[f,b]=ze.useState(""),[j,y]=ze.useState(null),[x,E]=ze.useState(""),{addToast:M}=Zt(),D=()=>{if(u.trim()){if(!/^[A-Z_][A-Z0-9_]*$/.test(u)){M({title:"Invalid Key Format",message:"Key must be uppercase with underscores (e.g., API_KEY)",type:"error"});return}r({...n,[u]:f}),h(""),b("")}},A=L=>{const J={...n};delete J[L],r(J)},N=L=>{y(L),E(n[L]??"")},O=()=>{j&&(r({...n,[j]:x}),y(null),E(""))},R=()=>{y(null),E("")},W=Object.entries(n);return s.jsxs("div",{className:"space-y-4",children:[!o&&s.jsx("div",{className:"text-sm text-slate-400 mb-4",children:"Configure environment variables passed to the provider CLI (API keys, base URLs)"}),s.jsx("div",{className:"space-y-2",children:W.length===0?s.jsx("p",{className:"text-slate-500 text-sm italic",children:"No environment variables configured."}):W.map(([L,J])=>s.jsxs("div",{className:"flex items-center justify-between p-3 rounded-md border border-slate-800 bg-slate-950/40",children:[s.jsxs("div",{className:"flex items-center gap-4 flex-1 min-w-0",children:[s.jsx("span",{className:"text-sm font-mono text-indigo-400 w-48 truncate",children:L}),j===L?s.jsxs("div",{className:"flex items-center gap-2 flex-1",children:[s.jsx("input",{type:"text",value:x,onChange:w=>E(w.target.value),className:"flex-1 bg-slate-800 border border-slate-700 rounded px-2 py-1 text-sm text-slate-200"}),s.jsx("button",{type:"button",onClick:O,className:"p-1 text-green-400 hover:text-green-300","aria-label":`Save ${L} value`,title:`Save ${L} value`,children:s.jsx(z1,{className:"h-4 w-4"})}),s.jsx("button",{type:"button",onClick:R,className:"p-1 text-slate-400 hover:text-slate-300","aria-label":`Cancel editing ${L}`,title:`Cancel editing ${L}`,children:s.jsx(Qr,{className:"h-4 w-4"})})]}):s.jsx(Iw,{value:J,isSensitive:Ww(L)})]}),j!==L&&s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("button",{type:"button",onClick:()=>N(L),className:"p-1 text-slate-400 hover:text-slate-200","aria-label":`Edit ${L}`,title:`Edit ${L}`,children:s.jsx(bu,{className:"h-4 w-4"})}),s.jsx("button",{type:"button",onClick:()=>A(L),className:"p-1 text-red-400 hover:text-red-300","aria-label":`Delete ${L}`,title:`Delete ${L}`,children:s.jsx(Fs,{className:"h-4 w-4"})})]})]},L))}),s.jsxs("div",{className:`flex items-end gap-3 ${o?"":"pt-4 border-t border-slate-800"}`,children:[s.jsxs("div",{className:"flex-1",children:[!o&&s.jsx("label",{className:"block text-xs font-medium text-slate-500 mb-1",children:"Key"}),s.jsx("input",{type:"text",value:u,onChange:L=>h(L.target.value.toUpperCase()),placeholder:o?"ENV_VAR_NAME":"e.g., ANTHROPIC_BASE_URL",className:"w-full bg-slate-800 border border-slate-700 rounded px-3 py-2 text-sm text-slate-200 placeholder-slate-500"})]}),s.jsxs("div",{className:"flex-1",children:[!o&&s.jsx("label",{className:"block text-xs font-medium text-slate-500 mb-1",children:"Value"}),s.jsx("input",{type:"text",value:f,onChange:L=>b(L.target.value),placeholder:o?"value":"e.g., https://api.example.com",className:"w-full bg-slate-800 border border-slate-700 rounded px-3 py-2 text-sm text-slate-200 placeholder-slate-500"})]}),s.jsxs(Le,{onClick:D,disabled:!u.trim(),size:o?"sm":"md",children:[s.jsx(Kl,{className:"h-4 w-4 mr-1"}),"Add"]})]})]})};function Qw(n,r){var o;return!!(n!=null&&n.startsWith("glm-")||(o=r==null?void 0:r.model)!=null&&o.startsWith("glm-"))}function Xw(n,r){var o,u;return Qw(n,r)?!((u=(o=r==null?void 0:r.envVars)==null?void 0:o.ANTHROPIC_API_KEY)!=null&&u.trim()):!1}const _x={claude:{name:"Claude",command:"claude",promptFlag:"-p",autoApproveFlag:"--dangerously-skip-permissions"},codex:{name:"Codex",command:"codex",subcommand:"exec",autoApproveFlag:"--yolo",workdirFlag:"-C"},custom:{name:"",command:""}},Jw=({isOpen:n,onClose:r,onSave:o,presetId:u,preset:h,isBuiltIn:f,existingIds:b})=>{const[j,y]=ze.useState(""),[x,E]=ze.useState({name:"",command:"",subcommand:"",promptFlag:"",autoApproveFlag:"",workdirFlag:"",modelFlag:"",model:"",envVars:{}}),[M,D]=ze.useState(!1),[A,N]=ze.useState("custom"),[O,R]=ze.useState(null),W=Xw(u??j,x);ze.useEffect(()=>{n&&(u&&h?(y(u),E({name:h.name,command:h.command,subcommand:h.subcommand??"",promptFlag:h.promptFlag??"",autoApproveFlag:h.autoApproveFlag??"",workdirFlag:h.workdirFlag??"",modelFlag:h.modelFlag??"",model:h.model??"",envVars:h.envVars??{}}),u==="claude"||h.command==="claude"?N("claude"):u==="codex"||h.command==="codex"?N("codex"):N("custom")):(y(""),E({name:"",command:"",subcommand:"",promptFlag:"",autoApproveFlag:"",workdirFlag:"",modelFlag:"",model:"",envVars:{}}),N("custom")),R(null),D(!!(h!=null&&h.envVars&&Object.keys(h.envVars).length>0)))},[n,u,h]);const L=q=>{if(N(q),q!=="custom"&&_x[q]){const G=_x[q];E(Z=>({...Z,...G,envVars:Z.envVars})),!u&&!j&&y(q)}},J=(q,G)=>{E(Z=>({...Z,[q]:G})),R(null)},w=()=>{if(!x.name.trim())return R("Name is required"),!1;if(!x.command.trim())return R("Command is required"),!1;if(!u){if(!j.trim())return R("Preset ID is required"),!1;if(!/^[a-z0-9_-]+$/.test(j))return R("Preset ID must be lowercase letters, numbers, hyphens, and underscores only"),!1;if(b.includes(j))return R("A preset with this ID already exists"),!1}return!0},H=()=>{var G,Z,le,S,te,ae;if(!w())return;const q={name:x.name.trim(),command:x.command.trim()};(G=x.subcommand)!=null&&G.trim()&&(q.subcommand=x.subcommand.trim()),(Z=x.promptFlag)!=null&&Z.trim()&&(q.promptFlag=x.promptFlag.trim()),(le=x.autoApproveFlag)!=null&&le.trim()&&(q.autoApproveFlag=x.autoApproveFlag.trim()),(S=x.workdirFlag)!=null&&S.trim()&&(q.workdirFlag=x.workdirFlag.trim()),(te=x.modelFlag)!=null&&te.trim()&&(q.modelFlag=x.modelFlag.trim()),(ae=x.model)!=null&&ae.trim()&&(q.model=x.model.trim()),x.envVars&&Object.keys(x.envVars).length>0&&(q.envVars=x.envVars),o(u||j,q),r()};return s.jsx(Zw,{isOpen:n,onClose:r,title:u?`Edit Preset: ${h==null?void 0:h.name}`:"Add Provider Preset",children:s.jsxs("div",{className:"space-y-6",children:[O&&s.jsx("div",{className:"p-3 rounded-md bg-red-500/10 border border-red-500/20 text-red-400 text-sm",children:O}),W&&s.jsx("div",{className:"p-3 rounded-md bg-amber-500/10 border border-amber-500/20 text-amber-300 text-sm",children:s.jsxs("div",{className:"flex items-start gap-2",children:[s.jsx(Ps,{className:"h-4 w-4 shrink-0 mt-0.5"}),s.jsxs("div",{children:[s.jsx("div",{className:"font-medium",children:"GLM presets require `ANTHROPIC_API_KEY`."}),s.jsx("div",{className:"text-amber-200/80",children:"Add `ANTHROPIC_API_KEY` in Environment Variables before using this preset."})]})]})}),!f&&s.jsx("div",{children:s.jsx(Xe,{label:"Template",value:A,onChange:L,options:[{label:"Start from scratch",value:"custom"},{label:"Claude (Anthropic)",value:"claude"},{label:"Codex (OpenAI)",value:"codex"}],helperText:"Start with a pre-configured template or customize from scratch"})}),!u&&s.jsx(Ee,{label:"Preset ID",value:j,onChange:q=>y(q.target.value.toLowerCase().replace(/[^a-z0-9_-]/g,"")),placeholder:"e.g., my-custom-provider",helperText:"Unique identifier for this preset (lowercase, numbers, hyphens, underscores)"}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[s.jsx(Ee,{label:"Display Name",value:x.name,onChange:q=>J("name",q.target.value),placeholder:"e.g., My Custom Provider",required:!0}),s.jsx(Ee,{label:"Command",value:x.command,onChange:q=>J("command",q.target.value),placeholder:"e.g., claude, codex, npx",required:!0})]}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[s.jsx(Ee,{label:"Model",value:x.model??"",onChange:q=>J("model",q.target.value),placeholder:"e.g., claude-opus-4-6",helperText:"Default model to use"}),s.jsx(Ee,{label:"Model Flag",value:x.modelFlag??"",onChange:q=>J("modelFlag",q.target.value),placeholder:"e.g., --model",helperText:"Flag for specifying the model"})]}),s.jsxs("div",{className:"border-t border-slate-800 pt-4",children:[s.jsxs("button",{type:"button",onClick:()=>D(!M),className:"flex items-center gap-2 text-sm text-slate-400 hover:text-slate-200 transition-colors",children:[M?s.jsx($1,{className:"h-4 w-4"}):s.jsx(dh,{className:"h-4 w-4"}),"Advanced Options"]}),M&&s.jsxs("div",{className:"mt-4 space-y-4",children:[s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[s.jsx(Ee,{label:"Subcommand",value:x.subcommand??"",onChange:q=>J("subcommand",q.target.value),placeholder:"e.g., exec",helperText:"Subcommand after base command"}),s.jsx(Ee,{label:"Prompt Flag",value:x.promptFlag??"",onChange:q=>J("promptFlag",q.target.value),placeholder:"e.g., -p",helperText:"Flag for passing the prompt"})]}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[s.jsx(Ee,{label:"Auto-Approve Flag",value:x.autoApproveFlag??"",onChange:q=>J("autoApproveFlag",q.target.value),placeholder:"e.g., --dangerously-skip-permissions",helperText:"Flag to enable auto-approve mode"}),s.jsx(Ee,{label:"Workdir Flag",value:x.workdirFlag??"",onChange:q=>J("workdirFlag",q.target.value),placeholder:"e.g., -C",helperText:"Flag for setting working directory"})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-slate-400 mb-2",children:"Environment Variables"}),s.jsx(iv,{envVars:x.envVars??{},onChange:q=>J("envVars",q),compact:!0})]})]})]}),s.jsxs("div",{className:"flex justify-end gap-3 pt-4 border-t border-slate-800",children:[s.jsx(Le,{variant:"ghost",onClick:r,children:"Cancel"}),s.jsx(Le,{onClick:H,children:u?"Save Changes":"Add Preset"})]})]})})},Kw=({form:n,updateField:r,projectName:o,doctorChecks:u,doctorLoading:h})=>s.jsxs("div",{className:"space-y-6",children:[s.jsx(et,{className:"p-6 space-y-6",children:s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200",children:"Project Configuration"}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6 mt-4",children:[s.jsx(Ee,{label:"Project Name",value:o,disabled:!0}),s.jsx(Ee,{label:"Default Branch",value:n.defaultBranch,onChange:f=>r("defaultBranch",f.target.value)}),s.jsx(Ee,{label:"PRD Directory",value:n.prdDir,onChange:f=>r("prdDir",f.target.value),helperText:"Directory containing PRD files (relative to project root)"}),s.jsx(Ee,{label:"Branch Prefix",value:n.branchPrefix,onChange:f=>r("branchPrefix",f.target.value)}),s.jsx(Ee,{label:"Templates Directory",value:n.templatesDir,onChange:f=>r("templatesDir",f.target.value),helperText:"Directory for custom template overrides"}),s.jsx(Ee,{label:"Max Log Size",type:"number",value:String(n.maxLogSize),onChange:f=>r("maxLogSize",Number(f.target.value||0)),rightIcon:s.jsx("span",{className:"text-xs",children:"bytes"}),helperText:"Maximum size for process log files"})]}),s.jsxs("div",{className:"pt-4 mt-4 border-t border-slate-800 space-y-6",children:[s.jsxs("div",{className:"rounded-lg border border-slate-800 bg-slate-900/40 p-4",children:[s.jsx(Gt,{checked:n.gitPushNoVerify,onChange:f=>r("gitPushNoVerify",f),label:"Use --no-verify on automated pushes"}),s.jsx("p",{className:"mt-2 text-sm text-slate-500",children:"Project-scoped. Bypasses local pre-push hooks for Night Watch controller and agent pushes in repos whose hooks block automation."})]}),s.jsx(gc,{label:"Branch Patterns",value:n.branchPatterns,onChange:f=>r("branchPatterns",f),placeholder:"e.g., feat/",helpText:"Branch patterns matched by reviewer and related automation jobs"}),s.jsx(gc,{label:"PRD Priority",value:n.prdPriority,onChange:f=>r("prdPriority",f),placeholder:"e.g., feature-x",helpText:"PRDs matching these names are executed first"})]})]})}),s.jsxs(et,{className:"divide-y divide-slate-800",children:[s.jsxs("div",{className:"p-4 flex items-center gap-2",children:[s.jsx(op,{className:"h-4 w-4 text-indigo-500"}),s.jsx("h3",{className:"text-base font-medium text-slate-200",children:"System Health"})]}),h?s.jsx("div",{className:"p-4 text-sm text-slate-500",children:"Loading health checks..."}):u.map((f,b)=>{const j=f.status==="pass",y=f.status==="warn",x=j?"bg-green-500/10 text-green-400 border-green-500/20":y?"bg-amber-500/10 text-amber-400 border-amber-500/20":"bg-red-500/10 text-red-400 border-red-500/20";return s.jsxs("div",{className:"p-4 flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("p",{className:"text-sm font-medium text-slate-200",children:f.name}),s.jsx("p",{className:"text-xs text-slate-500",children:f.detail})]}),s.jsx("span",{className:`inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium border ${x}`,children:f.status.toUpperCase()})]},`${f.name}-${b}`)})]})]}),zx=({presetId:n,preset:r,isBuiltIn:o,onEdit:u,onDelete:h,onReset:f})=>{var x,E,M;const b=r.envVars?Object.keys(r.envVars).length:0,y=(n.startsWith("glm-")||((x=r.model)==null?void 0:x.startsWith("glm-")))&&!((M=(E=r.envVars)==null?void 0:E.ANTHROPIC_API_KEY)!=null&&M.trim());return s.jsxs("div",{className:"flex flex-col p-4 rounded-lg border border-slate-800 bg-slate-950/40 hover:border-slate-700 transition-colors",children:[s.jsxs("div",{className:"flex items-start justify-between gap-2 mb-3",children:[s.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[s.jsx("h4",{className:"text-sm font-medium text-slate-200",children:r.name}),o&&s.jsx(Tt,{variant:"info",className:"text-[10px]",children:"Built-in"}),y&&s.jsxs("span",{className:"flex items-center gap-1 px-1.5 py-0.5 rounded text-[10px] bg-amber-900/40 text-amber-400 border border-amber-800/50",title:"GLM presets require ANTHROPIC_API_KEY in env vars",children:[s.jsx(Ps,{className:"h-3 w-3"}),"Missing ANTHROPIC_API_KEY"]})]}),s.jsxs("div",{className:"flex items-center gap-1",children:[s.jsx("button",{type:"button",onClick:u,className:"p-1.5 text-slate-400 hover:text-slate-200 hover:bg-slate-800 rounded transition-colors","aria-label":`Edit ${r.name} preset`,title:"Edit preset",children:s.jsx(bu,{className:"h-4 w-4"})}),o?f&&s.jsx("button",{type:"button",onClick:f,className:"p-1.5 text-slate-400 hover:text-indigo-400 hover:bg-slate-800 rounded transition-colors","aria-label":`Reset ${r.name} to defaults`,title:"Reset to defaults",children:s.jsx(ph,{className:"h-4 w-4"})}):h&&s.jsx("button",{type:"button",onClick:h,className:"p-1.5 text-slate-400 hover:text-red-400 hover:bg-slate-800 rounded transition-colors","aria-label":`Delete ${r.name} preset`,title:"Delete preset",children:s.jsx(Fs,{className:"h-4 w-4"})})]})]}),s.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[s.jsx("span",{className:"text-xs text-slate-500",children:"Command:"}),s.jsxs("code",{className:"px-2 py-0.5 bg-slate-800 rounded text-xs text-indigo-400 font-mono",children:[r.command,r.subcommand&&` ${r.subcommand}`]})]}),r.model&&s.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[s.jsx("span",{className:"text-xs text-slate-500",children:"Model:"}),s.jsx(Tt,{variant:"neutral",className:"text-[10px] font-mono",children:r.model})]}),s.jsxs("div",{className:"flex items-center gap-3 mt-auto pt-2 border-t border-slate-800/50",children:[s.jsxs("span",{className:"text-xs text-slate-600 font-mono",children:["id: ",n]}),b>0&&s.jsxs("span",{className:"text-xs text-slate-500",children:[b," env var",b!==1?"s":""]})]})]})},eh={0:"Su",1:"Mo",2:"Tu",3:"We",4:"Th",5:"Fr",6:"Sa"},th={executor:"Executor",reviewer:"Reviewer",qa:"QA",audit:"Audit",slicer:"Planner",analytics:"Analytics",planner:"Planner","pr-resolver":"PR Resolver",merger:"Merger",manager:"Manager"},Pf={label:"",presetId:"",days:[1,2,3,4,5],startTime:"23:00",endTime:"04:00",jobTypes:null,enabled:!0},Lx=({override:n,onChange:r,onSave:o,onCancel:u,isNew:h,presetOptions:f})=>{const b=N=>{const O=n.days.includes(N)?n.days.filter(R=>R!==N):[...n.days,N].sort((R,W)=>R-W);r({...n,days:O})},j=()=>{r({...n,days:[1,2,3,4,5]})},y=()=>{r({...n,days:[0,6]})},x=()=>{r({...n,days:[0,1,2,3,4,5,6]})},E=()=>{r({...n,jobTypes:null})},M=N=>{const O=n.jobTypes??[],R=O.includes(N)?O.filter(W=>W!==N):[...O,N];r({...n,jobTypes:R.length===0?null:R})},D=n.jobTypes===null||n.jobTypes===void 0,A=n.label.trim().length>0&&n.presetId.trim().length>0&&n.days.length>0&&n.startTime.trim().length>0&&n.endTime.trim().length>0;return s.jsxs("div",{className:"p-4 rounded-md border border-slate-700 bg-slate-900/50 space-y-4",children:[s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[s.jsx(Ee,{label:"Label",value:n.label,onChange:N=>r({...n,label:N.target.value}),placeholder:"e.g., Night Hours",required:!0}),s.jsx(Xe,{label:"Provider",value:n.presetId,onChange:N=>r({...n,presetId:N}),options:f})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-slate-400 mb-2",children:"Days"}),s.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[Object.keys(eh).map(N=>s.jsx("button",{type:"button",onClick:()=>b(N),className:`w-10 h-10 rounded-md text-sm font-medium transition-colors ${n.days.includes(N)?"bg-indigo-600 text-white":"bg-slate-800 text-slate-400 hover:bg-slate-700"}`,children:eh[N]},N)),s.jsxs("div",{className:"flex gap-1 ml-2",children:[s.jsx("button",{type:"button",onClick:j,className:"px-3 py-2 text-xs rounded-md bg-slate-800 text-slate-400 hover:bg-slate-700 transition-colors",children:"Weekdays"}),s.jsx("button",{type:"button",onClick:y,className:"px-3 py-2 text-xs rounded-md bg-slate-800 text-slate-400 hover:bg-slate-700 transition-colors",children:"Weekend"}),s.jsx("button",{type:"button",onClick:x,className:"px-3 py-2 text-xs rounded-md bg-slate-800 text-slate-400 hover:bg-slate-700 transition-colors",children:"All"})]})]})]}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-slate-400 mb-2",children:"Start Time"}),s.jsx("input",{type:"time",value:n.startTime,onChange:N=>r({...n,startTime:N.target.value}),className:"w-full h-10 px-3 rounded-md bg-slate-800 border border-slate-700 text-slate-200 text-sm focus:outline-none focus:ring-2 focus:ring-indigo-500"})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-slate-400 mb-2",children:"End Time"}),s.jsx("input",{type:"time",value:n.endTime,onChange:N=>r({...n,endTime:N.target.value}),className:"w-full h-10 px-3 rounded-md bg-slate-800 border border-slate-700 text-slate-200 text-sm focus:outline-none focus:ring-2 focus:ring-indigo-500"})]})]}),s.jsxs("div",{children:[s.jsxs("div",{className:"flex items-center justify-between mb-2",children:[s.jsx("label",{className:"block text-sm font-medium text-slate-400",children:"Job Types"}),s.jsx("button",{type:"button",onClick:E,className:"text-xs text-indigo-400 hover:text-indigo-300 transition-colors",children:D?"All Jobs Selected":"Select All Jobs"})]}),s.jsx("div",{className:"flex flex-wrap gap-2",children:Object.keys(th).filter(N=>N!=="planner").map(N=>{var R;const O=D||(((R=n.jobTypes)==null?void 0:R.includes(N))??!1);return s.jsx("button",{type:"button",onClick:()=>M(N),className:`px-3 py-1.5 rounded-md text-sm transition-colors ${O?"bg-indigo-600 text-white":"bg-slate-800 text-slate-400 hover:bg-slate-700"}`,disabled:D,children:th[N]},N)})}),D&&s.jsx("p",{className:"text-xs text-slate-500 mt-1",children:"This override applies to all job types."})]}),s.jsx("div",{className:"flex items-center gap-2",children:s.jsx(Gt,{checked:n.enabled,onChange:N=>r({...n,enabled:N}),label:"Enabled"})}),s.jsxs("div",{className:"flex justify-end gap-2 pt-2",children:[s.jsx(Le,{variant:"ghost",onClick:u,children:"Cancel"}),s.jsx(Le,{onClick:o,disabled:!A,children:h?"Add Override":"Save Changes"})]})]})},eS=({overrides:n,onChange:r,presetOptions:o})=>{const[u,h]=ze.useState(null),[f,b]=ze.useState(!1),[j,y]=ze.useState(Pf),x=()=>{r([...n,j]),y({...Pf}),b(!1)},E=(R,W)=>{const L=[...n];L[R]=W,r(L)},M=R=>{window.confirm("Are you sure you want to delete this schedule override?")&&r(n.filter((W,L)=>L!==R))},D=R=>{const W=[...n];W[R]={...W[R],enabled:!W[R].enabled},r(W)},A=R=>R.length===7?"Every day":R.length===5&&R.every(W=>W>=1&&W<=5)?"Weekdays":R.length===2&&R.includes(0)&&R.includes(6)?"Weekends":R.map(W=>eh[W]).join(", "),N=R=>!R||R.length===0?"All Jobs":R.map(W=>th[W]).join(", "),O=R=>{const W=o.find(L=>L.value===R);return(W==null?void 0:W.label)||R};return s.jsxs("div",{className:"space-y-4",children:[s.jsx("div",{className:"space-y-3",children:n.length===0?s.jsx("p",{className:"text-slate-500 text-sm italic",children:"No schedule overrides configured."}):n.map((R,W)=>s.jsx("div",{children:u===W?s.jsx(Lx,{override:R,onChange:L=>E(W,L),onSave:()=>h(null),onCancel:()=>h(null),presetOptions:o}):s.jsxs("div",{className:`flex items-start justify-between p-4 rounded-md border bg-slate-950/40 ${R.enabled?"border-slate-800":"border-slate-800/50 opacity-60"}`,children:[s.jsxs("div",{className:"flex-1",children:[s.jsxs("div",{className:"flex items-center gap-3 mb-1",children:[s.jsx(Gt,{checked:R.enabled,onChange:()=>D(W)}),s.jsx("span",{className:"text-slate-100 font-medium",children:R.label})]}),s.jsxs("div",{className:"text-sm text-slate-400 ml-11",children:[s.jsx("span",{className:"text-indigo-400",children:O(R.presetId)})," · ",A(R.days)," · ",R.startTime," - ",R.endTime," · ",N(R.jobTypes)]})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("button",{type:"button",onClick:()=>h(W),className:"p-2 text-slate-400 hover:text-slate-200","aria-label":`Edit ${R.label}`,title:`Edit ${R.label}`,children:s.jsx(bu,{className:"h-4 w-4"})}),s.jsx("button",{type:"button",onClick:()=>M(W),className:"p-2 text-red-400 hover:text-red-300","aria-label":`Delete ${R.label}`,title:`Delete ${R.label}`,children:s.jsx(Fs,{className:"h-4 w-4"})})]})]})},W))}),f?s.jsx(Lx,{override:j,onChange:y,onSave:x,onCancel:()=>{b(!1),y({...Pf})},isNew:!0,presetOptions:o}):s.jsxs(Le,{variant:"ghost",onClick:()=>b(!0),children:[s.jsx(Kl,{className:"h-4 w-4 mr-2"}),"Add Schedule Override"]})]})},tS=({form:n,updateField:r,getAllPresets:o,getPresetOptions:u,handleEditPreset:h,handleDeletePreset:f,handleResetPreset:b,handleAddPreset:j})=>s.jsxs("div",{className:"space-y-6",children:[s.jsx(et,{className:"p-6 bg-slate-900/60 border-indigo-500/20",children:s.jsxs("div",{className:"flex flex-col md:flex-row md:items-center justify-between gap-4",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-medium text-slate-100",children:"Global AI Provider"}),s.jsx("p",{className:"text-sm text-slate-400 mt-1",children:"Default preset for all automation tasks"})]}),s.jsx("div",{className:"w-full md:w-72",children:s.jsx(Xe,{value:n.provider,onChange:y=>r("provider",y),options:u(n.providerPresets)})})]})}),s.jsxs(et,{className:"p-6 space-y-6",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200",children:"Available Presets"}),s.jsx("p",{className:"text-sm text-slate-400 mt-1",children:"Custom AI models and environment configurations"})]}),s.jsxs(Le,{onClick:j,variant:"primary",size:"sm",children:[s.jsx(Kl,{className:"h-4 w-4 mr-2"}),"Add Provider"]})]}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:[mu.map(y=>{const E=o()[y];return E?s.jsx(zx,{presetId:y,preset:E,isBuiltIn:!0,onEdit:()=>h(y),onReset:()=>b(y)},y):null}),Object.entries(n.providerPresets).filter(([y])=>!mu.includes(y)).map(([y,x])=>s.jsx(zx,{presetId:y,preset:x,isBuiltIn:!1,onEdit:()=>h(y),onDelete:()=>f(y)},y))]})]}),s.jsxs(et,{className:"p-6 space-y-6",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200",children:"Reliability & Fallbacks"}),s.jsx("p",{className:"text-sm text-slate-400 mt-1",children:"Configure automated fallback when a provider is rate-limited"})]}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsx(Xe,{label:"Primary Native Fallback",value:n.primaryFallbackModel,onChange:y=>r("primaryFallbackModel",y),options:[{label:"— None —",value:""},{label:"Claude Sonnet 4.6",value:"sonnet"},{label:"Claude Opus 4.6",value:"opus"}],helperText:"Used only when no primary fallback preset is configured"}),s.jsx(Xe,{label:"Secondary Native Fallback",value:n.secondaryFallbackModel,onChange:y=>r("secondaryFallbackModel",y),options:[{label:"— None —",value:""},{label:"Claude Sonnet 4.6",value:"sonnet"},{label:"Claude Opus 4.6",value:"opus"}],helperText:"Tried only if the primary native fallback also rate-limits"}),s.jsx(Xe,{label:"Primary Fallback Preset",value:n.primaryFallbackPreset,onChange:y=>r("primaryFallbackPreset",y),options:[{label:"— None —",value:""},...Object.entries(o()).map(([y,x])=>({label:x.name,value:y}))],helperText:"Automatic switch when global provider is throttled"}),s.jsx(Xe,{label:"Secondary Fallback Preset",value:n.secondaryFallbackPreset,onChange:y=>r("secondaryFallbackPreset",y),options:[{label:"— None —",value:""},...Object.entries(o()).map(([y,x])=>({label:x.name,value:y}))]})]})]}),s.jsxs(et,{className:"p-6 space-y-6",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200",children:"Scheduled Overrides"}),s.jsx("p",{className:"text-sm text-slate-400 mt-1",children:"Automatically switch providers based on the time of day (e.g. use cheaper models at night)"})]}),s.jsx(eS,{overrides:n.providerScheduleOverrides,onChange:y=>r("providerScheduleOverrides",y),presetOptions:Object.entries(o()).map(([y,x])=>({label:x.name,value:y}))})]}),s.jsxs(et,{className:"p-6",children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200 mb-2",children:"Global Environment Variables"}),s.jsx("p",{className:"text-sm text-slate-400 mb-4",children:"Variables passed to all provider CLI executions"}),s.jsx(iv,{envVars:n.providerEnv,onChange:y=>r("providerEnv",y)})]})]});function Ux(n){return n.type==="telegram"?`telegram:${n.botToken}:${n.chatId}`:`${n.type}:${n.url}`}const aS=[{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:"Merge Completed",value:"merge_completed"},{label:"Merge Failed",value:"merge_failed"},{label:"Rate Limit Fallback",value:"rate_limit_fallback"},{label:"QA Completed",value:"qa_completed"}],nS=(n,r)=>n.includes(r)?n.filter(o=>o!==r):[...n,r],Hx=({webhook:n,onChange:r,onSave:o,onCancel:u,isNew:h})=>s.jsxs("div",{className:"p-4 rounded-md border border-slate-700 bg-slate-900/50 space-y-4",children:[s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[s.jsx(Xe,{label:"Type",value:n.type,onChange:f=>{const b=f;r(b==="telegram"?{type:b,botToken:"",chatId:"",events:n.events}:{type:b,url:"",events:n.events})},options:[{label:"Slack",value:"slack"},{label:"Discord",value:"discord"},{label:"Telegram",value:"telegram"}]}),n.type==="telegram"?s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"relative",children:s.jsx(Ee,{label:"Bot Token",type:"password",value:n.botToken||"",onChange:f=>r({...n,botToken:f.target.value}),placeholder:"123456789:ABCdefGHIjklMNOpqrsTUVwxyz"})}),s.jsx(Ee,{label:"Chat ID",value:n.chatId||"",onChange:f=>r({...n,chatId:f.target.value}),placeholder:"123456789"})]}):s.jsx("div",{className:"md:col-span-2",children:s.jsx(Ee,{label:"Webhook URL",type:"password",value:n.url||"",onChange:f=>r({...n,url:f.target.value}),placeholder:"https://hooks.slack.com/services/..."})})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-slate-400 mb-2",children:"Events"}),s.jsx("div",{className:"flex flex-wrap gap-2",children:aS.map(f=>s.jsx("button",{type:"button",onClick:()=>r({...n,events:nS(n.events,f.value)}),className:`px-3 py-1.5 rounded-md text-sm transition-colors ${n.events.includes(f.value)?"bg-indigo-600 text-white":"bg-slate-800 text-slate-400 hover:bg-slate-700"}`,children:f.label},f.value))})]}),s.jsxs("div",{className:"flex justify-end gap-2",children:[s.jsx(Le,{variant:"ghost",onClick:u,children:"Cancel"}),s.jsx(Le,{onClick:o,disabled:n.events.length===0||(n.type==="telegram"?!n.botToken||!n.chatId:!n.url),children:h?"Add Webhook":"Save Changes"})]})]}),lS=({notifications:n,onChange:r,globalWebhook:o,onSetGlobal:u,onUnsetGlobal:h})=>{const[f,b]=ze.useState(null),[j,y]=ze.useState(!1),[x,E]=ze.useState({type:"slack",url:"",events:[]}),M=()=>{r({webhooks:[...n.webhooks,x]}),E({type:"slack",url:"",events:[]}),y(!1)},D=(N,O)=>{const R=[...n.webhooks];R[N]=O,r({webhooks:R})},A=N=>{r({webhooks:n.webhooks.filter((O,R)=>R!==N)})};return s.jsxs("div",{className:"space-y-4",children:[s.jsx("div",{className:"text-sm text-slate-400 mb-4",children:"Receive notifications when events occur via Slack, Discord, or Telegram"}),s.jsx("div",{className:"space-y-3",children:n.webhooks.length===0?s.jsx("p",{className:"text-slate-500 text-sm italic",children:"No webhooks configured."}):n.webhooks.map((N,O)=>s.jsx("div",{children:f===O?s.jsx(Hx,{webhook:N,onChange:R=>D(O,R),onSave:()=>b(null),onCancel:()=>b(null)}):s.jsxs("div",{className:"flex items-center justify-between p-4 rounded-md border border-slate-800 bg-slate-950/40",children:[s.jsxs("div",{className:"flex-1",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[s.jsx("span",{className:"text-sm font-medium text-slate-200 capitalize",children:N.type}),N.type==="telegram"&&s.jsxs("span",{className:"text-xs text-slate-500",children:["Chat ID: ",N.chatId]})]}),s.jsx("div",{className:"flex flex-wrap gap-1",children:N.events.map(R=>s.jsx("span",{className:"px-2 py-0.5 bg-slate-800 rounded text-xs text-slate-400",children:R.replace("_"," ")},R))})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[u!==void 0&&(()=>{const R=o!=null&&Ux(N)===Ux(o);return s.jsx("button",{type:"button",onClick:()=>R?h==null?void 0:h():u(N),className:`p-2 transition-colors ${R?"text-indigo-400 hover:text-indigo-300":"text-slate-500 hover:text-slate-300"}`,"aria-label":R?"Global channel (active)":"Set as global channel",title:R?"Global channel (active)":"Set as global channel",children:s.jsx(fj,{className:"h-4 w-4"})})})(),s.jsx("button",{type:"button",onClick:()=>b(O),className:"p-2 text-slate-400 hover:text-slate-200","aria-label":`Edit ${N.type} webhook`,title:`Edit ${N.type} webhook`,children:s.jsx(bu,{className:"h-4 w-4"})}),s.jsx("button",{type:"button",onClick:()=>A(O),className:"p-2 text-red-400 hover:text-red-300","aria-label":`Delete ${N.type} webhook`,title:`Delete ${N.type} webhook`,children:s.jsx(Fs,{className:"h-4 w-4"})})]})]})},O))}),j?s.jsx(Hx,{webhook:x,onChange:E,onSave:M,onCancel:()=>y(!1),isNew:!0}):s.jsxs(Le,{variant:"ghost",onClick:()=>y(!0),children:[s.jsx(Kl,{className:"h-4 w-4 mr-2"}),"Add Webhook"]})]})},qx=[{label:"Executor",value:"executor"},{label:"Reviewer",value:"reviewer"},{label:"QA",value:"qa"},{label:"Audit",value:"audit"},{label:"Slicer / Planner",value:"slicer"},{label:"Analytics",value:"analytics"},{label:"PR Resolver",value:"pr-resolver"},{label:"Merger",value:"merger"}],Vx=[{label:"workflow_run",value:"workflow_run"},{label:"check_suite",value:"check_suite"},{label:"pull_request",value:"pull_request"},{label:"repository_dispatch",value:"repository_dispatch"}];function sS(n){return encodeURIComponent(n.replace(/\//g,"~"))}function rS(){return typeof window>"u"||window.location.origin==="null"?"":window.location.origin}function iS(n){return(n==null?void 0:n.join(", "))??""}function cS(n){const r=n.split(",").map(o=>o.trim()).filter(Boolean);return r.length>0?r:void 0}function oS(n){return{event:"workflow_run",action:"completed",jobId:n}}function uS(n,r,o){const u=n&&r?`/api/projects/${sS(r)}/jobs/${o}/run`:`/api/jobs/${o}/run`;return`${rS()}${u}`}function dS(n){return[`payload='{"source":"manual"}'`,`signature=$(printf '%s' "$payload" | openssl dgst -sha256 -hmac "$NIGHT_WATCH_WEBHOOK_SECRET" | awk '{print $2}')`,`curl -X POST '${n}' \\`," -H 'Content-Type: application/json' \\",' -H "X-Night-Watch-Signature: sha256=$signature" \\',' --data "$payload"'].join(`
|
|
447
|
+
`)}const fS=({form:n,updateField:r,globalWebhook:o,isGlobalMode:u=!1,onSetGlobal:h,onUnsetGlobal:f,selectedProjectId:b})=>{const[j,y]=ze.useState(null),x=n.webhookTriggers,E=x.allowedJobIds[0]??"reviewer",M=uS(u,b,E),D=dS(M),A=w=>{r("webhookTriggers",{...x,...w})},N=w=>{A({github:{...x.github,...w}})},O=w=>{const H=x.allowedJobIds.includes(w)?x.allowedJobIds.filter(q=>q!==w):[...x.allowedJobIds,w];A({allowedJobIds:H})},R=w=>{const H=x.github.events.includes(w)?x.github.events.filter(q=>q!==w):[...x.github.events,w];N({events:H})},W=(w,H)=>{const q=x.github.rules.map((G,Z)=>Z===w?{...G,...H}:G);N({rules:q})},L=w=>{N({rules:x.github.rules.filter((H,q)=>q!==w)})},J=async(w,H)=>{var q;await((q=navigator.clipboard)==null?void 0:q.writeText(w)),y(H),window.setTimeout(()=>y(null),1500)};return s.jsxs("div",{className:"space-y-6",children:[s.jsxs(et,{className:"p-6 space-y-6",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200",children:"Board Provider"}),s.jsx("p",{className:"text-sm text-slate-400 mt-1",children:"Track PRDs and their status using GitHub Projects or local SQLite"})]}),s.jsx(Gt,{checked:n.boardProvider.enabled,onChange:w=>r("boardProvider",{...n.boardProvider,enabled:w})})]}),n.boardProvider.enabled&&s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6 pt-6 border-t border-slate-800",children:[s.jsx(Xe,{label:"Board Provider",value:n.boardProvider.provider,onChange:w=>r("boardProvider",{...n.boardProvider,provider:w}),options:[{label:"GitHub Projects",value:"github"},{label:"Local (SQLite)",value:"local"}]}),n.boardProvider.provider==="github"&&s.jsxs(s.Fragment,{children:[s.jsx(Ee,{label:"Project Number",type:"number",value:String(n.boardProvider.projectNumber||""),onChange:w=>r("boardProvider",{...n.boardProvider,projectNumber:w.target.value?Number(w.target.value):void 0}),helperText:"GitHub Projects V2 project number"}),s.jsx(Ee,{label:"Repository",value:n.boardProvider.repo||"",onChange:w=>r("boardProvider",{...n.boardProvider,repo:w.target.value||void 0}),helperText:"owner/repo (auto-detected if empty)"})]}),n.boardProvider.provider==="local"&&s.jsx("div",{className:"md:col-span-2",children:s.jsx("p",{className:"text-sm text-slate-400",children:"Local board uses SQLite for storage — no additional configuration needed."})})]})]}),s.jsxs(et,{className:"p-6 space-y-6",children:[s.jsxs("div",{className:"flex items-center justify-between gap-4",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200",children:"Inbound Webhook Triggers"}),s.jsx("p",{className:"text-sm text-slate-400 mt-1",children:"Run signed Night Watch jobs from external systems"})]}),s.jsx(Gt,{checked:x.enabled,label:"Enabled",name:"webhookTriggers.enabled",onChange:w=>A({enabled:w})})]}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6 pt-6 border-t border-slate-800",children:[s.jsx(Ee,{label:"Secret Environment Variable",name:"webhookTriggers.secretEnv",value:x.secretEnv,onChange:w=>A({secretEnv:w.target.value}),helperText:"Server environment variable containing the shared HMAC secret"}),s.jsx(Ee,{label:"Signature Max Skew",min:0,name:"webhookTriggers.maxSkewSeconds",type:"number",value:String(x.maxSkewSeconds),onChange:w=>A({maxSkewSeconds:w.target.value?Math.max(0,Number(w.target.value)):0}),helperText:"Seconds, used when timestamp validation is required"}),s.jsx("div",{className:"md:col-span-2",children:s.jsx(Gt,{checked:x.requireTimestamp,label:"Require timestamp header",name:"webhookTriggers.requireTimestamp",onChange:w=>A({requireTimestamp:w})})})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-slate-400 mb-2",children:"Allowed Jobs"}),s.jsx("div",{className:"flex flex-wrap gap-2",children:qx.map(w=>s.jsx("button",{type:"button","aria-pressed":x.allowedJobIds.includes(w.value),onClick:()=>O(w.value),className:`px-3 py-1.5 rounded-md text-sm transition-colors ${x.allowedJobIds.includes(w.value)?"bg-indigo-600 text-white":"bg-slate-800 text-slate-400 hover:bg-slate-700"}`,children:w.label},w.value))})]}),s.jsxs("div",{className:"space-y-3",children:[s.jsxs("div",{className:"flex items-end gap-2",children:[s.jsx(Ee,{label:"Endpoint URL",readOnly:!0,value:M}),s.jsx(Le,{"aria-label":"Copy endpoint URL",size:"icon",type:"button",variant:"outline",onClick:()=>J(M,"endpoint"),children:s.jsx(Bg,{className:"h-4 w-4"})})]}),s.jsxs("div",{children:[s.jsxs("div",{className:"flex items-center justify-between mb-2",children:[s.jsx("label",{className:"block text-sm font-medium text-slate-400",children:"Signed curl Example"}),s.jsxs(Le,{size:"sm",type:"button",variant:"ghost",onClick:()=>J(D,"curl"),children:[s.jsx(Bg,{className:"h-4 w-4 mr-2"}),j==="curl"?"Copied":"Copy"]})]}),s.jsx("pre",{className:"overflow-x-auto rounded-lg border border-slate-800 bg-slate-950 p-3 text-xs text-slate-300",children:s.jsx("code",{children:D})})]})]}),s.jsxs("div",{className:"space-y-4 pt-6 border-t border-slate-800",children:[s.jsxs("div",{className:"flex items-center justify-between gap-4",children:[s.jsxs("div",{children:[s.jsx("h4",{className:"text-sm font-medium text-slate-300",children:"GitHub Events"}),s.jsx("p",{className:"text-xs text-slate-500 mt-1",children:"Rules dispatch the configured job when GitHub payloads match"})]}),s.jsx(Gt,{checked:x.github.enabled,label:"Enabled",name:"webhookTriggers.github.enabled",onChange:w=>N({enabled:w})})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-slate-400 mb-2",children:"Selected Events"}),s.jsx("div",{className:"flex flex-wrap gap-2",children:Vx.map(w=>s.jsx("button",{type:"button","aria-pressed":x.github.events.includes(w.value),onClick:()=>R(w.value),className:`px-3 py-1.5 rounded-md text-sm transition-colors ${x.github.events.includes(w.value)?"bg-indigo-600 text-white":"bg-slate-800 text-slate-400 hover:bg-slate-700"}`,children:w.label},w.value))})]}),s.jsxs("div",{className:"space-y-3",children:[x.github.rules.map((w,H)=>s.jsxs("div",{className:"rounded-lg border border-slate-800 bg-slate-950/40 p-4 space-y-4",children:[s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[s.jsx(Xe,{label:"Event",value:w.event,onChange:q=>W(H,{event:q}),options:Vx}),s.jsx(Ee,{label:"Action",value:w.action??"",onChange:q=>W(H,{action:q.target.value||void 0}),placeholder:"completed"}),s.jsx(Xe,{label:"Job",value:w.jobId,onChange:q=>W(H,{jobId:q}),options:qx})]}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-[1fr_auto_auto] gap-4 md:items-end",children:[s.jsx(Ee,{label:"Branch Patterns",value:iS(w.branchPatterns),onChange:q=>W(H,{branchPatterns:cS(q.target.value)}),placeholder:"main, release/*"}),s.jsx(Gt,{checked:w.onlyOnFailure??!1,label:"Only failures",onChange:q=>W(H,{onlyOnFailure:q})}),s.jsx(Le,{"aria-label":`Delete GitHub rule ${H+1}`,size:"icon",type:"button",variant:"ghost",onClick:()=>L(H),children:s.jsx(Fs,{className:"h-4 w-4 text-red-400"})})]})]},H)),s.jsxs(Le,{type:"button",variant:"ghost",onClick:()=>N({rules:[...x.github.rules,oS(E)]}),children:[s.jsx(Kl,{className:"h-4 w-4 mr-2"}),"Add GitHub Rule"]})]})]})]}),s.jsxs(et,{className:"p-6",children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200 mb-2",children:"Notification Webhooks"}),s.jsx("p",{className:"text-sm text-slate-400 mb-6",children:"Send status updates and job results to custom endpoints or team channels"}),s.jsx(lS,{notifications:n.notifications,onChange:w=>r("notifications",w),globalWebhook:o,onSetGlobal:h,onUnsetGlobal:f})]})]})};function hS(n,r,o,u){const{addToast:h}=Zt(),[f,b]=z.useState(!1),[j,y]=z.useState(null),[x,E]=z.useState(null),[M,D]=z.useState(null),A=z.useCallback(()=>({...rv,...n}),[n]),N=z.useCallback(q=>{const G=A();return Object.entries(G).map(([Z,le])=>({label:le.name,value:Z}))},[A]),O=z.useCallback(q=>{const G=[];r===q&&G.push("Global Provider");const Z={executor:"Executor",reviewer:"Reviewer",qa:"QA",audit:"Audit",slicer:"Planner",analytics:"Analytics"};for(const[le,S]of Object.entries(o))S===q&&G.push(Z[le]??le);return G},[r,o]),R=z.useCallback(()=>{y(null),E(null),b(!0)},[]),W=z.useCallback(q=>{const Z=A()[q];Z&&(y(q),E(Z),b(!0))},[A]),L=z.useCallback(async(q,G)=>{const Z=!j,le={...n,[q]:G};u("providerPresets",le);try{await du({providerPresets:{[q]:G}}),h({title:Z?"Preset Added":"Preset Updated",message:Z?`${G.name} has been added. You can now assign it to jobs.`:`${G.name} has been saved.`,type:"success"})}catch(S){h({title:"Save Failed",message:S instanceof Error?S.message:"Failed to save preset",type:"error"}),u("providerPresets",n)}},[j,n,u,h]),J=z.useCallback(q=>{var le,S;if(mu.includes(q)){h({title:"Cannot Delete",message:"Built-in presets cannot be deleted.",type:"error"});return}const G=O(q);if(G.length>0){D({presetId:q,presetName:((le=A()[q])==null?void 0:le.name)??q,references:G});return}const Z={...n};delete Z[q],u("providerPresets",Z),h({title:"Preset Deleted",message:`${((S=A()[q])==null?void 0:S.name)??q} has been removed.`,type:"success"})},[n,u,h,O,A]),w=z.useCallback(q=>{const G={...n};delete G[q],u("providerPresets",G),h({title:"Preset Reset",message:`${q} has been reset to built-in defaults.`,type:"success"})},[n,u,h]),H=z.useCallback(()=>{if(!M)return;const{presetId:q}=M,G={...n};delete G[q],u("providerPresets",G);const Z={...o};for(const le of Object.keys(Z))Z[le]===q&&delete Z[le];u("jobProviders",Z),r===q&&u("provider","claude"),D(null),h({title:"Preset Deleted",message:`${M.presetName} has been removed and all references cleared.`,type:"success"})},[M,n,o,r,u,h]);return{presetModalOpen:f,setPresetModalOpen:b,editingPresetId:j,editingPreset:x,deleteWarning:M,setDeleteWarning:D,getAllPresets:A,getPresetOptions:N,getPresetReferences:O,handleAddPreset:R,handleEditPreset:W,handleSavePreset:L,handleDeletePreset:J,handleResetPreset:w,handleConfirmDelete:H}}const mS=["executor","reviewer","qa","audit","slicer","analytics","pr-resolver","merger","manager"],gS=["executor","reviewer","qa","audit","slicer","analytics","pr-resolver","merger","manager"],xS={enabled:!1,secretEnv:"NIGHT_WATCH_WEBHOOK_SECRET",allowedJobIds:gS,requireTimestamp:!1,maxSkewSeconds:300,github:{enabled:!1,events:[],rules:[]}},Bx=n=>{const r=n.primaryFallbackModel!==void 0?n.primaryFallbackModel??"":n.claudeModel??"",o=n.secondaryFallbackModel!==void 0?n.secondaryFallbackModel??"":n.primaryFallbackModel!==void 0?n.primaryFallbackModel??"":n.claudeModel??"";return{provider:n.provider,providerLabel:n.providerLabel??"",providerPresets:n.providerPresets??{},defaultBranch:n.defaultBranch,prdDir:n.prdDir||"docs/prds",branchPrefix:n.branchPrefix,branchPatterns:n.branchPatterns||[],gitPushNoVerify:n.gitPushNoVerify??!1,executorEnabled:n.executorEnabled??!0,reviewerEnabled:n.reviewerEnabled,minReviewScore:n.minReviewScore,maxRuntime:n.maxRuntime,reviewerMaxRuntime:n.reviewerMaxRuntime,maxLogSize:n.maxLogSize,cronSchedule:n.cronSchedule||av,reviewerSchedule:n.reviewerSchedule||nv,scheduleBundleId:n.scheduleBundleId??null,cronScheduleOffset:n.cronScheduleOffset??0,schedulingPriority:n.schedulingPriority??3,maxRetries:n.maxRetries??3,reviewerMaxRetries:n.reviewerMaxRetries??2,reviewerRetryDelay:n.reviewerRetryDelay??30,reviewerMaxPrsPerRun:n.reviewerMaxPrsPerRun??0,providerEnv:n.providerEnv||{},notifications:n.notifications||{webhooks:[]},prdPriority:n.prdPriority||[],roadmapScanner:n.roadmapScanner||Gr(),templatesDir:n.templatesDir||".night-watch/templates",boardProvider:n.boardProvider||{enabled:!0,provider:"github"},jobProviders:n.jobProviders||{},fallbackOnRateLimit:n.fallbackOnRateLimit??!0,primaryFallbackModel:r,secondaryFallbackModel:o,primaryFallbackPreset:n.primaryFallbackPreset??"",secondaryFallbackPreset:n.secondaryFallbackPreset??"",claudeModel:r,providerScheduleOverrides:n.providerScheduleOverrides??[],qa:n.qa||lv(),audit:{...sv(),...n.audit??{}},analytics:n.analytics||Eh(),feedback:n.feedback??{enabled:!0,confidenceThreshold:.75,augmentationTtlDays:14,maxActiveAugmentations:3,successStreakToExpire:3},prResolver:n.prResolver??yc(),merger:n.merger??Nu(),manager:n.manager??bc(),queue:n.queue||{enabled:!0,mode:"conservative",maxConcurrency:1,maxWaitTime:7200,priority:{executor:50,reviewer:40,slicer:30,qa:20,audit:10},providerBuckets:{}},webhookTriggers:n.webhookTriggers??xS}},pS=()=>{const n=kn(),r=xu(),{addToast:o,projectName:u,selectedProjectId:h,globalModeLoading:f,isGlobalMode:b,removeProjectFromList:j}=Zt(),[y,x]=ze.useState(!1),[E,M]=ze.useState(!1),[D,A]=ze.useState(!1),[N,O]=ze.useState(null),[R,W]=ze.useState(void 0),L=ze.useRef(null),[J,w]=ze.useState(!1),H=ze.useRef(!1),q=ze.useRef(!1),[G,Z]=ze.useState("project"),le=ze.useMemo(()=>{const xe=new URLSearchParams(n.search).get("tab");return xe==="jobs"||xe==="schedules"?xe:null},[n.search]),{data:S,loading:te,error:ae,refetch:ie}=qa(jh,[h],{enabled:!f}),{data:ge,loading:pe,refetch:P}=qa(oN,[h],{enabled:!f}),K=ge??[],he=(xe,we)=>{O(lt=>lt&&{...lt,[xe]:we})},fe=hS((N==null?void 0:N.providerPresets)??{},(N==null?void 0:N.provider)??"claude",(N==null?void 0:N.jobProviders)??{},he);ze.useEffect(()=>{vN().then(xe=>W(xe.webhook)).catch(()=>{})},[h]),ze.useEffect(()=>{le&&r({pathname:"/scheduling",search:n.search},{replace:!0})},[le,n.search,r]),ze.useEffect(()=>{if(le)return;const we=new URLSearchParams(n.search).get("tab");we&&Z({providers:"ai-providers",runtime:"ai-providers","ai-runtime":"ai-providers",notifications:"integrations",general:"project",advanced:"project"}[we]??we)},[le,n.search]),ze.useEffect(()=>{if(S){if(H.current){H.current=!1;return}const xe=Bx(S);O(xe),L.current=xe,w(!1)}},[S]),ze.useEffect(()=>{if(!N||!L.current)return;const xe=JSON.stringify(N),we=JSON.stringify(L.current);w(xe!==we)},[N]),ze.useEffect(()=>{N&&q.current&&(q.current=!1,Ne())},[N==null?void 0:N.jobProviders]);const Ne=async()=>{var lt,Ye,St,oa,Ma,$a,ua,ma,vn,yn,bn;if(!N)return;const xe=N.cronSchedule!==(S==null?void 0:S.cronSchedule)||N.reviewerSchedule!==(S==null?void 0:S.reviewerSchedule)||N.cronScheduleOffset!==((S==null?void 0:S.cronScheduleOffset)??0)||N.schedulingPriority!==((S==null?void 0:S.schedulingPriority)??3)||N.executorEnabled!==((S==null?void 0:S.executorEnabled)??!0)||N.reviewerEnabled!==((S==null?void 0:S.reviewerEnabled)??!0)||N.queue.enabled!==(((lt=S==null?void 0:S.queue)==null?void 0:lt.enabled)??!0)||N.qa.enabled!==((S==null?void 0:S.qa.enabled)??!0)||N.qa.schedule!==(S==null?void 0:S.qa.schedule)||N.audit.enabled!==((S==null?void 0:S.audit.enabled)??!1)||N.audit.schedule!==(S==null?void 0:S.audit.schedule)||N.analytics.enabled!==(((Ye=S==null?void 0:S.analytics)==null?void 0:Ye.enabled)??!1)||N.analytics.schedule!==(((St=S==null?void 0:S.analytics)==null?void 0:St.schedule)??Eh().schedule)||N.prResolver.enabled!==(((oa=S==null?void 0:S.prResolver)==null?void 0:oa.enabled)??yc().enabled)||N.prResolver.schedule!==(((Ma=S==null?void 0:S.prResolver)==null?void 0:Ma.schedule)??yc().schedule)||N.merger.enabled!==((($a=S==null?void 0:S.merger)==null?void 0:$a.enabled)??!1)||N.merger.schedule!==(((ua=S==null?void 0:S.merger)==null?void 0:ua.schedule)??Nu().schedule)||N.manager.enabled!==(((ma=S==null?void 0:S.manager)==null?void 0:ma.enabled)??bc().enabled)||N.manager.schedule!==(((vn=S==null?void 0:S.manager)==null?void 0:vn.schedule)??bc().schedule)||N.roadmapScanner.enabled!==(((yn=S==null?void 0:S.roadmapScanner)==null?void 0:yn.enabled)??!0)||(N.roadmapScanner.slicerSchedule||Gr().slicerSchedule)!==(((bn=S==null?void 0:S.roadmapScanner)==null?void 0:bn.slicerSchedule)||Gr().slicerSchedule),we={};for(const _t of mS){const da=N.jobProviders[_t];typeof da=="string"&&da.trim().length>0?we[_t]=da:S!=null&&S.jobProviders[_t]&&(we[_t]=null)}x(!0);try{const _t=N.primaryFallbackModel||null,da=N.secondaryFallbackModel||null,An=await du({provider:N.provider,providerLabel:N.providerLabel.trim(),providerPresets:Object.keys(N.providerPresets).length>0?N.providerPresets:void 0,defaultBranch:N.defaultBranch,prdDir:N.prdDir,branchPrefix:N.branchPrefix,branchPatterns:N.branchPatterns,gitPushNoVerify:N.gitPushNoVerify,executorEnabled:N.executorEnabled,reviewerEnabled:N.reviewerEnabled,minReviewScore:N.minReviewScore,maxRuntime:N.maxRuntime,reviewerMaxRuntime:N.reviewerMaxRuntime,maxLogSize:N.maxLogSize,cronSchedule:N.cronSchedule,reviewerSchedule:N.reviewerSchedule,scheduleBundleId:N.scheduleBundleId,cronScheduleOffset:N.cronScheduleOffset,schedulingPriority:N.schedulingPriority,maxRetries:N.maxRetries,reviewerMaxRetries:N.reviewerMaxRetries,reviewerRetryDelay:N.reviewerRetryDelay,reviewerMaxPrsPerRun:N.reviewerMaxPrsPerRun,providerEnv:N.providerEnv,notifications:N.notifications,prdPriority:N.prdPriority,roadmapScanner:N.roadmapScanner,templatesDir:N.templatesDir,boardProvider:N.boardProvider,jobProviders:we,fallbackOnRateLimit:N.fallbackOnRateLimit,primaryFallbackModel:_t,secondaryFallbackModel:da,primaryFallbackPreset:N.primaryFallbackPreset||void 0,secondaryFallbackPreset:N.secondaryFallbackPreset||void 0,claudeModel:_t,providerScheduleOverrides:N.providerScheduleOverrides,qa:N.qa,audit:N.audit,analytics:N.analytics,feedback:N.feedback,prResolver:N.prResolver,merger:N.merger,manager:N.manager,queue:N.queue,webhookTriggers:N.webhookTriggers}),_n=Bx(An);O(_n),L.current=_n,w(!1);let zn="";if(xe)try{await mc()}catch(yt){zn=yt instanceof Error?yt.message:"failed to reinstall cron schedules"}o(zn?{title:"Settings Saved (Cron Reinstall Failed)",message:zn,type:"warning"}:{title:"Settings Saved",message:xe?"Configuration updated and cron schedules reinstalled.":"Configuration updated successfully.",type:"success"}),H.current=!0,ie(),P()}catch(_t){o({title:"Save Failed",message:_t instanceof Error?_t.message:"Failed to save configuration",type:"error"})}finally{x(!1)}},U=()=>{L.current&&(O(L.current),w(!1),o({title:"Reset Complete",message:"Unsaved changes were discarded.",type:"info"}))},se=async xe=>{if(!(R!=null&&!window.confirm("Replace existing global channel?")))try{const we=await Wg({webhook:xe});W(we.webhook)}catch(we){o({title:"Failed to set global channel",message:we instanceof Error?we.message:"Unknown error",type:"error"})}},me=async()=>{try{await Wg({webhook:null}),W(null)}catch(xe){o({title:"Failed to unset global channel",message:xe instanceof Error?xe.message:"Unknown error",type:"error"})}},ve=async()=>{if(h){A(!0);try{await nN(h),j(h),M(!1),o({title:"Project Removed",message:"Cron jobs uninstalled and all project data removed from the database.",type:"success"})}catch(xe){o({title:"Remove Failed",message:xe instanceof Error?xe.message:"Failed to remove project",type:"error"})}finally{A(!1)}}};if(le)return s.jsx(Ha,{message:"Opening automation",rows:1});if(te||!N)return s.jsx(Ha,{message:"Loading settings",detail:"Fetching project configuration and health checks."});if(ae)return s.jsxs("div",{className:"flex flex-col items-center justify-center h-full space-y-4",children:[s.jsx(pn,{className:"h-12 w-12 text-red-400"}),s.jsx("div",{className:"text-slate-300",children:"Failed to load settings"}),s.jsx("div",{className:"text-sm text-slate-500",children:ae.message}),s.jsx(Le,{onClick:()=>ie(),children:"Retry"})]});const Re=[{id:"project",label:"Project",content:s.jsx(Kw,{form:N,updateField:he,projectName:u,doctorChecks:K,doctorLoading:pe})},{id:"ai-providers",label:"AI Providers",content:s.jsx(tS,{form:N,updateField:he,getAllPresets:fe.getAllPresets,getPresetOptions:fe.getPresetOptions,handleEditPreset:fe.handleEditPreset,handleDeletePreset:fe.handleDeletePreset,handleResetPreset:fe.handleResetPreset,handleAddPreset:fe.handleAddPreset})},{id:"integrations",label:"Integrations",content:s.jsx(fS,{form:N,updateField:he,globalWebhook:R,isGlobalMode:b,onSetGlobal:se,onUnsetGlobal:me,selectedProjectId:h})}];return s.jsxs("div",{className:"max-w-4xl mx-auto pb-32",children:[s.jsxs("div",{className:"flex items-center justify-between mb-6",children:[s.jsxs("div",{children:[s.jsx("h2",{className:"text-2xl font-bold text-slate-100",children:"Settings"}),s.jsx("p",{className:"text-sm text-slate-500 mt-1",children:"Configure project automation, providers, and integrations"})]}),J&&s.jsxs(Tt,{variant:"warning",className:"animate-pulse",children:[s.jsx(Ps,{className:"h-3 w-3 mr-1"}),"Unsaved Changes"]})]}),s.jsx(Mp,{tabs:Re,activeTab:G,onChange:Z}),J&&s.jsx("div",{className:"fixed bottom-8 left-1/2 -translate-x-1/2 z-50 w-full max-w-2xl px-4 animate-in fade-in slide-in-from-bottom-4 duration-300",children:s.jsxs("div",{className:"bg-slate-900/90 backdrop-blur-md border border-indigo-500/30 rounded-2xl p-4 shadow-2xl flex items-center justify-between shadow-indigo-500/10",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"p-2 rounded-lg bg-indigo-500/20 text-indigo-400",children:s.jsx(pn,{className:"h-5 w-5"})}),s.jsxs("div",{children:[s.jsx("div",{className:"text-sm font-semibold text-slate-200",children:"You have unsaved changes"}),s.jsx("div",{className:"text-[11px] text-slate-400",children:"Save your configuration to apply changes"})]})]}),s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsxs(Le,{variant:"ghost",size:"sm",className:"text-slate-400 hover:text-slate-300",onClick:U,children:[s.jsx(ph,{className:"h-4 w-4 mr-2"}),"Discard"]}),s.jsxs(Le,{size:"sm",className:"bg-indigo-600 hover:bg-indigo-500 shadow-lg shadow-indigo-500/20",onClick:Ne,loading:y,children:[s.jsx(gp,{className:"h-4 w-4 mr-2"}),"Save Changes"]})]})]})}),b&&h&&s.jsxs("div",{className:"mt-10 rounded-lg border border-red-900/50 bg-red-950/20 p-6",children:[s.jsx("h3",{className:"text-lg font-medium text-red-400 mb-2",children:"Danger Zone"}),s.jsx("p",{className:"text-sm text-slate-400 mb-4",children:"Remove this project from Night Watch. This will uninstall cron jobs and delete all project data from the database. Files on disk will not be touched."}),s.jsxs(Le,{variant:"secondary",className:"bg-red-600 hover:bg-red-700 text-white",onClick:()=>M(!0),children:[s.jsx(Fs,{className:"h-4 w-4 mr-2"}),"Remove Project"]})]}),E&&s.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4",children:[s.jsx("div",{className:"fixed inset-0 bg-black/70 backdrop-blur-sm",onClick:()=>!D&&M(!1),"aria-hidden":"true"}),s.jsxs("div",{className:"relative w-full max-w-md transform rounded-xl bg-slate-900 border border-slate-800 shadow-2xl p-6",children:[s.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[s.jsx(Ps,{className:"h-6 w-6 text-red-400"}),s.jsxs("h3",{className:"text-lg font-semibold text-slate-100",children:["Remove ",u,"?"]})]}),s.jsx("p",{className:"text-sm text-slate-300 mb-6",children:"This will uninstall cron jobs and remove all Night Watch data for this project from the database. The project files on disk will not be deleted."}),s.jsxs("div",{className:"flex justify-end gap-3",children:[s.jsx(Le,{variant:"ghost",onClick:()=>M(!1),disabled:D,children:"Cancel"}),s.jsx(Le,{variant:"secondary",className:"bg-red-600 hover:bg-red-700",onClick:ve,loading:D,children:"Remove"})]})]})]}),s.jsx(Jw,{isOpen:fe.presetModalOpen,onClose:()=>{fe.setPresetModalOpen(!1)},onSave:fe.handleSavePreset,presetId:fe.editingPresetId,preset:fe.editingPreset,isBuiltIn:fe.editingPresetId?mu.includes(fe.editingPresetId):!1,existingIds:Object.keys(fe.getAllPresets())}),fe.deleteWarning&&s.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4",children:[s.jsx("div",{className:"fixed inset-0 bg-black/70 backdrop-blur-sm",onClick:()=>fe.setDeleteWarning(null),"aria-hidden":"true"}),s.jsxs("div",{className:"relative w-full max-w-md transform rounded-xl bg-slate-900 border border-slate-800 shadow-2xl p-6",children:[s.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[s.jsx(Ps,{className:"h-6 w-6 text-amber-400"}),s.jsx("h3",{className:"text-lg font-semibold text-slate-100",children:"Cannot Delete Preset"})]}),s.jsxs("p",{className:"text-sm text-slate-300 mb-4",children:[s.jsx("strong",{children:fe.deleteWarning.presetName})," is currently assigned to the following jobs:"]}),s.jsx("ul",{className:"list-disc list-inside text-sm text-slate-400 mb-4",children:fe.deleteWarning.references.map(xe=>s.jsx("li",{children:xe},xe))}),s.jsx("p",{className:"text-sm text-slate-400 mb-6",children:'Please remove these assignments before deleting the preset, or use "Force Delete" to remove the preset and clear all references.'}),s.jsxs("div",{className:"flex justify-end gap-3",children:[s.jsx(Le,{variant:"ghost",onClick:()=>fe.setDeleteWarning(null),children:"Cancel"}),s.jsx(Le,{variant:"secondary",onClick:fe.handleConfirmDelete,className:"bg-red-600 hover:bg-red-700",children:"Force Delete"})]})]})]})]})},vS=()=>(RN(),DN(),s.jsx(s1,{children:s.jsxs("div",{className:"flex h-screen bg-[#030712] text-slate-300 overflow-hidden relative",children:[s.jsx("div",{className:"absolute top-0 left-0 w-full h-96 bg-indigo-900/10 rounded-full blur-[120px] -translate-y-1/2 pointer-events-none z-0"}),s.jsx(CN,{}),s.jsxs("div",{className:"flex-1 flex flex-col min-w-0 z-10",children:[s.jsx(TN,{}),s.jsx("main",{className:"flex-1 overflow-auto p-6 scroll-smooth relative",children:s.jsx("div",{className:"max-w-7xl mx-auto w-full",children:s.jsxs(zb,{children:[s.jsx(Rn,{path:"/",element:s.jsx(GN,{})}),s.jsx(Rn,{path:"/analytics",element:s.jsx(UN,{})}),s.jsx(Rn,{path:"/prs",element:s.jsx(WN,{})}),s.jsx(Rn,{path:"/board",element:s.jsx($N,{})}),s.jsx(Rn,{path:"/scheduling",element:s.jsx(Gw,{})}),s.jsx(Rn,{path:"/logs",element:s.jsx(ZN,{})}),s.jsx(Rn,{path:"/roadmap",element:s.jsx(IN,{})}),s.jsx(Rn,{path:"/settings",element:s.jsx(pS,{})}),s.jsx(Rn,{path:"*",element:s.jsx(Ab,{to:"/",replace:!0})})]})})})]}),s.jsx(ON,{})]})})),cv=document.getElementById("root");if(!cv)throw new Error("Could not find root element to mount to");const yS=Uy.createRoot(cv);yS.render(s.jsx(ze.StrictMode,{children:s.jsx(vS,{})}));
|