@jonit-dev/night-watch-cli 1.8.14-beta.7 → 1.8.15
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 +1611 -409
- package/dist/cli.js.map +1 -1
- package/dist/commands/doctor.d.ts.map +1 -1
- package/dist/commands/doctor.js +16 -0
- package/dist/commands/doctor.js.map +1 -1
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +13 -0
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/install.d.ts +4 -0
- package/dist/commands/install.d.ts.map +1 -1
- package/dist/commands/install.js +26 -4
- package/dist/commands/install.js.map +1 -1
- package/dist/commands/logs.d.ts.map +1 -1
- package/dist/commands/logs.js +14 -4
- package/dist/commands/logs.js.map +1 -1
- package/dist/commands/merge.d.ts.map +1 -1
- package/dist/commands/merge.js +20 -0
- package/dist/commands/merge.js.map +1 -1
- package/dist/commands/queue.d.ts.map +1 -1
- package/dist/commands/queue.js +11 -7
- package/dist/commands/queue.js.map +1 -1
- package/dist/commands/review.d.ts.map +1 -1
- package/dist/commands/review.js +26 -0
- package/dist/commands/review.js.map +1 -1
- package/dist/commands/run.d.ts.map +1 -1
- package/dist/commands/run.js +24 -0
- package/dist/commands/run.js.map +1 -1
- package/dist/commands/shared/telemetry.d.ts +27 -0
- package/dist/commands/shared/telemetry.d.ts.map +1 -0
- package/dist/commands/shared/telemetry.js +73 -0
- package/dist/commands/shared/telemetry.js.map +1 -0
- 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/telemetry.d.ts +3 -0
- package/dist/commands/telemetry.d.ts.map +1 -0
- package/dist/commands/telemetry.js +52 -0
- package/dist/commands/telemetry.js.map +1 -0
- 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-cron.sh +36 -12
- package/dist/telemetry-bootstrap.d.ts +2 -0
- package/dist/telemetry-bootstrap.d.ts.map +1 -0
- package/dist/telemetry-bootstrap.js +32 -0
- package/dist/telemetry-bootstrap.js.map +1 -0
- package/dist/templates/night-watch.config.json +14 -0
- package/dist/web/assets/index-BheLL2O2.css +1 -0
- package/dist/web/assets/index-BsTuwxzi.js +447 -0
- package/dist/web/index.html +2 -2
- package/package.json +2 -2
- package/dist/web/assets/index-6Yf-Q6Di.js +0 -442
- package/dist/web/assets/index-B6E6kOoR.js +0 -406
- package/dist/web/assets/index-BbiKFOgi.css +0 -1
- package/dist/web/assets/index-C-xpWpS8.css +0 -1
- package/dist/web/assets/index-C3BV1Hoa.js +0 -406
- package/dist/web/assets/index-CEYe-290.js +0 -412
- package/dist/web/assets/index-CL3Q-KB4.css +0 -1
- package/dist/web/assets/index-DIMUXIP8.css +0 -1
- package/dist/web/assets/index-DatF4suf.css +0 -1
- package/dist/web/assets/index-DpvzoXEv.js +0 -442
- package/dist/web/assets/index-Ds8OqaCa.css +0 -1
- package/dist/web/assets/index-DyME41HV.css +0 -1
- package/dist/web/assets/index-FDOCfjkP.js +0 -442
- package/dist/web/assets/index-NR27JE3b.js +0 -406
- package/dist/web/assets/index-Q3IYCcdZ.js +0 -447
- package/dist/web/assets/index-uBao8iYf.js +0 -447
|
@@ -1,412 +0,0 @@
|
|
|
1
|
-
var hy=Object.defineProperty;var fg=n=>{throw TypeError(n)};var my=(n,r,o)=>r in n?hy(n,r,{enumerable:!0,configurable:!0,writable:!0,value:o}):n[r]=o;var hg=(n,r,o)=>my(n,typeof r!="symbol"?r+"":r,o),bf=(n,r,o)=>r.has(n)||fg("Cannot "+o);var J=(n,r,o)=>(bf(n,r,"read from private field"),o?o.call(n):r.get(n)),et=(n,r,o)=>r.has(n)?fg("Cannot add the same private member more than once"):r instanceof WeakSet?r.add(n):r.set(n,o),Ce=(n,r,o,u)=>(bf(n,r,"write to private field"),u?u.call(n,o):r.set(n,o),o),we=(n,r,o)=>(bf(n,r,"access private method"),o);(function(){const r=document.createElement("link").relList;if(r&&r.supports&&r.supports("modulepreload"))return;for(const f of document.querySelectorAll('link[rel="modulepreload"]'))u(f);new MutationObserver(f=>{for(const h of f)if(h.type==="childList")for(const b of h.addedNodes)b.tagName==="LINK"&&b.rel==="modulepreload"&&u(b)}).observe(document,{childList:!0,subtree:!0});function o(f){const h={};return f.integrity&&(h.integrity=f.integrity),f.referrerPolicy&&(h.referrerPolicy=f.referrerPolicy),f.crossOrigin==="use-credentials"?h.credentials="include":f.crossOrigin==="anonymous"?h.credentials="omit":h.credentials="same-origin",h}function u(f){if(f.ep)return;f.ep=!0;const h=o(f);fetch(f.href,h)}})();function If(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}function gy(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 f=Object.getOwnPropertyDescriptor(n,u);Object.defineProperty(o,u,f.get?f:{enumerable:!0,get:function(){return n[u]}})}),o}var Nf={exports:{}},Ii={};/**
|
|
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 mg;function xy(){if(mg)return Ii;mg=1;var n=Symbol.for("react.transitional.element"),r=Symbol.for("react.fragment");function o(u,f,h){var b=null;if(h!==void 0&&(b=""+h),f.key!==void 0&&(b=""+f.key),"key"in f){h={};for(var N in f)N!=="key"&&(h[N]=f[N])}else h=f;return f=h.ref,{$$typeof:n,type:u,key:b,ref:f!==void 0?f:null,props:h}}return Ii.Fragment=r,Ii.jsx=o,Ii.jsxs=o,Ii}var gg;function py(){return gg||(gg=1,Nf.exports=xy()),Nf.exports}var s=py(),jf={exports:{}},Le={};/**
|
|
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 xg;function vy(){if(xg)return Le;xg=1;var n=Symbol.for("react.transitional.element"),r=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),u=Symbol.for("react.strict_mode"),f=Symbol.for("react.profiler"),h=Symbol.for("react.consumer"),b=Symbol.for("react.context"),N=Symbol.for("react.forward_ref"),y=Symbol.for("react.suspense"),x=Symbol.for("react.memo"),w=Symbol.for("react.lazy"),T=Symbol.for("react.activity"),k=Symbol.iterator;function _(L){return L===null||typeof L!="object"?null:(L=k&&L[k]||L["@@iterator"],typeof L=="function"?L:null)}var j={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},C=Object.assign,A={};function G(L,se,ge){this.props=L,this.context=se,this.refs=A,this.updater=ge||j}G.prototype.isReactComponent={},G.prototype.setState=function(L,se){if(typeof L!="object"&&typeof L!="function"&&L!=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,L,se,"setState")},G.prototype.forceUpdate=function(L){this.updater.enqueueForceUpdate(this,L,"forceUpdate")};function $(){}$.prototype=G.prototype;function M(L,se,ge){this.props=L,this.context=se,this.refs=A,this.updater=ge||j}var V=M.prototype=new $;V.constructor=M,C(V,G.prototype),V.isPureReactComponent=!0;var ee=Array.isArray;function Y(){}var W={H:null,A:null,T:null,S:null},R=Object.prototype.hasOwnProperty;function te(L,se,ge){var pe=ge.ref;return{$$typeof:n,type:L,key:se,ref:pe!==void 0?pe:null,props:ge}}function O(L,se){return te(L.type,se,L.props)}function le(L){return typeof L=="object"&&L!==null&&L.$$typeof===n}function ne(L){var se={"=":"=0",":":"=2"};return"$"+L.replace(/[=:]/g,function(ge){return se[ge]})}var he=/\/+/g;function ve(L,se){return typeof L=="object"&&L!==null&&L.key!=null?ne(""+L.key):se.toString(36)}function ie(L){switch(L.status){case"fulfilled":return L.value;case"rejected":throw L.reason;default:switch(typeof L.status=="string"?L.then(Y,Y):(L.status="pending",L.then(function(se){L.status==="pending"&&(L.status="fulfilled",L.value=se)},function(se){L.status==="pending"&&(L.status="rejected",L.reason=se)})),L.status){case"fulfilled":return L.value;case"rejected":throw L.reason}}throw L}function F(L,se,ge,pe,Se){var xe=typeof L;(xe==="undefined"||xe==="boolean")&&(L=null);var Te=!1;if(L===null)Te=!0;else switch(xe){case"bigint":case"string":case"number":Te=!0;break;case"object":switch(L.$$typeof){case n:case r:Te=!0;break;case w:return Te=L._init,F(Te(L._payload),se,ge,pe,Se)}}if(Te)return Se=Se(L),Te=pe===""?"."+ve(L,0):pe,ee(Se)?(ge="",Te!=null&&(ge=Te.replace(he,"$&/")+"/"),F(Se,se,ge,"",function(Dt){return Dt})):Se!=null&&(le(Se)&&(Se=O(Se,ge+(Se.key==null||L&&L.key===Se.key?"":(""+Se.key).replace(he,"$&/")+"/")+Te)),se.push(Se)),1;Te=0;var Ze=pe===""?".":pe+":";if(ee(L))for(var We=0;We<L.length;We++)pe=L[We],xe=Ze+ve(pe,We),Te+=F(pe,se,ge,xe,Se);else if(We=_(L),typeof We=="function")for(L=We.call(L),We=0;!(pe=L.next()).done;)pe=pe.value,xe=Ze+ve(pe,We++),Te+=F(pe,se,ge,xe,Se);else if(xe==="object"){if(typeof L.then=="function")return F(ie(L),se,ge,pe,Se);throw se=String(L),Error("Objects are not valid as a React child (found: "+(se==="[object Object]"?"object with keys {"+Object.keys(L).join(", ")+"}":se)+"). If you meant to render a collection of children, use an array instead.")}return Te}function ae(L,se,ge){if(L==null)return L;var pe=[],Se=0;return F(L,pe,"","",function(xe){return se.call(ge,xe,Se++)}),pe}function de(L){if(L._status===-1){var se=L._result;se=se(),se.then(function(ge){(L._status===0||L._status===-1)&&(L._status=1,L._result=ge)},function(ge){(L._status===0||L._status===-1)&&(L._status=2,L._result=ge)}),L._status===-1&&(L._status=0,L._result=se)}if(L._status===1)return L._result.default;throw L._result}var me=typeof reportError=="function"?reportError:function(L){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var se=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof L=="object"&&L!==null&&typeof L.message=="string"?String(L.message):String(L),error:L});if(!window.dispatchEvent(se))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",L);return}console.error(L)},ze={map:ae,forEach:function(L,se,ge){ae(L,function(){se.apply(this,arguments)},ge)},count:function(L){var se=0;return ae(L,function(){se++}),se},toArray:function(L){return ae(L,function(se){return se})||[]},only:function(L){if(!le(L))throw Error("React.Children.only expected to receive a single React element child.");return L}};return Le.Activity=T,Le.Children=ze,Le.Component=G,Le.Fragment=o,Le.Profiler=f,Le.PureComponent=M,Le.StrictMode=u,Le.Suspense=y,Le.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=W,Le.__COMPILER_RUNTIME={__proto__:null,c:function(L){return W.H.useMemoCache(L)}},Le.cache=function(L){return function(){return L.apply(null,arguments)}},Le.cacheSignal=function(){return null},Le.cloneElement=function(L,se,ge){if(L==null)throw Error("The argument must be a React element, but you passed "+L+".");var pe=C({},L.props),Se=L.key;if(se!=null)for(xe in se.key!==void 0&&(Se=""+se.key),se)!R.call(se,xe)||xe==="key"||xe==="__self"||xe==="__source"||xe==="ref"&&se.ref===void 0||(pe[xe]=se[xe]);var xe=arguments.length-2;if(xe===1)pe.children=ge;else if(1<xe){for(var Te=Array(xe),Ze=0;Ze<xe;Ze++)Te[Ze]=arguments[Ze+2];pe.children=Te}return te(L.type,Se,pe)},Le.createContext=function(L){return L={$$typeof:b,_currentValue:L,_currentValue2:L,_threadCount:0,Provider:null,Consumer:null},L.Provider=L,L.Consumer={$$typeof:h,_context:L},L},Le.createElement=function(L,se,ge){var pe,Se={},xe=null;if(se!=null)for(pe in se.key!==void 0&&(xe=""+se.key),se)R.call(se,pe)&&pe!=="key"&&pe!=="__self"&&pe!=="__source"&&(Se[pe]=se[pe]);var Te=arguments.length-2;if(Te===1)Se.children=ge;else if(1<Te){for(var Ze=Array(Te),We=0;We<Te;We++)Ze[We]=arguments[We+2];Se.children=Ze}if(L&&L.defaultProps)for(pe in Te=L.defaultProps,Te)Se[pe]===void 0&&(Se[pe]=Te[pe]);return te(L,xe,Se)},Le.createRef=function(){return{current:null}},Le.forwardRef=function(L){return{$$typeof:N,render:L}},Le.isValidElement=le,Le.lazy=function(L){return{$$typeof:w,_payload:{_status:-1,_result:L},_init:de}},Le.memo=function(L,se){return{$$typeof:x,type:L,compare:se===void 0?null:se}},Le.startTransition=function(L){var se=W.T,ge={};W.T=ge;try{var pe=L(),Se=W.S;Se!==null&&Se(ge,pe),typeof pe=="object"&&pe!==null&&typeof pe.then=="function"&&pe.then(Y,me)}catch(xe){me(xe)}finally{se!==null&&ge.types!==null&&(se.types=ge.types),W.T=se}},Le.unstable_useCacheRefresh=function(){return W.H.useCacheRefresh()},Le.use=function(L){return W.H.use(L)},Le.useActionState=function(L,se,ge){return W.H.useActionState(L,se,ge)},Le.useCallback=function(L,se){return W.H.useCallback(L,se)},Le.useContext=function(L){return W.H.useContext(L)},Le.useDebugValue=function(){},Le.useDeferredValue=function(L,se){return W.H.useDeferredValue(L,se)},Le.useEffect=function(L,se){return W.H.useEffect(L,se)},Le.useEffectEvent=function(L){return W.H.useEffectEvent(L)},Le.useId=function(){return W.H.useId()},Le.useImperativeHandle=function(L,se,ge){return W.H.useImperativeHandle(L,se,ge)},Le.useInsertionEffect=function(L,se){return W.H.useInsertionEffect(L,se)},Le.useLayoutEffect=function(L,se){return W.H.useLayoutEffect(L,se)},Le.useMemo=function(L,se){return W.H.useMemo(L,se)},Le.useOptimistic=function(L,se){return W.H.useOptimistic(L,se)},Le.useReducer=function(L,se,ge){return W.H.useReducer(L,se,ge)},Le.useRef=function(L){return W.H.useRef(L)},Le.useState=function(L){return W.H.useState(L)},Le.useSyncExternalStore=function(L,se,ge){return W.H.useSyncExternalStore(L,se,ge)},Le.useTransition=function(){return W.H.useTransition()},Le.version="19.2.4",Le}var pg;function Qf(){return pg||(pg=1,jf.exports=vy()),jf.exports}var U=Qf();const _e=If(U);var wf={exports:{}},Qi={},Sf={exports:{}},Ef={};/**
|
|
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 vg;function yy(){return vg||(vg=1,(function(n){function r(F,ae){var de=F.length;F.push(ae);e:for(;0<de;){var me=de-1>>>1,ze=F[me];if(0<f(ze,ae))F[me]=ae,F[de]=ze,de=me;else break e}}function o(F){return F.length===0?null:F[0]}function u(F){if(F.length===0)return null;var ae=F[0],de=F.pop();if(de!==ae){F[0]=de;e:for(var me=0,ze=F.length,L=ze>>>1;me<L;){var se=2*(me+1)-1,ge=F[se],pe=se+1,Se=F[pe];if(0>f(ge,de))pe<ze&&0>f(Se,ge)?(F[me]=Se,F[pe]=de,me=pe):(F[me]=ge,F[se]=de,me=se);else if(pe<ze&&0>f(Se,de))F[me]=Se,F[pe]=de,me=pe;else break e}}return ae}function f(F,ae){var de=F.sortIndex-ae.sortIndex;return de!==0?de:F.id-ae.id}if(n.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var h=performance;n.unstable_now=function(){return h.now()}}else{var b=Date,N=b.now();n.unstable_now=function(){return b.now()-N}}var y=[],x=[],w=1,T=null,k=3,_=!1,j=!1,C=!1,A=!1,G=typeof setTimeout=="function"?setTimeout:null,$=typeof clearTimeout=="function"?clearTimeout:null,M=typeof setImmediate<"u"?setImmediate:null;function V(F){for(var ae=o(x);ae!==null;){if(ae.callback===null)u(x);else if(ae.startTime<=F)u(x),ae.sortIndex=ae.expirationTime,r(y,ae);else break;ae=o(x)}}function ee(F){if(C=!1,V(F),!j)if(o(y)!==null)j=!0,Y||(Y=!0,ne());else{var ae=o(x);ae!==null&&ie(ee,ae.startTime-F)}}var Y=!1,W=-1,R=5,te=-1;function O(){return A?!0:!(n.unstable_now()-te<R)}function le(){if(A=!1,Y){var F=n.unstable_now();te=F;var ae=!0;try{e:{j=!1,C&&(C=!1,$(W),W=-1),_=!0;var de=k;try{t:{for(V(F),T=o(y);T!==null&&!(T.expirationTime>F&&O());){var me=T.callback;if(typeof me=="function"){T.callback=null,k=T.priorityLevel;var ze=me(T.expirationTime<=F);if(F=n.unstable_now(),typeof ze=="function"){T.callback=ze,V(F),ae=!0;break t}T===o(y)&&u(y),V(F)}else u(y);T=o(y)}if(T!==null)ae=!0;else{var L=o(x);L!==null&&ie(ee,L.startTime-F),ae=!1}}break e}finally{T=null,k=de,_=!1}ae=void 0}}finally{ae?ne():Y=!1}}}var ne;if(typeof M=="function")ne=function(){M(le)};else if(typeof MessageChannel<"u"){var he=new MessageChannel,ve=he.port2;he.port1.onmessage=le,ne=function(){ve.postMessage(null)}}else ne=function(){G(le,0)};function ie(F,ae){W=G(function(){F(n.unstable_now())},ae)}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(F){F.callback=null},n.unstable_forceFrameRate=function(F){0>F||125<F?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):R=0<F?Math.floor(1e3/F):5},n.unstable_getCurrentPriorityLevel=function(){return k},n.unstable_next=function(F){switch(k){case 1:case 2:case 3:var ae=3;break;default:ae=k}var de=k;k=ae;try{return F()}finally{k=de}},n.unstable_requestPaint=function(){A=!0},n.unstable_runWithPriority=function(F,ae){switch(F){case 1:case 2:case 3:case 4:case 5:break;default:F=3}var de=k;k=F;try{return ae()}finally{k=de}},n.unstable_scheduleCallback=function(F,ae,de){var me=n.unstable_now();switch(typeof de=="object"&&de!==null?(de=de.delay,de=typeof de=="number"&&0<de?me+de:me):de=me,F){case 1:var ze=-1;break;case 2:ze=250;break;case 5:ze=1073741823;break;case 4:ze=1e4;break;default:ze=5e3}return ze=de+ze,F={id:w++,callback:ae,priorityLevel:F,startTime:de,expirationTime:ze,sortIndex:-1},de>me?(F.sortIndex=de,r(x,F),o(y)===null&&F===o(x)&&(C?($(W),W=-1):C=!0,ie(ee,de-me))):(F.sortIndex=ze,r(y,F),j||_||(j=!0,Y||(Y=!0,ne()))),F},n.unstable_shouldYield=O,n.unstable_wrapCallback=function(F){var ae=k;return function(){var de=k;k=ae;try{return F.apply(this,arguments)}finally{k=de}}}})(Ef)),Ef}var yg;function by(){return yg||(yg=1,Sf.exports=yy()),Sf.exports}var Tf={exports:{}},ra={};/**
|
|
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 bg;function Ny(){if(bg)return ra;bg=1;var n=Qf();function r(y){var x="https://react.dev/errors/"+y;if(1<arguments.length){x+="?args[]="+encodeURIComponent(arguments[1]);for(var w=2;w<arguments.length;w++)x+="&args[]="+encodeURIComponent(arguments[w])}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},f=Symbol.for("react.portal");function h(y,x,w){var T=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:f,key:T==null?null:""+T,children:y,containerInfo:x,implementation:w}}var b=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function N(y,x){if(y==="font")return"";if(typeof x=="string")return x==="use-credentials"?x:""}return ra.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=u,ra.createPortal=function(y,x){var w=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 h(y,x,null,w)},ra.flushSync=function(y){var x=b.T,w=u.p;try{if(b.T=null,u.p=2,y)return y()}finally{b.T=x,u.p=w,u.d.f()}},ra.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))},ra.prefetchDNS=function(y){typeof y=="string"&&u.d.D(y)},ra.preinit=function(y,x){if(typeof y=="string"&&x&&typeof x.as=="string"){var w=x.as,T=N(w,x.crossOrigin),k=typeof x.integrity=="string"?x.integrity:void 0,_=typeof x.fetchPriority=="string"?x.fetchPriority:void 0;w==="style"?u.d.S(y,typeof x.precedence=="string"?x.precedence:void 0,{crossOrigin:T,integrity:k,fetchPriority:_}):w==="script"&&u.d.X(y,{crossOrigin:T,integrity:k,fetchPriority:_,nonce:typeof x.nonce=="string"?x.nonce:void 0})}},ra.preinitModule=function(y,x){if(typeof y=="string")if(typeof x=="object"&&x!==null){if(x.as==null||x.as==="script"){var w=N(x.as,x.crossOrigin);u.d.M(y,{crossOrigin:w,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)},ra.preload=function(y,x){if(typeof y=="string"&&typeof x=="object"&&x!==null&&typeof x.as=="string"){var w=x.as,T=N(w,x.crossOrigin);u.d.L(y,w,{crossOrigin:T,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})}},ra.preloadModule=function(y,x){if(typeof y=="string")if(x){var w=N(x.as,x.crossOrigin);u.d.m(y,{as:typeof x.as=="string"&&x.as!=="script"?x.as:void 0,crossOrigin:w,integrity:typeof x.integrity=="string"?x.integrity:void 0})}else u.d.m(y)},ra.requestFormReset=function(y){u.d.r(y)},ra.unstable_batchedUpdates=function(y,x){return y(x)},ra.useFormState=function(y,x,w){return b.H.useFormState(y,x,w)},ra.useFormStatus=function(){return b.H.useHostTransitionStatus()},ra.version="19.2.4",ra}var Ng;function Rx(){if(Ng)return Tf.exports;Ng=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(),Tf.exports=Ny(),Tf.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 jg;function jy(){if(jg)return Qi;jg=1;var n=by(),r=Qf(),o=Rx();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 f(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function h(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 N(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(h(e)!==e)throw Error(u(188))}function x(e){var t=e.alternate;if(!t){if(t=h(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,E=c.child;E;){if(E===a){p=!0,a=c,l=d;break}if(E===l){p=!0,l=c,a=d;break}E=E.sibling}if(!p){for(E=d.child;E;){if(E===a){p=!0,a=d,l=c;break}if(E===l){p=!0,l=d,a=c;break}E=E.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 w(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=w(e),t!==null)return t;e=e.sibling}return null}var T=Object.assign,k=Symbol.for("react.element"),_=Symbol.for("react.transitional.element"),j=Symbol.for("react.portal"),C=Symbol.for("react.fragment"),A=Symbol.for("react.strict_mode"),G=Symbol.for("react.profiler"),$=Symbol.for("react.consumer"),M=Symbol.for("react.context"),V=Symbol.for("react.forward_ref"),ee=Symbol.for("react.suspense"),Y=Symbol.for("react.suspense_list"),W=Symbol.for("react.memo"),R=Symbol.for("react.lazy"),te=Symbol.for("react.activity"),O=Symbol.for("react.memo_cache_sentinel"),le=Symbol.iterator;function ne(e){return e===null||typeof e!="object"?null:(e=le&&e[le]||e["@@iterator"],typeof e=="function"?e:null)}var he=Symbol.for("react.client.reference");function ve(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===he?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case C:return"Fragment";case G:return"Profiler";case A:return"StrictMode";case ee:return"Suspense";case Y:return"SuspenseList";case te:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case j:return"Portal";case M:return e.displayName||"Context";case $:return(e._context.displayName||"Context")+".Consumer";case V:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case W:return t=e.displayName||null,t!==null?t:ve(e.type)||"Memo";case R:t=e._payload,e=e._init;try{return ve(e(t))}catch{}}return null}var ie=Array.isArray,F=r.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ae=o.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,de={pending:!1,data:null,method:null,action:null},me=[],ze=-1;function L(e){return{current:e}}function se(e){0>ze||(e.current=me[ze],me[ze]=null,ze--)}function ge(e,t){ze++,me[ze]=e.current,e.current=t}var pe=L(null),Se=L(null),xe=L(null),Te=L(null);function Ze(e,t){switch(ge(xe,t),ge(Se,e),ge(pe,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?z0(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=z0(t),e=U0(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}se(pe),ge(pe,e)}function We(){se(pe),se(Se),se(xe)}function Dt(e){e.memoizedState!==null&&ge(Te,e);var t=pe.current,a=U0(t,e.type);t!==a&&(ge(Se,e),ge(pe,a))}function fa(e){Se.current===e&&(se(pe),se(Se)),Te.current===e&&(se(Te),Fi._currentValue=de)}var Ja,Ka;function ha(e){if(Ja===void 0)try{throw Error()}catch(a){var t=a.stack.trim().match(/\n( *(at )?)/);Ja=t&&t[1]||"",Ka=-1<a.stack.indexOf(`
|
|
42
|
-
at`)?" (<anonymous>)":-1<a.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
43
|
-
`+Ja+e+Ka}var ma=!1;function yn(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(K){var X=K}Reflect.construct(e,[],ue)}else{try{ue.call()}catch(K){X=K}e.call(ue.prototype)}}else{try{throw Error()}catch(K){X=K}(ue=e())&&typeof ue.catch=="function"&&ue.catch(function(){})}}catch(K){if(K&&X&&typeof K.stack=="string")return[K.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],E=d[1];if(p&&E){var z=p.split(`
|
|
44
|
-
`),Q=E.split(`
|
|
45
|
-
`);for(c=l=0;l<z.length&&!z[l].includes("DetermineComponentFrameRoot");)l++;for(;c<Q.length&&!Q[c].includes("DetermineComponentFrameRoot");)c++;if(l===z.length||c===Q.length)for(l=z.length-1,c=Q.length-1;1<=l&&0<=c&&z[l]!==Q[c];)c--;for(;1<=l&&0<=c;l--,c--)if(z[l]!==Q[c]){if(l!==1||c!==1)do if(l--,c--,0>c||z[l]!==Q[c]){var re=`
|
|
46
|
-
`+z[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:"")?ha(a):""}function Pt(e,t){switch(e.tag){case 26:case 27:case 5:return ha(e.type);case 16:return ha("Lazy");case 13:return e.child!==t&&t!==null?ha("Suspense Fallback"):ha("Suspense");case 19:return ha("SuspenseList");case 0:case 15:return yn(e.type,!1);case 11:return yn(e.type.render,!1);case 1:return yn(e.type,!0);case 31:return ha("Activity");default:return""}}function ua(e){try{var t="",a=null;do t+=Pt(e,a),a=e,e=e.return;while(e);return t}catch(l){return`
|
|
47
|
-
Error generating stack: `+l.message+`
|
|
48
|
-
`+l.stack}}var en=Object.prototype.hasOwnProperty,tn=n.unstable_scheduleCallback,an=n.unstable_cancelCallback,La=n.unstable_shouldYield,bn=n.unstable_requestPaint,It=n.unstable_now,cl=n.unstable_getCurrentPriorityLevel,Zr=n.unstable_ImmediatePriority,Zs=n.unstable_UserBlockingPriority,_n=n.unstable_NormalPriority,Ws=n.unstable_LowPriority,ul=n.unstable_IdlePriority,Ie=n.log,ol=n.unstable_setDisableYieldValue,mt=null,Vt=null;function At(e){if(typeof Ie=="function"&&ol(e),Vt&&typeof Vt.setStrictMode=="function")try{Vt.setStrictMode(mt,e)}catch{}}var kt=Math.clz32?Math.clz32:tt,oe=Math.log,Ne=Math.LN2;function tt(e){return e>>>=0,e===0?32:31-(oe(e)/Ne|0)|0}var wt=256,bt=262144,_t=4194304;function Nn(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 es(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 E=l&134217727;return E!==0?(l=E&~d,l!==0?c=Nn(l):(p&=E,p!==0?c=Nn(p):a||(a=E&~e,a!==0&&(c=Nn(a))))):(E=l&~d,E!==0?c=Nn(E):p!==0?c=Nn(p):a||(a=l&~e,a!==0&&(c=Nn(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 dl(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function vc(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 Wr(){var e=_t;return _t<<=1,(_t&62914560)===0&&(_t=4194304),e}function Is(e){for(var t=[],a=0;31>a;a++)t.push(e);return t}function fl(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function yc(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 E=e.entanglements,z=e.expirationTimes,Q=e.hiddenUpdates;for(a=p&~a;0<a;){var re=31-kt(a),ue=1<<re;E[re]=0,z[re]=-1;var X=Q[re];if(X!==null)for(Q[re]=null,re=0;re<X.length;re++){var K=X[re];K!==null&&(K.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-kt(t);e.entangledLanes|=t,e.entanglements[l]=e.entanglements[l]|1073741824|a&261930}function ga(e,t){var a=e.entangledLanes|=t;for(e=e.entanglements;a;){var l=31-kt(a),c=1<<l;c&t|e[l]&t&&(e[l]|=t),a&=~c}}function Ir(e,t){var a=t&-t;return a=(a&42)!==0?1:Qs(a),(a&(e.suspendedLanes|t))!==0?0:a}function Qs(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 na(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Xs(){var e=ae.p;return e!==0?e:(e=window.event,e===void 0?32:sg(e.type))}function Qr(e,t){var a=ae.p;try{return ae.p=e,t()}finally{ae.p=a}}var nn=Math.random().toString(36).slice(2),St="__reactFiber$"+nn,Bt="__reactProps$"+nn,zn="__reactContainer$"+nn,ts="__reactEvents$"+nn,bc="__reactListeners$"+nn,Nc="__reactHandles$"+nn,jc="__reactResources$"+nn,as="__reactMarker$"+nn;function Js(e){delete e[St],delete e[Bt],delete e[ts],delete e[bc],delete e[Nc]}function Un(e){var t=e[St];if(t)return t;for(var a=e.parentNode;a;){if(t=a[zn]||a[St]){if(a=t.alternate,t.child!==null||a!==null&&a.child!==null)for(e=$0(e);e!==null;){if(a=e[St])return a;e=$0(e)}return t}e=a,a=e.parentNode}return null}function Oe(e){if(e=e[St]||e[zn]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function xa(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(u(33))}function ln(e){var t=e[jc];return t||(t=e[jc]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function zt(e){e[as]=!0}var wc=new Set,Xr={};function jn(e,t){hl(e,t),hl(e+"Capture",t)}function hl(e,t){for(Xr[e]=t,e=0;e<t.length;e++)wc.add(t[e])}var Sc=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]*$"),Ec={},Ln={};function Jr(e){return en.call(Ln,e)?!0:en.call(Ec,e)?!1:Sc.test(e)?Ln[e]=!0:(Ec[e]=!0,!1)}function Qt(e,t,a){if(Jr(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 Ks(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 at(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 Et(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function wn(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Kr(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 ns(e){if(!e._valueTracker){var t=wn(e)?"checked":"value";e._valueTracker=Kr(e,t,""+e[t])}}function ml(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var a=t.getValue(),l="";return e&&(l=wn(e)?e.checked?"true":"false":e.value),e=l,e!==a?(t.setValue(e),!0):!1}function sn(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 er=/[\n"\\]/g;function Xt(e){return e.replace(er,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function tr(e,t,a,l,c,d,p,E){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=""+Et(t)):e.value!==""+Et(t)&&(e.value=""+Et(t)):p!=="submit"&&p!=="reset"||e.removeAttribute("value"),t!=null?ls(e,p,Et(t)):a!=null?ls(e,p,Et(a)):l!=null&&e.removeAttribute("value"),c==null&&d!=null&&(e.defaultChecked=!!d),c!=null&&(e.checked=c&&typeof c!="function"&&typeof c!="symbol"),E!=null&&typeof E!="function"&&typeof E!="symbol"&&typeof E!="boolean"?e.name=""+Et(E):e.removeAttribute("name")}function gl(e,t,a,l,c,d,p,E){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)){ns(e);return}a=a!=null?""+Et(a):"",t=t!=null?""+Et(t):a,E||t===e.value||(e.value=t),e.defaultValue=t}l=l??c,l=typeof l!="function"&&typeof l!="symbol"&&!!l,e.checked=E?e.checked:!!l,e.defaultChecked=!!l,p!=null&&typeof p!="function"&&typeof p!="symbol"&&typeof p!="boolean"&&(e.name=p),ns(e)}function ls(e,t,a){t==="number"&&sn(e.ownerDocument)===e||e.defaultValue===""+a||(e.defaultValue=""+a)}function Hn(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=""+Et(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 ss(e,t,a){if(t!=null&&(t=""+Et(t),t!==e.value&&(e.value=t),a==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=a!=null?""+Et(a):""}function ei(e,t,a,l){if(t==null){if(l!=null){if(a!=null)throw Error(u(92));if(ie(l)){if(1<l.length)throw Error(u(93));l=l[0]}a=l}a==null&&(a=""),t=a}a=Et(t),e.defaultValue=a,l=e.textContent,l===a&&l!==""&&l!==null&&(e.value=l),ns(e)}function rn(e,t){if(t){var a=e.firstChild;if(a&&a===e.lastChild&&a.nodeType===3){a.nodeValue=t;return}}e.textContent=t}var rs=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 is(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||rs.has(t)?t==="float"?e.cssFloat=a:e[t]=(""+a).trim():e[t]=a+"px"}function Tc(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&&is(e,c,l)}else for(var d in t)t.hasOwnProperty(d)&&is(e,d,t[d])}function ar(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 po=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"]]),Cc=/^[\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 cs(e){return Cc.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Ha(){}var ti=null;function nr(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var qn=null,xl=null;function Mc(e){var t=Oe(e);if(t&&(e=t.stateNode)){var a=e[Bt]||null;e:switch(e=t.stateNode,t.type){case"input":if(tr(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="'+Xt(""+t)+'"][type="radio"]'),t=0;t<a.length;t++){var l=a[t];if(l!==e&&l.form===e.form){var c=l[Bt]||null;if(!c)throw Error(u(90));tr(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&&ml(l)}break e;case"textarea":ss(e,a.value,a.defaultValue);break e;case"select":t=a.value,t!=null&&Hn(e,!!a.multiple,t,!1)}}}var ai=!1;function ni(e,t,a){if(ai)return e(t,a);ai=!0;try{var l=e(t);return l}finally{if(ai=!1,(qn!==null||xl!==null)&&(ju(),qn&&(t=qn,e=xl,xl=qn=null,Mc(t),e)))for(t=0;t<e.length;t++)Mc(e[t])}}function us(e,t){var a=e.stateNode;if(a===null)return null;var l=a[Bt]||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 cn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),li=!1;if(cn)try{var os={};Object.defineProperty(os,"passive",{get:function(){li=!0}}),window.addEventListener("test",os,os),window.removeEventListener("test",os,os)}catch{li=!1}var Sn=null,lr=null,sr=null;function Yt(){if(sr)return sr;var e,t=lr,a=t.length,l,c="value"in Sn?Sn.value:Sn.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 sr=c.slice(e,1<l?1-l:void 0)}function ds(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function un(){return!0}function Vn(){return!1}function Tt(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 E in e)e.hasOwnProperty(E)&&(a=e[E],this[E]=a?a(d):d[E]);return this.isDefaultPrevented=(d.defaultPrevented!=null?d.defaultPrevented:d.returnValue===!1)?un:Vn,this.isPropagationStopped=Vn,this}return T(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=un)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=un)},persist:function(){},isPersistent:un}),t}var En={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},fs=Tt(En),hs=T({},En,{view:0,detail:0}),si=Tt(hs),rr,ms,gs,ir=T({},hs,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:ps,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!==gs&&(gs&&e.type==="mousemove"?(rr=e.screenX-gs.screenX,ms=e.screenY-gs.screenY):ms=rr=0,gs=e),rr)},movementY:function(e){return"movementY"in e?e.movementY:ms}}),Oc=Tt(ir),vo=T({},ir,{dataTransfer:0}),yo=Tt(vo),bo=T({},hs,{relatedTarget:0}),cr=Tt(bo),No=T({},En,{animationName:0,elapsedTime:0,pseudoElement:0}),pl=Tt(No),jo=T({},En,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),vl=Tt(jo),xs=T({},En,{data:0}),yl=Tt(xs),wo={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},So={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"},Eo={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function To(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Eo[e])?!!t[e]:!1}function ps(){return To}var Co=T({},hs,{key:function(e){if(e.key){var t=wo[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=ds(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?So[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:ps,charCode:function(e){return e.type==="keypress"?ds(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?ds(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Mo=Tt(Co),Oo=T({},ir,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Rc=Tt(Oo),Ro=T({},hs,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:ps}),Do=Tt(Ro),Dc=T({},En,{propertyName:0,elapsedTime:0,pseudoElement:0}),Ao=Tt(Dc),ko=T({},ir,{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}),_o=Tt(ko),zo=T({},En,{newState:0,oldState:0}),Uo=Tt(zo),Ac=[9,13,27,32],ri=cn&&"CompositionEvent"in window,vs=null;cn&&"documentMode"in document&&(vs=document.documentMode);var Lo=cn&&"TextEvent"in window&&!vs,kc=cn&&(!ri||vs&&8<vs&&11>=vs),_c=" ",zc=!1;function Uc(e,t){switch(e){case"keyup":return Ac.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Lc(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var bl=!1;function Ho(e,t){switch(e){case"compositionend":return Lc(t);case"keypress":return t.which!==32?null:(zc=!0,_c);case"textInput":return e=t.data,e===_c&&zc?null:e;default:return null}}function qo(e,t){if(bl)return e==="compositionend"||!ri&&Uc(e,t)?(e=Yt(),sr=lr=Sn=null,bl=!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 kc&&t.locale!=="ko"?null:t.data;default:return null}}var Vo={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 Hc(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Vo[e.type]:t==="textarea"}function ii(e,t,a,l){qn?xl?xl.push(l):xl=[l]:qn=l,t=Ou(t,"onChange"),0<t.length&&(a=new fs("onChange","change",null,a,l),e.push({event:a,listeners:t}))}var Nl=null,ys=null;function pa(e){O0(e,0)}function on(e){var t=xa(e);if(ml(t))return e}function qc(e,t){if(e==="change")return t}var Tn=!1;if(cn){var ci;if(cn){var Ca="oninput"in document;if(!Ca){var ui=document.createElement("div");ui.setAttribute("oninput","return;"),Ca=typeof ui.oninput=="function"}ci=Ca}else ci=!1;Tn=ci&&(!document.documentMode||9<document.documentMode)}function oi(){Nl&&(Nl.detachEvent("onpropertychange",di),ys=Nl=null)}function di(e){if(e.propertyName==="value"&&on(ys)){var t=[];ii(t,ys,e,nr(e)),ni(pa,t)}}function $e(e,t,a){e==="focusin"?(oi(),Nl=t,ys=a,Nl.attachEvent("onpropertychange",di)):e==="focusout"&&oi()}function jl(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return on(ys)}function Bo(e,t){if(e==="click")return on(t)}function gt(e,t){if(e==="input"||e==="change")return on(t)}function bs(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var la=typeof Object.is=="function"?Object.is:bs;function Ns(e,t){if(la(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(!en.call(t,c)||!la(e[c],t[c]))return!1}return!0}function Vc(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Bc(e,t){var a=Vc(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=Vc(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 Yo(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=sn(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=sn(e.document)}return t}function ur(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 Yc=cn&&"documentMode"in document&&11>=document.documentMode,wl=null,or=null,Jt=null,dr=!1;function js(e,t,a){var l=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;dr||wl==null||wl!==sn(l)||(l=wl,"selectionStart"in l&&ur(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}),Jt&&Ns(Jt,l)||(Jt=l,l=Ou(or,"onSelect"),0<l.length&&(t=new fs("onSelect","select",null,t,a),e.push({event:t,listeners:l}),t.target=wl)))}function Bn(e,t){var a={};return a[e.toLowerCase()]=t.toLowerCase(),a["Webkit"+e]="webkit"+t,a["Moz"+e]="moz"+t,a}var Sl={animationend:Bn("Animation","AnimationEnd"),animationiteration:Bn("Animation","AnimationIteration"),animationstart:Bn("Animation","AnimationStart"),transitionrun:Bn("Transition","TransitionRun"),transitionstart:Bn("Transition","TransitionStart"),transitioncancel:Bn("Transition","TransitionCancel"),transitionend:Bn("Transition","TransitionEnd")},fi={},$c={};cn&&($c=document.createElement("div").style,"AnimationEvent"in window||(delete Sl.animationend.animation,delete Sl.animationiteration.animation,delete Sl.animationstart.animation),"TransitionEvent"in window||delete Sl.transitionend.transition);function Yn(e){if(fi[e])return fi[e];if(!Sl[e])return e;var t=Sl[e],a;for(a in t)if(t.hasOwnProperty(a)&&a in $c)return fi[e]=t[a];return e}var Pc=Yn("animationend"),Fc=Yn("animationiteration"),fr=Yn("animationstart"),$o=Yn("transitionrun"),Po=Yn("transitionstart"),Gc=Yn("transitioncancel"),hi=Yn("transitionend"),mi=new Map,gi="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(" ");gi.push("scrollEnd");function va(e,t){mi.set(e,t),jn(t,[e])}var El=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)},oa=[],qa=0,ws=0;function Tl(){for(var e=qa,t=ws=qa=0;t<e;){var a=oa[t];oa[t++]=null;var l=oa[t];oa[t++]=null;var c=oa[t];oa[t++]=null;var d=oa[t];if(oa[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&&Ss(a,c,d)}}function Va(e,t,a,l){oa[qa++]=e,oa[qa++]=t,oa[qa++]=a,oa[qa++]=l,ws|=l,e.lanes|=l,e=e.alternate,e!==null&&(e.lanes|=l)}function hr(e,t,a,l){return Va(e,t,a,l),Es(e)}function Ba(e,t){return Va(e,null,null,t),Es(e)}function Ss(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-kt(a),e=d.hiddenUpdates,l=e[c],l===null?e[c]=[t]:l.push(t),t.lane=a|536870912),d):null}function Es(e){if(50<Hi)throw Hi=0,$d=null,Error(u(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Ma={};function mr(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 Kt(e,t,a,l){return new mr(e,t,a,l)}function gr(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Ya(e,t){var a=e.alternate;return a===null?(a=Kt(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 Zc(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 xr(e,t,a,l,c,d){var p=0;if(l=e,typeof e=="function")gr(e)&&(p=1);else if(typeof e=="string")p=ty(e,a,pe.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case te:return e=Kt(31,a,t,c),e.elementType=te,e.lanes=d,e;case C:return $a(a.children,c,d,t);case A:p=8,c|=24;break;case G:return e=Kt(12,a,t,c|2),e.elementType=G,e.lanes=d,e;case ee:return e=Kt(13,a,t,c),e.elementType=ee,e.lanes=d,e;case Y:return e=Kt(19,a,t,c),e.elementType=Y,e.lanes=d,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case M:p=10;break e;case $:p=9;break e;case V:p=11;break e;case W:p=14;break e;case R:p=16,l=null;break e}p=29,a=Error(u(130,e===null?"null":typeof e,"")),l=null}return t=Kt(p,a,t,c),t.elementType=e,t.type=l,t.lanes=d,t}function $a(e,t,a,l){return e=Kt(7,e,l,t),e.lanes=a,e}function xi(e,t,a){return e=Kt(6,e,null,t),e.lanes=a,e}function Wc(e){var t=Kt(18,null,null,0);return t.stateNode=e,t}function Cl(e,t,a){return t=Kt(4,e.children!==null?e.children:[],e.key,t),t.lanes=a,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var pi=new WeakMap;function ya(e,t){if(typeof e=="object"&&e!==null){var a=pi.get(e);return a!==void 0?a:(t={value:e,source:t,stack:ua(t)},pi.set(e,t),t)}return{value:e,source:t,stack:ua(t)}}var $n=[],Pn=0,Ts=null,dn=0,sa=[],Ee=0,ba=null,Pa=1,g="";function i(e,t){$n[Pn++]=dn,$n[Pn++]=Ts,Ts=e,dn=t}function m(e,t,a){sa[Ee++]=Pa,sa[Ee++]=g,sa[Ee++]=ba,ba=e;var l=Pa;e=g;var c=32-kt(l)-1;l&=~(1<<c),a+=1;var d=32-kt(t)+c;if(30<d){var p=c-c%5;d=(l&(1<<p)-1).toString(32),l>>=p,c-=p,Pa=1<<32-kt(t)+c|a<<c|l,g=d+e}else Pa=1<<d|a<<c|l,g=e}function v(e){e.return!==null&&(i(e,1),m(e,1,0))}function S(e){for(;e===Ts;)Ts=$n[--Pn],$n[Pn]=null,dn=$n[--Pn],$n[Pn]=null;for(;e===ba;)ba=sa[--Ee],sa[Ee]=null,g=sa[--Ee],sa[Ee]=null,Pa=sa[--Ee],sa[Ee]=null}function D(e,t){sa[Ee++]=Pa,sa[Ee++]=g,sa[Ee++]=ba,Pa=t.id,g=t.overflow,ba=e}var H=null,q=null,P=!1,fe=null,ye=!1,Ue=Error(u(519));function Pe(e){var t=Error(u(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw fn(ya(t,e)),Ue}function De(e){var t=e.stateNode,a=e.type,l=e.memoizedProps;switch(t[St]=e,t[Bt]=l,a){case"dialog":Ye("cancel",t),Ye("close",t);break;case"iframe":case"object":case"embed":Ye("load",t);break;case"video":case"audio":for(a=0;a<Vi.length;a++)Ye(Vi[a],t);break;case"source":Ye("error",t);break;case"img":case"image":case"link":Ye("error",t),Ye("load",t);break;case"details":Ye("toggle",t);break;case"input":Ye("invalid",t),gl(t,l.value,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name,!0);break;case"select":Ye("invalid",t);break;case"textarea":Ye("invalid",t),ei(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||k0(t.textContent,a)?(l.popover!=null&&(Ye("beforetoggle",t),Ye("toggle",t)),l.onScroll!=null&&Ye("scroll",t),l.onScrollEnd!=null&&Ye("scrollend",t),l.onClick!=null&&(t.onclick=Ha),t=!0):t=!1,t||Pe(e,!0)}function yt(e){for(H=e.return;H;)switch(H.tag){case 5:case 31:case 13:ye=!1;return;case 27:case 3:ye=!0;return;default:H=H.return}}function Ft(e){if(e!==H)return!1;if(!P)return yt(e),P=!0,!1;var t=e.tag,a;if((a=t!==3&&t!==27)&&((a=t===5)&&(a=e.type,a=!(a!=="form"&&a!=="button")||lf(e.type,e.memoizedProps)),a=!a),a&&q&&Pe(e),yt(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(u(317));q=Y0(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(u(317));q=Y0(e)}else t===27?(t=q,Vl(e.type)?(e=of,of=null,q=e):q=t):q=H?Wa(e.stateNode.nextSibling):null;return!0}function Gt(){q=H=null,P=!1}function Cn(){var e=fe;return e!==null&&(Sa===null?Sa=e:Sa.push.apply(Sa,e),fe=null),e}function fn(e){fe===null?fe=[e]:fe.push(e)}var pr=L(null),Fn=null,Fa=null;function Mn(e,t,a){ge(pr,t._currentValue),t._currentValue=a}function hn(e){e._currentValue=pr.current,se(pr)}function vi(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 Gn(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 E=d;d=c;for(var z=0;z<t.length;z++)if(E.context===t[z]){d.lanes|=a,E=d.alternate,E!==null&&(E.lanes|=a),vi(d.return,a,e),l||(p=null);break e}d=E.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),vi(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 Ga(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 E=c.type;la(c.pendingProps.value,p.value)||(e!==null?e.push(E):e=[E])}}else if(c===Te.current){if(p=c.alternate,p===null)throw Error(u(387));p.memoizedState.memoizedState!==c.memoizedState.memoizedState&&(e!==null?e.push(Fi):e=[Fi])}c=c.return}e!==null&&Gn(t,e,a,l),t.flags|=262144}function vr(e){for(e=e.firstContext;e!==null;){if(!la(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Cs(e){Fn=e,Fa=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function ea(e){return vh(Fn,e)}function Ic(e,t){return Fn===null&&Cs(e),vh(e,t)}function vh(e,t){var a=t._currentValue;if(t={context:t,memoizedValue:a,next:null},Fa===null){if(e===null)throw Error(u(308));Fa=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Fa=Fa.next=t;return a}var Xp=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()})}},Jp=n.unstable_scheduleCallback,Kp=n.unstable_NormalPriority,Ut={$$typeof:M,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Fo(){return{controller:new Xp,data:new Map,refCount:0}}function yi(e){e.refCount--,e.refCount===0&&Jp(Kp,function(){e.controller.abort()})}var bi=null,Go=0,yr=0,br=null;function ev(e,t){if(bi===null){var a=bi=[];Go=0,yr=Id(),br={status:"pending",value:void 0,then:function(l){a.push(l)}}}return Go++,t.then(yh,yh),t}function yh(){if(--Go===0&&bi!==null){br!==null&&(br.status="fulfilled");var e=bi;bi=null,yr=0,br=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function tv(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 bh=F.S;F.S=function(e,t){n0=It(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&ev(e,t),bh!==null&&bh(e,t)};var Ms=L(null);function Zo(){var e=Ms.current;return e!==null?e:ft.pooledCache}function Qc(e,t){t===null?ge(Ms,Ms.current):ge(Ms,t.pool)}function Nh(){var e=Zo();return e===null?null:{parent:Ut._currentValue,pool:e}}var Nr=Error(u(460)),Wo=Error(u(474)),Xc=Error(u(542)),Jc={then:function(){}};function jh(e){return e=e.status,e==="fulfilled"||e==="rejected"}function wh(e,t,a){switch(a=e[a],a===void 0?e.push(t):a!==t&&(t.then(Ha,Ha),t=a),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Eh(e),e;default:if(typeof t.status=="string")t.then(Ha,Ha);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,Eh(e),e}throw Rs=t,Nr}}function Os(e){try{var t=e._init;return t(e._payload)}catch(a){throw a!==null&&typeof a=="object"&&typeof a.then=="function"?(Rs=a,Nr):a}}var Rs=null;function Sh(){if(Rs===null)throw Error(u(459));var e=Rs;return Rs=null,e}function Eh(e){if(e===Nr||e===Xc)throw Error(u(483))}var jr=null,Ni=0;function Kc(e){var t=Ni;return Ni+=1,jr===null&&(jr=[]),wh(jr,e,t)}function ji(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function eu(e,t){throw t.$$typeof===k?Error(u(525)):(e=Object.prototype.toString.call(t),Error(u(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function Th(e){function t(Z,B){if(e){var I=Z.deletions;I===null?(Z.deletions=[B],Z.flags|=16):I.push(B)}}function a(Z,B){if(!e)return null;for(;B!==null;)t(Z,B),B=B.sibling;return null}function l(Z){for(var B=new Map;Z!==null;)Z.key!==null?B.set(Z.key,Z):B.set(Z.index,Z),Z=Z.sibling;return B}function c(Z,B){return Z=Ya(Z,B),Z.index=0,Z.sibling=null,Z}function d(Z,B,I){return Z.index=I,e?(I=Z.alternate,I!==null?(I=I.index,I<B?(Z.flags|=67108866,B):I):(Z.flags|=67108866,B)):(Z.flags|=1048576,B)}function p(Z){return e&&Z.alternate===null&&(Z.flags|=67108866),Z}function E(Z,B,I,ce){return B===null||B.tag!==6?(B=xi(I,Z.mode,ce),B.return=Z,B):(B=c(B,I),B.return=Z,B)}function z(Z,B,I,ce){var Me=I.type;return Me===C?re(Z,B,I.props.children,ce,I.key):B!==null&&(B.elementType===Me||typeof Me=="object"&&Me!==null&&Me.$$typeof===R&&Os(Me)===B.type)?(B=c(B,I.props),ji(B,I),B.return=Z,B):(B=xr(I.type,I.key,I.props,null,Z.mode,ce),ji(B,I),B.return=Z,B)}function Q(Z,B,I,ce){return B===null||B.tag!==4||B.stateNode.containerInfo!==I.containerInfo||B.stateNode.implementation!==I.implementation?(B=Cl(I,Z.mode,ce),B.return=Z,B):(B=c(B,I.children||[]),B.return=Z,B)}function re(Z,B,I,ce,Me){return B===null||B.tag!==7?(B=$a(I,Z.mode,ce,Me),B.return=Z,B):(B=c(B,I),B.return=Z,B)}function ue(Z,B,I){if(typeof B=="string"&&B!==""||typeof B=="number"||typeof B=="bigint")return B=xi(""+B,Z.mode,I),B.return=Z,B;if(typeof B=="object"&&B!==null){switch(B.$$typeof){case _:return I=xr(B.type,B.key,B.props,null,Z.mode,I),ji(I,B),I.return=Z,I;case j:return B=Cl(B,Z.mode,I),B.return=Z,B;case R:return B=Os(B),ue(Z,B,I)}if(ie(B)||ne(B))return B=$a(B,Z.mode,I,null),B.return=Z,B;if(typeof B.then=="function")return ue(Z,Kc(B),I);if(B.$$typeof===M)return ue(Z,Ic(Z,B),I);eu(Z,B)}return null}function X(Z,B,I,ce){var Me=B!==null?B.key:null;if(typeof I=="string"&&I!==""||typeof I=="number"||typeof I=="bigint")return Me!==null?null:E(Z,B,""+I,ce);if(typeof I=="object"&&I!==null){switch(I.$$typeof){case _:return I.key===Me?z(Z,B,I,ce):null;case j:return I.key===Me?Q(Z,B,I,ce):null;case R:return I=Os(I),X(Z,B,I,ce)}if(ie(I)||ne(I))return Me!==null?null:re(Z,B,I,ce,null);if(typeof I.then=="function")return X(Z,B,Kc(I),ce);if(I.$$typeof===M)return X(Z,B,Ic(Z,I),ce);eu(Z,I)}return null}function K(Z,B,I,ce,Me){if(typeof ce=="string"&&ce!==""||typeof ce=="number"||typeof ce=="bigint")return Z=Z.get(I)||null,E(B,Z,""+ce,Me);if(typeof ce=="object"&&ce!==null){switch(ce.$$typeof){case _:return Z=Z.get(ce.key===null?I:ce.key)||null,z(B,Z,ce,Me);case j:return Z=Z.get(ce.key===null?I:ce.key)||null,Q(B,Z,ce,Me);case R:return ce=Os(ce),K(Z,B,I,ce,Me)}if(ie(ce)||ne(ce))return Z=Z.get(I)||null,re(B,Z,ce,Me,null);if(typeof ce.then=="function")return K(Z,B,I,Kc(ce),Me);if(ce.$$typeof===M)return K(Z,B,I,Ic(B,ce),Me);eu(B,ce)}return null}function be(Z,B,I,ce){for(var Me=null,Xe=null,je=B,Ve=B=0,Ge=null;je!==null&&Ve<I.length;Ve++){je.index>Ve?(Ge=je,je=null):Ge=je.sibling;var Je=X(Z,je,I[Ve],ce);if(Je===null){je===null&&(je=Ge);break}e&&je&&Je.alternate===null&&t(Z,je),B=d(Je,B,Ve),Xe===null?Me=Je:Xe.sibling=Je,Xe=Je,je=Ge}if(Ve===I.length)return a(Z,je),P&&i(Z,Ve),Me;if(je===null){for(;Ve<I.length;Ve++)je=ue(Z,I[Ve],ce),je!==null&&(B=d(je,B,Ve),Xe===null?Me=je:Xe.sibling=je,Xe=je);return P&&i(Z,Ve),Me}for(je=l(je);Ve<I.length;Ve++)Ge=K(je,Z,Ve,I[Ve],ce),Ge!==null&&(e&&Ge.alternate!==null&&je.delete(Ge.key===null?Ve:Ge.key),B=d(Ge,B,Ve),Xe===null?Me=Ge:Xe.sibling=Ge,Xe=Ge);return e&&je.forEach(function(Fl){return t(Z,Fl)}),P&&i(Z,Ve),Me}function ke(Z,B,I,ce){if(I==null)throw Error(u(151));for(var Me=null,Xe=null,je=B,Ve=B=0,Ge=null,Je=I.next();je!==null&&!Je.done;Ve++,Je=I.next()){je.index>Ve?(Ge=je,je=null):Ge=je.sibling;var Fl=X(Z,je,Je.value,ce);if(Fl===null){je===null&&(je=Ge);break}e&&je&&Fl.alternate===null&&t(Z,je),B=d(Fl,B,Ve),Xe===null?Me=Fl:Xe.sibling=Fl,Xe=Fl,je=Ge}if(Je.done)return a(Z,je),P&&i(Z,Ve),Me;if(je===null){for(;!Je.done;Ve++,Je=I.next())Je=ue(Z,Je.value,ce),Je!==null&&(B=d(Je,B,Ve),Xe===null?Me=Je:Xe.sibling=Je,Xe=Je);return P&&i(Z,Ve),Me}for(je=l(je);!Je.done;Ve++,Je=I.next())Je=K(je,Z,Ve,Je.value,ce),Je!==null&&(e&&Je.alternate!==null&&je.delete(Je.key===null?Ve:Je.key),B=d(Je,B,Ve),Xe===null?Me=Je:Xe.sibling=Je,Xe=Je);return e&&je.forEach(function(fy){return t(Z,fy)}),P&&i(Z,Ve),Me}function ut(Z,B,I,ce){if(typeof I=="object"&&I!==null&&I.type===C&&I.key===null&&(I=I.props.children),typeof I=="object"&&I!==null){switch(I.$$typeof){case _:e:{for(var Me=I.key;B!==null;){if(B.key===Me){if(Me=I.type,Me===C){if(B.tag===7){a(Z,B.sibling),ce=c(B,I.props.children),ce.return=Z,Z=ce;break e}}else if(B.elementType===Me||typeof Me=="object"&&Me!==null&&Me.$$typeof===R&&Os(Me)===B.type){a(Z,B.sibling),ce=c(B,I.props),ji(ce,I),ce.return=Z,Z=ce;break e}a(Z,B);break}else t(Z,B);B=B.sibling}I.type===C?(ce=$a(I.props.children,Z.mode,ce,I.key),ce.return=Z,Z=ce):(ce=xr(I.type,I.key,I.props,null,Z.mode,ce),ji(ce,I),ce.return=Z,Z=ce)}return p(Z);case j:e:{for(Me=I.key;B!==null;){if(B.key===Me)if(B.tag===4&&B.stateNode.containerInfo===I.containerInfo&&B.stateNode.implementation===I.implementation){a(Z,B.sibling),ce=c(B,I.children||[]),ce.return=Z,Z=ce;break e}else{a(Z,B);break}else t(Z,B);B=B.sibling}ce=Cl(I,Z.mode,ce),ce.return=Z,Z=ce}return p(Z);case R:return I=Os(I),ut(Z,B,I,ce)}if(ie(I))return be(Z,B,I,ce);if(ne(I)){if(Me=ne(I),typeof Me!="function")throw Error(u(150));return I=Me.call(I),ke(Z,B,I,ce)}if(typeof I.then=="function")return ut(Z,B,Kc(I),ce);if(I.$$typeof===M)return ut(Z,B,Ic(Z,I),ce);eu(Z,I)}return typeof I=="string"&&I!==""||typeof I=="number"||typeof I=="bigint"?(I=""+I,B!==null&&B.tag===6?(a(Z,B.sibling),ce=c(B,I),ce.return=Z,Z=ce):(a(Z,B),ce=xi(I,Z.mode,ce),ce.return=Z,Z=ce),p(Z)):a(Z,B)}return function(Z,B,I,ce){try{Ni=0;var Me=ut(Z,B,I,ce);return jr=null,Me}catch(je){if(je===Nr||je===Xc)throw je;var Xe=Kt(29,je,null,Z.mode);return Xe.lanes=ce,Xe.return=Z,Xe}finally{}}}var Ds=Th(!0),Ch=Th(!1),Ml=!1;function Io(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Qo(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Ol(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Rl(e,t,a){var l=e.updateQueue;if(l===null)return null;if(l=l.shared,(Ke&2)!==0){var c=l.pending;return c===null?t.next=t:(t.next=c.next,c.next=t),l.pending=t,t=Es(e),Ss(e,null,a),t}return Va(e,l,t,a),Es(e)}function wi(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,ga(e,a)}}function Xo(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 Jo=!1;function Si(){if(Jo){var e=br;if(e!==null)throw e}}function Ei(e,t,a,l){Jo=!1;var c=e.updateQueue;Ml=!1;var d=c.firstBaseUpdate,p=c.lastBaseUpdate,E=c.shared.pending;if(E!==null){c.shared.pending=null;var z=E,Q=z.next;z.next=null,p===null?d=Q:p.next=Q,p=z;var re=e.alternate;re!==null&&(re=re.updateQueue,E=re.lastBaseUpdate,E!==p&&(E===null?re.firstBaseUpdate=Q:E.next=Q,re.lastBaseUpdate=z))}if(d!==null){var ue=c.baseState;p=0,re=Q=z=null,E=d;do{var X=E.lane&-536870913,K=X!==E.lane;if(K?(Fe&X)===X:(l&X)===X){X!==0&&X===yr&&(Jo=!0),re!==null&&(re=re.next={lane:0,tag:E.tag,payload:E.payload,callback:null,next:null});e:{var be=e,ke=E;X=t;var ut=a;switch(ke.tag){case 1:if(be=ke.payload,typeof be=="function"){ue=be.call(ut,ue,X);break e}ue=be;break e;case 3:be.flags=be.flags&-65537|128;case 0:if(be=ke.payload,X=typeof be=="function"?be.call(ut,ue,X):be,X==null)break e;ue=T({},ue,X);break e;case 2:Ml=!0}}X=E.callback,X!==null&&(e.flags|=64,K&&(e.flags|=8192),K=c.callbacks,K===null?c.callbacks=[X]:K.push(X))}else K={lane:X,tag:E.tag,payload:E.payload,callback:E.callback,next:null},re===null?(Q=re=K,z=ue):re=re.next=K,p|=X;if(E=E.next,E===null){if(E=c.shared.pending,E===null)break;K=E,E=K.next,K.next=null,c.lastBaseUpdate=K,c.shared.pending=null}}while(!0);re===null&&(z=ue),c.baseState=z,c.firstBaseUpdate=Q,c.lastBaseUpdate=re,d===null&&(c.shared.lanes=0),zl|=p,e.lanes=p,e.memoizedState=ue}}function Mh(e,t){if(typeof e!="function")throw Error(u(191,e));e.call(t)}function Oh(e,t){var a=e.callbacks;if(a!==null)for(e.callbacks=null,e=0;e<a.length;e++)Mh(a[e],t)}var wr=L(null),tu=L(0);function Rh(e,t){e=tl,ge(tu,e),ge(wr,t),tl=e|t.baseLanes}function Ko(){ge(tu,tl),ge(wr,wr.current)}function ed(){tl=tu.current,se(wr),se(tu)}var Oa=L(null),Za=null;function Dl(e){var t=e.alternate;ge(Ct,Ct.current&1),ge(Oa,e),Za===null&&(t===null||wr.current!==null||t.memoizedState!==null)&&(Za=e)}function td(e){ge(Ct,Ct.current),ge(Oa,e),Za===null&&(Za=e)}function Dh(e){e.tag===22?(ge(Ct,Ct.current),ge(Oa,e),Za===null&&(Za=e)):Al()}function Al(){ge(Ct,Ct.current),ge(Oa,Oa.current)}function Ra(e){se(Oa),Za===e&&(Za=null),se(Ct)}var Ct=L(0);function au(e){for(var t=e;t!==null;){if(t.tag===13){var a=t.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||cf(a)||uf(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 Zn=0,He=null,it=null,Lt=null,nu=!1,Sr=!1,As=!1,lu=0,Ti=0,Er=null,av=0;function Nt(){throw Error(u(321))}function ad(e,t){if(t===null)return!1;for(var a=0;a<t.length&&a<e.length;a++)if(!la(e[a],t[a]))return!1;return!0}function nd(e,t,a,l,c,d){return Zn=d,He=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,F.H=e===null||e.memoizedState===null?mm:vd,As=!1,d=a(l,c),As=!1,Sr&&(d=kh(t,a,l,c)),Ah(e),d}function Ah(e){F.H=Oi;var t=it!==null&&it.next!==null;if(Zn=0,Lt=it=He=null,nu=!1,Ti=0,Er=null,t)throw Error(u(300));e===null||Ht||(e=e.dependencies,e!==null&&vr(e)&&(Ht=!0))}function kh(e,t,a,l){He=e;var c=0;do{if(Sr&&(Er=null),Ti=0,Sr=!1,25<=c)throw Error(u(301));if(c+=1,Lt=it=null,e.updateQueue!=null){var d=e.updateQueue;d.lastEffect=null,d.events=null,d.stores=null,d.memoCache!=null&&(d.memoCache.index=0)}F.H=gm,d=t(a,l)}while(Sr);return d}function nv(){var e=F.H,t=e.useState()[0];return t=typeof t.then=="function"?Ci(t):t,e=e.useState()[0],(it!==null?it.memoizedState:null)!==e&&(He.flags|=1024),t}function ld(){var e=lu!==0;return lu=0,e}function sd(e,t,a){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a}function rd(e){if(nu){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}nu=!1}Zn=0,Lt=it=He=null,Sr=!1,Ti=lu=0,Er=null}function da(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Lt===null?He.memoizedState=Lt=e:Lt=Lt.next=e,Lt}function Mt(){if(it===null){var e=He.alternate;e=e!==null?e.memoizedState:null}else e=it.next;var t=Lt===null?He.memoizedState:Lt.next;if(t!==null)Lt=t,it=e;else{if(e===null)throw He.alternate===null?Error(u(467)):Error(u(310));it=e,e={memoizedState:it.memoizedState,baseState:it.baseState,baseQueue:it.baseQueue,queue:it.queue,next:null},Lt===null?He.memoizedState=Lt=e:Lt=Lt.next=e}return Lt}function su(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Ci(e){var t=Ti;return Ti+=1,Er===null&&(Er=[]),e=wh(Er,e,t),t=He,(Lt===null?t.memoizedState:Lt.next)===null&&(t=t.alternate,F.H=t===null||t.memoizedState===null?mm:vd),e}function ru(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Ci(e);if(e.$$typeof===M)return ea(e)}throw Error(u(438,String(e)))}function id(e){var t=null,a=He.updateQueue;if(a!==null&&(t=a.memoCache),t==null){var l=He.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=su(),He.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]=O;return t.index++,a}function Wn(e,t){return typeof t=="function"?t(e):t}function iu(e){var t=Mt();return cd(t,it,e)}function cd(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 E=p=null,z=null,Q=t,re=!1;do{var ue=Q.lane&-536870913;if(ue!==Q.lane?(Fe&ue)===ue:(Zn&ue)===ue){var X=Q.revertLane;if(X===0)z!==null&&(z=z.next={lane:0,revertLane:0,gesture:null,action:Q.action,hasEagerState:Q.hasEagerState,eagerState:Q.eagerState,next:null}),ue===yr&&(re=!0);else if((Zn&X)===X){Q=Q.next,X===yr&&(re=!0);continue}else ue={lane:0,revertLane:Q.revertLane,gesture:null,action:Q.action,hasEagerState:Q.hasEagerState,eagerState:Q.eagerState,next:null},z===null?(E=z=ue,p=d):z=z.next=ue,He.lanes|=X,zl|=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},z===null?(E=z=X,p=d):z=z.next=X,He.lanes|=ue,zl|=ue;Q=Q.next}while(Q!==null&&Q!==t);if(z===null?p=d:z.next=E,!la(d,e.memoizedState)&&(Ht=!0,re&&(a=br,a!==null)))throw a;e.memoizedState=d,e.baseState=p,e.baseQueue=z,l.lastRenderedState=d}return c===null&&(l.lanes=0),[e.memoizedState,l.dispatch]}function ud(e){var t=Mt(),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);la(d,t.memoizedState)||(Ht=!0),t.memoizedState=d,t.baseQueue===null&&(t.baseState=d),a.lastRenderedState=d}return[d,l]}function _h(e,t,a){var l=He,c=Mt(),d=P;if(d){if(a===void 0)throw Error(u(407));a=a()}else a=t();var p=!la((it||c).memoizedState,a);if(p&&(c.memoizedState=a,Ht=!0),c=c.queue,fd(Lh.bind(null,l,c,e),[e]),c.getSnapshot!==t||p||Lt!==null&&Lt.memoizedState.tag&1){if(l.flags|=2048,Tr(9,{destroy:void 0},Uh.bind(null,l,c,a,t),null),ft===null)throw Error(u(349));d||(Zn&127)!==0||zh(l,t,a)}return a}function zh(e,t,a){e.flags|=16384,e={getSnapshot:t,value:a},t=He.updateQueue,t===null?(t=su(),He.updateQueue=t,t.stores=[e]):(a=t.stores,a===null?t.stores=[e]:a.push(e))}function Uh(e,t,a,l){t.value=a,t.getSnapshot=l,Hh(t)&&qh(e)}function Lh(e,t,a){return a(function(){Hh(t)&&qh(e)})}function Hh(e){var t=e.getSnapshot;e=e.value;try{var a=t();return!la(e,a)}catch{return!0}}function qh(e){var t=Ba(e,2);t!==null&&Ea(t,e,2)}function od(e){var t=da();if(typeof e=="function"){var a=e;if(e=a(),As){At(!0);try{a()}finally{At(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Wn,lastRenderedState:e},t}function Vh(e,t,a,l){return e.baseState=a,cd(e,it,typeof l=="function"?l:Wn)}function lv(e,t,a,l,c){if(ou(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)}};F.T!==null?a(!0):d.isTransition=!1,l(d),a=t.pending,a===null?(d.next=t.pending=d,Bh(t,d)):(d.next=a.next,t.pending=a.next=d)}}function Bh(e,t){var a=t.action,l=t.payload,c=e.state;if(t.isTransition){var d=F.T,p={};F.T=p;try{var E=a(c,l),z=F.S;z!==null&&z(p,E),Yh(e,t,E)}catch(Q){dd(e,t,Q)}finally{d!==null&&p.types!==null&&(d.types=p.types),F.T=d}}else try{d=a(c,l),Yh(e,t,d)}catch(Q){dd(e,t,Q)}}function Yh(e,t,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(function(l){$h(e,t,l)},function(l){return dd(e,t,l)}):$h(e,t,a)}function $h(e,t,a){t.status="fulfilled",t.value=a,Ph(t),e.state=a,t=e.pending,t!==null&&(a=t.next,a===t?e.pending=null:(a=a.next,t.next=a,Bh(e,a)))}function dd(e,t,a){var l=e.pending;if(e.pending=null,l!==null){l=l.next;do t.status="rejected",t.reason=a,Ph(t),t=t.next;while(t!==l)}e.action=null}function Ph(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Fh(e,t){return t}function Gh(e,t){if(P){var a=ft.formState;if(a!==null){e:{var l=He;if(P){if(q){t:{for(var c=q,d=ye;c.nodeType!==8;){if(!d){c=null;break t}if(c=Wa(c.nextSibling),c===null){c=null;break t}}d=c.data,c=d==="F!"||d==="F"?c:null}if(c){q=Wa(c.nextSibling),l=c.data==="F!";break e}}Pe(l)}l=!1}l&&(t=a[0])}}return a=da(),a.memoizedState=a.baseState=t,l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Fh,lastRenderedState:t},a.queue=l,a=dm.bind(null,He,l),l.dispatch=a,l=od(!1),d=pd.bind(null,He,!1,l.queue),l=da(),c={state:t,dispatch:null,action:e,pending:null},l.queue=c,a=lv.bind(null,He,c,d,a),c.dispatch=a,l.memoizedState=e,[t,a,!1]}function Zh(e){var t=Mt();return Wh(t,it,e)}function Wh(e,t,a){if(t=cd(e,t,Fh)[0],e=iu(Wn)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var l=Ci(t)}catch(p){throw p===Nr?Xc:p}else l=t;t=Mt();var c=t.queue,d=c.dispatch;return a!==t.memoizedState&&(He.flags|=2048,Tr(9,{destroy:void 0},sv.bind(null,c,a),null)),[l,d,e]}function sv(e,t){e.action=t}function Ih(e){var t=Mt(),a=it;if(a!==null)return Wh(t,a,e);Mt(),t=t.memoizedState,a=Mt();var l=a.queue.dispatch;return a.memoizedState=e,[t,l,!1]}function Tr(e,t,a,l){return e={tag:e,create:a,deps:l,inst:t,next:null},t=He.updateQueue,t===null&&(t=su(),He.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 Qh(){return Mt().memoizedState}function cu(e,t,a,l){var c=da();He.flags|=e,c.memoizedState=Tr(1|t,{destroy:void 0},a,l===void 0?null:l)}function uu(e,t,a,l){var c=Mt();l=l===void 0?null:l;var d=c.memoizedState.inst;it!==null&&l!==null&&ad(l,it.memoizedState.deps)?c.memoizedState=Tr(t,d,a,l):(He.flags|=e,c.memoizedState=Tr(1|t,d,a,l))}function Xh(e,t){cu(8390656,8,e,t)}function fd(e,t){uu(2048,8,e,t)}function rv(e){He.flags|=4;var t=He.updateQueue;if(t===null)t=su(),He.updateQueue=t,t.events=[e];else{var a=t.events;a===null?t.events=[e]:a.push(e)}}function Jh(e){var t=Mt().memoizedState;return rv({ref:t,nextImpl:e}),function(){if((Ke&2)!==0)throw Error(u(440));return t.impl.apply(void 0,arguments)}}function Kh(e,t){return uu(4,2,e,t)}function em(e,t){return uu(4,4,e,t)}function tm(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 am(e,t,a){a=a!=null?a.concat([e]):null,uu(4,4,tm.bind(null,t,e),a)}function hd(){}function nm(e,t){var a=Mt();t=t===void 0?null:t;var l=a.memoizedState;return t!==null&&ad(t,l[1])?l[0]:(a.memoizedState=[e,t],e)}function lm(e,t){var a=Mt();t=t===void 0?null:t;var l=a.memoizedState;if(t!==null&&ad(t,l[1]))return l[0];if(l=e(),As){At(!0);try{e()}finally{At(!1)}}return a.memoizedState=[l,t],l}function md(e,t,a){return a===void 0||(Zn&1073741824)!==0&&(Fe&261930)===0?e.memoizedState=t:(e.memoizedState=a,e=s0(),He.lanes|=e,zl|=e,a)}function sm(e,t,a,l){return la(a,t)?a:wr.current!==null?(e=md(e,a,l),la(e,t)||(Ht=!0),e):(Zn&42)===0||(Zn&1073741824)!==0&&(Fe&261930)===0?(Ht=!0,e.memoizedState=a):(e=s0(),He.lanes|=e,zl|=e,t)}function rm(e,t,a,l,c){var d=ae.p;ae.p=d!==0&&8>d?d:8;var p=F.T,E={};F.T=E,pd(e,!1,t,a);try{var z=c(),Q=F.S;if(Q!==null&&Q(E,z),z!==null&&typeof z=="object"&&typeof z.then=="function"){var re=tv(z,l);Mi(e,t,re,ka(e))}else Mi(e,t,l,ka(e))}catch(ue){Mi(e,t,{then:function(){},status:"rejected",reason:ue},ka())}finally{ae.p=d,p!==null&&E.types!==null&&(p.types=E.types),F.T=p}}function iv(){}function gd(e,t,a,l){if(e.tag!==5)throw Error(u(476));var c=im(e).queue;rm(e,c,t,de,a===null?iv:function(){return cm(e),a(l)})}function im(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:de,baseState:de,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Wn,lastRenderedState:de},next:null};var a={};return t.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Wn,lastRenderedState:a},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function cm(e){var t=im(e);t.next===null&&(t=e.alternate.memoizedState),Mi(e,t.next.queue,{},ka())}function xd(){return ea(Fi)}function um(){return Mt().memoizedState}function om(){return Mt().memoizedState}function cv(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var a=ka();e=Ol(a);var l=Rl(t,e,a);l!==null&&(Ea(l,t,a),wi(l,t,a)),t={cache:Fo()},e.payload=t;return}t=t.return}}function uv(e,t,a){var l=ka();a={lane:l,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},ou(e)?fm(t,a):(a=hr(e,t,a,l),a!==null&&(Ea(a,e,l),hm(a,t,l)))}function dm(e,t,a){var l=ka();Mi(e,t,a,l)}function Mi(e,t,a,l){var c={lane:l,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(ou(e))fm(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,E=d(p,a);if(c.hasEagerState=!0,c.eagerState=E,la(E,p))return Va(e,t,c,0),ft===null&&Tl(),!1}catch{}finally{}if(a=hr(e,t,c,l),a!==null)return Ea(a,e,l),hm(a,t,l),!0}return!1}function pd(e,t,a,l){if(l={lane:2,revertLane:Id(),gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},ou(e)){if(t)throw Error(u(479))}else t=hr(e,a,l,2),t!==null&&Ea(t,e,2)}function ou(e){var t=e.alternate;return e===He||t!==null&&t===He}function fm(e,t){Sr=nu=!0;var a=e.pending;a===null?t.next=t:(t.next=a.next,a.next=t),e.pending=t}function hm(e,t,a){if((a&4194048)!==0){var l=t.lanes;l&=e.pendingLanes,a|=l,t.lanes=a,ga(e,a)}}var Oi={readContext:ea,use:ru,useCallback:Nt,useContext:Nt,useEffect:Nt,useImperativeHandle:Nt,useLayoutEffect:Nt,useInsertionEffect:Nt,useMemo:Nt,useReducer:Nt,useRef:Nt,useState:Nt,useDebugValue:Nt,useDeferredValue:Nt,useTransition:Nt,useSyncExternalStore:Nt,useId:Nt,useHostTransitionStatus:Nt,useFormState:Nt,useActionState:Nt,useOptimistic:Nt,useMemoCache:Nt,useCacheRefresh:Nt};Oi.useEffectEvent=Nt;var mm={readContext:ea,use:ru,useCallback:function(e,t){return da().memoizedState=[e,t===void 0?null:t],e},useContext:ea,useEffect:Xh,useImperativeHandle:function(e,t,a){a=a!=null?a.concat([e]):null,cu(4194308,4,tm.bind(null,t,e),a)},useLayoutEffect:function(e,t){return cu(4194308,4,e,t)},useInsertionEffect:function(e,t){cu(4,2,e,t)},useMemo:function(e,t){var a=da();t=t===void 0?null:t;var l=e();if(As){At(!0);try{e()}finally{At(!1)}}return a.memoizedState=[l,t],l},useReducer:function(e,t,a){var l=da();if(a!==void 0){var c=a(t);if(As){At(!0);try{a(t)}finally{At(!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=uv.bind(null,He,e),[l.memoizedState,e]},useRef:function(e){var t=da();return e={current:e},t.memoizedState=e},useState:function(e){e=od(e);var t=e.queue,a=dm.bind(null,He,t);return t.dispatch=a,[e.memoizedState,a]},useDebugValue:hd,useDeferredValue:function(e,t){var a=da();return md(a,e,t)},useTransition:function(){var e=od(!1);return e=rm.bind(null,He,e.queue,!0,!1),da().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,a){var l=He,c=da();if(P){if(a===void 0)throw Error(u(407));a=a()}else{if(a=t(),ft===null)throw Error(u(349));(Fe&127)!==0||zh(l,t,a)}c.memoizedState=a;var d={value:a,getSnapshot:t};return c.queue=d,Xh(Lh.bind(null,l,d,e),[e]),l.flags|=2048,Tr(9,{destroy:void 0},Uh.bind(null,l,d,a,t),null),a},useId:function(){var e=da(),t=ft.identifierPrefix;if(P){var a=g,l=Pa;a=(l&~(1<<32-kt(l)-1)).toString(32)+a,t="_"+t+"R_"+a,a=lu++,0<a&&(t+="H"+a.toString(32)),t+="_"}else a=av++,t="_"+t+"r_"+a.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:xd,useFormState:Gh,useActionState:Gh,useOptimistic:function(e){var t=da();t.memoizedState=t.baseState=e;var a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=a,t=pd.bind(null,He,!0,a),a.dispatch=t,[e,t]},useMemoCache:id,useCacheRefresh:function(){return da().memoizedState=cv.bind(null,He)},useEffectEvent:function(e){var t=da(),a={impl:e};return t.memoizedState=a,function(){if((Ke&2)!==0)throw Error(u(440));return a.impl.apply(void 0,arguments)}}},vd={readContext:ea,use:ru,useCallback:nm,useContext:ea,useEffect:fd,useImperativeHandle:am,useInsertionEffect:Kh,useLayoutEffect:em,useMemo:lm,useReducer:iu,useRef:Qh,useState:function(){return iu(Wn)},useDebugValue:hd,useDeferredValue:function(e,t){var a=Mt();return sm(a,it.memoizedState,e,t)},useTransition:function(){var e=iu(Wn)[0],t=Mt().memoizedState;return[typeof e=="boolean"?e:Ci(e),t]},useSyncExternalStore:_h,useId:um,useHostTransitionStatus:xd,useFormState:Zh,useActionState:Zh,useOptimistic:function(e,t){var a=Mt();return Vh(a,it,e,t)},useMemoCache:id,useCacheRefresh:om};vd.useEffectEvent=Jh;var gm={readContext:ea,use:ru,useCallback:nm,useContext:ea,useEffect:fd,useImperativeHandle:am,useInsertionEffect:Kh,useLayoutEffect:em,useMemo:lm,useReducer:ud,useRef:Qh,useState:function(){return ud(Wn)},useDebugValue:hd,useDeferredValue:function(e,t){var a=Mt();return it===null?md(a,e,t):sm(a,it.memoizedState,e,t)},useTransition:function(){var e=ud(Wn)[0],t=Mt().memoizedState;return[typeof e=="boolean"?e:Ci(e),t]},useSyncExternalStore:_h,useId:um,useHostTransitionStatus:xd,useFormState:Ih,useActionState:Ih,useOptimistic:function(e,t){var a=Mt();return it!==null?Vh(a,it,e,t):(a.baseState=e,[e,a.queue.dispatch])},useMemoCache:id,useCacheRefresh:om};gm.useEffectEvent=Jh;function yd(e,t,a,l){t=e.memoizedState,a=a(l,t),a=a==null?t:T({},t,a),e.memoizedState=a,e.lanes===0&&(e.updateQueue.baseState=a)}var bd={enqueueSetState:function(e,t,a){e=e._reactInternals;var l=ka(),c=Ol(l);c.payload=t,a!=null&&(c.callback=a),t=Rl(e,c,l),t!==null&&(Ea(t,e,l),wi(t,e,l))},enqueueReplaceState:function(e,t,a){e=e._reactInternals;var l=ka(),c=Ol(l);c.tag=1,c.payload=t,a!=null&&(c.callback=a),t=Rl(e,c,l),t!==null&&(Ea(t,e,l),wi(t,e,l))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var a=ka(),l=Ol(a);l.tag=2,t!=null&&(l.callback=t),t=Rl(e,l,a),t!==null&&(Ea(t,e,a),wi(t,e,a))}};function xm(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 pm(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&&bd.enqueueReplaceState(t,t.state,null)}function ks(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=T({},a));for(var c in e)a[c]===void 0&&(a[c]=e[c])}return a}function vm(e){El(e)}function ym(e){console.error(e)}function bm(e){El(e)}function du(e,t){try{var a=e.onUncaughtError;a(t.value,{componentStack:t.stack})}catch(l){setTimeout(function(){throw l})}}function Nm(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 Nd(e,t,a){return a=Ol(a),a.tag=3,a.payload={element:null},a.callback=function(){du(e,t)},a}function jm(e){return e=Ol(e),e.tag=3,e}function wm(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(){Nm(t,a,l)}}var p=a.stateNode;p!==null&&typeof p.componentDidCatch=="function"&&(e.callback=function(){Nm(t,a,l),typeof c!="function"&&(Ul===null?Ul=new Set([this]):Ul.add(this));var E=l.stack;this.componentDidCatch(l.value,{componentStack:E!==null?E:""})})}function ov(e,t,a,l,c){if(a.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){if(t=a.alternate,t!==null&&Ga(t,a,c,!0),a=Oa.current,a!==null){switch(a.tag){case 31:case 13:return Za===null?wu():a.alternate===null&&jt===0&&(jt=3),a.flags&=-257,a.flags|=65536,a.lanes=c,l===Jc?a.flags|=16384:(t=a.updateQueue,t===null?a.updateQueue=new Set([l]):t.add(l),Gd(e,l,c)),!1;case 22:return a.flags|=65536,l===Jc?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)),Gd(e,l,c)),!1}throw Error(u(435,a.tag))}return Gd(e,l,c),wu(),!1}if(P)return t=Oa.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=c,l!==Ue&&(e=Error(u(422),{cause:l}),fn(ya(e,a)))):(l!==Ue&&(t=Error(u(423),{cause:l}),fn(ya(t,a))),e=e.current.alternate,e.flags|=65536,c&=-c,e.lanes|=c,l=ya(l,a),c=Nd(e.stateNode,l,c),Xo(e,c),jt!==4&&(jt=2)),!1;var d=Error(u(520),{cause:l});if(d=ya(d,a),Li===null?Li=[d]:Li.push(d),jt!==4&&(jt=2),t===null)return!0;l=ya(l,a),a=t;do{switch(a.tag){case 3:return a.flags|=65536,e=c&-c,a.lanes|=e,e=Nd(a.stateNode,l,e),Xo(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=jm(c),wm(c,e,a,l),Xo(a,c),!1}a=a.return}while(a!==null);return!1}var jd=Error(u(461)),Ht=!1;function ta(e,t,a,l){t.child=e===null?Ch(t,null,a,l):Ds(t,e.child,a,l)}function Sm(e,t,a,l,c){a=a.render;var d=t.ref;if("ref"in l){var p={};for(var E in l)E!=="ref"&&(p[E]=l[E])}else p=l;return Cs(t),l=nd(e,t,a,p,d,c),E=ld(),e!==null&&!Ht?(sd(e,t,c),In(e,t,c)):(P&&E&&v(t),t.flags|=1,ta(e,t,l,c),t.child)}function Em(e,t,a,l,c){if(e===null){var d=a.type;return typeof d=="function"&&!gr(d)&&d.defaultProps===void 0&&a.compare===null?(t.tag=15,t.type=d,Tm(e,t,d,l,c)):(e=xr(a.type,null,l,t,t.mode,c),e.ref=t.ref,e.return=t,t.child=e)}if(d=e.child,!Rd(e,c)){var p=d.memoizedProps;if(a=a.compare,a=a!==null?a:Ns,a(p,l)&&e.ref===t.ref)return In(e,t,c)}return t.flags|=1,e=Ya(d,l),e.ref=t.ref,e.return=t,t.child=e}function Tm(e,t,a,l,c){if(e!==null){var d=e.memoizedProps;if(Ns(d,l)&&e.ref===t.ref)if(Ht=!1,t.pendingProps=l=d,Rd(e,c))(e.flags&131072)!==0&&(Ht=!0);else return t.lanes=e.lanes,In(e,t,c)}return wd(e,t,a,l,c)}function Cm(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 Mm(e,t,d,a,l)}if((a&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Qc(t,d!==null?d.cachePool:null),d!==null?Rh(t,d):Ko(),Dh(t);else return l=t.lanes=536870912,Mm(e,t,d!==null?d.baseLanes|a:a,a,l)}else d!==null?(Qc(t,d.cachePool),Rh(t,d),Al(),t.memoizedState=null):(e!==null&&Qc(t,null),Ko(),Al());return ta(e,t,c,a),t.child}function Ri(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Mm(e,t,a,l,c){var d=Zo();return d=d===null?null:{parent:Ut._currentValue,pool:d},t.memoizedState={baseLanes:a,cachePool:d},e!==null&&Qc(t,null),Ko(),Dh(t),e!==null&&Ga(e,t,l,!0),t.childLanes=c,null}function fu(e,t){return t=mu({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Om(e,t,a){return Ds(t,e.child,null,a),e=fu(t,t.pendingProps),e.flags|=2,Ra(t),t.memoizedState=null,e}function dv(e,t,a){var l=t.pendingProps,c=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(P){if(l.mode==="hidden")return e=fu(t,l),t.lanes=536870912,Ri(null,e);if(td(t),(e=q)?(e=B0(e,ye),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:ba!==null?{id:Pa,overflow:g}:null,retryLane:536870912,hydrationErrors:null},a=Wc(e),a.return=t,t.child=a,H=t,q=null)):e=null,e===null)throw Pe(t);return t.lanes=536870912,null}return fu(t,l)}var d=e.memoizedState;if(d!==null){var p=d.dehydrated;if(td(t),c)if(t.flags&256)t.flags&=-257,t=Om(e,t,a);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(u(558));else if(Ht||Ga(e,t,a,!1),c=(a&e.childLanes)!==0,Ht||c){if(l=ft,l!==null&&(p=Ir(l,a),p!==0&&p!==d.retryLane))throw d.retryLane=p,Ba(e,p),Ea(l,e,p),jd;wu(),t=Om(e,t,a)}else e=d.treeContext,q=Wa(p.nextSibling),H=t,P=!0,fe=null,ye=!1,e!==null&&D(t,e),t=fu(t,l),t.flags|=4096;return t}return e=Ya(e.child,{mode:l.mode,children:l.children}),e.ref=t.ref,t.child=e,e.return=t,e}function hu(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 wd(e,t,a,l,c){return Cs(t),a=nd(e,t,a,l,void 0,c),l=ld(),e!==null&&!Ht?(sd(e,t,c),In(e,t,c)):(P&&l&&v(t),t.flags|=1,ta(e,t,a,c),t.child)}function Rm(e,t,a,l,c,d){return Cs(t),t.updateQueue=null,a=kh(t,l,a,c),Ah(e),l=ld(),e!==null&&!Ht?(sd(e,t,d),In(e,t,d)):(P&&l&&v(t),t.flags|=1,ta(e,t,a,d),t.child)}function Dm(e,t,a,l,c){if(Cs(t),t.stateNode===null){var d=Ma,p=a.contextType;typeof p=="object"&&p!==null&&(d=ea(p)),d=new a(l,d),t.memoizedState=d.state!==null&&d.state!==void 0?d.state:null,d.updater=bd,t.stateNode=d,d._reactInternals=t,d=t.stateNode,d.props=l,d.state=t.memoizedState,d.refs={},Io(t),p=a.contextType,d.context=typeof p=="object"&&p!==null?ea(p):Ma,d.state=t.memoizedState,p=a.getDerivedStateFromProps,typeof p=="function"&&(yd(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&&bd.enqueueReplaceState(d,d.state,null),Ei(t,l,d,c),Si(),d.state=t.memoizedState),typeof d.componentDidMount=="function"&&(t.flags|=4194308),l=!0}else if(e===null){d=t.stateNode;var E=t.memoizedProps,z=ks(a,E);d.props=z;var Q=d.context,re=a.contextType;p=Ma,typeof re=="object"&&re!==null&&(p=ea(re));var ue=a.getDerivedStateFromProps;re=typeof ue=="function"||typeof d.getSnapshotBeforeUpdate=="function",E=t.pendingProps!==E,re||typeof d.UNSAFE_componentWillReceiveProps!="function"&&typeof d.componentWillReceiveProps!="function"||(E||Q!==p)&&pm(t,d,l,p),Ml=!1;var X=t.memoizedState;d.state=X,Ei(t,l,d,c),Si(),Q=t.memoizedState,E||X!==Q||Ml?(typeof ue=="function"&&(yd(t,a,ue,l),Q=t.memoizedState),(z=Ml||xm(t,a,z,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=z):(typeof d.componentDidMount=="function"&&(t.flags|=4194308),l=!1)}else{d=t.stateNode,Qo(e,t),p=t.memoizedProps,re=ks(a,p),d.props=re,ue=t.pendingProps,X=d.context,Q=a.contextType,z=Ma,typeof Q=="object"&&Q!==null&&(z=ea(Q)),E=a.getDerivedStateFromProps,(Q=typeof E=="function"||typeof d.getSnapshotBeforeUpdate=="function")||typeof d.UNSAFE_componentWillReceiveProps!="function"&&typeof d.componentWillReceiveProps!="function"||(p!==ue||X!==z)&&pm(t,d,l,z),Ml=!1,X=t.memoizedState,d.state=X,Ei(t,l,d,c),Si();var K=t.memoizedState;p!==ue||X!==K||Ml||e!==null&&e.dependencies!==null&&vr(e.dependencies)?(typeof E=="function"&&(yd(t,a,E,l),K=t.memoizedState),(re=Ml||xm(t,a,re,l,X,K,z)||e!==null&&e.dependencies!==null&&vr(e.dependencies))?(Q||typeof d.UNSAFE_componentWillUpdate!="function"&&typeof d.componentWillUpdate!="function"||(typeof d.componentWillUpdate=="function"&&d.componentWillUpdate(l,K,z),typeof d.UNSAFE_componentWillUpdate=="function"&&d.UNSAFE_componentWillUpdate(l,K,z)),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=K),d.props=l,d.state=K,d.context=z,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,hu(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=Ds(t,e.child,null,c),t.child=Ds(t,null,a,c)):ta(e,t,a,c),t.memoizedState=d.state,e=t.child):e=In(e,t,c),e}function Am(e,t,a,l){return Gt(),t.flags|=256,ta(e,t,a,l),t.child}var Sd={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Ed(e){return{baseLanes:e,cachePool:Nh()}}function Td(e,t,a){return e=e!==null?e.childLanes&~a:0,t&&(e|=Aa),e}function km(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:(Ct.current&2)!==0),p&&(c=!0,t.flags&=-129),p=(t.flags&32)!==0,t.flags&=-33,e===null){if(P){if(c?Dl(t):Al(),(e=q)?(e=B0(e,ye),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:ba!==null?{id:Pa,overflow:g}:null,retryLane:536870912,hydrationErrors:null},a=Wc(e),a.return=t,t.child=a,H=t,q=null)):e=null,e===null)throw Pe(t);return uf(e)?t.lanes=32:t.lanes=536870912,null}var E=l.children;return l=l.fallback,c?(Al(),c=t.mode,E=mu({mode:"hidden",children:E},c),l=$a(l,c,a,null),E.return=t,l.return=t,E.sibling=l,t.child=E,l=t.child,l.memoizedState=Ed(a),l.childLanes=Td(e,p,a),t.memoizedState=Sd,Ri(null,l)):(Dl(t),Cd(t,E))}var z=e.memoizedState;if(z!==null&&(E=z.dehydrated,E!==null)){if(d)t.flags&256?(Dl(t),t.flags&=-257,t=Md(e,t,a)):t.memoizedState!==null?(Al(),t.child=e.child,t.flags|=128,t=null):(Al(),E=l.fallback,c=t.mode,l=mu({mode:"visible",children:l.children},c),E=$a(E,c,a,null),E.flags|=2,l.return=t,E.return=t,l.sibling=E,t.child=l,Ds(t,e.child,null,a),l=t.child,l.memoizedState=Ed(a),l.childLanes=Td(e,p,a),t.memoizedState=Sd,t=Ri(null,l));else if(Dl(t),uf(E)){if(p=E.nextSibling&&E.nextSibling.dataset,p)var Q=p.dgst;p=Q,l=Error(u(419)),l.stack="",l.digest=p,fn({value:l,source:null,stack:null}),t=Md(e,t,a)}else if(Ht||Ga(e,t,a,!1),p=(a&e.childLanes)!==0,Ht||p){if(p=ft,p!==null&&(l=Ir(p,a),l!==0&&l!==z.retryLane))throw z.retryLane=l,Ba(e,l),Ea(p,e,l),jd;cf(E)||wu(),t=Md(e,t,a)}else cf(E)?(t.flags|=192,t.child=e.child,t=null):(e=z.treeContext,q=Wa(E.nextSibling),H=t,P=!0,fe=null,ye=!1,e!==null&&D(t,e),t=Cd(t,l.children),t.flags|=4096);return t}return c?(Al(),E=l.fallback,c=t.mode,z=e.child,Q=z.sibling,l=Ya(z,{mode:"hidden",children:l.children}),l.subtreeFlags=z.subtreeFlags&65011712,Q!==null?E=Ya(Q,E):(E=$a(E,c,a,null),E.flags|=2),E.return=t,l.return=t,l.sibling=E,t.child=l,Ri(null,l),l=t.child,E=e.child.memoizedState,E===null?E=Ed(a):(c=E.cachePool,c!==null?(z=Ut._currentValue,c=c.parent!==z?{parent:z,pool:z}:c):c=Nh(),E={baseLanes:E.baseLanes|a,cachePool:c}),l.memoizedState=E,l.childLanes=Td(e,p,a),t.memoizedState=Sd,Ri(e.child,l)):(Dl(t),a=e.child,e=a.sibling,a=Ya(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 Cd(e,t){return t=mu({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function mu(e,t){return e=Kt(22,e,null,t),e.lanes=0,e}function Md(e,t,a){return Ds(t,e.child,null,a),e=Cd(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),vi(e.return,t,a)}function Od(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 zm(e,t,a){var l=t.pendingProps,c=l.revealOrder,d=l.tail;l=l.children;var p=Ct.current,E=(p&2)!==0;if(E?(p=p&1|2,t.flags|=128):p&=1,ge(Ct,p),ta(e,t,l,a),l=P?dn:0,!E&&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&&au(e)===null&&(c=a),a=a.sibling;a=c,a===null?(c=t.child,t.child=null):(c=a.sibling,a.sibling=null),Od(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&&au(e)===null){t.child=c;break}e=c.sibling,c.sibling=a,a=c,c=e}Od(t,!0,a,null,d,l);break;case"together":Od(t,!1,null,null,void 0,l);break;default:t.memoizedState=null}return t.child}function In(e,t,a){if(e!==null&&(t.dependencies=e.dependencies),zl|=t.lanes,(a&t.childLanes)===0)if(e!==null){if(Ga(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=Ya(e,e.pendingProps),t.child=a,a.return=t;e.sibling!==null;)e=e.sibling,a=a.sibling=Ya(e,e.pendingProps),a.return=t;a.sibling=null}return t.child}function Rd(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&vr(e)))}function fv(e,t,a){switch(t.tag){case 3:Ze(t,t.stateNode.containerInfo),Mn(t,Ut,e.memoizedState.cache),Gt();break;case 27:case 5:Dt(t);break;case 4:Ze(t,t.stateNode.containerInfo);break;case 10:Mn(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,td(t),null;break;case 13:var l=t.memoizedState;if(l!==null)return l.dehydrated!==null?(Dl(t),t.flags|=128,null):(a&t.child.childLanes)!==0?km(e,t,a):(Dl(t),e=In(e,t,a),e!==null?e.sibling:null);Dl(t);break;case 19:var c=(e.flags&128)!==0;if(l=(a&t.childLanes)!==0,l||(Ga(e,t,a,!1),l=(a&t.childLanes)!==0),c){if(l)return zm(e,t,a);t.flags|=128}if(c=t.memoizedState,c!==null&&(c.rendering=null,c.tail=null,c.lastEffect=null),ge(Ct,Ct.current),l)break;return null;case 22:return t.lanes=0,Cm(e,t,a,t.pendingProps);case 24:Mn(t,Ut,e.memoizedState.cache)}return In(e,t,a)}function Um(e,t,a){if(e!==null)if(e.memoizedProps!==t.pendingProps)Ht=!0;else{if(!Rd(e,a)&&(t.flags&128)===0)return Ht=!1,fv(e,t,a);Ht=(e.flags&131072)!==0}else Ht=!1,P&&(t.flags&1048576)!==0&&m(t,dn,t.index);switch(t.lanes=0,t.tag){case 16:e:{var l=t.pendingProps;if(e=Os(t.elementType),t.type=e,typeof e=="function")gr(e)?(l=ks(e,l),t.tag=1,t=Dm(null,t,e,l,a)):(t.tag=0,t=wd(null,t,e,l,a));else{if(e!=null){var c=e.$$typeof;if(c===V){t.tag=11,t=Sm(null,t,e,l,a);break e}else if(c===W){t.tag=14,t=Em(null,t,e,l,a);break e}}throw t=ve(e)||e,Error(u(306,t,""))}}return t;case 0:return wd(e,t,t.type,t.pendingProps,a);case 1:return l=t.type,c=ks(l,t.pendingProps),Dm(e,t,l,c,a);case 3:e:{if(Ze(t,t.stateNode.containerInfo),e===null)throw Error(u(387));l=t.pendingProps;var d=t.memoizedState;c=d.element,Qo(e,t),Ei(t,l,null,a);var p=t.memoizedState;if(l=p.cache,Mn(t,Ut,l),l!==d.cache&&Gn(t,[Ut],a,!0),Si(),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=Am(e,t,l,a);break e}else if(l!==c){c=ya(Error(u(424)),t),fn(c),t=Am(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(q=Wa(e.firstChild),H=t,P=!0,fe=null,ye=!0,a=Ch(t,null,l,a),t.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling}else{if(Gt(),l===c){t=In(e,t,a);break e}ta(e,t,l,a)}t=t.child}return t;case 26:return hu(e,t),e===null?(a=Z0(t.type,null,t.pendingProps,null))?t.memoizedState=a:P||(a=t.type,e=t.pendingProps,l=Ru(xe.current).createElement(a),l[St]=t,l[Bt]=e,aa(l,a,e),zt(l),t.stateNode=l):t.memoizedState=Z0(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Dt(t),e===null&&P&&(l=t.stateNode=P0(t.type,t.pendingProps,xe.current),H=t,ye=!0,c=q,Vl(t.type)?(of=c,q=Wa(l.firstChild)):q=c),ta(e,t,t.pendingProps.children,a),hu(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&P&&((c=l=q)&&(l=Yv(l,t.type,t.pendingProps,ye),l!==null?(t.stateNode=l,H=t,q=Wa(l.firstChild),ye=!1,c=!0):c=!1),c||Pe(t)),Dt(t),c=t.type,d=t.pendingProps,p=e!==null?e.memoizedProps:null,l=d.children,lf(c,d)?l=null:p!==null&&lf(c,p)&&(t.flags|=32),t.memoizedState!==null&&(c=nd(e,t,nv,null,null,a),Fi._currentValue=c),hu(e,t),ta(e,t,l,a),t.child;case 6:return e===null&&P&&((e=a=q)&&(a=$v(a,t.pendingProps,ye),a!==null?(t.stateNode=a,H=t,q=null,e=!0):e=!1),e||Pe(t)),null;case 13:return km(e,t,a);case 4:return Ze(t,t.stateNode.containerInfo),l=t.pendingProps,e===null?t.child=Ds(t,null,l,a):ta(e,t,l,a),t.child;case 11:return Sm(e,t,t.type,t.pendingProps,a);case 7:return ta(e,t,t.pendingProps,a),t.child;case 8:return ta(e,t,t.pendingProps.children,a),t.child;case 12:return ta(e,t,t.pendingProps.children,a),t.child;case 10:return l=t.pendingProps,Mn(t,t.type,l.value),ta(e,t,l.children,a),t.child;case 9:return c=t.type._context,l=t.pendingProps.children,Cs(t),c=ea(c),l=l(c),t.flags|=1,ta(e,t,l,a),t.child;case 14:return Em(e,t,t.type,t.pendingProps,a);case 15:return Tm(e,t,t.type,t.pendingProps,a);case 19:return zm(e,t,a);case 31:return dv(e,t,a);case 22:return Cm(e,t,a,t.pendingProps);case 24:return Cs(t),l=ea(Ut),e===null?(c=Zo(),c===null&&(c=ft,d=Fo(),c.pooledCache=d,d.refCount++,d!==null&&(c.pooledCacheLanes|=a),c=d),t.memoizedState={parent:l,cache:c},Io(t),Mn(t,Ut,c)):((e.lanes&a)!==0&&(Qo(e,t),Ei(t,null,null,a),Si()),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),Mn(t,Ut,l)):(l=d.cache,Mn(t,Ut,l),l!==c.cache&&Gn(t,[Ut],a,!0))),ta(e,t,t.pendingProps.children,a),t.child;case 29:throw t.pendingProps}throw Error(u(156,t.tag))}function Qn(e){e.flags|=4}function Dd(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(u0())e.flags|=8192;else throw Rs=Jc,Wo}else e.flags&=-16777217}function Lm(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!J0(t))if(u0())e.flags|=8192;else throw Rs=Jc,Wo}function gu(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Wr():536870912,e.lanes|=t,Rr|=t)}function Di(e,t){if(!P)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 xt(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 hv(e,t,a){var l=t.pendingProps;switch(S(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return xt(t),null;case 1:return xt(t),null;case 3:return a=t.stateNode,l=null,e!==null&&(l=e.memoizedState.cache),t.memoizedState.cache!==l&&(t.flags|=2048),hn(Ut),We(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(e===null||e.child===null)&&(Ft(t)?Qn(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Cn())),xt(t),null;case 26:var c=t.type,d=t.memoizedState;return e===null?(Qn(t),d!==null?(xt(t),Lm(t,d)):(xt(t),Dd(t,c,null,l,a))):d?d!==e.memoizedState?(Qn(t),xt(t),Lm(t,d)):(xt(t),t.flags&=-16777217):(e=e.memoizedProps,e!==l&&Qn(t),xt(t),Dd(t,c,e,l,a)),null;case 27:if(fa(t),a=xe.current,c=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==l&&Qn(t);else{if(!l){if(t.stateNode===null)throw Error(u(166));return xt(t),null}e=pe.current,Ft(t)?De(t):(e=P0(c,l,a),t.stateNode=e,Qn(t))}return xt(t),null;case 5:if(fa(t),c=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==l&&Qn(t);else{if(!l){if(t.stateNode===null)throw Error(u(166));return xt(t),null}if(d=pe.current,Ft(t))De(t);else{var p=Ru(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[St]=t,d[Bt]=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(aa(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&&Qn(t)}}return xt(t),Dd(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,a),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==l&&Qn(t);else{if(typeof l!="string"&&t.stateNode===null)throw Error(u(166));if(e=xe.current,Ft(t)){if(e=t.stateNode,a=t.memoizedProps,l=null,c=H,c!==null)switch(c.tag){case 27:case 5:l=c.memoizedProps}e[St]=t,e=!!(e.nodeValue===a||l!==null&&l.suppressHydrationWarning===!0||k0(e.nodeValue,a)),e||Pe(t,!0)}else e=Ru(e).createTextNode(l),e[St]=t,t.stateNode=e}return xt(t),null;case 31:if(a=t.memoizedState,e===null||e.memoizedState!==null){if(l=Ft(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[St]=t}else Gt(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;xt(t),e=!1}else a=Cn(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),e=!0;if(!e)return t.flags&256?(Ra(t),t):(Ra(t),null);if((t.flags&128)!==0)throw Error(u(558))}return xt(t),null;case 13:if(l=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(c=Ft(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[St]=t}else Gt(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;xt(t),c=!1}else c=Cn(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=c),c=!0;if(!c)return t.flags&256?(Ra(t),t):(Ra(t),null)}return Ra(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),gu(t,t.updateQueue),xt(t),null);case 4:return We(),e===null&&Kd(t.stateNode.containerInfo),xt(t),null;case 10:return hn(t.type),xt(t),null;case 19:if(se(Ct),l=t.memoizedState,l===null)return xt(t),null;if(c=(t.flags&128)!==0,d=l.rendering,d===null)if(c)Di(l,!1);else{if(jt!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(d=au(e),d!==null){for(t.flags|=128,Di(l,!1),e=d.updateQueue,t.updateQueue=e,gu(t,e),t.subtreeFlags=0,e=a,a=t.child;a!==null;)Zc(a,e),a=a.sibling;return ge(Ct,Ct.current&1|2),P&&i(t,l.treeForkCount),t.child}e=e.sibling}l.tail!==null&&It()>bu&&(t.flags|=128,c=!0,Di(l,!1),t.lanes=4194304)}else{if(!c)if(e=au(d),e!==null){if(t.flags|=128,c=!0,e=e.updateQueue,t.updateQueue=e,gu(t,e),Di(l,!0),l.tail===null&&l.tailMode==="hidden"&&!d.alternate&&!P)return xt(t),null}else 2*It()-l.renderingStartTime>bu&&a!==536870912&&(t.flags|=128,c=!0,Di(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=It(),e.sibling=null,a=Ct.current,ge(Ct,c?a&1|2:a&1),P&&i(t,l.treeForkCount),e):(xt(t),null);case 22:case 23:return Ra(t),ed(),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&&(xt(t),t.subtreeFlags&6&&(t.flags|=8192)):xt(t),a=t.updateQueue,a!==null&&gu(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(Ms),null;case 24:return a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),hn(Ut),xt(t),null;case 25:return null;case 30:return null}throw Error(u(156,t.tag))}function mv(e,t){switch(S(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return hn(Ut),We(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return fa(t),null;case 31:if(t.memoizedState!==null){if(Ra(t),t.alternate===null)throw Error(u(340));Gt()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Ra(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(u(340));Gt()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return se(Ct),null;case 4:return We(),null;case 10:return hn(t.type),null;case 22:case 23:return Ra(t),ed(),e!==null&&se(Ms),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return hn(Ut),null;case 25:return null;default:return null}}function Hm(e,t){switch(S(t),t.tag){case 3:hn(Ut),We();break;case 26:case 27:case 5:fa(t);break;case 4:We();break;case 31:t.memoizedState!==null&&Ra(t);break;case 13:Ra(t);break;case 19:se(Ct);break;case 10:hn(t.type);break;case 22:case 23:Ra(t),ed(),e!==null&&se(Ms);break;case 24:hn(Ut)}}function Ai(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(E){lt(t,t.return,E)}}function kl(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,E=p.destroy;if(E!==void 0){p.destroy=void 0,c=t;var z=a,Q=E;try{Q()}catch(re){lt(c,z,re)}}}l=l.next}while(l!==d)}}catch(re){lt(t,t.return,re)}}function qm(e){var t=e.updateQueue;if(t!==null){var a=e.stateNode;try{Oh(t,a)}catch(l){lt(e,e.return,l)}}}function Vm(e,t,a){a.props=ks(e.type,e.memoizedProps),a.state=e.memoizedState;try{a.componentWillUnmount()}catch(l){lt(e,t,l)}}function ki(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){lt(e,t,c)}}function On(e,t){var a=e.ref,l=e.refCleanup;if(a!==null)if(typeof l=="function")try{l()}catch(c){lt(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){lt(e,t,c)}else a.current=null}function Bm(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){lt(e,e.return,c)}}function Ad(e,t,a){try{var l=e.stateNode;Uv(l,e.type,a,t),l[Bt]=t}catch(c){lt(e,e.return,c)}}function Ym(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Vl(e.type)||e.tag===4}function kd(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Ym(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&Vl(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function _d(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=Ha));else if(l!==4&&(l===27&&Vl(e.type)&&(a=e.stateNode,t=null),e=e.child,e!==null))for(_d(e,t,a),e=e.sibling;e!==null;)_d(e,t,a),e=e.sibling}function xu(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&&Vl(e.type)&&(a=e.stateNode),e=e.child,e!==null))for(xu(e,t,a),e=e.sibling;e!==null;)xu(e,t,a),e=e.sibling}function $m(e){var t=e.stateNode,a=e.memoizedProps;try{for(var l=e.type,c=t.attributes;c.length;)t.removeAttributeNode(c[0]);aa(t,l,a),t[St]=e,t[Bt]=a}catch(d){lt(e,e.return,d)}}var Xn=!1,qt=!1,zd=!1,Pm=typeof WeakSet=="function"?WeakSet:Set,Zt=null;function gv(e,t){if(e=e.containerInfo,af=Lu,e=Yo(e),ur(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,E=-1,z=-1,Q=0,re=0,ue=e,X=null;t:for(;;){for(var K;ue!==a||c!==0&&ue.nodeType!==3||(E=p+c),ue!==d||l!==0&&ue.nodeType!==3||(z=p+l),ue.nodeType===3&&(p+=ue.nodeValue.length),(K=ue.firstChild)!==null;)X=ue,ue=K;for(;;){if(ue===e)break t;if(X===a&&++Q===c&&(E=p),X===d&&++re===l&&(z=p),(K=ue.nextSibling)!==null)break;ue=X,X=ue.parentNode}ue=K}a=E===-1||z===-1?null:{start:E,end:z}}else a=null}a=a||{start:0,end:0}}else a=null;for(nf={focusedElem:e,selectionRange:a},Lu=!1,Zt=t;Zt!==null;)if(t=Zt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Zt=e;else for(;Zt!==null;){switch(t=Zt,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 be=ks(a.type,c);e=l.getSnapshotBeforeUpdate(be,d),l.__reactInternalSnapshotBeforeUpdate=e}catch(ke){lt(a,a.return,ke)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,a=e.nodeType,a===9)rf(e);else if(a===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":rf(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,Zt=e;break}Zt=t.return}}function Fm(e,t,a){var l=a.flags;switch(a.tag){case 0:case 11:case 15:Kn(e,a),l&4&&Ai(5,a);break;case 1:if(Kn(e,a),l&4)if(e=a.stateNode,t===null)try{e.componentDidMount()}catch(p){lt(a,a.return,p)}else{var c=ks(a.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(c,t,e.__reactInternalSnapshotBeforeUpdate)}catch(p){lt(a,a.return,p)}}l&64&&qm(a),l&512&&ki(a,a.return);break;case 3:if(Kn(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{Oh(e,t)}catch(p){lt(a,a.return,p)}}break;case 27:t===null&&l&4&&$m(a);case 26:case 5:Kn(e,a),t===null&&l&4&&Bm(a),l&512&&ki(a,a.return);break;case 12:Kn(e,a);break;case 31:Kn(e,a),l&4&&Wm(e,a);break;case 13:Kn(e,a),l&4&&Im(e,a),l&64&&(e=a.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(a=Sv.bind(null,a),Pv(e,a))));break;case 22:if(l=a.memoizedState!==null||Xn,!l){t=t!==null&&t.memoizedState!==null||qt,c=Xn;var d=qt;Xn=l,(qt=t)&&!d?el(e,a,(a.subtreeFlags&8772)!==0):Kn(e,a),Xn=c,qt=d}break;case 30:break;default:Kn(e,a)}}function Gm(e){var t=e.alternate;t!==null&&(e.alternate=null,Gm(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Js(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 pt=null,Na=!1;function Jn(e,t,a){for(a=a.child;a!==null;)Zm(e,t,a),a=a.sibling}function Zm(e,t,a){if(Vt&&typeof Vt.onCommitFiberUnmount=="function")try{Vt.onCommitFiberUnmount(mt,a)}catch{}switch(a.tag){case 26:qt||On(a,t),Jn(e,t,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:qt||On(a,t);var l=pt,c=Na;Vl(a.type)&&(pt=a.stateNode,Na=!1),Jn(e,t,a),Yi(a.stateNode),pt=l,Na=c;break;case 5:qt||On(a,t);case 6:if(l=pt,c=Na,pt=null,Jn(e,t,a),pt=l,Na=c,pt!==null)if(Na)try{(pt.nodeType===9?pt.body:pt.nodeName==="HTML"?pt.ownerDocument.body:pt).removeChild(a.stateNode)}catch(d){lt(a,t,d)}else try{pt.removeChild(a.stateNode)}catch(d){lt(a,t,d)}break;case 18:pt!==null&&(Na?(e=pt,q0(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,a.stateNode),Hr(e)):q0(pt,a.stateNode));break;case 4:l=pt,c=Na,pt=a.stateNode.containerInfo,Na=!0,Jn(e,t,a),pt=l,Na=c;break;case 0:case 11:case 14:case 15:kl(2,a,t),qt||kl(4,a,t),Jn(e,t,a);break;case 1:qt||(On(a,t),l=a.stateNode,typeof l.componentWillUnmount=="function"&&Vm(a,t,l)),Jn(e,t,a);break;case 21:Jn(e,t,a);break;case 22:qt=(l=qt)||a.memoizedState!==null,Jn(e,t,a),qt=l;break;default:Jn(e,t,a)}}function Wm(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Hr(e)}catch(a){lt(t,t.return,a)}}}function Im(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Hr(e)}catch(a){lt(t,t.return,a)}}function xv(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Pm),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Pm),t;default:throw Error(u(435,e.tag))}}function pu(e,t){var a=xv(e);t.forEach(function(l){if(!a.has(l)){a.add(l);var c=Ev.bind(null,e,l);l.then(c,c)}})}function ja(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,E=p;e:for(;E!==null;){switch(E.tag){case 27:if(Vl(E.type)){pt=E.stateNode,Na=!1;break e}break;case 5:pt=E.stateNode,Na=!1;break e;case 3:case 4:pt=E.stateNode.containerInfo,Na=!0;break e}E=E.return}if(pt===null)throw Error(u(160));Zm(d,p,c),pt=null,Na=!1,d=c.alternate,d!==null&&(d.return=null),c.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Qm(t,e),t=t.sibling}var mn=null;function Qm(e,t){var a=e.alternate,l=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:ja(t,e),wa(e),l&4&&(kl(3,e,e.return),Ai(3,e),kl(5,e,e.return));break;case 1:ja(t,e),wa(e),l&512&&(qt||a===null||On(a,a.return)),l&64&&Xn&&(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=mn;if(ja(t,e),wa(e),l&512&&(qt||a===null||On(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[as]||d[St]||d.namespaceURI==="http://www.w3.org/2000/svg"||d.hasAttribute("itemprop"))&&(d=c.createElement(l),c.head.insertBefore(d,c.querySelector("head > title"))),aa(d,l,a),d[St]=e,zt(d),l=d;break e;case"link":var p=Q0("link","href",c).get(l+(a.href||""));if(p){for(var E=0;E<p.length;E++)if(d=p[E],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(E,1);break t}}d=c.createElement(l),aa(d,l,a),c.head.appendChild(d);break;case"meta":if(p=Q0("meta","content",c).get(l+(a.content||""))){for(E=0;E<p.length;E++)if(d=p[E],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(E,1);break t}}d=c.createElement(l),aa(d,l,a),c.head.appendChild(d);break;default:throw Error(u(468,l))}d[St]=e,zt(d),l=d}e.stateNode=l}else X0(c,e.type,e.stateNode);else e.stateNode=I0(c,l,e.memoizedProps);else d!==l?(d===null?a.stateNode!==null&&(a=a.stateNode,a.parentNode.removeChild(a)):d.count--,l===null?X0(c,e.type,e.stateNode):I0(c,l,e.memoizedProps)):l===null&&e.stateNode!==null&&Ad(e,e.memoizedProps,a.memoizedProps)}break;case 27:ja(t,e),wa(e),l&512&&(qt||a===null||On(a,a.return)),a!==null&&l&4&&Ad(e,e.memoizedProps,a.memoizedProps);break;case 5:if(ja(t,e),wa(e),l&512&&(qt||a===null||On(a,a.return)),e.flags&32){c=e.stateNode;try{rn(c,"")}catch(be){lt(e,e.return,be)}}l&4&&e.stateNode!=null&&(c=e.memoizedProps,Ad(e,c,a!==null?a.memoizedProps:c)),l&1024&&(zd=!0);break;case 6:if(ja(t,e),wa(e),l&4){if(e.stateNode===null)throw Error(u(162));l=e.memoizedProps,a=e.stateNode;try{a.nodeValue=l}catch(be){lt(e,e.return,be)}}break;case 3:if(ku=null,c=mn,mn=Du(t.containerInfo),ja(t,e),mn=c,wa(e),l&4&&a!==null&&a.memoizedState.isDehydrated)try{Hr(t.containerInfo)}catch(be){lt(e,e.return,be)}zd&&(zd=!1,Xm(e));break;case 4:l=mn,mn=Du(e.stateNode.containerInfo),ja(t,e),wa(e),mn=l;break;case 12:ja(t,e),wa(e);break;case 31:ja(t,e),wa(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,pu(e,l)));break;case 13:ja(t,e),wa(e),e.child.flags&8192&&e.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&(yu=It()),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,pu(e,l)));break;case 22:c=e.memoizedState!==null;var z=a!==null&&a.memoizedState!==null,Q=Xn,re=qt;if(Xn=Q||c,qt=re||z,ja(t,e),qt=re,Xn=Q,wa(e),l&8192)e:for(t=e.stateNode,t._visibility=c?t._visibility&-2:t._visibility|1,c&&(a===null||z||Xn||qt||_s(e)),a=null,t=e;;){if(t.tag===5||t.tag===26){if(a===null){z=a=t;try{if(d=z.stateNode,c)p=d.style,typeof p.setProperty=="function"?p.setProperty("display","none","important"):p.display="none";else{E=z.stateNode;var ue=z.memoizedProps.style,X=ue!=null&&ue.hasOwnProperty("display")?ue.display:null;E.style.display=X==null||typeof X=="boolean"?"":(""+X).trim()}}catch(be){lt(z,z.return,be)}}}else if(t.tag===6){if(a===null){z=t;try{z.stateNode.nodeValue=c?"":z.memoizedProps}catch(be){lt(z,z.return,be)}}}else if(t.tag===18){if(a===null){z=t;try{var K=z.stateNode;c?V0(K,!0):V0(z.stateNode,!1)}catch(be){lt(z,z.return,be)}}}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,pu(e,a))));break;case 19:ja(t,e),wa(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,pu(e,l)));break;case 30:break;case 21:break;default:ja(t,e),wa(e)}}function wa(e){var t=e.flags;if(t&2){try{for(var a,l=e.return;l!==null;){if(Ym(l)){a=l;break}l=l.return}if(a==null)throw Error(u(160));switch(a.tag){case 27:var c=a.stateNode,d=kd(e);xu(e,d,c);break;case 5:var p=a.stateNode;a.flags&32&&(rn(p,""),a.flags&=-33);var E=kd(e);xu(e,E,p);break;case 3:case 4:var z=a.stateNode.containerInfo,Q=kd(e);_d(e,Q,z);break;default:throw Error(u(161))}}catch(re){lt(e,e.return,re)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Xm(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Xm(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function Kn(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)Fm(e,t.alternate,t),t=t.sibling}function _s(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:kl(4,t,t.return),_s(t);break;case 1:On(t,t.return);var a=t.stateNode;typeof a.componentWillUnmount=="function"&&Vm(t,t.return,a),_s(t);break;case 27:Yi(t.stateNode);case 26:case 5:On(t,t.return),_s(t);break;case 22:t.memoizedState===null&&_s(t);break;case 30:_s(t);break;default:_s(t)}e=e.sibling}}function el(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:el(c,d,a),Ai(4,d);break;case 1:if(el(c,d,a),l=d,c=l.stateNode,typeof c.componentDidMount=="function")try{c.componentDidMount()}catch(Q){lt(l,l.return,Q)}if(l=d,c=l.updateQueue,c!==null){var E=l.stateNode;try{var z=c.shared.hiddenCallbacks;if(z!==null)for(c.shared.hiddenCallbacks=null,c=0;c<z.length;c++)Mh(z[c],E)}catch(Q){lt(l,l.return,Q)}}a&&p&64&&qm(d),ki(d,d.return);break;case 27:$m(d);case 26:case 5:el(c,d,a),a&&l===null&&p&4&&Bm(d),ki(d,d.return);break;case 12:el(c,d,a);break;case 31:el(c,d,a),a&&p&4&&Wm(c,d);break;case 13:el(c,d,a),a&&p&4&&Im(c,d);break;case 22:d.memoizedState===null&&el(c,d,a),ki(d,d.return);break;case 30:break;default:el(c,d,a)}t=t.sibling}}function Ud(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&&yi(a))}function Ld(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&yi(e))}function gn(e,t,a,l){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Jm(e,t,a,l),t=t.sibling}function Jm(e,t,a,l){var c=t.flags;switch(t.tag){case 0:case 11:case 15:gn(e,t,a,l),c&2048&&Ai(9,t);break;case 1:gn(e,t,a,l);break;case 3:gn(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&&yi(e)));break;case 12:if(c&2048){gn(e,t,a,l),e=t.stateNode;try{var d=t.memoizedProps,p=d.id,E=d.onPostCommit;typeof E=="function"&&E(p,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(z){lt(t,t.return,z)}}else gn(e,t,a,l);break;case 31:gn(e,t,a,l);break;case 13:gn(e,t,a,l);break;case 23:break;case 22:d=t.stateNode,p=t.alternate,t.memoizedState!==null?d._visibility&2?gn(e,t,a,l):_i(e,t):d._visibility&2?gn(e,t,a,l):(d._visibility|=2,Cr(e,t,a,l,(t.subtreeFlags&10256)!==0||!1)),c&2048&&Ud(p,t);break;case 24:gn(e,t,a,l),c&2048&&Ld(t.alternate,t);break;default:gn(e,t,a,l)}}function Cr(e,t,a,l,c){for(c=c&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var d=e,p=t,E=a,z=l,Q=p.flags;switch(p.tag){case 0:case 11:case 15:Cr(d,p,E,z,c),Ai(8,p);break;case 23:break;case 22:var re=p.stateNode;p.memoizedState!==null?re._visibility&2?Cr(d,p,E,z,c):_i(d,p):(re._visibility|=2,Cr(d,p,E,z,c)),c&&Q&2048&&Ud(p.alternate,p);break;case 24:Cr(d,p,E,z,c),c&&Q&2048&&Ld(p.alternate,p);break;default:Cr(d,p,E,z,c)}t=t.sibling}}function _i(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:_i(a,l),c&2048&&Ud(l.alternate,l);break;case 24:_i(a,l),c&2048&&Ld(l.alternate,l);break;default:_i(a,l)}t=t.sibling}}var zi=8192;function Mr(e,t,a){if(e.subtreeFlags&zi)for(e=e.child;e!==null;)Km(e,t,a),e=e.sibling}function Km(e,t,a){switch(e.tag){case 26:Mr(e,t,a),e.flags&zi&&e.memoizedState!==null&&ay(a,mn,e.memoizedState,e.memoizedProps);break;case 5:Mr(e,t,a);break;case 3:case 4:var l=mn;mn=Du(e.stateNode.containerInfo),Mr(e,t,a),mn=l;break;case 22:e.memoizedState===null&&(l=e.alternate,l!==null&&l.memoizedState!==null?(l=zi,zi=16777216,Mr(e,t,a),zi=l):Mr(e,t,a));break;default:Mr(e,t,a)}}function e0(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 Ui(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];Zt=l,a0(l,e)}e0(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)t0(e),e=e.sibling}function t0(e){switch(e.tag){case 0:case 11:case 15:Ui(e),e.flags&2048&&kl(9,e,e.return);break;case 3:Ui(e);break;case 12:Ui(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,vu(e)):Ui(e);break;default:Ui(e)}}function vu(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];Zt=l,a0(l,e)}e0(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:kl(8,t,t.return),vu(t);break;case 22:a=t.stateNode,a._visibility&2&&(a._visibility&=-3,vu(t));break;default:vu(t)}e=e.sibling}}function a0(e,t){for(;Zt!==null;){var a=Zt;switch(a.tag){case 0:case 11:case 15:kl(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:yi(a.memoizedState.cache)}if(l=a.child,l!==null)l.return=a,Zt=l;else e:for(a=e;Zt!==null;){l=Zt;var c=l.sibling,d=l.return;if(Gm(l),l===a){Zt=null;break e}if(c!==null){c.return=d,Zt=c;break e}Zt=d}}}var pv={getCacheForType:function(e){var t=ea(Ut),a=t.data.get(e);return a===void 0&&(a=e(),t.data.set(e,a)),a},cacheSignal:function(){return ea(Ut).controller.signal}},vv=typeof WeakMap=="function"?WeakMap:Map,Ke=0,ft=null,Be=null,Fe=0,nt=0,Da=null,_l=!1,Or=!1,Hd=!1,tl=0,jt=0,zl=0,zs=0,qd=0,Aa=0,Rr=0,Li=null,Sa=null,Vd=!1,yu=0,n0=0,bu=1/0,Nu=null,Ul=null,$t=0,Ll=null,Dr=null,al=0,Bd=0,Yd=null,l0=null,Hi=0,$d=null;function ka(){return(Ke&2)!==0&&Fe!==0?Fe&-Fe:F.T!==null?Id():Xs()}function s0(){if(Aa===0)if((Fe&536870912)===0||P){var e=bt;bt<<=1,(bt&3932160)===0&&(bt=262144),Aa=e}else Aa=536870912;return e=Oa.current,e!==null&&(e.flags|=32),Aa}function Ea(e,t,a){(e===ft&&(nt===2||nt===9)||e.cancelPendingCommit!==null)&&(Ar(e,0),Hl(e,Fe,Aa,!1)),fl(e,a),((Ke&2)===0||e!==ft)&&(e===ft&&((Ke&2)===0&&(zs|=a),jt===4&&Hl(e,Fe,Aa,!1)),Rn(e))}function r0(e,t,a){if((Ke&6)!==0)throw Error(u(327));var l=!a&&(t&127)===0&&(t&e.expiredLanes)===0||dl(e,t),c=l?Nv(e,t):Fd(e,t,!0),d=l;do{if(c===0){Or&&!l&&Hl(e,t,0,!1);break}else{if(a=e.current.alternate,d&&!yv(a)){c=Fd(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 E=e;c=Li;var z=E.current.memoizedState.isDehydrated;if(z&&(Ar(E,p).flags|=256),p=Fd(E,p,!1),p!==2){if(Hd&&!z){E.errorRecoveryDisabledLanes|=d,zs|=d,c=4;break e}d=Sa,Sa=c,d!==null&&(Sa===null?Sa=d:Sa.push.apply(Sa,d))}c=p}if(d=!1,c!==2)continue}}if(c===1){Ar(e,0),Hl(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:Hl(l,t,Aa,!_l);break e;case 2:Sa=null;break;case 3:case 5:break;default:throw Error(u(329))}if((t&62914560)===t&&(c=yu+300-It(),10<c)){if(Hl(l,t,Aa,!_l),es(l,0,!0)!==0)break e;al=t,l.timeoutHandle=L0(i0.bind(null,l,a,Sa,Nu,Vd,t,Aa,zs,Rr,_l,d,"Throttled",-0,0),c);break e}i0(l,a,Sa,Nu,Vd,t,Aa,zs,Rr,_l,d,null,-0,0)}}break}while(!0);Rn(e)}function i0(e,t,a,l,c,d,p,E,z,Q,re,ue,X,K){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:Ha},Km(t,d,ue);var be=(d&62914560)===d?yu-It():(d&4194048)===d?n0-It():0;if(be=ny(ue,be),be!==null){al=d,e.cancelPendingCommit=be(g0.bind(null,e,t,d,a,l,c,p,E,z,re,ue,null,X,K)),Hl(e,d,p,!Q);return}}g0(e,t,d,a,l,c,p,E,z)}function yv(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(!la(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 Hl(e,t,a,l){t&=~qd,t&=~zs,e.suspendedLanes|=t,e.pingedLanes&=~t,l&&(e.warmLanes|=t),l=e.expirationTimes;for(var c=t;0<c;){var d=31-kt(c),p=1<<d;l[d]=-1,c&=~p}a!==0&&ht(e,a,t)}function ju(){return(Ke&6)===0?(qi(0),!1):!0}function Pd(){if(Be!==null){if(nt===0)var e=Be.return;else e=Be,Fa=Fn=null,rd(e),jr=null,Ni=0,e=Be;for(;e!==null;)Hm(e.alternate,e),e=e.return;Be=null}}function Ar(e,t){var a=e.timeoutHandle;a!==-1&&(e.timeoutHandle=-1,qv(a)),a=e.cancelPendingCommit,a!==null&&(e.cancelPendingCommit=null,a()),al=0,Pd(),ft=e,Be=a=Ya(e.current,null),Fe=t,nt=0,Da=null,_l=!1,Or=dl(e,t),Hd=!1,Rr=Aa=qd=zs=zl=jt=0,Sa=Li=null,Vd=!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-kt(l),d=1<<c;t|=e[c],l&=~d}return tl=t,Tl(),a}function c0(e,t){He=null,F.H=Oi,t===Nr||t===Xc?(t=Sh(),nt=3):t===Wo?(t=Sh(),nt=4):nt=t===jd?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,Da=t,Be===null&&(jt=1,du(e,ya(t,e.current)))}function u0(){var e=Oa.current;return e===null?!0:(Fe&4194048)===Fe?Za===null:(Fe&62914560)===Fe||(Fe&536870912)!==0?e===Za:!1}function o0(){var e=F.H;return F.H=Oi,e===null?Oi:e}function d0(){var e=F.A;return F.A=pv,e}function wu(){jt=4,_l||(Fe&4194048)!==Fe&&Oa.current!==null||(Or=!0),(zl&134217727)===0&&(zs&134217727)===0||ft===null||Hl(ft,Fe,Aa,!1)}function Fd(e,t,a){var l=Ke;Ke|=2;var c=o0(),d=d0();(ft!==e||Fe!==t)&&(Nu=null,Ar(e,t)),t=!1;var p=jt;e:do try{if(nt!==0&&Be!==null){var E=Be,z=Da;switch(nt){case 8:Pd(),p=6;break e;case 3:case 2:case 9:case 6:Oa.current===null&&(t=!0);var Q=nt;if(nt=0,Da=null,kr(e,E,z,Q),a&&Or){p=0;break e}break;default:Q=nt,nt=0,Da=null,kr(e,E,z,Q)}}bv(),p=jt;break}catch(re){c0(e,re)}while(!0);return t&&e.shellSuspendCounter++,Fa=Fn=null,Ke=l,F.H=c,F.A=d,Be===null&&(ft=null,Fe=0,Tl()),p}function bv(){for(;Be!==null;)f0(Be)}function Nv(e,t){var a=Ke;Ke|=2;var l=o0(),c=d0();ft!==e||Fe!==t?(Nu=null,bu=It()+500,Ar(e,t)):Or=dl(e,t);e:do try{if(nt!==0&&Be!==null){t=Be;var d=Da;t:switch(nt){case 1:nt=0,Da=null,kr(e,t,d,1);break;case 2:case 9:if(jh(d)){nt=0,Da=null,h0(t);break}t=function(){nt!==2&&nt!==9||ft!==e||(nt=7),Rn(e)},d.then(t,t);break e;case 3:nt=7;break e;case 4:nt=5;break e;case 7:jh(d)?(nt=0,Da=null,h0(t)):(nt=0,Da=null,kr(e,t,d,7));break;case 5:var p=null;switch(Be.tag){case 26:p=Be.memoizedState;case 5:case 27:var E=Be;if(p?J0(p):E.stateNode.complete){nt=0,Da=null;var z=E.sibling;if(z!==null)Be=z;else{var Q=E.return;Q!==null?(Be=Q,Su(Q)):Be=null}break t}}nt=0,Da=null,kr(e,t,d,5);break;case 6:nt=0,Da=null,kr(e,t,d,6);break;case 8:Pd(),jt=6;break e;default:throw Error(u(462))}}jv();break}catch(re){c0(e,re)}while(!0);return Fa=Fn=null,F.H=l,F.A=c,Ke=a,Be!==null?0:(ft=null,Fe=0,Tl(),jt)}function jv(){for(;Be!==null&&!La();)f0(Be)}function f0(e){var t=Um(e.alternate,e,tl);e.memoizedProps=e.pendingProps,t===null?Su(e):Be=t}function h0(e){var t=e,a=t.alternate;switch(t.tag){case 15:case 0:t=Rm(a,t,t.pendingProps,t.type,void 0,Fe);break;case 11:t=Rm(a,t,t.pendingProps,t.type.render,t.ref,Fe);break;case 5:rd(t);default:Hm(a,t),t=Be=Zc(t,tl),t=Um(a,t,tl)}e.memoizedProps=e.pendingProps,t===null?Su(e):Be=t}function kr(e,t,a,l){Fa=Fn=null,rd(t),jr=null,Ni=0;var c=t.return;try{if(ov(e,c,t,a,Fe)){jt=1,du(e,ya(a,e.current)),Be=null;return}}catch(d){if(c!==null)throw Be=c,d;jt=1,du(e,ya(a,e.current)),Be=null;return}t.flags&32768?(P||l===1?e=!0:Or||(Fe&536870912)!==0?e=!1:(_l=e=!0,(l===2||l===9||l===3||l===6)&&(l=Oa.current,l!==null&&l.tag===13&&(l.flags|=16384))),m0(t,e)):Su(t)}function Su(e){var t=e;do{if((t.flags&32768)!==0){m0(t,_l);return}e=t.return;var a=hv(t.alternate,t,tl);if(a!==null){Be=a;return}if(t=t.sibling,t!==null){Be=t;return}Be=t=e}while(t!==null);jt===0&&(jt=5)}function m0(e,t){do{var a=mv(e.alternate,e);if(a!==null){a.flags&=32767,Be=a;return}if(a=e.return,a!==null&&(a.flags|=32768,a.subtreeFlags=0,a.deletions=null),!t&&(e=e.sibling,e!==null)){Be=e;return}Be=e=a}while(e!==null);jt=6,Be=null}function g0(e,t,a,l,c,d,p,E,z){e.cancelPendingCommit=null;do Eu();while($t!==0);if((Ke&6)!==0)throw Error(u(327));if(t!==null){if(t===e.current)throw Error(u(177));if(d=t.lanes|t.childLanes,d|=ws,yc(e,a,d,p,E,z),e===ft&&(Be=ft=null,Fe=0),Dr=t,Ll=e,al=a,Bd=d,Yd=c,l0=l,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,Tv(_n,function(){return b0(),null})):(e.callbackNode=null,e.callbackPriority=0),l=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||l){l=F.T,F.T=null,c=ae.p,ae.p=2,p=Ke,Ke|=4;try{gv(e,t,a)}finally{Ke=p,ae.p=c,F.T=l}}$t=1,x0(),p0(),v0()}}function x0(){if($t===1){$t=0;var e=Ll,t=Dr,a=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||a){a=F.T,F.T=null;var l=ae.p;ae.p=2;var c=Ke;Ke|=4;try{Qm(t,e);var d=nf,p=Yo(e.containerInfo),E=d.focusedElem,z=d.selectionRange;if(p!==E&&E&&E.ownerDocument&&Qe(E.ownerDocument.documentElement,E)){if(z!==null&&ur(E)){var Q=z.start,re=z.end;if(re===void 0&&(re=Q),"selectionStart"in E)E.selectionStart=Q,E.selectionEnd=Math.min(re,E.value.length);else{var ue=E.ownerDocument||document,X=ue&&ue.defaultView||window;if(X.getSelection){var K=X.getSelection(),be=E.textContent.length,ke=Math.min(z.start,be),ut=z.end===void 0?ke:Math.min(z.end,be);!K.extend&&ke>ut&&(p=ut,ut=ke,ke=p);var Z=Bc(E,ke),B=Bc(E,ut);if(Z&&B&&(K.rangeCount!==1||K.anchorNode!==Z.node||K.anchorOffset!==Z.offset||K.focusNode!==B.node||K.focusOffset!==B.offset)){var I=ue.createRange();I.setStart(Z.node,Z.offset),K.removeAllRanges(),ke>ut?(K.addRange(I),K.extend(B.node,B.offset)):(I.setEnd(B.node,B.offset),K.addRange(I))}}}}for(ue=[],K=E;K=K.parentNode;)K.nodeType===1&&ue.push({element:K,left:K.scrollLeft,top:K.scrollTop});for(typeof E.focus=="function"&&E.focus(),E=0;E<ue.length;E++){var ce=ue[E];ce.element.scrollLeft=ce.left,ce.element.scrollTop=ce.top}}Lu=!!af,nf=af=null}finally{Ke=c,ae.p=l,F.T=a}}e.current=t,$t=2}}function p0(){if($t===2){$t=0;var e=Ll,t=Dr,a=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||a){a=F.T,F.T=null;var l=ae.p;ae.p=2;var c=Ke;Ke|=4;try{Fm(e,t.alternate,t)}finally{Ke=c,ae.p=l,F.T=a}}$t=3}}function v0(){if($t===4||$t===3){$t=0,bn();var e=Ll,t=Dr,a=al,l=l0;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?$t=5:($t=0,Dr=Ll=null,y0(e,e.pendingLanes));var c=e.pendingLanes;if(c===0&&(Ul=null),na(a),t=t.stateNode,Vt&&typeof Vt.onCommitFiberRoot=="function")try{Vt.onCommitFiberRoot(mt,t,void 0,(t.current.flags&128)===128)}catch{}if(l!==null){t=F.T,c=ae.p,ae.p=2,F.T=null;try{for(var d=e.onRecoverableError,p=0;p<l.length;p++){var E=l[p];d(E.value,{componentStack:E.stack})}}finally{F.T=t,ae.p=c}}(al&3)!==0&&Eu(),Rn(e),c=e.pendingLanes,(a&261930)!==0&&(c&42)!==0?e===$d?Hi++:(Hi=0,$d=e):Hi=0,qi(0)}}function y0(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,yi(t)))}function Eu(){return x0(),p0(),v0(),b0()}function b0(){if($t!==5)return!1;var e=Ll,t=Bd;Bd=0;var a=na(al),l=F.T,c=ae.p;try{ae.p=32>a?32:a,F.T=null,a=Yd,Yd=null;var d=Ll,p=al;if($t=0,Dr=Ll=null,al=0,(Ke&6)!==0)throw Error(u(331));var E=Ke;if(Ke|=4,t0(d.current),Jm(d,d.current,p,a),Ke=E,qi(0,!1),Vt&&typeof Vt.onPostCommitFiberRoot=="function")try{Vt.onPostCommitFiberRoot(mt,d)}catch{}return!0}finally{ae.p=c,F.T=l,y0(e,t)}}function N0(e,t,a){t=ya(a,t),t=Nd(e.stateNode,t,2),e=Rl(e,t,2),e!==null&&(fl(e,2),Rn(e))}function lt(e,t,a){if(e.tag===3)N0(e,e,a);else for(;t!==null;){if(t.tag===3){N0(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=ya(a,e),a=jm(2),l=Rl(t,a,2),l!==null&&(wm(a,l,t,e),fl(l,2),Rn(l));break}}t=t.return}}function Gd(e,t,a){var l=e.pingCache;if(l===null){l=e.pingCache=new vv;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)||(Hd=!0,c.add(a),e=wv.bind(null,e,t,a),t.then(e,e))}function wv(e,t,a){var l=e.pingCache;l!==null&&l.delete(t),e.pingedLanes|=e.suspendedLanes&a,e.warmLanes&=~a,ft===e&&(Fe&a)===a&&(jt===4||jt===3&&(Fe&62914560)===Fe&&300>It()-yu?(Ke&2)===0&&Ar(e,0):qd|=a,Rr===Fe&&(Rr=0)),Rn(e)}function j0(e,t){t===0&&(t=Wr()),e=Ba(e,t),e!==null&&(fl(e,t),Rn(e))}function Sv(e){var t=e.memoizedState,a=0;t!==null&&(a=t.retryLane),j0(e,a)}function Ev(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),j0(e,a)}function Tv(e,t){return tn(e,t)}var Tu=null,_r=null,Zd=!1,Cu=!1,Wd=!1,ql=0;function Rn(e){e!==_r&&e.next===null&&(_r===null?Tu=_r=e:_r=_r.next=e),Cu=!0,Zd||(Zd=!0,Mv())}function qi(e,t){if(!Wd&&Cu){Wd=!0;do for(var a=!1,l=Tu;l!==null;){if(e!==0){var c=l.pendingLanes;if(c===0)var d=0;else{var p=l.suspendedLanes,E=l.pingedLanes;d=(1<<31-kt(42|e)+1)-1,d&=c&~(p&~E),d=d&201326741?d&201326741|1:d?d|2:0}d!==0&&(a=!0,T0(l,d))}else d=Fe,d=es(l,l===ft?d:0,l.cancelPendingCommit!==null||l.timeoutHandle!==-1),(d&3)===0||dl(l,d)||(a=!0,T0(l,d));l=l.next}while(a);Wd=!1}}function Cv(){w0()}function w0(){Cu=Zd=!1;var e=0;ql!==0&&Hv()&&(e=ql);for(var t=It(),a=null,l=Tu;l!==null;){var c=l.next,d=S0(l,t);d===0?(l.next=null,a===null?Tu=c:a.next=c,c===null&&(_r=a)):(a=l,(e!==0||(d&3)!==0)&&(Cu=!0)),l=c}$t!==0&&$t!==5||qi(e),ql!==0&&(ql=0)}function S0(e,t){for(var a=e.suspendedLanes,l=e.pingedLanes,c=e.expirationTimes,d=e.pendingLanes&-62914561;0<d;){var p=31-kt(d),E=1<<p,z=c[p];z===-1?((E&a)===0||(E&l)!==0)&&(c[p]=vc(E,t)):z<=t&&(e.expiredLanes|=E),d&=~E}if(t=ft,a=Fe,a=es(e,e===t?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l=e.callbackNode,a===0||e===t&&(nt===2||nt===9)||e.cancelPendingCommit!==null)return l!==null&&l!==null&&an(l),e.callbackNode=null,e.callbackPriority=0;if((a&3)===0||dl(e,a)){if(t=a&-a,t===e.callbackPriority)return t;switch(l!==null&&an(l),na(a)){case 2:case 8:a=Zs;break;case 32:a=_n;break;case 268435456:a=ul;break;default:a=_n}return l=E0.bind(null,e),a=tn(a,l),e.callbackPriority=t,e.callbackNode=a,t}return l!==null&&l!==null&&an(l),e.callbackPriority=2,e.callbackNode=null,2}function E0(e,t){if($t!==0&&$t!==5)return e.callbackNode=null,e.callbackPriority=0,null;var a=e.callbackNode;if(Eu()&&e.callbackNode!==a)return null;var l=Fe;return l=es(e,e===ft?l:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l===0?null:(r0(e,l,t),S0(e,It()),e.callbackNode!=null&&e.callbackNode===a?E0.bind(null,e):null)}function T0(e,t){if(Eu())return null;r0(e,t,!0)}function Mv(){Vv(function(){(Ke&6)!==0?tn(Zr,Cv):w0()})}function Id(){if(ql===0){var e=yr;e===0&&(e=wt,wt<<=1,(wt&261888)===0&&(wt=256)),ql=e}return ql}function C0(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:cs(""+e)}function M0(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 Ov(e,t,a,l,c){if(t==="submit"&&a&&a.stateNode===c){var d=C0((c[Bt]||null).action),p=l.submitter;p&&(t=(t=p[Bt]||null)?C0(t.formAction):p.getAttribute("formAction"),t!==null&&(d=t,p=null));var E=new fs("action","action",null,l,c);e.push({event:E,listeners:[{instance:null,listener:function(){if(l.defaultPrevented){if(ql!==0){var z=p?M0(c,p):new FormData(c);gd(a,{pending:!0,data:z,method:c.method,action:d},null,z)}}else typeof d=="function"&&(E.preventDefault(),z=p?M0(c,p):new FormData(c),gd(a,{pending:!0,data:z,method:c.method,action:d},d,z))},currentTarget:c}]})}}for(var Qd=0;Qd<gi.length;Qd++){var Xd=gi[Qd],Rv=Xd.toLowerCase(),Dv=Xd[0].toUpperCase()+Xd.slice(1);va(Rv,"on"+Dv)}va(Pc,"onAnimationEnd"),va(Fc,"onAnimationIteration"),va(fr,"onAnimationStart"),va("dblclick","onDoubleClick"),va("focusin","onFocus"),va("focusout","onBlur"),va($o,"onTransitionRun"),va(Po,"onTransitionStart"),va(Gc,"onTransitionCancel"),va(hi,"onTransitionEnd"),hl("onMouseEnter",["mouseout","mouseover"]),hl("onMouseLeave",["mouseout","mouseover"]),hl("onPointerEnter",["pointerout","pointerover"]),hl("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 Vi="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(" "),Av=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Vi));function O0(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 E=l[p],z=E.instance,Q=E.currentTarget;if(E=E.listener,z!==d&&c.isPropagationStopped())break e;d=E,c.currentTarget=Q;try{d(c)}catch(re){El(re)}c.currentTarget=null,d=z}else for(p=0;p<l.length;p++){if(E=l[p],z=E.instance,Q=E.currentTarget,E=E.listener,z!==d&&c.isPropagationStopped())break e;d=E,c.currentTarget=Q;try{d(c)}catch(re){El(re)}c.currentTarget=null,d=z}}}}function Ye(e,t){var a=t[ts];a===void 0&&(a=t[ts]=new Set);var l=e+"__bubble";a.has(l)||(R0(t,e,2,!1),a.add(l))}function Jd(e,t,a){var l=0;t&&(l|=4),R0(a,e,l,t)}var Mu="_reactListening"+Math.random().toString(36).slice(2);function Kd(e){if(!e[Mu]){e[Mu]=!0,wc.forEach(function(a){a!=="selectionchange"&&(Av.has(a)||Jd(a,!1,e),Jd(a,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Mu]||(t[Mu]=!0,Jd("selectionchange",!1,t))}}function R0(e,t,a,l){switch(sg(t)){case 2:var c=ry;break;case 8:c=iy;break;default:c=gf}a=c.bind(null,t,a,e),c=void 0,!li||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 ef(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 E=l.stateNode.containerInfo;if(E===c)break;if(p===4)for(p=l.return;p!==null;){var z=p.tag;if((z===3||z===4)&&p.stateNode.containerInfo===c)return;p=p.return}for(;E!==null;){if(p=Un(E),p===null)return;if(z=p.tag,z===5||z===6||z===26||z===27){l=d=p;continue e}E=E.parentNode}}l=l.return}ni(function(){var Q=d,re=nr(a),ue=[];e:{var X=mi.get(e);if(X!==void 0){var K=fs,be=e;switch(e){case"keypress":if(ds(a)===0)break e;case"keydown":case"keyup":K=Mo;break;case"focusin":be="focus",K=cr;break;case"focusout":be="blur",K=cr;break;case"beforeblur":case"afterblur":K=cr;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":K=Oc;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":K=yo;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":K=Do;break;case Pc:case Fc:case fr:K=pl;break;case hi:K=Ao;break;case"scroll":case"scrollend":K=si;break;case"wheel":K=_o;break;case"copy":case"cut":case"paste":K=vl;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":K=Rc;break;case"toggle":case"beforetoggle":K=Uo}var ke=(t&4)!==0,ut=!ke&&(e==="scroll"||e==="scrollend"),Z=ke?X!==null?X+"Capture":null:X;ke=[];for(var B=Q,I;B!==null;){var ce=B;if(I=ce.stateNode,ce=ce.tag,ce!==5&&ce!==26&&ce!==27||I===null||Z===null||(ce=us(B,Z),ce!=null&&ke.push(Bi(B,ce,I))),ut)break;B=B.return}0<ke.length&&(X=new K(X,be,null,a,re),ue.push({event:X,listeners:ke}))}}if((t&7)===0){e:{if(X=e==="mouseover"||e==="pointerover",K=e==="mouseout"||e==="pointerout",X&&a!==ti&&(be=a.relatedTarget||a.fromElement)&&(Un(be)||be[zn]))break e;if((K||X)&&(X=re.window===re?re:(X=re.ownerDocument)?X.defaultView||X.parentWindow:window,K?(be=a.relatedTarget||a.toElement,K=Q,be=be?Un(be):null,be!==null&&(ut=h(be),ke=be.tag,be!==ut||ke!==5&&ke!==27&&ke!==6)&&(be=null)):(K=null,be=Q),K!==be)){if(ke=Oc,ce="onMouseLeave",Z="onMouseEnter",B="mouse",(e==="pointerout"||e==="pointerover")&&(ke=Rc,ce="onPointerLeave",Z="onPointerEnter",B="pointer"),ut=K==null?X:xa(K),I=be==null?X:xa(be),X=new ke(ce,B+"leave",K,a,re),X.target=ut,X.relatedTarget=I,ce=null,Un(re)===Q&&(ke=new ke(Z,B+"enter",be,a,re),ke.target=I,ke.relatedTarget=ut,ce=ke),ut=ce,K&&be)t:{for(ke=kv,Z=K,B=be,I=0,ce=Z;ce;ce=ke(ce))I++;ce=0;for(var Me=B;Me;Me=ke(Me))ce++;for(;0<I-ce;)Z=ke(Z),I--;for(;0<ce-I;)B=ke(B),ce--;for(;I--;){if(Z===B||B!==null&&Z===B.alternate){ke=Z;break t}Z=ke(Z),B=ke(B)}ke=null}else ke=null;K!==null&&D0(ue,X,K,ke,!1),be!==null&&ut!==null&&D0(ue,ut,be,ke,!0)}}e:{if(X=Q?xa(Q):window,K=X.nodeName&&X.nodeName.toLowerCase(),K==="select"||K==="input"&&X.type==="file")var Xe=qc;else if(Hc(X))if(Tn)Xe=gt;else{Xe=jl;var je=$e}else K=X.nodeName,!K||K.toLowerCase()!=="input"||X.type!=="checkbox"&&X.type!=="radio"?Q&&ar(Q.elementType)&&(Xe=qc):Xe=Bo;if(Xe&&(Xe=Xe(e,Q))){ii(ue,Xe,a,re);break e}je&&je(e,X,Q),e==="focusout"&&Q&&X.type==="number"&&Q.memoizedProps.value!=null&&ls(X,"number",X.value)}switch(je=Q?xa(Q):window,e){case"focusin":(Hc(je)||je.contentEditable==="true")&&(wl=je,or=Q,Jt=null);break;case"focusout":Jt=or=wl=null;break;case"mousedown":dr=!0;break;case"contextmenu":case"mouseup":case"dragend":dr=!1,js(ue,a,re);break;case"selectionchange":if(Yc)break;case"keydown":case"keyup":js(ue,a,re)}var Ve;if(ri)e:{switch(e){case"compositionstart":var Ge="onCompositionStart";break e;case"compositionend":Ge="onCompositionEnd";break e;case"compositionupdate":Ge="onCompositionUpdate";break e}Ge=void 0}else bl?Uc(e,a)&&(Ge="onCompositionEnd"):e==="keydown"&&a.keyCode===229&&(Ge="onCompositionStart");Ge&&(kc&&a.locale!=="ko"&&(bl||Ge!=="onCompositionStart"?Ge==="onCompositionEnd"&&bl&&(Ve=Yt()):(Sn=re,lr="value"in Sn?Sn.value:Sn.textContent,bl=!0)),je=Ou(Q,Ge),0<je.length&&(Ge=new yl(Ge,e,null,a,re),ue.push({event:Ge,listeners:je}),Ve?Ge.data=Ve:(Ve=Lc(a),Ve!==null&&(Ge.data=Ve)))),(Ve=Lo?Ho(e,a):qo(e,a))&&(Ge=Ou(Q,"onBeforeInput"),0<Ge.length&&(je=new yl("onBeforeInput","beforeinput",null,a,re),ue.push({event:je,listeners:Ge}),je.data=Ve)),Ov(ue,e,Q,a,re)}O0(ue,t)})}function Bi(e,t,a){return{instance:e,listener:t,currentTarget:a}}function Ou(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(Bi(e,c,d)),c=us(e,t),c!=null&&l.push(Bi(e,c,d))),e.tag===3)return l;e=e.return}return[]}function kv(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function D0(e,t,a,l,c){for(var d=t._reactName,p=[];a!==null&&a!==l;){var E=a,z=E.alternate,Q=E.stateNode;if(E=E.tag,z!==null&&z===l)break;E!==5&&E!==26&&E!==27||Q===null||(z=Q,c?(Q=us(a,d),Q!=null&&p.unshift(Bi(a,Q,z))):c||(Q=us(a,d),Q!=null&&p.push(Bi(a,Q,z)))),a=a.return}p.length!==0&&e.push({event:t,listeners:p})}var _v=/\r\n?/g,zv=/\u0000|\uFFFD/g;function A0(e){return(typeof e=="string"?e:""+e).replace(_v,`
|
|
49
|
-
`).replace(zv,"")}function k0(e,t){return t=A0(t),A0(e)===t}function ct(e,t,a,l,c,d){switch(a){case"children":typeof l=="string"?t==="body"||t==="textarea"&&l===""||rn(e,l):(typeof l=="number"||typeof l=="bigint")&&t!=="body"&&rn(e,""+l);break;case"className":Ks(e,"class",l);break;case"tabIndex":Ks(e,"tabindex",l);break;case"dir":case"role":case"viewBox":case"width":case"height":Ks(e,a,l);break;case"style":Tc(e,l,d);break;case"data":if(t!=="object"){Ks(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=cs(""+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"&&ct(e,t,"name",c.name,c,null),ct(e,t,"formEncType",c.formEncType,c,null),ct(e,t,"formMethod",c.formMethod,c,null),ct(e,t,"formTarget",c.formTarget,c,null)):(ct(e,t,"encType",c.encType,c,null),ct(e,t,"method",c.method,c,null),ct(e,t,"target",c.target,c,null)));if(l==null||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(a);break}l=cs(""+l),e.setAttribute(a,l);break;case"onClick":l!=null&&(e.onclick=Ha);break;case"onScroll":l!=null&&Ye("scroll",e);break;case"onScrollEnd":l!=null&&Ye("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=cs(""+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":Ye("beforetoggle",e),Ye("toggle",e),Qt(e,"popover",l);break;case"xlinkActuate":at(e,"http://www.w3.org/1999/xlink","xlink:actuate",l);break;case"xlinkArcrole":at(e,"http://www.w3.org/1999/xlink","xlink:arcrole",l);break;case"xlinkRole":at(e,"http://www.w3.org/1999/xlink","xlink:role",l);break;case"xlinkShow":at(e,"http://www.w3.org/1999/xlink","xlink:show",l);break;case"xlinkTitle":at(e,"http://www.w3.org/1999/xlink","xlink:title",l);break;case"xlinkType":at(e,"http://www.w3.org/1999/xlink","xlink:type",l);break;case"xmlBase":at(e,"http://www.w3.org/XML/1998/namespace","xml:base",l);break;case"xmlLang":at(e,"http://www.w3.org/XML/1998/namespace","xml:lang",l);break;case"xmlSpace":at(e,"http://www.w3.org/XML/1998/namespace","xml:space",l);break;case"is":Qt(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=po.get(a)||a,Qt(e,a,l))}}function tf(e,t,a,l,c,d){switch(a){case"style":Tc(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"?rn(e,l):(typeof l=="number"||typeof l=="bigint")&&rn(e,""+l);break;case"onScroll":l!=null&&Ye("scroll",e);break;case"onScrollEnd":l!=null&&Ye("scrollend",e);break;case"onClick":l!=null&&(e.onclick=Ha);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Xr.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[Bt]||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,""):Qt(e,a,l)}}}function aa(e,t,a){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ye("error",e),Ye("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:ct(e,t,d,p,a,null)}}c&&ct(e,t,"srcSet",a.srcSet,a,null),l&&ct(e,t,"src",a.src,a,null);return;case"input":Ye("invalid",e);var E=d=p=c=null,z=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":z=re;break;case"defaultChecked":Q=re;break;case"value":d=re;break;case"defaultValue":E=re;break;case"children":case"dangerouslySetInnerHTML":if(re!=null)throw Error(u(137,t));break;default:ct(e,t,l,re,a,null)}}gl(e,d,E,z,Q,p,c,!1);return;case"select":Ye("invalid",e),l=p=d=null;for(c in a)if(a.hasOwnProperty(c)&&(E=a[c],E!=null))switch(c){case"value":d=E;break;case"defaultValue":p=E;break;case"multiple":l=E;default:ct(e,t,c,E,a,null)}t=d,a=p,e.multiple=!!l,t!=null?Hn(e,!!l,t,!1):a!=null&&Hn(e,!!l,a,!0);return;case"textarea":Ye("invalid",e),d=c=l=null;for(p in a)if(a.hasOwnProperty(p)&&(E=a[p],E!=null))switch(p){case"value":l=E;break;case"defaultValue":c=E;break;case"children":d=E;break;case"dangerouslySetInnerHTML":if(E!=null)throw Error(u(91));break;default:ct(e,t,p,E,a,null)}ei(e,l,c,d);return;case"option":for(z in a)if(a.hasOwnProperty(z)&&(l=a[z],l!=null))switch(z){case"selected":e.selected=l&&typeof l!="function"&&typeof l!="symbol";break;default:ct(e,t,z,l,a,null)}return;case"dialog":Ye("beforetoggle",e),Ye("toggle",e),Ye("cancel",e),Ye("close",e);break;case"iframe":case"object":Ye("load",e);break;case"video":case"audio":for(l=0;l<Vi.length;l++)Ye(Vi[l],e);break;case"image":Ye("error",e),Ye("load",e);break;case"details":Ye("toggle",e);break;case"embed":case"source":case"link":Ye("error",e),Ye("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:ct(e,t,Q,l,a,null)}return;default:if(ar(t)){for(re in a)a.hasOwnProperty(re)&&(l=a[re],l!==void 0&&tf(e,t,re,l,a,void 0));return}}for(E in a)a.hasOwnProperty(E)&&(l=a[E],l!=null&&ct(e,t,E,l,a,null))}function Uv(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,E=null,z=null,Q=null,re=null;for(K in a){var ue=a[K];if(a.hasOwnProperty(K)&&ue!=null)switch(K){case"checked":break;case"value":break;case"defaultValue":z=ue;default:l.hasOwnProperty(K)||ct(e,t,K,null,l,ue)}}for(var X in l){var K=l[X];if(ue=a[X],l.hasOwnProperty(X)&&(K!=null||ue!=null))switch(X){case"type":d=K;break;case"name":c=K;break;case"checked":Q=K;break;case"defaultChecked":re=K;break;case"value":p=K;break;case"defaultValue":E=K;break;case"children":case"dangerouslySetInnerHTML":if(K!=null)throw Error(u(137,t));break;default:K!==ue&&ct(e,t,X,K,l,ue)}}tr(e,p,E,z,Q,re,d,c);return;case"select":K=p=E=X=null;for(d in a)if(z=a[d],a.hasOwnProperty(d)&&z!=null)switch(d){case"value":break;case"multiple":K=z;default:l.hasOwnProperty(d)||ct(e,t,d,null,l,z)}for(c in l)if(d=l[c],z=a[c],l.hasOwnProperty(c)&&(d!=null||z!=null))switch(c){case"value":X=d;break;case"defaultValue":E=d;break;case"multiple":p=d;default:d!==z&&ct(e,t,c,d,l,z)}t=E,a=p,l=K,X!=null?Hn(e,!!a,X,!1):!!l!=!!a&&(t!=null?Hn(e,!!a,t,!0):Hn(e,!!a,a?[]:"",!1));return;case"textarea":K=X=null;for(E in a)if(c=a[E],a.hasOwnProperty(E)&&c!=null&&!l.hasOwnProperty(E))switch(E){case"value":break;case"children":break;default:ct(e,t,E,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":K=c;break;case"children":break;case"dangerouslySetInnerHTML":if(c!=null)throw Error(u(91));break;default:c!==d&&ct(e,t,p,c,l,d)}ss(e,X,K);return;case"option":for(var be in a)if(X=a[be],a.hasOwnProperty(be)&&X!=null&&!l.hasOwnProperty(be))switch(be){case"selected":e.selected=!1;break;default:ct(e,t,be,null,l,X)}for(z in l)if(X=l[z],K=a[z],l.hasOwnProperty(z)&&X!==K&&(X!=null||K!=null))switch(z){case"selected":e.selected=X&&typeof X!="function"&&typeof X!="symbol";break;default:ct(e,t,z,X,l,K)}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 ke in a)X=a[ke],a.hasOwnProperty(ke)&&X!=null&&!l.hasOwnProperty(ke)&&ct(e,t,ke,null,l,X);for(Q in l)if(X=l[Q],K=a[Q],l.hasOwnProperty(Q)&&X!==K&&(X!=null||K!=null))switch(Q){case"children":case"dangerouslySetInnerHTML":if(X!=null)throw Error(u(137,t));break;default:ct(e,t,Q,X,l,K)}return;default:if(ar(t)){for(var ut in a)X=a[ut],a.hasOwnProperty(ut)&&X!==void 0&&!l.hasOwnProperty(ut)&&tf(e,t,ut,void 0,l,X);for(re in l)X=l[re],K=a[re],!l.hasOwnProperty(re)||X===K||X===void 0&&K===void 0||tf(e,t,re,X,l,K);return}}for(var Z in a)X=a[Z],a.hasOwnProperty(Z)&&X!=null&&!l.hasOwnProperty(Z)&&ct(e,t,Z,null,l,X);for(ue in l)X=l[ue],K=a[ue],!l.hasOwnProperty(ue)||X===K||X==null&&K==null||ct(e,t,ue,X,l,K)}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 Lv(){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,E=c.duration;if(d&&E&&_0(p)){for(p=0,E=c.responseEnd,l+=1;l<a.length;l++){var z=a[l],Q=z.startTime;if(Q>E)break;var re=z.transferSize,ue=z.initiatorType;re&&_0(ue)&&(z=z.responseEnd,p+=re*(z<E?1:(E-Q)/(z-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 af=null,nf=null;function Ru(e){return e.nodeType===9?e:e.ownerDocument}function z0(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 U0(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 lf(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 sf=null;function Hv(){var e=window.event;return e&&e.type==="popstate"?e===sf?!1:(sf=e,!0):(sf=null,!1)}var L0=typeof setTimeout=="function"?setTimeout:void 0,qv=typeof clearTimeout=="function"?clearTimeout:void 0,H0=typeof Promise=="function"?Promise:void 0,Vv=typeof queueMicrotask=="function"?queueMicrotask:typeof H0<"u"?function(e){return H0.resolve(null).then(e).catch(Bv)}:L0;function Bv(e){setTimeout(function(){throw e})}function Vl(e){return e==="head"}function q0(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),Hr(t);return}l--}else if(a==="$"||a==="$?"||a==="$~"||a==="$!"||a==="&")l++;else if(a==="html")Yi(e.ownerDocument.documentElement);else if(a==="head"){a=e.ownerDocument.head,Yi(a);for(var d=a.firstChild;d;){var p=d.nextSibling,E=d.nodeName;d[as]||E==="SCRIPT"||E==="STYLE"||E==="LINK"&&d.rel.toLowerCase()==="stylesheet"||a.removeChild(d),d=p}}else a==="body"&&Yi(e.ownerDocument.body);a=c}while(a);Hr(t)}function V0(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 rf(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":rf(a),Js(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}e.removeChild(a)}}function Yv(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[as])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=Wa(e.nextSibling),e===null)break}return null}function $v(e,t,a){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!a||(e=Wa(e.nextSibling),e===null))return null;return e}function B0(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=Wa(e.nextSibling),e===null))return null;return e}function cf(e){return e.data==="$?"||e.data==="$~"}function uf(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function Pv(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 Wa(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 of=null;function Y0(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var a=e.data;if(a==="/$"||a==="/&"){if(t===0)return Wa(e.nextSibling);t--}else a!=="$"&&a!=="$!"&&a!=="$?"&&a!=="$~"&&a!=="&"||t++}e=e.nextSibling}return null}function $0(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 P0(e,t,a){switch(t=Ru(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 Yi(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Js(e)}var Ia=new Map,F0=new Set;function Du(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var nl=ae.d;ae.d={f:Fv,r:Gv,D:Zv,C:Wv,L:Iv,m:Qv,X:Jv,S:Xv,M:Kv};function Fv(){var e=nl.f(),t=ju();return e||t}function Gv(e){var t=Oe(e);t!==null&&t.tag===5&&t.type==="form"?cm(t):nl.r(e)}var zr=typeof document>"u"?null:document;function G0(e,t,a){var l=zr;if(l&&typeof t=="string"&&t){var c=Xt(t);c='link[rel="'+e+'"][href="'+c+'"]',typeof a=="string"&&(c+='[crossorigin="'+a+'"]'),F0.has(c)||(F0.add(c),e={rel:e,crossOrigin:a,href:t},l.querySelector(c)===null&&(t=l.createElement("link"),aa(t,"link",e),zt(t),l.head.appendChild(t)))}}function Zv(e){nl.D(e),G0("dns-prefetch",e,null)}function Wv(e,t){nl.C(e,t),G0("preconnect",e,t)}function Iv(e,t,a){nl.L(e,t,a);var l=zr;if(l&&e&&t){var c='link[rel="preload"][as="'+Xt(t)+'"]';t==="image"&&a&&a.imageSrcSet?(c+='[imagesrcset="'+Xt(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(c+='[imagesizes="'+Xt(a.imageSizes)+'"]')):c+='[href="'+Xt(e)+'"]';var d=c;switch(t){case"style":d=Ur(e);break;case"script":d=Lr(e)}Ia.has(d)||(e=T({rel:"preload",href:t==="image"&&a&&a.imageSrcSet?void 0:e,as:t},a),Ia.set(d,e),l.querySelector(c)!==null||t==="style"&&l.querySelector($i(d))||t==="script"&&l.querySelector(Pi(d))||(t=l.createElement("link"),aa(t,"link",e),zt(t),l.head.appendChild(t)))}}function Qv(e,t){nl.m(e,t);var a=zr;if(a&&e){var l=t&&typeof t.as=="string"?t.as:"script",c='link[rel="modulepreload"][as="'+Xt(l)+'"][href="'+Xt(e)+'"]',d=c;switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":d=Lr(e)}if(!Ia.has(d)&&(e=T({rel:"modulepreload",href:e},t),Ia.set(d,e),a.querySelector(c)===null)){switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(Pi(d)))return}l=a.createElement("link"),aa(l,"link",e),zt(l),a.head.appendChild(l)}}}function Xv(e,t,a){nl.S(e,t,a);var l=zr;if(l&&e){var c=ln(l).hoistableStyles,d=Ur(e);t=t||"default";var p=c.get(d);if(!p){var E={loading:0,preload:null};if(p=l.querySelector($i(d)))E.loading=5;else{e=T({rel:"stylesheet",href:e,"data-precedence":t},a),(a=Ia.get(d))&&df(e,a);var z=p=l.createElement("link");zt(z),aa(z,"link",e),z._p=new Promise(function(Q,re){z.onload=Q,z.onerror=re}),z.addEventListener("load",function(){E.loading|=1}),z.addEventListener("error",function(){E.loading|=2}),E.loading|=4,Au(p,t,l)}p={type:"stylesheet",instance:p,count:1,state:E},c.set(d,p)}}}function Jv(e,t){nl.X(e,t);var a=zr;if(a&&e){var l=ln(a).hoistableScripts,c=Lr(e),d=l.get(c);d||(d=a.querySelector(Pi(c)),d||(e=T({src:e,async:!0},t),(t=Ia.get(c))&&ff(e,t),d=a.createElement("script"),zt(d),aa(d,"link",e),a.head.appendChild(d)),d={type:"script",instance:d,count:1,state:null},l.set(c,d))}}function Kv(e,t){nl.M(e,t);var a=zr;if(a&&e){var l=ln(a).hoistableScripts,c=Lr(e),d=l.get(c);d||(d=a.querySelector(Pi(c)),d||(e=T({src:e,async:!0,type:"module"},t),(t=Ia.get(c))&&ff(e,t),d=a.createElement("script"),zt(d),aa(d,"link",e),a.head.appendChild(d)),d={type:"script",instance:d,count:1,state:null},l.set(c,d))}}function Z0(e,t,a,l){var c=(c=xe.current)?Du(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=Ur(a.href),a=ln(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=Ur(a.href);var d=ln(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($i(e)))&&!d._p&&(p.instance=d,p.state.loading=5),Ia.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},Ia.set(e,a),d||ey(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=Lr(a),a=ln(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 Ur(e){return'href="'+Xt(e)+'"'}function $i(e){return'link[rel="stylesheet"]['+e+"]"}function W0(e){return T({},e,{"data-precedence":e.precedence,precedence:null})}function ey(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}),aa(t,"link",a),zt(t),e.head.appendChild(t))}function Lr(e){return'[src="'+Xt(e)+'"]'}function Pi(e){return"script[async]"+e}function I0(e,t,a){if(t.count++,t.instance===null)switch(t.type){case"style":var l=e.querySelector('style[data-href~="'+Xt(a.href)+'"]');if(l)return t.instance=l,zt(l),l;var c=T({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return l=(e.ownerDocument||e).createElement("style"),zt(l),aa(l,"style",c),Au(l,a.precedence,e),t.instance=l;case"stylesheet":c=Ur(a.href);var d=e.querySelector($i(c));if(d)return t.state.loading|=4,t.instance=d,zt(d),d;l=W0(a),(c=Ia.get(c))&&df(l,c),d=(e.ownerDocument||e).createElement("link"),zt(d);var p=d;return p._p=new Promise(function(E,z){p.onload=E,p.onerror=z}),aa(d,"link",l),t.state.loading|=4,Au(d,a.precedence,e),t.instance=d;case"script":return d=Lr(a.src),(c=e.querySelector(Pi(d)))?(t.instance=c,zt(c),c):(l=a,(c=Ia.get(d))&&(l=T({},a),ff(l,c)),e=e.ownerDocument||e,c=e.createElement("script"),zt(c),aa(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,Au(l,a.precedence,e));return t.instance}function Au(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 E=l[p];if(E.dataset.precedence===t)d=E;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 df(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function ff(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var ku=null;function Q0(e,t,a){if(ku===null){var l=new Map,c=ku=new Map;c.set(a,l)}else c=ku,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[as]||d[St]||e==="link"&&d.getAttribute("rel")==="stylesheet")&&d.namespaceURI!=="http://www.w3.org/2000/svg"){var p=d.getAttribute(t)||"";p=e+p;var E=l.get(p);E?E.push(d):l.set(p,[d])}}return l}function X0(e,t,a){e=e.ownerDocument||e,e.head.insertBefore(a,t==="title"?e.querySelector("head > title"):null)}function ty(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 J0(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function ay(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=Ur(l.href),d=t.querySelector($i(c));if(d){t=d._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=_u.bind(e),t.then(e,e)),a.state.loading|=4,a.instance=d,zt(d);return}d=t.ownerDocument||t,l=W0(l),(c=Ia.get(c))&&df(l,c),d=d.createElement("link"),zt(d);var p=d;p._p=new Promise(function(E,z){p.onload=E,p.onerror=z}),aa(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=_u.bind(e),t.addEventListener("load",a),t.addEventListener("error",a))}}var hf=0;function ny(e,t){return e.stylesheets&&e.count===0&&Uu(e,e.stylesheets),0<e.count||0<e.imgCount?function(a){var l=setTimeout(function(){if(e.stylesheets&&Uu(e,e.stylesheets),e.unsuspend){var d=e.unsuspend;e.unsuspend=null,d()}},6e4+t);0<e.imgBytes&&hf===0&&(hf=62500*Lv());var c=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Uu(e,e.stylesheets),e.unsuspend)){var d=e.unsuspend;e.unsuspend=null,d()}},(e.imgBytes>hf?50:800)+t);return e.unsuspend=a,function(){e.unsuspend=null,clearTimeout(l),clearTimeout(c)}}:null}function _u(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Uu(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var zu=null;function Uu(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,zu=new Map,t.forEach(ly,e),zu=null,_u.call(e))}function ly(e,t){if(!(t.state.loading&4)){var a=zu.get(e);if(a)var l=a.get(null);else{a=new Map,zu.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=_u.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 Fi={$$typeof:M,Provider:null,Consumer:null,_currentValue:de,_currentValue2:de,_threadCount:0};function sy(e,t,a,l,c,d,p,E,z){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=Is(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Is(0),this.hiddenUpdates=Is(null),this.identifierPrefix=l,this.onUncaughtError=c,this.onCaughtError=d,this.onRecoverableError=p,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=z,this.incompleteTransitions=new Map}function K0(e,t,a,l,c,d,p,E,z,Q,re,ue){return e=new sy(e,t,a,p,z,Q,re,ue,E),t=1,d===!0&&(t|=24),d=Kt(3,null,null,t),e.current=d,d.stateNode=e,t=Fo(),t.refCount++,e.pooledCache=t,t.refCount++,d.memoizedState={element:l,isDehydrated:a,cache:t},Io(d),e}function eg(e){return e?(e=Ma,e):Ma}function tg(e,t,a,l,c,d){c=eg(c),l.context===null?l.context=c:l.pendingContext=c,l=Ol(t),l.payload={element:a},d=d===void 0?null:d,d!==null&&(l.callback=d),a=Rl(e,l,t),a!==null&&(Ea(a,e,t),wi(a,e,t))}function ag(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var a=e.retryLane;e.retryLane=a!==0&&a<t?a:t}}function mf(e,t){ag(e,t),(e=e.alternate)&&ag(e,t)}function ng(e){if(e.tag===13||e.tag===31){var t=Ba(e,67108864);t!==null&&Ea(t,e,67108864),mf(e,67108864)}}function lg(e){if(e.tag===13||e.tag===31){var t=ka();t=Qs(t);var a=Ba(e,t);a!==null&&Ea(a,e,t),mf(e,t)}}var Lu=!0;function ry(e,t,a,l){var c=F.T;F.T=null;var d=ae.p;try{ae.p=2,gf(e,t,a,l)}finally{ae.p=d,F.T=c}}function iy(e,t,a,l){var c=F.T;F.T=null;var d=ae.p;try{ae.p=8,gf(e,t,a,l)}finally{ae.p=d,F.T=c}}function gf(e,t,a,l){if(Lu){var c=xf(l);if(c===null)ef(e,t,l,Hu,a),rg(e,l);else if(uy(c,e,t,a,l))l.stopPropagation();else if(rg(e,l),t&4&&-1<cy.indexOf(e)){for(;c!==null;){var d=Oe(c);if(d!==null)switch(d.tag){case 3:if(d=d.stateNode,d.current.memoizedState.isDehydrated){var p=Nn(d.pendingLanes);if(p!==0){var E=d;for(E.pendingLanes|=2,E.entangledLanes|=2;p;){var z=1<<31-kt(p);E.entanglements[1]|=z,p&=~z}Rn(d),(Ke&6)===0&&(bu=It()+500,qi(0))}}break;case 31:case 13:E=Ba(d,2),E!==null&&Ea(E,d,2),ju(),mf(d,2)}if(d=xf(l),d===null&&ef(e,t,l,Hu,a),d===c)break;c=d}c!==null&&l.stopPropagation()}else ef(e,t,l,null,a)}}function xf(e){return e=nr(e),pf(e)}var Hu=null;function pf(e){if(Hu=null,e=Un(e),e!==null){var t=h(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=N(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 Hu=e,null}function sg(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(cl()){case Zr:return 2;case Zs:return 8;case _n:case Ws:return 32;case ul:return 268435456;default:return 32}default:return 32}}var vf=!1,Bl=null,Yl=null,$l=null,Gi=new Map,Zi=new Map,Pl=[],cy="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 rg(e,t){switch(e){case"focusin":case"focusout":Bl=null;break;case"dragenter":case"dragleave":Yl=null;break;case"mouseover":case"mouseout":$l=null;break;case"pointerover":case"pointerout":Gi.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Zi.delete(t.pointerId)}}function Wi(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=Oe(t),t!==null&&ng(t)),e):(e.eventSystemFlags|=l,t=e.targetContainers,c!==null&&t.indexOf(c)===-1&&t.push(c),e)}function uy(e,t,a,l,c){switch(t){case"focusin":return Bl=Wi(Bl,e,t,a,l,c),!0;case"dragenter":return Yl=Wi(Yl,e,t,a,l,c),!0;case"mouseover":return $l=Wi($l,e,t,a,l,c),!0;case"pointerover":var d=c.pointerId;return Gi.set(d,Wi(Gi.get(d)||null,e,t,a,l,c)),!0;case"gotpointercapture":return d=c.pointerId,Zi.set(d,Wi(Zi.get(d)||null,e,t,a,l,c)),!0}return!1}function ig(e){var t=Un(e.target);if(t!==null){var a=h(t);if(a!==null){if(t=a.tag,t===13){if(t=b(a),t!==null){e.blockedOn=t,Qr(e.priority,function(){lg(a)});return}}else if(t===31){if(t=N(a),t!==null){e.blockedOn=t,Qr(e.priority,function(){lg(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 qu(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var a=xf(e.nativeEvent);if(a===null){a=e.nativeEvent;var l=new a.constructor(a.type,a);ti=l,a.target.dispatchEvent(l),ti=null}else return t=Oe(a),t!==null&&ng(t),e.blockedOn=a,!1;t.shift()}return!0}function cg(e,t,a){qu(e)&&a.delete(t)}function oy(){vf=!1,Bl!==null&&qu(Bl)&&(Bl=null),Yl!==null&&qu(Yl)&&(Yl=null),$l!==null&&qu($l)&&($l=null),Gi.forEach(cg),Zi.forEach(cg)}function Vu(e,t){e.blockedOn===t&&(e.blockedOn=null,vf||(vf=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,oy)))}var Bu=null;function ug(e){Bu!==e&&(Bu=e,n.unstable_scheduleCallback(n.unstable_NormalPriority,function(){Bu===e&&(Bu=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(pf(l||a)===null)continue;break}var d=Oe(a);d!==null&&(e.splice(t,3),t-=3,gd(d,{pending:!0,data:c,method:a.method,action:l},l,c))}}))}function Hr(e){function t(z){return Vu(z,e)}Bl!==null&&Vu(Bl,e),Yl!==null&&Vu(Yl,e),$l!==null&&Vu($l,e),Gi.forEach(t),Zi.forEach(t);for(var a=0;a<Pl.length;a++){var l=Pl[a];l.blockedOn===e&&(l.blockedOn=null)}for(;0<Pl.length&&(a=Pl[0],a.blockedOn===null);)ig(a),a.blockedOn===null&&Pl.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[Bt]||null;if(typeof d=="function")p||ug(a);else if(p){var E=null;if(d&&d.hasAttribute("formAction")){if(c=d,p=d[Bt]||null)E=p.formAction;else if(pf(c)!==null)continue}else E=p.action;typeof E=="function"?a[l+1]=E:(a.splice(l,3),l-=3),ug(a)}}}function og(){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 yf(e){this._internalRoot=e}Yu.prototype.render=yf.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(u(409));var a=t.current,l=ka();tg(a,l,e,t,null,null)},Yu.prototype.unmount=yf.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;tg(e.current,2,null,e,null,null),ju(),t[zn]=null}};function Yu(e){this._internalRoot=e}Yu.prototype.unstable_scheduleHydration=function(e){if(e){var t=Xs();e={blockedOn:null,target:e,priority:t};for(var a=0;a<Pl.length&&t!==0&&t<Pl[a].priority;a++);Pl.splice(a,0,e),a===0&&ig(e)}};var dg=r.version;if(dg!=="19.2.4")throw Error(u(527,dg,"19.2.4"));ae.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?w(e):null,e=e===null?null:e.stateNode,e};var dy={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:F,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var $u=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!$u.isDisabled&&$u.supportsFiber)try{mt=$u.inject(dy),Vt=$u}catch{}}return Qi.createRoot=function(e,t){if(!f(e))throw Error(u(299));var a=!1,l="",c=vm,d=ym,p=bm;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=K0(e,1,!1,null,null,a,l,null,c,d,p,og),e[zn]=t.current,Kd(e),new yf(t)},Qi.hydrateRoot=function(e,t,a){if(!f(e))throw Error(u(299));var l=!1,c="",d=vm,p=ym,E=bm,z=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&&(E=a.onRecoverableError),a.formState!==void 0&&(z=a.formState)),t=K0(e,1,!0,t,a??null,l,c,z,d,p,E,og),t.context=eg(null),a=t.current,l=ka(),l=Qs(l),c=Ol(l),c.callback=null,Rl(a,c,l),a=l,t.current.lanes=a,fl(t,a),Rn(t),e[zn]=t.current,Kd(e),new Yu(t)},Qi.version="19.2.4",Qi}var wg;function wy(){if(wg)return wf.exports;wg=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(),wf.exports=jy(),wf.exports}var Sy=wy();const Ey=If(Sy);/**
|
|
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 Sg="popstate";function Ty(n={}){function r(f,h){let{pathname:b="/",search:N="",hash:y=""}=Ps(f.location.hash.substring(1));return!b.startsWith("/")&&!b.startsWith(".")&&(b="/"+b),Hf("",{pathname:b,search:N,hash:y},h.state&&h.state.usr||null,h.state&&h.state.key||"default")}function o(f,h){let b=f.document.querySelector("base"),N="";if(b&&b.getAttribute("href")){let y=f.location.href,x=y.indexOf("#");N=x===-1?y:y.slice(0,x)}return N+"#"+(typeof h=="string"?h:fc(h))}function u(f,h){Xa(f.pathname.charAt(0)==="/",`relative pathnames are not supported in hash history.push(${JSON.stringify(h)})`)}return My(r,o,u,n)}function vt(n,r){if(n===!1||n===null||typeof n>"u")throw new Error(r)}function Xa(n,r){if(!n){typeof console<"u"&&console.warn(r);try{throw new Error(r)}catch{}}}function Cy(){return Math.random().toString(36).substring(2,10)}function Eg(n,r){return{usr:n.state,key:n.key,idx:r}}function Hf(n,r,o=null,u){return{pathname:typeof n=="string"?n:n.pathname,search:"",hash:"",...typeof r=="string"?Ps(r):r,state:o,key:r&&r.key||u||Cy()}}function fc({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 Ps(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 My(n,r,o,u={}){let{window:f=document.defaultView,v5Compat:h=!1}=u,b=f.history,N="POP",y=null,x=w();x==null&&(x=0,b.replaceState({...b.state,idx:x},""));function w(){return(b.state||{idx:null}).idx}function T(){N="POP";let A=w(),G=A==null?null:A-x;x=A,y&&y({action:N,location:C.location,delta:G})}function k(A,G){N="PUSH";let $=Hf(C.location,A,G);o&&o($,A),x=w()+1;let M=Eg($,x),V=C.createHref($);try{b.pushState(M,"",V)}catch(ee){if(ee instanceof DOMException&&ee.name==="DataCloneError")throw ee;f.location.assign(V)}h&&y&&y({action:N,location:C.location,delta:1})}function _(A,G){N="REPLACE";let $=Hf(C.location,A,G);o&&o($,A),x=w();let M=Eg($,x),V=C.createHref($);b.replaceState(M,"",V),h&&y&&y({action:N,location:C.location,delta:0})}function j(A){return Oy(A)}let C={get action(){return N},get location(){return n(f,b)},listen(A){if(y)throw new Error("A history only accepts one active listener");return f.addEventListener(Sg,T),y=A,()=>{f.removeEventListener(Sg,T),y=null}},createHref(A){return r(f,A)},createURL:j,encodeLocation(A){let G=j(A);return{pathname:G.pathname,search:G.search,hash:G.hash}},push:k,replace:_,go(A){return b.go(A)}};return C}function Oy(n,r=!1){let o="http://localhost";typeof window<"u"&&(o=window.location.origin!=="null"?window.location.origin:window.location.href),vt(o,"No window.location.(origin|href) available to create URL");let u=typeof n=="string"?n:fc(n);return u=u.replace(/ $/,"%20"),!r&&u.startsWith("//")&&(u=o+u),new URL(u,o)}function Dx(n,r,o="/"){return Ry(n,r,o,!1)}function Ry(n,r,o,u){let f=typeof r=="string"?Ps(r):r,h=il(f.pathname||"/",o);if(h==null)return null;let b=Ax(n);Dy(b);let N=null;for(let y=0;N==null&&y<b.length;++y){let x=Yy(h);N=Vy(b[y],x,u)}return N}function Ax(n,r=[],o=[],u="",f=!1){let h=(b,N,y=f,x)=>{let w={relativePath:x===void 0?b.path||"":x,caseSensitive:b.caseSensitive===!0,childrenIndex:N,route:b};if(w.relativePath.startsWith("/")){if(!w.relativePath.startsWith(u)&&y)return;vt(w.relativePath.startsWith(u),`Absolute route path "${w.relativePath}" nested under path "${u}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),w.relativePath=w.relativePath.slice(u.length)}let T=rl([u,w.relativePath]),k=o.concat(w);b.children&&b.children.length>0&&(vt(b.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${T}".`),Ax(b.children,r,k,T,y)),!(b.path==null&&!b.index)&&r.push({path:T,score:Hy(T,b.index),routesMeta:k})};return n.forEach((b,N)=>{var y;if(b.path===""||!((y=b.path)!=null&&y.includes("?")))h(b,N);else for(let x of kx(b.path))h(b,N,!0,x)}),r}function kx(n){let r=n.split("/");if(r.length===0)return[];let[o,...u]=r,f=o.endsWith("?"),h=o.replace(/\?$/,"");if(u.length===0)return f?[h,""]:[h];let b=kx(u.join("/")),N=[];return N.push(...b.map(y=>y===""?h:[h,y].join("/"))),f&&N.push(...b),N.map(y=>n.startsWith("/")&&y===""?"/":y)}function Dy(n){n.sort((r,o)=>r.score!==o.score?o.score-r.score:qy(r.routesMeta.map(u=>u.childrenIndex),o.routesMeta.map(u=>u.childrenIndex)))}var Ay=/^:[\w-]+$/,ky=3,_y=2,zy=1,Uy=10,Ly=-2,Tg=n=>n==="*";function Hy(n,r){let o=n.split("/"),u=o.length;return o.some(Tg)&&(u+=Ly),r&&(u+=_y),o.filter(f=>!Tg(f)).reduce((f,h)=>f+(Ay.test(h)?ky:h===""?zy:Uy),u)}function qy(n,r){return n.length===r.length&&n.slice(0,-1).every((u,f)=>u===r[f])?n[n.length-1]-r[r.length-1]:0}function Vy(n,r,o=!1){let{routesMeta:u}=n,f={},h="/",b=[];for(let N=0;N<u.length;++N){let y=u[N],x=N===u.length-1,w=h==="/"?r:r.slice(h.length)||"/",T=to({path:y.relativePath,caseSensitive:y.caseSensitive,end:x},w),k=y.route;if(!T&&x&&o&&!u[u.length-1].route.index&&(T=to({path:y.relativePath,caseSensitive:y.caseSensitive,end:!1},w)),!T)return null;Object.assign(f,T.params),b.push({params:f,pathname:rl([h,T.pathname]),pathnameBase:Gy(rl([h,T.pathnameBase])),route:k}),T.pathnameBase!=="/"&&(h=rl([h,T.pathnameBase]))}return b}function to(n,r){typeof n=="string"&&(n={path:n,caseSensitive:!1,end:!0});let[o,u]=By(n.path,n.caseSensitive,n.end),f=r.match(o);if(!f)return null;let h=f[0],b=h.replace(/(.)\/+$/,"$1"),N=f.slice(1);return{params:u.reduce((x,{paramName:w,isOptional:T},k)=>{if(w==="*"){let j=N[k]||"";b=h.slice(0,h.length-j.length).replace(/(.)\/+$/,"$1")}const _=N[k];return T&&!_?x[w]=void 0:x[w]=(_||"").replace(/%2F/g,"/"),x},{}),pathname:h,pathnameBase:b,pattern:n}}function By(n,r=!1,o=!0){Xa(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=[],f="^"+n.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(b,N,y)=>(u.push({paramName:N,isOptional:y!=null}),y?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return n.endsWith("*")?(u.push({paramName:"*"}),f+=n==="*"||n==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):o?f+="\\/*$":n!==""&&n!=="/"&&(f+="(?:(?=\\/|$))"),[new RegExp(f,r?void 0:"i"),u]}function Yy(n){try{return n.split("/").map(r=>decodeURIComponent(r).replace(/\//g,"%2F")).join("/")}catch(r){return Xa(!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 il(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 $y=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function Py(n,r="/"){let{pathname:o,search:u="",hash:f=""}=typeof n=="string"?Ps(n):n,h;return o?(o=o.replace(/\/\/+/g,"/"),o.startsWith("/")?h=Cg(o.substring(1),"/"):h=Cg(o,r)):h=r,{pathname:h,search:Zy(u),hash:Wy(f)}}function Cg(n,r){let o=r.replace(/\/+$/,"").split("/");return n.split("/").forEach(f=>{f===".."?o.length>1&&o.pop():f!=="."&&o.push(f)}),o.length>1?o.join("/"):"/"}function Cf(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 Fy(n){return n.filter((r,o)=>o===0||r.route.path&&r.route.path.length>0)}function Xf(n){let r=Fy(n);return r.map((o,u)=>u===r.length-1?o.pathname:o.pathnameBase)}function Jf(n,r,o,u=!1){let f;typeof n=="string"?f=Ps(n):(f={...n},vt(!f.pathname||!f.pathname.includes("?"),Cf("?","pathname","search",f)),vt(!f.pathname||!f.pathname.includes("#"),Cf("#","pathname","hash",f)),vt(!f.search||!f.search.includes("#"),Cf("#","search","hash",f)));let h=n===""||f.pathname==="",b=h?"/":f.pathname,N;if(b==null)N=o;else{let T=r.length-1;if(!u&&b.startsWith("..")){let k=b.split("/");for(;k[0]==="..";)k.shift(),T-=1;f.pathname=k.join("/")}N=T>=0?r[T]:"/"}let y=Py(f,N),x=b&&b!=="/"&&b.endsWith("/"),w=(h||b===".")&&o.endsWith("/");return!y.pathname.endsWith("/")&&(x||w)&&(y.pathname+="/"),y}var rl=n=>n.join("/").replace(/\/\/+/g,"/"),Gy=n=>n.replace(/\/+$/,"").replace(/^\/*/,"/"),Zy=n=>!n||n==="?"?"":n.startsWith("?")?n:"?"+n,Wy=n=>!n||n==="#"?"":n.startsWith("#")?n:"#"+n,Iy=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 Qy(n){return n!=null&&typeof n.status=="number"&&typeof n.statusText=="string"&&typeof n.internal=="boolean"&&"data"in n}function Xy(n){return n.map(r=>r.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var _x=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function zx(n,r){let o=n;if(typeof o!="string"||!$y.test(o))return{absoluteURL:void 0,isExternal:!1,to:o};let u=o,f=!1;if(_x)try{let h=new URL(window.location.href),b=o.startsWith("//")?new URL(h.protocol+o):new URL(o),N=il(b.pathname,r);b.origin===h.origin&&N!=null?o=N+b.search+b.hash:f=!0}catch{Xa(!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:f,to:o}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var Ux=["POST","PUT","PATCH","DELETE"];new Set(Ux);var Jy=["GET",...Ux];new Set(Jy);var $r=U.createContext(null);$r.displayName="DataRouter";var uo=U.createContext(null);uo.displayName="DataRouterState";var Ky=U.createContext(!1),Lx=U.createContext({isTransitioning:!1});Lx.displayName="ViewTransition";var eb=U.createContext(new Map);eb.displayName="Fetchers";var tb=U.createContext(null);tb.displayName="Await";var Ua=U.createContext(null);Ua.displayName="Navigation";var gc=U.createContext(null);gc.displayName="Location";var An=U.createContext({outlet:null,matches:[],isDataRoute:!1});An.displayName="Route";var Kf=U.createContext(null);Kf.displayName="RouteError";var Hx="REACT_ROUTER_ERROR",ab="REDIRECT",nb="ROUTE_ERROR_RESPONSE";function lb(n){if(n.startsWith(`${Hx}:${ab}:{`))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 sb(n){if(n.startsWith(`${Hx}:${nb}:{`))try{let r=JSON.parse(n.slice(40));if(typeof r=="object"&&r&&typeof r.status=="number"&&typeof r.statusText=="string")return new Iy(r.status,r.statusText,r.data)}catch{}}function rb(n,{relative:r}={}){vt(Pr(),"useHref() may be used only in the context of a <Router> component.");let{basename:o,navigator:u}=U.useContext(Ua),{hash:f,pathname:h,search:b}=xc(n,{relative:r}),N=h;return o!=="/"&&(N=h==="/"?o:rl([o,h])),u.createHref({pathname:N,search:b,hash:f})}function Pr(){return U.useContext(gc)!=null}function kn(){return vt(Pr(),"useLocation() may be used only in the context of a <Router> component."),U.useContext(gc).location}var qx="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Vx(n){U.useContext(Ua).static||U.useLayoutEffect(n)}function oo(){let{isDataRoute:n}=U.useContext(An);return n?yb():ib()}function ib(){vt(Pr(),"useNavigate() may be used only in the context of a <Router> component.");let n=U.useContext($r),{basename:r,navigator:o}=U.useContext(Ua),{matches:u}=U.useContext(An),{pathname:f}=kn(),h=JSON.stringify(Xf(u)),b=U.useRef(!1);return Vx(()=>{b.current=!0}),U.useCallback((y,x={})=>{if(Xa(b.current,qx),!b.current)return;if(typeof y=="number"){o.go(y);return}let w=Jf(y,JSON.parse(h),f,x.relative==="path");n==null&&r!=="/"&&(w.pathname=w.pathname==="/"?r:rl([r,w.pathname])),(x.replace?o.replace:o.push)(w,x.state,x)},[r,o,h,f,n])}U.createContext(null);function xc(n,{relative:r}={}){let{matches:o}=U.useContext(An),{pathname:u}=kn(),f=JSON.stringify(Xf(o));return U.useMemo(()=>Jf(n,JSON.parse(f),u,r==="path"),[n,f,u,r])}function cb(n,r){return Bx(n,r)}function Bx(n,r,o,u,f){var $;vt(Pr(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:h}=U.useContext(Ua),{matches:b}=U.useContext(An),N=b[b.length-1],y=N?N.params:{},x=N?N.pathname:"/",w=N?N.pathnameBase:"/",T=N&&N.route;{let M=T&&T.path||"";$x(x,!T||M.endsWith("*")||M.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${x}" (under <Route path="${M}">) 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="${M}"> to <Route path="${M==="/"?"*":`${M}/*`}">.`)}let k=kn(),_;if(r){let M=typeof r=="string"?Ps(r):r;vt(w==="/"||(($=M.pathname)==null?void 0:$.startsWith(w)),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${w}" but pathname "${M.pathname}" was given in the \`location\` prop.`),_=M}else _=k;let j=_.pathname||"/",C=j;if(w!=="/"){let M=w.replace(/^\//,"").split("/");C="/"+j.replace(/^\//,"").split("/").slice(M.length).join("/")}let A=Dx(n,{pathname:C});Xa(T||A!=null,`No routes matched location "${_.pathname}${_.search}${_.hash}" `),Xa(A==null||A[A.length-1].route.element!==void 0||A[A.length-1].route.Component!==void 0||A[A.length-1].route.lazy!==void 0,`Matched leaf route at location "${_.pathname}${_.search}${_.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let G=hb(A&&A.map(M=>Object.assign({},M,{params:Object.assign({},y,M.params),pathname:rl([w,h.encodeLocation?h.encodeLocation(M.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:M.pathname]),pathnameBase:M.pathnameBase==="/"?w:rl([w,h.encodeLocation?h.encodeLocation(M.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:M.pathnameBase])})),b,o,u,f);return r&&G?U.createElement(gc.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",..._},navigationType:"POP"}},G):G}function ub(){let n=vb(),r=Qy(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)",f={padding:"0.5rem",backgroundColor:u},h={padding:"2px 4px",backgroundColor:u},b=null;return console.error("Error handled by React Router default ErrorBoundary:",n),b=U.createElement(U.Fragment,null,U.createElement("p",null,"💿 Hey developer 👋"),U.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",U.createElement("code",{style:h},"ErrorBoundary")," or"," ",U.createElement("code",{style:h},"errorElement")," prop on your route.")),U.createElement(U.Fragment,null,U.createElement("h2",null,"Unexpected Application Error!"),U.createElement("h3",{style:{fontStyle:"italic"}},r),o?U.createElement("pre",{style:f},o):null,b)}var ob=U.createElement(ub,null),Yx=class extends U.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=sb(n.digest);o&&(n=o)}let r=n!==void 0?U.createElement(An.Provider,{value:this.props.routeContext},U.createElement(Kf.Provider,{value:n,children:this.props.component})):this.props.children;return this.context?U.createElement(db,{error:n},r):r}};Yx.contextType=Ky;var Mf=new WeakMap;function db({children:n,error:r}){let{basename:o}=U.useContext(Ua);if(typeof r=="object"&&r&&"digest"in r&&typeof r.digest=="string"){let u=lb(r.digest);if(u){let f=Mf.get(r);if(f)throw f;let h=zx(u.location,o);if(_x&&!Mf.get(r))if(h.isExternal||u.reloadDocument)window.location.href=h.absoluteURL||h.to;else{const b=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(h.to,{replace:u.replace}));throw Mf.set(r,b),b}return U.createElement("meta",{httpEquiv:"refresh",content:`0;url=${h.absoluteURL||h.to}`})}}return n}function fb({routeContext:n,match:r,children:o}){let u=U.useContext($r);return u&&u.static&&u.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(u.staticContext._deepestRenderedBoundaryId=r.route.id),U.createElement(An.Provider,{value:n},o)}function hb(n,r=[],o=null,u=null,f=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 h=n,b=o==null?void 0:o.errors;if(b!=null){let w=h.findIndex(T=>T.route.id&&(b==null?void 0:b[T.route.id])!==void 0);vt(w>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(b).join(",")}`),h=h.slice(0,Math.min(h.length,w+1))}let N=!1,y=-1;if(o)for(let w=0;w<h.length;w++){let T=h[w];if((T.route.HydrateFallback||T.route.hydrateFallbackElement)&&(y=w),T.route.id){let{loaderData:k,errors:_}=o,j=T.route.loader&&!k.hasOwnProperty(T.route.id)&&(!_||_[T.route.id]===void 0);if(T.route.lazy||j){N=!0,y>=0?h=h.slice(0,y+1):h=[h[0]];break}}}let x=o&&u?(w,T)=>{var k,_;u(w,{location:o.location,params:((_=(k=o.matches)==null?void 0:k[0])==null?void 0:_.params)??{},unstable_pattern:Xy(o.matches),errorInfo:T})}:void 0;return h.reduceRight((w,T,k)=>{let _,j=!1,C=null,A=null;o&&(_=b&&T.route.id?b[T.route.id]:void 0,C=T.route.errorElement||ob,N&&(y<0&&k===0?($x("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),j=!0,A=null):y===k&&(j=!0,A=T.route.hydrateFallbackElement||null)));let G=r.concat(h.slice(0,k+1)),$=()=>{let M;return _?M=C:j?M=A:T.route.Component?M=U.createElement(T.route.Component,null):T.route.element?M=T.route.element:M=w,U.createElement(fb,{match:T,routeContext:{outlet:w,matches:G,isDataRoute:o!=null},children:M})};return o&&(T.route.ErrorBoundary||T.route.errorElement||k===0)?U.createElement(Yx,{location:o.location,revalidation:o.revalidation,component:C,error:_,children:$(),routeContext:{outlet:null,matches:G,isDataRoute:!0},onError:x}):$()},null)}function eh(n){return`${n} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function mb(n){let r=U.useContext($r);return vt(r,eh(n)),r}function gb(n){let r=U.useContext(uo);return vt(r,eh(n)),r}function xb(n){let r=U.useContext(An);return vt(r,eh(n)),r}function th(n){let r=xb(n),o=r.matches[r.matches.length-1];return vt(o.route.id,`${n} can only be used on routes that contain a unique "id"`),o.route.id}function pb(){return th("useRouteId")}function vb(){var u;let n=U.useContext(Kf),r=gb("useRouteError"),o=th("useRouteError");return n!==void 0?n:(u=r.errors)==null?void 0:u[o]}function yb(){let{router:n}=mb("useNavigate"),r=th("useNavigate"),o=U.useRef(!1);return Vx(()=>{o.current=!0}),U.useCallback(async(f,h={})=>{Xa(o.current,qx),o.current&&(typeof f=="number"?await n.navigate(f):await n.navigate(f,{fromRouteId:r,...h}))},[n,r])}var Mg={};function $x(n,r,o){!r&&!Mg[n]&&(Mg[n]=!0,Xa(!1,o))}U.memo(bb);function bb({routes:n,future:r,state:o,onError:u}){return Bx(n,void 0,o,u,r)}function Nb({to:n,replace:r,state:o,relative:u}){vt(Pr(),"<Navigate> may be used only in the context of a <Router> component.");let{static:f}=U.useContext(Ua);Xa(!f,"<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:h}=U.useContext(An),{pathname:b}=kn(),N=oo(),y=Jf(n,Xf(h),b,u==="path"),x=JSON.stringify(y);return U.useEffect(()=>{N(JSON.parse(x),{replace:r,state:o,relative:u})},[N,x,u,r,o]),null}function sl(n){vt(!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 jb({basename:n="/",children:r=null,location:o,navigationType:u="POP",navigator:f,static:h=!1,unstable_useTransitions:b}){vt(!Pr(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let N=n.replace(/^\/*/,"/"),y=U.useMemo(()=>({basename:N,navigator:f,static:h,unstable_useTransitions:b,future:{}}),[N,f,h,b]);typeof o=="string"&&(o=Ps(o));let{pathname:x="/",search:w="",hash:T="",state:k=null,key:_="default"}=o,j=U.useMemo(()=>{let C=il(x,N);return C==null?null:{location:{pathname:C,search:w,hash:T,state:k,key:_},navigationType:u}},[N,x,w,T,k,_,u]);return Xa(j!=null,`<Router basename="${N}"> is not able to match the URL "${x}${w}${T}" because it does not start with the basename, so the <Router> won't render anything.`),j==null?null:U.createElement(Ua.Provider,{value:y},U.createElement(gc.Provider,{children:r,value:j}))}function wb({children:n,location:r}){return cb(qf(n),r)}function qf(n,r=[]){let o=[];return U.Children.forEach(n,(u,f)=>{if(!U.isValidElement(u))return;let h=[...r,f];if(u.type===U.Fragment){o.push.apply(o,qf(u.props.children,h));return}vt(u.type===sl,`[${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>`),vt(!u.props.index||!u.props.children,"An index route cannot have child routes.");let b={id:u.props.id||h.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=qf(u.props.children,h)),o.push(b)}),o}var Ju="get",Ku="application/x-www-form-urlencoded";function fo(n){return typeof HTMLElement<"u"&&n instanceof HTMLElement}function Sb(n){return fo(n)&&n.tagName.toLowerCase()==="button"}function Eb(n){return fo(n)&&n.tagName.toLowerCase()==="form"}function Tb(n){return fo(n)&&n.tagName.toLowerCase()==="input"}function Cb(n){return!!(n.metaKey||n.altKey||n.ctrlKey||n.shiftKey)}function Mb(n,r){return n.button===0&&(!r||r==="_self")&&!Cb(n)}var Pu=null;function Ob(){if(Pu===null)try{new FormData(document.createElement("form"),0),Pu=!1}catch{Pu=!0}return Pu}var Rb=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Of(n){return n!=null&&!Rb.has(n)?(Xa(!1,`"${n}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Ku}"`),null):n}function Db(n,r){let o,u,f,h,b;if(Eb(n)){let N=n.getAttribute("action");u=N?il(N,r):null,o=n.getAttribute("method")||Ju,f=Of(n.getAttribute("enctype"))||Ku,h=new FormData(n)}else if(Sb(n)||Tb(n)&&(n.type==="submit"||n.type==="image")){let N=n.form;if(N==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let y=n.getAttribute("formaction")||N.getAttribute("action");if(u=y?il(y,r):null,o=n.getAttribute("formmethod")||N.getAttribute("method")||Ju,f=Of(n.getAttribute("formenctype"))||Of(N.getAttribute("enctype"))||Ku,h=new FormData(N,n),!Ob()){let{name:x,type:w,value:T}=n;if(w==="image"){let k=x?`${x}.`:"";h.append(`${k}x`,"0"),h.append(`${k}y`,"0")}else x&&h.append(x,T)}}else{if(fo(n))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');o=Ju,u=null,f=Ku,b=n}return h&&f==="text/plain"&&(b=h,h=void 0),{action:u,method:o.toLowerCase(),encType:f,formData:h,body:b}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function ah(n,r){if(n===!1||n===null||typeof n>"u")throw new Error(r)}function Ab(n,r,o,u){let f=typeof n=="string"?new URL(n,typeof window>"u"?"server://singlefetch/":window.location.origin):n;return o?f.pathname.endsWith("/")?f.pathname=`${f.pathname}_.${u}`:f.pathname=`${f.pathname}.${u}`:f.pathname==="/"?f.pathname=`_root.${u}`:r&&il(f.pathname,r)==="/"?f.pathname=`${r.replace(/\/$/,"")}/_root.${u}`:f.pathname=`${f.pathname.replace(/\/$/,"")}.${u}`,f}async function kb(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 _b(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 f=>{let h=r.routes[f.route.id];if(h){let b=await kb(h,o);return b.links?b.links():[]}return[]}));return qb(u.flat(1).filter(_b).filter(f=>f.rel==="stylesheet"||f.rel==="preload").map(f=>f.rel==="stylesheet"?{...f,rel:"prefetch",as:"style"}:{...f,rel:"prefetch"}))}function Og(n,r,o,u,f,h){let b=(y,x)=>o[x]?y.route.id!==o[x].route.id:!0,N=(y,x)=>{var w;return o[x].pathname!==y.pathname||((w=o[x].route.path)==null?void 0:w.endsWith("*"))&&o[x].params["*"]!==y.params["*"]};return h==="assets"?r.filter((y,x)=>b(y,x)||N(y,x)):h==="data"?r.filter((y,x)=>{var T;let w=u.routes[y.route.id];if(!w||!w.hasLoader)return!1;if(b(y,x)||N(y,x))return!0;if(y.route.shouldRevalidate){let k=y.route.shouldRevalidate({currentUrl:new URL(f.pathname+f.search+f.hash,window.origin),currentParams:((T=o[0])==null?void 0:T.params)||{},nextUrl:new URL(n,window.origin),nextParams:y.params,defaultShouldRevalidate:!0});if(typeof k=="boolean")return k}return!0}):[]}function Ub(n,r,{includeHydrateFallback:o}={}){return Lb(n.map(u=>{let f=r.routes[u.route.id];if(!f)return[];let h=[f.module];return f.clientActionModule&&(h=h.concat(f.clientActionModule)),f.clientLoaderModule&&(h=h.concat(f.clientLoaderModule)),o&&f.hydrateFallbackModule&&(h=h.concat(f.hydrateFallbackModule)),f.imports&&(h=h.concat(f.imports)),h}).flat(1))}function Lb(n){return[...new Set(n)]}function Hb(n){let r={},o=Object.keys(n).sort();for(let u of o)r[u]=n[u];return r}function qb(n,r){let o=new Set;return new Set(r),n.reduce((u,f)=>{let h=JSON.stringify(Hb(f));return o.has(h)||(o.add(h),u.push({key:h,link:f})),u},[])}function Px(){let n=U.useContext($r);return ah(n,"You must render this element inside a <DataRouterContext.Provider> element"),n}function Vb(){let n=U.useContext(uo);return ah(n,"You must render this element inside a <DataRouterStateContext.Provider> element"),n}var nh=U.createContext(void 0);nh.displayName="FrameworkContext";function Fx(){let n=U.useContext(nh);return ah(n,"You must render this element inside a <HydratedRouter> element"),n}function Bb(n,r){let o=U.useContext(nh),[u,f]=U.useState(!1),[h,b]=U.useState(!1),{onFocus:N,onBlur:y,onMouseEnter:x,onMouseLeave:w,onTouchStart:T}=r,k=U.useRef(null);U.useEffect(()=>{if(n==="render"&&b(!0),n==="viewport"){let C=G=>{G.forEach($=>{b($.isIntersecting)})},A=new IntersectionObserver(C,{threshold:.5});return k.current&&A.observe(k.current),()=>{A.disconnect()}}},[n]),U.useEffect(()=>{if(u){let C=setTimeout(()=>{b(!0)},100);return()=>{clearTimeout(C)}}},[u]);let _=()=>{f(!0)},j=()=>{f(!1),b(!1)};return o?n!=="intent"?[h,k,{}]:[h,k,{onFocus:Xi(N,_),onBlur:Xi(y,j),onMouseEnter:Xi(x,_),onMouseLeave:Xi(w,j),onTouchStart:Xi(T,_)}]:[!1,k,{}]}function Xi(n,r){return o=>{n&&n(o),o.defaultPrevented||r(o)}}function Yb({page:n,...r}){let{router:o}=Px(),u=U.useMemo(()=>Dx(o.routes,n,o.basename),[o.routes,n,o.basename]);return u?U.createElement(Pb,{page:n,matches:u,...r}):null}function $b(n){let{manifest:r,routeModules:o}=Fx(),[u,f]=U.useState([]);return U.useEffect(()=>{let h=!1;return zb(n,r,o).then(b=>{h||f(b)}),()=>{h=!0}},[n,r,o]),u}function Pb({page:n,matches:r,...o}){let u=kn(),{future:f,manifest:h,routeModules:b}=Fx(),{basename:N}=Px(),{loaderData:y,matches:x}=Vb(),w=U.useMemo(()=>Og(n,r,x,h,u,"data"),[n,r,x,h,u]),T=U.useMemo(()=>Og(n,r,x,h,u,"assets"),[n,r,x,h,u]),k=U.useMemo(()=>{if(n===u.pathname+u.search+u.hash)return[];let C=new Set,A=!1;if(r.forEach($=>{var V;let M=h.routes[$.route.id];!M||!M.hasLoader||(!w.some(ee=>ee.route.id===$.route.id)&&$.route.id in y&&((V=b[$.route.id])!=null&&V.shouldRevalidate)||M.hasClientLoader?A=!0:C.add($.route.id))}),C.size===0)return[];let G=Ab(n,N,f.unstable_trailingSlashAwareDataRequests,"data");return A&&C.size>0&&G.searchParams.set("_routes",r.filter($=>C.has($.route.id)).map($=>$.route.id).join(",")),[G.pathname+G.search]},[N,f.unstable_trailingSlashAwareDataRequests,y,u,h,w,r,n,b]),_=U.useMemo(()=>Ub(T,h),[T,h]),j=$b(T);return U.createElement(U.Fragment,null,k.map(C=>U.createElement("link",{key:C,rel:"prefetch",as:"fetch",href:C,...o})),_.map(C=>U.createElement("link",{key:C,rel:"modulepreload",href:C,...o})),j.map(({key:C,link:A})=>U.createElement("link",{key:C,nonce:o.nonce,...A,crossOrigin:A.crossOrigin??o.crossOrigin})))}function Fb(...n){return r=>{n.forEach(o=>{typeof o=="function"?o(r):o!=null&&(o.current=r)})}}var Gb=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{Gb&&(window.__reactRouterVersion="7.13.0")}catch{}function Zb({basename:n,children:r,unstable_useTransitions:o,window:u}){let f=U.useRef();f.current==null&&(f.current=Ty({window:u,v5Compat:!0}));let h=f.current,[b,N]=U.useState({action:h.action,location:h.location}),y=U.useCallback(x=>{o===!1?N(x):U.startTransition(()=>N(x))},[o]);return U.useLayoutEffect(()=>h.listen(y),[h,y]),U.createElement(jb,{basename:n,children:r,location:b.location,navigationType:b.action,navigator:h,unstable_useTransitions:o})}var Gx=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Zx=U.forwardRef(function({onClick:r,discover:o="render",prefetch:u="none",relative:f,reloadDocument:h,replace:b,state:N,target:y,to:x,preventScrollReset:w,viewTransition:T,unstable_defaultShouldRevalidate:k,..._},j){let{basename:C,unstable_useTransitions:A}=U.useContext(Ua),G=typeof x=="string"&&Gx.test(x),$=zx(x,C);x=$.to;let M=rb(x,{relative:f}),[V,ee,Y]=Bb(u,_),W=Qb(x,{replace:b,state:N,target:y,preventScrollReset:w,relative:f,viewTransition:T,unstable_defaultShouldRevalidate:k,unstable_useTransitions:A});function R(O){r&&r(O),O.defaultPrevented||W(O)}let te=U.createElement("a",{..._,...Y,href:$.absoluteURL||M,onClick:$.isExternal||h?r:R,ref:Fb(j,ee),target:y,"data-discover":!G&&o==="render"?"true":void 0});return V&&!G?U.createElement(U.Fragment,null,te,U.createElement(Yb,{page:M})):te});Zx.displayName="Link";var Wx=U.forwardRef(function({"aria-current":r="page",caseSensitive:o=!1,className:u="",end:f=!1,style:h,to:b,viewTransition:N,children:y,...x},w){let T=xc(b,{relative:x.relative}),k=kn(),_=U.useContext(uo),{navigator:j,basename:C}=U.useContext(Ua),A=_!=null&&t1(T)&&N===!0,G=j.encodeLocation?j.encodeLocation(T).pathname:T.pathname,$=k.pathname,M=_&&_.navigation&&_.navigation.location?_.navigation.location.pathname:null;o||($=$.toLowerCase(),M=M?M.toLowerCase():null,G=G.toLowerCase()),M&&C&&(M=il(M,C)||M);const V=G!=="/"&&G.endsWith("/")?G.length-1:G.length;let ee=$===G||!f&&$.startsWith(G)&&$.charAt(V)==="/",Y=M!=null&&(M===G||!f&&M.startsWith(G)&&M.charAt(G.length)==="/"),W={isActive:ee,isPending:Y,isTransitioning:A},R=ee?r:void 0,te;typeof u=="function"?te=u(W):te=[u,ee?"active":null,Y?"pending":null,A?"transitioning":null].filter(Boolean).join(" ");let O=typeof h=="function"?h(W):h;return U.createElement(Zx,{...x,"aria-current":R,className:te,ref:w,style:O,to:b,viewTransition:N},typeof y=="function"?y(W):y)});Wx.displayName="NavLink";var Wb=U.forwardRef(({discover:n="render",fetcherKey:r,navigate:o,reloadDocument:u,replace:f,state:h,method:b=Ju,action:N,onSubmit:y,relative:x,preventScrollReset:w,viewTransition:T,unstable_defaultShouldRevalidate:k,..._},j)=>{let{unstable_useTransitions:C}=U.useContext(Ua),A=Kb(),G=e1(N,{relative:x}),$=b.toLowerCase()==="get"?"get":"post",M=typeof N=="string"&&Gx.test(N),V=ee=>{if(y&&y(ee),ee.defaultPrevented)return;ee.preventDefault();let Y=ee.nativeEvent.submitter,W=(Y==null?void 0:Y.getAttribute("formmethod"))||b,R=()=>A(Y||ee.currentTarget,{fetcherKey:r,method:W,navigate:o,replace:f,state:h,relative:x,preventScrollReset:w,viewTransition:T,unstable_defaultShouldRevalidate:k});C&&o!==!1?U.startTransition(()=>R()):R()};return U.createElement("form",{ref:j,method:$,action:G,onSubmit:u?y:V,..._,"data-discover":!M&&n==="render"?"true":void 0})});Wb.displayName="Form";function Ib(n){return`${n} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Ix(n){let r=U.useContext($r);return vt(r,Ib(n)),r}function Qb(n,{target:r,replace:o,state:u,preventScrollReset:f,relative:h,viewTransition:b,unstable_defaultShouldRevalidate:N,unstable_useTransitions:y}={}){let x=oo(),w=kn(),T=xc(n,{relative:h});return U.useCallback(k=>{if(Mb(k,r)){k.preventDefault();let _=o!==void 0?o:fc(w)===fc(T),j=()=>x(n,{replace:_,state:u,preventScrollReset:f,relative:h,viewTransition:b,unstable_defaultShouldRevalidate:N});y?U.startTransition(()=>j()):j()}},[w,x,T,o,u,r,n,f,h,b,N,y])}var Xb=0,Jb=()=>`__${String(++Xb)}__`;function Kb(){let{router:n}=Ix("useSubmit"),{basename:r}=U.useContext(Ua),o=pb(),u=n.fetch,f=n.navigate;return U.useCallback(async(h,b={})=>{let{action:N,method:y,encType:x,formData:w,body:T}=Db(h,r);if(b.navigate===!1){let k=b.fetcherKey||Jb();await u(k,o,b.action||N,{unstable_defaultShouldRevalidate:b.unstable_defaultShouldRevalidate,preventScrollReset:b.preventScrollReset,formData:w,body:T,formMethod:b.method||y,formEncType:b.encType||x,flushSync:b.flushSync})}else await f(b.action||N,{unstable_defaultShouldRevalidate:b.unstable_defaultShouldRevalidate,preventScrollReset:b.preventScrollReset,formData:w,body:T,formMethod:b.method||y,formEncType:b.encType||x,replace:b.replace,state:b.state,fromRouteId:o,flushSync:b.flushSync,viewTransition:b.viewTransition})},[u,f,r,o])}function e1(n,{relative:r}={}){let{basename:o}=U.useContext(Ua),u=U.useContext(An);vt(u,"useFormAction must be used inside a RouteContext");let[f]=u.matches.slice(-1),h={...xc(n||".",{relative:r})},b=kn();if(n==null){h.search=b.search;let N=new URLSearchParams(h.search),y=N.getAll("index");if(y.some(w=>w==="")){N.delete("index"),y.filter(T=>T).forEach(T=>N.append("index",T));let w=N.toString();h.search=w?`?${w}`:""}}return(!n||n===".")&&f.route.index&&(h.search=h.search?h.search.replace(/^\?/,"?index&"):"?index"),o!=="/"&&(h.pathname=h.pathname==="/"?o:rl([o,h.pathname])),fc(h)}function t1(n,{relative:r}={}){let o=U.useContext(Lx);vt(o!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:u}=Ix("useViewTransitionState"),f=xc(n,{relative:r});if(!o.isTransitioning)return!1;let h=il(o.currentLocation.pathname,u)||o.currentLocation.pathname,b=il(o.nextLocation.pathname,u)||o.nextLocation.pathname;return to(f.pathname,b)!=null||to(f.pathname,h)!=null}var a1=Rx();const n1=If(a1);/**
|
|
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 Qx=(...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 l1=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 s1=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 Rg=n=>{const r=s1(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 r1={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 i1=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 c1=U.forwardRef(({color:n="currentColor",size:r=24,strokeWidth:o=2,absoluteStrokeWidth:u,className:f="",children:h,iconNode:b,...N},y)=>U.createElement("svg",{ref:y,...r1,width:r,height:r,stroke:n,strokeWidth:u?Number(o)*24/Number(r):o,className:Qx("lucide",f),...!h&&!i1(N)&&{"aria-hidden":"true"},...N},[...b.map(([x,w])=>U.createElement(x,w)),...Array.isArray(h)?h:[h]]));/**
|
|
96
|
-
* @license lucide-react v0.564.0 - ISC
|
|
97
|
-
*
|
|
98
|
-
* This source code is licensed under the ISC license.
|
|
99
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
100
|
-
*/const Re=(n,r)=>{const o=U.forwardRef(({className:u,...f},h)=>U.createElement(c1,{ref:h,iconNode:r,className:Qx(`lucide-${l1(Rg(n))}`,`lucide-${n}`,u),...f}));return o.displayName=Rg(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 u1=[["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"}]],Xx=Re("activity",u1);/**
|
|
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 o1=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],d1=Re("arrow-down",o1);/**
|
|
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 f1=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],Dg=Re("arrow-right",f1);/**
|
|
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 h1=[["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"}]],m1=Re("arrow-up-down",h1);/**
|
|
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 g1=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],x1=Re("arrow-up",g1);/**
|
|
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 p1=[["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"}]],v1=Re("bell",p1);/**
|
|
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 y1=[["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"}]],Ag=Re("briefcase",y1);/**
|
|
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 b1=[["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"}]],Jx=Re("calendar",b1);/**
|
|
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 N1=[["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"}]],lh=Re("chart-column",N1);/**
|
|
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 j1=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],w1=Re("check",j1);/**
|
|
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 S1=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],sh=Re("chevron-down",S1);/**
|
|
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 E1=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],T1=Re("chevron-left",E1);/**
|
|
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 C1=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],M1=Re("chevron-right",C1);/**
|
|
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 O1=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],R1=Re("chevron-up",O1);/**
|
|
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 D1=[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]],A1=Re("chevrons-up-down",D1);/**
|
|
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 k1=[["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"}]],Dn=Re("circle-alert",k1);/**
|
|
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 _1=[["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"}]],kg=Re("circle-arrow-down",_1);/**
|
|
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"}]],Kx=Re("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 U1=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],pc=Re("circle-check-big",U1);/**
|
|
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 L1=[["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"}]],H1=Re("circle-x",L1);/**
|
|
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 q1=[["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"}]],_g=Re("clipboard",q1);/**
|
|
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 V1=[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],ep=Re("clock",V1);/**
|
|
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 B1=[["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"}]],tp=Re("external-link",B1);/**
|
|
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 Y1=[["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"}]],$1=Re("eye-off",Y1);/**
|
|
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 P1=[["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"}]],rh=Re("eye",P1);/**
|
|
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 F1=[["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"}]],Vf=Re("file-text",F1);/**
|
|
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 G1=[["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"}]],ih=Re("git-merge",G1);/**
|
|
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 Z1=[["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"}]],ho=Re("git-pull-request",Z1);/**
|
|
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 W1=[["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"}]],I1=Re("globe",W1);/**
|
|
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 Q1=[["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"}]],X1=Re("house",Q1);/**
|
|
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 J1=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],K1=Re("info",J1);/**
|
|
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 eN=[["path",{d:"M5 3v14",key:"9nsxs2"}],["path",{d:"M12 3v8",key:"1h2ygw"}],["path",{d:"M19 3v18",key:"1sk56x"}]],tN=Re("kanban",eN);/**
|
|
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 aN=[["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"}]],zg=Re("list-restart",aN);/**
|
|
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 nN=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],ap=Re("loader-circle",nN);/**
|
|
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 lN=[["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"}]],np=Re("map",lN);/**
|
|
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 sN=[["path",{d:"M5 12h14",key:"1ays0h"}]],rN=Re("minus",sN);/**
|
|
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 iN=[["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"}]],ch=Re("panels-top-left",iN);/**
|
|
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 cN=[["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"}]],ao=Re("pause",cN);/**
|
|
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 uN=[["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"}]],mo=Re("pen",uN);/**
|
|
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 oN=[["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"}]],pn=Re("play",oN);/**
|
|
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 dN=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Kl=Re("plus",dN);/**
|
|
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 fN=[["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"}]],no=Re("refresh-cw",fN);/**
|
|
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 hN=[["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"}]],uh=Re("rotate-ccw",hN);/**
|
|
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 mN=[["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"}]],lp=Re("save",mN);/**
|
|
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 gN=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],Fr=Re("search",gN);/**
|
|
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 xN=[["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"}]],Ug=Re("settings-2",xN);/**
|
|
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 pN=[["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"}]],vN=Re("settings",pN);/**
|
|
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 yN=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],Lg=Re("square",yN);/**
|
|
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 bN=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],NN=Re("terminal",bN);/**
|
|
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 jN=[["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=Re("trash-2",jN);/**
|
|
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 wN=[["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"}]],$s=Re("triangle-alert",wN);/**
|
|
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 SN=[["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"}]],EN=Re("wifi",SN);/**
|
|
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 TN=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Gr=Re("x",TN);/**
|
|
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 CN=[["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"}]],Hg=Re("zap",CN),sp=[{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"}}],rp=[{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)??!0},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}})}];function MN(n){return rp.find(r=>r.id===n)}const oh="";let dh=!1,lo=null;function ON(n){dh=n}function qg(n){lo=n}function RN(){return dh}function fh(n){return encodeURIComponent(n.replace(/\//g,"~"))}function Rt(n){return dh&&lo?n.replace("/api/",`/api/projects/${fh(lo)}/`):n}function DN(){return dt("/api/mode")}function ip(){return dt("/api/projects")}function AN(n){const r=fh(n);return dt(`/api/projects/${r}`,{method:"DELETE"})}async function dt(n,r){const o=`${oh}${n}`,u=await fetch(o,{headers:{"Content-Type":"application/json",...r==null?void 0:r.headers},...r});if(!u.ok){const f=await u.json().catch(()=>({error:"Unknown error"}));throw new Error(f.error||`HTTP ${u.status}: ${u.statusText}`)}return u.json()}function Rf(){return dt(Rt("/api/status"))}function cp(){return dt(Rt("/api/prs"))}function kN(n,r){const o=`?lines=${encodeURIComponent(r)}`;return dt(Rt(`/api/logs/${encodeURIComponent(n)}${o}`))}function hh(){return dt(Rt("/api/config"))}async function _N(){if(RN()){const r=(await ip()).filter(u=>u.valid);return(await Promise.all(r.map(async u=>{try{const f=await dt(`/api/projects/${fh(u.name)}/config`);return{projectId:u.name,config:f}}catch(f){return console.error(`Failed to fetch config for project ${u.name}`,f),null}}))).filter(u=>u!==null)}else{const n=await hh();return[{projectId:lo||"current",config:n}]}}function so(n){return dt(Rt("/api/config"),{method:"PUT",body:JSON.stringify(n)})}function zN(){return dt(Rt("/api/doctor"))}function up(){return dt(Rt("/api/schedule-info"))}function UN(){return dt(Rt("/api/actions/review"),{method:"POST"})}function op(n){const r=MN(n);return r?dt(Rt(r.triggerEndpoint),{method:"POST"}):Promise.reject(new Error(`Unknown job ID: ${n}`))}function oc(){return dt(Rt("/api/actions/install-cron"),{method:"POST"})}function dp(){return dt(Rt("/api/actions/uninstall-cron"),{method:"POST"})}function LN(n="all"){return dt(Rt("/api/actions/cancel"),{method:"POST",body:JSON.stringify({type:n})})}const Jl=["Draft","Ready","In Progress","Review","Done"];function fp(){return dt(Rt("/api/board/status"))}function HN(n){return dt(Rt("/api/board/issues"),{method:"POST",body:JSON.stringify(n)})}function hp(n,r){return dt(Rt(`/api/board/issues/${n}/move`),{method:"PATCH",body:JSON.stringify({column:r})})}async function qN(n){const r=`${oh}${Rt(`/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 VN(){return dt(Rt("/api/actions/clear-lock"),{method:"POST"})}function BN(n,r=[],o){const u=(o==null?void 0:o.enabled)??!0,f=U.useRef(n);f.current=n,U.useEffect(()=>{if(!u)return;const h=`${oh}${Rt("/api/status/events")}`,b=new EventSource(h);return b.addEventListener("status_changed",N=>{try{const y=JSON.parse(N.data);f.current(y)}catch{}}),()=>{b.close()}},[u,...r])}function Vg(){return dt("/api/queue/status")}function YN(n){const r=`?window=${encodeURIComponent(n)}`;return dt(`/api/queue/analytics${r}`)}function $N(n){return dt("/api/queue/clear",{method:"POST",body:JSON.stringify({force:!1})})}function PN(){return dt("/api/global-notifications")}function Bg(n){return dt("/api/global-notifications",{method:"PUT",body:JSON.stringify(n)})}function FN(){return dt(Rt("/api/roadmap"))}function GN(){return dt(Rt("/api/roadmap/scan"),{method:"POST"})}function mp(n){return dt(Rt("/api/roadmap/toggle"),{method:"PUT",body:JSON.stringify({enabled:n})})}function vn(n,r=[],o){const u=(o==null?void 0:o.enabled)??!0,[f,h]=U.useState(null),[b,N]=U.useState(!0),[y,x]=U.useState(null),w=U.useRef(n);w.current=n;const T=U.useRef(()=>{(async()=>{x(null);try{const _=await w.current();h(_)}catch(_){x(_ instanceof Error?_:new Error("Unknown error"))}})()});return U.useEffect(()=>{if(!u)return;let k=!1;return N(!0),x(null),(async()=>{try{const j=await w.current();k||h(j)}catch(j){k||x(j instanceof Error?j:new Error("Unknown error"))}finally{k||N(!1)}})(),()=>{k=!0}},[...r,u]),{data:f,loading:b,error:y,refetch:T.current}}const Yg=n=>{let r;const o=new Set,u=(x,w)=>{const T=typeof x=="function"?x(r):x;if(!Object.is(T,r)){const k=r;r=w??(typeof T!="object"||T===null)?T:Object.assign({},r,T),o.forEach(_=>_(r,k))}},f=()=>r,N={setState:u,getState:f,getInitialState:()=>y,subscribe:x=>(o.add(x),()=>o.delete(x))},y=r=n(u,f,N);return N},ZN=n=>n?Yg(n):Yg,WN=n=>n;function IN(n,r=WN){const o=_e.useSyncExternalStore(n.subscribe,()=>r(n.getState()),()=>r(n.getInitialState()));return _e.useDebugValue(o),o}const $g=n=>{const r=ZN(n),o=u=>IN(r,u);return Object.assign(o,r),o},QN=n=>n?$g(n):$g,XN=typeof localStorage<"u"?localStorage.getItem("nw-selected-project"):null,Wt=QN((n,r)=>({projectName:"Night Watch",setProjectName:o=>n({projectName:o}),toasts:[],addToast:o=>{const u=Math.random().toString(36).substring(7);n(f=>({toasts:[...f.toasts,{...o,id:u}]})),setTimeout(()=>{n(f=>({toasts:f.toasts.filter(h=>h.id!==u)}))},5e3)},removeToast:o=>n(u=>({toasts:u.toasts.filter(f=>f.id!==o)})),status:null,setStatus:o=>n(u=>!u.status||new Date(o.timestamp)>new Date(u.status.timestamp)?{status:o}:u),globalModeLoading:!0,setGlobalModeLoading:o=>n({globalModeLoading:o}),isGlobalMode:!1,setGlobalMode:o=>{ON(o),n({isGlobalMode:o})},projects:[],setProjects:o=>n({projects:o}),selectedProjectId:XN,selectProject:o=>{qg(o),o?localStorage.setItem("nw-selected-project",o):localStorage.removeItem("nw-selected-project"),n(u=>{const f=u.projects.find(h=>h.name===o);return{selectedProjectId:o,...f?{projectName:f.name}:{}}})},removeProjectFromList:o=>{n(u=>{var N;const f=u.projects.filter(y=>y.name!==o),h=u.selectedProjectId===o,b=h?((N=f[0])==null?void 0:N.name)??null:u.selectedProjectId;return h&&(qg(b),b?localStorage.setItem("nw-selected-project",b):localStorage.removeItem("nw-selected-project")),{projects:f,selectedProjectId:b,...h&&f[0]?{projectName:f[0].name}:{}}})},getJobStates:()=>{const{status:o}=r(),u=o==null?void 0:o.config;return rp.map(f=>({id:f.id,label:f.label,processName:f.processName,color:f.color,enabled:u?f.getEnabled(u):!0,schedule:u?f.getSchedule(u):"",triggerEndpoint:f.triggerEndpoint}))}})),JN=()=>{const[n,r]=U.useState(!1),{projectName:o,isGlobalMode:u,projects:f,selectedProjectId:h,selectProject:b,globalModeLoading:N}=Wt(),{data:y}=vn(cp,[h],{enabled:!N}),x=(y==null?void 0:y.length)??0,w=U.useMemo(()=>[{icon:X1,label:"Dashboard",path:"/",section:"Overview"},{icon:NN,label:"Logs",path:"/logs"},{icon:tN,label:"Board",path:"/board",section:"Work"},{icon:ho,label:"Pull Requests",path:"/prs",badge:x},{icon:np,label:"Roadmap",path:"/roadmap"},{icon:Jx,label:"Automation",path:"/scheduling",section:"Automation"},{icon:vN,label:"Settings",path:"/settings",section:"Config"}],[x]);return s.jsxs("aside",{className:`
|
|
371
|
-
relative flex flex-col transition-all duration-300 ease-[cubic-bezier(0.25,0.1,0.25,1)]
|
|
372
|
-
${n?"w-20":"w-72"} h-screen flex-shrink-0 z-50
|
|
373
|
-
bg-[#030712]/80 backdrop-blur-xl border-r border-white/5
|
|
374
|
-
`,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(Ag,{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:h||"",onChange:T=>b(T.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:f.filter(T=>T.valid).map(T=>s.jsx("option",{value:T.name,children:T.name},T.name))}),s.jsx(A1,{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(Ag,{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:w.map(T=>s.jsxs(_e.Fragment,{children:[T.section&&!n&&s.jsx("li",{className:"text-[10px] font-bold text-slate-600 uppercase tracking-widest px-3.5 pt-4 pb-1",children:T.section}),s.jsx("li",{children:s.jsx(Wx,{to:T.path,className:({isActive:k})=>`
|
|
375
|
-
flex items-center px-3.5 py-3 rounded-xl transition-all duration-200 group relative
|
|
376
|
-
${k?"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"}
|
|
377
|
-
${n?"justify-center":""}
|
|
378
|
-
`,children:({isActive:k})=>s.jsxs(s.Fragment,{children:[s.jsx(T.icon,{className:`h-5 w-5 transition-colors ${k?"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:T.label}),T.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 ${k?"bg-indigo-500/20 text-indigo-300":"bg-white/5 text-slate-400 border border-white/5"}`,children:T.badge})),k&&!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:T.label})]})})})]},T.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(M1,{className:"h-5 w-5"}):s.jsx(T1,{className:"h-5 w-5"})})})]})},KN=()=>{const{projectName:n}=Wt();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(EN,{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(Fr,{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(v1,{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"})]})]})},e2=({toast:n,onDismiss:r})=>{const o={success:s.jsx(pc,{className:"h-5 w-5 text-green-400"}),error:s.jsx(Dn,{className:"h-5 w-5 text-red-400"}),info:s.jsx(K1,{className:"h-5 w-5 text-blue-400"}),warning:s.jsx($s,{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:`
|
|
379
|
-
pointer-events-auto w-full max-w-sm overflow-hidden rounded-lg
|
|
380
|
-
bg-slate-900 border border-slate-800 border-l-4 ${u[n.type]}
|
|
381
|
-
shadow-lg ring-1 ring-black ring-opacity-5 transition-all
|
|
382
|
-
animate-in slide-in-from-right-full fade-in duration-300
|
|
383
|
-
`,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(Gr,{className:"h-5 w-5"})]})})]})})})},t2=()=>{const{toasts:n,removeToast:r}=Wt();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(e2,{toast:o,onDismiss:r},o.id))})};function a2(){const{setGlobalMode:n,setGlobalModeLoading:r,setProjects:o,selectProject:u,selectedProjectId:f}=Wt();U.useEffect(()=>{r(!0),DN().then(async({globalMode:h})=>{if(n(h),!h)return;const b=await ip();o(b);const N=b.filter(y=>y.valid);f&&N.some(y=>y.name===f)?u(f):N.length>0&&u(N[0].name)}).catch(()=>{n(!1)}).finally(()=>{r(!1)})},[])}function Pg(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 Fu(n,r){return n?r?Pg(n)>=Pg(r)?n:r:n:r}function n2(){const{setStatus:n,setProjectName:r,selectedProjectId:o,globalModeLoading:u,status:f}=Wt(),h=U.useRef(null);h.current=Wt.getState().status,BN(b=>{Fu(b,h.current)===b&&n(b)},[o,u],{enabled:!u}),U.useEffect(()=>{if(u)return;Rf().then(N=>{Fu(N,h.current)===N&&n(N)}).catch(()=>{});const b=setInterval(()=>{Rf().then(N=>{Fu(N,h.current)===N&&n(N)}).catch(()=>{})},3e4);return()=>clearInterval(b)},[o,u,n]),U.useEffect(()=>{const b=()=>{Rf().then(N=>{Fu(N,h.current)===N&&n(N)}).catch(()=>{})};return window.addEventListener("focus",b),()=>window.removeEventListener("focus",b)},[o,n]),U.useEffect(()=>{f!=null&&f.projectName&&r(f.projectName)},[f==null?void 0:f.projectName,r])}const ot=({children:n,className:r="",onClick:o})=>s.jsxs("div",{className:`
|
|
384
|
-
relative bg-[#0b101b] rounded-xl border border-white/5
|
|
385
|
-
shadow-[0_4px_20px_-4px_rgba(0,0,0,0.5)]
|
|
386
|
-
transition-all duration-300
|
|
387
|
-
${o?"cursor-pointer hover:border-indigo-500/30 hover:shadow-indigo-500/5 group":""}
|
|
388
|
-
${r}
|
|
389
|
-
`,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})]}),qe=({children:n,variant:r="primary",size:o="md",loading:u=!1,className:f="",disabled:h,...b})=>{const N="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:`${N} ${y[r]} ${x[o]} ${f}`,disabled:h||u,...b,children:[u&&s.jsx(ap,{className:"mr-2 h-4 w-4 animate-spin"}),n]})},Qa=({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})},gp={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"}},l2=({defaultColumn:n,onClose:r,onCreated:o})=>{const[u,f]=U.useState(""),[h,b]=U.useState(""),[N,y]=U.useState(n),[x,w]=U.useState(!1),[T,k]=U.useState(null),{addToast:_}=Wt(),j=async C=>{if(C.preventDefault(),!!u.trim()){w(!0),k(null);try{await HN({title:u.trim(),body:h,column:N}),_({title:"Issue created",message:`"${u.trim()}" added to ${N}`,type:"success"}),o(),r()}catch(A){k(A instanceof Error?A.message:"Failed to create issue")}finally{w(!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(Gr,{className:"h-5 w-5"})})]}),s.jsxs("form",{onSubmit:j,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:C=>f(C.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:N,onChange:C=>y(C.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(C=>s.jsx("option",{value:C,children:C},C))})]}),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:h,onChange:C=>b(C.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"})]}),T&&s.jsx("p",{className:"text-sm text-red-400",children:T}),s.jsxs("div",{className:"flex justify-end space-x-3 pt-2",children:[s.jsx(qe,{variant:"ghost",type:"button",onClick:r,children:"Cancel"}),s.jsx(qe,{type:"submit",disabled:x||!u.trim(),children:x?"Creating...":"Create Issue"})]})]})]})]})},s2=({issue:n,onClose:r,onMoved:o,onClosed:u})=>{const[f,h]=U.useState(!1),[b,N]=U.useState(!1),[y,x]=U.useState(!1),{addToast:w}=Wt(),T=async j=>{if(j!==n.column){h(!0);try{await hp(n.number,j),w({title:"Issue moved",message:`#${n.number} moved to ${j}`,type:"success"}),o(),r()}catch(C){w({title:"Move failed",message:C instanceof Error?C.message:"Failed to move issue",type:"error"})}finally{h(!1)}}},k=async()=>{x(!1),N(!0);try{await qN(n.number),w({title:"Issue closed",message:`#${n.number} closed on GitHub`,type:"success"}),u(),r()}catch(j){w({title:"Close failed",message:j instanceof Error?j.message:"Failed to close issue",type:"error"})}finally{N(!1)}},_=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(Qa,{variant:gp[_].badge,children:_})]}),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(Gr,{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(j=>j!==n.column).map(j=>s.jsx("button",{onClick:()=>T(j),disabled:f,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:j},j))]}),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(tp,{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(qe,{variant:"ghost",onClick:()=>x(!1),children:"Cancel"}),s.jsx(qe,{onClick:k,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."})})]})]})},r2=({issue:n,onClick:r,onDragStart:o})=>{const[u,f]=U.useState(!1);return s.jsx("div",{className:"relative",draggable:!0,onDragStart:h=>{h.dataTransfer.setData("issueNumber",String(n.number)),h.dataTransfer.effectAllowed="move",f(!0),o(n)},onDragEnd:()=>f(!1),children:s.jsxs(ot,{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(", ")})]})})},i2=({name:n,issues:r,draggingIssue:o,onIssueClick:u,onNewIssue:f,onMoveIssue:h,onDragStart:b})=>{const N=gp[n],[y,x]=U.useState(!1),w=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&&w?"bg-indigo-500/5 ring-1 ring-indigo-500/30":""}`,onDragOver:T=>{w&&(T.preventDefault(),T.dataTransfer.dropEffect="move",x(!0))},onDragLeave:()=>x(!1),onDrop:T=>{T.preventDefault(),x(!1),o&&o.column!==n&&h(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 ${N.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:()=>f(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&&w?"border-indigo-500/40":"border-slate-800"}`,children:s.jsx("span",{className:"text-xs text-slate-700",children:y&&w?"Drop here":"No issues"})}):r.map(T=>s.jsx(r2,{issue:T,onClick:()=>u(T),onDragStart:b},T.id))})]})},c2=()=>{const[n,r]=U.useState(null),[o,u]=U.useState(null),[f,h]=U.useState(null),[b,N]=U.useState(null),y=U.useRef(!1),{addToast:x,selectedProjectId:w,globalModeLoading:T}=Wt(),{data:k,loading:_,error:j,refetch:C}=vn(fp,[w],{enabled:!T});U.useEffect(()=>{const $=setInterval(()=>{y.current||C()},3e4);return()=>clearInterval($)},[C]);const A=U.useCallback(async($,M)=>{h(null);const V=b??(k==null?void 0:k.columns);if(!V)return;const ee=V,Y={};for(const R of Jl)Y[R]=(V[R]??[]).filter(te=>te.number!==$.number);const W={...$,column:M};Y[M]=[...Y[M]??[],W],N(Y),r(R=>(R==null?void 0:R.number)===$.number?W:R),y.current=!0;try{await hp($.number,M),C(),setTimeout(()=>{N(null),y.current=!1},800)}catch(R){N(ee),r(te=>(te==null?void 0:te.number)===$.number?$:te),y.current=!1,x({title:"Move failed",message:R instanceof Error?R.message:"Failed to move issue",type:"error"})}},[x,C,b,k]);if(T||_)return s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx("div",{className:"text-slate-400",children:"Loading board..."})});if(j&&j.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(j)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:j.message}),s.jsx(qe,{onClick:()=>C(),children:"Retry"})]});if(!k)return null;const G=b??k.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(($,M)=>{var V;return $+(((V=G[M])==null?void 0:V.length)??0)},0)," issues across ",Jl.length," columns"]})]}),s.jsxs(qe,{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:()=>h(null),children:s.jsx("div",{className:"flex space-x-4 h-full pb-4",style:{minWidth:`${Jl.length*236}px`},children:Jl.map($=>s.jsx(i2,{name:$,issues:G[$]??[],draggingIssue:f,onIssueClick:r,onNewIssue:u,onMoveIssue:A,onDragStart:h},$))})}),n&&s.jsx(s2,{issue:n,onClose:()=>r(null),onMoved:()=>C(),onClosed:()=>C()}),o&&s.jsx(l2,{defaultColumn:o,onClose:()=>u(null),onCreated:()=>C()})]})},u2=[{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"}],o2=({processes:n,activePrd:r,onCancelProcess:o,onForceClear:u,onViewLog:f,cancellingProcess:h,clearingLock:b,onTriggerJob:N,triggeringJob:y})=>{const x=T=>n.find(k=>k.name===T),w=(T,k)=>T.length<=k?T:T.slice(0,k-1)+"...";return s.jsx("div",{className:"grid grid-cols-2 md:grid-cols-4 lg:grid-cols-8 gap-3",children:u2.map(T=>{const k=x(T.processName),_=(k==null?void 0:k.running)??!1,j=k==null?void 0:k.pid,C=h===T.cancelType,A=_&&T.cancelType,G=!_&&T.name==="executor"&&r,$=_?j?`PID: ${j}`:T.runningLabel:T.idleLabel,M=_&&T.name==="executor"&&r?w(r,20):null;return s.jsxs("div",{className:`flex items-center gap-2 p-2.5 rounded-lg border transition-colors ${_?"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 ${_?"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 ${_?"text-slate-200":"text-slate-400"}`,children:T.displayName}),s.jsx("div",{className:"text-xs text-slate-500 truncate",children:M?s.jsxs("span",{className:"flex items-center gap-1",children:[s.jsx(Vf,{className:"h-3 w-3 flex-shrink-0"}),M]}):$})]}),s.jsxs("div",{className:"flex-shrink-0",children:[A&&s.jsx("button",{onClick:()=>T.cancelType&&o(T.cancelType),disabled:C,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(Lg,{className:"h-3.5 w-3.5"})}),G&&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(Lg,{className:"h-3.5 w-3.5"})}),!A&&!G&&_&&s.jsx("button",{onClick:f,className:"p-1 text-slate-400 hover:text-slate-300 hover:bg-white/5 rounded transition-colors",title:"View log",children:s.jsx(Vf,{className:"h-3.5 w-3.5"})}),!_&&!G&&s.jsx("button",{onClick:()=>N(T.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 ${T.displayName}`,children:y===T.triggerId?s.jsx("div",{className:"h-3.5 w-3.5 border-2 border-current border-t-transparent rounded-full animate-spin"}):s.jsx(pn,{className:"h-3.5 w-3.5"})})]})]},T.name)})})},d2={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"},f2=()=>{var he,ve;const n=oo(),[r,o]=U.useState(null),[u,f]=U.useState(!1),[h,b]=U.useState(null),[N,y]=U.useState(!1),{setProjectName:x,addToast:w,selectedProjectId:T,globalModeLoading:k,status:_}=Wt(),{data:j}=vn(up,[T],{enabled:!k}),{data:C,loading:A}=vn(()=>fp().catch(()=>null),[T],{enabled:!k}),G=_;if(_e.useEffect(()=>{G!=null&&G.projectName&&x(G.projectName)},[G,x]),k)return s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx("div",{className:"text-slate-400",children:"Loading..."})});if(!G)return s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx("div",{className:"text-slate-400",children:"Loading..."})});const $=G.prs.length,M=G.prs.filter(ie=>ie.reviewScore!==null&&ie.reviewScore<70).length,V=((he=C==null?void 0:C.columns.Ready)==null?void 0:he.length)??0,ee=((ve=C==null?void 0:C.columns["In Progress"])==null?void 0:ve.length)??0;G.processes.find(ie=>ie.name==="executor"),G.processes.find(ie=>ie.name==="reviewer"),G.processes.find(ie=>ie.name==="qa"),G.processes.find(ie=>ie.name==="audit"),G.processes.find(ie=>ie.name==="planner"),G.processes.find(ie=>ie.name==="analytics");const Y=async ie=>{o(ie);try{const F=await LN(ie),ae=F.results.every(de=>de.success);w({title:ae?"Process Cancelled":"Cancel Failed",message:F.results.map(de=>de.message).join("; "),type:ae?"success":"error"})}catch(F){w({title:"Cancel Failed",message:F instanceof Error?F.message:"Failed to cancel process",type:"error"})}finally{o(null)}},W=async()=>{f(!0);try{await VN(),w({title:"Lock Cleared",message:"Stale executor state removed",type:"success"})}catch(ie){w({title:"Clear Failed",message:ie instanceof Error?ie.message:"Failed to clear lock",type:"error"})}finally{f(!1)}},R=async ie=>{b(ie);try{await op(ie==="planner"?"slicer":ie),w({title:"Job Triggered",message:`${ie[0].toUpperCase()+ie.slice(1)} job has been queued.`,type:"success"})}catch(F){w({title:"Trigger Failed",message:F instanceof Error?F.message:`Failed to trigger ${ie}`,type:"error"})}finally{b(null)}},te=async()=>{if(j){y(!0);try{j.paused?(await oc(),w({title:"Schedule Resumed",message:"Cron schedules are active.",type:"success"})):(await dp(),w({title:"Schedule Paused",message:"Cron schedules are deactivated.",type:"info"}))}catch(ie){w({title:"Action Failed",message:ie instanceof Error?ie.message:"Toggle failed",type:"error"})}finally{y(!1)}}},O=ie=>{if(!ie)return"Not scheduled";try{const F=new Date(ie),ae=new Date,de=F.getTime()-ae.getTime(),me=Math.floor(de/6e4);return me<0?"Running now...":me<60?`in ${me} min`:me<1440?`in ${Math.floor(me/60)} hr${me>=120?"s":""}`:`in ${Math.floor(me/1440)} day${me>=2880?"s":""}`}catch{return"Unknown"}},ne=(()=>{var ae,de,me,ze,L,se;if(j!=null&&j.paused)return null;const ie=[{agent:"Executor",nextRun:(j==null?void 0:j.executor.nextRun)??null},{agent:"Reviewer",nextRun:(j==null?void 0:j.reviewer.nextRun)??null},{agent:"QA",nextRun:((ae=j==null?void 0:j.qa)==null?void 0:ae.nextRun)??null},{agent:"Auditor",nextRun:((de=j==null?void 0:j.audit)==null?void 0:de.nextRun)??null},{agent:"Planner",nextRun:((me=j==null?void 0:j.planner)==null?void 0:me.nextRun)??null},{agent:"Analytics",nextRun:((ze=j==null?void 0:j.analytics)==null?void 0:ze.nextRun)??null},{agent:"PR Resolver",nextRun:((L=j==null?void 0:j.prResolver)==null?void 0:L.nextRun)??null},{agent:"Merger",nextRun:((se=j==null?void 0:j.merger)==null?void 0:se.nextRun)??null}];let F=null;for(const ge of ie)ge.nextRun&&(!F||new Date(ge.nextRun)<new Date(F.nextRun))&&(F=ge);return F?{agent:F.agent,time:O(F.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(ot,{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:V})]}),s.jsx("div",{className:"p-2 bg-green-500/10 rounded-lg text-green-400",children:s.jsx(pc,{className:"h-5 w-5"})})]}),s.jsx("p",{className:"text-xs text-slate-500 mt-4",children:"issues ready to start"})]}),s.jsxs(ot,{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:ee})]}),s.jsx("div",{className:"p-2 bg-blue-500/10 rounded-lg text-blue-400",children:s.jsx(Xx,{className:"h-5 w-5"})})]}),s.jsx("p",{className:"text-xs text-slate-500 mt-4",children:"issues in progress"})]}),s.jsxs(ot,{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:$})]}),s.jsx("div",{className:"p-2 bg-purple-500/10 rounded-lg text-purple-400",children:s.jsx(ep,{className:"h-5 w-5"})})]}),s.jsx("p",{className:`text-xs mt-4 ${M>0?"text-red-400 font-medium":"text-slate-500"}`,children:M>0?`${M} need work`:"All passing"})]}),s.jsxs(ot,{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:j!=null&&j.paused?"Paused":G.crontab.installed?"Active":"Inactive"})]}),s.jsx("button",{onClick:te,disabled:N||!j||!G.crontab.installed,title:j!=null&&j.paused?"Resume scheduling":"Pause scheduling",className:`p-2 rounded-lg transition-colors disabled:opacity-50 disabled:cursor-not-allowed ${j!=null&&j.paused?"bg-emerald-500/10 text-emerald-400 hover:bg-emerald-500/20":G.crontab.installed?"bg-indigo-500/10 text-indigo-400 hover:bg-indigo-500/20":"bg-slate-700/50 text-slate-500"}`,children:N?s.jsx(no,{className:"h-5 w-5 animate-spin"}):j!=null&&j.paused?s.jsx(pn,{className:"h-5 w-5 fill-current"}):G.crontab.installed?s.jsx(ao,{className:"h-5 w-5"}):s.jsx(Jx,{className:"h-5 w-5"})})]}),s.jsx("p",{className:"text-xs text-slate-500 mt-4",children:j!=null&&j.paused?"All schedules paused":G.crontab.installed?`${G.crontab.entries.length} entr${G.crontab.entries.length===1?"y":"ies"} installed`:"No crontab entries"})]})]}),s.jsxs(ot,{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(o2,{processes:G.processes,activePrd:G.activePrd,onCancelProcess:Y,onForceClear:W,onViewLog:()=>n("/logs"),cancellingProcess:r,clearingLock:u,onTriggerJob:R,triggeringJob:h})]}),ne?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:ne.agent}),s.jsx("span",{children:ne.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(Dg,{className:"ml-1 h-3 w-3"})]})]}):j!=null&&j.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(ao,{className:"h-3.5 w-3.5"}),s.jsx("span",{children:"Automation is paused"})]}),s.jsxs("button",{onClick:te,disabled:N,className:"text-sm text-emerald-400 hover:text-emerald-300 flex items-center transition-colors disabled:opacity-50",children:[N?s.jsx(no,{className:"h-3.5 w-3.5 mr-1.5 animate-spin"}):s.jsx(pn,{className:"h-3.5 w-3.5 mr-1.5 fill-current"}),"Resume"]})]}):null,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(Dg,{className:"ml-1 h-3 w-3"})]})]}),s.jsx(ot,{className:"p-4",children:A?s.jsx("div",{className:"flex items-center justify-center py-8",children:s.jsx("div",{className:"text-slate-400 text-sm",children:"Loading board..."})}):C?s.jsx("div",{className:"flex flex-wrap gap-3",children:Jl.map(ie=>{var ae;const F=((ae=C.columns[ie])==null?void 0:ae.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 ${d2[ie]}`,children:[s.jsx("span",{className:"text-xs font-medium",children:ie}),s.jsx("span",{className:"text-xs font-bold",children:F})]},ie)})}):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."]})})]})]})},h2=()=>{const[n,r]=U.useState(!0),[o,u]=U.useState(""),[f,h]=U.useState("executor"),b=U.useRef(null),{selectedProjectId:N,globalModeLoading:y}=Wt(),x=Wt($=>$.status),{data:w,loading:T,error:k,refetch:_}=vn(()=>kN(f,500),[f,N],{enabled:!y}),j=(w==null?void 0:w.lines)||[];U.useEffect(()=>{n&&b.current&&(b.current.scrollTop=b.current.scrollHeight)},[j,n]),U.useEffect(()=>{if(!n)return;const $=window.setInterval(()=>{_()},3e3);return()=>window.clearInterval($)},[n,f,_]);const C=j.filter($=>$.toLowerCase().includes(o.toLowerCase())),A=$=>{h($),u("")},G=$=>{if(!(x!=null&&x.processes))return!1;const M=x.processes.find(V=>V.name===$);return(M==null?void 0:M.running)??!1};return k?s.jsxs("div",{className:"flex flex-col items-center justify-center h-full space-y-4",children:[s.jsx(Dn,{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:k.message}),s.jsx(qe,{onClick:()=>_(),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:$=>u($.target.value)}),s.jsx(Fr,{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:sp.map(({processName:$,label:M})=>s.jsx("button",{onClick:()=>A($),className:`px-3 py-1.5 rounded text-sm font-medium transition-colors ${f===$?"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:M}),G($)&&s.jsx("div",{className:"h-2 w-2 bg-green-500 rounded-full animate-pulse"})]})},$))})]}),s.jsxs("div",{className:"flex items-center space-x-2",children:[s.jsxs(qe,{size:"sm",variant:"ghost",onClick:()=>_(),children:[s.jsx(kg,{className:"h-4 w-4 mr-2"}),"Refresh"]}),s.jsxs(qe,{size:"sm",variant:"ghost",onClick:()=>r(!n),children:[n?s.jsx(ao,{className:"h-4 w-4 mr-2"}):s.jsx(pn,{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: ",f,".log"]}),s.jsxs("span",{children:[C.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:[T?s.jsx("div",{className:"flex items-center justify-center h-full text-slate-500",children:"Loading logs..."}):C.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"}):C.map(($,M)=>{const V=$.includes("[ERROR]"),ee=$.includes("[WARN]");return s.jsxs("div",{className:`leading-6 hover:bg-slate-800/50 px-2 rounded -mx-2 ${V?"text-red-400":ee?"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:M+1}),$]},M)}),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(kg,{className:"h-4 w-4 mr-2"}),"Scroll to bottom"]})]})]})},m2=()=>{const[n,r]=U.useState(null),[o,u]=U.useState(!1),[f,h]=U.useState("all"),[b,N]=U.useState("number"),[y,x]=U.useState("desc"),{addToast:w,selectedProjectId:T,globalModeLoading:k}=Wt(),{data:_,loading:j,error:C,refetch:A}=vn(cp,[T],{enabled:!k}),G=_??[],$=O=>{switch(O){case"pass":return s.jsx(pc,{className:"h-4 w-4 text-green-500"});case"fail":return s.jsx(H1,{className:"h-4 w-4 text-red-500"});case"pending":return s.jsx(ap,{className:"h-4 w-4 text-amber-500 animate-spin"});default:return s.jsx(Dn,{className:"h-4 w-4 text-slate-500"})}},M=O=>{switch(O){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"}},V=O=>O===null?"No review decision yet":O===100?"PR has been approved":O===0?"Changes have been requested":`Review score: ${O}`,ee=U.useMemo(()=>G.filter(O=>{switch(f){case"needs-work":return O.ciStatus==="fail"||O.reviewScore===0;case"pending":return O.ciStatus==="pending"||O.ciStatus==="unknown"||O.reviewScore===null;case"passed":return O.ciStatus==="pass"&&O.reviewScore===100;case"all":default:return!0}}),[G,f]),Y=U.useMemo(()=>[...ee].sort((le,ne)=>{let he=0;switch(b){case"number":he=le.number-ne.number;break;case"title":he=le.title.localeCompare(ne.title);break;case"branch":he=le.branch.localeCompare(ne.branch);break;case"ciStatus":{const ve={fail:0,pending:1,unknown:2,pass:3};he=(ve[le.ciStatus]??2)-(ve[ne.ciStatus]??2);break}case"reviewScore":{const ve=le.reviewScore??-1,ie=ne.reviewScore??-1;he=ve-ie;break}}return y==="asc"?he:-he}),[ee,b,y]),W=O=>{b===O?x(y==="asc"?"desc":"asc"):(N(O),x("desc"))},R=O=>b!==O?s.jsx(m1,{className:"h-3 w-3 text-slate-600"}):y==="asc"?s.jsx(x1,{className:"h-3 w-3 text-indigo-400"}):s.jsx(d1,{className:"h-3 w-3 text-indigo-400"});if(j)return s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx("div",{className:"text-slate-400",children:"Loading PRs..."})});if(C)return s.jsxs("div",{className:"flex flex-col items-center justify-center h-full space-y-4",children:[s.jsx(Dn,{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:C.message}),s.jsx(qe,{onClick:()=>A(),children:"Retry"})]});const te=async()=>{u(!0);try{const O=await UN();w({title:"Reviewer Started",message:O.pid?`Started with PID ${O.pid}`:"Reviewer started",type:"success"})}catch(O){w({title:"Reviewer Failed",message:O instanceof Error?O.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:()=>h("all"),className:`px-3 py-1 rounded-full text-xs font-medium cursor-pointer border transition-colors ${f==="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:()=>h("needs-work"),className:`px-3 py-1 rounded-full text-xs font-medium cursor-pointer border transition-colors ${f==="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:()=>h("pending"),className:`px-3 py-1 rounded-full text-xs font-medium cursor-pointer border transition-colors ${f==="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:()=>h("passed"),className:`px-3 py-1 rounded-full text-xs font-medium cursor-pointer border transition-colors ${f==="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(qe,{size:"sm",onClick:te,disabled:o,children:[s.jsx(Fr,{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:()=>W("number"),children:s.jsxs("div",{className:"flex items-center space-x-1",children:[s.jsx("span",{children:"Title"}),R("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:()=>W("branch"),children:s.jsxs("div",{className:"flex items-center space-x-1",children:[s.jsx("span",{children:"Branch"}),R("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:()=>W("ciStatus"),children:s.jsxs("div",{className:"flex items-center space-x-1",children:[s.jsx("span",{children:"CI Status"}),R("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:()=>W("reviewScore"),children:s.jsxs("div",{className:"flex items-center space-x-1",children:[s.jsx("span",{children:"Review Score"}),R("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:[Y.map(O=>s.jsxs("tr",{className:"hover:bg-slate-800/50 cursor-pointer transition-colors",onClick:()=>r(n===O.number?null:O.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:["#",O.number]}),s.jsx("span",{className:"font-medium text-slate-200",children:O.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:O.branch})}),s.jsx("td",{className:"px-6 py-4",children:s.jsxs("div",{className:"flex items-center space-x-2",title:M(O.ciStatus),children:[$(O.ciStatus),s.jsx("span",{className:"text-sm capitalize text-slate-400",children:O.ciStatus})]})}),s.jsx("td",{className:"px-6 py-4",children:O.reviewScore!==null?s.jsxs("div",{className:"flex items-center space-x-2",title:V(O.reviewScore),children:[s.jsx("div",{className:"w-24 h-2 bg-slate-800 rounded-full overflow-hidden",children:s.jsx("div",{className:`h-full ${O.reviewScore>=70?"bg-green-500":"bg-red-500"}`,style:{width:`${O.reviewScore}%`}})}),s.jsx("span",{className:`text-sm font-bold ${O.reviewScore>=70?"text-green-500":"text-red-500"}`,children:O.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:O.url,target:"_blank",rel:"noopener noreferrer",className:"text-slate-500 hover:text-indigo-400",onClick:le=>le.stopPropagation(),children:s.jsx(tp,{className:"h-4 w-4"})})})]},O.number)),Y.length===0&&s.jsx("tr",{children:s.jsx("td",{colSpan:5,className:"px-6 py-12 text-center text-slate-500",children:G.length===0?"No open PRs found.":`No PRs match the "${f}" filter.`})})]})]})}),n&&s.jsx(ot,{className:"p-6 bg-slate-900 border-indigo-900/50 animate-in fade-in slide-in-from-top-4 duration-300",children:(()=>{const O=G.find(le=>le.number===n);return O?s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"font-bold text-slate-200",children:O.title}),s.jsxs("p",{className:"text-sm text-slate-400 mt-1",children:["Branch: ",s.jsx("span",{className:"font-mono",children:O.branch})]})]}),s.jsxs("div",{className:"flex items-center space-x-4",children:[s.jsxs("div",{className:"text-center",title:M(O.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:[$(O.ciStatus),s.jsx("span",{className:"text-sm capitalize text-slate-300",children:O.ciStatus})]})]}),O.reviewScore!==null&&s.jsxs("div",{className:"text-center",title:V(O.reviewScore),children:[s.jsx("div",{className:"text-xs text-slate-500",children:"Review Score"}),s.jsx("div",{className:`text-xl font-bold mt-1 ${O.reviewScore>=70?"text-green-500":"text-red-500"}`,children:O.reviewScore})]})]})]}):null})()})]})},ca=_e.forwardRef(({className:n="",label:r,checked:o,onChange:u,...f},h)=>{const b=N=>{u&&u(N.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:h,checked:o,onChange:b,...f}),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})]})});ca.displayName="Switch";const g2=()=>{const{addToast:n,selectedProjectId:r,globalModeLoading:o}=Wt(),[u,f]=U.useState(!1),[h,b]=U.useState(!1),{data:N,loading:y,error:x,refetch:w}=vn(FN,[r],{enabled:!o});U.useEffect(()=>{if(!(N!=null&&N.enabled))return;const $=setInterval(()=>{w()},1e4);return()=>clearInterval($)},[N==null?void 0:N.enabled,w]);const T=async $=>{b(!0);try{await mp($),n({title:$?"Scanner Enabled":"Scanner Disabled",message:$?"Roadmap scanner is now active.":"Roadmap scanner has been paused.",type:$?"success":"info"}),w()}catch(M){n({title:"Toggle Failed",message:M instanceof Error?M.message:"Failed to toggle scanner",type:"error"})}finally{b(!1)}},k=async()=>{f(!0);try{const $=await GN();$.created.length>0?n({title:"Scan Complete",message:`Created ${$.created.length} PRD(s): ${$.created.join(", ")}`,type:"success"}):n({title:"Scan Complete",message:"No new PRDs to create.",type:"info"}),$.errors.length>0&&n({title:"Scan Errors",message:$.errors.join("; "),type:"warning"}),w()}catch($){n({title:"Scan Failed",message:$ instanceof Error?$.message:"Failed to scan roadmap",type:"error"})}finally{f(!1)}};if(y)return s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx("div",{className:"text-slate-400",children:"Loading roadmap scanner..."})});if(x)return s.jsxs("div",{className:"flex flex-col items-center justify-center h-full space-y-4",children:[s.jsx(Dn,{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(qe,{onClick:()=>w(),children:"Retry"})]});if(!N)return null;if(N.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(ot,{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(np,{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 _=N.totalItems>0?Math.round(N.processedItems/N.totalItems*100):0,j=p2(N.status),C=v2(N.items),A=N.lastScan?y2(N.lastScan):"Never",G=N.autoScanInterval?Math.round(N.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(ca,{label:N.enabled?"Enabled":"Disabled",checked:N.enabled,onChange:T,disabled:h}),s.jsxs(qe,{onClick:k,loading:u,disabled:!N.enabled||N.status==="complete",children:[s.jsx(pn,{className:"h-4 w-4 mr-2"}),"Scan Now"]})]})]}),s.jsx(ot,{className:`p-6 border-2 ${j.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(j.icon,{className:`h-8 w-8 ${j.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 ${j.textColor}`,children:j.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:A})]}),N.enabled&&N.status!=="complete"&&s.jsxs("div",{children:["Auto-scan: ",s.jsxs("span",{className:"text-slate-300",children:["every ",G," min"]})]}),N.enabled&&N.status==="complete"&&s.jsx("div",{className:"text-emerald-400",children:"Auto-scan paused - all items sliced"})]})]})}),s.jsxs(ot,{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:[N.processedItems," / ",N.totalItems," items (",_,"%)"]})]}),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 ${_===100?"bg-gradient-to-r from-emerald-500 to-emerald-400":"bg-gradient-to-r from-indigo-600 to-indigo-400"}`,style:{width:`${_}%`}})})]}),Object.entries(C).map(([$,M])=>s.jsxs(ot,{className:"p-6",children:[s.jsx("h3",{className:"text-lg font-semibold text-slate-200 mb-4",children:$}),s.jsx("div",{className:"space-y-2",children:M.map(V=>s.jsx(x2,{item:V},V.hash))})]},$))]})};function x2({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(rN,{className:"h-4 w-4 text-slate-600 flex-shrink-0"}):o?s.jsx(pc,{className:"h-4 w-4 text-emerald-400 flex-shrink-0"}):s.jsx(Vf,{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(Qa,{variant:"neutral",children:"Skipped"}):o?s.jsx(Qa,{variant:"success",children:n.prdFile||"Processed"}):s.jsx(Qa,{variant:"warning",children:"Pending"})})]})}function p2(n){switch(n){case"complete":return{label:"Complete",icon:pc,textColor:"text-emerald-400",borderColor:"border-emerald-500/20 bg-emerald-500/5"};case"idle":return{label:"Idle",icon:ep,textColor:"text-blue-400",borderColor:"border-blue-500/20 bg-blue-500/5"};case"scanning":return{label:"Scanning",icon:pn,textColor:"text-indigo-400",borderColor:"border-indigo-500/20 bg-indigo-500/5"};case"disabled":return{label:"Disabled",icon:Dn,textColor:"text-slate-400",borderColor:"border-slate-500/20 bg-slate-500/5"};default:return{label:"No Roadmap",icon:Dn,textColor:"text-slate-500",borderColor:"border-slate-500/20"}}}function v2(n){const r={};for(const o of n){const u=o.section||"General";r[u]||(r[u]=[]),r[u].push(o)}return r}function y2(n){try{const r=new Date(n),u=new Date().getTime()-r.getTime(),f=Math.floor(u/6e4);if(f<1)return"Just now";if(f<60)return`${f} min ago`;const h=Math.floor(f/60);return h<24?`${h} hr ago`:`${Math.floor(h/24)} day(s) ago`}catch{return"Unknown"}}const rt=_e.forwardRef(({className:n="",label:r,error:o,helperText:u,options:f,value:h,onChange:b,children:N,...y},x)=>{const w=_e.useId(),T=y.id??w,k=o?`${T}-error`:void 0,_=!o&&u?`${T}-help`:void 0,j=[k,_].filter(Boolean).join(" ")||void 0,C=A=>{b&&b(A.target.value)};return s.jsxs("div",{className:"w-full",children:[r&&s.jsx("label",{htmlFor:T,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:T,"aria-describedby":j,"aria-invalid":o?!0:y["aria-invalid"],className:`
|
|
390
|
-
w-full appearance-none rounded-lg bg-slate-950 border border-slate-800
|
|
391
|
-
px-3 py-2 pr-10 text-sm text-slate-200
|
|
392
|
-
focus:outline-none focus:ring-2 focus:ring-indigo-500/50 focus:border-indigo-500
|
|
393
|
-
disabled:opacity-50 disabled:cursor-not-allowed
|
|
394
|
-
transition-all duration-200
|
|
395
|
-
${o?"border-red-500/50 focus:ring-red-500/50 focus:border-red-500":""}
|
|
396
|
-
${n}
|
|
397
|
-
`,value:h,onChange:C,...y,children:f?f.map(A=>s.jsx("option",{value:A.value,children:A.label},A.value)):N}),s.jsx("div",{className:"pointer-events-none absolute inset-y-0 right-0 flex items-center px-2 text-slate-500",children:s.jsx(sh,{className:"h-4 w-4"})})]}),o?s.jsx("p",{id:k,className:"mt-1.5 text-xs text-red-400",children:o}):u?s.jsx("p",{id:_,className:"mt-1.5 text-xs text-slate-500",children:u}):null]})});rt.displayName="Select";const Ae=_e.forwardRef(({className:n="",label:r,error:o,helperText:u,rightIcon:f,...h},b)=>{const N=_e.useId(),y=h.id??N,x=o?`${y}-error`:void 0,w=!o&&u?`${y}-help`:void 0,T=[x,w].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":T,"aria-invalid":o?!0:h["aria-invalid"],className:`
|
|
398
|
-
w-full rounded-lg bg-slate-950 border border-slate-800
|
|
399
|
-
px-3 py-2 text-sm text-slate-200
|
|
400
|
-
placeholder:text-slate-600
|
|
401
|
-
focus:outline-none focus:ring-2 focus:ring-indigo-500/50 focus:border-indigo-500
|
|
402
|
-
disabled:opacity-50 disabled:cursor-not-allowed
|
|
403
|
-
transition-all duration-200
|
|
404
|
-
${o?"border-red-500/50 focus:ring-red-500/50 focus:border-red-500":""}
|
|
405
|
-
${f?"pr-10":""}
|
|
406
|
-
${n}
|
|
407
|
-
`,...h}),f&&s.jsx("div",{className:"absolute inset-y-0 right-0 flex items-center pr-3 pointer-events-none text-slate-500",children:f})]}),o?s.jsx("p",{id:x,className:"mt-1.5 text-xs text-red-400",children:o}):u?s.jsx("p",{id:w,className:"mt-1.5 text-xs text-slate-500",children:u}):null]})});Ae.displayName="Input";const xp=({tabs:n,activeTab:r,onChange:o,className:u=""})=>{var y,x;const[f,h]=_e.useState((y=n[0])==null?void 0:y.id),b=r||f,N=w=>{o?o(w):h(w)};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(w=>s.jsx("button",{onClick:()=>N(w.id),className:`
|
|
408
|
-
whitespace-nowrap py-4 px-1 border-b-2 font-medium text-sm transition-all duration-200
|
|
409
|
-
${b===w.id?"border-indigo-500 text-indigo-400":"border-transparent text-slate-500 hover:text-slate-300 hover:border-slate-700"}
|
|
410
|
-
`,children:w.label},w.id))})}),s.jsx("div",{className:"flex-1 animate-in fade-in slide-in-from-bottom-2 duration-300",children:(x=n.find(w=>w.id===b))==null?void 0:x.content})]})};var Us={},_a={},Ji={},Ls={},Df={},Fg;function b2(){return Fg||(Fg=1,Object.defineProperty(Df,"__esModule",{value:!0})),Df}var Ki={},ec={},Gg;function Gs(){var r,o,u,f,h,pp,N;if(Gg)return ec;Gg=1,Object.defineProperty(ec,"__esModule",{value:!0}),ec.CronField=void 0;let n=(N=class{constructor(x,w={rawValue:""}){et(this,h);et(this,r,!1);et(this,o,!1);et(this,u,!1);et(this,f,[]);hg(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={...w,rawValue:w.rawValue??""},Ce(this,f,x.sort(N.sorter)),Ce(this,u,this.options.wildcard!==void 0?this.options.wildcard:we(this,h,pp).call(this)),Ce(this,r,this.options.rawValue.includes("L")||x.includes("L")),Ce(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 J(this,r)}get hasQuestionMarkChar(){return J(this,o)}get isWildcard(){return J(this,u)}get values(){return J(this,f)}static sorter(x,w){const T=typeof x=="number",k=typeof w=="number";return T&&k?x-w:!T&&!k?x.localeCompare(w):T?-1:1}static findNearestValueInList(x,w,T=!1){if(T){for(let k=x.length-1;k>=0;k--)if(x[k]<w)return x[k];return null}for(let k=0;k<x.length;k++)if(x[k]>w)return x[k];return null}findNearestValue(x,w=!1){return this.constructor.findNearestValueInList(this.values,x,w)}serialize(){return{wildcard:J(this,u),values:J(this,f)}}validate(){let x;const w=this.chars.length>0?` or chars ${this.chars.join("")}`:"",T=C=>A=>new RegExp(`^\\d{0,2}${A}$`).test(C),k=C=>(x=C,typeof C=="number"?C>=this.min&&C<=this.max:this.chars.some(T(C)));if(!J(this,f).every(k))throw new Error(`${this.constructor.name} Validation error, got value ${x} expected range ${this.min}-${this.max}${w}`);const j=J(this,f).find((C,A)=>J(this,f).indexOf(C)!==A);if(j)throw new Error(`${this.constructor.name} Validation error, duplicate values found: ${j}`)}},r=new WeakMap,o=new WeakMap,u=new WeakMap,f=new WeakMap,h=new WeakSet,pp=function(){return this.options.rawValue.length>0?["*","?"].includes(this.options.rawValue):Array.from({length:this.max-this.min+1},(x,w)=>w+this.min).every(x=>J(this,f).includes(x))},N);return ec.CronField=n,ec}var Zg;function N2(){if(Zg)return Ki;Zg=1,Object.defineProperty(Ki,"__esModule",{value:!0}),Ki.CronDayOfMonth=void 0;const n=Gs(),r=1,o=31,u=Object.freeze(["L"]);let f=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,N){super(b,N),this.validate()}get values(){return super.values}};return Ki.CronDayOfMonth=f,Ki}var tc={},Wg;function j2(){if(Wg)return tc;Wg=1,Object.defineProperty(tc,"__esModule",{value:!0}),tc.CronDayOfWeek=void 0;const n=Gs(),r=0,o=7,u=Object.freeze(["L"]);let f=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,N){super(b,N),this.validate()}get values(){return super.values}get nthDay(){return this.options.nthDayOfWeek??0}};return tc.CronDayOfWeek=f,tc}var ac={},Ig;function w2(){if(Ig)return ac;Ig=1,Object.defineProperty(ac,"__esModule",{value:!0}),ac.CronHour=void 0;const n=Gs(),r=0,o=23,u=Object.freeze([]);let f=class extends n.CronField{static get min(){return r}static get max(){return o}static get chars(){return u}constructor(b,N){super(b,N),this.validate()}get values(){return super.values}};return ac.CronHour=f,ac}var nc={},Qg;function S2(){if(Qg)return nc;Qg=1,Object.defineProperty(nc,"__esModule",{value:!0}),nc.CronMinute=void 0;const n=Gs(),r=0,o=59,u=Object.freeze([]);let f=class extends n.CronField{static get min(){return r}static get max(){return o}static get chars(){return u}constructor(b,N){super(b,N),this.validate()}get values(){return super.values}};return nc.CronMinute=f,nc}var lc={},Af={},Ta={},Xg;function E2(){if(Xg)return Ta;Xg=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 f extends n{}class h extends n{constructor(i){super(`Invalid unit ${i}`)}}class b extends n{}class N extends n{constructor(){super("Zone is an abstract class")}}const y="numeric",x="short",w="long",T={year:y,month:y,day:y},k={year:y,month:x,day:y},_={year:y,month:x,day:y,weekday:x},j={year:y,month:w,day:y},C={year:y,month:w,day:y,weekday:w},A={hour:y,minute:y},G={hour:y,minute:y,second:y},$={hour:y,minute:y,second:y,timeZoneName:x},M={hour:y,minute:y,second:y,timeZoneName:w},V={hour:y,minute:y,hourCycle:"h23"},ee={hour:y,minute:y,second:y,hourCycle:"h23"},Y={hour:y,minute:y,second:y,hourCycle:"h23",timeZoneName:x},W={hour:y,minute:y,second:y,hourCycle:"h23",timeZoneName:w},R={year:y,month:y,day:y,hour:y,minute:y},te={year:y,month:y,day:y,hour:y,minute:y,second:y},O={year:y,month:x,day:y,hour:y,minute:y},le={year:y,month:x,day:y,hour:y,minute:y,second:y},ne={year:y,month:x,day:y,weekday:x,hour:y,minute:y},he={year:y,month:w,day:y,hour:y,minute:y,timeZoneName:x},ve={year:y,month:w,day:y,hour:y,minute:y,second:y,timeZoneName:x},ie={year:y,month:w,day:y,weekday:w,hour:y,minute:y,timeZoneName:w},F={year:y,month:w,day:y,weekday:w,hour:y,minute:y,second:y,timeZoneName:w};class ae{get type(){throw new N}get name(){throw new N}get ianaName(){return this.name}get isUniversal(){throw new N}offsetName(i,m){throw new N}formatOffset(i,m){throw new N}offset(i){throw new N}equals(i){throw new N}get isValid(){throw new N}}let de=null;class me extends ae{static get instance(){return de===null&&(de=new me),de}get type(){return"system"}get name(){return new Intl.DateTimeFormat().resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(i,{format:m,locale:v}){return Hn(i,m,v)}formatOffset(i,m){return rs(this.offset(i),m)}offset(i){return-new Date(i).getTimezoneOffset()}equals(i){return i.type==="system"}get isValid(){return!0}}const ze=new Map;function L(g){let i=ze.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"}),ze.set(g,i)),i}const se={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};function ge(g,i){const m=g.format(i).replace(/\u200E/g,""),v=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(m),[,S,D,H,q,P,fe,ye]=v;return[H,S,D,q,P,fe,ye]}function pe(g,i){const m=g.formatToParts(i),v=[];for(let S=0;S<m.length;S++){const{type:D,value:H}=m[S],q=se[D];D==="era"?v[q]=H:Oe(q)||(v[q]=parseInt(H,10))}return v}const Se=new Map;class xe extends ae{static create(i){let m=Se.get(i);return m===void 0&&Se.set(i,m=new xe(i)),m}static resetCache(){Se.clear(),ze.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 Hn(i,m,v,this.name)}formatOffset(i,m){return rs(this.offset(i),m)}offset(i){if(!this.valid)return NaN;const m=new Date(i);if(isNaN(m))return NaN;const v=L(this.name);let[S,D,H,q,P,fe,ye]=v.formatToParts?pe(v,m):ge(v,m);q==="BC"&&(S=-Math.abs(S)+1);const Pe=Xt({year:S,month:D,day:H,hour:P===24?0:P,minute:fe,second:ye,millisecond:0});let De=+m;const yt=De%1e3;return De-=yt>=0?yt:1e3+yt,(Pe-De)/(60*1e3)}equals(i){return i.type==="iana"&&i.name===this.name}get isValid(){return this.valid}}let Te={};function Ze(g,i={}){const m=JSON.stringify([g,i]);let v=Te[m];return v||(v=new Intl.ListFormat(g,i),Te[m]=v),v}const We=new Map;function Dt(g,i={}){const m=JSON.stringify([g,i]);let v=We.get(m);return v===void 0&&(v=new Intl.DateTimeFormat(g,i),We.set(m,v)),v}const fa=new Map;function Ja(g,i={}){const m=JSON.stringify([g,i]);let v=fa.get(m);return v===void 0&&(v=new Intl.NumberFormat(g,i),fa.set(m,v)),v}const Ka=new Map;function ha(g,i={}){const{base:m,...v}=i,S=JSON.stringify([g,v]);let D=Ka.get(S);return D===void 0&&(D=new Intl.RelativeTimeFormat(g,i),Ka.set(S,D)),D}let ma=null;function yn(){return ma||(ma=new Intl.DateTimeFormat().resolvedOptions().locale,ma)}const Pt=new Map;function ua(g){let i=Pt.get(g);return i===void 0&&(i=new Intl.DateTimeFormat(g).resolvedOptions(),Pt.set(g,i)),i}const en=new Map;function tn(g){let i=en.get(g);if(!i){const m=new Intl.Locale(g);i="getWeekInfo"in m?m.getWeekInfo():m.weekInfo,"minimalDays"in i||(i={...ul,...i}),en.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,S;try{v=Dt(g).resolvedOptions(),S=g}catch{const P=g.substring(0,m);v=Dt(P).resolvedOptions(),S=P}const{numberingSystem:D,calendar:H}=v;return[S,D,H]}}function La(g,i,m){return(m||i)&&(g.includes("-u-")||(g+="-u"),m&&(g+=`-ca-${m}`),i&&(g+=`-nu-${i}`)),g}function bn(g){const i=[];for(let m=1;m<=12;m++){const v=Ee.utc(2009,m,1);i.push(g(v))}return i}function It(g){const i=[];for(let m=1;m<=7;m++){const v=Ee.utc(2016,11,13+m);i.push(g(v))}return i}function cl(g,i,m,v){const S=g.listingMode();return S==="error"?null:S==="en"?m(i):v(i)}function Zr(g){return g.numberingSystem&&g.numberingSystem!=="latn"?!1:g.numberingSystem==="latn"||!g.locale||g.locale.startsWith("en")||ua(g.locale).numberingSystem==="latn"}class Zs{constructor(i,m,v){this.padTo=v.padTo||0,this.floor=v.floor||!1;const{padTo:S,floor:D,...H}=v;if(!m||Object.keys(H).length>0){const q={useGrouping:!1,...v};v.padTo>0&&(q.minimumIntegerDigits=v.padTo),this.inf=Ja(i,q)}}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):ns(i,3);return at(m,this.padTo)}}}class _n{constructor(i,m,v){this.opts=v,this.originalZone=void 0;let S;if(this.opts.timeZone)this.dt=i;else if(i.zone.type==="fixed"){const H=-1*(i.offset/60),q=H>=0?`Etc/GMT+${H}`:`Etc/GMT${H}`;i.offset!==0&&xe.create(q).valid?(S=q,this.dt=i):(S="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,S=i.zone.name):(S="UTC",this.dt=i.setZone("UTC").plus({minutes:i.offset}),this.originalZone=i.zone);const D={...this.opts};D.timeZone=D.timeZone||S,this.dtf=Dt(m,D)}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 Ws{constructor(i,m,v){this.opts={style:"long",...v},!m&&Xr()&&(this.rtf=ha(i,v))}format(i,m){return this.rtf?this.rtf.format(i,m):Sn(m,i,this.opts.numeric,this.opts.style!=="long")}formatToParts(i,m){return this.rtf?this.rtf.formatToParts(i,m):[]}}const ul={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,S,D=!1){const H=i||ht.defaultLocale,q=H||(D?"en-US":yn()),P=m||ht.defaultNumberingSystem,fe=v||ht.defaultOutputCalendar,ye=Jr(S)||ht.defaultWeekSettings;return new Ie(q,P,fe,ye,H)}static resetCache(){ma=null,We.clear(),fa.clear(),Ka.clear(),Pt.clear(),en.clear()}static fromObject({locale:i,numberingSystem:m,outputCalendar:v,weekSettings:S}={}){return Ie.create(i,m,v,S)}constructor(i,m,v,S,D){const[H,q,P]=an(i);this.locale=H,this.numberingSystem=m||q||null,this.outputCalendar=v||P||null,this.weekSettings=S,this.intl=La(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=D,this.fastNumbersCached=null}get fastNumbers(){return this.fastNumbersCached==null&&(this.fastNumbersCached=Zr(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,Jr(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 cl(this,i,Cc,()=>{const v=this.intl==="ja"||this.intl.startsWith("ja-");m&=!v;const S=m?{month:i,day:"numeric"}:{month:i},D=m?"format":"standalone";if(!this.monthsCache[D][i]){const H=v?q=>this.dtFormatter(q,S).format():q=>this.extract(q,S,"month");this.monthsCache[D][i]=bn(H)}return this.monthsCache[D][i]})}weekdays(i,m=!1){return cl(this,i,nr,()=>{const v=m?{weekday:i,year:"numeric",month:"long",day:"numeric"}:{weekday:i},S=m?"format":"standalone";return this.weekdaysCache[S][i]||(this.weekdaysCache[S][i]=It(D=>this.extract(D,v,"weekday"))),this.weekdaysCache[S][i]})}meridiems(){return cl(this,void 0,()=>qn,()=>{if(!this.meridiemCache){const i={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[Ee.utc(2016,11,13,9),Ee.utc(2016,11,13,19)].map(m=>this.extract(m,i,"dayperiod"))}return this.meridiemCache})}eras(i){return cl(this,i,ni,()=>{const m={era:i};return this.eraCache[i]||(this.eraCache[i]=[Ee.utc(-40,1,1),Ee.utc(2017,1,1)].map(v=>this.extract(v,m,"era"))),this.eraCache[i]})}extract(i,m,v){const S=this.dtFormatter(i,m),D=S.formatToParts(),H=D.find(q=>q.type.toLowerCase()===v);return H?H.value:null}numberFormatter(i={}){return new Zs(this.intl,i.forceSimple||this.fastNumbers,i)}dtFormatter(i,m={}){return new _n(i,this.intl,m)}relFormatter(i={}){return new Ws(this.intl,this.isEnglish(),i)}listFormatter(i={}){return Ze(this.intl,i)}isEnglish(){return this.locale==="en"||this.locale.toLowerCase()==="en-us"||ua(this.intl).locale.startsWith("en-us")}getWeekSettings(){return this.weekSettings?this.weekSettings:jn()?tn(this.locale):ul}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 ol=null;class mt extends ae{static get utcInstance(){return ol===null&&(ol=new mt(0)),ol}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(ss(m[1],m[2]))}return null}constructor(i){super(),this.fixed=i}get type(){return"fixed"}get name(){return this.fixed===0?"UTC":`UTC${rs(this.fixed,"narrow")}`}get ianaName(){return this.fixed===0?"Etc/UTC":`Etc/GMT${rs(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(i,m){return rs(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 Vt extends ae{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 At(g,i){if(Oe(g)||g===null)return i;if(g instanceof ae)return g;if(zt(g)){const m=g.toLowerCase();return m==="default"?i:m==="local"||m==="system"?me.instance:m==="utc"||m==="gmt"?mt.utcInstance:mt.parseSpecifier(m)||xe.create(g)}else return xa(g)?mt.instance(g):typeof g=="object"&&"offset"in g&&typeof g.offset=="function"?g:new Vt(g)}const kt={arab:"[٠-٩]",arabext:"[۰-۹]",bali:"[᭐-᭙]",beng:"[০-৯]",deva:"[०-९]",fullwide:"[0-9]",gujr:"[૦-૯]",hanidec:"[〇|一|二|三|四|五|六|七|八|九]",khmr:"[០-៩]",knda:"[೦-೯]",laoo:"[໐-໙]",limb:"[᥆-᥏]",mlym:"[൦-൯]",mong:"[᠐-᠙]",mymr:"[၀-၉]",orya:"[୦-୯]",tamldec:"[௦-௯]",telu:"[౦-౯]",thai:"[๐-๙]",tibt:"[༠-༩]",latn:"\\d"},oe={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]},Ne=kt.hanidec.replace(/[\[|\]]/g,"").split("");function tt(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(kt.hanidec)!==-1)i+=Ne.indexOf(g[m]);else for(const S in oe){const[D,H]=oe[S];v>=D&&v<=H&&(i+=v-D)}}return parseInt(i,10)}else return i}const wt=new Map;function bt(){wt.clear()}function _t({numberingSystem:g},i=""){const m=g||"latn";let v=wt.get(m);v===void 0&&(v=new Map,wt.set(m,v));let S=v.get(i);return S===void 0&&(S=new RegExp(`${kt[m]}${i}`),v.set(i,S)),S}let Nn=()=>Date.now(),es="system",dl=null,vc=null,Wr=null,Is=60,fl,yc=null;class ht{static get now(){return Nn}static set now(i){Nn=i}static set defaultZone(i){es=i}static get defaultZone(){return At(es,me.instance)}static get defaultLocale(){return dl}static set defaultLocale(i){dl=i}static get defaultNumberingSystem(){return vc}static set defaultNumberingSystem(i){vc=i}static get defaultOutputCalendar(){return Wr}static set defaultOutputCalendar(i){Wr=i}static get defaultWeekSettings(){return yc}static set defaultWeekSettings(i){yc=Jr(i)}static get twoDigitCutoffYear(){return Is}static set twoDigitCutoffYear(i){Is=i%100}static get throwOnInvalid(){return fl}static set throwOnInvalid(i){fl=i}static resetCaches(){Ie.resetCache(),xe.resetCache(),Ee.resetCache(),bt()}}class ga{constructor(i,m){this.reason=i,this.explanation=m}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}}const Ir=[0,31,59,90,120,151,181,212,243,273,304,334],Qs=[0,31,60,91,121,152,182,213,244,274,305,335];function na(g,i){return new ga("unit out of range",`you specified ${i} (of type ${typeof i}) as a ${g}, which is invalid`)}function Xs(g,i,m){const v=new Date(Date.UTC(g,i-1,m));g<100&&g>=0&&v.setUTCFullYear(v.getUTCFullYear()-1900);const S=v.getUTCDay();return S===0?7:S}function Qr(g,i,m){return m+(ml(g)?Qs:Ir)[i-1]}function nn(g,i){const m=ml(g)?Qs:Ir,v=m.findIndex(D=>D<i),S=i-m[v];return{month:v+1,day:S}}function St(g,i){return(g-i+7)%7+1}function Bt(g,i=4,m=1){const{year:v,month:S,day:D}=g,H=Qr(v,S,D),q=St(Xs(v,S,D),m);let P=Math.floor((H-q+14-i)/7),fe;return P<1?(fe=v-1,P=gl(fe,i,m)):P>gl(v,i,m)?(fe=v+1,P=1):fe=v,{weekYear:fe,weekNumber:P,weekday:q,...is(g)}}function zn(g,i=4,m=1){const{weekYear:v,weekNumber:S,weekday:D}=g,H=St(Xs(v,1,i),m),q=sn(v);let P=S*7+D-H-7+i,fe;P<1?(fe=v-1,P+=sn(fe)):P>q?(fe=v+1,P-=sn(v)):fe=v;const{month:ye,day:Ue}=nn(fe,P);return{year:fe,month:ye,day:Ue,...is(g)}}function ts(g){const{year:i,month:m,day:v}=g,S=Qr(i,m,v);return{year:i,ordinal:S,...is(g)}}function bc(g){const{year:i,ordinal:m}=g,{month:v,day:S}=nn(i,m);return{year:i,month:v,day:S,...is(g)}}function Nc(g,i){if(!Oe(g.localWeekday)||!Oe(g.localWeekNumber)||!Oe(g.localWeekYear)){if(!Oe(g.weekday)||!Oe(g.weekNumber)||!Oe(g.weekYear))throw new f("Cannot mix locale-based week fields with ISO-based week fields");return Oe(g.localWeekday)||(g.weekday=g.localWeekday),Oe(g.localWeekNumber)||(g.weekNumber=g.localWeekNumber),Oe(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 jc(g,i=4,m=1){const v=ln(g.weekYear),S=Qt(g.weekNumber,1,gl(g.weekYear,i,m)),D=Qt(g.weekday,1,7);return v?S?D?!1:na("weekday",g.weekday):na("week",g.weekNumber):na("weekYear",g.weekYear)}function as(g){const i=ln(g.year),m=Qt(g.ordinal,1,sn(g.year));return i?m?!1:na("ordinal",g.ordinal):na("year",g.year)}function Js(g){const i=ln(g.year),m=Qt(g.month,1,12),v=Qt(g.day,1,er(g.year,g.month));return i?m?v?!1:na("day",g.day):na("month",g.month):na("year",g.year)}function Un(g){const{hour:i,minute:m,second:v,millisecond:S}=g,D=Qt(i,0,23)||i===24&&m===0&&v===0&&S===0,H=Qt(m,0,59),q=Qt(v,0,59),P=Qt(S,0,999);return D?H?q?P?!1:na("millisecond",S):na("second",v):na("minute",m):na("hour",i)}function Oe(g){return typeof g>"u"}function xa(g){return typeof g=="number"}function ln(g){return typeof g=="number"&&g%1===0}function zt(g){return typeof g=="string"}function wc(g){return Object.prototype.toString.call(g)==="[object Date]"}function Xr(){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 hl(g){return Array.isArray(g)?g:[g]}function Sc(g,i,m){if(g.length!==0)return g.reduce((v,S)=>{const D=[i(S),S];return v&&m(v[0],D[0])===v[0]?v:D},null)[1]}function Ec(g,i){return i.reduce((m,v)=>(m[v]=g[v],m),{})}function Ln(g,i){return Object.prototype.hasOwnProperty.call(g,i)}function Jr(g){if(g==null)return null;if(typeof g!="object")throw new b("Week settings must be an object");if(!Qt(g.firstDay,1,7)||!Qt(g.minimalDays,1,7)||!Array.isArray(g.weekend)||g.weekend.some(i=>!Qt(i,1,7)))throw new b("Invalid week settings");return{firstDay:g.firstDay,minimalDays:g.minimalDays,weekend:Array.from(g.weekend)}}function Qt(g,i,m){return ln(g)&&g>=i&&g<=m}function Ks(g,i){return g-i*Math.floor(g/i)}function at(g,i=2){const m=g<0;let v;return m?v="-"+(""+-g).padStart(i,"0"):v=(""+g).padStart(i,"0"),v}function Et(g){if(!(Oe(g)||g===null||g===""))return parseInt(g,10)}function wn(g){if(!(Oe(g)||g===null||g===""))return parseFloat(g)}function Kr(g){if(!(Oe(g)||g===null||g==="")){const i=parseFloat("0."+g)*1e3;return Math.floor(i)}}function ns(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 ml(g){return g%4===0&&(g%100!==0||g%400===0)}function sn(g){return ml(g)?366:365}function er(g,i){const m=Ks(i-1,12)+1,v=g+(i-m)/12;return m===2?ml(v)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][m-1]}function Xt(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 tr(g,i,m){return-St(Xs(g,1,i),m)+i-1}function gl(g,i=4,m=1){const v=tr(g,i,m),S=tr(g+1,i,m);return(sn(g)-v+S)/7}function ls(g){return g>99?g:g>ht.twoDigitCutoffYear?1900+g:2e3+g}function Hn(g,i,m,v=null){const S=new Date(g),D={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};v&&(D.timeZone=v);const H={timeZoneName:i,...D},q=new Intl.DateTimeFormat(m,H).formatToParts(S).find(P=>P.type.toLowerCase()==="timezonename");return q?q.value:null}function ss(g,i){let m=parseInt(g,10);Number.isNaN(m)&&(m=0);const v=parseInt(i,10)||0,S=m<0||Object.is(m,-0)?-v:v;return m*60+S}function ei(g){const i=Number(g);if(typeof g=="boolean"||g===""||!Number.isFinite(i))throw new b(`Invalid unit value ${g}`);return i}function rn(g,i){const m={};for(const v in g)if(Ln(g,v)){const S=g[v];if(S==null)continue;m[i(v)]=ei(S)}return m}function rs(g,i){const m=Math.trunc(Math.abs(g/60)),v=Math.trunc(Math.abs(g%60)),S=g>=0?"+":"-";switch(i){case"short":return`${S}${at(m,2)}:${at(v,2)}`;case"narrow":return`${S}${m}${v>0?`:${v}`:""}`;case"techie":return`${S}${at(m,2)}${at(v,2)}`;default:throw new RangeError(`Value format ${i} is out of range for property format`)}}function is(g){return Ec(g,["hour","minute","second","millisecond"])}const Tc=["January","February","March","April","May","June","July","August","September","October","November","December"],ar=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],po=["J","F","M","A","M","J","J","A","S","O","N","D"];function Cc(g){switch(g){case"narrow":return[...po];case"short":return[...ar];case"long":return[...Tc];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 cs=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],Ha=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],ti=["M","T","W","T","F","S","S"];function nr(g){switch(g){case"narrow":return[...ti];case"short":return[...Ha];case"long":return[...cs];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}const qn=["AM","PM"],xl=["Before Christ","Anno Domini"],Mc=["BC","AD"],ai=["B","A"];function ni(g){switch(g){case"narrow":return[...ai];case"short":return[...Mc];case"long":return[...xl];default:return null}}function us(g){return qn[g.hour<12?0:1]}function cn(g,i){return nr(i)[g.weekday-1]}function li(g,i){return Cc(i)[g.month-1]}function os(g,i){return ni(i)[g.year<0?0:1]}function Sn(g,i,m="always",v=!1){const S={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."]},D=["hours","minutes","seconds"].indexOf(g)===-1;if(m==="auto"&&D){const Ue=g==="days";switch(i){case 1:return Ue?"tomorrow":`next ${S[g][0]}`;case-1:return Ue?"yesterday":`last ${S[g][0]}`;case 0:return Ue?"today":`this ${S[g][0]}`}}const H=Object.is(i,-0)||i<0,q=Math.abs(i),P=q===1,fe=S[g],ye=v?P?fe[1]:fe[2]||fe[1]:P?S[g][0]:g;return H?`${q} ${ye} ago`:`in ${q} ${ye}`}function lr(g,i){let m="";for(const v of g)v.literal?m+=v.val:m+=i(v.val);return m}const sr={D:T,DD:k,DDD:j,DDDD:C,t:A,tt:G,ttt:$,tttt:M,T:V,TT:ee,TTT:Y,TTTT:W,f:R,ff:O,fff:he,ffff:ie,F:te,FF:le,FFF:ve,FFFF:F};class Yt{static create(i,m={}){return new Yt(i,m)}static parseFormat(i){let m=null,v="",S=!1;const D=[];for(let H=0;H<i.length;H++){const q=i.charAt(H);q==="'"?((v.length>0||S)&&D.push({literal:S||/^\s+$/.test(v),val:v===""?"'":v}),m=null,v="",S=!S):S||q===m?v+=q:(v.length>0&&D.push({literal:/^\s+$/.test(v),val:v}),v=q,m=q)}return v.length>0&&D.push({literal:S||/^\s+$/.test(v),val:v}),D}static macroTokenToFormatOpts(i){return sr[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 at(i,m);const S={...this.opts};return m>0&&(S.padTo=m),v&&(S.signDisplay=v),this.loc.numberFormatter(S).format(i)}formatDateTimeFromString(i,m){const v=this.loc.listingMode()==="en",S=this.loc.outputCalendar&&this.loc.outputCalendar!=="gregory",D=(De,yt)=>this.loc.extract(i,De,yt),H=De=>i.isOffsetFixed&&i.offset===0&&De.allowZ?"Z":i.isValid?i.zone.formatOffset(i.ts,De.format):"",q=()=>v?us(i):D({hour:"numeric",hourCycle:"h12"},"dayperiod"),P=(De,yt)=>v?li(i,De):D(yt?{month:De}:{month:De,day:"numeric"},"month"),fe=(De,yt)=>v?cn(i,De):D(yt?{weekday:De}:{weekday:De,month:"long",day:"numeric"},"weekday"),ye=De=>{const yt=Yt.macroTokenToFormatOpts(De);return yt?this.formatWithSystemDefault(i,yt):De},Ue=De=>v?os(i,De):D({era:De},"era"),Pe=De=>{switch(De){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 H({format:"narrow",allowZ:this.opts.allowZ});case"ZZ":return H({format:"short",allowZ:this.opts.allowZ});case"ZZZ":return H({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 q();case"d":return S?D({day:"numeric"},"day"):this.num(i.day);case"dd":return S?D({day:"2-digit"},"day"):this.num(i.day,2);case"c":return this.num(i.weekday);case"ccc":return fe("short",!0);case"cccc":return fe("long",!0);case"ccccc":return fe("narrow",!0);case"E":return this.num(i.weekday);case"EEE":return fe("short",!1);case"EEEE":return fe("long",!1);case"EEEEE":return fe("narrow",!1);case"L":return S?D({month:"numeric",day:"numeric"},"month"):this.num(i.month);case"LL":return S?D({month:"2-digit",day:"numeric"},"month"):this.num(i.month,2);case"LLL":return P("short",!0);case"LLLL":return P("long",!0);case"LLLLL":return P("narrow",!0);case"M":return S?D({month:"numeric"},"month"):this.num(i.month);case"MM":return S?D({month:"2-digit"},"month"):this.num(i.month,2);case"MMM":return P("short",!1);case"MMMM":return P("long",!1);case"MMMMM":return P("narrow",!1);case"y":return S?D({year:"numeric"},"year"):this.num(i.year);case"yy":return S?D({year:"2-digit"},"year"):this.num(i.year.toString().slice(-2),2);case"yyyy":return S?D({year:"numeric"},"year"):this.num(i.year,4);case"yyyyyy":return S?D({year:"numeric"},"year"):this.num(i.year,6);case"G":return Ue("short");case"GG":return Ue("long");case"GGGGG":return Ue("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 ye(De)}};return lr(Yt.parseFormat(m),Pe)}formatDurationFromString(i,m){const v=this.opts.signMode==="negativeLargestOnly"?-1:1,S=ye=>{switch(ye[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}},D=(ye,Ue)=>Pe=>{const De=S(Pe);if(De){const yt=Ue.isNegativeDuration&&De!==Ue.largestUnit?v:1;let Ft;return this.opts.signMode==="negativeLargestOnly"&&De!==Ue.largestUnit?Ft="never":this.opts.signMode==="all"?Ft="always":Ft="auto",this.num(ye.get(De)*yt,Pe.length,Ft)}else return Pe},H=Yt.parseFormat(m),q=H.reduce((ye,{literal:Ue,val:Pe})=>Ue?ye:ye.concat(Pe),[]),P=i.shiftTo(...q.map(S).filter(ye=>ye)),fe={isNegativeDuration:P<0,largestUnit:Object.keys(P.values)[0]};return lr(H,D(P,fe))}}const ds=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;function un(...g){const i=g.reduce((m,v)=>m+v.source,"");return RegExp(`^${i}$`)}function Vn(...g){return i=>g.reduce(([m,v,S],D)=>{const[H,q,P]=D(i,S);return[{...m,...H},q||v,P]},[{},null,1]).slice(0,2)}function Tt(g,...i){if(g==null)return[null,null];for(const[m,v]of i){const S=m.exec(g);if(S)return v(S)}return[null,null]}function En(...g){return(i,m)=>{const v={};let S;for(S=0;S<g.length;S++)v[g[S]]=Et(i[m+S]);return[v,null,m+S]}}const fs=/(?:([Zz])|([+-]\d\d)(?::?(\d\d))?)/,hs=`(?:${fs.source}?(?:\\[(${ds.source})\\])?)?`,si=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,rr=RegExp(`${si.source}${hs}`),ms=RegExp(`(?:[Tt]${rr.source})?`),gs=/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,ir=/(\d{4})-?W(\d\d)(?:-?(\d))?/,Oc=/(\d{4})-?(\d{3})/,vo=En("weekYear","weekNumber","weekDay"),yo=En("year","ordinal"),bo=/(\d{4})-(\d\d)-(\d\d)/,cr=RegExp(`${si.source} ?(?:${fs.source}|(${ds.source}))?`),No=RegExp(`(?: ${cr.source})?`);function pl(g,i,m){const v=g[i];return Oe(v)?m:Et(v)}function jo(g,i){return[{year:pl(g,i),month:pl(g,i+1,1),day:pl(g,i+2,1)},null,i+3]}function vl(g,i){return[{hours:pl(g,i,0),minutes:pl(g,i+1,0),seconds:pl(g,i+2,0),milliseconds:Kr(g[i+3])},null,i+4]}function xs(g,i){const m=!g[i]&&!g[i+1],v=ss(g[i+1],g[i+2]),S=m?null:mt.instance(v);return[{},S,i+3]}function yl(g,i){const m=g[i]?xe.create(g[i]):null;return[{},m,i+1]}const wo=RegExp(`^T?${si.source}$`),So=/^-?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 Eo(g){const[i,m,v,S,D,H,q,P,fe]=g,ye=i[0]==="-",Ue=P&&P[0]==="-",Pe=(De,yt=!1)=>De!==void 0&&(yt||De&&ye)?-De:De;return[{years:Pe(wn(m)),months:Pe(wn(v)),weeks:Pe(wn(S)),days:Pe(wn(D)),hours:Pe(wn(H)),minutes:Pe(wn(q)),seconds:Pe(wn(P),P==="-0"),milliseconds:Pe(Kr(fe),Ue)}]}const To={GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function ps(g,i,m,v,S,D,H){const q={year:i.length===2?ls(Et(i)):Et(i),month:ar.indexOf(m)+1,day:Et(v),hour:Et(S),minute:Et(D)};return H&&(q.second=Et(H)),g&&(q.weekday=g.length>3?cs.indexOf(g)+1:Ha.indexOf(g)+1),q}const Co=/^(?:(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 Mo(g){const[,i,m,v,S,D,H,q,P,fe,ye,Ue]=g,Pe=ps(i,S,v,m,D,H,q);let De;return P?De=To[P]:fe?De=0:De=ss(ye,Ue),[Pe,new mt(De)]}function Oo(g){return g.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}const Rc=/^(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$/,Ro=/^(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$/,Do=/^(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 Dc(g){const[,i,m,v,S,D,H,q]=g;return[ps(i,S,v,m,D,H,q),mt.utcInstance]}function Ao(g){const[,i,m,v,S,D,H,q]=g;return[ps(i,q,m,v,S,D,H),mt.utcInstance]}const ko=un(gs,ms),_o=un(ir,ms),zo=un(Oc,ms),Uo=un(rr),Ac=Vn(jo,vl,xs,yl),ri=Vn(vo,vl,xs,yl),vs=Vn(yo,vl,xs,yl),Lo=Vn(vl,xs,yl);function kc(g){return Tt(g,[ko,Ac],[_o,ri],[zo,vs],[Uo,Lo])}function _c(g){return Tt(Oo(g),[Co,Mo])}function zc(g){return Tt(g,[Rc,Dc],[Ro,Dc],[Do,Ao])}function Uc(g){return Tt(g,[So,Eo])}const Lc=Vn(vl);function bl(g){return Tt(g,[wo,Lc])}const Ho=un(bo,No),qo=un(cr),Vo=Vn(vl,xs,yl);function Hc(g){return Tt(g,[Ho,Ac],[qo,Vo])}const ii="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}},ys={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},pa=146097/400,on=146097/4800,qc={years:{quarters:4,months:12,weeks:pa/7,days:pa,hours:pa*24,minutes:pa*24*60,seconds:pa*24*60*60,milliseconds:pa*24*60*60*1e3},quarters:{months:3,weeks:pa/28,days:pa/4,hours:pa*24/4,minutes:pa*24*60/4,seconds:pa*24*60*60/4,milliseconds:pa*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},Tn=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],ci=Tn.slice(0).reverse();function Ca(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 $e(v)}function ui(g,i){var m;let v=(m=i.milliseconds)!=null?m:0;for(const S of ci.slice(1))i[S]&&(v+=i[S]*g[S].milliseconds);return v}function oi(g,i){const m=ui(g,i)<0?-1:1;Tn.reduceRight((v,S)=>{if(Oe(i[S]))return v;if(v){const D=i[v]*m,H=g[S][v],q=Math.floor(D/H);i[S]+=q*m,i[v]-=q*H*m}return S},null),Tn.reduce((v,S)=>{if(Oe(i[S]))return v;if(v){const D=i[v]%1;i[v]-=D,i[S]+=D*g[v][S]}return S},null)}function di(g){const i={};for(const[m,v]of Object.entries(g))v!==0&&(i[m]=v);return i}class $e{constructor(i){const m=i.conversionAccuracy==="longterm"||!1;let v=m?qc:ys;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 $e.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 $e({values:rn(i,$e.normalizeUnit),loc:Ie.fromObject(m),conversionAccuracy:m.conversionAccuracy,matrix:m.matrix})}static fromDurationLike(i){if(xa(i))return $e.fromMillis(i);if($e.isDuration(i))return i;if(typeof i=="object")return $e.fromObject(i);throw new b(`Unknown duration argument ${i} of type ${typeof i}`)}static fromISO(i,m){const[v]=Uc(i);return v?$e.fromObject(v,m):$e.invalid("unparsable",`the input "${i}" can't be parsed as ISO 8601`)}static fromISOTime(i,m){const[v]=bl(i);return v?$e.fromObject(v,m):$e.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 ga?i:new ga(i,m);if(ht.throwOnInvalid)throw new u(v);return new $e({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 h(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):ii}toHuman(i={}){if(!this.isValid)return ii;const m=i.showZeros!==!1,v=Tn.map(S=>{const D=this.values[S];return Oe(D)||D===0&&!m?null:this.loc.numberFormatter({style:"unit",unitDisplay:"long",...i,unit:S.slice(0,-1)}).format(D)}).filter(S=>S);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+=ns(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},Ee.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?ui(this.matrix,this.values):NaN}valueOf(){return this.toMillis()}plus(i){if(!this.isValid)return this;const m=$e.fromDurationLike(i),v={};for(const S of Tn)(Ln(m.values,S)||Ln(this.values,S))&&(v[S]=m.get(S)+this.get(S));return Ca(this,{values:v},!0)}minus(i){if(!this.isValid)return this;const m=$e.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]=ei(i(this.values[v],v));return Ca(this,{values:m},!0)}get(i){return this[$e.normalizeUnit(i)]}set(i){if(!this.isValid)return this;const m={...this.values,...rn(i,$e.normalizeUnit)};return Ca(this,{values:m})}reconfigure({locale:i,numberingSystem:m,conversionAccuracy:v,matrix:S}={}){const H={loc:this.loc.clone({locale:i,numberingSystem:m}),matrix:S,conversionAccuracy:v};return Ca(this,H)}as(i){return this.isValid?this.shiftTo(i).get(i):NaN}normalize(){if(!this.isValid)return this;const i=this.toObject();return oi(this.matrix,i),Ca(this,{values:i},!0)}rescale(){if(!this.isValid)return this;const i=di(this.normalize().shiftToAll().toObject());return Ca(this,{values:i},!0)}shiftTo(...i){if(!this.isValid)return this;if(i.length===0)return this;i=i.map(H=>$e.normalizeUnit(H));const m={},v={},S=this.toObject();let D;for(const H of Tn)if(i.indexOf(H)>=0){D=H;let q=0;for(const fe in v)q+=this.matrix[fe][H]*v[fe],v[fe]=0;xa(S[H])&&(q+=S[H]);const P=Math.trunc(q);m[H]=P,v[H]=(q*1e3-P*1e3)/1e3}else xa(S[H])&&(v[H]=S[H]);for(const H in v)v[H]!==0&&(m[D]+=H===D?v[H]:v[H]/this.matrix[D][H]);return oi(this.matrix,m),Ca(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 Ca(this,{values:i},!0)}removeZeros(){if(!this.isValid)return this;const i=di(this.values);return Ca(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,S){return v===void 0||v===0?S===void 0||S===0:v===S}for(const v of Tn)if(!m(this.values[v],i.values[v]))return!1;return!0}}const jl="Invalid Interval";function Bo(g,i){return!g||!g.isValid?gt.invalid("missing or invalid start"):!i||!i.isValid?gt.invalid("missing or invalid end"):i<g?gt.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 gt{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 ga?i:new ga(i,m);if(ht.throwOnInvalid)throw new o(v);return new gt({invalid:v})}static fromDateTimes(i,m){const v=ba(i),S=ba(m),D=Bo(v,S);return D??new gt({start:v,end:S})}static after(i,m){const v=$e.fromDurationLike(m),S=ba(i);return gt.fromDateTimes(S,S.plus(v))}static before(i,m){const v=$e.fromDurationLike(m),S=ba(i);return gt.fromDateTimes(S.minus(v),S)}static fromISO(i,m){const[v,S]=(i||"").split("/",2);if(v&&S){let D,H;try{D=Ee.fromISO(v,m),H=D.isValid}catch{H=!1}let q,P;try{q=Ee.fromISO(S,m),P=q.isValid}catch{P=!1}if(H&&P)return gt.fromDateTimes(D,q);if(H){const fe=$e.fromISO(S,m);if(fe.isValid)return gt.after(D,fe)}else if(P){const fe=$e.fromISO(v,m);if(fe.isValid)return gt.before(q,fe)}}return gt.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 S;return m!=null&&m.useLocaleWeeks?S=this.end.reconfigure({locale:v.locale}):S=this.end,S=S.startOf(i,m),Math.floor(S.diff(v,i).get(i))+(S.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?gt.fromDateTimes(i||this.s,m||this.e):this}splitAt(...i){if(!this.isValid)return[];const m=i.map(ba).filter(H=>this.contains(H)).sort((H,q)=>H.toMillis()-q.toMillis()),v=[];let{s:S}=this,D=0;for(;S<this.e;){const H=m[D]||this.e,q=+H>+this.e?this.e:H;v.push(gt.fromDateTimes(S,q)),S=q,D+=1}return v}splitBy(i){const m=$e.fromDurationLike(i);if(!this.isValid||!m.isValid||m.as("milliseconds")===0)return[];let{s:v}=this,S=1,D;const H=[];for(;v<this.e;){const q=this.start.plus(m.mapUnits(P=>P*S));D=+q>+this.e?this.e:q,H.push(gt.fromDateTimes(v,D)),v=D,S+=1}return H}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:gt.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 gt.fromDateTimes(m,v)}static merge(i){const[m,v]=i.sort((S,D)=>S.s-D.s).reduce(([S,D],H)=>D?D.overlaps(H)||D.abutsStart(H)?[S,D.union(H)]:[S.concat([D]),H]:[S,H],[[],null]);return v&&m.push(v),m}static xor(i){let m=null,v=0;const S=[],D=i.map(P=>[{time:P.s,type:"s"},{time:P.e,type:"e"}]),H=Array.prototype.concat(...D),q=H.sort((P,fe)=>P.time-fe.time);for(const P of q)v+=P.type==="s"?1:-1,v===1?m=P.time:(m&&+m!=+P.time&&S.push(gt.fromDateTimes(m,P.time)),m=null);return gt.merge(S)}difference(...i){return gt.xor([this].concat(i)).map(m=>this.intersection(m)).filter(m=>m&&!m.isEmpty())}toString(){return this.isValid?`[${this.s.toISO()} – ${this.e.toISO()})`:jl}[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=T,m={}){return this.isValid?Yt.create(this.s.loc.clone(m),i).formatInterval(this):jl}toISO(i){return this.isValid?`${this.s.toISO(i)}/${this.e.toISO(i)}`:jl}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:jl}toISOTime(i){return this.isValid?`${this.s.toISOTime(i)}/${this.e.toISOTime(i)}`:jl}toFormat(i,{separator:m=" – "}={}){return this.isValid?`${this.s.toFormat(i)}${m}${this.e.toFormat(i)}`:jl}toDuration(i,m){return this.isValid?this.e.diff(this.s,i,m):$e.invalid(this.invalidReason)}mapEndpoints(i){return gt.fromDateTimes(i(this.s),i(this.e))}}class bs{static hasDST(i=ht.defaultZone){const m=Ee.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 At(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:S=null,outputCalendar:D="gregory"}={}){return(S||Ie.create(m,v,D)).months(i)}static monthsFormat(i="long",{locale:m=null,numberingSystem:v=null,locObj:S=null,outputCalendar:D="gregory"}={}){return(S||Ie.create(m,v,D)).months(i,!0)}static weekdays(i="long",{locale:m=null,numberingSystem:v=null,locObj:S=null}={}){return(S||Ie.create(m,v,null)).weekdays(i)}static weekdaysFormat(i="long",{locale:m=null,numberingSystem:v=null,locObj:S=null}={}){return(S||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:Xr(),localeWeek:jn()}}}function la(g,i){const m=S=>S.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),v=m(i)-m(g);return Math.floor($e.fromMillis(v).as("days"))}function Ns(g,i,m){const v=[["years",(P,fe)=>fe.year-P.year],["quarters",(P,fe)=>fe.quarter-P.quarter+(fe.year-P.year)*4],["months",(P,fe)=>fe.month-P.month+(fe.year-P.year)*12],["weeks",(P,fe)=>{const ye=la(P,fe);return(ye-ye%7)/7}],["days",la]],S={},D=g;let H,q;for(const[P,fe]of v)m.indexOf(P)>=0&&(H=P,S[P]=fe(g,i),q=D.plus(S),q>i?(S[P]--,g=D.plus(S),g>i&&(q=g,S[P]--,g=D.plus(S))):g=q);return[g,S,q,H]}function Vc(g,i,m,v){let[S,D,H,q]=Ns(g,i,m);const P=i-S,fe=m.filter(Ue=>["hours","minutes","seconds","milliseconds"].indexOf(Ue)>=0);fe.length===0&&(H<i&&(H=S.plus({[q]:1})),H!==S&&(D[q]=(D[q]||0)+P/(H-S)));const ye=$e.fromObject(D,v);return fe.length>0?$e.fromMillis(P,v).shiftTo(...fe).plus(ye):ye}const Bc="missing Intl.DateTimeFormat.formatToParts support";function Qe(g,i=m=>m){return{regex:g,deser:([m])=>i(tt(m))}}const ur="[ ]",Yc=new RegExp(ur,"g");function wl(g){return g.replace(/\./g,"\\.?").replace(Yc,ur)}function or(g){return g.replace(/\./g,"").replace(Yc," ").toLowerCase()}function Jt(g,i){return g===null?null:{regex:RegExp(g.map(wl).join("|")),deser:([m])=>g.findIndex(v=>or(m)===or(v))+i}}function dr(g,i){return{regex:g,deser:([,m,v])=>ss(m,v),groups:i}}function js(g){return{regex:g,deser:([i])=>i}}function Bn(g){return g.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function Sl(g,i){const m=_t(i),v=_t(i,"{2}"),S=_t(i,"{3}"),D=_t(i,"{4}"),H=_t(i,"{6}"),q=_t(i,"{1,2}"),P=_t(i,"{1,3}"),fe=_t(i,"{1,6}"),ye=_t(i,"{1,9}"),Ue=_t(i,"{2,4}"),Pe=_t(i,"{4,6}"),De=Gt=>({regex:RegExp(Bn(Gt.val)),deser:([Cn])=>Cn,literal:!0}),Ft=(Gt=>{if(g.literal)return De(Gt);switch(Gt.val){case"G":return Jt(i.eras("short"),0);case"GG":return Jt(i.eras("long"),0);case"y":return Qe(fe);case"yy":return Qe(Ue,ls);case"yyyy":return Qe(D);case"yyyyy":return Qe(Pe);case"yyyyyy":return Qe(H);case"M":return Qe(q);case"MM":return Qe(v);case"MMM":return Jt(i.months("short",!0),1);case"MMMM":return Jt(i.months("long",!0),1);case"L":return Qe(q);case"LL":return Qe(v);case"LLL":return Jt(i.months("short",!1),1);case"LLLL":return Jt(i.months("long",!1),1);case"d":return Qe(q);case"dd":return Qe(v);case"o":return Qe(P);case"ooo":return Qe(S);case"HH":return Qe(v);case"H":return Qe(q);case"hh":return Qe(v);case"h":return Qe(q);case"mm":return Qe(v);case"m":return Qe(q);case"q":return Qe(q);case"qq":return Qe(v);case"s":return Qe(q);case"ss":return Qe(v);case"S":return Qe(P);case"SSS":return Qe(S);case"u":return js(ye);case"uu":return js(q);case"uuu":return Qe(m);case"a":return Jt(i.meridiems(),0);case"kkkk":return Qe(D);case"kk":return Qe(Ue,ls);case"W":return Qe(q);case"WW":return Qe(v);case"E":case"c":return Qe(m);case"EEE":return Jt(i.weekdays("short",!1),1);case"EEEE":return Jt(i.weekdays("long",!1),1);case"ccc":return Jt(i.weekdays("short",!0),1);case"cccc":return Jt(i.weekdays("long",!0),1);case"Z":case"ZZ":return dr(new RegExp(`([+-]${q.source})(?::(${v.source}))?`),2);case"ZZZ":return dr(new RegExp(`([+-]${q.source})(${v.source})?`),2);case"z":return js(/[a-z_+-/]{1,256}?/i);case" ":return js(/[^\S\n\r]/);default:return De(Gt)}})(g)||{invalidReason:Bc};return Ft.token=g,Ft}const fi={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 $c(g,i,m){const{type:v,value:S}=g;if(v==="literal"){const P=/^\s+$/.test(S);return{literal:!P,val:P?" ":S}}const D=i[v];let H=v;v==="hour"&&(i.hour12!=null?H=i.hour12?"hour12":"hour24":i.hourCycle!=null?i.hourCycle==="h11"||i.hourCycle==="h12"?H="hour12":H="hour24":H=m.hour12?"hour12":"hour24");let q=fi[H];if(typeof q=="object"&&(q=q[D]),q)return{literal:!1,val:q}}function Yn(g){return[`^${g.map(m=>m.regex).reduce((m,v)=>`${m}(${v.source})`,"")}$`,g]}function Pc(g,i,m){const v=g.match(i);if(v){const S={};let D=1;for(const H in m)if(Ln(m,H)){const q=m[H],P=q.groups?q.groups+1:1;!q.literal&&q.token&&(S[q.token.val[0]]=q.deser(v.slice(D,D+P))),D+=P}return[v,S]}else return[v,{}]}function Fc(g){const i=D=>{switch(D){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 Oe(g.z)||(m=xe.create(g.z)),Oe(g.Z)||(m||(m=new mt(g.Z)),v=g.Z),Oe(g.q)||(g.M=(g.q-1)*3+1),Oe(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),Oe(g.u)||(g.S=Kr(g.u)),[Object.keys(g).reduce((D,H)=>{const q=i(H);return q&&(D[q]=g[H]),D},{}),m,v]}let fr=null;function $o(){return fr||(fr=Ee.fromMillis(1555555555555)),fr}function Po(g,i){if(g.literal)return g;const m=Yt.macroTokenToFormatOpts(g.val),v=va(m,i);return v==null||v.includes(void 0)?g:v}function Gc(g,i){return Array.prototype.concat(...g.map(m=>Po(m,i)))}class hi{constructor(i,m){if(this.locale=i,this.format=m,this.tokens=Gc(Yt.parseFormat(m),i),this.units=this.tokens.map(v=>Sl(v,i)),this.disqualifyingUnit=this.units.find(v=>v.invalidReason),!this.disqualifyingUnit){const[v,S]=Yn(this.units);this.regex=RegExp(v,"i"),this.handlers=S}}explainFromTokens(i){if(this.isValid){const[m,v]=Pc(i,this.regex,this.handlers),[S,D,H]=v?Fc(v):[null,null,void 0];if(Ln(v,"a")&&Ln(v,"H"))throw new f("Can't include meridiem when specifying 24-hour format");return{input:i,tokens:this.tokens,regex:this.regex,rawMatches:m,matches:v,result:S,zone:D,specificOffset:H}}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 mi(g,i,m){return new hi(g,m).explainFromTokens(i)}function gi(g,i,m){const{result:v,zone:S,specificOffset:D,invalidReason:H}=mi(g,i,m);return[v,S,D,H]}function va(g,i){if(!g)return null;const v=Yt.create(i,g).dtFormatter($o()),S=v.formatToParts(),D=v.resolvedOptions();return S.map(H=>$c(H,g,D))}const El="Invalid DateTime",oa=864e13;function qa(g){return new ga("unsupported zone",`the zone "${g.name}" is not supported`)}function ws(g){return g.weekData===null&&(g.weekData=Bt(g.c)),g.weekData}function Tl(g){return g.localWeekData===null&&(g.localWeekData=Bt(g.c,g.loc.getMinDaysInFirstWeek(),g.loc.getStartOfWeek())),g.localWeekData}function Va(g,i){const m={ts:g.ts,zone:g.zone,c:g.c,o:g.o,loc:g.loc,invalid:g.invalid};return new Ee({...m,...i,old:m})}function hr(g,i,m){let v=g-i*60*1e3;const S=m.offset(v);if(i===S)return[v,i];v-=(S-i)*60*1e3;const D=m.offset(v);return S===D?[v,S]:[g-Math.min(S,D)*60*1e3,Math.max(S,D)]}function Ba(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 Ss(g,i,m){return hr(Xt(g),i,m)}function Es(g,i){const m=g.o,v=g.c.year+Math.trunc(i.years),S=g.c.month+Math.trunc(i.months)+Math.trunc(i.quarters)*3,D={...g.c,year:v,month:S,day:Math.min(g.c.day,er(v,S))+Math.trunc(i.days)+Math.trunc(i.weeks)*7},H=$e.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"),q=Xt(D);let[P,fe]=hr(q,m,g.zone);return H!==0&&(P+=H,fe=g.zone.offset(P)),{ts:P,o:fe}}function Ma(g,i,m,v,S,D){const{setZone:H,zone:q}=m;if(g&&Object.keys(g).length!==0||i){const P=i||q,fe=Ee.fromObject(g,{...m,zone:P,specificOffset:D});return H?fe:fe.setZone(q)}else return Ee.invalid(new ga("unparsable",`the input "${S}" can't be parsed as ${v}`))}function mr(g,i,m=!0){return g.isValid?Yt.create(Ie.create("en-US"),{allowZ:m,forceSimple:!0}).formatDateTimeFromString(g,i):null}function Kt(g,i,m){const v=g.c.year>9999||g.c.year<0;let S="";if(v&&g.c.year>=0&&(S+="+"),S+=at(g.c.year,v?6:4),m==="year")return S;if(i){if(S+="-",S+=at(g.c.month),m==="month")return S;S+="-"}else if(S+=at(g.c.month),m==="month")return S;return S+=at(g.c.day),S}function gr(g,i,m,v,S,D,H){let q=!m||g.c.millisecond!==0||g.c.second!==0,P="";switch(H){case"day":case"month":case"year":break;default:if(P+=at(g.c.hour),H==="hour")break;if(i){if(P+=":",P+=at(g.c.minute),H==="minute")break;q&&(P+=":",P+=at(g.c.second))}else{if(P+=at(g.c.minute),H==="minute")break;q&&(P+=at(g.c.second))}if(H==="second")break;q&&(!v||g.c.millisecond!==0)&&(P+=".",P+=at(g.c.millisecond,3))}return S&&(g.isOffsetFixed&&g.offset===0&&!D?P+="Z":g.o<0?(P+="-",P+=at(Math.trunc(-g.o/60)),P+=":",P+=at(Math.trunc(-g.o%60))):(P+="+",P+=at(Math.trunc(g.o/60)),P+=":",P+=at(Math.trunc(g.o%60)))),D&&(P+="["+g.zone.ianaName+"]"),P}const Ya={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},Zc={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},xr={ordinal:1,hour:0,minute:0,second:0,millisecond:0},$a=["year","month","day","hour","minute","second","millisecond"],xi=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],Wc=["year","ordinal","hour","minute","second","millisecond"];function Cl(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 h(g);return i}function pi(g){switch(g.toLowerCase()){case"localweekday":case"localweekdays":return"localWeekday";case"localweeknumber":case"localweeknumbers":return"localWeekNumber";case"localweekyear":case"localweekyears":return"localWeekYear";default:return Cl(g)}}function ya(g){if(dn===void 0&&(dn=ht.now()),g.type!=="iana")return g.offset(dn);const i=g.name;let m=sa.get(i);return m===void 0&&(m=g.offset(dn),sa.set(i,m)),m}function $n(g,i){const m=At(i.zone,ht.defaultZone);if(!m.isValid)return Ee.invalid(qa(m));const v=Ie.fromObject(i);let S,D;if(Oe(g.year))S=ht.now();else{for(const P of $a)Oe(g[P])&&(g[P]=Ya[P]);const H=Js(g)||Un(g);if(H)return Ee.invalid(H);const q=ya(m);[S,D]=Ss(g,q,m)}return new Ee({ts:S,zone:m,loc:v,o:D})}function Pn(g,i,m){const v=Oe(m.round)?!0:m.round,S=Oe(m.rounding)?"trunc":m.rounding,D=(q,P)=>(q=ns(q,v||m.calendary?0:2,m.calendary?"round":S),i.loc.clone(m).relFormatter(m).format(q,P)),H=q=>m.calendary?i.hasSame(g,q)?0:i.startOf(q).diff(g.startOf(q),q).get(q):i.diff(g,q).get(q);if(m.unit)return D(H(m.unit),m.unit);for(const q of m.units){const P=H(q);if(Math.abs(P)>=1)return D(P,q)}return D(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 dn;const sa=new Map;class Ee{constructor(i){const m=i.zone||ht.defaultZone;let v=i.invalid||(Number.isNaN(i.ts)?new ga("invalid input"):null)||(m.isValid?null:qa(m));this.ts=Oe(i.ts)?ht.now():i.ts;let S=null,D=null;if(!v)if(i.old&&i.old.ts===this.ts&&i.old.zone.equals(m))[S,D]=[i.old.c,i.old.o];else{const q=xa(i.o)&&!i.old?i.o:m.offset(this.ts);S=Ba(this.ts,q),v=Number.isNaN(S.year)?new ga("invalid input"):null,S=v?null:S,D=v?null:q}this._zone=m,this.loc=i.loc||Ie.create(),this.invalid=v,this.weekData=null,this.localWeekData=null,this.c=S,this.o=D,this.isLuxonDateTime=!0}static now(){return new Ee({})}static local(){const[i,m]=Ts(arguments),[v,S,D,H,q,P,fe]=m;return $n({year:v,month:S,day:D,hour:H,minute:q,second:P,millisecond:fe},i)}static utc(){const[i,m]=Ts(arguments),[v,S,D,H,q,P,fe]=m;return i.zone=mt.utcInstance,$n({year:v,month:S,day:D,hour:H,minute:q,second:P,millisecond:fe},i)}static fromJSDate(i,m={}){const v=wc(i)?i.valueOf():NaN;if(Number.isNaN(v))return Ee.invalid("invalid input");const S=At(m.zone,ht.defaultZone);return S.isValid?new Ee({ts:v,zone:S,loc:Ie.fromObject(m)}):Ee.invalid(qa(S))}static fromMillis(i,m={}){if(xa(i))return i<-oa||i>oa?Ee.invalid("Timestamp out of range"):new Ee({ts:i,zone:At(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(xa(i))return new Ee({ts:i*1e3,zone:At(m.zone,ht.defaultZone),loc:Ie.fromObject(m)});throw new b("fromSeconds requires a numerical input")}static fromObject(i,m={}){i=i||{};const v=At(m.zone,ht.defaultZone);if(!v.isValid)return Ee.invalid(qa(v));const S=Ie.fromObject(m),D=rn(i,pi),{minDaysInFirstWeek:H,startOfWeek:q}=Nc(D,S),P=ht.now(),fe=Oe(m.specificOffset)?v.offset(P):m.specificOffset,ye=!Oe(D.ordinal),Ue=!Oe(D.year),Pe=!Oe(D.month)||!Oe(D.day),De=Ue||Pe,yt=D.weekYear||D.weekNumber;if((De||ye)&&yt)throw new f("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(Pe&&ye)throw new f("Can't mix ordinal dates with month/day");const Ft=yt||D.weekday&&!De;let Gt,Cn,fn=Ba(P,fe);Ft?(Gt=xi,Cn=Zc,fn=Bt(fn,H,q)):ye?(Gt=Wc,Cn=xr,fn=ts(fn)):(Gt=$a,Cn=Ya);let pr=!1;for(const Ga of Gt){const vr=D[Ga];Oe(vr)?pr?D[Ga]=Cn[Ga]:D[Ga]=fn[Ga]:pr=!0}const Fn=Ft?jc(D,H,q):ye?as(D):Js(D),Fa=Fn||Un(D);if(Fa)return Ee.invalid(Fa);const Mn=Ft?zn(D,H,q):ye?bc(D):D,[hn,vi]=Ss(Mn,fe,v),Gn=new Ee({ts:hn,zone:v,o:vi,loc:S});return D.weekday&&De&&i.weekday!==Gn.weekday?Ee.invalid("mismatched weekday",`you can't specify both a weekday of ${D.weekday} and a date of ${Gn.toISO()}`):Gn.isValid?Gn:Ee.invalid(Gn.invalid)}static fromISO(i,m={}){const[v,S]=kc(i);return Ma(v,S,m,"ISO 8601",i)}static fromRFC2822(i,m={}){const[v,S]=_c(i);return Ma(v,S,m,"RFC 2822",i)}static fromHTTP(i,m={}){const[v,S]=zc(i);return Ma(v,S,m,"HTTP",m)}static fromFormat(i,m,v={}){if(Oe(i)||Oe(m))throw new b("fromFormat requires an input string and a format");const{locale:S=null,numberingSystem:D=null}=v,H=Ie.fromOpts({locale:S,numberingSystem:D,defaultToEN:!0}),[q,P,fe,ye]=gi(H,i,m);return ye?Ee.invalid(ye):Ma(q,P,v,`format ${m}`,i,fe)}static fromString(i,m,v={}){return Ee.fromFormat(i,m,v)}static fromSQL(i,m={}){const[v,S]=Hc(i);return Ma(v,S,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 ga?i:new ga(i,m);if(ht.throwOnInvalid)throw new r(v);return new Ee({invalid:v})}static isDateTime(i){return i&&i.isLuxonDateTime||!1}static parseFormatForOpts(i,m={}){const v=va(i,Ie.fromObject(m));return v?v.map(S=>S?S.val:null).join(""):null}static expandFormat(i,m={}){return Gc(Yt.parseFormat(i),Ie.fromObject(m)).map(S=>S.val).join("")}static resetCache(){dn=void 0,sa.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?ws(this).weekYear:NaN}get weekNumber(){return this.isValid?ws(this).weekNumber:NaN}get weekday(){return this.isValid?ws(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?ts(this.c).ordinal:NaN}get monthShort(){return this.isValid?bs.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?bs.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?bs.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?bs.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=Xt(this.c),S=this.zone.offset(v-i),D=this.zone.offset(v+i),H=this.zone.offset(v-S*m),q=this.zone.offset(v-D*m);if(H===q)return[this];const P=v-H*m,fe=v-q*m,ye=Ba(P,H),Ue=Ba(fe,q);return ye.hour===Ue.hour&&ye.minute===Ue.minute&&ye.second===Ue.second&&ye.millisecond===Ue.millisecond?[Va(this,{ts:P}),Va(this,{ts:fe})]:[this]}get isInLeapYear(){return ml(this.year)}get daysInMonth(){return er(this.year,this.month)}get daysInYear(){return this.isValid?sn(this.year):NaN}get weeksInWeekYear(){return this.isValid?gl(this.weekYear):NaN}get weeksInLocalWeekYear(){return this.isValid?gl(this.localWeekYear,this.loc.getMinDaysInFirstWeek(),this.loc.getStartOfWeek()):NaN}resolvedLocaleOptions(i={}){const{locale:m,numberingSystem:v,calendar:S}=Yt.create(this.loc.clone(i),i).resolvedOptions(this);return{locale:m,numberingSystem:v,outputCalendar:S}}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=At(i,ht.defaultZone),i.equals(this.zone))return this;if(i.isValid){let S=this.ts;if(m||v){const D=i.offset(this.ts),H=this.toObject();[S]=Ss(H,D,i)}return Va(this,{ts:S,zone:i})}else return Ee.invalid(qa(i))}reconfigure({locale:i,numberingSystem:m,outputCalendar:v}={}){const S=this.loc.clone({locale:i,numberingSystem:m,outputCalendar:v});return Va(this,{loc:S})}setLocale(i){return this.reconfigure({locale:i})}set(i){if(!this.isValid)return this;const m=rn(i,pi),{minDaysInFirstWeek:v,startOfWeek:S}=Nc(m,this.loc),D=!Oe(m.weekYear)||!Oe(m.weekNumber)||!Oe(m.weekday),H=!Oe(m.ordinal),q=!Oe(m.year),P=!Oe(m.month)||!Oe(m.day),fe=q||P,ye=m.weekYear||m.weekNumber;if((fe||H)&&ye)throw new f("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(P&&H)throw new f("Can't mix ordinal dates with month/day");let Ue;D?Ue=zn({...Bt(this.c,v,S),...m},v,S):Oe(m.ordinal)?(Ue={...this.toObject(),...m},Oe(m.day)&&(Ue.day=Math.min(er(Ue.year,Ue.month),Ue.day))):Ue=bc({...ts(this.c),...m});const[Pe,De]=Ss(Ue,this.o,this.zone);return Va(this,{ts:Pe,o:De})}plus(i){if(!this.isValid)return this;const m=$e.fromDurationLike(i);return Va(this,Es(this,m))}minus(i){if(!this.isValid)return this;const m=$e.fromDurationLike(i).negate();return Va(this,Es(this,m))}startOf(i,{useLocaleWeeks:m=!1}={}){if(!this.isValid)return this;const v={},S=$e.normalizeUnit(i);switch(S){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(S==="weeks")if(m){const D=this.loc.getStartOfWeek(),{weekday:H}=this;H<D&&(v.weekNumber=this.weekNumber-1),v.weekday=D}else v.weekday=1;if(S==="quarters"){const D=Math.ceil(this.month/3);v.month=(D-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):El}toLocaleString(i=T,m={}){return this.isValid?Yt.create(this.loc.clone(m),i).formatDateTime(this):El}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:S=!0,extendedZone:D=!1,precision:H="milliseconds"}={}){if(!this.isValid)return null;H=Cl(H);const q=i==="extended";let P=Kt(this,q,H);return $a.indexOf(H)>=3&&(P+="T"),P+=gr(this,q,m,v,S,D,H),P}toISODate({format:i="extended",precision:m="day"}={}){return this.isValid?Kt(this,i==="extended",Cl(m)):null}toISOWeekDate(){return mr(this,"kkkk-'W'WW-c")}toISOTime({suppressMilliseconds:i=!1,suppressSeconds:m=!1,includeOffset:v=!0,includePrefix:S=!1,extendedZone:D=!1,format:H="extended",precision:q="milliseconds"}={}){return this.isValid?(q=Cl(q),(S&&$a.indexOf(q)>=3?"T":"")+gr(this,H==="extended",m,i,v,D,q)):null}toRFC2822(){return mr(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)}toHTTP(){return mr(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")}toSQLDate(){return this.isValid?Kt(this,!0):null}toSQLTime({includeOffset:i=!0,includeZone:m=!1,includeOffsetSpace:v=!0}={}){let S="HH:mm:ss.SSS";return(m||i)&&(v&&(S+=" "),m?S+="z":i&&(S+="ZZ")),mr(this,S,!0)}toSQL(i={}){return this.isValid?`${this.toSQLDate()} ${this.toSQLTime(i)}`:null}toString(){return this.isValid?this.toISO():El}[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 $e.invalid("created by diffing an invalid DateTime");const S={locale:this.locale,numberingSystem:this.numberingSystem,...v},D=hl(m).map($e.normalizeUnit),H=i.valueOf()>this.valueOf(),q=H?this:i,P=H?i:this,fe=Vc(q,P,D,S);return H?fe.negate():fe}diffNow(i="milliseconds",m={}){return this.diff(Ee.now(),i,m)}until(i){return this.isValid?gt.fromDateTimes(this,i):this}hasSame(i,m,v){if(!this.isValid)return!1;const S=i.valueOf(),D=this.setZone(i.zone,{keepLocalTime:!0});return D.startOf(m,v)<=S&&S<=D.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||Ee.fromObject({},{zone:this.zone}),v=i.padding?this<m?-i.padding:i.padding:0;let S=["years","months","days","hours","minutes","seconds"],D=i.unit;return Array.isArray(i.unit)&&(S=i.unit,D=void 0),Pn(m,this.plus(v),{...i,numeric:"always",units:S,unit:D})}toRelativeCalendar(i={}){return this.isValid?Pn(i.base||Ee.fromObject({},{zone:this.zone}),this,{...i,numeric:"auto",units:["years","months","days"],calendary:!0}):null}static min(...i){if(!i.every(Ee.isDateTime))throw new b("min requires all arguments be DateTimes");return Sc(i,m=>m.valueOf(),Math.min)}static max(...i){if(!i.every(Ee.isDateTime))throw new b("max requires all arguments be DateTimes");return Sc(i,m=>m.valueOf(),Math.max)}static fromFormatExplain(i,m,v={}){const{locale:S=null,numberingSystem:D=null}=v,H=Ie.fromOpts({locale:S,numberingSystem:D,defaultToEN:!0});return mi(H,i,m)}static fromStringExplain(i,m,v={}){return Ee.fromFormatExplain(i,m,v)}static buildFormatParser(i,m={}){const{locale:v=null,numberingSystem:S=null}=m,D=Ie.fromOpts({locale:v,numberingSystem:S,defaultToEN:!0});return new hi(D,i)}static fromFormatParser(i,m,v={}){if(Oe(i)||Oe(m))throw new b("fromFormatParser requires an input string and a format parser");const{locale:S=null,numberingSystem:D=null}=v,H=Ie.fromOpts({locale:S,numberingSystem:D,defaultToEN:!0});if(!H.equals(m.locale))throw new b(`fromFormatParser called with a locale of ${H}, but the format parser was created for ${m.locale}`);const{result:q,zone:P,specificOffset:fe,invalidReason:ye}=m.explainFromTokens(i);return ye?Ee.invalid(ye):Ma(q,P,v,`format ${m.format}`,i,fe)}static get DATE_SHORT(){return T}static get DATE_MED(){return k}static get DATE_MED_WITH_WEEKDAY(){return _}static get DATE_FULL(){return j}static get DATE_HUGE(){return C}static get TIME_SIMPLE(){return A}static get TIME_WITH_SECONDS(){return G}static get TIME_WITH_SHORT_OFFSET(){return $}static get TIME_WITH_LONG_OFFSET(){return M}static get TIME_24_SIMPLE(){return V}static get TIME_24_WITH_SECONDS(){return ee}static get TIME_24_WITH_SHORT_OFFSET(){return Y}static get TIME_24_WITH_LONG_OFFSET(){return W}static get DATETIME_SHORT(){return R}static get DATETIME_SHORT_WITH_SECONDS(){return te}static get DATETIME_MED(){return O}static get DATETIME_MED_WITH_SECONDS(){return le}static get DATETIME_MED_WITH_WEEKDAY(){return ne}static get DATETIME_FULL(){return he}static get DATETIME_FULL_WITH_SECONDS(){return ve}static get DATETIME_HUGE(){return ie}static get DATETIME_HUGE_WITH_SECONDS(){return F}}function ba(g){if(Ee.isDateTime(g))return g;if(g&&g.valueOf&&xa(g.valueOf()))return Ee.fromJSDate(g);if(g&&typeof g=="object")return Ee.fromObject(g);throw new b(`Unknown datetime argument: ${g}, of type ${typeof g}`)}const Pa="3.7.2";return Ta.DateTime=Ee,Ta.Duration=$e,Ta.FixedOffsetZone=mt,Ta.IANAZone=xe,Ta.Info=bs,Ta.Interval=gt,Ta.InvalidZone=Vt,Ta.Settings=ht,Ta.SystemZone=me,Ta.VERSION=Pa,Ta.Zone=ae,Ta}var Jg;function mh(){return Jg||(Jg=1,(function(n){var h,b,N,y,x,Bf,T,Ql;Object.defineProperty(n,"__esModule",{value:!0}),n.CronDate=n.DAYS_IN_MONTH=n.DateMathOp=n.TimeUnit=void 0;const r=E2();var o;(function(j){j.Second="Second",j.Minute="Minute",j.Hour="Hour",j.Day="Day",j.Month="Month",j.Year="Year"})(o||(n.TimeUnit=o={}));var u;(function(j){j.Add="Add",j.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 _=class _{constructor(C,A){et(this,T);et(this,h);et(this,b,null);et(this,N,null);et(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 G={zone:A};if(C?C instanceof _?(Ce(this,h,J(C,h)),Ce(this,b,J(C,b)),Ce(this,N,J(C,N))):C instanceof Date?Ce(this,h,r.DateTime.fromJSDate(C,G)):typeof C=="number"?Ce(this,h,r.DateTime.fromMillis(C,G)):(Ce(this,h,r.DateTime.fromISO(C,G)),J(this,h).isValid||Ce(this,h,r.DateTime.fromRFC2822(C,G)),J(this,h).isValid||Ce(this,h,r.DateTime.fromSQL(C,G)),J(this,h).isValid||Ce(this,h,r.DateTime.fromFormat(C,"EEE, d MMM yyyy HH:mm:ss",G))):Ce(this,h,r.DateTime.local()),!J(this,h).isValid)throw new Error(`CronDate: unhandled timestamp: ${C}`);A&&A!==J(this,h).zoneName&&Ce(this,h,J(this,h).setZone(A))}get dstStart(){return J(this,b)}set dstStart(C){Ce(this,b,C)}get dstEnd(){return J(this,N)}set dstEnd(C){Ce(this,N,C)}addYear(){Ce(this,h,J(this,h).plus({years:1}))}addMonth(){Ce(this,h,J(this,h).plus({months:1}).startOf("month"))}addDay(){Ce(this,h,J(this,h).plus({days:1}).startOf("day"))}addHour(){Ce(this,h,J(this,h).plus({hours:1}).startOf("hour"))}addMinute(){Ce(this,h,J(this,h).plus({minutes:1}).startOf("minute"))}addSecond(){Ce(this,h,J(this,h).plus({seconds:1}))}subtractYear(){Ce(this,h,J(this,h).minus({years:1}))}subtractMonth(){Ce(this,h,J(this,h).minus({months:1}).endOf("month").startOf("second"))}subtractDay(){Ce(this,h,J(this,h).minus({days:1}).endOf("day").startOf("second"))}subtractHour(){Ce(this,h,J(this,h).minus({hours:1}).endOf("hour").startOf("second"))}subtractMinute(){Ce(this,h,J(this,h).minus({minutes:1}).endOf("minute").startOf("second"))}subtractSecond(){Ce(this,h,J(this,h).minus({seconds:1}))}addUnit(C){J(this,y).add[C]()}subtractUnit(C){J(this,y).subtract[C]()}invokeDateOperation(C,A){if(C===u.Add){this.addUnit(A);return}if(C===u.Subtract){this.subtractUnit(A);return}throw new Error(`Invalid verb: ${C}`)}getDate(){return J(this,h).day}getFullYear(){return J(this,h).year}getDay(){const C=J(this,h).weekday;return C===7?0:C}getMonth(){return J(this,h).month-1}getHours(){return J(this,h).hour}getMinutes(){return J(this,h).minute}getSeconds(){return J(this,h).second}getMilliseconds(){return J(this,h).millisecond}getUTCOffset(){return J(this,h).offset}setStartOfDay(){Ce(this,h,J(this,h).startOf("day"))}setEndOfDay(){Ce(this,h,J(this,h).endOf("day"))}getTime(){return J(this,h).valueOf()}getUTCDate(){return we(this,T,Ql).call(this).day}getUTCFullYear(){return we(this,T,Ql).call(this).year}getUTCDay(){const C=we(this,T,Ql).call(this).weekday;return C===7?0:C}getUTCMonth(){return we(this,T,Ql).call(this).month-1}getUTCHours(){return we(this,T,Ql).call(this).hour}getUTCMinutes(){return we(this,T,Ql).call(this).minute}getUTCSeconds(){return we(this,T,Ql).call(this).second}toISOString(){return J(this,h).toUTC().toISO()}toJSON(){return J(this,h).toJSON()}setDate(C){Ce(this,h,J(this,h).set({day:C}))}setFullYear(C){Ce(this,h,J(this,h).set({year:C}))}setDay(C){Ce(this,h,J(this,h).set({weekday:C}))}setMonth(C){Ce(this,h,J(this,h).set({month:C+1}))}setHours(C){Ce(this,h,J(this,h).set({hour:C}))}setMinutes(C){Ce(this,h,J(this,h).set({minute:C}))}setSeconds(C){Ce(this,h,J(this,h).set({second:C}))}setMilliseconds(C){Ce(this,h,J(this,h).set({millisecond:C}))}toString(){return this.toDate().toString()}toDate(){return J(this,h).toJSDate()}isLastDayOfMonth(){var G;const{day:C,month:A}=J(this,h);if(A===2){const $=we(G=_,x,Bf).call(G,J(this,h).year);return C===n.DAYS_IN_MONTH[A-1]-($?0:1)}return C===n.DAYS_IN_MONTH[A-1]}isLastWeekdayOfMonth(){var $;const{day:C,month:A}=J(this,h);let G;return A===2?G=n.DAYS_IN_MONTH[A-1]-(we($=_,x,Bf).call($,J(this,h).year)?0:1):G=n.DAYS_IN_MONTH[A-1],C>G-7}applyDateOperation(C,A,G){if(A===o.Month||A===o.Day){this.invokeDateOperation(C,A);return}const $=this.getHours();this.invokeDateOperation(C,A);const M=this.getHours(),V=M-$;V===2?G!==24&&(this.dstStart=M):V===0&&this.getMinutes()===0&&this.getSeconds()===0&&G!==24&&(this.dstEnd=M)}};h=new WeakMap,b=new WeakMap,N=new WeakMap,y=new WeakMap,x=new WeakSet,Bf=function(C){return C%4===0&&C%100!==0||C%400===0},T=new WeakSet,Ql=function(){return J(this,h).toUTC()},et(_,x);let f=_;n.CronDate=f,n.default=f})(Af)),Af}var Kg;function T2(){if(Kg)return lc;Kg=1,Object.defineProperty(lc,"__esModule",{value:!0}),lc.CronMonth=void 0;const n=mh(),r=Gs(),o=1,u=12,f=Object.freeze([]);let h=class extends r.CronField{static get min(){return o}static get max(){return u}static get chars(){return f}static get daysInMonth(){return n.DAYS_IN_MONTH}constructor(N,y){super(N,y),this.validate()}get values(){return super.values}};return lc.CronMonth=h,lc}var sc={},ex;function C2(){if(ex)return sc;ex=1,Object.defineProperty(sc,"__esModule",{value:!0}),sc.CronSecond=void 0;const n=Gs(),r=0,o=59,u=Object.freeze([]);let f=class extends n.CronField{static get min(){return r}static get max(){return o}static get chars(){return u}constructor(b,N){super(b,N),this.validate()}get values(){return super.values}};return sc.CronSecond=f,sc}var tx;function gh(){return tx||(tx=1,(function(n){var r=Ls&&Ls.__createBinding||(Object.create?(function(u,f,h,b){b===void 0&&(b=h);var N=Object.getOwnPropertyDescriptor(f,h);(!N||("get"in N?!f.__esModule:N.writable||N.configurable))&&(N={enumerable:!0,get:function(){return f[h]}}),Object.defineProperty(u,b,N)}):(function(u,f,h,b){b===void 0&&(b=h),u[b]=f[h]})),o=Ls&&Ls.__exportStar||function(u,f){for(var h in u)h!=="default"&&!Object.prototype.hasOwnProperty.call(f,h)&&r(f,u,h)};Object.defineProperty(n,"__esModule",{value:!0}),o(b2(),n),o(N2(),n),o(j2(),n),o(Gs(),n),o(w2(),n),o(S2(),n),o(T2(),n),o(C2(),n)})(Ls)),Ls}var ax;function bp(){var o,u,f,h,b,N,y,x,vp,yp;if(ax)return Ji;ax=1,Object.defineProperty(Ji,"__esModule",{value:!0}),Ji.CronFieldCollection=void 0;const n=gh();let r=(x=class{constructor({second:_,minute:j,hour:C,dayOfMonth:A,month:G,dayOfWeek:$}){et(this,o);et(this,u);et(this,f);et(this,h);et(this,b);et(this,N);if(!_)throw new Error("Validation error, Field second is missing");if(!j)throw new Error("Validation error, Field minute is missing");if(!C)throw new Error("Validation error, Field hour is missing");if(!A)throw new Error("Validation error, Field dayOfMonth is missing");if(!G)throw new Error("Validation error, Field month is missing");if(!$)throw new Error("Validation error, Field dayOfWeek is missing");if(G.values.length===1&&!A.hasLastChar&&!(parseInt(A.values[0],10)<=n.CronMonth.daysInMonth[G.values[0]-1]))throw new Error("Invalid explicit day of month definition");Ce(this,o,_),Ce(this,u,j),Ce(this,f,C),Ce(this,b,G),Ce(this,N,$),Ce(this,h,A)}static from(_,j){return new x({second:this.resolveField(n.CronSecond,_.second,j.second),minute:this.resolveField(n.CronMinute,_.minute,j.minute),hour:this.resolveField(n.CronHour,_.hour,j.hour),dayOfMonth:this.resolveField(n.CronDayOfMonth,_.dayOfMonth,j.dayOfMonth),month:this.resolveField(n.CronMonth,_.month,j.month),dayOfWeek:this.resolveField(n.CronDayOfWeek,_.dayOfWeek,j.dayOfWeek)})}static resolveField(_,j,C){return C?C instanceof n.CronField?C:new _(C):j}get second(){return J(this,o)}get minute(){return J(this,u)}get hour(){return J(this,f)}get dayOfMonth(){return J(this,h)}get month(){return J(this,b)}get dayOfWeek(){return J(this,N)}static compactField(_){if(_.length===0)return[];const j=[];let C;return _.forEach((A,G,$)=>{if(C===void 0){C={start:A,count:1};return}const M=$[G-1]||C.start,V=$[G+1];if(A==="L"||A==="W"){j.push(C),j.push({start:A,count:1}),C=void 0;return}if(C.step===void 0&&V!==void 0){const ee=A-M,Y=V-A;if(ee<=Y){C={...C,count:2,end:A,step:ee};return}C.step=1}A-(C.end??0)===C.step?(C.count++,C.end=A):(C.count===1?j.push({start:C.start,count:1}):C.count===2?(j.push({start:C.start,count:1}),j.push({start:C.end??M,count:1})):j.push(C),C={start:A,count:1})}),C&&j.push(C),j}stringifyField(_){var G;let j=_.max,C=_.values;if(_ instanceof n.CronDayOfWeek){j=6;const $=J(this,N).values;C=$[$.length-1]===7?$.slice(0,-1):$}_ instanceof n.CronDayOfMonth&&(j=J(this,b).values.length===1?n.CronMonth.daysInMonth[J(this,b).values[0]-1]:_.max);const A=x.compactField(C);if(A.length===1){const $=we(G=x,y,vp).call(G,_,A[0],j);if($)return $}return A.map($=>{var V;const M=$.count===1?$.start.toString():we(V=x,y,yp).call(V,$,j);return _ instanceof n.CronDayOfWeek&&_.nthDay>0?`${M}#${_.nthDay}`:M}).join(",")}stringify(_=!1){const j=[];return _&&j.push(this.stringifyField(J(this,o))),j.push(this.stringifyField(J(this,u)),this.stringifyField(J(this,f)),this.stringifyField(J(this,h)),this.stringifyField(J(this,b)),this.stringifyField(J(this,N))),j.join(" ")}serialize(){return{second:J(this,o).serialize(),minute:J(this,u).serialize(),hour:J(this,f).serialize(),dayOfMonth:J(this,h).serialize(),month:J(this,b).serialize(),dayOfWeek:J(this,N).serialize()}}},o=new WeakMap,u=new WeakMap,f=new WeakMap,h=new WeakMap,b=new WeakMap,N=new WeakMap,y=new WeakSet,vp=function(_,j,C){const A=j.step;return A?A===1&&j.start===_.min&&j.end&&j.end>=C?_.hasQuestionMarkChar?"?":"*":A!==1&&j.start===_.min&&j.end&&j.end>=C-A+1?`*/${A}`:null:null},yp=function(_,j){const C=_.step;if(C===1)return`${_.start}-${_.end}`;const A=_.start===0?_.count-1:_.count;if(!C)throw new Error("Unexpected range step");if(!_.end)throw new Error("Unexpected range end");if(C*A>_.end){const G=(M,V)=>{if(typeof _.start!="number")throw new Error("Unexpected range start");return V%C===0?_.start+V:null};if(typeof _.start!="number")throw new Error("Unexpected range start");const $={length:_.end-_.start+1};return Array.from($,G).filter(M=>M!==null).join(",")}return _.end===j-C+1?`${_.start}/${C}`:`${_.start}-${_.end}/${C}`},et(x,y),x);return Ji.CronFieldCollection=r,Ji}var kf={},nx;function Cp(){return nx||(nx=1,(function(n){var f,h,b,N,y,x,w,T,k,Xl,j,Vs,Np,jp,wp,Sp,Yf,Ep,Tp,Vr;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=mh();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,R=class R{constructor(O,le){et(this,j);et(this,f);et(this,h);et(this,b);et(this,N);et(this,y);et(this,x);et(this,w,null);et(this,T,!1);Ce(this,f,le),Ce(this,h,le.tz),Ce(this,N,le.startDate?new r.CronDate(le.startDate,J(this,h)):null),Ce(this,y,le.endDate?new r.CronDate(le.endDate,J(this,h)):null);let ne=le.currentDate??le.startDate;if(ne){const he=new r.CronDate(ne,J(this,h));J(this,N)&&he.getTime()<J(this,N).getTime()?ne=J(this,N):J(this,y)&&he.getTime()>J(this,y).getTime()&&(ne=J(this,y))}Ce(this,b,new r.CronDate(ne,J(this,h))),Ce(this,x,O)}get fields(){return J(this,x)}static fieldsToExpression(O,le){return new R(O,le||{})}next(){return we(this,j,Vr).call(this)}prev(){return we(this,j,Vr).call(this,!0)}hasNext(){const O=J(this,b);try{return we(this,j,Vr).call(this),!0}catch{return!1}finally{Ce(this,b,O)}}hasPrev(){const O=J(this,b);try{return we(this,j,Vr).call(this,!0),!0}catch{return!1}finally{Ce(this,b,O)}}take(O){const le=[];if(O>=0)for(let ne=0;ne<O;ne++)try{le.push(this.next())}catch{return le}else for(let ne=0;ne>O;ne--)try{le.push(this.prev())}catch{return le}return le}reset(O){Ce(this,b,new r.CronDate(O||J(this,f).currentDate))}stringify(O=!1){return J(this,x).stringify(O)}includesDate(O){const{second:le,minute:ne,hour:he,month:ve}=J(this,x),ie=new r.CronDate(O,J(this,h));return!(!le.values.includes(ie.getSeconds())||!ne.values.includes(ie.getMinutes())||!he.values.includes(ie.getHours())||!ve.values.includes(ie.getMonth()+1)||!we(this,j,Yf).call(this,ie)||J(this,x).dayOfWeek.nthDay>0&&Math.ceil(ie.getDate()/7)!==J(this,x).dayOfWeek.nthDay)}toString(){return J(this,f).expression||this.stringify(!0)}[Symbol.iterator](){return{next:()=>({value:we(this,j,Vr).call(this),done:!this.hasNext()})}}};f=new WeakMap,h=new WeakMap,b=new WeakMap,N=new WeakMap,y=new WeakMap,x=new WeakMap,w=new WeakMap,T=new WeakMap,k=new WeakSet,Xl=function(O,le){return le.some(ne=>ne===O)},j=new WeakSet,Vs=function(O,le){return O[le?O.length-1:0]},Np=function(O){const le=`${O.getFullYear()}-${O.getMonth()+1}-${O.getDate()}`;if(J(this,w)===le)return J(this,T);const ne=new r.CronDate(O);ne.setStartOfDay();const he=new r.CronDate(O);return he.setEndOfDay(),Ce(this,w,le),Ce(this,T,ne.getUTCOffset()!==he.getUTCOffset()),J(this,T)},jp=function(O,le,ne){const he=J(this,x).second.values,ve=O.getSeconds(),ie=J(this,x).second.findNearestValue(ve,ne);if(ie!==null){O.setSeconds(ie);return}O.applyDateOperation(le,r.TimeUnit.Minute,J(this,x).hour.values.length),O.setSeconds(we(this,j,Vs).call(this,he,ne))},wp=function(O,le,ne){const he=J(this,x).minute.values,ve=J(this,x).second.values,ie=O.getMinutes(),F=J(this,x).minute.findNearestValue(ie,ne);if(F!==null){O.setMinutes(F),O.setSeconds(we(this,j,Vs).call(this,ve,ne));return}O.applyDateOperation(le,r.TimeUnit.Hour,J(this,x).hour.values.length),O.setMinutes(we(this,j,Vs).call(this,he,ne)),O.setSeconds(we(this,j,Vs).call(this,ve,ne))},Sp=function(O,le){const ne=le.isLastWeekdayOfMonth();return O.some(he=>{const ve=parseInt(he.toString().charAt(0),10)%7;if(Number.isNaN(ve))throw new Error(`Invalid last weekday of the month expression: ${he}`);return le.getDay()===ve&&ne})},Yf=function(O){var ae,de,me;const le=J(this,x).dayOfMonth.isWildcard,ne=!le,he=J(this,x).dayOfWeek.isWildcard,ve=!he,ie=we(ae=R,k,Xl).call(ae,O.getDate(),J(this,x).dayOfMonth.values)||J(this,x).dayOfMonth.hasLastChar&&O.isLastDayOfMonth(),F=we(de=R,k,Xl).call(de,O.getDay(),J(this,x).dayOfWeek.values)||J(this,x).dayOfWeek.hasLastChar&&we(me=R,k,Sp).call(me,J(this,x).dayOfWeek.values,O);return!!(ne&&ve&&(ie||F)||ie&&!ve||le&&!he&&F)},Ep=function(O,le,ne){var ze,L;const he=J(this,x).hour.values,ve=he,ie=O.getHours(),F=we(ze=R,k,Xl).call(ze,ie,he),ae=O.dstStart===ie,de=O.dstEnd===ie;if(ae)return we(L=R,k,Xl).call(L,ie-1,he)?!0:(O.invokeDateOperation(le,r.TimeUnit.Hour),!1);if(de&&!ne)return O.dstEnd=null,O.applyDateOperation(r.DateMathOp.Add,r.TimeUnit.Hour,ve.length),!1;if(F)return!0;O.dstStart=null;const me=J(this,x).hour.findNearestValue(ie,ne);if(me===null)return O.applyDateOperation(le,r.TimeUnit.Day,ve.length),!1;if(we(this,j,Np).call(this,O)){const se=ne?ie-me:me-ie;for(let ge=0;ge<se;ge++)O.applyDateOperation(le,r.TimeUnit.Hour,ve.length)}else O.setHours(me);return O.setMinutes(we(this,j,Vs).call(this,J(this,x).minute.values,ne)),O.setSeconds(we(this,j,Vs).call(this,J(this,x).second.values,ne)),!1},Tp=function(O){if(!J(this,N)&&!J(this,y))return;const le=O.getTime();if(J(this,N)&&le<J(this,N).getTime())throw new Error(n.TIME_SPAN_OUT_OF_BOUNDS_ERROR_MESSAGE);if(J(this,y)&&le>J(this,y).getTime())throw new Error(n.TIME_SPAN_OUT_OF_BOUNDS_ERROR_MESSAGE)},Vr=function(O=!1){var ie,F,ae;const le=O?r.DateMathOp.Subtract:r.DateMathOp.Add,ne=new r.CronDate(J(this,b)),he=ne.getTime();let ve=0;for(;++ve<o;){if(we(this,j,Tp).call(this,ne),!we(this,j,Yf).call(this,ne)){ne.applyDateOperation(le,r.TimeUnit.Day,J(this,x).hour.values.length);continue}if(!(J(this,x).dayOfWeek.nthDay<=0||Math.ceil(ne.getDate()/7)===J(this,x).dayOfWeek.nthDay)){ne.applyDateOperation(le,r.TimeUnit.Day,J(this,x).hour.values.length);continue}if(!we(ie=R,k,Xl).call(ie,ne.getMonth()+1,J(this,x).month.values)){ne.applyDateOperation(le,r.TimeUnit.Month,J(this,x).hour.values.length);continue}if(we(this,j,Ep).call(this,ne,le,O)){if(!we(F=R,k,Xl).call(F,ne.getMinutes(),J(this,x).minute.values)){we(this,j,wp).call(this,ne,le,O);continue}if(!we(ae=R,k,Xl).call(ae,ne.getSeconds(),J(this,x).second.values)){we(this,j,jp).call(this,ne,le,O);continue}if(he===ne.getTime()){(le==="Add"||ne.getMilliseconds()===0)&&ne.applyDateOperation(le,r.TimeUnit.Second,J(this,x).hour.values.length);continue}break}}if(ve>o)throw new Error(n.LOOPS_LIMIT_EXCEEDED_ERROR_MESSAGE);return ne.getMilliseconds()!==0&&ne.setMilliseconds(0),Ce(this,b,ne),ne},et(R,k);let u=R;n.CronExpression=u,n.default=u})(kf)),kf}var Gu={},lx;function M2(){if(lx)return Gu;lx=1,Object.defineProperty(Gu,"__esModule",{value:!0}),Gu.seededRandom=o;function n(u){let f=2166136261;for(let h=0;h<u.length;h++)f^=u.charCodeAt(h),f=Math.imul(f,16777619);return()=>f>>>0}function r(u){return()=>{let f=u+=1831565813;return f=Math.imul(f^f>>>15,f|1),f^=f+Math.imul(f^f>>>7,f|61),((f^f>>>14)>>>0)/4294967296}}function o(u){const f=u?n(u)():Math.floor(Math.random()*1e10);return r(f)}return Gu}var sx;function Pf(){var x,w,Mp,Bs,Op,Rp,Dp,Ap,kp,_p,zp,$f,Up,Lp;if(sx)return _a;sx=1,Object.defineProperty(_a,"__esModule",{value:!0}),_a.CronExpressionParser=_a.DayOfWeek=_a.Months=_a.CronUnit=_a.PredefinedExpressions=void 0;const n=bp(),r=Cp(),o=M2(),u=gh();var f;(function(W){W["@yearly"]="0 0 0 1 1 *",W["@annually"]="0 0 0 1 1 *",W["@monthly"]="0 0 0 1 * *",W["@weekly"]="0 0 0 * * 0",W["@daily"]="0 0 0 * * *",W["@hourly"]="0 0 * * * *",W["@minutely"]="0 * * * * *",W["@secondly"]="* * * * * *",W["@weekdays"]="0 0 0 * * 1-5",W["@weekends"]="0 0 0 * * 0,6"})(f||(_a.PredefinedExpressions=f={}));var h;(function(W){W.Second="Second",W.Minute="Minute",W.Hour="Hour",W.DayOfMonth="DayOfMonth",W.Month="Month",W.DayOfWeek="DayOfWeek"})(h||(_a.CronUnit=h={}));var b;(function(W){W[W.jan=1]="jan",W[W.feb=2]="feb",W[W.mar=3]="mar",W[W.apr=4]="apr",W[W.may=5]="may",W[W.jun=6]="jun",W[W.jul=7]="jul",W[W.aug=8]="aug",W[W.sep=9]="sep",W[W.oct=10]="oct",W[W.nov=11]="nov",W[W.dec=12]="dec"})(b||(_a.Months=b={}));var N;(function(W){W[W.sun=0]="sun",W[W.mon=1]="mon",W[W.tue=2]="tue",W[W.wed=3]="wed",W[W.thu=4]="thu",W[W.fri=5]="fri",W[W.sat=6]="sat"})(N||(_a.DayOfWeek=N={}));let y=(w=class{static parse(R,te={}){var ge,pe,Se,xe,Te,Ze,We,Dt;const{strict:O=!1,hashSeed:le}=te,ne=(0,o.seededRandom)(le);R=f[R]||R;const he=we(ge=w,x,Mp).call(ge,R,O);if(!(he.dayOfMonth==="*"||he.dayOfWeek==="*"||!O))throw new Error("Cannot use both dayOfMonth and dayOfWeek together in strict mode!");const ve=we(pe=w,x,Bs).call(pe,h.Second,he.second,u.CronSecond.constraints,ne),ie=we(Se=w,x,Bs).call(Se,h.Minute,he.minute,u.CronMinute.constraints,ne),F=we(xe=w,x,Bs).call(xe,h.Hour,he.hour,u.CronHour.constraints,ne),ae=we(Te=w,x,Bs).call(Te,h.Month,he.month,u.CronMonth.constraints,ne),de=we(Ze=w,x,Bs).call(Ze,h.DayOfMonth,he.dayOfMonth,u.CronDayOfMonth.constraints,ne),{dayOfWeek:me,nthDayOfWeek:ze}=we(We=w,x,Up).call(We,he.dayOfWeek),L=we(Dt=w,x,Bs).call(Dt,h.DayOfWeek,me,u.CronDayOfWeek.constraints,ne),se=new n.CronFieldCollection({second:new u.CronSecond(ve,{rawValue:he.second}),minute:new u.CronMinute(ie,{rawValue:he.minute}),hour:new u.CronHour(F,{rawValue:he.hour}),dayOfMonth:new u.CronDayOfMonth(de,{rawValue:he.dayOfMonth}),month:new u.CronMonth(ae,{rawValue:he.month}),dayOfWeek:new u.CronDayOfWeek(L,{rawValue:he.dayOfWeek,nthDayOfWeek:ze})});return new r.CronExpression(se,{...te,expression:R})}},x=new WeakSet,Mp=function(R,te){if(te&&!R.length)throw new Error("Invalid cron expression");R=R||"0 * * * * *";const O=R.trim().split(/\s+/);if(te&&O.length<6)throw new Error("Invalid cron expression, expected 6 fields");if(O.length>6)throw new Error("Invalid cron expression, too many fields");const le=["*","*","*","*","*","0"];O.length<le.length&&O.unshift(...le.slice(O.length));const[ne,he,ve,ie,F,ae]=O;return{second:ne,minute:he,hour:ve,dayOfMonth:ie,month:F,dayOfWeek:ae}},Bs=function(R,te,O,le){if((R===h.Month||R===h.DayOfWeek)&&(te=te.replace(/[a-z]{3}/gi,ne=>{ne=ne.toLowerCase();const he=b[ne]||N[ne];if(he===void 0)throw new Error(`Validation error, cannot resolve alias "${ne}"`);return he.toString()})),!O.validChars.test(te))throw new Error(`Invalid characters, got value: ${te}`);return te=we(this,x,Op).call(this,te,O),te=we(this,x,Rp).call(this,te,O,le),we(this,x,Dp).call(this,R,te,O)},Op=function(R,te){return R.replace(/[*?]/g,te.min+"-"+te.max)},Rp=function(R,te,O){const le=O();return R.replace(/H(?:\((\d+)-(\d+)\))?(?:\/(\d+))?/g,(ne,he,ve,ie)=>{if(he&&ve&&ie){const F=parseInt(he,10),ae=parseInt(ve,10),de=parseInt(ie,10);if(F>ae)throw new Error(`Invalid range: ${F}-${ae}, min > max`);if(de<=0)throw new Error(`Invalid step: ${de}, must be positive`);const me=Math.max(F,te.min),ze=Math.floor(le*de),L=[];for(let se=Math.floor(me/de)*de+ze;se<=ae;se+=de)se>=me&&L.push(se);return L.join(",")}else if(he&&ve){const F=parseInt(he,10),ae=parseInt(ve,10);if(F>ae)throw new Error(`Invalid range: ${F}-${ae}, min > max`);return String(Math.floor(le*(ae-F+1))+F)}else if(ie){const F=parseInt(ie,10);if(F<=0)throw new Error(`Invalid step: ${F}, must be positive`);const ae=Math.floor(le*F),de=[];for(let me=Math.floor(te.min/F)*F+ae;me<=te.max;me+=F)me>=te.min&&de.push(me);return de.join(",")}else return String(Math.floor(le*(te.max-te.min+1)+te.min))})},Dp=function(R,te,O){const le=[];function ne(ve,ie){var F;if(Array.isArray(ve))le.push(...ve);else if(we(F=w,x,Lp).call(F,ie,ve))le.push(ve);else{const ae=parseInt(ve.toString(),10);if(!(ae>=ie.min&&ae<=ie.max))throw new Error(`Constraint error, got value ${ve} expected range ${ie.min}-${ie.max}`);le.push(R===h.DayOfWeek?ae%7:ve)}}return te.split(",").forEach(ve=>{var ie;if(!(ve.length>0))throw new Error("Invalid list value format");ne(we(ie=w,x,Ap).call(ie,R,ve,O),O)}),le},Ap=function(R,te,O){var ne,he;const le=te.split("/");if(le.length>2)throw new Error(`Invalid repeat: ${te}`);return le.length===2?(isNaN(parseInt(le[0],10))||(le[0]=`${le[0]}-${O.max}`),we(ne=w,x,$f).call(ne,R,le[0],parseInt(le[1],10),O)):we(he=w,x,$f).call(he,R,te,1,O)},kp=function(R,te,O){if(!(!isNaN(R)&&!isNaN(te)&&R>=O.min&&te<=O.max))throw new Error(`Constraint error, got range ${R}-${te} expected range ${O.min}-${O.max}`);if(R>te)throw new Error(`Invalid range: ${R}-${te}, min(${R}) > max(${te})`)},_p=function(R){if(!(!isNaN(R)&&R>0))throw new Error(`Constraint error, cannot repeat at every ${R} time.`)},zp=function(R,te,O,le){const ne=[];R===h.DayOfWeek&&O%7===0&&ne.push(0);for(let he=te;he<=O;he+=le)ne.indexOf(he)===-1&&ne.push(he);return ne},$f=function(R,te,O,le){const ne=te.split("-");if(ne.length<=1)return isNaN(+te)?te:+te;const[he,ve]=ne.map(ie=>parseInt(ie,10));return we(this,x,kp).call(this,he,ve,le),we(this,x,_p).call(this,O),we(this,x,zp).call(this,R,he,ve,O)},Up=function(R){const te=R.split("#");if(te.length<=1)return{dayOfWeek:te[0]};const O=+te[te.length-1],le=R.match(/([,-/])/);if(le!==null)throw new Error(`Constraint error, invalid dayOfWeek \`#\` and \`${le==null?void 0:le[0]}\` special characters are incompatible`);if(!(te.length<=2&&!isNaN(O)&&O>=1&&O<=5))throw new Error("Constraint error, invalid dayOfWeek occurrence number (#)");return{dayOfWeek:te[0],nthDayOfWeek:O}},Lp=function(R,te){return R.chars.some(O=>te.toString().includes(O))},et(w,x),w);return _a.CronExpressionParser=y,_a}var xn={};const O2={},R2=Object.freeze(Object.defineProperty({__proto__:null,default:O2},Symbol.toStringTag,{value:"Module"})),rx=gy(R2);var ix;function D2(){var h,b,Ff,Hp;if(ix)return xn;ix=1;var n=xn&&xn.__createBinding||(Object.create?(function(x,w,T,k){k===void 0&&(k=T);var _=Object.getOwnPropertyDescriptor(w,T);(!_||("get"in _?!w.__esModule:_.writable||_.configurable))&&(_={enumerable:!0,get:function(){return w[T]}}),Object.defineProperty(x,k,_)}):(function(x,w,T,k){k===void 0&&(k=T),x[k]=w[T]})),r=xn&&xn.__setModuleDefault||(Object.create?(function(x,w){Object.defineProperty(x,"default",{enumerable:!0,value:w})}):function(x,w){x.default=w}),o=xn&&xn.__importStar||(function(){var x=function(w){return x=Object.getOwnPropertyNames||function(T){var k=[];for(var _ in T)Object.prototype.hasOwnProperty.call(T,_)&&(k[k.length]=_);return k},x(w)};return function(w){if(w&&w.__esModule)return w;var T={};if(w!=null)for(var k=x(w),_=0;_<k.length;_++)k[_]!=="default"&&n(T,w,k[_]);return r(T,w),T}})();Object.defineProperty(xn,"__esModule",{value:!0}),xn.CronFileParser=void 0;const u=Pf();let f=(b=class{static async parseFile(w){var _;const{readFile:T}=await Promise.resolve().then(()=>o(rx)),k=await T(w,"utf8");return we(_=b,h,Ff).call(_,k)}static parseFileSync(w){var _;const{readFileSync:T}=rx,k=T(w,"utf8");return we(_=b,h,Ff).call(_,k)}},h=new WeakSet,Ff=function(w){var _;const T=w.split(`
|
|
411
|
-
`),k={variables:{},expressions:[],errors:{}};for(const j of T){const C=j.trim();if(C.length===0||C.startsWith("#"))continue;const A=C.match(/^(.*)=(.*)$/);if(A){const[,G,$]=A;k.variables[G]=$.replace(/["']/g,"");continue}try{const G=we(_=b,h,Hp).call(_,C);k.expressions.push(G.interval)}catch(G){k.errors[C]=G}}return k},Hp=function(w){const T=w.split(" ");return{interval:u.CronExpressionParser.parse(T.slice(0,5).join(" ")),command:T.slice(5,T.length)}},et(b,h),b);return xn.CronFileParser=f,xn}var cx;function A2(){return cx||(cx=1,(function(n){var r=Us&&Us.__createBinding||(Object.create?(function(x,w,T,k){k===void 0&&(k=T);var _=Object.getOwnPropertyDescriptor(w,T);(!_||("get"in _?!w.__esModule:_.writable||_.configurable))&&(_={enumerable:!0,get:function(){return w[T]}}),Object.defineProperty(x,k,_)}):(function(x,w,T,k){k===void 0&&(k=T),x[k]=w[T]})),o=Us&&Us.__exportStar||function(x,w){for(var T in x)T!=="default"&&!Object.prototype.hasOwnProperty.call(w,T)&&r(w,x,T)};Object.defineProperty(n,"__esModule",{value:!0}),n.CronFileParser=n.CronExpressionParser=n.CronExpression=n.CronFieldCollection=n.CronDate=void 0;const u=Pf();var f=mh();Object.defineProperty(n,"CronDate",{enumerable:!0,get:function(){return f.CronDate}});var h=bp();Object.defineProperty(n,"CronFieldCollection",{enumerable:!0,get:function(){return h.CronFieldCollection}});var b=Cp();Object.defineProperty(n,"CronExpression",{enumerable:!0,get:function(){return b.CronExpression}});var N=Pf();Object.defineProperty(n,"CronExpressionParser",{enumerable:!0,get:function(){return N.CronExpressionParser}});var y=D2();Object.defineProperty(n,"CronFileParser",{enumerable:!0,get:function(){return y.CronFileParser}}),o(gh(),n),n.default=u.CronExpressionParser})(Us)),Us}var k2=A2();const qp=6048e5,_2=864e5,z2=6e4,U2=36e5,ux=Symbol.for("constructDateFrom");function za(n,r){return typeof n=="function"?n(r):n&&typeof n=="object"&&ux in n?n[ux](r):n instanceof Date?new n.constructor(r):new Date(r)}function Ot(n,r){return za(r||n,n)}function L2(n,r,o){return za(n,+Ot(n)+r)}function Zu(n,r,o){return L2(n,r*U2)}let H2={};function go(){return H2}function hc(n,r){var N,y,x,w;const o=go(),u=(r==null?void 0:r.weekStartsOn)??((y=(N=r==null?void 0:r.locale)==null?void 0:N.options)==null?void 0:y.weekStartsOn)??o.weekStartsOn??((w=(x=o.locale)==null?void 0:x.options)==null?void 0:w.weekStartsOn)??0,f=Ot(n,r==null?void 0:r.in),h=f.getDay(),b=(h<u?7:0)+h-u;return f.setDate(f.getDate()-b),f.setHours(0,0,0,0),f}function ro(n,r){return hc(n,{...r,weekStartsOn:1})}function Vp(n,r){const o=Ot(n,r==null?void 0:r.in),u=o.getFullYear(),f=za(o,0);f.setFullYear(u+1,0,4),f.setHours(0,0,0,0);const h=ro(f),b=za(o,0);b.setFullYear(u,0,4),b.setHours(0,0,0,0);const N=ro(b);return o.getTime()>=h.getTime()?u+1:o.getTime()>=N.getTime()?u:u-1}function ox(n){const r=Ot(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 q2(n,...r){const o=za.bind(null,r.find(u=>typeof u=="object"));return r.map(o)}function dx(n,r){const o=Ot(n,r==null?void 0:r.in);return o.setHours(0,0,0,0),o}function V2(n,r,o){const[u,f]=q2(o==null?void 0:o.in,n,r),h=dx(u),b=dx(f),N=+h-ox(h),y=+b-ox(b);return Math.round((N-y)/_2)}function B2(n,r){const o=Vp(n,r),u=za(n,0);return u.setFullYear(o,0,4),u.setHours(0,0,0,0),ro(u)}function Y2(n,r){let o,u=r==null?void 0:r.in;return n.forEach(f=>{!u&&typeof f=="object"&&(u=za.bind(null,f));const h=Ot(f,u);(!o||o<h||isNaN(+h))&&(o=h)}),za(u,o||NaN)}function $2(n,r){let o,u=r==null?void 0:r.in;return n.forEach(f=>{!u&&typeof f=="object"&&(u=za.bind(null,f));const h=Ot(f,u);(!o||o>h||isNaN(+h))&&(o=h)}),za(u,o||NaN)}function P2(n){return n instanceof Date||typeof n=="object"&&Object.prototype.toString.call(n)==="[object Date]"}function F2(n){return!(!P2(n)&&typeof n!="number"||isNaN(+Ot(n)))}function G2(n){return r=>{const u=(n?Math[n]:Math.trunc)(r);return u===0?0:u}}function Z2(n,r){return+Ot(n)-+Ot(r)}function fx(n,r,o){const u=Z2(n,r)/z2;return G2(o==null?void 0:o.roundingMethod)(u)}function W2(n,r){const o=Ot(n,r==null?void 0:r.in);return o.setFullYear(o.getFullYear(),0,1),o.setHours(0,0,0,0),o}const I2={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"}},Q2=(n,r,o)=>{let u;const f=I2[n];return typeof f=="string"?u=f:r===1?u=f.one:u=f.other.replace("{{count}}",r.toString()),o!=null&&o.addSuffix?o.comparison&&o.comparison>0?"in "+u:u+" ago":u};function _f(n){return(r={})=>{const o=r.width?String(r.width):n.defaultWidth;return n.formats[o]||n.formats[n.defaultWidth]}}const X2={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},J2={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},K2={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},ej={date:_f({formats:X2,defaultWidth:"full"}),time:_f({formats:J2,defaultWidth:"full"}),dateTime:_f({formats:K2,defaultWidth:"full"})},tj={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},aj=(n,r,o,u)=>tj[n];function rc(n){return(r,o)=>{const u=o!=null&&o.context?String(o.context):"standalone";let f;if(u==="formatting"&&n.formattingValues){const b=n.defaultFormattingWidth||n.defaultWidth,N=o!=null&&o.width?String(o.width):b;f=n.formattingValues[N]||n.formattingValues[b]}else{const b=n.defaultWidth,N=o!=null&&o.width?String(o.width):n.defaultWidth;f=n.values[N]||n.values[b]}const h=n.argumentCallback?n.argumentCallback(r):r;return f[h]}}const nj={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},lj={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},sj={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"]},rj={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"]},ij={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"}},cj={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"}},uj=(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"},oj={ordinalNumber:uj,era:rc({values:nj,defaultWidth:"wide"}),quarter:rc({values:lj,defaultWidth:"wide",argumentCallback:n=>n-1}),month:rc({values:sj,defaultWidth:"wide"}),day:rc({values:rj,defaultWidth:"wide"}),dayPeriod:rc({values:ij,defaultWidth:"wide",formattingValues:cj,defaultFormattingWidth:"wide"})};function ic(n){return(r,o={})=>{const u=o.width,f=u&&n.matchPatterns[u]||n.matchPatterns[n.defaultMatchWidth],h=r.match(f);if(!h)return null;const b=h[0],N=u&&n.parsePatterns[u]||n.parsePatterns[n.defaultParseWidth],y=Array.isArray(N)?fj(N,T=>T.test(b)):dj(N,T=>T.test(b));let x;x=n.valueCallback?n.valueCallback(y):y,x=o.valueCallback?o.valueCallback(x):x;const w=r.slice(b.length);return{value:x,rest:w}}}function dj(n,r){for(const o in n)if(Object.prototype.hasOwnProperty.call(n,o)&&r(n[o]))return o}function fj(n,r){for(let o=0;o<n.length;o++)if(r(n[o]))return o}function hj(n){return(r,o={})=>{const u=r.match(n.matchPattern);if(!u)return null;const f=u[0],h=r.match(n.parsePattern);if(!h)return null;let b=n.valueCallback?n.valueCallback(h[0]):h[0];b=o.valueCallback?o.valueCallback(b):b;const N=r.slice(f.length);return{value:b,rest:N}}}const mj=/^(\d+)(th|st|nd|rd)?/i,gj=/\d+/i,xj={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},pj={any:[/^b/i,/^(a|c)/i]},vj={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},yj={any:[/1/i,/2/i,/3/i,/4/i]},bj={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},Nj={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]},jj={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},wj={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]},Sj={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},Ej={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}},Tj={ordinalNumber:hj({matchPattern:mj,parsePattern:gj,valueCallback:n=>parseInt(n,10)}),era:ic({matchPatterns:xj,defaultMatchWidth:"wide",parsePatterns:pj,defaultParseWidth:"any"}),quarter:ic({matchPatterns:vj,defaultMatchWidth:"wide",parsePatterns:yj,defaultParseWidth:"any",valueCallback:n=>n+1}),month:ic({matchPatterns:bj,defaultMatchWidth:"wide",parsePatterns:Nj,defaultParseWidth:"any"}),day:ic({matchPatterns:jj,defaultMatchWidth:"wide",parsePatterns:wj,defaultParseWidth:"any"}),dayPeriod:ic({matchPatterns:Sj,defaultMatchWidth:"any",parsePatterns:Ej,defaultParseWidth:"any"})},Cj={code:"en-US",formatDistance:Q2,formatLong:ej,formatRelative:aj,localize:oj,match:Tj,options:{weekStartsOn:0,firstWeekContainsDate:1}};function Mj(n,r){const o=Ot(n,r==null?void 0:r.in);return V2(o,W2(o))+1}function Oj(n,r){const o=Ot(n,r==null?void 0:r.in),u=+ro(o)-+B2(o);return Math.round(u/qp)+1}function Bp(n,r){var w,T,k,_;const o=Ot(n,r==null?void 0:r.in),u=o.getFullYear(),f=go(),h=(r==null?void 0:r.firstWeekContainsDate)??((T=(w=r==null?void 0:r.locale)==null?void 0:w.options)==null?void 0:T.firstWeekContainsDate)??f.firstWeekContainsDate??((_=(k=f.locale)==null?void 0:k.options)==null?void 0:_.firstWeekContainsDate)??1,b=za((r==null?void 0:r.in)||n,0);b.setFullYear(u+1,0,h),b.setHours(0,0,0,0);const N=hc(b,r),y=za((r==null?void 0:r.in)||n,0);y.setFullYear(u,0,h),y.setHours(0,0,0,0);const x=hc(y,r);return+o>=+N?u+1:+o>=+x?u:u-1}function Rj(n,r){var N,y,x,w;const o=go(),u=(r==null?void 0:r.firstWeekContainsDate)??((y=(N=r==null?void 0:r.locale)==null?void 0:N.options)==null?void 0:y.firstWeekContainsDate)??o.firstWeekContainsDate??((w=(x=o.locale)==null?void 0:x.options)==null?void 0:w.firstWeekContainsDate)??1,f=Bp(n,r),h=za((r==null?void 0:r.in)||n,0);return h.setFullYear(f,0,u),h.setHours(0,0,0,0),hc(h,r)}function Dj(n,r){const o=Ot(n,r==null?void 0:r.in),u=+hc(o,r)-+Rj(o,r);return Math.round(u/qp)+1}function st(n,r){const o=n<0?"-":"",u=Math.abs(n).toString().padStart(r,"0");return o+u}const Gl={y(n,r){const o=n.getFullYear(),u=o>0?o:1-o;return st(r==="yy"?u%100:u,r.length)},M(n,r){const o=n.getMonth();return r==="M"?String(o+1):st(o+1,2)},d(n,r){return st(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 st(n.getHours()%12||12,r.length)},H(n,r){return st(n.getHours(),r.length)},m(n,r){return st(n.getMinutes(),r.length)},s(n,r){return st(n.getSeconds(),r.length)},S(n,r){const o=r.length,u=n.getMilliseconds(),f=Math.trunc(u*Math.pow(10,o-3));return st(f,r.length)}},qr={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},hx={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(),f=u>0?u:1-u;return o.ordinalNumber(f,{unit:"year"})}return Gl.y(n,r)},Y:function(n,r,o,u){const f=Bp(n,u),h=f>0?f:1-f;if(r==="YY"){const b=h%100;return st(b,2)}return r==="Yo"?o.ordinalNumber(h,{unit:"year"}):st(h,r.length)},R:function(n,r){const o=Vp(n);return st(o,r.length)},u:function(n,r){const o=n.getFullYear();return st(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 st(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 st(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 Gl.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 st(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 f=Dj(n,u);return r==="wo"?o.ordinalNumber(f,{unit:"week"}):st(f,r.length)},I:function(n,r,o){const u=Oj(n);return r==="Io"?o.ordinalNumber(u,{unit:"week"}):st(u,r.length)},d:function(n,r,o){return r==="do"?o.ordinalNumber(n.getDate(),{unit:"date"}):Gl.d(n,r)},D:function(n,r,o){const u=Mj(n);return r==="Do"?o.ordinalNumber(u,{unit:"dayOfYear"}):st(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 f=n.getDay(),h=(f-u.weekStartsOn+8)%7||7;switch(r){case"e":return String(h);case"ee":return st(h,2);case"eo":return o.ordinalNumber(h,{unit:"day"});case"eee":return o.day(f,{width:"abbreviated",context:"formatting"});case"eeeee":return o.day(f,{width:"narrow",context:"formatting"});case"eeeeee":return o.day(f,{width:"short",context:"formatting"});case"eeee":default:return o.day(f,{width:"wide",context:"formatting"})}},c:function(n,r,o,u){const f=n.getDay(),h=(f-u.weekStartsOn+8)%7||7;switch(r){case"c":return String(h);case"cc":return st(h,r.length);case"co":return o.ordinalNumber(h,{unit:"day"});case"ccc":return o.day(f,{width:"abbreviated",context:"standalone"});case"ccccc":return o.day(f,{width:"narrow",context:"standalone"});case"cccccc":return o.day(f,{width:"short",context:"standalone"});case"cccc":default:return o.day(f,{width:"wide",context:"standalone"})}},i:function(n,r,o){const u=n.getDay(),f=u===0?7:u;switch(r){case"i":return String(f);case"ii":return st(f,r.length);case"io":return o.ordinalNumber(f,{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 f=n.getHours()/12>=1?"pm":"am";switch(r){case"a":case"aa":return o.dayPeriod(f,{width:"abbreviated",context:"formatting"});case"aaa":return o.dayPeriod(f,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return o.dayPeriod(f,{width:"narrow",context:"formatting"});case"aaaa":default:return o.dayPeriod(f,{width:"wide",context:"formatting"})}},b:function(n,r,o){const u=n.getHours();let f;switch(u===12?f=qr.noon:u===0?f=qr.midnight:f=u/12>=1?"pm":"am",r){case"b":case"bb":return o.dayPeriod(f,{width:"abbreviated",context:"formatting"});case"bbb":return o.dayPeriod(f,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return o.dayPeriod(f,{width:"narrow",context:"formatting"});case"bbbb":default:return o.dayPeriod(f,{width:"wide",context:"formatting"})}},B:function(n,r,o){const u=n.getHours();let f;switch(u>=17?f=qr.evening:u>=12?f=qr.afternoon:u>=4?f=qr.morning:f=qr.night,r){case"B":case"BB":case"BBB":return o.dayPeriod(f,{width:"abbreviated",context:"formatting"});case"BBBBB":return o.dayPeriod(f,{width:"narrow",context:"formatting"});case"BBBB":default:return o.dayPeriod(f,{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 Gl.h(n,r)},H:function(n,r,o){return r==="Ho"?o.ordinalNumber(n.getHours(),{unit:"hour"}):Gl.H(n,r)},K:function(n,r,o){const u=n.getHours()%12;return r==="Ko"?o.ordinalNumber(u,{unit:"hour"}):st(u,r.length)},k:function(n,r,o){let u=n.getHours();return u===0&&(u=24),r==="ko"?o.ordinalNumber(u,{unit:"hour"}):st(u,r.length)},m:function(n,r,o){return r==="mo"?o.ordinalNumber(n.getMinutes(),{unit:"minute"}):Gl.m(n,r)},s:function(n,r,o){return r==="so"?o.ordinalNumber(n.getSeconds(),{unit:"second"}):Gl.s(n,r)},S:function(n,r){return Gl.S(n,r)},X:function(n,r,o){const u=n.getTimezoneOffset();if(u===0)return"Z";switch(r){case"X":return gx(u);case"XXXX":case"XX":return Ys(u);case"XXXXX":case"XXX":default:return Ys(u,":")}},x:function(n,r,o){const u=n.getTimezoneOffset();switch(r){case"x":return gx(u);case"xxxx":case"xx":return Ys(u);case"xxxxx":case"xxx":default:return Ys(u,":")}},O:function(n,r,o){const u=n.getTimezoneOffset();switch(r){case"O":case"OO":case"OOO":return"GMT"+mx(u,":");case"OOOO":default:return"GMT"+Ys(u,":")}},z:function(n,r,o){const u=n.getTimezoneOffset();switch(r){case"z":case"zz":case"zzz":return"GMT"+mx(u,":");case"zzzz":default:return"GMT"+Ys(u,":")}},t:function(n,r,o){const u=Math.trunc(+n/1e3);return st(u,r.length)},T:function(n,r,o){return st(+n,r.length)}};function mx(n,r=""){const o=n>0?"-":"+",u=Math.abs(n),f=Math.trunc(u/60),h=u%60;return h===0?o+String(f):o+String(f)+r+st(h,2)}function gx(n,r){return n%60===0?(n>0?"-":"+")+st(Math.abs(n)/60,2):Ys(n,r)}function Ys(n,r=""){const o=n>0?"-":"+",u=Math.abs(n),f=st(Math.trunc(u/60),2),h=st(u%60,2);return o+f+r+h}const xx=(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"})}},Yp=(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"})}},Aj=(n,r)=>{const o=n.match(/(P+)(p+)?/)||[],u=o[1],f=o[2];if(!f)return xx(n,r);let h;switch(u){case"P":h=r.dateTime({width:"short"});break;case"PP":h=r.dateTime({width:"medium"});break;case"PPP":h=r.dateTime({width:"long"});break;case"PPPP":default:h=r.dateTime({width:"full"});break}return h.replace("{{date}}",xx(u,r)).replace("{{time}}",Yp(f,r))},kj={p:Yp,P:Aj},_j=/^D+$/,zj=/^Y+$/,Uj=["D","DD","YY","YYYY"];function Lj(n){return _j.test(n)}function Hj(n){return zj.test(n)}function qj(n,r,o){const u=Vj(n,r,o);if(console.warn(u),Uj.includes(n))throw new RangeError(u)}function Vj(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 Bj=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Yj=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,$j=/^'([^]*?)'?$/,Pj=/''/g,Fj=/[a-zA-Z]/;function Hs(n,r,o){var w,T,k,_;const u=go(),f=u.locale??Cj,h=u.firstWeekContainsDate??((T=(w=u.locale)==null?void 0:w.options)==null?void 0:T.firstWeekContainsDate)??1,b=u.weekStartsOn??((_=(k=u.locale)==null?void 0:k.options)==null?void 0:_.weekStartsOn)??0,N=Ot(n,o==null?void 0:o.in);if(!F2(N))throw new RangeError("Invalid time value");let y=r.match(Yj).map(j=>{const C=j[0];if(C==="p"||C==="P"){const A=kj[C];return A(j,f.formatLong)}return j}).join("").match(Bj).map(j=>{if(j==="''")return{isToken:!1,value:"'"};const C=j[0];if(C==="'")return{isToken:!1,value:Gj(j)};if(hx[C])return{isToken:!0,value:j};if(C.match(Fj))throw new RangeError("Format string contains an unescaped latin alphabet character `"+C+"`");return{isToken:!1,value:j}});f.localize.preprocessor&&(y=f.localize.preprocessor(N,y));const x={firstWeekContainsDate:h,weekStartsOn:b,locale:f};return y.map(j=>{if(!j.isToken)return j.value;const C=j.value;(Hj(C)||Lj(C))&&qj(C,r,String(n));const A=hx[C[0]];return A(N,C,f.localize,x)}).join("")}function Gj(n){const r=n.match($j);return r?r[1].replace(Pj,"'"):n}function Zj(n,r){return+Ot(n)>+Ot(r)}function Wj(n,r){return+Ot(n)<+Ot(r)}function Ij(n,r){const o=Ot(n,r==null?void 0:r.in);return o.setMinutes(0,0,0),o}const zf=sp,Wu=[{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"}],ll=160,Iu=14,Qj=10,Xj=7,px=4,Jj=({configs:n,currentProjectId:r,onEditJob:o,queueStatus:u,queueAnalytics:f})=>{const h=U.useMemo(()=>Ij(new Date),[]),b=U.useMemo(()=>Zu(h,24),[h]),N=U.useMemo(()=>Zu(h,-24),[h]),y=b,x=U.useMemo(()=>{const V=[];for(let ee=0;ee<=24;ee++)V.push(Zu(h,ee));return V},[h]),w=U.useMemo(()=>{const V=[];return n.forEach(({projectId:ee,config:Y})=>{var te,O,le,ne,he;const W={executor:Y.executorEnabled!==!1?Y.cronSchedule:null,reviewer:Y.reviewerEnabled?Y.reviewerSchedule:null,qa:Y.qa.enabled?Y.qa.schedule:null,audit:Y.audit.enabled?Y.audit.schedule:null,slicer:Y.roadmapScanner.enabled?Y.roadmapScanner.slicerSchedule:null,analytics:(te=Y.analytics)!=null&&te.enabled?(O=Y.analytics)==null?void 0:O.schedule:null,"pr-resolver":(le=Y.prResolver)!=null&&le.enabled?Y.prResolver.schedule:null,merger:(ne=Y.merger)!=null&&ne.enabled?(he=Y.merger)==null?void 0:he.schedule:null},R=Y.cronScheduleOffset||0;Object.entries(W).forEach(([ve,ie])=>{if(ie)try{const F=k2.CronExpressionParser.parse(ie,{currentDate:h,endDate:b});for(;F.hasNext();){const ae=F.next(),de=new Date(ae.getTime());de.setMinutes(de.getMinutes()+R),Zj(de,h)&&Wj(de,b)&&V.push({projectId:ee,jobType:ve,time:de})}}catch(F){console.error(`Failed to parse cron "${ie}" for ${ee}/${ve}`,F)}})}),V},[n,h,b]),T=U.useMemo(()=>{const V=new Set;return n.length===0||(n.every(ee=>ee.config.executorEnabled===!1)&&V.add("executor"),n.every(ee=>!ee.config.reviewerEnabled)&&V.add("reviewer"),n.every(ee=>!ee.config.qa.enabled)&&V.add("qa"),n.every(ee=>!ee.config.audit.enabled)&&V.add("audit"),n.every(ee=>!ee.config.roadmapScanner.enabled)&&V.add("slicer"),n.every(ee=>{var Y;return!((Y=ee.config.analytics)!=null&&Y.enabled)})&&V.add("analytics"),n.every(ee=>{var Y;return!((Y=ee.config.prResolver)!=null&&Y.enabled)})&&V.add("pr-resolver"),n.every(ee=>{var Y;return!((Y=ee.config.merger)!=null&&Y.enabled)})&&V.add("merger")),V},[n]),k=U.useMemo(()=>{const V=new Map;let ee=0;return n.forEach(Y=>{Y.projectId===r||(V.set(Y.projectId,ee%Wu.length),ee++)}),V},[n,r]),_=V=>fx(V,h),j=U.useMemo(()=>{const V=[];for(let ee=0;ee<=24;ee++)V.push(Zu(N,ee));return V},[N]),C=V=>{const ee=$2([Y2([V,N]),y]);return fx(ee,N)},A=U.useMemo(()=>{const V=(f==null?void 0:f.recentRuns)??[],ee=new Map;for(const Y of V){const W=Y.providerKey||"default",R=new Date(Y.startedAt*1e3),te=Y.finishedAt?new Date(Y.finishedAt*1e3):new Date;te<N||R>y||(ee.has(W)||ee.set(W,[]),ee.get(W).push({id:Y.id,jobType:Y.jobType,status:Y.status,projectPath:Y.projectPath,startedAt:R,finishedAt:te,throttledCount:Y.throttledCount}))}if(u!=null&&u.running){const Y=u.running.providerKey??"default";ee.has(Y)||ee.set(Y,[]),ee.get(Y).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(ee.entries()).sort(([Y],[W])=>Y.localeCompare(W)).map(([Y,W])=>({providerKey:Y,runs:W.sort((R,te)=>R.startedAt.getTime()-te.startedAt.getTime())}))},[y,N,f,u]),G=V=>V.split(/[-_]/).map(ee=>ee.charAt(0).toUpperCase()+ee.slice(1)).join(" "),$=n.length>1,M=s.jsx("div",{className:"absolute inset-0 flex pointer-events-none",children:x.map((V,ee)=>s.jsx("div",{className:"h-full border-l border-slate-800/20",style:{width:60}},ee))});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."})]}),$&&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(V=>V.projectId!==r).slice(0,5).map(V=>{const ee=k.get(V.projectId)??0,Y=Wu[ee],W=(V.projectId.split("/").pop()??V.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 ${Y.bg} shrink-0`}),s.jsx("span",{className:"text-[10px] text-slate-500",title:V.projectId,children:W})]},V.projectId)})]})]}),s.jsx("div",{className:"overflow-x-auto custom-scrollbar",children:s.jsxs("div",{className:"relative min-w-[1600px]",style:{width:1440+ll},children:[s.jsxs("div",{className:"h-8 border-b border-slate-800 flex",children:[s.jsx("div",{style:{width:ll},className:"shrink-0 border-r border-slate-800"}),s.jsx("div",{className:"flex-1 relative",children:x.map((V,ee)=>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:ee*60},children:s.jsx("span",{className:"text-[10px] font-mono text-slate-500",children:Hs(V,"HH:mm")})},ee))})]}),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."})}),zf.map(V=>{const ee=T.has(V.id),Y=w.filter(R=>R.jobType===V.id);if(!$)return s.jsxs("div",{className:`flex border-b border-slate-800/30 ${ee?"opacity-40":""}`,children:[s.jsxs("div",{style:{width:ll},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 ${V.color.bg} shrink-0`}),s.jsx("span",{className:"text-xs font-semibold text-slate-300",children:V.label})]}),s.jsxs("div",{className:"flex-1 relative h-10",children:[M,Y.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:ee?"Disabled":"No runs in this window"})}):Y.map((R,te)=>s.jsx("button",{type:"button",onClick:()=>o==null?void 0:o(R.projectId,R.jobType),style:{left:_(R.time)-3},className:`absolute top-1/2 -translate-y-1/2 h-4 w-6 rounded border ${V.color.bg} ${V.color.border} opacity-90 hover:opacity-100 hover:scale-110 transition-all cursor-pointer shadow-lg group`,title:`${V.label} at ${Hs(R.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:Hs(R.time,"HH:mm")})},te))]})]},V.id);const W=n.length*Iu+px*2;return s.jsxs("div",{className:`flex border-b border-slate-800/30 ${ee?"opacity-40":""}`,children:[s.jsxs("div",{style:{width:ll,height:W},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 ${V.color.bg} shrink-0`}),s.jsx("span",{className:"text-[10px] font-bold text-slate-400 uppercase tracking-wide",children:V.label})]}),n.map(R=>{const te=R.projectId===r,O=(R.projectId.split("/").pop()??R.projectId).slice(0,14),le=k.get(R.projectId)??0,ne=te?V.color.bg:Wu[le].bg;return s.jsxs("div",{style:{height:Iu},className:"flex items-center gap-1 overflow-hidden",children:[s.jsx("div",{className:`w-1 h-1 rounded-full shrink-0 ${ne}`}),s.jsx("span",{className:`text-[9px] truncate ${te?"text-slate-200 font-semibold":"text-slate-600"}`,title:R.projectId,children:te?`${O} ★`:O})]},R.projectId)})]}),s.jsxs("div",{className:"flex-1 relative",style:{height:W},children:[M,n.map((R,te)=>{const O=R.projectId===r,le=Y.filter(ae=>ae.projectId===R.projectId),ne=px+te*Iu,he=O?Qj:Xj,ve=Math.floor((Iu-he)/2),ie=k.get(R.projectId)??0,F=O?{bg:V.color.bg,border:V.color.border}:Wu[ie];return s.jsxs(_e.Fragment,{children:[te>0&&s.jsx("div",{className:"absolute left-0 right-0 border-t border-slate-800/20 pointer-events-none",style:{top:ne}}),le.map((ae,de)=>s.jsx("button",{type:"button",onClick:()=>o==null?void 0:o(R.projectId,ae.jobType),style:{left:_(ae.time)-3,top:ne+ve,height:he},className:`absolute w-6 rounded border ${F.bg} ${F.border} ${O?"opacity-90":"opacity-50"} hover:opacity-100 hover:z-10 transition-all cursor-pointer group`,title:`${R.projectId} · ${V.label} @ ${Hs(ae.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:Hs(ae.time,"HH:mm")})},de))]},R.projectId)}),Y.length===0&&!ee&&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"})})]})]},V.id)})]}),s.jsx("div",{className:"absolute top-0 bottom-0 w-px bg-rose-500/50 z-10 pointer-events-none",style:{left:ll+_(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"})]}),$&&s.jsx("div",{className:"flex items-center gap-1.5",children:s.jsx("span",{children:"★ = current project · blocks in same column = scheduling overlap"})})]}),A.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:[(f==null?void 0:f.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+ll},children:[s.jsxs("div",{className:"h-8 border-b border-slate-800 flex",children:[s.jsx("div",{style:{width:ll},className:"shrink-0 border-r border-slate-800"}),s.jsx("div",{className:"flex-1 relative flex",children:j.map((V,ee)=>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:ee*60},children:s.jsx("span",{className:"text-[10px] font-mono text-slate-500",children:Hs(V,"HH:mm")})},ee))})]}),s.jsx("div",{className:"relative",children:A.map(({providerKey:V,runs:ee})=>s.jsxs("div",{className:"flex border-b border-slate-800/30 min-h-14","data-testid":`provider-execution-lane-${V}`,children:[s.jsxs("div",{style:{width:ll},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:V,children:G(V)}),s.jsx("span",{className:"text-[10px] text-slate-500 font-mono truncate",children:V})]}),s.jsxs("div",{className:"flex-1 relative h-14",children:[s.jsx("div",{className:"absolute inset-0 flex pointer-events-none",children:j.map((Y,W)=>s.jsx("div",{className:"h-full border-l border-slate-800/20",style:{width:60}},W))}),ee.map(Y=>{const W=zf.find(ie=>ie.id===Y.jobType)??zf[0],R=C(Y.startedAt),te=C(Y.finishedAt),O=Math.max(te-R,8),le=Y.status==="running",ne=Y.status==="error"||Y.status==="failed"||Y.status==="errored",he=le?"bg-green-500":ne?"bg-red-500":W.color.bg,ve=le?"border-green-400/60":ne?"border-red-400/60":W.color.border;return s.jsx("div",{className:`absolute top-1/2 -translate-y-1/2 h-8 rounded border ${he} ${ve} opacity-85 shadow-lg ${le?"animate-pulse":""}`,style:{left:R,width:O},title:`${V} • ${W.label} • ${Hs(Y.startedAt,"MMM d HH:mm")} • ${Y.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:W.label}),s.jsx("span",{className:"text-white/70",children:Y.status}),Y.throttledCount>0&&s.jsxs("span",{className:"text-yellow-100",children:["throttle ",Y.throttledCount,"x"]})]})},`${V}-${Y.id}-${Y.startedAt.getTime()}`)})]})]},V))}),s.jsx("div",{className:"absolute top-0 bottom-0 w-px bg-rose-500/50 z-10 pointer-events-none",style:{left:ll+C(new Date)},children:s.jsx("div",{className:"absolute top-0 h-2 w-2 rounded-full bg-rose-500 -translate-x-1/2"})})]})})]})]})},io=[{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"}],xh=[{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 * * *"},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"}},{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 * * *"},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"}},{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"},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"}},{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 * * *"},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"}}];function Br(n){return n?n.trim().replace(/\s+/g," "):""}function qs(n,r){return Br(n)===Br(r)}function Gf(n){if(n)return xh.find(r=>r.id===n)}function $p(n,r,o,u,f,h,b,N){return qs(n.schedules.executor,r)&&qs(n.schedules.reviewer,o)&&qs(n.schedules.qa,u)&&qs(n.schedules.audit,f)&&qs(n.schedules.slicer,h)&&qs(n.schedules.prResolver,b)&&qs(n.schedules.merger,N)}function Kj(n,r,o,u,f,h,b){return xh.find(N=>$p(N,n,r,o,u,f,h,b))}function ew(n,r,o,u,f,h,b,N){const y=Gf(n);return y&&$p(y,r,o,u,f,h,b,N)?y:Kj(r,o,u,f,h,b,N)}function ia(n){const r=Br(n),o=r.split(/\s+/);if(o.length!==5)return r;const[u,f,h,b,N]=o,y=/^\d+$/.test(u),x=io.find(w=>Br(w.value)===r);if(x)return x.label;if(u==="*/30"&&f==="*")return"Every 30 minutes";if(u==="0"&&f==="*")return"Every hour";if(u.startsWith("*/"))return`Every ${parseInt(u.replace("*/",""),10)} minutes`;if(y&&f.startsWith("*/")&&h==="*"&&b==="*"&&N==="*"){const w=parseInt(f.replace("*/",""),10);return u==="0"?`Every ${w} hours`:`Every ${w} hours at :${u.padStart(2,"0")}`}if(u==="0"&&f.startsWith("*/"))return`Every ${parseInt(f.replace("*/",""),10)} hours`;if(u==="0"&&f.includes("-")){const[w,T]=f.split("-");return`Every hour from ${cc(w)} to ${cc(T)}`}if(y&&f.includes("-")&&h==="*"&&b==="*"&&N==="*"){const[w,T]=f.split("-");return`Every hour from ${uc(w,u)} to ${uc(T,u)}`}if(u==="0"&&f.includes(",")){const w=f.split(",").map(cc);return w.length<=3?`At ${w.join(" and ")}`:`At ${w.slice(0,-1).join(", ")}, and ${w[w.length-1]}`}if(y&&f.includes(",")&&h==="*"&&b==="*"&&(N==="*"||N==="1-5")){const w=f.split(",").map(k=>uc(k,u)),T=N==="1-5"?"Weekdays at ":"At ";return w.length<=3?`${T}${w.join(" and ")}`:`${T}${w.slice(0,-1).join(", ")}, and ${w[w.length-1]}`}return u==="0"&&f!=="*"&&h==="*"&&b==="*"&&N==="*"?`Daily at ${cc(f)}`:y&&f!=="*"&&h==="*"&&b==="*"&&N==="*"?`Daily at ${uc(f,u)}`:u==="0"&&f!=="*"&&h==="*"&&b==="*"&&N==="1-5"?`Weekdays at ${cc(f)}`:y&&f!=="*"&&h==="*"&&b==="*"&&N==="1-5"?`Weekdays at ${uc(f,u)}`:r}function cc(n){const r=parseInt(n,10);return r===0?"12 AM":r<12?`${r} AM`:r===12?"12 PM":`${r-12} PM`}function uc(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 tw(n){const r=Br(n),o=io.find(u=>Br(u.value)===r);return(o==null?void 0:o.value)??"__custom__"}function vx(n){const r=new Date,o=n.getTime()-r.getTime(),u=Math.floor(o/6e4),f=Math.floor(u/60),h=Math.floor(f/24);return u<1?"less than a minute":u<60?`in ${u} minute${u>1?"s":""}`:f<24?`in ${f} hour${f>1?"s":""}`:`in ${h} day${h>1?"s":""}`}const aw=({label:n,value:r,onChange:o,helperText:u,placeholder:f="5 */3 * * *"})=>{const h=tw(r),b=h==="__custom__",N=w=>{w!=="__custom__"&&o(w)},y=w=>{o(w.target.value)},x=io.find(w=>w.value===h);return s.jsxs("div",{className:"space-y-3",children:[s.jsx(rt,{label:n,value:h,onChange:N,options:io.map(w=>({label:w.label,value:w.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(Ae,{label:"Cron Expression",value:r,onChange:y,placeholder:f}),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)"]})]})]})},Zl=({id:n,icon:r,title:o,description:u,value:f,onChange:h})=>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(aw,{label:"",value:f,onChange:h})]}),nw=({form:n,scheduleMode:r,selectedTemplateId:o,onFieldChange:u,onSwitchToTemplate:f,onSwitchToCustom:h,onApplyTemplate:b})=>s.jsxs(ot,{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:f,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:h,children:"Custom"})]})]}),r==="template"?s.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3",children:xh.map(N=>{const y=o===N.id;return s.jsxs("button",{type:"button",onClick:()=>b(N),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:N.label}),s.jsx("p",{className:"text-xs text-slate-400 mb-3",children:N.description}),s.jsx("div",{className:"space-y-0.5",children:[["Executor",N.hints.executor],["Reviewer",N.hints.reviewer],["QA",N.hints.qa],["Audit",N.hints.audit],["Planner",N.hints.slicer],["PR Resolver",N.hints.prResolver],["Merger",N.hints.merger]].map(([x,w])=>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:w})]},x))})]},N.id)})}):s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[s.jsx(Zl,{id:"job-schedule-executor",icon:pn,title:"PRD Executor",description:"Executes PRDs to generate code and create PRs",value:n.cronSchedule,onChange:N=>u("cronSchedule",N)}),s.jsx(Zl,{id:"job-schedule-reviewer",icon:rh,title:"PR Reviewer",description:"Reviews PRs and provides feedback or automated fixes",value:n.reviewerSchedule,onChange:N=>u("reviewerSchedule",N)}),s.jsx(Zl,{id:"job-schedule-qa",icon:Kx,title:"Quality Assurance",description:"Automated UI testing using Playwright",value:n.qa.schedule,onChange:N=>u("qa",{...n.qa,schedule:N})}),s.jsx(Zl,{id:"job-schedule-audit",icon:Fr,title:"Code Audit",description:"Automated code quality and security audits",value:n.audit.schedule,onChange:N=>u("audit",{...n.audit,schedule:N})}),s.jsx(Zl,{id:"job-schedule-slicer",icon:ch,title:"Planner",description:"Generate PRDs from ROADMAP.md or audit findings",value:n.roadmapScanner.slicerSchedule,onChange:N=>u("roadmapScanner",{...n.roadmapScanner,slicerSchedule:N})}),n.analytics&&s.jsx(Zl,{id:"job-schedule-analytics",icon:lh,title:"Analytics",description:"Fetch Amplitude data, analyze with AI, and create issues",value:n.analytics.schedule,onChange:N=>u("analytics",{...n.analytics,schedule:N})}),n.prResolver&&s.jsx(Zl,{id:"job-schedule-pr-resolver",icon:ih,title:"PR Resolver",description:"Rebases PRs and applies review feedback",value:n.prResolver.schedule,onChange:N=>u("prResolver",{...n.prResolver,schedule:N})}),n.merger&&s.jsx(Zl,{id:"job-schedule-merger",icon:ho,title:"Merge Orchestrator",description:"Scans, rebases, and merges approved PRs",value:n.merger.schedule,onChange:N=>u("merger",{...n.merger,schedule:N})})]})]}),dc=({label:n,value:r=[],onChange:o,placeholder:u,helpText:f})=>{const[h,b]=_e.useState(""),N=()=>{h.trim()&&!r.includes(h.trim())&&(o([...r,h.trim()]),b(""))},y=w=>{o(r.filter(T=>T!==w))},x=w=>{w.key==="Enter"&&(w.preventDefault(),N())};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(w=>s.jsxs("span",{className:"inline-flex items-center gap-1 px-2 py-1 bg-slate-800 rounded text-sm text-slate-300",children:[w,s.jsx("button",{type:"button",onClick:()=>y(w),className:"text-slate-500 hover:text-red-400","aria-label":`Remove ${w}`,title:`Remove ${w}`,children:s.jsx(Gr,{className:"h-3 w-3"})})]},w))}),s.jsxs("div",{className:"flex gap-2",children:[s.jsx("input",{type:"text",value:h,onChange:w=>b(w.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(qe,{onClick:N,disabled:!h.trim(),"aria-label":`Add ${n.toLowerCase()} value`,children:s.jsx(Kl,{className:"h-4 w-4"})})]}),f&&s.jsx("p",{className:"text-xs text-slate-500 mt-1",children:f})]})},Wl=({title:n,icon:r,description:o,enabled:u,onToggle:f,expanded:h,onExpandChange:b,scheduleSummary:N,providerLabel:y,children:x,id:w})=>s.jsxs("div",{id:w,className:`border border-slate-800 rounded-xl overflow-hidden transition-all duration-200 ${h?"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(!h),children:[s.jsxs("div",{className:"flex items-center gap-3 overflow-hidden",children:[s.jsx("div",{className:`p-2 rounded-lg ${h?"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}),!h&&s.jsx("p",{className:"text-xs text-slate-500 truncate",children:o})]})]}),s.jsxs("div",{className:"flex items-center gap-4 shrink-0",children:[!h&&s.jsxs("div",{className:"hidden sm:flex items-center gap-2",children:[N&&s.jsx(Qa,{variant:"neutral",className:"bg-slate-800/50 text-[10px]",children:N}),y&&s.jsx(Qa,{variant:"info",className:"bg-blue-500/5 text-[10px]",children:y})]}),s.jsx("div",{onClick:T=>T.stopPropagation(),children:s.jsx(ca,{checked:u,onChange:f})}),s.jsx(sh,{className:`h-5 w-5 text-slate-500 transition-transform duration-300 ${h?"rotate-180 text-indigo-400":""}`})]})]}),s.jsx("div",{className:`grid transition-all duration-300 ease-in-out ${h?"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})})})})]}),Il=({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(qe,{variant:"outline",size:"sm",onClick:r,className:"border-slate-700 text-slate-300 hover:bg-slate-800",children:"Open Schedules"})]}),lw=({form:n,updateField:r,handleRoadmapToggle:o,presetOptions:u,expandedJob:f,onExpandedJobChange:h,onOpenSchedule:b})=>{var x,w,T,k,_,j,C,A,G,$;const N=(M,V)=>{const ee={...n.jobProviders};V===""?delete ee[M]:ee[M]=V,r("jobProviders",ee)},y=[{label:"Use Global (default)",value:""},...u];return s.jsx("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:"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:"8 total jobs"})]}),s.jsx(Wl,{id:"job-section-executor",title:"PRD Executor",icon:pn,description:"Executes PRDs to generate code and create PRs",enabled:n.executorEnabled,onToggle:M=>r("executorEnabled",M),expanded:f==="executor",onExpandChange:M=>h(M?"executor":null),scheduleSummary:ia(n.cronSchedule),providerLabel:n.jobProviders.executor?(x=u.find(M=>M.value===n.jobProviders.executor))==null?void 0:x.label:"Global",children:s.jsxs("div",{className:"space-y-6",children:[s.jsx(Il,{summary:ia(n.cronSchedule),onOpen:()=>b("executor")}),s.jsxs("div",{className:"grid grid-cols-1 gap-6 md:grid-cols-2",children:[s.jsx(rt,{label:"Provider",value:n.jobProviders.executor??"",onChange:M=>N("executor",M),options:y}),s.jsx(Ae,{label:"Max Runtime",type:"number",value:String(n.maxRuntime),onChange:M=>r("maxRuntime",Number(M.target.value||0)),rightIcon:s.jsx("span",{className:"text-xs",children:"sec"}),helperText:"Maximum runtime for executor tasks"})]})]})}),s.jsx(Wl,{id:"job-section-reviewer",title:"PR Reviewer",icon:rh,description:"Reviews PRs and provides feedback or automated fixes",enabled:n.reviewerEnabled,onToggle:M=>r("reviewerEnabled",M),expanded:f==="reviewer",onExpandChange:M=>h(M?"reviewer":null),scheduleSummary:ia(n.reviewerSchedule),providerLabel:n.jobProviders.reviewer?(w=u.find(M=>M.value===n.jobProviders.reviewer))==null?void 0:w.label:"Global",children:s.jsxs("div",{className:"space-y-6",children:[s.jsx(Il,{summary:ia(n.reviewerSchedule),onOpen:()=>b("reviewer")}),s.jsxs("div",{className:"grid grid-cols-1 gap-6 md:grid-cols-2",children:[s.jsx(rt,{label:"Provider",value:n.jobProviders.reviewer??"",onChange:M=>N("reviewer",M),options:y}),s.jsx(Ae,{label:"Max Runtime",type:"number",value:String(n.reviewerMaxRuntime),onChange:M=>r("reviewerMaxRuntime",Number(M.target.value||0)),rightIcon:s.jsx("span",{className:"text-xs",children:"sec"})}),s.jsx(Ae,{label:"Min Review Score",type:"number",min:"0",max:"100",value:String(n.minReviewScore),onChange:M=>r("minReviewScore",Number(M.target.value||0)),helperText:"PRs below this score will be marked as 'Needs Work'"}),s.jsx(Ae,{label:"Max Retries",type:"number",value:String(n.reviewerMaxRetries),onChange:M=>r("reviewerMaxRetries",Number(M.target.value||0)),helperText:"Fix attempts after initial review"}),s.jsx(Ae,{label:"Retry Delay",type:"number",value:String(n.reviewerRetryDelay),onChange:M=>r("reviewerRetryDelay",Number(M.target.value||0)),rightIcon:s.jsx("span",{className:"text-xs",children:"sec"})}),s.jsx("div",{className:"md:col-span-2",children:s.jsx(Ae,{label:"Max PRs Per Run",type:"number",value:String(n.reviewerMaxPrsPerRun),onChange:M=>r("reviewerMaxPrsPerRun",Number(M.target.value||0)),helperText:"Hard cap on PRs processed per run (0 = unlimited)"})})]})]})}),s.jsx(Wl,{id:"job-section-qa",title:"Quality Assurance",icon:Kx,description:"Automated UI testing using Playwright",enabled:n.qa.enabled,onToggle:M=>r("qa",{...n.qa,enabled:M}),expanded:f==="qa",onExpandChange:M=>h(M?"qa":null),scheduleSummary:ia(n.qa.schedule),providerLabel:n.jobProviders.qa?(T=u.find(M=>M.value===n.jobProviders.qa))==null?void 0:T.label:"Global",children:s.jsxs("div",{className:"space-y-6",children:[s.jsx(Il,{summary:ia(n.qa.schedule),onOpen:()=>b("qa")}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsx(rt,{label:"Provider",value:n.jobProviders.qa??"",onChange:M=>N("qa",M),options:y}),s.jsx(Ae,{label:"Max Runtime",type:"number",value:String(n.qa.maxRuntime),onChange:M=>r("qa",{...n.qa,maxRuntime:Number(M.target.value||0)}),rightIcon:s.jsx("span",{className:"text-xs",children:"sec"})}),s.jsx(rt,{label:"Artifacts",value:n.qa.artifacts,onChange:M=>r("qa",{...n.qa,artifacts:M}),options:[{label:"Screenshots",value:"screenshot"},{label:"Videos",value:"video"},{label:"Both",value:"both"}]}),s.jsx(Ae,{label:"Skip Label",value:n.qa.skipLabel,onChange:M=>r("qa",{...n.qa,skipLabel:M.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(ca,{checked:n.qa.autoInstallPlaywright,onChange:M=>r("qa",{...n.qa,autoInstallPlaywright:M})})]})]}),s.jsx(dc,{label:"QA Branch Patterns",value:n.qa.branchPatterns,onChange:M=>r("qa",{...n.qa,branchPatterns:M}),placeholder:"e.g., qa/, test/",helpText:"Branch patterns to match for QA"})]})}),s.jsx(Wl,{id:"job-section-audit",title:"Code Audit",icon:Fr,description:"Automated code quality and security audits",enabled:n.audit.enabled,onToggle:M=>r("audit",{...n.audit,enabled:M}),expanded:f==="audit",onExpandChange:M=>h(M?"audit":null),scheduleSummary:ia(n.audit.schedule),providerLabel:n.jobProviders.audit?(k=u.find(M=>M.value===n.jobProviders.audit))==null?void 0:k.label:"Global",children:s.jsxs("div",{className:"space-y-6",children:[s.jsx(Il,{summary:ia(n.audit.schedule),onOpen:()=>b("audit")}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsx(rt,{label:"Provider",value:n.jobProviders.audit??"",onChange:M=>N("audit",M),options:y}),s.jsx(Ae,{label:"Max Runtime",type:"number",value:String(n.audit.maxRuntime),onChange:M=>r("audit",{...n.audit,maxRuntime:Number(M.target.value||0)}),rightIcon:s.jsx("span",{className:"text-xs",children:"sec"})}),s.jsx(rt,{label:"Target Column",value:n.audit.targetColumn,onChange:M=>r("audit",{...n.audit,targetColumn:M}),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(Wl,{id:"job-section-slicer",title:"Planner",icon:ch,description:"Generate one PRD per run using ROADMAP.md or audit findings",enabled:n.roadmapScanner.enabled,onToggle:o,expanded:f==="slicer",onExpandChange:M=>h(M?"slicer":null),scheduleSummary:ia(n.roadmapScanner.slicerSchedule),providerLabel:n.jobProviders.slicer?(_=u.find(M=>M.value===n.jobProviders.slicer))==null?void 0:_.label:"Global",children:s.jsxs("div",{className:"space-y-6",children:[s.jsx(Il,{summary:ia(n.roadmapScanner.slicerSchedule),onOpen:()=>b("slicer")}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsx(rt,{label:"Provider",value:n.jobProviders.slicer??"",onChange:M=>N("slicer",M),options:y}),s.jsx(Ae,{label:"Roadmap File Path",value:n.roadmapScanner.roadmapPath,onChange:M=>r("roadmapScanner",{...n.roadmapScanner,roadmapPath:M.target.value}),helperText:"Primary planning source (relative to project root)."}),s.jsx(Ae,{label:"Max Runtime",type:"number",value:String(n.roadmapScanner.slicerMaxRuntime||""),onChange:M=>r("roadmapScanner",{...n.roadmapScanner,slicerMaxRuntime:Number(M.target.value||0)}),rightIcon:s.jsx("span",{className:"text-xs",children:"sec"})}),s.jsx(rt,{label:"Priority Mode",value:n.roadmapScanner.priorityMode||"roadmap-first",onChange:M=>r("roadmapScanner",{...n.roadmapScanner,priorityMode:M==="audit-first"?"audit-first":"roadmap-first"}),options:[{label:"Roadmap first (recommended)",value:"roadmap-first"},{label:"Audit first",value:"audit-first"}]}),s.jsx(rt,{label:"Issue Column",value:n.roadmapScanner.issueColumn||"Ready",onChange:M=>r("roadmapScanner",{...n.roadmapScanner,issueColumn:M==="Draft"?"Draft":"Ready"}),options:[{label:"Ready (default)",value:"Ready"},{label:"Draft",value:"Draft"}]})]})]})}),s.jsx(Wl,{id:"job-section-analytics",title:"Analytics (Amplitude)",icon:lh,description:"Fetch Amplitude data, analyze with AI, and create board issues",enabled:n.analytics.enabled,onToggle:M=>r("analytics",{...n.analytics,enabled:M}),expanded:f==="analytics",onExpandChange:M=>h(M?"analytics":null),scheduleSummary:ia(n.analytics.schedule),providerLabel:n.jobProviders.analytics?(j=u.find(M=>M.value===n.jobProviders.analytics))==null?void 0:j.label:"Global",children:s.jsxs("div",{className:"space-y-6",children:[s.jsx(Il,{summary:ia(n.analytics.schedule),onOpen:()=>b("analytics")}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsx(rt,{label:"Provider",value:n.jobProviders.analytics??"",onChange:M=>N("analytics",M),options:y}),s.jsx(Ae,{label:"Amplitude API Key",value:((C=n.providerEnv)==null?void 0:C.AMPLITUDE_API_KEY)??"",onChange:M=>r("providerEnv",{...n.providerEnv,AMPLITUDE_API_KEY:M.target.value}),placeholder:"Required"}),s.jsx(Ae,{label:"Amplitude Secret Key",type:"password",value:((A=n.providerEnv)==null?void 0:A.AMPLITUDE_SECRET_KEY)??"",onChange:M=>r("providerEnv",{...n.providerEnv,AMPLITUDE_SECRET_KEY:M.target.value}),placeholder:"Required"}),s.jsx(Ae,{label:"Max Runtime",type:"number",value:String(n.analytics.maxRuntime),onChange:M=>r("analytics",{...n.analytics,maxRuntime:Number(M.target.value||0)}),rightIcon:s.jsx("span",{className:"text-xs",children:"sec"})}),s.jsx(Ae,{label:"Lookback Days",type:"number",min:"1",max:"90",value:String(n.analytics.lookbackDays),onChange:M=>r("analytics",{...n.analytics,lookbackDays:Math.max(1,Math.min(90,Number(M.target.value||7)))})}),s.jsx(rt,{label:"Target Column",value:n.analytics.targetColumn,onChange:M=>r("analytics",{...n.analytics,targetColumn:M}),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:M=>r("analytics",{...n.analytics,analysisPrompt:M.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(Wl,{id:"job-section-pr-resolver",title:"PR Resolver",icon:ih,description:"Repo-wide conflict resolver that rebases PRs and applies feedback",enabled:n.prResolver.enabled,onToggle:M=>r("prResolver",{...n.prResolver,enabled:M}),expanded:f==="pr-resolver",onExpandChange:M=>h(M?"pr-resolver":null),scheduleSummary:ia(n.prResolver.schedule),providerLabel:n.jobProviders["pr-resolver"]?(G=u.find(M=>M.value===n.jobProviders["pr-resolver"]))==null?void 0:G.label:"Global",children:s.jsxs("div",{className:"space-y-6",children:[s.jsx(Il,{summary:ia(n.prResolver.schedule),onOpen:()=>b("pr-resolver")}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsx(rt,{label:"Provider",value:n.jobProviders["pr-resolver"]??"",onChange:M=>N("pr-resolver",M),options:y}),s.jsx(Ae,{label:"Max Runtime",type:"number",value:String(n.prResolver.maxRuntime),onChange:M=>r("prResolver",{...n.prResolver,maxRuntime:Number(M.target.value||0)}),rightIcon:s.jsx("span",{className:"text-xs",children:"sec"})}),s.jsx(Ae,{label:"Per-PR Timeout",type:"number",value:String(n.prResolver.perPrTimeout),onChange:M=>r("prResolver",{...n.prResolver,perPrTimeout:Math.max(0,Number(M.target.value||0))}),rightIcon:s.jsx("span",{className:"text-xs",children:"sec"})}),s.jsx(Ae,{label:"Max PRs Per Run",type:"number",min:"0",value:String(n.prResolver.maxPrsPerRun),onChange:M=>r("prResolver",{...n.prResolver,maxPrsPerRun:Math.max(0,Number(M.target.value||0))})}),s.jsx(Ae,{label:"Ready Label",value:n.prResolver.readyLabel,onChange:M=>r("prResolver",{...n.prResolver,readyLabel:M.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(ca,{checked:n.prResolver.aiConflictResolution,onChange:M=>r("prResolver",{...n.prResolver,aiConflictResolution:M})})]}),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(ca,{checked:n.prResolver.aiReviewResolution,onChange:M=>r("prResolver",{...n.prResolver,aiReviewResolution:M})})]})]}),s.jsx(dc,{label:"PR Resolver Branch Patterns",value:n.prResolver.branchPatterns,onChange:M=>r("prResolver",{...n.prResolver,branchPatterns:M}),placeholder:"e.g., feat/, night-watch/",helpText:"Branch patterns to filter PRs (empty = all)"})]})}),s.jsx(Wl,{id:"job-section-merger",title:"Merge Orchestrator",icon:ho,description:"Repo-wide PR merge coordinator — scans, rebases, and merges",enabled:n.merger.enabled,onToggle:M=>r("merger",{...n.merger,enabled:M}),expanded:f==="merger",onExpandChange:M=>h(M?"merger":null),scheduleSummary:ia(n.merger.schedule),providerLabel:n.jobProviders.merger?($=u.find(M=>M.value===n.jobProviders.merger))==null?void 0:$.label:"Global",children:s.jsxs("div",{className:"space-y-6",children:[s.jsx(Il,{summary:ia(n.merger.schedule),onOpen:()=>b("merger")}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsx(rt,{label:"Provider",value:n.jobProviders.merger??"",onChange:M=>N("merger",M),options:y}),s.jsx(Ae,{label:"Max Runtime",type:"number",value:String(n.merger.maxRuntime),onChange:M=>r("merger",{...n.merger,maxRuntime:Number(M.target.value||0)}),rightIcon:s.jsx("span",{className:"text-xs",children:"sec"})}),s.jsx(rt,{label:"Merge Method",value:n.merger.mergeMethod,onChange:M=>r("merger",{...n.merger,mergeMethod:M}),options:[{label:"Squash",value:"squash"},{label:"Merge",value:"merge"},{label:"Rebase",value:"rebase"}]}),s.jsx(Ae,{label:"Min Review Score",type:"number",min:"0",max:"100",value:String(n.merger.minReviewScore),onChange:M=>r("merger",{...n.merger,minReviewScore:Math.max(0,Math.min(100,Number(M.target.value||0)))})}),s.jsx(Ae,{label:"Max PRs Per Run",type:"number",min:"0",value:String(n.merger.maxPrsPerRun),onChange:M=>r("merger",{...n.merger,maxPrsPerRun:Math.max(0,Number(M.target.value||0))})})]}),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(ca,{checked:n.merger.rebaseBeforeMerge,onChange:M=>r("merger",{...n.merger,rebaseBeforeMerge:M})})]}),s.jsx(dc,{label:"Merger Branch Patterns",value:n.merger.branchPatterns,onChange:M=>r("merger",{...n.merger,branchPatterns:M}),placeholder:"e.g., feat/, night-watch/"})]})})]})})},Pp="5 * * * *",Fp="25 */3 * * *",sw={enabled:!0,roadmapPath:"ROADMAP.md",autoScanInterval:300,slicerSchedule:"35 */6 * * *",slicerMaxRuntime:600,priorityMode:"roadmap-first",issueColumn:"Ready"},yx={enabled:!0,schedule:"45 2,10,18 * * *",maxRuntime:3600,branchPatterns:[],artifacts:"both",skipLabel:"skip-qa",autoInstallPlaywright:!0},rw={enabled:!0,schedule:"50 3 * * 1",maxRuntime:1800,targetColumn:"Draft"},iw={enabled:!1,schedule:"0 6 * * 1",maxRuntime:900,lookbackDays:7,targetColumn:"Draft",analysisPrompt:""},bx={enabled:!0,schedule:"15 6,14,22 * * *",maxRuntime:3600,branchPatterns:[],maxPrsPerRun:0,perPrTimeout:600,aiConflictResolution:!0,aiReviewResolution:!1,readyLabel:"ready-to-merge"},Nx={enabled:!1,schedule:"55 */4 * * *",maxRuntime:1800,mergeMethod:"squash",minReviewScore:80,branchPatterns:[],rebaseBeforeMerge:!0,maxPrsPerRun:0};function Yr(){return{...sw}}function Gp(){return{...yx,branchPatterns:[...yx.branchPatterns]}}function Zp(){return{...rw}}function ph(){return{...iw}}function mc(){return{...bx,branchPatterns:[...bx.branchPatterns]}}function xo(){return{...Nx,branchPatterns:[...Nx.branchPatterns]}}const co=["claude","claude-sonnet-4-6","claude-opus-4-6","codex","glm-47","glm-5"],Wp={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"}}},cw={enabled:!0,mode:"conservative",maxConcurrency:1,maxWaitTime:7200,priority:{executor:50,reviewer:40,slicer:30,qa:20,audit:10},providerBuckets:{}},uw=["executor","reviewer","qa","audit","slicer","analytics","pr-resolver","merger"],ow=new Set(["overview","schedules","jobs"]),Uf=n=>{if(!n)return null;const r=n==="planner"?"slicer":n;return["executor","reviewer","qa","audit","slicer","analytics","pr-resolver","merger"].includes(r)?r:null},Qu=n=>({cronSchedule:n.cronSchedule||Pp,reviewerSchedule:n.reviewerSchedule||Fp,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||Gp(),audit:n.audit||Zp(),analytics:n.analytics||ph(),prResolver:n.prResolver??mc(),merger:n.merger??xo(),roadmapScanner:n.roadmapScanner||Yr(),queue:n.queue||cw}),eo=n=>{var r,o;return ew(n.scheduleBundleId,n.cronSchedule,n.reviewerSchedule,n.qa.schedule,n.audit.schedule,n.roadmapScanner.slicerSchedule??Yr().slicerSchedule,((r=n.prResolver)==null?void 0:r.schedule)??mc().schedule,((o=n.merger)==null?void 0:o.schedule)??xo().schedule)},Xu=n=>{const r=eo(n);return!n.scheduleBundleId&&r?{form:{...n,scheduleBundleId:r.id},detectedTemplate:r}:{form:n,detectedTemplate:r}},dw=()=>{var _n,Ws,ul,Ie,ol,mt,Vt,At,kt;const n=kn(),{addToast:r,selectedProjectId:o,globalModeLoading:u}=Wt(),[f,h]=U.useState(!1),[b,N]=U.useState(!1),[y,x]=U.useState(!1),[w,T]=U.useState(null),[k,_]=U.useState([]),[j,C]=U.useState(null),[A,G]=U.useState(null),[$,M]=U.useState("overview"),[V,ee]=U.useState(null),[Y,W]=U.useState(null),[R,te]=U.useState(null),[O,le]=U.useState("template"),[ne,he]=U.useState(""),[ve,ie]=U.useState(!1),[F,ae]=U.useState(!1),de=U.useRef(null),me=U.useRef(!1),ze=U.useRef(null),{data:L,loading:se,error:ge,refetch:pe}=vn(up,[o],{enabled:!u}),{data:Se,loading:xe,refetch:Te}=vn(hh,[o],{enabled:!u});U.useEffect(()=>{if(u)return;const oe=()=>{pe(),Vg().then(C).catch(()=>{}),YN(24).then(G).catch(()=>{}),_N().then(_).catch(()=>{})};oe();const Ne=setInterval(oe,3e4);return()=>clearInterval(Ne)},[o,u,pe]),U.useEffect(()=>{if(!Se)return;if(me.current){me.current=!1;return}const{form:oe,detectedTemplate:Ne}=Xu(Qu(Se));te(oe),de.current=oe,le(Ne?"template":"custom"),he((Ne==null?void 0:Ne.id)??""),ie(!1)},[Se]),U.useEffect(()=>{!R||!de.current||ie(JSON.stringify(R)!==JSON.stringify(de.current))},[R]),U.useEffect(()=>{if($!=="jobs"||!V)return;const oe=window.setTimeout(()=>{const Ne=document.getElementById(`job-section-${V}`);Ne&&Ne.scrollIntoView({behavior:"smooth",block:"center"})},100);return()=>window.clearTimeout(oe)},[$,V]),U.useEffect(()=>{if($!=="schedules"||O!=="custom"||!Y)return;const oe=Y,Ne=window.setTimeout(()=>{const tt=document.getElementById(`job-schedule-${oe}`);tt&&tt.scrollIntoView({behavior:"smooth",block:"center"}),W(null)},100);return()=>window.clearTimeout(Ne)},[$,O,Y]);const Ze=(oe,Ne)=>{te(tt=>tt&&{...tt,[oe]:Ne})},We=()=>{if(le("template"),!R)return;const oe=eo(R);if(oe){he(oe.id),Ze("scheduleBundleId",oe.id);return}const Ne=Gf(ne)??Gf("always-on");Ne&&Ja(Ne)},Dt=()=>{le("custom"),Ze("scheduleBundleId",null),he("")},fa=oe=>{const Ne=Uf(oe);Ne&&(O!=="custom"&&Dt(),M("schedules"),W(Ne))},Ja=oe=>{he(oe.id),te(Ne=>Ne&&{...Ne,cronSchedule:oe.schedules.executor,reviewerSchedule:oe.schedules.reviewer,scheduleBundleId:oe.id,qa:{...Ne.qa,schedule:oe.schedules.qa},audit:{...Ne.audit,schedule:oe.schedules.audit},roadmapScanner:{...Ne.roadmapScanner,slicerSchedule:oe.schedules.slicer},prResolver:{...Ne.prResolver,schedule:oe.schedules.prResolver},merger:{...Ne.merger,schedule:oe.schedules.merger}})},Ka=async()=>{if(R){ae(!0);try{const oe={};for(const bt of uw){const _t=R.jobProviders[bt];typeof _t=="string"&&_t.trim().length>0?oe[bt]=_t:Se!=null&&Se.jobProviders[bt]&&(oe[bt]=null)}const Ne=await so({cronSchedule:R.cronSchedule,reviewerSchedule:R.reviewerSchedule,scheduleBundleId:O==="template"?R.scheduleBundleId:null,cronScheduleOffset:R.cronScheduleOffset,schedulingPriority:R.schedulingPriority,executorEnabled:R.executorEnabled,reviewerEnabled:R.reviewerEnabled,maxRuntime:R.maxRuntime,reviewerMaxRuntime:R.reviewerMaxRuntime,maxRetries:R.maxRetries,reviewerMaxRetries:R.reviewerMaxRetries,reviewerRetryDelay:R.reviewerRetryDelay,reviewerMaxPrsPerRun:R.reviewerMaxPrsPerRun,minReviewScore:R.minReviewScore,branchPatterns:R.branchPatterns,providerEnv:R.providerEnv,jobProviders:oe,qa:R.qa,audit:R.audit,analytics:R.analytics,prResolver:R.prResolver,merger:R.merger,roadmapScanner:R.roadmapScanner,queue:R.queue}),{form:tt}=Xu(Qu(Ne));te(tt),de.current=tt,ie(!1);let wt="";try{await oc()}catch(bt){wt=bt instanceof Error?bt.message:"Failed to reinstall cron"}r(wt?{title:"Saved (Cron Reinstall Failed)",message:wt,type:"warning"}:{title:"Saved",message:"Configuration updated and cron schedules reinstalled.",type:"success"}),me.current=!0,Te()}catch(oe){r({title:"Save Failed",message:oe instanceof Error?oe.message:"Failed to save configuration",type:"error"})}finally{ae(!1)}}},ha=()=>{if(de.current){te(de.current);const oe=de.current,Ne=eo(oe);le(Ne?"template":"custom"),he((Ne==null?void 0:Ne.id)??""),ie(!1)}},ma=async oe=>{try{const Ne=await mp(oe),{form:tt}=Xu(Qu(Ne));te(tt),de.current=tt,ie(!1);let wt="";try{await oc()}catch(bt){wt=bt instanceof Error?bt.message:"Failed to reinstall cron"}r(wt?{title:"Saved (Cron Reinstall Failed)",message:wt,type:"warning"}:{title:oe?"Roadmap Scanner Enabled":"Roadmap Scanner Disabled",message:`Roadmap scanner has been ${oe?"enabled":"disabled"}.`,type:"success"}),me.current=!0,Te(),pe()}catch(Ne){r({title:"Toggle Failed",message:Ne instanceof Error?Ne.message:"Failed to toggle roadmap scanner",type:"error"})}},yn=async()=>{if(L){h(!0);try{L.paused?(await oc(),r({title:"Schedule Resumed",message:"Cron schedules are active.",type:"success"})):(await dp(),r({title:"Schedule Paused",message:"Cron schedules are deactivated.",type:"info"})),pe()}catch(oe){r({title:"Action Failed",message:oe instanceof Error?oe.message:"Toggle failed",type:"error"})}finally{h(!1)}}},Pt=async()=>{if(window.confirm("Are you sure you want to clear all pending jobs?")){N(!0);try{const oe=await $N();r({title:"Queue Cleared",message:`Removed ${oe.cleared} pending jobs.`,type:"success"}),Vg().then(C)}catch(oe){r({title:"Clear Failed",message:oe instanceof Error?oe.message:"Failed to clear queue",type:"error"})}finally{N(!1)}}},ua=async oe=>{if(R){ae(!0);try{const Ne=await so({queue:{...R.queue,...oe}}),{form:tt}=Xu(Qu(Ne));te(tt),de.current=tt,ie(!1),r({title:"Settings Saved",message:"Queue configuration updated.",type:"success"}),me.current=!0,Te(),pe()}catch(Ne){r({title:"Save Failed",message:Ne instanceof Error?Ne.message:"Save failed",type:"error"})}finally{ae(!1)}}},en=async oe=>{const Ne=oe==="planner"?"slicer":oe;T(oe);try{await op(Ne),r({title:"Job Triggered",message:`${oe} job queued successfully.`,type:"success"})}catch(tt){r({title:"Trigger Failed",message:tt instanceof Error?tt.message:"Failed to trigger job",type:"error"})}finally{T(null)}},tn=oe=>{const Ne=Uf(oe);Ne&&(M("jobs"),ee(Ne))};U.useEffect(()=>{if(!R||ze.current===n.search)return;ze.current=n.search;const oe=new URLSearchParams(n.search),Ne=oe.get("tab"),tt=Ne==="queue"?"overview":Ne,wt=oe.get("mode"),bt=Uf(oe.get("jobType"));if(tt&&ow.has(tt)){if(tt==="jobs"){M("jobs"),bt&&ee(bt);return}if(tt==="schedules"){if(bt){fa(bt);return}M("schedules"),wt==="custom"&&O!=="custom"&&Dt(),wt==="template"&&O!=="template"&&We();return}M(tt);return}wt==="custom"&&O!=="custom"&&(M("schedules"),Dt()),wt==="template"&&O!=="template"&&(M("schedules"),We())},[n.search,R,O]);const an=U.useMemo(()=>{const oe={...Wp,...(R==null?void 0:R.providerPresets)??{}};return Object.entries(oe).map(([Ne,tt])=>({label:tt.name||Ne,value:Ne}))},[R==null?void 0:R.providerPresets]);if(se||xe||!R)return s.jsx("div",{className:"flex items-center justify-center min-h-[400px] text-slate-500",children:"Loading automation state..."});if(ge||!L||!Se)return s.jsxs("div",{className:"flex flex-col items-center justify-center min-h-[400px] space-y-4",children:[s.jsx(Dn,{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(qe,{onClick:()=>{pe(),Te()},children:"Retry"})]});const La=L.paused,bn=R?eo(R):void 0,It=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(ot,{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(Hg,{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(qe,{variant:"ghost",size:"sm",onClick:Pt,loading:b,disabled:!(j!=null&&j.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(Ug,{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(rt,{label:"Dispatch Mode",value:((_n=R==null?void 0:R.queue)==null?void 0:_n.mode)||"auto",onChange:oe=>ua({mode:oe}),options:[{label:"Auto (Recommended)",value:"auto"},{label:"Conservative (1 at a time)",value:"conservative"},{label:"Provider-aware",value:"provider-aware"}]}),s.jsx(Ae,{label:"Max Concurrency",type:"number",min:"1",max:"20",value:String(((Ws=R==null?void 0:R.queue)==null?void 0:Ws.maxConcurrency)||1),onChange:oe=>ua({maxConcurrency:Number(oe.target.value)})}),s.jsx("div",{className:"md:col-span-2 flex items-center gap-3",children:s.jsx(ca,{label:"Coordinator Enabled",checked:((ul=R==null?void 0:R.queue)==null?void 0:ul.enabled)??!0,onChange:oe=>ua({enabled:oe})})})]})}),s.jsx("div",{className:"p-0",children:j!=null&&j.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:j.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(Qa,{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:vx(new Date(oe.enqueuedAt*1e3))}),s.jsx("td",{className:"px-6 py-4 text-right",children:s.jsx("button",{onClick:()=>tn(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(Ug,{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(zg,{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(no,{className:"h-3 w-3 animate-spin-slow"})," Live Update"]})]}),s.jsx(Jj,{configs:k,currentProjectId:o??void 0,onEditJob:(oe,Ne)=>tn(Ne),queueStatus:j,queueAnalytics:A})]}),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(ot,{className:"border-slate-800 overflow-hidden",children:A!=null&&A.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:A.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(Qa,{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:vx(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(ot,{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:(bn==null?void 0:bn.label)??"Custom"}),s.jsx("p",{className:"mt-1 text-xs text-slate-500",children:(bn==null?void 0:bn.description)??"Custom cron expressions are active for this project."})]}),s.jsx(rt,{label:"Scheduling Priority",value:String(R.schedulingPriority),onChange:oe=>Ze("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(Ae,{label:"Extra Start Delay",type:"number",min:"0",max:"59",value:String(R.cronScheduleOffset),onChange:oe=>Ze("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(ot,{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:[j!=null&&j.averageWaitSeconds?(j.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:[j!=null&&j.oldestPendingAge?(j.oldestPendingAge/60).toFixed(1):"0"," ",s.jsx("span",{className:"text-xs font-normal text-slate-500",children:"min"})]})]})]})]}),s.jsxs(ot,{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:pn,enabled:(R==null?void 0:R.executorEnabled)!==!1},{id:"reviewer",label:"Run Reviewer",icon:Fr,enabled:(R==null?void 0:R.reviewerEnabled)??!1},{id:"qa",label:"Run QA",icon:Hg,enabled:((Ie=R==null?void 0:R.qa)==null?void 0:Ie.enabled)??!1},{id:"audit",label:"Run Audit",icon:zg,enabled:((ol=R==null?void 0:R.audit)==null?void 0:ol.enabled)??!1},{id:"planner",label:"Run Planner",icon:ch,enabled:((mt=R==null?void 0:R.roadmapScanner)==null?void 0:mt.enabled)??!1},{id:"analytics",label:"Run Analytics",icon:lh,enabled:((Vt=R==null?void 0:R.analytics)==null?void 0:Vt.enabled)??!1},{id:"pr-resolver",label:"Run PR Resolver",icon:ih,enabled:((At=R==null?void 0:R.prResolver)==null?void 0:At.enabled)??!1},{id:"merger",label:"Run Merger",icon:ho,enabled:((kt=R==null?void 0:R.merger)==null?void 0:kt.enabled)??!1}].map(oe=>s.jsxs("button",{onClick:()=>en(oe.id),disabled:w===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]}),w===oe.id?s.jsx(no,{className:"h-3 w-3 animate-spin text-indigo-400"}):oe.enabled?s.jsx(pn,{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))})]})]})]}),cl=R?s.jsx(nw,{form:{cronSchedule:R.cronSchedule,reviewerSchedule:R.reviewerSchedule,qa:R.qa,audit:R.audit,analytics:R.analytics,roadmapScanner:{...R.roadmapScanner,slicerSchedule:R.roadmapScanner.slicerSchedule??Yr().slicerSchedule},prResolver:R.prResolver,merger:R.merger},scheduleMode:O,selectedTemplateId:ne,onFieldChange:(oe,Ne)=>{Ze(oe,Ne)},onSwitchToTemplate:We,onSwitchToCustom:Dt,onApplyTemplate:Ja}):null,Zs=[{id:"overview",label:"Overview",content:It},{id:"schedules",label:"Schedules",content:cl},{id:"jobs",label:"Jobs",content:R?s.jsx(lw,{form:R,updateField:Ze,handleRoadmapToggle:ma,presetOptions:an,expandedJob:V,onExpandedJobChange:ee,onOpenSchedule:fa}):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(Qa,{variant:La?"warning":"success",className:"px-3 py-1 text-xs uppercase tracking-wider",children:La?"Paused":"Active"})]}),s.jsx("p",{className:"text-sm text-slate-400 mt-1",children:"Manage automation overview, schedules, jobs, and live queue"})]}),s.jsx(qe,{variant:La?"primary":"outline",size:"lg",className:La?"bg-emerald-600 hover:bg-emerald-700":"border-slate-700 hover:bg-slate-800",onClick:yn,loading:f,children:La?s.jsxs(s.Fragment,{children:[s.jsx(pn,{className:"h-5 w-5 mr-2 fill-current"})," Resume Scheduling"]}):s.jsxs(s.Fragment,{children:[s.jsx(ao,{className:"h-5 w-5 mr-2"})," Pause Scheduling"]})})]}),s.jsx(xp,{tabs:Zs,activeTab:$,onChange:M}),ve&&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($s,{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(qe,{variant:"ghost",size:"sm",onClick:ha,className:"text-slate-400",children:[s.jsx(uh,{className:"h-4 w-4 mr-1.5"}),"Reset"]}),s.jsxs(qe,{variant:"primary",size:"sm",onClick:Ka,loading:F,children:[s.jsx(lp,{className:"h-4 w-4 mr-1.5"}),"Save"]})]})]})})]})},fw=({isOpen:n,onClose:r,title:o,children:u})=>(U.useEffect(()=>{const f=h=>{h.key==="Escape"&&r()};return n&&(document.addEventListener("keydown",f),document.body.style.overflow="hidden"),()=>{document.removeEventListener("keydown",f),document.body.style.overflow="unset"}},[n,r]),n?n1.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(Gr,{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),hw=n=>["TOKEN","SECRET","KEY","PASSWORD","AUTH","API_KEY"].some(o=>n.toUpperCase().includes(o)),mw=({value:n,isSensitive:r})=>{const[o,u]=_e.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($1,{className:"h-4 w-4"}):s.jsx(rh,{className:"h-4 w-4"})})]}):s.jsx("span",{className:"text-sm text-slate-300 font-mono truncate max-w-xs",children:n})},Ip=({envVars:n,onChange:r,compact:o=!1})=>{const[u,f]=_e.useState(""),[h,b]=_e.useState(""),[N,y]=_e.useState(null),[x,w]=_e.useState(""),{addToast:T}=Wt(),k=()=>{if(u.trim()){if(!/^[A-Z_][A-Z0-9_]*$/.test(u)){T({title:"Invalid Key Format",message:"Key must be uppercase with underscores (e.g., API_KEY)",type:"error"});return}r({...n,[u]:h}),f(""),b("")}},_=$=>{const M={...n};delete M[$],r(M)},j=$=>{y($),w(n[$]??"")},C=()=>{N&&(r({...n,[N]:x}),y(null),w(""))},A=()=>{y(null),w("")},G=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:G.length===0?s.jsx("p",{className:"text-slate-500 text-sm italic",children:"No environment variables configured."}):G.map(([$,M])=>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:$}),N===$?s.jsxs("div",{className:"flex items-center gap-2 flex-1",children:[s.jsx("input",{type:"text",value:x,onChange:V=>w(V.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:C,className:"p-1 text-green-400 hover:text-green-300","aria-label":`Save ${$} value`,title:`Save ${$} value`,children:s.jsx(w1,{className:"h-4 w-4"})}),s.jsx("button",{type:"button",onClick:A,className:"p-1 text-slate-400 hover:text-slate-300","aria-label":`Cancel editing ${$}`,title:`Cancel editing ${$}`,children:s.jsx(Gr,{className:"h-4 w-4"})})]}):s.jsx(mw,{value:M,isSensitive:hw($)})]}),N!==$&&s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("button",{type:"button",onClick:()=>j($),className:"p-1 text-slate-400 hover:text-slate-200","aria-label":`Edit ${$}`,title:`Edit ${$}`,children:s.jsx(mo,{className:"h-4 w-4"})}),s.jsx("button",{type:"button",onClick:()=>_($),className:"p-1 text-red-400 hover:text-red-300","aria-label":`Delete ${$}`,title:`Delete ${$}`,children:s.jsx(Fs,{className:"h-4 w-4"})})]})]},$))}),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:$=>f($.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:h,onChange:$=>b($.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(qe,{onClick:k,disabled:!u.trim(),size:o?"sm":"md",children:[s.jsx(Kl,{className:"h-4 w-4 mr-1"}),"Add"]})]})]})};function gw(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 gw(n,r)?!((u=(o=r==null?void 0:r.envVars)==null?void 0:o.ANTHROPIC_API_KEY)!=null&&u.trim()):!1}const jx={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:""}},pw=({isOpen:n,onClose:r,onSave:o,presetId:u,preset:f,isBuiltIn:h,existingIds:b})=>{const[N,y]=_e.useState(""),[x,w]=_e.useState({name:"",command:"",subcommand:"",promptFlag:"",autoApproveFlag:"",workdirFlag:"",modelFlag:"",model:"",envVars:{}}),[T,k]=_e.useState(!1),[_,j]=_e.useState("custom"),[C,A]=_e.useState(null),G=xw(u??N,x);_e.useEffect(()=>{n&&(u&&f?(y(u),w({name:f.name,command:f.command,subcommand:f.subcommand??"",promptFlag:f.promptFlag??"",autoApproveFlag:f.autoApproveFlag??"",workdirFlag:f.workdirFlag??"",modelFlag:f.modelFlag??"",model:f.model??"",envVars:f.envVars??{}}),u==="claude"||f.command==="claude"?j("claude"):u==="codex"||f.command==="codex"?j("codex"):j("custom")):(y(""),w({name:"",command:"",subcommand:"",promptFlag:"",autoApproveFlag:"",workdirFlag:"",modelFlag:"",model:"",envVars:{}}),j("custom")),A(null),k(!!(f!=null&&f.envVars&&Object.keys(f.envVars).length>0)))},[n,u,f]);const $=Y=>{if(j(Y),Y!=="custom"&&jx[Y]){const W=jx[Y];w(R=>({...R,...W,envVars:R.envVars})),!u&&!N&&y(Y)}},M=(Y,W)=>{w(R=>({...R,[Y]:W})),A(null)},V=()=>{if(!x.name.trim())return A("Name is required"),!1;if(!x.command.trim())return A("Command is required"),!1;if(!u){if(!N.trim())return A("Preset ID is required"),!1;if(!/^[a-z0-9_-]+$/.test(N))return A("Preset ID must be lowercase letters, numbers, hyphens, and underscores only"),!1;if(b.includes(N))return A("A preset with this ID already exists"),!1}return!0},ee=()=>{var W,R,te,O,le,ne;if(!V())return;const Y={name:x.name.trim(),command:x.command.trim()};(W=x.subcommand)!=null&&W.trim()&&(Y.subcommand=x.subcommand.trim()),(R=x.promptFlag)!=null&&R.trim()&&(Y.promptFlag=x.promptFlag.trim()),(te=x.autoApproveFlag)!=null&&te.trim()&&(Y.autoApproveFlag=x.autoApproveFlag.trim()),(O=x.workdirFlag)!=null&&O.trim()&&(Y.workdirFlag=x.workdirFlag.trim()),(le=x.modelFlag)!=null&&le.trim()&&(Y.modelFlag=x.modelFlag.trim()),(ne=x.model)!=null&&ne.trim()&&(Y.model=x.model.trim()),x.envVars&&Object.keys(x.envVars).length>0&&(Y.envVars=x.envVars),o(u||N,Y),r()};return s.jsx(fw,{isOpen:n,onClose:r,title:u?`Edit Preset: ${f==null?void 0:f.name}`:"Add Provider Preset",children:s.jsxs("div",{className:"space-y-6",children:[C&&s.jsx("div",{className:"p-3 rounded-md bg-red-500/10 border border-red-500/20 text-red-400 text-sm",children:C}),G&&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($s,{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."})]})]})}),!h&&s.jsx("div",{children:s.jsx(rt,{label:"Template",value:_,onChange:$,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(Ae,{label:"Preset ID",value:N,onChange:Y=>y(Y.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(Ae,{label:"Display Name",value:x.name,onChange:Y=>M("name",Y.target.value),placeholder:"e.g., My Custom Provider",required:!0}),s.jsx(Ae,{label:"Command",value:x.command,onChange:Y=>M("command",Y.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(Ae,{label:"Model",value:x.model??"",onChange:Y=>M("model",Y.target.value),placeholder:"e.g., claude-opus-4-6",helperText:"Default model to use"}),s.jsx(Ae,{label:"Model Flag",value:x.modelFlag??"",onChange:Y=>M("modelFlag",Y.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:()=>k(!T),className:"flex items-center gap-2 text-sm text-slate-400 hover:text-slate-200 transition-colors",children:[T?s.jsx(R1,{className:"h-4 w-4"}):s.jsx(sh,{className:"h-4 w-4"}),"Advanced Options"]}),T&&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(Ae,{label:"Subcommand",value:x.subcommand??"",onChange:Y=>M("subcommand",Y.target.value),placeholder:"e.g., exec",helperText:"Subcommand after base command"}),s.jsx(Ae,{label:"Prompt Flag",value:x.promptFlag??"",onChange:Y=>M("promptFlag",Y.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(Ae,{label:"Auto-Approve Flag",value:x.autoApproveFlag??"",onChange:Y=>M("autoApproveFlag",Y.target.value),placeholder:"e.g., --dangerously-skip-permissions",helperText:"Flag to enable auto-approve mode"}),s.jsx(Ae,{label:"Workdir Flag",value:x.workdirFlag??"",onChange:Y=>M("workdirFlag",Y.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(Ip,{envVars:x.envVars??{},onChange:Y=>M("envVars",Y),compact:!0})]})]})]}),s.jsxs("div",{className:"flex justify-end gap-3 pt-4 border-t border-slate-800",children:[s.jsx(qe,{variant:"ghost",onClick:r,children:"Cancel"}),s.jsx(qe,{onClick:ee,children:u?"Save Changes":"Add Preset"})]})]})})},vw=({form:n,updateField:r,projectName:o,doctorChecks:u,doctorLoading:f})=>s.jsxs("div",{className:"space-y-6",children:[s.jsx(ot,{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(Ae,{label:"Project Name",value:o,disabled:!0}),s.jsx(Ae,{label:"Default Branch",value:n.defaultBranch,onChange:h=>r("defaultBranch",h.target.value)}),s.jsx(Ae,{label:"PRD Directory",value:n.prdDir,onChange:h=>r("prdDir",h.target.value),helperText:"Directory containing PRD files (relative to project root)"}),s.jsx(Ae,{label:"Branch Prefix",value:n.branchPrefix,onChange:h=>r("branchPrefix",h.target.value)}),s.jsx(Ae,{label:"Templates Directory",value:n.templatesDir,onChange:h=>r("templatesDir",h.target.value),helperText:"Directory for custom template overrides"}),s.jsx(Ae,{label:"Max Log Size",type:"number",value:String(n.maxLogSize),onChange:h=>r("maxLogSize",Number(h.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(ca,{checked:n.gitPushNoVerify,onChange:h=>r("gitPushNoVerify",h),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(dc,{label:"Branch Patterns",value:n.branchPatterns,onChange:h=>r("branchPatterns",h),placeholder:"e.g., feat/",helpText:"Branch patterns matched by reviewer and related automation jobs"}),s.jsx(dc,{label:"PRD Priority",value:n.prdPriority,onChange:h=>r("prdPriority",h),placeholder:"e.g., feature-x",helpText:"PRDs matching these names are executed first"})]})]})}),s.jsxs(ot,{className:"divide-y divide-slate-800",children:[s.jsxs("div",{className:"p-4 flex items-center gap-2",children:[s.jsx(Xx,{className:"h-4 w-4 text-indigo-500"}),s.jsx("h3",{className:"text-base font-medium text-slate-200",children:"System Health"})]}),f?s.jsx("div",{className:"p-4 text-sm text-slate-500",children:"Loading health checks..."}):u.map((h,b)=>{const N=h.status==="pass",y=h.status==="warn",x=N?"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:h.name}),s.jsx("p",{className:"text-xs text-slate-500",children:h.detail})]}),s.jsx("span",{className:`inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium border ${x}`,children:h.status.toUpperCase()})]},`${h.name}-${b}`)})]})]}),wx=({presetId:n,preset:r,isBuiltIn:o,onEdit:u,onDelete:f,onReset:h})=>{var x,w,T;const b=r.envVars?Object.keys(r.envVars).length:0,y=(n.startsWith("glm-")||((x=r.model)==null?void 0:x.startsWith("glm-")))&&!((T=(w=r.envVars)==null?void 0:w.ANTHROPIC_API_KEY)!=null&&T.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(Qa,{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($s,{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(mo,{className:"h-4 w-4"})}),o?h&&s.jsx("button",{type:"button",onClick:h,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(uh,{className:"h-4 w-4"})}):f&&s.jsx("button",{type:"button",onClick:f,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(Qa,{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":""]})]})]})},Zf={0:"Su",1:"Mo",2:"Tu",3:"We",4:"Th",5:"Fr",6:"Sa"},Wf={executor:"Executor",reviewer:"Reviewer",qa:"QA",audit:"Audit",slicer:"Planner",analytics:"Analytics",planner:"Planner","pr-resolver":"PR Resolver",merger:"Merger"},Lf={label:"",presetId:"",days:[1,2,3,4,5],startTime:"23:00",endTime:"04:00",jobTypes:null,enabled:!0},Sx=({override:n,onChange:r,onSave:o,onCancel:u,isNew:f,presetOptions:h})=>{const b=j=>{const C=n.days.includes(j)?n.days.filter(A=>A!==j):[...n.days,j].sort((A,G)=>A-G);r({...n,days:C})},N=()=>{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]})},w=()=>{r({...n,jobTypes:null})},T=j=>{const C=n.jobTypes??[],A=C.includes(j)?C.filter(G=>G!==j):[...C,j];r({...n,jobTypes:A.length===0?null:A})},k=n.jobTypes===null||n.jobTypes===void 0,_=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(Ae,{label:"Label",value:n.label,onChange:j=>r({...n,label:j.target.value}),placeholder:"e.g., Night Hours",required:!0}),s.jsx(rt,{label:"Provider",value:n.presetId,onChange:j=>r({...n,presetId:j}),options:h})]}),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(Zf).map(j=>s.jsx("button",{type:"button",onClick:()=>b(j),className:`w-10 h-10 rounded-md text-sm font-medium transition-colors ${n.days.includes(j)?"bg-indigo-600 text-white":"bg-slate-800 text-slate-400 hover:bg-slate-700"}`,children:Zf[j]},j)),s.jsxs("div",{className:"flex gap-1 ml-2",children:[s.jsx("button",{type:"button",onClick:N,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:j=>r({...n,startTime:j.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:j=>r({...n,endTime:j.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:w,className:"text-xs text-indigo-400 hover:text-indigo-300 transition-colors",children:k?"All Jobs Selected":"Select All Jobs"})]}),s.jsx("div",{className:"flex flex-wrap gap-2",children:Object.keys(Wf).filter(j=>j!=="planner").map(j=>{var A;const C=k||(((A=n.jobTypes)==null?void 0:A.includes(j))??!1);return s.jsx("button",{type:"button",onClick:()=>T(j),className:`px-3 py-1.5 rounded-md text-sm transition-colors ${C?"bg-indigo-600 text-white":"bg-slate-800 text-slate-400 hover:bg-slate-700"}`,disabled:k,children:Wf[j]},j)})}),k&&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(ca,{checked:n.enabled,onChange:j=>r({...n,enabled:j}),label:"Enabled"})}),s.jsxs("div",{className:"flex justify-end gap-2 pt-2",children:[s.jsx(qe,{variant:"ghost",onClick:u,children:"Cancel"}),s.jsx(qe,{onClick:o,disabled:!_,children:f?"Add Override":"Save Changes"})]})]})},yw=({overrides:n,onChange:r,presetOptions:o})=>{const[u,f]=_e.useState(null),[h,b]=_e.useState(!1),[N,y]=_e.useState(Lf),x=()=>{r([...n,N]),y({...Lf}),b(!1)},w=(A,G)=>{const $=[...n];$[A]=G,r($)},T=A=>{window.confirm("Are you sure you want to delete this schedule override?")&&r(n.filter((G,$)=>$!==A))},k=A=>{const G=[...n];G[A]={...G[A],enabled:!G[A].enabled},r(G)},_=A=>A.length===7?"Every day":A.length===5&&A.every(G=>G>=1&&G<=5)?"Weekdays":A.length===2&&A.includes(0)&&A.includes(6)?"Weekends":A.map(G=>Zf[G]).join(", "),j=A=>!A||A.length===0?"All Jobs":A.map(G=>Wf[G]).join(", "),C=A=>{const G=o.find($=>$.value===A);return(G==null?void 0:G.label)||A};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((A,G)=>s.jsx("div",{children:u===G?s.jsx(Sx,{override:A,onChange:$=>w(G,$),onSave:()=>f(null),onCancel:()=>f(null),presetOptions:o}):s.jsxs("div",{className:`flex items-start justify-between p-4 rounded-md border bg-slate-950/40 ${A.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(ca,{checked:A.enabled,onChange:()=>k(G)}),s.jsx("span",{className:"text-slate-100 font-medium",children:A.label})]}),s.jsxs("div",{className:"text-sm text-slate-400 ml-11",children:[s.jsx("span",{className:"text-indigo-400",children:C(A.presetId)})," · ",_(A.days)," · ",A.startTime," - ",A.endTime," · ",j(A.jobTypes)]})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("button",{type:"button",onClick:()=>f(G),className:"p-2 text-slate-400 hover:text-slate-200","aria-label":`Edit ${A.label}`,title:`Edit ${A.label}`,children:s.jsx(mo,{className:"h-4 w-4"})}),s.jsx("button",{type:"button",onClick:()=>T(G),className:"p-2 text-red-400 hover:text-red-300","aria-label":`Delete ${A.label}`,title:`Delete ${A.label}`,children:s.jsx(Fs,{className:"h-4 w-4"})})]})]})},G))}),h?s.jsx(Sx,{override:N,onChange:y,onSave:x,onCancel:()=>{b(!1),y({...Lf})},isNew:!0,presetOptions:o}):s.jsxs(qe,{variant:"ghost",onClick:()=>b(!0),children:[s.jsx(Kl,{className:"h-4 w-4 mr-2"}),"Add Schedule Override"]})]})},bw=({form:n,updateField:r,getAllPresets:o,getPresetOptions:u,handleEditPreset:f,handleDeletePreset:h,handleResetPreset:b,handleAddPreset:N})=>s.jsxs("div",{className:"space-y-6",children:[s.jsx(ot,{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(rt,{value:n.provider,onChange:y=>r("provider",y),options:u(n.providerPresets)})})]})}),s.jsxs(ot,{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(qe,{onClick:N,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:[co.map(y=>{const w=o()[y];return w?s.jsx(wx,{presetId:y,preset:w,isBuiltIn:!0,onEdit:()=>f(y),onReset:()=>b(y)},y):null}),Object.entries(n.providerPresets).filter(([y])=>!co.includes(y)).map(([y,x])=>s.jsx(wx,{presetId:y,preset:x,isBuiltIn:!1,onEdit:()=>f(y),onDelete:()=>h(y)},y))]})]}),s.jsxs(ot,{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(rt,{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(rt,{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(rt,{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(rt,{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(ot,{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(yw,{overrides:n.providerScheduleOverrides,onChange:y=>r("providerScheduleOverrides",y),presetOptions:Object.entries(o()).map(([y,x])=>({label:x.name,value:y}))})]}),s.jsxs(ot,{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(Ip,{envVars:n.providerEnv,onChange:y=>r("providerEnv",y)})]})]});function Ex(n){return n.type==="telegram"?`telegram:${n.botToken}:${n.chatId}`:`${n.type}:${n.url}`}const Nw=[{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"}],jw=(n,r)=>n.includes(r)?n.filter(o=>o!==r):[...n,r],Tx=({webhook:n,onChange:r,onSave:o,onCancel:u,isNew:f})=>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(rt,{label:"Type",value:n.type,onChange:h=>{const b=h;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(Ae,{label:"Bot Token",type:"password",value:n.botToken||"",onChange:h=>r({...n,botToken:h.target.value}),placeholder:"123456789:ABCdefGHIjklMNOpqrsTUVwxyz"})}),s.jsx(Ae,{label:"Chat ID",value:n.chatId||"",onChange:h=>r({...n,chatId:h.target.value}),placeholder:"123456789"})]}):s.jsx("div",{className:"md:col-span-2",children:s.jsx(Ae,{label:"Webhook URL",type:"password",value:n.url||"",onChange:h=>r({...n,url:h.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:Nw.map(h=>s.jsx("button",{type:"button",onClick:()=>r({...n,events:jw(n.events,h.value)}),className:`px-3 py-1.5 rounded-md text-sm transition-colors ${n.events.includes(h.value)?"bg-indigo-600 text-white":"bg-slate-800 text-slate-400 hover:bg-slate-700"}`,children:h.label},h.value))})]}),s.jsxs("div",{className:"flex justify-end gap-2",children:[s.jsx(qe,{variant:"ghost",onClick:u,children:"Cancel"}),s.jsx(qe,{onClick:o,disabled:n.events.length===0||(n.type==="telegram"?!n.botToken||!n.chatId:!n.url),children:f?"Add Webhook":"Save Changes"})]})]}),ww=({notifications:n,onChange:r,globalWebhook:o,onSetGlobal:u,onUnsetGlobal:f})=>{const[h,b]=_e.useState(null),[N,y]=_e.useState(!1),[x,w]=_e.useState({type:"slack",url:"",events:[]}),T=()=>{r({webhooks:[...n.webhooks,x]}),w({type:"slack",url:"",events:[]}),y(!1)},k=(j,C)=>{const A=[...n.webhooks];A[j]=C,r({webhooks:A})},_=j=>{r({webhooks:n.webhooks.filter((C,A)=>A!==j)})};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((j,C)=>s.jsx("div",{children:h===C?s.jsx(Tx,{webhook:j,onChange:A=>k(C,A),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:j.type}),j.type==="telegram"&&s.jsxs("span",{className:"text-xs text-slate-500",children:["Chat ID: ",j.chatId]})]}),s.jsx("div",{className:"flex flex-wrap gap-1",children:j.events.map(A=>s.jsx("span",{className:"px-2 py-0.5 bg-slate-800 rounded text-xs text-slate-400",children:A.replace("_"," ")},A))})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[u!==void 0&&(()=>{const A=o!=null&&Ex(j)===Ex(o);return s.jsx("button",{type:"button",onClick:()=>A?f==null?void 0:f():u(j),className:`p-2 transition-colors ${A?"text-indigo-400 hover:text-indigo-300":"text-slate-500 hover:text-slate-300"}`,"aria-label":A?"Global channel (active)":"Set as global channel",title:A?"Global channel (active)":"Set as global channel",children:s.jsx(I1,{className:"h-4 w-4"})})})(),s.jsx("button",{type:"button",onClick:()=>b(C),className:"p-2 text-slate-400 hover:text-slate-200","aria-label":`Edit ${j.type} webhook`,title:`Edit ${j.type} webhook`,children:s.jsx(mo,{className:"h-4 w-4"})}),s.jsx("button",{type:"button",onClick:()=>_(C),className:"p-2 text-red-400 hover:text-red-300","aria-label":`Delete ${j.type} webhook`,title:`Delete ${j.type} webhook`,children:s.jsx(Fs,{className:"h-4 w-4"})})]})]})},C))}),N?s.jsx(Tx,{webhook:x,onChange:w,onSave:T,onCancel:()=>y(!1),isNew:!0}):s.jsxs(qe,{variant:"ghost",onClick:()=>y(!0),children:[s.jsx(Kl,{className:"h-4 w-4 mr-2"}),"Add Webhook"]})]})},Cx=[{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"}],Mx=[{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 Sw(n){return encodeURIComponent(n.replace(/\//g,"~"))}function Ew(){return typeof window>"u"||window.location.origin==="null"?"":window.location.origin}function Tw(n){return(n==null?void 0:n.join(", "))??""}function Cw(n){const r=n.split(",").map(o=>o.trim()).filter(Boolean);return r.length>0?r:void 0}function Mw(n){return{event:"workflow_run",action:"completed",jobId:n}}function Ow(n,r,o){const u=n&&r?`/api/projects/${Sw(r)}/jobs/${o}/run`:`/api/jobs/${o}/run`;return`${Ew()}${u}`}function Rw(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(`
|
|
412
|
-
`)}const Dw=({form:n,updateField:r,globalWebhook:o,isGlobalMode:u=!1,onSetGlobal:f,onUnsetGlobal:h,selectedProjectId:b})=>{const[N,y]=_e.useState(null),x=n.webhookTriggers,w=x.allowedJobIds[0]??"reviewer",T=Ow(u,b,w),k=Rw(T),_=V=>{r("webhookTriggers",{...x,...V})},j=V=>{_({github:{...x.github,...V}})},C=V=>{const ee=x.allowedJobIds.includes(V)?x.allowedJobIds.filter(Y=>Y!==V):[...x.allowedJobIds,V];_({allowedJobIds:ee})},A=V=>{const ee=x.github.events.includes(V)?x.github.events.filter(Y=>Y!==V):[...x.github.events,V];j({events:ee})},G=(V,ee)=>{const Y=x.github.rules.map((W,R)=>R===V?{...W,...ee}:W);j({rules:Y})},$=V=>{j({rules:x.github.rules.filter((ee,Y)=>Y!==V)})},M=async(V,ee)=>{var Y;await((Y=navigator.clipboard)==null?void 0:Y.writeText(V)),y(ee),window.setTimeout(()=>y(null),1500)};return s.jsxs("div",{className:"space-y-6",children:[s.jsxs(ot,{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(ca,{checked:n.boardProvider.enabled,onChange:V=>r("boardProvider",{...n.boardProvider,enabled:V})})]}),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(rt,{label:"Board Provider",value:n.boardProvider.provider,onChange:V=>r("boardProvider",{...n.boardProvider,provider:V}),options:[{label:"GitHub Projects",value:"github"},{label:"Local (SQLite)",value:"local"}]}),n.boardProvider.provider==="github"&&s.jsxs(s.Fragment,{children:[s.jsx(Ae,{label:"Project Number",type:"number",value:String(n.boardProvider.projectNumber||""),onChange:V=>r("boardProvider",{...n.boardProvider,projectNumber:V.target.value?Number(V.target.value):void 0}),helperText:"GitHub Projects V2 project number"}),s.jsx(Ae,{label:"Repository",value:n.boardProvider.repo||"",onChange:V=>r("boardProvider",{...n.boardProvider,repo:V.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(ot,{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(ca,{checked:x.enabled,label:"Enabled",name:"webhookTriggers.enabled",onChange:V=>_({enabled:V})})]}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6 pt-6 border-t border-slate-800",children:[s.jsx(Ae,{label:"Secret Environment Variable",name:"webhookTriggers.secretEnv",value:x.secretEnv,onChange:V=>_({secretEnv:V.target.value}),helperText:"Server environment variable containing the shared HMAC secret"}),s.jsx(Ae,{label:"Signature Max Skew",min:0,name:"webhookTriggers.maxSkewSeconds",type:"number",value:String(x.maxSkewSeconds),onChange:V=>_({maxSkewSeconds:V.target.value?Math.max(0,Number(V.target.value)):0}),helperText:"Seconds, used when timestamp validation is required"}),s.jsx("div",{className:"md:col-span-2",children:s.jsx(ca,{checked:x.requireTimestamp,label:"Require timestamp header",name:"webhookTriggers.requireTimestamp",onChange:V=>_({requireTimestamp:V})})})]}),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:Cx.map(V=>s.jsx("button",{type:"button","aria-pressed":x.allowedJobIds.includes(V.value),onClick:()=>C(V.value),className:`px-3 py-1.5 rounded-md text-sm transition-colors ${x.allowedJobIds.includes(V.value)?"bg-indigo-600 text-white":"bg-slate-800 text-slate-400 hover:bg-slate-700"}`,children:V.label},V.value))})]}),s.jsxs("div",{className:"space-y-3",children:[s.jsxs("div",{className:"flex items-end gap-2",children:[s.jsx(Ae,{label:"Endpoint URL",readOnly:!0,value:T}),s.jsx(qe,{"aria-label":"Copy endpoint URL",size:"icon",type:"button",variant:"outline",onClick:()=>M(T,"endpoint"),children:s.jsx(_g,{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(qe,{size:"sm",type:"button",variant:"ghost",onClick:()=>M(k,"curl"),children:[s.jsx(_g,{className:"h-4 w-4 mr-2"}),N==="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:k})})]})]}),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(ca,{checked:x.github.enabled,label:"Enabled",name:"webhookTriggers.github.enabled",onChange:V=>j({enabled:V})})]}),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:Mx.map(V=>s.jsx("button",{type:"button","aria-pressed":x.github.events.includes(V.value),onClick:()=>A(V.value),className:`px-3 py-1.5 rounded-md text-sm transition-colors ${x.github.events.includes(V.value)?"bg-indigo-600 text-white":"bg-slate-800 text-slate-400 hover:bg-slate-700"}`,children:V.label},V.value))})]}),s.jsxs("div",{className:"space-y-3",children:[x.github.rules.map((V,ee)=>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(rt,{label:"Event",value:V.event,onChange:Y=>G(ee,{event:Y}),options:Mx}),s.jsx(Ae,{label:"Action",value:V.action??"",onChange:Y=>G(ee,{action:Y.target.value||void 0}),placeholder:"completed"}),s.jsx(rt,{label:"Job",value:V.jobId,onChange:Y=>G(ee,{jobId:Y}),options:Cx})]}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-[1fr_auto_auto] gap-4 md:items-end",children:[s.jsx(Ae,{label:"Branch Patterns",value:Tw(V.branchPatterns),onChange:Y=>G(ee,{branchPatterns:Cw(Y.target.value)}),placeholder:"main, release/*"}),s.jsx(ca,{checked:V.onlyOnFailure??!1,label:"Only failures",onChange:Y=>G(ee,{onlyOnFailure:Y})}),s.jsx(qe,{"aria-label":`Delete GitHub rule ${ee+1}`,size:"icon",type:"button",variant:"ghost",onClick:()=>$(ee),children:s.jsx(Fs,{className:"h-4 w-4 text-red-400"})})]})]},ee)),s.jsxs(qe,{type:"button",variant:"ghost",onClick:()=>j({rules:[...x.github.rules,Mw(w)]}),children:[s.jsx(Kl,{className:"h-4 w-4 mr-2"}),"Add GitHub Rule"]})]})]})]}),s.jsxs(ot,{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(ww,{notifications:n.notifications,onChange:V=>r("notifications",V),globalWebhook:o,onSetGlobal:f,onUnsetGlobal:h})]})]})};function Aw(n,r,o,u){const{addToast:f}=Wt(),[h,b]=U.useState(!1),[N,y]=U.useState(null),[x,w]=U.useState(null),[T,k]=U.useState(null),_=U.useCallback(()=>({...Wp,...n}),[n]),j=U.useCallback(Y=>{const W=_();return Object.entries(W).map(([R,te])=>({label:te.name,value:R}))},[_]),C=U.useCallback(Y=>{const W=[];r===Y&&W.push("Global Provider");const R={executor:"Executor",reviewer:"Reviewer",qa:"QA",audit:"Audit",slicer:"Planner",analytics:"Analytics"};for(const[te,O]of Object.entries(o))O===Y&&W.push(R[te]??te);return W},[r,o]),A=U.useCallback(()=>{y(null),w(null),b(!0)},[]),G=U.useCallback(Y=>{const R=_()[Y];R&&(y(Y),w(R),b(!0))},[_]),$=U.useCallback(async(Y,W)=>{const R=!N,te={...n,[Y]:W};u("providerPresets",te);try{await so({providerPresets:{[Y]:W}}),f({title:R?"Preset Added":"Preset Updated",message:R?`${W.name} has been added. You can now assign it to jobs.`:`${W.name} has been saved.`,type:"success"})}catch(O){f({title:"Save Failed",message:O instanceof Error?O.message:"Failed to save preset",type:"error"}),u("providerPresets",n)}},[N,n,u,f]),M=U.useCallback(Y=>{var te,O;if(co.includes(Y)){f({title:"Cannot Delete",message:"Built-in presets cannot be deleted.",type:"error"});return}const W=C(Y);if(W.length>0){k({presetId:Y,presetName:((te=_()[Y])==null?void 0:te.name)??Y,references:W});return}const R={...n};delete R[Y],u("providerPresets",R),f({title:"Preset Deleted",message:`${((O=_()[Y])==null?void 0:O.name)??Y} has been removed.`,type:"success"})},[n,u,f,C,_]),V=U.useCallback(Y=>{const W={...n};delete W[Y],u("providerPresets",W),f({title:"Preset Reset",message:`${Y} has been reset to built-in defaults.`,type:"success"})},[n,u,f]),ee=U.useCallback(()=>{if(!T)return;const{presetId:Y}=T,W={...n};delete W[Y],u("providerPresets",W);const R={...o};for(const te of Object.keys(R))R[te]===Y&&delete R[te];u("jobProviders",R),r===Y&&u("provider","claude"),k(null),f({title:"Preset Deleted",message:`${T.presetName} has been removed and all references cleared.`,type:"success"})},[T,n,o,r,u,f]);return{presetModalOpen:h,setPresetModalOpen:b,editingPresetId:N,editingPreset:x,deleteWarning:T,setDeleteWarning:k,getAllPresets:_,getPresetOptions:j,getPresetReferences:C,handleAddPreset:A,handleEditPreset:G,handleSavePreset:$,handleDeletePreset:M,handleResetPreset:V,handleConfirmDelete:ee}}const kw=["executor","reviewer","qa","audit","slicer","analytics","pr-resolver","merger"],_w=["executor","reviewer","qa","audit","slicer","analytics","pr-resolver","merger"],zw={enabled:!1,secretEnv:"NIGHT_WATCH_WEBHOOK_SECRET",allowedJobIds:_w,requireTimestamp:!1,maxSkewSeconds:300,github:{enabled:!1,events:[],rules:[]}},Ox=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||Pp,reviewerSchedule:n.reviewerSchedule||Fp,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||Yr(),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||Gp(),audit:n.audit||Zp(),analytics:n.analytics||ph(),prResolver:n.prResolver??mc(),merger:n.merger??xo(),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??zw}},Uw=()=>{const n=kn(),r=oo(),{addToast:o,projectName:u,selectedProjectId:f,globalModeLoading:h,isGlobalMode:b,removeProjectFromList:N}=Wt(),[y,x]=_e.useState(!1),[w,T]=_e.useState(!1),[k,_]=_e.useState(!1),[j,C]=_e.useState(null),[A,G]=_e.useState(void 0),$=_e.useRef(null),[M,V]=_e.useState(!1),ee=_e.useRef(!1),Y=_e.useRef(!1),[W,R]=_e.useState("project"),te=_e.useMemo(()=>{const xe=new URLSearchParams(n.search).get("tab");return xe==="jobs"||xe==="schedules"?xe:null},[n.search]),{data:O,loading:le,error:ne,refetch:he}=vn(hh,[f],{enabled:!h}),{data:ve,loading:ie,refetch:F}=vn(zN,[f],{enabled:!h}),ae=ve??[],de=(xe,Te)=>{C(Ze=>Ze&&{...Ze,[xe]:Te})},me=Aw((j==null?void 0:j.providerPresets)??{},(j==null?void 0:j.provider)??"claude",(j==null?void 0:j.jobProviders)??{},de);_e.useEffect(()=>{PN().then(xe=>G(xe.webhook)).catch(()=>{})},[f]),_e.useEffect(()=>{te&&r({pathname:"/scheduling",search:n.search},{replace:!0})},[te,n.search,r]),_e.useEffect(()=>{if(te)return;const Te=new URLSearchParams(n.search).get("tab");Te&&R({providers:"ai-providers",runtime:"ai-providers","ai-runtime":"ai-providers",notifications:"integrations",general:"project",advanced:"project"}[Te]??Te)},[te,n.search]),_e.useEffect(()=>{if(O){if(ee.current){ee.current=!1;return}const xe=Ox(O);C(xe),$.current=xe,V(!1)}},[O]),_e.useEffect(()=>{if(!j||!$.current)return;const xe=JSON.stringify(j),Te=JSON.stringify($.current);V(xe!==Te)},[j]),_e.useEffect(()=>{j&&Y.current&&(Y.current=!1,ze())},[j==null?void 0:j.jobProviders]);const ze=async()=>{var Ze,We,Dt,fa,Ja,Ka,ha,ma,yn;if(!j)return;const xe=j.cronSchedule!==(O==null?void 0:O.cronSchedule)||j.reviewerSchedule!==(O==null?void 0:O.reviewerSchedule)||j.cronScheduleOffset!==((O==null?void 0:O.cronScheduleOffset)??0)||j.schedulingPriority!==((O==null?void 0:O.schedulingPriority)??3)||j.executorEnabled!==((O==null?void 0:O.executorEnabled)??!0)||j.reviewerEnabled!==((O==null?void 0:O.reviewerEnabled)??!0)||j.queue.enabled!==(((Ze=O==null?void 0:O.queue)==null?void 0:Ze.enabled)??!0)||j.qa.enabled!==((O==null?void 0:O.qa.enabled)??!0)||j.qa.schedule!==(O==null?void 0:O.qa.schedule)||j.audit.enabled!==((O==null?void 0:O.audit.enabled)??!0)||j.audit.schedule!==(O==null?void 0:O.audit.schedule)||j.analytics.enabled!==(((We=O==null?void 0:O.analytics)==null?void 0:We.enabled)??!1)||j.analytics.schedule!==(((Dt=O==null?void 0:O.analytics)==null?void 0:Dt.schedule)??ph().schedule)||j.prResolver.enabled!==(((fa=O==null?void 0:O.prResolver)==null?void 0:fa.enabled)??mc().enabled)||j.prResolver.schedule!==(((Ja=O==null?void 0:O.prResolver)==null?void 0:Ja.schedule)??mc().schedule)||j.merger.enabled!==(((Ka=O==null?void 0:O.merger)==null?void 0:Ka.enabled)??!1)||j.merger.schedule!==(((ha=O==null?void 0:O.merger)==null?void 0:ha.schedule)??xo().schedule)||j.roadmapScanner.enabled!==(((ma=O==null?void 0:O.roadmapScanner)==null?void 0:ma.enabled)??!0)||(j.roadmapScanner.slicerSchedule||Yr().slicerSchedule)!==(((yn=O==null?void 0:O.roadmapScanner)==null?void 0:yn.slicerSchedule)||Yr().slicerSchedule),Te={};for(const Pt of kw){const ua=j.jobProviders[Pt];typeof ua=="string"&&ua.trim().length>0?Te[Pt]=ua:O!=null&&O.jobProviders[Pt]&&(Te[Pt]=null)}x(!0);try{const Pt=j.primaryFallbackModel||null,ua=j.secondaryFallbackModel||null,en=await so({provider:j.provider,providerLabel:j.providerLabel.trim(),providerPresets:Object.keys(j.providerPresets).length>0?j.providerPresets:void 0,defaultBranch:j.defaultBranch,prdDir:j.prdDir,branchPrefix:j.branchPrefix,branchPatterns:j.branchPatterns,gitPushNoVerify:j.gitPushNoVerify,executorEnabled:j.executorEnabled,reviewerEnabled:j.reviewerEnabled,minReviewScore:j.minReviewScore,maxRuntime:j.maxRuntime,reviewerMaxRuntime:j.reviewerMaxRuntime,maxLogSize:j.maxLogSize,cronSchedule:j.cronSchedule,reviewerSchedule:j.reviewerSchedule,scheduleBundleId:j.scheduleBundleId,cronScheduleOffset:j.cronScheduleOffset,schedulingPriority:j.schedulingPriority,maxRetries:j.maxRetries,reviewerMaxRetries:j.reviewerMaxRetries,reviewerRetryDelay:j.reviewerRetryDelay,reviewerMaxPrsPerRun:j.reviewerMaxPrsPerRun,providerEnv:j.providerEnv,notifications:j.notifications,prdPriority:j.prdPriority,roadmapScanner:j.roadmapScanner,templatesDir:j.templatesDir,boardProvider:j.boardProvider,jobProviders:Te,fallbackOnRateLimit:j.fallbackOnRateLimit,primaryFallbackModel:Pt,secondaryFallbackModel:ua,primaryFallbackPreset:j.primaryFallbackPreset||void 0,secondaryFallbackPreset:j.secondaryFallbackPreset||void 0,claudeModel:Pt,providerScheduleOverrides:j.providerScheduleOverrides,qa:j.qa,audit:j.audit,analytics:j.analytics,prResolver:j.prResolver,merger:j.merger,queue:j.queue,webhookTriggers:j.webhookTriggers}),tn=Ox(en);C(tn),$.current=tn,V(!1);let an="";if(xe)try{await oc()}catch(La){an=La instanceof Error?La.message:"failed to reinstall cron schedules"}o(an?{title:"Settings Saved (Cron Reinstall Failed)",message:an,type:"warning"}:{title:"Settings Saved",message:xe?"Configuration updated and cron schedules reinstalled.":"Configuration updated successfully.",type:"success"}),ee.current=!0,he(),F()}catch(Pt){o({title:"Save Failed",message:Pt instanceof Error?Pt.message:"Failed to save configuration",type:"error"})}finally{x(!1)}},L=()=>{$.current&&(C($.current),V(!1),o({title:"Reset Complete",message:"Unsaved changes were discarded.",type:"info"}))},se=async xe=>{if(!(A!=null&&!window.confirm("Replace existing global channel?")))try{const Te=await Bg({webhook:xe});G(Te.webhook)}catch(Te){o({title:"Failed to set global channel",message:Te instanceof Error?Te.message:"Unknown error",type:"error"})}},ge=async()=>{try{await Bg({webhook:null}),G(null)}catch(xe){o({title:"Failed to unset global channel",message:xe instanceof Error?xe.message:"Unknown error",type:"error"})}},pe=async()=>{if(f){_(!0);try{await AN(f),N(f),T(!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{_(!1)}}};if(te)return s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx("div",{className:"text-slate-400",children:"Opening automation..."})});if(le||!j)return s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx("div",{className:"text-slate-400",children:"Loading settings..."})});if(ne)return s.jsxs("div",{className:"flex flex-col items-center justify-center h-full space-y-4",children:[s.jsx(Dn,{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:ne.message}),s.jsx(qe,{onClick:()=>he(),children:"Retry"})]});const Se=[{id:"project",label:"Project",content:s.jsx(vw,{form:j,updateField:de,projectName:u,doctorChecks:ae,doctorLoading:ie})},{id:"ai-providers",label:"AI Providers",content:s.jsx(bw,{form:j,updateField:de,getAllPresets:me.getAllPresets,getPresetOptions:me.getPresetOptions,handleEditPreset:me.handleEditPreset,handleDeletePreset:me.handleDeletePreset,handleResetPreset:me.handleResetPreset,handleAddPreset:me.handleAddPreset})},{id:"integrations",label:"Integrations",content:s.jsx(Dw,{form:j,updateField:de,globalWebhook:A,isGlobalMode:b,onSetGlobal:se,onUnsetGlobal:ge,selectedProjectId:f})}];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"})]}),M&&s.jsxs(Qa,{variant:"warning",className:"animate-pulse",children:[s.jsx($s,{className:"h-3 w-3 mr-1"}),"Unsaved Changes"]})]}),s.jsx(xp,{tabs:Se,activeTab:W,onChange:R}),M&&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(Dn,{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(qe,{variant:"ghost",size:"sm",className:"text-slate-400 hover:text-slate-300",onClick:L,children:[s.jsx(uh,{className:"h-4 w-4 mr-2"}),"Discard"]}),s.jsxs(qe,{size:"sm",className:"bg-indigo-600 hover:bg-indigo-500 shadow-lg shadow-indigo-500/20",onClick:ze,loading:y,children:[s.jsx(lp,{className:"h-4 w-4 mr-2"}),"Save Changes"]})]})]})}),b&&f&&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(qe,{variant:"secondary",className:"bg-red-600 hover:bg-red-700 text-white",onClick:()=>T(!0),children:[s.jsx(Fs,{className:"h-4 w-4 mr-2"}),"Remove Project"]})]}),w&&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:()=>!k&&T(!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($s,{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(qe,{variant:"ghost",onClick:()=>T(!1),disabled:k,children:"Cancel"}),s.jsx(qe,{variant:"secondary",className:"bg-red-600 hover:bg-red-700",onClick:pe,loading:k,children:"Remove"})]})]})]}),s.jsx(pw,{isOpen:me.presetModalOpen,onClose:()=>{me.setPresetModalOpen(!1)},onSave:me.handleSavePreset,presetId:me.editingPresetId,preset:me.editingPreset,isBuiltIn:me.editingPresetId?co.includes(me.editingPresetId):!1,existingIds:Object.keys(me.getAllPresets())}),me.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:()=>me.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($s,{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:me.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:me.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(qe,{variant:"ghost",onClick:()=>me.setDeleteWarning(null),children:"Cancel"}),s.jsx(qe,{variant:"secondary",onClick:me.handleConfirmDelete,className:"bg-red-600 hover:bg-red-700",children:"Force Delete"})]})]})]})]})},Lw=()=>(a2(),n2(),s.jsx(Zb,{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(JN,{}),s.jsxs("div",{className:"flex-1 flex flex-col min-w-0 z-10",children:[s.jsx(KN,{}),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(wb,{children:[s.jsx(sl,{path:"/",element:s.jsx(f2,{})}),s.jsx(sl,{path:"/prs",element:s.jsx(m2,{})}),s.jsx(sl,{path:"/board",element:s.jsx(c2,{})}),s.jsx(sl,{path:"/scheduling",element:s.jsx(dw,{})}),s.jsx(sl,{path:"/logs",element:s.jsx(h2,{})}),s.jsx(sl,{path:"/roadmap",element:s.jsx(g2,{})}),s.jsx(sl,{path:"/settings",element:s.jsx(Uw,{})}),s.jsx(sl,{path:"*",element:s.jsx(Nb,{to:"/",replace:!0})})]})})})]}),s.jsx(t2,{})]})})),Qp=document.getElementById("root");if(!Qp)throw new Error("Could not find root element to mount to");const Hw=Ey.createRoot(Qp);Hw.render(s.jsx(_e.StrictMode,{children:s.jsx(Lw,{})}));
|