@jonit-dev/night-watch-cli 1.8.14-beta.7 → 1.8.16

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.
Files changed (68) hide show
  1. package/dist/cli.js +1611 -409
  2. package/dist/cli.js.map +1 -1
  3. package/dist/commands/doctor.d.ts.map +1 -1
  4. package/dist/commands/doctor.js +16 -0
  5. package/dist/commands/doctor.js.map +1 -1
  6. package/dist/commands/init.d.ts.map +1 -1
  7. package/dist/commands/init.js +13 -0
  8. package/dist/commands/init.js.map +1 -1
  9. package/dist/commands/install.d.ts +4 -0
  10. package/dist/commands/install.d.ts.map +1 -1
  11. package/dist/commands/install.js +26 -4
  12. package/dist/commands/install.js.map +1 -1
  13. package/dist/commands/logs.d.ts.map +1 -1
  14. package/dist/commands/logs.js +14 -4
  15. package/dist/commands/logs.js.map +1 -1
  16. package/dist/commands/merge.d.ts.map +1 -1
  17. package/dist/commands/merge.js +20 -0
  18. package/dist/commands/merge.js.map +1 -1
  19. package/dist/commands/queue.d.ts.map +1 -1
  20. package/dist/commands/queue.js +11 -7
  21. package/dist/commands/queue.js.map +1 -1
  22. package/dist/commands/review.d.ts.map +1 -1
  23. package/dist/commands/review.js +26 -0
  24. package/dist/commands/review.js.map +1 -1
  25. package/dist/commands/run.d.ts.map +1 -1
  26. package/dist/commands/run.js +24 -0
  27. package/dist/commands/run.js.map +1 -1
  28. package/dist/commands/shared/telemetry.d.ts +27 -0
  29. package/dist/commands/shared/telemetry.d.ts.map +1 -0
  30. package/dist/commands/shared/telemetry.js +73 -0
  31. package/dist/commands/shared/telemetry.js.map +1 -0
  32. package/dist/commands/status.d.ts.map +1 -1
  33. package/dist/commands/status.js +24 -0
  34. package/dist/commands/status.js.map +1 -1
  35. package/dist/commands/telemetry.d.ts +3 -0
  36. package/dist/commands/telemetry.d.ts.map +1 -0
  37. package/dist/commands/telemetry.js +52 -0
  38. package/dist/commands/telemetry.js.map +1 -0
  39. package/dist/commands/ux.d.ts +14 -0
  40. package/dist/commands/ux.d.ts.map +1 -0
  41. package/dist/commands/ux.js +169 -0
  42. package/dist/commands/ux.js.map +1 -0
  43. package/dist/scripts/night-watch-cron.sh +36 -12
  44. package/dist/telemetry-bootstrap.d.ts +2 -0
  45. package/dist/telemetry-bootstrap.d.ts.map +1 -0
  46. package/dist/telemetry-bootstrap.js +32 -0
  47. package/dist/telemetry-bootstrap.js.map +1 -0
  48. package/dist/templates/night-watch.config.json +14 -0
  49. package/dist/web/assets/index-BheLL2O2.css +1 -0
  50. package/dist/web/assets/index-BsTuwxzi.js +447 -0
  51. package/dist/web/index.html +2 -2
  52. package/package.json +2 -2
  53. package/dist/web/assets/index-6Yf-Q6Di.js +0 -442
  54. package/dist/web/assets/index-B6E6kOoR.js +0 -406
  55. package/dist/web/assets/index-BbiKFOgi.css +0 -1
  56. package/dist/web/assets/index-C-xpWpS8.css +0 -1
  57. package/dist/web/assets/index-C3BV1Hoa.js +0 -406
  58. package/dist/web/assets/index-CEYe-290.js +0 -412
  59. package/dist/web/assets/index-CL3Q-KB4.css +0 -1
  60. package/dist/web/assets/index-DIMUXIP8.css +0 -1
  61. package/dist/web/assets/index-DatF4suf.css +0 -1
  62. package/dist/web/assets/index-DpvzoXEv.js +0 -442
  63. package/dist/web/assets/index-Ds8OqaCa.css +0 -1
  64. package/dist/web/assets/index-DyME41HV.css +0 -1
  65. package/dist/web/assets/index-FDOCfjkP.js +0 -442
  66. package/dist/web/assets/index-NR27JE3b.js +0 -406
  67. package/dist/web/assets/index-Q3IYCcdZ.js +0 -447
  68. package/dist/web/assets/index-uBao8iYf.js +0 -447
@@ -1,406 +0,0 @@
1
- var up=Object.defineProperty;var sg=l=>{throw TypeError(l)};var cp=(l,r,d)=>r in l?up(l,r,{enumerable:!0,configurable:!0,writable:!0,value:d}):l[r]=d;var rg=(l,r,d)=>cp(l,typeof r!="symbol"?r+"":r,d),xf=(l,r,d)=>r.has(l)||sg("Cannot "+d);var J=(l,r,d)=>(xf(l,r,"read from private field"),d?d.call(l):r.get(l)),tt=(l,r,d)=>r.has(l)?sg("Cannot add the same private member more than once"):r instanceof WeakSet?r.add(l):r.set(l,d),Te=(l,r,d,c)=>(xf(l,r,"write to private field"),c?c.call(l,d):r.set(l,d),d),je=(l,r,d)=>(xf(l,r,"access private method"),d);(function(){const r=document.createElement("link").relList;if(r&&r.supports&&r.supports("modulepreload"))return;for(const f of document.querySelectorAll('link[rel="modulepreload"]'))c(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"&&c(b)}).observe(document,{childList:!0,subtree:!0});function d(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 c(f){if(f.ep)return;f.ep=!0;const h=d(f);fetch(f.href,h)}})();function Gf(l){return l&&l.__esModule&&Object.prototype.hasOwnProperty.call(l,"default")?l.default:l}function op(l){if(Object.prototype.hasOwnProperty.call(l,"__esModule"))return l;var r=l.default;if(typeof r=="function"){var d=function c(){return this instanceof c?Reflect.construct(r,arguments,this.constructor):r.apply(this,arguments)};d.prototype=r.prototype}else d={};return Object.defineProperty(d,"__esModule",{value:!0}),Object.keys(l).forEach(function(c){var f=Object.getOwnPropertyDescriptor(l,c);Object.defineProperty(d,c,f.get?f:{enumerable:!0,get:function(){return l[c]}})}),d}var vf={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 ig;function dp(){if(ig)return Ii;ig=1;var l=Symbol.for("react.transitional.element"),r=Symbol.for("react.fragment");function d(c,f,h){var b=null;if(h!==void 0&&(b=""+h),f.key!==void 0&&(b=""+f.key),"key"in f){h={};for(var j in f)j!=="key"&&(h[j]=f[j])}else h=f;return f=h.ref,{$$typeof:l,type:c,key:b,ref:f!==void 0?f:null,props:h}}return Ii.Fragment=r,Ii.jsx=d,Ii.jsxs=d,Ii}var ug;function fp(){return ug||(ug=1,vf.exports=dp()),vf.exports}var s=fp(),yf={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 cg;function hp(){if(cg)return Le;cg=1;var l=Symbol.for("react.transitional.element"),r=Symbol.for("react.portal"),d=Symbol.for("react.fragment"),c=Symbol.for("react.strict_mode"),f=Symbol.for("react.profiler"),h=Symbol.for("react.consumer"),b=Symbol.for("react.context"),j=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),y=Symbol.for("react.memo"),S=Symbol.for("react.lazy"),T=Symbol.for("react.activity"),_=Symbol.iterator;function k(L){return L===null||typeof L!="object"?null:(L=_&&L[_]||L["@@iterator"],typeof L=="function"?L:null)}var N={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},C=Object.assign,A={};function P(L,se,ge){this.props=L,this.context=se,this.refs=A,this.updater=ge||N}P.prototype.isReactComponent={},P.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")},P.prototype.forceUpdate=function(L){this.updater.enqueueForceUpdate(this,L,"forceUpdate")};function B(){}B.prototype=P.prototype;function M(L,se,ge){this.props=L,this.context=se,this.refs=A,this.updater=ge||N}var X=M.prototype=new B;X.constructor=M,C(X,P.prototype),X.isPureReactComponent=!0;var ie=Array.isArray;function G(){}var Z={H:null,A:null,T:null,S:null},R=Object.prototype.hasOwnProperty;function ee(L,se,ge){var ye=ge.ref;return{$$typeof:l,type:L,key:se,ref:ye!==void 0?ye:null,props:ge}}function O(L,se){return ee(L.type,se,L.props)}function ae(L){return typeof L=="object"&&L!==null&&L.$$typeof===l}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 ce(L){switch(L.status){case"fulfilled":return L.value;case"rejected":throw L.reason;default:switch(typeof L.status=="string"?L.then(G,G):(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 $(L,se,ge,ye,we){var xe=typeof L;(xe==="undefined"||xe==="boolean")&&(L=null);var Ce=!1;if(L===null)Ce=!0;else switch(xe){case"bigint":case"string":case"number":Ce=!0;break;case"object":switch(L.$$typeof){case l:case r:Ce=!0;break;case S:return Ce=L._init,$(Ce(L._payload),se,ge,ye,we)}}if(Ce)return we=we(L),Ce=ye===""?"."+ve(L,0):ye,ie(we)?(ge="",Ce!=null&&(ge=Ce.replace(he,"$&/")+"/"),$(we,se,ge,"",function(Rt){return Rt})):we!=null&&(ae(we)&&(we=O(we,ge+(we.key==null||L&&L.key===we.key?"":(""+we.key).replace(he,"$&/")+"/")+Ce)),se.push(we)),1;Ce=0;var Pe=ye===""?".":ye+":";if(ie(L))for(var Qe=0;Qe<L.length;Qe++)ye=L[Qe],xe=Pe+ve(ye,Qe),Ce+=$(ye,se,ge,xe,we);else if(Qe=k(L),typeof Qe=="function")for(L=Qe.call(L),Qe=0;!(ye=L.next()).done;)ye=ye.value,xe=Pe+ve(ye,Qe++),Ce+=$(ye,se,ge,xe,we);else if(xe==="object"){if(typeof L.then=="function")return $(ce(L),se,ge,ye,we);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 Ce}function te(L,se,ge){if(L==null)return L;var ye=[],we=0;return $(L,ye,"","",function(xe){return se.call(ge,xe,we++)}),ye}function fe(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)},_e={map:te,forEach:function(L,se,ge){te(L,function(){se.apply(this,arguments)},ge)},count:function(L){var se=0;return te(L,function(){se++}),se},toArray:function(L){return te(L,function(se){return se})||[]},only:function(L){if(!ae(L))throw Error("React.Children.only expected to receive a single React element child.");return L}};return Le.Activity=T,Le.Children=_e,Le.Component=P,Le.Fragment=d,Le.Profiler=f,Le.PureComponent=M,Le.StrictMode=c,Le.Suspense=p,Le.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=Z,Le.__COMPILER_RUNTIME={__proto__:null,c:function(L){return Z.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 ye=C({},L.props),we=L.key;if(se!=null)for(xe in se.key!==void 0&&(we=""+se.key),se)!R.call(se,xe)||xe==="key"||xe==="__self"||xe==="__source"||xe==="ref"&&se.ref===void 0||(ye[xe]=se[xe]);var xe=arguments.length-2;if(xe===1)ye.children=ge;else if(1<xe){for(var Ce=Array(xe),Pe=0;Pe<xe;Pe++)Ce[Pe]=arguments[Pe+2];ye.children=Ce}return ee(L.type,we,ye)},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 ye,we={},xe=null;if(se!=null)for(ye in se.key!==void 0&&(xe=""+se.key),se)R.call(se,ye)&&ye!=="key"&&ye!=="__self"&&ye!=="__source"&&(we[ye]=se[ye]);var Ce=arguments.length-2;if(Ce===1)we.children=ge;else if(1<Ce){for(var Pe=Array(Ce),Qe=0;Qe<Ce;Qe++)Pe[Qe]=arguments[Qe+2];we.children=Pe}if(L&&L.defaultProps)for(ye in Ce=L.defaultProps,Ce)we[ye]===void 0&&(we[ye]=Ce[ye]);return ee(L,xe,we)},Le.createRef=function(){return{current:null}},Le.forwardRef=function(L){return{$$typeof:j,render:L}},Le.isValidElement=ae,Le.lazy=function(L){return{$$typeof:S,_payload:{_status:-1,_result:L},_init:fe}},Le.memo=function(L,se){return{$$typeof:y,type:L,compare:se===void 0?null:se}},Le.startTransition=function(L){var se=Z.T,ge={};Z.T=ge;try{var ye=L(),we=Z.S;we!==null&&we(ge,ye),typeof ye=="object"&&ye!==null&&typeof ye.then=="function"&&ye.then(G,me)}catch(xe){me(xe)}finally{se!==null&&ge.types!==null&&(se.types=ge.types),Z.T=se}},Le.unstable_useCacheRefresh=function(){return Z.H.useCacheRefresh()},Le.use=function(L){return Z.H.use(L)},Le.useActionState=function(L,se,ge){return Z.H.useActionState(L,se,ge)},Le.useCallback=function(L,se){return Z.H.useCallback(L,se)},Le.useContext=function(L){return Z.H.useContext(L)},Le.useDebugValue=function(){},Le.useDeferredValue=function(L,se){return Z.H.useDeferredValue(L,se)},Le.useEffect=function(L,se){return Z.H.useEffect(L,se)},Le.useEffectEvent=function(L){return Z.H.useEffectEvent(L)},Le.useId=function(){return Z.H.useId()},Le.useImperativeHandle=function(L,se,ge){return Z.H.useImperativeHandle(L,se,ge)},Le.useInsertionEffect=function(L,se){return Z.H.useInsertionEffect(L,se)},Le.useLayoutEffect=function(L,se){return Z.H.useLayoutEffect(L,se)},Le.useMemo=function(L,se){return Z.H.useMemo(L,se)},Le.useOptimistic=function(L,se){return Z.H.useOptimistic(L,se)},Le.useReducer=function(L,se,ge){return Z.H.useReducer(L,se,ge)},Le.useRef=function(L){return Z.H.useRef(L)},Le.useState=function(L){return Z.H.useState(L)},Le.useSyncExternalStore=function(L,se,ge){return Z.H.useSyncExternalStore(L,se,ge)},Le.useTransition=function(){return Z.H.useTransition()},Le.version="19.2.4",Le}var og;function Ff(){return og||(og=1,yf.exports=hp()),yf.exports}var U=Ff();const ze=Gf(U);var pf={exports:{}},Xi={},bf={exports:{}},Sf={};/**
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 dg;function mp(){return dg||(dg=1,(function(l){function r($,te){var fe=$.length;$.push(te);e:for(;0<fe;){var me=fe-1>>>1,_e=$[me];if(0<f(_e,te))$[me]=te,$[fe]=_e,fe=me;else break e}}function d($){return $.length===0?null:$[0]}function c($){if($.length===0)return null;var te=$[0],fe=$.pop();if(fe!==te){$[0]=fe;e:for(var me=0,_e=$.length,L=_e>>>1;me<L;){var se=2*(me+1)-1,ge=$[se],ye=se+1,we=$[ye];if(0>f(ge,fe))ye<_e&&0>f(we,ge)?($[me]=we,$[ye]=fe,me=ye):($[me]=ge,$[se]=fe,me=se);else if(ye<_e&&0>f(we,fe))$[me]=we,$[ye]=fe,me=ye;else break e}}return te}function f($,te){var fe=$.sortIndex-te.sortIndex;return fe!==0?fe:$.id-te.id}if(l.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var h=performance;l.unstable_now=function(){return h.now()}}else{var b=Date,j=b.now();l.unstable_now=function(){return b.now()-j}}var p=[],y=[],S=1,T=null,_=3,k=!1,N=!1,C=!1,A=!1,P=typeof setTimeout=="function"?setTimeout:null,B=typeof clearTimeout=="function"?clearTimeout:null,M=typeof setImmediate<"u"?setImmediate:null;function X($){for(var te=d(y);te!==null;){if(te.callback===null)c(y);else if(te.startTime<=$)c(y),te.sortIndex=te.expirationTime,r(p,te);else break;te=d(y)}}function ie($){if(C=!1,X($),!N)if(d(p)!==null)N=!0,G||(G=!0,ne());else{var te=d(y);te!==null&&ce(ie,te.startTime-$)}}var G=!1,Z=-1,R=5,ee=-1;function O(){return A?!0:!(l.unstable_now()-ee<R)}function ae(){if(A=!1,G){var $=l.unstable_now();ee=$;var te=!0;try{e:{N=!1,C&&(C=!1,B(Z),Z=-1),k=!0;var fe=_;try{t:{for(X($),T=d(p);T!==null&&!(T.expirationTime>$&&O());){var me=T.callback;if(typeof me=="function"){T.callback=null,_=T.priorityLevel;var _e=me(T.expirationTime<=$);if($=l.unstable_now(),typeof _e=="function"){T.callback=_e,X($),te=!0;break t}T===d(p)&&c(p),X($)}else c(p);T=d(p)}if(T!==null)te=!0;else{var L=d(y);L!==null&&ce(ie,L.startTime-$),te=!1}}break e}finally{T=null,_=fe,k=!1}te=void 0}}finally{te?ne():G=!1}}}var ne;if(typeof M=="function")ne=function(){M(ae)};else if(typeof MessageChannel<"u"){var he=new MessageChannel,ve=he.port2;he.port1.onmessage=ae,ne=function(){ve.postMessage(null)}}else ne=function(){P(ae,0)};function ce($,te){Z=P(function(){$(l.unstable_now())},te)}l.unstable_IdlePriority=5,l.unstable_ImmediatePriority=1,l.unstable_LowPriority=4,l.unstable_NormalPriority=3,l.unstable_Profiling=null,l.unstable_UserBlockingPriority=2,l.unstable_cancelCallback=function($){$.callback=null},l.unstable_forceFrameRate=function($){0>$||125<$?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):R=0<$?Math.floor(1e3/$):5},l.unstable_getCurrentPriorityLevel=function(){return _},l.unstable_next=function($){switch(_){case 1:case 2:case 3:var te=3;break;default:te=_}var fe=_;_=te;try{return $()}finally{_=fe}},l.unstable_requestPaint=function(){A=!0},l.unstable_runWithPriority=function($,te){switch($){case 1:case 2:case 3:case 4:case 5:break;default:$=3}var fe=_;_=$;try{return te()}finally{_=fe}},l.unstable_scheduleCallback=function($,te,fe){var me=l.unstable_now();switch(typeof fe=="object"&&fe!==null?(fe=fe.delay,fe=typeof fe=="number"&&0<fe?me+fe:me):fe=me,$){case 1:var _e=-1;break;case 2:_e=250;break;case 5:_e=1073741823;break;case 4:_e=1e4;break;default:_e=5e3}return _e=fe+_e,$={id:S++,callback:te,priorityLevel:$,startTime:fe,expirationTime:_e,sortIndex:-1},fe>me?($.sortIndex=fe,r(y,$),d(p)===null&&$===d(y)&&(C?(B(Z),Z=-1):C=!0,ce(ie,fe-me))):($.sortIndex=_e,r(p,$),N||k||(N=!0,G||(G=!0,ne()))),$},l.unstable_shouldYield=O,l.unstable_wrapCallback=function($){var te=_;return function(){var fe=_;_=te;try{return $.apply(this,arguments)}finally{_=fe}}}})(Sf)),Sf}var fg;function gp(){return fg||(fg=1,bf.exports=mp()),bf.exports}var Nf={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 hg;function xp(){if(hg)return ra;hg=1;var l=Ff();function r(p){var y="https://react.dev/errors/"+p;if(1<arguments.length){y+="?args[]="+encodeURIComponent(arguments[1]);for(var S=2;S<arguments.length;S++)y+="&args[]="+encodeURIComponent(arguments[S])}return"Minified React error #"+p+"; visit "+y+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function d(){}var c={d:{f:d,r:function(){throw Error(r(522))},D:d,C:d,L:d,m:d,X:d,S:d,M:d},p:0,findDOMNode:null},f=Symbol.for("react.portal");function h(p,y,S){var T=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:f,key:T==null?null:""+T,children:p,containerInfo:y,implementation:S}}var b=l.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function j(p,y){if(p==="font")return"";if(typeof y=="string")return y==="use-credentials"?y:""}return ra.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=c,ra.createPortal=function(p,y){var S=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!y||y.nodeType!==1&&y.nodeType!==9&&y.nodeType!==11)throw Error(r(299));return h(p,y,null,S)},ra.flushSync=function(p){var y=b.T,S=c.p;try{if(b.T=null,c.p=2,p)return p()}finally{b.T=y,c.p=S,c.d.f()}},ra.preconnect=function(p,y){typeof p=="string"&&(y?(y=y.crossOrigin,y=typeof y=="string"?y==="use-credentials"?y:"":void 0):y=null,c.d.C(p,y))},ra.prefetchDNS=function(p){typeof p=="string"&&c.d.D(p)},ra.preinit=function(p,y){if(typeof p=="string"&&y&&typeof y.as=="string"){var S=y.as,T=j(S,y.crossOrigin),_=typeof y.integrity=="string"?y.integrity:void 0,k=typeof y.fetchPriority=="string"?y.fetchPriority:void 0;S==="style"?c.d.S(p,typeof y.precedence=="string"?y.precedence:void 0,{crossOrigin:T,integrity:_,fetchPriority:k}):S==="script"&&c.d.X(p,{crossOrigin:T,integrity:_,fetchPriority:k,nonce:typeof y.nonce=="string"?y.nonce:void 0})}},ra.preinitModule=function(p,y){if(typeof p=="string")if(typeof y=="object"&&y!==null){if(y.as==null||y.as==="script"){var S=j(y.as,y.crossOrigin);c.d.M(p,{crossOrigin:S,integrity:typeof y.integrity=="string"?y.integrity:void 0,nonce:typeof y.nonce=="string"?y.nonce:void 0})}}else y==null&&c.d.M(p)},ra.preload=function(p,y){if(typeof p=="string"&&typeof y=="object"&&y!==null&&typeof y.as=="string"){var S=y.as,T=j(S,y.crossOrigin);c.d.L(p,S,{crossOrigin:T,integrity:typeof y.integrity=="string"?y.integrity:void 0,nonce:typeof y.nonce=="string"?y.nonce:void 0,type:typeof y.type=="string"?y.type:void 0,fetchPriority:typeof y.fetchPriority=="string"?y.fetchPriority:void 0,referrerPolicy:typeof y.referrerPolicy=="string"?y.referrerPolicy:void 0,imageSrcSet:typeof y.imageSrcSet=="string"?y.imageSrcSet:void 0,imageSizes:typeof y.imageSizes=="string"?y.imageSizes:void 0,media:typeof y.media=="string"?y.media:void 0})}},ra.preloadModule=function(p,y){if(typeof p=="string")if(y){var S=j(y.as,y.crossOrigin);c.d.m(p,{as:typeof y.as=="string"&&y.as!=="script"?y.as:void 0,crossOrigin:S,integrity:typeof y.integrity=="string"?y.integrity:void 0})}else c.d.m(p)},ra.requestFormReset=function(p){c.d.r(p)},ra.unstable_batchedUpdates=function(p,y){return p(y)},ra.useFormState=function(p,y,S){return b.H.useFormState(p,y,S)},ra.useFormStatus=function(){return b.H.useHostTransitionStatus()},ra.version="19.2.4",ra}var mg;function Sx(){if(mg)return Nf.exports;mg=1;function l(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(l)}catch(r){console.error(r)}}return l(),Nf.exports=xp(),Nf.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 gg;function vp(){if(gg)return Xi;gg=1;var l=gp(),r=Ff(),d=Sx();function c(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 j(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function p(e){if(h(e)!==e)throw Error(c(188))}function y(e){var t=e.alternate;if(!t){if(t=h(e),t===null)throw Error(c(188));return t!==e?null:e}for(var a=e,n=t;;){var u=a.return;if(u===null)break;var o=u.alternate;if(o===null){if(n=u.return,n!==null){a=n;continue}break}if(u.child===o.child){for(o=u.child;o;){if(o===a)return p(u),e;if(o===n)return p(u),t;o=o.sibling}throw Error(c(188))}if(a.return!==n.return)a=u,n=o;else{for(var x=!1,E=u.child;E;){if(E===a){x=!0,a=u,n=o;break}if(E===n){x=!0,n=u,a=o;break}E=E.sibling}if(!x){for(E=o.child;E;){if(E===a){x=!0,a=o,n=u;break}if(E===n){x=!0,n=o,a=u;break}E=E.sibling}if(!x)throw Error(c(189))}}if(a.alternate!==n)throw Error(c(190))}if(a.tag!==3)throw Error(c(188));return a.stateNode.current===a?e:t}function S(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=S(e),t!==null)return t;e=e.sibling}return null}var T=Object.assign,_=Symbol.for("react.element"),k=Symbol.for("react.transitional.element"),N=Symbol.for("react.portal"),C=Symbol.for("react.fragment"),A=Symbol.for("react.strict_mode"),P=Symbol.for("react.profiler"),B=Symbol.for("react.consumer"),M=Symbol.for("react.context"),X=Symbol.for("react.forward_ref"),ie=Symbol.for("react.suspense"),G=Symbol.for("react.suspense_list"),Z=Symbol.for("react.memo"),R=Symbol.for("react.lazy"),ee=Symbol.for("react.activity"),O=Symbol.for("react.memo_cache_sentinel"),ae=Symbol.iterator;function ne(e){return e===null||typeof e!="object"?null:(e=ae&&e[ae]||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 P:return"Profiler";case A:return"StrictMode";case ie:return"Suspense";case G:return"SuspenseList";case ee:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case N:return"Portal";case M:return e.displayName||"Context";case B:return(e._context.displayName||"Context")+".Consumer";case X:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Z: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 ce=Array.isArray,$=r.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,te=d.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,fe={pending:!1,data:null,method:null,action:null},me=[],_e=-1;function L(e){return{current:e}}function se(e){0>_e||(e.current=me[_e],me[_e]=null,_e--)}function ge(e,t){_e++,me[_e]=e.current,e.current=t}var ye=L(null),we=L(null),xe=L(null),Ce=L(null);function Pe(e,t){switch(ge(xe,t),ge(we,e),ge(ye,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?M0(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=M0(t),e=O0(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}se(ye),ge(ye,e)}function Qe(){se(ye),se(we),se(xe)}function Rt(e){e.memoizedState!==null&&ge(Ce,e);var t=ye.current,a=O0(t,e.type);t!==a&&(ge(we,e),ge(ye,a))}function oa(e){we.current===e&&(se(ye),se(we)),Ce.current===e&&(se(Ce),Fi._currentValue=fe)}var mn,Xa;function da(e){if(mn===void 0)try{throw Error()}catch(a){var t=a.stack.trim().match(/\n( *(at )?)/);mn=t&&t[1]||"",Xa=-1<a.stack.indexOf(`
42
- at`)?" (<anonymous>)":-1<a.stack.indexOf("@")?"@unknown:0:0":""}return`
43
- `+mn+e+Xa}var fa=!1;function gn(e,t){if(!e||fa)return"";fa=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var n={DetermineComponentFrameRoot:function(){try{if(t){var oe=function(){throw Error()};if(Object.defineProperty(oe.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(oe,[])}catch(K){var I=K}Reflect.construct(e,[],oe)}else{try{oe.call()}catch(K){I=K}e.call(oe.prototype)}}else{try{throw Error()}catch(K){I=K}(oe=e())&&typeof oe.catch=="function"&&oe.catch(function(){})}}catch(K){if(K&&I&&typeof K.stack=="string")return[K.stack,I.stack]}return[null,null]}};n.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var u=Object.getOwnPropertyDescriptor(n.DetermineComponentFrameRoot,"name");u&&u.configurable&&Object.defineProperty(n.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var o=n.DetermineComponentFrameRoot(),x=o[0],E=o[1];if(x&&E){var z=x.split(`
44
- `),Q=E.split(`
45
- `);for(u=n=0;n<z.length&&!z[n].includes("DetermineComponentFrameRoot");)n++;for(;u<Q.length&&!Q[u].includes("DetermineComponentFrameRoot");)u++;if(n===z.length||u===Q.length)for(n=z.length-1,u=Q.length-1;1<=n&&0<=u&&z[n]!==Q[u];)u--;for(;1<=n&&0<=u;n--,u--)if(z[n]!==Q[u]){if(n!==1||u!==1)do if(n--,u--,0>u||z[n]!==Q[u]){var re=`
46
- `+z[n].replace(" at new "," at ");return e.displayName&&re.includes("<anonymous>")&&(re=re.replace("<anonymous>",e.displayName)),re}while(1<=n&&0<=u);break}}}finally{fa=!1,Error.prepareStackTrace=a}return(a=e?e.displayName||e.name:"")?da(a):""}function Gt(e,t){switch(e.tag){case 26:case 27:case 5:return da(e.type);case 16:return da("Lazy");case 13:return e.child!==t&&t!==null?da("Suspense Fallback"):da("Suspense");case 19:return da("SuspenseList");case 0:case 15:return gn(e.type,!1);case 11:return gn(e.type.render,!1);case 1:return gn(e.type,!0);case 31:return da("Activity");default:return""}}function ea(e){try{var t="",a=null;do t+=Gt(e,a),a=e,e=e.return;while(e);return t}catch(n){return`
47
- Error generating stack: `+n.message+`
48
- `+n.stack}}var Ea=Object.prototype.hasOwnProperty,Ja=l.unstable_scheduleCallback,Xl=l.unstable_cancelCallback,Dn=l.unstable_shouldYield,Wr=l.unstable_requestPaint,Ft=l.unstable_now,Jl=l.unstable_getCurrentPriorityLevel,Ws=l.unstable_ImmediatePriority,Kl=l.unstable_UserBlockingPriority,An=l.unstable_NormalPriority,Qs=l.unstable_LowPriority,rl=l.unstable_IdlePriority,Ie=l.log,il=l.unstable_setDisableYieldValue,ht=null,Lt=null;function Dt(e){if(typeof Ie=="function"&&il(e),Lt&&typeof Lt.setStrictMode=="function")try{Lt.setStrictMode(ht,e)}catch{}}var le=Math.clz32?Math.clz32:pt,pe=Math.log,He=Math.LN2;function pt(e){return e>>>=0,e===0?32:31-(pe(e)/He|0)|0}var ta=256,xn=262144,aa=4194304;function vn(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 n=e.pendingLanes;if(n===0)return 0;var u=0,o=e.suspendedLanes,x=e.pingedLanes;e=e.warmLanes;var E=n&134217727;return E!==0?(n=E&~o,n!==0?u=vn(n):(x&=E,x!==0?u=vn(x):a||(a=E&~e,a!==0&&(u=vn(a))))):(E=n&~o,E!==0?u=vn(E):x!==0?u=vn(x):a||(a=n&~e,a!==0&&(u=vn(a)))),u===0?0:t!==0&&t!==u&&(t&o)===0&&(o=u&-u,a=t&-t,o>=a||o===32&&(a&4194048)!==0)?t:u}function ul(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function pu(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Qr(){var e=aa;return aa<<=1,(aa&62914560)===0&&(aa=4194304),e}function Is(e){for(var t=[],a=0;31>a;a++)t.push(e);return t}function cl(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function bu(e,t,a,n,u,o){var x=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=x&~a;0<a;){var re=31-le(a),oe=1<<re;E[re]=0,z[re]=-1;var I=Q[re];if(I!==null)for(Q[re]=null,re=0;re<I.length;re++){var K=I[re];K!==null&&(K.lane&=-536870913)}a&=~oe}n!==0&&dt(e,n,0),o!==0&&u===0&&e.tag!==0&&(e.suspendedLanes|=o&~(x&~t))}function dt(e,t,a){e.pendingLanes|=t,e.suspendedLanes&=~t;var n=31-le(t);e.entangledLanes|=t,e.entanglements[n]=e.entanglements[n]|1073741824|a&261930}function ha(e,t){var a=e.entangledLanes|=t;for(e=e.entanglements;a;){var n=31-le(a),u=1<<n;u&t|e[n]&t&&(e[n]|=t),a&=~u}}function Ir(e,t){var a=t&-t;return a=(a&42)!==0?1:Xs(a),(a&(e.suspendedLanes|t))!==0?0:a}function Xs(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 Js(){var e=te.p;return e!==0?e:(e=window.event,e===void 0?32:J0(e.type))}function Xr(e,t){var a=te.p;try{return te.p=e,t()}finally{te.p=a}}var Ka=Math.random().toString(36).slice(2),jt="__reactFiber$"+Ka,Ht="__reactProps$"+Ka,_n="__reactContainer$"+Ka,ts="__reactEvents$"+Ka,Su="__reactListeners$"+Ka,Nu="__reactHandles$"+Ka,ju="__reactResources$"+Ka,as="__reactMarker$"+Ka;function Ks(e){delete e[jt],delete e[Ht],delete e[ts],delete e[Su],delete e[Nu]}function kn(e){var t=e[jt];if(t)return t;for(var a=e.parentNode;a;){if(t=a[_n]||a[jt]){if(a=t.alternate,t.child!==null||a!==null&&a.child!==null)for(e=U0(e);e!==null;){if(a=e[jt])return a;e=U0(e)}return t}e=a,a=e.parentNode}return null}function Oe(e){if(e=e[jt]||e[_n]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function ma(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(c(33))}function en(e){var t=e[ju];return t||(t=e[ju]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function At(e){e[as]=!0}var wu=new Set,Jr={};function yn(e,t){ol(e,t),ol(e+"Capture",t)}function ol(e,t){for(Jr[e]=t,e=0;e<t.length;e++)wu.add(t[e])}var Eu=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]*$"),Tu={},zn={};function Kr(e){return Ea.call(zn,e)?!0:Ea.call(Tu,e)?!1:Eu.test(e)?zn[e]=!0:(Tu[e]=!0,!1)}function Zt(e,t,a){if(Kr(t))if(a===null)e.removeAttribute(t);else{switch(typeof a){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var n=t.toLowerCase().slice(0,5);if(n!=="data-"&&n!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+a)}}function er(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,n){if(n===null)e.removeAttribute(a);else{switch(typeof n){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(a);return}e.setAttributeNS(t,a,""+n)}}function wt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function pn(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function ei(e,t,a){var n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var u=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return u.call(this)},set:function(x){a=""+x,o.call(this,x)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return a},setValue:function(x){a=""+x},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function ns(e){if(!e._valueTracker){var t=pn(e)?"checked":"value";e._valueTracker=ei(e,t,""+e[t])}}function dl(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var a=t.getValue(),n="";return e&&(n=pn(e)?e.checked?"true":"false":e.value),e=n,e!==a?(t.setValue(e),!0):!1}function tn(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 tr=/[\n"\\]/g;function Wt(e){return e.replace(tr,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function ar(e,t,a,n,u,o,x,E){e.name="",x!=null&&typeof x!="function"&&typeof x!="symbol"&&typeof x!="boolean"?e.type=x:e.removeAttribute("type"),t!=null?x==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+wt(t)):e.value!==""+wt(t)&&(e.value=""+wt(t)):x!=="submit"&&x!=="reset"||e.removeAttribute("value"),t!=null?ls(e,x,wt(t)):a!=null?ls(e,x,wt(a)):n!=null&&e.removeAttribute("value"),u==null&&o!=null&&(e.defaultChecked=!!o),u!=null&&(e.checked=u&&typeof u!="function"&&typeof u!="symbol"),E!=null&&typeof E!="function"&&typeof E!="symbol"&&typeof E!="boolean"?e.name=""+wt(E):e.removeAttribute("name")}function fl(e,t,a,n,u,o,x,E){if(o!=null&&typeof o!="function"&&typeof o!="symbol"&&typeof o!="boolean"&&(e.type=o),t!=null||a!=null){if(!(o!=="submit"&&o!=="reset"||t!=null)){ns(e);return}a=a!=null?""+wt(a):"",t=t!=null?""+wt(t):a,E||t===e.value||(e.value=t),e.defaultValue=t}n=n??u,n=typeof n!="function"&&typeof n!="symbol"&&!!n,e.checked=E?e.checked:!!n,e.defaultChecked=!!n,x!=null&&typeof x!="function"&&typeof x!="symbol"&&typeof x!="boolean"&&(e.name=x),ns(e)}function ls(e,t,a){t==="number"&&tn(e.ownerDocument)===e||e.defaultValue===""+a||(e.defaultValue=""+a)}function Un(e,t,a,n){if(e=e.options,t){t={};for(var u=0;u<a.length;u++)t["$"+a[u]]=!0;for(a=0;a<e.length;a++)u=t.hasOwnProperty("$"+e[a].value),e[a].selected!==u&&(e[a].selected=u),u&&n&&(e[a].defaultSelected=!0)}else{for(a=""+wt(a),t=null,u=0;u<e.length;u++){if(e[u].value===a){e[u].selected=!0,n&&(e[u].defaultSelected=!0);return}t!==null||e[u].disabled||(t=e[u])}t!==null&&(t.selected=!0)}}function ss(e,t,a){if(t!=null&&(t=""+wt(t),t!==e.value&&(e.value=t),a==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=a!=null?""+wt(a):""}function ti(e,t,a,n){if(t==null){if(n!=null){if(a!=null)throw Error(c(92));if(ce(n)){if(1<n.length)throw Error(c(93));n=n[0]}a=n}a==null&&(a=""),t=a}a=wt(t),e.defaultValue=a,n=e.textContent,n===a&&n!==""&&n!==null&&(e.value=n),ns(e)}function an(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 n=t.indexOf("--")===0;a==null||typeof a=="boolean"||a===""?n?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":n?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 Cu(e,t,a){if(t!=null&&typeof t!="object")throw Error(c(62));if(e=e.style,a!=null){for(var n in a)!a.hasOwnProperty(n)||t!=null&&t.hasOwnProperty(n)||(n.indexOf("--")===0?e.setProperty(n,""):n==="float"?e.cssFloat="":e[n]="");for(var u in t)n=t[u],t.hasOwnProperty(u)&&a[u]!==n&&is(e,u,n)}else for(var o in t)t.hasOwnProperty(o)&&is(e,o,t[o])}function nr(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 ho=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"]]),Mu=/^[\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 us(e){return Mu.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function La(){}var ai=null;function lr(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Ln=null,hl=null;function Ou(e){var t=Oe(e);if(t&&(e=t.stateNode)){var a=e[Ht]||null;e:switch(e=t.stateNode,t.type){case"input":if(ar(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="'+Wt(""+t)+'"][type="radio"]'),t=0;t<a.length;t++){var n=a[t];if(n!==e&&n.form===e.form){var u=n[Ht]||null;if(!u)throw Error(c(90));ar(n,u.value,u.defaultValue,u.defaultValue,u.checked,u.defaultChecked,u.type,u.name)}}for(t=0;t<a.length;t++)n=a[t],n.form===e.form&&dl(n)}break e;case"textarea":ss(e,a.value,a.defaultValue);break e;case"select":t=a.value,t!=null&&Un(e,!!a.multiple,t,!1)}}}var ni=!1;function li(e,t,a){if(ni)return e(t,a);ni=!0;try{var n=e(t);return n}finally{if(ni=!1,(Ln!==null||hl!==null)&&(jc(),Ln&&(t=Ln,e=hl,hl=Ln=null,Ou(t),e)))for(t=0;t<e.length;t++)Ou(e[t])}}function cs(e,t){var a=e.stateNode;if(a===null)return null;var n=a[Ht]||null;if(n===null)return null;a=n[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":(n=!n.disabled)||(e=e.type,n=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!n;break e;default:e=!1}if(e)return null;if(a&&typeof a!="function")throw Error(c(231,t,typeof a));return a}var nn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),si=!1;if(nn)try{var os={};Object.defineProperty(os,"passive",{get:function(){si=!0}}),window.addEventListener("test",os,os),window.removeEventListener("test",os,os)}catch{si=!1}var bn=null,sr=null,rr=null;function qt(){if(rr)return rr;var e,t=sr,a=t.length,n,u="value"in bn?bn.value:bn.textContent,o=u.length;for(e=0;e<a&&t[e]===u[e];e++);var x=a-e;for(n=1;n<=x&&t[a-n]===u[o-n];n++);return rr=u.slice(e,1<n?1-n: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 ln(){return!0}function Hn(){return!1}function Et(e){function t(a,n,u,o,x){this._reactName=a,this._targetInst=u,this.type=n,this.nativeEvent=o,this.target=x,this.currentTarget=null;for(var E in e)e.hasOwnProperty(E)&&(a=e[E],this[E]=a?a(o):o[E]);return this.isDefaultPrevented=(o.defaultPrevented!=null?o.defaultPrevented:o.returnValue===!1)?ln:Hn,this.isPropagationStopped=Hn,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=ln)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=ln)},persist:function(){},isPersistent:ln}),t}var Sn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},fs=Et(Sn),hs=T({},Sn,{view:0,detail:0}),ri=Et(hs),ir,ms,gs,ur=T({},hs,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:vs,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==gs&&(gs&&e.type==="mousemove"?(ir=e.screenX-gs.screenX,ms=e.screenY-gs.screenY):ms=ir=0,gs=e),ir)},movementY:function(e){return"movementY"in e?e.movementY:ms}}),Ru=Et(ur),mo=T({},ur,{dataTransfer:0}),go=Et(mo),xo=T({},hs,{relatedTarget:0}),cr=Et(xo),vo=T({},Sn,{animationName:0,elapsedTime:0,pseudoElement:0}),ml=Et(vo),yo=T({},Sn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),gl=Et(yo),xs=T({},Sn,{data:0}),xl=Et(xs),po={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},bo={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"},So={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function No(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=So[e])?!!t[e]:!1}function vs(){return No}var jo=T({},hs,{key:function(e){if(e.key){var t=po[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"?bo[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:vs,charCode:function(e){return e.type==="keypress"?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}}),wo=Et(jo),Eo=T({},ur,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Du=Et(Eo),To=T({},hs,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:vs}),Co=Et(To),Au=T({},Sn,{propertyName:0,elapsedTime:0,pseudoElement:0}),Mo=Et(Au),Oo=T({},ur,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),Ro=Et(Oo),Do=T({},Sn,{newState:0,oldState:0}),Ao=Et(Do),_u=[9,13,27,32],ii=nn&&"CompositionEvent"in window,ys=null;nn&&"documentMode"in document&&(ys=document.documentMode);var _o=nn&&"TextEvent"in window&&!ys,ku=nn&&(!ii||ys&&8<ys&&11>=ys),zu=" ",Uu=!1;function Lu(e,t){switch(e){case"keyup":return _u.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Hu(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var vl=!1;function ko(e,t){switch(e){case"compositionend":return Hu(t);case"keypress":return t.which!==32?null:(Uu=!0,zu);case"textInput":return e=t.data,e===zu&&Uu?null:e;default:return null}}function zo(e,t){if(vl)return e==="compositionend"||!ii&&Lu(e,t)?(e=qt(),rr=sr=bn=null,vl=!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 ku&&t.locale!=="ko"?null:t.data;default:return null}}var Uo={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 qu(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Uo[e.type]:t==="textarea"}function ui(e,t,a,n){Ln?hl?hl.push(n):hl=[n]:Ln=n,t=Rc(t,"onChange"),0<t.length&&(a=new fs("onChange","change",null,a,n),e.push({event:a,listeners:t}))}var yl=null,ps=null;function ga(e){N0(e,0)}function sn(e){var t=ma(e);if(dl(t))return e}function Vu(e,t){if(e==="change")return t}var Nn=!1;if(nn){var ci;if(nn){var Ta="oninput"in document;if(!Ta){var oi=document.createElement("div");oi.setAttribute("oninput","return;"),Ta=typeof oi.oninput=="function"}ci=Ta}else ci=!1;Nn=ci&&(!document.documentMode||9<document.documentMode)}function di(){yl&&(yl.detachEvent("onpropertychange",fi),ps=yl=null)}function fi(e){if(e.propertyName==="value"&&sn(ps)){var t=[];ui(t,ps,e,lr(e)),li(ga,t)}}function Ge(e,t,a){e==="focusin"?(di(),yl=t,ps=a,yl.attachEvent("onpropertychange",fi)):e==="focusout"&&di()}function pl(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return sn(ps)}function Lo(e,t){if(e==="click")return sn(t)}function mt(e,t){if(e==="input"||e==="change")return sn(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 Ss(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),n=Object.keys(t);if(a.length!==n.length)return!1;for(n=0;n<a.length;n++){var u=a[n];if(!Ea.call(t,u)||!la(e[u],t[u]))return!1}return!0}function Bu(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Yu(e,t){var a=Bu(e);e=0;for(var n;a;){if(a.nodeType===3){if(n=e+a.textContent.length,e<=t&&n>=t)return{node:a,offset:t-e};e=n}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=Bu(a)}}function Xe(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Xe(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Ho(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=tn(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=tn(e.document)}return t}function or(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 $u=nn&&"documentMode"in document&&11>=document.documentMode,bl=null,dr=null,Qt=null,fr=!1;function Ns(e,t,a){var n=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;fr||bl==null||bl!==tn(n)||(n=bl,"selectionStart"in n&&or(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}),Qt&&Ss(Qt,n)||(Qt=n,n=Rc(dr,"onSelect"),0<n.length&&(t=new fs("onSelect","select",null,t,a),e.push({event:t,listeners:n}),t.target=bl)))}function qn(e,t){var a={};return a[e.toLowerCase()]=t.toLowerCase(),a["Webkit"+e]="webkit"+t,a["Moz"+e]="moz"+t,a}var Sl={animationend:qn("Animation","AnimationEnd"),animationiteration:qn("Animation","AnimationIteration"),animationstart:qn("Animation","AnimationStart"),transitionrun:qn("Transition","TransitionRun"),transitionstart:qn("Transition","TransitionStart"),transitioncancel:qn("Transition","TransitionCancel"),transitionend:qn("Transition","TransitionEnd")},hi={},Pu={};nn&&(Pu=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 Vn(e){if(hi[e])return hi[e];if(!Sl[e])return e;var t=Sl[e],a;for(a in t)if(t.hasOwnProperty(a)&&a in Pu)return hi[e]=t[a];return e}var Gu=Vn("animationend"),Fu=Vn("animationiteration"),hr=Vn("animationstart"),qo=Vn("transitionrun"),Vo=Vn("transitionstart"),Zu=Vn("transitioncancel"),mi=Vn("transitionend"),gi=new Map,xi="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(" ");xi.push("scrollEnd");function xa(e,t){gi.set(e,t),yn(t,[e])}var Nl=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)},ua=[],Ha=0,js=0;function jl(){for(var e=Ha,t=js=Ha=0;t<e;){var a=ua[t];ua[t++]=null;var n=ua[t];ua[t++]=null;var u=ua[t];ua[t++]=null;var o=ua[t];if(ua[t++]=null,n!==null&&u!==null){var x=n.pending;x===null?u.next=u:(u.next=x.next,x.next=u),n.pending=u}o!==0&&ws(a,u,o)}}function qa(e,t,a,n){ua[Ha++]=e,ua[Ha++]=t,ua[Ha++]=a,ua[Ha++]=n,js|=n,e.lanes|=n,e=e.alternate,e!==null&&(e.lanes|=n)}function mr(e,t,a,n){return qa(e,t,a,n),Es(e)}function Va(e,t){return qa(e,null,null,t),Es(e)}function ws(e,t,a){e.lanes|=a;var n=e.alternate;n!==null&&(n.lanes|=a);for(var u=!1,o=e.return;o!==null;)o.childLanes|=a,n=o.alternate,n!==null&&(n.childLanes|=a),o.tag===22&&(e=o.stateNode,e===null||e._visibility&1||(u=!0)),e=o,o=o.return;return e.tag===3?(o=e.stateNode,u&&t!==null&&(u=31-le(a),e=o.hiddenUpdates,n=e[u],n===null?e[u]=[t]:n.push(t),t.lane=a|536870912),o):null}function Es(e){if(50<qi)throw qi=0,qd=null,Error(c(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Ca={};function gr(e,t,a,n){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=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function It(e,t,a,n){return new gr(e,t,a,n)}function xr(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Ba(e,t){var a=e.alternate;return a===null?(a=It(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 Wu(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 vr(e,t,a,n,u,o){var x=0;if(n=e,typeof e=="function")xr(e)&&(x=1);else if(typeof e=="string")x=Iy(e,a,ye.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case ee:return e=It(31,a,t,u),e.elementType=ee,e.lanes=o,e;case C:return Ya(a.children,u,o,t);case A:x=8,u|=24;break;case P:return e=It(12,a,t,u|2),e.elementType=P,e.lanes=o,e;case ie:return e=It(13,a,t,u),e.elementType=ie,e.lanes=o,e;case G:return e=It(19,a,t,u),e.elementType=G,e.lanes=o,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case M:x=10;break e;case B:x=9;break e;case X:x=11;break e;case Z:x=14;break e;case R:x=16,n=null;break e}x=29,a=Error(c(130,e===null?"null":typeof e,"")),n=null}return t=It(x,a,t,u),t.elementType=e,t.type=n,t.lanes=o,t}function Ya(e,t,a,n){return e=It(7,e,n,t),e.lanes=a,e}function vi(e,t,a){return e=It(6,e,null,t),e.lanes=a,e}function Qu(e){var t=It(18,null,null,0);return t.stateNode=e,t}function wl(e,t,a){return t=It(4,e.children!==null?e.children:[],e.key,t),t.lanes=a,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var yi=new WeakMap;function va(e,t){if(typeof e=="object"&&e!==null){var a=yi.get(e);return a!==void 0?a:(t={value:e,source:t,stack:ea(t)},yi.set(e,t),t)}return{value:e,source:t,stack:ea(t)}}var Bn=[],Yn=0,Ts=null,rn=0,sa=[],Ee=0,ya=null,$a=1,g="";function i(e,t){Bn[Yn++]=rn,Bn[Yn++]=Ts,Ts=e,rn=t}function m(e,t,a){sa[Ee++]=$a,sa[Ee++]=g,sa[Ee++]=ya,ya=e;var n=$a;e=g;var u=32-le(n)-1;n&=~(1<<u),a+=1;var o=32-le(t)+u;if(30<o){var x=u-u%5;o=(n&(1<<x)-1).toString(32),n>>=x,u-=x,$a=1<<32-le(t)+u|a<<u|n,g=o+e}else $a=1<<o|a<<u|n,g=e}function v(e){e.return!==null&&(i(e,1),m(e,1,0))}function w(e){for(;e===Ts;)Ts=Bn[--Yn],Bn[Yn]=null,rn=Bn[--Yn],Bn[Yn]=null;for(;e===ya;)ya=sa[--Ee],sa[Ee]=null,g=sa[--Ee],sa[Ee]=null,$a=sa[--Ee],sa[Ee]=null}function D(e,t){sa[Ee++]=$a,sa[Ee++]=g,sa[Ee++]=ya,$a=t.id,g=t.overflow,ya=e}var H=null,q=null,Y=!1,de=null,be=!1,Ue=Error(c(519));function Fe(e){var t=Error(c(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw un(va(t,e)),Ue}function De(e){var t=e.stateNode,a=e.type,n=e.memoizedProps;switch(t[jt]=e,t[Ht]=n,a){case"dialog":$e("cancel",t),$e("close",t);break;case"iframe":case"object":case"embed":$e("load",t);break;case"video":case"audio":for(a=0;a<Bi.length;a++)$e(Bi[a],t);break;case"source":$e("error",t);break;case"img":case"image":case"link":$e("error",t),$e("load",t);break;case"details":$e("toggle",t);break;case"input":$e("invalid",t),fl(t,n.value,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name,!0);break;case"select":$e("invalid",t);break;case"textarea":$e("invalid",t),ti(t,n.value,n.defaultValue,n.children)}a=n.children,typeof a!="string"&&typeof a!="number"&&typeof a!="bigint"||t.textContent===""+a||n.suppressHydrationWarning===!0||T0(t.textContent,a)?(n.popover!=null&&($e("beforetoggle",t),$e("toggle",t)),n.onScroll!=null&&$e("scroll",t),n.onScrollEnd!=null&&$e("scrollend",t),n.onClick!=null&&(t.onclick=La),t=!0):t=!1,t||Fe(e,!0)}function bt(e){for(H=e.return;H;)switch(H.tag){case 5:case 31:case 13:be=!1;return;case 27:case 3:be=!0;return;default:H=H.return}}function Bt(e){if(e!==H)return!1;if(!Y)return bt(e),Y=!0,!1;var t=e.tag,a;if((a=t!==3&&t!==27)&&((a=t===5)&&(a=e.type,a=!(a!=="form"&&a!=="button")||ef(e.type,e.memoizedProps)),a=!a),a&&q&&Fe(e),bt(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(c(317));q=z0(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(c(317));q=z0(e)}else t===27?(t=q,Ll(e.type)?(e=sf,sf=null,q=e):q=t):q=H?Za(e.stateNode.nextSibling):null;return!0}function Yt(){q=H=null,Y=!1}function jn(){var e=de;return e!==null&&(Na===null?Na=e:Na.push.apply(Na,e),de=null),e}function un(e){de===null?de=[e]:de.push(e)}var yr=L(null),$n=null,Pa=null;function wn(e,t,a){ge(yr,t._currentValue),t._currentValue=a}function cn(e){e._currentValue=yr.current,se(yr)}function pi(e,t,a){for(;e!==null;){var n=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,n!==null&&(n.childLanes|=t)):n!==null&&(n.childLanes&t)!==t&&(n.childLanes|=t),e===a)break;e=e.return}}function Pn(e,t,a,n){var u=e.child;for(u!==null&&(u.return=e);u!==null;){var o=u.dependencies;if(o!==null){var x=u.child;o=o.firstContext;e:for(;o!==null;){var E=o;o=u;for(var z=0;z<t.length;z++)if(E.context===t[z]){o.lanes|=a,E=o.alternate,E!==null&&(E.lanes|=a),pi(o.return,a,e),n||(x=null);break e}o=E.next}}else if(u.tag===18){if(x=u.return,x===null)throw Error(c(341));x.lanes|=a,o=x.alternate,o!==null&&(o.lanes|=a),pi(x,a,e),x=null}else x=u.child;if(x!==null)x.return=u;else for(x=u;x!==null;){if(x===e){x=null;break}if(u=x.sibling,u!==null){u.return=x.return,x=u;break}x=x.return}u=x}}function Ga(e,t,a,n){e=null;for(var u=t,o=!1;u!==null;){if(!o){if((u.flags&524288)!==0)o=!0;else if((u.flags&262144)!==0)break}if(u.tag===10){var x=u.alternate;if(x===null)throw Error(c(387));if(x=x.memoizedProps,x!==null){var E=u.type;la(u.pendingProps.value,x.value)||(e!==null?e.push(E):e=[E])}}else if(u===Ce.current){if(x=u.alternate,x===null)throw Error(c(387));x.memoizedState.memoizedState!==u.memoizedState.memoizedState&&(e!==null?e.push(Fi):e=[Fi])}u=u.return}e!==null&&Pn(t,e,a,n),t.flags|=262144}function pr(e){for(e=e.firstContext;e!==null;){if(!la(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Cs(e){$n=e,Pa=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Xt(e){return dh($n,e)}function Iu(e,t){return $n===null&&Cs(e),dh(e,t)}function dh(e,t){var a=t._currentValue;if(t={context:t,memoizedValue:a,next:null},Pa===null){if(e===null)throw Error(c(308));Pa=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Pa=Pa.next=t;return a}var Fv=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(a,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach(function(a){return a()})}},Zv=l.unstable_scheduleCallback,Wv=l.unstable_NormalPriority,_t={$$typeof:M,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Bo(){return{controller:new Fv,data:new Map,refCount:0}}function bi(e){e.refCount--,e.refCount===0&&Zv(Wv,function(){e.controller.abort()})}var Si=null,Yo=0,br=0,Sr=null;function Qv(e,t){if(Si===null){var a=Si=[];Yo=0,br=Gd(),Sr={status:"pending",value:void 0,then:function(n){a.push(n)}}}return Yo++,t.then(fh,fh),t}function fh(){if(--Yo===0&&Si!==null){Sr!==null&&(Sr.status="fulfilled");var e=Si;Si=null,br=0,Sr=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function Iv(e,t){var a=[],n={status:"pending",value:null,reason:null,then:function(u){a.push(u)}};return e.then(function(){n.status="fulfilled",n.value=t;for(var u=0;u<a.length;u++)(0,a[u])(t)},function(u){for(n.status="rejected",n.reason=u,u=0;u<a.length;u++)(0,a[u])(void 0)}),n}var hh=$.S;$.S=function(e,t){Im=Ft(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&Qv(e,t),hh!==null&&hh(e,t)};var Ms=L(null);function $o(){var e=Ms.current;return e!==null?e:ot.pooledCache}function Xu(e,t){t===null?ge(Ms,Ms.current):ge(Ms,t.pool)}function mh(){var e=$o();return e===null?null:{parent:_t._currentValue,pool:e}}var Nr=Error(c(460)),Po=Error(c(474)),Ju=Error(c(542)),Ku={then:function(){}};function gh(e){return e=e.status,e==="fulfilled"||e==="rejected"}function xh(e,t,a){switch(a=e[a],a===void 0?e.push(t):a!==t&&(t.then(La,La),t=a),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,yh(e),e;default:if(typeof t.status=="string")t.then(La,La);else{if(e=ot,e!==null&&100<e.shellSuspendCounter)throw Error(c(482));e=t,e.status="pending",e.then(function(n){if(t.status==="pending"){var u=t;u.status="fulfilled",u.value=n}},function(n){if(t.status==="pending"){var u=t;u.status="rejected",u.reason=n}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,yh(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 vh(){if(Rs===null)throw Error(c(459));var e=Rs;return Rs=null,e}function yh(e){if(e===Nr||e===Ju)throw Error(c(483))}var jr=null,Ni=0;function ec(e){var t=Ni;return Ni+=1,jr===null&&(jr=[]),xh(jr,e,t)}function ji(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function tc(e,t){throw t.$$typeof===_?Error(c(525)):(e=Object.prototype.toString.call(t),Error(c(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function ph(e){function t(F,V){if(e){var W=F.deletions;W===null?(F.deletions=[V],F.flags|=16):W.push(V)}}function a(F,V){if(!e)return null;for(;V!==null;)t(F,V),V=V.sibling;return null}function n(F){for(var V=new Map;F!==null;)F.key!==null?V.set(F.key,F):V.set(F.index,F),F=F.sibling;return V}function u(F,V){return F=Ba(F,V),F.index=0,F.sibling=null,F}function o(F,V,W){return F.index=W,e?(W=F.alternate,W!==null?(W=W.index,W<V?(F.flags|=67108866,V):W):(F.flags|=67108866,V)):(F.flags|=1048576,V)}function x(F){return e&&F.alternate===null&&(F.flags|=67108866),F}function E(F,V,W,ue){return V===null||V.tag!==6?(V=vi(W,F.mode,ue),V.return=F,V):(V=u(V,W),V.return=F,V)}function z(F,V,W,ue){var Me=W.type;return Me===C?re(F,V,W.props.children,ue,W.key):V!==null&&(V.elementType===Me||typeof Me=="object"&&Me!==null&&Me.$$typeof===R&&Os(Me)===V.type)?(V=u(V,W.props),ji(V,W),V.return=F,V):(V=vr(W.type,W.key,W.props,null,F.mode,ue),ji(V,W),V.return=F,V)}function Q(F,V,W,ue){return V===null||V.tag!==4||V.stateNode.containerInfo!==W.containerInfo||V.stateNode.implementation!==W.implementation?(V=wl(W,F.mode,ue),V.return=F,V):(V=u(V,W.children||[]),V.return=F,V)}function re(F,V,W,ue,Me){return V===null||V.tag!==7?(V=Ya(W,F.mode,ue,Me),V.return=F,V):(V=u(V,W),V.return=F,V)}function oe(F,V,W){if(typeof V=="string"&&V!==""||typeof V=="number"||typeof V=="bigint")return V=vi(""+V,F.mode,W),V.return=F,V;if(typeof V=="object"&&V!==null){switch(V.$$typeof){case k:return W=vr(V.type,V.key,V.props,null,F.mode,W),ji(W,V),W.return=F,W;case N:return V=wl(V,F.mode,W),V.return=F,V;case R:return V=Os(V),oe(F,V,W)}if(ce(V)||ne(V))return V=Ya(V,F.mode,W,null),V.return=F,V;if(typeof V.then=="function")return oe(F,ec(V),W);if(V.$$typeof===M)return oe(F,Iu(F,V),W);tc(F,V)}return null}function I(F,V,W,ue){var Me=V!==null?V.key:null;if(typeof W=="string"&&W!==""||typeof W=="number"||typeof W=="bigint")return Me!==null?null:E(F,V,""+W,ue);if(typeof W=="object"&&W!==null){switch(W.$$typeof){case k:return W.key===Me?z(F,V,W,ue):null;case N:return W.key===Me?Q(F,V,W,ue):null;case R:return W=Os(W),I(F,V,W,ue)}if(ce(W)||ne(W))return Me!==null?null:re(F,V,W,ue,null);if(typeof W.then=="function")return I(F,V,ec(W),ue);if(W.$$typeof===M)return I(F,V,Iu(F,W),ue);tc(F,W)}return null}function K(F,V,W,ue,Me){if(typeof ue=="string"&&ue!==""||typeof ue=="number"||typeof ue=="bigint")return F=F.get(W)||null,E(V,F,""+ue,Me);if(typeof ue=="object"&&ue!==null){switch(ue.$$typeof){case k:return F=F.get(ue.key===null?W:ue.key)||null,z(V,F,ue,Me);case N:return F=F.get(ue.key===null?W:ue.key)||null,Q(V,F,ue,Me);case R:return ue=Os(ue),K(F,V,W,ue,Me)}if(ce(ue)||ne(ue))return F=F.get(W)||null,re(V,F,ue,Me,null);if(typeof ue.then=="function")return K(F,V,W,ec(ue),Me);if(ue.$$typeof===M)return K(F,V,W,Iu(V,ue),Me);tc(V,ue)}return null}function Se(F,V,W,ue){for(var Me=null,Je=null,Ne=V,Ve=V=0,We=null;Ne!==null&&Ve<W.length;Ve++){Ne.index>Ve?(We=Ne,Ne=null):We=Ne.sibling;var Ke=I(F,Ne,W[Ve],ue);if(Ke===null){Ne===null&&(Ne=We);break}e&&Ne&&Ke.alternate===null&&t(F,Ne),V=o(Ke,V,Ve),Je===null?Me=Ke:Je.sibling=Ke,Je=Ke,Ne=We}if(Ve===W.length)return a(F,Ne),Y&&i(F,Ve),Me;if(Ne===null){for(;Ve<W.length;Ve++)Ne=oe(F,W[Ve],ue),Ne!==null&&(V=o(Ne,V,Ve),Je===null?Me=Ne:Je.sibling=Ne,Je=Ne);return Y&&i(F,Ve),Me}for(Ne=n(Ne);Ve<W.length;Ve++)We=K(Ne,F,Ve,W[Ve],ue),We!==null&&(e&&We.alternate!==null&&Ne.delete(We.key===null?Ve:We.key),V=o(We,V,Ve),Je===null?Me=We:Je.sibling=We,Je=We);return e&&Ne.forEach(function(Yl){return t(F,Yl)}),Y&&i(F,Ve),Me}function Ae(F,V,W,ue){if(W==null)throw Error(c(151));for(var Me=null,Je=null,Ne=V,Ve=V=0,We=null,Ke=W.next();Ne!==null&&!Ke.done;Ve++,Ke=W.next()){Ne.index>Ve?(We=Ne,Ne=null):We=Ne.sibling;var Yl=I(F,Ne,Ke.value,ue);if(Yl===null){Ne===null&&(Ne=We);break}e&&Ne&&Yl.alternate===null&&t(F,Ne),V=o(Yl,V,Ve),Je===null?Me=Yl:Je.sibling=Yl,Je=Yl,Ne=We}if(Ke.done)return a(F,Ne),Y&&i(F,Ve),Me;if(Ne===null){for(;!Ke.done;Ve++,Ke=W.next())Ke=oe(F,Ke.value,ue),Ke!==null&&(V=o(Ke,V,Ve),Je===null?Me=Ke:Je.sibling=Ke,Je=Ke);return Y&&i(F,Ve),Me}for(Ne=n(Ne);!Ke.done;Ve++,Ke=W.next())Ke=K(Ne,F,Ve,Ke.value,ue),Ke!==null&&(e&&Ke.alternate!==null&&Ne.delete(Ke.key===null?Ve:Ke.key),V=o(Ke,V,Ve),Je===null?Me=Ke:Je.sibling=Ke,Je=Ke);return e&&Ne.forEach(function(ip){return t(F,ip)}),Y&&i(F,Ve),Me}function ut(F,V,W,ue){if(typeof W=="object"&&W!==null&&W.type===C&&W.key===null&&(W=W.props.children),typeof W=="object"&&W!==null){switch(W.$$typeof){case k:e:{for(var Me=W.key;V!==null;){if(V.key===Me){if(Me=W.type,Me===C){if(V.tag===7){a(F,V.sibling),ue=u(V,W.props.children),ue.return=F,F=ue;break e}}else if(V.elementType===Me||typeof Me=="object"&&Me!==null&&Me.$$typeof===R&&Os(Me)===V.type){a(F,V.sibling),ue=u(V,W.props),ji(ue,W),ue.return=F,F=ue;break e}a(F,V);break}else t(F,V);V=V.sibling}W.type===C?(ue=Ya(W.props.children,F.mode,ue,W.key),ue.return=F,F=ue):(ue=vr(W.type,W.key,W.props,null,F.mode,ue),ji(ue,W),ue.return=F,F=ue)}return x(F);case N:e:{for(Me=W.key;V!==null;){if(V.key===Me)if(V.tag===4&&V.stateNode.containerInfo===W.containerInfo&&V.stateNode.implementation===W.implementation){a(F,V.sibling),ue=u(V,W.children||[]),ue.return=F,F=ue;break e}else{a(F,V);break}else t(F,V);V=V.sibling}ue=wl(W,F.mode,ue),ue.return=F,F=ue}return x(F);case R:return W=Os(W),ut(F,V,W,ue)}if(ce(W))return Se(F,V,W,ue);if(ne(W)){if(Me=ne(W),typeof Me!="function")throw Error(c(150));return W=Me.call(W),Ae(F,V,W,ue)}if(typeof W.then=="function")return ut(F,V,ec(W),ue);if(W.$$typeof===M)return ut(F,V,Iu(F,W),ue);tc(F,W)}return typeof W=="string"&&W!==""||typeof W=="number"||typeof W=="bigint"?(W=""+W,V!==null&&V.tag===6?(a(F,V.sibling),ue=u(V,W),ue.return=F,F=ue):(a(F,V),ue=vi(W,F.mode,ue),ue.return=F,F=ue),x(F)):a(F,V)}return function(F,V,W,ue){try{Ni=0;var Me=ut(F,V,W,ue);return jr=null,Me}catch(Ne){if(Ne===Nr||Ne===Ju)throw Ne;var Je=It(29,Ne,null,F.mode);return Je.lanes=ue,Je.return=F,Je}finally{}}}var Ds=ph(!0),bh=ph(!1),El=!1;function Go(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Fo(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 Tl(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Cl(e,t,a){var n=e.updateQueue;if(n===null)return null;if(n=n.shared,(et&2)!==0){var u=n.pending;return u===null?t.next=t:(t.next=u.next,u.next=t),n.pending=t,t=Es(e),ws(e,null,a),t}return qa(e,n,t,a),Es(e)}function wi(e,t,a){if(t=t.updateQueue,t!==null&&(t=t.shared,(a&4194048)!==0)){var n=t.lanes;n&=e.pendingLanes,a|=n,t.lanes=a,ha(e,a)}}function Zo(e,t){var a=e.updateQueue,n=e.alternate;if(n!==null&&(n=n.updateQueue,a===n)){var u=null,o=null;if(a=a.firstBaseUpdate,a!==null){do{var x={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};o===null?u=o=x:o=o.next=x,a=a.next}while(a!==null);o===null?u=o=t:o=o.next=t}else u=o=t;a={baseState:n.baseState,firstBaseUpdate:u,lastBaseUpdate:o,shared:n.shared,callbacks:n.callbacks},e.updateQueue=a;return}e=a.lastBaseUpdate,e===null?a.firstBaseUpdate=t:e.next=t,a.lastBaseUpdate=t}var Wo=!1;function Ei(){if(Wo){var e=Sr;if(e!==null)throw e}}function Ti(e,t,a,n){Wo=!1;var u=e.updateQueue;El=!1;var o=u.firstBaseUpdate,x=u.lastBaseUpdate,E=u.shared.pending;if(E!==null){u.shared.pending=null;var z=E,Q=z.next;z.next=null,x===null?o=Q:x.next=Q,x=z;var re=e.alternate;re!==null&&(re=re.updateQueue,E=re.lastBaseUpdate,E!==x&&(E===null?re.firstBaseUpdate=Q:E.next=Q,re.lastBaseUpdate=z))}if(o!==null){var oe=u.baseState;x=0,re=Q=z=null,E=o;do{var I=E.lane&-536870913,K=I!==E.lane;if(K?(Ze&I)===I:(n&I)===I){I!==0&&I===br&&(Wo=!0),re!==null&&(re=re.next={lane:0,tag:E.tag,payload:E.payload,callback:null,next:null});e:{var Se=e,Ae=E;I=t;var ut=a;switch(Ae.tag){case 1:if(Se=Ae.payload,typeof Se=="function"){oe=Se.call(ut,oe,I);break e}oe=Se;break e;case 3:Se.flags=Se.flags&-65537|128;case 0:if(Se=Ae.payload,I=typeof Se=="function"?Se.call(ut,oe,I):Se,I==null)break e;oe=T({},oe,I);break e;case 2:El=!0}}I=E.callback,I!==null&&(e.flags|=64,K&&(e.flags|=8192),K=u.callbacks,K===null?u.callbacks=[I]:K.push(I))}else K={lane:I,tag:E.tag,payload:E.payload,callback:E.callback,next:null},re===null?(Q=re=K,z=oe):re=re.next=K,x|=I;if(E=E.next,E===null){if(E=u.shared.pending,E===null)break;K=E,E=K.next,K.next=null,u.lastBaseUpdate=K,u.shared.pending=null}}while(!0);re===null&&(z=oe),u.baseState=z,u.firstBaseUpdate=Q,u.lastBaseUpdate=re,o===null&&(u.shared.lanes=0),Al|=x,e.lanes=x,e.memoizedState=oe}}function Sh(e,t){if(typeof e!="function")throw Error(c(191,e));e.call(t)}function Nh(e,t){var a=e.callbacks;if(a!==null)for(e.callbacks=null,e=0;e<a.length;e++)Sh(a[e],t)}var wr=L(null),ac=L(0);function jh(e,t){e=Kn,ge(ac,e),ge(wr,t),Kn=e|t.baseLanes}function Qo(){ge(ac,Kn),ge(wr,wr.current)}function Io(){Kn=ac.current,se(wr),se(ac)}var Ma=L(null),Fa=null;function Ml(e){var t=e.alternate;ge(Tt,Tt.current&1),ge(Ma,e),Fa===null&&(t===null||wr.current!==null||t.memoizedState!==null)&&(Fa=e)}function Xo(e){ge(Tt,Tt.current),ge(Ma,e),Fa===null&&(Fa=e)}function wh(e){e.tag===22?(ge(Tt,Tt.current),ge(Ma,e),Fa===null&&(Fa=e)):Ol()}function Ol(){ge(Tt,Tt.current),ge(Ma,Ma.current)}function Oa(e){se(Ma),Fa===e&&(Fa=null),se(Tt)}var Tt=L(0);function nc(e){for(var t=e;t!==null;){if(t.tag===13){var a=t.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||nf(a)||lf(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 Gn=0,qe=null,rt=null,kt=null,lc=!1,Er=!1,As=!1,sc=0,Ci=0,Tr=null,Xv=0;function St(){throw Error(c(321))}function Jo(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 Ko(e,t,a,n,u,o){return Gn=o,qe=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,$.H=e===null||e.memoizedState===null?im:md,As=!1,o=a(n,u),As=!1,Er&&(o=Th(t,a,n,u)),Eh(e),o}function Eh(e){$.H=Ri;var t=rt!==null&&rt.next!==null;if(Gn=0,kt=rt=qe=null,lc=!1,Ci=0,Tr=null,t)throw Error(c(300));e===null||zt||(e=e.dependencies,e!==null&&pr(e)&&(zt=!0))}function Th(e,t,a,n){qe=e;var u=0;do{if(Er&&(Tr=null),Ci=0,Er=!1,25<=u)throw Error(c(301));if(u+=1,kt=rt=null,e.updateQueue!=null){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,o.memoCache!=null&&(o.memoCache.index=0)}$.H=um,o=t(a,n)}while(Er);return o}function Jv(){var e=$.H,t=e.useState()[0];return t=typeof t.then=="function"?Mi(t):t,e=e.useState()[0],(rt!==null?rt.memoizedState:null)!==e&&(qe.flags|=1024),t}function ed(){var e=sc!==0;return sc=0,e}function td(e,t,a){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a}function ad(e){if(lc){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}lc=!1}Gn=0,kt=rt=qe=null,Er=!1,Ci=sc=0,Tr=null}function ca(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return kt===null?qe.memoizedState=kt=e:kt=kt.next=e,kt}function Ct(){if(rt===null){var e=qe.alternate;e=e!==null?e.memoizedState:null}else e=rt.next;var t=kt===null?qe.memoizedState:kt.next;if(t!==null)kt=t,rt=e;else{if(e===null)throw qe.alternate===null?Error(c(467)):Error(c(310));rt=e,e={memoizedState:rt.memoizedState,baseState:rt.baseState,baseQueue:rt.baseQueue,queue:rt.queue,next:null},kt===null?qe.memoizedState=kt=e:kt=kt.next=e}return kt}function rc(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Mi(e){var t=Ci;return Ci+=1,Tr===null&&(Tr=[]),e=xh(Tr,e,t),t=qe,(kt===null?t.memoizedState:kt.next)===null&&(t=t.alternate,$.H=t===null||t.memoizedState===null?im:md),e}function ic(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Mi(e);if(e.$$typeof===M)return Xt(e)}throw Error(c(438,String(e)))}function nd(e){var t=null,a=qe.updateQueue;if(a!==null&&(t=a.memoCache),t==null){var n=qe.alternate;n!==null&&(n=n.updateQueue,n!==null&&(n=n.memoCache,n!=null&&(t={data:n.data.map(function(u){return u.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),a===null&&(a=rc(),qe.updateQueue=a),a.memoCache=t,a=t.data[t.index],a===void 0)for(a=t.data[t.index]=Array(e),n=0;n<e;n++)a[n]=O;return t.index++,a}function Fn(e,t){return typeof t=="function"?t(e):t}function uc(e){var t=Ct();return ld(t,rt,e)}function ld(e,t,a){var n=e.queue;if(n===null)throw Error(c(311));n.lastRenderedReducer=a;var u=e.baseQueue,o=n.pending;if(o!==null){if(u!==null){var x=u.next;u.next=o.next,o.next=x}t.baseQueue=u=o,n.pending=null}if(o=e.baseState,u===null)e.memoizedState=o;else{t=u.next;var E=x=null,z=null,Q=t,re=!1;do{var oe=Q.lane&-536870913;if(oe!==Q.lane?(Ze&oe)===oe:(Gn&oe)===oe){var I=Q.revertLane;if(I===0)z!==null&&(z=z.next={lane:0,revertLane:0,gesture:null,action:Q.action,hasEagerState:Q.hasEagerState,eagerState:Q.eagerState,next:null}),oe===br&&(re=!0);else if((Gn&I)===I){Q=Q.next,I===br&&(re=!0);continue}else oe={lane:0,revertLane:Q.revertLane,gesture:null,action:Q.action,hasEagerState:Q.hasEagerState,eagerState:Q.eagerState,next:null},z===null?(E=z=oe,x=o):z=z.next=oe,qe.lanes|=I,Al|=I;oe=Q.action,As&&a(o,oe),o=Q.hasEagerState?Q.eagerState:a(o,oe)}else I={lane:oe,revertLane:Q.revertLane,gesture:Q.gesture,action:Q.action,hasEagerState:Q.hasEagerState,eagerState:Q.eagerState,next:null},z===null?(E=z=I,x=o):z=z.next=I,qe.lanes|=oe,Al|=oe;Q=Q.next}while(Q!==null&&Q!==t);if(z===null?x=o:z.next=E,!la(o,e.memoizedState)&&(zt=!0,re&&(a=Sr,a!==null)))throw a;e.memoizedState=o,e.baseState=x,e.baseQueue=z,n.lastRenderedState=o}return u===null&&(n.lanes=0),[e.memoizedState,n.dispatch]}function sd(e){var t=Ct(),a=t.queue;if(a===null)throw Error(c(311));a.lastRenderedReducer=e;var n=a.dispatch,u=a.pending,o=t.memoizedState;if(u!==null){a.pending=null;var x=u=u.next;do o=e(o,x.action),x=x.next;while(x!==u);la(o,t.memoizedState)||(zt=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),a.lastRenderedState=o}return[o,n]}function Ch(e,t,a){var n=qe,u=Ct(),o=Y;if(o){if(a===void 0)throw Error(c(407));a=a()}else a=t();var x=!la((rt||u).memoizedState,a);if(x&&(u.memoizedState=a,zt=!0),u=u.queue,ud(Rh.bind(null,n,u,e),[e]),u.getSnapshot!==t||x||kt!==null&&kt.memoizedState.tag&1){if(n.flags|=2048,Cr(9,{destroy:void 0},Oh.bind(null,n,u,a,t),null),ot===null)throw Error(c(349));o||(Gn&127)!==0||Mh(n,t,a)}return a}function Mh(e,t,a){e.flags|=16384,e={getSnapshot:t,value:a},t=qe.updateQueue,t===null?(t=rc(),qe.updateQueue=t,t.stores=[e]):(a=t.stores,a===null?t.stores=[e]:a.push(e))}function Oh(e,t,a,n){t.value=a,t.getSnapshot=n,Dh(t)&&Ah(e)}function Rh(e,t,a){return a(function(){Dh(t)&&Ah(e)})}function Dh(e){var t=e.getSnapshot;e=e.value;try{var a=t();return!la(e,a)}catch{return!0}}function Ah(e){var t=Va(e,2);t!==null&&ja(t,e,2)}function rd(e){var t=ca();if(typeof e=="function"){var a=e;if(e=a(),As){Dt(!0);try{a()}finally{Dt(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Fn,lastRenderedState:e},t}function _h(e,t,a,n){return e.baseState=a,ld(e,rt,typeof n=="function"?n:Fn)}function Kv(e,t,a,n,u){if(dc(e))throw Error(c(485));if(e=t.action,e!==null){var o={payload:u,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(x){o.listeners.push(x)}};$.T!==null?a(!0):o.isTransition=!1,n(o),a=t.pending,a===null?(o.next=t.pending=o,kh(t,o)):(o.next=a.next,t.pending=a.next=o)}}function kh(e,t){var a=t.action,n=t.payload,u=e.state;if(t.isTransition){var o=$.T,x={};$.T=x;try{var E=a(u,n),z=$.S;z!==null&&z(x,E),zh(e,t,E)}catch(Q){id(e,t,Q)}finally{o!==null&&x.types!==null&&(o.types=x.types),$.T=o}}else try{o=a(u,n),zh(e,t,o)}catch(Q){id(e,t,Q)}}function zh(e,t,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(function(n){Uh(e,t,n)},function(n){return id(e,t,n)}):Uh(e,t,a)}function Uh(e,t,a){t.status="fulfilled",t.value=a,Lh(t),e.state=a,t=e.pending,t!==null&&(a=t.next,a===t?e.pending=null:(a=a.next,t.next=a,kh(e,a)))}function id(e,t,a){var n=e.pending;if(e.pending=null,n!==null){n=n.next;do t.status="rejected",t.reason=a,Lh(t),t=t.next;while(t!==n)}e.action=null}function Lh(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Hh(e,t){return t}function qh(e,t){if(Y){var a=ot.formState;if(a!==null){e:{var n=qe;if(Y){if(q){t:{for(var u=q,o=be;u.nodeType!==8;){if(!o){u=null;break t}if(u=Za(u.nextSibling),u===null){u=null;break t}}o=u.data,u=o==="F!"||o==="F"?u:null}if(u){q=Za(u.nextSibling),n=u.data==="F!";break e}}Fe(n)}n=!1}n&&(t=a[0])}}return a=ca(),a.memoizedState=a.baseState=t,n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Hh,lastRenderedState:t},a.queue=n,a=lm.bind(null,qe,n),n.dispatch=a,n=rd(!1),o=hd.bind(null,qe,!1,n.queue),n=ca(),u={state:t,dispatch:null,action:e,pending:null},n.queue=u,a=Kv.bind(null,qe,u,o,a),u.dispatch=a,n.memoizedState=e,[t,a,!1]}function Vh(e){var t=Ct();return Bh(t,rt,e)}function Bh(e,t,a){if(t=ld(e,t,Hh)[0],e=uc(Fn)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var n=Mi(t)}catch(x){throw x===Nr?Ju:x}else n=t;t=Ct();var u=t.queue,o=u.dispatch;return a!==t.memoizedState&&(qe.flags|=2048,Cr(9,{destroy:void 0},ey.bind(null,u,a),null)),[n,o,e]}function ey(e,t){e.action=t}function Yh(e){var t=Ct(),a=rt;if(a!==null)return Bh(t,a,e);Ct(),t=t.memoizedState,a=Ct();var n=a.queue.dispatch;return a.memoizedState=e,[t,n,!1]}function Cr(e,t,a,n){return e={tag:e,create:a,deps:n,inst:t,next:null},t=qe.updateQueue,t===null&&(t=rc(),qe.updateQueue=t),a=t.lastEffect,a===null?t.lastEffect=e.next=e:(n=a.next,a.next=e,e.next=n,t.lastEffect=e),e}function $h(){return Ct().memoizedState}function cc(e,t,a,n){var u=ca();qe.flags|=e,u.memoizedState=Cr(1|t,{destroy:void 0},a,n===void 0?null:n)}function oc(e,t,a,n){var u=Ct();n=n===void 0?null:n;var o=u.memoizedState.inst;rt!==null&&n!==null&&Jo(n,rt.memoizedState.deps)?u.memoizedState=Cr(t,o,a,n):(qe.flags|=e,u.memoizedState=Cr(1|t,o,a,n))}function Ph(e,t){cc(8390656,8,e,t)}function ud(e,t){oc(2048,8,e,t)}function ty(e){qe.flags|=4;var t=qe.updateQueue;if(t===null)t=rc(),qe.updateQueue=t,t.events=[e];else{var a=t.events;a===null?t.events=[e]:a.push(e)}}function Gh(e){var t=Ct().memoizedState;return ty({ref:t,nextImpl:e}),function(){if((et&2)!==0)throw Error(c(440));return t.impl.apply(void 0,arguments)}}function Fh(e,t){return oc(4,2,e,t)}function Zh(e,t){return oc(4,4,e,t)}function Wh(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 Qh(e,t,a){a=a!=null?a.concat([e]):null,oc(4,4,Wh.bind(null,t,e),a)}function cd(){}function Ih(e,t){var a=Ct();t=t===void 0?null:t;var n=a.memoizedState;return t!==null&&Jo(t,n[1])?n[0]:(a.memoizedState=[e,t],e)}function Xh(e,t){var a=Ct();t=t===void 0?null:t;var n=a.memoizedState;if(t!==null&&Jo(t,n[1]))return n[0];if(n=e(),As){Dt(!0);try{e()}finally{Dt(!1)}}return a.memoizedState=[n,t],n}function od(e,t,a){return a===void 0||(Gn&1073741824)!==0&&(Ze&261930)===0?e.memoizedState=t:(e.memoizedState=a,e=Jm(),qe.lanes|=e,Al|=e,a)}function Jh(e,t,a,n){return la(a,t)?a:wr.current!==null?(e=od(e,a,n),la(e,t)||(zt=!0),e):(Gn&42)===0||(Gn&1073741824)!==0&&(Ze&261930)===0?(zt=!0,e.memoizedState=a):(e=Jm(),qe.lanes|=e,Al|=e,t)}function Kh(e,t,a,n,u){var o=te.p;te.p=o!==0&&8>o?o:8;var x=$.T,E={};$.T=E,hd(e,!1,t,a);try{var z=u(),Q=$.S;if(Q!==null&&Q(E,z),z!==null&&typeof z=="object"&&typeof z.then=="function"){var re=Iv(z,n);Oi(e,t,re,Aa(e))}else Oi(e,t,n,Aa(e))}catch(oe){Oi(e,t,{then:function(){},status:"rejected",reason:oe},Aa())}finally{te.p=o,x!==null&&E.types!==null&&(x.types=E.types),$.T=x}}function ay(){}function dd(e,t,a,n){if(e.tag!==5)throw Error(c(476));var u=em(e).queue;Kh(e,u,t,fe,a===null?ay:function(){return tm(e),a(n)})}function em(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:fe,baseState:fe,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Fn,lastRenderedState:fe},next:null};var a={};return t.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Fn,lastRenderedState:a},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function tm(e){var t=em(e);t.next===null&&(t=e.alternate.memoizedState),Oi(e,t.next.queue,{},Aa())}function fd(){return Xt(Fi)}function am(){return Ct().memoizedState}function nm(){return Ct().memoizedState}function ny(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var a=Aa();e=Tl(a);var n=Cl(t,e,a);n!==null&&(ja(n,t,a),wi(n,t,a)),t={cache:Bo()},e.payload=t;return}t=t.return}}function ly(e,t,a){var n=Aa();a={lane:n,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},dc(e)?sm(t,a):(a=mr(e,t,a,n),a!==null&&(ja(a,e,n),rm(a,t,n)))}function lm(e,t,a){var n=Aa();Oi(e,t,a,n)}function Oi(e,t,a,n){var u={lane:n,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(dc(e))sm(t,u);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var x=t.lastRenderedState,E=o(x,a);if(u.hasEagerState=!0,u.eagerState=E,la(E,x))return qa(e,t,u,0),ot===null&&jl(),!1}catch{}finally{}if(a=mr(e,t,u,n),a!==null)return ja(a,e,n),rm(a,t,n),!0}return!1}function hd(e,t,a,n){if(n={lane:2,revertLane:Gd(),gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},dc(e)){if(t)throw Error(c(479))}else t=mr(e,a,n,2),t!==null&&ja(t,e,2)}function dc(e){var t=e.alternate;return e===qe||t!==null&&t===qe}function sm(e,t){Er=lc=!0;var a=e.pending;a===null?t.next=t:(t.next=a.next,a.next=t),e.pending=t}function rm(e,t,a){if((a&4194048)!==0){var n=t.lanes;n&=e.pendingLanes,a|=n,t.lanes=a,ha(e,a)}}var Ri={readContext:Xt,use:ic,useCallback:St,useContext:St,useEffect:St,useImperativeHandle:St,useLayoutEffect:St,useInsertionEffect:St,useMemo:St,useReducer:St,useRef:St,useState:St,useDebugValue:St,useDeferredValue:St,useTransition:St,useSyncExternalStore:St,useId:St,useHostTransitionStatus:St,useFormState:St,useActionState:St,useOptimistic:St,useMemoCache:St,useCacheRefresh:St};Ri.useEffectEvent=St;var im={readContext:Xt,use:ic,useCallback:function(e,t){return ca().memoizedState=[e,t===void 0?null:t],e},useContext:Xt,useEffect:Ph,useImperativeHandle:function(e,t,a){a=a!=null?a.concat([e]):null,cc(4194308,4,Wh.bind(null,t,e),a)},useLayoutEffect:function(e,t){return cc(4194308,4,e,t)},useInsertionEffect:function(e,t){cc(4,2,e,t)},useMemo:function(e,t){var a=ca();t=t===void 0?null:t;var n=e();if(As){Dt(!0);try{e()}finally{Dt(!1)}}return a.memoizedState=[n,t],n},useReducer:function(e,t,a){var n=ca();if(a!==void 0){var u=a(t);if(As){Dt(!0);try{a(t)}finally{Dt(!1)}}}else u=t;return n.memoizedState=n.baseState=u,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:u},n.queue=e,e=e.dispatch=ly.bind(null,qe,e),[n.memoizedState,e]},useRef:function(e){var t=ca();return e={current:e},t.memoizedState=e},useState:function(e){e=rd(e);var t=e.queue,a=lm.bind(null,qe,t);return t.dispatch=a,[e.memoizedState,a]},useDebugValue:cd,useDeferredValue:function(e,t){var a=ca();return od(a,e,t)},useTransition:function(){var e=rd(!1);return e=Kh.bind(null,qe,e.queue,!0,!1),ca().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,a){var n=qe,u=ca();if(Y){if(a===void 0)throw Error(c(407));a=a()}else{if(a=t(),ot===null)throw Error(c(349));(Ze&127)!==0||Mh(n,t,a)}u.memoizedState=a;var o={value:a,getSnapshot:t};return u.queue=o,Ph(Rh.bind(null,n,o,e),[e]),n.flags|=2048,Cr(9,{destroy:void 0},Oh.bind(null,n,o,a,t),null),a},useId:function(){var e=ca(),t=ot.identifierPrefix;if(Y){var a=g,n=$a;a=(n&~(1<<32-le(n)-1)).toString(32)+a,t="_"+t+"R_"+a,a=sc++,0<a&&(t+="H"+a.toString(32)),t+="_"}else a=Xv++,t="_"+t+"r_"+a.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:fd,useFormState:qh,useActionState:qh,useOptimistic:function(e){var t=ca();t.memoizedState=t.baseState=e;var a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=a,t=hd.bind(null,qe,!0,a),a.dispatch=t,[e,t]},useMemoCache:nd,useCacheRefresh:function(){return ca().memoizedState=ny.bind(null,qe)},useEffectEvent:function(e){var t=ca(),a={impl:e};return t.memoizedState=a,function(){if((et&2)!==0)throw Error(c(440));return a.impl.apply(void 0,arguments)}}},md={readContext:Xt,use:ic,useCallback:Ih,useContext:Xt,useEffect:ud,useImperativeHandle:Qh,useInsertionEffect:Fh,useLayoutEffect:Zh,useMemo:Xh,useReducer:uc,useRef:$h,useState:function(){return uc(Fn)},useDebugValue:cd,useDeferredValue:function(e,t){var a=Ct();return Jh(a,rt.memoizedState,e,t)},useTransition:function(){var e=uc(Fn)[0],t=Ct().memoizedState;return[typeof e=="boolean"?e:Mi(e),t]},useSyncExternalStore:Ch,useId:am,useHostTransitionStatus:fd,useFormState:Vh,useActionState:Vh,useOptimistic:function(e,t){var a=Ct();return _h(a,rt,e,t)},useMemoCache:nd,useCacheRefresh:nm};md.useEffectEvent=Gh;var um={readContext:Xt,use:ic,useCallback:Ih,useContext:Xt,useEffect:ud,useImperativeHandle:Qh,useInsertionEffect:Fh,useLayoutEffect:Zh,useMemo:Xh,useReducer:sd,useRef:$h,useState:function(){return sd(Fn)},useDebugValue:cd,useDeferredValue:function(e,t){var a=Ct();return rt===null?od(a,e,t):Jh(a,rt.memoizedState,e,t)},useTransition:function(){var e=sd(Fn)[0],t=Ct().memoizedState;return[typeof e=="boolean"?e:Mi(e),t]},useSyncExternalStore:Ch,useId:am,useHostTransitionStatus:fd,useFormState:Yh,useActionState:Yh,useOptimistic:function(e,t){var a=Ct();return rt!==null?_h(a,rt,e,t):(a.baseState=e,[e,a.queue.dispatch])},useMemoCache:nd,useCacheRefresh:nm};um.useEffectEvent=Gh;function gd(e,t,a,n){t=e.memoizedState,a=a(n,t),a=a==null?t:T({},t,a),e.memoizedState=a,e.lanes===0&&(e.updateQueue.baseState=a)}var xd={enqueueSetState:function(e,t,a){e=e._reactInternals;var n=Aa(),u=Tl(n);u.payload=t,a!=null&&(u.callback=a),t=Cl(e,u,n),t!==null&&(ja(t,e,n),wi(t,e,n))},enqueueReplaceState:function(e,t,a){e=e._reactInternals;var n=Aa(),u=Tl(n);u.tag=1,u.payload=t,a!=null&&(u.callback=a),t=Cl(e,u,n),t!==null&&(ja(t,e,n),wi(t,e,n))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var a=Aa(),n=Tl(a);n.tag=2,t!=null&&(n.callback=t),t=Cl(e,n,a),t!==null&&(ja(t,e,a),wi(t,e,a))}};function cm(e,t,a,n,u,o,x){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(n,o,x):t.prototype&&t.prototype.isPureReactComponent?!Ss(a,n)||!Ss(u,o):!0}function om(e,t,a,n){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(a,n),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(a,n),t.state!==e&&xd.enqueueReplaceState(t,t.state,null)}function _s(e,t){var a=t;if("ref"in t){a={};for(var n in t)n!=="ref"&&(a[n]=t[n])}if(e=e.defaultProps){a===t&&(a=T({},a));for(var u in e)a[u]===void 0&&(a[u]=e[u])}return a}function dm(e){Nl(e)}function fm(e){console.error(e)}function hm(e){Nl(e)}function fc(e,t){try{var a=e.onUncaughtError;a(t.value,{componentStack:t.stack})}catch(n){setTimeout(function(){throw n})}}function mm(e,t,a){try{var n=e.onCaughtError;n(a.value,{componentStack:a.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(u){setTimeout(function(){throw u})}}function vd(e,t,a){return a=Tl(a),a.tag=3,a.payload={element:null},a.callback=function(){fc(e,t)},a}function gm(e){return e=Tl(e),e.tag=3,e}function xm(e,t,a,n){var u=a.type.getDerivedStateFromError;if(typeof u=="function"){var o=n.value;e.payload=function(){return u(o)},e.callback=function(){mm(t,a,n)}}var x=a.stateNode;x!==null&&typeof x.componentDidCatch=="function"&&(e.callback=function(){mm(t,a,n),typeof u!="function"&&(_l===null?_l=new Set([this]):_l.add(this));var E=n.stack;this.componentDidCatch(n.value,{componentStack:E!==null?E:""})})}function sy(e,t,a,n,u){if(a.flags|=32768,n!==null&&typeof n=="object"&&typeof n.then=="function"){if(t=a.alternate,t!==null&&Ga(t,a,u,!0),a=Ma.current,a!==null){switch(a.tag){case 31:case 13:return Fa===null?wc():a.alternate===null&&Nt===0&&(Nt=3),a.flags&=-257,a.flags|=65536,a.lanes=u,n===Ku?a.flags|=16384:(t=a.updateQueue,t===null?a.updateQueue=new Set([n]):t.add(n),Yd(e,n,u)),!1;case 22:return a.flags|=65536,n===Ku?a.flags|=16384:(t=a.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([n])},a.updateQueue=t):(a=t.retryQueue,a===null?t.retryQueue=new Set([n]):a.add(n)),Yd(e,n,u)),!1}throw Error(c(435,a.tag))}return Yd(e,n,u),wc(),!1}if(Y)return t=Ma.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=u,n!==Ue&&(e=Error(c(422),{cause:n}),un(va(e,a)))):(n!==Ue&&(t=Error(c(423),{cause:n}),un(va(t,a))),e=e.current.alternate,e.flags|=65536,u&=-u,e.lanes|=u,n=va(n,a),u=vd(e.stateNode,n,u),Zo(e,u),Nt!==4&&(Nt=2)),!1;var o=Error(c(520),{cause:n});if(o=va(o,a),Hi===null?Hi=[o]:Hi.push(o),Nt!==4&&(Nt=2),t===null)return!0;n=va(n,a),a=t;do{switch(a.tag){case 3:return a.flags|=65536,e=u&-u,a.lanes|=e,e=vd(a.stateNode,n,e),Zo(a,e),!1;case 1:if(t=a.type,o=a.stateNode,(a.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||o!==null&&typeof o.componentDidCatch=="function"&&(_l===null||!_l.has(o))))return a.flags|=65536,u&=-u,a.lanes|=u,u=gm(u),xm(u,e,a,n),Zo(a,u),!1}a=a.return}while(a!==null);return!1}var yd=Error(c(461)),zt=!1;function Jt(e,t,a,n){t.child=e===null?bh(t,null,a,n):Ds(t,e.child,a,n)}function vm(e,t,a,n,u){a=a.render;var o=t.ref;if("ref"in n){var x={};for(var E in n)E!=="ref"&&(x[E]=n[E])}else x=n;return Cs(t),n=Ko(e,t,a,x,o,u),E=ed(),e!==null&&!zt?(td(e,t,u),Zn(e,t,u)):(Y&&E&&v(t),t.flags|=1,Jt(e,t,n,u),t.child)}function ym(e,t,a,n,u){if(e===null){var o=a.type;return typeof o=="function"&&!xr(o)&&o.defaultProps===void 0&&a.compare===null?(t.tag=15,t.type=o,pm(e,t,o,n,u)):(e=vr(a.type,null,n,t,t.mode,u),e.ref=t.ref,e.return=t,t.child=e)}if(o=e.child,!Td(e,u)){var x=o.memoizedProps;if(a=a.compare,a=a!==null?a:Ss,a(x,n)&&e.ref===t.ref)return Zn(e,t,u)}return t.flags|=1,e=Ba(o,n),e.ref=t.ref,e.return=t,t.child=e}function pm(e,t,a,n,u){if(e!==null){var o=e.memoizedProps;if(Ss(o,n)&&e.ref===t.ref)if(zt=!1,t.pendingProps=n=o,Td(e,u))(e.flags&131072)!==0&&(zt=!0);else return t.lanes=e.lanes,Zn(e,t,u)}return pd(e,t,a,n,u)}function bm(e,t,a,n){var u=n.children,o=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),n.mode==="hidden"){if((t.flags&128)!==0){if(o=o!==null?o.baseLanes|a:a,e!==null){for(n=t.child=e.child,u=0;n!==null;)u=u|n.lanes|n.childLanes,n=n.sibling;n=u&~o}else n=0,t.child=null;return Sm(e,t,o,a,n)}if((a&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Xu(t,o!==null?o.cachePool:null),o!==null?jh(t,o):Qo(),wh(t);else return n=t.lanes=536870912,Sm(e,t,o!==null?o.baseLanes|a:a,a,n)}else o!==null?(Xu(t,o.cachePool),jh(t,o),Ol(),t.memoizedState=null):(e!==null&&Xu(t,null),Qo(),Ol());return Jt(e,t,u,a),t.child}function Di(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Sm(e,t,a,n,u){var o=$o();return o=o===null?null:{parent:_t._currentValue,pool:o},t.memoizedState={baseLanes:a,cachePool:o},e!==null&&Xu(t,null),Qo(),wh(t),e!==null&&Ga(e,t,n,!0),t.childLanes=u,null}function hc(e,t){return t=gc({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Nm(e,t,a){return Ds(t,e.child,null,a),e=hc(t,t.pendingProps),e.flags|=2,Oa(t),t.memoizedState=null,e}function ry(e,t,a){var n=t.pendingProps,u=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Y){if(n.mode==="hidden")return e=hc(t,n),t.lanes=536870912,Di(null,e);if(Xo(t),(e=q)?(e=k0(e,be),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:ya!==null?{id:$a,overflow:g}:null,retryLane:536870912,hydrationErrors:null},a=Qu(e),a.return=t,t.child=a,H=t,q=null)):e=null,e===null)throw Fe(t);return t.lanes=536870912,null}return hc(t,n)}var o=e.memoizedState;if(o!==null){var x=o.dehydrated;if(Xo(t),u)if(t.flags&256)t.flags&=-257,t=Nm(e,t,a);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(c(558));else if(zt||Ga(e,t,a,!1),u=(a&e.childLanes)!==0,zt||u){if(n=ot,n!==null&&(x=Ir(n,a),x!==0&&x!==o.retryLane))throw o.retryLane=x,Va(e,x),ja(n,e,x),yd;wc(),t=Nm(e,t,a)}else e=o.treeContext,q=Za(x.nextSibling),H=t,Y=!0,de=null,be=!1,e!==null&&D(t,e),t=hc(t,n),t.flags|=4096;return t}return e=Ba(e.child,{mode:n.mode,children:n.children}),e.ref=t.ref,t.child=e,e.return=t,e}function mc(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(c(284));(e===null||e.ref!==a)&&(t.flags|=4194816)}}function pd(e,t,a,n,u){return Cs(t),a=Ko(e,t,a,n,void 0,u),n=ed(),e!==null&&!zt?(td(e,t,u),Zn(e,t,u)):(Y&&n&&v(t),t.flags|=1,Jt(e,t,a,u),t.child)}function jm(e,t,a,n,u,o){return Cs(t),t.updateQueue=null,a=Th(t,n,a,u),Eh(e),n=ed(),e!==null&&!zt?(td(e,t,o),Zn(e,t,o)):(Y&&n&&v(t),t.flags|=1,Jt(e,t,a,o),t.child)}function wm(e,t,a,n,u){if(Cs(t),t.stateNode===null){var o=Ca,x=a.contextType;typeof x=="object"&&x!==null&&(o=Xt(x)),o=new a(n,o),t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,o.updater=xd,t.stateNode=o,o._reactInternals=t,o=t.stateNode,o.props=n,o.state=t.memoizedState,o.refs={},Go(t),x=a.contextType,o.context=typeof x=="object"&&x!==null?Xt(x):Ca,o.state=t.memoizedState,x=a.getDerivedStateFromProps,typeof x=="function"&&(gd(t,a,x,n),o.state=t.memoizedState),typeof a.getDerivedStateFromProps=="function"||typeof o.getSnapshotBeforeUpdate=="function"||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(x=o.state,typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount(),x!==o.state&&xd.enqueueReplaceState(o,o.state,null),Ti(t,n,o,u),Ei(),o.state=t.memoizedState),typeof o.componentDidMount=="function"&&(t.flags|=4194308),n=!0}else if(e===null){o=t.stateNode;var E=t.memoizedProps,z=_s(a,E);o.props=z;var Q=o.context,re=a.contextType;x=Ca,typeof re=="object"&&re!==null&&(x=Xt(re));var oe=a.getDerivedStateFromProps;re=typeof oe=="function"||typeof o.getSnapshotBeforeUpdate=="function",E=t.pendingProps!==E,re||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(E||Q!==x)&&om(t,o,n,x),El=!1;var I=t.memoizedState;o.state=I,Ti(t,n,o,u),Ei(),Q=t.memoizedState,E||I!==Q||El?(typeof oe=="function"&&(gd(t,a,oe,n),Q=t.memoizedState),(z=El||cm(t,a,z,n,I,Q,x))?(re||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount=="function"&&(t.flags|=4194308)):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=n,t.memoizedState=Q),o.props=n,o.state=Q,o.context=x,n=z):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),n=!1)}else{o=t.stateNode,Fo(e,t),x=t.memoizedProps,re=_s(a,x),o.props=re,oe=t.pendingProps,I=o.context,Q=a.contextType,z=Ca,typeof Q=="object"&&Q!==null&&(z=Xt(Q)),E=a.getDerivedStateFromProps,(Q=typeof E=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(x!==oe||I!==z)&&om(t,o,n,z),El=!1,I=t.memoizedState,o.state=I,Ti(t,n,o,u),Ei();var K=t.memoizedState;x!==oe||I!==K||El||e!==null&&e.dependencies!==null&&pr(e.dependencies)?(typeof E=="function"&&(gd(t,a,E,n),K=t.memoizedState),(re=El||cm(t,a,re,n,I,K,z)||e!==null&&e.dependencies!==null&&pr(e.dependencies))?(Q||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(n,K,z),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(n,K,z)),typeof o.componentDidUpdate=="function"&&(t.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof o.componentDidUpdate!="function"||x===e.memoizedProps&&I===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||x===e.memoizedProps&&I===e.memoizedState||(t.flags|=1024),t.memoizedProps=n,t.memoizedState=K),o.props=n,o.state=K,o.context=z,n=re):(typeof o.componentDidUpdate!="function"||x===e.memoizedProps&&I===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||x===e.memoizedProps&&I===e.memoizedState||(t.flags|=1024),n=!1)}return o=n,mc(e,t),n=(t.flags&128)!==0,o||n?(o=t.stateNode,a=n&&typeof a.getDerivedStateFromError!="function"?null:o.render(),t.flags|=1,e!==null&&n?(t.child=Ds(t,e.child,null,u),t.child=Ds(t,null,a,u)):Jt(e,t,a,u),t.memoizedState=o.state,e=t.child):e=Zn(e,t,u),e}function Em(e,t,a,n){return Yt(),t.flags|=256,Jt(e,t,a,n),t.child}var bd={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Sd(e){return{baseLanes:e,cachePool:mh()}}function Nd(e,t,a){return e=e!==null?e.childLanes&~a:0,t&&(e|=Da),e}function Tm(e,t,a){var n=t.pendingProps,u=!1,o=(t.flags&128)!==0,x;if((x=o)||(x=e!==null&&e.memoizedState===null?!1:(Tt.current&2)!==0),x&&(u=!0,t.flags&=-129),x=(t.flags&32)!==0,t.flags&=-33,e===null){if(Y){if(u?Ml(t):Ol(),(e=q)?(e=k0(e,be),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:ya!==null?{id:$a,overflow:g}:null,retryLane:536870912,hydrationErrors:null},a=Qu(e),a.return=t,t.child=a,H=t,q=null)):e=null,e===null)throw Fe(t);return lf(e)?t.lanes=32:t.lanes=536870912,null}var E=n.children;return n=n.fallback,u?(Ol(),u=t.mode,E=gc({mode:"hidden",children:E},u),n=Ya(n,u,a,null),E.return=t,n.return=t,E.sibling=n,t.child=E,n=t.child,n.memoizedState=Sd(a),n.childLanes=Nd(e,x,a),t.memoizedState=bd,Di(null,n)):(Ml(t),jd(t,E))}var z=e.memoizedState;if(z!==null&&(E=z.dehydrated,E!==null)){if(o)t.flags&256?(Ml(t),t.flags&=-257,t=wd(e,t,a)):t.memoizedState!==null?(Ol(),t.child=e.child,t.flags|=128,t=null):(Ol(),E=n.fallback,u=t.mode,n=gc({mode:"visible",children:n.children},u),E=Ya(E,u,a,null),E.flags|=2,n.return=t,E.return=t,n.sibling=E,t.child=n,Ds(t,e.child,null,a),n=t.child,n.memoizedState=Sd(a),n.childLanes=Nd(e,x,a),t.memoizedState=bd,t=Di(null,n));else if(Ml(t),lf(E)){if(x=E.nextSibling&&E.nextSibling.dataset,x)var Q=x.dgst;x=Q,n=Error(c(419)),n.stack="",n.digest=x,un({value:n,source:null,stack:null}),t=wd(e,t,a)}else if(zt||Ga(e,t,a,!1),x=(a&e.childLanes)!==0,zt||x){if(x=ot,x!==null&&(n=Ir(x,a),n!==0&&n!==z.retryLane))throw z.retryLane=n,Va(e,n),ja(x,e,n),yd;nf(E)||wc(),t=wd(e,t,a)}else nf(E)?(t.flags|=192,t.child=e.child,t=null):(e=z.treeContext,q=Za(E.nextSibling),H=t,Y=!0,de=null,be=!1,e!==null&&D(t,e),t=jd(t,n.children),t.flags|=4096);return t}return u?(Ol(),E=n.fallback,u=t.mode,z=e.child,Q=z.sibling,n=Ba(z,{mode:"hidden",children:n.children}),n.subtreeFlags=z.subtreeFlags&65011712,Q!==null?E=Ba(Q,E):(E=Ya(E,u,a,null),E.flags|=2),E.return=t,n.return=t,n.sibling=E,t.child=n,Di(null,n),n=t.child,E=e.child.memoizedState,E===null?E=Sd(a):(u=E.cachePool,u!==null?(z=_t._currentValue,u=u.parent!==z?{parent:z,pool:z}:u):u=mh(),E={baseLanes:E.baseLanes|a,cachePool:u}),n.memoizedState=E,n.childLanes=Nd(e,x,a),t.memoizedState=bd,Di(e.child,n)):(Ml(t),a=e.child,e=a.sibling,a=Ba(a,{mode:"visible",children:n.children}),a.return=t,a.sibling=null,e!==null&&(x=t.deletions,x===null?(t.deletions=[e],t.flags|=16):x.push(e)),t.child=a,t.memoizedState=null,a)}function jd(e,t){return t=gc({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function gc(e,t){return e=It(22,e,null,t),e.lanes=0,e}function wd(e,t,a){return Ds(t,e.child,null,a),e=jd(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Cm(e,t,a){e.lanes|=t;var n=e.alternate;n!==null&&(n.lanes|=t),pi(e.return,t,a)}function Ed(e,t,a,n,u,o){var x=e.memoizedState;x===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:n,tail:a,tailMode:u,treeForkCount:o}:(x.isBackwards=t,x.rendering=null,x.renderingStartTime=0,x.last=n,x.tail=a,x.tailMode=u,x.treeForkCount=o)}function Mm(e,t,a){var n=t.pendingProps,u=n.revealOrder,o=n.tail;n=n.children;var x=Tt.current,E=(x&2)!==0;if(E?(x=x&1|2,t.flags|=128):x&=1,ge(Tt,x),Jt(e,t,n,a),n=Y?rn:0,!E&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Cm(e,a,t);else if(e.tag===19)Cm(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(u){case"forwards":for(a=t.child,u=null;a!==null;)e=a.alternate,e!==null&&nc(e)===null&&(u=a),a=a.sibling;a=u,a===null?(u=t.child,t.child=null):(u=a.sibling,a.sibling=null),Ed(t,!1,u,a,o,n);break;case"backwards":case"unstable_legacy-backwards":for(a=null,u=t.child,t.child=null;u!==null;){if(e=u.alternate,e!==null&&nc(e)===null){t.child=u;break}e=u.sibling,u.sibling=a,a=u,u=e}Ed(t,!0,a,null,o,n);break;case"together":Ed(t,!1,null,null,void 0,n);break;default:t.memoizedState=null}return t.child}function Zn(e,t,a){if(e!==null&&(t.dependencies=e.dependencies),Al|=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(c(153));if(t.child!==null){for(e=t.child,a=Ba(e,e.pendingProps),t.child=a,a.return=t;e.sibling!==null;)e=e.sibling,a=a.sibling=Ba(e,e.pendingProps),a.return=t;a.sibling=null}return t.child}function Td(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&pr(e)))}function iy(e,t,a){switch(t.tag){case 3:Pe(t,t.stateNode.containerInfo),wn(t,_t,e.memoizedState.cache),Yt();break;case 27:case 5:Rt(t);break;case 4:Pe(t,t.stateNode.containerInfo);break;case 10:wn(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Xo(t),null;break;case 13:var n=t.memoizedState;if(n!==null)return n.dehydrated!==null?(Ml(t),t.flags|=128,null):(a&t.child.childLanes)!==0?Tm(e,t,a):(Ml(t),e=Zn(e,t,a),e!==null?e.sibling:null);Ml(t);break;case 19:var u=(e.flags&128)!==0;if(n=(a&t.childLanes)!==0,n||(Ga(e,t,a,!1),n=(a&t.childLanes)!==0),u){if(n)return Mm(e,t,a);t.flags|=128}if(u=t.memoizedState,u!==null&&(u.rendering=null,u.tail=null,u.lastEffect=null),ge(Tt,Tt.current),n)break;return null;case 22:return t.lanes=0,bm(e,t,a,t.pendingProps);case 24:wn(t,_t,e.memoizedState.cache)}return Zn(e,t,a)}function Om(e,t,a){if(e!==null)if(e.memoizedProps!==t.pendingProps)zt=!0;else{if(!Td(e,a)&&(t.flags&128)===0)return zt=!1,iy(e,t,a);zt=(e.flags&131072)!==0}else zt=!1,Y&&(t.flags&1048576)!==0&&m(t,rn,t.index);switch(t.lanes=0,t.tag){case 16:e:{var n=t.pendingProps;if(e=Os(t.elementType),t.type=e,typeof e=="function")xr(e)?(n=_s(e,n),t.tag=1,t=wm(null,t,e,n,a)):(t.tag=0,t=pd(null,t,e,n,a));else{if(e!=null){var u=e.$$typeof;if(u===X){t.tag=11,t=vm(null,t,e,n,a);break e}else if(u===Z){t.tag=14,t=ym(null,t,e,n,a);break e}}throw t=ve(e)||e,Error(c(306,t,""))}}return t;case 0:return pd(e,t,t.type,t.pendingProps,a);case 1:return n=t.type,u=_s(n,t.pendingProps),wm(e,t,n,u,a);case 3:e:{if(Pe(t,t.stateNode.containerInfo),e===null)throw Error(c(387));n=t.pendingProps;var o=t.memoizedState;u=o.element,Fo(e,t),Ti(t,n,null,a);var x=t.memoizedState;if(n=x.cache,wn(t,_t,n),n!==o.cache&&Pn(t,[_t],a,!0),Ei(),n=x.element,o.isDehydrated)if(o={element:n,isDehydrated:!1,cache:x.cache},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){t=Em(e,t,n,a);break e}else if(n!==u){u=va(Error(c(424)),t),un(u),t=Em(e,t,n,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=Za(e.firstChild),H=t,Y=!0,de=null,be=!0,a=bh(t,null,n,a),t.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling}else{if(Yt(),n===u){t=Zn(e,t,a);break e}Jt(e,t,n,a)}t=t.child}return t;case 26:return mc(e,t),e===null?(a=V0(t.type,null,t.pendingProps,null))?t.memoizedState=a:Y||(a=t.type,e=t.pendingProps,n=Dc(xe.current).createElement(a),n[jt]=t,n[Ht]=e,Kt(n,a,e),At(n),t.stateNode=n):t.memoizedState=V0(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Rt(t),e===null&&Y&&(n=t.stateNode=L0(t.type,t.pendingProps,xe.current),H=t,be=!0,u=q,Ll(t.type)?(sf=u,q=Za(n.firstChild)):q=u),Jt(e,t,t.pendingProps.children,a),mc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Y&&((u=n=q)&&(n=Ly(n,t.type,t.pendingProps,be),n!==null?(t.stateNode=n,H=t,q=Za(n.firstChild),be=!1,u=!0):u=!1),u||Fe(t)),Rt(t),u=t.type,o=t.pendingProps,x=e!==null?e.memoizedProps:null,n=o.children,ef(u,o)?n=null:x!==null&&ef(u,x)&&(t.flags|=32),t.memoizedState!==null&&(u=Ko(e,t,Jv,null,null,a),Fi._currentValue=u),mc(e,t),Jt(e,t,n,a),t.child;case 6:return e===null&&Y&&((e=a=q)&&(a=Hy(a,t.pendingProps,be),a!==null?(t.stateNode=a,H=t,q=null,e=!0):e=!1),e||Fe(t)),null;case 13:return Tm(e,t,a);case 4:return Pe(t,t.stateNode.containerInfo),n=t.pendingProps,e===null?t.child=Ds(t,null,n,a):Jt(e,t,n,a),t.child;case 11:return vm(e,t,t.type,t.pendingProps,a);case 7:return Jt(e,t,t.pendingProps,a),t.child;case 8:return Jt(e,t,t.pendingProps.children,a),t.child;case 12:return Jt(e,t,t.pendingProps.children,a),t.child;case 10:return n=t.pendingProps,wn(t,t.type,n.value),Jt(e,t,n.children,a),t.child;case 9:return u=t.type._context,n=t.pendingProps.children,Cs(t),u=Xt(u),n=n(u),t.flags|=1,Jt(e,t,n,a),t.child;case 14:return ym(e,t,t.type,t.pendingProps,a);case 15:return pm(e,t,t.type,t.pendingProps,a);case 19:return Mm(e,t,a);case 31:return ry(e,t,a);case 22:return bm(e,t,a,t.pendingProps);case 24:return Cs(t),n=Xt(_t),e===null?(u=$o(),u===null&&(u=ot,o=Bo(),u.pooledCache=o,o.refCount++,o!==null&&(u.pooledCacheLanes|=a),u=o),t.memoizedState={parent:n,cache:u},Go(t),wn(t,_t,u)):((e.lanes&a)!==0&&(Fo(e,t),Ti(t,null,null,a),Ei()),u=e.memoizedState,o=t.memoizedState,u.parent!==n?(u={parent:n,cache:n},t.memoizedState=u,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=u),wn(t,_t,n)):(n=o.cache,wn(t,_t,n),n!==u.cache&&Pn(t,[_t],a,!0))),Jt(e,t,t.pendingProps.children,a),t.child;case 29:throw t.pendingProps}throw Error(c(156,t.tag))}function Wn(e){e.flags|=4}function Cd(e,t,a,n,u){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(u&335544128)===u)if(e.stateNode.complete)e.flags|=8192;else if(a0())e.flags|=8192;else throw Rs=Ku,Po}else e.flags&=-16777217}function Rm(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!G0(t))if(a0())e.flags|=8192;else throw Rs=Ku,Po}function xc(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Qr():536870912,e.lanes|=t,Dr|=t)}function Ai(e,t){if(!Y)switch(e.tailMode){case"hidden":t=e.tail;for(var a=null;t!==null;)t.alternate!==null&&(a=t),t=t.sibling;a===null?e.tail=null:a.sibling=null;break;case"collapsed":a=e.tail;for(var n=null;a!==null;)a.alternate!==null&&(n=a),a=a.sibling;n===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:n.sibling=null}}function gt(e){var t=e.alternate!==null&&e.alternate.child===e.child,a=0,n=0;if(t)for(var u=e.child;u!==null;)a|=u.lanes|u.childLanes,n|=u.subtreeFlags&65011712,n|=u.flags&65011712,u.return=e,u=u.sibling;else for(u=e.child;u!==null;)a|=u.lanes|u.childLanes,n|=u.subtreeFlags,n|=u.flags,u.return=e,u=u.sibling;return e.subtreeFlags|=n,e.childLanes=a,t}function uy(e,t,a){var n=t.pendingProps;switch(w(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return gt(t),null;case 1:return gt(t),null;case 3:return a=t.stateNode,n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),cn(_t),Qe(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(e===null||e.child===null)&&(Bt(t)?Wn(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,jn())),gt(t),null;case 26:var u=t.type,o=t.memoizedState;return e===null?(Wn(t),o!==null?(gt(t),Rm(t,o)):(gt(t),Cd(t,u,null,n,a))):o?o!==e.memoizedState?(Wn(t),gt(t),Rm(t,o)):(gt(t),t.flags&=-16777217):(e=e.memoizedProps,e!==n&&Wn(t),gt(t),Cd(t,u,e,n,a)),null;case 27:if(oa(t),a=xe.current,u=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==n&&Wn(t);else{if(!n){if(t.stateNode===null)throw Error(c(166));return gt(t),null}e=ye.current,Bt(t)?De(t):(e=L0(u,n,a),t.stateNode=e,Wn(t))}return gt(t),null;case 5:if(oa(t),u=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==n&&Wn(t);else{if(!n){if(t.stateNode===null)throw Error(c(166));return gt(t),null}if(o=ye.current,Bt(t))De(t);else{var x=Dc(xe.current);switch(o){case 1:o=x.createElementNS("http://www.w3.org/2000/svg",u);break;case 2:o=x.createElementNS("http://www.w3.org/1998/Math/MathML",u);break;default:switch(u){case"svg":o=x.createElementNS("http://www.w3.org/2000/svg",u);break;case"math":o=x.createElementNS("http://www.w3.org/1998/Math/MathML",u);break;case"script":o=x.createElement("div"),o.innerHTML="<script><\/script>",o=o.removeChild(o.firstChild);break;case"select":o=typeof n.is=="string"?x.createElement("select",{is:n.is}):x.createElement("select"),n.multiple?o.multiple=!0:n.size&&(o.size=n.size);break;default:o=typeof n.is=="string"?x.createElement(u,{is:n.is}):x.createElement(u)}}o[jt]=t,o[Ht]=n;e:for(x=t.child;x!==null;){if(x.tag===5||x.tag===6)o.appendChild(x.stateNode);else if(x.tag!==4&&x.tag!==27&&x.child!==null){x.child.return=x,x=x.child;continue}if(x===t)break e;for(;x.sibling===null;){if(x.return===null||x.return===t)break e;x=x.return}x.sibling.return=x.return,x=x.sibling}t.stateNode=o;e:switch(Kt(o,u,n),u){case"button":case"input":case"select":case"textarea":n=!!n.autoFocus;break e;case"img":n=!0;break e;default:n=!1}n&&Wn(t)}}return gt(t),Cd(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,a),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==n&&Wn(t);else{if(typeof n!="string"&&t.stateNode===null)throw Error(c(166));if(e=xe.current,Bt(t)){if(e=t.stateNode,a=t.memoizedProps,n=null,u=H,u!==null)switch(u.tag){case 27:case 5:n=u.memoizedProps}e[jt]=t,e=!!(e.nodeValue===a||n!==null&&n.suppressHydrationWarning===!0||T0(e.nodeValue,a)),e||Fe(t,!0)}else e=Dc(e).createTextNode(n),e[jt]=t,t.stateNode=e}return gt(t),null;case 31:if(a=t.memoizedState,e===null||e.memoizedState!==null){if(n=Bt(t),a!==null){if(e===null){if(!n)throw Error(c(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(c(557));e[jt]=t}else Yt(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;gt(t),e=!1}else a=jn(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),e=!0;if(!e)return t.flags&256?(Oa(t),t):(Oa(t),null);if((t.flags&128)!==0)throw Error(c(558))}return gt(t),null;case 13:if(n=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(u=Bt(t),n!==null&&n.dehydrated!==null){if(e===null){if(!u)throw Error(c(318));if(u=t.memoizedState,u=u!==null?u.dehydrated:null,!u)throw Error(c(317));u[jt]=t}else Yt(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;gt(t),u=!1}else u=jn(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=u),u=!0;if(!u)return t.flags&256?(Oa(t),t):(Oa(t),null)}return Oa(t),(t.flags&128)!==0?(t.lanes=a,t):(a=n!==null,e=e!==null&&e.memoizedState!==null,a&&(n=t.child,u=null,n.alternate!==null&&n.alternate.memoizedState!==null&&n.alternate.memoizedState.cachePool!==null&&(u=n.alternate.memoizedState.cachePool.pool),o=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(o=n.memoizedState.cachePool.pool),o!==u&&(n.flags|=2048)),a!==e&&a&&(t.child.flags|=8192),xc(t,t.updateQueue),gt(t),null);case 4:return Qe(),e===null&&Qd(t.stateNode.containerInfo),gt(t),null;case 10:return cn(t.type),gt(t),null;case 19:if(se(Tt),n=t.memoizedState,n===null)return gt(t),null;if(u=(t.flags&128)!==0,o=n.rendering,o===null)if(u)Ai(n,!1);else{if(Nt!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(o=nc(e),o!==null){for(t.flags|=128,Ai(n,!1),e=o.updateQueue,t.updateQueue=e,xc(t,e),t.subtreeFlags=0,e=a,a=t.child;a!==null;)Wu(a,e),a=a.sibling;return ge(Tt,Tt.current&1|2),Y&&i(t,n.treeForkCount),t.child}e=e.sibling}n.tail!==null&&Ft()>Sc&&(t.flags|=128,u=!0,Ai(n,!1),t.lanes=4194304)}else{if(!u)if(e=nc(o),e!==null){if(t.flags|=128,u=!0,e=e.updateQueue,t.updateQueue=e,xc(t,e),Ai(n,!0),n.tail===null&&n.tailMode==="hidden"&&!o.alternate&&!Y)return gt(t),null}else 2*Ft()-n.renderingStartTime>Sc&&a!==536870912&&(t.flags|=128,u=!0,Ai(n,!1),t.lanes=4194304);n.isBackwards?(o.sibling=t.child,t.child=o):(e=n.last,e!==null?e.sibling=o:t.child=o,n.last=o)}return n.tail!==null?(e=n.tail,n.rendering=e,n.tail=e.sibling,n.renderingStartTime=Ft(),e.sibling=null,a=Tt.current,ge(Tt,u?a&1|2:a&1),Y&&i(t,n.treeForkCount),e):(gt(t),null);case 22:case 23:return Oa(t),Io(),n=t.memoizedState!==null,e!==null?e.memoizedState!==null!==n&&(t.flags|=8192):n&&(t.flags|=8192),n?(a&536870912)!==0&&(t.flags&128)===0&&(gt(t),t.subtreeFlags&6&&(t.flags|=8192)):gt(t),a=t.updateQueue,a!==null&&xc(t,a.retryQueue),a=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),n=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(n=t.memoizedState.cachePool.pool),n!==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),cn(_t),gt(t),null;case 25:return null;case 30:return null}throw Error(c(156,t.tag))}function cy(e,t){switch(w(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return cn(_t),Qe(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return oa(t),null;case 31:if(t.memoizedState!==null){if(Oa(t),t.alternate===null)throw Error(c(340));Yt()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Oa(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(c(340));Yt()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return se(Tt),null;case 4:return Qe(),null;case 10:return cn(t.type),null;case 22:case 23:return Oa(t),Io(),e!==null&&se(Ms),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return cn(_t),null;case 25:return null;default:return null}}function Dm(e,t){switch(w(t),t.tag){case 3:cn(_t),Qe();break;case 26:case 27:case 5:oa(t);break;case 4:Qe();break;case 31:t.memoizedState!==null&&Oa(t);break;case 13:Oa(t);break;case 19:se(Tt);break;case 10:cn(t.type);break;case 22:case 23:Oa(t),Io(),e!==null&&se(Ms);break;case 24:cn(_t)}}function _i(e,t){try{var a=t.updateQueue,n=a!==null?a.lastEffect:null;if(n!==null){var u=n.next;a=u;do{if((a.tag&e)===e){n=void 0;var o=a.create,x=a.inst;n=o(),x.destroy=n}a=a.next}while(a!==u)}}catch(E){lt(t,t.return,E)}}function Rl(e,t,a){try{var n=t.updateQueue,u=n!==null?n.lastEffect:null;if(u!==null){var o=u.next;n=o;do{if((n.tag&e)===e){var x=n.inst,E=x.destroy;if(E!==void 0){x.destroy=void 0,u=t;var z=a,Q=E;try{Q()}catch(re){lt(u,z,re)}}}n=n.next}while(n!==o)}}catch(re){lt(t,t.return,re)}}function Am(e){var t=e.updateQueue;if(t!==null){var a=e.stateNode;try{Nh(t,a)}catch(n){lt(e,e.return,n)}}}function _m(e,t,a){a.props=_s(e.type,e.memoizedProps),a.state=e.memoizedState;try{a.componentWillUnmount()}catch(n){lt(e,t,n)}}function ki(e,t){try{var a=e.ref;if(a!==null){switch(e.tag){case 26:case 27:case 5:var n=e.stateNode;break;case 30:n=e.stateNode;break;default:n=e.stateNode}typeof a=="function"?e.refCleanup=a(n):a.current=n}}catch(u){lt(e,t,u)}}function En(e,t){var a=e.ref,n=e.refCleanup;if(a!==null)if(typeof n=="function")try{n()}catch(u){lt(e,t,u)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof a=="function")try{a(null)}catch(u){lt(e,t,u)}else a.current=null}function km(e){var t=e.type,a=e.memoizedProps,n=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":a.autoFocus&&n.focus();break e;case"img":a.src?n.src=a.src:a.srcSet&&(n.srcset=a.srcSet)}}catch(u){lt(e,e.return,u)}}function Md(e,t,a){try{var n=e.stateNode;Dy(n,e.type,a,t),n[Ht]=t}catch(u){lt(e,e.return,u)}}function zm(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Ll(e.type)||e.tag===4}function Od(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||zm(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&&Ll(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 Rd(e,t,a){var n=e.tag;if(n===5||n===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=La));else if(n!==4&&(n===27&&Ll(e.type)&&(a=e.stateNode,t=null),e=e.child,e!==null))for(Rd(e,t,a),e=e.sibling;e!==null;)Rd(e,t,a),e=e.sibling}function vc(e,t,a){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?a.insertBefore(e,t):a.appendChild(e);else if(n!==4&&(n===27&&Ll(e.type)&&(a=e.stateNode),e=e.child,e!==null))for(vc(e,t,a),e=e.sibling;e!==null;)vc(e,t,a),e=e.sibling}function Um(e){var t=e.stateNode,a=e.memoizedProps;try{for(var n=e.type,u=t.attributes;u.length;)t.removeAttributeNode(u[0]);Kt(t,n,a),t[jt]=e,t[Ht]=a}catch(o){lt(e,e.return,o)}}var Qn=!1,Ut=!1,Dd=!1,Lm=typeof WeakSet=="function"?WeakSet:Set,$t=null;function oy(e,t){if(e=e.containerInfo,Jd=Hc,e=Ho(e),or(e)){if("selectionStart"in e)var a={start:e.selectionStart,end:e.selectionEnd};else e:{a=(a=e.ownerDocument)&&a.defaultView||window;var n=a.getSelection&&a.getSelection();if(n&&n.rangeCount!==0){a=n.anchorNode;var u=n.anchorOffset,o=n.focusNode;n=n.focusOffset;try{a.nodeType,o.nodeType}catch{a=null;break e}var x=0,E=-1,z=-1,Q=0,re=0,oe=e,I=null;t:for(;;){for(var K;oe!==a||u!==0&&oe.nodeType!==3||(E=x+u),oe!==o||n!==0&&oe.nodeType!==3||(z=x+n),oe.nodeType===3&&(x+=oe.nodeValue.length),(K=oe.firstChild)!==null;)I=oe,oe=K;for(;;){if(oe===e)break t;if(I===a&&++Q===u&&(E=x),I===o&&++re===n&&(z=x),(K=oe.nextSibling)!==null)break;oe=I,I=oe.parentNode}oe=K}a=E===-1||z===-1?null:{start:E,end:z}}else a=null}a=a||{start:0,end:0}}else a=null;for(Kd={focusedElem:e,selectionRange:a},Hc=!1,$t=t;$t!==null;)if(t=$t,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,$t=e;else for(;$t!==null;){switch(t=$t,o=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++)u=e[a],u.ref.impl=u.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&o!==null){e=void 0,a=t,u=o.memoizedProps,o=o.memoizedState,n=a.stateNode;try{var Se=_s(a.type,u);e=n.getSnapshotBeforeUpdate(Se,o),n.__reactInternalSnapshotBeforeUpdate=e}catch(Ae){lt(a,a.return,Ae)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,a=e.nodeType,a===9)af(e);else if(a===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":af(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(c(163))}if(e=t.sibling,e!==null){e.return=t.return,$t=e;break}$t=t.return}}function Hm(e,t,a){var n=a.flags;switch(a.tag){case 0:case 11:case 15:Xn(e,a),n&4&&_i(5,a);break;case 1:if(Xn(e,a),n&4)if(e=a.stateNode,t===null)try{e.componentDidMount()}catch(x){lt(a,a.return,x)}else{var u=_s(a.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(u,t,e.__reactInternalSnapshotBeforeUpdate)}catch(x){lt(a,a.return,x)}}n&64&&Am(a),n&512&&ki(a,a.return);break;case 3:if(Xn(e,a),n&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{Nh(e,t)}catch(x){lt(a,a.return,x)}}break;case 27:t===null&&n&4&&Um(a);case 26:case 5:Xn(e,a),t===null&&n&4&&km(a),n&512&&ki(a,a.return);break;case 12:Xn(e,a);break;case 31:Xn(e,a),n&4&&Bm(e,a);break;case 13:Xn(e,a),n&4&&Ym(e,a),n&64&&(e=a.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(a=py.bind(null,a),qy(e,a))));break;case 22:if(n=a.memoizedState!==null||Qn,!n){t=t!==null&&t.memoizedState!==null||Ut,u=Qn;var o=Ut;Qn=n,(Ut=t)&&!o?Jn(e,a,(a.subtreeFlags&8772)!==0):Xn(e,a),Qn=u,Ut=o}break;case 30:break;default:Xn(e,a)}}function qm(e){var t=e.alternate;t!==null&&(e.alternate=null,qm(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Ks(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 vt=null,pa=!1;function In(e,t,a){for(a=a.child;a!==null;)Vm(e,t,a),a=a.sibling}function Vm(e,t,a){if(Lt&&typeof Lt.onCommitFiberUnmount=="function")try{Lt.onCommitFiberUnmount(ht,a)}catch{}switch(a.tag){case 26:Ut||En(a,t),In(e,t,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:Ut||En(a,t);var n=vt,u=pa;Ll(a.type)&&(vt=a.stateNode,pa=!1),In(e,t,a),$i(a.stateNode),vt=n,pa=u;break;case 5:Ut||En(a,t);case 6:if(n=vt,u=pa,vt=null,In(e,t,a),vt=n,pa=u,vt!==null)if(pa)try{(vt.nodeType===9?vt.body:vt.nodeName==="HTML"?vt.ownerDocument.body:vt).removeChild(a.stateNode)}catch(o){lt(a,t,o)}else try{vt.removeChild(a.stateNode)}catch(o){lt(a,t,o)}break;case 18:vt!==null&&(pa?(e=vt,A0(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,a.stateNode),qr(e)):A0(vt,a.stateNode));break;case 4:n=vt,u=pa,vt=a.stateNode.containerInfo,pa=!0,In(e,t,a),vt=n,pa=u;break;case 0:case 11:case 14:case 15:Rl(2,a,t),Ut||Rl(4,a,t),In(e,t,a);break;case 1:Ut||(En(a,t),n=a.stateNode,typeof n.componentWillUnmount=="function"&&_m(a,t,n)),In(e,t,a);break;case 21:In(e,t,a);break;case 22:Ut=(n=Ut)||a.memoizedState!==null,In(e,t,a),Ut=n;break;default:In(e,t,a)}}function Bm(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{qr(e)}catch(a){lt(t,t.return,a)}}}function Ym(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{qr(e)}catch(a){lt(t,t.return,a)}}function dy(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Lm),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Lm),t;default:throw Error(c(435,e.tag))}}function yc(e,t){var a=dy(e);t.forEach(function(n){if(!a.has(n)){a.add(n);var u=by.bind(null,e,n);n.then(u,u)}})}function ba(e,t){var a=t.deletions;if(a!==null)for(var n=0;n<a.length;n++){var u=a[n],o=e,x=t,E=x;e:for(;E!==null;){switch(E.tag){case 27:if(Ll(E.type)){vt=E.stateNode,pa=!1;break e}break;case 5:vt=E.stateNode,pa=!1;break e;case 3:case 4:vt=E.stateNode.containerInfo,pa=!0;break e}E=E.return}if(vt===null)throw Error(c(160));Vm(o,x,u),vt=null,pa=!1,o=u.alternate,o!==null&&(o.return=null),u.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)$m(t,e),t=t.sibling}var on=null;function $m(e,t){var a=e.alternate,n=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:ba(t,e),Sa(e),n&4&&(Rl(3,e,e.return),_i(3,e),Rl(5,e,e.return));break;case 1:ba(t,e),Sa(e),n&512&&(Ut||a===null||En(a,a.return)),n&64&&Qn&&(e=e.updateQueue,e!==null&&(n=e.callbacks,n!==null&&(a=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=a===null?n:a.concat(n))));break;case 26:var u=on;if(ba(t,e),Sa(e),n&512&&(Ut||a===null||En(a,a.return)),n&4){var o=a!==null?a.memoizedState:null;if(n=e.memoizedState,a===null)if(n===null)if(e.stateNode===null){e:{n=e.type,a=e.memoizedProps,u=u.ownerDocument||u;t:switch(n){case"title":o=u.getElementsByTagName("title")[0],(!o||o[as]||o[jt]||o.namespaceURI==="http://www.w3.org/2000/svg"||o.hasAttribute("itemprop"))&&(o=u.createElement(n),u.head.insertBefore(o,u.querySelector("head > title"))),Kt(o,n,a),o[jt]=e,At(o),n=o;break e;case"link":var x=$0("link","href",u).get(n+(a.href||""));if(x){for(var E=0;E<x.length;E++)if(o=x[E],o.getAttribute("href")===(a.href==null||a.href===""?null:a.href)&&o.getAttribute("rel")===(a.rel==null?null:a.rel)&&o.getAttribute("title")===(a.title==null?null:a.title)&&o.getAttribute("crossorigin")===(a.crossOrigin==null?null:a.crossOrigin)){x.splice(E,1);break t}}o=u.createElement(n),Kt(o,n,a),u.head.appendChild(o);break;case"meta":if(x=$0("meta","content",u).get(n+(a.content||""))){for(E=0;E<x.length;E++)if(o=x[E],o.getAttribute("content")===(a.content==null?null:""+a.content)&&o.getAttribute("name")===(a.name==null?null:a.name)&&o.getAttribute("property")===(a.property==null?null:a.property)&&o.getAttribute("http-equiv")===(a.httpEquiv==null?null:a.httpEquiv)&&o.getAttribute("charset")===(a.charSet==null?null:a.charSet)){x.splice(E,1);break t}}o=u.createElement(n),Kt(o,n,a),u.head.appendChild(o);break;default:throw Error(c(468,n))}o[jt]=e,At(o),n=o}e.stateNode=n}else P0(u,e.type,e.stateNode);else e.stateNode=Y0(u,n,e.memoizedProps);else o!==n?(o===null?a.stateNode!==null&&(a=a.stateNode,a.parentNode.removeChild(a)):o.count--,n===null?P0(u,e.type,e.stateNode):Y0(u,n,e.memoizedProps)):n===null&&e.stateNode!==null&&Md(e,e.memoizedProps,a.memoizedProps)}break;case 27:ba(t,e),Sa(e),n&512&&(Ut||a===null||En(a,a.return)),a!==null&&n&4&&Md(e,e.memoizedProps,a.memoizedProps);break;case 5:if(ba(t,e),Sa(e),n&512&&(Ut||a===null||En(a,a.return)),e.flags&32){u=e.stateNode;try{an(u,"")}catch(Se){lt(e,e.return,Se)}}n&4&&e.stateNode!=null&&(u=e.memoizedProps,Md(e,u,a!==null?a.memoizedProps:u)),n&1024&&(Dd=!0);break;case 6:if(ba(t,e),Sa(e),n&4){if(e.stateNode===null)throw Error(c(162));n=e.memoizedProps,a=e.stateNode;try{a.nodeValue=n}catch(Se){lt(e,e.return,Se)}}break;case 3:if(kc=null,u=on,on=Ac(t.containerInfo),ba(t,e),on=u,Sa(e),n&4&&a!==null&&a.memoizedState.isDehydrated)try{qr(t.containerInfo)}catch(Se){lt(e,e.return,Se)}Dd&&(Dd=!1,Pm(e));break;case 4:n=on,on=Ac(e.stateNode.containerInfo),ba(t,e),Sa(e),on=n;break;case 12:ba(t,e),Sa(e);break;case 31:ba(t,e),Sa(e),n&4&&(n=e.updateQueue,n!==null&&(e.updateQueue=null,yc(e,n)));break;case 13:ba(t,e),Sa(e),e.child.flags&8192&&e.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&(bc=Ft()),n&4&&(n=e.updateQueue,n!==null&&(e.updateQueue=null,yc(e,n)));break;case 22:u=e.memoizedState!==null;var z=a!==null&&a.memoizedState!==null,Q=Qn,re=Ut;if(Qn=Q||u,Ut=re||z,ba(t,e),Ut=re,Qn=Q,Sa(e),n&8192)e:for(t=e.stateNode,t._visibility=u?t._visibility&-2:t._visibility|1,u&&(a===null||z||Qn||Ut||ks(e)),a=null,t=e;;){if(t.tag===5||t.tag===26){if(a===null){z=a=t;try{if(o=z.stateNode,u)x=o.style,typeof x.setProperty=="function"?x.setProperty("display","none","important"):x.display="none";else{E=z.stateNode;var oe=z.memoizedProps.style,I=oe!=null&&oe.hasOwnProperty("display")?oe.display:null;E.style.display=I==null||typeof I=="boolean"?"":(""+I).trim()}}catch(Se){lt(z,z.return,Se)}}}else if(t.tag===6){if(a===null){z=t;try{z.stateNode.nodeValue=u?"":z.memoizedProps}catch(Se){lt(z,z.return,Se)}}}else if(t.tag===18){if(a===null){z=t;try{var K=z.stateNode;u?_0(K,!0):_0(z.stateNode,!1)}catch(Se){lt(z,z.return,Se)}}}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}n&4&&(n=e.updateQueue,n!==null&&(a=n.retryQueue,a!==null&&(n.retryQueue=null,yc(e,a))));break;case 19:ba(t,e),Sa(e),n&4&&(n=e.updateQueue,n!==null&&(e.updateQueue=null,yc(e,n)));break;case 30:break;case 21:break;default:ba(t,e),Sa(e)}}function Sa(e){var t=e.flags;if(t&2){try{for(var a,n=e.return;n!==null;){if(zm(n)){a=n;break}n=n.return}if(a==null)throw Error(c(160));switch(a.tag){case 27:var u=a.stateNode,o=Od(e);vc(e,o,u);break;case 5:var x=a.stateNode;a.flags&32&&(an(x,""),a.flags&=-33);var E=Od(e);vc(e,E,x);break;case 3:case 4:var z=a.stateNode.containerInfo,Q=Od(e);Rd(e,Q,z);break;default:throw Error(c(161))}}catch(re){lt(e,e.return,re)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Pm(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Pm(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function Xn(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)Hm(e,t.alternate,t),t=t.sibling}function ks(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Rl(4,t,t.return),ks(t);break;case 1:En(t,t.return);var a=t.stateNode;typeof a.componentWillUnmount=="function"&&_m(t,t.return,a),ks(t);break;case 27:$i(t.stateNode);case 26:case 5:En(t,t.return),ks(t);break;case 22:t.memoizedState===null&&ks(t);break;case 30:ks(t);break;default:ks(t)}e=e.sibling}}function Jn(e,t,a){for(a=a&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var n=t.alternate,u=e,o=t,x=o.flags;switch(o.tag){case 0:case 11:case 15:Jn(u,o,a),_i(4,o);break;case 1:if(Jn(u,o,a),n=o,u=n.stateNode,typeof u.componentDidMount=="function")try{u.componentDidMount()}catch(Q){lt(n,n.return,Q)}if(n=o,u=n.updateQueue,u!==null){var E=n.stateNode;try{var z=u.shared.hiddenCallbacks;if(z!==null)for(u.shared.hiddenCallbacks=null,u=0;u<z.length;u++)Sh(z[u],E)}catch(Q){lt(n,n.return,Q)}}a&&x&64&&Am(o),ki(o,o.return);break;case 27:Um(o);case 26:case 5:Jn(u,o,a),a&&n===null&&x&4&&km(o),ki(o,o.return);break;case 12:Jn(u,o,a);break;case 31:Jn(u,o,a),a&&x&4&&Bm(u,o);break;case 13:Jn(u,o,a),a&&x&4&&Ym(u,o);break;case 22:o.memoizedState===null&&Jn(u,o,a),ki(o,o.return);break;case 30:break;default:Jn(u,o,a)}t=t.sibling}}function Ad(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&&bi(a))}function _d(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&bi(e))}function dn(e,t,a,n){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Gm(e,t,a,n),t=t.sibling}function Gm(e,t,a,n){var u=t.flags;switch(t.tag){case 0:case 11:case 15:dn(e,t,a,n),u&2048&&_i(9,t);break;case 1:dn(e,t,a,n);break;case 3:dn(e,t,a,n),u&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&bi(e)));break;case 12:if(u&2048){dn(e,t,a,n),e=t.stateNode;try{var o=t.memoizedProps,x=o.id,E=o.onPostCommit;typeof E=="function"&&E(x,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(z){lt(t,t.return,z)}}else dn(e,t,a,n);break;case 31:dn(e,t,a,n);break;case 13:dn(e,t,a,n);break;case 23:break;case 22:o=t.stateNode,x=t.alternate,t.memoizedState!==null?o._visibility&2?dn(e,t,a,n):zi(e,t):o._visibility&2?dn(e,t,a,n):(o._visibility|=2,Mr(e,t,a,n,(t.subtreeFlags&10256)!==0||!1)),u&2048&&Ad(x,t);break;case 24:dn(e,t,a,n),u&2048&&_d(t.alternate,t);break;default:dn(e,t,a,n)}}function Mr(e,t,a,n,u){for(u=u&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var o=e,x=t,E=a,z=n,Q=x.flags;switch(x.tag){case 0:case 11:case 15:Mr(o,x,E,z,u),_i(8,x);break;case 23:break;case 22:var re=x.stateNode;x.memoizedState!==null?re._visibility&2?Mr(o,x,E,z,u):zi(o,x):(re._visibility|=2,Mr(o,x,E,z,u)),u&&Q&2048&&Ad(x.alternate,x);break;case 24:Mr(o,x,E,z,u),u&&Q&2048&&_d(x.alternate,x);break;default:Mr(o,x,E,z,u)}t=t.sibling}}function zi(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var a=e,n=t,u=n.flags;switch(n.tag){case 22:zi(a,n),u&2048&&Ad(n.alternate,n);break;case 24:zi(a,n),u&2048&&_d(n.alternate,n);break;default:zi(a,n)}t=t.sibling}}var Ui=8192;function Or(e,t,a){if(e.subtreeFlags&Ui)for(e=e.child;e!==null;)Fm(e,t,a),e=e.sibling}function Fm(e,t,a){switch(e.tag){case 26:Or(e,t,a),e.flags&Ui&&e.memoizedState!==null&&Xy(a,on,e.memoizedState,e.memoizedProps);break;case 5:Or(e,t,a);break;case 3:case 4:var n=on;on=Ac(e.stateNode.containerInfo),Or(e,t,a),on=n;break;case 22:e.memoizedState===null&&(n=e.alternate,n!==null&&n.memoizedState!==null?(n=Ui,Ui=16777216,Or(e,t,a),Ui=n):Or(e,t,a));break;default:Or(e,t,a)}}function Zm(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 Li(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var a=0;a<t.length;a++){var n=t[a];$t=n,Qm(n,e)}Zm(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Wm(e),e=e.sibling}function Wm(e){switch(e.tag){case 0:case 11:case 15:Li(e),e.flags&2048&&Rl(9,e,e.return);break;case 3:Li(e);break;case 12:Li(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,pc(e)):Li(e);break;default:Li(e)}}function pc(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var a=0;a<t.length;a++){var n=t[a];$t=n,Qm(n,e)}Zm(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Rl(8,t,t.return),pc(t);break;case 22:a=t.stateNode,a._visibility&2&&(a._visibility&=-3,pc(t));break;default:pc(t)}e=e.sibling}}function Qm(e,t){for(;$t!==null;){var a=$t;switch(a.tag){case 0:case 11:case 15:Rl(8,a,t);break;case 23:case 22:if(a.memoizedState!==null&&a.memoizedState.cachePool!==null){var n=a.memoizedState.cachePool.pool;n!=null&&n.refCount++}break;case 24:bi(a.memoizedState.cache)}if(n=a.child,n!==null)n.return=a,$t=n;else e:for(a=e;$t!==null;){n=$t;var u=n.sibling,o=n.return;if(qm(n),n===a){$t=null;break e}if(u!==null){u.return=o,$t=u;break e}$t=o}}}var fy={getCacheForType:function(e){var t=Xt(_t),a=t.data.get(e);return a===void 0&&(a=e(),t.data.set(e,a)),a},cacheSignal:function(){return Xt(_t).controller.signal}},hy=typeof WeakMap=="function"?WeakMap:Map,et=0,ot=null,Ye=null,Ze=0,nt=0,Ra=null,Dl=!1,Rr=!1,kd=!1,Kn=0,Nt=0,Al=0,zs=0,zd=0,Da=0,Dr=0,Hi=null,Na=null,Ud=!1,bc=0,Im=0,Sc=1/0,Nc=null,_l=null,Vt=0,kl=null,Ar=null,el=0,Ld=0,Hd=null,Xm=null,qi=0,qd=null;function Aa(){return(et&2)!==0&&Ze!==0?Ze&-Ze:$.T!==null?Gd():Js()}function Jm(){if(Da===0)if((Ze&536870912)===0||Y){var e=xn;xn<<=1,(xn&3932160)===0&&(xn=262144),Da=e}else Da=536870912;return e=Ma.current,e!==null&&(e.flags|=32),Da}function ja(e,t,a){(e===ot&&(nt===2||nt===9)||e.cancelPendingCommit!==null)&&(_r(e,0),zl(e,Ze,Da,!1)),cl(e,a),((et&2)===0||e!==ot)&&(e===ot&&((et&2)===0&&(zs|=a),Nt===4&&zl(e,Ze,Da,!1)),Tn(e))}function Km(e,t,a){if((et&6)!==0)throw Error(c(327));var n=!a&&(t&127)===0&&(t&e.expiredLanes)===0||ul(e,t),u=n?xy(e,t):Bd(e,t,!0),o=n;do{if(u===0){Rr&&!n&&zl(e,t,0,!1);break}else{if(a=e.current.alternate,o&&!my(a)){u=Bd(e,t,!1),o=!1;continue}if(u===2){if(o=t,e.errorRecoveryDisabledLanes&o)var x=0;else x=e.pendingLanes&-536870913,x=x!==0?x:x&536870912?536870912:0;if(x!==0){t=x;e:{var E=e;u=Hi;var z=E.current.memoizedState.isDehydrated;if(z&&(_r(E,x).flags|=256),x=Bd(E,x,!1),x!==2){if(kd&&!z){E.errorRecoveryDisabledLanes|=o,zs|=o,u=4;break e}o=Na,Na=u,o!==null&&(Na===null?Na=o:Na.push.apply(Na,o))}u=x}if(o=!1,u!==2)continue}}if(u===1){_r(e,0),zl(e,t,0,!0);break}e:{switch(n=e,o=u,o){case 0:case 1:throw Error(c(345));case 4:if((t&4194048)!==t)break;case 6:zl(n,t,Da,!Dl);break e;case 2:Na=null;break;case 3:case 5:break;default:throw Error(c(329))}if((t&62914560)===t&&(u=bc+300-Ft(),10<u)){if(zl(n,t,Da,!Dl),es(n,0,!0)!==0)break e;el=t,n.timeoutHandle=R0(e0.bind(null,n,a,Na,Nc,Ud,t,Da,zs,Dr,Dl,o,"Throttled",-0,0),u);break e}e0(n,a,Na,Nc,Ud,t,Da,zs,Dr,Dl,o,null,-0,0)}}break}while(!0);Tn(e)}function e0(e,t,a,n,u,o,x,E,z,Q,re,oe,I,K){if(e.timeoutHandle=-1,oe=t.subtreeFlags,oe&8192||(oe&16785408)===16785408){oe={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:La},Fm(t,o,oe);var Se=(o&62914560)===o?bc-Ft():(o&4194048)===o?Im-Ft():0;if(Se=Jy(oe,Se),Se!==null){el=o,e.cancelPendingCommit=Se(u0.bind(null,e,t,o,a,n,u,x,E,z,re,oe,null,I,K)),zl(e,o,x,!Q);return}}u0(e,t,o,a,n,u,x,E,z)}function my(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 n=0;n<a.length;n++){var u=a[n],o=u.getSnapshot;u=u.value;try{if(!la(o(),u))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 zl(e,t,a,n){t&=~zd,t&=~zs,e.suspendedLanes|=t,e.pingedLanes&=~t,n&&(e.warmLanes|=t),n=e.expirationTimes;for(var u=t;0<u;){var o=31-le(u),x=1<<o;n[o]=-1,u&=~x}a!==0&&dt(e,a,t)}function jc(){return(et&6)===0?(Vi(0),!1):!0}function Vd(){if(Ye!==null){if(nt===0)var e=Ye.return;else e=Ye,Pa=$n=null,ad(e),jr=null,Ni=0,e=Ye;for(;e!==null;)Dm(e.alternate,e),e=e.return;Ye=null}}function _r(e,t){var a=e.timeoutHandle;a!==-1&&(e.timeoutHandle=-1,ky(a)),a=e.cancelPendingCommit,a!==null&&(e.cancelPendingCommit=null,a()),el=0,Vd(),ot=e,Ye=a=Ba(e.current,null),Ze=t,nt=0,Ra=null,Dl=!1,Rr=ul(e,t),kd=!1,Dr=Da=zd=zs=Al=Nt=0,Na=Hi=null,Ud=!1,(t&8)!==0&&(t|=t&32);var n=e.entangledLanes;if(n!==0)for(e=e.entanglements,n&=t;0<n;){var u=31-le(n),o=1<<u;t|=e[u],n&=~o}return Kn=t,jl(),a}function t0(e,t){qe=null,$.H=Ri,t===Nr||t===Ju?(t=vh(),nt=3):t===Po?(t=vh(),nt=4):nt=t===yd?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,Ra=t,Ye===null&&(Nt=1,fc(e,va(t,e.current)))}function a0(){var e=Ma.current;return e===null?!0:(Ze&4194048)===Ze?Fa===null:(Ze&62914560)===Ze||(Ze&536870912)!==0?e===Fa:!1}function n0(){var e=$.H;return $.H=Ri,e===null?Ri:e}function l0(){var e=$.A;return $.A=fy,e}function wc(){Nt=4,Dl||(Ze&4194048)!==Ze&&Ma.current!==null||(Rr=!0),(Al&134217727)===0&&(zs&134217727)===0||ot===null||zl(ot,Ze,Da,!1)}function Bd(e,t,a){var n=et;et|=2;var u=n0(),o=l0();(ot!==e||Ze!==t)&&(Nc=null,_r(e,t)),t=!1;var x=Nt;e:do try{if(nt!==0&&Ye!==null){var E=Ye,z=Ra;switch(nt){case 8:Vd(),x=6;break e;case 3:case 2:case 9:case 6:Ma.current===null&&(t=!0);var Q=nt;if(nt=0,Ra=null,kr(e,E,z,Q),a&&Rr){x=0;break e}break;default:Q=nt,nt=0,Ra=null,kr(e,E,z,Q)}}gy(),x=Nt;break}catch(re){t0(e,re)}while(!0);return t&&e.shellSuspendCounter++,Pa=$n=null,et=n,$.H=u,$.A=o,Ye===null&&(ot=null,Ze=0,jl()),x}function gy(){for(;Ye!==null;)s0(Ye)}function xy(e,t){var a=et;et|=2;var n=n0(),u=l0();ot!==e||Ze!==t?(Nc=null,Sc=Ft()+500,_r(e,t)):Rr=ul(e,t);e:do try{if(nt!==0&&Ye!==null){t=Ye;var o=Ra;t:switch(nt){case 1:nt=0,Ra=null,kr(e,t,o,1);break;case 2:case 9:if(gh(o)){nt=0,Ra=null,r0(t);break}t=function(){nt!==2&&nt!==9||ot!==e||(nt=7),Tn(e)},o.then(t,t);break e;case 3:nt=7;break e;case 4:nt=5;break e;case 7:gh(o)?(nt=0,Ra=null,r0(t)):(nt=0,Ra=null,kr(e,t,o,7));break;case 5:var x=null;switch(Ye.tag){case 26:x=Ye.memoizedState;case 5:case 27:var E=Ye;if(x?G0(x):E.stateNode.complete){nt=0,Ra=null;var z=E.sibling;if(z!==null)Ye=z;else{var Q=E.return;Q!==null?(Ye=Q,Ec(Q)):Ye=null}break t}}nt=0,Ra=null,kr(e,t,o,5);break;case 6:nt=0,Ra=null,kr(e,t,o,6);break;case 8:Vd(),Nt=6;break e;default:throw Error(c(462))}}vy();break}catch(re){t0(e,re)}while(!0);return Pa=$n=null,$.H=n,$.A=u,et=a,Ye!==null?0:(ot=null,Ze=0,jl(),Nt)}function vy(){for(;Ye!==null&&!Dn();)s0(Ye)}function s0(e){var t=Om(e.alternate,e,Kn);e.memoizedProps=e.pendingProps,t===null?Ec(e):Ye=t}function r0(e){var t=e,a=t.alternate;switch(t.tag){case 15:case 0:t=jm(a,t,t.pendingProps,t.type,void 0,Ze);break;case 11:t=jm(a,t,t.pendingProps,t.type.render,t.ref,Ze);break;case 5:ad(t);default:Dm(a,t),t=Ye=Wu(t,Kn),t=Om(a,t,Kn)}e.memoizedProps=e.pendingProps,t===null?Ec(e):Ye=t}function kr(e,t,a,n){Pa=$n=null,ad(t),jr=null,Ni=0;var u=t.return;try{if(sy(e,u,t,a,Ze)){Nt=1,fc(e,va(a,e.current)),Ye=null;return}}catch(o){if(u!==null)throw Ye=u,o;Nt=1,fc(e,va(a,e.current)),Ye=null;return}t.flags&32768?(Y||n===1?e=!0:Rr||(Ze&536870912)!==0?e=!1:(Dl=e=!0,(n===2||n===9||n===3||n===6)&&(n=Ma.current,n!==null&&n.tag===13&&(n.flags|=16384))),i0(t,e)):Ec(t)}function Ec(e){var t=e;do{if((t.flags&32768)!==0){i0(t,Dl);return}e=t.return;var a=uy(t.alternate,t,Kn);if(a!==null){Ye=a;return}if(t=t.sibling,t!==null){Ye=t;return}Ye=t=e}while(t!==null);Nt===0&&(Nt=5)}function i0(e,t){do{var a=cy(e.alternate,e);if(a!==null){a.flags&=32767,Ye=a;return}if(a=e.return,a!==null&&(a.flags|=32768,a.subtreeFlags=0,a.deletions=null),!t&&(e=e.sibling,e!==null)){Ye=e;return}Ye=e=a}while(e!==null);Nt=6,Ye=null}function u0(e,t,a,n,u,o,x,E,z){e.cancelPendingCommit=null;do Tc();while(Vt!==0);if((et&6)!==0)throw Error(c(327));if(t!==null){if(t===e.current)throw Error(c(177));if(o=t.lanes|t.childLanes,o|=js,bu(e,a,o,x,E,z),e===ot&&(Ye=ot=null,Ze=0),Ar=t,kl=e,el=a,Ld=o,Hd=u,Xm=n,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,Sy(An,function(){return h0(),null})):(e.callbackNode=null,e.callbackPriority=0),n=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||n){n=$.T,$.T=null,u=te.p,te.p=2,x=et,et|=4;try{oy(e,t,a)}finally{et=x,te.p=u,$.T=n}}Vt=1,c0(),o0(),d0()}}function c0(){if(Vt===1){Vt=0;var e=kl,t=Ar,a=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||a){a=$.T,$.T=null;var n=te.p;te.p=2;var u=et;et|=4;try{$m(t,e);var o=Kd,x=Ho(e.containerInfo),E=o.focusedElem,z=o.selectionRange;if(x!==E&&E&&E.ownerDocument&&Xe(E.ownerDocument.documentElement,E)){if(z!==null&&or(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 oe=E.ownerDocument||document,I=oe&&oe.defaultView||window;if(I.getSelection){var K=I.getSelection(),Se=E.textContent.length,Ae=Math.min(z.start,Se),ut=z.end===void 0?Ae:Math.min(z.end,Se);!K.extend&&Ae>ut&&(x=ut,ut=Ae,Ae=x);var F=Yu(E,Ae),V=Yu(E,ut);if(F&&V&&(K.rangeCount!==1||K.anchorNode!==F.node||K.anchorOffset!==F.offset||K.focusNode!==V.node||K.focusOffset!==V.offset)){var W=oe.createRange();W.setStart(F.node,F.offset),K.removeAllRanges(),Ae>ut?(K.addRange(W),K.extend(V.node,V.offset)):(W.setEnd(V.node,V.offset),K.addRange(W))}}}}for(oe=[],K=E;K=K.parentNode;)K.nodeType===1&&oe.push({element:K,left:K.scrollLeft,top:K.scrollTop});for(typeof E.focus=="function"&&E.focus(),E=0;E<oe.length;E++){var ue=oe[E];ue.element.scrollLeft=ue.left,ue.element.scrollTop=ue.top}}Hc=!!Jd,Kd=Jd=null}finally{et=u,te.p=n,$.T=a}}e.current=t,Vt=2}}function o0(){if(Vt===2){Vt=0;var e=kl,t=Ar,a=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||a){a=$.T,$.T=null;var n=te.p;te.p=2;var u=et;et|=4;try{Hm(e,t.alternate,t)}finally{et=u,te.p=n,$.T=a}}Vt=3}}function d0(){if(Vt===4||Vt===3){Vt=0,Wr();var e=kl,t=Ar,a=el,n=Xm;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?Vt=5:(Vt=0,Ar=kl=null,f0(e,e.pendingLanes));var u=e.pendingLanes;if(u===0&&(_l=null),na(a),t=t.stateNode,Lt&&typeof Lt.onCommitFiberRoot=="function")try{Lt.onCommitFiberRoot(ht,t,void 0,(t.current.flags&128)===128)}catch{}if(n!==null){t=$.T,u=te.p,te.p=2,$.T=null;try{for(var o=e.onRecoverableError,x=0;x<n.length;x++){var E=n[x];o(E.value,{componentStack:E.stack})}}finally{$.T=t,te.p=u}}(el&3)!==0&&Tc(),Tn(e),u=e.pendingLanes,(a&261930)!==0&&(u&42)!==0?e===qd?qi++:(qi=0,qd=e):qi=0,Vi(0)}}function f0(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,bi(t)))}function Tc(){return c0(),o0(),d0(),h0()}function h0(){if(Vt!==5)return!1;var e=kl,t=Ld;Ld=0;var a=na(el),n=$.T,u=te.p;try{te.p=32>a?32:a,$.T=null,a=Hd,Hd=null;var o=kl,x=el;if(Vt=0,Ar=kl=null,el=0,(et&6)!==0)throw Error(c(331));var E=et;if(et|=4,Wm(o.current),Gm(o,o.current,x,a),et=E,Vi(0,!1),Lt&&typeof Lt.onPostCommitFiberRoot=="function")try{Lt.onPostCommitFiberRoot(ht,o)}catch{}return!0}finally{te.p=u,$.T=n,f0(e,t)}}function m0(e,t,a){t=va(a,t),t=vd(e.stateNode,t,2),e=Cl(e,t,2),e!==null&&(cl(e,2),Tn(e))}function lt(e,t,a){if(e.tag===3)m0(e,e,a);else for(;t!==null;){if(t.tag===3){m0(t,e,a);break}else if(t.tag===1){var n=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof n.componentDidCatch=="function"&&(_l===null||!_l.has(n))){e=va(a,e),a=gm(2),n=Cl(t,a,2),n!==null&&(xm(a,n,t,e),cl(n,2),Tn(n));break}}t=t.return}}function Yd(e,t,a){var n=e.pingCache;if(n===null){n=e.pingCache=new hy;var u=new Set;n.set(t,u)}else u=n.get(t),u===void 0&&(u=new Set,n.set(t,u));u.has(a)||(kd=!0,u.add(a),e=yy.bind(null,e,t,a),t.then(e,e))}function yy(e,t,a){var n=e.pingCache;n!==null&&n.delete(t),e.pingedLanes|=e.suspendedLanes&a,e.warmLanes&=~a,ot===e&&(Ze&a)===a&&(Nt===4||Nt===3&&(Ze&62914560)===Ze&&300>Ft()-bc?(et&2)===0&&_r(e,0):zd|=a,Dr===Ze&&(Dr=0)),Tn(e)}function g0(e,t){t===0&&(t=Qr()),e=Va(e,t),e!==null&&(cl(e,t),Tn(e))}function py(e){var t=e.memoizedState,a=0;t!==null&&(a=t.retryLane),g0(e,a)}function by(e,t){var a=0;switch(e.tag){case 31:case 13:var n=e.stateNode,u=e.memoizedState;u!==null&&(a=u.retryLane);break;case 19:n=e.stateNode;break;case 22:n=e.stateNode._retryCache;break;default:throw Error(c(314))}n!==null&&n.delete(t),g0(e,a)}function Sy(e,t){return Ja(e,t)}var Cc=null,zr=null,$d=!1,Mc=!1,Pd=!1,Ul=0;function Tn(e){e!==zr&&e.next===null&&(zr===null?Cc=zr=e:zr=zr.next=e),Mc=!0,$d||($d=!0,jy())}function Vi(e,t){if(!Pd&&Mc){Pd=!0;do for(var a=!1,n=Cc;n!==null;){if(e!==0){var u=n.pendingLanes;if(u===0)var o=0;else{var x=n.suspendedLanes,E=n.pingedLanes;o=(1<<31-le(42|e)+1)-1,o&=u&~(x&~E),o=o&201326741?o&201326741|1:o?o|2:0}o!==0&&(a=!0,p0(n,o))}else o=Ze,o=es(n,n===ot?o:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),(o&3)===0||ul(n,o)||(a=!0,p0(n,o));n=n.next}while(a);Pd=!1}}function Ny(){x0()}function x0(){Mc=$d=!1;var e=0;Ul!==0&&_y()&&(e=Ul);for(var t=Ft(),a=null,n=Cc;n!==null;){var u=n.next,o=v0(n,t);o===0?(n.next=null,a===null?Cc=u:a.next=u,u===null&&(zr=a)):(a=n,(e!==0||(o&3)!==0)&&(Mc=!0)),n=u}Vt!==0&&Vt!==5||Vi(e),Ul!==0&&(Ul=0)}function v0(e,t){for(var a=e.suspendedLanes,n=e.pingedLanes,u=e.expirationTimes,o=e.pendingLanes&-62914561;0<o;){var x=31-le(o),E=1<<x,z=u[x];z===-1?((E&a)===0||(E&n)!==0)&&(u[x]=pu(E,t)):z<=t&&(e.expiredLanes|=E),o&=~E}if(t=ot,a=Ze,a=es(e,e===t?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),n=e.callbackNode,a===0||e===t&&(nt===2||nt===9)||e.cancelPendingCommit!==null)return n!==null&&n!==null&&Xl(n),e.callbackNode=null,e.callbackPriority=0;if((a&3)===0||ul(e,a)){if(t=a&-a,t===e.callbackPriority)return t;switch(n!==null&&Xl(n),na(a)){case 2:case 8:a=Kl;break;case 32:a=An;break;case 268435456:a=rl;break;default:a=An}return n=y0.bind(null,e),a=Ja(a,n),e.callbackPriority=t,e.callbackNode=a,t}return n!==null&&n!==null&&Xl(n),e.callbackPriority=2,e.callbackNode=null,2}function y0(e,t){if(Vt!==0&&Vt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var a=e.callbackNode;if(Tc()&&e.callbackNode!==a)return null;var n=Ze;return n=es(e,e===ot?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),n===0?null:(Km(e,n,t),v0(e,Ft()),e.callbackNode!=null&&e.callbackNode===a?y0.bind(null,e):null)}function p0(e,t){if(Tc())return null;Km(e,t,!0)}function jy(){zy(function(){(et&6)!==0?Ja(Ws,Ny):x0()})}function Gd(){if(Ul===0){var e=br;e===0&&(e=ta,ta<<=1,(ta&261888)===0&&(ta=256)),Ul=e}return Ul}function b0(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:us(""+e)}function S0(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 wy(e,t,a,n,u){if(t==="submit"&&a&&a.stateNode===u){var o=b0((u[Ht]||null).action),x=n.submitter;x&&(t=(t=x[Ht]||null)?b0(t.formAction):x.getAttribute("formAction"),t!==null&&(o=t,x=null));var E=new fs("action","action",null,n,u);e.push({event:E,listeners:[{instance:null,listener:function(){if(n.defaultPrevented){if(Ul!==0){var z=x?S0(u,x):new FormData(u);dd(a,{pending:!0,data:z,method:u.method,action:o},null,z)}}else typeof o=="function"&&(E.preventDefault(),z=x?S0(u,x):new FormData(u),dd(a,{pending:!0,data:z,method:u.method,action:o},o,z))},currentTarget:u}]})}}for(var Fd=0;Fd<xi.length;Fd++){var Zd=xi[Fd],Ey=Zd.toLowerCase(),Ty=Zd[0].toUpperCase()+Zd.slice(1);xa(Ey,"on"+Ty)}xa(Gu,"onAnimationEnd"),xa(Fu,"onAnimationIteration"),xa(hr,"onAnimationStart"),xa("dblclick","onDoubleClick"),xa("focusin","onFocus"),xa("focusout","onBlur"),xa(qo,"onTransitionRun"),xa(Vo,"onTransitionStart"),xa(Zu,"onTransitionCancel"),xa(mi,"onTransitionEnd"),ol("onMouseEnter",["mouseout","mouseover"]),ol("onMouseLeave",["mouseout","mouseover"]),ol("onPointerEnter",["pointerout","pointerover"]),ol("onPointerLeave",["pointerout","pointerover"]),yn("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),yn("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),yn("onBeforeInput",["compositionend","keypress","textInput","paste"]),yn("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),yn("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),yn("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Bi="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(" "),Cy=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Bi));function N0(e,t){t=(t&4)!==0;for(var a=0;a<e.length;a++){var n=e[a],u=n.event;n=n.listeners;e:{var o=void 0;if(t)for(var x=n.length-1;0<=x;x--){var E=n[x],z=E.instance,Q=E.currentTarget;if(E=E.listener,z!==o&&u.isPropagationStopped())break e;o=E,u.currentTarget=Q;try{o(u)}catch(re){Nl(re)}u.currentTarget=null,o=z}else for(x=0;x<n.length;x++){if(E=n[x],z=E.instance,Q=E.currentTarget,E=E.listener,z!==o&&u.isPropagationStopped())break e;o=E,u.currentTarget=Q;try{o(u)}catch(re){Nl(re)}u.currentTarget=null,o=z}}}}function $e(e,t){var a=t[ts];a===void 0&&(a=t[ts]=new Set);var n=e+"__bubble";a.has(n)||(j0(t,e,2,!1),a.add(n))}function Wd(e,t,a){var n=0;t&&(n|=4),j0(a,e,n,t)}var Oc="_reactListening"+Math.random().toString(36).slice(2);function Qd(e){if(!e[Oc]){e[Oc]=!0,wu.forEach(function(a){a!=="selectionchange"&&(Cy.has(a)||Wd(a,!1,e),Wd(a,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Oc]||(t[Oc]=!0,Wd("selectionchange",!1,t))}}function j0(e,t,a,n){switch(J0(t)){case 2:var u=tp;break;case 8:u=ap;break;default:u=df}a=u.bind(null,t,a,e),u=void 0,!si||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(u=!0),n?u!==void 0?e.addEventListener(t,a,{capture:!0,passive:u}):e.addEventListener(t,a,!0):u!==void 0?e.addEventListener(t,a,{passive:u}):e.addEventListener(t,a,!1)}function Id(e,t,a,n,u){var o=n;if((t&1)===0&&(t&2)===0&&n!==null)e:for(;;){if(n===null)return;var x=n.tag;if(x===3||x===4){var E=n.stateNode.containerInfo;if(E===u)break;if(x===4)for(x=n.return;x!==null;){var z=x.tag;if((z===3||z===4)&&x.stateNode.containerInfo===u)return;x=x.return}for(;E!==null;){if(x=kn(E),x===null)return;if(z=x.tag,z===5||z===6||z===26||z===27){n=o=x;continue e}E=E.parentNode}}n=n.return}li(function(){var Q=o,re=lr(a),oe=[];e:{var I=gi.get(e);if(I!==void 0){var K=fs,Se=e;switch(e){case"keypress":if(ds(a)===0)break e;case"keydown":case"keyup":K=wo;break;case"focusin":Se="focus",K=cr;break;case"focusout":Se="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=Ru;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":K=go;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":K=Co;break;case Gu:case Fu:case hr:K=ml;break;case mi:K=Mo;break;case"scroll":case"scrollend":K=ri;break;case"wheel":K=Ro;break;case"copy":case"cut":case"paste":K=gl;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":K=Du;break;case"toggle":case"beforetoggle":K=Ao}var Ae=(t&4)!==0,ut=!Ae&&(e==="scroll"||e==="scrollend"),F=Ae?I!==null?I+"Capture":null:I;Ae=[];for(var V=Q,W;V!==null;){var ue=V;if(W=ue.stateNode,ue=ue.tag,ue!==5&&ue!==26&&ue!==27||W===null||F===null||(ue=cs(V,F),ue!=null&&Ae.push(Yi(V,ue,W))),ut)break;V=V.return}0<Ae.length&&(I=new K(I,Se,null,a,re),oe.push({event:I,listeners:Ae}))}}if((t&7)===0){e:{if(I=e==="mouseover"||e==="pointerover",K=e==="mouseout"||e==="pointerout",I&&a!==ai&&(Se=a.relatedTarget||a.fromElement)&&(kn(Se)||Se[_n]))break e;if((K||I)&&(I=re.window===re?re:(I=re.ownerDocument)?I.defaultView||I.parentWindow:window,K?(Se=a.relatedTarget||a.toElement,K=Q,Se=Se?kn(Se):null,Se!==null&&(ut=h(Se),Ae=Se.tag,Se!==ut||Ae!==5&&Ae!==27&&Ae!==6)&&(Se=null)):(K=null,Se=Q),K!==Se)){if(Ae=Ru,ue="onMouseLeave",F="onMouseEnter",V="mouse",(e==="pointerout"||e==="pointerover")&&(Ae=Du,ue="onPointerLeave",F="onPointerEnter",V="pointer"),ut=K==null?I:ma(K),W=Se==null?I:ma(Se),I=new Ae(ue,V+"leave",K,a,re),I.target=ut,I.relatedTarget=W,ue=null,kn(re)===Q&&(Ae=new Ae(F,V+"enter",Se,a,re),Ae.target=W,Ae.relatedTarget=ut,ue=Ae),ut=ue,K&&Se)t:{for(Ae=My,F=K,V=Se,W=0,ue=F;ue;ue=Ae(ue))W++;ue=0;for(var Me=V;Me;Me=Ae(Me))ue++;for(;0<W-ue;)F=Ae(F),W--;for(;0<ue-W;)V=Ae(V),ue--;for(;W--;){if(F===V||V!==null&&F===V.alternate){Ae=F;break t}F=Ae(F),V=Ae(V)}Ae=null}else Ae=null;K!==null&&w0(oe,I,K,Ae,!1),Se!==null&&ut!==null&&w0(oe,ut,Se,Ae,!0)}}e:{if(I=Q?ma(Q):window,K=I.nodeName&&I.nodeName.toLowerCase(),K==="select"||K==="input"&&I.type==="file")var Je=Vu;else if(qu(I))if(Nn)Je=mt;else{Je=pl;var Ne=Ge}else K=I.nodeName,!K||K.toLowerCase()!=="input"||I.type!=="checkbox"&&I.type!=="radio"?Q&&nr(Q.elementType)&&(Je=Vu):Je=Lo;if(Je&&(Je=Je(e,Q))){ui(oe,Je,a,re);break e}Ne&&Ne(e,I,Q),e==="focusout"&&Q&&I.type==="number"&&Q.memoizedProps.value!=null&&ls(I,"number",I.value)}switch(Ne=Q?ma(Q):window,e){case"focusin":(qu(Ne)||Ne.contentEditable==="true")&&(bl=Ne,dr=Q,Qt=null);break;case"focusout":Qt=dr=bl=null;break;case"mousedown":fr=!0;break;case"contextmenu":case"mouseup":case"dragend":fr=!1,Ns(oe,a,re);break;case"selectionchange":if($u)break;case"keydown":case"keyup":Ns(oe,a,re)}var Ve;if(ii)e:{switch(e){case"compositionstart":var We="onCompositionStart";break e;case"compositionend":We="onCompositionEnd";break e;case"compositionupdate":We="onCompositionUpdate";break e}We=void 0}else vl?Lu(e,a)&&(We="onCompositionEnd"):e==="keydown"&&a.keyCode===229&&(We="onCompositionStart");We&&(ku&&a.locale!=="ko"&&(vl||We!=="onCompositionStart"?We==="onCompositionEnd"&&vl&&(Ve=qt()):(bn=re,sr="value"in bn?bn.value:bn.textContent,vl=!0)),Ne=Rc(Q,We),0<Ne.length&&(We=new xl(We,e,null,a,re),oe.push({event:We,listeners:Ne}),Ve?We.data=Ve:(Ve=Hu(a),Ve!==null&&(We.data=Ve)))),(Ve=_o?ko(e,a):zo(e,a))&&(We=Rc(Q,"onBeforeInput"),0<We.length&&(Ne=new xl("onBeforeInput","beforeinput",null,a,re),oe.push({event:Ne,listeners:We}),Ne.data=Ve)),wy(oe,e,Q,a,re)}N0(oe,t)})}function Yi(e,t,a){return{instance:e,listener:t,currentTarget:a}}function Rc(e,t){for(var a=t+"Capture",n=[];e!==null;){var u=e,o=u.stateNode;if(u=u.tag,u!==5&&u!==26&&u!==27||o===null||(u=cs(e,a),u!=null&&n.unshift(Yi(e,u,o)),u=cs(e,t),u!=null&&n.push(Yi(e,u,o))),e.tag===3)return n;e=e.return}return[]}function My(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function w0(e,t,a,n,u){for(var o=t._reactName,x=[];a!==null&&a!==n;){var E=a,z=E.alternate,Q=E.stateNode;if(E=E.tag,z!==null&&z===n)break;E!==5&&E!==26&&E!==27||Q===null||(z=Q,u?(Q=cs(a,o),Q!=null&&x.unshift(Yi(a,Q,z))):u||(Q=cs(a,o),Q!=null&&x.push(Yi(a,Q,z)))),a=a.return}x.length!==0&&e.push({event:t,listeners:x})}var Oy=/\r\n?/g,Ry=/\u0000|\uFFFD/g;function E0(e){return(typeof e=="string"?e:""+e).replace(Oy,`
49
- `).replace(Ry,"")}function T0(e,t){return t=E0(t),E0(e)===t}function it(e,t,a,n,u,o){switch(a){case"children":typeof n=="string"?t==="body"||t==="textarea"&&n===""||an(e,n):(typeof n=="number"||typeof n=="bigint")&&t!=="body"&&an(e,""+n);break;case"className":er(e,"class",n);break;case"tabIndex":er(e,"tabindex",n);break;case"dir":case"role":case"viewBox":case"width":case"height":er(e,a,n);break;case"style":Cu(e,n,o);break;case"data":if(t!=="object"){er(e,"data",n);break}case"src":case"href":if(n===""&&(t!=="a"||a!=="href")){e.removeAttribute(a);break}if(n==null||typeof n=="function"||typeof n=="symbol"||typeof n=="boolean"){e.removeAttribute(a);break}n=us(""+n),e.setAttribute(a,n);break;case"action":case"formAction":if(typeof n=="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 o=="function"&&(a==="formAction"?(t!=="input"&&it(e,t,"name",u.name,u,null),it(e,t,"formEncType",u.formEncType,u,null),it(e,t,"formMethod",u.formMethod,u,null),it(e,t,"formTarget",u.formTarget,u,null)):(it(e,t,"encType",u.encType,u,null),it(e,t,"method",u.method,u,null),it(e,t,"target",u.target,u,null)));if(n==null||typeof n=="symbol"||typeof n=="boolean"){e.removeAttribute(a);break}n=us(""+n),e.setAttribute(a,n);break;case"onClick":n!=null&&(e.onclick=La);break;case"onScroll":n!=null&&$e("scroll",e);break;case"onScrollEnd":n!=null&&$e("scrollend",e);break;case"dangerouslySetInnerHTML":if(n!=null){if(typeof n!="object"||!("__html"in n))throw Error(c(61));if(a=n.__html,a!=null){if(u.children!=null)throw Error(c(60));e.innerHTML=a}}break;case"multiple":e.multiple=n&&typeof n!="function"&&typeof n!="symbol";break;case"muted":e.muted=n&&typeof n!="function"&&typeof n!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(n==null||typeof n=="function"||typeof n=="boolean"||typeof n=="symbol"){e.removeAttribute("xlink:href");break}a=us(""+n),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":n!=null&&typeof n!="function"&&typeof n!="symbol"?e.setAttribute(a,""+n):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":n&&typeof n!="function"&&typeof n!="symbol"?e.setAttribute(a,""):e.removeAttribute(a);break;case"capture":case"download":n===!0?e.setAttribute(a,""):n!==!1&&n!=null&&typeof n!="function"&&typeof n!="symbol"?e.setAttribute(a,n):e.removeAttribute(a);break;case"cols":case"rows":case"size":case"span":n!=null&&typeof n!="function"&&typeof n!="symbol"&&!isNaN(n)&&1<=n?e.setAttribute(a,n):e.removeAttribute(a);break;case"rowSpan":case"start":n==null||typeof n=="function"||typeof n=="symbol"||isNaN(n)?e.removeAttribute(a):e.setAttribute(a,n);break;case"popover":$e("beforetoggle",e),$e("toggle",e),Zt(e,"popover",n);break;case"xlinkActuate":at(e,"http://www.w3.org/1999/xlink","xlink:actuate",n);break;case"xlinkArcrole":at(e,"http://www.w3.org/1999/xlink","xlink:arcrole",n);break;case"xlinkRole":at(e,"http://www.w3.org/1999/xlink","xlink:role",n);break;case"xlinkShow":at(e,"http://www.w3.org/1999/xlink","xlink:show",n);break;case"xlinkTitle":at(e,"http://www.w3.org/1999/xlink","xlink:title",n);break;case"xlinkType":at(e,"http://www.w3.org/1999/xlink","xlink:type",n);break;case"xmlBase":at(e,"http://www.w3.org/XML/1998/namespace","xml:base",n);break;case"xmlLang":at(e,"http://www.w3.org/XML/1998/namespace","xml:lang",n);break;case"xmlSpace":at(e,"http://www.w3.org/XML/1998/namespace","xml:space",n);break;case"is":Zt(e,"is",n);break;case"innerText":case"textContent":break;default:(!(2<a.length)||a[0]!=="o"&&a[0]!=="O"||a[1]!=="n"&&a[1]!=="N")&&(a=ho.get(a)||a,Zt(e,a,n))}}function Xd(e,t,a,n,u,o){switch(a){case"style":Cu(e,n,o);break;case"dangerouslySetInnerHTML":if(n!=null){if(typeof n!="object"||!("__html"in n))throw Error(c(61));if(a=n.__html,a!=null){if(u.children!=null)throw Error(c(60));e.innerHTML=a}}break;case"children":typeof n=="string"?an(e,n):(typeof n=="number"||typeof n=="bigint")&&an(e,""+n);break;case"onScroll":n!=null&&$e("scroll",e);break;case"onScrollEnd":n!=null&&$e("scrollend",e);break;case"onClick":n!=null&&(e.onclick=La);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Jr.hasOwnProperty(a))e:{if(a[0]==="o"&&a[1]==="n"&&(u=a.endsWith("Capture"),t=a.slice(2,u?a.length-7:void 0),o=e[Ht]||null,o=o!=null?o[a]:null,typeof o=="function"&&e.removeEventListener(t,o,u),typeof n=="function")){typeof o!="function"&&o!==null&&(a in e?e[a]=null:e.hasAttribute(a)&&e.removeAttribute(a)),e.addEventListener(t,n,u);break e}a in e?e[a]=n:n===!0?e.setAttribute(a,""):Zt(e,a,n)}}}function Kt(e,t,a){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":$e("error",e),$e("load",e);var n=!1,u=!1,o;for(o in a)if(a.hasOwnProperty(o)){var x=a[o];if(x!=null)switch(o){case"src":n=!0;break;case"srcSet":u=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(c(137,t));default:it(e,t,o,x,a,null)}}u&&it(e,t,"srcSet",a.srcSet,a,null),n&&it(e,t,"src",a.src,a,null);return;case"input":$e("invalid",e);var E=o=x=u=null,z=null,Q=null;for(n in a)if(a.hasOwnProperty(n)){var re=a[n];if(re!=null)switch(n){case"name":u=re;break;case"type":x=re;break;case"checked":z=re;break;case"defaultChecked":Q=re;break;case"value":o=re;break;case"defaultValue":E=re;break;case"children":case"dangerouslySetInnerHTML":if(re!=null)throw Error(c(137,t));break;default:it(e,t,n,re,a,null)}}fl(e,o,E,z,Q,x,u,!1);return;case"select":$e("invalid",e),n=x=o=null;for(u in a)if(a.hasOwnProperty(u)&&(E=a[u],E!=null))switch(u){case"value":o=E;break;case"defaultValue":x=E;break;case"multiple":n=E;default:it(e,t,u,E,a,null)}t=o,a=x,e.multiple=!!n,t!=null?Un(e,!!n,t,!1):a!=null&&Un(e,!!n,a,!0);return;case"textarea":$e("invalid",e),o=u=n=null;for(x in a)if(a.hasOwnProperty(x)&&(E=a[x],E!=null))switch(x){case"value":n=E;break;case"defaultValue":u=E;break;case"children":o=E;break;case"dangerouslySetInnerHTML":if(E!=null)throw Error(c(91));break;default:it(e,t,x,E,a,null)}ti(e,n,u,o);return;case"option":for(z in a)if(a.hasOwnProperty(z)&&(n=a[z],n!=null))switch(z){case"selected":e.selected=n&&typeof n!="function"&&typeof n!="symbol";break;default:it(e,t,z,n,a,null)}return;case"dialog":$e("beforetoggle",e),$e("toggle",e),$e("cancel",e),$e("close",e);break;case"iframe":case"object":$e("load",e);break;case"video":case"audio":for(n=0;n<Bi.length;n++)$e(Bi[n],e);break;case"image":$e("error",e),$e("load",e);break;case"details":$e("toggle",e);break;case"embed":case"source":case"link":$e("error",e),$e("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)&&(n=a[Q],n!=null))switch(Q){case"children":case"dangerouslySetInnerHTML":throw Error(c(137,t));default:it(e,t,Q,n,a,null)}return;default:if(nr(t)){for(re in a)a.hasOwnProperty(re)&&(n=a[re],n!==void 0&&Xd(e,t,re,n,a,void 0));return}}for(E in a)a.hasOwnProperty(E)&&(n=a[E],n!=null&&it(e,t,E,n,a,null))}function Dy(e,t,a,n){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var u=null,o=null,x=null,E=null,z=null,Q=null,re=null;for(K in a){var oe=a[K];if(a.hasOwnProperty(K)&&oe!=null)switch(K){case"checked":break;case"value":break;case"defaultValue":z=oe;default:n.hasOwnProperty(K)||it(e,t,K,null,n,oe)}}for(var I in n){var K=n[I];if(oe=a[I],n.hasOwnProperty(I)&&(K!=null||oe!=null))switch(I){case"type":o=K;break;case"name":u=K;break;case"checked":Q=K;break;case"defaultChecked":re=K;break;case"value":x=K;break;case"defaultValue":E=K;break;case"children":case"dangerouslySetInnerHTML":if(K!=null)throw Error(c(137,t));break;default:K!==oe&&it(e,t,I,K,n,oe)}}ar(e,x,E,z,Q,re,o,u);return;case"select":K=x=E=I=null;for(o in a)if(z=a[o],a.hasOwnProperty(o)&&z!=null)switch(o){case"value":break;case"multiple":K=z;default:n.hasOwnProperty(o)||it(e,t,o,null,n,z)}for(u in n)if(o=n[u],z=a[u],n.hasOwnProperty(u)&&(o!=null||z!=null))switch(u){case"value":I=o;break;case"defaultValue":E=o;break;case"multiple":x=o;default:o!==z&&it(e,t,u,o,n,z)}t=E,a=x,n=K,I!=null?Un(e,!!a,I,!1):!!n!=!!a&&(t!=null?Un(e,!!a,t,!0):Un(e,!!a,a?[]:"",!1));return;case"textarea":K=I=null;for(E in a)if(u=a[E],a.hasOwnProperty(E)&&u!=null&&!n.hasOwnProperty(E))switch(E){case"value":break;case"children":break;default:it(e,t,E,null,n,u)}for(x in n)if(u=n[x],o=a[x],n.hasOwnProperty(x)&&(u!=null||o!=null))switch(x){case"value":I=u;break;case"defaultValue":K=u;break;case"children":break;case"dangerouslySetInnerHTML":if(u!=null)throw Error(c(91));break;default:u!==o&&it(e,t,x,u,n,o)}ss(e,I,K);return;case"option":for(var Se in a)if(I=a[Se],a.hasOwnProperty(Se)&&I!=null&&!n.hasOwnProperty(Se))switch(Se){case"selected":e.selected=!1;break;default:it(e,t,Se,null,n,I)}for(z in n)if(I=n[z],K=a[z],n.hasOwnProperty(z)&&I!==K&&(I!=null||K!=null))switch(z){case"selected":e.selected=I&&typeof I!="function"&&typeof I!="symbol";break;default:it(e,t,z,I,n,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 Ae in a)I=a[Ae],a.hasOwnProperty(Ae)&&I!=null&&!n.hasOwnProperty(Ae)&&it(e,t,Ae,null,n,I);for(Q in n)if(I=n[Q],K=a[Q],n.hasOwnProperty(Q)&&I!==K&&(I!=null||K!=null))switch(Q){case"children":case"dangerouslySetInnerHTML":if(I!=null)throw Error(c(137,t));break;default:it(e,t,Q,I,n,K)}return;default:if(nr(t)){for(var ut in a)I=a[ut],a.hasOwnProperty(ut)&&I!==void 0&&!n.hasOwnProperty(ut)&&Xd(e,t,ut,void 0,n,I);for(re in n)I=n[re],K=a[re],!n.hasOwnProperty(re)||I===K||I===void 0&&K===void 0||Xd(e,t,re,I,n,K);return}}for(var F in a)I=a[F],a.hasOwnProperty(F)&&I!=null&&!n.hasOwnProperty(F)&&it(e,t,F,null,n,I);for(oe in n)I=n[oe],K=a[oe],!n.hasOwnProperty(oe)||I===K||I==null&&K==null||it(e,t,oe,I,n,K)}function C0(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function Ay(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,a=performance.getEntriesByType("resource"),n=0;n<a.length;n++){var u=a[n],o=u.transferSize,x=u.initiatorType,E=u.duration;if(o&&E&&C0(x)){for(x=0,E=u.responseEnd,n+=1;n<a.length;n++){var z=a[n],Q=z.startTime;if(Q>E)break;var re=z.transferSize,oe=z.initiatorType;re&&C0(oe)&&(z=z.responseEnd,x+=re*(z<E?1:(E-Q)/(z-Q)))}if(--n,t+=8*(o+x)/(u.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 Jd=null,Kd=null;function Dc(e){return e.nodeType===9?e:e.ownerDocument}function M0(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 O0(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 ef(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 tf=null;function _y(){var e=window.event;return e&&e.type==="popstate"?e===tf?!1:(tf=e,!0):(tf=null,!1)}var R0=typeof setTimeout=="function"?setTimeout:void 0,ky=typeof clearTimeout=="function"?clearTimeout:void 0,D0=typeof Promise=="function"?Promise:void 0,zy=typeof queueMicrotask=="function"?queueMicrotask:typeof D0<"u"?function(e){return D0.resolve(null).then(e).catch(Uy)}:R0;function Uy(e){setTimeout(function(){throw e})}function Ll(e){return e==="head"}function A0(e,t){var a=t,n=0;do{var u=a.nextSibling;if(e.removeChild(a),u&&u.nodeType===8)if(a=u.data,a==="/$"||a==="/&"){if(n===0){e.removeChild(u),qr(t);return}n--}else if(a==="$"||a==="$?"||a==="$~"||a==="$!"||a==="&")n++;else if(a==="html")$i(e.ownerDocument.documentElement);else if(a==="head"){a=e.ownerDocument.head,$i(a);for(var o=a.firstChild;o;){var x=o.nextSibling,E=o.nodeName;o[as]||E==="SCRIPT"||E==="STYLE"||E==="LINK"&&o.rel.toLowerCase()==="stylesheet"||a.removeChild(o),o=x}}else a==="body"&&$i(e.ownerDocument.body);a=u}while(a);qr(t)}function _0(e,t){var a=e;e=0;do{var n=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||""),n&&n.nodeType===8)if(a=n.data,a==="/$"){if(e===0)break;e--}else a!=="$"&&a!=="$?"&&a!=="$~"&&a!=="$!"||e++;a=n}while(a)}function af(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":af(a),Ks(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}e.removeChild(a)}}function Ly(e,t,a,n){for(;e.nodeType===1;){var u=a;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!n&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(n){if(!e[as])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(o=e.getAttribute("rel"),o==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(o!==u.rel||e.getAttribute("href")!==(u.href==null||u.href===""?null:u.href)||e.getAttribute("crossorigin")!==(u.crossOrigin==null?null:u.crossOrigin)||e.getAttribute("title")!==(u.title==null?null:u.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(o=e.getAttribute("src"),(o!==(u.src==null?null:u.src)||e.getAttribute("type")!==(u.type==null?null:u.type)||e.getAttribute("crossorigin")!==(u.crossOrigin==null?null:u.crossOrigin))&&o&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var o=u.name==null?null:""+u.name;if(u.type==="hidden"&&e.getAttribute("name")===o)return e}else return e;if(e=Za(e.nextSibling),e===null)break}return null}function Hy(e,t,a){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!a||(e=Za(e.nextSibling),e===null))return null;return e}function k0(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=Za(e.nextSibling),e===null))return null;return e}function nf(e){return e.data==="$?"||e.data==="$~"}function lf(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function qy(e,t){var a=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||a.readyState!=="loading")t();else{var n=function(){t(),a.removeEventListener("DOMContentLoaded",n)};a.addEventListener("DOMContentLoaded",n),e._reactRetry=n}}function Za(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 sf=null;function z0(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var a=e.data;if(a==="/$"||a==="/&"){if(t===0)return Za(e.nextSibling);t--}else a!=="$"&&a!=="$!"&&a!=="$?"&&a!=="$~"&&a!=="&"||t++}e=e.nextSibling}return null}function U0(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 L0(e,t,a){switch(t=Dc(a),e){case"html":if(e=t.documentElement,!e)throw Error(c(452));return e;case"head":if(e=t.head,!e)throw Error(c(453));return e;case"body":if(e=t.body,!e)throw Error(c(454));return e;default:throw Error(c(451))}}function $i(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Ks(e)}var Wa=new Map,H0=new Set;function Ac(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var tl=te.d;te.d={f:Vy,r:By,D:Yy,C:$y,L:Py,m:Gy,X:Zy,S:Fy,M:Wy};function Vy(){var e=tl.f(),t=jc();return e||t}function By(e){var t=Oe(e);t!==null&&t.tag===5&&t.type==="form"?tm(t):tl.r(e)}var Ur=typeof document>"u"?null:document;function q0(e,t,a){var n=Ur;if(n&&typeof t=="string"&&t){var u=Wt(t);u='link[rel="'+e+'"][href="'+u+'"]',typeof a=="string"&&(u+='[crossorigin="'+a+'"]'),H0.has(u)||(H0.add(u),e={rel:e,crossOrigin:a,href:t},n.querySelector(u)===null&&(t=n.createElement("link"),Kt(t,"link",e),At(t),n.head.appendChild(t)))}}function Yy(e){tl.D(e),q0("dns-prefetch",e,null)}function $y(e,t){tl.C(e,t),q0("preconnect",e,t)}function Py(e,t,a){tl.L(e,t,a);var n=Ur;if(n&&e&&t){var u='link[rel="preload"][as="'+Wt(t)+'"]';t==="image"&&a&&a.imageSrcSet?(u+='[imagesrcset="'+Wt(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(u+='[imagesizes="'+Wt(a.imageSizes)+'"]')):u+='[href="'+Wt(e)+'"]';var o=u;switch(t){case"style":o=Lr(e);break;case"script":o=Hr(e)}Wa.has(o)||(e=T({rel:"preload",href:t==="image"&&a&&a.imageSrcSet?void 0:e,as:t},a),Wa.set(o,e),n.querySelector(u)!==null||t==="style"&&n.querySelector(Pi(o))||t==="script"&&n.querySelector(Gi(o))||(t=n.createElement("link"),Kt(t,"link",e),At(t),n.head.appendChild(t)))}}function Gy(e,t){tl.m(e,t);var a=Ur;if(a&&e){var n=t&&typeof t.as=="string"?t.as:"script",u='link[rel="modulepreload"][as="'+Wt(n)+'"][href="'+Wt(e)+'"]',o=u;switch(n){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":o=Hr(e)}if(!Wa.has(o)&&(e=T({rel:"modulepreload",href:e},t),Wa.set(o,e),a.querySelector(u)===null)){switch(n){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(Gi(o)))return}n=a.createElement("link"),Kt(n,"link",e),At(n),a.head.appendChild(n)}}}function Fy(e,t,a){tl.S(e,t,a);var n=Ur;if(n&&e){var u=en(n).hoistableStyles,o=Lr(e);t=t||"default";var x=u.get(o);if(!x){var E={loading:0,preload:null};if(x=n.querySelector(Pi(o)))E.loading=5;else{e=T({rel:"stylesheet",href:e,"data-precedence":t},a),(a=Wa.get(o))&&rf(e,a);var z=x=n.createElement("link");At(z),Kt(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,_c(x,t,n)}x={type:"stylesheet",instance:x,count:1,state:E},u.set(o,x)}}}function Zy(e,t){tl.X(e,t);var a=Ur;if(a&&e){var n=en(a).hoistableScripts,u=Hr(e),o=n.get(u);o||(o=a.querySelector(Gi(u)),o||(e=T({src:e,async:!0},t),(t=Wa.get(u))&&uf(e,t),o=a.createElement("script"),At(o),Kt(o,"link",e),a.head.appendChild(o)),o={type:"script",instance:o,count:1,state:null},n.set(u,o))}}function Wy(e,t){tl.M(e,t);var a=Ur;if(a&&e){var n=en(a).hoistableScripts,u=Hr(e),o=n.get(u);o||(o=a.querySelector(Gi(u)),o||(e=T({src:e,async:!0,type:"module"},t),(t=Wa.get(u))&&uf(e,t),o=a.createElement("script"),At(o),Kt(o,"link",e),a.head.appendChild(o)),o={type:"script",instance:o,count:1,state:null},n.set(u,o))}}function V0(e,t,a,n){var u=(u=xe.current)?Ac(u):null;if(!u)throw Error(c(446));switch(e){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(t=Lr(a.href),a=en(u).hoistableStyles,n=a.get(t),n||(n={type:"style",instance:null,count:0,state:null},a.set(t,n)),n):{type:"void",instance:null,count:0,state:null};case"link":if(a.rel==="stylesheet"&&typeof a.href=="string"&&typeof a.precedence=="string"){e=Lr(a.href);var o=en(u).hoistableStyles,x=o.get(e);if(x||(u=u.ownerDocument||u,x={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},o.set(e,x),(o=u.querySelector(Pi(e)))&&!o._p&&(x.instance=o,x.state.loading=5),Wa.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},Wa.set(e,a),o||Qy(u,e,a,x.state))),t&&n===null)throw Error(c(528,""));return x}if(t&&n!==null)throw Error(c(529,""));return null;case"script":return t=a.async,a=a.src,typeof a=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Hr(a),a=en(u).hoistableScripts,n=a.get(t),n||(n={type:"script",instance:null,count:0,state:null},a.set(t,n)),n):{type:"void",instance:null,count:0,state:null};default:throw Error(c(444,e))}}function Lr(e){return'href="'+Wt(e)+'"'}function Pi(e){return'link[rel="stylesheet"]['+e+"]"}function B0(e){return T({},e,{"data-precedence":e.precedence,precedence:null})}function Qy(e,t,a,n){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?n.loading=1:(t=e.createElement("link"),n.preload=t,t.addEventListener("load",function(){return n.loading|=1}),t.addEventListener("error",function(){return n.loading|=2}),Kt(t,"link",a),At(t),e.head.appendChild(t))}function Hr(e){return'[src="'+Wt(e)+'"]'}function Gi(e){return"script[async]"+e}function Y0(e,t,a){if(t.count++,t.instance===null)switch(t.type){case"style":var n=e.querySelector('style[data-href~="'+Wt(a.href)+'"]');if(n)return t.instance=n,At(n),n;var u=T({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return n=(e.ownerDocument||e).createElement("style"),At(n),Kt(n,"style",u),_c(n,a.precedence,e),t.instance=n;case"stylesheet":u=Lr(a.href);var o=e.querySelector(Pi(u));if(o)return t.state.loading|=4,t.instance=o,At(o),o;n=B0(a),(u=Wa.get(u))&&rf(n,u),o=(e.ownerDocument||e).createElement("link"),At(o);var x=o;return x._p=new Promise(function(E,z){x.onload=E,x.onerror=z}),Kt(o,"link",n),t.state.loading|=4,_c(o,a.precedence,e),t.instance=o;case"script":return o=Hr(a.src),(u=e.querySelector(Gi(o)))?(t.instance=u,At(u),u):(n=a,(u=Wa.get(o))&&(n=T({},a),uf(n,u)),e=e.ownerDocument||e,u=e.createElement("script"),At(u),Kt(u,"link",n),e.head.appendChild(u),t.instance=u);case"void":return null;default:throw Error(c(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(n=t.instance,t.state.loading|=4,_c(n,a.precedence,e));return t.instance}function _c(e,t,a){for(var n=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),u=n.length?n[n.length-1]:null,o=u,x=0;x<n.length;x++){var E=n[x];if(E.dataset.precedence===t)o=E;else if(o!==u)break}o?o.parentNode.insertBefore(e,o.nextSibling):(t=a.nodeType===9?a.head:a,t.insertBefore(e,t.firstChild))}function rf(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function uf(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var kc=null;function $0(e,t,a){if(kc===null){var n=new Map,u=kc=new Map;u.set(a,n)}else u=kc,n=u.get(a),n||(n=new Map,u.set(a,n));if(n.has(e))return n;for(n.set(e,null),a=a.getElementsByTagName(e),u=0;u<a.length;u++){var o=a[u];if(!(o[as]||o[jt]||e==="link"&&o.getAttribute("rel")==="stylesheet")&&o.namespaceURI!=="http://www.w3.org/2000/svg"){var x=o.getAttribute(t)||"";x=e+x;var E=n.get(x);E?E.push(o):n.set(x,[o])}}return n}function P0(e,t,a){e=e.ownerDocument||e,e.head.insertBefore(a,t==="title"?e.querySelector("head > title"):null)}function Iy(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 G0(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function Xy(e,t,a,n){if(a.type==="stylesheet"&&(typeof n.media!="string"||matchMedia(n.media).matches!==!1)&&(a.state.loading&4)===0){if(a.instance===null){var u=Lr(n.href),o=t.querySelector(Pi(u));if(o){t=o._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=zc.bind(e),t.then(e,e)),a.state.loading|=4,a.instance=o,At(o);return}o=t.ownerDocument||t,n=B0(n),(u=Wa.get(u))&&rf(n,u),o=o.createElement("link"),At(o);var x=o;x._p=new Promise(function(E,z){x.onload=E,x.onerror=z}),Kt(o,"link",n),a.instance=o}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(a,t),(t=a.state.preload)&&(a.state.loading&3)===0&&(e.count++,a=zc.bind(e),t.addEventListener("load",a),t.addEventListener("error",a))}}var cf=0;function Jy(e,t){return e.stylesheets&&e.count===0&&Lc(e,e.stylesheets),0<e.count||0<e.imgCount?function(a){var n=setTimeout(function(){if(e.stylesheets&&Lc(e,e.stylesheets),e.unsuspend){var o=e.unsuspend;e.unsuspend=null,o()}},6e4+t);0<e.imgBytes&&cf===0&&(cf=62500*Ay());var u=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Lc(e,e.stylesheets),e.unsuspend)){var o=e.unsuspend;e.unsuspend=null,o()}},(e.imgBytes>cf?50:800)+t);return e.unsuspend=a,function(){e.unsuspend=null,clearTimeout(n),clearTimeout(u)}}:null}function zc(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Lc(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Uc=null;function Lc(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Uc=new Map,t.forEach(Ky,e),Uc=null,zc.call(e))}function Ky(e,t){if(!(t.state.loading&4)){var a=Uc.get(e);if(a)var n=a.get(null);else{a=new Map,Uc.set(e,a);for(var u=e.querySelectorAll("link[data-precedence],style[data-precedence]"),o=0;o<u.length;o++){var x=u[o];(x.nodeName==="LINK"||x.getAttribute("media")!=="not all")&&(a.set(x.dataset.precedence,x),n=x)}n&&a.set(null,n)}u=t.instance,x=u.getAttribute("data-precedence"),o=a.get(x)||n,o===n&&a.set(null,u),a.set(x,u),this.count++,n=zc.bind(this),u.addEventListener("load",n),u.addEventListener("error",n),o?o.parentNode.insertBefore(u,o.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(u,e.firstChild)),t.state.loading|=4}}var Fi={$$typeof:M,Provider:null,Consumer:null,_currentValue:fe,_currentValue2:fe,_threadCount:0};function ep(e,t,a,n,u,o,x,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=n,this.onUncaughtError=u,this.onCaughtError=o,this.onRecoverableError=x,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=z,this.incompleteTransitions=new Map}function F0(e,t,a,n,u,o,x,E,z,Q,re,oe){return e=new ep(e,t,a,x,z,Q,re,oe,E),t=1,o===!0&&(t|=24),o=It(3,null,null,t),e.current=o,o.stateNode=e,t=Bo(),t.refCount++,e.pooledCache=t,t.refCount++,o.memoizedState={element:n,isDehydrated:a,cache:t},Go(o),e}function Z0(e){return e?(e=Ca,e):Ca}function W0(e,t,a,n,u,o){u=Z0(u),n.context===null?n.context=u:n.pendingContext=u,n=Tl(t),n.payload={element:a},o=o===void 0?null:o,o!==null&&(n.callback=o),a=Cl(e,n,t),a!==null&&(ja(a,e,t),wi(a,e,t))}function Q0(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var a=e.retryLane;e.retryLane=a!==0&&a<t?a:t}}function of(e,t){Q0(e,t),(e=e.alternate)&&Q0(e,t)}function I0(e){if(e.tag===13||e.tag===31){var t=Va(e,67108864);t!==null&&ja(t,e,67108864),of(e,67108864)}}function X0(e){if(e.tag===13||e.tag===31){var t=Aa();t=Xs(t);var a=Va(e,t);a!==null&&ja(a,e,t),of(e,t)}}var Hc=!0;function tp(e,t,a,n){var u=$.T;$.T=null;var o=te.p;try{te.p=2,df(e,t,a,n)}finally{te.p=o,$.T=u}}function ap(e,t,a,n){var u=$.T;$.T=null;var o=te.p;try{te.p=8,df(e,t,a,n)}finally{te.p=o,$.T=u}}function df(e,t,a,n){if(Hc){var u=ff(n);if(u===null)Id(e,t,n,qc,a),K0(e,n);else if(lp(u,e,t,a,n))n.stopPropagation();else if(K0(e,n),t&4&&-1<np.indexOf(e)){for(;u!==null;){var o=Oe(u);if(o!==null)switch(o.tag){case 3:if(o=o.stateNode,o.current.memoizedState.isDehydrated){var x=vn(o.pendingLanes);if(x!==0){var E=o;for(E.pendingLanes|=2,E.entangledLanes|=2;x;){var z=1<<31-le(x);E.entanglements[1]|=z,x&=~z}Tn(o),(et&6)===0&&(Sc=Ft()+500,Vi(0))}}break;case 31:case 13:E=Va(o,2),E!==null&&ja(E,o,2),jc(),of(o,2)}if(o=ff(n),o===null&&Id(e,t,n,qc,a),o===u)break;u=o}u!==null&&n.stopPropagation()}else Id(e,t,n,null,a)}}function ff(e){return e=lr(e),hf(e)}var qc=null;function hf(e){if(qc=null,e=kn(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=j(t),e!==null)return e;e=null}else if(a===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return qc=e,null}function J0(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(Jl()){case Ws:return 2;case Kl:return 8;case An:case Qs:return 32;case rl:return 268435456;default:return 32}default:return 32}}var mf=!1,Hl=null,ql=null,Vl=null,Zi=new Map,Wi=new Map,Bl=[],np="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 K0(e,t){switch(e){case"focusin":case"focusout":Hl=null;break;case"dragenter":case"dragleave":ql=null;break;case"mouseover":case"mouseout":Vl=null;break;case"pointerover":case"pointerout":Zi.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Wi.delete(t.pointerId)}}function Qi(e,t,a,n,u,o){return e===null||e.nativeEvent!==o?(e={blockedOn:t,domEventName:a,eventSystemFlags:n,nativeEvent:o,targetContainers:[u]},t!==null&&(t=Oe(t),t!==null&&I0(t)),e):(e.eventSystemFlags|=n,t=e.targetContainers,u!==null&&t.indexOf(u)===-1&&t.push(u),e)}function lp(e,t,a,n,u){switch(t){case"focusin":return Hl=Qi(Hl,e,t,a,n,u),!0;case"dragenter":return ql=Qi(ql,e,t,a,n,u),!0;case"mouseover":return Vl=Qi(Vl,e,t,a,n,u),!0;case"pointerover":var o=u.pointerId;return Zi.set(o,Qi(Zi.get(o)||null,e,t,a,n,u)),!0;case"gotpointercapture":return o=u.pointerId,Wi.set(o,Qi(Wi.get(o)||null,e,t,a,n,u)),!0}return!1}function eg(e){var t=kn(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,Xr(e.priority,function(){X0(a)});return}}else if(t===31){if(t=j(a),t!==null){e.blockedOn=t,Xr(e.priority,function(){X0(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 Vc(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var a=ff(e.nativeEvent);if(a===null){a=e.nativeEvent;var n=new a.constructor(a.type,a);ai=n,a.target.dispatchEvent(n),ai=null}else return t=Oe(a),t!==null&&I0(t),e.blockedOn=a,!1;t.shift()}return!0}function tg(e,t,a){Vc(e)&&a.delete(t)}function sp(){mf=!1,Hl!==null&&Vc(Hl)&&(Hl=null),ql!==null&&Vc(ql)&&(ql=null),Vl!==null&&Vc(Vl)&&(Vl=null),Zi.forEach(tg),Wi.forEach(tg)}function Bc(e,t){e.blockedOn===t&&(e.blockedOn=null,mf||(mf=!0,l.unstable_scheduleCallback(l.unstable_NormalPriority,sp)))}var Yc=null;function ag(e){Yc!==e&&(Yc=e,l.unstable_scheduleCallback(l.unstable_NormalPriority,function(){Yc===e&&(Yc=null);for(var t=0;t<e.length;t+=3){var a=e[t],n=e[t+1],u=e[t+2];if(typeof n!="function"){if(hf(n||a)===null)continue;break}var o=Oe(a);o!==null&&(e.splice(t,3),t-=3,dd(o,{pending:!0,data:u,method:a.method,action:n},n,u))}}))}function qr(e){function t(z){return Bc(z,e)}Hl!==null&&Bc(Hl,e),ql!==null&&Bc(ql,e),Vl!==null&&Bc(Vl,e),Zi.forEach(t),Wi.forEach(t);for(var a=0;a<Bl.length;a++){var n=Bl[a];n.blockedOn===e&&(n.blockedOn=null)}for(;0<Bl.length&&(a=Bl[0],a.blockedOn===null);)eg(a),a.blockedOn===null&&Bl.shift();if(a=(e.ownerDocument||e).$$reactFormReplay,a!=null)for(n=0;n<a.length;n+=3){var u=a[n],o=a[n+1],x=u[Ht]||null;if(typeof o=="function")x||ag(a);else if(x){var E=null;if(o&&o.hasAttribute("formAction")){if(u=o,x=o[Ht]||null)E=x.formAction;else if(hf(u)!==null)continue}else E=x.action;typeof E=="function"?a[n+1]=E:(a.splice(n,3),n-=3),ag(a)}}}function ng(){function e(o){o.canIntercept&&o.info==="react-transition"&&o.intercept({handler:function(){return new Promise(function(x){return u=x})},focusReset:"manual",scroll:"manual"})}function t(){u!==null&&(u(),u=null),n||setTimeout(a,20)}function a(){if(!n&&!navigation.transition){var o=navigation.currentEntry;o&&o.url!=null&&navigation.navigate(o.url,{state:o.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var n=!1,u=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(a,100),function(){n=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),u!==null&&(u(),u=null)}}}function gf(e){this._internalRoot=e}$c.prototype.render=gf.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(c(409));var a=t.current,n=Aa();W0(a,n,e,t,null,null)},$c.prototype.unmount=gf.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;W0(e.current,2,null,e,null,null),jc(),t[_n]=null}};function $c(e){this._internalRoot=e}$c.prototype.unstable_scheduleHydration=function(e){if(e){var t=Js();e={blockedOn:null,target:e,priority:t};for(var a=0;a<Bl.length&&t!==0&&t<Bl[a].priority;a++);Bl.splice(a,0,e),a===0&&eg(e)}};var lg=r.version;if(lg!=="19.2.4")throw Error(c(527,lg,"19.2.4"));te.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(c(188)):(e=Object.keys(e).join(","),Error(c(268,e)));return e=y(t),e=e!==null?S(e):null,e=e===null?null:e.stateNode,e};var rp={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:$,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Pc=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Pc.isDisabled&&Pc.supportsFiber)try{ht=Pc.inject(rp),Lt=Pc}catch{}}return Xi.createRoot=function(e,t){if(!f(e))throw Error(c(299));var a=!1,n="",u=dm,o=fm,x=hm;return t!=null&&(t.unstable_strictMode===!0&&(a=!0),t.identifierPrefix!==void 0&&(n=t.identifierPrefix),t.onUncaughtError!==void 0&&(u=t.onUncaughtError),t.onCaughtError!==void 0&&(o=t.onCaughtError),t.onRecoverableError!==void 0&&(x=t.onRecoverableError)),t=F0(e,1,!1,null,null,a,n,null,u,o,x,ng),e[_n]=t.current,Qd(e),new gf(t)},Xi.hydrateRoot=function(e,t,a){if(!f(e))throw Error(c(299));var n=!1,u="",o=dm,x=fm,E=hm,z=null;return a!=null&&(a.unstable_strictMode===!0&&(n=!0),a.identifierPrefix!==void 0&&(u=a.identifierPrefix),a.onUncaughtError!==void 0&&(o=a.onUncaughtError),a.onCaughtError!==void 0&&(x=a.onCaughtError),a.onRecoverableError!==void 0&&(E=a.onRecoverableError),a.formState!==void 0&&(z=a.formState)),t=F0(e,1,!0,t,a??null,n,u,z,o,x,E,ng),t.context=Z0(null),a=t.current,n=Aa(),n=Xs(n),u=Tl(n),u.callback=null,Cl(a,u,n),a=n,t.current.lanes=a,cl(t,a),Tn(t),e[_n]=t.current,Qd(e),new $c(t)},Xi.version="19.2.4",Xi}var xg;function yp(){if(xg)return pf.exports;xg=1;function l(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(l)}catch(r){console.error(r)}}return l(),pf.exports=vp(),pf.exports}var pp=yp();const bp=Gf(pp);/**
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 vg="popstate";function Sp(l={}){function r(f,h){let{pathname:b="/",search:j="",hash:p=""}=Gs(f.location.hash.substring(1));return!b.startsWith("/")&&!b.startsWith(".")&&(b="/"+b),zf("",{pathname:b,search:j,hash:p},h.state&&h.state.usr||null,h.state&&h.state.key||"default")}function d(f,h){let b=f.document.querySelector("base"),j="";if(b&&b.getAttribute("href")){let p=f.location.href,y=p.indexOf("#");j=y===-1?p:p.slice(0,y)}return j+"#"+(typeof h=="string"?h:hu(h))}function c(f,h){Ia(f.pathname.charAt(0)==="/",`relative pathnames are not supported in hash history.push(${JSON.stringify(h)})`)}return jp(r,d,c,l)}function yt(l,r){if(l===!1||l===null||typeof l>"u")throw new Error(r)}function Ia(l,r){if(!l){typeof console<"u"&&console.warn(r);try{throw new Error(r)}catch{}}}function Np(){return Math.random().toString(36).substring(2,10)}function yg(l,r){return{usr:l.state,key:l.key,idx:r}}function zf(l,r,d=null,c){return{pathname:typeof l=="string"?l:l.pathname,search:"",hash:"",...typeof r=="string"?Gs(r):r,state:d,key:r&&r.key||c||Np()}}function hu({pathname:l="/",search:r="",hash:d=""}){return r&&r!=="?"&&(l+=r.charAt(0)==="?"?r:"?"+r),d&&d!=="#"&&(l+=d.charAt(0)==="#"?d:"#"+d),l}function Gs(l){let r={};if(l){let d=l.indexOf("#");d>=0&&(r.hash=l.substring(d),l=l.substring(0,d));let c=l.indexOf("?");c>=0&&(r.search=l.substring(c),l=l.substring(0,c)),l&&(r.pathname=l)}return r}function jp(l,r,d,c={}){let{window:f=document.defaultView,v5Compat:h=!1}=c,b=f.history,j="POP",p=null,y=S();y==null&&(y=0,b.replaceState({...b.state,idx:y},""));function S(){return(b.state||{idx:null}).idx}function T(){j="POP";let A=S(),P=A==null?null:A-y;y=A,p&&p({action:j,location:C.location,delta:P})}function _(A,P){j="PUSH";let B=zf(C.location,A,P);d&&d(B,A),y=S()+1;let M=yg(B,y),X=C.createHref(B);try{b.pushState(M,"",X)}catch(ie){if(ie instanceof DOMException&&ie.name==="DataCloneError")throw ie;f.location.assign(X)}h&&p&&p({action:j,location:C.location,delta:1})}function k(A,P){j="REPLACE";let B=zf(C.location,A,P);d&&d(B,A),y=S();let M=yg(B,y),X=C.createHref(B);b.replaceState(M,"",X),h&&p&&p({action:j,location:C.location,delta:0})}function N(A){return wp(A)}let C={get action(){return j},get location(){return l(f,b)},listen(A){if(p)throw new Error("A history only accepts one active listener");return f.addEventListener(vg,T),p=A,()=>{f.removeEventListener(vg,T),p=null}},createHref(A){return r(f,A)},createURL:N,encodeLocation(A){let P=N(A);return{pathname:P.pathname,search:P.search,hash:P.hash}},push:_,replace:k,go(A){return b.go(A)}};return C}function wp(l,r=!1){let d="http://localhost";typeof window<"u"&&(d=window.location.origin!=="null"?window.location.origin:window.location.href),yt(d,"No window.location.(origin|href) available to create URL");let c=typeof l=="string"?l:hu(l);return c=c.replace(/ $/,"%20"),!r&&c.startsWith("//")&&(c=d+c),new URL(c,d)}function Nx(l,r,d="/"){return Ep(l,r,d,!1)}function Ep(l,r,d,c){let f=typeof r=="string"?Gs(r):r,h=sl(f.pathname||"/",d);if(h==null)return null;let b=jx(l);Tp(b);let j=null;for(let p=0;j==null&&p<b.length;++p){let y=Lp(h);j=zp(b[p],y,c)}return j}function jx(l,r=[],d=[],c="",f=!1){let h=(b,j,p=f,y)=>{let S={relativePath:y===void 0?b.path||"":y,caseSensitive:b.caseSensitive===!0,childrenIndex:j,route:b};if(S.relativePath.startsWith("/")){if(!S.relativePath.startsWith(c)&&p)return;yt(S.relativePath.startsWith(c),`Absolute route path "${S.relativePath}" nested under path "${c}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),S.relativePath=S.relativePath.slice(c.length)}let T=ll([c,S.relativePath]),_=d.concat(S);b.children&&b.children.length>0&&(yt(b.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${T}".`),jx(b.children,r,_,T,p)),!(b.path==null&&!b.index)&&r.push({path:T,score:_p(T,b.index),routesMeta:_})};return l.forEach((b,j)=>{var p;if(b.path===""||!((p=b.path)!=null&&p.includes("?")))h(b,j);else for(let y of wx(b.path))h(b,j,!0,y)}),r}function wx(l){let r=l.split("/");if(r.length===0)return[];let[d,...c]=r,f=d.endsWith("?"),h=d.replace(/\?$/,"");if(c.length===0)return f?[h,""]:[h];let b=wx(c.join("/")),j=[];return j.push(...b.map(p=>p===""?h:[h,p].join("/"))),f&&j.push(...b),j.map(p=>l.startsWith("/")&&p===""?"/":p)}function Tp(l){l.sort((r,d)=>r.score!==d.score?d.score-r.score:kp(r.routesMeta.map(c=>c.childrenIndex),d.routesMeta.map(c=>c.childrenIndex)))}var Cp=/^:[\w-]+$/,Mp=3,Op=2,Rp=1,Dp=10,Ap=-2,pg=l=>l==="*";function _p(l,r){let d=l.split("/"),c=d.length;return d.some(pg)&&(c+=Ap),r&&(c+=Op),d.filter(f=>!pg(f)).reduce((f,h)=>f+(Cp.test(h)?Mp:h===""?Rp:Dp),c)}function kp(l,r){return l.length===r.length&&l.slice(0,-1).every((c,f)=>c===r[f])?l[l.length-1]-r[r.length-1]:0}function zp(l,r,d=!1){let{routesMeta:c}=l,f={},h="/",b=[];for(let j=0;j<c.length;++j){let p=c[j],y=j===c.length-1,S=h==="/"?r:r.slice(h.length)||"/",T=Kc({path:p.relativePath,caseSensitive:p.caseSensitive,end:y},S),_=p.route;if(!T&&y&&d&&!c[c.length-1].route.index&&(T=Kc({path:p.relativePath,caseSensitive:p.caseSensitive,end:!1},S)),!T)return null;Object.assign(f,T.params),b.push({params:f,pathname:ll([h,T.pathname]),pathnameBase:Bp(ll([h,T.pathnameBase])),route:_}),T.pathnameBase!=="/"&&(h=ll([h,T.pathnameBase]))}return b}function Kc(l,r){typeof l=="string"&&(l={path:l,caseSensitive:!1,end:!0});let[d,c]=Up(l.path,l.caseSensitive,l.end),f=r.match(d);if(!f)return null;let h=f[0],b=h.replace(/(.)\/+$/,"$1"),j=f.slice(1);return{params:c.reduce((y,{paramName:S,isOptional:T},_)=>{if(S==="*"){let N=j[_]||"";b=h.slice(0,h.length-N.length).replace(/(.)\/+$/,"$1")}const k=j[_];return T&&!k?y[S]=void 0:y[S]=(k||"").replace(/%2F/g,"/"),y},{}),pathname:h,pathnameBase:b,pattern:l}}function Up(l,r=!1,d=!0){Ia(l==="*"||!l.endsWith("*")||l.endsWith("/*"),`Route path "${l}" will be treated as if it were "${l.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${l.replace(/\*$/,"/*")}".`);let c=[],f="^"+l.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(b,j,p)=>(c.push({paramName:j,isOptional:p!=null}),p?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return l.endsWith("*")?(c.push({paramName:"*"}),f+=l==="*"||l==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):d?f+="\\/*$":l!==""&&l!=="/"&&(f+="(?:(?=\\/|$))"),[new RegExp(f,r?void 0:"i"),c]}function Lp(l){try{return l.split("/").map(r=>decodeURIComponent(r).replace(/\//g,"%2F")).join("/")}catch(r){return Ia(!1,`The URL path "${l}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${r}).`),l}}function sl(l,r){if(r==="/")return l;if(!l.toLowerCase().startsWith(r.toLowerCase()))return null;let d=r.endsWith("/")?r.length-1:r.length,c=l.charAt(d);return c&&c!=="/"?null:l.slice(d)||"/"}var Hp=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function qp(l,r="/"){let{pathname:d,search:c="",hash:f=""}=typeof l=="string"?Gs(l):l,h;return d?(d=d.replace(/\/\/+/g,"/"),d.startsWith("/")?h=bg(d.substring(1),"/"):h=bg(d,r)):h=r,{pathname:h,search:Yp(c),hash:$p(f)}}function bg(l,r){let d=r.replace(/\/+$/,"").split("/");return l.split("/").forEach(f=>{f===".."?d.length>1&&d.pop():f!=="."&&d.push(f)}),d.length>1?d.join("/"):"/"}function jf(l,r,d,c){return`Cannot include a '${l}' character in a manually specified \`to.${r}\` field [${JSON.stringify(c)}]. Please separate it out to the \`to.${d}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function Vp(l){return l.filter((r,d)=>d===0||r.route.path&&r.route.path.length>0)}function Zf(l){let r=Vp(l);return r.map((d,c)=>c===r.length-1?d.pathname:d.pathnameBase)}function Wf(l,r,d,c=!1){let f;typeof l=="string"?f=Gs(l):(f={...l},yt(!f.pathname||!f.pathname.includes("?"),jf("?","pathname","search",f)),yt(!f.pathname||!f.pathname.includes("#"),jf("#","pathname","hash",f)),yt(!f.search||!f.search.includes("#"),jf("#","search","hash",f)));let h=l===""||f.pathname==="",b=h?"/":f.pathname,j;if(b==null)j=d;else{let T=r.length-1;if(!c&&b.startsWith("..")){let _=b.split("/");for(;_[0]==="..";)_.shift(),T-=1;f.pathname=_.join("/")}j=T>=0?r[T]:"/"}let p=qp(f,j),y=b&&b!=="/"&&b.endsWith("/"),S=(h||b===".")&&d.endsWith("/");return!p.pathname.endsWith("/")&&(y||S)&&(p.pathname+="/"),p}var ll=l=>l.join("/").replace(/\/\/+/g,"/"),Bp=l=>l.replace(/\/+$/,"").replace(/^\/*/,"/"),Yp=l=>!l||l==="?"?"":l.startsWith("?")?l:"?"+l,$p=l=>!l||l==="#"?"":l.startsWith("#")?l:"#"+l,Pp=class{constructor(l,r,d,c=!1){this.status=l,this.statusText=r||"",this.internal=c,d instanceof Error?(this.data=d.toString(),this.error=d):this.data=d}};function Gp(l){return l!=null&&typeof l.status=="number"&&typeof l.statusText=="string"&&typeof l.internal=="boolean"&&"data"in l}function Fp(l){return l.map(r=>r.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var Ex=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Tx(l,r){let d=l;if(typeof d!="string"||!Hp.test(d))return{absoluteURL:void 0,isExternal:!1,to:d};let c=d,f=!1;if(Ex)try{let h=new URL(window.location.href),b=d.startsWith("//")?new URL(h.protocol+d):new URL(d),j=sl(b.pathname,r);b.origin===h.origin&&j!=null?d=j+b.search+b.hash:f=!0}catch{Ia(!1,`<Link to="${d}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:c,isExternal:f,to:d}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var Cx=["POST","PUT","PATCH","DELETE"];new Set(Cx);var Zp=["GET",...Cx];new Set(Zp);var Pr=U.createContext(null);Pr.displayName="DataRouter";var io=U.createContext(null);io.displayName="DataRouterState";var Wp=U.createContext(!1),Mx=U.createContext({isTransitioning:!1});Mx.displayName="ViewTransition";var Qp=U.createContext(new Map);Qp.displayName="Fetchers";var Ip=U.createContext(null);Ip.displayName="Await";var Ua=U.createContext(null);Ua.displayName="Navigation";var gu=U.createContext(null);gu.displayName="Location";var On=U.createContext({outlet:null,matches:[],isDataRoute:!1});On.displayName="Route";var Qf=U.createContext(null);Qf.displayName="RouteError";var Ox="REACT_ROUTER_ERROR",Xp="REDIRECT",Jp="ROUTE_ERROR_RESPONSE";function Kp(l){if(l.startsWith(`${Ox}:${Xp}:{`))try{let r=JSON.parse(l.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 eb(l){if(l.startsWith(`${Ox}:${Jp}:{`))try{let r=JSON.parse(l.slice(40));if(typeof r=="object"&&r&&typeof r.status=="number"&&typeof r.statusText=="string")return new Pp(r.status,r.statusText,r.data)}catch{}}function tb(l,{relative:r}={}){yt(Gr(),"useHref() may be used only in the context of a <Router> component.");let{basename:d,navigator:c}=U.useContext(Ua),{hash:f,pathname:h,search:b}=xu(l,{relative:r}),j=h;return d!=="/"&&(j=h==="/"?d:ll([d,h])),c.createHref({pathname:j,search:b,hash:f})}function Gr(){return U.useContext(gu)!=null}function Rn(){return yt(Gr(),"useLocation() may be used only in the context of a <Router> component."),U.useContext(gu).location}var Rx="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Dx(l){U.useContext(Ua).static||U.useLayoutEffect(l)}function uo(){let{isDataRoute:l}=U.useContext(On);return l?mb():ab()}function ab(){yt(Gr(),"useNavigate() may be used only in the context of a <Router> component.");let l=U.useContext(Pr),{basename:r,navigator:d}=U.useContext(Ua),{matches:c}=U.useContext(On),{pathname:f}=Rn(),h=JSON.stringify(Zf(c)),b=U.useRef(!1);return Dx(()=>{b.current=!0}),U.useCallback((p,y={})=>{if(Ia(b.current,Rx),!b.current)return;if(typeof p=="number"){d.go(p);return}let S=Wf(p,JSON.parse(h),f,y.relative==="path");l==null&&r!=="/"&&(S.pathname=S.pathname==="/"?r:ll([r,S.pathname])),(y.replace?d.replace:d.push)(S,y.state,y)},[r,d,h,f,l])}U.createContext(null);function xu(l,{relative:r}={}){let{matches:d}=U.useContext(On),{pathname:c}=Rn(),f=JSON.stringify(Zf(d));return U.useMemo(()=>Wf(l,JSON.parse(f),c,r==="path"),[l,f,c,r])}function nb(l,r){return Ax(l,r)}function Ax(l,r,d,c,f){var B;yt(Gr(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:h}=U.useContext(Ua),{matches:b}=U.useContext(On),j=b[b.length-1],p=j?j.params:{},y=j?j.pathname:"/",S=j?j.pathnameBase:"/",T=j&&j.route;{let M=T&&T.path||"";kx(y,!T||M.endsWith("*")||M.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${y}" (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 _=Rn(),k;if(r){let M=typeof r=="string"?Gs(r):r;yt(S==="/"||((B=M.pathname)==null?void 0:B.startsWith(S)),`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 "${S}" but pathname "${M.pathname}" was given in the \`location\` prop.`),k=M}else k=_;let N=k.pathname||"/",C=N;if(S!=="/"){let M=S.replace(/^\//,"").split("/");C="/"+N.replace(/^\//,"").split("/").slice(M.length).join("/")}let A=Nx(l,{pathname:C});Ia(T||A!=null,`No routes matched location "${k.pathname}${k.search}${k.hash}" `),Ia(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 "${k.pathname}${k.search}${k.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 P=ub(A&&A.map(M=>Object.assign({},M,{params:Object.assign({},p,M.params),pathname:ll([S,h.encodeLocation?h.encodeLocation(M.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:M.pathname]),pathnameBase:M.pathnameBase==="/"?S:ll([S,h.encodeLocation?h.encodeLocation(M.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:M.pathnameBase])})),b,d,c,f);return r&&P?U.createElement(gu.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...k},navigationType:"POP"}},P):P}function lb(){let l=hb(),r=Gp(l)?`${l.status} ${l.statusText}`:l instanceof Error?l.message:JSON.stringify(l),d=l instanceof Error?l.stack:null,c="rgba(200,200,200, 0.5)",f={padding:"0.5rem",backgroundColor:c},h={padding:"2px 4px",backgroundColor:c},b=null;return console.error("Error handled by React Router default ErrorBoundary:",l),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),d?U.createElement("pre",{style:f},d):null,b)}var sb=U.createElement(lb,null),_x=class extends U.Component{constructor(l){super(l),this.state={location:l.location,revalidation:l.revalidation,error:l.error}}static getDerivedStateFromError(l){return{error:l}}static getDerivedStateFromProps(l,r){return r.location!==l.location||r.revalidation!=="idle"&&l.revalidation==="idle"?{error:l.error,location:l.location,revalidation:l.revalidation}:{error:l.error!==void 0?l.error:r.error,location:r.location,revalidation:l.revalidation||r.revalidation}}componentDidCatch(l,r){this.props.onError?this.props.onError(l,r):console.error("React Router caught the following error during render",l)}render(){let l=this.state.error;if(this.context&&typeof l=="object"&&l&&"digest"in l&&typeof l.digest=="string"){const d=eb(l.digest);d&&(l=d)}let r=l!==void 0?U.createElement(On.Provider,{value:this.props.routeContext},U.createElement(Qf.Provider,{value:l,children:this.props.component})):this.props.children;return this.context?U.createElement(rb,{error:l},r):r}};_x.contextType=Wp;var wf=new WeakMap;function rb({children:l,error:r}){let{basename:d}=U.useContext(Ua);if(typeof r=="object"&&r&&"digest"in r&&typeof r.digest=="string"){let c=Kp(r.digest);if(c){let f=wf.get(r);if(f)throw f;let h=Tx(c.location,d);if(Ex&&!wf.get(r))if(h.isExternal||c.reloadDocument)window.location.href=h.absoluteURL||h.to;else{const b=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(h.to,{replace:c.replace}));throw wf.set(r,b),b}return U.createElement("meta",{httpEquiv:"refresh",content:`0;url=${h.absoluteURL||h.to}`})}}return l}function ib({routeContext:l,match:r,children:d}){let c=U.useContext(Pr);return c&&c.static&&c.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(c.staticContext._deepestRenderedBoundaryId=r.route.id),U.createElement(On.Provider,{value:l},d)}function ub(l,r=[],d=null,c=null,f=null){if(l==null){if(!d)return null;if(d.errors)l=d.matches;else if(r.length===0&&!d.initialized&&d.matches.length>0)l=d.matches;else return null}let h=l,b=d==null?void 0:d.errors;if(b!=null){let S=h.findIndex(T=>T.route.id&&(b==null?void 0:b[T.route.id])!==void 0);yt(S>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(b).join(",")}`),h=h.slice(0,Math.min(h.length,S+1))}let j=!1,p=-1;if(d)for(let S=0;S<h.length;S++){let T=h[S];if((T.route.HydrateFallback||T.route.hydrateFallbackElement)&&(p=S),T.route.id){let{loaderData:_,errors:k}=d,N=T.route.loader&&!_.hasOwnProperty(T.route.id)&&(!k||k[T.route.id]===void 0);if(T.route.lazy||N){j=!0,p>=0?h=h.slice(0,p+1):h=[h[0]];break}}}let y=d&&c?(S,T)=>{var _,k;c(S,{location:d.location,params:((k=(_=d.matches)==null?void 0:_[0])==null?void 0:k.params)??{},unstable_pattern:Fp(d.matches),errorInfo:T})}:void 0;return h.reduceRight((S,T,_)=>{let k,N=!1,C=null,A=null;d&&(k=b&&T.route.id?b[T.route.id]:void 0,C=T.route.errorElement||sb,j&&(p<0&&_===0?(kx("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),N=!0,A=null):p===_&&(N=!0,A=T.route.hydrateFallbackElement||null)));let P=r.concat(h.slice(0,_+1)),B=()=>{let M;return k?M=C:N?M=A:T.route.Component?M=U.createElement(T.route.Component,null):T.route.element?M=T.route.element:M=S,U.createElement(ib,{match:T,routeContext:{outlet:S,matches:P,isDataRoute:d!=null},children:M})};return d&&(T.route.ErrorBoundary||T.route.errorElement||_===0)?U.createElement(_x,{location:d.location,revalidation:d.revalidation,component:C,error:k,children:B(),routeContext:{outlet:null,matches:P,isDataRoute:!0},onError:y}):B()},null)}function If(l){return`${l} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function cb(l){let r=U.useContext(Pr);return yt(r,If(l)),r}function ob(l){let r=U.useContext(io);return yt(r,If(l)),r}function db(l){let r=U.useContext(On);return yt(r,If(l)),r}function Xf(l){let r=db(l),d=r.matches[r.matches.length-1];return yt(d.route.id,`${l} can only be used on routes that contain a unique "id"`),d.route.id}function fb(){return Xf("useRouteId")}function hb(){var c;let l=U.useContext(Qf),r=ob("useRouteError"),d=Xf("useRouteError");return l!==void 0?l:(c=r.errors)==null?void 0:c[d]}function mb(){let{router:l}=cb("useNavigate"),r=Xf("useNavigate"),d=U.useRef(!1);return Dx(()=>{d.current=!0}),U.useCallback(async(f,h={})=>{Ia(d.current,Rx),d.current&&(typeof f=="number"?await l.navigate(f):await l.navigate(f,{fromRouteId:r,...h}))},[l,r])}var Sg={};function kx(l,r,d){!r&&!Sg[l]&&(Sg[l]=!0,Ia(!1,d))}U.memo(gb);function gb({routes:l,future:r,state:d,onError:c}){return Ax(l,void 0,d,c,r)}function xb({to:l,replace:r,state:d,relative:c}){yt(Gr(),"<Navigate> may be used only in the context of a <Router> component.");let{static:f}=U.useContext(Ua);Ia(!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(On),{pathname:b}=Rn(),j=uo(),p=Wf(l,Zf(h),b,c==="path"),y=JSON.stringify(p);return U.useEffect(()=>{j(JSON.parse(y),{replace:r,state:d,relative:c})},[j,y,c,r,d]),null}function nl(l){yt(!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 vb({basename:l="/",children:r=null,location:d,navigationType:c="POP",navigator:f,static:h=!1,unstable_useTransitions:b}){yt(!Gr(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let j=l.replace(/^\/*/,"/"),p=U.useMemo(()=>({basename:j,navigator:f,static:h,unstable_useTransitions:b,future:{}}),[j,f,h,b]);typeof d=="string"&&(d=Gs(d));let{pathname:y="/",search:S="",hash:T="",state:_=null,key:k="default"}=d,N=U.useMemo(()=>{let C=sl(y,j);return C==null?null:{location:{pathname:C,search:S,hash:T,state:_,key:k},navigationType:c}},[j,y,S,T,_,k,c]);return Ia(N!=null,`<Router basename="${j}"> is not able to match the URL "${y}${S}${T}" because it does not start with the basename, so the <Router> won't render anything.`),N==null?null:U.createElement(Ua.Provider,{value:p},U.createElement(gu.Provider,{children:r,value:N}))}function yb({children:l,location:r}){return nb(Uf(l),r)}function Uf(l,r=[]){let d=[];return U.Children.forEach(l,(c,f)=>{if(!U.isValidElement(c))return;let h=[...r,f];if(c.type===U.Fragment){d.push.apply(d,Uf(c.props.children,h));return}yt(c.type===nl,`[${typeof c.type=="string"?c.type:c.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),yt(!c.props.index||!c.props.children,"An index route cannot have child routes.");let b={id:c.props.id||h.join("-"),caseSensitive:c.props.caseSensitive,element:c.props.element,Component:c.props.Component,index:c.props.index,path:c.props.path,middleware:c.props.middleware,loader:c.props.loader,action:c.props.action,hydrateFallbackElement:c.props.hydrateFallbackElement,HydrateFallback:c.props.HydrateFallback,errorElement:c.props.errorElement,ErrorBoundary:c.props.ErrorBoundary,hasErrorBoundary:c.props.hasErrorBoundary===!0||c.props.ErrorBoundary!=null||c.props.errorElement!=null,shouldRevalidate:c.props.shouldRevalidate,handle:c.props.handle,lazy:c.props.lazy};c.props.children&&(b.children=Uf(c.props.children,h)),d.push(b)}),d}var Xc="get",Jc="application/x-www-form-urlencoded";function co(l){return typeof HTMLElement<"u"&&l instanceof HTMLElement}function pb(l){return co(l)&&l.tagName.toLowerCase()==="button"}function bb(l){return co(l)&&l.tagName.toLowerCase()==="form"}function Sb(l){return co(l)&&l.tagName.toLowerCase()==="input"}function Nb(l){return!!(l.metaKey||l.altKey||l.ctrlKey||l.shiftKey)}function jb(l,r){return l.button===0&&(!r||r==="_self")&&!Nb(l)}var Gc=null;function wb(){if(Gc===null)try{new FormData(document.createElement("form"),0),Gc=!1}catch{Gc=!0}return Gc}var Eb=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Ef(l){return l!=null&&!Eb.has(l)?(Ia(!1,`"${l}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Jc}"`),null):l}function Tb(l,r){let d,c,f,h,b;if(bb(l)){let j=l.getAttribute("action");c=j?sl(j,r):null,d=l.getAttribute("method")||Xc,f=Ef(l.getAttribute("enctype"))||Jc,h=new FormData(l)}else if(pb(l)||Sb(l)&&(l.type==="submit"||l.type==="image")){let j=l.form;if(j==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let p=l.getAttribute("formaction")||j.getAttribute("action");if(c=p?sl(p,r):null,d=l.getAttribute("formmethod")||j.getAttribute("method")||Xc,f=Ef(l.getAttribute("formenctype"))||Ef(j.getAttribute("enctype"))||Jc,h=new FormData(j,l),!wb()){let{name:y,type:S,value:T}=l;if(S==="image"){let _=y?`${y}.`:"";h.append(`${_}x`,"0"),h.append(`${_}y`,"0")}else y&&h.append(y,T)}}else{if(co(l))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');d=Xc,c=null,f=Jc,b=l}return h&&f==="text/plain"&&(b=h,h=void 0),{action:c,method:d.toLowerCase(),encType:f,formData:h,body:b}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Jf(l,r){if(l===!1||l===null||typeof l>"u")throw new Error(r)}function Cb(l,r,d,c){let f=typeof l=="string"?new URL(l,typeof window>"u"?"server://singlefetch/":window.location.origin):l;return d?f.pathname.endsWith("/")?f.pathname=`${f.pathname}_.${c}`:f.pathname=`${f.pathname}.${c}`:f.pathname==="/"?f.pathname=`_root.${c}`:r&&sl(f.pathname,r)==="/"?f.pathname=`${r.replace(/\/$/,"")}/_root.${c}`:f.pathname=`${f.pathname.replace(/\/$/,"")}.${c}`,f}async function Mb(l,r){if(l.id in r)return r[l.id];try{let d=await import(l.module);return r[l.id]=d,d}catch(d){return console.error(`Error loading route module \`${l.module}\`, reloading page...`),console.error(d),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function Ob(l){return l==null?!1:l.href==null?l.rel==="preload"&&typeof l.imageSrcSet=="string"&&typeof l.imageSizes=="string":typeof l.rel=="string"&&typeof l.href=="string"}async function Rb(l,r,d){let c=await Promise.all(l.map(async f=>{let h=r.routes[f.route.id];if(h){let b=await Mb(h,d);return b.links?b.links():[]}return[]}));return kb(c.flat(1).filter(Ob).filter(f=>f.rel==="stylesheet"||f.rel==="preload").map(f=>f.rel==="stylesheet"?{...f,rel:"prefetch",as:"style"}:{...f,rel:"prefetch"}))}function Ng(l,r,d,c,f,h){let b=(p,y)=>d[y]?p.route.id!==d[y].route.id:!0,j=(p,y)=>{var S;return d[y].pathname!==p.pathname||((S=d[y].route.path)==null?void 0:S.endsWith("*"))&&d[y].params["*"]!==p.params["*"]};return h==="assets"?r.filter((p,y)=>b(p,y)||j(p,y)):h==="data"?r.filter((p,y)=>{var T;let S=c.routes[p.route.id];if(!S||!S.hasLoader)return!1;if(b(p,y)||j(p,y))return!0;if(p.route.shouldRevalidate){let _=p.route.shouldRevalidate({currentUrl:new URL(f.pathname+f.search+f.hash,window.origin),currentParams:((T=d[0])==null?void 0:T.params)||{},nextUrl:new URL(l,window.origin),nextParams:p.params,defaultShouldRevalidate:!0});if(typeof _=="boolean")return _}return!0}):[]}function Db(l,r,{includeHydrateFallback:d}={}){return Ab(l.map(c=>{let f=r.routes[c.route.id];if(!f)return[];let h=[f.module];return f.clientActionModule&&(h=h.concat(f.clientActionModule)),f.clientLoaderModule&&(h=h.concat(f.clientLoaderModule)),d&&f.hydrateFallbackModule&&(h=h.concat(f.hydrateFallbackModule)),f.imports&&(h=h.concat(f.imports)),h}).flat(1))}function Ab(l){return[...new Set(l)]}function _b(l){let r={},d=Object.keys(l).sort();for(let c of d)r[c]=l[c];return r}function kb(l,r){let d=new Set;return new Set(r),l.reduce((c,f)=>{let h=JSON.stringify(_b(f));return d.has(h)||(d.add(h),c.push({key:h,link:f})),c},[])}function zx(){let l=U.useContext(Pr);return Jf(l,"You must render this element inside a <DataRouterContext.Provider> element"),l}function zb(){let l=U.useContext(io);return Jf(l,"You must render this element inside a <DataRouterStateContext.Provider> element"),l}var Kf=U.createContext(void 0);Kf.displayName="FrameworkContext";function Ux(){let l=U.useContext(Kf);return Jf(l,"You must render this element inside a <HydratedRouter> element"),l}function Ub(l,r){let d=U.useContext(Kf),[c,f]=U.useState(!1),[h,b]=U.useState(!1),{onFocus:j,onBlur:p,onMouseEnter:y,onMouseLeave:S,onTouchStart:T}=r,_=U.useRef(null);U.useEffect(()=>{if(l==="render"&&b(!0),l==="viewport"){let C=P=>{P.forEach(B=>{b(B.isIntersecting)})},A=new IntersectionObserver(C,{threshold:.5});return _.current&&A.observe(_.current),()=>{A.disconnect()}}},[l]),U.useEffect(()=>{if(c){let C=setTimeout(()=>{b(!0)},100);return()=>{clearTimeout(C)}}},[c]);let k=()=>{f(!0)},N=()=>{f(!1),b(!1)};return d?l!=="intent"?[h,_,{}]:[h,_,{onFocus:Ji(j,k),onBlur:Ji(p,N),onMouseEnter:Ji(y,k),onMouseLeave:Ji(S,N),onTouchStart:Ji(T,k)}]:[!1,_,{}]}function Ji(l,r){return d=>{l&&l(d),d.defaultPrevented||r(d)}}function Lb({page:l,...r}){let{router:d}=zx(),c=U.useMemo(()=>Nx(d.routes,l,d.basename),[d.routes,l,d.basename]);return c?U.createElement(qb,{page:l,matches:c,...r}):null}function Hb(l){let{manifest:r,routeModules:d}=Ux(),[c,f]=U.useState([]);return U.useEffect(()=>{let h=!1;return Rb(l,r,d).then(b=>{h||f(b)}),()=>{h=!0}},[l,r,d]),c}function qb({page:l,matches:r,...d}){let c=Rn(),{future:f,manifest:h,routeModules:b}=Ux(),{basename:j}=zx(),{loaderData:p,matches:y}=zb(),S=U.useMemo(()=>Ng(l,r,y,h,c,"data"),[l,r,y,h,c]),T=U.useMemo(()=>Ng(l,r,y,h,c,"assets"),[l,r,y,h,c]),_=U.useMemo(()=>{if(l===c.pathname+c.search+c.hash)return[];let C=new Set,A=!1;if(r.forEach(B=>{var X;let M=h.routes[B.route.id];!M||!M.hasLoader||(!S.some(ie=>ie.route.id===B.route.id)&&B.route.id in p&&((X=b[B.route.id])!=null&&X.shouldRevalidate)||M.hasClientLoader?A=!0:C.add(B.route.id))}),C.size===0)return[];let P=Cb(l,j,f.unstable_trailingSlashAwareDataRequests,"data");return A&&C.size>0&&P.searchParams.set("_routes",r.filter(B=>C.has(B.route.id)).map(B=>B.route.id).join(",")),[P.pathname+P.search]},[j,f.unstable_trailingSlashAwareDataRequests,p,c,h,S,r,l,b]),k=U.useMemo(()=>Db(T,h),[T,h]),N=Hb(T);return U.createElement(U.Fragment,null,_.map(C=>U.createElement("link",{key:C,rel:"prefetch",as:"fetch",href:C,...d})),k.map(C=>U.createElement("link",{key:C,rel:"modulepreload",href:C,...d})),N.map(({key:C,link:A})=>U.createElement("link",{key:C,nonce:d.nonce,...A,crossOrigin:A.crossOrigin??d.crossOrigin})))}function Vb(...l){return r=>{l.forEach(d=>{typeof d=="function"?d(r):d!=null&&(d.current=r)})}}var Bb=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{Bb&&(window.__reactRouterVersion="7.13.0")}catch{}function Yb({basename:l,children:r,unstable_useTransitions:d,window:c}){let f=U.useRef();f.current==null&&(f.current=Sp({window:c,v5Compat:!0}));let h=f.current,[b,j]=U.useState({action:h.action,location:h.location}),p=U.useCallback(y=>{d===!1?j(y):U.startTransition(()=>j(y))},[d]);return U.useLayoutEffect(()=>h.listen(p),[h,p]),U.createElement(vb,{basename:l,children:r,location:b.location,navigationType:b.action,navigator:h,unstable_useTransitions:d})}var Lx=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Hx=U.forwardRef(function({onClick:r,discover:d="render",prefetch:c="none",relative:f,reloadDocument:h,replace:b,state:j,target:p,to:y,preventScrollReset:S,viewTransition:T,unstable_defaultShouldRevalidate:_,...k},N){let{basename:C,unstable_useTransitions:A}=U.useContext(Ua),P=typeof y=="string"&&Lx.test(y),B=Tx(y,C);y=B.to;let M=tb(y,{relative:f}),[X,ie,G]=Ub(c,k),Z=Gb(y,{replace:b,state:j,target:p,preventScrollReset:S,relative:f,viewTransition:T,unstable_defaultShouldRevalidate:_,unstable_useTransitions:A});function R(O){r&&r(O),O.defaultPrevented||Z(O)}let ee=U.createElement("a",{...k,...G,href:B.absoluteURL||M,onClick:B.isExternal||h?r:R,ref:Vb(N,ie),target:p,"data-discover":!P&&d==="render"?"true":void 0});return X&&!P?U.createElement(U.Fragment,null,ee,U.createElement(Lb,{page:M})):ee});Hx.displayName="Link";var qx=U.forwardRef(function({"aria-current":r="page",caseSensitive:d=!1,className:c="",end:f=!1,style:h,to:b,viewTransition:j,children:p,...y},S){let T=xu(b,{relative:y.relative}),_=Rn(),k=U.useContext(io),{navigator:N,basename:C}=U.useContext(Ua),A=k!=null&&Ib(T)&&j===!0,P=N.encodeLocation?N.encodeLocation(T).pathname:T.pathname,B=_.pathname,M=k&&k.navigation&&k.navigation.location?k.navigation.location.pathname:null;d||(B=B.toLowerCase(),M=M?M.toLowerCase():null,P=P.toLowerCase()),M&&C&&(M=sl(M,C)||M);const X=P!=="/"&&P.endsWith("/")?P.length-1:P.length;let ie=B===P||!f&&B.startsWith(P)&&B.charAt(X)==="/",G=M!=null&&(M===P||!f&&M.startsWith(P)&&M.charAt(P.length)==="/"),Z={isActive:ie,isPending:G,isTransitioning:A},R=ie?r:void 0,ee;typeof c=="function"?ee=c(Z):ee=[c,ie?"active":null,G?"pending":null,A?"transitioning":null].filter(Boolean).join(" ");let O=typeof h=="function"?h(Z):h;return U.createElement(Hx,{...y,"aria-current":R,className:ee,ref:S,style:O,to:b,viewTransition:j},typeof p=="function"?p(Z):p)});qx.displayName="NavLink";var $b=U.forwardRef(({discover:l="render",fetcherKey:r,navigate:d,reloadDocument:c,replace:f,state:h,method:b=Xc,action:j,onSubmit:p,relative:y,preventScrollReset:S,viewTransition:T,unstable_defaultShouldRevalidate:_,...k},N)=>{let{unstable_useTransitions:C}=U.useContext(Ua),A=Wb(),P=Qb(j,{relative:y}),B=b.toLowerCase()==="get"?"get":"post",M=typeof j=="string"&&Lx.test(j),X=ie=>{if(p&&p(ie),ie.defaultPrevented)return;ie.preventDefault();let G=ie.nativeEvent.submitter,Z=(G==null?void 0:G.getAttribute("formmethod"))||b,R=()=>A(G||ie.currentTarget,{fetcherKey:r,method:Z,navigate:d,replace:f,state:h,relative:y,preventScrollReset:S,viewTransition:T,unstable_defaultShouldRevalidate:_});C&&d!==!1?U.startTransition(()=>R()):R()};return U.createElement("form",{ref:N,method:B,action:P,onSubmit:c?p:X,...k,"data-discover":!M&&l==="render"?"true":void 0})});$b.displayName="Form";function Pb(l){return`${l} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Vx(l){let r=U.useContext(Pr);return yt(r,Pb(l)),r}function Gb(l,{target:r,replace:d,state:c,preventScrollReset:f,relative:h,viewTransition:b,unstable_defaultShouldRevalidate:j,unstable_useTransitions:p}={}){let y=uo(),S=Rn(),T=xu(l,{relative:h});return U.useCallback(_=>{if(jb(_,r)){_.preventDefault();let k=d!==void 0?d:hu(S)===hu(T),N=()=>y(l,{replace:k,state:c,preventScrollReset:f,relative:h,viewTransition:b,unstable_defaultShouldRevalidate:j});p?U.startTransition(()=>N()):N()}},[S,y,T,d,c,r,l,f,h,b,j,p])}var Fb=0,Zb=()=>`__${String(++Fb)}__`;function Wb(){let{router:l}=Vx("useSubmit"),{basename:r}=U.useContext(Ua),d=fb(),c=l.fetch,f=l.navigate;return U.useCallback(async(h,b={})=>{let{action:j,method:p,encType:y,formData:S,body:T}=Tb(h,r);if(b.navigate===!1){let _=b.fetcherKey||Zb();await c(_,d,b.action||j,{unstable_defaultShouldRevalidate:b.unstable_defaultShouldRevalidate,preventScrollReset:b.preventScrollReset,formData:S,body:T,formMethod:b.method||p,formEncType:b.encType||y,flushSync:b.flushSync})}else await f(b.action||j,{unstable_defaultShouldRevalidate:b.unstable_defaultShouldRevalidate,preventScrollReset:b.preventScrollReset,formData:S,body:T,formMethod:b.method||p,formEncType:b.encType||y,replace:b.replace,state:b.state,fromRouteId:d,flushSync:b.flushSync,viewTransition:b.viewTransition})},[c,f,r,d])}function Qb(l,{relative:r}={}){let{basename:d}=U.useContext(Ua),c=U.useContext(On);yt(c,"useFormAction must be used inside a RouteContext");let[f]=c.matches.slice(-1),h={...xu(l||".",{relative:r})},b=Rn();if(l==null){h.search=b.search;let j=new URLSearchParams(h.search),p=j.getAll("index");if(p.some(S=>S==="")){j.delete("index"),p.filter(T=>T).forEach(T=>j.append("index",T));let S=j.toString();h.search=S?`?${S}`:""}}return(!l||l===".")&&f.route.index&&(h.search=h.search?h.search.replace(/^\?/,"?index&"):"?index"),d!=="/"&&(h.pathname=h.pathname==="/"?d:ll([d,h.pathname])),hu(h)}function Ib(l,{relative:r}={}){let d=U.useContext(Mx);yt(d!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:c}=Vx("useViewTransitionState"),f=xu(l,{relative:r});if(!d.isTransitioning)return!1;let h=sl(d.currentLocation.pathname,c)||d.currentLocation.pathname,b=sl(d.nextLocation.pathname,c)||d.nextLocation.pathname;return Kc(f.pathname,b)!=null||Kc(f.pathname,h)!=null}var Xb=Sx();const Jb=Gf(Xb);/**
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 Bx=(...l)=>l.filter((r,d,c)=>!!r&&r.trim()!==""&&c.indexOf(r)===d).join(" ").trim();/**
66
- * @license lucide-react v0.564.0 - ISC
67
- *
68
- * This source code is licensed under the ISC license.
69
- * See the LICENSE file in the root directory of this source tree.
70
- */const Kb=l=>l.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 e1=l=>l.replace(/^([A-Z])|[\s-_]+(\w)/g,(r,d,c)=>c?c.toUpperCase():d.toLowerCase());/**
76
- * @license lucide-react v0.564.0 - ISC
77
- *
78
- * This source code is licensed under the ISC license.
79
- * See the LICENSE file in the root directory of this source tree.
80
- */const jg=l=>{const r=e1(l);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 t1={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 a1=l=>{for(const r in l)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 n1=U.forwardRef(({color:l="currentColor",size:r=24,strokeWidth:d=2,absoluteStrokeWidth:c,className:f="",children:h,iconNode:b,...j},p)=>U.createElement("svg",{ref:p,...t1,width:r,height:r,stroke:l,strokeWidth:c?Number(d)*24/Number(r):d,className:Bx("lucide",f),...!h&&!a1(j)&&{"aria-hidden":"true"},...j},[...b.map(([y,S])=>U.createElement(y,S)),...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=(l,r)=>{const d=U.forwardRef(({className:c,...f},h)=>U.createElement(n1,{ref:h,iconNode:r,className:Bx(`lucide-${Kb(jg(l))}`,`lucide-${l}`,c),...f}));return d.displayName=jg(l),d};/**
101
- * @license lucide-react v0.564.0 - ISC
102
- *
103
- * This source code is licensed under the ISC license.
104
- * See the LICENSE file in the root directory of this source tree.
105
- */const l1=[["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"}]],Yx=Re("activity",l1);/**
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 s1=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],r1=Re("arrow-down",s1);/**
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 i1=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],wg=Re("arrow-right",i1);/**
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 u1=[["path",{d:"m21 16-4 4-4-4",key:"f6ql7i"}],["path",{d:"M17 20V4",key:"1ejh1v"}],["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}]],c1=Re("arrow-up-down",u1);/**
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 o1=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],d1=Re("arrow-up",o1);/**
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 f1=[["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"}]],h1=Re("bell",f1);/**
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 m1=[["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"}]],Eg=Re("briefcase",m1);/**
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 g1=[["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"}]],$x=Re("calendar",g1);/**
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 x1=[["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"}]],Px=Re("chart-column",x1);/**
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 v1=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],y1=Re("check",v1);/**
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 p1=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],eh=Re("chevron-down",p1);/**
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 b1=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],S1=Re("chevron-left",b1);/**
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 N1=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],j1=Re("chevron-right",N1);/**
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 w1=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],E1=Re("chevron-up",w1);/**
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 T1=[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]],C1=Re("chevrons-up-down",T1);/**
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 M1=[["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"}]],Mn=Re("circle-alert",M1);/**
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 O1=[["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"}]],Tg=Re("circle-arrow-down",O1);/**
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 R1=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],D1=Re("circle-check",R1);/**
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 A1=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],vu=Re("circle-check-big",A1);/**
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 _1=[["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"}]],k1=Re("circle-x",_1);/**
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 z1=[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],Gx=Re("clock",z1);/**
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 U1=[["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"}]],Fx=Re("external-link",U1);/**
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 L1=[["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"}]],H1=Re("eye-off",L1);/**
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 q1=[["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"}]],Zx=Re("eye",q1);/**
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 V1=[["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"}]],Lf=Re("file-text",V1);/**
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 B1=[["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"}]],Wx=Re("git-merge",B1);/**
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 Y1=[["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"}]],th=Re("git-pull-request",Y1);/**
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 $1=[["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"}]],P1=Re("globe",$1);/**
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 G1=[["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"}]],F1=Re("house",G1);/**
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 Z1=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],W1=Re("info",Z1);/**
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 Q1=[["path",{d:"M5 3v14",key:"9nsxs2"}],["path",{d:"M12 3v8",key:"1h2ygw"}],["path",{d:"M19 3v18",key:"1sk56x"}]],I1=Re("kanban",Q1);/**
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 X1=[["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"}]],Cg=Re("list-restart",X1);/**
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 J1=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],Qx=Re("loader-circle",J1);/**
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 K1=[["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"}]],Ix=Re("map",K1);/**
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 e2=[["path",{d:"M5 12h14",key:"1ays0h"}]],t2=Re("minus",e2);/**
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 a2=[["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"}]],Xx=Re("panels-top-left",a2);/**
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 n2=[["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"}]],eo=Re("pause",n2);/**
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 l2=[["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"}]],oo=Re("pen",l2);/**
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 s2=[["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"}]],Cn=Re("play",s2);/**
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 r2=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Fs=Re("plus",r2);/**
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 i2=[["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"}]],to=Re("refresh-cw",i2);/**
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 u2=[["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"}]],ah=Re("rotate-ccw",u2);/**
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 c2=[["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"}]],Jx=Re("save",c2);/**
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 o2=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],yu=Re("search",o2);/**
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 d2=[["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"}]],Mg=Re("settings-2",d2);/**
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 f2=[["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"}]],h2=Re("settings",f2);/**
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 m2=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],Og=Re("square",m2);/**
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 g2=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],x2=Re("terminal",g2);/**
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 v2=[["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"}]],Fr=Re("trash-2",v2);/**
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 y2=[["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",y2);/**
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 p2=[["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"}]],b2=Re("wifi",p2);/**
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 S2=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Zr=Re("x",S2);/**
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 N2=[["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"}]],Rg=Re("zap",N2),Kx=[{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"}}],ev=[{id:"executor",label:"Executor",processName:"executor",color:{bg:"bg-blue-500",border:"border-blue-500/60"},triggerEndpoint:"/api/actions/run",scheduleTemplateKey:"executor",getEnabled:l=>l.executorEnabled??!0,getSchedule:l=>l.cronSchedule??"5 */2 * * *",settingsSection:"general",buildEnabledPatch:l=>({executorEnabled:l})},{id:"reviewer",label:"Reviewer",processName:"reviewer",color:{bg:"bg-green-500",border:"border-green-500/60"},triggerEndpoint:"/api/actions/review",scheduleTemplateKey:"reviewer",getEnabled:l=>l.reviewerEnabled??!0,getSchedule:l=>l.reviewerSchedule??"25 */3 * * *",settingsSection:"general",buildEnabledPatch:l=>({reviewerEnabled:l})},{id:"qa",label:"QA",processName:"qa",color:{bg:"bg-purple-500",border:"border-purple-500/60"},triggerEndpoint:"/api/actions/qa",scheduleTemplateKey:"qa",getEnabled:l=>{var r;return((r=l.qa)==null?void 0:r.enabled)??!0},getSchedule:l=>{var r;return((r=l.qa)==null?void 0:r.schedule)??"45 2,10,18 * * *"},settingsSection:"general",buildEnabledPatch:(l,r)=>({qa:{...r.qa??{},enabled:l}})},{id:"audit",label:"Audit",processName:"audit",color:{bg:"bg-orange-500",border:"border-orange-500/60"},triggerEndpoint:"/api/actions/audit",scheduleTemplateKey:"audit",getEnabled:l=>{var r;return((r=l.audit)==null?void 0:r.enabled)??!0},getSchedule:l=>{var r;return((r=l.audit)==null?void 0:r.schedule)??"50 3 * * 1"},settingsSection:"advanced",buildEnabledPatch:(l,r)=>({audit:{...r.audit??{},enabled:l}})},{id:"slicer",label:"Planner",processName:"planner",color:{bg:"bg-yellow-500",border:"border-yellow-500/60"},triggerEndpoint:"/api/actions/planner",scheduleTemplateKey:"slicer",getEnabled:l=>{var r;return((r=l.roadmapScanner)==null?void 0:r.enabled)??!0},getSchedule:l=>{var r;return((r=l.roadmapScanner)==null?void 0:r.slicerSchedule)??"35 */6 * * *"},settingsSection:"advanced",buildEnabledPatch:(l,r)=>({roadmapScanner:{...r.roadmapScanner??{},enabled:l}})},{id:"analytics",label:"Analytics",processName:"analytics",color:{bg:"bg-pink-500",border:"border-pink-500/60"},triggerEndpoint:"/api/actions/analytics",scheduleTemplateKey:"analytics",getEnabled:l=>{var r;return((r=l.analytics)==null?void 0:r.enabled)??!1},getSchedule:l=>{var r;return((r=l.analytics)==null?void 0:r.schedule)??"0 6 * * 1"},settingsSection:"advanced",buildEnabledPatch:(l,r)=>({analytics:{...r.analytics??{},enabled:l}})},{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:l=>{var r;return((r=l.prResolver)==null?void 0:r.enabled)??!0},getSchedule:l=>{var r;return((r=l.prResolver)==null?void 0:r.schedule)??"15 6,14,22 * * *"},settingsSection:"advanced",buildEnabledPatch:(l,r)=>({prResolver:{...r.prResolver??{},enabled:l}})},{id:"merger",label:"Merger",processName:"merger",color:{bg:"bg-cyan-500",border:"border-cyan-500/60"},triggerEndpoint:"/api/actions/merge",scheduleTemplateKey:"merger",getEnabled:l=>{var r;return((r=l.merger)==null?void 0:r.enabled)??!1},getSchedule:l=>{var r;return((r=l.merger)==null?void 0:r.schedule)??"55 */4 * * *"},settingsSection:"advanced",buildEnabledPatch:(l,r)=>({merger:{...r.merger??{},enabled:l}})}];function j2(l){return ev.find(r=>r.id===l)}const nh="";let lh=!1,ao=null;function w2(l){lh=l}function Dg(l){ao=l}function E2(){return lh}function sh(l){return encodeURIComponent(l.replace(/\//g,"~"))}function Ot(l){return lh&&ao?l.replace("/api/",`/api/projects/${sh(ao)}/`):l}function T2(){return ct("/api/mode")}function tv(){return ct("/api/projects")}function C2(l){const r=sh(l);return ct(`/api/projects/${r}`,{method:"DELETE"})}async function ct(l,r){const d=`${nh}${l}`,c=await fetch(d,{headers:{"Content-Type":"application/json",...r==null?void 0:r.headers},...r});if(!c.ok){const f=await c.json().catch(()=>({error:"Unknown error"}));throw new Error(f.error||`HTTP ${c.status}: ${c.statusText}`)}return c.json()}function Tf(){return ct(Ot("/api/status"))}function av(){return ct(Ot("/api/prs"))}function M2(l,r){const d=`?lines=${encodeURIComponent(r)}`;return ct(Ot(`/api/logs/${encodeURIComponent(l)}${d}`))}function rh(){return ct(Ot("/api/config"))}async function O2(){if(E2()){const r=(await tv()).filter(c=>c.valid);return(await Promise.all(r.map(async c=>{try{const f=await ct(`/api/projects/${sh(c.name)}/config`);return{projectId:c.name,config:f}}catch(f){return console.error(`Failed to fetch config for project ${c.name}`,f),null}}))).filter(c=>c!==null)}else{const l=await rh();return[{projectId:ao||"current",config:l}]}}function no(l){return ct(Ot("/api/config"),{method:"PUT",body:JSON.stringify(l)})}function R2(){return ct(Ot("/api/doctor"))}function nv(){return ct(Ot("/api/schedule-info"))}function D2(){return ct(Ot("/api/actions/review"),{method:"POST"})}function lv(l){const r=j2(l);return r?ct(Ot(r.triggerEndpoint),{method:"POST"}):Promise.reject(new Error(`Unknown job ID: ${l}`))}function du(){return ct(Ot("/api/actions/install-cron"),{method:"POST"})}function sv(){return ct(Ot("/api/actions/uninstall-cron"),{method:"POST"})}function A2(l="all"){return ct(Ot("/api/actions/cancel"),{method:"POST",body:JSON.stringify({type:l})})}const Ql=["Draft","Ready","In Progress","Review","Done"];function rv(){return ct(Ot("/api/board/status"))}function _2(l){return ct(Ot("/api/board/issues"),{method:"POST",body:JSON.stringify(l)})}function iv(l,r){return ct(Ot(`/api/board/issues/${l}/move`),{method:"PATCH",body:JSON.stringify({column:r})})}async function k2(l){const r=`${nh}${Ot(`/api/board/issues/${l}`)}`,d=await fetch(r,{headers:{"Content-Type":"application/json"},method:"DELETE"});if(!d.ok){const c=await d.json().catch(()=>({error:"Unknown error"}));throw new Error(c.error||`HTTP ${d.status}: ${d.statusText}`)}}function z2(){return ct(Ot("/api/actions/clear-lock"),{method:"POST"})}function U2(l,r=[],d){const c=(d==null?void 0:d.enabled)??!0,f=U.useRef(l);f.current=l,U.useEffect(()=>{if(!c)return;const h=`${nh}${Ot("/api/status/events")}`,b=new EventSource(h);return b.addEventListener("status_changed",j=>{try{const p=JSON.parse(j.data);f.current(p)}catch{}}),()=>{b.close()}},[c,...r])}function Ag(){return ct("/api/queue/status")}function L2(l){const r=`?window=${encodeURIComponent(l)}`;return ct(`/api/queue/analytics${r}`)}function H2(l){return ct("/api/queue/clear",{method:"POST",body:JSON.stringify({force:!1})})}function q2(){return ct("/api/global-notifications")}function _g(l){return ct("/api/global-notifications",{method:"PUT",body:JSON.stringify(l)})}function V2(){return ct(Ot("/api/roadmap"))}function B2(){return ct(Ot("/api/roadmap/scan"),{method:"POST"})}function uv(l){return ct(Ot("/api/roadmap/toggle"),{method:"PUT",body:JSON.stringify({enabled:l})})}function hn(l,r=[],d){const c=(d==null?void 0:d.enabled)??!0,[f,h]=U.useState(null),[b,j]=U.useState(!0),[p,y]=U.useState(null),S=U.useRef(l);S.current=l;const T=U.useRef(()=>{(async()=>{y(null);try{const k=await S.current();h(k)}catch(k){y(k instanceof Error?k:new Error("Unknown error"))}})()});return U.useEffect(()=>{if(!c)return;let _=!1;return j(!0),y(null),(async()=>{try{const N=await S.current();_||h(N)}catch(N){_||y(N instanceof Error?N:new Error("Unknown error"))}finally{_||j(!1)}})(),()=>{_=!0}},[...r,c]),{data:f,loading:b,error:p,refetch:T.current}}const kg=l=>{let r;const d=new Set,c=(y,S)=>{const T=typeof y=="function"?y(r):y;if(!Object.is(T,r)){const _=r;r=S??(typeof T!="object"||T===null)?T:Object.assign({},r,T),d.forEach(k=>k(r,_))}},f=()=>r,j={setState:c,getState:f,getInitialState:()=>p,subscribe:y=>(d.add(y),()=>d.delete(y))},p=r=l(c,f,j);return j},Y2=l=>l?kg(l):kg,$2=l=>l;function P2(l,r=$2){const d=ze.useSyncExternalStore(l.subscribe,()=>r(l.getState()),()=>r(l.getInitialState()));return ze.useDebugValue(d),d}const zg=l=>{const r=Y2(l),d=c=>P2(r,c);return Object.assign(d,r),d},G2=l=>l?zg(l):zg,F2=typeof localStorage<"u"?localStorage.getItem("nw-selected-project"):null,Pt=G2((l,r)=>({projectName:"Night Watch",setProjectName:d=>l({projectName:d}),toasts:[],addToast:d=>{const c=Math.random().toString(36).substring(7);l(f=>({toasts:[...f.toasts,{...d,id:c}]})),setTimeout(()=>{l(f=>({toasts:f.toasts.filter(h=>h.id!==c)}))},5e3)},removeToast:d=>l(c=>({toasts:c.toasts.filter(f=>f.id!==d)})),status:null,setStatus:d=>l(c=>!c.status||new Date(d.timestamp)>new Date(c.status.timestamp)?{status:d}:c),globalModeLoading:!0,setGlobalModeLoading:d=>l({globalModeLoading:d}),isGlobalMode:!1,setGlobalMode:d=>{w2(d),l({isGlobalMode:d})},projects:[],setProjects:d=>l({projects:d}),selectedProjectId:F2,selectProject:d=>{Dg(d),d?localStorage.setItem("nw-selected-project",d):localStorage.removeItem("nw-selected-project"),l(c=>{const f=c.projects.find(h=>h.name===d);return{selectedProjectId:d,...f?{projectName:f.name}:{}}})},removeProjectFromList:d=>{l(c=>{var j;const f=c.projects.filter(p=>p.name!==d),h=c.selectedProjectId===d,b=h?((j=f[0])==null?void 0:j.name)??null:c.selectedProjectId;return h&&(Dg(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:d}=r(),c=d==null?void 0:d.config;return ev.map(f=>({id:f.id,label:f.label,processName:f.processName,color:f.color,enabled:c?f.getEnabled(c):!0,schedule:c?f.getSchedule(c):"",triggerEndpoint:f.triggerEndpoint}))}})),Z2=()=>{const[l,r]=U.useState(!1),{projectName:d,isGlobalMode:c,projects:f,selectedProjectId:h,selectProject:b,globalModeLoading:j}=Pt(),{data:p}=hn(av,[h],{enabled:!j}),y=(p==null?void 0:p.length)??0,S=U.useMemo(()=>[{icon:F1,label:"Dashboard",path:"/",section:"Overview"},{icon:x2,label:"Logs",path:"/logs"},{icon:I1,label:"Board",path:"/board",section:"Work"},{icon:th,label:"Pull Requests",path:"/prs",badge:y},{icon:Ix,label:"Roadmap",path:"/roadmap"},{icon:$x,label:"Automation",path:"/scheduling",section:"Automation"},{icon:h2,label:"Settings",path:"/settings",section:"Config"}],[y]);return s.jsxs("aside",{className:`
366
- relative flex flex-col transition-all duration-300 ease-[cubic-bezier(0.25,0.1,0.25,1)]
367
- ${l?"w-20":"w-72"} h-screen flex-shrink-0 z-50
368
- bg-[#030712]/80 backdrop-blur-xl border-r border-white/5
369
- `,children:[s.jsx("div",{className:`p-6 border-b border-white/5 ${l?"items-center justify-center flex":""}`,children:l?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:c?"Projects":"Workspace"}),c?s.jsxs("div",{className:"relative",children:[s.jsx(Eg,{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(C1,{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(Eg,{className:"h-4 w-4 text-indigo-400 mr-3"}),s.jsx("span",{className:"truncate",children:d})]})]})}),s.jsx("nav",{className:"flex-1 py-6 overflow-y-auto overflow-x-hidden scrollbar-hide",children:s.jsx("ul",{className:"space-y-1.5 px-4",children:S.map(T=>s.jsxs(ze.Fragment,{children:[T.section&&!l&&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(qx,{to:T.path,className:({isActive:_})=>`
370
- flex items-center px-3.5 py-3 rounded-xl transition-all duration-200 group relative
371
- ${_?"bg-indigo-500/10 text-indigo-300 shadow-[inset_0_1px_0_0_rgba(255,255,255,0.05)]":"text-slate-400 hover:bg-white/5 hover:text-slate-200"}
372
- ${l?"justify-center":""}
373
- `,children:({isActive:_})=>s.jsxs(s.Fragment,{children:[s.jsx(T.icon,{className:`h-5 w-5 transition-colors ${_?"text-indigo-400 drop-shadow-[0_0_8px_rgba(99,102,241,0.5)]":"text-slate-500 group-hover:text-slate-300"} ${l?"":"mr-3.5"}`}),!l&&s.jsx("span",{className:"flex-1 text-sm font-medium tracking-wide",children:T.label}),T.badge&&(l?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 ${_?"bg-indigo-500/20 text-indigo-300":"bg-white/5 text-slate-400 border border-white/5"}`,children:T.badge})),_&&!l&&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)]"}),l&&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(!l),className:"p-2 rounded-lg hover:bg-white/5 text-slate-500 hover:text-slate-300 transition-colors",children:l?s.jsx(j1,{className:"h-5 w-5"}):s.jsx(S1,{className:"h-5 w-5"})})})]})},W2=()=>{const{projectName:l}=Pt();return s.jsxs("header",{className:"h-20 flex items-center justify-between px-8 z-40 sticky top-0 bg-[#030712]/80 backdrop-blur-md border-b border-white/5",children:[s.jsxs("div",{className:"flex items-center space-x-6",children:[s.jsxs("div",{children:[s.jsx("div",{className:"text-xs font-mono text-indigo-400 mb-0.5 tracking-tight",children:"Active Project"}),s.jsx("h1",{className:"text-xl font-semibold text-white tracking-tight leading-none",children:l})]}),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(b2,{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(yu,{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(h1,{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"})]})]})},Q2=({toast:l,onDismiss:r})=>{const d={success:s.jsx(vu,{className:"h-5 w-5 text-green-400"}),error:s.jsx(Mn,{className:"h-5 w-5 text-red-400"}),info:s.jsx(W1,{className:"h-5 w-5 text-blue-400"}),warning:s.jsx($s,{className:"h-5 w-5 text-amber-400"})},c={success:"border-l-green-500",error:"border-l-red-500",info:"border-l-blue-500",warning:"border-l-amber-500"};return s.jsx("div",{className:`
374
- pointer-events-auto w-full max-w-sm overflow-hidden rounded-lg
375
- bg-slate-900 border border-slate-800 border-l-4 ${c[l.type]}
376
- shadow-lg ring-1 ring-black ring-opacity-5 transition-all
377
- animate-in slide-in-from-right-full fade-in duration-300
378
- `,children:s.jsx("div",{className:"p-4",children:s.jsxs("div",{className:"flex items-start",children:[s.jsx("div",{className:"flex-shrink-0",children:d[l.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:l.title}),l.message&&s.jsx("p",{className:"mt-1 text-sm text-slate-400",children:l.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(l.id),children:[s.jsx("span",{className:"sr-only",children:"Close"}),s.jsx(Zr,{className:"h-5 w-5"})]})})]})})})},I2=()=>{const{toasts:l,removeToast:r}=Pt();return s.jsx("div",{"aria-live":"assertive",className:"pointer-events-none fixed inset-0 flex flex-col items-end px-4 py-6 sm:items-end sm:p-6 z-[100] gap-4",children:l.map(d=>s.jsx(Q2,{toast:d,onDismiss:r},d.id))})};function X2(){const{setGlobalMode:l,setGlobalModeLoading:r,setProjects:d,selectProject:c,selectedProjectId:f}=Pt();U.useEffect(()=>{r(!0),T2().then(async({globalMode:h})=>{if(l(h),!h)return;const b=await tv();d(b);const j=b.filter(p=>p.valid);f&&j.some(p=>p.name===f)?c(f):j.length>0&&c(j[0].name)}).catch(()=>{l(!1)}).finally(()=>{r(!1)})},[])}function Ug(l){if(!(l!=null&&l.timestamp))return Number.NEGATIVE_INFINITY;const r=new Date(l.timestamp).getTime();return Number.isNaN(r)?Number.NEGATIVE_INFINITY:r}function Fc(l,r){return l?r?Ug(l)>=Ug(r)?l:r:l:r}function J2(){const{setStatus:l,setProjectName:r,selectedProjectId:d,globalModeLoading:c,status:f}=Pt(),h=U.useRef(null);h.current=Pt.getState().status,U2(b=>{Fc(b,h.current)===b&&l(b)},[d,c],{enabled:!c}),U.useEffect(()=>{if(c)return;Tf().then(j=>{Fc(j,h.current)===j&&l(j)}).catch(()=>{});const b=setInterval(()=>{Tf().then(j=>{Fc(j,h.current)===j&&l(j)}).catch(()=>{})},3e4);return()=>clearInterval(b)},[d,c,l]),U.useEffect(()=>{const b=()=>{Tf().then(j=>{Fc(j,h.current)===j&&l(j)}).catch(()=>{})};return window.addEventListener("focus",b),()=>window.removeEventListener("focus",b)},[d,l]),U.useEffect(()=>{f!=null&&f.projectName&&r(f.projectName)},[f==null?void 0:f.projectName,r])}const ft=({children:l,className:r="",onClick:d})=>s.jsxs("div",{className:`
379
- relative bg-[#0b101b] rounded-xl border border-white/5
380
- shadow-[0_4px_20px_-4px_rgba(0,0,0,0.5)]
381
- transition-all duration-300
382
- ${d?"cursor-pointer hover:border-indigo-500/30 hover:shadow-indigo-500/5 group":""}
383
- ${r}
384
- `,onClick:d,children:[d&&s.jsx("div",{className:"absolute inset-0 bg-indigo-500/0 group-hover:bg-indigo-500/[0.02] transition-colors rounded-xl pointer-events-none"}),s.jsx("div",{className:"relative z-10",children:l})]}),Be=({children:l,variant:r="primary",size:d="md",loading:c=!1,className:f="",disabled:h,...b})=>{const j="inline-flex items-center justify-center rounded-lg font-medium transition-all duration-200 focus:outline-none focus:ring-2 focus:ring-offset-1 focus:ring-offset-[#030712] disabled:opacity-50 disabled:pointer-events-none active:scale-[0.98]",p={primary:"bg-indigo-600 text-white hover:bg-indigo-500 focus:ring-indigo-500 shadow-[0_0_15px_-3px_rgba(79,70,229,0.4)] border border-indigo-500/50 hover:shadow-[0_0_20px_-3px_rgba(79,70,229,0.5)]",secondary:"bg-[#1f2937] text-slate-200 hover:bg-[#374151] focus:ring-slate-500 border border-white/5",danger:"bg-red-600/10 text-red-400 hover:bg-red-600/20 focus:ring-red-500 border border-red-900/50 hover:border-red-500/50",ghost:"bg-transparent text-slate-400 hover:bg-white/5 hover:text-slate-200 focus:ring-slate-400",outline:"border border-slate-700/50 bg-transparent text-slate-300 hover:bg-white/5 hover:border-slate-500 focus:ring-slate-400"},y={sm:"h-8 px-3 text-xs tracking-wide",md:"h-10 px-4 py-2 text-sm",lg:"h-12 px-6 text-base",icon:"h-9 w-9"};return s.jsxs("button",{className:`${j} ${p[r]} ${y[d]} ${f}`,disabled:h||c,...b,children:[c&&s.jsx(Qx,{className:"mr-2 h-4 w-4 animate-spin"}),l]})},Qa=({children:l,variant:r="default",className:d=""})=>{const c={default:"bg-indigo-500/10 text-indigo-400 ring-1 ring-inset ring-indigo-500/20",success:"bg-emerald-500/10 text-emerald-400 ring-1 ring-inset ring-emerald-500/20",warning:"bg-amber-500/10 text-amber-400 ring-1 ring-inset ring-amber-500/20",error:"bg-red-500/10 text-red-400 ring-1 ring-inset ring-red-500/20",neutral:"bg-slate-500/10 text-slate-400 ring-1 ring-inset ring-slate-500/20",info:"bg-blue-500/10 text-blue-400 ring-1 ring-inset ring-blue-500/20"};return s.jsx("span",{className:`inline-flex items-center px-2 py-0.5 rounded text-[11px] font-medium tracking-wide ${c[r]} ${d}`,children:l})},cv={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"}},K2=({defaultColumn:l,onClose:r,onCreated:d})=>{const[c,f]=U.useState(""),[h,b]=U.useState(""),[j,p]=U.useState(l),[y,S]=U.useState(!1),[T,_]=U.useState(null),{addToast:k}=Pt(),N=async C=>{if(C.preventDefault(),!!c.trim()){S(!0),_(null);try{await _2({title:c.trim(),body:h,column:j}),k({title:"Issue created",message:`"${c.trim()}" added to ${j}`,type:"success"}),d(),r()}catch(A){_(A instanceof Error?A.message:"Failed to create issue")}finally{S(!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(Zr,{className:"h-5 w-5"})})]}),s.jsxs("form",{onSubmit:N,className:"p-6 space-y-4",children:[s.jsxs("div",{children:[s.jsx("label",{className:"text-xs font-medium text-slate-400 uppercase tracking-wide block mb-1.5",children:"Title"}),s.jsx("input",{type:"text",value:c,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:j,onChange:C=>p(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:Ql.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(Be,{variant:"ghost",type:"button",onClick:r,children:"Cancel"}),s.jsx(Be,{type:"submit",disabled:y||!c.trim(),children:y?"Creating...":"Create Issue"})]})]})]})]})},eS=({issue:l,onClose:r,onMoved:d,onClosed:c})=>{const[f,h]=U.useState(!1),[b,j]=U.useState(!1),[p,y]=U.useState(!1),{addToast:S}=Pt(),T=async N=>{if(N!==l.column){h(!0);try{await iv(l.number,N),S({title:"Issue moved",message:`#${l.number} moved to ${N}`,type:"success"}),d(),r()}catch(C){S({title:"Move failed",message:C instanceof Error?C.message:"Failed to move issue",type:"error"})}finally{h(!1)}}},_=async()=>{y(!1),j(!0);try{await k2(l.number),S({title:"Issue closed",message:`#${l.number} closed on GitHub`,type:"success"}),c(),r()}catch(N){S({title:"Close failed",message:N instanceof Error?N.message:"Failed to close issue",type:"error"})}finally{j(!1)}},k=l.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:["#",l.number]}),s.jsx(Qa,{variant:cv[k].badge,children:k})]}),s.jsx("h2",{className:"text-lg font-semibold text-slate-100 leading-snug",children:l.title}),l.assignees.length>0&&s.jsxs("p",{className:"text-xs text-slate-500 mt-1",children:["Assigned to: ",l.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(Zr,{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:"}),Ql.filter(N=>N!==l.column).map(N=>s.jsx("button",{onClick:()=>T(N),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:N},N))]}),s.jsxs("div",{className:"flex items-center space-x-2 ml-auto",children:[l.url&&!l.url.startsWith("local://")&&s.jsxs("a",{href:l.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(Fx,{className:"h-3.5 w-3.5"}),s.jsx("span",{children:"GitHub"})]}),s.jsx("button",{onClick:()=>y(!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"})]})]}),p&&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:()=>y(!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 #",l.number,': "',l.title,'"?']}),s.jsxs("div",{className:"flex justify-end space-x-3",children:[s.jsx(Be,{variant:"ghost",onClick:()=>y(!1),children:"Cancel"}),s.jsx(Be,{onClick:_,children:"Confirm"})]})]})]}),s.jsx("div",{className:"flex-1 overflow-y-auto p-6",children:l.body?s.jsx("pre",{className:"text-sm text-slate-300 whitespace-pre-wrap font-mono leading-relaxed break-words",children:l.body}):s.jsx("p",{className:"text-slate-500 text-sm italic",children:"No description provided."})})]})]})},tS=({issue:l,onClick:r,onDragStart:d})=>{const[c,f]=U.useState(!1);return s.jsx("div",{className:"relative",draggable:!0,onDragStart:h=>{h.dataTransfer.setData("issueNumber",String(l.number)),h.dataTransfer.effectAllowed="move",f(!0),d(l)},onDragEnd:()=>f(!1),children:s.jsxs(ft,{className:`p-3 cursor-grab hover:border-indigo-500/30 transition-all select-none ${c?"opacity-30":""}`,onClick:r,children:[s.jsxs("span",{className:"text-[10px] font-mono text-slate-600",children:["#",l.number]}),s.jsx("p",{className:"text-xs font-medium text-slate-200 line-clamp-2 mt-0.5 leading-snug",children:l.title}),l.assignees.length>0&&s.jsx("p",{className:"text-[10px] text-slate-500 mt-1.5 truncate",children:l.assignees.join(", ")})]})})},aS=({name:l,issues:r,draggingIssue:d,onIssueClick:c,onNewIssue:f,onMoveIssue:h,onDragStart:b})=>{const j=cv[l],[p,y]=U.useState(!1),S=d!==null&&d.column!==l;return s.jsxs("div",{className:`flex flex-col min-w-[220px] max-w-[220px] h-full rounded-xl transition-colors ${p&&S?"bg-indigo-500/5 ring-1 ring-indigo-500/30":""}`,onDragOver:T=>{S&&(T.preventDefault(),T.dataTransfer.dropEffect="move",y(!0))},onDragLeave:()=>y(!1),onDrop:T=>{T.preventDefault(),y(!1),d&&d.column!==l&&h(d,l)},children:[s.jsxs("div",{className:"flex items-center justify-between mb-3 flex-shrink-0",children:[s.jsxs("div",{className:"flex items-center space-x-2",children:[s.jsx("span",{className:`w-2.5 h-2.5 rounded-full ${j.dot}`}),s.jsx("span",{className:"text-xs font-semibold text-slate-400 uppercase tracking-wider",children:l}),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(l),className:"p-1 rounded-md hover:bg-white/5 text-slate-600 hover:text-slate-400 transition-colors",title:`Add issue to ${l}`,children:s.jsx(Fs,{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 ${p&&S?"border-indigo-500/40":"border-slate-800"}`,children:s.jsx("span",{className:"text-xs text-slate-700",children:p&&S?"Drop here":"No issues"})}):r.map(T=>s.jsx(tS,{issue:T,onClick:()=>c(T),onDragStart:b},T.id))})]})},nS=()=>{const[l,r]=U.useState(null),[d,c]=U.useState(null),[f,h]=U.useState(null),[b,j]=U.useState(null),p=U.useRef(!1),{addToast:y,selectedProjectId:S,globalModeLoading:T}=Pt(),{data:_,loading:k,error:N,refetch:C}=hn(rv,[S],{enabled:!T});U.useEffect(()=>{const B=setInterval(()=>{p.current||C()},3e4);return()=>clearInterval(B)},[C]);const A=U.useCallback(async(B,M)=>{h(null);const X=b??(_==null?void 0:_.columns);if(!X)return;const ie=X,G={};for(const R of Ql)G[R]=(X[R]??[]).filter(ee=>ee.number!==B.number);const Z={...B,column:M};G[M]=[...G[M]??[],Z],j(G),r(R=>(R==null?void 0:R.number)===B.number?Z:R),p.current=!0;try{await iv(B.number,M),C(),setTimeout(()=>{j(null),p.current=!1},800)}catch(R){j(ie),r(ee=>(ee==null?void 0:ee.number)===B.number?B:ee),p.current=!1,y({title:"Move failed",message:R instanceof Error?R.message:"Failed to move issue",type:"error"})}},[y,C,b,_]);if(T||k)return s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx("div",{className:"text-slate-400",children:"Loading board..."})});if(N&&N.message.includes("Board not configured"))return s.jsxs("div",{className:"flex flex-col items-center justify-center h-full space-y-4",children:[s.jsx("div",{className:"text-4xl",children:"📋"}),s.jsx("h2",{className:"text-xl font-semibold text-slate-200",children:"Board not configured"}),s.jsxs("p",{className:"text-slate-500 text-sm max-w-sm text-center",children:["Run ",s.jsx("code",{className:"font-mono bg-slate-800 px-2 py-0.5 rounded text-indigo-300",children:"night-watch board setup"})," in your project to create a GitHub Projects board."]})]});if(N)return s.jsxs("div",{className:"flex flex-col items-center justify-center h-full space-y-4",children:[s.jsx("div",{className:"text-slate-300",children:"Failed to load board"}),s.jsx("div",{className:"text-sm text-slate-500",children:N.message}),s.jsx(Be,{onClick:()=>C(),children:"Retry"})]});if(!_)return null;const P=b??_.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:[Ql.reduce((B,M)=>{var X;return B+(((X=P[M])==null?void 0:X.length)??0)},0)," issues across ",Ql.length," columns"]})]}),s.jsxs(Be,{onClick:()=>c("Ready"),children:[s.jsx(Fs,{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:`${Ql.length*236}px`},children:Ql.map(B=>s.jsx(aS,{name:B,issues:P[B]??[],draggingIssue:f,onIssueClick:r,onNewIssue:c,onMoveIssue:A,onDragStart:h},B))})}),l&&s.jsx(eS,{issue:l,onClose:()=>r(null),onMoved:()=>C(),onClosed:()=>C()}),d&&s.jsx(K2,{defaultColumn:d,onClose:()=>c(null),onCreated:()=>C()})]})},lS=[{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"}],sS=({processes:l,activePrd:r,onCancelProcess:d,onForceClear:c,onViewLog:f,cancellingProcess:h,clearingLock:b,onTriggerJob:j,triggeringJob:p})=>{const y=T=>l.find(_=>_.name===T),S=(T,_)=>T.length<=_?T:T.slice(0,_-1)+"...";return s.jsx("div",{className:"grid grid-cols-2 md:grid-cols-4 lg:grid-cols-8 gap-3",children:lS.map(T=>{const _=y(T.processName),k=(_==null?void 0:_.running)??!1,N=_==null?void 0:_.pid,C=h===T.cancelType,A=k&&T.cancelType,P=!k&&T.name==="executor"&&r,B=k?N?`PID: ${N}`:T.runningLabel:T.idleLabel,M=k&&T.name==="executor"&&r?S(r,20):null;return s.jsxs("div",{className:`flex items-center gap-2 p-2.5 rounded-lg border transition-colors ${k?"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 ${k?"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 ${k?"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(Lf,{className:"h-3 w-3 flex-shrink-0"}),M]}):B})]}),s.jsxs("div",{className:"flex-shrink-0",children:[A&&s.jsx("button",{onClick:()=>T.cancelType&&d(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(Og,{className:"h-3.5 w-3.5"})}),P&&s.jsx("button",{onClick:c,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(Og,{className:"h-3.5 w-3.5"})}),!A&&!P&&k&&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(Lf,{className:"h-3.5 w-3.5"})}),!k&&!P&&s.jsx("button",{onClick:()=>j(T.triggerId),disabled:p!==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:p===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(Cn,{className:"h-3.5 w-3.5"})})]})]},T.name)})})},rS={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"},iS=()=>{var he,ve;const l=uo(),[r,d]=U.useState(null),[c,f]=U.useState(!1),[h,b]=U.useState(null),[j,p]=U.useState(!1),{setProjectName:y,addToast:S,selectedProjectId:T,globalModeLoading:_,status:k}=Pt(),{data:N}=hn(nv,[T],{enabled:!_}),{data:C,loading:A}=hn(()=>rv().catch(()=>null),[T],{enabled:!_}),P=k;if(ze.useEffect(()=>{P!=null&&P.projectName&&y(P.projectName)},[P,y]),_)return s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx("div",{className:"text-slate-400",children:"Loading..."})});if(!P)return s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx("div",{className:"text-slate-400",children:"Loading..."})});const B=P.prs.length,M=P.prs.filter(ce=>ce.reviewScore!==null&&ce.reviewScore<70).length,X=((he=C==null?void 0:C.columns.Ready)==null?void 0:he.length)??0,ie=((ve=C==null?void 0:C.columns["In Progress"])==null?void 0:ve.length)??0;P.processes.find(ce=>ce.name==="executor"),P.processes.find(ce=>ce.name==="reviewer"),P.processes.find(ce=>ce.name==="qa"),P.processes.find(ce=>ce.name==="audit"),P.processes.find(ce=>ce.name==="planner"),P.processes.find(ce=>ce.name==="analytics");const G=async ce=>{d(ce);try{const $=await A2(ce),te=$.results.every(fe=>fe.success);S({title:te?"Process Cancelled":"Cancel Failed",message:$.results.map(fe=>fe.message).join("; "),type:te?"success":"error"})}catch($){S({title:"Cancel Failed",message:$ instanceof Error?$.message:"Failed to cancel process",type:"error"})}finally{d(null)}},Z=async()=>{f(!0);try{await z2(),S({title:"Lock Cleared",message:"Stale executor state removed",type:"success"})}catch(ce){S({title:"Clear Failed",message:ce instanceof Error?ce.message:"Failed to clear lock",type:"error"})}finally{f(!1)}},R=async ce=>{b(ce);try{await lv(ce==="planner"?"slicer":ce),S({title:"Job Triggered",message:`${ce[0].toUpperCase()+ce.slice(1)} job has been queued.`,type:"success"})}catch($){S({title:"Trigger Failed",message:$ instanceof Error?$.message:`Failed to trigger ${ce}`,type:"error"})}finally{b(null)}},ee=async()=>{if(N){p(!0);try{N.paused?(await du(),S({title:"Schedule Resumed",message:"Cron schedules are active.",type:"success"})):(await sv(),S({title:"Schedule Paused",message:"Cron schedules are deactivated.",type:"info"}))}catch(ce){S({title:"Action Failed",message:ce instanceof Error?ce.message:"Toggle failed",type:"error"})}finally{p(!1)}}},O=ce=>{if(!ce)return"Not scheduled";try{const $=new Date(ce),te=new Date,fe=$.getTime()-te.getTime(),me=Math.floor(fe/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 te,fe,me,_e,L,se;if(N!=null&&N.paused)return null;const ce=[{agent:"Executor",nextRun:(N==null?void 0:N.executor.nextRun)??null},{agent:"Reviewer",nextRun:(N==null?void 0:N.reviewer.nextRun)??null},{agent:"QA",nextRun:((te=N==null?void 0:N.qa)==null?void 0:te.nextRun)??null},{agent:"Auditor",nextRun:((fe=N==null?void 0:N.audit)==null?void 0:fe.nextRun)??null},{agent:"Planner",nextRun:((me=N==null?void 0:N.planner)==null?void 0:me.nextRun)??null},{agent:"Analytics",nextRun:((_e=N==null?void 0:N.analytics)==null?void 0:_e.nextRun)??null},{agent:"PR Resolver",nextRun:((L=N==null?void 0:N.prResolver)==null?void 0:L.nextRun)??null},{agent:"Merger",nextRun:((se=N==null?void 0:N.merger)==null?void 0:se.nextRun)??null}];let $=null;for(const ge of ce)ge.nextRun&&(!$||new Date(ge.nextRun)<new Date($.nextRun))&&($=ge);return $?{agent:$.agent,time:O($.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(ft,{className:"p-5",onClick:()=>l("/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:X})]}),s.jsx("div",{className:"p-2 bg-green-500/10 rounded-lg text-green-400",children:s.jsx(vu,{className:"h-5 w-5"})})]}),s.jsx("p",{className:"text-xs text-slate-500 mt-4",children:"issues ready to start"})]}),s.jsxs(ft,{className:"p-5",onClick:()=>l("/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:ie})]}),s.jsx("div",{className:"p-2 bg-blue-500/10 rounded-lg text-blue-400",children:s.jsx(Yx,{className:"h-5 w-5"})})]}),s.jsx("p",{className:"text-xs text-slate-500 mt-4",children:"issues in progress"})]}),s.jsxs(ft,{className:"p-5",onClick:()=>l("/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:B})]}),s.jsx("div",{className:"p-2 bg-purple-500/10 rounded-lg text-purple-400",children:s.jsx(Gx,{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(ft,{className:"p-5",children:[s.jsxs("div",{className:"flex justify-between items-start",children:[s.jsxs("div",{children:[s.jsx("p",{className:"text-sm font-medium text-slate-500",children:"Automation"}),s.jsx("h3",{className:"text-3xl font-bold text-slate-100 mt-1",children:N!=null&&N.paused?"Paused":P.crontab.installed?"Active":"Inactive"})]}),s.jsx("button",{onClick:ee,disabled:j||!N||!P.crontab.installed,title:N!=null&&N.paused?"Resume scheduling":"Pause scheduling",className:`p-2 rounded-lg transition-colors disabled:opacity-50 disabled:cursor-not-allowed ${N!=null&&N.paused?"bg-emerald-500/10 text-emerald-400 hover:bg-emerald-500/20":P.crontab.installed?"bg-indigo-500/10 text-indigo-400 hover:bg-indigo-500/20":"bg-slate-700/50 text-slate-500"}`,children:j?s.jsx(to,{className:"h-5 w-5 animate-spin"}):N!=null&&N.paused?s.jsx(Cn,{className:"h-5 w-5 fill-current"}):P.crontab.installed?s.jsx(eo,{className:"h-5 w-5"}):s.jsx($x,{className:"h-5 w-5"})})]}),s.jsx("p",{className:"text-xs text-slate-500 mt-4",children:N!=null&&N.paused?"All schedules paused":P.crontab.installed?`${P.crontab.entries.length} entr${P.crontab.entries.length===1?"y":"ies"} installed`:"No crontab entries"})]})]}),s.jsxs(ft,{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:()=>l("/logs"),className:"text-xs text-slate-400 hover:text-slate-300 transition-colors",children:"View logs"})]}),s.jsx(sS,{processes:P.processes,activePrd:P.activePrd,onCancelProcess:G,onForceClear:Z,onViewLog:()=>l("/logs"),cancellingProcess:r,clearingLock:c,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:()=>l("/scheduling"),className:"text-sm text-indigo-400 hover:text-indigo-300 flex items-center transition-colors",children:["Manage Schedules ",s.jsx(wg,{className:"ml-1 h-3 w-3"})]})]}):N!=null&&N.paused?s.jsxs("div",{className:"flex items-center justify-between px-4 py-3 bg-amber-900/20 rounded-lg border border-amber-800/40",children:[s.jsxs("div",{className:"flex items-center gap-2 text-sm text-amber-400",children:[s.jsx(eo,{className:"h-3.5 w-3.5"}),s.jsx("span",{children:"Automation is paused"})]}),s.jsxs("button",{onClick:ee,disabled:j,className:"text-sm text-emerald-400 hover:text-emerald-300 flex items-center transition-colors disabled:opacity-50",children:[j?s.jsx(to,{className:"h-3.5 w-3.5 mr-1.5 animate-spin"}):s.jsx(Cn,{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:()=>l("/board"),className:"text-sm text-indigo-400 hover:text-indigo-300 flex items-center transition-colors",children:["View board ",s.jsx(wg,{className:"ml-1 h-3 w-3"})]})]}),s.jsx(ft,{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:Ql.map(ce=>{var te;const $=((te=C.columns[ce])==null?void 0:te.length)??0;return s.jsxs("button",{onClick:()=>l("/board"),className:`inline-flex items-center space-x-2 px-3 py-2 rounded-lg ring-1 ring-inset transition-colors hover:opacity-80 ${rS[ce]}`,children:[s.jsx("span",{className:"text-xs font-medium",children:ce}),s.jsx("span",{className:"text-xs font-bold",children:$})]},ce)})}):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."]})})]})]})},uS=()=>{const[l,r]=U.useState(!0),[d,c]=U.useState(""),[f,h]=U.useState("executor"),b=U.useRef(null),{selectedProjectId:j,globalModeLoading:p}=Pt(),y=Pt(B=>B.status),{data:S,loading:T,error:_,refetch:k}=hn(()=>M2(f,500),[f,j],{enabled:!p}),N=(S==null?void 0:S.lines)||[];U.useEffect(()=>{l&&b.current&&(b.current.scrollTop=b.current.scrollHeight)},[N,l]),U.useEffect(()=>{if(!l)return;const B=window.setInterval(()=>{k()},3e3);return()=>window.clearInterval(B)},[l,f,k]);const C=N.filter(B=>B.toLowerCase().includes(d.toLowerCase())),A=B=>{h(B),c("")},P=B=>{if(!(y!=null&&y.processes))return!1;const M=y.processes.find(X=>X.name===B);return(M==null?void 0:M.running)??!1};return _?s.jsxs("div",{className:"flex flex-col items-center justify-center h-full space-y-4",children:[s.jsx(Mn,{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:_.message}),s.jsx(Be,{onClick:()=>k(),children:"Retry"})]}):s.jsxs("div",{className:"flex flex-col h-[calc(100vh-8rem)]",children:[s.jsxs("div",{className:"flex items-center justify-between mb-4 bg-slate-900 p-2 rounded-lg border border-slate-800 shadow-sm",children:[s.jsxs("div",{className:"flex items-center space-x-2",children:[s.jsxs("div",{className:"relative group",children:[s.jsx("input",{type:"text",placeholder:"Filter logs...",className:"pl-9 pr-4 py-1.5 rounded-md border border-slate-700 bg-slate-950 text-slate-200 text-sm focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:border-transparent w-64 placeholder:text-slate-600",value:d,onChange:B=>c(B.target.value)}),s.jsx(yu,{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:Kx.map(({processName:B,label:M})=>s.jsx("button",{onClick:()=>A(B),className:`px-3 py-1.5 rounded text-sm font-medium transition-colors ${f===B?"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}),P(B)&&s.jsx("div",{className:"h-2 w-2 bg-green-500 rounded-full animate-pulse"})]})},B))})]}),s.jsxs("div",{className:"flex items-center space-x-2",children:[s.jsxs(Be,{size:"sm",variant:"ghost",onClick:()=>k(),children:[s.jsx(Tg,{className:"h-4 w-4 mr-2"}),"Refresh"]}),s.jsxs(Be,{size:"sm",variant:"ghost",onClick:()=>r(!l),children:[l?s.jsx(eo,{className:"h-4 w-4 mr-2"}):s.jsx(Cn,{className:"h-4 w-4 mr-2"}),l?"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:d?"No logs match your filter":"No logs yet — logs will appear after the first run"}):C.map((B,M)=>{const X=B.includes("[ERROR]"),ie=B.includes("[WARN]");return s.jsxs("div",{className:`leading-6 hover:bg-slate-800/50 px-2 rounded -mx-2 ${X?"text-red-400":ie?"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}),B]},M)}),l&&s.jsx("div",{className:"h-4"})," "]}),!l&&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(Tg,{className:"h-4 w-4 mr-2"}),"Scroll to bottom"]})]})]})},cS=()=>{const[l,r]=U.useState(null),[d,c]=U.useState(!1),[f,h]=U.useState("all"),[b,j]=U.useState("number"),[p,y]=U.useState("desc"),{addToast:S,selectedProjectId:T,globalModeLoading:_}=Pt(),{data:k,loading:N,error:C,refetch:A}=hn(av,[T],{enabled:!_}),P=k??[],B=O=>{switch(O){case"pass":return s.jsx(vu,{className:"h-4 w-4 text-green-500"});case"fail":return s.jsx(k1,{className:"h-4 w-4 text-red-500"});case"pending":return s.jsx(Qx,{className:"h-4 w-4 text-amber-500 animate-spin"});default:return s.jsx(Mn,{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"}},X=O=>O===null?"No review decision yet":O===100?"PR has been approved":O===0?"Changes have been requested":`Review score: ${O}`,ie=U.useMemo(()=>P.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}}),[P,f]),G=U.useMemo(()=>[...ie].sort((ae,ne)=>{let he=0;switch(b){case"number":he=ae.number-ne.number;break;case"title":he=ae.title.localeCompare(ne.title);break;case"branch":he=ae.branch.localeCompare(ne.branch);break;case"ciStatus":{const ve={fail:0,pending:1,unknown:2,pass:3};he=(ve[ae.ciStatus]??2)-(ve[ne.ciStatus]??2);break}case"reviewScore":{const ve=ae.reviewScore??-1,ce=ne.reviewScore??-1;he=ve-ce;break}}return p==="asc"?he:-he}),[ie,b,p]),Z=O=>{b===O?y(p==="asc"?"desc":"asc"):(j(O),y("desc"))},R=O=>b!==O?s.jsx(c1,{className:"h-3 w-3 text-slate-600"}):p==="asc"?s.jsx(d1,{className:"h-3 w-3 text-indigo-400"}):s.jsx(r1,{className:"h-3 w-3 text-indigo-400"});if(N)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(Mn,{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(Be,{onClick:()=>A(),children:"Retry"})]});const ee=async()=>{c(!0);try{const O=await D2();S({title:"Reviewer Started",message:O.pid?`Started with PID ${O.pid}`:"Reviewer started",type:"success"})}catch(O){S({title:"Reviewer Failed",message:O instanceof Error?O.message:"Failed to start reviewer",type:"error"})}finally{c(!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(Be,{size:"sm",onClick:ee,disabled:d,children:[s.jsx(yu,{className:"h-4 w-4 mr-2"}),d?"Starting...":"Run Reviewer Now"]})]}),s.jsx("div",{className:"bg-slate-900 rounded-lg shadow-sm border border-slate-800 overflow-hidden",children:s.jsxs("table",{className:"min-w-full divide-y divide-slate-800",children:[s.jsx("thead",{className:"bg-slate-950/50",children:s.jsxs("tr",{children:[s.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-slate-500 uppercase tracking-wider cursor-pointer hover:text-slate-300",onClick:()=>Z("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:()=>Z("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:()=>Z("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:()=>Z("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:[G.map(O=>s.jsxs("tr",{className:"hover:bg-slate-800/50 cursor-pointer transition-colors",onClick:()=>r(l===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:[B(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:X(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:ae=>ae.stopPropagation(),children:s.jsx(Fx,{className:"h-4 w-4"})})})]},O.number)),G.length===0&&s.jsx("tr",{children:s.jsx("td",{colSpan:5,className:"px-6 py-12 text-center text-slate-500",children:P.length===0?"No open PRs found.":`No PRs match the "${f}" filter.`})})]})]})}),l&&s.jsx(ft,{className:"p-6 bg-slate-900 border-indigo-900/50 animate-in fade-in slide-in-from-top-4 duration-300",children:(()=>{const O=P.find(ae=>ae.number===l);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:[B(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:X(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})()})]})},ka=ze.forwardRef(({className:l="",label:r,checked:d,onChange:c,...f},h)=>{const b=j=>{c&&c(j.target.checked)};return s.jsxs("label",{className:`inline-flex items-center cursor-pointer ${l}`,children:[s.jsxs("div",{className:"relative",children:[s.jsx("input",{type:"checkbox",className:"sr-only peer",ref:h,checked:d,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})]})});ka.displayName="Switch";const oS=()=>{const{addToast:l,selectedProjectId:r,globalModeLoading:d}=Pt(),[c,f]=U.useState(!1),[h,b]=U.useState(!1),{data:j,loading:p,error:y,refetch:S}=hn(V2,[r],{enabled:!d});U.useEffect(()=>{if(!(j!=null&&j.enabled))return;const B=setInterval(()=>{S()},1e4);return()=>clearInterval(B)},[j==null?void 0:j.enabled,S]);const T=async B=>{b(!0);try{await uv(B),l({title:B?"Scanner Enabled":"Scanner Disabled",message:B?"Roadmap scanner is now active.":"Roadmap scanner has been paused.",type:B?"success":"info"}),S()}catch(M){l({title:"Toggle Failed",message:M instanceof Error?M.message:"Failed to toggle scanner",type:"error"})}finally{b(!1)}},_=async()=>{f(!0);try{const B=await B2();B.created.length>0?l({title:"Scan Complete",message:`Created ${B.created.length} PRD(s): ${B.created.join(", ")}`,type:"success"}):l({title:"Scan Complete",message:"No new PRDs to create.",type:"info"}),B.errors.length>0&&l({title:"Scan Errors",message:B.errors.join("; "),type:"warning"}),S()}catch(B){l({title:"Scan Failed",message:B instanceof Error?B.message:"Failed to scan roadmap",type:"error"})}finally{f(!1)}};if(p)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(y)return s.jsxs("div",{className:"flex flex-col items-center justify-center h-full space-y-4",children:[s.jsx(Mn,{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:y.message}),s.jsx(Be,{onClick:()=>S(),children:"Retry"})]});if(!j)return null;if(j.status==="no-roadmap")return s.jsxs("div",{className:"space-y-6 max-w-6xl mx-auto",children:[s.jsx("div",{className:"flex items-center justify-between",children:s.jsx("h1",{className:"text-3xl font-bold text-slate-100",children:"Roadmap Scanner"})}),s.jsx(ft,{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(Ix,{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 k=j.totalItems>0?Math.round(j.processedItems/j.totalItems*100):0,N=fS(j.status),C=hS(j.items),A=j.lastScan?mS(j.lastScan):"Never",P=j.autoScanInterval?Math.round(j.autoScanInterval/60):5;return s.jsxs("div",{className:"space-y-6 max-w-6xl mx-auto",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx("h1",{className:"text-3xl font-bold text-slate-100",children:"Roadmap Scanner"}),s.jsxs("div",{className:"flex items-center space-x-4",children:[s.jsx(ka,{label:j.enabled?"Enabled":"Disabled",checked:j.enabled,onChange:T,disabled:h}),s.jsxs(Be,{onClick:_,loading:c,disabled:!j.enabled||j.status==="complete",children:[s.jsx(Cn,{className:"h-4 w-4 mr-2"}),"Scan Now"]})]})]}),s.jsx(ft,{className:`p-6 border-2 ${N.borderColor}`,children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center space-x-4",children:[s.jsx(N.icon,{className:`h-8 w-8 ${N.textColor}`}),s.jsxs("div",{children:[s.jsx("div",{className:"text-sm text-slate-400",children:"Scanner Status"}),s.jsx("div",{className:`text-2xl font-bold ${N.textColor}`,children:N.label})]})]}),s.jsxs("div",{className:"text-right text-sm text-slate-400 space-y-1",children:[s.jsxs("div",{children:["Last scan: ",s.jsx("span",{className:"text-slate-300",children:A})]}),j.enabled&&j.status!=="complete"&&s.jsxs("div",{children:["Auto-scan: ",s.jsxs("span",{className:"text-slate-300",children:["every ",P," min"]})]}),j.enabled&&j.status==="complete"&&s.jsx("div",{className:"text-emerald-400",children:"Auto-scan paused - all items sliced"})]})]})}),s.jsxs(ft,{className:"p-6",children:[s.jsxs("div",{className:"flex items-center justify-between mb-3",children:[s.jsx("h3",{className:"text-sm font-medium text-slate-300",children:"Progress"}),s.jsxs("span",{className:"text-sm text-slate-400",children:[j.processedItems," / ",j.totalItems," items (",k,"%)"]})]}),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 ${k===100?"bg-gradient-to-r from-emerald-500 to-emerald-400":"bg-gradient-to-r from-indigo-600 to-indigo-400"}`,style:{width:`${k}%`}})})]}),Object.entries(C).map(([B,M])=>s.jsxs(ft,{className:"p-6",children:[s.jsx("h3",{className:"text-lg font-semibold text-slate-200 mb-4",children:B}),s.jsx("div",{className:"space-y-2",children:M.map(X=>s.jsx(dS,{item:X},X.hash))})]},B))]})};function dS({item:l}){const r=l.checked,d=l.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":d?"bg-emerald-500/5 border-emerald-500/10":"bg-slate-950/50 border-slate-800"}`,children:[s.jsxs("div",{className:"flex items-center space-x-3 min-w-0 flex-1",children:[r?s.jsx(t2,{className:"h-4 w-4 text-slate-600 flex-shrink-0"}):d?s.jsx(vu,{className:"h-4 w-4 text-emerald-400 flex-shrink-0"}):s.jsx(Lf,{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:l.title}),l.description&&s.jsx("div",{className:"text-xs text-slate-500 truncate mt-0.5",children:l.description})]})]}),s.jsx("div",{className:"flex-shrink-0 ml-3",children:r?s.jsx(Qa,{variant:"neutral",children:"Skipped"}):d?s.jsx(Qa,{variant:"success",children:l.prdFile||"Processed"}):s.jsx(Qa,{variant:"warning",children:"Pending"})})]})}function fS(l){switch(l){case"complete":return{label:"Complete",icon:vu,textColor:"text-emerald-400",borderColor:"border-emerald-500/20 bg-emerald-500/5"};case"idle":return{label:"Idle",icon:Gx,textColor:"text-blue-400",borderColor:"border-blue-500/20 bg-blue-500/5"};case"scanning":return{label:"Scanning",icon:Cn,textColor:"text-indigo-400",borderColor:"border-indigo-500/20 bg-indigo-500/5"};case"disabled":return{label:"Disabled",icon:Mn,textColor:"text-slate-400",borderColor:"border-slate-500/20 bg-slate-500/5"};default:return{label:"No Roadmap",icon:Mn,textColor:"text-slate-500",borderColor:"border-slate-500/20"}}}function hS(l){const r={};for(const d of l){const c=d.section||"General";r[c]||(r[c]=[]),r[c].push(d)}return r}function mS(l){try{const r=new Date(l),c=new Date().getTime()-r.getTime(),f=Math.floor(c/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 xt=ze.forwardRef(({className:l="",label:r,error:d,helperText:c,options:f,value:h,onChange:b,children:j,...p},y)=>{const S=ze.useId(),T=p.id??S,_=d?`${T}-error`:void 0,k=!d&&c?`${T}-help`:void 0,N=[_,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:y,id:T,"aria-describedby":N,"aria-invalid":d?!0:p["aria-invalid"],className:`
385
- w-full appearance-none rounded-lg bg-slate-950 border border-slate-800
386
- px-3 py-2 pr-10 text-sm text-slate-200
387
- focus:outline-none focus:ring-2 focus:ring-indigo-500/50 focus:border-indigo-500
388
- disabled:opacity-50 disabled:cursor-not-allowed
389
- transition-all duration-200
390
- ${d?"border-red-500/50 focus:ring-red-500/50 focus:border-red-500":""}
391
- ${l}
392
- `,value:h,onChange:C,...p,children:f?f.map(A=>s.jsx("option",{value:A.value,children:A.label},A.value)):j}),s.jsx("div",{className:"pointer-events-none absolute inset-y-0 right-0 flex items-center px-2 text-slate-500",children:s.jsx(eh,{className:"h-4 w-4"})})]}),d?s.jsx("p",{id:_,className:"mt-1.5 text-xs text-red-400",children:d}):c?s.jsx("p",{id:k,className:"mt-1.5 text-xs text-slate-500",children:c}):null]})});xt.displayName="Select";const ke=ze.forwardRef(({className:l="",label:r,error:d,helperText:c,rightIcon:f,...h},b)=>{const j=ze.useId(),p=h.id??j,y=d?`${p}-error`:void 0,S=!d&&c?`${p}-help`:void 0,T=[y,S].filter(Boolean).join(" ")||void 0;return s.jsxs("div",{className:"w-full",children:[r&&s.jsx("label",{htmlFor:p,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:p,"aria-describedby":T,"aria-invalid":d?!0:h["aria-invalid"],className:`
393
- w-full rounded-lg bg-slate-950 border border-slate-800
394
- px-3 py-2 text-sm text-slate-200
395
- placeholder:text-slate-600
396
- focus:outline-none focus:ring-2 focus:ring-indigo-500/50 focus:border-indigo-500
397
- disabled:opacity-50 disabled:cursor-not-allowed
398
- transition-all duration-200
399
- ${d?"border-red-500/50 focus:ring-red-500/50 focus:border-red-500":""}
400
- ${f?"pr-10":""}
401
- ${l}
402
- `,...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})]}),d?s.jsx("p",{id:y,className:"mt-1.5 text-xs text-red-400",children:d}):c?s.jsx("p",{id:S,className:"mt-1.5 text-xs text-slate-500",children:c}):null]})});ke.displayName="Input";const ov=({tabs:l,activeTab:r,onChange:d,className:c=""})=>{var p,y;const[f,h]=ze.useState((p=l[0])==null?void 0:p.id),b=r||f,j=S=>{d?d(S):h(S)};return s.jsxs("div",{className:`flex flex-col ${c}`,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:l.map(S=>s.jsx("button",{onClick:()=>j(S.id),className:`
403
- whitespace-nowrap py-4 px-1 border-b-2 font-medium text-sm transition-all duration-200
404
- ${b===S.id?"border-indigo-500 text-indigo-400":"border-transparent text-slate-500 hover:text-slate-300 hover:border-slate-700"}
405
- `,children:S.label},S.id))})}),s.jsx("div",{className:"flex-1 animate-in fade-in slide-in-from-bottom-2 duration-300",children:(y=l.find(S=>S.id===b))==null?void 0:y.content})]})};var Us={},_a={},Ki={},Ls={},Cf={},Lg;function gS(){return Lg||(Lg=1,Object.defineProperty(Cf,"__esModule",{value:!0})),Cf}var eu={},tu={},Hg;function Zs(){var r,d,c,f,h,dv,j;if(Hg)return tu;Hg=1,Object.defineProperty(tu,"__esModule",{value:!0}),tu.CronField=void 0;let l=(j=class{constructor(y,S={rawValue:""}){tt(this,h);tt(this,r,!1);tt(this,d,!1);tt(this,c,!1);tt(this,f,[]);rg(this,"options",{rawValue:""});if(!Array.isArray(y))throw new Error(`${this.constructor.name} Validation error, values is not an array`);if(!(y.length>0))throw new Error(`${this.constructor.name} Validation error, values contains no values`);this.options={...S,rawValue:S.rawValue??""},Te(this,f,y.sort(j.sorter)),Te(this,c,this.options.wildcard!==void 0?this.options.wildcard:je(this,h,dv).call(this)),Te(this,r,this.options.rawValue.includes("L")||y.includes("L")),Te(this,d,this.options.rawValue.includes("?")||y.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,d)}get isWildcard(){return J(this,c)}get values(){return J(this,f)}static sorter(y,S){const T=typeof y=="number",_=typeof S=="number";return T&&_?y-S:!T&&!_?y.localeCompare(S):T?-1:1}static findNearestValueInList(y,S,T=!1){if(T){for(let _=y.length-1;_>=0;_--)if(y[_]<S)return y[_];return null}for(let _=0;_<y.length;_++)if(y[_]>S)return y[_];return null}findNearestValue(y,S=!1){return this.constructor.findNearestValueInList(this.values,y,S)}serialize(){return{wildcard:J(this,c),values:J(this,f)}}validate(){let y;const S=this.chars.length>0?` or chars ${this.chars.join("")}`:"",T=C=>A=>new RegExp(`^\\d{0,2}${A}$`).test(C),_=C=>(y=C,typeof C=="number"?C>=this.min&&C<=this.max:this.chars.some(T(C)));if(!J(this,f).every(_))throw new Error(`${this.constructor.name} Validation error, got value ${y} expected range ${this.min}-${this.max}${S}`);const N=J(this,f).find((C,A)=>J(this,f).indexOf(C)!==A);if(N)throw new Error(`${this.constructor.name} Validation error, duplicate values found: ${N}`)}},r=new WeakMap,d=new WeakMap,c=new WeakMap,f=new WeakMap,h=new WeakSet,dv=function(){return this.options.rawValue.length>0?["*","?"].includes(this.options.rawValue):Array.from({length:this.max-this.min+1},(y,S)=>S+this.min).every(y=>J(this,f).includes(y))},j);return tu.CronField=l,tu}var qg;function xS(){if(qg)return eu;qg=1,Object.defineProperty(eu,"__esModule",{value:!0}),eu.CronDayOfMonth=void 0;const l=Zs(),r=1,d=31,c=Object.freeze(["L"]);let f=class extends l.CronField{static get min(){return r}static get max(){return d}static get chars(){return c}static get validChars(){return/^[?,*\dLH/-]+$|^.*H\(\d+-\d+\)\/\d+.*$|^.*H\(\d+-\d+\).*$|^.*H\/\d+.*$/}constructor(b,j){super(b,j),this.validate()}get values(){return super.values}};return eu.CronDayOfMonth=f,eu}var au={},Vg;function vS(){if(Vg)return au;Vg=1,Object.defineProperty(au,"__esModule",{value:!0}),au.CronDayOfWeek=void 0;const l=Zs(),r=0,d=7,c=Object.freeze(["L"]);let f=class extends l.CronField{static get min(){return r}static get max(){return d}static get chars(){return c}static get validChars(){return/^[?,*\dLH#/-]+$|^.*H\(\d+-\d+\)\/\d+.*$|^.*H\(\d+-\d+\).*$|^.*H\/\d+.*$/}constructor(b,j){super(b,j),this.validate()}get values(){return super.values}get nthDay(){return this.options.nthDayOfWeek??0}};return au.CronDayOfWeek=f,au}var nu={},Bg;function yS(){if(Bg)return nu;Bg=1,Object.defineProperty(nu,"__esModule",{value:!0}),nu.CronHour=void 0;const l=Zs(),r=0,d=23,c=Object.freeze([]);let f=class extends l.CronField{static get min(){return r}static get max(){return d}static get chars(){return c}constructor(b,j){super(b,j),this.validate()}get values(){return super.values}};return nu.CronHour=f,nu}var lu={},Yg;function pS(){if(Yg)return lu;Yg=1,Object.defineProperty(lu,"__esModule",{value:!0}),lu.CronMinute=void 0;const l=Zs(),r=0,d=59,c=Object.freeze([]);let f=class extends l.CronField{static get min(){return r}static get max(){return d}static get chars(){return c}constructor(b,j){super(b,j),this.validate()}get values(){return super.values}};return lu.CronMinute=f,lu}var su={},Mf={},wa={},$g;function bS(){if($g)return wa;$g=1,Object.defineProperty(wa,"__esModule",{value:!0});class l extends Error{}class r extends l{constructor(i){super(`Invalid DateTime: ${i.toMessage()}`)}}class d extends l{constructor(i){super(`Invalid Interval: ${i.toMessage()}`)}}class c extends l{constructor(i){super(`Invalid Duration: ${i.toMessage()}`)}}class f extends l{}class h extends l{constructor(i){super(`Invalid unit ${i}`)}}class b extends l{}class j extends l{constructor(){super("Zone is an abstract class")}}const p="numeric",y="short",S="long",T={year:p,month:p,day:p},_={year:p,month:y,day:p},k={year:p,month:y,day:p,weekday:y},N={year:p,month:S,day:p},C={year:p,month:S,day:p,weekday:S},A={hour:p,minute:p},P={hour:p,minute:p,second:p},B={hour:p,minute:p,second:p,timeZoneName:y},M={hour:p,minute:p,second:p,timeZoneName:S},X={hour:p,minute:p,hourCycle:"h23"},ie={hour:p,minute:p,second:p,hourCycle:"h23"},G={hour:p,minute:p,second:p,hourCycle:"h23",timeZoneName:y},Z={hour:p,minute:p,second:p,hourCycle:"h23",timeZoneName:S},R={year:p,month:p,day:p,hour:p,minute:p},ee={year:p,month:p,day:p,hour:p,minute:p,second:p},O={year:p,month:y,day:p,hour:p,minute:p},ae={year:p,month:y,day:p,hour:p,minute:p,second:p},ne={year:p,month:y,day:p,weekday:y,hour:p,minute:p},he={year:p,month:S,day:p,hour:p,minute:p,timeZoneName:y},ve={year:p,month:S,day:p,hour:p,minute:p,second:p,timeZoneName:y},ce={year:p,month:S,day:p,weekday:S,hour:p,minute:p,timeZoneName:S},$={year:p,month:S,day:p,weekday:S,hour:p,minute:p,second:p,timeZoneName:S};class te{get type(){throw new j}get name(){throw new j}get ianaName(){return this.name}get isUniversal(){throw new j}offsetName(i,m){throw new j}formatOffset(i,m){throw new j}offset(i){throw new j}equals(i){throw new j}get isValid(){throw new j}}let fe=null;class me extends te{static get instance(){return fe===null&&(fe=new me),fe}get type(){return"system"}get name(){return new Intl.DateTimeFormat().resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(i,{format:m,locale:v}){return Un(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 _e=new Map;function L(g){let i=_e.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"}),_e.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),[,w,D,H,q,Y,de,be]=v;return[H,w,D,q,Y,de,be]}function ye(g,i){const m=g.formatToParts(i),v=[];for(let w=0;w<m.length;w++){const{type:D,value:H}=m[w],q=se[D];D==="era"?v[q]=H:Oe(q)||(v[q]=parseInt(H,10))}return v}const we=new Map;class xe extends te{static create(i){let m=we.get(i);return m===void 0&&we.set(i,m=new xe(i)),m}static resetCache(){we.clear(),_e.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 Un(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[w,D,H,q,Y,de,be]=v.formatToParts?ye(v,m):ge(v,m);q==="BC"&&(w=-Math.abs(w)+1);const Fe=Wt({year:w,month:D,day:H,hour:Y===24?0:Y,minute:de,second:be,millisecond:0});let De=+m;const bt=De%1e3;return De-=bt>=0?bt:1e3+bt,(Fe-De)/(60*1e3)}equals(i){return i.type==="iana"&&i.name===this.name}get isValid(){return this.valid}}let Ce={};function Pe(g,i={}){const m=JSON.stringify([g,i]);let v=Ce[m];return v||(v=new Intl.ListFormat(g,i),Ce[m]=v),v}const Qe=new Map;function Rt(g,i={}){const m=JSON.stringify([g,i]);let v=Qe.get(m);return v===void 0&&(v=new Intl.DateTimeFormat(g,i),Qe.set(m,v)),v}const oa=new Map;function mn(g,i={}){const m=JSON.stringify([g,i]);let v=oa.get(m);return v===void 0&&(v=new Intl.NumberFormat(g,i),oa.set(m,v)),v}const Xa=new Map;function da(g,i={}){const{base:m,...v}=i,w=JSON.stringify([g,v]);let D=Xa.get(w);return D===void 0&&(D=new Intl.RelativeTimeFormat(g,i),Xa.set(w,D)),D}let fa=null;function gn(){return fa||(fa=new Intl.DateTimeFormat().resolvedOptions().locale,fa)}const Gt=new Map;function ea(g){let i=Gt.get(g);return i===void 0&&(i=new Intl.DateTimeFormat(g).resolvedOptions(),Gt.set(g,i)),i}const Ea=new Map;function Ja(g){let i=Ea.get(g);if(!i){const m=new Intl.Locale(g);i="getWeekInfo"in m?m.getWeekInfo():m.weekInfo,"minimalDays"in i||(i={...rl,...i}),Ea.set(g,i)}return i}function Xl(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,w;try{v=Rt(g).resolvedOptions(),w=g}catch{const Y=g.substring(0,m);v=Rt(Y).resolvedOptions(),w=Y}const{numberingSystem:D,calendar:H}=v;return[w,D,H]}}function Dn(g,i,m){return(m||i)&&(g.includes("-u-")||(g+="-u"),m&&(g+=`-ca-${m}`),i&&(g+=`-nu-${i}`)),g}function Wr(g){const i=[];for(let m=1;m<=12;m++){const v=Ee.utc(2009,m,1);i.push(g(v))}return i}function Ft(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 Jl(g,i,m,v){const w=g.listingMode();return w==="error"?null:w==="en"?m(i):v(i)}function Ws(g){return g.numberingSystem&&g.numberingSystem!=="latn"?!1:g.numberingSystem==="latn"||!g.locale||g.locale.startsWith("en")||ea(g.locale).numberingSystem==="latn"}class Kl{constructor(i,m,v){this.padTo=v.padTo||0,this.floor=v.floor||!1;const{padTo:w,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=mn(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 An{constructor(i,m,v){this.opts=v,this.originalZone=void 0;let w;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?(w=q,this.dt=i):(w="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,w=i.zone.name):(w="UTC",this.dt=i.setZone("UTC").plus({minutes:i.offset}),this.originalZone=i.zone);const D={...this.opts};D.timeZone=D.timeZone||w,this.dtf=Rt(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 Qs{constructor(i,m,v){this.opts={style:"long",...v},!m&&Jr()&&(this.rtf=da(i,v))}format(i,m){return this.rtf?this.rtf.format(i,m):bn(m,i,this.opts.numeric,this.opts.style!=="long")}formatToParts(i,m){return this.rtf?this.rtf.formatToParts(i,m):[]}}const rl={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,w,D=!1){const H=i||dt.defaultLocale,q=H||(D?"en-US":gn()),Y=m||dt.defaultNumberingSystem,de=v||dt.defaultOutputCalendar,be=Kr(w)||dt.defaultWeekSettings;return new Ie(q,Y,de,be,H)}static resetCache(){fa=null,Qe.clear(),oa.clear(),Xa.clear(),Gt.clear(),Ea.clear()}static fromObject({locale:i,numberingSystem:m,outputCalendar:v,weekSettings:w}={}){return Ie.create(i,m,v,w)}constructor(i,m,v,w,D){const[H,q,Y]=Xl(i);this.locale=H,this.numberingSystem=m||q||null,this.outputCalendar=v||Y||null,this.weekSettings=w,this.intl=Dn(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=Ws(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,Kr(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 Jl(this,i,Mu,()=>{const v=this.intl==="ja"||this.intl.startsWith("ja-");m&=!v;const w=m?{month:i,day:"numeric"}:{month:i},D=m?"format":"standalone";if(!this.monthsCache[D][i]){const H=v?q=>this.dtFormatter(q,w).format():q=>this.extract(q,w,"month");this.monthsCache[D][i]=Wr(H)}return this.monthsCache[D][i]})}weekdays(i,m=!1){return Jl(this,i,lr,()=>{const v=m?{weekday:i,year:"numeric",month:"long",day:"numeric"}:{weekday:i},w=m?"format":"standalone";return this.weekdaysCache[w][i]||(this.weekdaysCache[w][i]=Ft(D=>this.extract(D,v,"weekday"))),this.weekdaysCache[w][i]})}meridiems(){return Jl(this,void 0,()=>Ln,()=>{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 Jl(this,i,li,()=>{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 w=this.dtFormatter(i,m),D=w.formatToParts(),H=D.find(q=>q.type.toLowerCase()===v);return H?H.value:null}numberFormatter(i={}){return new Kl(this.intl,i.forceSimple||this.fastNumbers,i)}dtFormatter(i,m={}){return new An(i,this.intl,m)}relFormatter(i={}){return new Qs(this.intl,this.isEnglish(),i)}listFormatter(i={}){return Pe(this.intl,i)}isEnglish(){return this.locale==="en"||this.locale.toLowerCase()==="en-us"||ea(this.intl).locale.startsWith("en-us")}getWeekSettings(){return this.weekSettings?this.weekSettings:yn()?Ja(this.locale):rl}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 il=null;class ht extends te{static get utcInstance(){return il===null&&(il=new ht(0)),il}static instance(i){return i===0?ht.utcInstance:new ht(i)}static parseSpecifier(i){if(i){const m=i.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(m)return new ht(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 Lt extends te{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 Dt(g,i){if(Oe(g)||g===null)return i;if(g instanceof te)return g;if(At(g)){const m=g.toLowerCase();return m==="default"?i:m==="local"||m==="system"?me.instance:m==="utc"||m==="gmt"?ht.utcInstance:ht.parseSpecifier(m)||xe.create(g)}else return ma(g)?ht.instance(g):typeof g=="object"&&"offset"in g&&typeof g.offset=="function"?g:new Lt(g)}const le={arab:"[٠-٩]",arabext:"[۰-۹]",bali:"[᭐-᭙]",beng:"[০-৯]",deva:"[०-९]",fullwide:"[0-9]",gujr:"[૦-૯]",hanidec:"[〇|一|二|三|四|五|六|七|八|九]",khmr:"[០-៩]",knda:"[೦-೯]",laoo:"[໐-໙]",limb:"[᥆-᥏]",mlym:"[൦-൯]",mong:"[᠐-᠙]",mymr:"[၀-၉]",orya:"[୦-୯]",tamldec:"[௦-௯]",telu:"[౦-౯]",thai:"[๐-๙]",tibt:"[༠-༩]",latn:"\\d"},pe={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]},He=le.hanidec.replace(/[\[|\]]/g,"").split("");function pt(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(le.hanidec)!==-1)i+=He.indexOf(g[m]);else for(const w in pe){const[D,H]=pe[w];v>=D&&v<=H&&(i+=v-D)}}return parseInt(i,10)}else return i}const ta=new Map;function xn(){ta.clear()}function aa({numberingSystem:g},i=""){const m=g||"latn";let v=ta.get(m);v===void 0&&(v=new Map,ta.set(m,v));let w=v.get(i);return w===void 0&&(w=new RegExp(`${le[m]}${i}`),v.set(i,w)),w}let vn=()=>Date.now(),es="system",ul=null,pu=null,Qr=null,Is=60,cl,bu=null;class dt{static get now(){return vn}static set now(i){vn=i}static set defaultZone(i){es=i}static get defaultZone(){return Dt(es,me.instance)}static get defaultLocale(){return ul}static set defaultLocale(i){ul=i}static get defaultNumberingSystem(){return pu}static set defaultNumberingSystem(i){pu=i}static get defaultOutputCalendar(){return Qr}static set defaultOutputCalendar(i){Qr=i}static get defaultWeekSettings(){return bu}static set defaultWeekSettings(i){bu=Kr(i)}static get twoDigitCutoffYear(){return Is}static set twoDigitCutoffYear(i){Is=i%100}static get throwOnInvalid(){return cl}static set throwOnInvalid(i){cl=i}static resetCaches(){Ie.resetCache(),xe.resetCache(),Ee.resetCache(),xn()}}class ha{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],Xs=[0,31,60,91,121,152,182,213,244,274,305,335];function na(g,i){return new ha("unit out of range",`you specified ${i} (of type ${typeof i}) as a ${g}, which is invalid`)}function Js(g,i,m){const v=new Date(Date.UTC(g,i-1,m));g<100&&g>=0&&v.setUTCFullYear(v.getUTCFullYear()-1900);const w=v.getUTCDay();return w===0?7:w}function Xr(g,i,m){return m+(dl(g)?Xs:Ir)[i-1]}function Ka(g,i){const m=dl(g)?Xs:Ir,v=m.findIndex(D=>D<i),w=i-m[v];return{month:v+1,day:w}}function jt(g,i){return(g-i+7)%7+1}function Ht(g,i=4,m=1){const{year:v,month:w,day:D}=g,H=Xr(v,w,D),q=jt(Js(v,w,D),m);let Y=Math.floor((H-q+14-i)/7),de;return Y<1?(de=v-1,Y=fl(de,i,m)):Y>fl(v,i,m)?(de=v+1,Y=1):de=v,{weekYear:de,weekNumber:Y,weekday:q,...is(g)}}function _n(g,i=4,m=1){const{weekYear:v,weekNumber:w,weekday:D}=g,H=jt(Js(v,1,i),m),q=tn(v);let Y=w*7+D-H-7+i,de;Y<1?(de=v-1,Y+=tn(de)):Y>q?(de=v+1,Y-=tn(v)):de=v;const{month:be,day:Ue}=Ka(de,Y);return{year:de,month:be,day:Ue,...is(g)}}function ts(g){const{year:i,month:m,day:v}=g,w=Xr(i,m,v);return{year:i,ordinal:w,...is(g)}}function Su(g){const{year:i,ordinal:m}=g,{month:v,day:w}=Ka(i,m);return{year:i,month:v,day:w,...is(g)}}function Nu(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 ju(g,i=4,m=1){const v=en(g.weekYear),w=Zt(g.weekNumber,1,fl(g.weekYear,i,m)),D=Zt(g.weekday,1,7);return v?w?D?!1:na("weekday",g.weekday):na("week",g.weekNumber):na("weekYear",g.weekYear)}function as(g){const i=en(g.year),m=Zt(g.ordinal,1,tn(g.year));return i?m?!1:na("ordinal",g.ordinal):na("year",g.year)}function Ks(g){const i=en(g.year),m=Zt(g.month,1,12),v=Zt(g.day,1,tr(g.year,g.month));return i?m?v?!1:na("day",g.day):na("month",g.month):na("year",g.year)}function kn(g){const{hour:i,minute:m,second:v,millisecond:w}=g,D=Zt(i,0,23)||i===24&&m===0&&v===0&&w===0,H=Zt(m,0,59),q=Zt(v,0,59),Y=Zt(w,0,999);return D?H?q?Y?!1:na("millisecond",w):na("second",v):na("minute",m):na("hour",i)}function Oe(g){return typeof g>"u"}function ma(g){return typeof g=="number"}function en(g){return typeof g=="number"&&g%1===0}function At(g){return typeof g=="string"}function wu(g){return Object.prototype.toString.call(g)==="[object Date]"}function Jr(){try{return typeof Intl<"u"&&!!Intl.RelativeTimeFormat}catch{return!1}}function yn(){try{return typeof Intl<"u"&&!!Intl.Locale&&("weekInfo"in Intl.Locale.prototype||"getWeekInfo"in Intl.Locale.prototype)}catch{return!1}}function ol(g){return Array.isArray(g)?g:[g]}function Eu(g,i,m){if(g.length!==0)return g.reduce((v,w)=>{const D=[i(w),w];return v&&m(v[0],D[0])===v[0]?v:D},null)[1]}function Tu(g,i){return i.reduce((m,v)=>(m[v]=g[v],m),{})}function zn(g,i){return Object.prototype.hasOwnProperty.call(g,i)}function Kr(g){if(g==null)return null;if(typeof g!="object")throw new b("Week settings must be an object");if(!Zt(g.firstDay,1,7)||!Zt(g.minimalDays,1,7)||!Array.isArray(g.weekend)||g.weekend.some(i=>!Zt(i,1,7)))throw new b("Invalid week settings");return{firstDay:g.firstDay,minimalDays:g.minimalDays,weekend:Array.from(g.weekend)}}function Zt(g,i,m){return en(g)&&g>=i&&g<=m}function er(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 wt(g){if(!(Oe(g)||g===null||g===""))return parseInt(g,10)}function pn(g){if(!(Oe(g)||g===null||g===""))return parseFloat(g)}function ei(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 dl(g){return g%4===0&&(g%100!==0||g%400===0)}function tn(g){return dl(g)?366:365}function tr(g,i){const m=er(i-1,12)+1,v=g+(i-m)/12;return m===2?dl(v)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][m-1]}function Wt(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 ar(g,i,m){return-jt(Js(g,1,i),m)+i-1}function fl(g,i=4,m=1){const v=ar(g,i,m),w=ar(g+1,i,m);return(tn(g)-v+w)/7}function ls(g){return g>99?g:g>dt.twoDigitCutoffYear?1900+g:2e3+g}function Un(g,i,m,v=null){const w=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(w).find(Y=>Y.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,w=m<0||Object.is(m,-0)?-v:v;return m*60+w}function ti(g){const i=Number(g);if(typeof g=="boolean"||g===""||!Number.isFinite(i))throw new b(`Invalid unit value ${g}`);return i}function an(g,i){const m={};for(const v in g)if(zn(g,v)){const w=g[v];if(w==null)continue;m[i(v)]=ti(w)}return m}function rs(g,i){const m=Math.trunc(Math.abs(g/60)),v=Math.trunc(Math.abs(g%60)),w=g>=0?"+":"-";switch(i){case"short":return`${w}${at(m,2)}:${at(v,2)}`;case"narrow":return`${w}${m}${v>0?`:${v}`:""}`;case"techie":return`${w}${at(m,2)}${at(v,2)}`;default:throw new RangeError(`Value format ${i} is out of range for property format`)}}function is(g){return Tu(g,["hour","minute","second","millisecond"])}const Cu=["January","February","March","April","May","June","July","August","September","October","November","December"],nr=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],ho=["J","F","M","A","M","J","J","A","S","O","N","D"];function Mu(g){switch(g){case"narrow":return[...ho];case"short":return[...nr];case"long":return[...Cu];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 us=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],La=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],ai=["M","T","W","T","F","S","S"];function lr(g){switch(g){case"narrow":return[...ai];case"short":return[...La];case"long":return[...us];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}const Ln=["AM","PM"],hl=["Before Christ","Anno Domini"],Ou=["BC","AD"],ni=["B","A"];function li(g){switch(g){case"narrow":return[...ni];case"short":return[...Ou];case"long":return[...hl];default:return null}}function cs(g){return Ln[g.hour<12?0:1]}function nn(g,i){return lr(i)[g.weekday-1]}function si(g,i){return Mu(i)[g.month-1]}function os(g,i){return li(i)[g.year<0?0:1]}function bn(g,i,m="always",v=!1){const w={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 ${w[g][0]}`;case-1:return Ue?"yesterday":`last ${w[g][0]}`;case 0:return Ue?"today":`this ${w[g][0]}`}}const H=Object.is(i,-0)||i<0,q=Math.abs(i),Y=q===1,de=w[g],be=v?Y?de[1]:de[2]||de[1]:Y?w[g][0]:g;return H?`${q} ${be} ago`:`in ${q} ${be}`}function sr(g,i){let m="";for(const v of g)v.literal?m+=v.val:m+=i(v.val);return m}const rr={D:T,DD:_,DDD:N,DDDD:C,t:A,tt:P,ttt:B,tttt:M,T:X,TT:ie,TTT:G,TTTT:Z,f:R,ff:O,fff:he,ffff:ce,F:ee,FF:ae,FFF:ve,FFFF:$};class qt{static create(i,m={}){return new qt(i,m)}static parseFormat(i){let m=null,v="",w=!1;const D=[];for(let H=0;H<i.length;H++){const q=i.charAt(H);q==="'"?((v.length>0||w)&&D.push({literal:w||/^\s+$/.test(v),val:v===""?"'":v}),m=null,v="",w=!w):w||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:w||/^\s+$/.test(v),val:v}),D}static macroTokenToFormatOpts(i){return rr[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 w={...this.opts};return m>0&&(w.padTo=m),v&&(w.signDisplay=v),this.loc.numberFormatter(w).format(i)}formatDateTimeFromString(i,m){const v=this.loc.listingMode()==="en",w=this.loc.outputCalendar&&this.loc.outputCalendar!=="gregory",D=(De,bt)=>this.loc.extract(i,De,bt),H=De=>i.isOffsetFixed&&i.offset===0&&De.allowZ?"Z":i.isValid?i.zone.formatOffset(i.ts,De.format):"",q=()=>v?cs(i):D({hour:"numeric",hourCycle:"h12"},"dayperiod"),Y=(De,bt)=>v?si(i,De):D(bt?{month:De}:{month:De,day:"numeric"},"month"),de=(De,bt)=>v?nn(i,De):D(bt?{weekday:De}:{weekday:De,month:"long",day:"numeric"},"weekday"),be=De=>{const bt=qt.macroTokenToFormatOpts(De);return bt?this.formatWithSystemDefault(i,bt):De},Ue=De=>v?os(i,De):D({era:De},"era"),Fe=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 w?D({day:"numeric"},"day"):this.num(i.day);case"dd":return w?D({day:"2-digit"},"day"):this.num(i.day,2);case"c":return this.num(i.weekday);case"ccc":return de("short",!0);case"cccc":return de("long",!0);case"ccccc":return de("narrow",!0);case"E":return this.num(i.weekday);case"EEE":return de("short",!1);case"EEEE":return de("long",!1);case"EEEEE":return de("narrow",!1);case"L":return w?D({month:"numeric",day:"numeric"},"month"):this.num(i.month);case"LL":return w?D({month:"2-digit",day:"numeric"},"month"):this.num(i.month,2);case"LLL":return Y("short",!0);case"LLLL":return Y("long",!0);case"LLLLL":return Y("narrow",!0);case"M":return w?D({month:"numeric"},"month"):this.num(i.month);case"MM":return w?D({month:"2-digit"},"month"):this.num(i.month,2);case"MMM":return Y("short",!1);case"MMMM":return Y("long",!1);case"MMMMM":return Y("narrow",!1);case"y":return w?D({year:"numeric"},"year"):this.num(i.year);case"yy":return w?D({year:"2-digit"},"year"):this.num(i.year.toString().slice(-2),2);case"yyyy":return w?D({year:"numeric"},"year"):this.num(i.year,4);case"yyyyyy":return w?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 be(De)}};return sr(qt.parseFormat(m),Fe)}formatDurationFromString(i,m){const v=this.opts.signMode==="negativeLargestOnly"?-1:1,w=be=>{switch(be[0]){case"S":return"milliseconds";case"s":return"seconds";case"m":return"minutes";case"h":return"hours";case"d":return"days";case"w":return"weeks";case"M":return"months";case"y":return"years";default:return null}},D=(be,Ue)=>Fe=>{const De=w(Fe);if(De){const bt=Ue.isNegativeDuration&&De!==Ue.largestUnit?v:1;let Bt;return this.opts.signMode==="negativeLargestOnly"&&De!==Ue.largestUnit?Bt="never":this.opts.signMode==="all"?Bt="always":Bt="auto",this.num(be.get(De)*bt,Fe.length,Bt)}else return Fe},H=qt.parseFormat(m),q=H.reduce((be,{literal:Ue,val:Fe})=>Ue?be:be.concat(Fe),[]),Y=i.shiftTo(...q.map(w).filter(be=>be)),de={isNegativeDuration:Y<0,largestUnit:Object.keys(Y.values)[0]};return sr(H,D(Y,de))}}const ds=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;function ln(...g){const i=g.reduce((m,v)=>m+v.source,"");return RegExp(`^${i}$`)}function Hn(...g){return i=>g.reduce(([m,v,w],D)=>{const[H,q,Y]=D(i,w);return[{...m,...H},q||v,Y]},[{},null,1]).slice(0,2)}function Et(g,...i){if(g==null)return[null,null];for(const[m,v]of i){const w=m.exec(g);if(w)return v(w)}return[null,null]}function Sn(...g){return(i,m)=>{const v={};let w;for(w=0;w<g.length;w++)v[g[w]]=wt(i[m+w]);return[v,null,m+w]}}const fs=/(?:([Zz])|([+-]\d\d)(?::?(\d\d))?)/,hs=`(?:${fs.source}?(?:\\[(${ds.source})\\])?)?`,ri=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,ir=RegExp(`${ri.source}${hs}`),ms=RegExp(`(?:[Tt]${ir.source})?`),gs=/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,ur=/(\d{4})-?W(\d\d)(?:-?(\d))?/,Ru=/(\d{4})-?(\d{3})/,mo=Sn("weekYear","weekNumber","weekDay"),go=Sn("year","ordinal"),xo=/(\d{4})-(\d\d)-(\d\d)/,cr=RegExp(`${ri.source} ?(?:${fs.source}|(${ds.source}))?`),vo=RegExp(`(?: ${cr.source})?`);function ml(g,i,m){const v=g[i];return Oe(v)?m:wt(v)}function yo(g,i){return[{year:ml(g,i),month:ml(g,i+1,1),day:ml(g,i+2,1)},null,i+3]}function gl(g,i){return[{hours:ml(g,i,0),minutes:ml(g,i+1,0),seconds:ml(g,i+2,0),milliseconds:ei(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]),w=m?null:ht.instance(v);return[{},w,i+3]}function xl(g,i){const m=g[i]?xe.create(g[i]):null;return[{},m,i+1]}const po=RegExp(`^T?${ri.source}$`),bo=/^-?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 So(g){const[i,m,v,w,D,H,q,Y,de]=g,be=i[0]==="-",Ue=Y&&Y[0]==="-",Fe=(De,bt=!1)=>De!==void 0&&(bt||De&&be)?-De:De;return[{years:Fe(pn(m)),months:Fe(pn(v)),weeks:Fe(pn(w)),days:Fe(pn(D)),hours:Fe(pn(H)),minutes:Fe(pn(q)),seconds:Fe(pn(Y),Y==="-0"),milliseconds:Fe(ei(de),Ue)}]}const No={GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function vs(g,i,m,v,w,D,H){const q={year:i.length===2?ls(wt(i)):wt(i),month:nr.indexOf(m)+1,day:wt(v),hour:wt(w),minute:wt(D)};return H&&(q.second=wt(H)),g&&(q.weekday=g.length>3?us.indexOf(g)+1:La.indexOf(g)+1),q}const jo=/^(?:(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 wo(g){const[,i,m,v,w,D,H,q,Y,de,be,Ue]=g,Fe=vs(i,w,v,m,D,H,q);let De;return Y?De=No[Y]:de?De=0:De=ss(be,Ue),[Fe,new ht(De)]}function Eo(g){return g.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}const Du=/^(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$/,To=/^(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$/,Co=/^(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 Au(g){const[,i,m,v,w,D,H,q]=g;return[vs(i,w,v,m,D,H,q),ht.utcInstance]}function Mo(g){const[,i,m,v,w,D,H,q]=g;return[vs(i,q,m,v,w,D,H),ht.utcInstance]}const Oo=ln(gs,ms),Ro=ln(ur,ms),Do=ln(Ru,ms),Ao=ln(ir),_u=Hn(yo,gl,xs,xl),ii=Hn(mo,gl,xs,xl),ys=Hn(go,gl,xs,xl),_o=Hn(gl,xs,xl);function ku(g){return Et(g,[Oo,_u],[Ro,ii],[Do,ys],[Ao,_o])}function zu(g){return Et(Eo(g),[jo,wo])}function Uu(g){return Et(g,[Du,Au],[To,Au],[Co,Mo])}function Lu(g){return Et(g,[bo,So])}const Hu=Hn(gl);function vl(g){return Et(g,[po,Hu])}const ko=ln(xo,vo),zo=ln(cr),Uo=Hn(gl,xs,xl);function qu(g){return Et(g,[ko,_u],[zo,Uo])}const ui="Invalid Duration",yl={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}},ps={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},...yl},ga=146097/400,sn=146097/4800,Vu={years:{quarters:4,months:12,weeks:ga/7,days:ga,hours:ga*24,minutes:ga*24*60,seconds:ga*24*60*60,milliseconds:ga*24*60*60*1e3},quarters:{months:3,weeks:ga/28,days:ga/4,hours:ga*24/4,minutes:ga*24*60/4,seconds:ga*24*60*60/4,milliseconds:ga*24*60*60*1e3/4},months:{weeks:sn/7,days:sn,hours:sn*24,minutes:sn*24*60,seconds:sn*24*60*60,milliseconds:sn*24*60*60*1e3},...yl},Nn=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],ci=Nn.slice(0).reverse();function Ta(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 Ge(v)}function oi(g,i){var m;let v=(m=i.milliseconds)!=null?m:0;for(const w of ci.slice(1))i[w]&&(v+=i[w]*g[w].milliseconds);return v}function di(g,i){const m=oi(g,i)<0?-1:1;Nn.reduceRight((v,w)=>{if(Oe(i[w]))return v;if(v){const D=i[v]*m,H=g[w][v],q=Math.floor(D/H);i[w]+=q*m,i[v]-=q*H*m}return w},null),Nn.reduce((v,w)=>{if(Oe(i[w]))return v;if(v){const D=i[v]%1;i[v]-=D,i[w]+=D*g[v][w]}return w},null)}function fi(g){const i={};for(const[m,v]of Object.entries(g))v!==0&&(i[m]=v);return i}class Ge{constructor(i){const m=i.conversionAccuracy==="longterm"||!1;let v=m?Vu:ps;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 Ge.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 Ge({values:an(i,Ge.normalizeUnit),loc:Ie.fromObject(m),conversionAccuracy:m.conversionAccuracy,matrix:m.matrix})}static fromDurationLike(i){if(ma(i))return Ge.fromMillis(i);if(Ge.isDuration(i))return i;if(typeof i=="object")return Ge.fromObject(i);throw new b(`Unknown duration argument ${i} of type ${typeof i}`)}static fromISO(i,m){const[v]=Lu(i);return v?Ge.fromObject(v,m):Ge.invalid("unparsable",`the input "${i}" can't be parsed as ISO 8601`)}static fromISOTime(i,m){const[v]=vl(i);return v?Ge.fromObject(v,m):Ge.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 ha?i:new ha(i,m);if(dt.throwOnInvalid)throw new c(v);return new Ge({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?qt.create(this.loc,v).formatDurationFromString(this,i):ui}toHuman(i={}){if(!this.isValid)return ui;const m=i.showZeros!==!1,v=Nn.map(w=>{const D=this.values[w];return Oe(D)||D===0&&!m?null:this.loc.numberFormatter({style:"unit",unitDisplay:"long",...i,unit:w.slice(0,-1)}).format(D)}).filter(w=>w);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?oi(this.matrix,this.values):NaN}valueOf(){return this.toMillis()}plus(i){if(!this.isValid)return this;const m=Ge.fromDurationLike(i),v={};for(const w of Nn)(zn(m.values,w)||zn(this.values,w))&&(v[w]=m.get(w)+this.get(w));return Ta(this,{values:v},!0)}minus(i){if(!this.isValid)return this;const m=Ge.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]=ti(i(this.values[v],v));return Ta(this,{values:m},!0)}get(i){return this[Ge.normalizeUnit(i)]}set(i){if(!this.isValid)return this;const m={...this.values,...an(i,Ge.normalizeUnit)};return Ta(this,{values:m})}reconfigure({locale:i,numberingSystem:m,conversionAccuracy:v,matrix:w}={}){const H={loc:this.loc.clone({locale:i,numberingSystem:m}),matrix:w,conversionAccuracy:v};return Ta(this,H)}as(i){return this.isValid?this.shiftTo(i).get(i):NaN}normalize(){if(!this.isValid)return this;const i=this.toObject();return di(this.matrix,i),Ta(this,{values:i},!0)}rescale(){if(!this.isValid)return this;const i=fi(this.normalize().shiftToAll().toObject());return Ta(this,{values:i},!0)}shiftTo(...i){if(!this.isValid)return this;if(i.length===0)return this;i=i.map(H=>Ge.normalizeUnit(H));const m={},v={},w=this.toObject();let D;for(const H of Nn)if(i.indexOf(H)>=0){D=H;let q=0;for(const de in v)q+=this.matrix[de][H]*v[de],v[de]=0;ma(w[H])&&(q+=w[H]);const Y=Math.trunc(q);m[H]=Y,v[H]=(q*1e3-Y*1e3)/1e3}else ma(w[H])&&(v[H]=w[H]);for(const H in v)v[H]!==0&&(m[D]+=H===D?v[H]:v[H]/this.matrix[D][H]);return di(this.matrix,m),Ta(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 Ta(this,{values:i},!0)}removeZeros(){if(!this.isValid)return this;const i=fi(this.values);return Ta(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,w){return v===void 0||v===0?w===void 0||w===0:v===w}for(const v of Nn)if(!m(this.values[v],i.values[v]))return!1;return!0}}const pl="Invalid Interval";function Lo(g,i){return!g||!g.isValid?mt.invalid("missing or invalid start"):!i||!i.isValid?mt.invalid("missing or invalid end"):i<g?mt.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 mt{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 ha?i:new ha(i,m);if(dt.throwOnInvalid)throw new d(v);return new mt({invalid:v})}static fromDateTimes(i,m){const v=ya(i),w=ya(m),D=Lo(v,w);return D??new mt({start:v,end:w})}static after(i,m){const v=Ge.fromDurationLike(m),w=ya(i);return mt.fromDateTimes(w,w.plus(v))}static before(i,m){const v=Ge.fromDurationLike(m),w=ya(i);return mt.fromDateTimes(w.minus(v),w)}static fromISO(i,m){const[v,w]=(i||"").split("/",2);if(v&&w){let D,H;try{D=Ee.fromISO(v,m),H=D.isValid}catch{H=!1}let q,Y;try{q=Ee.fromISO(w,m),Y=q.isValid}catch{Y=!1}if(H&&Y)return mt.fromDateTimes(D,q);if(H){const de=Ge.fromISO(w,m);if(de.isValid)return mt.after(D,de)}else if(Y){const de=Ge.fromISO(v,m);if(de.isValid)return mt.before(q,de)}}return mt.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 w;return m!=null&&m.useLocaleWeeks?w=this.end.reconfigure({locale:v.locale}):w=this.end,w=w.startOf(i,m),Math.floor(w.diff(v,i).get(i))+(w.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?mt.fromDateTimes(i||this.s,m||this.e):this}splitAt(...i){if(!this.isValid)return[];const m=i.map(ya).filter(H=>this.contains(H)).sort((H,q)=>H.toMillis()-q.toMillis()),v=[];let{s:w}=this,D=0;for(;w<this.e;){const H=m[D]||this.e,q=+H>+this.e?this.e:H;v.push(mt.fromDateTimes(w,q)),w=q,D+=1}return v}splitBy(i){const m=Ge.fromDurationLike(i);if(!this.isValid||!m.isValid||m.as("milliseconds")===0)return[];let{s:v}=this,w=1,D;const H=[];for(;v<this.e;){const q=this.start.plus(m.mapUnits(Y=>Y*w));D=+q>+this.e?this.e:q,H.push(mt.fromDateTimes(v,D)),v=D,w+=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:mt.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 mt.fromDateTimes(m,v)}static merge(i){const[m,v]=i.sort((w,D)=>w.s-D.s).reduce(([w,D],H)=>D?D.overlaps(H)||D.abutsStart(H)?[w,D.union(H)]:[w.concat([D]),H]:[w,H],[[],null]);return v&&m.push(v),m}static xor(i){let m=null,v=0;const w=[],D=i.map(Y=>[{time:Y.s,type:"s"},{time:Y.e,type:"e"}]),H=Array.prototype.concat(...D),q=H.sort((Y,de)=>Y.time-de.time);for(const Y of q)v+=Y.type==="s"?1:-1,v===1?m=Y.time:(m&&+m!=+Y.time&&w.push(mt.fromDateTimes(m,Y.time)),m=null);return mt.merge(w)}difference(...i){return mt.xor([this].concat(i)).map(m=>this.intersection(m)).filter(m=>m&&!m.isEmpty())}toString(){return this.isValid?`[${this.s.toISO()} – ${this.e.toISO()})`:pl}[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?qt.create(this.s.loc.clone(m),i).formatInterval(this):pl}toISO(i){return this.isValid?`${this.s.toISO(i)}/${this.e.toISO(i)}`:pl}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:pl}toISOTime(i){return this.isValid?`${this.s.toISOTime(i)}/${this.e.toISOTime(i)}`:pl}toFormat(i,{separator:m=" – "}={}){return this.isValid?`${this.s.toFormat(i)}${m}${this.e.toFormat(i)}`:pl}toDuration(i,m){return this.isValid?this.e.diff(this.s,i,m):Ge.invalid(this.invalidReason)}mapEndpoints(i){return mt.fromDateTimes(i(this.s),i(this.e))}}class bs{static hasDST(i=dt.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 Dt(i,dt.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:w=null,outputCalendar:D="gregory"}={}){return(w||Ie.create(m,v,D)).months(i)}static monthsFormat(i="long",{locale:m=null,numberingSystem:v=null,locObj:w=null,outputCalendar:D="gregory"}={}){return(w||Ie.create(m,v,D)).months(i,!0)}static weekdays(i="long",{locale:m=null,numberingSystem:v=null,locObj:w=null}={}){return(w||Ie.create(m,v,null)).weekdays(i)}static weekdaysFormat(i="long",{locale:m=null,numberingSystem:v=null,locObj:w=null}={}){return(w||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:Jr(),localeWeek:yn()}}}function la(g,i){const m=w=>w.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),v=m(i)-m(g);return Math.floor(Ge.fromMillis(v).as("days"))}function Ss(g,i,m){const v=[["years",(Y,de)=>de.year-Y.year],["quarters",(Y,de)=>de.quarter-Y.quarter+(de.year-Y.year)*4],["months",(Y,de)=>de.month-Y.month+(de.year-Y.year)*12],["weeks",(Y,de)=>{const be=la(Y,de);return(be-be%7)/7}],["days",la]],w={},D=g;let H,q;for(const[Y,de]of v)m.indexOf(Y)>=0&&(H=Y,w[Y]=de(g,i),q=D.plus(w),q>i?(w[Y]--,g=D.plus(w),g>i&&(q=g,w[Y]--,g=D.plus(w))):g=q);return[g,w,q,H]}function Bu(g,i,m,v){let[w,D,H,q]=Ss(g,i,m);const Y=i-w,de=m.filter(Ue=>["hours","minutes","seconds","milliseconds"].indexOf(Ue)>=0);de.length===0&&(H<i&&(H=w.plus({[q]:1})),H!==w&&(D[q]=(D[q]||0)+Y/(H-w)));const be=Ge.fromObject(D,v);return de.length>0?Ge.fromMillis(Y,v).shiftTo(...de).plus(be):be}const Yu="missing Intl.DateTimeFormat.formatToParts support";function Xe(g,i=m=>m){return{regex:g,deser:([m])=>i(pt(m))}}const or="[  ]",$u=new RegExp(or,"g");function bl(g){return g.replace(/\./g,"\\.?").replace($u,or)}function dr(g){return g.replace(/\./g,"").replace($u," ").toLowerCase()}function Qt(g,i){return g===null?null:{regex:RegExp(g.map(bl).join("|")),deser:([m])=>g.findIndex(v=>dr(m)===dr(v))+i}}function fr(g,i){return{regex:g,deser:([,m,v])=>ss(m,v),groups:i}}function Ns(g){return{regex:g,deser:([i])=>i}}function qn(g){return g.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function Sl(g,i){const m=aa(i),v=aa(i,"{2}"),w=aa(i,"{3}"),D=aa(i,"{4}"),H=aa(i,"{6}"),q=aa(i,"{1,2}"),Y=aa(i,"{1,3}"),de=aa(i,"{1,6}"),be=aa(i,"{1,9}"),Ue=aa(i,"{2,4}"),Fe=aa(i,"{4,6}"),De=Yt=>({regex:RegExp(qn(Yt.val)),deser:([jn])=>jn,literal:!0}),Bt=(Yt=>{if(g.literal)return De(Yt);switch(Yt.val){case"G":return Qt(i.eras("short"),0);case"GG":return Qt(i.eras("long"),0);case"y":return Xe(de);case"yy":return Xe(Ue,ls);case"yyyy":return Xe(D);case"yyyyy":return Xe(Fe);case"yyyyyy":return Xe(H);case"M":return Xe(q);case"MM":return Xe(v);case"MMM":return Qt(i.months("short",!0),1);case"MMMM":return Qt(i.months("long",!0),1);case"L":return Xe(q);case"LL":return Xe(v);case"LLL":return Qt(i.months("short",!1),1);case"LLLL":return Qt(i.months("long",!1),1);case"d":return Xe(q);case"dd":return Xe(v);case"o":return Xe(Y);case"ooo":return Xe(w);case"HH":return Xe(v);case"H":return Xe(q);case"hh":return Xe(v);case"h":return Xe(q);case"mm":return Xe(v);case"m":return Xe(q);case"q":return Xe(q);case"qq":return Xe(v);case"s":return Xe(q);case"ss":return Xe(v);case"S":return Xe(Y);case"SSS":return Xe(w);case"u":return Ns(be);case"uu":return Ns(q);case"uuu":return Xe(m);case"a":return Qt(i.meridiems(),0);case"kkkk":return Xe(D);case"kk":return Xe(Ue,ls);case"W":return Xe(q);case"WW":return Xe(v);case"E":case"c":return Xe(m);case"EEE":return Qt(i.weekdays("short",!1),1);case"EEEE":return Qt(i.weekdays("long",!1),1);case"ccc":return Qt(i.weekdays("short",!0),1);case"cccc":return Qt(i.weekdays("long",!0),1);case"Z":case"ZZ":return fr(new RegExp(`([+-]${q.source})(?::(${v.source}))?`),2);case"ZZZ":return fr(new RegExp(`([+-]${q.source})(${v.source})?`),2);case"z":return Ns(/[a-z_+-/]{1,256}?/i);case" ":return Ns(/[^\S\n\r]/);default:return De(Yt)}})(g)||{invalidReason:Yu};return Bt.token=g,Bt}const hi={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 Pu(g,i,m){const{type:v,value:w}=g;if(v==="literal"){const Y=/^\s+$/.test(w);return{literal:!Y,val:Y?" ":w}}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=hi[H];if(typeof q=="object"&&(q=q[D]),q)return{literal:!1,val:q}}function Vn(g){return[`^${g.map(m=>m.regex).reduce((m,v)=>`${m}(${v.source})`,"")}$`,g]}function Gu(g,i,m){const v=g.match(i);if(v){const w={};let D=1;for(const H in m)if(zn(m,H)){const q=m[H],Y=q.groups?q.groups+1:1;!q.literal&&q.token&&(w[q.token.val[0]]=q.deser(v.slice(D,D+Y))),D+=Y}return[v,w]}else return[v,{}]}function Fu(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 ht(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=ei(g.u)),[Object.keys(g).reduce((D,H)=>{const q=i(H);return q&&(D[q]=g[H]),D},{}),m,v]}let hr=null;function qo(){return hr||(hr=Ee.fromMillis(1555555555555)),hr}function Vo(g,i){if(g.literal)return g;const m=qt.macroTokenToFormatOpts(g.val),v=xa(m,i);return v==null||v.includes(void 0)?g:v}function Zu(g,i){return Array.prototype.concat(...g.map(m=>Vo(m,i)))}class mi{constructor(i,m){if(this.locale=i,this.format=m,this.tokens=Zu(qt.parseFormat(m),i),this.units=this.tokens.map(v=>Sl(v,i)),this.disqualifyingUnit=this.units.find(v=>v.invalidReason),!this.disqualifyingUnit){const[v,w]=Vn(this.units);this.regex=RegExp(v,"i"),this.handlers=w}}explainFromTokens(i){if(this.isValid){const[m,v]=Gu(i,this.regex,this.handlers),[w,D,H]=v?Fu(v):[null,null,void 0];if(zn(v,"a")&&zn(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:w,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 gi(g,i,m){return new mi(g,m).explainFromTokens(i)}function xi(g,i,m){const{result:v,zone:w,specificOffset:D,invalidReason:H}=gi(g,i,m);return[v,w,D,H]}function xa(g,i){if(!g)return null;const v=qt.create(i,g).dtFormatter(qo()),w=v.formatToParts(),D=v.resolvedOptions();return w.map(H=>Pu(H,g,D))}const Nl="Invalid DateTime",ua=864e13;function Ha(g){return new ha("unsupported zone",`the zone "${g.name}" is not supported`)}function js(g){return g.weekData===null&&(g.weekData=Ht(g.c)),g.weekData}function jl(g){return g.localWeekData===null&&(g.localWeekData=Ht(g.c,g.loc.getMinDaysInFirstWeek(),g.loc.getStartOfWeek())),g.localWeekData}function qa(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 mr(g,i,m){let v=g-i*60*1e3;const w=m.offset(v);if(i===w)return[v,i];v-=(w-i)*60*1e3;const D=m.offset(v);return w===D?[v,w]:[g-Math.min(w,D)*60*1e3,Math.max(w,D)]}function Va(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 ws(g,i,m){return mr(Wt(g),i,m)}function Es(g,i){const m=g.o,v=g.c.year+Math.trunc(i.years),w=g.c.month+Math.trunc(i.months)+Math.trunc(i.quarters)*3,D={...g.c,year:v,month:w,day:Math.min(g.c.day,tr(v,w))+Math.trunc(i.days)+Math.trunc(i.weeks)*7},H=Ge.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=Wt(D);let[Y,de]=mr(q,m,g.zone);return H!==0&&(Y+=H,de=g.zone.offset(Y)),{ts:Y,o:de}}function Ca(g,i,m,v,w,D){const{setZone:H,zone:q}=m;if(g&&Object.keys(g).length!==0||i){const Y=i||q,de=Ee.fromObject(g,{...m,zone:Y,specificOffset:D});return H?de:de.setZone(q)}else return Ee.invalid(new ha("unparsable",`the input "${w}" can't be parsed as ${v}`))}function gr(g,i,m=!0){return g.isValid?qt.create(Ie.create("en-US"),{allowZ:m,forceSimple:!0}).formatDateTimeFromString(g,i):null}function It(g,i,m){const v=g.c.year>9999||g.c.year<0;let w="";if(v&&g.c.year>=0&&(w+="+"),w+=at(g.c.year,v?6:4),m==="year")return w;if(i){if(w+="-",w+=at(g.c.month),m==="month")return w;w+="-"}else if(w+=at(g.c.month),m==="month")return w;return w+=at(g.c.day),w}function xr(g,i,m,v,w,D,H){let q=!m||g.c.millisecond!==0||g.c.second!==0,Y="";switch(H){case"day":case"month":case"year":break;default:if(Y+=at(g.c.hour),H==="hour")break;if(i){if(Y+=":",Y+=at(g.c.minute),H==="minute")break;q&&(Y+=":",Y+=at(g.c.second))}else{if(Y+=at(g.c.minute),H==="minute")break;q&&(Y+=at(g.c.second))}if(H==="second")break;q&&(!v||g.c.millisecond!==0)&&(Y+=".",Y+=at(g.c.millisecond,3))}return w&&(g.isOffsetFixed&&g.offset===0&&!D?Y+="Z":g.o<0?(Y+="-",Y+=at(Math.trunc(-g.o/60)),Y+=":",Y+=at(Math.trunc(-g.o%60))):(Y+="+",Y+=at(Math.trunc(g.o/60)),Y+=":",Y+=at(Math.trunc(g.o%60)))),D&&(Y+="["+g.zone.ianaName+"]"),Y}const Ba={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},Wu={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},vr={ordinal:1,hour:0,minute:0,second:0,millisecond:0},Ya=["year","month","day","hour","minute","second","millisecond"],vi=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],Qu=["year","ordinal","hour","minute","second","millisecond"];function wl(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 yi(g){switch(g.toLowerCase()){case"localweekday":case"localweekdays":return"localWeekday";case"localweeknumber":case"localweeknumbers":return"localWeekNumber";case"localweekyear":case"localweekyears":return"localWeekYear";default:return wl(g)}}function va(g){if(rn===void 0&&(rn=dt.now()),g.type!=="iana")return g.offset(rn);const i=g.name;let m=sa.get(i);return m===void 0&&(m=g.offset(rn),sa.set(i,m)),m}function Bn(g,i){const m=Dt(i.zone,dt.defaultZone);if(!m.isValid)return Ee.invalid(Ha(m));const v=Ie.fromObject(i);let w,D;if(Oe(g.year))w=dt.now();else{for(const Y of Ya)Oe(g[Y])&&(g[Y]=Ba[Y]);const H=Ks(g)||kn(g);if(H)return Ee.invalid(H);const q=va(m);[w,D]=ws(g,q,m)}return new Ee({ts:w,zone:m,loc:v,o:D})}function Yn(g,i,m){const v=Oe(m.round)?!0:m.round,w=Oe(m.rounding)?"trunc":m.rounding,D=(q,Y)=>(q=ns(q,v||m.calendary?0:2,m.calendary?"round":w),i.loc.clone(m).relFormatter(m).format(q,Y)),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 Y=H(q);if(Math.abs(Y)>=1)return D(Y,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 rn;const sa=new Map;class Ee{constructor(i){const m=i.zone||dt.defaultZone;let v=i.invalid||(Number.isNaN(i.ts)?new ha("invalid input"):null)||(m.isValid?null:Ha(m));this.ts=Oe(i.ts)?dt.now():i.ts;let w=null,D=null;if(!v)if(i.old&&i.old.ts===this.ts&&i.old.zone.equals(m))[w,D]=[i.old.c,i.old.o];else{const q=ma(i.o)&&!i.old?i.o:m.offset(this.ts);w=Va(this.ts,q),v=Number.isNaN(w.year)?new ha("invalid input"):null,w=v?null:w,D=v?null:q}this._zone=m,this.loc=i.loc||Ie.create(),this.invalid=v,this.weekData=null,this.localWeekData=null,this.c=w,this.o=D,this.isLuxonDateTime=!0}static now(){return new Ee({})}static local(){const[i,m]=Ts(arguments),[v,w,D,H,q,Y,de]=m;return Bn({year:v,month:w,day:D,hour:H,minute:q,second:Y,millisecond:de},i)}static utc(){const[i,m]=Ts(arguments),[v,w,D,H,q,Y,de]=m;return i.zone=ht.utcInstance,Bn({year:v,month:w,day:D,hour:H,minute:q,second:Y,millisecond:de},i)}static fromJSDate(i,m={}){const v=wu(i)?i.valueOf():NaN;if(Number.isNaN(v))return Ee.invalid("invalid input");const w=Dt(m.zone,dt.defaultZone);return w.isValid?new Ee({ts:v,zone:w,loc:Ie.fromObject(m)}):Ee.invalid(Ha(w))}static fromMillis(i,m={}){if(ma(i))return i<-ua||i>ua?Ee.invalid("Timestamp out of range"):new Ee({ts:i,zone:Dt(m.zone,dt.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(ma(i))return new Ee({ts:i*1e3,zone:Dt(m.zone,dt.defaultZone),loc:Ie.fromObject(m)});throw new b("fromSeconds requires a numerical input")}static fromObject(i,m={}){i=i||{};const v=Dt(m.zone,dt.defaultZone);if(!v.isValid)return Ee.invalid(Ha(v));const w=Ie.fromObject(m),D=an(i,yi),{minDaysInFirstWeek:H,startOfWeek:q}=Nu(D,w),Y=dt.now(),de=Oe(m.specificOffset)?v.offset(Y):m.specificOffset,be=!Oe(D.ordinal),Ue=!Oe(D.year),Fe=!Oe(D.month)||!Oe(D.day),De=Ue||Fe,bt=D.weekYear||D.weekNumber;if((De||be)&&bt)throw new f("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(Fe&&be)throw new f("Can't mix ordinal dates with month/day");const Bt=bt||D.weekday&&!De;let Yt,jn,un=Va(Y,de);Bt?(Yt=vi,jn=Wu,un=Ht(un,H,q)):be?(Yt=Qu,jn=vr,un=ts(un)):(Yt=Ya,jn=Ba);let yr=!1;for(const Ga of Yt){const pr=D[Ga];Oe(pr)?yr?D[Ga]=jn[Ga]:D[Ga]=un[Ga]:yr=!0}const $n=Bt?ju(D,H,q):be?as(D):Ks(D),Pa=$n||kn(D);if(Pa)return Ee.invalid(Pa);const wn=Bt?_n(D,H,q):be?Su(D):D,[cn,pi]=ws(wn,de,v),Pn=new Ee({ts:cn,zone:v,o:pi,loc:w});return D.weekday&&De&&i.weekday!==Pn.weekday?Ee.invalid("mismatched weekday",`you can't specify both a weekday of ${D.weekday} and a date of ${Pn.toISO()}`):Pn.isValid?Pn:Ee.invalid(Pn.invalid)}static fromISO(i,m={}){const[v,w]=ku(i);return Ca(v,w,m,"ISO 8601",i)}static fromRFC2822(i,m={}){const[v,w]=zu(i);return Ca(v,w,m,"RFC 2822",i)}static fromHTTP(i,m={}){const[v,w]=Uu(i);return Ca(v,w,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:w=null,numberingSystem:D=null}=v,H=Ie.fromOpts({locale:w,numberingSystem:D,defaultToEN:!0}),[q,Y,de,be]=xi(H,i,m);return be?Ee.invalid(be):Ca(q,Y,v,`format ${m}`,i,de)}static fromString(i,m,v={}){return Ee.fromFormat(i,m,v)}static fromSQL(i,m={}){const[v,w]=qu(i);return Ca(v,w,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 ha?i:new ha(i,m);if(dt.throwOnInvalid)throw new r(v);return new Ee({invalid:v})}static isDateTime(i){return i&&i.isLuxonDateTime||!1}static parseFormatForOpts(i,m={}){const v=xa(i,Ie.fromObject(m));return v?v.map(w=>w?w.val:null).join(""):null}static expandFormat(i,m={}){return Zu(qt.parseFormat(i),Ie.fromObject(m)).map(w=>w.val).join("")}static resetCache(){rn=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?js(this).weekYear:NaN}get weekNumber(){return this.isValid?js(this).weekNumber:NaN}get weekday(){return this.isValid?js(this).weekday:NaN}get isWeekend(){return this.isValid&&this.loc.getWeekendDays().includes(this.weekday)}get localWeekday(){return this.isValid?jl(this).weekday:NaN}get localWeekNumber(){return this.isValid?jl(this).weekNumber:NaN}get localWeekYear(){return this.isValid?jl(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=Wt(this.c),w=this.zone.offset(v-i),D=this.zone.offset(v+i),H=this.zone.offset(v-w*m),q=this.zone.offset(v-D*m);if(H===q)return[this];const Y=v-H*m,de=v-q*m,be=Va(Y,H),Ue=Va(de,q);return be.hour===Ue.hour&&be.minute===Ue.minute&&be.second===Ue.second&&be.millisecond===Ue.millisecond?[qa(this,{ts:Y}),qa(this,{ts:de})]:[this]}get isInLeapYear(){return dl(this.year)}get daysInMonth(){return tr(this.year,this.month)}get daysInYear(){return this.isValid?tn(this.year):NaN}get weeksInWeekYear(){return this.isValid?fl(this.weekYear):NaN}get weeksInLocalWeekYear(){return this.isValid?fl(this.localWeekYear,this.loc.getMinDaysInFirstWeek(),this.loc.getStartOfWeek()):NaN}resolvedLocaleOptions(i={}){const{locale:m,numberingSystem:v,calendar:w}=qt.create(this.loc.clone(i),i).resolvedOptions(this);return{locale:m,numberingSystem:v,outputCalendar:w}}toUTC(i=0,m={}){return this.setZone(ht.instance(i),m)}toLocal(){return this.setZone(dt.defaultZone)}setZone(i,{keepLocalTime:m=!1,keepCalendarTime:v=!1}={}){if(i=Dt(i,dt.defaultZone),i.equals(this.zone))return this;if(i.isValid){let w=this.ts;if(m||v){const D=i.offset(this.ts),H=this.toObject();[w]=ws(H,D,i)}return qa(this,{ts:w,zone:i})}else return Ee.invalid(Ha(i))}reconfigure({locale:i,numberingSystem:m,outputCalendar:v}={}){const w=this.loc.clone({locale:i,numberingSystem:m,outputCalendar:v});return qa(this,{loc:w})}setLocale(i){return this.reconfigure({locale:i})}set(i){if(!this.isValid)return this;const m=an(i,yi),{minDaysInFirstWeek:v,startOfWeek:w}=Nu(m,this.loc),D=!Oe(m.weekYear)||!Oe(m.weekNumber)||!Oe(m.weekday),H=!Oe(m.ordinal),q=!Oe(m.year),Y=!Oe(m.month)||!Oe(m.day),de=q||Y,be=m.weekYear||m.weekNumber;if((de||H)&&be)throw new f("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(Y&&H)throw new f("Can't mix ordinal dates with month/day");let Ue;D?Ue=_n({...Ht(this.c,v,w),...m},v,w):Oe(m.ordinal)?(Ue={...this.toObject(),...m},Oe(m.day)&&(Ue.day=Math.min(tr(Ue.year,Ue.month),Ue.day))):Ue=Su({...ts(this.c),...m});const[Fe,De]=ws(Ue,this.o,this.zone);return qa(this,{ts:Fe,o:De})}plus(i){if(!this.isValid)return this;const m=Ge.fromDurationLike(i);return qa(this,Es(this,m))}minus(i){if(!this.isValid)return this;const m=Ge.fromDurationLike(i).negate();return qa(this,Es(this,m))}startOf(i,{useLocaleWeeks:m=!1}={}){if(!this.isValid)return this;const v={},w=Ge.normalizeUnit(i);switch(w){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(w==="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(w==="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?qt.create(this.loc.redefaultToEN(m)).formatDateTimeFromString(this,i):Nl}toLocaleString(i=T,m={}){return this.isValid?qt.create(this.loc.clone(m),i).formatDateTime(this):Nl}toLocaleParts(i={}){return this.isValid?qt.create(this.loc.clone(i),i).formatDateTimeParts(this):[]}toISO({format:i="extended",suppressSeconds:m=!1,suppressMilliseconds:v=!1,includeOffset:w=!0,extendedZone:D=!1,precision:H="milliseconds"}={}){if(!this.isValid)return null;H=wl(H);const q=i==="extended";let Y=It(this,q,H);return Ya.indexOf(H)>=3&&(Y+="T"),Y+=xr(this,q,m,v,w,D,H),Y}toISODate({format:i="extended",precision:m="day"}={}){return this.isValid?It(this,i==="extended",wl(m)):null}toISOWeekDate(){return gr(this,"kkkk-'W'WW-c")}toISOTime({suppressMilliseconds:i=!1,suppressSeconds:m=!1,includeOffset:v=!0,includePrefix:w=!1,extendedZone:D=!1,format:H="extended",precision:q="milliseconds"}={}){return this.isValid?(q=wl(q),(w&&Ya.indexOf(q)>=3?"T":"")+xr(this,H==="extended",m,i,v,D,q)):null}toRFC2822(){return gr(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)}toHTTP(){return gr(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")}toSQLDate(){return this.isValid?It(this,!0):null}toSQLTime({includeOffset:i=!0,includeZone:m=!1,includeOffsetSpace:v=!0}={}){let w="HH:mm:ss.SSS";return(m||i)&&(v&&(w+=" "),m?w+="z":i&&(w+="ZZ")),gr(this,w,!0)}toSQL(i={}){return this.isValid?`${this.toSQLDate()} ${this.toSQLTime(i)}`:null}toString(){return this.isValid?this.toISO():Nl}[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 Ge.invalid("created by diffing an invalid DateTime");const w={locale:this.locale,numberingSystem:this.numberingSystem,...v},D=ol(m).map(Ge.normalizeUnit),H=i.valueOf()>this.valueOf(),q=H?this:i,Y=H?i:this,de=Bu(q,Y,D,w);return H?de.negate():de}diffNow(i="milliseconds",m={}){return this.diff(Ee.now(),i,m)}until(i){return this.isValid?mt.fromDateTimes(this,i):this}hasSame(i,m,v){if(!this.isValid)return!1;const w=i.valueOf(),D=this.setZone(i.zone,{keepLocalTime:!0});return D.startOf(m,v)<=w&&w<=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 w=["years","months","days","hours","minutes","seconds"],D=i.unit;return Array.isArray(i.unit)&&(w=i.unit,D=void 0),Yn(m,this.plus(v),{...i,numeric:"always",units:w,unit:D})}toRelativeCalendar(i={}){return this.isValid?Yn(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 Eu(i,m=>m.valueOf(),Math.min)}static max(...i){if(!i.every(Ee.isDateTime))throw new b("max requires all arguments be DateTimes");return Eu(i,m=>m.valueOf(),Math.max)}static fromFormatExplain(i,m,v={}){const{locale:w=null,numberingSystem:D=null}=v,H=Ie.fromOpts({locale:w,numberingSystem:D,defaultToEN:!0});return gi(H,i,m)}static fromStringExplain(i,m,v={}){return Ee.fromFormatExplain(i,m,v)}static buildFormatParser(i,m={}){const{locale:v=null,numberingSystem:w=null}=m,D=Ie.fromOpts({locale:v,numberingSystem:w,defaultToEN:!0});return new mi(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:w=null,numberingSystem:D=null}=v,H=Ie.fromOpts({locale:w,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:Y,specificOffset:de,invalidReason:be}=m.explainFromTokens(i);return be?Ee.invalid(be):Ca(q,Y,v,`format ${m.format}`,i,de)}static get DATE_SHORT(){return T}static get DATE_MED(){return _}static get DATE_MED_WITH_WEEKDAY(){return k}static get DATE_FULL(){return N}static get DATE_HUGE(){return C}static get TIME_SIMPLE(){return A}static get TIME_WITH_SECONDS(){return P}static get TIME_WITH_SHORT_OFFSET(){return B}static get TIME_WITH_LONG_OFFSET(){return M}static get TIME_24_SIMPLE(){return X}static get TIME_24_WITH_SECONDS(){return ie}static get TIME_24_WITH_SHORT_OFFSET(){return G}static get TIME_24_WITH_LONG_OFFSET(){return Z}static get DATETIME_SHORT(){return R}static get DATETIME_SHORT_WITH_SECONDS(){return ee}static get DATETIME_MED(){return O}static get DATETIME_MED_WITH_SECONDS(){return ae}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 ce}static get DATETIME_HUGE_WITH_SECONDS(){return $}}function ya(g){if(Ee.isDateTime(g))return g;if(g&&g.valueOf&&ma(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 $a="3.7.2";return wa.DateTime=Ee,wa.Duration=Ge,wa.FixedOffsetZone=ht,wa.IANAZone=xe,wa.Info=bs,wa.Interval=mt,wa.InvalidZone=Lt,wa.Settings=dt,wa.SystemZone=me,wa.VERSION=$a,wa.Zone=te,wa}var Pg;function ih(){return Pg||(Pg=1,(function(l){var h,b,j,p,y,Hf,T,Zl;Object.defineProperty(l,"__esModule",{value:!0}),l.CronDate=l.DAYS_IN_MONTH=l.DateMathOp=l.TimeUnit=void 0;const r=bS();var d;(function(N){N.Second="Second",N.Minute="Minute",N.Hour="Hour",N.Day="Day",N.Month="Month",N.Year="Year"})(d||(l.TimeUnit=d={}));var c;(function(N){N.Add="Add",N.Subtract="Subtract"})(c||(l.DateMathOp=c={})),l.DAYS_IN_MONTH=Object.freeze([31,29,31,30,31,30,31,31,30,31,30,31]);const k=class k{constructor(C,A){tt(this,T);tt(this,h);tt(this,b,null);tt(this,j,null);tt(this,p,{add:{[d.Year]:this.addYear.bind(this),[d.Month]:this.addMonth.bind(this),[d.Day]:this.addDay.bind(this),[d.Hour]:this.addHour.bind(this),[d.Minute]:this.addMinute.bind(this),[d.Second]:this.addSecond.bind(this)},subtract:{[d.Year]:this.subtractYear.bind(this),[d.Month]:this.subtractMonth.bind(this),[d.Day]:this.subtractDay.bind(this),[d.Hour]:this.subtractHour.bind(this),[d.Minute]:this.subtractMinute.bind(this),[d.Second]:this.subtractSecond.bind(this)}});const P={zone:A};if(C?C instanceof k?(Te(this,h,J(C,h)),Te(this,b,J(C,b)),Te(this,j,J(C,j))):C instanceof Date?Te(this,h,r.DateTime.fromJSDate(C,P)):typeof C=="number"?Te(this,h,r.DateTime.fromMillis(C,P)):(Te(this,h,r.DateTime.fromISO(C,P)),J(this,h).isValid||Te(this,h,r.DateTime.fromRFC2822(C,P)),J(this,h).isValid||Te(this,h,r.DateTime.fromSQL(C,P)),J(this,h).isValid||Te(this,h,r.DateTime.fromFormat(C,"EEE, d MMM yyyy HH:mm:ss",P))):Te(this,h,r.DateTime.local()),!J(this,h).isValid)throw new Error(`CronDate: unhandled timestamp: ${C}`);A&&A!==J(this,h).zoneName&&Te(this,h,J(this,h).setZone(A))}get dstStart(){return J(this,b)}set dstStart(C){Te(this,b,C)}get dstEnd(){return J(this,j)}set dstEnd(C){Te(this,j,C)}addYear(){Te(this,h,J(this,h).plus({years:1}))}addMonth(){Te(this,h,J(this,h).plus({months:1}).startOf("month"))}addDay(){Te(this,h,J(this,h).plus({days:1}).startOf("day"))}addHour(){Te(this,h,J(this,h).plus({hours:1}).startOf("hour"))}addMinute(){Te(this,h,J(this,h).plus({minutes:1}).startOf("minute"))}addSecond(){Te(this,h,J(this,h).plus({seconds:1}))}subtractYear(){Te(this,h,J(this,h).minus({years:1}))}subtractMonth(){Te(this,h,J(this,h).minus({months:1}).endOf("month").startOf("second"))}subtractDay(){Te(this,h,J(this,h).minus({days:1}).endOf("day").startOf("second"))}subtractHour(){Te(this,h,J(this,h).minus({hours:1}).endOf("hour").startOf("second"))}subtractMinute(){Te(this,h,J(this,h).minus({minutes:1}).endOf("minute").startOf("second"))}subtractSecond(){Te(this,h,J(this,h).minus({seconds:1}))}addUnit(C){J(this,p).add[C]()}subtractUnit(C){J(this,p).subtract[C]()}invokeDateOperation(C,A){if(C===c.Add){this.addUnit(A);return}if(C===c.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(){Te(this,h,J(this,h).startOf("day"))}setEndOfDay(){Te(this,h,J(this,h).endOf("day"))}getTime(){return J(this,h).valueOf()}getUTCDate(){return je(this,T,Zl).call(this).day}getUTCFullYear(){return je(this,T,Zl).call(this).year}getUTCDay(){const C=je(this,T,Zl).call(this).weekday;return C===7?0:C}getUTCMonth(){return je(this,T,Zl).call(this).month-1}getUTCHours(){return je(this,T,Zl).call(this).hour}getUTCMinutes(){return je(this,T,Zl).call(this).minute}getUTCSeconds(){return je(this,T,Zl).call(this).second}toISOString(){return J(this,h).toUTC().toISO()}toJSON(){return J(this,h).toJSON()}setDate(C){Te(this,h,J(this,h).set({day:C}))}setFullYear(C){Te(this,h,J(this,h).set({year:C}))}setDay(C){Te(this,h,J(this,h).set({weekday:C}))}setMonth(C){Te(this,h,J(this,h).set({month:C+1}))}setHours(C){Te(this,h,J(this,h).set({hour:C}))}setMinutes(C){Te(this,h,J(this,h).set({minute:C}))}setSeconds(C){Te(this,h,J(this,h).set({second:C}))}setMilliseconds(C){Te(this,h,J(this,h).set({millisecond:C}))}toString(){return this.toDate().toString()}toDate(){return J(this,h).toJSDate()}isLastDayOfMonth(){var P;const{day:C,month:A}=J(this,h);if(A===2){const B=je(P=k,y,Hf).call(P,J(this,h).year);return C===l.DAYS_IN_MONTH[A-1]-(B?0:1)}return C===l.DAYS_IN_MONTH[A-1]}isLastWeekdayOfMonth(){var B;const{day:C,month:A}=J(this,h);let P;return A===2?P=l.DAYS_IN_MONTH[A-1]-(je(B=k,y,Hf).call(B,J(this,h).year)?0:1):P=l.DAYS_IN_MONTH[A-1],C>P-7}applyDateOperation(C,A,P){if(A===d.Month||A===d.Day){this.invokeDateOperation(C,A);return}const B=this.getHours();this.invokeDateOperation(C,A);const M=this.getHours(),X=M-B;X===2?P!==24&&(this.dstStart=M):X===0&&this.getMinutes()===0&&this.getSeconds()===0&&P!==24&&(this.dstEnd=M)}};h=new WeakMap,b=new WeakMap,j=new WeakMap,p=new WeakMap,y=new WeakSet,Hf=function(C){return C%4===0&&C%100!==0||C%400===0},T=new WeakSet,Zl=function(){return J(this,h).toUTC()},tt(k,y);let f=k;l.CronDate=f,l.default=f})(Mf)),Mf}var Gg;function SS(){if(Gg)return su;Gg=1,Object.defineProperty(su,"__esModule",{value:!0}),su.CronMonth=void 0;const l=ih(),r=Zs(),d=1,c=12,f=Object.freeze([]);let h=class extends r.CronField{static get min(){return d}static get max(){return c}static get chars(){return f}static get daysInMonth(){return l.DAYS_IN_MONTH}constructor(j,p){super(j,p),this.validate()}get values(){return super.values}};return su.CronMonth=h,su}var ru={},Fg;function NS(){if(Fg)return ru;Fg=1,Object.defineProperty(ru,"__esModule",{value:!0}),ru.CronSecond=void 0;const l=Zs(),r=0,d=59,c=Object.freeze([]);let f=class extends l.CronField{static get min(){return r}static get max(){return d}static get chars(){return c}constructor(b,j){super(b,j),this.validate()}get values(){return super.values}};return ru.CronSecond=f,ru}var Zg;function uh(){return Zg||(Zg=1,(function(l){var r=Ls&&Ls.__createBinding||(Object.create?(function(c,f,h,b){b===void 0&&(b=h);var j=Object.getOwnPropertyDescriptor(f,h);(!j||("get"in j?!f.__esModule:j.writable||j.configurable))&&(j={enumerable:!0,get:function(){return f[h]}}),Object.defineProperty(c,b,j)}):(function(c,f,h,b){b===void 0&&(b=h),c[b]=f[h]})),d=Ls&&Ls.__exportStar||function(c,f){for(var h in c)h!=="default"&&!Object.prototype.hasOwnProperty.call(f,h)&&r(f,c,h)};Object.defineProperty(l,"__esModule",{value:!0}),d(gS(),l),d(xS(),l),d(vS(),l),d(Zs(),l),d(yS(),l),d(pS(),l),d(SS(),l),d(NS(),l)})(Ls)),Ls}var Wg;function mv(){var d,c,f,h,b,j,p,y,fv,hv;if(Wg)return Ki;Wg=1,Object.defineProperty(Ki,"__esModule",{value:!0}),Ki.CronFieldCollection=void 0;const l=uh();let r=(y=class{constructor({second:k,minute:N,hour:C,dayOfMonth:A,month:P,dayOfWeek:B}){tt(this,d);tt(this,c);tt(this,f);tt(this,h);tt(this,b);tt(this,j);if(!k)throw new Error("Validation error, Field second is missing");if(!N)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(!P)throw new Error("Validation error, Field month is missing");if(!B)throw new Error("Validation error, Field dayOfWeek is missing");if(P.values.length===1&&!A.hasLastChar&&!(parseInt(A.values[0],10)<=l.CronMonth.daysInMonth[P.values[0]-1]))throw new Error("Invalid explicit day of month definition");Te(this,d,k),Te(this,c,N),Te(this,f,C),Te(this,b,P),Te(this,j,B),Te(this,h,A)}static from(k,N){return new y({second:this.resolveField(l.CronSecond,k.second,N.second),minute:this.resolveField(l.CronMinute,k.minute,N.minute),hour:this.resolveField(l.CronHour,k.hour,N.hour),dayOfMonth:this.resolveField(l.CronDayOfMonth,k.dayOfMonth,N.dayOfMonth),month:this.resolveField(l.CronMonth,k.month,N.month),dayOfWeek:this.resolveField(l.CronDayOfWeek,k.dayOfWeek,N.dayOfWeek)})}static resolveField(k,N,C){return C?C instanceof l.CronField?C:new k(C):N}get second(){return J(this,d)}get minute(){return J(this,c)}get hour(){return J(this,f)}get dayOfMonth(){return J(this,h)}get month(){return J(this,b)}get dayOfWeek(){return J(this,j)}static compactField(k){if(k.length===0)return[];const N=[];let C;return k.forEach((A,P,B)=>{if(C===void 0){C={start:A,count:1};return}const M=B[P-1]||C.start,X=B[P+1];if(A==="L"||A==="W"){N.push(C),N.push({start:A,count:1}),C=void 0;return}if(C.step===void 0&&X!==void 0){const ie=A-M,G=X-A;if(ie<=G){C={...C,count:2,end:A,step:ie};return}C.step=1}A-(C.end??0)===C.step?(C.count++,C.end=A):(C.count===1?N.push({start:C.start,count:1}):C.count===2?(N.push({start:C.start,count:1}),N.push({start:C.end??M,count:1})):N.push(C),C={start:A,count:1})}),C&&N.push(C),N}stringifyField(k){var P;let N=k.max,C=k.values;if(k instanceof l.CronDayOfWeek){N=6;const B=J(this,j).values;C=B[B.length-1]===7?B.slice(0,-1):B}k instanceof l.CronDayOfMonth&&(N=J(this,b).values.length===1?l.CronMonth.daysInMonth[J(this,b).values[0]-1]:k.max);const A=y.compactField(C);if(A.length===1){const B=je(P=y,p,fv).call(P,k,A[0],N);if(B)return B}return A.map(B=>{var X;const M=B.count===1?B.start.toString():je(X=y,p,hv).call(X,B,N);return k instanceof l.CronDayOfWeek&&k.nthDay>0?`${M}#${k.nthDay}`:M}).join(",")}stringify(k=!1){const N=[];return k&&N.push(this.stringifyField(J(this,d))),N.push(this.stringifyField(J(this,c)),this.stringifyField(J(this,f)),this.stringifyField(J(this,h)),this.stringifyField(J(this,b)),this.stringifyField(J(this,j))),N.join(" ")}serialize(){return{second:J(this,d).serialize(),minute:J(this,c).serialize(),hour:J(this,f).serialize(),dayOfMonth:J(this,h).serialize(),month:J(this,b).serialize(),dayOfWeek:J(this,j).serialize()}}},d=new WeakMap,c=new WeakMap,f=new WeakMap,h=new WeakMap,b=new WeakMap,j=new WeakMap,p=new WeakSet,fv=function(k,N,C){const A=N.step;return A?A===1&&N.start===k.min&&N.end&&N.end>=C?k.hasQuestionMarkChar?"?":"*":A!==1&&N.start===k.min&&N.end&&N.end>=C-A+1?`*/${A}`:null:null},hv=function(k,N){const C=k.step;if(C===1)return`${k.start}-${k.end}`;const A=k.start===0?k.count-1:k.count;if(!C)throw new Error("Unexpected range step");if(!k.end)throw new Error("Unexpected range end");if(C*A>k.end){const P=(M,X)=>{if(typeof k.start!="number")throw new Error("Unexpected range start");return X%C===0?k.start+X:null};if(typeof k.start!="number")throw new Error("Unexpected range start");const B={length:k.end-k.start+1};return Array.from(B,P).filter(M=>M!==null).join(",")}return k.end===N-C+1?`${k.start}/${C}`:`${k.start}-${k.end}/${C}`},tt(y,p),y);return Ki.CronFieldCollection=r,Ki}var Of={},Qg;function Sv(){return Qg||(Qg=1,(function(l){var f,h,b,j,p,y,S,T,_,Wl,N,Vs,gv,xv,vv,yv,qf,pv,bv,Br;Object.defineProperty(l,"__esModule",{value:!0}),l.CronExpression=l.LOOPS_LIMIT_EXCEEDED_ERROR_MESSAGE=l.TIME_SPAN_OUT_OF_BOUNDS_ERROR_MESSAGE=void 0;const r=ih();l.TIME_SPAN_OUT_OF_BOUNDS_ERROR_MESSAGE="Out of the time span range",l.LOOPS_LIMIT_EXCEEDED_ERROR_MESSAGE="Invalid expression, loop limit exceeded";const d=1e4,R=class R{constructor(O,ae){tt(this,N);tt(this,f);tt(this,h);tt(this,b);tt(this,j);tt(this,p);tt(this,y);tt(this,S,null);tt(this,T,!1);Te(this,f,ae),Te(this,h,ae.tz),Te(this,j,ae.startDate?new r.CronDate(ae.startDate,J(this,h)):null),Te(this,p,ae.endDate?new r.CronDate(ae.endDate,J(this,h)):null);let ne=ae.currentDate??ae.startDate;if(ne){const he=new r.CronDate(ne,J(this,h));J(this,j)&&he.getTime()<J(this,j).getTime()?ne=J(this,j):J(this,p)&&he.getTime()>J(this,p).getTime()&&(ne=J(this,p))}Te(this,b,new r.CronDate(ne,J(this,h))),Te(this,y,O)}get fields(){return J(this,y)}static fieldsToExpression(O,ae){return new R(O,ae||{})}next(){return je(this,N,Br).call(this)}prev(){return je(this,N,Br).call(this,!0)}hasNext(){const O=J(this,b);try{return je(this,N,Br).call(this),!0}catch{return!1}finally{Te(this,b,O)}}hasPrev(){const O=J(this,b);try{return je(this,N,Br).call(this,!0),!0}catch{return!1}finally{Te(this,b,O)}}take(O){const ae=[];if(O>=0)for(let ne=0;ne<O;ne++)try{ae.push(this.next())}catch{return ae}else for(let ne=0;ne>O;ne--)try{ae.push(this.prev())}catch{return ae}return ae}reset(O){Te(this,b,new r.CronDate(O||J(this,f).currentDate))}stringify(O=!1){return J(this,y).stringify(O)}includesDate(O){const{second:ae,minute:ne,hour:he,month:ve}=J(this,y),ce=new r.CronDate(O,J(this,h));return!(!ae.values.includes(ce.getSeconds())||!ne.values.includes(ce.getMinutes())||!he.values.includes(ce.getHours())||!ve.values.includes(ce.getMonth()+1)||!je(this,N,qf).call(this,ce)||J(this,y).dayOfWeek.nthDay>0&&Math.ceil(ce.getDate()/7)!==J(this,y).dayOfWeek.nthDay)}toString(){return J(this,f).expression||this.stringify(!0)}[Symbol.iterator](){return{next:()=>({value:je(this,N,Br).call(this),done:!this.hasNext()})}}};f=new WeakMap,h=new WeakMap,b=new WeakMap,j=new WeakMap,p=new WeakMap,y=new WeakMap,S=new WeakMap,T=new WeakMap,_=new WeakSet,Wl=function(O,ae){return ae.some(ne=>ne===O)},N=new WeakSet,Vs=function(O,ae){return O[ae?O.length-1:0]},gv=function(O){const ae=`${O.getFullYear()}-${O.getMonth()+1}-${O.getDate()}`;if(J(this,S)===ae)return J(this,T);const ne=new r.CronDate(O);ne.setStartOfDay();const he=new r.CronDate(O);return he.setEndOfDay(),Te(this,S,ae),Te(this,T,ne.getUTCOffset()!==he.getUTCOffset()),J(this,T)},xv=function(O,ae,ne){const he=J(this,y).second.values,ve=O.getSeconds(),ce=J(this,y).second.findNearestValue(ve,ne);if(ce!==null){O.setSeconds(ce);return}O.applyDateOperation(ae,r.TimeUnit.Minute,J(this,y).hour.values.length),O.setSeconds(je(this,N,Vs).call(this,he,ne))},vv=function(O,ae,ne){const he=J(this,y).minute.values,ve=J(this,y).second.values,ce=O.getMinutes(),$=J(this,y).minute.findNearestValue(ce,ne);if($!==null){O.setMinutes($),O.setSeconds(je(this,N,Vs).call(this,ve,ne));return}O.applyDateOperation(ae,r.TimeUnit.Hour,J(this,y).hour.values.length),O.setMinutes(je(this,N,Vs).call(this,he,ne)),O.setSeconds(je(this,N,Vs).call(this,ve,ne))},yv=function(O,ae){const ne=ae.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 ae.getDay()===ve&&ne})},qf=function(O){var te,fe,me;const ae=J(this,y).dayOfMonth.isWildcard,ne=!ae,he=J(this,y).dayOfWeek.isWildcard,ve=!he,ce=je(te=R,_,Wl).call(te,O.getDate(),J(this,y).dayOfMonth.values)||J(this,y).dayOfMonth.hasLastChar&&O.isLastDayOfMonth(),$=je(fe=R,_,Wl).call(fe,O.getDay(),J(this,y).dayOfWeek.values)||J(this,y).dayOfWeek.hasLastChar&&je(me=R,_,yv).call(me,J(this,y).dayOfWeek.values,O);return!!(ne&&ve&&(ce||$)||ce&&!ve||ae&&!he&&$)},pv=function(O,ae,ne){var _e,L;const he=J(this,y).hour.values,ve=he,ce=O.getHours(),$=je(_e=R,_,Wl).call(_e,ce,he),te=O.dstStart===ce,fe=O.dstEnd===ce;if(te)return je(L=R,_,Wl).call(L,ce-1,he)?!0:(O.invokeDateOperation(ae,r.TimeUnit.Hour),!1);if(fe&&!ne)return O.dstEnd=null,O.applyDateOperation(r.DateMathOp.Add,r.TimeUnit.Hour,ve.length),!1;if($)return!0;O.dstStart=null;const me=J(this,y).hour.findNearestValue(ce,ne);if(me===null)return O.applyDateOperation(ae,r.TimeUnit.Day,ve.length),!1;if(je(this,N,gv).call(this,O)){const se=ne?ce-me:me-ce;for(let ge=0;ge<se;ge++)O.applyDateOperation(ae,r.TimeUnit.Hour,ve.length)}else O.setHours(me);return O.setMinutes(je(this,N,Vs).call(this,J(this,y).minute.values,ne)),O.setSeconds(je(this,N,Vs).call(this,J(this,y).second.values,ne)),!1},bv=function(O){if(!J(this,j)&&!J(this,p))return;const ae=O.getTime();if(J(this,j)&&ae<J(this,j).getTime())throw new Error(l.TIME_SPAN_OUT_OF_BOUNDS_ERROR_MESSAGE);if(J(this,p)&&ae>J(this,p).getTime())throw new Error(l.TIME_SPAN_OUT_OF_BOUNDS_ERROR_MESSAGE)},Br=function(O=!1){var ce,$,te;const ae=O?r.DateMathOp.Subtract:r.DateMathOp.Add,ne=new r.CronDate(J(this,b)),he=ne.getTime();let ve=0;for(;++ve<d;){if(je(this,N,bv).call(this,ne),!je(this,N,qf).call(this,ne)){ne.applyDateOperation(ae,r.TimeUnit.Day,J(this,y).hour.values.length);continue}if(!(J(this,y).dayOfWeek.nthDay<=0||Math.ceil(ne.getDate()/7)===J(this,y).dayOfWeek.nthDay)){ne.applyDateOperation(ae,r.TimeUnit.Day,J(this,y).hour.values.length);continue}if(!je(ce=R,_,Wl).call(ce,ne.getMonth()+1,J(this,y).month.values)){ne.applyDateOperation(ae,r.TimeUnit.Month,J(this,y).hour.values.length);continue}if(je(this,N,pv).call(this,ne,ae,O)){if(!je($=R,_,Wl).call($,ne.getMinutes(),J(this,y).minute.values)){je(this,N,vv).call(this,ne,ae,O);continue}if(!je(te=R,_,Wl).call(te,ne.getSeconds(),J(this,y).second.values)){je(this,N,xv).call(this,ne,ae,O);continue}if(he===ne.getTime()){(ae==="Add"||ne.getMilliseconds()===0)&&ne.applyDateOperation(ae,r.TimeUnit.Second,J(this,y).hour.values.length);continue}break}}if(ve>d)throw new Error(l.LOOPS_LIMIT_EXCEEDED_ERROR_MESSAGE);return ne.getMilliseconds()!==0&&ne.setMilliseconds(0),Te(this,b,ne),ne},tt(R,_);let c=R;l.CronExpression=c,l.default=c})(Of)),Of}var Zc={},Ig;function jS(){if(Ig)return Zc;Ig=1,Object.defineProperty(Zc,"__esModule",{value:!0}),Zc.seededRandom=d;function l(c){let f=2166136261;for(let h=0;h<c.length;h++)f^=c.charCodeAt(h),f=Math.imul(f,16777619);return()=>f>>>0}function r(c){return()=>{let f=c+=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 d(c){const f=c?l(c)():Math.floor(Math.random()*1e10);return r(f)}return Zc}var Xg;function Bf(){var y,S,Nv,Bs,jv,wv,Ev,Tv,Cv,Mv,Ov,Vf,Rv,Dv;if(Xg)return _a;Xg=1,Object.defineProperty(_a,"__esModule",{value:!0}),_a.CronExpressionParser=_a.DayOfWeek=_a.Months=_a.CronUnit=_a.PredefinedExpressions=void 0;const l=mv(),r=Sv(),d=jS(),c=uh();var f;(function(Z){Z["@yearly"]="0 0 0 1 1 *",Z["@annually"]="0 0 0 1 1 *",Z["@monthly"]="0 0 0 1 * *",Z["@weekly"]="0 0 0 * * 0",Z["@daily"]="0 0 0 * * *",Z["@hourly"]="0 0 * * * *",Z["@minutely"]="0 * * * * *",Z["@secondly"]="* * * * * *",Z["@weekdays"]="0 0 0 * * 1-5",Z["@weekends"]="0 0 0 * * 0,6"})(f||(_a.PredefinedExpressions=f={}));var h;(function(Z){Z.Second="Second",Z.Minute="Minute",Z.Hour="Hour",Z.DayOfMonth="DayOfMonth",Z.Month="Month",Z.DayOfWeek="DayOfWeek"})(h||(_a.CronUnit=h={}));var b;(function(Z){Z[Z.jan=1]="jan",Z[Z.feb=2]="feb",Z[Z.mar=3]="mar",Z[Z.apr=4]="apr",Z[Z.may=5]="may",Z[Z.jun=6]="jun",Z[Z.jul=7]="jul",Z[Z.aug=8]="aug",Z[Z.sep=9]="sep",Z[Z.oct=10]="oct",Z[Z.nov=11]="nov",Z[Z.dec=12]="dec"})(b||(_a.Months=b={}));var j;(function(Z){Z[Z.sun=0]="sun",Z[Z.mon=1]="mon",Z[Z.tue=2]="tue",Z[Z.wed=3]="wed",Z[Z.thu=4]="thu",Z[Z.fri=5]="fri",Z[Z.sat=6]="sat"})(j||(_a.DayOfWeek=j={}));let p=(S=class{static parse(R,ee={}){var ge,ye,we,xe,Ce,Pe,Qe,Rt;const{strict:O=!1,hashSeed:ae}=ee,ne=(0,d.seededRandom)(ae);R=f[R]||R;const he=je(ge=S,y,Nv).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=je(ye=S,y,Bs).call(ye,h.Second,he.second,c.CronSecond.constraints,ne),ce=je(we=S,y,Bs).call(we,h.Minute,he.minute,c.CronMinute.constraints,ne),$=je(xe=S,y,Bs).call(xe,h.Hour,he.hour,c.CronHour.constraints,ne),te=je(Ce=S,y,Bs).call(Ce,h.Month,he.month,c.CronMonth.constraints,ne),fe=je(Pe=S,y,Bs).call(Pe,h.DayOfMonth,he.dayOfMonth,c.CronDayOfMonth.constraints,ne),{dayOfWeek:me,nthDayOfWeek:_e}=je(Qe=S,y,Rv).call(Qe,he.dayOfWeek),L=je(Rt=S,y,Bs).call(Rt,h.DayOfWeek,me,c.CronDayOfWeek.constraints,ne),se=new l.CronFieldCollection({second:new c.CronSecond(ve,{rawValue:he.second}),minute:new c.CronMinute(ce,{rawValue:he.minute}),hour:new c.CronHour($,{rawValue:he.hour}),dayOfMonth:new c.CronDayOfMonth(fe,{rawValue:he.dayOfMonth}),month:new c.CronMonth(te,{rawValue:he.month}),dayOfWeek:new c.CronDayOfWeek(L,{rawValue:he.dayOfWeek,nthDayOfWeek:_e})});return new r.CronExpression(se,{...ee,expression:R})}},y=new WeakSet,Nv=function(R,ee){if(ee&&!R.length)throw new Error("Invalid cron expression");R=R||"0 * * * * *";const O=R.trim().split(/\s+/);if(ee&&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 ae=["*","*","*","*","*","0"];O.length<ae.length&&O.unshift(...ae.slice(O.length));const[ne,he,ve,ce,$,te]=O;return{second:ne,minute:he,hour:ve,dayOfMonth:ce,month:$,dayOfWeek:te}},Bs=function(R,ee,O,ae){if((R===h.Month||R===h.DayOfWeek)&&(ee=ee.replace(/[a-z]{3}/gi,ne=>{ne=ne.toLowerCase();const he=b[ne]||j[ne];if(he===void 0)throw new Error(`Validation error, cannot resolve alias "${ne}"`);return he.toString()})),!O.validChars.test(ee))throw new Error(`Invalid characters, got value: ${ee}`);return ee=je(this,y,jv).call(this,ee,O),ee=je(this,y,wv).call(this,ee,O,ae),je(this,y,Ev).call(this,R,ee,O)},jv=function(R,ee){return R.replace(/[*?]/g,ee.min+"-"+ee.max)},wv=function(R,ee,O){const ae=O();return R.replace(/H(?:\((\d+)-(\d+)\))?(?:\/(\d+))?/g,(ne,he,ve,ce)=>{if(he&&ve&&ce){const $=parseInt(he,10),te=parseInt(ve,10),fe=parseInt(ce,10);if($>te)throw new Error(`Invalid range: ${$}-${te}, min > max`);if(fe<=0)throw new Error(`Invalid step: ${fe}, must be positive`);const me=Math.max($,ee.min),_e=Math.floor(ae*fe),L=[];for(let se=Math.floor(me/fe)*fe+_e;se<=te;se+=fe)se>=me&&L.push(se);return L.join(",")}else if(he&&ve){const $=parseInt(he,10),te=parseInt(ve,10);if($>te)throw new Error(`Invalid range: ${$}-${te}, min > max`);return String(Math.floor(ae*(te-$+1))+$)}else if(ce){const $=parseInt(ce,10);if($<=0)throw new Error(`Invalid step: ${$}, must be positive`);const te=Math.floor(ae*$),fe=[];for(let me=Math.floor(ee.min/$)*$+te;me<=ee.max;me+=$)me>=ee.min&&fe.push(me);return fe.join(",")}else return String(Math.floor(ae*(ee.max-ee.min+1)+ee.min))})},Ev=function(R,ee,O){const ae=[];function ne(ve,ce){var $;if(Array.isArray(ve))ae.push(...ve);else if(je($=S,y,Dv).call($,ce,ve))ae.push(ve);else{const te=parseInt(ve.toString(),10);if(!(te>=ce.min&&te<=ce.max))throw new Error(`Constraint error, got value ${ve} expected range ${ce.min}-${ce.max}`);ae.push(R===h.DayOfWeek?te%7:ve)}}return ee.split(",").forEach(ve=>{var ce;if(!(ve.length>0))throw new Error("Invalid list value format");ne(je(ce=S,y,Tv).call(ce,R,ve,O),O)}),ae},Tv=function(R,ee,O){var ne,he;const ae=ee.split("/");if(ae.length>2)throw new Error(`Invalid repeat: ${ee}`);return ae.length===2?(isNaN(parseInt(ae[0],10))||(ae[0]=`${ae[0]}-${O.max}`),je(ne=S,y,Vf).call(ne,R,ae[0],parseInt(ae[1],10),O)):je(he=S,y,Vf).call(he,R,ee,1,O)},Cv=function(R,ee,O){if(!(!isNaN(R)&&!isNaN(ee)&&R>=O.min&&ee<=O.max))throw new Error(`Constraint error, got range ${R}-${ee} expected range ${O.min}-${O.max}`);if(R>ee)throw new Error(`Invalid range: ${R}-${ee}, min(${R}) > max(${ee})`)},Mv=function(R){if(!(!isNaN(R)&&R>0))throw new Error(`Constraint error, cannot repeat at every ${R} time.`)},Ov=function(R,ee,O,ae){const ne=[];R===h.DayOfWeek&&O%7===0&&ne.push(0);for(let he=ee;he<=O;he+=ae)ne.indexOf(he)===-1&&ne.push(he);return ne},Vf=function(R,ee,O,ae){const ne=ee.split("-");if(ne.length<=1)return isNaN(+ee)?ee:+ee;const[he,ve]=ne.map(ce=>parseInt(ce,10));return je(this,y,Cv).call(this,he,ve,ae),je(this,y,Mv).call(this,O),je(this,y,Ov).call(this,R,he,ve,O)},Rv=function(R){const ee=R.split("#");if(ee.length<=1)return{dayOfWeek:ee[0]};const O=+ee[ee.length-1],ae=R.match(/([,-/])/);if(ae!==null)throw new Error(`Constraint error, invalid dayOfWeek \`#\` and \`${ae==null?void 0:ae[0]}\` special characters are incompatible`);if(!(ee.length<=2&&!isNaN(O)&&O>=1&&O<=5))throw new Error("Constraint error, invalid dayOfWeek occurrence number (#)");return{dayOfWeek:ee[0],nthDayOfWeek:O}},Dv=function(R,ee){return R.chars.some(O=>ee.toString().includes(O))},tt(S,y),S);return _a.CronExpressionParser=p,_a}var fn={};const wS={},ES=Object.freeze(Object.defineProperty({__proto__:null,default:wS},Symbol.toStringTag,{value:"Module"})),Jg=op(ES);var Kg;function TS(){var h,b,Yf,Av;if(Kg)return fn;Kg=1;var l=fn&&fn.__createBinding||(Object.create?(function(y,S,T,_){_===void 0&&(_=T);var k=Object.getOwnPropertyDescriptor(S,T);(!k||("get"in k?!S.__esModule:k.writable||k.configurable))&&(k={enumerable:!0,get:function(){return S[T]}}),Object.defineProperty(y,_,k)}):(function(y,S,T,_){_===void 0&&(_=T),y[_]=S[T]})),r=fn&&fn.__setModuleDefault||(Object.create?(function(y,S){Object.defineProperty(y,"default",{enumerable:!0,value:S})}):function(y,S){y.default=S}),d=fn&&fn.__importStar||(function(){var y=function(S){return y=Object.getOwnPropertyNames||function(T){var _=[];for(var k in T)Object.prototype.hasOwnProperty.call(T,k)&&(_[_.length]=k);return _},y(S)};return function(S){if(S&&S.__esModule)return S;var T={};if(S!=null)for(var _=y(S),k=0;k<_.length;k++)_[k]!=="default"&&l(T,S,_[k]);return r(T,S),T}})();Object.defineProperty(fn,"__esModule",{value:!0}),fn.CronFileParser=void 0;const c=Bf();let f=(b=class{static async parseFile(S){var k;const{readFile:T}=await Promise.resolve().then(()=>d(Jg)),_=await T(S,"utf8");return je(k=b,h,Yf).call(k,_)}static parseFileSync(S){var k;const{readFileSync:T}=Jg,_=T(S,"utf8");return je(k=b,h,Yf).call(k,_)}},h=new WeakSet,Yf=function(S){var k;const T=S.split(`
406
- `),_={variables:{},expressions:[],errors:{}};for(const N of T){const C=N.trim();if(C.length===0||C.startsWith("#"))continue;const A=C.match(/^(.*)=(.*)$/);if(A){const[,P,B]=A;_.variables[P]=B.replace(/["']/g,"");continue}try{const P=je(k=b,h,Av).call(k,C);_.expressions.push(P.interval)}catch(P){_.errors[C]=P}}return _},Av=function(S){const T=S.split(" ");return{interval:c.CronExpressionParser.parse(T.slice(0,5).join(" ")),command:T.slice(5,T.length)}},tt(b,h),b);return fn.CronFileParser=f,fn}var ex;function CS(){return ex||(ex=1,(function(l){var r=Us&&Us.__createBinding||(Object.create?(function(y,S,T,_){_===void 0&&(_=T);var k=Object.getOwnPropertyDescriptor(S,T);(!k||("get"in k?!S.__esModule:k.writable||k.configurable))&&(k={enumerable:!0,get:function(){return S[T]}}),Object.defineProperty(y,_,k)}):(function(y,S,T,_){_===void 0&&(_=T),y[_]=S[T]})),d=Us&&Us.__exportStar||function(y,S){for(var T in y)T!=="default"&&!Object.prototype.hasOwnProperty.call(S,T)&&r(S,y,T)};Object.defineProperty(l,"__esModule",{value:!0}),l.CronFileParser=l.CronExpressionParser=l.CronExpression=l.CronFieldCollection=l.CronDate=void 0;const c=Bf();var f=ih();Object.defineProperty(l,"CronDate",{enumerable:!0,get:function(){return f.CronDate}});var h=mv();Object.defineProperty(l,"CronFieldCollection",{enumerable:!0,get:function(){return h.CronFieldCollection}});var b=Sv();Object.defineProperty(l,"CronExpression",{enumerable:!0,get:function(){return b.CronExpression}});var j=Bf();Object.defineProperty(l,"CronExpressionParser",{enumerable:!0,get:function(){return j.CronExpressionParser}});var p=TS();Object.defineProperty(l,"CronFileParser",{enumerable:!0,get:function(){return p.CronFileParser}}),d(uh(),l),l.default=c.CronExpressionParser})(Us)),Us}var MS=CS();const _v=6048e5,OS=864e5,RS=6e4,DS=36e5,tx=Symbol.for("constructDateFrom");function za(l,r){return typeof l=="function"?l(r):l&&typeof l=="object"&&tx in l?l[tx](r):l instanceof Date?new l.constructor(r):new Date(r)}function Mt(l,r){return za(r||l,l)}function AS(l,r,d){return za(l,+Mt(l)+r)}function Wc(l,r,d){return AS(l,r*DS)}let _S={};function fo(){return _S}function mu(l,r){var j,p,y,S;const d=fo(),c=(r==null?void 0:r.weekStartsOn)??((p=(j=r==null?void 0:r.locale)==null?void 0:j.options)==null?void 0:p.weekStartsOn)??d.weekStartsOn??((S=(y=d.locale)==null?void 0:y.options)==null?void 0:S.weekStartsOn)??0,f=Mt(l,r==null?void 0:r.in),h=f.getDay(),b=(h<c?7:0)+h-c;return f.setDate(f.getDate()-b),f.setHours(0,0,0,0),f}function lo(l,r){return mu(l,{...r,weekStartsOn:1})}function kv(l,r){const d=Mt(l,r==null?void 0:r.in),c=d.getFullYear(),f=za(d,0);f.setFullYear(c+1,0,4),f.setHours(0,0,0,0);const h=lo(f),b=za(d,0);b.setFullYear(c,0,4),b.setHours(0,0,0,0);const j=lo(b);return d.getTime()>=h.getTime()?c+1:d.getTime()>=j.getTime()?c:c-1}function ax(l){const r=Mt(l),d=new Date(Date.UTC(r.getFullYear(),r.getMonth(),r.getDate(),r.getHours(),r.getMinutes(),r.getSeconds(),r.getMilliseconds()));return d.setUTCFullYear(r.getFullYear()),+l-+d}function kS(l,...r){const d=za.bind(null,r.find(c=>typeof c=="object"));return r.map(d)}function nx(l,r){const d=Mt(l,r==null?void 0:r.in);return d.setHours(0,0,0,0),d}function zS(l,r,d){const[c,f]=kS(d==null?void 0:d.in,l,r),h=nx(c),b=nx(f),j=+h-ax(h),p=+b-ax(b);return Math.round((j-p)/OS)}function US(l,r){const d=kv(l,r),c=za(l,0);return c.setFullYear(d,0,4),c.setHours(0,0,0,0),lo(c)}function LS(l,r){let d,c=r==null?void 0:r.in;return l.forEach(f=>{!c&&typeof f=="object"&&(c=za.bind(null,f));const h=Mt(f,c);(!d||d<h||isNaN(+h))&&(d=h)}),za(c,d||NaN)}function HS(l,r){let d,c=r==null?void 0:r.in;return l.forEach(f=>{!c&&typeof f=="object"&&(c=za.bind(null,f));const h=Mt(f,c);(!d||d>h||isNaN(+h))&&(d=h)}),za(c,d||NaN)}function qS(l){return l instanceof Date||typeof l=="object"&&Object.prototype.toString.call(l)==="[object Date]"}function VS(l){return!(!qS(l)&&typeof l!="number"||isNaN(+Mt(l)))}function BS(l){return r=>{const c=(l?Math[l]:Math.trunc)(r);return c===0?0:c}}function YS(l,r){return+Mt(l)-+Mt(r)}function lx(l,r,d){const c=YS(l,r)/RS;return BS(d==null?void 0:d.roundingMethod)(c)}function $S(l,r){const d=Mt(l,r==null?void 0:r.in);return d.setFullYear(d.getFullYear(),0,1),d.setHours(0,0,0,0),d}const PS={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"}},GS=(l,r,d)=>{let c;const f=PS[l];return typeof f=="string"?c=f:r===1?c=f.one:c=f.other.replace("{{count}}",r.toString()),d!=null&&d.addSuffix?d.comparison&&d.comparison>0?"in "+c:c+" ago":c};function Rf(l){return(r={})=>{const d=r.width?String(r.width):l.defaultWidth;return l.formats[d]||l.formats[l.defaultWidth]}}const FS={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},ZS={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},WS={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},QS={date:Rf({formats:FS,defaultWidth:"full"}),time:Rf({formats:ZS,defaultWidth:"full"}),dateTime:Rf({formats:WS,defaultWidth:"full"})},IS={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},XS=(l,r,d,c)=>IS[l];function iu(l){return(r,d)=>{const c=d!=null&&d.context?String(d.context):"standalone";let f;if(c==="formatting"&&l.formattingValues){const b=l.defaultFormattingWidth||l.defaultWidth,j=d!=null&&d.width?String(d.width):b;f=l.formattingValues[j]||l.formattingValues[b]}else{const b=l.defaultWidth,j=d!=null&&d.width?String(d.width):l.defaultWidth;f=l.values[j]||l.values[b]}const h=l.argumentCallback?l.argumentCallback(r):r;return f[h]}}const JS={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},KS={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},eN={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"]},tN={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"]},aN={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"}},nN={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"}},lN=(l,r)=>{const d=Number(l),c=d%100;if(c>20||c<10)switch(c%10){case 1:return d+"st";case 2:return d+"nd";case 3:return d+"rd"}return d+"th"},sN={ordinalNumber:lN,era:iu({values:JS,defaultWidth:"wide"}),quarter:iu({values:KS,defaultWidth:"wide",argumentCallback:l=>l-1}),month:iu({values:eN,defaultWidth:"wide"}),day:iu({values:tN,defaultWidth:"wide"}),dayPeriod:iu({values:aN,defaultWidth:"wide",formattingValues:nN,defaultFormattingWidth:"wide"})};function uu(l){return(r,d={})=>{const c=d.width,f=c&&l.matchPatterns[c]||l.matchPatterns[l.defaultMatchWidth],h=r.match(f);if(!h)return null;const b=h[0],j=c&&l.parsePatterns[c]||l.parsePatterns[l.defaultParseWidth],p=Array.isArray(j)?iN(j,T=>T.test(b)):rN(j,T=>T.test(b));let y;y=l.valueCallback?l.valueCallback(p):p,y=d.valueCallback?d.valueCallback(y):y;const S=r.slice(b.length);return{value:y,rest:S}}}function rN(l,r){for(const d in l)if(Object.prototype.hasOwnProperty.call(l,d)&&r(l[d]))return d}function iN(l,r){for(let d=0;d<l.length;d++)if(r(l[d]))return d}function uN(l){return(r,d={})=>{const c=r.match(l.matchPattern);if(!c)return null;const f=c[0],h=r.match(l.parsePattern);if(!h)return null;let b=l.valueCallback?l.valueCallback(h[0]):h[0];b=d.valueCallback?d.valueCallback(b):b;const j=r.slice(f.length);return{value:b,rest:j}}}const cN=/^(\d+)(th|st|nd|rd)?/i,oN=/\d+/i,dN={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},fN={any:[/^b/i,/^(a|c)/i]},hN={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},mN={any:[/1/i,/2/i,/3/i,/4/i]},gN={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},xN={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]},vN={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},yN={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]},pN={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},bN={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}},SN={ordinalNumber:uN({matchPattern:cN,parsePattern:oN,valueCallback:l=>parseInt(l,10)}),era:uu({matchPatterns:dN,defaultMatchWidth:"wide",parsePatterns:fN,defaultParseWidth:"any"}),quarter:uu({matchPatterns:hN,defaultMatchWidth:"wide",parsePatterns:mN,defaultParseWidth:"any",valueCallback:l=>l+1}),month:uu({matchPatterns:gN,defaultMatchWidth:"wide",parsePatterns:xN,defaultParseWidth:"any"}),day:uu({matchPatterns:vN,defaultMatchWidth:"wide",parsePatterns:yN,defaultParseWidth:"any"}),dayPeriod:uu({matchPatterns:pN,defaultMatchWidth:"any",parsePatterns:bN,defaultParseWidth:"any"})},NN={code:"en-US",formatDistance:GS,formatLong:QS,formatRelative:XS,localize:sN,match:SN,options:{weekStartsOn:0,firstWeekContainsDate:1}};function jN(l,r){const d=Mt(l,r==null?void 0:r.in);return zS(d,$S(d))+1}function wN(l,r){const d=Mt(l,r==null?void 0:r.in),c=+lo(d)-+US(d);return Math.round(c/_v)+1}function zv(l,r){var S,T,_,k;const d=Mt(l,r==null?void 0:r.in),c=d.getFullYear(),f=fo(),h=(r==null?void 0:r.firstWeekContainsDate)??((T=(S=r==null?void 0:r.locale)==null?void 0:S.options)==null?void 0:T.firstWeekContainsDate)??f.firstWeekContainsDate??((k=(_=f.locale)==null?void 0:_.options)==null?void 0:k.firstWeekContainsDate)??1,b=za((r==null?void 0:r.in)||l,0);b.setFullYear(c+1,0,h),b.setHours(0,0,0,0);const j=mu(b,r),p=za((r==null?void 0:r.in)||l,0);p.setFullYear(c,0,h),p.setHours(0,0,0,0);const y=mu(p,r);return+d>=+j?c+1:+d>=+y?c:c-1}function EN(l,r){var j,p,y,S;const d=fo(),c=(r==null?void 0:r.firstWeekContainsDate)??((p=(j=r==null?void 0:r.locale)==null?void 0:j.options)==null?void 0:p.firstWeekContainsDate)??d.firstWeekContainsDate??((S=(y=d.locale)==null?void 0:y.options)==null?void 0:S.firstWeekContainsDate)??1,f=zv(l,r),h=za((r==null?void 0:r.in)||l,0);return h.setFullYear(f,0,c),h.setHours(0,0,0,0),mu(h,r)}function TN(l,r){const d=Mt(l,r==null?void 0:r.in),c=+mu(d,r)-+EN(d,r);return Math.round(c/_v)+1}function st(l,r){const d=l<0?"-":"",c=Math.abs(l).toString().padStart(r,"0");return d+c}const $l={y(l,r){const d=l.getFullYear(),c=d>0?d:1-d;return st(r==="yy"?c%100:c,r.length)},M(l,r){const d=l.getMonth();return r==="M"?String(d+1):st(d+1,2)},d(l,r){return st(l.getDate(),r.length)},a(l,r){const d=l.getHours()/12>=1?"pm":"am";switch(r){case"a":case"aa":return d.toUpperCase();case"aaa":return d;case"aaaaa":return d[0];case"aaaa":default:return d==="am"?"a.m.":"p.m."}},h(l,r){return st(l.getHours()%12||12,r.length)},H(l,r){return st(l.getHours(),r.length)},m(l,r){return st(l.getMinutes(),r.length)},s(l,r){return st(l.getSeconds(),r.length)},S(l,r){const d=r.length,c=l.getMilliseconds(),f=Math.trunc(c*Math.pow(10,d-3));return st(f,r.length)}},Vr={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},sx={G:function(l,r,d){const c=l.getFullYear()>0?1:0;switch(r){case"G":case"GG":case"GGG":return d.era(c,{width:"abbreviated"});case"GGGGG":return d.era(c,{width:"narrow"});case"GGGG":default:return d.era(c,{width:"wide"})}},y:function(l,r,d){if(r==="yo"){const c=l.getFullYear(),f=c>0?c:1-c;return d.ordinalNumber(f,{unit:"year"})}return $l.y(l,r)},Y:function(l,r,d,c){const f=zv(l,c),h=f>0?f:1-f;if(r==="YY"){const b=h%100;return st(b,2)}return r==="Yo"?d.ordinalNumber(h,{unit:"year"}):st(h,r.length)},R:function(l,r){const d=kv(l);return st(d,r.length)},u:function(l,r){const d=l.getFullYear();return st(d,r.length)},Q:function(l,r,d){const c=Math.ceil((l.getMonth()+1)/3);switch(r){case"Q":return String(c);case"QQ":return st(c,2);case"Qo":return d.ordinalNumber(c,{unit:"quarter"});case"QQQ":return d.quarter(c,{width:"abbreviated",context:"formatting"});case"QQQQQ":return d.quarter(c,{width:"narrow",context:"formatting"});case"QQQQ":default:return d.quarter(c,{width:"wide",context:"formatting"})}},q:function(l,r,d){const c=Math.ceil((l.getMonth()+1)/3);switch(r){case"q":return String(c);case"qq":return st(c,2);case"qo":return d.ordinalNumber(c,{unit:"quarter"});case"qqq":return d.quarter(c,{width:"abbreviated",context:"standalone"});case"qqqqq":return d.quarter(c,{width:"narrow",context:"standalone"});case"qqqq":default:return d.quarter(c,{width:"wide",context:"standalone"})}},M:function(l,r,d){const c=l.getMonth();switch(r){case"M":case"MM":return $l.M(l,r);case"Mo":return d.ordinalNumber(c+1,{unit:"month"});case"MMM":return d.month(c,{width:"abbreviated",context:"formatting"});case"MMMMM":return d.month(c,{width:"narrow",context:"formatting"});case"MMMM":default:return d.month(c,{width:"wide",context:"formatting"})}},L:function(l,r,d){const c=l.getMonth();switch(r){case"L":return String(c+1);case"LL":return st(c+1,2);case"Lo":return d.ordinalNumber(c+1,{unit:"month"});case"LLL":return d.month(c,{width:"abbreviated",context:"standalone"});case"LLLLL":return d.month(c,{width:"narrow",context:"standalone"});case"LLLL":default:return d.month(c,{width:"wide",context:"standalone"})}},w:function(l,r,d,c){const f=TN(l,c);return r==="wo"?d.ordinalNumber(f,{unit:"week"}):st(f,r.length)},I:function(l,r,d){const c=wN(l);return r==="Io"?d.ordinalNumber(c,{unit:"week"}):st(c,r.length)},d:function(l,r,d){return r==="do"?d.ordinalNumber(l.getDate(),{unit:"date"}):$l.d(l,r)},D:function(l,r,d){const c=jN(l);return r==="Do"?d.ordinalNumber(c,{unit:"dayOfYear"}):st(c,r.length)},E:function(l,r,d){const c=l.getDay();switch(r){case"E":case"EE":case"EEE":return d.day(c,{width:"abbreviated",context:"formatting"});case"EEEEE":return d.day(c,{width:"narrow",context:"formatting"});case"EEEEEE":return d.day(c,{width:"short",context:"formatting"});case"EEEE":default:return d.day(c,{width:"wide",context:"formatting"})}},e:function(l,r,d,c){const f=l.getDay(),h=(f-c.weekStartsOn+8)%7||7;switch(r){case"e":return String(h);case"ee":return st(h,2);case"eo":return d.ordinalNumber(h,{unit:"day"});case"eee":return d.day(f,{width:"abbreviated",context:"formatting"});case"eeeee":return d.day(f,{width:"narrow",context:"formatting"});case"eeeeee":return d.day(f,{width:"short",context:"formatting"});case"eeee":default:return d.day(f,{width:"wide",context:"formatting"})}},c:function(l,r,d,c){const f=l.getDay(),h=(f-c.weekStartsOn+8)%7||7;switch(r){case"c":return String(h);case"cc":return st(h,r.length);case"co":return d.ordinalNumber(h,{unit:"day"});case"ccc":return d.day(f,{width:"abbreviated",context:"standalone"});case"ccccc":return d.day(f,{width:"narrow",context:"standalone"});case"cccccc":return d.day(f,{width:"short",context:"standalone"});case"cccc":default:return d.day(f,{width:"wide",context:"standalone"})}},i:function(l,r,d){const c=l.getDay(),f=c===0?7:c;switch(r){case"i":return String(f);case"ii":return st(f,r.length);case"io":return d.ordinalNumber(f,{unit:"day"});case"iii":return d.day(c,{width:"abbreviated",context:"formatting"});case"iiiii":return d.day(c,{width:"narrow",context:"formatting"});case"iiiiii":return d.day(c,{width:"short",context:"formatting"});case"iiii":default:return d.day(c,{width:"wide",context:"formatting"})}},a:function(l,r,d){const f=l.getHours()/12>=1?"pm":"am";switch(r){case"a":case"aa":return d.dayPeriod(f,{width:"abbreviated",context:"formatting"});case"aaa":return d.dayPeriod(f,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return d.dayPeriod(f,{width:"narrow",context:"formatting"});case"aaaa":default:return d.dayPeriod(f,{width:"wide",context:"formatting"})}},b:function(l,r,d){const c=l.getHours();let f;switch(c===12?f=Vr.noon:c===0?f=Vr.midnight:f=c/12>=1?"pm":"am",r){case"b":case"bb":return d.dayPeriod(f,{width:"abbreviated",context:"formatting"});case"bbb":return d.dayPeriod(f,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return d.dayPeriod(f,{width:"narrow",context:"formatting"});case"bbbb":default:return d.dayPeriod(f,{width:"wide",context:"formatting"})}},B:function(l,r,d){const c=l.getHours();let f;switch(c>=17?f=Vr.evening:c>=12?f=Vr.afternoon:c>=4?f=Vr.morning:f=Vr.night,r){case"B":case"BB":case"BBB":return d.dayPeriod(f,{width:"abbreviated",context:"formatting"});case"BBBBB":return d.dayPeriod(f,{width:"narrow",context:"formatting"});case"BBBB":default:return d.dayPeriod(f,{width:"wide",context:"formatting"})}},h:function(l,r,d){if(r==="ho"){let c=l.getHours()%12;return c===0&&(c=12),d.ordinalNumber(c,{unit:"hour"})}return $l.h(l,r)},H:function(l,r,d){return r==="Ho"?d.ordinalNumber(l.getHours(),{unit:"hour"}):$l.H(l,r)},K:function(l,r,d){const c=l.getHours()%12;return r==="Ko"?d.ordinalNumber(c,{unit:"hour"}):st(c,r.length)},k:function(l,r,d){let c=l.getHours();return c===0&&(c=24),r==="ko"?d.ordinalNumber(c,{unit:"hour"}):st(c,r.length)},m:function(l,r,d){return r==="mo"?d.ordinalNumber(l.getMinutes(),{unit:"minute"}):$l.m(l,r)},s:function(l,r,d){return r==="so"?d.ordinalNumber(l.getSeconds(),{unit:"second"}):$l.s(l,r)},S:function(l,r){return $l.S(l,r)},X:function(l,r,d){const c=l.getTimezoneOffset();if(c===0)return"Z";switch(r){case"X":return ix(c);case"XXXX":case"XX":return Ys(c);case"XXXXX":case"XXX":default:return Ys(c,":")}},x:function(l,r,d){const c=l.getTimezoneOffset();switch(r){case"x":return ix(c);case"xxxx":case"xx":return Ys(c);case"xxxxx":case"xxx":default:return Ys(c,":")}},O:function(l,r,d){const c=l.getTimezoneOffset();switch(r){case"O":case"OO":case"OOO":return"GMT"+rx(c,":");case"OOOO":default:return"GMT"+Ys(c,":")}},z:function(l,r,d){const c=l.getTimezoneOffset();switch(r){case"z":case"zz":case"zzz":return"GMT"+rx(c,":");case"zzzz":default:return"GMT"+Ys(c,":")}},t:function(l,r,d){const c=Math.trunc(+l/1e3);return st(c,r.length)},T:function(l,r,d){return st(+l,r.length)}};function rx(l,r=""){const d=l>0?"-":"+",c=Math.abs(l),f=Math.trunc(c/60),h=c%60;return h===0?d+String(f):d+String(f)+r+st(h,2)}function ix(l,r){return l%60===0?(l>0?"-":"+")+st(Math.abs(l)/60,2):Ys(l,r)}function Ys(l,r=""){const d=l>0?"-":"+",c=Math.abs(l),f=st(Math.trunc(c/60),2),h=st(c%60,2);return d+f+r+h}const ux=(l,r)=>{switch(l){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"})}},Uv=(l,r)=>{switch(l){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"})}},CN=(l,r)=>{const d=l.match(/(P+)(p+)?/)||[],c=d[1],f=d[2];if(!f)return ux(l,r);let h;switch(c){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}}",ux(c,r)).replace("{{time}}",Uv(f,r))},MN={p:Uv,P:CN},ON=/^D+$/,RN=/^Y+$/,DN=["D","DD","YY","YYYY"];function AN(l){return ON.test(l)}function _N(l){return RN.test(l)}function kN(l,r,d){const c=zN(l,r,d);if(console.warn(c),DN.includes(l))throw new RangeError(c)}function zN(l,r,d){const c=l[0]==="Y"?"years":"days of the month";return`Use \`${l.toLowerCase()}\` instead of \`${l}\` (in \`${r}\`) for formatting ${c} to the input \`${d}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const UN=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,LN=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,HN=/^'([^]*?)'?$/,qN=/''/g,VN=/[a-zA-Z]/;function Hs(l,r,d){var S,T,_,k;const c=fo(),f=c.locale??NN,h=c.firstWeekContainsDate??((T=(S=c.locale)==null?void 0:S.options)==null?void 0:T.firstWeekContainsDate)??1,b=c.weekStartsOn??((k=(_=c.locale)==null?void 0:_.options)==null?void 0:k.weekStartsOn)??0,j=Mt(l,d==null?void 0:d.in);if(!VS(j))throw new RangeError("Invalid time value");let p=r.match(LN).map(N=>{const C=N[0];if(C==="p"||C==="P"){const A=MN[C];return A(N,f.formatLong)}return N}).join("").match(UN).map(N=>{if(N==="''")return{isToken:!1,value:"'"};const C=N[0];if(C==="'")return{isToken:!1,value:BN(N)};if(sx[C])return{isToken:!0,value:N};if(C.match(VN))throw new RangeError("Format string contains an unescaped latin alphabet character `"+C+"`");return{isToken:!1,value:N}});f.localize.preprocessor&&(p=f.localize.preprocessor(j,p));const y={firstWeekContainsDate:h,weekStartsOn:b,locale:f};return p.map(N=>{if(!N.isToken)return N.value;const C=N.value;(_N(C)||AN(C))&&kN(C,r,String(l));const A=sx[C[0]];return A(j,C,f.localize,y)}).join("")}function BN(l){const r=l.match(HN);return r?r[1].replace(qN,"'"):l}function YN(l,r){return+Mt(l)>+Mt(r)}function $N(l,r){return+Mt(l)<+Mt(r)}function PN(l,r){const d=Mt(l,r==null?void 0:r.in);return d.setMinutes(0,0,0),d}const Df=Kx,Qc=[{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"}],al=160,Ic=14,GN=10,FN=7,cx=4,Lv=({configs:l,currentProjectId:r,onEditJob:d,queueStatus:c,queueAnalytics:f})=>{const h=U.useMemo(()=>PN(new Date),[]),b=U.useMemo(()=>Wc(h,24),[h]),j=U.useMemo(()=>Wc(h,-24),[h]),p=b,y=U.useMemo(()=>{const X=[];for(let ie=0;ie<=24;ie++)X.push(Wc(h,ie));return X},[h]),S=U.useMemo(()=>{const X=[];return l.forEach(({projectId:ie,config:G})=>{var ee,O,ae,ne,he;const Z={executor:G.executorEnabled!==!1?G.cronSchedule:null,reviewer:G.reviewerEnabled?G.reviewerSchedule:null,qa:G.qa.enabled?G.qa.schedule:null,audit:G.audit.enabled?G.audit.schedule:null,slicer:G.roadmapScanner.enabled?G.roadmapScanner.slicerSchedule:null,analytics:(ee=G.analytics)!=null&&ee.enabled?(O=G.analytics)==null?void 0:O.schedule:null,"pr-resolver":(ae=G.prResolver)!=null&&ae.enabled?G.prResolver.schedule:null,merger:(ne=G.merger)!=null&&ne.enabled?(he=G.merger)==null?void 0:he.schedule:null},R=G.cronScheduleOffset||0;Object.entries(Z).forEach(([ve,ce])=>{if(ce)try{const $=MS.CronExpressionParser.parse(ce,{currentDate:h,endDate:b});for(;$.hasNext();){const te=$.next(),fe=new Date(te.getTime());fe.setMinutes(fe.getMinutes()+R),YN(fe,h)&&$N(fe,b)&&X.push({projectId:ie,jobType:ve,time:fe})}}catch($){console.error(`Failed to parse cron "${ce}" for ${ie}/${ve}`,$)}})}),X},[l,h,b]),T=U.useMemo(()=>{const X=new Set;return l.length===0||(l.every(ie=>ie.config.executorEnabled===!1)&&X.add("executor"),l.every(ie=>!ie.config.reviewerEnabled)&&X.add("reviewer"),l.every(ie=>!ie.config.qa.enabled)&&X.add("qa"),l.every(ie=>!ie.config.audit.enabled)&&X.add("audit"),l.every(ie=>!ie.config.roadmapScanner.enabled)&&X.add("slicer"),l.every(ie=>{var G;return!((G=ie.config.analytics)!=null&&G.enabled)})&&X.add("analytics"),l.every(ie=>{var G;return!((G=ie.config.prResolver)!=null&&G.enabled)})&&X.add("pr-resolver"),l.every(ie=>{var G;return!((G=ie.config.merger)!=null&&G.enabled)})&&X.add("merger")),X},[l]),_=U.useMemo(()=>{const X=new Map;let ie=0;return l.forEach(G=>{G.projectId===r||(X.set(G.projectId,ie%Qc.length),ie++)}),X},[l,r]),k=X=>lx(X,h),N=U.useMemo(()=>{const X=[];for(let ie=0;ie<=24;ie++)X.push(Wc(j,ie));return X},[j]),C=X=>{const ie=HS([LS([X,j]),p]);return lx(ie,j)},A=U.useMemo(()=>{const X=(f==null?void 0:f.recentRuns)??[],ie=new Map;for(const G of X){const Z=G.providerKey||"default",R=new Date(G.startedAt*1e3),ee=G.finishedAt?new Date(G.finishedAt*1e3):new Date;ee<j||R>p||(ie.has(Z)||ie.set(Z,[]),ie.get(Z).push({id:G.id,jobType:G.jobType,status:G.status,projectPath:G.projectPath,startedAt:R,finishedAt:ee,throttledCount:G.throttledCount}))}if(c!=null&&c.running){const G=c.running.providerKey??"default";ie.has(G)||ie.set(G,[]),ie.get(G).push({id:c.running.id,jobType:c.running.jobType,status:"running",projectPath:c.running.projectPath,startedAt:new Date((c.running.dispatchedAt??c.running.enqueuedAt)*1e3),finishedAt:new Date,throttledCount:0})}return Array.from(ie.entries()).sort(([G],[Z])=>G.localeCompare(Z)).map(([G,Z])=>({providerKey:G,runs:Z.sort((R,ee)=>R.startedAt.getTime()-ee.startedAt.getTime())}))},[p,j,f,c]),P=X=>X.split(/[-_]/).map(ie=>ie.charAt(0).toUpperCase()+ie.slice(1)).join(" "),B=l.length>1,M=s.jsx("div",{className:"absolute inset-0 flex pointer-events-none",children:y.map((X,ie)=>s.jsx("div",{className:"h-full border-l border-slate-800/20",style:{width:60}},ie))});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."})]}),B&&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"})]}),l.filter(X=>X.projectId!==r).slice(0,5).map(X=>{const ie=_.get(X.projectId)??0,G=Qc[ie],Z=(X.projectId.split("/").pop()??X.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 ${G.bg} shrink-0`}),s.jsx("span",{className:"text-[10px] text-slate-500",title:X.projectId,children:Z})]},X.projectId)})]})]}),s.jsx("div",{className:"overflow-x-auto custom-scrollbar",children:s.jsxs("div",{className:"relative min-w-[1600px]",style:{width:1440+al},children:[s.jsxs("div",{className:"h-8 border-b border-slate-800 flex",children:[s.jsx("div",{style:{width:al},className:"shrink-0 border-r border-slate-800"}),s.jsx("div",{className:"flex-1 relative",children:y.map((X,ie)=>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:ie*60},children:s.jsx("span",{className:"text-[10px] font-mono text-slate-500",children:Hs(X,"HH:mm")})},ie))})]}),s.jsxs("div",{className:"relative",children:[l.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."})}),Df.map(X=>{const ie=T.has(X.id),G=S.filter(R=>R.jobType===X.id);if(!B)return s.jsxs("div",{className:`flex border-b border-slate-800/30 ${ie?"opacity-40":""}`,children:[s.jsxs("div",{style:{width:al},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 ${X.color.bg} shrink-0`}),s.jsx("span",{className:"text-xs font-semibold text-slate-300",children:X.label})]}),s.jsxs("div",{className:"flex-1 relative h-10",children:[M,G.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:ie?"Disabled":"No runs in this window"})}):G.map((R,ee)=>s.jsx("button",{type:"button",onClick:()=>d==null?void 0:d(R.projectId,R.jobType),style:{left:k(R.time)-3},className:`absolute top-1/2 -translate-y-1/2 h-4 w-6 rounded border ${X.color.bg} ${X.color.border} opacity-90 hover:opacity-100 hover:scale-110 transition-all cursor-pointer shadow-lg group`,title:`${X.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")})},ee))]})]},X.id);const Z=l.length*Ic+cx*2;return s.jsxs("div",{className:`flex border-b border-slate-800/30 ${ie?"opacity-40":""}`,children:[s.jsxs("div",{style:{width:al,height:Z},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 ${X.color.bg} shrink-0`}),s.jsx("span",{className:"text-[10px] font-bold text-slate-400 uppercase tracking-wide",children:X.label})]}),l.map(R=>{const ee=R.projectId===r,O=(R.projectId.split("/").pop()??R.projectId).slice(0,14),ae=_.get(R.projectId)??0,ne=ee?X.color.bg:Qc[ae].bg;return s.jsxs("div",{style:{height:Ic},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 ${ee?"text-slate-200 font-semibold":"text-slate-600"}`,title:R.projectId,children:ee?`${O} ★`:O})]},R.projectId)})]}),s.jsxs("div",{className:"flex-1 relative",style:{height:Z},children:[M,l.map((R,ee)=>{const O=R.projectId===r,ae=G.filter(te=>te.projectId===R.projectId),ne=cx+ee*Ic,he=O?GN:FN,ve=Math.floor((Ic-he)/2),ce=_.get(R.projectId)??0,$=O?{bg:X.color.bg,border:X.color.border}:Qc[ce];return s.jsxs(ze.Fragment,{children:[ee>0&&s.jsx("div",{className:"absolute left-0 right-0 border-t border-slate-800/20 pointer-events-none",style:{top:ne}}),ae.map((te,fe)=>s.jsx("button",{type:"button",onClick:()=>d==null?void 0:d(R.projectId,te.jobType),style:{left:k(te.time)-3,top:ne+ve,height:he},className:`absolute w-6 rounded border ${$.bg} ${$.border} ${O?"opacity-90":"opacity-50"} hover:opacity-100 hover:z-10 transition-all cursor-pointer group`,title:`${R.projectId} · ${X.label} @ ${Hs(te.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(te.time,"HH:mm")})},fe))]},R.projectId)}),G.length===0&&!ie&&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"})})]})]},X.id)})]}),s.jsx("div",{className:"absolute top-0 bottom-0 w-px bg-rose-500/50 z-10 pointer-events-none",style:{left:al+k(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"})]}),B&&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+al},children:[s.jsxs("div",{className:"h-8 border-b border-slate-800 flex",children:[s.jsx("div",{style:{width:al},className:"shrink-0 border-r border-slate-800"}),s.jsx("div",{className:"flex-1 relative flex",children:N.map((X,ie)=>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:ie*60},children:s.jsx("span",{className:"text-[10px] font-mono text-slate-500",children:Hs(X,"HH:mm")})},ie))})]}),s.jsx("div",{className:"relative",children:A.map(({providerKey:X,runs:ie})=>s.jsxs("div",{className:"flex border-b border-slate-800/30 min-h-14","data-testid":`provider-execution-lane-${X}`,children:[s.jsxs("div",{style:{width:al},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:X,children:P(X)}),s.jsx("span",{className:"text-[10px] text-slate-500 font-mono truncate",children:X})]}),s.jsxs("div",{className:"flex-1 relative h-14",children:[s.jsx("div",{className:"absolute inset-0 flex pointer-events-none",children:N.map((G,Z)=>s.jsx("div",{className:"h-full border-l border-slate-800/20",style:{width:60}},Z))}),ie.map(G=>{const Z=Df.find(ce=>ce.id===G.jobType)??Df[0],R=C(G.startedAt),ee=C(G.finishedAt),O=Math.max(ee-R,8),ae=G.status==="running",ne=G.status==="error"||G.status==="failed"||G.status==="errored",he=ae?"bg-green-500":ne?"bg-red-500":Z.color.bg,ve=ae?"border-green-400/60":ne?"border-red-400/60":Z.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 ${ae?"animate-pulse":""}`,style:{left:R,width:O},title:`${X} • ${Z.label} • ${Hs(G.startedAt,"MMM d HH:mm")} • ${G.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:Z.label}),s.jsx("span",{className:"text-white/70",children:G.status}),G.throttledCount>0&&s.jsxs("span",{className:"text-yellow-100",children:["throttle ",G.throttledCount,"x"]})]})},`${X}-${G.id}-${G.startedAt.getTime()}`)})]})]},X))}),s.jsx("div",{className:"absolute top-0 bottom-0 w-px bg-rose-500/50 z-10 pointer-events-none",style:{left:al+C(new Date)},children:s.jsx("div",{className:"absolute top-0 h-2 w-2 rounded-full bg-rose-500 -translate-x-1/2"})})]})})]})]})},so=[{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"}],ch=[{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 $r(l){return l?l.trim().replace(/\s+/g," "):""}function qs(l,r){return $r(l)===$r(r)}function ZN(l){if(l)return ch.find(r=>r.id===l)}function Hv(l,r,d,c,f,h,b,j){return qs(l.schedules.executor,r)&&qs(l.schedules.reviewer,d)&&qs(l.schedules.qa,c)&&qs(l.schedules.audit,f)&&qs(l.schedules.slicer,h)&&qs(l.schedules.prResolver,b)&&qs(l.schedules.merger,j)}function WN(l,r,d,c,f,h,b){return ch.find(j=>Hv(j,l,r,d,c,f,h,b))}function Af(l,r,d,c,f,h,b,j){const p=ZN(l);return p&&Hv(p,r,d,c,f,h,b,j)?p:WN(r,d,c,f,h,b,j)}function ia(l){const r=$r(l),d=r.split(/\s+/);if(d.length!==5)return r;const[c,f,h,b,j]=d,p=/^\d+$/.test(c),y=so.find(S=>$r(S.value)===r);if(y)return y.label;if(c==="*/30"&&f==="*")return"Every 30 minutes";if(c==="0"&&f==="*")return"Every hour";if(c.startsWith("*/"))return`Every ${parseInt(c.replace("*/",""),10)} minutes`;if(p&&f.startsWith("*/")&&h==="*"&&b==="*"&&j==="*"){const S=parseInt(f.replace("*/",""),10);return c==="0"?`Every ${S} hours`:`Every ${S} hours at :${c.padStart(2,"0")}`}if(c==="0"&&f.startsWith("*/"))return`Every ${parseInt(f.replace("*/",""),10)} hours`;if(c==="0"&&f.includes("-")){const[S,T]=f.split("-");return`Every hour from ${cu(S)} to ${cu(T)}`}if(p&&f.includes("-")&&h==="*"&&b==="*"&&j==="*"){const[S,T]=f.split("-");return`Every hour from ${ou(S,c)} to ${ou(T,c)}`}if(c==="0"&&f.includes(",")){const S=f.split(",").map(cu);return S.length<=3?`At ${S.join(" and ")}`:`At ${S.slice(0,-1).join(", ")}, and ${S[S.length-1]}`}if(p&&f.includes(",")&&h==="*"&&b==="*"&&(j==="*"||j==="1-5")){const S=f.split(",").map(_=>ou(_,c)),T=j==="1-5"?"Weekdays at ":"At ";return S.length<=3?`${T}${S.join(" and ")}`:`${T}${S.slice(0,-1).join(", ")}, and ${S[S.length-1]}`}return c==="0"&&f!=="*"&&h==="*"&&b==="*"&&j==="*"?`Daily at ${cu(f)}`:p&&f!=="*"&&h==="*"&&b==="*"&&j==="*"?`Daily at ${ou(f,c)}`:c==="0"&&f!=="*"&&h==="*"&&b==="*"&&j==="1-5"?`Weekdays at ${cu(f)}`:p&&f!=="*"&&h==="*"&&b==="*"&&j==="1-5"?`Weekdays at ${ou(f,c)}`:r}function cu(l){const r=parseInt(l,10);return r===0?"12 AM":r<12?`${r} AM`:r===12?"12 PM":`${r-12} PM`}function ou(l,r){const d=r.padStart(2,"0"),c=parseInt(l,10);return Number.isNaN(c)?`${l}:${d}`:c===0?`12:${d} AM`:c<12?`${c}:${d} AM`:c===12?`12:${d} PM`:`${c-12}:${d} PM`}function QN(l){const r=$r(l),d=so.find(c=>$r(c.value)===r);return(d==null?void 0:d.value)??"__custom__"}function ox(l){const r=new Date,d=l.getTime()-r.getTime(),c=Math.floor(d/6e4),f=Math.floor(c/60),h=Math.floor(f/24);return c<1?"less than a minute":c<60?`in ${c} minute${c>1?"s":""}`:f<24?`in ${f} hour${f>1?"s":""}`:`in ${h} day${h>1?"s":""}`}const Pl=({label:l,value:r,onChange:d,helperText:c,placeholder:f="5 */3 * * *"})=>{const h=QN(r),b=h==="__custom__",j=S=>{S!=="__custom__"&&d(S)},p=S=>{d(S.target.value)},y=so.find(S=>S.value===h);return s.jsxs("div",{className:"space-y-3",children:[s.jsx(xt,{label:l,value:h,onChange:j,options:so.map(S=>({label:S.label,value:S.value})),helperText:b?void 0:(y==null?void 0:y.description)||c}),b&&s.jsxs("div",{className:"space-y-2 mt-2",children:[s.jsx(ke,{label:"Cron Expression",value:r,onChange:p,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)"]})]})]})},IN=({form:l,scheduleMode:r,selectedTemplateId:d,onFieldChange:c,onSwitchToTemplate:f,onSwitchToCustom:h,onApplyTemplate:b,allProjectConfigs:j,currentProjectId:p,onEditJob:y})=>s.jsxs(ft,{className:"p-6 space-y-6",children:[j&&j.length>0&&s.jsx(Lv,{configs:j,currentProjectId:p,onEditJob:y}),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",children:"Cadence is managed here. Enablement and runtime 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:ch.map(S=>{const T=d===S.id;return s.jsxs("button",{type:"button",onClick:()=>b(S),className:`text-left p-4 rounded-lg border transition-colors ${T?"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:S.label}),s.jsx("p",{className:"text-xs text-slate-400 mb-3",children:S.description}),s.jsx("div",{className:"space-y-0.5",children:[["Executor",S.hints.executor],["Reviewer",S.hints.reviewer],["QA",S.hints.qa],["Audit",S.hints.audit],["Planner",S.hints.slicer],["PR Resolver",S.hints.prResolver],["Merger",S.hints.merger]].map(([_,k])=>s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{className:"text-xs text-slate-500 w-16 shrink-0",children:_}),s.jsx("span",{className:"text-xs text-slate-400",children:k})]},_))})]},S.id)})}):s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsx("div",{id:"job-schedule-executor",children:s.jsx(Pl,{label:"PRD Execution Schedule",value:l.cronSchedule,onChange:S=>c("cronSchedule",S)})}),s.jsx("div",{id:"job-schedule-reviewer",children:s.jsx(Pl,{label:"PR Review Schedule",value:l.reviewerSchedule,onChange:S=>c("reviewerSchedule",S)})}),s.jsx("div",{id:"job-schedule-qa",children:s.jsx(Pl,{label:"QA Schedule",value:l.qa.schedule,onChange:S=>c("qa",{...l.qa,schedule:S})})}),s.jsx("div",{id:"job-schedule-audit",children:s.jsx(Pl,{label:"Audit Schedule",value:l.audit.schedule,onChange:S=>c("audit",{...l.audit,schedule:S})})}),s.jsx("div",{id:"job-schedule-slicer",children:s.jsx(Pl,{label:"Planner Schedule",value:l.roadmapScanner.slicerSchedule,onChange:S=>c("roadmapScanner",{...l.roadmapScanner,slicerSchedule:S})})}),l.analytics&&s.jsx("div",{id:"job-schedule-analytics",children:s.jsx(Pl,{label:"Analytics Schedule",value:l.analytics.schedule,onChange:S=>c("analytics",{...l.analytics,schedule:S})})}),l.prResolver&&s.jsx("div",{id:"job-schedule-pr-resolver",children:s.jsx(Pl,{label:"PR Resolver Schedule",value:l.prResolver.schedule,onChange:S=>c("prResolver",{...l.prResolver,schedule:S})})}),l.merger&&s.jsx("div",{id:"job-schedule-merger",children:s.jsx(Pl,{label:"Merge Orchestrator Schedule",value:l.merger.schedule,onChange:S=>c("merger",{...l.merger,schedule:S})})})]}),s.jsxs("div",{className:"pt-4 border-t border-slate-800 grid grid-cols-1 md:grid-cols-3 gap-6",children:[s.jsx(xt,{label:"Scheduling Priority",value:String(l.schedulingPriority),onChange:S=>c("schedulingPriority",Number(S)),options:[{label:"1 - Lowest",value:"1"},{label:"2 - Low",value:"2"},{label:"3 - Balanced",value:"3"},{label:"4 - High",value:"4"},{label:"5 - Highest",value:"5"}],helperText:"Higher-priority projects get earlier balanced start slots and win queue tie-breakers first."}),s.jsx("div",{className:"rounded-xl border border-slate-800 bg-slate-950/50 p-4",children:s.jsxs("div",{className:"flex items-center justify-between gap-4",children:[s.jsxs("div",{children:[s.jsx("div",{className:"text-sm font-medium text-slate-200",children:"Global Queue"}),s.jsx("p",{className:"text-xs text-slate-400 mt-1",children:"Queue overlapping jobs across projects instead of letting them burst the provider API."})]}),s.jsx(ka,{checked:l.globalQueueEnabled??!0,onChange:S=>c("globalQueueEnabled",S)})]})}),s.jsx(ke,{label:"Extra Start Delay",type:"number",min:"0",max:"59",value:String(l.cronScheduleOffset),onChange:S=>{const T=Math.min(59,Math.max(0,Number(S.target.value||0)));c("cronScheduleOffset",T)},helperText:"Manual delay in minutes added before cron jobs start. This stacks on top of automatic balancing."})]})]}),fu=({label:l,value:r=[],onChange:d,placeholder:c,helpText:f})=>{const[h,b]=ze.useState(""),j=()=>{h.trim()&&!r.includes(h.trim())&&(d([...r,h.trim()]),b(""))},p=S=>{d(r.filter(T=>T!==S))},y=S=>{S.key==="Enter"&&(S.preventDefault(),j())};return s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-slate-400 mb-2",children:l}),s.jsx("div",{className:"flex flex-wrap gap-2 mb-2",children:r.map(S=>s.jsxs("span",{className:"inline-flex items-center gap-1 px-2 py-1 bg-slate-800 rounded text-sm text-slate-300",children:[S,s.jsx("button",{type:"button",onClick:()=>p(S),className:"text-slate-500 hover:text-red-400","aria-label":`Remove ${S}`,title:`Remove ${S}`,children:s.jsx(Zr,{className:"h-3 w-3"})})]},S))}),s.jsxs("div",{className:"flex gap-2",children:[s.jsx("input",{type:"text",value:h,onChange:S=>b(S.target.value),onKeyDown:y,placeholder:c,className:"flex-1 bg-slate-800 border border-slate-700 rounded px-3 py-2 text-sm text-slate-200 placeholder-slate-500"}),s.jsx(Be,{onClick:j,disabled:!h.trim(),"aria-label":`Add ${l.toLowerCase()} value`,children:s.jsx(Fs,{className:"h-4 w-4"})})]}),f&&s.jsx("p",{className:"text-xs text-slate-500 mt-1",children:f})]})},Gl=({title:l,icon:r,description:d,enabled:c,onToggle:f,expanded:h,onExpandChange:b,scheduleSummary:j,providerLabel:p,children:y,id:S})=>s.jsxs("div",{id:S,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:l}),!h&&s.jsx("p",{className:"text-xs text-slate-500 truncate",children:d})]})]}),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:[j&&s.jsx(Qa,{variant:"neutral",className:"bg-slate-800/50 text-[10px]",children:j}),p&&s.jsx(Qa,{variant:"info",className:"bg-blue-500/5 text-[10px]",children:p})]}),s.jsx("div",{onClick:T=>T.stopPropagation(),children:s.jsx(ka,{checked:c,onChange:f})}),s.jsx(eh,{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:y})})})})]}),Fl=({summary:l,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:l}),s.jsx("p",{className:"mt-1 text-xs text-slate-500",children:"Managed centrally in the Schedules tab."})]}),s.jsx(Be,{variant:"outline",size:"sm",onClick:r,className:"border-slate-700 text-slate-300 hover:bg-slate-800",children:"Open Schedules"})]}),XN=({form:l,updateField:r,handleRoadmapToggle:d,presetOptions:c,expandedJob:f,onExpandedJobChange:h,onOpenSchedule:b})=>{var y,S,T,_,k,N,C,A,P,B;const j=(M,X)=>{const ie={...l.jobProviders};X===""?delete ie[M]:ie[M]=X,r("jobProviders",ie)},p=[{label:"Use Global (default)",value:""},...c];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 lives in the Schedules tab."})]}),s.jsx("span",{className:"text-xs text-slate-500",children:"8 total jobs"})]}),s.jsx(Gl,{id:"job-section-executor",title:"PRD Executor",icon:Cn,description:"Executes PRDs to generate code and create PRs",enabled:l.executorEnabled,onToggle:M=>r("executorEnabled",M),expanded:f==="executor",onExpandChange:M=>h(M?"executor":null),scheduleSummary:ia(l.cronSchedule),providerLabel:l.jobProviders.executor?(y=c.find(M=>M.value===l.jobProviders.executor))==null?void 0:y.label:"Global",children:s.jsxs("div",{className:"space-y-6",children:[s.jsx(Fl,{summary:ia(l.cronSchedule),onOpen:()=>b("executor")}),s.jsxs("div",{className:"grid grid-cols-1 gap-6 md:grid-cols-2",children:[s.jsx(xt,{label:"Provider",value:l.jobProviders.executor??"",onChange:M=>j("executor",M),options:p}),s.jsx(ke,{label:"Max Runtime",type:"number",value:String(l.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(Gl,{id:"job-section-reviewer",title:"PR Reviewer",icon:Zx,description:"Reviews PRs and provides feedback or automated fixes",enabled:l.reviewerEnabled,onToggle:M=>r("reviewerEnabled",M),expanded:f==="reviewer",onExpandChange:M=>h(M?"reviewer":null),scheduleSummary:ia(l.reviewerSchedule),providerLabel:l.jobProviders.reviewer?(S=c.find(M=>M.value===l.jobProviders.reviewer))==null?void 0:S.label:"Global",children:s.jsxs("div",{className:"space-y-6",children:[s.jsx(Fl,{summary:ia(l.reviewerSchedule),onOpen:()=>b("reviewer")}),s.jsxs("div",{className:"grid grid-cols-1 gap-6 md:grid-cols-2",children:[s.jsx(xt,{label:"Provider",value:l.jobProviders.reviewer??"",onChange:M=>j("reviewer",M),options:p}),s.jsx(ke,{label:"Max Runtime",type:"number",value:String(l.reviewerMaxRuntime),onChange:M=>r("reviewerMaxRuntime",Number(M.target.value||0)),rightIcon:s.jsx("span",{className:"text-xs",children:"sec"})}),s.jsx(ke,{label:"Min Review Score",type:"number",min:"0",max:"100",value:String(l.minReviewScore),onChange:M=>r("minReviewScore",Number(M.target.value||0)),helperText:"PRs below this score will be marked as 'Needs Work'"}),s.jsx(ke,{label:"Max Retries",type:"number",value:String(l.reviewerMaxRetries),onChange:M=>r("reviewerMaxRetries",Number(M.target.value||0)),helperText:"Fix attempts after initial review"}),s.jsx(ke,{label:"Retry Delay",type:"number",value:String(l.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(ke,{label:"Max PRs Per Run",type:"number",value:String(l.reviewerMaxPrsPerRun),onChange:M=>r("reviewerMaxPrsPerRun",Number(M.target.value||0)),helperText:"Hard cap on PRs processed per run (0 = unlimited)"})})]})]})}),s.jsx(Gl,{id:"job-section-qa",title:"Quality Assurance",icon:D1,description:"Automated UI testing using Playwright",enabled:l.qa.enabled,onToggle:M=>r("qa",{...l.qa,enabled:M}),expanded:f==="qa",onExpandChange:M=>h(M?"qa":null),scheduleSummary:ia(l.qa.schedule),providerLabel:l.jobProviders.qa?(T=c.find(M=>M.value===l.jobProviders.qa))==null?void 0:T.label:"Global",children:s.jsxs("div",{className:"space-y-6",children:[s.jsx(Fl,{summary:ia(l.qa.schedule),onOpen:()=>b("qa")}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsx(xt,{label:"Provider",value:l.jobProviders.qa??"",onChange:M=>j("qa",M),options:p}),s.jsx(ke,{label:"Max Runtime",type:"number",value:String(l.qa.maxRuntime),onChange:M=>r("qa",{...l.qa,maxRuntime:Number(M.target.value||0)}),rightIcon:s.jsx("span",{className:"text-xs",children:"sec"})}),s.jsx(xt,{label:"Artifacts",value:l.qa.artifacts,onChange:M=>r("qa",{...l.qa,artifacts:M}),options:[{label:"Screenshots",value:"screenshot"},{label:"Videos",value:"video"},{label:"Both",value:"both"}]}),s.jsx(ke,{label:"Skip Label",value:l.qa.skipLabel,onChange:M=>r("qa",{...l.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(ka,{checked:l.qa.autoInstallPlaywright,onChange:M=>r("qa",{...l.qa,autoInstallPlaywright:M})})]})]}),s.jsx(fu,{label:"QA Branch Patterns",value:l.qa.branchPatterns,onChange:M=>r("qa",{...l.qa,branchPatterns:M}),placeholder:"e.g., qa/, test/",helpText:"Branch patterns to match for QA"})]})}),s.jsx(Gl,{id:"job-section-audit",title:"Code Audit",icon:yu,description:"Automated code quality and security audits",enabled:l.audit.enabled,onToggle:M=>r("audit",{...l.audit,enabled:M}),expanded:f==="audit",onExpandChange:M=>h(M?"audit":null),scheduleSummary:ia(l.audit.schedule),providerLabel:l.jobProviders.audit?(_=c.find(M=>M.value===l.jobProviders.audit))==null?void 0:_.label:"Global",children:s.jsxs("div",{className:"space-y-6",children:[s.jsx(Fl,{summary:ia(l.audit.schedule),onOpen:()=>b("audit")}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsx(xt,{label:"Provider",value:l.jobProviders.audit??"",onChange:M=>j("audit",M),options:p}),s.jsx(ke,{label:"Max Runtime",type:"number",value:String(l.audit.maxRuntime),onChange:M=>r("audit",{...l.audit,maxRuntime:Number(M.target.value||0)}),rightIcon:s.jsx("span",{className:"text-xs",children:"sec"})}),s.jsx(xt,{label:"Target Column",value:l.audit.targetColumn,onChange:M=>r("audit",{...l.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(Gl,{id:"job-section-slicer",title:"Planner",icon:Xx,description:"Generate one PRD per run using ROADMAP.md or audit findings",enabled:l.roadmapScanner.enabled,onToggle:d,expanded:f==="slicer",onExpandChange:M=>h(M?"slicer":null),scheduleSummary:ia(l.roadmapScanner.slicerSchedule),providerLabel:l.jobProviders.slicer?(k=c.find(M=>M.value===l.jobProviders.slicer))==null?void 0:k.label:"Global",children:s.jsxs("div",{className:"space-y-6",children:[s.jsx(Fl,{summary:ia(l.roadmapScanner.slicerSchedule),onOpen:()=>b("slicer")}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsx(xt,{label:"Provider",value:l.jobProviders.slicer??"",onChange:M=>j("slicer",M),options:p}),s.jsx(ke,{label:"Roadmap File Path",value:l.roadmapScanner.roadmapPath,onChange:M=>r("roadmapScanner",{...l.roadmapScanner,roadmapPath:M.target.value}),helperText:"Primary planning source (relative to project root)."}),s.jsx(ke,{label:"Max Runtime",type:"number",value:String(l.roadmapScanner.slicerMaxRuntime||""),onChange:M=>r("roadmapScanner",{...l.roadmapScanner,slicerMaxRuntime:Number(M.target.value||0)}),rightIcon:s.jsx("span",{className:"text-xs",children:"sec"})}),s.jsx(xt,{label:"Priority Mode",value:l.roadmapScanner.priorityMode||"roadmap-first",onChange:M=>r("roadmapScanner",{...l.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(xt,{label:"Issue Column",value:l.roadmapScanner.issueColumn||"Ready",onChange:M=>r("roadmapScanner",{...l.roadmapScanner,issueColumn:M==="Draft"?"Draft":"Ready"}),options:[{label:"Ready (default)",value:"Ready"},{label:"Draft",value:"Draft"}]})]})]})}),s.jsx(Gl,{id:"job-section-analytics",title:"Analytics (Amplitude)",icon:Px,description:"Fetch Amplitude data, analyze with AI, and create board issues",enabled:l.analytics.enabled,onToggle:M=>r("analytics",{...l.analytics,enabled:M}),expanded:f==="analytics",onExpandChange:M=>h(M?"analytics":null),scheduleSummary:ia(l.analytics.schedule),providerLabel:l.jobProviders.analytics?(N=c.find(M=>M.value===l.jobProviders.analytics))==null?void 0:N.label:"Global",children:s.jsxs("div",{className:"space-y-6",children:[s.jsx(Fl,{summary:ia(l.analytics.schedule),onOpen:()=>b("analytics")}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsx(xt,{label:"Provider",value:l.jobProviders.analytics??"",onChange:M=>j("analytics",M),options:p}),s.jsx(ke,{label:"Amplitude API Key",value:((C=l.providerEnv)==null?void 0:C.AMPLITUDE_API_KEY)??"",onChange:M=>r("providerEnv",{...l.providerEnv,AMPLITUDE_API_KEY:M.target.value}),placeholder:"Required"}),s.jsx(ke,{label:"Amplitude Secret Key",type:"password",value:((A=l.providerEnv)==null?void 0:A.AMPLITUDE_SECRET_KEY)??"",onChange:M=>r("providerEnv",{...l.providerEnv,AMPLITUDE_SECRET_KEY:M.target.value}),placeholder:"Required"}),s.jsx(ke,{label:"Max Runtime",type:"number",value:String(l.analytics.maxRuntime),onChange:M=>r("analytics",{...l.analytics,maxRuntime:Number(M.target.value||0)}),rightIcon:s.jsx("span",{className:"text-xs",children:"sec"})}),s.jsx(ke,{label:"Lookback Days",type:"number",min:"1",max:"90",value:String(l.analytics.lookbackDays),onChange:M=>r("analytics",{...l.analytics,lookbackDays:Math.max(1,Math.min(90,Number(M.target.value||7)))})}),s.jsx(xt,{label:"Target Column",value:l.analytics.targetColumn,onChange:M=>r("analytics",{...l.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:l.analytics.analysisPrompt??"",onChange:M=>r("analytics",{...l.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(Gl,{id:"job-section-pr-resolver",title:"PR Resolver",icon:Wx,description:"Repo-wide conflict resolver that rebases PRs and applies feedback",enabled:l.prResolver.enabled,onToggle:M=>r("prResolver",{...l.prResolver,enabled:M}),expanded:f==="pr-resolver",onExpandChange:M=>h(M?"pr-resolver":null),scheduleSummary:ia(l.prResolver.schedule),providerLabel:l.jobProviders["pr-resolver"]?(P=c.find(M=>M.value===l.jobProviders["pr-resolver"]))==null?void 0:P.label:"Global",children:s.jsxs("div",{className:"space-y-6",children:[s.jsx(Fl,{summary:ia(l.prResolver.schedule),onOpen:()=>b("pr-resolver")}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsx(xt,{label:"Provider",value:l.jobProviders["pr-resolver"]??"",onChange:M=>j("pr-resolver",M),options:p}),s.jsx(ke,{label:"Max Runtime",type:"number",value:String(l.prResolver.maxRuntime),onChange:M=>r("prResolver",{...l.prResolver,maxRuntime:Number(M.target.value||0)}),rightIcon:s.jsx("span",{className:"text-xs",children:"sec"})}),s.jsx(ke,{label:"Per-PR Timeout",type:"number",value:String(l.prResolver.perPrTimeout),onChange:M=>r("prResolver",{...l.prResolver,perPrTimeout:Math.max(0,Number(M.target.value||0))}),rightIcon:s.jsx("span",{className:"text-xs",children:"sec"})}),s.jsx(ke,{label:"Max PRs Per Run",type:"number",min:"0",value:String(l.prResolver.maxPrsPerRun),onChange:M=>r("prResolver",{...l.prResolver,maxPrsPerRun:Math.max(0,Number(M.target.value||0))})}),s.jsx(ke,{label:"Ready Label",value:l.prResolver.readyLabel,onChange:M=>r("prResolver",{...l.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(ka,{checked:l.prResolver.aiConflictResolution,onChange:M=>r("prResolver",{...l.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(ka,{checked:l.prResolver.aiReviewResolution,onChange:M=>r("prResolver",{...l.prResolver,aiReviewResolution:M})})]})]}),s.jsx(fu,{label:"PR Resolver Branch Patterns",value:l.prResolver.branchPatterns,onChange:M=>r("prResolver",{...l.prResolver,branchPatterns:M}),placeholder:"e.g., feat/, night-watch/",helpText:"Branch patterns to filter PRs (empty = all)"})]})}),s.jsx(Gl,{id:"job-section-merger",title:"Merge Orchestrator",icon:th,description:"Repo-wide PR merge coordinator — scans, rebases, and merges",enabled:l.merger.enabled,onToggle:M=>r("merger",{...l.merger,enabled:M}),expanded:f==="merger",onExpandChange:M=>h(M?"merger":null),scheduleSummary:ia(l.merger.schedule),providerLabel:l.jobProviders.merger?(B=c.find(M=>M.value===l.jobProviders.merger))==null?void 0:B.label:"Global",children:s.jsxs("div",{className:"space-y-6",children:[s.jsx(Fl,{summary:ia(l.merger.schedule),onOpen:()=>b("merger")}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsx(xt,{label:"Provider",value:l.jobProviders.merger??"",onChange:M=>j("merger",M),options:p}),s.jsx(ke,{label:"Max Runtime",type:"number",value:String(l.merger.maxRuntime),onChange:M=>r("merger",{...l.merger,maxRuntime:Number(M.target.value||0)}),rightIcon:s.jsx("span",{className:"text-xs",children:"sec"})}),s.jsx(xt,{label:"Merge Method",value:l.merger.mergeMethod,onChange:M=>r("merger",{...l.merger,mergeMethod:M}),options:[{label:"Squash",value:"squash"},{label:"Merge",value:"merge"},{label:"Rebase",value:"rebase"}]}),s.jsx(ke,{label:"Min Review Score",type:"number",min:"0",max:"100",value:String(l.merger.minReviewScore),onChange:M=>r("merger",{...l.merger,minReviewScore:Math.max(0,Math.min(100,Number(M.target.value||0)))})}),s.jsx(ke,{label:"Max PRs Per Run",type:"number",min:"0",value:String(l.merger.maxPrsPerRun),onChange:M=>r("merger",{...l.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(ka,{checked:l.merger.rebaseBeforeMerge,onChange:M=>r("merger",{...l.merger,rebaseBeforeMerge:M})})]}),s.jsx(fu,{label:"Merger Branch Patterns",value:l.merger.branchPatterns,onChange:M=>r("merger",{...l.merger,branchPatterns:M}),placeholder:"e.g., feat/, night-watch/"})]})})]})})},qv="5 * * * *",Vv="25 */3 * * *",JN={enabled:!0,roadmapPath:"ROADMAP.md",autoScanInterval:300,slicerSchedule:"35 */6 * * *",slicerMaxRuntime:600,priorityMode:"roadmap-first",issueColumn:"Ready"},dx={enabled:!0,schedule:"45 2,10,18 * * *",maxRuntime:3600,branchPatterns:[],artifacts:"both",skipLabel:"skip-qa",autoInstallPlaywright:!0},KN={enabled:!0,schedule:"50 3 * * 1",maxRuntime:1800,targetColumn:"Draft"},ej={enabled:!1,schedule:"0 6 * * 1",maxRuntime:900,lookbackDays:7,targetColumn:"Draft",analysisPrompt:""},fx={enabled:!0,schedule:"15 6,14,22 * * *",maxRuntime:3600,branchPatterns:[],maxPrsPerRun:0,perPrTimeout:600,aiConflictResolution:!0,aiReviewResolution:!1,readyLabel:"ready-to-merge"},hx={enabled:!1,schedule:"55 */4 * * *",maxRuntime:1800,mergeMethod:"squash",minReviewScore:80,branchPatterns:[],rebaseBeforeMerge:!0,maxPrsPerRun:0};function Il(){return{...JN}}function Bv(){return{...dx,branchPatterns:[...dx.branchPatterns]}}function Yv(){return{...KN}}function oh(){return{...ej}}function Ps(){return{...fx,branchPatterns:[...fx.branchPatterns]}}function Yr(){return{...hx,branchPatterns:[...hx.branchPatterns]}}const ro=["claude","claude-sonnet-4-6","claude-opus-4-6","codex","glm-47","glm-5"],$v={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"}}},tj={enabled:!0,mode:"conservative",maxConcurrency:1,maxWaitTime:7200,priority:{executor:50,reviewer:40,slicer:30,qa:20,audit:10},providerBuckets:{}},aj=["executor","reviewer","qa","audit","slicer","analytics","pr-resolver","merger"],nj=new Set(["queue","schedules","jobs"]),_f=l=>{if(!l)return null;const r=l==="planner"?"slicer":l;return["executor","reviewer","qa","audit","slicer","analytics","pr-resolver","merger"].includes(r)?r:null},mx=l=>({cronSchedule:l.cronSchedule||qv,reviewerSchedule:l.reviewerSchedule||Vv,scheduleBundleId:l.scheduleBundleId??null,cronScheduleOffset:l.cronScheduleOffset??0,schedulingPriority:l.schedulingPriority??3,executorEnabled:l.executorEnabled??!0,reviewerEnabled:l.reviewerEnabled??!1,maxRuntime:l.maxRuntime??3600,reviewerMaxRuntime:l.reviewerMaxRuntime??1800,maxRetries:l.maxRetries??3,reviewerMaxRetries:l.reviewerMaxRetries??2,reviewerRetryDelay:l.reviewerRetryDelay??30,reviewerMaxPrsPerRun:l.reviewerMaxPrsPerRun??0,minReviewScore:l.minReviewScore??70,branchPatterns:l.branchPatterns||[],providerEnv:l.providerEnv||{},jobProviders:l.jobProviders||{},providerPresets:l.providerPresets??{},qa:l.qa||Bv(),audit:l.audit||Yv(),analytics:l.analytics||oh(),prResolver:l.prResolver??Ps(),merger:l.merger??Yr(),roadmapScanner:l.roadmapScanner||Il(),queue:l.queue||tj}),lj=()=>{var Kl,An,Qs,rl,Ie,il,ht,Lt,Dt;const l=Rn(),{addToast:r,selectedProjectId:d,globalModeLoading:c}=Pt(),[f,h]=U.useState(!1),[b,j]=U.useState(!1),[p,y]=U.useState(!1),[S,T]=U.useState(null),[_,k]=U.useState([]),[N,C]=U.useState(null),[A,P]=U.useState(null),[B,M]=U.useState("queue"),[X,ie]=U.useState(null),[G,Z]=U.useState(null),[R,ee]=U.useState(null),[O,ae]=U.useState("template"),[ne,he]=U.useState(""),[ve,ce]=U.useState(!1),[$,te]=U.useState(!1),fe=U.useRef(null),me=U.useRef(!1),_e=U.useRef(null),{data:L,loading:se,error:ge,refetch:ye}=hn(nv,[d],{enabled:!c}),{data:we,loading:xe,refetch:Ce}=hn(rh,[d],{enabled:!c});U.useEffect(()=>{if(c)return;const le=()=>{ye(),Ag().then(C).catch(()=>{}),L2(24).then(P).catch(()=>{}),O2().then(k).catch(()=>{})};le();const pe=setInterval(le,3e4);return()=>clearInterval(pe)},[d,c,ye]),U.useEffect(()=>{var He,pt;if(!we)return;if(me.current){me.current=!1;return}const le=mx(we);ee(le),fe.current=le;const pe=Af(le.scheduleBundleId,le.cronSchedule,le.reviewerSchedule,le.qa.schedule,le.audit.schedule,le.roadmapScanner.slicerSchedule??Il().slicerSchedule,((He=le.prResolver)==null?void 0:He.schedule)??Ps().schedule,((pt=le.merger)==null?void 0:pt.schedule)??Yr().schedule);ae(pe?"template":"custom"),he((pe==null?void 0:pe.id)??""),ce(!1)},[we]),U.useEffect(()=>{!R||!fe.current||ce(JSON.stringify(R)!==JSON.stringify(fe.current))},[R]),U.useEffect(()=>{if(B!=="jobs"||!X)return;const le=window.setTimeout(()=>{const pe=document.getElementById(`job-section-${X}`);pe&&pe.scrollIntoView({behavior:"smooth",block:"center"})},100);return()=>window.clearTimeout(le)},[B,X]),U.useEffect(()=>{if(B!=="schedules"||O!=="custom"||!G)return;const le=G,pe=window.setTimeout(()=>{const He=document.getElementById(`job-schedule-${le}`);He&&He.scrollIntoView({behavior:"smooth",block:"center"}),Z(null)},100);return()=>window.clearTimeout(pe)},[B,O,G]);const Pe=(le,pe)=>{ee(He=>He&&{...He,[le]:pe})},Qe=()=>{var pe,He;if(ae("template"),!R)return;const le=Af(R.scheduleBundleId,R.cronSchedule,R.reviewerSchedule,R.qa.schedule,R.audit.schedule,R.roadmapScanner.slicerSchedule??Il().slicerSchedule,((pe=R.prResolver)==null?void 0:pe.schedule)??Ps().schedule,((He=R.merger)==null?void 0:He.schedule)??Yr().schedule);le&&(he(le.id),Pe("scheduleBundleId",le.id))},Rt=()=>{ae("custom"),Pe("scheduleBundleId",null),he("")},oa=le=>{const pe=_f(le);pe&&(O!=="custom"&&Rt(),M("schedules"),Z(pe))},mn=le=>{he(le.id),ee(pe=>pe&&{...pe,cronSchedule:le.schedules.executor,reviewerSchedule:le.schedules.reviewer,scheduleBundleId:le.id,qa:{...pe.qa,schedule:le.schedules.qa},audit:{...pe.audit,schedule:le.schedules.audit},roadmapScanner:{...pe.roadmapScanner,slicerSchedule:le.schedules.slicer},prResolver:{...pe.prResolver,schedule:le.schedules.prResolver},merger:{...pe.merger,schedule:le.schedules.merger}})},Xa=async()=>{if(R){te(!0);try{const le={};for(const ta of aj){const xn=R.jobProviders[ta];typeof xn=="string"&&xn.trim().length>0?le[ta]=xn:we!=null&&we.jobProviders[ta]&&(le[ta]=null)}const pe=await no({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:le,qa:R.qa,audit:R.audit,analytics:R.analytics,prResolver:R.prResolver,merger:R.merger,roadmapScanner:R.roadmapScanner,queue:R.queue}),He=mx(pe);ee(He),fe.current=He,ce(!1);let pt="";try{await du()}catch(ta){pt=ta instanceof Error?ta.message:"Failed to reinstall cron"}r(pt?{title:"Saved (Cron Reinstall Failed)",message:pt,type:"warning"}:{title:"Saved",message:"Configuration updated and cron schedules reinstalled.",type:"success"}),me.current=!0,Ce()}catch(le){r({title:"Save Failed",message:le instanceof Error?le.message:"Failed to save configuration",type:"error"})}finally{te(!1)}}},da=()=>{var le,pe;if(fe.current){ee(fe.current);const He=fe.current,pt=Af(He.scheduleBundleId,He.cronSchedule,He.reviewerSchedule,He.qa.schedule,He.audit.schedule,He.roadmapScanner.slicerSchedule??Il().slicerSchedule,((le=He.prResolver)==null?void 0:le.schedule)??Ps().schedule,((pe=He.merger)==null?void 0:pe.schedule)??Yr().schedule);ae(pt?"template":"custom"),he((pt==null?void 0:pt.id)??""),ce(!1)}},fa=async le=>{try{const pe=await uv(le);Pe("roadmapScanner",pe.roadmapScanner);let He="";try{await du()}catch(pt){He=pt instanceof Error?pt.message:"Failed to reinstall cron"}r(He?{title:"Saved (Cron Reinstall Failed)",message:He,type:"warning"}:{title:le?"Roadmap Scanner Enabled":"Roadmap Scanner Disabled",message:`Roadmap scanner has been ${le?"enabled":"disabled"}.`,type:"success"})}catch(pe){r({title:"Toggle Failed",message:pe instanceof Error?pe.message:"Failed to toggle roadmap scanner",type:"error"})}},gn=async()=>{if(L){h(!0);try{L.paused?(await du(),r({title:"Schedule Resumed",message:"Cron schedules are active.",type:"success"})):(await sv(),r({title:"Schedule Paused",message:"Cron schedules are deactivated.",type:"info"})),ye()}catch(le){r({title:"Action Failed",message:le instanceof Error?le.message:"Toggle failed",type:"error"})}finally{h(!1)}}},Gt=async()=>{if(window.confirm("Are you sure you want to clear all pending jobs?")){j(!0);try{const le=await H2();r({title:"Queue Cleared",message:`Removed ${le.cleared} pending jobs.`,type:"success"}),Ag().then(C)}catch(le){r({title:"Clear Failed",message:le instanceof Error?le.message:"Failed to clear queue",type:"error"})}finally{j(!1)}}},ea=async le=>{if(R){te(!0);try{await no({queue:{...R.queue,...le}}),Pe("queue",{...R.queue,...le}),r({title:"Settings Saved",message:"Queue configuration updated.",type:"success"}),Ce()}catch(pe){r({title:"Save Failed",message:pe instanceof Error?pe.message:"Save failed",type:"error"})}finally{te(!1)}}},Ea=async le=>{const pe=le==="planner"?"slicer":le;T(le);try{await lv(pe),r({title:"Job Triggered",message:`${le} job queued successfully.`,type:"success"})}catch(He){r({title:"Trigger Failed",message:He instanceof Error?He.message:"Failed to trigger job",type:"error"})}finally{T(null)}},Ja=le=>{const pe=_f(le);pe&&(M("jobs"),ie(pe))};U.useEffect(()=>{if(!R||_e.current===l.search)return;_e.current=l.search;const le=new URLSearchParams(l.search),pe=le.get("tab"),He=le.get("mode"),pt=_f(le.get("jobType"));if(pe&&nj.has(pe)){if(pe==="jobs"){M("jobs"),pt&&ie(pt);return}if(pe==="schedules"){if(pt){oa(pt);return}M("schedules"),He==="custom"&&O!=="custom"&&Rt(),He==="template"&&O!=="template"&&Qe();return}M(pe);return}He==="custom"&&O!=="custom"&&(M("schedules"),Rt()),He==="template"&&O!=="template"&&(M("schedules"),Qe())},[l.search,R,O]);const Xl=U.useMemo(()=>{const le={...$v,...(R==null?void 0:R.providerPresets)??{}};return Object.entries(le).map(([pe,He])=>({label:He.name||pe,value:pe}))},[R==null?void 0:R.providerPresets]);if(se||xe)return s.jsx("div",{className:"flex items-center justify-center min-h-[400px] text-slate-500",children:"Loading automation state..."});if(ge||!L||!we)return s.jsxs("div",{className:"flex flex-col items-center justify-center min-h-[400px] space-y-4",children:[s.jsx(Mn,{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(Be,{onClick:()=>{ye(),Ce()},children:"Retry"})]});const Dn=L.paused,Wr=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(ft,{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(Rg,{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(Be,{variant:"ghost",size:"sm",onClick:Gt,loading:b,disabled:!(N!=null&&N.items.length),className:"text-slate-500 hover:text-red-400 hover:bg-red-400/10",children:[s.jsx(Fr,{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 ${p?"text-indigo-400 bg-slate-800":"text-slate-500"}`,onClick:()=>y(!p),title:"Queue Settings",children:s.jsx(Mg,{className:"h-5 w-5"})})]})]}),s.jsx("div",{className:`transition-all duration-300 overflow-hidden ${p?"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(xt,{label:"Dispatch Mode",value:((Kl=R==null?void 0:R.queue)==null?void 0:Kl.mode)||"auto",onChange:le=>ea({mode:le}),options:[{label:"Auto (Recommended)",value:"auto"},{label:"Conservative (1 at a time)",value:"conservative"},{label:"Provider-aware",value:"provider-aware"}]}),s.jsx(ke,{label:"Max Concurrency",type:"number",min:"1",max:"20",value:String(((An=R==null?void 0:R.queue)==null?void 0:An.maxConcurrency)||1),onChange:le=>ea({maxConcurrency:Number(le.target.value)})}),s.jsx("div",{className:"md:col-span-2 flex items-center gap-3",children:s.jsx(ka,{label:"Coordinator Enabled",checked:((Qs=R==null?void 0:R.queue)==null?void 0:Qs.enabled)??!0,onChange:le=>ea({enabled:le})})})]})}),s.jsx("div",{className:"p-0",children:N!=null&&N.items.length?s.jsx("div",{className:"overflow-x-auto",children:s.jsxs("table",{className:"w-full text-left text-sm",children:[s.jsx("thead",{className:"text-[11px] uppercase tracking-wider text-slate-500 font-semibold bg-slate-900/20",children:s.jsxs("tr",{children:[s.jsx("th",{className:"px-6 py-3",children:"Job / Project"}),s.jsx("th",{className:"px-6 py-3",children:"Status"}),s.jsx("th",{className:"px-6 py-3",children:"Wait Time"}),s.jsx("th",{className:"px-6 py-3 text-right",children:"Actions"})]})}),s.jsx("tbody",{className:"divide-y divide-slate-800/40",children:N.items.map(le=>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:le.jobType}),s.jsx("div",{className:"text-[11px] text-slate-500 truncate max-w-[200px]",title:le.projectPath,children:le.projectName||le.projectPath})]}),s.jsx("td",{className:"px-6 py-4",children:s.jsx(Qa,{variant:le.status==="running"?"info":"neutral",className:"text-[10px]",children:le.status})}),s.jsx("td",{className:"px-6 py-4 text-slate-400 font-mono text-xs",children:ox(new Date(le.enqueuedAt*1e3))}),s.jsx("td",{className:"px-6 py-4 text-right",children:s.jsx("button",{onClick:()=>Ja(le.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(Mg,{className:"h-4 w-4"})})})]},le.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(Cg,{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(to,{className:"h-3 w-3 animate-spin-slow"})," Live Update"]})]}),s.jsx(Lv,{configs:_,currentProjectId:d??void 0,onEditJob:(le,pe)=>Ja(pe),queueStatus:N,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(ft,{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(le=>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:le.jobType})}),s.jsx("td",{className:"px-6 py-4",children:s.jsx(Qa,{variant:le.status==="finished"?"success":le.status==="failed"?"error":"neutral",className:"text-[10px]",children:le.status})}),s.jsx("td",{className:"px-6 py-4 text-slate-400",children:le.durationSeconds?`${le.durationSeconds}s`:"--"}),s.jsx("td",{className:"px-6 py-4 text-slate-500 text-xs",children:ox(new Date(le.startedAt*1e3))}),s.jsx("td",{className:"px-6 py-4 text-right text-slate-500 font-mono text-xs",children:le.providerKey||"default"})]},le.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(ft,{className:"p-5 space-y-4 border-slate-800 bg-slate-900/20",children:[s.jsx("h4",{className:"text-xs font-bold text-slate-500 uppercase tracking-widest",children:"Efficiency Stats"}),s.jsxs("div",{className:"grid grid-cols-1 gap-4",children:[s.jsxs("div",{className:"p-4 rounded-xl border border-slate-800 bg-slate-950/40",children:[s.jsx("div",{className:"text-[10px] text-slate-500 uppercase",children:"Avg Wait Time"}),s.jsxs("div",{className:"text-xl font-bold text-slate-200 mt-1",children:[N!=null&&N.averageWaitSeconds?(N.averageWaitSeconds/60).toFixed(1):"0"," ",s.jsx("span",{className:"text-xs font-normal text-slate-500",children:"min"})]})]}),s.jsxs("div",{className:"p-4 rounded-xl border border-slate-800 bg-slate-950/40",children:[s.jsx("div",{className:"text-[10px] text-slate-500 uppercase",children:"Oldest Pending"}),s.jsxs("div",{className:"text-xl font-bold text-slate-200 mt-1",children:[N!=null&&N.oldestPendingAge?(N.oldestPendingAge/60).toFixed(1):"0"," ",s.jsx("span",{className:"text-xs font-normal text-slate-500",children:"min"})]})]})]})]}),s.jsxs(ft,{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:Cn,enabled:(R==null?void 0:R.executorEnabled)!==!1},{id:"reviewer",label:"Run Reviewer",icon:yu,enabled:(R==null?void 0:R.reviewerEnabled)??!1},{id:"qa",label:"Run QA",icon:Rg,enabled:((rl=R==null?void 0:R.qa)==null?void 0:rl.enabled)??!1},{id:"audit",label:"Run Audit",icon:Cg,enabled:((Ie=R==null?void 0:R.audit)==null?void 0:Ie.enabled)??!1},{id:"planner",label:"Run Planner",icon:Xx,enabled:((il=R==null?void 0:R.roadmapScanner)==null?void 0:il.enabled)??!1},{id:"analytics",label:"Run Analytics",icon:Px,enabled:((ht=R==null?void 0:R.analytics)==null?void 0:ht.enabled)??!1},{id:"pr-resolver",label:"Run PR Resolver",icon:Wx,enabled:((Lt=R==null?void 0:R.prResolver)==null?void 0:Lt.enabled)??!1},{id:"merger",label:"Run Merger",icon:th,enabled:((Dt=R==null?void 0:R.merger)==null?void 0:Dt.enabled)??!1}].map(le=>s.jsxs("button",{onClick:()=>Ea(le.id),disabled:S===le.id||!le.enabled,className:`w-full flex items-center justify-between p-3 rounded-lg text-sm transition-colors group disabled:cursor-not-allowed ${le.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(le.icon,{className:`h-4 w-4 ${le.enabled?"text-slate-500 group-hover:text-indigo-400":"text-slate-700"}`}),le.label]}),S===le.id?s.jsx(to,{className:"h-3 w-3 animate-spin text-indigo-400"}):le.enabled?s.jsx(Cn,{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"})]},le.id))})]})]})]}),Ft=R?s.jsx(IN,{form:{cronSchedule:R.cronSchedule,reviewerSchedule:R.reviewerSchedule,qa:R.qa,audit:R.audit,analytics:R.analytics,roadmapScanner:{...R.roadmapScanner,slicerSchedule:R.roadmapScanner.slicerSchedule??Il().slicerSchedule},prResolver:R.prResolver,merger:R.merger,scheduleBundleId:R.scheduleBundleId,schedulingPriority:R.schedulingPriority,cronScheduleOffset:R.cronScheduleOffset,globalQueueEnabled:R.queue.enabled},scheduleMode:O,selectedTemplateId:ne,onFieldChange:(le,pe)=>{if(le==="globalQueueEnabled"){Pe("queue",{...R.queue,enabled:!!pe});return}Pe(le,pe)},onSwitchToTemplate:Qe,onSwitchToCustom:Rt,onApplyTemplate:mn}):null,Ws=[{id:"queue",label:"Queue",content:Wr},{id:"schedules",label:"Schedules",content:Ft},{id:"jobs",label:"Jobs",content:R?s.jsx(XN,{form:R,updateField:Pe,handleRoadmapToggle:fa,presetOptions:Xl,expandedJob:X,onExpandedJobChange:ie,onOpenSchedule:oa}):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:Dn?"warning":"success",className:"px-3 py-1 text-xs uppercase tracking-wider",children:Dn?"Paused":"Active"})]}),s.jsx("p",{className:"text-sm text-slate-400 mt-1",children:"Manage jobs, schedules, and live queue"})]}),s.jsx(Be,{variant:Dn?"primary":"outline",size:"lg",className:Dn?"bg-emerald-600 hover:bg-emerald-700":"border-slate-700 hover:bg-slate-800",onClick:gn,loading:f,children:Dn?s.jsxs(s.Fragment,{children:[s.jsx(Cn,{className:"h-5 w-5 mr-2 fill-current"})," Resume Scheduling"]}):s.jsxs(s.Fragment,{children:[s.jsx(eo,{className:"h-5 w-5 mr-2"})," Pause Scheduling"]})})]}),s.jsx(ov,{tabs:Ws,activeTab:B,onChange:M}),ve&&B!=="queue"&&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(Be,{variant:"ghost",size:"sm",onClick:da,className:"text-slate-400",children:[s.jsx(ah,{className:"h-4 w-4 mr-1.5"}),"Reset"]}),s.jsxs(Be,{variant:"primary",size:"sm",onClick:Xa,loading:$,children:[s.jsx(Jx,{className:"h-4 w-4 mr-1.5"}),"Save"]})]})]})})]})},sj=({isOpen:l,onClose:r,title:d,children:c})=>(U.useEffect(()=>{const f=h=>{h.key==="Escape"&&r()};return l&&(document.addEventListener("keydown",f),document.body.style.overflow="hidden"),()=>{document.removeEventListener("keydown",f),document.body.style.overflow="unset"}},[l,r]),l?Jb.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:d}),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(Zr,{className:"h-5 w-5"})})]}),s.jsx("div",{className:"flex-1 overflow-y-auto px-6 py-6 text-slate-300",children:c})]})]}),document.body):null),rj=l=>["TOKEN","SECRET","KEY","PASSWORD","AUTH","API_KEY"].some(d=>l.toUpperCase().includes(d)),ij=({value:l,isSensitive:r})=>{const[d,c]=ze.useState(!1);return r?s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{className:"text-sm text-slate-300 font-mono",children:d?l:"***********"}),s.jsx("button",{type:"button",onClick:()=>c(!d),className:"text-slate-500 hover:text-slate-300","aria-label":d?"Hide sensitive value":"Show sensitive value",title:d?"Hide sensitive value":"Show sensitive value",children:d?s.jsx(H1,{className:"h-4 w-4"}):s.jsx(Zx,{className:"h-4 w-4"})})]}):s.jsx("span",{className:"text-sm text-slate-300 font-mono truncate max-w-xs",children:l})},Pv=({envVars:l,onChange:r,compact:d=!1})=>{const[c,f]=ze.useState(""),[h,b]=ze.useState(""),[j,p]=ze.useState(null),[y,S]=ze.useState(""),{addToast:T}=Pt(),_=()=>{if(c.trim()){if(!/^[A-Z_][A-Z0-9_]*$/.test(c)){T({title:"Invalid Key Format",message:"Key must be uppercase with underscores (e.g., API_KEY)",type:"error"});return}r({...l,[c]:h}),f(""),b("")}},k=B=>{const M={...l};delete M[B],r(M)},N=B=>{p(B),S(l[B]??"")},C=()=>{j&&(r({...l,[j]:y}),p(null),S(""))},A=()=>{p(null),S("")},P=Object.entries(l);return s.jsxs("div",{className:"space-y-4",children:[!d&&s.jsx("div",{className:"text-sm text-slate-400 mb-4",children:"Configure environment variables passed to the provider CLI (API keys, base URLs)"}),s.jsx("div",{className:"space-y-2",children:P.length===0?s.jsx("p",{className:"text-slate-500 text-sm italic",children:"No environment variables configured."}):P.map(([B,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:B}),j===B?s.jsxs("div",{className:"flex items-center gap-2 flex-1",children:[s.jsx("input",{type:"text",value:y,onChange:X=>S(X.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 ${B} value`,title:`Save ${B} value`,children:s.jsx(y1,{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 ${B}`,title:`Cancel editing ${B}`,children:s.jsx(Zr,{className:"h-4 w-4"})})]}):s.jsx(ij,{value:M,isSensitive:rj(B)})]}),j!==B&&s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("button",{type:"button",onClick:()=>N(B),className:"p-1 text-slate-400 hover:text-slate-200","aria-label":`Edit ${B}`,title:`Edit ${B}`,children:s.jsx(oo,{className:"h-4 w-4"})}),s.jsx("button",{type:"button",onClick:()=>k(B),className:"p-1 text-red-400 hover:text-red-300","aria-label":`Delete ${B}`,title:`Delete ${B}`,children:s.jsx(Fr,{className:"h-4 w-4"})})]})]},B))}),s.jsxs("div",{className:`flex items-end gap-3 ${d?"":"pt-4 border-t border-slate-800"}`,children:[s.jsxs("div",{className:"flex-1",children:[!d&&s.jsx("label",{className:"block text-xs font-medium text-slate-500 mb-1",children:"Key"}),s.jsx("input",{type:"text",value:c,onChange:B=>f(B.target.value.toUpperCase()),placeholder:d?"ENV_VAR_NAME":"e.g., ANTHROPIC_BASE_URL",className:"w-full bg-slate-800 border border-slate-700 rounded px-3 py-2 text-sm text-slate-200 placeholder-slate-500"})]}),s.jsxs("div",{className:"flex-1",children:[!d&&s.jsx("label",{className:"block text-xs font-medium text-slate-500 mb-1",children:"Value"}),s.jsx("input",{type:"text",value:h,onChange:B=>b(B.target.value),placeholder:d?"value":"e.g., https://api.example.com",className:"w-full bg-slate-800 border border-slate-700 rounded px-3 py-2 text-sm text-slate-200 placeholder-slate-500"})]}),s.jsxs(Be,{onClick:_,disabled:!c.trim(),size:d?"sm":"md",children:[s.jsx(Fs,{className:"h-4 w-4 mr-1"}),"Add"]})]})]})};function uj(l,r){var d;return!!(l!=null&&l.startsWith("glm-")||(d=r==null?void 0:r.model)!=null&&d.startsWith("glm-"))}function cj(l,r){var d,c;return uj(l,r)?!((c=(d=r==null?void 0:r.envVars)==null?void 0:d.ANTHROPIC_API_KEY)!=null&&c.trim()):!1}const gx={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:""}},oj=({isOpen:l,onClose:r,onSave:d,presetId:c,preset:f,isBuiltIn:h,existingIds:b})=>{const[j,p]=ze.useState(""),[y,S]=ze.useState({name:"",command:"",subcommand:"",promptFlag:"",autoApproveFlag:"",workdirFlag:"",modelFlag:"",model:"",envVars:{}}),[T,_]=ze.useState(!1),[k,N]=ze.useState("custom"),[C,A]=ze.useState(null),P=cj(c??j,y);ze.useEffect(()=>{l&&(c&&f?(p(c),S({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??{}}),c==="claude"||f.command==="claude"?N("claude"):c==="codex"||f.command==="codex"?N("codex"):N("custom")):(p(""),S({name:"",command:"",subcommand:"",promptFlag:"",autoApproveFlag:"",workdirFlag:"",modelFlag:"",model:"",envVars:{}}),N("custom")),A(null),_(!!(f!=null&&f.envVars&&Object.keys(f.envVars).length>0)))},[l,c,f]);const B=G=>{if(N(G),G!=="custom"&&gx[G]){const Z=gx[G];S(R=>({...R,...Z,envVars:R.envVars})),!c&&!j&&p(G)}},M=(G,Z)=>{S(R=>({...R,[G]:Z})),A(null)},X=()=>{if(!y.name.trim())return A("Name is required"),!1;if(!y.command.trim())return A("Command is required"),!1;if(!c){if(!j.trim())return A("Preset ID is required"),!1;if(!/^[a-z0-9_-]+$/.test(j))return A("Preset ID must be lowercase letters, numbers, hyphens, and underscores only"),!1;if(b.includes(j))return A("A preset with this ID already exists"),!1}return!0},ie=()=>{var Z,R,ee,O,ae,ne;if(!X())return;const G={name:y.name.trim(),command:y.command.trim()};(Z=y.subcommand)!=null&&Z.trim()&&(G.subcommand=y.subcommand.trim()),(R=y.promptFlag)!=null&&R.trim()&&(G.promptFlag=y.promptFlag.trim()),(ee=y.autoApproveFlag)!=null&&ee.trim()&&(G.autoApproveFlag=y.autoApproveFlag.trim()),(O=y.workdirFlag)!=null&&O.trim()&&(G.workdirFlag=y.workdirFlag.trim()),(ae=y.modelFlag)!=null&&ae.trim()&&(G.modelFlag=y.modelFlag.trim()),(ne=y.model)!=null&&ne.trim()&&(G.model=y.model.trim()),y.envVars&&Object.keys(y.envVars).length>0&&(G.envVars=y.envVars),d(c||j,G),r()};return s.jsx(sj,{isOpen:l,onClose:r,title:c?`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}),P&&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(xt,{label:"Template",value:k,onChange:B,options:[{label:"Start from scratch",value:"custom"},{label:"Claude (Anthropic)",value:"claude"},{label:"Codex (OpenAI)",value:"codex"}],helperText:"Start with a pre-configured template or customize from scratch"})}),!c&&s.jsx(ke,{label:"Preset ID",value:j,onChange:G=>p(G.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(ke,{label:"Display Name",value:y.name,onChange:G=>M("name",G.target.value),placeholder:"e.g., My Custom Provider",required:!0}),s.jsx(ke,{label:"Command",value:y.command,onChange:G=>M("command",G.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(ke,{label:"Model",value:y.model??"",onChange:G=>M("model",G.target.value),placeholder:"e.g., claude-opus-4-6",helperText:"Default model to use"}),s.jsx(ke,{label:"Model Flag",value:y.modelFlag??"",onChange:G=>M("modelFlag",G.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:()=>_(!T),className:"flex items-center gap-2 text-sm text-slate-400 hover:text-slate-200 transition-colors",children:[T?s.jsx(E1,{className:"h-4 w-4"}):s.jsx(eh,{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(ke,{label:"Subcommand",value:y.subcommand??"",onChange:G=>M("subcommand",G.target.value),placeholder:"e.g., exec",helperText:"Subcommand after base command"}),s.jsx(ke,{label:"Prompt Flag",value:y.promptFlag??"",onChange:G=>M("promptFlag",G.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(ke,{label:"Auto-Approve Flag",value:y.autoApproveFlag??"",onChange:G=>M("autoApproveFlag",G.target.value),placeholder:"e.g., --dangerously-skip-permissions",helperText:"Flag to enable auto-approve mode"}),s.jsx(ke,{label:"Workdir Flag",value:y.workdirFlag??"",onChange:G=>M("workdirFlag",G.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(Pv,{envVars:y.envVars??{},onChange:G=>M("envVars",G),compact:!0})]})]})]}),s.jsxs("div",{className:"flex justify-end gap-3 pt-4 border-t border-slate-800",children:[s.jsx(Be,{variant:"ghost",onClick:r,children:"Cancel"}),s.jsx(Be,{onClick:ie,children:c?"Save Changes":"Add Preset"})]})]})})},dj=({form:l,updateField:r,projectName:d,doctorChecks:c,doctorLoading:f})=>s.jsxs("div",{className:"space-y-6",children:[s.jsx(ft,{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(ke,{label:"Project Name",value:d,disabled:!0}),s.jsx(ke,{label:"Default Branch",value:l.defaultBranch,onChange:h=>r("defaultBranch",h.target.value)}),s.jsx(ke,{label:"PRD Directory",value:l.prdDir,onChange:h=>r("prdDir",h.target.value),helperText:"Directory containing PRD files (relative to project root)"}),s.jsx(ke,{label:"Branch Prefix",value:l.branchPrefix,onChange:h=>r("branchPrefix",h.target.value)}),s.jsx(ke,{label:"Templates Directory",value:l.templatesDir,onChange:h=>r("templatesDir",h.target.value),helperText:"Directory for custom template overrides"}),s.jsx(ke,{label:"Max Log Size",type:"number",value:String(l.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(ka,{checked:l.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(fu,{label:"Branch Patterns",value:l.branchPatterns,onChange:h=>r("branchPatterns",h),placeholder:"e.g., feat/",helpText:"Branch patterns matched by reviewer and related automation jobs"}),s.jsx(fu,{label:"PRD Priority",value:l.prdPriority,onChange:h=>r("prdPriority",h),placeholder:"e.g., feature-x",helpText:"PRDs matching these names are executed first"})]})]})}),s.jsxs(ft,{className:"divide-y divide-slate-800",children:[s.jsxs("div",{className:"p-4 flex items-center gap-2",children:[s.jsx(Yx,{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..."}):c.map((h,b)=>{const j=h.status==="pass",p=h.status==="warn",y=j?"bg-green-500/10 text-green-400 border-green-500/20":p?"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 ${y}`,children:h.status.toUpperCase()})]},`${h.name}-${b}`)})]})]}),xx=({presetId:l,preset:r,isBuiltIn:d,onEdit:c,onDelete:f,onReset:h})=>{var y,S,T;const b=r.envVars?Object.keys(r.envVars).length:0,p=(l.startsWith("glm-")||((y=r.model)==null?void 0:y.startsWith("glm-")))&&!((T=(S=r.envVars)==null?void 0:S.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}),d&&s.jsx(Qa,{variant:"info",className:"text-[10px]",children:"Built-in"}),p&&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:c,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(oo,{className:"h-4 w-4"})}),d?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(ah,{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(Fr,{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: ",l]}),b>0&&s.jsxs("span",{className:"text-xs text-slate-500",children:[b," env var",b!==1?"s":""]})]})]})},$f={0:"Su",1:"Mo",2:"Tu",3:"We",4:"Th",5:"Fr",6:"Sa"},Pf={executor:"Executor",reviewer:"Reviewer",qa:"QA",audit:"Audit",slicer:"Planner",analytics:"Analytics",planner:"Planner","pr-resolver":"PR Resolver",merger:"Merger"},kf={label:"",presetId:"",days:[1,2,3,4,5],startTime:"23:00",endTime:"04:00",jobTypes:null,enabled:!0},vx=({override:l,onChange:r,onSave:d,onCancel:c,isNew:f,presetOptions:h})=>{const b=N=>{const C=l.days.includes(N)?l.days.filter(A=>A!==N):[...l.days,N].sort((A,P)=>A-P);r({...l,days:C})},j=()=>{r({...l,days:[1,2,3,4,5]})},p=()=>{r({...l,days:[0,6]})},y=()=>{r({...l,days:[0,1,2,3,4,5,6]})},S=()=>{r({...l,jobTypes:null})},T=N=>{const C=l.jobTypes??[],A=C.includes(N)?C.filter(P=>P!==N):[...C,N];r({...l,jobTypes:A.length===0?null:A})},_=l.jobTypes===null||l.jobTypes===void 0,k=l.label.trim().length>0&&l.presetId.trim().length>0&&l.days.length>0&&l.startTime.trim().length>0&&l.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(ke,{label:"Label",value:l.label,onChange:N=>r({...l,label:N.target.value}),placeholder:"e.g., Night Hours",required:!0}),s.jsx(xt,{label:"Provider",value:l.presetId,onChange:N=>r({...l,presetId:N}),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($f).map(N=>s.jsx("button",{type:"button",onClick:()=>b(N),className:`w-10 h-10 rounded-md text-sm font-medium transition-colors ${l.days.includes(N)?"bg-indigo-600 text-white":"bg-slate-800 text-slate-400 hover:bg-slate-700"}`,children:$f[N]},N)),s.jsxs("div",{className:"flex gap-1 ml-2",children:[s.jsx("button",{type:"button",onClick:j,className:"px-3 py-2 text-xs rounded-md bg-slate-800 text-slate-400 hover:bg-slate-700 transition-colors",children:"Weekdays"}),s.jsx("button",{type:"button",onClick:p,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:y,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:l.startTime,onChange:N=>r({...l,startTime:N.target.value}),className:"w-full h-10 px-3 rounded-md bg-slate-800 border border-slate-700 text-slate-200 text-sm focus:outline-none focus:ring-2 focus:ring-indigo-500"})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-slate-400 mb-2",children:"End Time"}),s.jsx("input",{type:"time",value:l.endTime,onChange:N=>r({...l,endTime:N.target.value}),className:"w-full h-10 px-3 rounded-md bg-slate-800 border border-slate-700 text-slate-200 text-sm focus:outline-none focus:ring-2 focus:ring-indigo-500"})]})]}),s.jsxs("div",{children:[s.jsxs("div",{className:"flex items-center justify-between mb-2",children:[s.jsx("label",{className:"block text-sm font-medium text-slate-400",children:"Job Types"}),s.jsx("button",{type:"button",onClick:S,className:"text-xs text-indigo-400 hover:text-indigo-300 transition-colors",children:_?"All Jobs Selected":"Select All Jobs"})]}),s.jsx("div",{className:"flex flex-wrap gap-2",children:Object.keys(Pf).filter(N=>N!=="planner").map(N=>{var A;const C=_||(((A=l.jobTypes)==null?void 0:A.includes(N))??!1);return s.jsx("button",{type:"button",onClick:()=>T(N),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:_,children:Pf[N]},N)})}),_&&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(ka,{checked:l.enabled,onChange:N=>r({...l,enabled:N}),label:"Enabled"})}),s.jsxs("div",{className:"flex justify-end gap-2 pt-2",children:[s.jsx(Be,{variant:"ghost",onClick:c,children:"Cancel"}),s.jsx(Be,{onClick:d,disabled:!k,children:f?"Add Override":"Save Changes"})]})]})},fj=({overrides:l,onChange:r,presetOptions:d})=>{const[c,f]=ze.useState(null),[h,b]=ze.useState(!1),[j,p]=ze.useState(kf),y=()=>{r([...l,j]),p({...kf}),b(!1)},S=(A,P)=>{const B=[...l];B[A]=P,r(B)},T=A=>{window.confirm("Are you sure you want to delete this schedule override?")&&r(l.filter((P,B)=>B!==A))},_=A=>{const P=[...l];P[A]={...P[A],enabled:!P[A].enabled},r(P)},k=A=>A.length===7?"Every day":A.length===5&&A.every(P=>P>=1&&P<=5)?"Weekdays":A.length===2&&A.includes(0)&&A.includes(6)?"Weekends":A.map(P=>$f[P]).join(", "),N=A=>!A||A.length===0?"All Jobs":A.map(P=>Pf[P]).join(", "),C=A=>{const P=d.find(B=>B.value===A);return(P==null?void 0:P.label)||A};return s.jsxs("div",{className:"space-y-4",children:[s.jsx("div",{className:"space-y-3",children:l.length===0?s.jsx("p",{className:"text-slate-500 text-sm italic",children:"No schedule overrides configured."}):l.map((A,P)=>s.jsx("div",{children:c===P?s.jsx(vx,{override:A,onChange:B=>S(P,B),onSave:()=>f(null),onCancel:()=>f(null),presetOptions:d}):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(ka,{checked:A.enabled,onChange:()=>_(P)}),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)})," · ",k(A.days)," · ",A.startTime," - ",A.endTime," · ",N(A.jobTypes)]})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("button",{type:"button",onClick:()=>f(P),className:"p-2 text-slate-400 hover:text-slate-200","aria-label":`Edit ${A.label}`,title:`Edit ${A.label}`,children:s.jsx(oo,{className:"h-4 w-4"})}),s.jsx("button",{type:"button",onClick:()=>T(P),className:"p-2 text-red-400 hover:text-red-300","aria-label":`Delete ${A.label}`,title:`Delete ${A.label}`,children:s.jsx(Fr,{className:"h-4 w-4"})})]})]})},P))}),h?s.jsx(vx,{override:j,onChange:p,onSave:y,onCancel:()=>{b(!1),p({...kf})},isNew:!0,presetOptions:d}):s.jsxs(Be,{variant:"ghost",onClick:()=>b(!0),children:[s.jsx(Fs,{className:"h-4 w-4 mr-2"}),"Add Schedule Override"]})]})},hj=({form:l,updateField:r,getAllPresets:d,getPresetOptions:c,handleEditPreset:f,handleDeletePreset:h,handleResetPreset:b,handleAddPreset:j})=>s.jsxs("div",{className:"space-y-6",children:[s.jsx(ft,{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(xt,{value:l.provider,onChange:p=>r("provider",p),options:c(l.providerPresets)})})]})}),s.jsxs(ft,{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(Be,{onClick:j,variant:"primary",size:"sm",children:[s.jsx(Fs,{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:[ro.map(p=>{const S=d()[p];return S?s.jsx(xx,{presetId:p,preset:S,isBuiltIn:!0,onEdit:()=>f(p),onReset:()=>b(p)},p):null}),Object.entries(l.providerPresets).filter(([p])=>!ro.includes(p)).map(([p,y])=>s.jsx(xx,{presetId:p,preset:y,isBuiltIn:!1,onEdit:()=>f(p),onDelete:()=>h(p)},p))]})]}),s.jsxs(ft,{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(xt,{label:"Primary Fallback Preset",value:l.primaryFallbackPreset,onChange:p=>r("primaryFallbackPreset",p),options:[{label:"— None —",value:""},...Object.entries(d()).map(([p,y])=>({label:y.name,value:p}))],helperText:"Automatic switch when global provider is throttled"}),s.jsx(xt,{label:"Secondary Fallback Preset",value:l.secondaryFallbackPreset,onChange:p=>r("secondaryFallbackPreset",p),options:[{label:"— None —",value:""},...Object.entries(d()).map(([p,y])=>({label:y.name,value:p}))]})]})]}),s.jsxs(ft,{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(fj,{overrides:l.providerScheduleOverrides,onChange:p=>r("providerScheduleOverrides",p),presetOptions:Object.entries(d()).map(([p,y])=>({label:y.name,value:p}))})]}),s.jsxs(ft,{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(Pv,{envVars:l.providerEnv,onChange:p=>r("providerEnv",p)})]})]});function yx(l){return l.type==="telegram"?`telegram:${l.botToken}:${l.chatId}`:`${l.type}:${l.url}`}const mj=[{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"}],gj=(l,r)=>l.includes(r)?l.filter(d=>d!==r):[...l,r],px=({webhook:l,onChange:r,onSave:d,onCancel:c,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(xt,{label:"Type",value:l.type,onChange:h=>{const b=h;r(b==="telegram"?{type:b,botToken:"",chatId:"",events:l.events}:{type:b,url:"",events:l.events})},options:[{label:"Slack",value:"slack"},{label:"Discord",value:"discord"},{label:"Telegram",value:"telegram"}]}),l.type==="telegram"?s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"relative",children:s.jsx(ke,{label:"Bot Token",type:"password",value:l.botToken||"",onChange:h=>r({...l,botToken:h.target.value}),placeholder:"123456789:ABCdefGHIjklMNOpqrsTUVwxyz"})}),s.jsx(ke,{label:"Chat ID",value:l.chatId||"",onChange:h=>r({...l,chatId:h.target.value}),placeholder:"123456789"})]}):s.jsx("div",{className:"md:col-span-2",children:s.jsx(ke,{label:"Webhook URL",type:"password",value:l.url||"",onChange:h=>r({...l,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:mj.map(h=>s.jsx("button",{type:"button",onClick:()=>r({...l,events:gj(l.events,h.value)}),className:`px-3 py-1.5 rounded-md text-sm transition-colors ${l.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(Be,{variant:"ghost",onClick:c,children:"Cancel"}),s.jsx(Be,{onClick:d,disabled:l.events.length===0||(l.type==="telegram"?!l.botToken||!l.chatId:!l.url),children:f?"Add Webhook":"Save Changes"})]})]}),xj=({notifications:l,onChange:r,globalWebhook:d,onSetGlobal:c,onUnsetGlobal:f})=>{const[h,b]=ze.useState(null),[j,p]=ze.useState(!1),[y,S]=ze.useState({type:"slack",url:"",events:[]}),T=()=>{r({webhooks:[...l.webhooks,y]}),S({type:"slack",url:"",events:[]}),p(!1)},_=(N,C)=>{const A=[...l.webhooks];A[N]=C,r({webhooks:A})},k=N=>{r({webhooks:l.webhooks.filter((C,A)=>A!==N)})};return s.jsxs("div",{className:"space-y-4",children:[s.jsx("div",{className:"text-sm text-slate-400 mb-4",children:"Receive notifications when events occur via Slack, Discord, or Telegram"}),s.jsx("div",{className:"space-y-3",children:l.webhooks.length===0?s.jsx("p",{className:"text-slate-500 text-sm italic",children:"No webhooks configured."}):l.webhooks.map((N,C)=>s.jsx("div",{children:h===C?s.jsx(px,{webhook:N,onChange:A=>_(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:N.type}),N.type==="telegram"&&s.jsxs("span",{className:"text-xs text-slate-500",children:["Chat ID: ",N.chatId]})]}),s.jsx("div",{className:"flex flex-wrap gap-1",children:N.events.map(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:[c!==void 0&&(()=>{const A=d!=null&&yx(N)===yx(d);return s.jsx("button",{type:"button",onClick:()=>A?f==null?void 0:f():c(N),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(P1,{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 ${N.type} webhook`,title:`Edit ${N.type} webhook`,children:s.jsx(oo,{className:"h-4 w-4"})}),s.jsx("button",{type:"button",onClick:()=>k(C),className:"p-2 text-red-400 hover:text-red-300","aria-label":`Delete ${N.type} webhook`,title:`Delete ${N.type} webhook`,children:s.jsx(Fr,{className:"h-4 w-4"})})]})]})},C))}),j?s.jsx(px,{webhook:y,onChange:S,onSave:T,onCancel:()=>p(!1),isNew:!0}):s.jsxs(Be,{variant:"ghost",onClick:()=>p(!0),children:[s.jsx(Fs,{className:"h-4 w-4 mr-2"}),"Add Webhook"]})]})},vj=({form:l,updateField:r,globalWebhook:d,onSetGlobal:c,onUnsetGlobal:f})=>s.jsxs("div",{className:"space-y-6",children:[s.jsxs(ft,{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(ka,{checked:l.boardProvider.enabled,onChange:h=>r("boardProvider",{...l.boardProvider,enabled:h})})]}),l.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(xt,{label:"Board Provider",value:l.boardProvider.provider,onChange:h=>r("boardProvider",{...l.boardProvider,provider:h}),options:[{label:"GitHub Projects",value:"github"},{label:"Local (SQLite)",value:"local"}]}),l.boardProvider.provider==="github"&&s.jsxs(s.Fragment,{children:[s.jsx(ke,{label:"Project Number",type:"number",value:String(l.boardProvider.projectNumber||""),onChange:h=>r("boardProvider",{...l.boardProvider,projectNumber:h.target.value?Number(h.target.value):void 0}),helperText:"GitHub Projects V2 project number"}),s.jsx(ke,{label:"Repository",value:l.boardProvider.repo||"",onChange:h=>r("boardProvider",{...l.boardProvider,repo:h.target.value||void 0}),helperText:"owner/repo (auto-detected if empty)"})]}),l.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(ft,{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(xj,{notifications:l.notifications,onChange:h=>r("notifications",h),globalWebhook:d,onSetGlobal:c,onUnsetGlobal:f})]})]});function yj(l,r,d,c){const{addToast:f}=Pt(),[h,b]=U.useState(!1),[j,p]=U.useState(null),[y,S]=U.useState(null),[T,_]=U.useState(null),k=U.useCallback(()=>({...$v,...l}),[l]),N=U.useCallback(G=>{const Z=k();return Object.entries(Z).map(([R,ee])=>({label:ee.name,value:R}))},[k]),C=U.useCallback(G=>{const Z=[];r===G&&Z.push("Global Provider");const R={executor:"Executor",reviewer:"Reviewer",qa:"QA",audit:"Audit",slicer:"Planner",analytics:"Analytics"};for(const[ee,O]of Object.entries(d))O===G&&Z.push(R[ee]??ee);return Z},[r,d]),A=U.useCallback(()=>{p(null),S(null),b(!0)},[]),P=U.useCallback(G=>{const R=k()[G];R&&(p(G),S(R),b(!0))},[k]),B=U.useCallback(async(G,Z)=>{const R=!j,ee={...l,[G]:Z};c("providerPresets",ee);try{await no({providerPresets:{[G]:Z}}),f({title:R?"Preset Added":"Preset Updated",message:R?`${Z.name} has been added. You can now assign it to jobs.`:`${Z.name} has been saved.`,type:"success"})}catch(O){f({title:"Save Failed",message:O instanceof Error?O.message:"Failed to save preset",type:"error"}),c("providerPresets",l)}},[j,l,c,f]),M=U.useCallback(G=>{var ee,O;if(ro.includes(G)){f({title:"Cannot Delete",message:"Built-in presets cannot be deleted.",type:"error"});return}const Z=C(G);if(Z.length>0){_({presetId:G,presetName:((ee=k()[G])==null?void 0:ee.name)??G,references:Z});return}const R={...l};delete R[G],c("providerPresets",R),f({title:"Preset Deleted",message:`${((O=k()[G])==null?void 0:O.name)??G} has been removed.`,type:"success"})},[l,c,f,C,k]),X=U.useCallback(G=>{const Z={...l};delete Z[G],c("providerPresets",Z),f({title:"Preset Reset",message:`${G} has been reset to built-in defaults.`,type:"success"})},[l,c,f]),ie=U.useCallback(()=>{if(!T)return;const{presetId:G}=T,Z={...l};delete Z[G],c("providerPresets",Z);const R={...d};for(const ee of Object.keys(R))R[ee]===G&&delete R[ee];c("jobProviders",R),r===G&&c("provider","claude"),_(null),f({title:"Preset Deleted",message:`${T.presetName} has been removed and all references cleared.`,type:"success"})},[T,l,d,r,c,f]);return{presetModalOpen:h,setPresetModalOpen:b,editingPresetId:j,editingPreset:y,deleteWarning:T,setDeleteWarning:_,getAllPresets:k,getPresetOptions:N,getPresetReferences:C,handleAddPreset:A,handleEditPreset:P,handleSavePreset:B,handleDeletePreset:M,handleResetPreset:X,handleConfirmDelete:ie}}const pj=["executor","reviewer","qa","audit","slicer","analytics","pr-resolver","merger"],bx=l=>({provider:l.provider,providerLabel:l.providerLabel??"",providerPresets:l.providerPresets??{},defaultBranch:l.defaultBranch,prdDir:l.prdDir||"docs/prds",branchPrefix:l.branchPrefix,branchPatterns:l.branchPatterns||[],gitPushNoVerify:l.gitPushNoVerify??!1,executorEnabled:l.executorEnabled??!0,reviewerEnabled:l.reviewerEnabled,minReviewScore:l.minReviewScore,maxRuntime:l.maxRuntime,reviewerMaxRuntime:l.reviewerMaxRuntime,maxLogSize:l.maxLogSize,cronSchedule:l.cronSchedule||qv,reviewerSchedule:l.reviewerSchedule||Vv,scheduleBundleId:l.scheduleBundleId??null,cronScheduleOffset:l.cronScheduleOffset??0,schedulingPriority:l.schedulingPriority??3,maxRetries:l.maxRetries??3,reviewerMaxRetries:l.reviewerMaxRetries??2,reviewerRetryDelay:l.reviewerRetryDelay??30,reviewerMaxPrsPerRun:l.reviewerMaxPrsPerRun??0,providerEnv:l.providerEnv||{},notifications:l.notifications||{webhooks:[]},prdPriority:l.prdPriority||[],roadmapScanner:l.roadmapScanner||Il(),templatesDir:l.templatesDir||".night-watch/templates",boardProvider:l.boardProvider||{enabled:!0,provider:"github"},jobProviders:l.jobProviders||{},fallbackOnRateLimit:l.fallbackOnRateLimit??!0,primaryFallbackModel:l.primaryFallbackModel??l.claudeModel??"sonnet",secondaryFallbackModel:l.secondaryFallbackModel??l.primaryFallbackModel??l.claudeModel??"sonnet",primaryFallbackPreset:l.primaryFallbackPreset??"",secondaryFallbackPreset:l.secondaryFallbackPreset??"",claudeModel:l.primaryFallbackModel??l.claudeModel??"sonnet",providerScheduleOverrides:l.providerScheduleOverrides??[],qa:l.qa||Bv(),audit:l.audit||Yv(),analytics:l.analytics||oh(),prResolver:l.prResolver??Ps(),merger:l.merger??Yr(),queue:l.queue||{enabled:!0,mode:"conservative",maxConcurrency:1,maxWaitTime:7200,priority:{executor:50,reviewer:40,slicer:30,qa:20,audit:10},providerBuckets:{}}}),bj=()=>{const l=Rn(),r=uo(),{addToast:d,projectName:c,selectedProjectId:f,globalModeLoading:h,isGlobalMode:b,removeProjectFromList:j}=Pt(),[p,y]=ze.useState(!1),[S,T]=ze.useState(!1),[_,k]=ze.useState(!1),[N,C]=ze.useState(null),[A,P]=ze.useState(void 0),B=ze.useRef(null),[M,X]=ze.useState(!1),ie=ze.useRef(!1),G=ze.useRef(!1),[Z,R]=ze.useState("project"),ee=ze.useMemo(()=>{const xe=new URLSearchParams(l.search).get("tab");return xe==="jobs"||xe==="schedules"?xe:null},[l.search]),{data:O,loading:ae,error:ne,refetch:he}=hn(rh,[f],{enabled:!h}),{data:ve,loading:ce,refetch:$}=hn(R2,[f],{enabled:!h}),te=ve??[],fe=(xe,Ce)=>{C(Pe=>Pe&&{...Pe,[xe]:Ce})},me=yj((N==null?void 0:N.providerPresets)??{},(N==null?void 0:N.provider)??"claude",(N==null?void 0:N.jobProviders)??{},fe);ze.useEffect(()=>{q2().then(xe=>P(xe.webhook)).catch(()=>{})},[f]),ze.useEffect(()=>{ee&&r({pathname:"/scheduling",search:l.search},{replace:!0})},[ee,l.search,r]),ze.useEffect(()=>{if(ee)return;const Ce=new URLSearchParams(l.search).get("tab");Ce&&R({providers:"ai-providers",runtime:"ai-providers","ai-runtime":"ai-providers",notifications:"integrations",general:"project",advanced:"project"}[Ce]??Ce)},[ee,l.search]),ze.useEffect(()=>{if(O){if(ie.current){ie.current=!1;return}const xe=bx(O);C(xe),B.current=xe,X(!1)}},[O]),ze.useEffect(()=>{if(!N||!B.current)return;const xe=JSON.stringify(N),Ce=JSON.stringify(B.current);X(xe!==Ce)},[N]),ze.useEffect(()=>{N&&G.current&&(G.current=!1,_e())},[N==null?void 0:N.jobProviders]);const _e=async()=>{var Pe,Qe,Rt,oa,mn,Xa,da,fa,gn;if(!N)return;const xe=N.cronSchedule!==(O==null?void 0:O.cronSchedule)||N.reviewerSchedule!==(O==null?void 0:O.reviewerSchedule)||N.cronScheduleOffset!==((O==null?void 0:O.cronScheduleOffset)??0)||N.schedulingPriority!==((O==null?void 0:O.schedulingPriority)??3)||N.executorEnabled!==((O==null?void 0:O.executorEnabled)??!0)||N.reviewerEnabled!==((O==null?void 0:O.reviewerEnabled)??!0)||N.queue.enabled!==(((Pe=O==null?void 0:O.queue)==null?void 0:Pe.enabled)??!0)||N.qa.enabled!==((O==null?void 0:O.qa.enabled)??!0)||N.qa.schedule!==(O==null?void 0:O.qa.schedule)||N.audit.enabled!==((O==null?void 0:O.audit.enabled)??!0)||N.audit.schedule!==(O==null?void 0:O.audit.schedule)||N.analytics.enabled!==(((Qe=O==null?void 0:O.analytics)==null?void 0:Qe.enabled)??!1)||N.analytics.schedule!==(((Rt=O==null?void 0:O.analytics)==null?void 0:Rt.schedule)??oh().schedule)||N.prResolver.enabled!==(((oa=O==null?void 0:O.prResolver)==null?void 0:oa.enabled)??Ps().enabled)||N.prResolver.schedule!==(((mn=O==null?void 0:O.prResolver)==null?void 0:mn.schedule)??Ps().schedule)||N.merger.enabled!==(((Xa=O==null?void 0:O.merger)==null?void 0:Xa.enabled)??!1)||N.merger.schedule!==(((da=O==null?void 0:O.merger)==null?void 0:da.schedule)??Yr().schedule)||N.roadmapScanner.enabled!==(((fa=O==null?void 0:O.roadmapScanner)==null?void 0:fa.enabled)??!0)||(N.roadmapScanner.slicerSchedule||Il().slicerSchedule)!==(((gn=O==null?void 0:O.roadmapScanner)==null?void 0:gn.slicerSchedule)||Il().slicerSchedule),Ce={};for(const Gt of pj){const ea=N.jobProviders[Gt];typeof ea=="string"&&ea.trim().length>0?Ce[Gt]=ea:O!=null&&O.jobProviders[Gt]&&(Ce[Gt]=null)}y(!0);try{const Gt=await no({provider:N.provider,providerLabel:N.providerLabel.trim(),providerPresets:Object.keys(N.providerPresets).length>0?N.providerPresets:void 0,defaultBranch:N.defaultBranch,prdDir:N.prdDir,branchPrefix:N.branchPrefix,branchPatterns:N.branchPatterns,gitPushNoVerify:N.gitPushNoVerify,executorEnabled:N.executorEnabled,reviewerEnabled:N.reviewerEnabled,minReviewScore:N.minReviewScore,maxRuntime:N.maxRuntime,reviewerMaxRuntime:N.reviewerMaxRuntime,maxLogSize:N.maxLogSize,cronSchedule:N.cronSchedule,reviewerSchedule:N.reviewerSchedule,scheduleBundleId:N.scheduleBundleId,cronScheduleOffset:N.cronScheduleOffset,schedulingPriority:N.schedulingPriority,maxRetries:N.maxRetries,reviewerMaxRetries:N.reviewerMaxRetries,reviewerRetryDelay:N.reviewerRetryDelay,reviewerMaxPrsPerRun:N.reviewerMaxPrsPerRun,providerEnv:N.providerEnv,notifications:N.notifications,prdPriority:N.prdPriority,roadmapScanner:N.roadmapScanner,templatesDir:N.templatesDir,boardProvider:N.boardProvider,jobProviders:Ce,fallbackOnRateLimit:N.fallbackOnRateLimit,primaryFallbackModel:N.primaryFallbackModel,secondaryFallbackModel:N.secondaryFallbackModel,primaryFallbackPreset:N.primaryFallbackPreset||void 0,secondaryFallbackPreset:N.secondaryFallbackPreset||void 0,claudeModel:N.primaryFallbackModel,providerScheduleOverrides:N.providerScheduleOverrides,qa:N.qa,audit:N.audit,analytics:N.analytics,prResolver:N.prResolver,merger:N.merger,queue:N.queue}),ea=bx(Gt);C(ea),B.current=ea,X(!1);let Ea="";if(xe)try{await du()}catch(Ja){Ea=Ja instanceof Error?Ja.message:"failed to reinstall cron schedules"}d(Ea?{title:"Settings Saved (Cron Reinstall Failed)",message:Ea,type:"warning"}:{title:"Settings Saved",message:xe?"Configuration updated and cron schedules reinstalled.":"Configuration updated successfully.",type:"success"}),ie.current=!0,he(),$()}catch(Gt){d({title:"Save Failed",message:Gt instanceof Error?Gt.message:"Failed to save configuration",type:"error"})}finally{y(!1)}},L=()=>{B.current&&(C(B.current),X(!1),d({title:"Reset Complete",message:"Unsaved changes were discarded.",type:"info"}))},se=async xe=>{if(!(A!=null&&!window.confirm("Replace existing global channel?")))try{const Ce=await _g({webhook:xe});P(Ce.webhook)}catch(Ce){d({title:"Failed to set global channel",message:Ce instanceof Error?Ce.message:"Unknown error",type:"error"})}},ge=async()=>{try{await _g({webhook:null}),P(null)}catch(xe){d({title:"Failed to unset global channel",message:xe instanceof Error?xe.message:"Unknown error",type:"error"})}},ye=async()=>{if(f){k(!0);try{await C2(f),j(f),T(!1),d({title:"Project Removed",message:"Cron jobs uninstalled and all project data removed from the database.",type:"success"})}catch(xe){d({title:"Remove Failed",message:xe instanceof Error?xe.message:"Failed to remove project",type:"error"})}finally{k(!1)}}};if(ee)return s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx("div",{className:"text-slate-400",children:"Opening automation..."})});if(ae||!N)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(Mn,{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(Be,{onClick:()=>he(),children:"Retry"})]});const we=[{id:"project",label:"Project",content:s.jsx(dj,{form:N,updateField:fe,projectName:c,doctorChecks:te,doctorLoading:ce})},{id:"ai-providers",label:"AI Providers",content:s.jsx(hj,{form:N,updateField:fe,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(vj,{form:N,updateField:fe,globalWebhook:A,onSetGlobal:se,onUnsetGlobal:ge})}];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(ov,{tabs:we,activeTab:Z,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(Mn,{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(Be,{variant:"ghost",size:"sm",className:"text-slate-400 hover:text-slate-300",onClick:L,children:[s.jsx(ah,{className:"h-4 w-4 mr-2"}),"Discard"]}),s.jsxs(Be,{size:"sm",className:"bg-indigo-600 hover:bg-indigo-500 shadow-lg shadow-indigo-500/20",onClick:_e,loading:p,children:[s.jsx(Jx,{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(Be,{variant:"secondary",className:"bg-red-600 hover:bg-red-700 text-white",onClick:()=>T(!0),children:[s.jsx(Fr,{className:"h-4 w-4 mr-2"}),"Remove Project"]})]}),S&&s.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4",children:[s.jsx("div",{className:"fixed inset-0 bg-black/70 backdrop-blur-sm",onClick:()=>!_&&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 ",c,"?"]})]}),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(Be,{variant:"ghost",onClick:()=>T(!1),disabled:_,children:"Cancel"}),s.jsx(Be,{variant:"secondary",className:"bg-red-600 hover:bg-red-700",onClick:ye,loading:_,children:"Remove"})]})]})]}),s.jsx(oj,{isOpen:me.presetModalOpen,onClose:()=>{me.setPresetModalOpen(!1)},onSave:me.handleSavePreset,presetId:me.editingPresetId,preset:me.editingPreset,isBuiltIn:me.editingPresetId?ro.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(Be,{variant:"ghost",onClick:()=>me.setDeleteWarning(null),children:"Cancel"}),s.jsx(Be,{variant:"secondary",onClick:me.handleConfirmDelete,className:"bg-red-600 hover:bg-red-700",children:"Force Delete"})]})]})]})]})},Sj=()=>(X2(),J2(),s.jsx(Yb,{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(Z2,{}),s.jsxs("div",{className:"flex-1 flex flex-col min-w-0 z-10",children:[s.jsx(W2,{}),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(yb,{children:[s.jsx(nl,{path:"/",element:s.jsx(iS,{})}),s.jsx(nl,{path:"/prs",element:s.jsx(cS,{})}),s.jsx(nl,{path:"/board",element:s.jsx(nS,{})}),s.jsx(nl,{path:"/scheduling",element:s.jsx(lj,{})}),s.jsx(nl,{path:"/logs",element:s.jsx(uS,{})}),s.jsx(nl,{path:"/roadmap",element:s.jsx(oS,{})}),s.jsx(nl,{path:"/settings",element:s.jsx(bj,{})}),s.jsx(nl,{path:"*",element:s.jsx(xb,{to:"/",replace:!0})})]})})})]}),s.jsx(I2,{})]})})),Gv=document.getElementById("root");if(!Gv)throw new Error("Could not find root element to mount to");const Nj=bp.createRoot(Gv);Nj.render(s.jsx(ze.StrictMode,{children:s.jsx(Sj,{})}));