@jonit-dev/night-watch-cli 1.8.14-beta.4 → 1.8.14-beta.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.js +1342 -397
- package/dist/cli.js.map +1 -1
- package/dist/commands/dashboard/tab-config.js +2 -2
- package/dist/commands/dashboard/tab-config.js.map +1 -1
- package/dist/commands/dashboard/tab-schedules.d.ts +1 -1
- package/dist/commands/dashboard/tab-schedules.d.ts.map +1 -1
- package/dist/commands/dashboard/tab-schedules.js +15 -6
- package/dist/commands/dashboard/tab-schedules.js.map +1 -1
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +1 -0
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/install.d.ts +4 -0
- package/dist/commands/install.d.ts.map +1 -1
- package/dist/commands/install.js +26 -1
- package/dist/commands/install.js.map +1 -1
- package/dist/commands/logs.d.ts.map +1 -1
- package/dist/commands/logs.js +14 -4
- package/dist/commands/logs.js.map +1 -1
- package/dist/commands/manager.d.ts +23 -0
- package/dist/commands/manager.d.ts.map +1 -0
- package/dist/commands/manager.js +220 -0
- package/dist/commands/manager.js.map +1 -0
- package/dist/commands/plan.js +1 -1
- package/dist/commands/plan.js.map +1 -1
- package/dist/commands/prd.d.ts.map +1 -1
- package/dist/commands/prd.js +6 -4
- package/dist/commands/prd.js.map +1 -1
- package/dist/commands/queue.d.ts.map +1 -1
- package/dist/commands/queue.js +5 -1
- package/dist/commands/queue.js.map +1 -1
- package/dist/commands/run.d.ts.map +1 -1
- package/dist/commands/run.js +2 -1
- package/dist/commands/run.js.map +1 -1
- package/dist/commands/uninstall.d.ts.map +1 -1
- package/dist/commands/uninstall.js +2 -0
- package/dist/commands/uninstall.js.map +1 -1
- package/dist/scripts/night-watch-audit-cron.sh +3 -3
- package/dist/scripts/night-watch-cron.sh +8 -7
- package/dist/scripts/night-watch-helpers.sh +23 -0
- package/dist/scripts/night-watch-manager-cron.sh +61 -0
- package/dist/scripts/night-watch-merger-cron.sh +18 -12
- package/dist/scripts/night-watch-plan-cron.sh +3 -3
- package/dist/scripts/night-watch-pr-resolver-cron.sh +8 -11
- package/dist/scripts/night-watch-pr-reviewer-cron.sh +31 -21
- package/dist/scripts/night-watch-qa-cron.sh +3 -3
- package/dist/scripts/night-watch-slicer-cron.sh +3 -3
- package/dist/web/assets/index-DatF4suf.css +1 -0
- package/dist/web/assets/index-Q3IYCcdZ.js +447 -0
- package/dist/web/index.html +2 -2
- package/package.json +1 -1
|
@@ -0,0 +1,447 @@
|
|
|
1
|
+
var by=Object.defineProperty;var pg=n=>{throw TypeError(n)};var jy=(n,r,u)=>r in n?by(n,r,{enumerable:!0,configurable:!0,writable:!0,value:u}):n[r]=u;var vg=(n,r,u)=>jy(n,typeof r!="symbol"?r+"":r,u),Sf=(n,r,u)=>r.has(n)||pg("Cannot "+u);var ee=(n,r,u)=>(Sf(n,r,"read from private field"),u?u.call(n):r.get(n)),nt=(n,r,u)=>r.has(n)?pg("Cannot add the same private member more than once"):r instanceof WeakSet?r.add(n):r.set(n,u),Oe=(n,r,u,o)=>(Sf(n,r,"write to private field"),o?o.call(n,u):r.set(n,u),u),Ee=(n,r,u)=>(Sf(n,r,"access private method"),u);(function(){const r=document.createElement("link").relList;if(r&&r.supports&&r.supports("modulepreload"))return;for(const h of document.querySelectorAll('link[rel="modulepreload"]'))o(h);new MutationObserver(h=>{for(const f of h)if(f.type==="childList")for(const b of f.addedNodes)b.tagName==="LINK"&&b.rel==="modulepreload"&&o(b)}).observe(document,{childList:!0,subtree:!0});function u(h){const f={};return h.integrity&&(f.integrity=h.integrity),h.referrerPolicy&&(f.referrerPolicy=h.referrerPolicy),h.crossOrigin==="use-credentials"?f.credentials="include":h.crossOrigin==="anonymous"?f.credentials="omit":f.credentials="same-origin",f}function o(h){if(h.ep)return;h.ep=!0;const f=u(h);fetch(h.href,f)}})();function Kf(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}function Ny(n){if(Object.prototype.hasOwnProperty.call(n,"__esModule"))return n;var r=n.default;if(typeof r=="function"){var u=function o(){return this instanceof o?Reflect.construct(r,arguments,this.constructor):r.apply(this,arguments)};u.prototype=r.prototype}else u={};return Object.defineProperty(u,"__esModule",{value:!0}),Object.keys(n).forEach(function(o){var h=Object.getOwnPropertyDescriptor(n,o);Object.defineProperty(u,o,h.get?h:{enumerable:!0,get:function(){return n[o]}})}),u}var Ef={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 yg;function wy(){if(yg)return Ii;yg=1;var n=Symbol.for("react.transitional.element"),r=Symbol.for("react.fragment");function u(o,h,f){var b=null;if(f!==void 0&&(b=""+f),h.key!==void 0&&(b=""+h.key),"key"in h){f={};for(var j in h)j!=="key"&&(f[j]=h[j])}else f=h;return h=f.ref,{$$typeof:n,type:o,key:b,ref:h!==void 0?h:null,props:f}}return Ii.Fragment=r,Ii.jsx=u,Ii.jsxs=u,Ii}var bg;function Sy(){return bg||(bg=1,Ef.exports=wy()),Ef.exports}var s=Sy(),Tf={exports:{}},He={};/**
|
|
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 jg;function Ey(){if(jg)return He;jg=1;var n=Symbol.for("react.transitional.element"),r=Symbol.for("react.portal"),u=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),h=Symbol.for("react.profiler"),f=Symbol.for("react.consumer"),b=Symbol.for("react.context"),j=Symbol.for("react.forward_ref"),y=Symbol.for("react.suspense"),x=Symbol.for("react.memo"),S=Symbol.for("react.lazy"),C=Symbol.for("react.activity"),z=Symbol.iterator;function _(H){return H===null||typeof H!="object"?null:(H=z&&H[z]||H["@@iterator"],typeof H=="function"?H:null)}var N={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},O=Object.assign,k={};function P(H,se,ge){this.props=H,this.context=se,this.refs=k,this.updater=ge||N}P.prototype.isReactComponent={},P.prototype.setState=function(H,se){if(typeof H!="object"&&typeof H!="function"&&H!=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,H,se,"setState")},P.prototype.forceUpdate=function(H){this.updater.enqueueForceUpdate(this,H,"forceUpdate")};function D(){}D.prototype=P.prototype;function Q(H,se,ge){this.props=H,this.context=se,this.refs=k,this.updater=ge||N}var w=Q.prototype=new D;w.constructor=Q,O(w,P.prototype),w.isPureReactComponent=!0;var K=Array.isArray;function q(){}var Z={H:null,A:null,T:null,S:null},R=Object.prototype.hasOwnProperty;function ae(H,se,ge){var pe=ge.ref;return{$$typeof:n,type:H,key:se,ref:pe!==void 0?pe:null,props:ge}}function M(H,se){return ae(H.type,se,H.props)}function J(H){return typeof H=="object"&&H!==null&&H.$$typeof===n}function le(H){var se={"=":"=0",":":"=2"};return"$"+H.replace(/[=:]/g,function(ge){return se[ge]})}var fe=/\/+/g;function ve(H,se){return typeof H=="object"&&H!==null&&H.key!=null?le(""+H.key):se.toString(36)}function ue(H){switch(H.status){case"fulfilled":return H.value;case"rejected":throw H.reason;default:switch(typeof H.status=="string"?H.then(q,q):(H.status="pending",H.then(function(se){H.status==="pending"&&(H.status="fulfilled",H.value=se)},function(se){H.status==="pending"&&(H.status="rejected",H.reason=se)})),H.status){case"fulfilled":return H.value;case"rejected":throw H.reason}}throw H}function G(H,se,ge,pe,Te){var xe=typeof H;(xe==="undefined"||xe==="boolean")&&(H=null);var Me=!1;if(H===null)Me=!0;else switch(xe){case"bigint":case"string":case"number":Me=!0;break;case"object":switch(H.$$typeof){case n:case r:Me=!0;break;case S:return Me=H._init,G(Me(H._payload),se,ge,pe,Te)}}if(Me)return Te=Te(H),Me=pe===""?"."+ve(H,0):pe,K(Te)?(ge="",Me!=null&&(ge=Me.replace(fe,"$&/")+"/"),G(Te,se,ge,"",function(Dt){return Dt})):Te!=null&&(J(Te)&&(Te=M(Te,ge+(Te.key==null||H&&H.key===Te.key?"":(""+Te.key).replace(fe,"$&/")+"/")+Me)),se.push(Te)),1;Me=0;var Ze=pe===""?".":pe+":";if(K(H))for(var We=0;We<H.length;We++)pe=H[We],xe=Ze+ve(pe,We),Me+=G(pe,se,ge,xe,Te);else if(We=_(H),typeof We=="function")for(H=We.call(H),We=0;!(pe=H.next()).done;)pe=pe.value,xe=Ze+ve(pe,We++),Me+=G(pe,se,ge,xe,Te);else if(xe==="object"){if(typeof H.then=="function")return G(ue(H),se,ge,pe,Te);throw se=String(H),Error("Objects are not valid as a React child (found: "+(se==="[object Object]"?"object with keys {"+Object.keys(H).join(", ")+"}":se)+"). If you meant to render a collection of children, use an array instead.")}return Me}function ne(H,se,ge){if(H==null)return H;var pe=[],Te=0;return G(H,pe,"","",function(xe){return se.call(ge,xe,Te++)}),pe}function he(H){if(H._status===-1){var se=H._result;se=se(),se.then(function(ge){(H._status===0||H._status===-1)&&(H._status=1,H._result=ge)},function(ge){(H._status===0||H._status===-1)&&(H._status=2,H._result=ge)}),H._status===-1&&(H._status=0,H._result=se)}if(H._status===1)return H._result.default;throw H._result}var me=typeof reportError=="function"?reportError:function(H){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var se=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof H=="object"&&H!==null&&typeof H.message=="string"?String(H.message):String(H),error:H});if(!window.dispatchEvent(se))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",H);return}console.error(H)},ze={map:ne,forEach:function(H,se,ge){ne(H,function(){se.apply(this,arguments)},ge)},count:function(H){var se=0;return ne(H,function(){se++}),se},toArray:function(H){return ne(H,function(se){return se})||[]},only:function(H){if(!J(H))throw Error("React.Children.only expected to receive a single React element child.");return H}};return He.Activity=C,He.Children=ze,He.Component=P,He.Fragment=u,He.Profiler=h,He.PureComponent=Q,He.StrictMode=o,He.Suspense=y,He.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=Z,He.__COMPILER_RUNTIME={__proto__:null,c:function(H){return Z.H.useMemoCache(H)}},He.cache=function(H){return function(){return H.apply(null,arguments)}},He.cacheSignal=function(){return null},He.cloneElement=function(H,se,ge){if(H==null)throw Error("The argument must be a React element, but you passed "+H+".");var pe=O({},H.props),Te=H.key;if(se!=null)for(xe in se.key!==void 0&&(Te=""+se.key),se)!R.call(se,xe)||xe==="key"||xe==="__self"||xe==="__source"||xe==="ref"&&se.ref===void 0||(pe[xe]=se[xe]);var xe=arguments.length-2;if(xe===1)pe.children=ge;else if(1<xe){for(var Me=Array(xe),Ze=0;Ze<xe;Ze++)Me[Ze]=arguments[Ze+2];pe.children=Me}return ae(H.type,Te,pe)},He.createContext=function(H){return H={$$typeof:b,_currentValue:H,_currentValue2:H,_threadCount:0,Provider:null,Consumer:null},H.Provider=H,H.Consumer={$$typeof:f,_context:H},H},He.createElement=function(H,se,ge){var pe,Te={},xe=null;if(se!=null)for(pe in se.key!==void 0&&(xe=""+se.key),se)R.call(se,pe)&&pe!=="key"&&pe!=="__self"&&pe!=="__source"&&(Te[pe]=se[pe]);var Me=arguments.length-2;if(Me===1)Te.children=ge;else if(1<Me){for(var Ze=Array(Me),We=0;We<Me;We++)Ze[We]=arguments[We+2];Te.children=Ze}if(H&&H.defaultProps)for(pe in Me=H.defaultProps,Me)Te[pe]===void 0&&(Te[pe]=Me[pe]);return ae(H,xe,Te)},He.createRef=function(){return{current:null}},He.forwardRef=function(H){return{$$typeof:j,render:H}},He.isValidElement=J,He.lazy=function(H){return{$$typeof:S,_payload:{_status:-1,_result:H},_init:he}},He.memo=function(H,se){return{$$typeof:x,type:H,compare:se===void 0?null:se}},He.startTransition=function(H){var se=Z.T,ge={};Z.T=ge;try{var pe=H(),Te=Z.S;Te!==null&&Te(ge,pe),typeof pe=="object"&&pe!==null&&typeof pe.then=="function"&&pe.then(q,me)}catch(xe){me(xe)}finally{se!==null&&ge.types!==null&&(se.types=ge.types),Z.T=se}},He.unstable_useCacheRefresh=function(){return Z.H.useCacheRefresh()},He.use=function(H){return Z.H.use(H)},He.useActionState=function(H,se,ge){return Z.H.useActionState(H,se,ge)},He.useCallback=function(H,se){return Z.H.useCallback(H,se)},He.useContext=function(H){return Z.H.useContext(H)},He.useDebugValue=function(){},He.useDeferredValue=function(H,se){return Z.H.useDeferredValue(H,se)},He.useEffect=function(H,se){return Z.H.useEffect(H,se)},He.useEffectEvent=function(H){return Z.H.useEffectEvent(H)},He.useId=function(){return Z.H.useId()},He.useImperativeHandle=function(H,se,ge){return Z.H.useImperativeHandle(H,se,ge)},He.useInsertionEffect=function(H,se){return Z.H.useInsertionEffect(H,se)},He.useLayoutEffect=function(H,se){return Z.H.useLayoutEffect(H,se)},He.useMemo=function(H,se){return Z.H.useMemo(H,se)},He.useOptimistic=function(H,se){return Z.H.useOptimistic(H,se)},He.useReducer=function(H,se,ge){return Z.H.useReducer(H,se,ge)},He.useRef=function(H){return Z.H.useRef(H)},He.useState=function(H){return Z.H.useState(H)},He.useSyncExternalStore=function(H,se,ge){return Z.H.useSyncExternalStore(H,se,ge)},He.useTransition=function(){return Z.H.useTransition()},He.version="19.2.4",He}var Ng;function eh(){return Ng||(Ng=1,Tf.exports=Ey()),Tf.exports}var U=eh();const _e=Kf(U);var Cf={exports:{}},Qi={},Mf={exports:{}},Of={};/**
|
|
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 wg;function Ty(){return wg||(wg=1,(function(n){function r(G,ne){var he=G.length;G.push(ne);e:for(;0<he;){var me=he-1>>>1,ze=G[me];if(0<h(ze,ne))G[me]=ne,G[he]=ze,he=me;else break e}}function u(G){return G.length===0?null:G[0]}function o(G){if(G.length===0)return null;var ne=G[0],he=G.pop();if(he!==ne){G[0]=he;e:for(var me=0,ze=G.length,H=ze>>>1;me<H;){var se=2*(me+1)-1,ge=G[se],pe=se+1,Te=G[pe];if(0>h(ge,he))pe<ze&&0>h(Te,ge)?(G[me]=Te,G[pe]=he,me=pe):(G[me]=ge,G[se]=he,me=se);else if(pe<ze&&0>h(Te,he))G[me]=Te,G[pe]=he,me=pe;else break e}}return ne}function h(G,ne){var he=G.sortIndex-ne.sortIndex;return he!==0?he:G.id-ne.id}if(n.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var f=performance;n.unstable_now=function(){return f.now()}}else{var b=Date,j=b.now();n.unstable_now=function(){return b.now()-j}}var y=[],x=[],S=1,C=null,z=3,_=!1,N=!1,O=!1,k=!1,P=typeof setTimeout=="function"?setTimeout:null,D=typeof clearTimeout=="function"?clearTimeout:null,Q=typeof setImmediate<"u"?setImmediate:null;function w(G){for(var ne=u(x);ne!==null;){if(ne.callback===null)o(x);else if(ne.startTime<=G)o(x),ne.sortIndex=ne.expirationTime,r(y,ne);else break;ne=u(x)}}function K(G){if(O=!1,w(G),!N)if(u(y)!==null)N=!0,q||(q=!0,le());else{var ne=u(x);ne!==null&&ue(K,ne.startTime-G)}}var q=!1,Z=-1,R=5,ae=-1;function M(){return k?!0:!(n.unstable_now()-ae<R)}function J(){if(k=!1,q){var G=n.unstable_now();ae=G;var ne=!0;try{e:{N=!1,O&&(O=!1,D(Z),Z=-1),_=!0;var he=z;try{t:{for(w(G),C=u(y);C!==null&&!(C.expirationTime>G&&M());){var me=C.callback;if(typeof me=="function"){C.callback=null,z=C.priorityLevel;var ze=me(C.expirationTime<=G);if(G=n.unstable_now(),typeof ze=="function"){C.callback=ze,w(G),ne=!0;break t}C===u(y)&&o(y),w(G)}else o(y);C=u(y)}if(C!==null)ne=!0;else{var H=u(x);H!==null&&ue(K,H.startTime-G),ne=!1}}break e}finally{C=null,z=he,_=!1}ne=void 0}}finally{ne?le():q=!1}}}var le;if(typeof Q=="function")le=function(){Q(J)};else if(typeof MessageChannel<"u"){var fe=new MessageChannel,ve=fe.port2;fe.port1.onmessage=J,le=function(){ve.postMessage(null)}}else le=function(){P(J,0)};function ue(G,ne){Z=P(function(){G(n.unstable_now())},ne)}n.unstable_IdlePriority=5,n.unstable_ImmediatePriority=1,n.unstable_LowPriority=4,n.unstable_NormalPriority=3,n.unstable_Profiling=null,n.unstable_UserBlockingPriority=2,n.unstable_cancelCallback=function(G){G.callback=null},n.unstable_forceFrameRate=function(G){0>G||125<G?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):R=0<G?Math.floor(1e3/G):5},n.unstable_getCurrentPriorityLevel=function(){return z},n.unstable_next=function(G){switch(z){case 1:case 2:case 3:var ne=3;break;default:ne=z}var he=z;z=ne;try{return G()}finally{z=he}},n.unstable_requestPaint=function(){k=!0},n.unstable_runWithPriority=function(G,ne){switch(G){case 1:case 2:case 3:case 4:case 5:break;default:G=3}var he=z;z=G;try{return ne()}finally{z=he}},n.unstable_scheduleCallback=function(G,ne,he){var me=n.unstable_now();switch(typeof he=="object"&&he!==null?(he=he.delay,he=typeof he=="number"&&0<he?me+he:me):he=me,G){case 1:var ze=-1;break;case 2:ze=250;break;case 5:ze=1073741823;break;case 4:ze=1e4;break;default:ze=5e3}return ze=he+ze,G={id:S++,callback:ne,priorityLevel:G,startTime:he,expirationTime:ze,sortIndex:-1},he>me?(G.sortIndex=he,r(x,G),u(y)===null&&G===u(x)&&(O?(D(Z),Z=-1):O=!0,ue(K,he-me))):(G.sortIndex=ze,r(y,G),N||_||(N=!0,q||(q=!0,le()))),G},n.unstable_shouldYield=M,n.unstable_wrapCallback=function(G){var ne=z;return function(){var he=z;z=ne;try{return G.apply(this,arguments)}finally{z=he}}}})(Of)),Of}var Sg;function Cy(){return Sg||(Sg=1,Mf.exports=Ty()),Mf.exports}var Rf={exports:{}},ca={};/**
|
|
26
|
+
* @license React
|
|
27
|
+
* react-dom.production.js
|
|
28
|
+
*
|
|
29
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
30
|
+
*
|
|
31
|
+
* This source code is licensed under the MIT license found in the
|
|
32
|
+
* LICENSE file in the root directory of this source tree.
|
|
33
|
+
*/var Eg;function My(){if(Eg)return ca;Eg=1;var n=eh();function r(y){var x="https://react.dev/errors/"+y;if(1<arguments.length){x+="?args[]="+encodeURIComponent(arguments[1]);for(var S=2;S<arguments.length;S++)x+="&args[]="+encodeURIComponent(arguments[S])}return"Minified React error #"+y+"; visit "+x+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function u(){}var o={d:{f:u,r:function(){throw Error(r(522))},D:u,C:u,L:u,m:u,X:u,S:u,M:u},p:0,findDOMNode:null},h=Symbol.for("react.portal");function f(y,x,S){var C=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:h,key:C==null?null:""+C,children:y,containerInfo:x,implementation:S}}var b=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function j(y,x){if(y==="font")return"";if(typeof x=="string")return x==="use-credentials"?x:""}return ca.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=o,ca.createPortal=function(y,x){var S=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!x||x.nodeType!==1&&x.nodeType!==9&&x.nodeType!==11)throw Error(r(299));return f(y,x,null,S)},ca.flushSync=function(y){var x=b.T,S=o.p;try{if(b.T=null,o.p=2,y)return y()}finally{b.T=x,o.p=S,o.d.f()}},ca.preconnect=function(y,x){typeof y=="string"&&(x?(x=x.crossOrigin,x=typeof x=="string"?x==="use-credentials"?x:"":void 0):x=null,o.d.C(y,x))},ca.prefetchDNS=function(y){typeof y=="string"&&o.d.D(y)},ca.preinit=function(y,x){if(typeof y=="string"&&x&&typeof x.as=="string"){var S=x.as,C=j(S,x.crossOrigin),z=typeof x.integrity=="string"?x.integrity:void 0,_=typeof x.fetchPriority=="string"?x.fetchPriority:void 0;S==="style"?o.d.S(y,typeof x.precedence=="string"?x.precedence:void 0,{crossOrigin:C,integrity:z,fetchPriority:_}):S==="script"&&o.d.X(y,{crossOrigin:C,integrity:z,fetchPriority:_,nonce:typeof x.nonce=="string"?x.nonce:void 0})}},ca.preinitModule=function(y,x){if(typeof y=="string")if(typeof x=="object"&&x!==null){if(x.as==null||x.as==="script"){var S=j(x.as,x.crossOrigin);o.d.M(y,{crossOrigin:S,integrity:typeof x.integrity=="string"?x.integrity:void 0,nonce:typeof x.nonce=="string"?x.nonce:void 0})}}else x==null&&o.d.M(y)},ca.preload=function(y,x){if(typeof y=="string"&&typeof x=="object"&&x!==null&&typeof x.as=="string"){var S=x.as,C=j(S,x.crossOrigin);o.d.L(y,S,{crossOrigin:C,integrity:typeof x.integrity=="string"?x.integrity:void 0,nonce:typeof x.nonce=="string"?x.nonce:void 0,type:typeof x.type=="string"?x.type:void 0,fetchPriority:typeof x.fetchPriority=="string"?x.fetchPriority:void 0,referrerPolicy:typeof x.referrerPolicy=="string"?x.referrerPolicy:void 0,imageSrcSet:typeof x.imageSrcSet=="string"?x.imageSrcSet:void 0,imageSizes:typeof x.imageSizes=="string"?x.imageSizes:void 0,media:typeof x.media=="string"?x.media:void 0})}},ca.preloadModule=function(y,x){if(typeof y=="string")if(x){var S=j(x.as,x.crossOrigin);o.d.m(y,{as:typeof x.as=="string"&&x.as!=="script"?x.as:void 0,crossOrigin:S,integrity:typeof x.integrity=="string"?x.integrity:void 0})}else o.d.m(y)},ca.requestFormReset=function(y){o.d.r(y)},ca.unstable_batchedUpdates=function(y,x){return y(x)},ca.useFormState=function(y,x,S){return b.H.useFormState(y,x,S)},ca.useFormStatus=function(){return b.H.useHostTransitionStatus()},ca.version="19.2.4",ca}var Tg;function Ux(){if(Tg)return Rf.exports;Tg=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(r){console.error(r)}}return n(),Rf.exports=My(),Rf.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 Cg;function Oy(){if(Cg)return Qi;Cg=1;var n=Cy(),r=eh(),u=Ux();function o(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var a=2;a<arguments.length;a++)t+="&args[]="+encodeURIComponent(arguments[a])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function h(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function f(e){var t=e,a=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(a=t.return),e=t.return;while(e)}return t.tag===3?a:null}function b(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function j(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function y(e){if(f(e)!==e)throw Error(o(188))}function x(e){var t=e.alternate;if(!t){if(t=f(e),t===null)throw Error(o(188));return t!==e?null:e}for(var a=e,l=t;;){var c=a.return;if(c===null)break;var d=c.alternate;if(d===null){if(l=c.return,l!==null){a=l;continue}break}if(c.child===d.child){for(d=c.child;d;){if(d===a)return y(c),e;if(d===l)return y(c),t;d=d.sibling}throw Error(o(188))}if(a.return!==l.return)a=c,l=d;else{for(var p=!1,T=c.child;T;){if(T===a){p=!0,a=c,l=d;break}if(T===l){p=!0,l=c,a=d;break}T=T.sibling}if(!p){for(T=d.child;T;){if(T===a){p=!0,a=d,l=c;break}if(T===l){p=!0,l=d,a=c;break}T=T.sibling}if(!p)throw Error(o(189))}}if(a.alternate!==l)throw Error(o(190))}if(a.tag!==3)throw Error(o(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 C=Object.assign,z=Symbol.for("react.element"),_=Symbol.for("react.transitional.element"),N=Symbol.for("react.portal"),O=Symbol.for("react.fragment"),k=Symbol.for("react.strict_mode"),P=Symbol.for("react.profiler"),D=Symbol.for("react.consumer"),Q=Symbol.for("react.context"),w=Symbol.for("react.forward_ref"),K=Symbol.for("react.suspense"),q=Symbol.for("react.suspense_list"),Z=Symbol.for("react.memo"),R=Symbol.for("react.lazy"),ae=Symbol.for("react.activity"),M=Symbol.for("react.memo_cache_sentinel"),J=Symbol.iterator;function le(e){return e===null||typeof e!="object"?null:(e=J&&e[J]||e["@@iterator"],typeof e=="function"?e:null)}var fe=Symbol.for("react.client.reference");function ve(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===fe?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case O:return"Fragment";case P:return"Profiler";case k:return"StrictMode";case K:return"Suspense";case q:return"SuspenseList";case ae:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case N:return"Portal";case Q:return e.displayName||"Context";case D:return(e._context.displayName||"Context")+".Consumer";case w:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case 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 ue=Array.isArray,G=r.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ne=u.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,he={pending:!1,data:null,method:null,action:null},me=[],ze=-1;function H(e){return{current:e}}function se(e){0>ze||(e.current=me[ze],me[ze]=null,ze--)}function ge(e,t){ze++,me[ze]=e.current,e.current=t}var pe=H(null),Te=H(null),xe=H(null),Me=H(null);function Ze(e,t){switch(ge(xe,t),ge(Te,e),ge(pe,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?V0(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=V0(t),e=B0(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}se(pe),ge(pe,e)}function We(){se(pe),se(Te),se(xe)}function Dt(e){e.memoizedState!==null&&ge(Me,e);var t=pe.current,a=B0(t,e.type);t!==a&&(ge(Te,e),ge(pe,a))}function da(e){Te.current===e&&(se(pe),se(Te)),Me.current===e&&(se(Me),Gi._currentValue=he)}var tn,an;function fa(e){if(tn===void 0)try{throw Error()}catch(a){var t=a.stack.trim().match(/\n( *(at )?)/);tn=t&&t[1]||"",an=-1<a.stack.indexOf(`
|
|
42
|
+
at`)?" (<anonymous>)":-1<a.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
43
|
+
`+tn+e+an}var ha=!1;function yn(e,t){if(!e||ha)return"";ha=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var l={DetermineComponentFrameRoot:function(){try{if(t){var ce=function(){throw Error()};if(Object.defineProperty(ce.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ce,[])}catch(te){var X=te}Reflect.construct(e,[],ce)}else{try{ce.call()}catch(te){X=te}e.call(ce.prototype)}}else{try{throw Error()}catch(te){X=te}(ce=e())&&typeof ce.catch=="function"&&ce.catch(function(){})}}catch(te){if(te&&X&&typeof te.stack=="string")return[te.stack,X.stack]}return[null,null]}};l.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var c=Object.getOwnPropertyDescriptor(l.DetermineComponentFrameRoot,"name");c&&c.configurable&&Object.defineProperty(l.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var d=l.DetermineComponentFrameRoot(),p=d[0],T=d[1];if(p&&T){var L=p.split(`
|
|
44
|
+
`),I=T.split(`
|
|
45
|
+
`);for(c=l=0;l<L.length&&!L[l].includes("DetermineComponentFrameRoot");)l++;for(;c<I.length&&!I[c].includes("DetermineComponentFrameRoot");)c++;if(l===L.length||c===I.length)for(l=L.length-1,c=I.length-1;1<=l&&0<=c&&L[l]!==I[c];)c--;for(;1<=l&&0<=c;l--,c--)if(L[l]!==I[c]){if(l!==1||c!==1)do if(l--,c--,0>c||L[l]!==I[c]){var re=`
|
|
46
|
+
`+L[l].replace(" at new "," at ");return e.displayName&&re.includes("<anonymous>")&&(re=re.replace("<anonymous>",e.displayName)),re}while(1<=l&&0<=c);break}}}finally{ha=!1,Error.prepareStackTrace=a}return(a=e?e.displayName||e.name:"")?fa(a):""}function bn(e,t){switch(e.tag){case 26:case 27:case 5:return fa(e.type);case 16:return fa("Lazy");case 13:return e.child!==t&&t!==null?fa("Suspense Fallback"):fa("Suspense");case 19:return fa("SuspenseList");case 0:case 15:return yn(e.type,!1);case 11:return yn(e.type.render,!1);case 1:return yn(e.type,!0);case 31:return fa("Activity");default:return""}}function Va(e){try{var t="",a=null;do t+=bn(e,a),a=e,e=e.return;while(e);return t}catch(l){return`
|
|
47
|
+
Error generating stack: `+l.message+`
|
|
48
|
+
`+l.stack}}var kt=Object.prototype.hasOwnProperty,ma=n.unstable_scheduleCallback,kn=n.unstable_cancelCallback,Ba=n.unstable_shouldYield,ga=n.unstable_requestPaint,At=n.unstable_now,ul=n.unstable_getCurrentPriorityLevel,Zr=n.unstable_ImmediatePriority,Zs=n.unstable_UserBlockingPriority,An=n.unstable_NormalPriority,Ws=n.unstable_LowPriority,dl=n.unstable_IdlePriority,Ie=n.log,fl=n.unstable_setDisableYieldValue,gt=null,Bt=null;function _t(e){if(typeof Ie=="function"&&fl(e),Bt&&typeof Bt.setStrictMode=="function")try{Bt.setStrictMode(gt,e)}catch{}}var zt=Math.clz32?Math.clz32:ye,es=Math.log,oe=Math.LN2;function ye(e){return e>>>=0,e===0?32:31-(es(e)/oe|0)|0}var Qe=256,Pt=262144,Ke=4194304;function xa(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function ts(e,t,a){var l=e.pendingLanes;if(l===0)return 0;var c=0,d=e.suspendedLanes,p=e.pingedLanes;e=e.warmLanes;var T=l&134217727;return T!==0?(l=T&~d,l!==0?c=xa(l):(p&=T,p!==0?c=xa(p):a||(a=T&~e,a!==0&&(c=xa(a))))):(T=l&~d,T!==0?c=xa(T):p!==0?c=xa(p):a||(a=l&~e,a!==0&&(c=xa(a)))),c===0?0:t!==0&&t!==c&&(t&d)===0&&(d=c&-c,a=t&-t,d>=a||d===32&&(a&4194048)!==0)?t:c}function hl(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function bc(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Wr(){var e=Ke;return Ke<<=1,(Ke&62914560)===0&&(Ke=4194304),e}function Is(e){for(var t=[],a=0;31>a;a++)t.push(e);return t}function ml(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function jc(e,t,a,l,c,d){var p=e.pendingLanes;e.pendingLanes=a,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=a,e.entangledLanes&=a,e.errorRecoveryDisabledLanes&=a,e.shellSuspendCounter=0;var T=e.entanglements,L=e.expirationTimes,I=e.hiddenUpdates;for(a=p&~a;0<a;){var re=31-zt(a),ce=1<<re;T[re]=0,L[re]=-1;var X=I[re];if(X!==null)for(I[re]=null,re=0;re<X.length;re++){var te=X[re];te!==null&&(te.lane&=-536870913)}a&=~ce}l!==0&&mt(e,l,0),d!==0&&c===0&&e.tag!==0&&(e.suspendedLanes|=d&~(p&~t))}function mt(e,t,a){e.pendingLanes|=t,e.suspendedLanes&=~t;var l=31-zt(t);e.entangledLanes|=t,e.entanglements[l]=e.entanglements[l]|1073741824|a&261930}function pa(e,t){var a=e.entangledLanes|=t;for(e=e.entanglements;a;){var l=31-zt(a),c=1<<l;c&t|e[l]&t&&(e[l]|=t),a&=~c}}function Ir(e,t){var a=t&-t;return a=(a&42)!==0?1:Qs(a),(a&(e.suspendedLanes|t))!==0?0:a}function Qs(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function sa(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Xs(){var e=ne.p;return e!==0?e:(e=window.event,e===void 0?32:ug(e.type))}function Qr(e,t){var a=ne.p;try{return ne.p=e,t()}finally{ne.p=a}}var nn=Math.random().toString(36).slice(2),Et="__reactFiber$"+nn,$t="__reactProps$"+nn,_n="__reactContainer$"+nn,as="__reactEvents$"+nn,Nc="__reactListeners$"+nn,wc="__reactHandles$"+nn,Sc="__reactResources$"+nn,ns="__reactMarker$"+nn;function Js(e){delete e[Et],delete e[$t],delete e[as],delete e[Nc],delete e[wc]}function zn(e){var t=e[Et];if(t)return t;for(var a=e.parentNode;a;){if(t=a[_n]||a[Et]){if(a=t.alternate,t.child!==null||a!==null&&a.child!==null)for(e=W0(e);e!==null;){if(a=e[Et])return a;e=W0(e)}return t}e=a,a=e.parentNode}return null}function De(e){if(e=e[Et]||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 va(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(o(33))}function ln(e){var t=e[Sc];return t||(t=e[Sc]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function Lt(e){e[ns]=!0}var Ec=new Set,Xr={};function jn(e,t){gl(e,t),gl(e+"Capture",t)}function gl(e,t){for(Xr[e]=t,e=0;e<t.length;e++)Ec.add(t[e])}var Tc=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]*$"),Cc={},Ln={};function Jr(e){return kt.call(Ln,e)?!0:kt.call(Cc,e)?!1:Tc.test(e)?Ln[e]=!0:(Cc[e]=!0,!1)}function Jt(e,t,a){if(Jr(t))if(a===null)e.removeAttribute(t);else{switch(typeof a){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var l=t.toLowerCase().slice(0,5);if(l!=="data-"&&l!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+a)}}function Ks(e,t,a){if(a===null)e.removeAttribute(t);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+a)}}function st(e,t,a,l){if(l===null)e.removeAttribute(a);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(a);return}e.setAttributeNS(t,a,""+l)}}function Tt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Nn(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Kr(e,t,a){var l=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof l<"u"&&typeof l.get=="function"&&typeof l.set=="function"){var c=l.get,d=l.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return c.call(this)},set:function(p){a=""+p,d.call(this,p)}}),Object.defineProperty(e,t,{enumerable:l.enumerable}),{getValue:function(){return a},setValue:function(p){a=""+p},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function ls(e){if(!e._valueTracker){var t=Nn(e)?"checked":"value";e._valueTracker=Kr(e,t,""+e[t])}}function xl(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var a=t.getValue(),l="";return e&&(l=Nn(e)?e.checked?"true":"false":e.value),e=l,e!==a?(t.setValue(e),!0):!1}function sn(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var er=/[\n"\\]/g;function Kt(e){return e.replace(er,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function tr(e,t,a,l,c,d,p,T){e.name="",p!=null&&typeof p!="function"&&typeof p!="symbol"&&typeof p!="boolean"?e.type=p:e.removeAttribute("type"),t!=null?p==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+Tt(t)):e.value!==""+Tt(t)&&(e.value=""+Tt(t)):p!=="submit"&&p!=="reset"||e.removeAttribute("value"),t!=null?ss(e,p,Tt(t)):a!=null?ss(e,p,Tt(a)):l!=null&&e.removeAttribute("value"),c==null&&d!=null&&(e.defaultChecked=!!d),c!=null&&(e.checked=c&&typeof c!="function"&&typeof c!="symbol"),T!=null&&typeof T!="function"&&typeof T!="symbol"&&typeof T!="boolean"?e.name=""+Tt(T):e.removeAttribute("name")}function pl(e,t,a,l,c,d,p,T){if(d!=null&&typeof d!="function"&&typeof d!="symbol"&&typeof d!="boolean"&&(e.type=d),t!=null||a!=null){if(!(d!=="submit"&&d!=="reset"||t!=null)){ls(e);return}a=a!=null?""+Tt(a):"",t=t!=null?""+Tt(t):a,T||t===e.value||(e.value=t),e.defaultValue=t}l=l??c,l=typeof l!="function"&&typeof l!="symbol"&&!!l,e.checked=T?e.checked:!!l,e.defaultChecked=!!l,p!=null&&typeof p!="function"&&typeof p!="symbol"&&typeof p!="boolean"&&(e.name=p),ls(e)}function ss(e,t,a){t==="number"&&sn(e.ownerDocument)===e||e.defaultValue===""+a||(e.defaultValue=""+a)}function Un(e,t,a,l){if(e=e.options,t){t={};for(var c=0;c<a.length;c++)t["$"+a[c]]=!0;for(a=0;a<e.length;a++)c=t.hasOwnProperty("$"+e[a].value),e[a].selected!==c&&(e[a].selected=c),c&&l&&(e[a].defaultSelected=!0)}else{for(a=""+Tt(a),t=null,c=0;c<e.length;c++){if(e[c].value===a){e[c].selected=!0,l&&(e[c].defaultSelected=!0);return}t!==null||e[c].disabled||(t=e[c])}t!==null&&(t.selected=!0)}}function rs(e,t,a){if(t!=null&&(t=""+Tt(t),t!==e.value&&(e.value=t),a==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=a!=null?""+Tt(a):""}function ei(e,t,a,l){if(t==null){if(l!=null){if(a!=null)throw Error(o(92));if(ue(l)){if(1<l.length)throw Error(o(93));l=l[0]}a=l}a==null&&(a=""),t=a}a=Tt(t),e.defaultValue=a,l=e.textContent,l===a&&l!==""&&l!==null&&(e.value=l),ls(e)}function rn(e,t){if(t){var a=e.firstChild;if(a&&a===e.lastChild&&a.nodeType===3){a.nodeValue=t;return}}e.textContent=t}var is=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function cs(e,t,a){var l=t.indexOf("--")===0;a==null||typeof a=="boolean"||a===""?l?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":l?e.setProperty(t,a):typeof a!="number"||a===0||is.has(t)?t==="float"?e.cssFloat=a:e[t]=(""+a).trim():e[t]=a+"px"}function Mc(e,t,a){if(t!=null&&typeof t!="object")throw Error(o(62));if(e=e.style,a!=null){for(var l in a)!a.hasOwnProperty(l)||t!=null&&t.hasOwnProperty(l)||(l.indexOf("--")===0?e.setProperty(l,""):l==="float"?e.cssFloat="":e[l]="");for(var c in t)l=t[c],t.hasOwnProperty(c)&&a[c]!==l&&cs(e,c,l)}else for(var d in t)t.hasOwnProperty(d)&&cs(e,d,t[d])}function ar(e){if(e.indexOf("-")===-1)return!1;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var ju=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"]]),Oc=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function os(e){return Oc.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Pa(){}var ti=null;function nr(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Hn=null,vl=null;function Rc(e){var t=De(e);if(t&&(e=t.stateNode)){var a=e[$t]||null;e:switch(e=t.stateNode,t.type){case"input":if(tr(e,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name),t=a.name,a.type==="radio"&&t!=null){for(a=e;a.parentNode;)a=a.parentNode;for(a=a.querySelectorAll('input[name="'+Kt(""+t)+'"][type="radio"]'),t=0;t<a.length;t++){var l=a[t];if(l!==e&&l.form===e.form){var c=l[$t]||null;if(!c)throw Error(o(90));tr(l,c.value,c.defaultValue,c.defaultValue,c.checked,c.defaultChecked,c.type,c.name)}}for(t=0;t<a.length;t++)l=a[t],l.form===e.form&&xl(l)}break e;case"textarea":rs(e,a.value,a.defaultValue);break e;case"select":t=a.value,t!=null&&Un(e,!!a.multiple,t,!1)}}}var ai=!1;function ni(e,t,a){if(ai)return e(t,a);ai=!0;try{var l=e(t);return l}finally{if(ai=!1,(Hn!==null||vl!==null)&&(Eo(),Hn&&(t=Hn,e=vl,vl=Hn=null,Rc(t),e)))for(t=0;t<e.length;t++)Rc(e[t])}}function us(e,t){var a=e.stateNode;if(a===null)return null;var l=a[$t]||null;if(l===null)return null;a=l[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(l=!l.disabled)||(e=e.type,l=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!l;break e;default:e=!1}if(e)return null;if(a&&typeof a!="function")throw Error(o(231,t,typeof a));return a}var cn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),li=!1;if(cn)try{var ds={};Object.defineProperty(ds,"passive",{get:function(){li=!0}}),window.addEventListener("test",ds,ds),window.removeEventListener("test",ds,ds)}catch{li=!1}var wn=null,lr=null,sr=null;function Yt(){if(sr)return sr;var e,t=lr,a=t.length,l,c="value"in wn?wn.value:wn.textContent,d=c.length;for(e=0;e<a&&t[e]===c[e];e++);var p=a-e;for(l=1;l<=p&&t[a-l]===c[d-l];l++);return sr=c.slice(e,1<l?1-l:void 0)}function fs(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function on(){return!0}function qn(){return!1}function Ct(e){function t(a,l,c,d,p){this._reactName=a,this._targetInst=c,this.type=l,this.nativeEvent=d,this.target=p,this.currentTarget=null;for(var T in e)e.hasOwnProperty(T)&&(a=e[T],this[T]=a?a(d):d[T]);return this.isDefaultPrevented=(d.defaultPrevented!=null?d.defaultPrevented:d.returnValue===!1)?on:qn,this.isPropagationStopped=qn,this}return C(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=on)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=on)},persist:function(){},isPersistent:on}),t}var Sn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},hs=Ct(Sn),ms=C({},Sn,{view:0,detail:0}),si=Ct(ms),rr,gs,xs,ir=C({},ms,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:vs,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==xs&&(xs&&e.type==="mousemove"?(rr=e.screenX-xs.screenX,gs=e.screenY-xs.screenY):gs=rr=0,xs=e),rr)},movementY:function(e){return"movementY"in e?e.movementY:gs}}),Dc=Ct(ir),Nu=C({},ir,{dataTransfer:0}),wu=Ct(Nu),Su=C({},ms,{relatedTarget:0}),cr=Ct(Su),Eu=C({},Sn,{animationName:0,elapsedTime:0,pseudoElement:0}),yl=Ct(Eu),Tu=C({},Sn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),bl=Ct(Tu),ps=C({},Sn,{data:0}),jl=Ct(ps),Cu={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Mu={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"},Ou={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Ru(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Ou[e])?!!t[e]:!1}function vs(){return Ru}var Du=C({},ms,{key:function(e){if(e.key){var t=Cu[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=fs(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Mu[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:vs,charCode:function(e){return e.type==="keypress"?fs(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?fs(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),ku=Ct(Du),Au=C({},ir,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),kc=Ct(Au),_u=C({},ms,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:vs}),zu=Ct(_u),Ac=C({},Sn,{propertyName:0,elapsedTime:0,pseudoElement:0}),Lu=Ct(Ac),Uu=C({},ir,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),Hu=Ct(Uu),qu=C({},Sn,{newState:0,oldState:0}),Vu=Ct(qu),_c=[9,13,27,32],ri=cn&&"CompositionEvent"in window,ys=null;cn&&"documentMode"in document&&(ys=document.documentMode);var Bu=cn&&"TextEvent"in window&&!ys,zc=cn&&(!ri||ys&&8<ys&&11>=ys),Lc=" ",Uc=!1;function Hc(e,t){switch(e){case"keyup":return _c.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function qc(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Nl=!1;function Pu(e,t){switch(e){case"compositionend":return qc(t);case"keypress":return t.which!==32?null:(Uc=!0,Lc);case"textInput":return e=t.data,e===Lc&&Uc?null:e;default:return null}}function $u(e,t){if(Nl)return e==="compositionend"||!ri&&Hc(e,t)?(e=Yt(),sr=lr=wn=null,Nl=!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 zc&&t.locale!=="ko"?null:t.data;default:return null}}var Yu={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 Vc(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Yu[e.type]:t==="textarea"}function ii(e,t,a,l){Hn?vl?vl.push(l):vl=[l]:Hn=l,t=ko(t,"onChange"),0<t.length&&(a=new hs("onChange","change",null,a,l),e.push({event:a,listeners:t}))}var wl=null,bs=null;function ya(e){_0(e,0)}function un(e){var t=va(e);if(xl(t))return e}function Bc(e,t){if(e==="change")return t}var En=!1;if(cn){var ci;if(cn){var Oa="oninput"in document;if(!Oa){var oi=document.createElement("div");oi.setAttribute("oninput","return;"),Oa=typeof oi.oninput=="function"}ci=Oa}else ci=!1;En=ci&&(!document.documentMode||9<document.documentMode)}function ui(){wl&&(wl.detachEvent("onpropertychange",di),bs=wl=null)}function di(e){if(e.propertyName==="value"&&un(bs)){var t=[];ii(t,bs,e,nr(e)),ni(ya,t)}}function $e(e,t,a){e==="focusin"?(ui(),wl=t,bs=a,wl.attachEvent("onpropertychange",di)):e==="focusout"&&ui()}function Sl(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return un(bs)}function Gu(e,t){if(e==="click")return un(t)}function xt(e,t){if(e==="input"||e==="change")return un(t)}function js(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var ra=typeof Object.is=="function"?Object.is:js;function Ns(e,t){if(ra(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var a=Object.keys(e),l=Object.keys(t);if(a.length!==l.length)return!1;for(l=0;l<a.length;l++){var c=a[l];if(!kt.call(t,c)||!ra(e[c],t[c]))return!1}return!0}function Pc(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function $c(e,t){var a=Pc(e);e=0;for(var l;a;){if(a.nodeType===3){if(l=e+a.textContent.length,e<=t&&l>=t)return{node:a,offset:t-e};e=l}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=Pc(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 Fu(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=sn(e.document);t instanceof e.HTMLIFrameElement;){try{var a=typeof t.contentWindow.location.href=="string"}catch{a=!1}if(a)e=t.contentWindow;else break;t=sn(e.document)}return t}function 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 Yc=cn&&"documentMode"in document&&11>=document.documentMode,El=null,ur=null,ea=null,dr=!1;function ws(e,t,a){var l=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;dr||El==null||El!==sn(l)||(l=El,"selectionStart"in l&&or(l)?l={start:l.selectionStart,end:l.selectionEnd}:(l=(l.ownerDocument&&l.ownerDocument.defaultView||window).getSelection(),l={anchorNode:l.anchorNode,anchorOffset:l.anchorOffset,focusNode:l.focusNode,focusOffset:l.focusOffset}),ea&&Ns(ea,l)||(ea=l,l=ko(ur,"onSelect"),0<l.length&&(t=new hs("onSelect","select",null,t,a),e.push({event:t,listeners:l}),t.target=El)))}function Vn(e,t){var a={};return a[e.toLowerCase()]=t.toLowerCase(),a["Webkit"+e]="webkit"+t,a["Moz"+e]="moz"+t,a}var Tl={animationend:Vn("Animation","AnimationEnd"),animationiteration:Vn("Animation","AnimationIteration"),animationstart:Vn("Animation","AnimationStart"),transitionrun:Vn("Transition","TransitionRun"),transitionstart:Vn("Transition","TransitionStart"),transitioncancel:Vn("Transition","TransitionCancel"),transitionend:Vn("Transition","TransitionEnd")},fi={},Gc={};cn&&(Gc=document.createElement("div").style,"AnimationEvent"in window||(delete Tl.animationend.animation,delete Tl.animationiteration.animation,delete Tl.animationstart.animation),"TransitionEvent"in window||delete Tl.transitionend.transition);function Bn(e){if(fi[e])return fi[e];if(!Tl[e])return e;var t=Tl[e],a;for(a in t)if(t.hasOwnProperty(a)&&a in Gc)return fi[e]=t[a];return e}var Fc=Bn("animationend"),Zc=Bn("animationiteration"),fr=Bn("animationstart"),Zu=Bn("transitionrun"),Wu=Bn("transitionstart"),Wc=Bn("transitioncancel"),hi=Bn("transitionend"),mi=new Map,gi="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");gi.push("scrollEnd");function ba(e,t){mi.set(e,t),jn(t,[e])}var Cl=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},oa=[],$a=0,Ss=0;function Ml(){for(var e=$a,t=Ss=$a=0;t<e;){var a=oa[t];oa[t++]=null;var l=oa[t];oa[t++]=null;var c=oa[t];oa[t++]=null;var d=oa[t];if(oa[t++]=null,l!==null&&c!==null){var p=l.pending;p===null?c.next=c:(c.next=p.next,p.next=c),l.pending=c}d!==0&&Es(a,c,d)}}function Ya(e,t,a,l){oa[$a++]=e,oa[$a++]=t,oa[$a++]=a,oa[$a++]=l,Ss|=l,e.lanes|=l,e=e.alternate,e!==null&&(e.lanes|=l)}function hr(e,t,a,l){return Ya(e,t,a,l),Ts(e)}function Ga(e,t){return Ya(e,null,null,t),Ts(e)}function Es(e,t,a){e.lanes|=a;var l=e.alternate;l!==null&&(l.lanes|=a);for(var c=!1,d=e.return;d!==null;)d.childLanes|=a,l=d.alternate,l!==null&&(l.childLanes|=a),d.tag===22&&(e=d.stateNode,e===null||e._visibility&1||(c=!0)),e=d,d=d.return;return e.tag===3?(d=e.stateNode,c&&t!==null&&(c=31-zt(a),e=d.hiddenUpdates,l=e[c],l===null?e[c]=[t]:l.push(t),t.lane=a|536870912),d):null}function Ts(e){if(50<Hi)throw Hi=0,Zd=null,Error(o(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Ra={};function mr(e,t,a,l){this.tag=e,this.key=a,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=l,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ta(e,t,a,l){return new mr(e,t,a,l)}function gr(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Fa(e,t){var a=e.alternate;return a===null?(a=ta(e.tag,t,e.key,e.mode),a.elementType=e.elementType,a.type=e.type,a.stateNode=e.stateNode,a.alternate=e,e.alternate=a):(a.pendingProps=t,a.type=e.type,a.flags=0,a.subtreeFlags=0,a.deletions=null),a.flags=e.flags&65011712,a.childLanes=e.childLanes,a.lanes=e.lanes,a.child=e.child,a.memoizedProps=e.memoizedProps,a.memoizedState=e.memoizedState,a.updateQueue=e.updateQueue,t=e.dependencies,a.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},a.sibling=e.sibling,a.index=e.index,a.ref=e.ref,a.refCleanup=e.refCleanup,a}function Ic(e,t){e.flags&=65011714;var a=e.alternate;return a===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=a.childLanes,e.lanes=a.lanes,e.child=a.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=a.memoizedProps,e.memoizedState=a.memoizedState,e.updateQueue=a.updateQueue,e.type=a.type,t=a.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function xr(e,t,a,l,c,d){var p=0;if(l=e,typeof e=="function")gr(e)&&(p=1);else if(typeof e=="string")p=cy(e,a,pe.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case ae:return e=ta(31,a,t,c),e.elementType=ae,e.lanes=d,e;case O:return Za(a.children,c,d,t);case k:p=8,c|=24;break;case P:return e=ta(12,a,t,c|2),e.elementType=P,e.lanes=d,e;case K:return e=ta(13,a,t,c),e.elementType=K,e.lanes=d,e;case q:return e=ta(19,a,t,c),e.elementType=q,e.lanes=d,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Q:p=10;break e;case D:p=9;break e;case w:p=11;break e;case Z:p=14;break e;case R:p=16,l=null;break e}p=29,a=Error(o(130,e===null?"null":typeof e,"")),l=null}return t=ta(p,a,t,c),t.elementType=e,t.type=l,t.lanes=d,t}function Za(e,t,a,l){return e=ta(7,e,l,t),e.lanes=a,e}function xi(e,t,a){return e=ta(6,e,null,t),e.lanes=a,e}function Qc(e){var t=ta(18,null,null,0);return t.stateNode=e,t}function Ol(e,t,a){return t=ta(4,e.children!==null?e.children:[],e.key,t),t.lanes=a,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var pi=new WeakMap;function ja(e,t){if(typeof e=="object"&&e!==null){var a=pi.get(e);return a!==void 0?a:(t={value:e,source:t,stack:Va(t)},pi.set(e,t),t)}return{value:e,source:t,stack:Va(t)}}var Pn=[],$n=0,Cs=null,dn=0,ia=[],Ce=0,Na=null,Wa=1,g="";function i(e,t){Pn[$n++]=dn,Pn[$n++]=Cs,Cs=e,dn=t}function m(e,t,a){ia[Ce++]=Wa,ia[Ce++]=g,ia[Ce++]=Na,Na=e;var l=Wa;e=g;var c=32-zt(l)-1;l&=~(1<<c),a+=1;var d=32-zt(t)+c;if(30<d){var p=c-c%5;d=(l&(1<<p)-1).toString(32),l>>=p,c-=p,Wa=1<<32-zt(t)+c|a<<c|l,g=d+e}else Wa=1<<d|a<<c|l,g=e}function v(e){e.return!==null&&(i(e,1),m(e,1,0))}function E(e){for(;e===Cs;)Cs=Pn[--$n],Pn[$n]=null,dn=Pn[--$n],Pn[$n]=null;for(;e===Na;)Na=ia[--Ce],ia[Ce]=null,g=ia[--Ce],ia[Ce]=null,Wa=ia[--Ce],ia[Ce]=null}function A(e,t){ia[Ce++]=Wa,ia[Ce++]=g,ia[Ce++]=Na,Wa=t.id,g=t.overflow,Na=e}var V=null,B=null,Y=!1,de=null,be=!1,Le=Error(o(519));function Ye(e){var t=Error(o(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw fn(ja(t,e)),Le}function ke(e){var t=e.stateNode,a=e.type,l=e.memoizedProps;switch(t[Et]=e,t[$t]=l,a){case"dialog":Pe("cancel",t),Pe("close",t);break;case"iframe":case"object":case"embed":Pe("load",t);break;case"video":case"audio":for(a=0;a<Vi.length;a++)Pe(Vi[a],t);break;case"source":Pe("error",t);break;case"img":case"image":case"link":Pe("error",t),Pe("load",t);break;case"details":Pe("toggle",t);break;case"input":Pe("invalid",t),pl(t,l.value,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name,!0);break;case"select":Pe("invalid",t);break;case"textarea":Pe("invalid",t),ei(t,l.value,l.defaultValue,l.children)}a=l.children,typeof a!="string"&&typeof a!="number"&&typeof a!="bigint"||t.textContent===""+a||l.suppressHydrationWarning===!0||H0(t.textContent,a)?(l.popover!=null&&(Pe("beforetoggle",t),Pe("toggle",t)),l.onScroll!=null&&Pe("scroll",t),l.onScrollEnd!=null&&Pe("scrollend",t),l.onClick!=null&&(t.onclick=Pa),t=!0):t=!1,t||Ye(e,!0)}function jt(e){for(V=e.return;V;)switch(V.tag){case 5:case 31:case 13:be=!1;return;case 27:case 3:be=!0;return;default:V=V.return}}function Wt(e){if(e!==V)return!1;if(!Y)return jt(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")||of(e.type,e.memoizedProps)),a=!a),a&&B&&Ye(e),jt(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));B=Z0(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));B=Z0(e)}else t===27?(t=B,Pl(e.type)?(e=mf,mf=null,B=e):B=t):B=V?Ja(e.stateNode.nextSibling):null;return!0}function It(){B=V=null,Y=!1}function Tn(){var e=de;return e!==null&&(Ta===null?Ta=e:Ta.push.apply(Ta,e),de=null),e}function fn(e){de===null?de=[e]:de.push(e)}var pr=H(null),Yn=null,Ia=null;function Cn(e,t,a){ge(pr,t._currentValue),t._currentValue=a}function hn(e){e._currentValue=pr.current,se(pr)}function vi(e,t,a){for(;e!==null;){var l=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,l!==null&&(l.childLanes|=t)):l!==null&&(l.childLanes&t)!==t&&(l.childLanes|=t),e===a)break;e=e.return}}function Gn(e,t,a,l){var c=e.child;for(c!==null&&(c.return=e);c!==null;){var d=c.dependencies;if(d!==null){var p=c.child;d=d.firstContext;e:for(;d!==null;){var T=d;d=c;for(var L=0;L<t.length;L++)if(T.context===t[L]){d.lanes|=a,T=d.alternate,T!==null&&(T.lanes|=a),vi(d.return,a,e),l||(p=null);break e}d=T.next}}else if(c.tag===18){if(p=c.return,p===null)throw Error(o(341));p.lanes|=a,d=p.alternate,d!==null&&(d.lanes|=a),vi(p,a,e),p=null}else p=c.child;if(p!==null)p.return=c;else for(p=c;p!==null;){if(p===e){p=null;break}if(c=p.sibling,c!==null){c.return=p.return,p=c;break}p=p.return}c=p}}function Qa(e,t,a,l){e=null;for(var c=t,d=!1;c!==null;){if(!d){if((c.flags&524288)!==0)d=!0;else if((c.flags&262144)!==0)break}if(c.tag===10){var p=c.alternate;if(p===null)throw Error(o(387));if(p=p.memoizedProps,p!==null){var T=c.type;ra(c.pendingProps.value,p.value)||(e!==null?e.push(T):e=[T])}}else if(c===Me.current){if(p=c.alternate,p===null)throw Error(o(387));p.memoizedState.memoizedState!==c.memoizedState.memoizedState&&(e!==null?e.push(Gi):e=[Gi])}c=c.return}e!==null&&Gn(t,e,a,l),t.flags|=262144}function vr(e){for(e=e.firstContext;e!==null;){if(!ra(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Ms(e){Yn=e,Ia=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function aa(e){return wh(Yn,e)}function Xc(e,t){return Yn===null&&Ms(e),wh(e,t)}function wh(e,t){var a=t._currentValue;if(t={context:t,memoizedValue:a,next:null},Ia===null){if(e===null)throw Error(o(308));Ia=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Ia=Ia.next=t;return a}var lv=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(a,l){e.push(l)}};this.abort=function(){t.aborted=!0,e.forEach(function(a){return a()})}},sv=n.unstable_scheduleCallback,rv=n.unstable_NormalPriority,Ut={$$typeof:Q,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Iu(){return{controller:new lv,data:new Map,refCount:0}}function yi(e){e.refCount--,e.refCount===0&&sv(rv,function(){e.controller.abort()})}var bi=null,Qu=0,yr=0,br=null;function iv(e,t){if(bi===null){var a=bi=[];Qu=0,yr=Kd(),br={status:"pending",value:void 0,then:function(l){a.push(l)}}}return Qu++,t.then(Sh,Sh),t}function Sh(){if(--Qu===0&&bi!==null){br!==null&&(br.status="fulfilled");var e=bi;bi=null,yr=0,br=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function cv(e,t){var a=[],l={status:"pending",value:null,reason:null,then:function(c){a.push(c)}};return e.then(function(){l.status="fulfilled",l.value=t;for(var c=0;c<a.length;c++)(0,a[c])(t)},function(c){for(l.status="rejected",l.reason=c,c=0;c<a.length;c++)(0,a[c])(void 0)}),l}var Eh=G.S;G.S=function(e,t){c0=At(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&iv(e,t),Eh!==null&&Eh(e,t)};var Os=H(null);function Xu(){var e=Os.current;return e!==null?e:ht.pooledCache}function Jc(e,t){t===null?ge(Os,Os.current):ge(Os,t.pool)}function Th(){var e=Xu();return e===null?null:{parent:Ut._currentValue,pool:e}}var jr=Error(o(460)),Ju=Error(o(474)),Kc=Error(o(542)),eo={then:function(){}};function Ch(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Mh(e,t,a){switch(a=e[a],a===void 0?e.push(t):a!==t&&(t.then(Pa,Pa),t=a),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Rh(e),e;default:if(typeof t.status=="string")t.then(Pa,Pa);else{if(e=ht,e!==null&&100<e.shellSuspendCounter)throw Error(o(482));e=t,e.status="pending",e.then(function(l){if(t.status==="pending"){var c=t;c.status="fulfilled",c.value=l}},function(l){if(t.status==="pending"){var c=t;c.status="rejected",c.reason=l}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Rh(e),e}throw Ds=t,jr}}function Rs(e){try{var t=e._init;return t(e._payload)}catch(a){throw a!==null&&typeof a=="object"&&typeof a.then=="function"?(Ds=a,jr):a}}var Ds=null;function Oh(){if(Ds===null)throw Error(o(459));var e=Ds;return Ds=null,e}function Rh(e){if(e===jr||e===Kc)throw Error(o(483))}var Nr=null,ji=0;function to(e){var t=ji;return ji+=1,Nr===null&&(Nr=[]),Mh(Nr,e,t)}function Ni(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function ao(e,t){throw t.$$typeof===z?Error(o(525)):(e=Object.prototype.toString.call(t),Error(o(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function Dh(e){function t(F,$){if(e){var W=F.deletions;W===null?(F.deletions=[$],F.flags|=16):W.push($)}}function a(F,$){if(!e)return null;for(;$!==null;)t(F,$),$=$.sibling;return null}function l(F){for(var $=new Map;F!==null;)F.key!==null?$.set(F.key,F):$.set(F.index,F),F=F.sibling;return $}function c(F,$){return F=Fa(F,$),F.index=0,F.sibling=null,F}function d(F,$,W){return F.index=W,e?(W=F.alternate,W!==null?(W=W.index,W<$?(F.flags|=67108866,$):W):(F.flags|=67108866,$)):(F.flags|=1048576,$)}function p(F){return e&&F.alternate===null&&(F.flags|=67108866),F}function T(F,$,W,ie){return $===null||$.tag!==6?($=xi(W,F.mode,ie),$.return=F,$):($=c($,W),$.return=F,$)}function L(F,$,W,ie){var Re=W.type;return Re===O?re(F,$,W.props.children,ie,W.key):$!==null&&($.elementType===Re||typeof Re=="object"&&Re!==null&&Re.$$typeof===R&&Rs(Re)===$.type)?($=c($,W.props),Ni($,W),$.return=F,$):($=xr(W.type,W.key,W.props,null,F.mode,ie),Ni($,W),$.return=F,$)}function I(F,$,W,ie){return $===null||$.tag!==4||$.stateNode.containerInfo!==W.containerInfo||$.stateNode.implementation!==W.implementation?($=Ol(W,F.mode,ie),$.return=F,$):($=c($,W.children||[]),$.return=F,$)}function re(F,$,W,ie,Re){return $===null||$.tag!==7?($=Za(W,F.mode,ie,Re),$.return=F,$):($=c($,W),$.return=F,$)}function ce(F,$,W){if(typeof $=="string"&&$!==""||typeof $=="number"||typeof $=="bigint")return $=xi(""+$,F.mode,W),$.return=F,$;if(typeof $=="object"&&$!==null){switch($.$$typeof){case _:return W=xr($.type,$.key,$.props,null,F.mode,W),Ni(W,$),W.return=F,W;case N:return $=Ol($,F.mode,W),$.return=F,$;case R:return $=Rs($),ce(F,$,W)}if(ue($)||le($))return $=Za($,F.mode,W,null),$.return=F,$;if(typeof $.then=="function")return ce(F,to($),W);if($.$$typeof===Q)return ce(F,Xc(F,$),W);ao(F,$)}return null}function X(F,$,W,ie){var Re=$!==null?$.key:null;if(typeof W=="string"&&W!==""||typeof W=="number"||typeof W=="bigint")return Re!==null?null:T(F,$,""+W,ie);if(typeof W=="object"&&W!==null){switch(W.$$typeof){case _:return W.key===Re?L(F,$,W,ie):null;case N:return W.key===Re?I(F,$,W,ie):null;case R:return W=Rs(W),X(F,$,W,ie)}if(ue(W)||le(W))return Re!==null?null:re(F,$,W,ie,null);if(typeof W.then=="function")return X(F,$,to(W),ie);if(W.$$typeof===Q)return X(F,$,Xc(F,W),ie);ao(F,W)}return null}function te(F,$,W,ie,Re){if(typeof ie=="string"&&ie!==""||typeof ie=="number"||typeof ie=="bigint")return F=F.get(W)||null,T($,F,""+ie,Re);if(typeof ie=="object"&&ie!==null){switch(ie.$$typeof){case _:return F=F.get(ie.key===null?W:ie.key)||null,L($,F,ie,Re);case N:return F=F.get(ie.key===null?W:ie.key)||null,I($,F,ie,Re);case R:return ie=Rs(ie),te(F,$,W,ie,Re)}if(ue(ie)||le(ie))return F=F.get(W)||null,re($,F,ie,Re,null);if(typeof ie.then=="function")return te(F,$,W,to(ie),Re);if(ie.$$typeof===Q)return te(F,$,W,Xc($,ie),Re);ao($,ie)}return null}function je(F,$,W,ie){for(var Re=null,et=null,Ne=$,Ve=$=0,Fe=null;Ne!==null&&Ve<W.length;Ve++){Ne.index>Ve?(Fe=Ne,Ne=null):Fe=Ne.sibling;var tt=X(F,Ne,W[Ve],ie);if(tt===null){Ne===null&&(Ne=Fe);break}e&&Ne&&tt.alternate===null&&t(F,Ne),$=d(tt,$,Ve),et===null?Re=tt:et.sibling=tt,et=tt,Ne=Fe}if(Ve===W.length)return a(F,Ne),Y&&i(F,Ve),Re;if(Ne===null){for(;Ve<W.length;Ve++)Ne=ce(F,W[Ve],ie),Ne!==null&&($=d(Ne,$,Ve),et===null?Re=Ne:et.sibling=Ne,et=Ne);return Y&&i(F,Ve),Re}for(Ne=l(Ne);Ve<W.length;Ve++)Fe=te(Ne,F,Ve,W[Ve],ie),Fe!==null&&(e&&Fe.alternate!==null&&Ne.delete(Fe.key===null?Ve:Fe.key),$=d(Fe,$,Ve),et===null?Re=Fe:et.sibling=Fe,et=Fe);return e&&Ne.forEach(function(Zl){return t(F,Zl)}),Y&&i(F,Ve),Re}function Ae(F,$,W,ie){if(W==null)throw Error(o(151));for(var Re=null,et=null,Ne=$,Ve=$=0,Fe=null,tt=W.next();Ne!==null&&!tt.done;Ve++,tt=W.next()){Ne.index>Ve?(Fe=Ne,Ne=null):Fe=Ne.sibling;var Zl=X(F,Ne,tt.value,ie);if(Zl===null){Ne===null&&(Ne=Fe);break}e&&Ne&&Zl.alternate===null&&t(F,Ne),$=d(Zl,$,Ve),et===null?Re=Zl:et.sibling=Zl,et=Zl,Ne=Fe}if(tt.done)return a(F,Ne),Y&&i(F,Ve),Re;if(Ne===null){for(;!tt.done;Ve++,tt=W.next())tt=ce(F,tt.value,ie),tt!==null&&($=d(tt,$,Ve),et===null?Re=tt:et.sibling=tt,et=tt);return Y&&i(F,Ve),Re}for(Ne=l(Ne);!tt.done;Ve++,tt=W.next())tt=te(Ne,F,Ve,tt.value,ie),tt!==null&&(e&&tt.alternate!==null&&Ne.delete(tt.key===null?Ve:tt.key),$=d(tt,$,Ve),et===null?Re=tt:et.sibling=tt,et=tt);return e&&Ne.forEach(function(yy){return t(F,yy)}),Y&&i(F,Ve),Re}function ft(F,$,W,ie){if(typeof W=="object"&&W!==null&&W.type===O&&W.key===null&&(W=W.props.children),typeof W=="object"&&W!==null){switch(W.$$typeof){case _:e:{for(var Re=W.key;$!==null;){if($.key===Re){if(Re=W.type,Re===O){if($.tag===7){a(F,$.sibling),ie=c($,W.props.children),ie.return=F,F=ie;break e}}else if($.elementType===Re||typeof Re=="object"&&Re!==null&&Re.$$typeof===R&&Rs(Re)===$.type){a(F,$.sibling),ie=c($,W.props),Ni(ie,W),ie.return=F,F=ie;break e}a(F,$);break}else t(F,$);$=$.sibling}W.type===O?(ie=Za(W.props.children,F.mode,ie,W.key),ie.return=F,F=ie):(ie=xr(W.type,W.key,W.props,null,F.mode,ie),Ni(ie,W),ie.return=F,F=ie)}return p(F);case N:e:{for(Re=W.key;$!==null;){if($.key===Re)if($.tag===4&&$.stateNode.containerInfo===W.containerInfo&&$.stateNode.implementation===W.implementation){a(F,$.sibling),ie=c($,W.children||[]),ie.return=F,F=ie;break e}else{a(F,$);break}else t(F,$);$=$.sibling}ie=Ol(W,F.mode,ie),ie.return=F,F=ie}return p(F);case R:return W=Rs(W),ft(F,$,W,ie)}if(ue(W))return je(F,$,W,ie);if(le(W)){if(Re=le(W),typeof Re!="function")throw Error(o(150));return W=Re.call(W),Ae(F,$,W,ie)}if(typeof W.then=="function")return ft(F,$,to(W),ie);if(W.$$typeof===Q)return ft(F,$,Xc(F,W),ie);ao(F,W)}return typeof W=="string"&&W!==""||typeof W=="number"||typeof W=="bigint"?(W=""+W,$!==null&&$.tag===6?(a(F,$.sibling),ie=c($,W),ie.return=F,F=ie):(a(F,$),ie=xi(W,F.mode,ie),ie.return=F,F=ie),p(F)):a(F,$)}return function(F,$,W,ie){try{ji=0;var Re=ft(F,$,W,ie);return Nr=null,Re}catch(Ne){if(Ne===jr||Ne===Kc)throw Ne;var et=ta(29,Ne,null,F.mode);return et.lanes=ie,et.return=F,et}finally{}}}var ks=Dh(!0),kh=Dh(!1),Rl=!1;function Ku(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function ed(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 Dl(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function kl(e,t,a){var l=e.updateQueue;if(l===null)return null;if(l=l.shared,(at&2)!==0){var c=l.pending;return c===null?t.next=t:(t.next=c.next,c.next=t),l.pending=t,t=Ts(e),Es(e,null,a),t}return Ya(e,l,t,a),Ts(e)}function wi(e,t,a){if(t=t.updateQueue,t!==null&&(t=t.shared,(a&4194048)!==0)){var l=t.lanes;l&=e.pendingLanes,a|=l,t.lanes=a,pa(e,a)}}function td(e,t){var a=e.updateQueue,l=e.alternate;if(l!==null&&(l=l.updateQueue,a===l)){var c=null,d=null;if(a=a.firstBaseUpdate,a!==null){do{var p={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};d===null?c=d=p:d=d.next=p,a=a.next}while(a!==null);d===null?c=d=t:d=d.next=t}else c=d=t;a={baseState:l.baseState,firstBaseUpdate:c,lastBaseUpdate:d,shared:l.shared,callbacks:l.callbacks},e.updateQueue=a;return}e=a.lastBaseUpdate,e===null?a.firstBaseUpdate=t:e.next=t,a.lastBaseUpdate=t}var ad=!1;function Si(){if(ad){var e=br;if(e!==null)throw e}}function Ei(e,t,a,l){ad=!1;var c=e.updateQueue;Rl=!1;var d=c.firstBaseUpdate,p=c.lastBaseUpdate,T=c.shared.pending;if(T!==null){c.shared.pending=null;var L=T,I=L.next;L.next=null,p===null?d=I:p.next=I,p=L;var re=e.alternate;re!==null&&(re=re.updateQueue,T=re.lastBaseUpdate,T!==p&&(T===null?re.firstBaseUpdate=I:T.next=I,re.lastBaseUpdate=L))}if(d!==null){var ce=c.baseState;p=0,re=I=L=null,T=d;do{var X=T.lane&-536870913,te=X!==T.lane;if(te?(Ge&X)===X:(l&X)===X){X!==0&&X===yr&&(ad=!0),re!==null&&(re=re.next={lane:0,tag:T.tag,payload:T.payload,callback:null,next:null});e:{var je=e,Ae=T;X=t;var ft=a;switch(Ae.tag){case 1:if(je=Ae.payload,typeof je=="function"){ce=je.call(ft,ce,X);break e}ce=je;break e;case 3:je.flags=je.flags&-65537|128;case 0:if(je=Ae.payload,X=typeof je=="function"?je.call(ft,ce,X):je,X==null)break e;ce=C({},ce,X);break e;case 2:Rl=!0}}X=T.callback,X!==null&&(e.flags|=64,te&&(e.flags|=8192),te=c.callbacks,te===null?c.callbacks=[X]:te.push(X))}else te={lane:X,tag:T.tag,payload:T.payload,callback:T.callback,next:null},re===null?(I=re=te,L=ce):re=re.next=te,p|=X;if(T=T.next,T===null){if(T=c.shared.pending,T===null)break;te=T,T=te.next,te.next=null,c.lastBaseUpdate=te,c.shared.pending=null}}while(!0);re===null&&(L=ce),c.baseState=L,c.firstBaseUpdate=I,c.lastBaseUpdate=re,d===null&&(c.shared.lanes=0),Ul|=p,e.lanes=p,e.memoizedState=ce}}function Ah(e,t){if(typeof e!="function")throw Error(o(191,e));e.call(t)}function _h(e,t){var a=e.callbacks;if(a!==null)for(e.callbacks=null,e=0;e<a.length;e++)Ah(a[e],t)}var wr=H(null),no=H(0);function zh(e,t){e=el,ge(no,e),ge(wr,t),el=e|t.baseLanes}function nd(){ge(no,el),ge(wr,wr.current)}function ld(){el=no.current,se(wr),se(no)}var Da=H(null),Xa=null;function Al(e){var t=e.alternate;ge(Mt,Mt.current&1),ge(Da,e),Xa===null&&(t===null||wr.current!==null||t.memoizedState!==null)&&(Xa=e)}function sd(e){ge(Mt,Mt.current),ge(Da,e),Xa===null&&(Xa=e)}function Lh(e){e.tag===22?(ge(Mt,Mt.current),ge(Da,e),Xa===null&&(Xa=e)):_l()}function _l(){ge(Mt,Mt.current),ge(Da,Da.current)}function ka(e){se(Da),Xa===e&&(Xa=null),se(Mt)}var Mt=H(0);function lo(e){for(var t=e;t!==null;){if(t.tag===13){var a=t.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||ff(a)||hf(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 Fn=0,qe=null,ut=null,Ht=null,so=!1,Sr=!1,As=!1,ro=0,Ti=0,Er=null,ov=0;function Nt(){throw Error(o(321))}function rd(e,t){if(t===null)return!1;for(var a=0;a<t.length&&a<e.length;a++)if(!ra(e[a],t[a]))return!1;return!0}function id(e,t,a,l,c,d){return Fn=d,qe=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,G.H=e===null||e.memoizedState===null?ym:Nd,As=!1,d=a(l,c),As=!1,Sr&&(d=Hh(t,a,l,c)),Uh(e),d}function Uh(e){G.H=Oi;var t=ut!==null&&ut.next!==null;if(Fn=0,Ht=ut=qe=null,so=!1,Ti=0,Er=null,t)throw Error(o(300));e===null||qt||(e=e.dependencies,e!==null&&vr(e)&&(qt=!0))}function Hh(e,t,a,l){qe=e;var c=0;do{if(Sr&&(Er=null),Ti=0,Sr=!1,25<=c)throw Error(o(301));if(c+=1,Ht=ut=null,e.updateQueue!=null){var d=e.updateQueue;d.lastEffect=null,d.events=null,d.stores=null,d.memoCache!=null&&(d.memoCache.index=0)}G.H=bm,d=t(a,l)}while(Sr);return d}function uv(){var e=G.H,t=e.useState()[0];return t=typeof t.then=="function"?Ci(t):t,e=e.useState()[0],(ut!==null?ut.memoizedState:null)!==e&&(qe.flags|=1024),t}function cd(){var e=ro!==0;return ro=0,e}function od(e,t,a){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a}function ud(e){if(so){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}so=!1}Fn=0,Ht=ut=qe=null,Sr=!1,Ti=ro=0,Er=null}function ua(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ht===null?qe.memoizedState=Ht=e:Ht=Ht.next=e,Ht}function Ot(){if(ut===null){var e=qe.alternate;e=e!==null?e.memoizedState:null}else e=ut.next;var t=Ht===null?qe.memoizedState:Ht.next;if(t!==null)Ht=t,ut=e;else{if(e===null)throw qe.alternate===null?Error(o(467)):Error(o(310));ut=e,e={memoizedState:ut.memoizedState,baseState:ut.baseState,baseQueue:ut.baseQueue,queue:ut.queue,next:null},Ht===null?qe.memoizedState=Ht=e:Ht=Ht.next=e}return Ht}function io(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Ci(e){var t=Ti;return Ti+=1,Er===null&&(Er=[]),e=Mh(Er,e,t),t=qe,(Ht===null?t.memoizedState:Ht.next)===null&&(t=t.alternate,G.H=t===null||t.memoizedState===null?ym:Nd),e}function co(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Ci(e);if(e.$$typeof===Q)return aa(e)}throw Error(o(438,String(e)))}function dd(e){var t=null,a=qe.updateQueue;if(a!==null&&(t=a.memoCache),t==null){var l=qe.alternate;l!==null&&(l=l.updateQueue,l!==null&&(l=l.memoCache,l!=null&&(t={data:l.data.map(function(c){return c.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),a===null&&(a=io(),qe.updateQueue=a),a.memoCache=t,a=t.data[t.index],a===void 0)for(a=t.data[t.index]=Array(e),l=0;l<e;l++)a[l]=M;return t.index++,a}function Zn(e,t){return typeof t=="function"?t(e):t}function oo(e){var t=Ot();return fd(t,ut,e)}function fd(e,t,a){var l=e.queue;if(l===null)throw Error(o(311));l.lastRenderedReducer=a;var c=e.baseQueue,d=l.pending;if(d!==null){if(c!==null){var p=c.next;c.next=d.next,d.next=p}t.baseQueue=c=d,l.pending=null}if(d=e.baseState,c===null)e.memoizedState=d;else{t=c.next;var T=p=null,L=null,I=t,re=!1;do{var ce=I.lane&-536870913;if(ce!==I.lane?(Ge&ce)===ce:(Fn&ce)===ce){var X=I.revertLane;if(X===0)L!==null&&(L=L.next={lane:0,revertLane:0,gesture:null,action:I.action,hasEagerState:I.hasEagerState,eagerState:I.eagerState,next:null}),ce===yr&&(re=!0);else if((Fn&X)===X){I=I.next,X===yr&&(re=!0);continue}else ce={lane:0,revertLane:I.revertLane,gesture:null,action:I.action,hasEagerState:I.hasEagerState,eagerState:I.eagerState,next:null},L===null?(T=L=ce,p=d):L=L.next=ce,qe.lanes|=X,Ul|=X;ce=I.action,As&&a(d,ce),d=I.hasEagerState?I.eagerState:a(d,ce)}else X={lane:ce,revertLane:I.revertLane,gesture:I.gesture,action:I.action,hasEagerState:I.hasEagerState,eagerState:I.eagerState,next:null},L===null?(T=L=X,p=d):L=L.next=X,qe.lanes|=ce,Ul|=ce;I=I.next}while(I!==null&&I!==t);if(L===null?p=d:L.next=T,!ra(d,e.memoizedState)&&(qt=!0,re&&(a=br,a!==null)))throw a;e.memoizedState=d,e.baseState=p,e.baseQueue=L,l.lastRenderedState=d}return c===null&&(l.lanes=0),[e.memoizedState,l.dispatch]}function hd(e){var t=Ot(),a=t.queue;if(a===null)throw Error(o(311));a.lastRenderedReducer=e;var l=a.dispatch,c=a.pending,d=t.memoizedState;if(c!==null){a.pending=null;var p=c=c.next;do d=e(d,p.action),p=p.next;while(p!==c);ra(d,t.memoizedState)||(qt=!0),t.memoizedState=d,t.baseQueue===null&&(t.baseState=d),a.lastRenderedState=d}return[d,l]}function qh(e,t,a){var l=qe,c=Ot(),d=Y;if(d){if(a===void 0)throw Error(o(407));a=a()}else a=t();var p=!ra((ut||c).memoizedState,a);if(p&&(c.memoizedState=a,qt=!0),c=c.queue,xd(Ph.bind(null,l,c,e),[e]),c.getSnapshot!==t||p||Ht!==null&&Ht.memoizedState.tag&1){if(l.flags|=2048,Tr(9,{destroy:void 0},Bh.bind(null,l,c,a,t),null),ht===null)throw Error(o(349));d||(Fn&127)!==0||Vh(l,t,a)}return a}function Vh(e,t,a){e.flags|=16384,e={getSnapshot:t,value:a},t=qe.updateQueue,t===null?(t=io(),qe.updateQueue=t,t.stores=[e]):(a=t.stores,a===null?t.stores=[e]:a.push(e))}function Bh(e,t,a,l){t.value=a,t.getSnapshot=l,$h(t)&&Yh(e)}function Ph(e,t,a){return a(function(){$h(t)&&Yh(e)})}function $h(e){var t=e.getSnapshot;e=e.value;try{var a=t();return!ra(e,a)}catch{return!0}}function Yh(e){var t=Ga(e,2);t!==null&&Ca(t,e,2)}function md(e){var t=ua();if(typeof e=="function"){var a=e;if(e=a(),As){_t(!0);try{a()}finally{_t(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Zn,lastRenderedState:e},t}function Gh(e,t,a,l){return e.baseState=a,fd(e,ut,typeof l=="function"?l:Zn)}function dv(e,t,a,l,c){if(ho(e))throw Error(o(485));if(e=t.action,e!==null){var d={payload:c,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(p){d.listeners.push(p)}};G.T!==null?a(!0):d.isTransition=!1,l(d),a=t.pending,a===null?(d.next=t.pending=d,Fh(t,d)):(d.next=a.next,t.pending=a.next=d)}}function Fh(e,t){var a=t.action,l=t.payload,c=e.state;if(t.isTransition){var d=G.T,p={};G.T=p;try{var T=a(c,l),L=G.S;L!==null&&L(p,T),Zh(e,t,T)}catch(I){gd(e,t,I)}finally{d!==null&&p.types!==null&&(d.types=p.types),G.T=d}}else try{d=a(c,l),Zh(e,t,d)}catch(I){gd(e,t,I)}}function Zh(e,t,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(function(l){Wh(e,t,l)},function(l){return gd(e,t,l)}):Wh(e,t,a)}function Wh(e,t,a){t.status="fulfilled",t.value=a,Ih(t),e.state=a,t=e.pending,t!==null&&(a=t.next,a===t?e.pending=null:(a=a.next,t.next=a,Fh(e,a)))}function gd(e,t,a){var l=e.pending;if(e.pending=null,l!==null){l=l.next;do t.status="rejected",t.reason=a,Ih(t),t=t.next;while(t!==l)}e.action=null}function Ih(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Qh(e,t){return t}function Xh(e,t){if(Y){var a=ht.formState;if(a!==null){e:{var l=qe;if(Y){if(B){t:{for(var c=B,d=be;c.nodeType!==8;){if(!d){c=null;break t}if(c=Ja(c.nextSibling),c===null){c=null;break t}}d=c.data,c=d==="F!"||d==="F"?c:null}if(c){B=Ja(c.nextSibling),l=c.data==="F!";break e}}Ye(l)}l=!1}l&&(t=a[0])}}return a=ua(),a.memoizedState=a.baseState=t,l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Qh,lastRenderedState:t},a.queue=l,a=xm.bind(null,qe,l),l.dispatch=a,l=md(!1),d=jd.bind(null,qe,!1,l.queue),l=ua(),c={state:t,dispatch:null,action:e,pending:null},l.queue=c,a=dv.bind(null,qe,c,d,a),c.dispatch=a,l.memoizedState=e,[t,a,!1]}function Jh(e){var t=Ot();return Kh(t,ut,e)}function Kh(e,t,a){if(t=fd(e,t,Qh)[0],e=oo(Zn)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var l=Ci(t)}catch(p){throw p===jr?Kc:p}else l=t;t=Ot();var c=t.queue,d=c.dispatch;return a!==t.memoizedState&&(qe.flags|=2048,Tr(9,{destroy:void 0},fv.bind(null,c,a),null)),[l,d,e]}function fv(e,t){e.action=t}function em(e){var t=Ot(),a=ut;if(a!==null)return Kh(t,a,e);Ot(),t=t.memoizedState,a=Ot();var l=a.queue.dispatch;return a.memoizedState=e,[t,l,!1]}function Tr(e,t,a,l){return e={tag:e,create:a,deps:l,inst:t,next:null},t=qe.updateQueue,t===null&&(t=io(),qe.updateQueue=t),a=t.lastEffect,a===null?t.lastEffect=e.next=e:(l=a.next,a.next=e,e.next=l,t.lastEffect=e),e}function tm(){return Ot().memoizedState}function uo(e,t,a,l){var c=ua();qe.flags|=e,c.memoizedState=Tr(1|t,{destroy:void 0},a,l===void 0?null:l)}function fo(e,t,a,l){var c=Ot();l=l===void 0?null:l;var d=c.memoizedState.inst;ut!==null&&l!==null&&rd(l,ut.memoizedState.deps)?c.memoizedState=Tr(t,d,a,l):(qe.flags|=e,c.memoizedState=Tr(1|t,d,a,l))}function am(e,t){uo(8390656,8,e,t)}function xd(e,t){fo(2048,8,e,t)}function hv(e){qe.flags|=4;var t=qe.updateQueue;if(t===null)t=io(),qe.updateQueue=t,t.events=[e];else{var a=t.events;a===null?t.events=[e]:a.push(e)}}function nm(e){var t=Ot().memoizedState;return hv({ref:t,nextImpl:e}),function(){if((at&2)!==0)throw Error(o(440));return t.impl.apply(void 0,arguments)}}function lm(e,t){return fo(4,2,e,t)}function sm(e,t){return fo(4,4,e,t)}function rm(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 im(e,t,a){a=a!=null?a.concat([e]):null,fo(4,4,rm.bind(null,t,e),a)}function pd(){}function cm(e,t){var a=Ot();t=t===void 0?null:t;var l=a.memoizedState;return t!==null&&rd(t,l[1])?l[0]:(a.memoizedState=[e,t],e)}function om(e,t){var a=Ot();t=t===void 0?null:t;var l=a.memoizedState;if(t!==null&&rd(t,l[1]))return l[0];if(l=e(),As){_t(!0);try{e()}finally{_t(!1)}}return a.memoizedState=[l,t],l}function vd(e,t,a){return a===void 0||(Fn&1073741824)!==0&&(Ge&261930)===0?e.memoizedState=t:(e.memoizedState=a,e=u0(),qe.lanes|=e,Ul|=e,a)}function um(e,t,a,l){return ra(a,t)?a:wr.current!==null?(e=vd(e,a,l),ra(e,t)||(qt=!0),e):(Fn&42)===0||(Fn&1073741824)!==0&&(Ge&261930)===0?(qt=!0,e.memoizedState=a):(e=u0(),qe.lanes|=e,Ul|=e,t)}function dm(e,t,a,l,c){var d=ne.p;ne.p=d!==0&&8>d?d:8;var p=G.T,T={};G.T=T,jd(e,!1,t,a);try{var L=c(),I=G.S;if(I!==null&&I(T,L),L!==null&&typeof L=="object"&&typeof L.then=="function"){var re=cv(L,l);Mi(e,t,re,za(e))}else Mi(e,t,l,za(e))}catch(ce){Mi(e,t,{then:function(){},status:"rejected",reason:ce},za())}finally{ne.p=d,p!==null&&T.types!==null&&(p.types=T.types),G.T=p}}function mv(){}function yd(e,t,a,l){if(e.tag!==5)throw Error(o(476));var c=fm(e).queue;dm(e,c,t,he,a===null?mv:function(){return hm(e),a(l)})}function fm(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:he,baseState:he,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Zn,lastRenderedState:he},next:null};var a={};return t.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Zn,lastRenderedState:a},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function hm(e){var t=fm(e);t.next===null&&(t=e.alternate.memoizedState),Mi(e,t.next.queue,{},za())}function bd(){return aa(Gi)}function mm(){return Ot().memoizedState}function gm(){return Ot().memoizedState}function gv(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var a=za();e=Dl(a);var l=kl(t,e,a);l!==null&&(Ca(l,t,a),wi(l,t,a)),t={cache:Iu()},e.payload=t;return}t=t.return}}function xv(e,t,a){var l=za();a={lane:l,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},ho(e)?pm(t,a):(a=hr(e,t,a,l),a!==null&&(Ca(a,e,l),vm(a,t,l)))}function xm(e,t,a){var l=za();Mi(e,t,a,l)}function Mi(e,t,a,l){var c={lane:l,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(ho(e))pm(t,c);else{var d=e.alternate;if(e.lanes===0&&(d===null||d.lanes===0)&&(d=t.lastRenderedReducer,d!==null))try{var p=t.lastRenderedState,T=d(p,a);if(c.hasEagerState=!0,c.eagerState=T,ra(T,p))return Ya(e,t,c,0),ht===null&&Ml(),!1}catch{}finally{}if(a=hr(e,t,c,l),a!==null)return Ca(a,e,l),vm(a,t,l),!0}return!1}function jd(e,t,a,l){if(l={lane:2,revertLane:Kd(),gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},ho(e)){if(t)throw Error(o(479))}else t=hr(e,a,l,2),t!==null&&Ca(t,e,2)}function ho(e){var t=e.alternate;return e===qe||t!==null&&t===qe}function pm(e,t){Sr=so=!0;var a=e.pending;a===null?t.next=t:(t.next=a.next,a.next=t),e.pending=t}function vm(e,t,a){if((a&4194048)!==0){var l=t.lanes;l&=e.pendingLanes,a|=l,t.lanes=a,pa(e,a)}}var Oi={readContext:aa,use:co,useCallback:Nt,useContext:Nt,useEffect:Nt,useImperativeHandle:Nt,useLayoutEffect:Nt,useInsertionEffect:Nt,useMemo:Nt,useReducer:Nt,useRef:Nt,useState:Nt,useDebugValue:Nt,useDeferredValue:Nt,useTransition:Nt,useSyncExternalStore:Nt,useId:Nt,useHostTransitionStatus:Nt,useFormState:Nt,useActionState:Nt,useOptimistic:Nt,useMemoCache:Nt,useCacheRefresh:Nt};Oi.useEffectEvent=Nt;var ym={readContext:aa,use:co,useCallback:function(e,t){return ua().memoizedState=[e,t===void 0?null:t],e},useContext:aa,useEffect:am,useImperativeHandle:function(e,t,a){a=a!=null?a.concat([e]):null,uo(4194308,4,rm.bind(null,t,e),a)},useLayoutEffect:function(e,t){return uo(4194308,4,e,t)},useInsertionEffect:function(e,t){uo(4,2,e,t)},useMemo:function(e,t){var a=ua();t=t===void 0?null:t;var l=e();if(As){_t(!0);try{e()}finally{_t(!1)}}return a.memoizedState=[l,t],l},useReducer:function(e,t,a){var l=ua();if(a!==void 0){var c=a(t);if(As){_t(!0);try{a(t)}finally{_t(!1)}}}else c=t;return l.memoizedState=l.baseState=c,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:c},l.queue=e,e=e.dispatch=xv.bind(null,qe,e),[l.memoizedState,e]},useRef:function(e){var t=ua();return e={current:e},t.memoizedState=e},useState:function(e){e=md(e);var t=e.queue,a=xm.bind(null,qe,t);return t.dispatch=a,[e.memoizedState,a]},useDebugValue:pd,useDeferredValue:function(e,t){var a=ua();return vd(a,e,t)},useTransition:function(){var e=md(!1);return e=dm.bind(null,qe,e.queue,!0,!1),ua().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,a){var l=qe,c=ua();if(Y){if(a===void 0)throw Error(o(407));a=a()}else{if(a=t(),ht===null)throw Error(o(349));(Ge&127)!==0||Vh(l,t,a)}c.memoizedState=a;var d={value:a,getSnapshot:t};return c.queue=d,am(Ph.bind(null,l,d,e),[e]),l.flags|=2048,Tr(9,{destroy:void 0},Bh.bind(null,l,d,a,t),null),a},useId:function(){var e=ua(),t=ht.identifierPrefix;if(Y){var a=g,l=Wa;a=(l&~(1<<32-zt(l)-1)).toString(32)+a,t="_"+t+"R_"+a,a=ro++,0<a&&(t+="H"+a.toString(32)),t+="_"}else a=ov++,t="_"+t+"r_"+a.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:bd,useFormState:Xh,useActionState:Xh,useOptimistic:function(e){var t=ua();t.memoizedState=t.baseState=e;var a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=a,t=jd.bind(null,qe,!0,a),a.dispatch=t,[e,t]},useMemoCache:dd,useCacheRefresh:function(){return ua().memoizedState=gv.bind(null,qe)},useEffectEvent:function(e){var t=ua(),a={impl:e};return t.memoizedState=a,function(){if((at&2)!==0)throw Error(o(440));return a.impl.apply(void 0,arguments)}}},Nd={readContext:aa,use:co,useCallback:cm,useContext:aa,useEffect:xd,useImperativeHandle:im,useInsertionEffect:lm,useLayoutEffect:sm,useMemo:om,useReducer:oo,useRef:tm,useState:function(){return oo(Zn)},useDebugValue:pd,useDeferredValue:function(e,t){var a=Ot();return um(a,ut.memoizedState,e,t)},useTransition:function(){var e=oo(Zn)[0],t=Ot().memoizedState;return[typeof e=="boolean"?e:Ci(e),t]},useSyncExternalStore:qh,useId:mm,useHostTransitionStatus:bd,useFormState:Jh,useActionState:Jh,useOptimistic:function(e,t){var a=Ot();return Gh(a,ut,e,t)},useMemoCache:dd,useCacheRefresh:gm};Nd.useEffectEvent=nm;var bm={readContext:aa,use:co,useCallback:cm,useContext:aa,useEffect:xd,useImperativeHandle:im,useInsertionEffect:lm,useLayoutEffect:sm,useMemo:om,useReducer:hd,useRef:tm,useState:function(){return hd(Zn)},useDebugValue:pd,useDeferredValue:function(e,t){var a=Ot();return ut===null?vd(a,e,t):um(a,ut.memoizedState,e,t)},useTransition:function(){var e=hd(Zn)[0],t=Ot().memoizedState;return[typeof e=="boolean"?e:Ci(e),t]},useSyncExternalStore:qh,useId:mm,useHostTransitionStatus:bd,useFormState:em,useActionState:em,useOptimistic:function(e,t){var a=Ot();return ut!==null?Gh(a,ut,e,t):(a.baseState=e,[e,a.queue.dispatch])},useMemoCache:dd,useCacheRefresh:gm};bm.useEffectEvent=nm;function wd(e,t,a,l){t=e.memoizedState,a=a(l,t),a=a==null?t:C({},t,a),e.memoizedState=a,e.lanes===0&&(e.updateQueue.baseState=a)}var Sd={enqueueSetState:function(e,t,a){e=e._reactInternals;var l=za(),c=Dl(l);c.payload=t,a!=null&&(c.callback=a),t=kl(e,c,l),t!==null&&(Ca(t,e,l),wi(t,e,l))},enqueueReplaceState:function(e,t,a){e=e._reactInternals;var l=za(),c=Dl(l);c.tag=1,c.payload=t,a!=null&&(c.callback=a),t=kl(e,c,l),t!==null&&(Ca(t,e,l),wi(t,e,l))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var a=za(),l=Dl(a);l.tag=2,t!=null&&(l.callback=t),t=kl(e,l,a),t!==null&&(Ca(t,e,a),wi(t,e,a))}};function jm(e,t,a,l,c,d,p){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(l,d,p):t.prototype&&t.prototype.isPureReactComponent?!Ns(a,l)||!Ns(c,d):!0}function Nm(e,t,a,l){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(a,l),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(a,l),t.state!==e&&Sd.enqueueReplaceState(t,t.state,null)}function _s(e,t){var a=t;if("ref"in t){a={};for(var l in t)l!=="ref"&&(a[l]=t[l])}if(e=e.defaultProps){a===t&&(a=C({},a));for(var c in e)a[c]===void 0&&(a[c]=e[c])}return a}function wm(e){Cl(e)}function Sm(e){console.error(e)}function Em(e){Cl(e)}function mo(e,t){try{var a=e.onUncaughtError;a(t.value,{componentStack:t.stack})}catch(l){setTimeout(function(){throw l})}}function Tm(e,t,a){try{var l=e.onCaughtError;l(a.value,{componentStack:a.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(c){setTimeout(function(){throw c})}}function Ed(e,t,a){return a=Dl(a),a.tag=3,a.payload={element:null},a.callback=function(){mo(e,t)},a}function Cm(e){return e=Dl(e),e.tag=3,e}function Mm(e,t,a,l){var c=a.type.getDerivedStateFromError;if(typeof c=="function"){var d=l.value;e.payload=function(){return c(d)},e.callback=function(){Tm(t,a,l)}}var p=a.stateNode;p!==null&&typeof p.componentDidCatch=="function"&&(e.callback=function(){Tm(t,a,l),typeof c!="function"&&(Hl===null?Hl=new Set([this]):Hl.add(this));var T=l.stack;this.componentDidCatch(l.value,{componentStack:T!==null?T:""})})}function pv(e,t,a,l,c){if(a.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){if(t=a.alternate,t!==null&&Qa(t,a,c,!0),a=Da.current,a!==null){switch(a.tag){case 31:case 13:return Xa===null?To():a.alternate===null&&wt===0&&(wt=3),a.flags&=-257,a.flags|=65536,a.lanes=c,l===eo?a.flags|=16384:(t=a.updateQueue,t===null?a.updateQueue=new Set([l]):t.add(l),Qd(e,l,c)),!1;case 22:return a.flags|=65536,l===eo?a.flags|=16384:(t=a.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([l])},a.updateQueue=t):(a=t.retryQueue,a===null?t.retryQueue=new Set([l]):a.add(l)),Qd(e,l,c)),!1}throw Error(o(435,a.tag))}return Qd(e,l,c),To(),!1}if(Y)return t=Da.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=c,l!==Le&&(e=Error(o(422),{cause:l}),fn(ja(e,a)))):(l!==Le&&(t=Error(o(423),{cause:l}),fn(ja(t,a))),e=e.current.alternate,e.flags|=65536,c&=-c,e.lanes|=c,l=ja(l,a),c=Ed(e.stateNode,l,c),td(e,c),wt!==4&&(wt=2)),!1;var d=Error(o(520),{cause:l});if(d=ja(d,a),Ui===null?Ui=[d]:Ui.push(d),wt!==4&&(wt=2),t===null)return!0;l=ja(l,a),a=t;do{switch(a.tag){case 3:return a.flags|=65536,e=c&-c,a.lanes|=e,e=Ed(a.stateNode,l,e),td(a,e),!1;case 1:if(t=a.type,d=a.stateNode,(a.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||d!==null&&typeof d.componentDidCatch=="function"&&(Hl===null||!Hl.has(d))))return a.flags|=65536,c&=-c,a.lanes|=c,c=Cm(c),Mm(c,e,a,l),td(a,c),!1}a=a.return}while(a!==null);return!1}var Td=Error(o(461)),qt=!1;function na(e,t,a,l){t.child=e===null?kh(t,null,a,l):ks(t,e.child,a,l)}function Om(e,t,a,l,c){a=a.render;var d=t.ref;if("ref"in l){var p={};for(var T in l)T!=="ref"&&(p[T]=l[T])}else p=l;return Ms(t),l=id(e,t,a,p,d,c),T=cd(),e!==null&&!qt?(od(e,t,c),Wn(e,t,c)):(Y&&T&&v(t),t.flags|=1,na(e,t,l,c),t.child)}function Rm(e,t,a,l,c){if(e===null){var d=a.type;return typeof d=="function"&&!gr(d)&&d.defaultProps===void 0&&a.compare===null?(t.tag=15,t.type=d,Dm(e,t,d,l,c)):(e=xr(a.type,null,l,t,t.mode,c),e.ref=t.ref,e.return=t,t.child=e)}if(d=e.child,!_d(e,c)){var p=d.memoizedProps;if(a=a.compare,a=a!==null?a:Ns,a(p,l)&&e.ref===t.ref)return Wn(e,t,c)}return t.flags|=1,e=Fa(d,l),e.ref=t.ref,e.return=t,t.child=e}function Dm(e,t,a,l,c){if(e!==null){var d=e.memoizedProps;if(Ns(d,l)&&e.ref===t.ref)if(qt=!1,t.pendingProps=l=d,_d(e,c))(e.flags&131072)!==0&&(qt=!0);else return t.lanes=e.lanes,Wn(e,t,c)}return Cd(e,t,a,l,c)}function km(e,t,a,l){var c=l.children,d=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),l.mode==="hidden"){if((t.flags&128)!==0){if(d=d!==null?d.baseLanes|a:a,e!==null){for(l=t.child=e.child,c=0;l!==null;)c=c|l.lanes|l.childLanes,l=l.sibling;l=c&~d}else l=0,t.child=null;return Am(e,t,d,a,l)}if((a&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Jc(t,d!==null?d.cachePool:null),d!==null?zh(t,d):nd(),Lh(t);else return l=t.lanes=536870912,Am(e,t,d!==null?d.baseLanes|a:a,a,l)}else d!==null?(Jc(t,d.cachePool),zh(t,d),_l(),t.memoizedState=null):(e!==null&&Jc(t,null),nd(),_l());return na(e,t,c,a),t.child}function Ri(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Am(e,t,a,l,c){var d=Xu();return d=d===null?null:{parent:Ut._currentValue,pool:d},t.memoizedState={baseLanes:a,cachePool:d},e!==null&&Jc(t,null),nd(),Lh(t),e!==null&&Qa(e,t,l,!0),t.childLanes=c,null}function go(e,t){return t=po({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function _m(e,t,a){return ks(t,e.child,null,a),e=go(t,t.pendingProps),e.flags|=2,ka(t),t.memoizedState=null,e}function vv(e,t,a){var l=t.pendingProps,c=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Y){if(l.mode==="hidden")return e=go(t,l),t.lanes=536870912,Ri(null,e);if(sd(t),(e=B)?(e=F0(e,be),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Na!==null?{id:Wa,overflow:g}:null,retryLane:536870912,hydrationErrors:null},a=Qc(e),a.return=t,t.child=a,V=t,B=null)):e=null,e===null)throw Ye(t);return t.lanes=536870912,null}return go(t,l)}var d=e.memoizedState;if(d!==null){var p=d.dehydrated;if(sd(t),c)if(t.flags&256)t.flags&=-257,t=_m(e,t,a);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(o(558));else if(qt||Qa(e,t,a,!1),c=(a&e.childLanes)!==0,qt||c){if(l=ht,l!==null&&(p=Ir(l,a),p!==0&&p!==d.retryLane))throw d.retryLane=p,Ga(e,p),Ca(l,e,p),Td;To(),t=_m(e,t,a)}else e=d.treeContext,B=Ja(p.nextSibling),V=t,Y=!0,de=null,be=!1,e!==null&&A(t,e),t=go(t,l),t.flags|=4096;return t}return e=Fa(e.child,{mode:l.mode,children:l.children}),e.ref=t.ref,t.child=e,e.return=t,e}function xo(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(o(284));(e===null||e.ref!==a)&&(t.flags|=4194816)}}function Cd(e,t,a,l,c){return Ms(t),a=id(e,t,a,l,void 0,c),l=cd(),e!==null&&!qt?(od(e,t,c),Wn(e,t,c)):(Y&&l&&v(t),t.flags|=1,na(e,t,a,c),t.child)}function zm(e,t,a,l,c,d){return Ms(t),t.updateQueue=null,a=Hh(t,l,a,c),Uh(e),l=cd(),e!==null&&!qt?(od(e,t,d),Wn(e,t,d)):(Y&&l&&v(t),t.flags|=1,na(e,t,a,d),t.child)}function Lm(e,t,a,l,c){if(Ms(t),t.stateNode===null){var d=Ra,p=a.contextType;typeof p=="object"&&p!==null&&(d=aa(p)),d=new a(l,d),t.memoizedState=d.state!==null&&d.state!==void 0?d.state:null,d.updater=Sd,t.stateNode=d,d._reactInternals=t,d=t.stateNode,d.props=l,d.state=t.memoizedState,d.refs={},Ku(t),p=a.contextType,d.context=typeof p=="object"&&p!==null?aa(p):Ra,d.state=t.memoizedState,p=a.getDerivedStateFromProps,typeof p=="function"&&(wd(t,a,p,l),d.state=t.memoizedState),typeof a.getDerivedStateFromProps=="function"||typeof d.getSnapshotBeforeUpdate=="function"||typeof d.UNSAFE_componentWillMount!="function"&&typeof d.componentWillMount!="function"||(p=d.state,typeof d.componentWillMount=="function"&&d.componentWillMount(),typeof d.UNSAFE_componentWillMount=="function"&&d.UNSAFE_componentWillMount(),p!==d.state&&Sd.enqueueReplaceState(d,d.state,null),Ei(t,l,d,c),Si(),d.state=t.memoizedState),typeof d.componentDidMount=="function"&&(t.flags|=4194308),l=!0}else if(e===null){d=t.stateNode;var T=t.memoizedProps,L=_s(a,T);d.props=L;var I=d.context,re=a.contextType;p=Ra,typeof re=="object"&&re!==null&&(p=aa(re));var ce=a.getDerivedStateFromProps;re=typeof ce=="function"||typeof d.getSnapshotBeforeUpdate=="function",T=t.pendingProps!==T,re||typeof d.UNSAFE_componentWillReceiveProps!="function"&&typeof d.componentWillReceiveProps!="function"||(T||I!==p)&&Nm(t,d,l,p),Rl=!1;var X=t.memoizedState;d.state=X,Ei(t,l,d,c),Si(),I=t.memoizedState,T||X!==I||Rl?(typeof ce=="function"&&(wd(t,a,ce,l),I=t.memoizedState),(L=Rl||jm(t,a,L,l,X,I,p))?(re||typeof d.UNSAFE_componentWillMount!="function"&&typeof d.componentWillMount!="function"||(typeof d.componentWillMount=="function"&&d.componentWillMount(),typeof d.UNSAFE_componentWillMount=="function"&&d.UNSAFE_componentWillMount()),typeof d.componentDidMount=="function"&&(t.flags|=4194308)):(typeof d.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=l,t.memoizedState=I),d.props=l,d.state=I,d.context=p,l=L):(typeof d.componentDidMount=="function"&&(t.flags|=4194308),l=!1)}else{d=t.stateNode,ed(e,t),p=t.memoizedProps,re=_s(a,p),d.props=re,ce=t.pendingProps,X=d.context,I=a.contextType,L=Ra,typeof I=="object"&&I!==null&&(L=aa(I)),T=a.getDerivedStateFromProps,(I=typeof T=="function"||typeof d.getSnapshotBeforeUpdate=="function")||typeof d.UNSAFE_componentWillReceiveProps!="function"&&typeof d.componentWillReceiveProps!="function"||(p!==ce||X!==L)&&Nm(t,d,l,L),Rl=!1,X=t.memoizedState,d.state=X,Ei(t,l,d,c),Si();var te=t.memoizedState;p!==ce||X!==te||Rl||e!==null&&e.dependencies!==null&&vr(e.dependencies)?(typeof T=="function"&&(wd(t,a,T,l),te=t.memoizedState),(re=Rl||jm(t,a,re,l,X,te,L)||e!==null&&e.dependencies!==null&&vr(e.dependencies))?(I||typeof d.UNSAFE_componentWillUpdate!="function"&&typeof d.componentWillUpdate!="function"||(typeof d.componentWillUpdate=="function"&&d.componentWillUpdate(l,te,L),typeof d.UNSAFE_componentWillUpdate=="function"&&d.UNSAFE_componentWillUpdate(l,te,L)),typeof d.componentDidUpdate=="function"&&(t.flags|=4),typeof d.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof d.componentDidUpdate!="function"||p===e.memoizedProps&&X===e.memoizedState||(t.flags|=4),typeof d.getSnapshotBeforeUpdate!="function"||p===e.memoizedProps&&X===e.memoizedState||(t.flags|=1024),t.memoizedProps=l,t.memoizedState=te),d.props=l,d.state=te,d.context=L,l=re):(typeof d.componentDidUpdate!="function"||p===e.memoizedProps&&X===e.memoizedState||(t.flags|=4),typeof d.getSnapshotBeforeUpdate!="function"||p===e.memoizedProps&&X===e.memoizedState||(t.flags|=1024),l=!1)}return d=l,xo(e,t),l=(t.flags&128)!==0,d||l?(d=t.stateNode,a=l&&typeof a.getDerivedStateFromError!="function"?null:d.render(),t.flags|=1,e!==null&&l?(t.child=ks(t,e.child,null,c),t.child=ks(t,null,a,c)):na(e,t,a,c),t.memoizedState=d.state,e=t.child):e=Wn(e,t,c),e}function Um(e,t,a,l){return It(),t.flags|=256,na(e,t,a,l),t.child}var Md={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Od(e){return{baseLanes:e,cachePool:Th()}}function Rd(e,t,a){return e=e!==null?e.childLanes&~a:0,t&&(e|=_a),e}function Hm(e,t,a){var l=t.pendingProps,c=!1,d=(t.flags&128)!==0,p;if((p=d)||(p=e!==null&&e.memoizedState===null?!1:(Mt.current&2)!==0),p&&(c=!0,t.flags&=-129),p=(t.flags&32)!==0,t.flags&=-33,e===null){if(Y){if(c?Al(t):_l(),(e=B)?(e=F0(e,be),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Na!==null?{id:Wa,overflow:g}:null,retryLane:536870912,hydrationErrors:null},a=Qc(e),a.return=t,t.child=a,V=t,B=null)):e=null,e===null)throw Ye(t);return hf(e)?t.lanes=32:t.lanes=536870912,null}var T=l.children;return l=l.fallback,c?(_l(),c=t.mode,T=po({mode:"hidden",children:T},c),l=Za(l,c,a,null),T.return=t,l.return=t,T.sibling=l,t.child=T,l=t.child,l.memoizedState=Od(a),l.childLanes=Rd(e,p,a),t.memoizedState=Md,Ri(null,l)):(Al(t),Dd(t,T))}var L=e.memoizedState;if(L!==null&&(T=L.dehydrated,T!==null)){if(d)t.flags&256?(Al(t),t.flags&=-257,t=kd(e,t,a)):t.memoizedState!==null?(_l(),t.child=e.child,t.flags|=128,t=null):(_l(),T=l.fallback,c=t.mode,l=po({mode:"visible",children:l.children},c),T=Za(T,c,a,null),T.flags|=2,l.return=t,T.return=t,l.sibling=T,t.child=l,ks(t,e.child,null,a),l=t.child,l.memoizedState=Od(a),l.childLanes=Rd(e,p,a),t.memoizedState=Md,t=Ri(null,l));else if(Al(t),hf(T)){if(p=T.nextSibling&&T.nextSibling.dataset,p)var I=p.dgst;p=I,l=Error(o(419)),l.stack="",l.digest=p,fn({value:l,source:null,stack:null}),t=kd(e,t,a)}else if(qt||Qa(e,t,a,!1),p=(a&e.childLanes)!==0,qt||p){if(p=ht,p!==null&&(l=Ir(p,a),l!==0&&l!==L.retryLane))throw L.retryLane=l,Ga(e,l),Ca(p,e,l),Td;ff(T)||To(),t=kd(e,t,a)}else ff(T)?(t.flags|=192,t.child=e.child,t=null):(e=L.treeContext,B=Ja(T.nextSibling),V=t,Y=!0,de=null,be=!1,e!==null&&A(t,e),t=Dd(t,l.children),t.flags|=4096);return t}return c?(_l(),T=l.fallback,c=t.mode,L=e.child,I=L.sibling,l=Fa(L,{mode:"hidden",children:l.children}),l.subtreeFlags=L.subtreeFlags&65011712,I!==null?T=Fa(I,T):(T=Za(T,c,a,null),T.flags|=2),T.return=t,l.return=t,l.sibling=T,t.child=l,Ri(null,l),l=t.child,T=e.child.memoizedState,T===null?T=Od(a):(c=T.cachePool,c!==null?(L=Ut._currentValue,c=c.parent!==L?{parent:L,pool:L}:c):c=Th(),T={baseLanes:T.baseLanes|a,cachePool:c}),l.memoizedState=T,l.childLanes=Rd(e,p,a),t.memoizedState=Md,Ri(e.child,l)):(Al(t),a=e.child,e=a.sibling,a=Fa(a,{mode:"visible",children:l.children}),a.return=t,a.sibling=null,e!==null&&(p=t.deletions,p===null?(t.deletions=[e],t.flags|=16):p.push(e)),t.child=a,t.memoizedState=null,a)}function Dd(e,t){return t=po({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function po(e,t){return e=ta(22,e,null,t),e.lanes=0,e}function kd(e,t,a){return ks(t,e.child,null,a),e=Dd(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function qm(e,t,a){e.lanes|=t;var l=e.alternate;l!==null&&(l.lanes|=t),vi(e.return,t,a)}function Ad(e,t,a,l,c,d){var p=e.memoizedState;p===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:l,tail:a,tailMode:c,treeForkCount:d}:(p.isBackwards=t,p.rendering=null,p.renderingStartTime=0,p.last=l,p.tail=a,p.tailMode=c,p.treeForkCount=d)}function Vm(e,t,a){var l=t.pendingProps,c=l.revealOrder,d=l.tail;l=l.children;var p=Mt.current,T=(p&2)!==0;if(T?(p=p&1|2,t.flags|=128):p&=1,ge(Mt,p),na(e,t,l,a),l=Y?dn:0,!T&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&qm(e,a,t);else if(e.tag===19)qm(e,a,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(c){case"forwards":for(a=t.child,c=null;a!==null;)e=a.alternate,e!==null&&lo(e)===null&&(c=a),a=a.sibling;a=c,a===null?(c=t.child,t.child=null):(c=a.sibling,a.sibling=null),Ad(t,!1,c,a,d,l);break;case"backwards":case"unstable_legacy-backwards":for(a=null,c=t.child,t.child=null;c!==null;){if(e=c.alternate,e!==null&&lo(e)===null){t.child=c;break}e=c.sibling,c.sibling=a,a=c,c=e}Ad(t,!0,a,null,d,l);break;case"together":Ad(t,!1,null,null,void 0,l);break;default:t.memoizedState=null}return t.child}function Wn(e,t,a){if(e!==null&&(t.dependencies=e.dependencies),Ul|=t.lanes,(a&t.childLanes)===0)if(e!==null){if(Qa(e,t,a,!1),(a&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(o(153));if(t.child!==null){for(e=t.child,a=Fa(e,e.pendingProps),t.child=a,a.return=t;e.sibling!==null;)e=e.sibling,a=a.sibling=Fa(e,e.pendingProps),a.return=t;a.sibling=null}return t.child}function _d(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&vr(e)))}function yv(e,t,a){switch(t.tag){case 3:Ze(t,t.stateNode.containerInfo),Cn(t,Ut,e.memoizedState.cache),It();break;case 27:case 5:Dt(t);break;case 4:Ze(t,t.stateNode.containerInfo);break;case 10:Cn(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,sd(t),null;break;case 13:var l=t.memoizedState;if(l!==null)return l.dehydrated!==null?(Al(t),t.flags|=128,null):(a&t.child.childLanes)!==0?Hm(e,t,a):(Al(t),e=Wn(e,t,a),e!==null?e.sibling:null);Al(t);break;case 19:var c=(e.flags&128)!==0;if(l=(a&t.childLanes)!==0,l||(Qa(e,t,a,!1),l=(a&t.childLanes)!==0),c){if(l)return Vm(e,t,a);t.flags|=128}if(c=t.memoizedState,c!==null&&(c.rendering=null,c.tail=null,c.lastEffect=null),ge(Mt,Mt.current),l)break;return null;case 22:return t.lanes=0,km(e,t,a,t.pendingProps);case 24:Cn(t,Ut,e.memoizedState.cache)}return Wn(e,t,a)}function Bm(e,t,a){if(e!==null)if(e.memoizedProps!==t.pendingProps)qt=!0;else{if(!_d(e,a)&&(t.flags&128)===0)return qt=!1,yv(e,t,a);qt=(e.flags&131072)!==0}else qt=!1,Y&&(t.flags&1048576)!==0&&m(t,dn,t.index);switch(t.lanes=0,t.tag){case 16:e:{var l=t.pendingProps;if(e=Rs(t.elementType),t.type=e,typeof e=="function")gr(e)?(l=_s(e,l),t.tag=1,t=Lm(null,t,e,l,a)):(t.tag=0,t=Cd(null,t,e,l,a));else{if(e!=null){var c=e.$$typeof;if(c===w){t.tag=11,t=Om(null,t,e,l,a);break e}else if(c===Z){t.tag=14,t=Rm(null,t,e,l,a);break e}}throw t=ve(e)||e,Error(o(306,t,""))}}return t;case 0:return Cd(e,t,t.type,t.pendingProps,a);case 1:return l=t.type,c=_s(l,t.pendingProps),Lm(e,t,l,c,a);case 3:e:{if(Ze(t,t.stateNode.containerInfo),e===null)throw Error(o(387));l=t.pendingProps;var d=t.memoizedState;c=d.element,ed(e,t),Ei(t,l,null,a);var p=t.memoizedState;if(l=p.cache,Cn(t,Ut,l),l!==d.cache&&Gn(t,[Ut],a,!0),Si(),l=p.element,d.isDehydrated)if(d={element:l,isDehydrated:!1,cache:p.cache},t.updateQueue.baseState=d,t.memoizedState=d,t.flags&256){t=Um(e,t,l,a);break e}else if(l!==c){c=ja(Error(o(424)),t),fn(c),t=Um(e,t,l,a);break e}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(B=Ja(e.firstChild),V=t,Y=!0,de=null,be=!0,a=kh(t,null,l,a),t.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling}else{if(It(),l===c){t=Wn(e,t,a);break e}na(e,t,l,a)}t=t.child}return t;case 26:return xo(e,t),e===null?(a=J0(t.type,null,t.pendingProps,null))?t.memoizedState=a:Y||(a=t.type,e=t.pendingProps,l=Ao(xe.current).createElement(a),l[Et]=t,l[$t]=e,la(l,a,e),Lt(l),t.stateNode=l):t.memoizedState=J0(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Dt(t),e===null&&Y&&(l=t.stateNode=I0(t.type,t.pendingProps,xe.current),V=t,be=!0,c=B,Pl(t.type)?(mf=c,B=Ja(l.firstChild)):B=c),na(e,t,t.pendingProps.children,a),xo(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Y&&((c=l=B)&&(l=Iv(l,t.type,t.pendingProps,be),l!==null?(t.stateNode=l,V=t,B=Ja(l.firstChild),be=!1,c=!0):c=!1),c||Ye(t)),Dt(t),c=t.type,d=t.pendingProps,p=e!==null?e.memoizedProps:null,l=d.children,of(c,d)?l=null:p!==null&&of(c,p)&&(t.flags|=32),t.memoizedState!==null&&(c=id(e,t,uv,null,null,a),Gi._currentValue=c),xo(e,t),na(e,t,l,a),t.child;case 6:return e===null&&Y&&((e=a=B)&&(a=Qv(a,t.pendingProps,be),a!==null?(t.stateNode=a,V=t,B=null,e=!0):e=!1),e||Ye(t)),null;case 13:return Hm(e,t,a);case 4:return Ze(t,t.stateNode.containerInfo),l=t.pendingProps,e===null?t.child=ks(t,null,l,a):na(e,t,l,a),t.child;case 11:return Om(e,t,t.type,t.pendingProps,a);case 7:return na(e,t,t.pendingProps,a),t.child;case 8:return na(e,t,t.pendingProps.children,a),t.child;case 12:return na(e,t,t.pendingProps.children,a),t.child;case 10:return l=t.pendingProps,Cn(t,t.type,l.value),na(e,t,l.children,a),t.child;case 9:return c=t.type._context,l=t.pendingProps.children,Ms(t),c=aa(c),l=l(c),t.flags|=1,na(e,t,l,a),t.child;case 14:return Rm(e,t,t.type,t.pendingProps,a);case 15:return Dm(e,t,t.type,t.pendingProps,a);case 19:return Vm(e,t,a);case 31:return vv(e,t,a);case 22:return km(e,t,a,t.pendingProps);case 24:return Ms(t),l=aa(Ut),e===null?(c=Xu(),c===null&&(c=ht,d=Iu(),c.pooledCache=d,d.refCount++,d!==null&&(c.pooledCacheLanes|=a),c=d),t.memoizedState={parent:l,cache:c},Ku(t),Cn(t,Ut,c)):((e.lanes&a)!==0&&(ed(e,t),Ei(t,null,null,a),Si()),c=e.memoizedState,d=t.memoizedState,c.parent!==l?(c={parent:l,cache:l},t.memoizedState=c,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=c),Cn(t,Ut,l)):(l=d.cache,Cn(t,Ut,l),l!==c.cache&&Gn(t,[Ut],a,!0))),na(e,t,t.pendingProps.children,a),t.child;case 29:throw t.pendingProps}throw Error(o(156,t.tag))}function In(e){e.flags|=4}function zd(e,t,a,l,c){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(c&335544128)===c)if(e.stateNode.complete)e.flags|=8192;else if(m0())e.flags|=8192;else throw Ds=eo,Ju}else e.flags&=-16777217}function Pm(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!ng(t))if(m0())e.flags|=8192;else throw Ds=eo,Ju}function vo(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Wr():536870912,e.lanes|=t,Rr|=t)}function Di(e,t){if(!Y)switch(e.tailMode){case"hidden":t=e.tail;for(var a=null;t!==null;)t.alternate!==null&&(a=t),t=t.sibling;a===null?e.tail=null:a.sibling=null;break;case"collapsed":a=e.tail;for(var l=null;a!==null;)a.alternate!==null&&(l=a),a=a.sibling;l===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:l.sibling=null}}function pt(e){var t=e.alternate!==null&&e.alternate.child===e.child,a=0,l=0;if(t)for(var c=e.child;c!==null;)a|=c.lanes|c.childLanes,l|=c.subtreeFlags&65011712,l|=c.flags&65011712,c.return=e,c=c.sibling;else for(c=e.child;c!==null;)a|=c.lanes|c.childLanes,l|=c.subtreeFlags,l|=c.flags,c.return=e,c=c.sibling;return e.subtreeFlags|=l,e.childLanes=a,t}function bv(e,t,a){var l=t.pendingProps;switch(E(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return pt(t),null;case 1:return pt(t),null;case 3:return a=t.stateNode,l=null,e!==null&&(l=e.memoizedState.cache),t.memoizedState.cache!==l&&(t.flags|=2048),hn(Ut),We(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(e===null||e.child===null)&&(Wt(t)?In(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Tn())),pt(t),null;case 26:var c=t.type,d=t.memoizedState;return e===null?(In(t),d!==null?(pt(t),Pm(t,d)):(pt(t),zd(t,c,null,l,a))):d?d!==e.memoizedState?(In(t),pt(t),Pm(t,d)):(pt(t),t.flags&=-16777217):(e=e.memoizedProps,e!==l&&In(t),pt(t),zd(t,c,e,l,a)),null;case 27:if(da(t),a=xe.current,c=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==l&&In(t);else{if(!l){if(t.stateNode===null)throw Error(o(166));return pt(t),null}e=pe.current,Wt(t)?ke(t):(e=I0(c,l,a),t.stateNode=e,In(t))}return pt(t),null;case 5:if(da(t),c=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==l&&In(t);else{if(!l){if(t.stateNode===null)throw Error(o(166));return pt(t),null}if(d=pe.current,Wt(t))ke(t);else{var p=Ao(xe.current);switch(d){case 1:d=p.createElementNS("http://www.w3.org/2000/svg",c);break;case 2:d=p.createElementNS("http://www.w3.org/1998/Math/MathML",c);break;default:switch(c){case"svg":d=p.createElementNS("http://www.w3.org/2000/svg",c);break;case"math":d=p.createElementNS("http://www.w3.org/1998/Math/MathML",c);break;case"script":d=p.createElement("div"),d.innerHTML="<script><\/script>",d=d.removeChild(d.firstChild);break;case"select":d=typeof l.is=="string"?p.createElement("select",{is:l.is}):p.createElement("select"),l.multiple?d.multiple=!0:l.size&&(d.size=l.size);break;default:d=typeof l.is=="string"?p.createElement(c,{is:l.is}):p.createElement(c)}}d[Et]=t,d[$t]=l;e:for(p=t.child;p!==null;){if(p.tag===5||p.tag===6)d.appendChild(p.stateNode);else if(p.tag!==4&&p.tag!==27&&p.child!==null){p.child.return=p,p=p.child;continue}if(p===t)break e;for(;p.sibling===null;){if(p.return===null||p.return===t)break e;p=p.return}p.sibling.return=p.return,p=p.sibling}t.stateNode=d;e:switch(la(d,c,l),c){case"button":case"input":case"select":case"textarea":l=!!l.autoFocus;break e;case"img":l=!0;break e;default:l=!1}l&&In(t)}}return pt(t),zd(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,a),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==l&&In(t);else{if(typeof l!="string"&&t.stateNode===null)throw Error(o(166));if(e=xe.current,Wt(t)){if(e=t.stateNode,a=t.memoizedProps,l=null,c=V,c!==null)switch(c.tag){case 27:case 5:l=c.memoizedProps}e[Et]=t,e=!!(e.nodeValue===a||l!==null&&l.suppressHydrationWarning===!0||H0(e.nodeValue,a)),e||Ye(t,!0)}else e=Ao(e).createTextNode(l),e[Et]=t,t.stateNode=e}return pt(t),null;case 31:if(a=t.memoizedState,e===null||e.memoizedState!==null){if(l=Wt(t),a!==null){if(e===null){if(!l)throw Error(o(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(557));e[Et]=t}else It(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;pt(t),e=!1}else a=Tn(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),e=!0;if(!e)return t.flags&256?(ka(t),t):(ka(t),null);if((t.flags&128)!==0)throw Error(o(558))}return pt(t),null;case 13:if(l=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(c=Wt(t),l!==null&&l.dehydrated!==null){if(e===null){if(!c)throw Error(o(318));if(c=t.memoizedState,c=c!==null?c.dehydrated:null,!c)throw Error(o(317));c[Et]=t}else It(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;pt(t),c=!1}else c=Tn(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=c),c=!0;if(!c)return t.flags&256?(ka(t),t):(ka(t),null)}return ka(t),(t.flags&128)!==0?(t.lanes=a,t):(a=l!==null,e=e!==null&&e.memoizedState!==null,a&&(l=t.child,c=null,l.alternate!==null&&l.alternate.memoizedState!==null&&l.alternate.memoizedState.cachePool!==null&&(c=l.alternate.memoizedState.cachePool.pool),d=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(d=l.memoizedState.cachePool.pool),d!==c&&(l.flags|=2048)),a!==e&&a&&(t.child.flags|=8192),vo(t,t.updateQueue),pt(t),null);case 4:return We(),e===null&&nf(t.stateNode.containerInfo),pt(t),null;case 10:return hn(t.type),pt(t),null;case 19:if(se(Mt),l=t.memoizedState,l===null)return pt(t),null;if(c=(t.flags&128)!==0,d=l.rendering,d===null)if(c)Di(l,!1);else{if(wt!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(d=lo(e),d!==null){for(t.flags|=128,Di(l,!1),e=d.updateQueue,t.updateQueue=e,vo(t,e),t.subtreeFlags=0,e=a,a=t.child;a!==null;)Ic(a,e),a=a.sibling;return ge(Mt,Mt.current&1|2),Y&&i(t,l.treeForkCount),t.child}e=e.sibling}l.tail!==null&&At()>wo&&(t.flags|=128,c=!0,Di(l,!1),t.lanes=4194304)}else{if(!c)if(e=lo(d),e!==null){if(t.flags|=128,c=!0,e=e.updateQueue,t.updateQueue=e,vo(t,e),Di(l,!0),l.tail===null&&l.tailMode==="hidden"&&!d.alternate&&!Y)return pt(t),null}else 2*At()-l.renderingStartTime>wo&&a!==536870912&&(t.flags|=128,c=!0,Di(l,!1),t.lanes=4194304);l.isBackwards?(d.sibling=t.child,t.child=d):(e=l.last,e!==null?e.sibling=d:t.child=d,l.last=d)}return l.tail!==null?(e=l.tail,l.rendering=e,l.tail=e.sibling,l.renderingStartTime=At(),e.sibling=null,a=Mt.current,ge(Mt,c?a&1|2:a&1),Y&&i(t,l.treeForkCount),e):(pt(t),null);case 22:case 23:return ka(t),ld(),l=t.memoizedState!==null,e!==null?e.memoizedState!==null!==l&&(t.flags|=8192):l&&(t.flags|=8192),l?(a&536870912)!==0&&(t.flags&128)===0&&(pt(t),t.subtreeFlags&6&&(t.flags|=8192)):pt(t),a=t.updateQueue,a!==null&&vo(t,a.retryQueue),a=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),l=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(l=t.memoizedState.cachePool.pool),l!==a&&(t.flags|=2048),e!==null&&se(Os),null;case 24:return a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),hn(Ut),pt(t),null;case 25:return null;case 30:return null}throw Error(o(156,t.tag))}function jv(e,t){switch(E(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return hn(Ut),We(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return da(t),null;case 31:if(t.memoizedState!==null){if(ka(t),t.alternate===null)throw Error(o(340));It()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(ka(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(o(340));It()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return se(Mt),null;case 4:return We(),null;case 10:return hn(t.type),null;case 22:case 23:return ka(t),ld(),e!==null&&se(Os),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return hn(Ut),null;case 25:return null;default:return null}}function $m(e,t){switch(E(t),t.tag){case 3:hn(Ut),We();break;case 26:case 27:case 5:da(t);break;case 4:We();break;case 31:t.memoizedState!==null&&ka(t);break;case 13:ka(t);break;case 19:se(Mt);break;case 10:hn(t.type);break;case 22:case 23:ka(t),ld(),e!==null&&se(Os);break;case 24:hn(Ut)}}function ki(e,t){try{var a=t.updateQueue,l=a!==null?a.lastEffect:null;if(l!==null){var c=l.next;a=c;do{if((a.tag&e)===e){l=void 0;var d=a.create,p=a.inst;l=d(),p.destroy=l}a=a.next}while(a!==c)}}catch(T){ct(t,t.return,T)}}function zl(e,t,a){try{var l=t.updateQueue,c=l!==null?l.lastEffect:null;if(c!==null){var d=c.next;l=d;do{if((l.tag&e)===e){var p=l.inst,T=p.destroy;if(T!==void 0){p.destroy=void 0,c=t;var L=a,I=T;try{I()}catch(re){ct(c,L,re)}}}l=l.next}while(l!==d)}}catch(re){ct(t,t.return,re)}}function Ym(e){var t=e.updateQueue;if(t!==null){var a=e.stateNode;try{_h(t,a)}catch(l){ct(e,e.return,l)}}}function Gm(e,t,a){a.props=_s(e.type,e.memoizedProps),a.state=e.memoizedState;try{a.componentWillUnmount()}catch(l){ct(e,t,l)}}function Ai(e,t){try{var a=e.ref;if(a!==null){switch(e.tag){case 26:case 27:case 5:var l=e.stateNode;break;case 30:l=e.stateNode;break;default:l=e.stateNode}typeof a=="function"?e.refCleanup=a(l):a.current=l}}catch(c){ct(e,t,c)}}function Mn(e,t){var a=e.ref,l=e.refCleanup;if(a!==null)if(typeof l=="function")try{l()}catch(c){ct(e,t,c)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof a=="function")try{a(null)}catch(c){ct(e,t,c)}else a.current=null}function Fm(e){var t=e.type,a=e.memoizedProps,l=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":a.autoFocus&&l.focus();break e;case"img":a.src?l.src=a.src:a.srcSet&&(l.srcset=a.srcSet)}}catch(c){ct(e,e.return,c)}}function Ld(e,t,a){try{var l=e.stateNode;$v(l,e.type,a,t),l[$t]=t}catch(c){ct(e,e.return,c)}}function Zm(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Pl(e.type)||e.tag===4}function Ud(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&&Pl(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Hd(e,t,a){var l=e.tag;if(l===5||l===6)e=e.stateNode,t?(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a).insertBefore(e,t):(t=a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,t.appendChild(e),a=a._reactRootContainer,a!=null||t.onclick!==null||(t.onclick=Pa));else if(l!==4&&(l===27&&Pl(e.type)&&(a=e.stateNode,t=null),e=e.child,e!==null))for(Hd(e,t,a),e=e.sibling;e!==null;)Hd(e,t,a),e=e.sibling}function yo(e,t,a){var l=e.tag;if(l===5||l===6)e=e.stateNode,t?a.insertBefore(e,t):a.appendChild(e);else if(l!==4&&(l===27&&Pl(e.type)&&(a=e.stateNode),e=e.child,e!==null))for(yo(e,t,a),e=e.sibling;e!==null;)yo(e,t,a),e=e.sibling}function Wm(e){var t=e.stateNode,a=e.memoizedProps;try{for(var l=e.type,c=t.attributes;c.length;)t.removeAttributeNode(c[0]);la(t,l,a),t[Et]=e,t[$t]=a}catch(d){ct(e,e.return,d)}}var Qn=!1,Vt=!1,qd=!1,Im=typeof WeakSet=="function"?WeakSet:Set,Qt=null;function Nv(e,t){if(e=e.containerInfo,rf=Vo,e=Fu(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 l=a.getSelection&&a.getSelection();if(l&&l.rangeCount!==0){a=l.anchorNode;var c=l.anchorOffset,d=l.focusNode;l=l.focusOffset;try{a.nodeType,d.nodeType}catch{a=null;break e}var p=0,T=-1,L=-1,I=0,re=0,ce=e,X=null;t:for(;;){for(var te;ce!==a||c!==0&&ce.nodeType!==3||(T=p+c),ce!==d||l!==0&&ce.nodeType!==3||(L=p+l),ce.nodeType===3&&(p+=ce.nodeValue.length),(te=ce.firstChild)!==null;)X=ce,ce=te;for(;;){if(ce===e)break t;if(X===a&&++I===c&&(T=p),X===d&&++re===l&&(L=p),(te=ce.nextSibling)!==null)break;ce=X,X=ce.parentNode}ce=te}a=T===-1||L===-1?null:{start:T,end:L}}else a=null}a=a||{start:0,end:0}}else a=null;for(cf={focusedElem:e,selectionRange:a},Vo=!1,Qt=t;Qt!==null;)if(t=Qt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Qt=e;else for(;Qt!==null;){switch(t=Qt,d=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(a=0;a<e.length;a++)c=e[a],c.ref.impl=c.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&d!==null){e=void 0,a=t,c=d.memoizedProps,d=d.memoizedState,l=a.stateNode;try{var je=_s(a.type,c);e=l.getSnapshotBeforeUpdate(je,d),l.__reactInternalSnapshotBeforeUpdate=e}catch(Ae){ct(a,a.return,Ae)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,a=e.nodeType,a===9)df(e);else if(a===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":df(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(o(163))}if(e=t.sibling,e!==null){e.return=t.return,Qt=e;break}Qt=t.return}}function Qm(e,t,a){var l=a.flags;switch(a.tag){case 0:case 11:case 15:Jn(e,a),l&4&&ki(5,a);break;case 1:if(Jn(e,a),l&4)if(e=a.stateNode,t===null)try{e.componentDidMount()}catch(p){ct(a,a.return,p)}else{var c=_s(a.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(c,t,e.__reactInternalSnapshotBeforeUpdate)}catch(p){ct(a,a.return,p)}}l&64&&Ym(a),l&512&&Ai(a,a.return);break;case 3:if(Jn(e,a),l&64&&(e=a.updateQueue,e!==null)){if(t=null,a.child!==null)switch(a.child.tag){case 27:case 5:t=a.child.stateNode;break;case 1:t=a.child.stateNode}try{_h(e,t)}catch(p){ct(a,a.return,p)}}break;case 27:t===null&&l&4&&Wm(a);case 26:case 5:Jn(e,a),t===null&&l&4&&Fm(a),l&512&&Ai(a,a.return);break;case 12:Jn(e,a);break;case 31:Jn(e,a),l&4&&Km(e,a);break;case 13:Jn(e,a),l&4&&e0(e,a),l&64&&(e=a.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(a=Dv.bind(null,a),Xv(e,a))));break;case 22:if(l=a.memoizedState!==null||Qn,!l){t=t!==null&&t.memoizedState!==null||Vt,c=Qn;var d=Vt;Qn=l,(Vt=t)&&!d?Kn(e,a,(a.subtreeFlags&8772)!==0):Jn(e,a),Qn=c,Vt=d}break;case 30:break;default:Jn(e,a)}}function Xm(e){var t=e.alternate;t!==null&&(e.alternate=null,Xm(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Js(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var vt=null,wa=!1;function Xn(e,t,a){for(a=a.child;a!==null;)Jm(e,t,a),a=a.sibling}function Jm(e,t,a){if(Bt&&typeof Bt.onCommitFiberUnmount=="function")try{Bt.onCommitFiberUnmount(gt,a)}catch{}switch(a.tag){case 26:Vt||Mn(a,t),Xn(e,t,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:Vt||Mn(a,t);var l=vt,c=wa;Pl(a.type)&&(vt=a.stateNode,wa=!1),Xn(e,t,a),Pi(a.stateNode),vt=l,wa=c;break;case 5:Vt||Mn(a,t);case 6:if(l=vt,c=wa,vt=null,Xn(e,t,a),vt=l,wa=c,vt!==null)if(wa)try{(vt.nodeType===9?vt.body:vt.nodeName==="HTML"?vt.ownerDocument.body:vt).removeChild(a.stateNode)}catch(d){ct(a,t,d)}else try{vt.removeChild(a.stateNode)}catch(d){ct(a,t,d)}break;case 18:vt!==null&&(wa?(e=vt,Y0(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,a.stateNode),Hr(e)):Y0(vt,a.stateNode));break;case 4:l=vt,c=wa,vt=a.stateNode.containerInfo,wa=!0,Xn(e,t,a),vt=l,wa=c;break;case 0:case 11:case 14:case 15:zl(2,a,t),Vt||zl(4,a,t),Xn(e,t,a);break;case 1:Vt||(Mn(a,t),l=a.stateNode,typeof l.componentWillUnmount=="function"&&Gm(a,t,l)),Xn(e,t,a);break;case 21:Xn(e,t,a);break;case 22:Vt=(l=Vt)||a.memoizedState!==null,Xn(e,t,a),Vt=l;break;default:Xn(e,t,a)}}function Km(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Hr(e)}catch(a){ct(t,t.return,a)}}}function e0(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Hr(e)}catch(a){ct(t,t.return,a)}}function wv(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Im),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Im),t;default:throw Error(o(435,e.tag))}}function bo(e,t){var a=wv(e);t.forEach(function(l){if(!a.has(l)){a.add(l);var c=kv.bind(null,e,l);l.then(c,c)}})}function Sa(e,t){var a=t.deletions;if(a!==null)for(var l=0;l<a.length;l++){var c=a[l],d=e,p=t,T=p;e:for(;T!==null;){switch(T.tag){case 27:if(Pl(T.type)){vt=T.stateNode,wa=!1;break e}break;case 5:vt=T.stateNode,wa=!1;break e;case 3:case 4:vt=T.stateNode.containerInfo,wa=!0;break e}T=T.return}if(vt===null)throw Error(o(160));Jm(d,p,c),vt=null,wa=!1,d=c.alternate,d!==null&&(d.return=null),c.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)t0(t,e),t=t.sibling}var mn=null;function t0(e,t){var a=e.alternate,l=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Sa(t,e),Ea(e),l&4&&(zl(3,e,e.return),ki(3,e),zl(5,e,e.return));break;case 1:Sa(t,e),Ea(e),l&512&&(Vt||a===null||Mn(a,a.return)),l&64&&Qn&&(e=e.updateQueue,e!==null&&(l=e.callbacks,l!==null&&(a=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=a===null?l:a.concat(l))));break;case 26:var c=mn;if(Sa(t,e),Ea(e),l&512&&(Vt||a===null||Mn(a,a.return)),l&4){var d=a!==null?a.memoizedState:null;if(l=e.memoizedState,a===null)if(l===null)if(e.stateNode===null){e:{l=e.type,a=e.memoizedProps,c=c.ownerDocument||c;t:switch(l){case"title":d=c.getElementsByTagName("title")[0],(!d||d[ns]||d[Et]||d.namespaceURI==="http://www.w3.org/2000/svg"||d.hasAttribute("itemprop"))&&(d=c.createElement(l),c.head.insertBefore(d,c.querySelector("head > title"))),la(d,l,a),d[Et]=e,Lt(d),l=d;break e;case"link":var p=tg("link","href",c).get(l+(a.href||""));if(p){for(var T=0;T<p.length;T++)if(d=p[T],d.getAttribute("href")===(a.href==null||a.href===""?null:a.href)&&d.getAttribute("rel")===(a.rel==null?null:a.rel)&&d.getAttribute("title")===(a.title==null?null:a.title)&&d.getAttribute("crossorigin")===(a.crossOrigin==null?null:a.crossOrigin)){p.splice(T,1);break t}}d=c.createElement(l),la(d,l,a),c.head.appendChild(d);break;case"meta":if(p=tg("meta","content",c).get(l+(a.content||""))){for(T=0;T<p.length;T++)if(d=p[T],d.getAttribute("content")===(a.content==null?null:""+a.content)&&d.getAttribute("name")===(a.name==null?null:a.name)&&d.getAttribute("property")===(a.property==null?null:a.property)&&d.getAttribute("http-equiv")===(a.httpEquiv==null?null:a.httpEquiv)&&d.getAttribute("charset")===(a.charSet==null?null:a.charSet)){p.splice(T,1);break t}}d=c.createElement(l),la(d,l,a),c.head.appendChild(d);break;default:throw Error(o(468,l))}d[Et]=e,Lt(d),l=d}e.stateNode=l}else ag(c,e.type,e.stateNode);else e.stateNode=eg(c,l,e.memoizedProps);else d!==l?(d===null?a.stateNode!==null&&(a=a.stateNode,a.parentNode.removeChild(a)):d.count--,l===null?ag(c,e.type,e.stateNode):eg(c,l,e.memoizedProps)):l===null&&e.stateNode!==null&&Ld(e,e.memoizedProps,a.memoizedProps)}break;case 27:Sa(t,e),Ea(e),l&512&&(Vt||a===null||Mn(a,a.return)),a!==null&&l&4&&Ld(e,e.memoizedProps,a.memoizedProps);break;case 5:if(Sa(t,e),Ea(e),l&512&&(Vt||a===null||Mn(a,a.return)),e.flags&32){c=e.stateNode;try{rn(c,"")}catch(je){ct(e,e.return,je)}}l&4&&e.stateNode!=null&&(c=e.memoizedProps,Ld(e,c,a!==null?a.memoizedProps:c)),l&1024&&(qd=!0);break;case 6:if(Sa(t,e),Ea(e),l&4){if(e.stateNode===null)throw Error(o(162));l=e.memoizedProps,a=e.stateNode;try{a.nodeValue=l}catch(je){ct(e,e.return,je)}}break;case 3:if(Lo=null,c=mn,mn=_o(t.containerInfo),Sa(t,e),mn=c,Ea(e),l&4&&a!==null&&a.memoizedState.isDehydrated)try{Hr(t.containerInfo)}catch(je){ct(e,e.return,je)}qd&&(qd=!1,a0(e));break;case 4:l=mn,mn=_o(e.stateNode.containerInfo),Sa(t,e),Ea(e),mn=l;break;case 12:Sa(t,e),Ea(e);break;case 31:Sa(t,e),Ea(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,bo(e,l)));break;case 13:Sa(t,e),Ea(e),e.child.flags&8192&&e.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&(No=At()),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,bo(e,l)));break;case 22:c=e.memoizedState!==null;var L=a!==null&&a.memoizedState!==null,I=Qn,re=Vt;if(Qn=I||c,Vt=re||L,Sa(t,e),Vt=re,Qn=I,Ea(e),l&8192)e:for(t=e.stateNode,t._visibility=c?t._visibility&-2:t._visibility|1,c&&(a===null||L||Qn||Vt||zs(e)),a=null,t=e;;){if(t.tag===5||t.tag===26){if(a===null){L=a=t;try{if(d=L.stateNode,c)p=d.style,typeof p.setProperty=="function"?p.setProperty("display","none","important"):p.display="none";else{T=L.stateNode;var ce=L.memoizedProps.style,X=ce!=null&&ce.hasOwnProperty("display")?ce.display:null;T.style.display=X==null||typeof X=="boolean"?"":(""+X).trim()}}catch(je){ct(L,L.return,je)}}}else if(t.tag===6){if(a===null){L=t;try{L.stateNode.nodeValue=c?"":L.memoizedProps}catch(je){ct(L,L.return,je)}}}else if(t.tag===18){if(a===null){L=t;try{var te=L.stateNode;c?G0(te,!0):G0(L.stateNode,!1)}catch(je){ct(L,L.return,je)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;a===t&&(a=null),t=t.return}a===t&&(a=null),t.sibling.return=t.return,t=t.sibling}l&4&&(l=e.updateQueue,l!==null&&(a=l.retryQueue,a!==null&&(l.retryQueue=null,bo(e,a))));break;case 19:Sa(t,e),Ea(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,bo(e,l)));break;case 30:break;case 21:break;default:Sa(t,e),Ea(e)}}function Ea(e){var t=e.flags;if(t&2){try{for(var a,l=e.return;l!==null;){if(Zm(l)){a=l;break}l=l.return}if(a==null)throw Error(o(160));switch(a.tag){case 27:var c=a.stateNode,d=Ud(e);yo(e,d,c);break;case 5:var p=a.stateNode;a.flags&32&&(rn(p,""),a.flags&=-33);var T=Ud(e);yo(e,T,p);break;case 3:case 4:var L=a.stateNode.containerInfo,I=Ud(e);Hd(e,I,L);break;default:throw Error(o(161))}}catch(re){ct(e,e.return,re)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function a0(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;a0(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function Jn(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)Qm(e,t.alternate,t),t=t.sibling}function zs(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:zl(4,t,t.return),zs(t);break;case 1:Mn(t,t.return);var a=t.stateNode;typeof a.componentWillUnmount=="function"&&Gm(t,t.return,a),zs(t);break;case 27:Pi(t.stateNode);case 26:case 5:Mn(t,t.return),zs(t);break;case 22:t.memoizedState===null&&zs(t);break;case 30:zs(t);break;default:zs(t)}e=e.sibling}}function Kn(e,t,a){for(a=a&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var l=t.alternate,c=e,d=t,p=d.flags;switch(d.tag){case 0:case 11:case 15:Kn(c,d,a),ki(4,d);break;case 1:if(Kn(c,d,a),l=d,c=l.stateNode,typeof c.componentDidMount=="function")try{c.componentDidMount()}catch(I){ct(l,l.return,I)}if(l=d,c=l.updateQueue,c!==null){var T=l.stateNode;try{var L=c.shared.hiddenCallbacks;if(L!==null)for(c.shared.hiddenCallbacks=null,c=0;c<L.length;c++)Ah(L[c],T)}catch(I){ct(l,l.return,I)}}a&&p&64&&Ym(d),Ai(d,d.return);break;case 27:Wm(d);case 26:case 5:Kn(c,d,a),a&&l===null&&p&4&&Fm(d),Ai(d,d.return);break;case 12:Kn(c,d,a);break;case 31:Kn(c,d,a),a&&p&4&&Km(c,d);break;case 13:Kn(c,d,a),a&&p&4&&e0(c,d);break;case 22:d.memoizedState===null&&Kn(c,d,a),Ai(d,d.return);break;case 30:break;default:Kn(c,d,a)}t=t.sibling}}function Vd(e,t){var a=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==a&&(e!=null&&e.refCount++,a!=null&&yi(a))}function Bd(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&yi(e))}function gn(e,t,a,l){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)n0(e,t,a,l),t=t.sibling}function n0(e,t,a,l){var c=t.flags;switch(t.tag){case 0:case 11:case 15:gn(e,t,a,l),c&2048&&ki(9,t);break;case 1:gn(e,t,a,l);break;case 3:gn(e,t,a,l),c&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&yi(e)));break;case 12:if(c&2048){gn(e,t,a,l),e=t.stateNode;try{var d=t.memoizedProps,p=d.id,T=d.onPostCommit;typeof T=="function"&&T(p,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(L){ct(t,t.return,L)}}else gn(e,t,a,l);break;case 31:gn(e,t,a,l);break;case 13:gn(e,t,a,l);break;case 23:break;case 22:d=t.stateNode,p=t.alternate,t.memoizedState!==null?d._visibility&2?gn(e,t,a,l):_i(e,t):d._visibility&2?gn(e,t,a,l):(d._visibility|=2,Cr(e,t,a,l,(t.subtreeFlags&10256)!==0||!1)),c&2048&&Vd(p,t);break;case 24:gn(e,t,a,l),c&2048&&Bd(t.alternate,t);break;default:gn(e,t,a,l)}}function Cr(e,t,a,l,c){for(c=c&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var d=e,p=t,T=a,L=l,I=p.flags;switch(p.tag){case 0:case 11:case 15:Cr(d,p,T,L,c),ki(8,p);break;case 23:break;case 22:var re=p.stateNode;p.memoizedState!==null?re._visibility&2?Cr(d,p,T,L,c):_i(d,p):(re._visibility|=2,Cr(d,p,T,L,c)),c&&I&2048&&Vd(p.alternate,p);break;case 24:Cr(d,p,T,L,c),c&&I&2048&&Bd(p.alternate,p);break;default:Cr(d,p,T,L,c)}t=t.sibling}}function _i(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var a=e,l=t,c=l.flags;switch(l.tag){case 22:_i(a,l),c&2048&&Vd(l.alternate,l);break;case 24:_i(a,l),c&2048&&Bd(l.alternate,l);break;default:_i(a,l)}t=t.sibling}}var zi=8192;function Mr(e,t,a){if(e.subtreeFlags&zi)for(e=e.child;e!==null;)l0(e,t,a),e=e.sibling}function l0(e,t,a){switch(e.tag){case 26:Mr(e,t,a),e.flags&zi&&e.memoizedState!==null&&oy(a,mn,e.memoizedState,e.memoizedProps);break;case 5:Mr(e,t,a);break;case 3:case 4:var l=mn;mn=_o(e.stateNode.containerInfo),Mr(e,t,a),mn=l;break;case 22:e.memoizedState===null&&(l=e.alternate,l!==null&&l.memoizedState!==null?(l=zi,zi=16777216,Mr(e,t,a),zi=l):Mr(e,t,a));break;default:Mr(e,t,a)}}function s0(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 l=t[a];Qt=l,i0(l,e)}s0(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)r0(e),e=e.sibling}function r0(e){switch(e.tag){case 0:case 11:case 15:Li(e),e.flags&2048&&zl(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,jo(e)):Li(e);break;default:Li(e)}}function jo(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var a=0;a<t.length;a++){var l=t[a];Qt=l,i0(l,e)}s0(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:zl(8,t,t.return),jo(t);break;case 22:a=t.stateNode,a._visibility&2&&(a._visibility&=-3,jo(t));break;default:jo(t)}e=e.sibling}}function i0(e,t){for(;Qt!==null;){var a=Qt;switch(a.tag){case 0:case 11:case 15:zl(8,a,t);break;case 23:case 22:if(a.memoizedState!==null&&a.memoizedState.cachePool!==null){var l=a.memoizedState.cachePool.pool;l!=null&&l.refCount++}break;case 24:yi(a.memoizedState.cache)}if(l=a.child,l!==null)l.return=a,Qt=l;else e:for(a=e;Qt!==null;){l=Qt;var c=l.sibling,d=l.return;if(Xm(l),l===a){Qt=null;break e}if(c!==null){c.return=d,Qt=c;break e}Qt=d}}}var Sv={getCacheForType:function(e){var t=aa(Ut),a=t.data.get(e);return a===void 0&&(a=e(),t.data.set(e,a)),a},cacheSignal:function(){return aa(Ut).controller.signal}},Ev=typeof WeakMap=="function"?WeakMap:Map,at=0,ht=null,Be=null,Ge=0,it=0,Aa=null,Ll=!1,Or=!1,Pd=!1,el=0,wt=0,Ul=0,Ls=0,$d=0,_a=0,Rr=0,Ui=null,Ta=null,Yd=!1,No=0,c0=0,wo=1/0,So=null,Hl=null,Gt=0,ql=null,Dr=null,tl=0,Gd=0,Fd=null,o0=null,Hi=0,Zd=null;function za(){return(at&2)!==0&&Ge!==0?Ge&-Ge:G.T!==null?Kd():Xs()}function u0(){if(_a===0)if((Ge&536870912)===0||Y){var e=Pt;Pt<<=1,(Pt&3932160)===0&&(Pt=262144),_a=e}else _a=536870912;return e=Da.current,e!==null&&(e.flags|=32),_a}function Ca(e,t,a){(e===ht&&(it===2||it===9)||e.cancelPendingCommit!==null)&&(kr(e,0),Vl(e,Ge,_a,!1)),ml(e,a),((at&2)===0||e!==ht)&&(e===ht&&((at&2)===0&&(Ls|=a),wt===4&&Vl(e,Ge,_a,!1)),On(e))}function d0(e,t,a){if((at&6)!==0)throw Error(o(327));var l=!a&&(t&127)===0&&(t&e.expiredLanes)===0||hl(e,t),c=l?Mv(e,t):Id(e,t,!0),d=l;do{if(c===0){Or&&!l&&Vl(e,t,0,!1);break}else{if(a=e.current.alternate,d&&!Tv(a)){c=Id(e,t,!1),d=!1;continue}if(c===2){if(d=t,e.errorRecoveryDisabledLanes&d)var p=0;else p=e.pendingLanes&-536870913,p=p!==0?p:p&536870912?536870912:0;if(p!==0){t=p;e:{var T=e;c=Ui;var L=T.current.memoizedState.isDehydrated;if(L&&(kr(T,p).flags|=256),p=Id(T,p,!1),p!==2){if(Pd&&!L){T.errorRecoveryDisabledLanes|=d,Ls|=d,c=4;break e}d=Ta,Ta=c,d!==null&&(Ta===null?Ta=d:Ta.push.apply(Ta,d))}c=p}if(d=!1,c!==2)continue}}if(c===1){kr(e,0),Vl(e,t,0,!0);break}e:{switch(l=e,d=c,d){case 0:case 1:throw Error(o(345));case 4:if((t&4194048)!==t)break;case 6:Vl(l,t,_a,!Ll);break e;case 2:Ta=null;break;case 3:case 5:break;default:throw Error(o(329))}if((t&62914560)===t&&(c=No+300-At(),10<c)){if(Vl(l,t,_a,!Ll),ts(l,0,!0)!==0)break e;tl=t,l.timeoutHandle=P0(f0.bind(null,l,a,Ta,So,Yd,t,_a,Ls,Rr,Ll,d,"Throttled",-0,0),c);break e}f0(l,a,Ta,So,Yd,t,_a,Ls,Rr,Ll,d,null,-0,0)}}break}while(!0);On(e)}function f0(e,t,a,l,c,d,p,T,L,I,re,ce,X,te){if(e.timeoutHandle=-1,ce=t.subtreeFlags,ce&8192||(ce&16785408)===16785408){ce={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Pa},l0(t,d,ce);var je=(d&62914560)===d?No-At():(d&4194048)===d?c0-At():0;if(je=uy(ce,je),je!==null){tl=d,e.cancelPendingCommit=je(b0.bind(null,e,t,d,a,l,c,p,T,L,re,ce,null,X,te)),Vl(e,d,p,!I);return}}b0(e,t,d,a,l,c,p,T,L)}function Tv(e){for(var t=e;;){var a=t.tag;if((a===0||a===11||a===15)&&t.flags&16384&&(a=t.updateQueue,a!==null&&(a=a.stores,a!==null)))for(var l=0;l<a.length;l++){var c=a[l],d=c.getSnapshot;c=c.value;try{if(!ra(d(),c))return!1}catch{return!1}}if(a=t.child,t.subtreeFlags&16384&&a!==null)a.return=t,t=a;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Vl(e,t,a,l){t&=~$d,t&=~Ls,e.suspendedLanes|=t,e.pingedLanes&=~t,l&&(e.warmLanes|=t),l=e.expirationTimes;for(var c=t;0<c;){var d=31-zt(c),p=1<<d;l[d]=-1,c&=~p}a!==0&&mt(e,a,t)}function Eo(){return(at&6)===0?(qi(0),!1):!0}function Wd(){if(Be!==null){if(it===0)var e=Be.return;else e=Be,Ia=Yn=null,ud(e),Nr=null,ji=0,e=Be;for(;e!==null;)$m(e.alternate,e),e=e.return;Be=null}}function kr(e,t){var a=e.timeoutHandle;a!==-1&&(e.timeoutHandle=-1,Fv(a)),a=e.cancelPendingCommit,a!==null&&(e.cancelPendingCommit=null,a()),tl=0,Wd(),ht=e,Be=a=Fa(e.current,null),Ge=t,it=0,Aa=null,Ll=!1,Or=hl(e,t),Pd=!1,Rr=_a=$d=Ls=Ul=wt=0,Ta=Ui=null,Yd=!1,(t&8)!==0&&(t|=t&32);var l=e.entangledLanes;if(l!==0)for(e=e.entanglements,l&=t;0<l;){var c=31-zt(l),d=1<<c;t|=e[c],l&=~d}return el=t,Ml(),a}function h0(e,t){qe=null,G.H=Oi,t===jr||t===Kc?(t=Oh(),it=3):t===Ju?(t=Oh(),it=4):it=t===Td?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,Aa=t,Be===null&&(wt=1,mo(e,ja(t,e.current)))}function m0(){var e=Da.current;return e===null?!0:(Ge&4194048)===Ge?Xa===null:(Ge&62914560)===Ge||(Ge&536870912)!==0?e===Xa:!1}function g0(){var e=G.H;return G.H=Oi,e===null?Oi:e}function x0(){var e=G.A;return G.A=Sv,e}function To(){wt=4,Ll||(Ge&4194048)!==Ge&&Da.current!==null||(Or=!0),(Ul&134217727)===0&&(Ls&134217727)===0||ht===null||Vl(ht,Ge,_a,!1)}function Id(e,t,a){var l=at;at|=2;var c=g0(),d=x0();(ht!==e||Ge!==t)&&(So=null,kr(e,t)),t=!1;var p=wt;e:do try{if(it!==0&&Be!==null){var T=Be,L=Aa;switch(it){case 8:Wd(),p=6;break e;case 3:case 2:case 9:case 6:Da.current===null&&(t=!0);var I=it;if(it=0,Aa=null,Ar(e,T,L,I),a&&Or){p=0;break e}break;default:I=it,it=0,Aa=null,Ar(e,T,L,I)}}Cv(),p=wt;break}catch(re){h0(e,re)}while(!0);return t&&e.shellSuspendCounter++,Ia=Yn=null,at=l,G.H=c,G.A=d,Be===null&&(ht=null,Ge=0,Ml()),p}function Cv(){for(;Be!==null;)p0(Be)}function Mv(e,t){var a=at;at|=2;var l=g0(),c=x0();ht!==e||Ge!==t?(So=null,wo=At()+500,kr(e,t)):Or=hl(e,t);e:do try{if(it!==0&&Be!==null){t=Be;var d=Aa;t:switch(it){case 1:it=0,Aa=null,Ar(e,t,d,1);break;case 2:case 9:if(Ch(d)){it=0,Aa=null,v0(t);break}t=function(){it!==2&&it!==9||ht!==e||(it=7),On(e)},d.then(t,t);break e;case 3:it=7;break e;case 4:it=5;break e;case 7:Ch(d)?(it=0,Aa=null,v0(t)):(it=0,Aa=null,Ar(e,t,d,7));break;case 5:var p=null;switch(Be.tag){case 26:p=Be.memoizedState;case 5:case 27:var T=Be;if(p?ng(p):T.stateNode.complete){it=0,Aa=null;var L=T.sibling;if(L!==null)Be=L;else{var I=T.return;I!==null?(Be=I,Co(I)):Be=null}break t}}it=0,Aa=null,Ar(e,t,d,5);break;case 6:it=0,Aa=null,Ar(e,t,d,6);break;case 8:Wd(),wt=6;break e;default:throw Error(o(462))}}Ov();break}catch(re){h0(e,re)}while(!0);return Ia=Yn=null,G.H=l,G.A=c,at=a,Be!==null?0:(ht=null,Ge=0,Ml(),wt)}function Ov(){for(;Be!==null&&!Ba();)p0(Be)}function p0(e){var t=Bm(e.alternate,e,el);e.memoizedProps=e.pendingProps,t===null?Co(e):Be=t}function v0(e){var t=e,a=t.alternate;switch(t.tag){case 15:case 0:t=zm(a,t,t.pendingProps,t.type,void 0,Ge);break;case 11:t=zm(a,t,t.pendingProps,t.type.render,t.ref,Ge);break;case 5:ud(t);default:$m(a,t),t=Be=Ic(t,el),t=Bm(a,t,el)}e.memoizedProps=e.pendingProps,t===null?Co(e):Be=t}function Ar(e,t,a,l){Ia=Yn=null,ud(t),Nr=null,ji=0;var c=t.return;try{if(pv(e,c,t,a,Ge)){wt=1,mo(e,ja(a,e.current)),Be=null;return}}catch(d){if(c!==null)throw Be=c,d;wt=1,mo(e,ja(a,e.current)),Be=null;return}t.flags&32768?(Y||l===1?e=!0:Or||(Ge&536870912)!==0?e=!1:(Ll=e=!0,(l===2||l===9||l===3||l===6)&&(l=Da.current,l!==null&&l.tag===13&&(l.flags|=16384))),y0(t,e)):Co(t)}function Co(e){var t=e;do{if((t.flags&32768)!==0){y0(t,Ll);return}e=t.return;var a=bv(t.alternate,t,el);if(a!==null){Be=a;return}if(t=t.sibling,t!==null){Be=t;return}Be=t=e}while(t!==null);wt===0&&(wt=5)}function y0(e,t){do{var a=jv(e.alternate,e);if(a!==null){a.flags&=32767,Be=a;return}if(a=e.return,a!==null&&(a.flags|=32768,a.subtreeFlags=0,a.deletions=null),!t&&(e=e.sibling,e!==null)){Be=e;return}Be=e=a}while(e!==null);wt=6,Be=null}function b0(e,t,a,l,c,d,p,T,L){e.cancelPendingCommit=null;do Mo();while(Gt!==0);if((at&6)!==0)throw Error(o(327));if(t!==null){if(t===e.current)throw Error(o(177));if(d=t.lanes|t.childLanes,d|=Ss,jc(e,a,d,p,T,L),e===ht&&(Be=ht=null,Ge=0),Dr=t,ql=e,tl=a,Gd=d,Fd=c,o0=l,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,Av(An,function(){return E0(),null})):(e.callbackNode=null,e.callbackPriority=0),l=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||l){l=G.T,G.T=null,c=ne.p,ne.p=2,p=at,at|=4;try{Nv(e,t,a)}finally{at=p,ne.p=c,G.T=l}}Gt=1,j0(),N0(),w0()}}function j0(){if(Gt===1){Gt=0;var e=ql,t=Dr,a=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||a){a=G.T,G.T=null;var l=ne.p;ne.p=2;var c=at;at|=4;try{t0(t,e);var d=cf,p=Fu(e.containerInfo),T=d.focusedElem,L=d.selectionRange;if(p!==T&&T&&T.ownerDocument&&Xe(T.ownerDocument.documentElement,T)){if(L!==null&&or(T)){var I=L.start,re=L.end;if(re===void 0&&(re=I),"selectionStart"in T)T.selectionStart=I,T.selectionEnd=Math.min(re,T.value.length);else{var ce=T.ownerDocument||document,X=ce&&ce.defaultView||window;if(X.getSelection){var te=X.getSelection(),je=T.textContent.length,Ae=Math.min(L.start,je),ft=L.end===void 0?Ae:Math.min(L.end,je);!te.extend&&Ae>ft&&(p=ft,ft=Ae,Ae=p);var F=$c(T,Ae),$=$c(T,ft);if(F&&$&&(te.rangeCount!==1||te.anchorNode!==F.node||te.anchorOffset!==F.offset||te.focusNode!==$.node||te.focusOffset!==$.offset)){var W=ce.createRange();W.setStart(F.node,F.offset),te.removeAllRanges(),Ae>ft?(te.addRange(W),te.extend($.node,$.offset)):(W.setEnd($.node,$.offset),te.addRange(W))}}}}for(ce=[],te=T;te=te.parentNode;)te.nodeType===1&&ce.push({element:te,left:te.scrollLeft,top:te.scrollTop});for(typeof T.focus=="function"&&T.focus(),T=0;T<ce.length;T++){var ie=ce[T];ie.element.scrollLeft=ie.left,ie.element.scrollTop=ie.top}}Vo=!!rf,cf=rf=null}finally{at=c,ne.p=l,G.T=a}}e.current=t,Gt=2}}function N0(){if(Gt===2){Gt=0;var e=ql,t=Dr,a=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||a){a=G.T,G.T=null;var l=ne.p;ne.p=2;var c=at;at|=4;try{Qm(e,t.alternate,t)}finally{at=c,ne.p=l,G.T=a}}Gt=3}}function w0(){if(Gt===4||Gt===3){Gt=0,ga();var e=ql,t=Dr,a=tl,l=o0;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?Gt=5:(Gt=0,Dr=ql=null,S0(e,e.pendingLanes));var c=e.pendingLanes;if(c===0&&(Hl=null),sa(a),t=t.stateNode,Bt&&typeof Bt.onCommitFiberRoot=="function")try{Bt.onCommitFiberRoot(gt,t,void 0,(t.current.flags&128)===128)}catch{}if(l!==null){t=G.T,c=ne.p,ne.p=2,G.T=null;try{for(var d=e.onRecoverableError,p=0;p<l.length;p++){var T=l[p];d(T.value,{componentStack:T.stack})}}finally{G.T=t,ne.p=c}}(tl&3)!==0&&Mo(),On(e),c=e.pendingLanes,(a&261930)!==0&&(c&42)!==0?e===Zd?Hi++:(Hi=0,Zd=e):Hi=0,qi(0)}}function S0(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,yi(t)))}function Mo(){return j0(),N0(),w0(),E0()}function E0(){if(Gt!==5)return!1;var e=ql,t=Gd;Gd=0;var a=sa(tl),l=G.T,c=ne.p;try{ne.p=32>a?32:a,G.T=null,a=Fd,Fd=null;var d=ql,p=tl;if(Gt=0,Dr=ql=null,tl=0,(at&6)!==0)throw Error(o(331));var T=at;if(at|=4,r0(d.current),n0(d,d.current,p,a),at=T,qi(0,!1),Bt&&typeof Bt.onPostCommitFiberRoot=="function")try{Bt.onPostCommitFiberRoot(gt,d)}catch{}return!0}finally{ne.p=c,G.T=l,S0(e,t)}}function T0(e,t,a){t=ja(a,t),t=Ed(e.stateNode,t,2),e=kl(e,t,2),e!==null&&(ml(e,2),On(e))}function ct(e,t,a){if(e.tag===3)T0(e,e,a);else for(;t!==null;){if(t.tag===3){T0(t,e,a);break}else if(t.tag===1){var l=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof l.componentDidCatch=="function"&&(Hl===null||!Hl.has(l))){e=ja(a,e),a=Cm(2),l=kl(t,a,2),l!==null&&(Mm(a,l,t,e),ml(l,2),On(l));break}}t=t.return}}function Qd(e,t,a){var l=e.pingCache;if(l===null){l=e.pingCache=new Ev;var c=new Set;l.set(t,c)}else c=l.get(t),c===void 0&&(c=new Set,l.set(t,c));c.has(a)||(Pd=!0,c.add(a),e=Rv.bind(null,e,t,a),t.then(e,e))}function Rv(e,t,a){var l=e.pingCache;l!==null&&l.delete(t),e.pingedLanes|=e.suspendedLanes&a,e.warmLanes&=~a,ht===e&&(Ge&a)===a&&(wt===4||wt===3&&(Ge&62914560)===Ge&&300>At()-No?(at&2)===0&&kr(e,0):$d|=a,Rr===Ge&&(Rr=0)),On(e)}function C0(e,t){t===0&&(t=Wr()),e=Ga(e,t),e!==null&&(ml(e,t),On(e))}function Dv(e){var t=e.memoizedState,a=0;t!==null&&(a=t.retryLane),C0(e,a)}function kv(e,t){var a=0;switch(e.tag){case 31:case 13:var l=e.stateNode,c=e.memoizedState;c!==null&&(a=c.retryLane);break;case 19:l=e.stateNode;break;case 22:l=e.stateNode._retryCache;break;default:throw Error(o(314))}l!==null&&l.delete(t),C0(e,a)}function Av(e,t){return ma(e,t)}var Oo=null,_r=null,Xd=!1,Ro=!1,Jd=!1,Bl=0;function On(e){e!==_r&&e.next===null&&(_r===null?Oo=_r=e:_r=_r.next=e),Ro=!0,Xd||(Xd=!0,zv())}function qi(e,t){if(!Jd&&Ro){Jd=!0;do for(var a=!1,l=Oo;l!==null;){if(e!==0){var c=l.pendingLanes;if(c===0)var d=0;else{var p=l.suspendedLanes,T=l.pingedLanes;d=(1<<31-zt(42|e)+1)-1,d&=c&~(p&~T),d=d&201326741?d&201326741|1:d?d|2:0}d!==0&&(a=!0,D0(l,d))}else d=Ge,d=ts(l,l===ht?d:0,l.cancelPendingCommit!==null||l.timeoutHandle!==-1),(d&3)===0||hl(l,d)||(a=!0,D0(l,d));l=l.next}while(a);Jd=!1}}function _v(){M0()}function M0(){Ro=Xd=!1;var e=0;Bl!==0&&Gv()&&(e=Bl);for(var t=At(),a=null,l=Oo;l!==null;){var c=l.next,d=O0(l,t);d===0?(l.next=null,a===null?Oo=c:a.next=c,c===null&&(_r=a)):(a=l,(e!==0||(d&3)!==0)&&(Ro=!0)),l=c}Gt!==0&&Gt!==5||qi(e),Bl!==0&&(Bl=0)}function O0(e,t){for(var a=e.suspendedLanes,l=e.pingedLanes,c=e.expirationTimes,d=e.pendingLanes&-62914561;0<d;){var p=31-zt(d),T=1<<p,L=c[p];L===-1?((T&a)===0||(T&l)!==0)&&(c[p]=bc(T,t)):L<=t&&(e.expiredLanes|=T),d&=~T}if(t=ht,a=Ge,a=ts(e,e===t?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l=e.callbackNode,a===0||e===t&&(it===2||it===9)||e.cancelPendingCommit!==null)return l!==null&&l!==null&&kn(l),e.callbackNode=null,e.callbackPriority=0;if((a&3)===0||hl(e,a)){if(t=a&-a,t===e.callbackPriority)return t;switch(l!==null&&kn(l),sa(a)){case 2:case 8:a=Zs;break;case 32:a=An;break;case 268435456:a=dl;break;default:a=An}return l=R0.bind(null,e),a=ma(a,l),e.callbackPriority=t,e.callbackNode=a,t}return l!==null&&l!==null&&kn(l),e.callbackPriority=2,e.callbackNode=null,2}function R0(e,t){if(Gt!==0&&Gt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var a=e.callbackNode;if(Mo()&&e.callbackNode!==a)return null;var l=Ge;return l=ts(e,e===ht?l:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l===0?null:(d0(e,l,t),O0(e,At()),e.callbackNode!=null&&e.callbackNode===a?R0.bind(null,e):null)}function D0(e,t){if(Mo())return null;d0(e,t,!0)}function zv(){Zv(function(){(at&6)!==0?ma(Zr,_v):M0()})}function Kd(){if(Bl===0){var e=yr;e===0&&(e=Qe,Qe<<=1,(Qe&261888)===0&&(Qe=256)),Bl=e}return Bl}function k0(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:os(""+e)}function A0(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 Lv(e,t,a,l,c){if(t==="submit"&&a&&a.stateNode===c){var d=k0((c[$t]||null).action),p=l.submitter;p&&(t=(t=p[$t]||null)?k0(t.formAction):p.getAttribute("formAction"),t!==null&&(d=t,p=null));var T=new hs("action","action",null,l,c);e.push({event:T,listeners:[{instance:null,listener:function(){if(l.defaultPrevented){if(Bl!==0){var L=p?A0(c,p):new FormData(c);yd(a,{pending:!0,data:L,method:c.method,action:d},null,L)}}else typeof d=="function"&&(T.preventDefault(),L=p?A0(c,p):new FormData(c),yd(a,{pending:!0,data:L,method:c.method,action:d},d,L))},currentTarget:c}]})}}for(var ef=0;ef<gi.length;ef++){var tf=gi[ef],Uv=tf.toLowerCase(),Hv=tf[0].toUpperCase()+tf.slice(1);ba(Uv,"on"+Hv)}ba(Fc,"onAnimationEnd"),ba(Zc,"onAnimationIteration"),ba(fr,"onAnimationStart"),ba("dblclick","onDoubleClick"),ba("focusin","onFocus"),ba("focusout","onBlur"),ba(Zu,"onTransitionRun"),ba(Wu,"onTransitionStart"),ba(Wc,"onTransitionCancel"),ba(hi,"onTransitionEnd"),gl("onMouseEnter",["mouseout","mouseover"]),gl("onMouseLeave",["mouseout","mouseover"]),gl("onPointerEnter",["pointerout","pointerover"]),gl("onPointerLeave",["pointerout","pointerover"]),jn("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),jn("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),jn("onBeforeInput",["compositionend","keypress","textInput","paste"]),jn("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),jn("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),jn("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Vi="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),qv=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Vi));function _0(e,t){t=(t&4)!==0;for(var a=0;a<e.length;a++){var l=e[a],c=l.event;l=l.listeners;e:{var d=void 0;if(t)for(var p=l.length-1;0<=p;p--){var T=l[p],L=T.instance,I=T.currentTarget;if(T=T.listener,L!==d&&c.isPropagationStopped())break e;d=T,c.currentTarget=I;try{d(c)}catch(re){Cl(re)}c.currentTarget=null,d=L}else for(p=0;p<l.length;p++){if(T=l[p],L=T.instance,I=T.currentTarget,T=T.listener,L!==d&&c.isPropagationStopped())break e;d=T,c.currentTarget=I;try{d(c)}catch(re){Cl(re)}c.currentTarget=null,d=L}}}}function Pe(e,t){var a=t[as];a===void 0&&(a=t[as]=new Set);var l=e+"__bubble";a.has(l)||(z0(t,e,2,!1),a.add(l))}function af(e,t,a){var l=0;t&&(l|=4),z0(a,e,l,t)}var Do="_reactListening"+Math.random().toString(36).slice(2);function nf(e){if(!e[Do]){e[Do]=!0,Ec.forEach(function(a){a!=="selectionchange"&&(qv.has(a)||af(a,!1,e),af(a,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Do]||(t[Do]=!0,af("selectionchange",!1,t))}}function z0(e,t,a,l){switch(ug(t)){case 2:var c=hy;break;case 8:c=my;break;default:c=yf}a=c.bind(null,t,a,e),c=void 0,!li||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(c=!0),l?c!==void 0?e.addEventListener(t,a,{capture:!0,passive:c}):e.addEventListener(t,a,!0):c!==void 0?e.addEventListener(t,a,{passive:c}):e.addEventListener(t,a,!1)}function lf(e,t,a,l,c){var d=l;if((t&1)===0&&(t&2)===0&&l!==null)e:for(;;){if(l===null)return;var p=l.tag;if(p===3||p===4){var T=l.stateNode.containerInfo;if(T===c)break;if(p===4)for(p=l.return;p!==null;){var L=p.tag;if((L===3||L===4)&&p.stateNode.containerInfo===c)return;p=p.return}for(;T!==null;){if(p=zn(T),p===null)return;if(L=p.tag,L===5||L===6||L===26||L===27){l=d=p;continue e}T=T.parentNode}}l=l.return}ni(function(){var I=d,re=nr(a),ce=[];e:{var X=mi.get(e);if(X!==void 0){var te=hs,je=e;switch(e){case"keypress":if(fs(a)===0)break e;case"keydown":case"keyup":te=ku;break;case"focusin":je="focus",te=cr;break;case"focusout":je="blur",te=cr;break;case"beforeblur":case"afterblur":te=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":te=Dc;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":te=wu;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":te=zu;break;case Fc:case Zc:case fr:te=yl;break;case hi:te=Lu;break;case"scroll":case"scrollend":te=si;break;case"wheel":te=Hu;break;case"copy":case"cut":case"paste":te=bl;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":te=kc;break;case"toggle":case"beforetoggle":te=Vu}var Ae=(t&4)!==0,ft=!Ae&&(e==="scroll"||e==="scrollend"),F=Ae?X!==null?X+"Capture":null:X;Ae=[];for(var $=I,W;$!==null;){var ie=$;if(W=ie.stateNode,ie=ie.tag,ie!==5&&ie!==26&&ie!==27||W===null||F===null||(ie=us($,F),ie!=null&&Ae.push(Bi($,ie,W))),ft)break;$=$.return}0<Ae.length&&(X=new te(X,je,null,a,re),ce.push({event:X,listeners:Ae}))}}if((t&7)===0){e:{if(X=e==="mouseover"||e==="pointerover",te=e==="mouseout"||e==="pointerout",X&&a!==ti&&(je=a.relatedTarget||a.fromElement)&&(zn(je)||je[_n]))break e;if((te||X)&&(X=re.window===re?re:(X=re.ownerDocument)?X.defaultView||X.parentWindow:window,te?(je=a.relatedTarget||a.toElement,te=I,je=je?zn(je):null,je!==null&&(ft=f(je),Ae=je.tag,je!==ft||Ae!==5&&Ae!==27&&Ae!==6)&&(je=null)):(te=null,je=I),te!==je)){if(Ae=Dc,ie="onMouseLeave",F="onMouseEnter",$="mouse",(e==="pointerout"||e==="pointerover")&&(Ae=kc,ie="onPointerLeave",F="onPointerEnter",$="pointer"),ft=te==null?X:va(te),W=je==null?X:va(je),X=new Ae(ie,$+"leave",te,a,re),X.target=ft,X.relatedTarget=W,ie=null,zn(re)===I&&(Ae=new Ae(F,$+"enter",je,a,re),Ae.target=W,Ae.relatedTarget=ft,ie=Ae),ft=ie,te&&je)t:{for(Ae=Vv,F=te,$=je,W=0,ie=F;ie;ie=Ae(ie))W++;ie=0;for(var Re=$;Re;Re=Ae(Re))ie++;for(;0<W-ie;)F=Ae(F),W--;for(;0<ie-W;)$=Ae($),ie--;for(;W--;){if(F===$||$!==null&&F===$.alternate){Ae=F;break t}F=Ae(F),$=Ae($)}Ae=null}else Ae=null;te!==null&&L0(ce,X,te,Ae,!1),je!==null&&ft!==null&&L0(ce,ft,je,Ae,!0)}}e:{if(X=I?va(I):window,te=X.nodeName&&X.nodeName.toLowerCase(),te==="select"||te==="input"&&X.type==="file")var et=Bc;else if(Vc(X))if(En)et=xt;else{et=Sl;var Ne=$e}else te=X.nodeName,!te||te.toLowerCase()!=="input"||X.type!=="checkbox"&&X.type!=="radio"?I&&ar(I.elementType)&&(et=Bc):et=Gu;if(et&&(et=et(e,I))){ii(ce,et,a,re);break e}Ne&&Ne(e,X,I),e==="focusout"&&I&&X.type==="number"&&I.memoizedProps.value!=null&&ss(X,"number",X.value)}switch(Ne=I?va(I):window,e){case"focusin":(Vc(Ne)||Ne.contentEditable==="true")&&(El=Ne,ur=I,ea=null);break;case"focusout":ea=ur=El=null;break;case"mousedown":dr=!0;break;case"contextmenu":case"mouseup":case"dragend":dr=!1,ws(ce,a,re);break;case"selectionchange":if(Yc)break;case"keydown":case"keyup":ws(ce,a,re)}var Ve;if(ri)e:{switch(e){case"compositionstart":var Fe="onCompositionStart";break e;case"compositionend":Fe="onCompositionEnd";break e;case"compositionupdate":Fe="onCompositionUpdate";break e}Fe=void 0}else Nl?Hc(e,a)&&(Fe="onCompositionEnd"):e==="keydown"&&a.keyCode===229&&(Fe="onCompositionStart");Fe&&(zc&&a.locale!=="ko"&&(Nl||Fe!=="onCompositionStart"?Fe==="onCompositionEnd"&&Nl&&(Ve=Yt()):(wn=re,lr="value"in wn?wn.value:wn.textContent,Nl=!0)),Ne=ko(I,Fe),0<Ne.length&&(Fe=new jl(Fe,e,null,a,re),ce.push({event:Fe,listeners:Ne}),Ve?Fe.data=Ve:(Ve=qc(a),Ve!==null&&(Fe.data=Ve)))),(Ve=Bu?Pu(e,a):$u(e,a))&&(Fe=ko(I,"onBeforeInput"),0<Fe.length&&(Ne=new jl("onBeforeInput","beforeinput",null,a,re),ce.push({event:Ne,listeners:Fe}),Ne.data=Ve)),Lv(ce,e,I,a,re)}_0(ce,t)})}function Bi(e,t,a){return{instance:e,listener:t,currentTarget:a}}function ko(e,t){for(var a=t+"Capture",l=[];e!==null;){var c=e,d=c.stateNode;if(c=c.tag,c!==5&&c!==26&&c!==27||d===null||(c=us(e,a),c!=null&&l.unshift(Bi(e,c,d)),c=us(e,t),c!=null&&l.push(Bi(e,c,d))),e.tag===3)return l;e=e.return}return[]}function Vv(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function L0(e,t,a,l,c){for(var d=t._reactName,p=[];a!==null&&a!==l;){var T=a,L=T.alternate,I=T.stateNode;if(T=T.tag,L!==null&&L===l)break;T!==5&&T!==26&&T!==27||I===null||(L=I,c?(I=us(a,d),I!=null&&p.unshift(Bi(a,I,L))):c||(I=us(a,d),I!=null&&p.push(Bi(a,I,L)))),a=a.return}p.length!==0&&e.push({event:t,listeners:p})}var Bv=/\r\n?/g,Pv=/\u0000|\uFFFD/g;function U0(e){return(typeof e=="string"?e:""+e).replace(Bv,`
|
|
49
|
+
`).replace(Pv,"")}function H0(e,t){return t=U0(t),U0(e)===t}function dt(e,t,a,l,c,d){switch(a){case"children":typeof l=="string"?t==="body"||t==="textarea"&&l===""||rn(e,l):(typeof l=="number"||typeof l=="bigint")&&t!=="body"&&rn(e,""+l);break;case"className":Ks(e,"class",l);break;case"tabIndex":Ks(e,"tabindex",l);break;case"dir":case"role":case"viewBox":case"width":case"height":Ks(e,a,l);break;case"style":Mc(e,l,d);break;case"data":if(t!=="object"){Ks(e,"data",l);break}case"src":case"href":if(l===""&&(t!=="a"||a!=="href")){e.removeAttribute(a);break}if(l==null||typeof l=="function"||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(a);break}l=os(""+l),e.setAttribute(a,l);break;case"action":case"formAction":if(typeof l=="function"){e.setAttribute(a,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof d=="function"&&(a==="formAction"?(t!=="input"&&dt(e,t,"name",c.name,c,null),dt(e,t,"formEncType",c.formEncType,c,null),dt(e,t,"formMethod",c.formMethod,c,null),dt(e,t,"formTarget",c.formTarget,c,null)):(dt(e,t,"encType",c.encType,c,null),dt(e,t,"method",c.method,c,null),dt(e,t,"target",c.target,c,null)));if(l==null||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(a);break}l=os(""+l),e.setAttribute(a,l);break;case"onClick":l!=null&&(e.onclick=Pa);break;case"onScroll":l!=null&&Pe("scroll",e);break;case"onScrollEnd":l!=null&&Pe("scrollend",e);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(o(61));if(a=l.__html,a!=null){if(c.children!=null)throw Error(o(60));e.innerHTML=a}}break;case"multiple":e.multiple=l&&typeof l!="function"&&typeof l!="symbol";break;case"muted":e.muted=l&&typeof l!="function"&&typeof l!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(l==null||typeof l=="function"||typeof l=="boolean"||typeof l=="symbol"){e.removeAttribute("xlink:href");break}a=os(""+l),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",a);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":l!=null&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(a,""+l):e.removeAttribute(a);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":l&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(a,""):e.removeAttribute(a);break;case"capture":case"download":l===!0?e.setAttribute(a,""):l!==!1&&l!=null&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(a,l):e.removeAttribute(a);break;case"cols":case"rows":case"size":case"span":l!=null&&typeof l!="function"&&typeof l!="symbol"&&!isNaN(l)&&1<=l?e.setAttribute(a,l):e.removeAttribute(a);break;case"rowSpan":case"start":l==null||typeof l=="function"||typeof l=="symbol"||isNaN(l)?e.removeAttribute(a):e.setAttribute(a,l);break;case"popover":Pe("beforetoggle",e),Pe("toggle",e),Jt(e,"popover",l);break;case"xlinkActuate":st(e,"http://www.w3.org/1999/xlink","xlink:actuate",l);break;case"xlinkArcrole":st(e,"http://www.w3.org/1999/xlink","xlink:arcrole",l);break;case"xlinkRole":st(e,"http://www.w3.org/1999/xlink","xlink:role",l);break;case"xlinkShow":st(e,"http://www.w3.org/1999/xlink","xlink:show",l);break;case"xlinkTitle":st(e,"http://www.w3.org/1999/xlink","xlink:title",l);break;case"xlinkType":st(e,"http://www.w3.org/1999/xlink","xlink:type",l);break;case"xmlBase":st(e,"http://www.w3.org/XML/1998/namespace","xml:base",l);break;case"xmlLang":st(e,"http://www.w3.org/XML/1998/namespace","xml:lang",l);break;case"xmlSpace":st(e,"http://www.w3.org/XML/1998/namespace","xml:space",l);break;case"is":Jt(e,"is",l);break;case"innerText":case"textContent":break;default:(!(2<a.length)||a[0]!=="o"&&a[0]!=="O"||a[1]!=="n"&&a[1]!=="N")&&(a=ju.get(a)||a,Jt(e,a,l))}}function sf(e,t,a,l,c,d){switch(a){case"style":Mc(e,l,d);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(o(61));if(a=l.__html,a!=null){if(c.children!=null)throw Error(o(60));e.innerHTML=a}}break;case"children":typeof l=="string"?rn(e,l):(typeof l=="number"||typeof l=="bigint")&&rn(e,""+l);break;case"onScroll":l!=null&&Pe("scroll",e);break;case"onScrollEnd":l!=null&&Pe("scrollend",e);break;case"onClick":l!=null&&(e.onclick=Pa);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Xr.hasOwnProperty(a))e:{if(a[0]==="o"&&a[1]==="n"&&(c=a.endsWith("Capture"),t=a.slice(2,c?a.length-7:void 0),d=e[$t]||null,d=d!=null?d[a]:null,typeof d=="function"&&e.removeEventListener(t,d,c),typeof l=="function")){typeof d!="function"&&d!==null&&(a in e?e[a]=null:e.hasAttribute(a)&&e.removeAttribute(a)),e.addEventListener(t,l,c);break e}a in e?e[a]=l:l===!0?e.setAttribute(a,""):Jt(e,a,l)}}}function la(e,t,a){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Pe("error",e),Pe("load",e);var l=!1,c=!1,d;for(d in a)if(a.hasOwnProperty(d)){var p=a[d];if(p!=null)switch(d){case"src":l=!0;break;case"srcSet":c=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(o(137,t));default:dt(e,t,d,p,a,null)}}c&&dt(e,t,"srcSet",a.srcSet,a,null),l&&dt(e,t,"src",a.src,a,null);return;case"input":Pe("invalid",e);var T=d=p=c=null,L=null,I=null;for(l in a)if(a.hasOwnProperty(l)){var re=a[l];if(re!=null)switch(l){case"name":c=re;break;case"type":p=re;break;case"checked":L=re;break;case"defaultChecked":I=re;break;case"value":d=re;break;case"defaultValue":T=re;break;case"children":case"dangerouslySetInnerHTML":if(re!=null)throw Error(o(137,t));break;default:dt(e,t,l,re,a,null)}}pl(e,d,T,L,I,p,c,!1);return;case"select":Pe("invalid",e),l=p=d=null;for(c in a)if(a.hasOwnProperty(c)&&(T=a[c],T!=null))switch(c){case"value":d=T;break;case"defaultValue":p=T;break;case"multiple":l=T;default:dt(e,t,c,T,a,null)}t=d,a=p,e.multiple=!!l,t!=null?Un(e,!!l,t,!1):a!=null&&Un(e,!!l,a,!0);return;case"textarea":Pe("invalid",e),d=c=l=null;for(p in a)if(a.hasOwnProperty(p)&&(T=a[p],T!=null))switch(p){case"value":l=T;break;case"defaultValue":c=T;break;case"children":d=T;break;case"dangerouslySetInnerHTML":if(T!=null)throw Error(o(91));break;default:dt(e,t,p,T,a,null)}ei(e,l,c,d);return;case"option":for(L in a)if(a.hasOwnProperty(L)&&(l=a[L],l!=null))switch(L){case"selected":e.selected=l&&typeof l!="function"&&typeof l!="symbol";break;default:dt(e,t,L,l,a,null)}return;case"dialog":Pe("beforetoggle",e),Pe("toggle",e),Pe("cancel",e),Pe("close",e);break;case"iframe":case"object":Pe("load",e);break;case"video":case"audio":for(l=0;l<Vi.length;l++)Pe(Vi[l],e);break;case"image":Pe("error",e),Pe("load",e);break;case"details":Pe("toggle",e);break;case"embed":case"source":case"link":Pe("error",e),Pe("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(I in a)if(a.hasOwnProperty(I)&&(l=a[I],l!=null))switch(I){case"children":case"dangerouslySetInnerHTML":throw Error(o(137,t));default:dt(e,t,I,l,a,null)}return;default:if(ar(t)){for(re in a)a.hasOwnProperty(re)&&(l=a[re],l!==void 0&&sf(e,t,re,l,a,void 0));return}}for(T in a)a.hasOwnProperty(T)&&(l=a[T],l!=null&&dt(e,t,T,l,a,null))}function $v(e,t,a,l){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var c=null,d=null,p=null,T=null,L=null,I=null,re=null;for(te in a){var ce=a[te];if(a.hasOwnProperty(te)&&ce!=null)switch(te){case"checked":break;case"value":break;case"defaultValue":L=ce;default:l.hasOwnProperty(te)||dt(e,t,te,null,l,ce)}}for(var X in l){var te=l[X];if(ce=a[X],l.hasOwnProperty(X)&&(te!=null||ce!=null))switch(X){case"type":d=te;break;case"name":c=te;break;case"checked":I=te;break;case"defaultChecked":re=te;break;case"value":p=te;break;case"defaultValue":T=te;break;case"children":case"dangerouslySetInnerHTML":if(te!=null)throw Error(o(137,t));break;default:te!==ce&&dt(e,t,X,te,l,ce)}}tr(e,p,T,L,I,re,d,c);return;case"select":te=p=T=X=null;for(d in a)if(L=a[d],a.hasOwnProperty(d)&&L!=null)switch(d){case"value":break;case"multiple":te=L;default:l.hasOwnProperty(d)||dt(e,t,d,null,l,L)}for(c in l)if(d=l[c],L=a[c],l.hasOwnProperty(c)&&(d!=null||L!=null))switch(c){case"value":X=d;break;case"defaultValue":T=d;break;case"multiple":p=d;default:d!==L&&dt(e,t,c,d,l,L)}t=T,a=p,l=te,X!=null?Un(e,!!a,X,!1):!!l!=!!a&&(t!=null?Un(e,!!a,t,!0):Un(e,!!a,a?[]:"",!1));return;case"textarea":te=X=null;for(T in a)if(c=a[T],a.hasOwnProperty(T)&&c!=null&&!l.hasOwnProperty(T))switch(T){case"value":break;case"children":break;default:dt(e,t,T,null,l,c)}for(p in l)if(c=l[p],d=a[p],l.hasOwnProperty(p)&&(c!=null||d!=null))switch(p){case"value":X=c;break;case"defaultValue":te=c;break;case"children":break;case"dangerouslySetInnerHTML":if(c!=null)throw Error(o(91));break;default:c!==d&&dt(e,t,p,c,l,d)}rs(e,X,te);return;case"option":for(var je in a)if(X=a[je],a.hasOwnProperty(je)&&X!=null&&!l.hasOwnProperty(je))switch(je){case"selected":e.selected=!1;break;default:dt(e,t,je,null,l,X)}for(L in l)if(X=l[L],te=a[L],l.hasOwnProperty(L)&&X!==te&&(X!=null||te!=null))switch(L){case"selected":e.selected=X&&typeof X!="function"&&typeof X!="symbol";break;default:dt(e,t,L,X,l,te)}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)X=a[Ae],a.hasOwnProperty(Ae)&&X!=null&&!l.hasOwnProperty(Ae)&&dt(e,t,Ae,null,l,X);for(I in l)if(X=l[I],te=a[I],l.hasOwnProperty(I)&&X!==te&&(X!=null||te!=null))switch(I){case"children":case"dangerouslySetInnerHTML":if(X!=null)throw Error(o(137,t));break;default:dt(e,t,I,X,l,te)}return;default:if(ar(t)){for(var ft in a)X=a[ft],a.hasOwnProperty(ft)&&X!==void 0&&!l.hasOwnProperty(ft)&&sf(e,t,ft,void 0,l,X);for(re in l)X=l[re],te=a[re],!l.hasOwnProperty(re)||X===te||X===void 0&&te===void 0||sf(e,t,re,X,l,te);return}}for(var F in a)X=a[F],a.hasOwnProperty(F)&&X!=null&&!l.hasOwnProperty(F)&&dt(e,t,F,null,l,X);for(ce in l)X=l[ce],te=a[ce],!l.hasOwnProperty(ce)||X===te||X==null&&te==null||dt(e,t,ce,X,l,te)}function q0(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function Yv(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,a=performance.getEntriesByType("resource"),l=0;l<a.length;l++){var c=a[l],d=c.transferSize,p=c.initiatorType,T=c.duration;if(d&&T&&q0(p)){for(p=0,T=c.responseEnd,l+=1;l<a.length;l++){var L=a[l],I=L.startTime;if(I>T)break;var re=L.transferSize,ce=L.initiatorType;re&&q0(ce)&&(L=L.responseEnd,p+=re*(L<T?1:(T-I)/(L-I)))}if(--l,t+=8*(d+p)/(c.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var rf=null,cf=null;function Ao(e){return e.nodeType===9?e:e.ownerDocument}function V0(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 B0(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 of(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 uf=null;function Gv(){var e=window.event;return e&&e.type==="popstate"?e===uf?!1:(uf=e,!0):(uf=null,!1)}var P0=typeof setTimeout=="function"?setTimeout:void 0,Fv=typeof clearTimeout=="function"?clearTimeout:void 0,$0=typeof Promise=="function"?Promise:void 0,Zv=typeof queueMicrotask=="function"?queueMicrotask:typeof $0<"u"?function(e){return $0.resolve(null).then(e).catch(Wv)}:P0;function Wv(e){setTimeout(function(){throw e})}function Pl(e){return e==="head"}function Y0(e,t){var a=t,l=0;do{var c=a.nextSibling;if(e.removeChild(a),c&&c.nodeType===8)if(a=c.data,a==="/$"||a==="/&"){if(l===0){e.removeChild(c),Hr(t);return}l--}else if(a==="$"||a==="$?"||a==="$~"||a==="$!"||a==="&")l++;else if(a==="html")Pi(e.ownerDocument.documentElement);else if(a==="head"){a=e.ownerDocument.head,Pi(a);for(var d=a.firstChild;d;){var p=d.nextSibling,T=d.nodeName;d[ns]||T==="SCRIPT"||T==="STYLE"||T==="LINK"&&d.rel.toLowerCase()==="stylesheet"||a.removeChild(d),d=p}}else a==="body"&&Pi(e.ownerDocument.body);a=c}while(a);Hr(t)}function G0(e,t){var a=e;e=0;do{var l=a.nextSibling;if(a.nodeType===1?t?(a._stashedDisplay=a.style.display,a.style.display="none"):(a.style.display=a._stashedDisplay||"",a.getAttribute("style")===""&&a.removeAttribute("style")):a.nodeType===3&&(t?(a._stashedText=a.nodeValue,a.nodeValue=""):a.nodeValue=a._stashedText||""),l&&l.nodeType===8)if(a=l.data,a==="/$"){if(e===0)break;e--}else a!=="$"&&a!=="$?"&&a!=="$~"&&a!=="$!"||e++;a=l}while(a)}function df(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":df(a),Js(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}e.removeChild(a)}}function Iv(e,t,a,l){for(;e.nodeType===1;){var c=a;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!l&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(l){if(!e[ns])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(d=e.getAttribute("rel"),d==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(d!==c.rel||e.getAttribute("href")!==(c.href==null||c.href===""?null:c.href)||e.getAttribute("crossorigin")!==(c.crossOrigin==null?null:c.crossOrigin)||e.getAttribute("title")!==(c.title==null?null:c.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(d=e.getAttribute("src"),(d!==(c.src==null?null:c.src)||e.getAttribute("type")!==(c.type==null?null:c.type)||e.getAttribute("crossorigin")!==(c.crossOrigin==null?null:c.crossOrigin))&&d&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var d=c.name==null?null:""+c.name;if(c.type==="hidden"&&e.getAttribute("name")===d)return e}else return e;if(e=Ja(e.nextSibling),e===null)break}return null}function Qv(e,t,a){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!a||(e=Ja(e.nextSibling),e===null))return null;return e}function F0(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=Ja(e.nextSibling),e===null))return null;return e}function ff(e){return e.data==="$?"||e.data==="$~"}function hf(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function Xv(e,t){var a=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||a.readyState!=="loading")t();else{var l=function(){t(),a.removeEventListener("DOMContentLoaded",l)};a.addEventListener("DOMContentLoaded",l),e._reactRetry=l}}function Ja(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 mf=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 Ja(e.nextSibling);t--}else a!=="$"&&a!=="$!"&&a!=="$?"&&a!=="$~"&&a!=="&"||t++}e=e.nextSibling}return null}function W0(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 I0(e,t,a){switch(t=Ao(a),e){case"html":if(e=t.documentElement,!e)throw Error(o(452));return e;case"head":if(e=t.head,!e)throw Error(o(453));return e;case"body":if(e=t.body,!e)throw Error(o(454));return e;default:throw Error(o(451))}}function Pi(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Js(e)}var Ka=new Map,Q0=new Set;function _o(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var al=ne.d;ne.d={f:Jv,r:Kv,D:ey,C:ty,L:ay,m:ny,X:sy,S:ly,M:ry};function Jv(){var e=al.f(),t=Eo();return e||t}function Kv(e){var t=De(e);t!==null&&t.tag===5&&t.type==="form"?hm(t):al.r(e)}var zr=typeof document>"u"?null:document;function X0(e,t,a){var l=zr;if(l&&typeof t=="string"&&t){var c=Kt(t);c='link[rel="'+e+'"][href="'+c+'"]',typeof a=="string"&&(c+='[crossorigin="'+a+'"]'),Q0.has(c)||(Q0.add(c),e={rel:e,crossOrigin:a,href:t},l.querySelector(c)===null&&(t=l.createElement("link"),la(t,"link",e),Lt(t),l.head.appendChild(t)))}}function ey(e){al.D(e),X0("dns-prefetch",e,null)}function ty(e,t){al.C(e,t),X0("preconnect",e,t)}function ay(e,t,a){al.L(e,t,a);var l=zr;if(l&&e&&t){var c='link[rel="preload"][as="'+Kt(t)+'"]';t==="image"&&a&&a.imageSrcSet?(c+='[imagesrcset="'+Kt(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(c+='[imagesizes="'+Kt(a.imageSizes)+'"]')):c+='[href="'+Kt(e)+'"]';var d=c;switch(t){case"style":d=Lr(e);break;case"script":d=Ur(e)}Ka.has(d)||(e=C({rel:"preload",href:t==="image"&&a&&a.imageSrcSet?void 0:e,as:t},a),Ka.set(d,e),l.querySelector(c)!==null||t==="style"&&l.querySelector($i(d))||t==="script"&&l.querySelector(Yi(d))||(t=l.createElement("link"),la(t,"link",e),Lt(t),l.head.appendChild(t)))}}function ny(e,t){al.m(e,t);var a=zr;if(a&&e){var l=t&&typeof t.as=="string"?t.as:"script",c='link[rel="modulepreload"][as="'+Kt(l)+'"][href="'+Kt(e)+'"]',d=c;switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":d=Ur(e)}if(!Ka.has(d)&&(e=C({rel:"modulepreload",href:e},t),Ka.set(d,e),a.querySelector(c)===null)){switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(Yi(d)))return}l=a.createElement("link"),la(l,"link",e),Lt(l),a.head.appendChild(l)}}}function ly(e,t,a){al.S(e,t,a);var l=zr;if(l&&e){var c=ln(l).hoistableStyles,d=Lr(e);t=t||"default";var p=c.get(d);if(!p){var T={loading:0,preload:null};if(p=l.querySelector($i(d)))T.loading=5;else{e=C({rel:"stylesheet",href:e,"data-precedence":t},a),(a=Ka.get(d))&&gf(e,a);var L=p=l.createElement("link");Lt(L),la(L,"link",e),L._p=new Promise(function(I,re){L.onload=I,L.onerror=re}),L.addEventListener("load",function(){T.loading|=1}),L.addEventListener("error",function(){T.loading|=2}),T.loading|=4,zo(p,t,l)}p={type:"stylesheet",instance:p,count:1,state:T},c.set(d,p)}}}function sy(e,t){al.X(e,t);var a=zr;if(a&&e){var l=ln(a).hoistableScripts,c=Ur(e),d=l.get(c);d||(d=a.querySelector(Yi(c)),d||(e=C({src:e,async:!0},t),(t=Ka.get(c))&&xf(e,t),d=a.createElement("script"),Lt(d),la(d,"link",e),a.head.appendChild(d)),d={type:"script",instance:d,count:1,state:null},l.set(c,d))}}function ry(e,t){al.M(e,t);var a=zr;if(a&&e){var l=ln(a).hoistableScripts,c=Ur(e),d=l.get(c);d||(d=a.querySelector(Yi(c)),d||(e=C({src:e,async:!0,type:"module"},t),(t=Ka.get(c))&&xf(e,t),d=a.createElement("script"),Lt(d),la(d,"link",e),a.head.appendChild(d)),d={type:"script",instance:d,count:1,state:null},l.set(c,d))}}function J0(e,t,a,l){var c=(c=xe.current)?_o(c):null;if(!c)throw Error(o(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=ln(c).hoistableStyles,l=a.get(t),l||(l={type:"style",instance:null,count:0,state:null},a.set(t,l)),l):{type:"void",instance:null,count:0,state:null};case"link":if(a.rel==="stylesheet"&&typeof a.href=="string"&&typeof a.precedence=="string"){e=Lr(a.href);var d=ln(c).hoistableStyles,p=d.get(e);if(p||(c=c.ownerDocument||c,p={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},d.set(e,p),(d=c.querySelector($i(e)))&&!d._p&&(p.instance=d,p.state.loading=5),Ka.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},Ka.set(e,a),d||iy(c,e,a,p.state))),t&&l===null)throw Error(o(528,""));return p}if(t&&l!==null)throw Error(o(529,""));return null;case"script":return t=a.async,a=a.src,typeof a=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Ur(a),a=ln(c).hoistableScripts,l=a.get(t),l||(l={type:"script",instance:null,count:0,state:null},a.set(t,l)),l):{type:"void",instance:null,count:0,state:null};default:throw Error(o(444,e))}}function Lr(e){return'href="'+Kt(e)+'"'}function $i(e){return'link[rel="stylesheet"]['+e+"]"}function K0(e){return C({},e,{"data-precedence":e.precedence,precedence:null})}function iy(e,t,a,l){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?l.loading=1:(t=e.createElement("link"),l.preload=t,t.addEventListener("load",function(){return l.loading|=1}),t.addEventListener("error",function(){return l.loading|=2}),la(t,"link",a),Lt(t),e.head.appendChild(t))}function Ur(e){return'[src="'+Kt(e)+'"]'}function Yi(e){return"script[async]"+e}function eg(e,t,a){if(t.count++,t.instance===null)switch(t.type){case"style":var l=e.querySelector('style[data-href~="'+Kt(a.href)+'"]');if(l)return t.instance=l,Lt(l),l;var c=C({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return l=(e.ownerDocument||e).createElement("style"),Lt(l),la(l,"style",c),zo(l,a.precedence,e),t.instance=l;case"stylesheet":c=Lr(a.href);var d=e.querySelector($i(c));if(d)return t.state.loading|=4,t.instance=d,Lt(d),d;l=K0(a),(c=Ka.get(c))&&gf(l,c),d=(e.ownerDocument||e).createElement("link"),Lt(d);var p=d;return p._p=new Promise(function(T,L){p.onload=T,p.onerror=L}),la(d,"link",l),t.state.loading|=4,zo(d,a.precedence,e),t.instance=d;case"script":return d=Ur(a.src),(c=e.querySelector(Yi(d)))?(t.instance=c,Lt(c),c):(l=a,(c=Ka.get(d))&&(l=C({},a),xf(l,c)),e=e.ownerDocument||e,c=e.createElement("script"),Lt(c),la(c,"link",l),e.head.appendChild(c),t.instance=c);case"void":return null;default:throw Error(o(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(l=t.instance,t.state.loading|=4,zo(l,a.precedence,e));return t.instance}function zo(e,t,a){for(var l=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),c=l.length?l[l.length-1]:null,d=c,p=0;p<l.length;p++){var T=l[p];if(T.dataset.precedence===t)d=T;else if(d!==c)break}d?d.parentNode.insertBefore(e,d.nextSibling):(t=a.nodeType===9?a.head:a,t.insertBefore(e,t.firstChild))}function gf(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function xf(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var Lo=null;function tg(e,t,a){if(Lo===null){var l=new Map,c=Lo=new Map;c.set(a,l)}else c=Lo,l=c.get(a),l||(l=new Map,c.set(a,l));if(l.has(e))return l;for(l.set(e,null),a=a.getElementsByTagName(e),c=0;c<a.length;c++){var d=a[c];if(!(d[ns]||d[Et]||e==="link"&&d.getAttribute("rel")==="stylesheet")&&d.namespaceURI!=="http://www.w3.org/2000/svg"){var p=d.getAttribute(t)||"";p=e+p;var T=l.get(p);T?T.push(d):l.set(p,[d])}}return l}function ag(e,t,a){e=e.ownerDocument||e,e.head.insertBefore(a,t==="title"?e.querySelector("head > title"):null)}function cy(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 ng(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function oy(e,t,a,l){if(a.type==="stylesheet"&&(typeof l.media!="string"||matchMedia(l.media).matches!==!1)&&(a.state.loading&4)===0){if(a.instance===null){var c=Lr(l.href),d=t.querySelector($i(c));if(d){t=d._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=Uo.bind(e),t.then(e,e)),a.state.loading|=4,a.instance=d,Lt(d);return}d=t.ownerDocument||t,l=K0(l),(c=Ka.get(c))&&gf(l,c),d=d.createElement("link"),Lt(d);var p=d;p._p=new Promise(function(T,L){p.onload=T,p.onerror=L}),la(d,"link",l),a.instance=d}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(a,t),(t=a.state.preload)&&(a.state.loading&3)===0&&(e.count++,a=Uo.bind(e),t.addEventListener("load",a),t.addEventListener("error",a))}}var pf=0;function uy(e,t){return e.stylesheets&&e.count===0&&qo(e,e.stylesheets),0<e.count||0<e.imgCount?function(a){var l=setTimeout(function(){if(e.stylesheets&&qo(e,e.stylesheets),e.unsuspend){var d=e.unsuspend;e.unsuspend=null,d()}},6e4+t);0<e.imgBytes&&pf===0&&(pf=62500*Yv());var c=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&qo(e,e.stylesheets),e.unsuspend)){var d=e.unsuspend;e.unsuspend=null,d()}},(e.imgBytes>pf?50:800)+t);return e.unsuspend=a,function(){e.unsuspend=null,clearTimeout(l),clearTimeout(c)}}:null}function Uo(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)qo(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Ho=null;function qo(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Ho=new Map,t.forEach(dy,e),Ho=null,Uo.call(e))}function dy(e,t){if(!(t.state.loading&4)){var a=Ho.get(e);if(a)var l=a.get(null);else{a=new Map,Ho.set(e,a);for(var c=e.querySelectorAll("link[data-precedence],style[data-precedence]"),d=0;d<c.length;d++){var p=c[d];(p.nodeName==="LINK"||p.getAttribute("media")!=="not all")&&(a.set(p.dataset.precedence,p),l=p)}l&&a.set(null,l)}c=t.instance,p=c.getAttribute("data-precedence"),d=a.get(p)||l,d===l&&a.set(null,c),a.set(p,c),this.count++,l=Uo.bind(this),c.addEventListener("load",l),c.addEventListener("error",l),d?d.parentNode.insertBefore(c,d.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(c,e.firstChild)),t.state.loading|=4}}var Gi={$$typeof:Q,Provider:null,Consumer:null,_currentValue:he,_currentValue2:he,_threadCount:0};function fy(e,t,a,l,c,d,p,T,L){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Is(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Is(0),this.hiddenUpdates=Is(null),this.identifierPrefix=l,this.onUncaughtError=c,this.onCaughtError=d,this.onRecoverableError=p,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=L,this.incompleteTransitions=new Map}function lg(e,t,a,l,c,d,p,T,L,I,re,ce){return e=new fy(e,t,a,p,L,I,re,ce,T),t=1,d===!0&&(t|=24),d=ta(3,null,null,t),e.current=d,d.stateNode=e,t=Iu(),t.refCount++,e.pooledCache=t,t.refCount++,d.memoizedState={element:l,isDehydrated:a,cache:t},Ku(d),e}function sg(e){return e?(e=Ra,e):Ra}function rg(e,t,a,l,c,d){c=sg(c),l.context===null?l.context=c:l.pendingContext=c,l=Dl(t),l.payload={element:a},d=d===void 0?null:d,d!==null&&(l.callback=d),a=kl(e,l,t),a!==null&&(Ca(a,e,t),wi(a,e,t))}function ig(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var a=e.retryLane;e.retryLane=a!==0&&a<t?a:t}}function vf(e,t){ig(e,t),(e=e.alternate)&&ig(e,t)}function cg(e){if(e.tag===13||e.tag===31){var t=Ga(e,67108864);t!==null&&Ca(t,e,67108864),vf(e,67108864)}}function og(e){if(e.tag===13||e.tag===31){var t=za();t=Qs(t);var a=Ga(e,t);a!==null&&Ca(a,e,t),vf(e,t)}}var Vo=!0;function hy(e,t,a,l){var c=G.T;G.T=null;var d=ne.p;try{ne.p=2,yf(e,t,a,l)}finally{ne.p=d,G.T=c}}function my(e,t,a,l){var c=G.T;G.T=null;var d=ne.p;try{ne.p=8,yf(e,t,a,l)}finally{ne.p=d,G.T=c}}function yf(e,t,a,l){if(Vo){var c=bf(l);if(c===null)lf(e,t,l,Bo,a),dg(e,l);else if(xy(c,e,t,a,l))l.stopPropagation();else if(dg(e,l),t&4&&-1<gy.indexOf(e)){for(;c!==null;){var d=De(c);if(d!==null)switch(d.tag){case 3:if(d=d.stateNode,d.current.memoizedState.isDehydrated){var p=xa(d.pendingLanes);if(p!==0){var T=d;for(T.pendingLanes|=2,T.entangledLanes|=2;p;){var L=1<<31-zt(p);T.entanglements[1]|=L,p&=~L}On(d),(at&6)===0&&(wo=At()+500,qi(0))}}break;case 31:case 13:T=Ga(d,2),T!==null&&Ca(T,d,2),Eo(),vf(d,2)}if(d=bf(l),d===null&&lf(e,t,l,Bo,a),d===c)break;c=d}c!==null&&l.stopPropagation()}else lf(e,t,l,null,a)}}function bf(e){return e=nr(e),jf(e)}var Bo=null;function jf(e){if(Bo=null,e=zn(e),e!==null){var t=f(e);if(t===null)e=null;else{var a=t.tag;if(a===13){if(e=b(t),e!==null)return e;e=null}else if(a===31){if(e=j(t),e!==null)return e;e=null}else if(a===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return Bo=e,null}function ug(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(ul()){case Zr:return 2;case Zs:return 8;case An:case Ws:return 32;case dl:return 268435456;default:return 32}default:return 32}}var Nf=!1,$l=null,Yl=null,Gl=null,Fi=new Map,Zi=new Map,Fl=[],gy="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 dg(e,t){switch(e){case"focusin":case"focusout":$l=null;break;case"dragenter":case"dragleave":Yl=null;break;case"mouseover":case"mouseout":Gl=null;break;case"pointerover":case"pointerout":Fi.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Zi.delete(t.pointerId)}}function Wi(e,t,a,l,c,d){return e===null||e.nativeEvent!==d?(e={blockedOn:t,domEventName:a,eventSystemFlags:l,nativeEvent:d,targetContainers:[c]},t!==null&&(t=De(t),t!==null&&cg(t)),e):(e.eventSystemFlags|=l,t=e.targetContainers,c!==null&&t.indexOf(c)===-1&&t.push(c),e)}function xy(e,t,a,l,c){switch(t){case"focusin":return $l=Wi($l,e,t,a,l,c),!0;case"dragenter":return Yl=Wi(Yl,e,t,a,l,c),!0;case"mouseover":return Gl=Wi(Gl,e,t,a,l,c),!0;case"pointerover":var d=c.pointerId;return Fi.set(d,Wi(Fi.get(d)||null,e,t,a,l,c)),!0;case"gotpointercapture":return d=c.pointerId,Zi.set(d,Wi(Zi.get(d)||null,e,t,a,l,c)),!0}return!1}function fg(e){var t=zn(e.target);if(t!==null){var a=f(t);if(a!==null){if(t=a.tag,t===13){if(t=b(a),t!==null){e.blockedOn=t,Qr(e.priority,function(){og(a)});return}}else if(t===31){if(t=j(a),t!==null){e.blockedOn=t,Qr(e.priority,function(){og(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 Po(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var a=bf(e.nativeEvent);if(a===null){a=e.nativeEvent;var l=new a.constructor(a.type,a);ti=l,a.target.dispatchEvent(l),ti=null}else return t=De(a),t!==null&&cg(t),e.blockedOn=a,!1;t.shift()}return!0}function hg(e,t,a){Po(e)&&a.delete(t)}function py(){Nf=!1,$l!==null&&Po($l)&&($l=null),Yl!==null&&Po(Yl)&&(Yl=null),Gl!==null&&Po(Gl)&&(Gl=null),Fi.forEach(hg),Zi.forEach(hg)}function $o(e,t){e.blockedOn===t&&(e.blockedOn=null,Nf||(Nf=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,py)))}var Yo=null;function mg(e){Yo!==e&&(Yo=e,n.unstable_scheduleCallback(n.unstable_NormalPriority,function(){Yo===e&&(Yo=null);for(var t=0;t<e.length;t+=3){var a=e[t],l=e[t+1],c=e[t+2];if(typeof l!="function"){if(jf(l||a)===null)continue;break}var d=De(a);d!==null&&(e.splice(t,3),t-=3,yd(d,{pending:!0,data:c,method:a.method,action:l},l,c))}}))}function Hr(e){function t(L){return $o(L,e)}$l!==null&&$o($l,e),Yl!==null&&$o(Yl,e),Gl!==null&&$o(Gl,e),Fi.forEach(t),Zi.forEach(t);for(var a=0;a<Fl.length;a++){var l=Fl[a];l.blockedOn===e&&(l.blockedOn=null)}for(;0<Fl.length&&(a=Fl[0],a.blockedOn===null);)fg(a),a.blockedOn===null&&Fl.shift();if(a=(e.ownerDocument||e).$$reactFormReplay,a!=null)for(l=0;l<a.length;l+=3){var c=a[l],d=a[l+1],p=c[$t]||null;if(typeof d=="function")p||mg(a);else if(p){var T=null;if(d&&d.hasAttribute("formAction")){if(c=d,p=d[$t]||null)T=p.formAction;else if(jf(c)!==null)continue}else T=p.action;typeof T=="function"?a[l+1]=T:(a.splice(l,3),l-=3),mg(a)}}}function gg(){function e(d){d.canIntercept&&d.info==="react-transition"&&d.intercept({handler:function(){return new Promise(function(p){return c=p})},focusReset:"manual",scroll:"manual"})}function t(){c!==null&&(c(),c=null),l||setTimeout(a,20)}function a(){if(!l&&!navigation.transition){var d=navigation.currentEntry;d&&d.url!=null&&navigation.navigate(d.url,{state:d.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var l=!1,c=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(a,100),function(){l=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),c!==null&&(c(),c=null)}}}function wf(e){this._internalRoot=e}Go.prototype.render=wf.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(o(409));var a=t.current,l=za();rg(a,l,e,t,null,null)},Go.prototype.unmount=wf.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;rg(e.current,2,null,e,null,null),Eo(),t[_n]=null}};function Go(e){this._internalRoot=e}Go.prototype.unstable_scheduleHydration=function(e){if(e){var t=Xs();e={blockedOn:null,target:e,priority:t};for(var a=0;a<Fl.length&&t!==0&&t<Fl[a].priority;a++);Fl.splice(a,0,e),a===0&&fg(e)}};var xg=r.version;if(xg!=="19.2.4")throw Error(o(527,xg,"19.2.4"));ne.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(o(188)):(e=Object.keys(e).join(","),Error(o(268,e)));return e=x(t),e=e!==null?S(e):null,e=e===null?null:e.stateNode,e};var vy={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:G,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Fo=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Fo.isDisabled&&Fo.supportsFiber)try{gt=Fo.inject(vy),Bt=Fo}catch{}}return Qi.createRoot=function(e,t){if(!h(e))throw Error(o(299));var a=!1,l="",c=wm,d=Sm,p=Em;return t!=null&&(t.unstable_strictMode===!0&&(a=!0),t.identifierPrefix!==void 0&&(l=t.identifierPrefix),t.onUncaughtError!==void 0&&(c=t.onUncaughtError),t.onCaughtError!==void 0&&(d=t.onCaughtError),t.onRecoverableError!==void 0&&(p=t.onRecoverableError)),t=lg(e,1,!1,null,null,a,l,null,c,d,p,gg),e[_n]=t.current,nf(e),new wf(t)},Qi.hydrateRoot=function(e,t,a){if(!h(e))throw Error(o(299));var l=!1,c="",d=wm,p=Sm,T=Em,L=null;return a!=null&&(a.unstable_strictMode===!0&&(l=!0),a.identifierPrefix!==void 0&&(c=a.identifierPrefix),a.onUncaughtError!==void 0&&(d=a.onUncaughtError),a.onCaughtError!==void 0&&(p=a.onCaughtError),a.onRecoverableError!==void 0&&(T=a.onRecoverableError),a.formState!==void 0&&(L=a.formState)),t=lg(e,1,!0,t,a??null,l,c,L,d,p,T,gg),t.context=sg(null),a=t.current,l=za(),l=Qs(l),c=Dl(l),c.callback=null,kl(a,c,l),a=l,t.current.lanes=a,ml(t,a),On(t),e[_n]=t.current,nf(e),new Go(t)},Qi.version="19.2.4",Qi}var Mg;function Ry(){if(Mg)return Cf.exports;Mg=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(r){console.error(r)}}return n(),Cf.exports=Oy(),Cf.exports}var Dy=Ry();const ky=Kf(Dy);/**
|
|
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 Og="popstate";function Ay(n={}){function r(h,f){let{pathname:b="/",search:j="",hash:y=""}=Ys(h.location.hash.substring(1));return!b.startsWith("/")&&!b.startsWith(".")&&(b="/"+b),Pf("",{pathname:b,search:j,hash:y},f.state&&f.state.usr||null,f.state&&f.state.key||"default")}function u(h,f){let b=h.document.querySelector("base"),j="";if(b&&b.getAttribute("href")){let y=h.location.href,x=y.indexOf("#");j=x===-1?y:y.slice(0,x)}return j+"#"+(typeof f=="string"?f:fc(f))}function o(h,f){en(h.pathname.charAt(0)==="/",`relative pathnames are not supported in hash history.push(${JSON.stringify(f)})`)}return zy(r,u,o,n)}function yt(n,r){if(n===!1||n===null||typeof n>"u")throw new Error(r)}function en(n,r){if(!n){typeof console<"u"&&console.warn(r);try{throw new Error(r)}catch{}}}function _y(){return Math.random().toString(36).substring(2,10)}function Rg(n,r){return{usr:n.state,key:n.key,idx:r}}function Pf(n,r,u=null,o){return{pathname:typeof n=="string"?n:n.pathname,search:"",hash:"",...typeof r=="string"?Ys(r):r,state:u,key:r&&r.key||o||_y()}}function fc({pathname:n="/",search:r="",hash:u=""}){return r&&r!=="?"&&(n+=r.charAt(0)==="?"?r:"?"+r),u&&u!=="#"&&(n+=u.charAt(0)==="#"?u:"#"+u),n}function Ys(n){let r={};if(n){let u=n.indexOf("#");u>=0&&(r.hash=n.substring(u),n=n.substring(0,u));let o=n.indexOf("?");o>=0&&(r.search=n.substring(o),n=n.substring(0,o)),n&&(r.pathname=n)}return r}function zy(n,r,u,o={}){let{window:h=document.defaultView,v5Compat:f=!1}=o,b=h.history,j="POP",y=null,x=S();x==null&&(x=0,b.replaceState({...b.state,idx:x},""));function S(){return(b.state||{idx:null}).idx}function C(){j="POP";let k=S(),P=k==null?null:k-x;x=k,y&&y({action:j,location:O.location,delta:P})}function z(k,P){j="PUSH";let D=Pf(O.location,k,P);u&&u(D,k),x=S()+1;let Q=Rg(D,x),w=O.createHref(D);try{b.pushState(Q,"",w)}catch(K){if(K instanceof DOMException&&K.name==="DataCloneError")throw K;h.location.assign(w)}f&&y&&y({action:j,location:O.location,delta:1})}function _(k,P){j="REPLACE";let D=Pf(O.location,k,P);u&&u(D,k),x=S();let Q=Rg(D,x),w=O.createHref(D);b.replaceState(Q,"",w),f&&y&&y({action:j,location:O.location,delta:0})}function N(k){return Ly(k)}let O={get action(){return j},get location(){return n(h,b)},listen(k){if(y)throw new Error("A history only accepts one active listener");return h.addEventListener(Og,C),y=k,()=>{h.removeEventListener(Og,C),y=null}},createHref(k){return r(h,k)},createURL:N,encodeLocation(k){let P=N(k);return{pathname:P.pathname,search:P.search,hash:P.hash}},push:z,replace:_,go(k){return b.go(k)}};return O}function Ly(n,r=!1){let u="http://localhost";typeof window<"u"&&(u=window.location.origin!=="null"?window.location.origin:window.location.href),yt(u,"No window.location.(origin|href) available to create URL");let o=typeof n=="string"?n:fc(n);return o=o.replace(/ $/,"%20"),!r&&o.startsWith("//")&&(o=u+o),new URL(o,u)}function Hx(n,r,u="/"){return Uy(n,r,u,!1)}function Uy(n,r,u,o){let h=typeof r=="string"?Ys(r):r,f=ol(h.pathname||"/",u);if(f==null)return null;let b=qx(n);Hy(b);let j=null;for(let y=0;j==null&&y<b.length;++y){let x=Iy(f);j=Zy(b[y],x,o)}return j}function qx(n,r=[],u=[],o="",h=!1){let f=(b,j,y=h,x)=>{let S={relativePath:x===void 0?b.path||"":x,caseSensitive:b.caseSensitive===!0,childrenIndex:j,route:b};if(S.relativePath.startsWith("/")){if(!S.relativePath.startsWith(o)&&y)return;yt(S.relativePath.startsWith(o),`Absolute route path "${S.relativePath}" nested under path "${o}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),S.relativePath=S.relativePath.slice(o.length)}let C=cl([o,S.relativePath]),z=u.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 "${C}".`),qx(b.children,r,z,C,y)),!(b.path==null&&!b.index)&&r.push({path:C,score:Gy(C,b.index),routesMeta:z})};return n.forEach((b,j)=>{var y;if(b.path===""||!((y=b.path)!=null&&y.includes("?")))f(b,j);else for(let x of Vx(b.path))f(b,j,!0,x)}),r}function Vx(n){let r=n.split("/");if(r.length===0)return[];let[u,...o]=r,h=u.endsWith("?"),f=u.replace(/\?$/,"");if(o.length===0)return h?[f,""]:[f];let b=Vx(o.join("/")),j=[];return j.push(...b.map(y=>y===""?f:[f,y].join("/"))),h&&j.push(...b),j.map(y=>n.startsWith("/")&&y===""?"/":y)}function Hy(n){n.sort((r,u)=>r.score!==u.score?u.score-r.score:Fy(r.routesMeta.map(o=>o.childrenIndex),u.routesMeta.map(o=>o.childrenIndex)))}var qy=/^:[\w-]+$/,Vy=3,By=2,Py=1,$y=10,Yy=-2,Dg=n=>n==="*";function Gy(n,r){let u=n.split("/"),o=u.length;return u.some(Dg)&&(o+=Yy),r&&(o+=By),u.filter(h=>!Dg(h)).reduce((h,f)=>h+(qy.test(f)?Vy:f===""?Py:$y),o)}function Fy(n,r){return n.length===r.length&&n.slice(0,-1).every((o,h)=>o===r[h])?n[n.length-1]-r[r.length-1]:0}function Zy(n,r,u=!1){let{routesMeta:o}=n,h={},f="/",b=[];for(let j=0;j<o.length;++j){let y=o[j],x=j===o.length-1,S=f==="/"?r:r.slice(f.length)||"/",C=iu({path:y.relativePath,caseSensitive:y.caseSensitive,end:x},S),z=y.route;if(!C&&x&&u&&!o[o.length-1].route.index&&(C=iu({path:y.relativePath,caseSensitive:y.caseSensitive,end:!1},S)),!C)return null;Object.assign(h,C.params),b.push({params:h,pathname:cl([f,C.pathname]),pathnameBase:Ky(cl([f,C.pathnameBase])),route:z}),C.pathnameBase!=="/"&&(f=cl([f,C.pathnameBase]))}return b}function iu(n,r){typeof n=="string"&&(n={path:n,caseSensitive:!1,end:!0});let[u,o]=Wy(n.path,n.caseSensitive,n.end),h=r.match(u);if(!h)return null;let f=h[0],b=f.replace(/(.)\/+$/,"$1"),j=h.slice(1);return{params:o.reduce((x,{paramName:S,isOptional:C},z)=>{if(S==="*"){let N=j[z]||"";b=f.slice(0,f.length-N.length).replace(/(.)\/+$/,"$1")}const _=j[z];return C&&!_?x[S]=void 0:x[S]=(_||"").replace(/%2F/g,"/"),x},{}),pathname:f,pathnameBase:b,pattern:n}}function Wy(n,r=!1,u=!0){en(n==="*"||!n.endsWith("*")||n.endsWith("/*"),`Route path "${n}" will be treated as if it were "${n.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${n.replace(/\*$/,"/*")}".`);let o=[],h="^"+n.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(b,j,y)=>(o.push({paramName:j,isOptional:y!=null}),y?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return n.endsWith("*")?(o.push({paramName:"*"}),h+=n==="*"||n==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):u?h+="\\/*$":n!==""&&n!=="/"&&(h+="(?:(?=\\/|$))"),[new RegExp(h,r?void 0:"i"),o]}function Iy(n){try{return n.split("/").map(r=>decodeURIComponent(r).replace(/\//g,"%2F")).join("/")}catch(r){return en(!1,`The URL path "${n}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${r}).`),n}}function ol(n,r){if(r==="/")return n;if(!n.toLowerCase().startsWith(r.toLowerCase()))return null;let u=r.endsWith("/")?r.length-1:r.length,o=n.charAt(u);return o&&o!=="/"?null:n.slice(u)||"/"}var Qy=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function Xy(n,r="/"){let{pathname:u,search:o="",hash:h=""}=typeof n=="string"?Ys(n):n,f;return u?(u=u.replace(/\/\/+/g,"/"),u.startsWith("/")?f=kg(u.substring(1),"/"):f=kg(u,r)):f=r,{pathname:f,search:eb(o),hash:tb(h)}}function kg(n,r){let u=r.replace(/\/+$/,"").split("/");return n.split("/").forEach(h=>{h===".."?u.length>1&&u.pop():h!=="."&&u.push(h)}),u.length>1?u.join("/"):"/"}function Df(n,r,u,o){return`Cannot include a '${n}' character in a manually specified \`to.${r}\` field [${JSON.stringify(o)}]. Please separate it out to the \`to.${u}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function Jy(n){return n.filter((r,u)=>u===0||r.route.path&&r.route.path.length>0)}function th(n){let r=Jy(n);return r.map((u,o)=>o===r.length-1?u.pathname:u.pathnameBase)}function ah(n,r,u,o=!1){let h;typeof n=="string"?h=Ys(n):(h={...n},yt(!h.pathname||!h.pathname.includes("?"),Df("?","pathname","search",h)),yt(!h.pathname||!h.pathname.includes("#"),Df("#","pathname","hash",h)),yt(!h.search||!h.search.includes("#"),Df("#","search","hash",h)));let f=n===""||h.pathname==="",b=f?"/":h.pathname,j;if(b==null)j=u;else{let C=r.length-1;if(!o&&b.startsWith("..")){let z=b.split("/");for(;z[0]==="..";)z.shift(),C-=1;h.pathname=z.join("/")}j=C>=0?r[C]:"/"}let y=Xy(h,j),x=b&&b!=="/"&&b.endsWith("/"),S=(f||b===".")&&u.endsWith("/");return!y.pathname.endsWith("/")&&(x||S)&&(y.pathname+="/"),y}var cl=n=>n.join("/").replace(/\/\/+/g,"/"),Ky=n=>n.replace(/\/+$/,"").replace(/^\/*/,"/"),eb=n=>!n||n==="?"?"":n.startsWith("?")?n:"?"+n,tb=n=>!n||n==="#"?"":n.startsWith("#")?n:"#"+n,ab=class{constructor(n,r,u,o=!1){this.status=n,this.statusText=r||"",this.internal=o,u instanceof Error?(this.data=u.toString(),this.error=u):this.data=u}};function nb(n){return n!=null&&typeof n.status=="number"&&typeof n.statusText=="string"&&typeof n.internal=="boolean"&&"data"in n}function lb(n){return n.map(r=>r.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var Bx=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Px(n,r){let u=n;if(typeof u!="string"||!Qy.test(u))return{absoluteURL:void 0,isExternal:!1,to:u};let o=u,h=!1;if(Bx)try{let f=new URL(window.location.href),b=u.startsWith("//")?new URL(f.protocol+u):new URL(u),j=ol(b.pathname,r);b.origin===f.origin&&j!=null?u=j+b.search+b.hash:h=!0}catch{en(!1,`<Link to="${u}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:o,isExternal:h,to:u}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var $x=["POST","PUT","PATCH","DELETE"];new Set($x);var sb=["GET",...$x];new Set(sb);var $r=U.createContext(null);$r.displayName="DataRouter";var mu=U.createContext(null);mu.displayName="DataRouterState";var rb=U.createContext(!1),Yx=U.createContext({isTransitioning:!1});Yx.displayName="ViewTransition";var ib=U.createContext(new Map);ib.displayName="Fetchers";var cb=U.createContext(null);cb.displayName="Await";var qa=U.createContext(null);qa.displayName="Navigation";var pc=U.createContext(null);pc.displayName="Location";var Rn=U.createContext({outlet:null,matches:[],isDataRoute:!1});Rn.displayName="Route";var nh=U.createContext(null);nh.displayName="RouteError";var Gx="REACT_ROUTER_ERROR",ob="REDIRECT",ub="ROUTE_ERROR_RESPONSE";function db(n){if(n.startsWith(`${Gx}:${ob}:{`))try{let r=JSON.parse(n.slice(28));if(typeof r=="object"&&r&&typeof r.status=="number"&&typeof r.statusText=="string"&&typeof r.location=="string"&&typeof r.reloadDocument=="boolean"&&typeof r.replace=="boolean")return r}catch{}}function fb(n){if(n.startsWith(`${Gx}:${ub}:{`))try{let r=JSON.parse(n.slice(40));if(typeof r=="object"&&r&&typeof r.status=="number"&&typeof r.statusText=="string")return new ab(r.status,r.statusText,r.data)}catch{}}function hb(n,{relative:r}={}){yt(Yr(),"useHref() may be used only in the context of a <Router> component.");let{basename:u,navigator:o}=U.useContext(qa),{hash:h,pathname:f,search:b}=vc(n,{relative:r}),j=f;return u!=="/"&&(j=f==="/"?u:cl([u,f])),o.createHref({pathname:j,search:b,hash:h})}function Yr(){return U.useContext(pc)!=null}function Dn(){return yt(Yr(),"useLocation() may be used only in the context of a <Router> component."),U.useContext(pc).location}var Fx="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Zx(n){U.useContext(qa).static||U.useLayoutEffect(n)}function gu(){let{isDataRoute:n}=U.useContext(Rn);return n?Tb():mb()}function mb(){yt(Yr(),"useNavigate() may be used only in the context of a <Router> component.");let n=U.useContext($r),{basename:r,navigator:u}=U.useContext(qa),{matches:o}=U.useContext(Rn),{pathname:h}=Dn(),f=JSON.stringify(th(o)),b=U.useRef(!1);return Zx(()=>{b.current=!0}),U.useCallback((y,x={})=>{if(en(b.current,Fx),!b.current)return;if(typeof y=="number"){u.go(y);return}let S=ah(y,JSON.parse(f),h,x.relative==="path");n==null&&r!=="/"&&(S.pathname=S.pathname==="/"?r:cl([r,S.pathname])),(x.replace?u.replace:u.push)(S,x.state,x)},[r,u,f,h,n])}U.createContext(null);function vc(n,{relative:r}={}){let{matches:u}=U.useContext(Rn),{pathname:o}=Dn(),h=JSON.stringify(th(u));return U.useMemo(()=>ah(n,JSON.parse(h),o,r==="path"),[n,h,o,r])}function gb(n,r){return Wx(n,r)}function Wx(n,r,u,o,h){var D;yt(Yr(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:f}=U.useContext(qa),{matches:b}=U.useContext(Rn),j=b[b.length-1],y=j?j.params:{},x=j?j.pathname:"/",S=j?j.pathnameBase:"/",C=j&&j.route;{let Q=C&&C.path||"";Qx(x,!C||Q.endsWith("*")||Q.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${x}" (under <Route path="${Q}">) 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="${Q}"> to <Route path="${Q==="/"?"*":`${Q}/*`}">.`)}let z=Dn(),_;if(r){let Q=typeof r=="string"?Ys(r):r;yt(S==="/"||((D=Q.pathname)==null?void 0:D.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 "${Q.pathname}" was given in the \`location\` prop.`),_=Q}else _=z;let N=_.pathname||"/",O=N;if(S!=="/"){let Q=S.replace(/^\//,"").split("/");O="/"+N.replace(/^\//,"").split("/").slice(Q.length).join("/")}let k=Hx(n,{pathname:O});en(C||k!=null,`No routes matched location "${_.pathname}${_.search}${_.hash}" `),en(k==null||k[k.length-1].route.element!==void 0||k[k.length-1].route.Component!==void 0||k[k.length-1].route.lazy!==void 0,`Matched leaf route at location "${_.pathname}${_.search}${_.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let P=bb(k&&k.map(Q=>Object.assign({},Q,{params:Object.assign({},y,Q.params),pathname:cl([S,f.encodeLocation?f.encodeLocation(Q.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:Q.pathname]),pathnameBase:Q.pathnameBase==="/"?S:cl([S,f.encodeLocation?f.encodeLocation(Q.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:Q.pathnameBase])})),b,u,o,h);return r&&P?U.createElement(pc.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",..._},navigationType:"POP"}},P):P}function xb(){let n=Eb(),r=nb(n)?`${n.status} ${n.statusText}`:n instanceof Error?n.message:JSON.stringify(n),u=n instanceof Error?n.stack:null,o="rgba(200,200,200, 0.5)",h={padding:"0.5rem",backgroundColor:o},f={padding:"2px 4px",backgroundColor:o},b=null;return console.error("Error handled by React Router default ErrorBoundary:",n),b=U.createElement(U.Fragment,null,U.createElement("p",null,"💿 Hey developer 👋"),U.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",U.createElement("code",{style:f},"ErrorBoundary")," or"," ",U.createElement("code",{style:f},"errorElement")," prop on your route.")),U.createElement(U.Fragment,null,U.createElement("h2",null,"Unexpected Application Error!"),U.createElement("h3",{style:{fontStyle:"italic"}},r),u?U.createElement("pre",{style:h},u):null,b)}var pb=U.createElement(xb,null),Ix=class extends U.Component{constructor(n){super(n),this.state={location:n.location,revalidation:n.revalidation,error:n.error}}static getDerivedStateFromError(n){return{error:n}}static getDerivedStateFromProps(n,r){return r.location!==n.location||r.revalidation!=="idle"&&n.revalidation==="idle"?{error:n.error,location:n.location,revalidation:n.revalidation}:{error:n.error!==void 0?n.error:r.error,location:r.location,revalidation:n.revalidation||r.revalidation}}componentDidCatch(n,r){this.props.onError?this.props.onError(n,r):console.error("React Router caught the following error during render",n)}render(){let n=this.state.error;if(this.context&&typeof n=="object"&&n&&"digest"in n&&typeof n.digest=="string"){const u=fb(n.digest);u&&(n=u)}let r=n!==void 0?U.createElement(Rn.Provider,{value:this.props.routeContext},U.createElement(nh.Provider,{value:n,children:this.props.component})):this.props.children;return this.context?U.createElement(vb,{error:n},r):r}};Ix.contextType=rb;var kf=new WeakMap;function vb({children:n,error:r}){let{basename:u}=U.useContext(qa);if(typeof r=="object"&&r&&"digest"in r&&typeof r.digest=="string"){let o=db(r.digest);if(o){let h=kf.get(r);if(h)throw h;let f=Px(o.location,u);if(Bx&&!kf.get(r))if(f.isExternal||o.reloadDocument)window.location.href=f.absoluteURL||f.to;else{const b=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(f.to,{replace:o.replace}));throw kf.set(r,b),b}return U.createElement("meta",{httpEquiv:"refresh",content:`0;url=${f.absoluteURL||f.to}`})}}return n}function yb({routeContext:n,match:r,children:u}){let o=U.useContext($r);return o&&o.static&&o.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(o.staticContext._deepestRenderedBoundaryId=r.route.id),U.createElement(Rn.Provider,{value:n},u)}function bb(n,r=[],u=null,o=null,h=null){if(n==null){if(!u)return null;if(u.errors)n=u.matches;else if(r.length===0&&!u.initialized&&u.matches.length>0)n=u.matches;else return null}let f=n,b=u==null?void 0:u.errors;if(b!=null){let S=f.findIndex(C=>C.route.id&&(b==null?void 0:b[C.route.id])!==void 0);yt(S>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(b).join(",")}`),f=f.slice(0,Math.min(f.length,S+1))}let j=!1,y=-1;if(u)for(let S=0;S<f.length;S++){let C=f[S];if((C.route.HydrateFallback||C.route.hydrateFallbackElement)&&(y=S),C.route.id){let{loaderData:z,errors:_}=u,N=C.route.loader&&!z.hasOwnProperty(C.route.id)&&(!_||_[C.route.id]===void 0);if(C.route.lazy||N){j=!0,y>=0?f=f.slice(0,y+1):f=[f[0]];break}}}let x=u&&o?(S,C)=>{var z,_;o(S,{location:u.location,params:((_=(z=u.matches)==null?void 0:z[0])==null?void 0:_.params)??{},unstable_pattern:lb(u.matches),errorInfo:C})}:void 0;return f.reduceRight((S,C,z)=>{let _,N=!1,O=null,k=null;u&&(_=b&&C.route.id?b[C.route.id]:void 0,O=C.route.errorElement||pb,j&&(y<0&&z===0?(Qx("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),N=!0,k=null):y===z&&(N=!0,k=C.route.hydrateFallbackElement||null)));let P=r.concat(f.slice(0,z+1)),D=()=>{let Q;return _?Q=O:N?Q=k:C.route.Component?Q=U.createElement(C.route.Component,null):C.route.element?Q=C.route.element:Q=S,U.createElement(yb,{match:C,routeContext:{outlet:S,matches:P,isDataRoute:u!=null},children:Q})};return u&&(C.route.ErrorBoundary||C.route.errorElement||z===0)?U.createElement(Ix,{location:u.location,revalidation:u.revalidation,component:O,error:_,children:D(),routeContext:{outlet:null,matches:P,isDataRoute:!0},onError:x}):D()},null)}function lh(n){return`${n} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function jb(n){let r=U.useContext($r);return yt(r,lh(n)),r}function Nb(n){let r=U.useContext(mu);return yt(r,lh(n)),r}function wb(n){let r=U.useContext(Rn);return yt(r,lh(n)),r}function sh(n){let r=wb(n),u=r.matches[r.matches.length-1];return yt(u.route.id,`${n} can only be used on routes that contain a unique "id"`),u.route.id}function Sb(){return sh("useRouteId")}function Eb(){var o;let n=U.useContext(nh),r=Nb("useRouteError"),u=sh("useRouteError");return n!==void 0?n:(o=r.errors)==null?void 0:o[u]}function Tb(){let{router:n}=jb("useNavigate"),r=sh("useNavigate"),u=U.useRef(!1);return Zx(()=>{u.current=!0}),U.useCallback(async(h,f={})=>{en(u.current,Fx),u.current&&(typeof h=="number"?await n.navigate(h):await n.navigate(h,{fromRouteId:r,...f}))},[n,r])}var Ag={};function Qx(n,r,u){!r&&!Ag[n]&&(Ag[n]=!0,en(!1,u))}U.memo(Cb);function Cb({routes:n,future:r,state:u,onError:o}){return Wx(n,void 0,u,o,r)}function Mb({to:n,replace:r,state:u,relative:o}){yt(Yr(),"<Navigate> may be used only in the context of a <Router> component.");let{static:h}=U.useContext(qa);en(!h,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:f}=U.useContext(Rn),{pathname:b}=Dn(),j=gu(),y=ah(n,th(f),b,o==="path"),x=JSON.stringify(y);return U.useEffect(()=>{j(JSON.parse(x),{replace:r,state:u,relative:o})},[j,x,o,r,u]),null}function il(n){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 Ob({basename:n="/",children:r=null,location:u,navigationType:o="POP",navigator:h,static:f=!1,unstable_useTransitions:b}){yt(!Yr(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let j=n.replace(/^\/*/,"/"),y=U.useMemo(()=>({basename:j,navigator:h,static:f,unstable_useTransitions:b,future:{}}),[j,h,f,b]);typeof u=="string"&&(u=Ys(u));let{pathname:x="/",search:S="",hash:C="",state:z=null,key:_="default"}=u,N=U.useMemo(()=>{let O=ol(x,j);return O==null?null:{location:{pathname:O,search:S,hash:C,state:z,key:_},navigationType:o}},[j,x,S,C,z,_,o]);return en(N!=null,`<Router basename="${j}"> is not able to match the URL "${x}${S}${C}" because it does not start with the basename, so the <Router> won't render anything.`),N==null?null:U.createElement(qa.Provider,{value:y},U.createElement(pc.Provider,{children:r,value:N}))}function Rb({children:n,location:r}){return gb($f(n),r)}function $f(n,r=[]){let u=[];return U.Children.forEach(n,(o,h)=>{if(!U.isValidElement(o))return;let f=[...r,h];if(o.type===U.Fragment){u.push.apply(u,$f(o.props.children,f));return}yt(o.type===il,`[${typeof o.type=="string"?o.type:o.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),yt(!o.props.index||!o.props.children,"An index route cannot have child routes.");let b={id:o.props.id||f.join("-"),caseSensitive:o.props.caseSensitive,element:o.props.element,Component:o.props.Component,index:o.props.index,path:o.props.path,middleware:o.props.middleware,loader:o.props.loader,action:o.props.action,hydrateFallbackElement:o.props.hydrateFallbackElement,HydrateFallback:o.props.HydrateFallback,errorElement:o.props.errorElement,ErrorBoundary:o.props.ErrorBoundary,hasErrorBoundary:o.props.hasErrorBoundary===!0||o.props.ErrorBoundary!=null||o.props.errorElement!=null,shouldRevalidate:o.props.shouldRevalidate,handle:o.props.handle,lazy:o.props.lazy};o.props.children&&(b.children=$f(o.props.children,f)),u.push(b)}),u}var nu="get",lu="application/x-www-form-urlencoded";function xu(n){return typeof HTMLElement<"u"&&n instanceof HTMLElement}function Db(n){return xu(n)&&n.tagName.toLowerCase()==="button"}function kb(n){return xu(n)&&n.tagName.toLowerCase()==="form"}function Ab(n){return xu(n)&&n.tagName.toLowerCase()==="input"}function _b(n){return!!(n.metaKey||n.altKey||n.ctrlKey||n.shiftKey)}function zb(n,r){return n.button===0&&(!r||r==="_self")&&!_b(n)}var Zo=null;function Lb(){if(Zo===null)try{new FormData(document.createElement("form"),0),Zo=!1}catch{Zo=!0}return Zo}var Ub=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Af(n){return n!=null&&!Ub.has(n)?(en(!1,`"${n}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${lu}"`),null):n}function Hb(n,r){let u,o,h,f,b;if(kb(n)){let j=n.getAttribute("action");o=j?ol(j,r):null,u=n.getAttribute("method")||nu,h=Af(n.getAttribute("enctype"))||lu,f=new FormData(n)}else if(Db(n)||Ab(n)&&(n.type==="submit"||n.type==="image")){let j=n.form;if(j==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let y=n.getAttribute("formaction")||j.getAttribute("action");if(o=y?ol(y,r):null,u=n.getAttribute("formmethod")||j.getAttribute("method")||nu,h=Af(n.getAttribute("formenctype"))||Af(j.getAttribute("enctype"))||lu,f=new FormData(j,n),!Lb()){let{name:x,type:S,value:C}=n;if(S==="image"){let z=x?`${x}.`:"";f.append(`${z}x`,"0"),f.append(`${z}y`,"0")}else x&&f.append(x,C)}}else{if(xu(n))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');u=nu,o=null,h=lu,b=n}return f&&h==="text/plain"&&(b=f,f=void 0),{action:o,method:u.toLowerCase(),encType:h,formData:f,body:b}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function rh(n,r){if(n===!1||n===null||typeof n>"u")throw new Error(r)}function qb(n,r,u,o){let h=typeof n=="string"?new URL(n,typeof window>"u"?"server://singlefetch/":window.location.origin):n;return u?h.pathname.endsWith("/")?h.pathname=`${h.pathname}_.${o}`:h.pathname=`${h.pathname}.${o}`:h.pathname==="/"?h.pathname=`_root.${o}`:r&&ol(h.pathname,r)==="/"?h.pathname=`${r.replace(/\/$/,"")}/_root.${o}`:h.pathname=`${h.pathname.replace(/\/$/,"")}.${o}`,h}async function Vb(n,r){if(n.id in r)return r[n.id];try{let u=await import(n.module);return r[n.id]=u,u}catch(u){return console.error(`Error loading route module \`${n.module}\`, reloading page...`),console.error(u),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function Bb(n){return n==null?!1:n.href==null?n.rel==="preload"&&typeof n.imageSrcSet=="string"&&typeof n.imageSizes=="string":typeof n.rel=="string"&&typeof n.href=="string"}async function Pb(n,r,u){let o=await Promise.all(n.map(async h=>{let f=r.routes[h.route.id];if(f){let b=await Vb(f,u);return b.links?b.links():[]}return[]}));return Fb(o.flat(1).filter(Bb).filter(h=>h.rel==="stylesheet"||h.rel==="preload").map(h=>h.rel==="stylesheet"?{...h,rel:"prefetch",as:"style"}:{...h,rel:"prefetch"}))}function _g(n,r,u,o,h,f){let b=(y,x)=>u[x]?y.route.id!==u[x].route.id:!0,j=(y,x)=>{var S;return u[x].pathname!==y.pathname||((S=u[x].route.path)==null?void 0:S.endsWith("*"))&&u[x].params["*"]!==y.params["*"]};return f==="assets"?r.filter((y,x)=>b(y,x)||j(y,x)):f==="data"?r.filter((y,x)=>{var C;let S=o.routes[y.route.id];if(!S||!S.hasLoader)return!1;if(b(y,x)||j(y,x))return!0;if(y.route.shouldRevalidate){let z=y.route.shouldRevalidate({currentUrl:new URL(h.pathname+h.search+h.hash,window.origin),currentParams:((C=u[0])==null?void 0:C.params)||{},nextUrl:new URL(n,window.origin),nextParams:y.params,defaultShouldRevalidate:!0});if(typeof z=="boolean")return z}return!0}):[]}function $b(n,r,{includeHydrateFallback:u}={}){return Yb(n.map(o=>{let h=r.routes[o.route.id];if(!h)return[];let f=[h.module];return h.clientActionModule&&(f=f.concat(h.clientActionModule)),h.clientLoaderModule&&(f=f.concat(h.clientLoaderModule)),u&&h.hydrateFallbackModule&&(f=f.concat(h.hydrateFallbackModule)),h.imports&&(f=f.concat(h.imports)),f}).flat(1))}function Yb(n){return[...new Set(n)]}function Gb(n){let r={},u=Object.keys(n).sort();for(let o of u)r[o]=n[o];return r}function Fb(n,r){let u=new Set;return new Set(r),n.reduce((o,h)=>{let f=JSON.stringify(Gb(h));return u.has(f)||(u.add(f),o.push({key:f,link:h})),o},[])}function Xx(){let n=U.useContext($r);return rh(n,"You must render this element inside a <DataRouterContext.Provider> element"),n}function Zb(){let n=U.useContext(mu);return rh(n,"You must render this element inside a <DataRouterStateContext.Provider> element"),n}var ih=U.createContext(void 0);ih.displayName="FrameworkContext";function Jx(){let n=U.useContext(ih);return rh(n,"You must render this element inside a <HydratedRouter> element"),n}function Wb(n,r){let u=U.useContext(ih),[o,h]=U.useState(!1),[f,b]=U.useState(!1),{onFocus:j,onBlur:y,onMouseEnter:x,onMouseLeave:S,onTouchStart:C}=r,z=U.useRef(null);U.useEffect(()=>{if(n==="render"&&b(!0),n==="viewport"){let O=P=>{P.forEach(D=>{b(D.isIntersecting)})},k=new IntersectionObserver(O,{threshold:.5});return z.current&&k.observe(z.current),()=>{k.disconnect()}}},[n]),U.useEffect(()=>{if(o){let O=setTimeout(()=>{b(!0)},100);return()=>{clearTimeout(O)}}},[o]);let _=()=>{h(!0)},N=()=>{h(!1),b(!1)};return u?n!=="intent"?[f,z,{}]:[f,z,{onFocus:Xi(j,_),onBlur:Xi(y,N),onMouseEnter:Xi(x,_),onMouseLeave:Xi(S,N),onTouchStart:Xi(C,_)}]:[!1,z,{}]}function Xi(n,r){return u=>{n&&n(u),u.defaultPrevented||r(u)}}function Ib({page:n,...r}){let{router:u}=Xx(),o=U.useMemo(()=>Hx(u.routes,n,u.basename),[u.routes,n,u.basename]);return o?U.createElement(Xb,{page:n,matches:o,...r}):null}function Qb(n){let{manifest:r,routeModules:u}=Jx(),[o,h]=U.useState([]);return U.useEffect(()=>{let f=!1;return Pb(n,r,u).then(b=>{f||h(b)}),()=>{f=!0}},[n,r,u]),o}function Xb({page:n,matches:r,...u}){let o=Dn(),{future:h,manifest:f,routeModules:b}=Jx(),{basename:j}=Xx(),{loaderData:y,matches:x}=Zb(),S=U.useMemo(()=>_g(n,r,x,f,o,"data"),[n,r,x,f,o]),C=U.useMemo(()=>_g(n,r,x,f,o,"assets"),[n,r,x,f,o]),z=U.useMemo(()=>{if(n===o.pathname+o.search+o.hash)return[];let O=new Set,k=!1;if(r.forEach(D=>{var w;let Q=f.routes[D.route.id];!Q||!Q.hasLoader||(!S.some(K=>K.route.id===D.route.id)&&D.route.id in y&&((w=b[D.route.id])!=null&&w.shouldRevalidate)||Q.hasClientLoader?k=!0:O.add(D.route.id))}),O.size===0)return[];let P=qb(n,j,h.unstable_trailingSlashAwareDataRequests,"data");return k&&O.size>0&&P.searchParams.set("_routes",r.filter(D=>O.has(D.route.id)).map(D=>D.route.id).join(",")),[P.pathname+P.search]},[j,h.unstable_trailingSlashAwareDataRequests,y,o,f,S,r,n,b]),_=U.useMemo(()=>$b(C,f),[C,f]),N=Qb(C);return U.createElement(U.Fragment,null,z.map(O=>U.createElement("link",{key:O,rel:"prefetch",as:"fetch",href:O,...u})),_.map(O=>U.createElement("link",{key:O,rel:"modulepreload",href:O,...u})),N.map(({key:O,link:k})=>U.createElement("link",{key:O,nonce:u.nonce,...k,crossOrigin:k.crossOrigin??u.crossOrigin})))}function Jb(...n){return r=>{n.forEach(u=>{typeof u=="function"?u(r):u!=null&&(u.current=r)})}}var Kb=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{Kb&&(window.__reactRouterVersion="7.13.0")}catch{}function e1({basename:n,children:r,unstable_useTransitions:u,window:o}){let h=U.useRef();h.current==null&&(h.current=Ay({window:o,v5Compat:!0}));let f=h.current,[b,j]=U.useState({action:f.action,location:f.location}),y=U.useCallback(x=>{u===!1?j(x):U.startTransition(()=>j(x))},[u]);return U.useLayoutEffect(()=>f.listen(y),[f,y]),U.createElement(Ob,{basename:n,children:r,location:b.location,navigationType:b.action,navigator:f,unstable_useTransitions:u})}var Kx=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,ep=U.forwardRef(function({onClick:r,discover:u="render",prefetch:o="none",relative:h,reloadDocument:f,replace:b,state:j,target:y,to:x,preventScrollReset:S,viewTransition:C,unstable_defaultShouldRevalidate:z,..._},N){let{basename:O,unstable_useTransitions:k}=U.useContext(qa),P=typeof x=="string"&&Kx.test(x),D=Px(x,O);x=D.to;let Q=hb(x,{relative:h}),[w,K,q]=Wb(o,_),Z=n1(x,{replace:b,state:j,target:y,preventScrollReset:S,relative:h,viewTransition:C,unstable_defaultShouldRevalidate:z,unstable_useTransitions:k});function R(M){r&&r(M),M.defaultPrevented||Z(M)}let ae=U.createElement("a",{..._,...q,href:D.absoluteURL||Q,onClick:D.isExternal||f?r:R,ref:Jb(N,K),target:y,"data-discover":!P&&u==="render"?"true":void 0});return w&&!P?U.createElement(U.Fragment,null,ae,U.createElement(Ib,{page:Q})):ae});ep.displayName="Link";var tp=U.forwardRef(function({"aria-current":r="page",caseSensitive:u=!1,className:o="",end:h=!1,style:f,to:b,viewTransition:j,children:y,...x},S){let C=vc(b,{relative:x.relative}),z=Dn(),_=U.useContext(mu),{navigator:N,basename:O}=U.useContext(qa),k=_!=null&&c1(C)&&j===!0,P=N.encodeLocation?N.encodeLocation(C).pathname:C.pathname,D=z.pathname,Q=_&&_.navigation&&_.navigation.location?_.navigation.location.pathname:null;u||(D=D.toLowerCase(),Q=Q?Q.toLowerCase():null,P=P.toLowerCase()),Q&&O&&(Q=ol(Q,O)||Q);const w=P!=="/"&&P.endsWith("/")?P.length-1:P.length;let K=D===P||!h&&D.startsWith(P)&&D.charAt(w)==="/",q=Q!=null&&(Q===P||!h&&Q.startsWith(P)&&Q.charAt(P.length)==="/"),Z={isActive:K,isPending:q,isTransitioning:k},R=K?r:void 0,ae;typeof o=="function"?ae=o(Z):ae=[o,K?"active":null,q?"pending":null,k?"transitioning":null].filter(Boolean).join(" ");let M=typeof f=="function"?f(Z):f;return U.createElement(ep,{...x,"aria-current":R,className:ae,ref:S,style:M,to:b,viewTransition:j},typeof y=="function"?y(Z):y)});tp.displayName="NavLink";var t1=U.forwardRef(({discover:n="render",fetcherKey:r,navigate:u,reloadDocument:o,replace:h,state:f,method:b=nu,action:j,onSubmit:y,relative:x,preventScrollReset:S,viewTransition:C,unstable_defaultShouldRevalidate:z,..._},N)=>{let{unstable_useTransitions:O}=U.useContext(qa),k=r1(),P=i1(j,{relative:x}),D=b.toLowerCase()==="get"?"get":"post",Q=typeof j=="string"&&Kx.test(j),w=K=>{if(y&&y(K),K.defaultPrevented)return;K.preventDefault();let q=K.nativeEvent.submitter,Z=(q==null?void 0:q.getAttribute("formmethod"))||b,R=()=>k(q||K.currentTarget,{fetcherKey:r,method:Z,navigate:u,replace:h,state:f,relative:x,preventScrollReset:S,viewTransition:C,unstable_defaultShouldRevalidate:z});O&&u!==!1?U.startTransition(()=>R()):R()};return U.createElement("form",{ref:N,method:D,action:P,onSubmit:o?y:w,..._,"data-discover":!Q&&n==="render"?"true":void 0})});t1.displayName="Form";function a1(n){return`${n} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function ap(n){let r=U.useContext($r);return yt(r,a1(n)),r}function n1(n,{target:r,replace:u,state:o,preventScrollReset:h,relative:f,viewTransition:b,unstable_defaultShouldRevalidate:j,unstable_useTransitions:y}={}){let x=gu(),S=Dn(),C=vc(n,{relative:f});return U.useCallback(z=>{if(zb(z,r)){z.preventDefault();let _=u!==void 0?u:fc(S)===fc(C),N=()=>x(n,{replace:_,state:o,preventScrollReset:h,relative:f,viewTransition:b,unstable_defaultShouldRevalidate:j});y?U.startTransition(()=>N()):N()}},[S,x,C,u,o,r,n,h,f,b,j,y])}var l1=0,s1=()=>`__${String(++l1)}__`;function r1(){let{router:n}=ap("useSubmit"),{basename:r}=U.useContext(qa),u=Sb(),o=n.fetch,h=n.navigate;return U.useCallback(async(f,b={})=>{let{action:j,method:y,encType:x,formData:S,body:C}=Hb(f,r);if(b.navigate===!1){let z=b.fetcherKey||s1();await o(z,u,b.action||j,{unstable_defaultShouldRevalidate:b.unstable_defaultShouldRevalidate,preventScrollReset:b.preventScrollReset,formData:S,body:C,formMethod:b.method||y,formEncType:b.encType||x,flushSync:b.flushSync})}else await h(b.action||j,{unstable_defaultShouldRevalidate:b.unstable_defaultShouldRevalidate,preventScrollReset:b.preventScrollReset,formData:S,body:C,formMethod:b.method||y,formEncType:b.encType||x,replace:b.replace,state:b.state,fromRouteId:u,flushSync:b.flushSync,viewTransition:b.viewTransition})},[o,h,r,u])}function i1(n,{relative:r}={}){let{basename:u}=U.useContext(qa),o=U.useContext(Rn);yt(o,"useFormAction must be used inside a RouteContext");let[h]=o.matches.slice(-1),f={...vc(n||".",{relative:r})},b=Dn();if(n==null){f.search=b.search;let j=new URLSearchParams(f.search),y=j.getAll("index");if(y.some(S=>S==="")){j.delete("index"),y.filter(C=>C).forEach(C=>j.append("index",C));let S=j.toString();f.search=S?`?${S}`:""}}return(!n||n===".")&&h.route.index&&(f.search=f.search?f.search.replace(/^\?/,"?index&"):"?index"),u!=="/"&&(f.pathname=f.pathname==="/"?u:cl([u,f.pathname])),fc(f)}function c1(n,{relative:r}={}){let u=U.useContext(Yx);yt(u!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:o}=ap("useViewTransitionState"),h=vc(n,{relative:r});if(!u.isTransitioning)return!1;let f=ol(u.currentLocation.pathname,o)||u.currentLocation.pathname,b=ol(u.nextLocation.pathname,o)||u.nextLocation.pathname;return iu(h.pathname,b)!=null||iu(h.pathname,f)!=null}var o1=Ux();const u1=Kf(o1);/**
|
|
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 np=(...n)=>n.filter((r,u,o)=>!!r&&r.trim()!==""&&o.indexOf(r)===u).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 d1=n=>n.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();/**
|
|
71
|
+
* @license lucide-react v0.564.0 - ISC
|
|
72
|
+
*
|
|
73
|
+
* This source code is licensed under the ISC license.
|
|
74
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
75
|
+
*/const f1=n=>n.replace(/^([A-Z])|[\s-_]+(\w)/g,(r,u,o)=>o?o.toUpperCase():u.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 zg=n=>{const r=f1(n);return r.charAt(0).toUpperCase()+r.slice(1)};/**
|
|
81
|
+
* @license lucide-react v0.564.0 - ISC
|
|
82
|
+
*
|
|
83
|
+
* This source code is licensed under the ISC license.
|
|
84
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
85
|
+
*/var h1={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 m1=n=>{for(const r in n)if(r.startsWith("aria-")||r==="role"||r==="title")return!0;return!1};/**
|
|
91
|
+
* @license lucide-react v0.564.0 - ISC
|
|
92
|
+
*
|
|
93
|
+
* This source code is licensed under the ISC license.
|
|
94
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
95
|
+
*/const g1=U.forwardRef(({color:n="currentColor",size:r=24,strokeWidth:u=2,absoluteStrokeWidth:o,className:h="",children:f,iconNode:b,...j},y)=>U.createElement("svg",{ref:y,...h1,width:r,height:r,stroke:n,strokeWidth:o?Number(u)*24/Number(r):u,className:np("lucide",h),...!f&&!m1(j)&&{"aria-hidden":"true"},...j},[...b.map(([x,S])=>U.createElement(x,S)),...Array.isArray(f)?f:[f]]));/**
|
|
96
|
+
* @license lucide-react v0.564.0 - ISC
|
|
97
|
+
*
|
|
98
|
+
* This source code is licensed under the ISC license.
|
|
99
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
100
|
+
*/const Se=(n,r)=>{const u=U.forwardRef(({className:o,...h},f)=>U.createElement(g1,{ref:f,iconNode:r,className:np(`lucide-${d1(zg(n))}`,`lucide-${n}`,o),...h}));return u.displayName=zg(n),u};/**
|
|
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 x1=[["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"}]],lp=Se("activity",x1);/**
|
|
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 p1=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],v1=Se("arrow-down",p1);/**
|
|
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 y1=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],Lg=Se("arrow-right",y1);/**
|
|
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 b1=[["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"}]],j1=Se("arrow-up-down",b1);/**
|
|
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 N1=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],w1=Se("arrow-up",N1);/**
|
|
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 S1=[["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"}]],E1=Se("bell",S1);/**
|
|
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 T1=[["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"}]],Ug=Se("briefcase",T1);/**
|
|
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 C1=[["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"}]],sp=Se("calendar",C1);/**
|
|
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 M1=[["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"}]],ch=Se("chart-column",M1);/**
|
|
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 O1=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],R1=Se("check",O1);/**
|
|
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 D1=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],oh=Se("chevron-down",D1);/**
|
|
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 k1=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],A1=Se("chevron-left",k1);/**
|
|
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 _1=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],z1=Se("chevron-right",_1);/**
|
|
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 L1=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],U1=Se("chevron-up",L1);/**
|
|
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 H1=[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]],q1=Se("chevrons-up-down",H1);/**
|
|
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 V1=[["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"}]],vn=Se("circle-alert",V1);/**
|
|
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 B1=[["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"}]],Hg=Se("circle-arrow-down",B1);/**
|
|
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 P1=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],rp=Se("circle-check",P1);/**
|
|
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 $1=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],yc=Se("circle-check-big",$1);/**
|
|
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 Y1=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"10",x2:"10",y1:"15",y2:"9",key:"c1nkhi"}],["line",{x1:"14",x2:"14",y1:"15",y2:"9",key:"h65svq"}]],G1=Se("circle-pause",Y1);/**
|
|
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 F1=[["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"}]],Z1=Se("circle-x",F1);/**
|
|
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 W1=[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2",key:"116196"}],["path",{d:"M12 11h4",key:"1jrz19"}],["path",{d:"M12 16h4",key:"n85exb"}],["path",{d:"M8 11h.01",key:"1dfujw"}],["path",{d:"M8 16h.01",key:"18s6g9"}]],uh=Se("clipboard-list",W1);/**
|
|
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 I1=[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2",key:"116196"}]],qg=Se("clipboard",I1);/**
|
|
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:"M12 6v6h4",key:"135r8i"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],X1=Se("clock-3",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 J1=[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],ip=Se("clock",J1);/**
|
|
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 K1=[["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"}]],cp=Se("external-link",K1);/**
|
|
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 ej=[["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"}]],tj=Se("eye-off",ej);/**
|
|
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 aj=[["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"}]],dh=Se("eye",aj);/**
|
|
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 nj=[["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"}]],Yf=Se("file-text",nj);/**
|
|
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 lj=[["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"}]],fh=Se("git-merge",lj);/**
|
|
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 sj=[["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"}]],pu=Se("git-pull-request",sj);/**
|
|
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 rj=[["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"}]],ij=Se("globe",rj);/**
|
|
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 cj=[["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"}]],oj=Se("house",cj);/**
|
|
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 uj=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],dj=Se("info",uj);/**
|
|
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 fj=[["path",{d:"M5 3v14",key:"9nsxs2"}],["path",{d:"M12 3v8",key:"1h2ygw"}],["path",{d:"M19 3v18",key:"1sk56x"}]],hj=Se("kanban",fj);/**
|
|
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 mj=[["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"}]],Vg=Se("list-restart",mj);/**
|
|
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 gj=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],op=Se("loader-circle",gj);/**
|
|
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 xj=[["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"}]],up=Se("map",xj);/**
|
|
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 pj=[["path",{d:"M5 12h14",key:"1ays0h"}]],vj=Se("minus",pj);/**
|
|
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 yj=[["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"}]],hh=Se("panels-top-left",yj);/**
|
|
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 bj=[["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"}]],cu=Se("pause",bj);/**
|
|
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 jj=[["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"}]],vu=Se("pen",jj);/**
|
|
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 Nj=[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]],pn=Se("play",Nj);/**
|
|
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 wj=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Kl=Se("plus",wj);/**
|
|
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 Sj=[["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"}]],hc=Se("refresh-cw",Sj);/**
|
|
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 Ej=[["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"}]],mh=Se("rotate-ccw",Ej);/**
|
|
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 Tj=[["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"}]],dp=Se("save",Tj);/**
|
|
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 Cj=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],Gr=Se("search",Cj);/**
|
|
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 Mj=[["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"}]],Bg=Se("settings-2",Mj);/**
|
|
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 Oj=[["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"}]],Rj=Se("settings",Oj);/**
|
|
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 Dj=[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]],kj=Se("sparkles",Dj);/**
|
|
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 Aj=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],Pg=Se("square",Aj);/**
|
|
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 _j=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],zj=Se("terminal",_j);/**
|
|
366
|
+
* @license lucide-react v0.564.0 - ISC
|
|
367
|
+
*
|
|
368
|
+
* This source code is licensed under the ISC license.
|
|
369
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
370
|
+
*/const Lj=[["path",{d:"M10 2h4",key:"n1abiw"}],["path",{d:"M4.6 11a8 8 0 0 0 1.7 8.7 8 8 0 0 0 8.7 1.7",key:"10he05"}],["path",{d:"M7.4 7.4a8 8 0 0 1 10.3 1 8 8 0 0 1 .9 10.2",key:"15f7sh"}],["path",{d:"m2 2 20 20",key:"1ooewy"}],["path",{d:"M12 12v-2",key:"fwoke6"}]],Uj=Se("timer-off",Lj);/**
|
|
371
|
+
* @license lucide-react v0.564.0 - ISC
|
|
372
|
+
*
|
|
373
|
+
* This source code is licensed under the ISC license.
|
|
374
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
375
|
+
*/const Hj=[["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"}]],Gs=Se("trash-2",Hj);/**
|
|
376
|
+
* @license lucide-react v0.564.0 - ISC
|
|
377
|
+
*
|
|
378
|
+
* This source code is licensed under the ISC license.
|
|
379
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
380
|
+
*/const qj=[["path",{d:"M16 17h6v-6",key:"t6n2it"}],["path",{d:"m22 17-8.5-8.5-5 5L2 7",key:"x473p"}]],Vj=Se("trending-down",qj);/**
|
|
381
|
+
* @license lucide-react v0.564.0 - ISC
|
|
382
|
+
*
|
|
383
|
+
* This source code is licensed under the ISC license.
|
|
384
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
385
|
+
*/const Bj=[["path",{d:"M16 7h6v6",key:"box55l"}],["path",{d:"m22 7-8.5 8.5-5-5L2 17",key:"1t1m79"}]],Pj=Se("trending-up",Bj);/**
|
|
386
|
+
* @license lucide-react v0.564.0 - ISC
|
|
387
|
+
*
|
|
388
|
+
* This source code is licensed under the ISC license.
|
|
389
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
390
|
+
*/const $j=[["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=Se("triangle-alert",$j);/**
|
|
391
|
+
* @license lucide-react v0.564.0 - ISC
|
|
392
|
+
*
|
|
393
|
+
* This source code is licensed under the ISC license.
|
|
394
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
395
|
+
*/const Yj=[["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"}]],Gj=Se("wifi",Yj);/**
|
|
396
|
+
* @license lucide-react v0.564.0 - ISC
|
|
397
|
+
*
|
|
398
|
+
* This source code is licensed under the ISC license.
|
|
399
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
400
|
+
*/const Fj=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Fr=Se("x",Fj);/**
|
|
401
|
+
* @license lucide-react v0.564.0 - ISC
|
|
402
|
+
*
|
|
403
|
+
* This source code is licensed under the ISC license.
|
|
404
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
405
|
+
*/const Zj=[["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"}]],$g=Se("zap",Zj),fp=[{id:"executor",label:"Executor",processName:"executor",color:{bg:"bg-blue-500",border:"border-blue-500/60"}},{id:"reviewer",label:"Reviewer",processName:"reviewer",color:{bg:"bg-green-500",border:"border-green-500/60"}},{id:"qa",label:"QA",processName:"qa",color:{bg:"bg-purple-500",border:"border-purple-500/60"}},{id:"audit",label:"Audit",processName:"audit",color:{bg:"bg-orange-500",border:"border-orange-500/60"}},{id:"slicer",label:"Planner",processName:"planner",color:{bg:"bg-yellow-500",border:"border-yellow-500/60"}},{id:"analytics",label:"Analytics",processName:"analytics",color:{bg:"bg-pink-500",border:"border-pink-500/60"}},{id:"pr-resolver",label:"PR Resolver",processName:"pr-resolver",color:{bg:"bg-teal-500",border:"border-teal-500/60"}},{id:"merger",label:"Merger",processName:"merger",color:{bg:"bg-cyan-500",border:"border-cyan-500/60"}},{id:"manager",label:"Manager",processName:"manager",color:{bg:"bg-indigo-500",border:"border-indigo-500/60"}}],hp=[{id:"executor",label:"Executor",processName:"executor",color:{bg:"bg-blue-500",border:"border-blue-500/60"},triggerEndpoint:"/api/actions/run",scheduleTemplateKey:"executor",getEnabled:n=>n.executorEnabled??!0,getSchedule:n=>n.cronSchedule??"5 */2 * * *",settingsSection:"general",buildEnabledPatch:n=>({executorEnabled:n})},{id:"reviewer",label:"Reviewer",processName:"reviewer",color:{bg:"bg-green-500",border:"border-green-500/60"},triggerEndpoint:"/api/actions/review",scheduleTemplateKey:"reviewer",getEnabled:n=>n.reviewerEnabled??!0,getSchedule:n=>n.reviewerSchedule??"25 */3 * * *",settingsSection:"general",buildEnabledPatch:n=>({reviewerEnabled:n})},{id:"qa",label:"QA",processName:"qa",color:{bg:"bg-purple-500",border:"border-purple-500/60"},triggerEndpoint:"/api/actions/qa",scheduleTemplateKey:"qa",getEnabled:n=>{var r;return((r=n.qa)==null?void 0:r.enabled)??!0},getSchedule:n=>{var r;return((r=n.qa)==null?void 0:r.schedule)??"45 2,10,18 * * *"},settingsSection:"general",buildEnabledPatch:(n,r)=>({qa:{...r.qa??{},enabled:n}})},{id:"audit",label:"Audit",processName:"audit",color:{bg:"bg-orange-500",border:"border-orange-500/60"},triggerEndpoint:"/api/actions/audit",scheduleTemplateKey:"audit",getEnabled:n=>{var r;return((r=n.audit)==null?void 0:r.enabled)??!1},getSchedule:n=>{var r;return((r=n.audit)==null?void 0:r.schedule)??"50 3 * * 1"},settingsSection:"advanced",buildEnabledPatch:(n,r)=>({audit:{...r.audit??{},enabled:n}})},{id:"slicer",label:"Planner",processName:"planner",color:{bg:"bg-yellow-500",border:"border-yellow-500/60"},triggerEndpoint:"/api/actions/planner",scheduleTemplateKey:"slicer",getEnabled:n=>{var r;return((r=n.roadmapScanner)==null?void 0:r.enabled)??!0},getSchedule:n=>{var r;return((r=n.roadmapScanner)==null?void 0:r.slicerSchedule)??"35 */6 * * *"},settingsSection:"advanced",buildEnabledPatch:(n,r)=>({roadmapScanner:{...r.roadmapScanner??{},enabled:n}})},{id:"analytics",label:"Analytics",processName:"analytics",color:{bg:"bg-pink-500",border:"border-pink-500/60"},triggerEndpoint:"/api/actions/analytics",scheduleTemplateKey:"analytics",getEnabled:n=>{var r;return((r=n.analytics)==null?void 0:r.enabled)??!1},getSchedule:n=>{var r;return((r=n.analytics)==null?void 0:r.schedule)??"0 6 * * 1"},settingsSection:"advanced",buildEnabledPatch:(n,r)=>({analytics:{...r.analytics??{},enabled:n}})},{id:"pr-resolver",label:"PR Resolver",processName:"pr-resolver",color:{bg:"bg-teal-500",border:"border-teal-500/60"},triggerEndpoint:"/api/actions/resolve",scheduleTemplateKey:"prResolver",getEnabled:n=>{var r;return((r=n.prResolver)==null?void 0:r.enabled)??!0},getSchedule:n=>{var r;return((r=n.prResolver)==null?void 0:r.schedule)??"15 6,14,22 * * *"},settingsSection:"advanced",buildEnabledPatch:(n,r)=>({prResolver:{...r.prResolver??{},enabled:n}})},{id:"merger",label:"Merger",processName:"merger",color:{bg:"bg-cyan-500",border:"border-cyan-500/60"},triggerEndpoint:"/api/actions/merge",scheduleTemplateKey:"merger",getEnabled:n=>{var r;return((r=n.merger)==null?void 0:r.enabled)??!1},getSchedule:n=>{var r;return((r=n.merger)==null?void 0:r.schedule)??"55 */4 * * *"},settingsSection:"advanced",buildEnabledPatch:(n,r)=>({merger:{...r.merger??{},enabled:n}})},{id:"manager",label:"Manager",processName:"manager",color:{bg:"bg-indigo-500",border:"border-indigo-500/60"},triggerEndpoint:"/api/actions/manager",scheduleTemplateKey:"manager",getEnabled:n=>{var r;return((r=n.manager)==null?void 0:r.enabled)??!0},getSchedule:n=>{var r;return((r=n.manager)==null?void 0:r.schedule)??"15 7 * * *"},settingsSection:"advanced",buildEnabledPatch:(n,r)=>({manager:{...r.manager??{},enabled:n}})}];function Wj(n){return hp.find(r=>r.id===n)}const gh="";let xh=!1,ou=null;function Ij(n){xh=n}function Yg(n){ou=n}function Qj(){return xh}function ph(n){return encodeURIComponent(n.replace(/\//g,"~"))}function bt(n){return xh&&ou?n.replace("/api/",`/api/projects/${ph(ou)}/`):n}function Xj(){return lt("/api/mode")}function mp(){return lt("/api/projects")}function Jj(n){const r=ph(n);return lt(`/api/projects/${r}`,{method:"DELETE"})}async function lt(n,r){const u=`${gh}${n}`,o=await fetch(u,{headers:{"Content-Type":"application/json",...r==null?void 0:r.headers},...r});if(!o.ok){const h=await o.json().catch(()=>({error:"Unknown error"}));throw new Error(h.error||`HTTP ${o.status}: ${o.statusText}`)}return o.json()}function _f(){return lt(bt("/api/status"))}function Kj(){return lt(bt("/api/feedback/summary"))}function eN(){return lt(bt("/api/feedback/patterns"))}function tN(n,r){return lt(bt(`/api/feedback/augmentations/${n}`),{method:"PATCH",body:JSON.stringify(r)})}function gp(){return lt(bt("/api/prs"))}function aN(n,r){const u=`?lines=${encodeURIComponent(r)}`;return lt(bt(`/api/logs/${encodeURIComponent(n)}${u}`))}function vh(){return lt(bt("/api/config"))}async function nN(){if(Qj()){const r=(await mp()).filter(o=>o.valid);return(await Promise.all(r.map(async o=>{try{const h=await lt(`/api/projects/${ph(o.name)}/config`);return{projectId:o.name,config:h}}catch(h){return console.error(`Failed to fetch config for project ${o.name}`,h),null}}))).filter(o=>o!==null)}else{const n=await vh();return[{projectId:ou||"current",config:n}]}}function uu(n){return lt(bt("/api/config"),{method:"PUT",body:JSON.stringify(n)})}function lN(){return lt(bt("/api/doctor"))}function xp(){return lt(bt("/api/schedule-info"))}function sN(){return lt(bt("/api/actions/review"),{method:"POST"})}function pp(n){const r=Wj(n);return r?lt(bt(r.triggerEndpoint),{method:"POST"}):Promise.reject(new Error(`Unknown job ID: ${n}`))}function uc(){return lt(bt("/api/actions/install-cron"),{method:"POST"})}function vp(){return lt(bt("/api/actions/uninstall-cron"),{method:"POST"})}function rN(n="all"){return lt(bt("/api/actions/cancel"),{method:"POST",body:JSON.stringify({type:n})})}const Jl=["Draft","Ready","In Progress","Review","Done"];function yp(){return lt(bt("/api/board/status"))}function iN(n){return lt(bt("/api/board/issues"),{method:"POST",body:JSON.stringify(n)})}function bp(n,r){return lt(bt(`/api/board/issues/${n}/move`),{method:"PATCH",body:JSON.stringify({column:r})})}async function cN(n){const r=`${gh}${bt(`/api/board/issues/${n}`)}`,u=await fetch(r,{headers:{"Content-Type":"application/json"},method:"DELETE"});if(!u.ok){const o=await u.json().catch(()=>({error:"Unknown error"}));throw new Error(o.error||`HTTP ${u.status}: ${u.statusText}`)}}function oN(){return lt(bt("/api/actions/clear-lock"),{method:"POST"})}function uN(n,r=[],u){const o=(u==null?void 0:u.enabled)??!0,h=U.useRef(n);h.current=n,U.useEffect(()=>{if(!o)return;const f=`${gh}${bt("/api/status/events")}`,b=new EventSource(f);return b.addEventListener("status_changed",j=>{try{const y=JSON.parse(j.data);h.current(y)}catch{}}),()=>{b.close()}},[o,...r])}function Gg(){return lt("/api/queue/status")}function dN(n){const r=`?window=${encodeURIComponent(n)}`;return lt(`/api/queue/analytics${r}`)}function fN(n){return lt("/api/queue/clear",{method:"POST",body:JSON.stringify({force:!1})})}function hN(){return lt("/api/global-notifications")}function Fg(n){return lt("/api/global-notifications",{method:"PUT",body:JSON.stringify(n)})}function mN(){return lt(bt("/api/roadmap"))}function gN(){return lt(bt("/api/roadmap/scan"),{method:"POST"})}function jp(n){return lt(bt("/api/roadmap/toggle"),{method:"PUT",body:JSON.stringify({enabled:n})})}function Ua(n,r=[],u){const o=(u==null?void 0:u.enabled)??!0,[h,f]=U.useState(null),[b,j]=U.useState(!0),[y,x]=U.useState(null),S=U.useRef(n);S.current=n;const C=U.useRef(()=>{(async()=>{x(null);try{const _=await S.current();f(_)}catch(_){x(_ instanceof Error?_:new Error("Unknown error"))}})()});return U.useEffect(()=>{if(!o)return;let z=!1;return j(!0),x(null),(async()=>{try{const N=await S.current();z||f(N)}catch(N){z||x(N instanceof Error?N:new Error("Unknown error"))}finally{z||j(!1)}})(),()=>{z=!0}},[...r,o]),{data:h,loading:b,error:y,refetch:C.current}}const Zg=n=>{let r;const u=new Set,o=(x,S)=>{const C=typeof x=="function"?x(r):x;if(!Object.is(C,r)){const z=r;r=S??(typeof C!="object"||C===null)?C:Object.assign({},r,C),u.forEach(_=>_(r,z))}},h=()=>r,j={setState:o,getState:h,getInitialState:()=>y,subscribe:x=>(u.add(x),()=>u.delete(x))},y=r=n(o,h,j);return j},xN=n=>n?Zg(n):Zg,pN=n=>n;function vN(n,r=pN){const u=_e.useSyncExternalStore(n.subscribe,()=>r(n.getState()),()=>r(n.getInitialState()));return _e.useDebugValue(u),u}const Wg=n=>{const r=xN(n),u=o=>vN(r,o);return Object.assign(u,r),u},yN=n=>n?Wg(n):Wg,bN=typeof localStorage<"u"?localStorage.getItem("nw-selected-project"):null,Zt=yN((n,r)=>({projectName:"Night Watch",setProjectName:u=>n({projectName:u}),toasts:[],addToast:u=>{const o=Math.random().toString(36).substring(7);n(h=>({toasts:[...h.toasts,{...u,id:o}]})),setTimeout(()=>{n(h=>({toasts:h.toasts.filter(f=>f.id!==o)}))},5e3)},removeToast:u=>n(o=>({toasts:o.toasts.filter(h=>h.id!==u)})),status:null,setStatus:u=>n(o=>!o.status||new Date(u.timestamp)>new Date(o.status.timestamp)?{status:u}:o),globalModeLoading:!0,setGlobalModeLoading:u=>n({globalModeLoading:u}),isGlobalMode:!1,setGlobalMode:u=>{Ij(u),n({isGlobalMode:u})},projects:[],setProjects:u=>n({projects:u}),selectedProjectId:bN,selectProject:u=>{Yg(u),u?localStorage.setItem("nw-selected-project",u):localStorage.removeItem("nw-selected-project"),n(o=>{const h=o.projects.find(f=>f.name===u);return{selectedProjectId:u,...h?{projectName:h.name}:{}}})},removeProjectFromList:u=>{n(o=>{var j;const h=o.projects.filter(y=>y.name!==u),f=o.selectedProjectId===u,b=f?((j=h[0])==null?void 0:j.name)??null:o.selectedProjectId;return f&&(Yg(b),b?localStorage.setItem("nw-selected-project",b):localStorage.removeItem("nw-selected-project")),{projects:h,selectedProjectId:b,...f&&h[0]?{projectName:h[0].name}:{}}})},getJobStates:()=>{const{status:u}=r(),o=u==null?void 0:u.config;return hp.map(h=>({id:h.id,label:h.label,processName:h.processName,color:h.color,enabled:o?h.getEnabled(o):!0,schedule:o?h.getSchedule(o):"",triggerEndpoint:h.triggerEndpoint}))}})),jN=()=>{const[n,r]=U.useState(!1),{projectName:u,isGlobalMode:o,projects:h,selectedProjectId:f,selectProject:b,globalModeLoading:j}=Zt(),{data:y}=Ua(gp,[f],{enabled:!j}),x=(y==null?void 0:y.length)??0,S=U.useMemo(()=>[{icon:oj,label:"Dashboard",path:"/",section:"Overview"},{icon:zj,label:"Logs",path:"/logs"},{icon:hj,label:"Board",path:"/board",section:"Work"},{icon:pu,label:"Pull Requests",path:"/prs",badge:x},{icon:up,label:"Roadmap",path:"/roadmap"},{icon:sp,label:"Automation",path:"/scheduling",section:"Automation"},{icon:Rj,label:"Settings",path:"/settings",section:"Config"}],[x]);return s.jsxs("aside",{className:`
|
|
406
|
+
relative flex flex-col transition-all duration-300 ease-[cubic-bezier(0.25,0.1,0.25,1)]
|
|
407
|
+
${n?"w-20":"w-72"} h-screen flex-shrink-0 z-50
|
|
408
|
+
bg-[#030712]/80 backdrop-blur-xl border-r border-white/5
|
|
409
|
+
`,children:[s.jsx("div",{className:`p-6 border-b border-white/5 ${n?"items-center justify-center flex":""}`,children:n?s.jsx("div",{className:"relative group",children:s.jsx("div",{className:"h-10 w-10 bg-indigo-600 rounded-xl flex items-center justify-center text-white font-bold cursor-pointer shadow-lg shadow-indigo-500/20 group-hover:bg-indigo-500 transition-colors bg-gradient-to-br from-indigo-500 to-indigo-700",title:"Switch Project",children:"NW"})}):s.jsxs("div",{className:"relative w-full",children:[s.jsx("label",{className:"text-[10px] font-bold text-slate-500 uppercase tracking-widest mb-3 block pl-1",children:o?"Projects":"Workspace"}),o?s.jsxs("div",{className:"relative",children:[s.jsx(Ug,{className:"absolute left-3.5 top-1/2 -translate-y-1/2 h-4 w-4 text-indigo-400 pointer-events-none"}),s.jsx("select",{value:f||"",onChange:C=>b(C.target.value),className:"w-full bg-[#111827] border border-white/10 text-slate-200 rounded-lg py-3 pl-10 pr-8 text-sm font-medium shadow-sm appearance-none cursor-pointer hover:border-white/20 transition-colors focus:outline-none focus:border-indigo-500/50 focus:ring-1 focus:ring-indigo-500/20",children:h.filter(C=>C.valid).map(C=>s.jsx("option",{value:C.name,children:C.name},C.name))}),s.jsx(q1,{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(Ug,{className:"h-4 w-4 text-indigo-400 mr-3"}),s.jsx("span",{className:"truncate",children:u})]})]})}),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(C=>s.jsxs(_e.Fragment,{children:[C.section&&!n&&s.jsx("li",{className:"text-[10px] font-bold text-slate-600 uppercase tracking-widest px-3.5 pt-4 pb-1",children:C.section}),s.jsx("li",{children:s.jsx(tp,{to:C.path,className:({isActive:z})=>`
|
|
410
|
+
flex items-center px-3.5 py-3 rounded-xl transition-all duration-200 group relative
|
|
411
|
+
${z?"bg-indigo-500/10 text-indigo-300 shadow-[inset_0_1px_0_0_rgba(255,255,255,0.05)]":"text-slate-400 hover:bg-white/5 hover:text-slate-200"}
|
|
412
|
+
${n?"justify-center":""}
|
|
413
|
+
`,children:({isActive:z})=>s.jsxs(s.Fragment,{children:[s.jsx(C.icon,{className:`h-5 w-5 transition-colors ${z?"text-indigo-400 drop-shadow-[0_0_8px_rgba(99,102,241,0.5)]":"text-slate-500 group-hover:text-slate-300"} ${n?"":"mr-3.5"}`}),!n&&s.jsx("span",{className:"flex-1 text-sm font-medium tracking-wide",children:C.label}),C.badge&&(n?s.jsx("span",{className:"absolute top-2 right-2 h-2 w-2 bg-indigo-500 rounded-full border border-[#030712] shadow-sm"}):s.jsx("span",{className:`text-[10px] font-bold px-2 py-0.5 rounded-md ${z?"bg-indigo-500/20 text-indigo-300":"bg-white/5 text-slate-400 border border-white/5"}`,children:C.badge})),z&&!n&&s.jsx("div",{className:"absolute left-0 top-1/2 -translate-y-1/2 w-1 h-6 bg-indigo-500 rounded-r-full shadow-[0_0_10px_rgba(99,102,241,0.4)]"}),n&&s.jsx("div",{className:"absolute left-full ml-4 px-3 py-1.5 bg-[#111827] text-white text-xs font-medium rounded-md border border-white/10 shadow-xl opacity-0 group-hover:opacity-100 pointer-events-none whitespace-nowrap z-50 transition-opacity translate-x-2 group-hover:translate-x-0",children:C.label})]})})})]},C.path))})}),s.jsx("div",{className:"p-4 border-t border-white/5 flex justify-end",children:s.jsx("button",{onClick:()=>r(!n),className:"p-2 rounded-lg hover:bg-white/5 text-slate-500 hover:text-slate-300 transition-colors",children:n?s.jsx(z1,{className:"h-5 w-5"}):s.jsx(A1,{className:"h-5 w-5"})})})]})},NN=()=>{const{projectName:n}=Zt();return s.jsxs("header",{className:"h-20 flex items-center justify-between px-8 z-40 sticky top-0 bg-[#030712]/80 backdrop-blur-md border-b border-white/5",children:[s.jsxs("div",{className:"flex items-center space-x-6",children:[s.jsxs("div",{children:[s.jsx("div",{className:"text-xs font-mono text-indigo-400 mb-0.5 tracking-tight",children:"Active Project"}),s.jsx("h1",{className:"text-xl font-semibold text-white tracking-tight leading-none",children:n})]}),s.jsx("div",{className:"h-8 w-px bg-white/10 mx-2"}),s.jsxs("div",{className:"flex items-center space-x-2 text-xs font-medium px-3 py-1.5 rounded-full border transition-colors bg-emerald-500/5 text-emerald-400 border-emerald-500/20 shadow-[0_0_10px_-4px_rgba(16,185,129,0.3)]",children:[s.jsx(Gj,{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(Gr,{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(E1,{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"})]})]})},wN=({toast:n,onDismiss:r})=>{const u={success:s.jsx(yc,{className:"h-5 w-5 text-green-400"}),error:s.jsx(vn,{className:"h-5 w-5 text-red-400"}),info:s.jsx(dj,{className:"h-5 w-5 text-blue-400"}),warning:s.jsx($s,{className:"h-5 w-5 text-amber-400"})},o={success:"border-l-green-500",error:"border-l-red-500",info:"border-l-blue-500",warning:"border-l-amber-500"};return s.jsx("div",{className:`
|
|
414
|
+
pointer-events-auto w-full max-w-sm overflow-hidden rounded-lg
|
|
415
|
+
bg-slate-900 border border-slate-800 border-l-4 ${o[n.type]}
|
|
416
|
+
shadow-lg ring-1 ring-black ring-opacity-5 transition-all
|
|
417
|
+
animate-in slide-in-from-right-full fade-in duration-300
|
|
418
|
+
`,children:s.jsx("div",{className:"p-4",children:s.jsxs("div",{className:"flex items-start",children:[s.jsx("div",{className:"flex-shrink-0",children:u[n.type]}),s.jsxs("div",{className:"ml-3 w-0 flex-1 pt-0.5",children:[s.jsx("p",{className:"text-sm font-medium text-slate-200",children:n.title}),n.message&&s.jsx("p",{className:"mt-1 text-sm text-slate-400",children:n.message})]}),s.jsx("div",{className:"ml-4 flex flex-shrink-0",children:s.jsxs("button",{type:"button",className:"inline-flex rounded-md text-slate-400 hover:text-slate-200 focus:outline-none focus:ring-2 focus:ring-indigo-500",onClick:()=>r(n.id),children:[s.jsx("span",{className:"sr-only",children:"Close"}),s.jsx(Fr,{className:"h-5 w-5"})]})})]})})})},SN=()=>{const{toasts:n,removeToast:r}=Zt();return s.jsx("div",{"aria-live":"assertive",className:"pointer-events-none fixed inset-0 flex flex-col items-end px-4 py-6 sm:items-end sm:p-6 z-[100] gap-4",children:n.map(u=>s.jsx(wN,{toast:u,onDismiss:r},u.id))})};function EN(){const{setGlobalMode:n,setGlobalModeLoading:r,setProjects:u,selectProject:o,selectedProjectId:h}=Zt();U.useEffect(()=>{r(!0),Xj().then(async({globalMode:f})=>{if(n(f),!f)return;const b=await mp();u(b);const j=b.filter(y=>y.valid);h&&j.some(y=>y.name===h)?o(h):j.length>0&&o(j[0].name)}).catch(()=>{n(!1)}).finally(()=>{r(!1)})},[])}function Ig(n){if(!(n!=null&&n.timestamp))return Number.NEGATIVE_INFINITY;const r=new Date(n.timestamp).getTime();return Number.isNaN(r)?Number.NEGATIVE_INFINITY:r}function Wo(n,r){return n?r?Ig(n)>=Ig(r)?n:r:n:r}function TN(){const{setStatus:n,setProjectName:r,selectedProjectId:u,globalModeLoading:o,status:h}=Zt(),f=U.useRef(null);f.current=Zt.getState().status,uN(b=>{Wo(b,f.current)===b&&n(b)},[u,o],{enabled:!o}),U.useEffect(()=>{if(o)return;_f().then(j=>{Wo(j,f.current)===j&&n(j)}).catch(()=>{});const b=setInterval(()=>{_f().then(j=>{Wo(j,f.current)===j&&n(j)}).catch(()=>{})},3e4);return()=>clearInterval(b)},[u,o,n]),U.useEffect(()=>{const b=()=>{_f().then(j=>{Wo(j,f.current)===j&&n(j)}).catch(()=>{})};return window.addEventListener("focus",b),()=>window.removeEventListener("focus",b)},[u,n]),U.useEffect(()=>{h!=null&&h.projectName&&r(h.projectName)},[h==null?void 0:h.projectName,r])}const rt=({children:n,className:r="",onClick:u})=>s.jsxs("div",{className:`
|
|
419
|
+
relative bg-[#0b101b] rounded-xl border border-white/5
|
|
420
|
+
shadow-[0_4px_20px_-4px_rgba(0,0,0,0.5)]
|
|
421
|
+
transition-all duration-300
|
|
422
|
+
${u?"cursor-pointer hover:border-indigo-500/30 hover:shadow-indigo-500/5 group":""}
|
|
423
|
+
${r}
|
|
424
|
+
`,onClick:u,children:[u&&s.jsx("div",{className:"absolute inset-0 bg-indigo-500/0 group-hover:bg-indigo-500/[0.02] transition-colors rounded-xl pointer-events-none"}),s.jsx("div",{className:"relative z-10",children:n})]}),Ue=({children:n,variant:r="primary",size:u="md",loading:o=!1,className:h="",disabled:f,...b})=>{const j="inline-flex items-center justify-center rounded-lg font-medium transition-all duration-200 focus:outline-none focus:ring-2 focus:ring-offset-1 focus:ring-offset-[#030712] disabled:opacity-50 disabled:pointer-events-none active:scale-[0.98]",y={primary:"bg-indigo-600 text-white hover:bg-indigo-500 focus:ring-indigo-500 shadow-[0_0_15px_-3px_rgba(79,70,229,0.4)] border border-indigo-500/50 hover:shadow-[0_0_20px_-3px_rgba(79,70,229,0.5)]",secondary:"bg-[#1f2937] text-slate-200 hover:bg-[#374151] focus:ring-slate-500 border border-white/5",danger:"bg-red-600/10 text-red-400 hover:bg-red-600/20 focus:ring-red-500 border border-red-900/50 hover:border-red-500/50",ghost:"bg-transparent text-slate-400 hover:bg-white/5 hover:text-slate-200 focus:ring-slate-400",outline:"border border-slate-700/50 bg-transparent text-slate-300 hover:bg-white/5 hover:border-slate-500 focus:ring-slate-400"},x={sm:"h-8 px-3 text-xs tracking-wide",md:"h-10 px-4 py-2 text-sm",lg:"h-12 px-6 text-base",icon:"h-9 w-9"};return s.jsxs("button",{className:`${j} ${y[r]} ${x[u]} ${h}`,disabled:f||o,...b,children:[o&&s.jsx(op,{className:"mr-2 h-4 w-4 animate-spin"}),n]})},St=({children:n,variant:r="default",className:u=""})=>{const o={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 ${o[r]} ${u}`,children:n})},Np={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"}},CN=({defaultColumn:n,onClose:r,onCreated:u})=>{const[o,h]=U.useState(""),[f,b]=U.useState(""),[j,y]=U.useState(n),[x,S]=U.useState(!1),[C,z]=U.useState(null),{addToast:_}=Zt(),N=async O=>{if(O.preventDefault(),!!o.trim()){S(!0),z(null);try{await iN({title:o.trim(),body:f,column:j}),_({title:"Issue created",message:`"${o.trim()}" added to ${j}`,type:"success"}),u(),r()}catch(k){z(k instanceof Error?k.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(Fr,{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:o,onChange:O=>h(O.target.value),placeholder:"Issue title...",required:!0,className:"w-full bg-slate-950/50 border border-white/10 text-slate-200 rounded-lg px-3 py-2.5 text-sm placeholder-slate-600 focus:outline-none focus:border-indigo-500/50 focus:ring-1 focus:ring-indigo-500/20"})]}),s.jsxs("div",{children:[s.jsx("label",{className:"text-xs font-medium text-slate-400 uppercase tracking-wide block mb-1.5",children:"Column"}),s.jsx("select",{value:j,onChange:O=>y(O.target.value),className:"w-full bg-slate-950/50 border border-white/10 text-slate-200 rounded-lg px-3 py-2.5 text-sm focus:outline-none focus:border-indigo-500/50 appearance-none cursor-pointer",children:Jl.map(O=>s.jsx("option",{value:O,children:O},O))})]}),s.jsxs("div",{children:[s.jsx("label",{className:"text-xs font-medium text-slate-400 uppercase tracking-wide block mb-1.5",children:"Body (optional)"}),s.jsx("textarea",{value:f,onChange:O=>b(O.target.value),placeholder:"Issue description...",rows:5,className:"w-full bg-slate-950/50 border border-white/10 text-slate-200 rounded-lg px-3 py-2.5 text-sm placeholder-slate-600 focus:outline-none focus:border-indigo-500/50 focus:ring-1 focus:ring-indigo-500/20 resize-none font-mono"})]}),C&&s.jsx("p",{className:"text-sm text-red-400",children:C}),s.jsxs("div",{className:"flex justify-end space-x-3 pt-2",children:[s.jsx(Ue,{variant:"ghost",type:"button",onClick:r,children:"Cancel"}),s.jsx(Ue,{type:"submit",disabled:x||!o.trim(),children:x?"Creating...":"Create Issue"})]})]})]})]})},MN=({issue:n,onClose:r,onMoved:u,onClosed:o})=>{const[h,f]=U.useState(!1),[b,j]=U.useState(!1),[y,x]=U.useState(!1),{addToast:S}=Zt(),C=async N=>{if(N!==n.column){f(!0);try{await bp(n.number,N),S({title:"Issue moved",message:`#${n.number} moved to ${N}`,type:"success"}),u(),r()}catch(O){S({title:"Move failed",message:O instanceof Error?O.message:"Failed to move issue",type:"error"})}finally{f(!1)}}},z=async()=>{x(!1),j(!0);try{await cN(n.number),S({title:"Issue closed",message:`#${n.number} closed on GitHub`,type:"success"}),o(),r()}catch(N){S({title:"Close failed",message:N instanceof Error?N.message:"Failed to close issue",type:"error"})}finally{j(!1)}},_=n.column??"Draft";return s.jsxs("div",{className:"fixed inset-0 z-50 flex justify-end",children:[s.jsx("div",{className:"absolute inset-0 bg-black/40 backdrop-blur-sm",onClick:r}),s.jsxs("div",{className:"relative bg-[#0a0f1e] border-l border-white/10 w-full max-w-xl flex flex-col shadow-2xl overflow-hidden",children:[s.jsxs("div",{className:"flex items-start justify-between p-6 border-b border-white/5 flex-shrink-0",children:[s.jsxs("div",{className:"flex-1 min-w-0 pr-4",children:[s.jsxs("div",{className:"flex items-center space-x-2 mb-2",children:[s.jsxs("span",{className:"text-slate-500 text-sm font-mono",children:["#",n.number]}),s.jsx(St,{variant:Np[_].badge,children:_})]}),s.jsx("h2",{className:"text-lg font-semibold text-slate-100 leading-snug",children:n.title}),n.assignees.length>0&&s.jsxs("p",{className:"text-xs text-slate-500 mt-1",children:["Assigned to: ",n.assignees.join(", ")]})]}),s.jsx("button",{onClick:r,className:"p-1.5 rounded-lg hover:bg-white/5 text-slate-500 hover:text-slate-300 transition-colors flex-shrink-0",children:s.jsx(Fr,{className:"h-5 w-5"})})]}),s.jsxs("div",{className:"flex items-center space-x-3 px-6 py-3 border-b border-white/5 flex-shrink-0 flex-wrap gap-y-2",children:[s.jsxs("div",{className:"flex items-center space-x-2",children:[s.jsx("span",{className:"text-xs text-slate-500",children:"Move to:"}),Jl.filter(N=>N!==n.column).map(N=>s.jsx("button",{onClick:()=>C(N),disabled:h,className:"text-xs px-2.5 py-1 rounded-md bg-slate-800 text-slate-300 hover:bg-slate-700 hover:text-slate-100 border border-slate-700 transition-colors disabled:opacity-50",children:N},N))]}),s.jsxs("div",{className:"flex items-center space-x-2 ml-auto",children:[n.url&&!n.url.startsWith("local://")&&s.jsxs("a",{href:n.url,target:"_blank",rel:"noopener noreferrer",className:"flex items-center space-x-1 text-xs text-indigo-400 hover:text-indigo-300 transition-colors",children:[s.jsx(cp,{className:"h-3.5 w-3.5"}),s.jsx("span",{children:"GitHub"})]}),s.jsx("button",{onClick:()=>x(!0),disabled:b,className:"text-xs px-2.5 py-1 rounded-md bg-red-500/10 text-red-400 hover:bg-red-500/20 border border-red-500/20 transition-colors disabled:opacity-50",children:b?"Closing...":"Close Issue"})]})]}),y&&s.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center",children:[s.jsx("div",{className:"absolute inset-0 bg-black/40 backdrop-blur-sm",onClick:()=>x(!1)}),s.jsxs("div",{className:"relative bg-[#0a0f1e] border border-white/10 rounded-xl p-6 max-w-sm w-full mx-4 shadow-2xl",children:[s.jsx("h3",{className:"text-sm font-semibold text-slate-100 mb-2",children:"Close issue?"}),s.jsxs("p",{className:"text-sm text-slate-400 mb-4",children:["Close issue #",n.number,': "',n.title,'"?']}),s.jsxs("div",{className:"flex justify-end space-x-3",children:[s.jsx(Ue,{variant:"ghost",onClick:()=>x(!1),children:"Cancel"}),s.jsx(Ue,{onClick:z,children:"Confirm"})]})]})]}),s.jsx("div",{className:"flex-1 overflow-y-auto p-6",children:n.body?s.jsx("pre",{className:"text-sm text-slate-300 whitespace-pre-wrap font-mono leading-relaxed break-words",children:n.body}):s.jsx("p",{className:"text-slate-500 text-sm italic",children:"No description provided."})})]})]})},ON=({issue:n,onClick:r,onDragStart:u})=>{const[o,h]=U.useState(!1);return s.jsx("div",{className:"relative",draggable:!0,onDragStart:f=>{f.dataTransfer.setData("issueNumber",String(n.number)),f.dataTransfer.effectAllowed="move",h(!0),u(n)},onDragEnd:()=>h(!1),children:s.jsxs(rt,{className:`p-3 cursor-grab hover:border-indigo-500/30 transition-all select-none ${o?"opacity-30":""}`,onClick:r,children:[s.jsxs("span",{className:"text-[10px] font-mono text-slate-600",children:["#",n.number]}),s.jsx("p",{className:"text-xs font-medium text-slate-200 line-clamp-2 mt-0.5 leading-snug",children:n.title}),n.assignees.length>0&&s.jsx("p",{className:"text-[10px] text-slate-500 mt-1.5 truncate",children:n.assignees.join(", ")})]})})},RN=({name:n,issues:r,draggingIssue:u,onIssueClick:o,onNewIssue:h,onMoveIssue:f,onDragStart:b})=>{const j=Np[n],[y,x]=U.useState(!1),S=u!==null&&u.column!==n;return s.jsxs("div",{className:`flex flex-col min-w-[220px] max-w-[220px] h-full rounded-xl transition-colors ${y&&S?"bg-indigo-500/5 ring-1 ring-indigo-500/30":""}`,onDragOver:C=>{S&&(C.preventDefault(),C.dataTransfer.dropEffect="move",x(!0))},onDragLeave:()=>x(!1),onDrop:C=>{C.preventDefault(),x(!1),u&&u.column!==n&&f(u,n)},children:[s.jsxs("div",{className:"flex items-center justify-between mb-3 flex-shrink-0",children:[s.jsxs("div",{className:"flex items-center space-x-2",children:[s.jsx("span",{className:`w-2.5 h-2.5 rounded-full ${j.dot}`}),s.jsx("span",{className:"text-xs font-semibold text-slate-400 uppercase tracking-wider",children:n}),s.jsx("span",{className:"text-[10px] font-bold text-slate-600 bg-slate-800 rounded-full px-1.5 py-0.5",children:r.length})]}),s.jsx("button",{onClick:()=>h(n),className:"p-1 rounded-md hover:bg-white/5 text-slate-600 hover:text-slate-400 transition-colors",title:`Add issue to ${n}`,children:s.jsx(Kl,{className:"h-3.5 w-3.5"})})]}),s.jsx("div",{className:"flex-1 overflow-y-auto space-y-2 pr-1 scrollbar-hide min-h-0",children:r.length===0?s.jsx("div",{className:`border-2 border-dashed rounded-xl h-24 flex items-center justify-center transition-colors ${y&&S?"border-indigo-500/40":"border-slate-800"}`,children:s.jsx("span",{className:"text-xs text-slate-700",children:y&&S?"Drop here":"No issues"})}):r.map(C=>s.jsx(ON,{issue:C,onClick:()=>o(C),onDragStart:b},C.id))})]})},DN=()=>{const[n,r]=U.useState(null),[u,o]=U.useState(null),[h,f]=U.useState(null),[b,j]=U.useState(null),y=U.useRef(!1),{addToast:x,selectedProjectId:S,globalModeLoading:C}=Zt(),{data:z,loading:_,error:N,refetch:O}=Ua(yp,[S],{enabled:!C});U.useEffect(()=>{const D=setInterval(()=>{y.current||O()},3e4);return()=>clearInterval(D)},[O]);const k=U.useCallback(async(D,Q)=>{f(null);const w=b??(z==null?void 0:z.columns);if(!w)return;const K=w,q={};for(const R of Jl)q[R]=(w[R]??[]).filter(ae=>ae.number!==D.number);const Z={...D,column:Q};q[Q]=[...q[Q]??[],Z],j(q),r(R=>(R==null?void 0:R.number)===D.number?Z:R),y.current=!0;try{await bp(D.number,Q),O(),setTimeout(()=>{j(null),y.current=!1},800)}catch(R){j(K),r(ae=>(ae==null?void 0:ae.number)===D.number?D:ae),y.current=!1,x({title:"Move failed",message:R instanceof Error?R.message:"Failed to move issue",type:"error"})}},[x,O,b,z]);if(C||_)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(Ue,{onClick:()=>O(),children:"Retry"})]});if(!z)return null;const P=b??z.columns;return s.jsxs("div",{className:"flex flex-col h-full",children:[s.jsxs("div",{className:"flex items-center justify-between mb-6 flex-shrink-0",children:[s.jsxs("div",{children:[s.jsx("h1",{className:"text-2xl font-bold text-slate-100",children:"Board"}),s.jsxs("p",{className:"text-sm text-slate-500 mt-1",children:[Jl.reduce((D,Q)=>{var w;return D+(((w=P[Q])==null?void 0:w.length)??0)},0)," issues across ",Jl.length," columns"]})]}),s.jsxs(Ue,{onClick:()=>o("Ready"),children:[s.jsx(Kl,{className:"h-4 w-4 mr-2"}),"New Issue"]})]}),s.jsx("div",{className:"flex-1 overflow-x-auto overflow-y-hidden",onDragEnd:()=>f(null),children:s.jsx("div",{className:"flex space-x-4 h-full pb-4",style:{minWidth:`${Jl.length*236}px`},children:Jl.map(D=>s.jsx(RN,{name:D,issues:P[D]??[],draggingIssue:h,onIssueClick:r,onNewIssue:o,onMoveIssue:k,onDragStart:f},D))})}),n&&s.jsx(MN,{issue:n,onClose:()=>r(null),onMoved:()=>O(),onClosed:()=>O()}),u&&s.jsx(CN,{defaultColumn:u,onClose:()=>o(null),onCreated:()=>O()})]})},kN=[{name:"executor",displayName:"Executor",processName:"executor",triggerId:"executor",cancelType:"run",runningLabel:"Running",idleLabel:"Idle"},{name:"reviewer",displayName:"Reviewer",processName:"reviewer",triggerId:"reviewer",cancelType:"review",runningLabel:"Running",idleLabel:"Idle"},{name:"qa",displayName:"QA",processName:"qa",triggerId:"qa",runningLabel:"Running",idleLabel:"Idle"},{name:"auditor",displayName:"Auditor",processName:"audit",triggerId:"audit",runningLabel:"Running",idleLabel:"Idle"},{name:"planner",displayName:"Planner",processName:"planner",triggerId:"planner",runningLabel:"Writing PRDs",idleLabel:"Idle"},{name:"analytics",displayName:"Analytics",processName:"analytics",triggerId:"analytics",runningLabel:"Running",idleLabel:"Idle"},{name:"pr-resolver",displayName:"PR Resolver",processName:"pr-resolver",triggerId:"pr-resolver",runningLabel:"Resolving",idleLabel:"Idle"},{name:"merger",displayName:"Merger",processName:"merger",triggerId:"merger",runningLabel:"Running",idleLabel:"Idle"},{name:"manager",displayName:"Manager",processName:"manager",triggerId:"manager",runningLabel:"Monitoring",idleLabel:"Idle"}],AN=({processes:n,activePrd:r,onCancelProcess:u,onForceClear:o,onViewLog:h,cancellingProcess:f,clearingLock:b,onTriggerJob:j,triggeringJob:y})=>{const x=C=>n.find(z=>z.name===C),S=(C,z)=>C.length<=z?C:C.slice(0,z-1)+"...";return s.jsx("div",{className:"grid grid-cols-2 md:grid-cols-3 lg:grid-cols-9 gap-3",children:kN.map(C=>{const z=x(C.processName),_=(z==null?void 0:z.running)??!1,N=z==null?void 0:z.pid,O=f===C.cancelType,k=_&&C.cancelType,P=!_&&C.name==="executor"&&r,D=_?N?`PID: ${N}`:C.runningLabel:C.idleLabel,Q=_&&C.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 ${_?"bg-green-950/30 border-green-800/50":"bg-slate-950/50 border-slate-800"}`,children:[s.jsx("div",{className:`h-2.5 w-2.5 rounded-full flex-shrink-0 ${_?"bg-green-500 animate-pulse shadow-[0_0_8px_rgba(34,197,94,0.5)]":"bg-slate-700"}`}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("div",{className:`text-sm font-medium ${_?"text-slate-200":"text-slate-400"}`,children:C.displayName}),s.jsx("div",{className:"text-xs text-slate-500 truncate",children:Q?s.jsxs("span",{className:"flex items-center gap-1",children:[s.jsx(Yf,{className:"h-3 w-3 flex-shrink-0"}),Q]}):D})]}),s.jsxs("div",{className:"flex-shrink-0",children:[k&&s.jsx("button",{onClick:()=>C.cancelType&&u(C.cancelType),disabled:O,className:"p-1 text-red-400 hover:text-red-300 hover:bg-red-500/10 rounded transition-colors disabled:opacity-50",title:"Stop process",children:s.jsx(Pg,{className:"h-3.5 w-3.5"})}),P&&s.jsx("button",{onClick:o,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(Pg,{className:"h-3.5 w-3.5"})}),!k&&!P&&_&&s.jsx("button",{onClick:h,className:"p-1 text-slate-400 hover:text-slate-300 hover:bg-white/5 rounded transition-colors",title:"View log",children:s.jsx(Yf,{className:"h-3.5 w-3.5"})}),!_&&!P&&s.jsx("button",{onClick:()=>j(C.triggerId),disabled:y!==null,className:"p-1 text-slate-500 hover:text-green-400 hover:bg-green-500/10 rounded transition-colors disabled:opacity-50",title:`Run ${C.displayName}`,children:y===C.triggerId?s.jsx("div",{className:"h-3.5 w-3.5 border-2 border-current border-t-transparent rounded-full animate-spin"}):s.jsx(pn,{className:"h-3.5 w-3.5"})})]})]},C.name)})})};function _N(n){return`${Math.round(n*100)}%`}function Qg(n){return new Date(n).toLocaleDateString([],{month:"short",day:"numeric"})}function Xg(n){return(n==null?void 0:n.replace(/_/g," "))||"uncategorized"}const zN=({activePatterns:n,augmentations:r,topFailurePatterns:u,updatingAugmentationId:o=null,onAugmentationAction:h})=>s.jsxs("div",{className:"space-y-6","data-testid":"feedback-pattern-list",children:[s.jsxs("div",{className:"grid grid-cols-1 gap-6 lg:grid-cols-2",children:[s.jsxs("section",{className:"space-y-3",children:[s.jsxs("div",{className:"flex items-center justify-between gap-3",children:[s.jsx("h3",{className:"text-sm font-semibold text-slate-200",children:"Active Patterns"}),s.jsx(St,{variant:"neutral",children:n.length})]}),n.length===0?s.jsx("p",{className:"rounded-lg border border-slate-800 bg-slate-950/40 px-3 py-4 text-sm text-slate-500",children:"No active feedback patterns."}):s.jsx("div",{className:"divide-y divide-slate-800/70 rounded-lg border border-slate-800",children:n.map(f=>s.jsxs("div",{className:"p-3",children:[s.jsxs("div",{className:"flex items-start justify-between gap-3",children:[s.jsxs("div",{className:"min-w-0",children:[s.jsx("div",{className:"truncate text-sm font-medium text-slate-200",title:f.title,children:f.title}),s.jsx("p",{className:"mt-1 line-clamp-2 text-xs text-slate-500",children:f.description})]}),s.jsx(St,{variant:"info",className:"shrink-0 capitalize",children:f.jobType})]}),s.jsxs("div",{className:"mt-3 flex flex-wrap items-center gap-2 text-[11px] text-slate-500",children:[s.jsx("span",{className:"capitalize",children:Xg(f.category)}),s.jsxs("span",{children:[f.sampleCount," samples"]}),s.jsxs("span",{children:[_N(f.confidence)," confidence"]})]})]},f.id))})]}),s.jsxs("section",{className:"space-y-3",children:[s.jsxs("div",{className:"flex items-center justify-between gap-3",children:[s.jsx("h3",{className:"text-sm font-semibold text-slate-200",children:"Top Failure Patterns"}),s.jsx(St,{variant:"neutral",children:u.length})]}),u.length===0?s.jsx("p",{className:"rounded-lg border border-slate-800 bg-slate-950/40 px-3 py-4 text-sm text-slate-500",children:"No repeated failure signatures yet."}):s.jsx("div",{className:"divide-y divide-slate-800/70 rounded-lg border border-slate-800",children:u.map(f=>s.jsxs("div",{className:"p-3",children:[s.jsxs("div",{className:"flex items-start justify-between gap-3",children:[s.jsxs("div",{className:"min-w-0",children:[s.jsx("div",{className:"truncate text-sm font-medium text-slate-200",title:f.signature??f.key,children:f.signature||Xg(f.category)}),s.jsxs("div",{className:"mt-1 flex flex-wrap items-center gap-2 text-[11px] text-slate-500",children:[s.jsx("span",{className:"capitalize",children:f.jobType}),s.jsx("span",{className:"font-mono",children:f.providerKey})]})]}),s.jsx(St,{variant:"warning",className:"shrink-0",children:f.sampleCount})]}),s.jsxs("div",{className:"mt-2 flex items-center gap-1.5 text-[11px] text-slate-500",children:[s.jsx(X1,{className:"h-3 w-3"}),s.jsxs("span",{children:["Last seen ",Qg(f.lastSeenAt)]})]})]},f.key))})]})]}),s.jsxs("section",{className:"space-y-3",children:[s.jsxs("div",{className:"flex items-center justify-between gap-3",children:[s.jsx("h3",{className:"text-sm font-semibold text-slate-200",children:"Active Augmentations"}),s.jsx(St,{variant:r.length>0?"success":"neutral",children:r.length})]}),r.length===0?s.jsx("p",{className:"rounded-lg border border-slate-800 bg-slate-950/40 px-3 py-4 text-sm text-slate-500",children:"No active prompt augmentations."}):s.jsx("div",{className:"overflow-x-auto rounded-lg border border-slate-800",children:s.jsxs("table",{className:"w-full min-w-[720px] text-left text-sm",children:[s.jsx("thead",{className:"border-b border-slate-800 bg-slate-900/30 text-[11px] uppercase tracking-wider text-slate-500",children:s.jsxs("tr",{children:[s.jsx("th",{className:"px-4 py-3 font-semibold",children:"Prompt Snippet"}),s.jsx("th",{className:"px-4 py-3 font-semibold",children:"Job"}),s.jsx("th",{className:"px-4 py-3 text-right font-semibold",children:"Use"}),s.jsx("th",{className:"px-4 py-3 text-right font-semibold",children:"Expires"}),s.jsx("th",{className:"px-4 py-3 text-right font-semibold",children:"Actions"})]})}),s.jsx("tbody",{className:"divide-y divide-slate-800/60",children:r.map(f=>{const b=o===f.id,j=f.appliedCount>0?`${Math.round(f.successCount/f.appliedCount*100)}%`:"new";return s.jsxs("tr",{className:"hover:bg-slate-800/20",children:[s.jsx("td",{className:"px-4 py-3",children:s.jsx("div",{className:"line-clamp-2 max-w-xl text-sm text-slate-300",title:f.promptText,children:f.promptText})}),s.jsx("td",{className:"px-4 py-3",children:s.jsx(St,{variant:"info",className:"capitalize",children:f.jobType})}),s.jsxs("td",{className:"px-4 py-3 text-right text-xs text-slate-400",children:[f.appliedCount," applied · ",j]}),s.jsx("td",{className:"px-4 py-3 text-right text-xs text-slate-500",children:f.expiresAt?Qg(f.expiresAt):"No expiry"}),s.jsx("td",{className:"px-4 py-3",children:s.jsxs("div",{className:"flex justify-end gap-2",children:[s.jsxs(Ue,{variant:"outline",size:"sm",disabled:b,onClick:()=>h(f.id,"disable"),children:[s.jsx(G1,{className:"mr-1.5 h-3.5 w-3.5"}),"Disable"]}),s.jsxs(Ue,{variant:"ghost",size:"sm",disabled:b,onClick:()=>h(f.id,"expire"),className:"text-slate-500 hover:text-amber-300",children:[s.jsx(Uj,{className:"mr-1.5 h-3.5 w-3.5"}),"Expire"]})]})})]},f.id)})})]})})]})]});function su(n){return n===null?"—":`${Math.round(n*100)}%`}function LN(n){return n===null?"—":n<60?`${Math.round(n)}s`:`${Math.floor(n/60)}m ${Math.round(n%60)}s`}function UN(n,r){return Object.entries(n).sort(([,u],[,o])=>o-u).slice(0,r)}function Io(n){return Object.entries(n).sort(([,r],[,u])=>u.totalCount-r.totalCount).slice(0,5).map(([r,u])=>[r,`${su(u.successRate)} · ${u.totalCount} runs`])}function HN(n,r){if(n===null||r===null)return"Waiting for comparable data";const u=Math.round((n-r)*100);return u===0?"Flat vs 30 days":`${u>0?"+":""}${u} pts vs 30 days`}function qN(n,r){return n===null||r===null?"neutral":n>=r?"success":"warning"}const Qo=({label:n,value:r,detail:u})=>s.jsxs("div",{className:"rounded-lg border border-slate-800 bg-slate-950/40 p-4",children:[s.jsx("div",{className:"text-[11px] font-semibold uppercase tracking-[0.16em] text-slate-500",children:n}),s.jsx("div",{className:"mt-2 text-2xl font-bold text-slate-100",children:r}),s.jsx("div",{className:"mt-1 text-xs text-slate-500",children:u})]}),VN=()=>{const{addToast:n,selectedProjectId:r,globalModeLoading:u}=Zt(),[o,h]=_e.useState(null),{data:f,loading:b,error:j,refetch:y}=Ua(Kj,[r],{enabled:!u}),{data:x,loading:S,error:C,refetch:z}=Ua(eN,[r],{enabled:!u}),_=()=>{y(),z()},N=async(M,J)=>{h(M);try{await tN(M,{action:J}),n({title:J==="expire"?"Augmentation Expired":"Augmentation Disabled",message:"Prompt augmentation state was updated.",type:"success"}),_()}catch(le){n({title:"Update Failed",message:le instanceof Error?le.message:"Failed to update augmentation",type:"error"})}finally{h(null)}},O=b||S,k=j||C,P=(f==null?void 0:f.windows.last7Days)??null,D=(f==null?void 0:f.windows.last30Days)??null,Q=((x==null?void 0:x.patterns)??[]).filter(M=>M.status==="active").sort((M,J)=>J.confidence-M.confidence||J.sampleCount-M.sampleCount).slice(0,5),w=(x==null?void 0:x.topFailurePatterns.slice(0,5))??[],K=UN((D==null?void 0:D.byFailureCategory)??{},5),q=Math.max(...K.map(([,M])=>M),1),Z=((D==null?void 0:D.totalCount)??0)>0||((P==null?void 0:P.totalCount)??0)>0,R=qN((P==null?void 0:P.successRate)??null,(D==null?void 0:D.successRate)??null),ae=R==="success"?s.jsx(Pj,{className:"h-4 w-4"}):R==="warning"?s.jsx(Vj,{className:"h-4 w-4"}):null;return s.jsxs("section",{className:"space-y-4","aria-labelledby":"feedback-performance-heading",children:[s.jsxs("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[s.jsxs("div",{children:[s.jsx("h2",{id:"feedback-performance-heading",className:"text-lg font-semibold text-slate-200",children:"Feedback Performance"}),s.jsx("p",{className:"mt-1 text-sm text-slate-500",children:"Outcome trends, repeated failures, and prompt augmentations."})]}),s.jsxs(Ue,{variant:"outline",size:"sm",onClick:_,disabled:O,children:[s.jsx(hc,{className:`mr-1.5 h-4 w-4 ${O?"animate-spin":""}`}),"Refresh"]})]}),s.jsx(rt,{className:"p-5",children:O&&!f?s.jsx("div",{className:"py-10 text-center text-sm text-slate-500",children:"Loading feedback performance..."}):k?s.jsxs("div",{className:"flex items-center gap-3 rounded-lg border border-red-900/50 bg-red-950/20 p-4 text-sm text-red-300",children:[s.jsx(vn,{className:"h-5 w-5 shrink-0"}),s.jsx("span",{children:k.message})]}):!f||!Z?s.jsxs("div",{className:"py-10 text-center",children:[s.jsx("div",{className:"text-sm font-medium text-slate-300",children:"No feedback outcomes recorded yet."}),s.jsx("p",{className:"mx-auto mt-2 max-w-md text-sm text-slate-500",children:"This panel will populate after executor, reviewer, QA, audit, planner, or merge jobs complete."})]}):s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"grid grid-cols-1 gap-3 md:grid-cols-4",children:[s.jsx(Qo,{label:"7 Day Success",value:su((P==null?void 0:P.successRate)??null),detail:`${(P==null?void 0:P.successCount)??0} of ${(P==null?void 0:P.totalCount)??0} completed`}),s.jsx(Qo,{label:"30 Day Success",value:su((D==null?void 0:D.successRate)??null),detail:`${(D==null?void 0:D.successCount)??0} of ${(D==null?void 0:D.totalCount)??0} completed`}),s.jsx(Qo,{label:"Failure Load",value:String(((D==null?void 0:D.failureCount)??0)+((D==null?void 0:D.timeoutCount)??0)),detail:`${(D==null?void 0:D.rateLimitedCount)??0} rate limited`}),s.jsx(Qo,{label:"Avg Duration",value:LN((D==null?void 0:D.averageDurationSeconds)??null),detail:"Last 30 days"})]}),s.jsxs("div",{className:"grid grid-cols-1 gap-6 lg:grid-cols-2",children:[s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"flex items-center justify-between gap-3",children:[s.jsx("h3",{className:"text-sm font-semibold text-slate-200",children:"Success-Rate Trend"}),s.jsxs(St,{variant:R,className:"gap-1",children:[ae,HN((P==null?void 0:P.successRate)??null,(D==null?void 0:D.successRate)??null)]})]}),s.jsx("div",{className:"space-y-3",children:[{label:"Last 7 days",value:(P==null?void 0:P.successRate)??0},{label:"Last 30 days",value:(D==null?void 0:D.successRate)??0}].map(M=>s.jsxs("div",{className:"space-y-1",children:[s.jsxs("div",{className:"flex justify-between text-xs",children:[s.jsx("span",{className:"text-slate-400",children:M.label}),s.jsx("span",{className:"font-mono text-slate-300",children:su(M.value)})]}),s.jsx("div",{className:"h-2 overflow-hidden rounded-full bg-slate-900",children:s.jsx("div",{className:"h-full rounded-full bg-emerald-500",style:{width:`${Math.max(4,Math.round(M.value*100))}%`}})})]},M.label))})]}),s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"flex items-center justify-between gap-3",children:[s.jsx("h3",{className:"text-sm font-semibold text-slate-200",children:"Failure Categories"}),s.jsx(St,{variant:"neutral",children:K.length})]}),K.length===0?s.jsx("p",{className:"rounded-lg border border-slate-800 bg-slate-950/40 px-3 py-4 text-sm text-slate-500",children:"No categorized failures in the last 30 days."}):s.jsx("div",{className:"space-y-3",children:K.map(([M,J])=>s.jsxs("div",{className:"space-y-1",children:[s.jsxs("div",{className:"flex justify-between gap-3 text-xs",children:[s.jsx("span",{className:"truncate capitalize text-slate-400",children:M.replace(/_/g," ")}),s.jsx("span",{className:"font-mono text-slate-300",children:J})]}),s.jsx("div",{className:"h-2 overflow-hidden rounded-full bg-slate-900",children:s.jsx("div",{className:"h-full rounded-full bg-red-500",style:{width:`${Math.max(8,Math.round(J/q*100))}%`}})})]},M))})]})]}),s.jsxs("div",{className:"grid grid-cols-1 gap-6 lg:grid-cols-2",children:[s.jsxs("div",{className:"space-y-3",children:[s.jsxs("div",{className:"flex items-center justify-between gap-3",children:[s.jsx("h3",{className:"text-sm font-semibold text-slate-200",children:"Job Breakdown"}),s.jsx(St,{variant:"neutral",children:Object.keys((D==null?void 0:D.byJobType)??{}).length})]}),Io((D==null?void 0:D.byJobType)??{}).length===0?s.jsx("p",{className:"rounded-lg border border-slate-800 bg-slate-950/40 px-3 py-4 text-sm text-slate-500",children:"No job-specific outcomes in the last 30 days."}):s.jsx("div",{className:"divide-y divide-slate-800/70 rounded-lg border border-slate-800",children:Io((D==null?void 0:D.byJobType)??{}).map(([M,J])=>s.jsxs("div",{className:"flex items-center justify-between gap-3 px-3 py-2 text-sm",children:[s.jsx("span",{className:"capitalize text-slate-300",children:M}),s.jsx("span",{className:"text-xs text-slate-500",children:J})]},M))})]}),s.jsxs("div",{className:"space-y-3",children:[s.jsxs("div",{className:"flex items-center justify-between gap-3",children:[s.jsx("h3",{className:"text-sm font-semibold text-slate-200",children:"Provider Breakdown"}),s.jsx(St,{variant:"neutral",children:Object.keys((D==null?void 0:D.byProvider)??{}).length})]}),Io((D==null?void 0:D.byProvider)??{}).length===0?s.jsx("p",{className:"rounded-lg border border-slate-800 bg-slate-950/40 px-3 py-4 text-sm text-slate-500",children:"No provider-specific outcomes in the last 30 days."}):s.jsx("div",{className:"divide-y divide-slate-800/70 rounded-lg border border-slate-800",children:Io((D==null?void 0:D.byProvider)??{}).map(([M,J])=>s.jsxs("div",{className:"flex items-center justify-between gap-3 px-3 py-2 text-sm",children:[s.jsx("span",{className:"font-mono text-slate-300",children:M}),s.jsx("span",{className:"text-xs text-slate-500",children:J})]},M))})]})]})]})}),s.jsx(rt,{className:"p-5",children:s.jsx(zN,{activePatterns:Q,augmentations:(f==null?void 0:f.activeAugmentations)??[],topFailurePatterns:w,updatingAugmentationId:o,onAugmentationAction:N})})]})},BN={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"},PN=()=>{var fe,ve;const n=gu(),[r,u]=U.useState(null),[o,h]=U.useState(!1),[f,b]=U.useState(null),[j,y]=U.useState(!1),{setProjectName:x,addToast:S,selectedProjectId:C,globalModeLoading:z,status:_}=Zt(),{data:N}=Ua(xp,[C],{enabled:!z}),{data:O,loading:k}=Ua(()=>yp().catch(()=>null),[C],{enabled:!z}),P=_;if(_e.useEffect(()=>{P!=null&&P.projectName&&x(P.projectName)},[P,x]),z)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 D=P.prs.length,Q=P.prs.filter(ue=>ue.reviewScore!==null&&ue.reviewScore<70).length,w=((fe=O==null?void 0:O.columns.Ready)==null?void 0:fe.length)??0,K=((ve=O==null?void 0:O.columns["In Progress"])==null?void 0:ve.length)??0,q=async ue=>{u(ue);try{const G=await rN(ue),ne=G.results.every(he=>he.success);S({title:ne?"Process Cancelled":"Cancel Failed",message:G.results.map(he=>he.message).join("; "),type:ne?"success":"error"})}catch(G){S({title:"Cancel Failed",message:G instanceof Error?G.message:"Failed to cancel process",type:"error"})}finally{u(null)}},Z=async()=>{h(!0);try{await oN(),S({title:"Lock Cleared",message:"Stale executor state removed",type:"success"})}catch(ue){S({title:"Clear Failed",message:ue instanceof Error?ue.message:"Failed to clear lock",type:"error"})}finally{h(!1)}},R=async ue=>{b(ue);try{await pp(ue==="planner"?"slicer":ue),S({title:"Job Triggered",message:`${ue[0].toUpperCase()+ue.slice(1)} job has been queued.`,type:"success"})}catch(G){S({title:"Trigger Failed",message:G instanceof Error?G.message:`Failed to trigger ${ue}`,type:"error"})}finally{b(null)}},ae=async()=>{if(N){y(!0);try{N.paused?(await uc(),S({title:"Schedule Resumed",message:"Cron schedules are active.",type:"success"})):(await vp(),S({title:"Schedule Paused",message:"Cron schedules are deactivated.",type:"info"}))}catch(ue){S({title:"Action Failed",message:ue instanceof Error?ue.message:"Toggle failed",type:"error"})}finally{y(!1)}}},M=ue=>{if(!ue)return"Not scheduled";try{const G=new Date(ue),ne=new Date,he=G.getTime()-ne.getTime(),me=Math.floor(he/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"}},le=(()=>{var ne,he,me,ze,H,se,ge;if(N!=null&&N.paused)return null;const ue=[{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:((ne=N==null?void 0:N.qa)==null?void 0:ne.nextRun)??null},{agent:"Auditor",nextRun:((he=N==null?void 0:N.audit)==null?void 0:he.nextRun)??null},{agent:"Planner",nextRun:((me=N==null?void 0:N.planner)==null?void 0:me.nextRun)??null},{agent:"Analytics",nextRun:((ze=N==null?void 0:N.analytics)==null?void 0:ze.nextRun)??null},{agent:"PR Resolver",nextRun:((H=N==null?void 0:N.prResolver)==null?void 0:H.nextRun)??null},{agent:"Merger",nextRun:((se=N==null?void 0:N.merger)==null?void 0:se.nextRun)??null},{agent:"Manager",nextRun:((ge=N==null?void 0:N.manager)==null?void 0:ge.nextRun)??null}];let G=null;for(const pe of ue)pe.nextRun&&(!G||new Date(pe.nextRun)<new Date(G.nextRun))&&(G=pe);return G?{agent:G.agent,time:M(G.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(rt,{className:"p-5",onClick:()=>n("/board"),children:[s.jsxs("div",{className:"flex justify-between items-start",children:[s.jsxs("div",{children:[s.jsx("p",{className:"text-sm font-medium text-slate-500",children:"Board Ready"}),s.jsx("h3",{className:"text-3xl font-bold text-slate-100 mt-1",children:w})]}),s.jsx("div",{className:"p-2 bg-green-500/10 rounded-lg text-green-400",children:s.jsx(yc,{className:"h-5 w-5"})})]}),s.jsx("p",{className:"text-xs text-slate-500 mt-4",children:"issues ready to start"})]}),s.jsxs(rt,{className:"p-5",onClick:()=>n("/board"),children:[s.jsxs("div",{className:"flex justify-between items-start",children:[s.jsxs("div",{children:[s.jsx("p",{className:"text-sm font-medium text-slate-500",children:"In Progress"}),s.jsx("h3",{className:"text-3xl font-bold text-slate-100 mt-1",children:K})]}),s.jsx("div",{className:"p-2 bg-blue-500/10 rounded-lg text-blue-400",children:s.jsx(lp,{className:"h-5 w-5"})})]}),s.jsx("p",{className:"text-xs text-slate-500 mt-4",children:"issues in progress"})]}),s.jsxs(rt,{className:"p-5",onClick:()=>n("/prs"),children:[s.jsxs("div",{className:"flex justify-between items-start",children:[s.jsxs("div",{children:[s.jsx("p",{className:"text-sm font-medium text-slate-500",children:"Open PRs"}),s.jsx("h3",{className:"text-3xl font-bold text-slate-100 mt-1",children:D})]}),s.jsx("div",{className:"p-2 bg-purple-500/10 rounded-lg text-purple-400",children:s.jsx(ip,{className:"h-5 w-5"})})]}),s.jsx("p",{className:`text-xs mt-4 ${Q>0?"text-red-400 font-medium":"text-slate-500"}`,children:Q>0?`${Q} need work`:"All passing"})]}),s.jsxs(rt,{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:ae,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(hc,{className:"h-5 w-5 animate-spin"}):N!=null&&N.paused?s.jsx(pn,{className:"h-5 w-5 fill-current"}):P.crontab.installed?s.jsx(cu,{className:"h-5 w-5"}):s.jsx(sp,{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(rt,{className:"p-4",children:[s.jsxs("div",{className:"flex items-center justify-between mb-3",children:[s.jsx("h2",{className:"text-base font-semibold text-slate-200",children:"Agents"}),s.jsx("button",{onClick:()=>n("/logs"),className:"text-xs text-slate-400 hover:text-slate-300 transition-colors",children:"View logs"})]}),s.jsx(AN,{processes:P.processes,activePrd:P.activePrd,onCancelProcess:q,onForceClear:Z,onViewLog:()=>n("/logs"),cancellingProcess:r,clearingLock:o,onTriggerJob:R,triggeringJob:f})]}),le?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:le.agent}),s.jsx("span",{children:le.time})]}),s.jsxs("button",{onClick:()=>n("/scheduling"),className:"text-sm text-indigo-400 hover:text-indigo-300 flex items-center transition-colors",children:["Manage Schedules ",s.jsx(Lg,{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(cu,{className:"h-3.5 w-3.5"}),s.jsx("span",{children:"Automation is paused"})]}),s.jsxs("button",{onClick:ae,disabled:j,className:"text-sm text-emerald-400 hover:text-emerald-300 flex items-center transition-colors disabled:opacity-50",children:[j?s.jsx(hc,{className:"h-3.5 w-3.5 mr-1.5 animate-spin"}):s.jsx(pn,{className:"h-3.5 w-3.5 mr-1.5 fill-current"}),"Resume"]})]}):null,s.jsx(VN,{}),s.jsxs("div",{className:"mt-6",children:[s.jsxs("div",{className:"flex items-center justify-between mb-4",children:[s.jsx("h2",{className:"text-lg font-semibold text-slate-200",children:"GitHub Board"}),s.jsxs("button",{onClick:()=>n("/board"),className:"text-sm text-indigo-400 hover:text-indigo-300 flex items-center transition-colors",children:["View board ",s.jsx(Lg,{className:"ml-1 h-3 w-3"})]})]}),s.jsx(rt,{className:"p-4",children:k?s.jsx("div",{className:"flex items-center justify-center py-8",children:s.jsx("div",{className:"text-slate-400 text-sm",children:"Loading board..."})}):O?s.jsx("div",{className:"flex flex-wrap gap-3",children:Jl.map(ue=>{var ne;const G=((ne=O.columns[ue])==null?void 0:ne.length)??0;return s.jsxs("button",{onClick:()=>n("/board"),className:`inline-flex items-center space-x-2 px-3 py-2 rounded-lg ring-1 ring-inset transition-colors hover:opacity-80 ${BN[ue]}`,children:[s.jsx("span",{className:"text-xs font-medium",children:ue}),s.jsx("span",{className:"text-xs font-bold",children:G})]},ue)})}):s.jsxs("p",{className:"text-sm text-slate-500 italic",children:["Board not configured — run ",s.jsx("code",{className:"font-mono bg-slate-800 px-1.5 py-0.5 rounded text-indigo-300 text-xs",children:"night-watch board setup"})," to enable."]})})]})]})},$N=()=>{const[n,r]=U.useState(!0),[u,o]=U.useState(""),[h,f]=U.useState("executor"),b=U.useRef(null),{selectedProjectId:j,globalModeLoading:y}=Zt(),x=Zt(D=>D.status),{data:S,loading:C,error:z,refetch:_}=Ua(()=>aN(h,500),[h,j],{enabled:!y}),N=(S==null?void 0:S.lines)||[];U.useEffect(()=>{n&&b.current&&(b.current.scrollTop=b.current.scrollHeight)},[N,n]),U.useEffect(()=>{if(!n)return;const D=window.setInterval(()=>{_()},3e3);return()=>window.clearInterval(D)},[n,h,_]);const O=N.filter(D=>D.toLowerCase().includes(u.toLowerCase())),k=D=>{f(D),o("")},P=D=>{if(!(x!=null&&x.processes))return!1;const Q=x.processes.find(w=>w.name===D);return(Q==null?void 0:Q.running)??!1};return z?s.jsxs("div",{className:"flex flex-col items-center justify-center h-full space-y-4",children:[s.jsx(vn,{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:z.message}),s.jsx(Ue,{onClick:()=>_(),children:"Retry"})]}):s.jsxs("div",{className:"flex flex-col h-[calc(100vh-8rem)]",children:[s.jsxs("div",{className:"flex items-center justify-between mb-4 bg-slate-900 p-2 rounded-lg border border-slate-800 shadow-sm",children:[s.jsxs("div",{className:"flex items-center space-x-2",children:[s.jsxs("div",{className:"relative group",children:[s.jsx("input",{type:"text",placeholder:"Filter logs...",className:"pl-9 pr-4 py-1.5 rounded-md border border-slate-700 bg-slate-950 text-slate-200 text-sm focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:border-transparent w-64 placeholder:text-slate-600",value:u,onChange:D=>o(D.target.value)}),s.jsx(Gr,{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:fp.map(({processName:D,label:Q})=>s.jsx("button",{onClick:()=>k(D),className:`px-3 py-1.5 rounded text-sm font-medium transition-colors ${h===D?"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:Q}),P(D)&&s.jsx("div",{className:"h-2 w-2 bg-green-500 rounded-full animate-pulse"})]})},D))})]}),s.jsxs("div",{className:"flex items-center space-x-2",children:[s.jsxs(Ue,{size:"sm",variant:"ghost",onClick:()=>_(),children:[s.jsx(Hg,{className:"h-4 w-4 mr-2"}),"Refresh"]}),s.jsxs(Ue,{size:"sm",variant:"ghost",onClick:()=>r(!n),children:[n?s.jsx(cu,{className:"h-4 w-4 mr-2"}):s.jsx(pn,{className:"h-4 w-4 mr-2"}),n?"Pause":"Resume"]})]})]}),s.jsxs("div",{className:"flex-1 bg-slate-900 rounded-xl overflow-hidden shadow-inner border border-slate-800 flex flex-col relative",children:[s.jsxs("div",{className:"bg-slate-950/50 backdrop-blur text-xs text-slate-500 px-4 py-1.5 flex justify-between border-b border-slate-800",children:[s.jsxs("span",{children:["File: ",h,".log"]}),s.jsxs("span",{children:[O.length," lines"]})]}),s.jsxs("div",{ref:b,className:"flex-1 overflow-y-auto p-4 font-mono text-sm terminal-scroll bg-slate-900",children:[C?s.jsx("div",{className:"flex items-center justify-center h-full text-slate-500",children:"Loading logs..."}):O.length===0?s.jsx("div",{className:"flex items-center justify-center h-full text-slate-500",children:u?"No logs match your filter":"No logs yet — logs will appear after the first run"}):O.map((D,Q)=>{const w=D.includes("[ERROR]"),K=D.includes("[WARN]");return s.jsxs("div",{className:`leading-6 hover:bg-slate-800/50 px-2 rounded -mx-2 ${w?"text-red-400":K?"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:Q+1}),D]},Q)}),n&&s.jsx("div",{className:"h-4"})," "]}),!n&&s.jsxs("div",{className:"absolute bottom-4 right-4 bg-indigo-600 text-white px-3 py-1.5 rounded-full shadow-lg shadow-indigo-900/40 text-xs font-medium flex items-center cursor-pointer hover:bg-indigo-500 transition-colors",onClick:()=>r(!0),children:[s.jsx(Hg,{className:"h-4 w-4 mr-2"}),"Scroll to bottom"]})]})]})},YN=()=>{const[n,r]=U.useState(null),[u,o]=U.useState(!1),[h,f]=U.useState("all"),[b,j]=U.useState("number"),[y,x]=U.useState("desc"),{addToast:S,selectedProjectId:C,globalModeLoading:z}=Zt(),{data:_,loading:N,error:O,refetch:k}=Ua(gp,[C],{enabled:!z}),P=_??[],D=M=>{switch(M){case"pass":return s.jsx(yc,{className:"h-4 w-4 text-green-500"});case"fail":return s.jsx(Z1,{className:"h-4 w-4 text-red-500"});case"pending":return s.jsx(op,{className:"h-4 w-4 text-amber-500 animate-spin"});default:return s.jsx(vn,{className:"h-4 w-4 text-slate-500"})}},Q=M=>{switch(M){case"pass":return"All CI checks passed";case"fail":return"One or more CI checks failed";case"pending":return"CI checks are still running";default:return"No CI data available"}},w=M=>M===null?"No review decision yet":M===100?"PR has been approved":M===0?"Changes have been requested":`Review score: ${M}`,K=U.useMemo(()=>P.filter(M=>{switch(h){case"needs-work":return M.ciStatus==="fail"||M.reviewScore===0;case"pending":return M.ciStatus==="pending"||M.ciStatus==="unknown"||M.reviewScore===null;case"passed":return M.ciStatus==="pass"&&M.reviewScore===100;case"all":default:return!0}}),[P,h]),q=U.useMemo(()=>[...K].sort((J,le)=>{let fe=0;switch(b){case"number":fe=J.number-le.number;break;case"title":fe=J.title.localeCompare(le.title);break;case"branch":fe=J.branch.localeCompare(le.branch);break;case"ciStatus":{const ve={fail:0,pending:1,unknown:2,pass:3};fe=(ve[J.ciStatus]??2)-(ve[le.ciStatus]??2);break}case"reviewScore":{const ve=J.reviewScore??-1,ue=le.reviewScore??-1;fe=ve-ue;break}}return y==="asc"?fe:-fe}),[K,b,y]),Z=M=>{b===M?x(y==="asc"?"desc":"asc"):(j(M),x("desc"))},R=M=>b!==M?s.jsx(j1,{className:"h-3 w-3 text-slate-600"}):y==="asc"?s.jsx(w1,{className:"h-3 w-3 text-indigo-400"}):s.jsx(v1,{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(O)return s.jsxs("div",{className:"flex flex-col items-center justify-center h-full space-y-4",children:[s.jsx(vn,{className:"h-12 w-12 text-red-400"}),s.jsx("div",{className:"text-slate-300",children:"Failed to load PRs"}),s.jsx("div",{className:"text-sm text-slate-500",children:O.message}),s.jsx(Ue,{onClick:()=>k(),children:"Retry"})]});const ae=async()=>{o(!0);try{const M=await sN();S({title:"Reviewer Started",message:M.pid?`Started with PID ${M.pid}`:"Reviewer started",type:"success"})}catch(M){S({title:"Reviewer Failed",message:M instanceof Error?M.message:"Failed to start reviewer",type:"error"})}finally{o(!1)}};return s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:"flex space-x-1",children:[s.jsx("button",{onClick:()=>f("all"),className:`px-3 py-1 rounded-full text-xs font-medium cursor-pointer border transition-colors ${h==="all"?"bg-slate-800 text-slate-200 border-slate-700":"text-slate-500 hover:bg-slate-800 hover:text-slate-300 border-transparent"}`,children:"All"}),s.jsx("button",{onClick:()=>f("needs-work"),className:`px-3 py-1 rounded-full text-xs font-medium cursor-pointer border transition-colors ${h==="needs-work"?"bg-red-900/50 text-red-300 border-red-800":"text-slate-500 hover:bg-slate-800 hover:text-slate-300 border-transparent"}`,children:"Needs Work"}),s.jsx("button",{onClick:()=>f("pending"),className:`px-3 py-1 rounded-full text-xs font-medium cursor-pointer border transition-colors ${h==="pending"?"bg-amber-900/50 text-amber-300 border-amber-800":"text-slate-500 hover:bg-slate-800 hover:text-slate-300 border-transparent"}`,children:"Pending"}),s.jsx("button",{onClick:()=>f("passed"),className:`px-3 py-1 rounded-full text-xs font-medium cursor-pointer border transition-colors ${h==="passed"?"bg-green-900/50 text-green-300 border-green-800":"text-slate-500 hover:bg-slate-800 hover:text-slate-300 border-transparent"}`,children:"Passed"})]}),s.jsxs(Ue,{size:"sm",onClick:ae,disabled:u,children:[s.jsx(Gr,{className:"h-4 w-4 mr-2"}),u?"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:[q.map(M=>s.jsxs("tr",{className:"hover:bg-slate-800/50 cursor-pointer transition-colors",onClick:()=>r(n===M.number?null:M.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:["#",M.number]}),s.jsx("span",{className:"font-medium text-slate-200",children:M.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:M.branch})}),s.jsx("td",{className:"px-6 py-4",children:s.jsxs("div",{className:"flex items-center space-x-2",title:Q(M.ciStatus),children:[D(M.ciStatus),s.jsx("span",{className:"text-sm capitalize text-slate-400",children:M.ciStatus})]})}),s.jsx("td",{className:"px-6 py-4",children:M.reviewScore!==null?s.jsxs("div",{className:"flex items-center space-x-2",title:w(M.reviewScore),children:[s.jsx("div",{className:"w-24 h-2 bg-slate-800 rounded-full overflow-hidden",children:s.jsx("div",{className:`h-full ${M.reviewScore>=70?"bg-green-500":"bg-red-500"}`,style:{width:`${M.reviewScore}%`}})}),s.jsx("span",{className:`text-sm font-bold ${M.reviewScore>=70?"text-green-500":"text-red-500"}`,children:M.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:M.url,target:"_blank",rel:"noopener noreferrer",className:"text-slate-500 hover:text-indigo-400",onClick:J=>J.stopPropagation(),children:s.jsx(cp,{className:"h-4 w-4"})})})]},M.number)),q.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 "${h}" filter.`})})]})]})}),n&&s.jsx(rt,{className:"p-6 bg-slate-900 border-indigo-900/50 animate-in fade-in slide-in-from-top-4 duration-300",children:(()=>{const M=P.find(J=>J.number===n);return M?s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"font-bold text-slate-200",children:M.title}),s.jsxs("p",{className:"text-sm text-slate-400 mt-1",children:["Branch: ",s.jsx("span",{className:"font-mono",children:M.branch})]})]}),s.jsxs("div",{className:"flex items-center space-x-4",children:[s.jsxs("div",{className:"text-center",title:Q(M.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:[D(M.ciStatus),s.jsx("span",{className:"text-sm capitalize text-slate-300",children:M.ciStatus})]})]}),M.reviewScore!==null&&s.jsxs("div",{className:"text-center",title:w(M.reviewScore),children:[s.jsx("div",{className:"text-xs text-slate-500",children:"Review Score"}),s.jsx("div",{className:`text-xl font-bold mt-1 ${M.reviewScore>=70?"text-green-500":"text-red-500"}`,children:M.reviewScore})]})]})]}):null})()})]})},Ft=_e.forwardRef(({className:n="",label:r,checked:u,onChange:o,...h},f)=>{const b=j=>{o&&o(j.target.checked)};return s.jsxs("label",{className:`inline-flex items-center cursor-pointer ${n}`,children:[s.jsxs("div",{className:"relative",children:[s.jsx("input",{type:"checkbox",className:"sr-only peer",ref:f,checked:u,onChange:b,...h}),s.jsx("div",{className:"w-11 h-6 bg-slate-800 peer-focus:outline-none peer-focus:ring-2 peer-focus:ring-indigo-500/50 rounded-full peer peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-slate-400 after:border-slate-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all peer-checked:bg-indigo-600 peer-checked:after:bg-white peer-disabled:opacity-50 peer-disabled:cursor-not-allowed"})]}),r&&s.jsx("span",{className:"ml-3 text-sm font-medium text-slate-300 select-none",children:r})]})});Ft.displayName="Switch";const GN=()=>{const{addToast:n,selectedProjectId:r,globalModeLoading:u}=Zt(),[o,h]=U.useState(!1),[f,b]=U.useState(!1),{data:j,loading:y,error:x,refetch:S}=Ua(mN,[r],{enabled:!u});U.useEffect(()=>{if(!(j!=null&&j.enabled))return;const D=setInterval(()=>{S()},1e4);return()=>clearInterval(D)},[j==null?void 0:j.enabled,S]);const C=async D=>{b(!0);try{await jp(D),n({title:D?"Scanner Enabled":"Scanner Disabled",message:D?"Roadmap scanner is now active.":"Roadmap scanner has been paused.",type:D?"success":"info"}),S()}catch(Q){n({title:"Toggle Failed",message:Q instanceof Error?Q.message:"Failed to toggle scanner",type:"error"})}finally{b(!1)}},z=async()=>{h(!0);try{const D=await gN();D.created.length>0?n({title:"Scan Complete",message:`Created ${D.created.length} PRD(s): ${D.created.join(", ")}`,type:"success"}):n({title:"Scan Complete",message:"No new PRDs to create.",type:"info"}),D.errors.length>0&&n({title:"Scan Errors",message:D.errors.join("; "),type:"warning"}),S()}catch(D){n({title:"Scan Failed",message:D instanceof Error?D.message:"Failed to scan roadmap",type:"error"})}finally{h(!1)}};if(y)return s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx("div",{className:"text-slate-400",children:"Loading roadmap scanner..."})});if(x)return s.jsxs("div",{className:"flex flex-col items-center justify-center h-full space-y-4",children:[s.jsx(vn,{className:"h-12 w-12 text-red-400"}),s.jsx("div",{className:"text-slate-300",children:"Failed to load roadmap data"}),s.jsx("div",{className:"text-sm text-slate-500",children:x.message}),s.jsx(Ue,{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(rt,{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(up,{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 _=j.totalItems>0?Math.round(j.processedItems/j.totalItems*100):0,N=ZN(j.status),O=WN(j.items),k=j.lastScan?IN(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(Ft,{label:j.enabled?"Enabled":"Disabled",checked:j.enabled,onChange:C,disabled:f}),s.jsxs(Ue,{onClick:z,loading:o,disabled:!j.enabled||j.status==="complete",children:[s.jsx(pn,{className:"h-4 w-4 mr-2"}),"Scan Now"]})]})]}),s.jsx(rt,{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:k})]}),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(rt,{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 (",_,"%)"]})]}),s.jsx("div",{className:"w-full h-3 bg-slate-800 rounded-full overflow-hidden",children:s.jsx("div",{className:`h-full rounded-full transition-all duration-500 ${_===100?"bg-gradient-to-r from-emerald-500 to-emerald-400":"bg-gradient-to-r from-indigo-600 to-indigo-400"}`,style:{width:`${_}%`}})})]}),Object.entries(O).map(([D,Q])=>s.jsxs(rt,{className:"p-6",children:[s.jsx("h3",{className:"text-lg font-semibold text-slate-200 mb-4",children:D}),s.jsx("div",{className:"space-y-2",children:Q.map(w=>s.jsx(FN,{item:w},w.hash))})]},D))]})};function FN({item:n}){const r=n.checked,u=n.processed;return s.jsxs("div",{className:`flex items-center justify-between p-3 rounded-lg border ${r?"bg-slate-950/30 border-slate-800/50":u?"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(vj,{className:"h-4 w-4 text-slate-600 flex-shrink-0"}):u?s.jsx(yc,{className:"h-4 w-4 text-emerald-400 flex-shrink-0"}):s.jsx(Yf,{className:"h-4 w-4 text-slate-500 flex-shrink-0"}),s.jsxs("div",{className:"min-w-0",children:[s.jsx("div",{className:`text-sm font-medium truncate ${r?"line-through text-slate-600":"text-slate-200"}`,children:n.title}),n.description&&s.jsx("div",{className:"text-xs text-slate-500 truncate mt-0.5",children:n.description})]})]}),s.jsx("div",{className:"flex-shrink-0 ml-3",children:r?s.jsx(St,{variant:"neutral",children:"Skipped"}):u?s.jsx(St,{variant:"success",children:n.prdFile||"Processed"}):s.jsx(St,{variant:"warning",children:"Pending"})})]})}function ZN(n){switch(n){case"complete":return{label:"Complete",icon:yc,textColor:"text-emerald-400",borderColor:"border-emerald-500/20 bg-emerald-500/5"};case"idle":return{label:"Idle",icon:ip,textColor:"text-blue-400",borderColor:"border-blue-500/20 bg-blue-500/5"};case"scanning":return{label:"Scanning",icon:pn,textColor:"text-indigo-400",borderColor:"border-indigo-500/20 bg-indigo-500/5"};case"disabled":return{label:"Disabled",icon:vn,textColor:"text-slate-400",borderColor:"border-slate-500/20 bg-slate-500/5"};default:return{label:"No Roadmap",icon:vn,textColor:"text-slate-500",borderColor:"border-slate-500/20"}}}function WN(n){const r={};for(const u of n){const o=u.section||"General";r[o]||(r[o]=[]),r[o].push(u)}return r}function IN(n){try{const r=new Date(n),o=new Date().getTime()-r.getTime(),h=Math.floor(o/6e4);if(h<1)return"Just now";if(h<60)return`${h} min ago`;const f=Math.floor(h/60);return f<24?`${f} hr ago`:`${Math.floor(f/24)} day(s) ago`}catch{return"Unknown"}}const Je=_e.forwardRef(({className:n="",label:r,error:u,helperText:o,options:h,value:f,onChange:b,children:j,...y},x)=>{const S=_e.useId(),C=y.id??S,z=u?`${C}-error`:void 0,_=!u&&o?`${C}-help`:void 0,N=[z,_].filter(Boolean).join(" ")||void 0,O=k=>{b&&b(k.target.value)};return s.jsxs("div",{className:"w-full",children:[r&&s.jsx("label",{htmlFor:C,className:"block text-sm font-medium text-slate-400 mb-1.5",children:r}),s.jsxs("div",{className:"relative",children:[s.jsx("select",{ref:x,id:C,"aria-describedby":N,"aria-invalid":u?!0:y["aria-invalid"],className:`
|
|
425
|
+
w-full appearance-none rounded-lg bg-slate-950 border border-slate-800
|
|
426
|
+
px-3 py-2 pr-10 text-sm text-slate-200
|
|
427
|
+
focus:outline-none focus:ring-2 focus:ring-indigo-500/50 focus:border-indigo-500
|
|
428
|
+
disabled:opacity-50 disabled:cursor-not-allowed
|
|
429
|
+
transition-all duration-200
|
|
430
|
+
${u?"border-red-500/50 focus:ring-red-500/50 focus:border-red-500":""}
|
|
431
|
+
${n}
|
|
432
|
+
`,value:f,onChange:O,...y,children:h?h.map(k=>s.jsx("option",{value:k.value,children:k.label},k.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(oh,{className:"h-4 w-4"})})]}),u?s.jsx("p",{id:z,className:"mt-1.5 text-xs text-red-400",children:u}):o?s.jsx("p",{id:_,className:"mt-1.5 text-xs text-slate-500",children:o}):null]})});Je.displayName="Select";const we=_e.forwardRef(({className:n="",label:r,error:u,helperText:o,rightIcon:h,...f},b)=>{const j=_e.useId(),y=f.id??j,x=u?`${y}-error`:void 0,S=!u&&o?`${y}-help`:void 0,C=[x,S].filter(Boolean).join(" ")||void 0;return s.jsxs("div",{className:"w-full",children:[r&&s.jsx("label",{htmlFor:y,className:"block text-sm font-medium text-slate-400 mb-1.5",children:r}),s.jsxs("div",{className:"relative",children:[s.jsx("input",{ref:b,id:y,"aria-describedby":C,"aria-invalid":u?!0:f["aria-invalid"],className:`
|
|
433
|
+
w-full rounded-lg bg-slate-950 border border-slate-800
|
|
434
|
+
px-3 py-2 text-sm text-slate-200
|
|
435
|
+
placeholder:text-slate-600
|
|
436
|
+
focus:outline-none focus:ring-2 focus:ring-indigo-500/50 focus:border-indigo-500
|
|
437
|
+
disabled:opacity-50 disabled:cursor-not-allowed
|
|
438
|
+
transition-all duration-200
|
|
439
|
+
${u?"border-red-500/50 focus:ring-red-500/50 focus:border-red-500":""}
|
|
440
|
+
${h?"pr-10":""}
|
|
441
|
+
${n}
|
|
442
|
+
`,...f}),h&&s.jsx("div",{className:"absolute inset-y-0 right-0 flex items-center pr-3 pointer-events-none text-slate-500",children:h})]}),u?s.jsx("p",{id:x,className:"mt-1.5 text-xs text-red-400",children:u}):o?s.jsx("p",{id:S,className:"mt-1.5 text-xs text-slate-500",children:o}):null]})});we.displayName="Input";const wp=({tabs:n,activeTab:r,onChange:u,className:o=""})=>{var y,x;const[h,f]=_e.useState((y=n[0])==null?void 0:y.id),b=r||h,j=S=>{u?u(S):f(S)};return s.jsxs("div",{className:`flex flex-col ${o}`,children:[s.jsx("div",{className:"border-b border-slate-800 mb-6",children:s.jsx("nav",{className:"-mb-px flex space-x-8 overflow-x-auto scrollbar-hide",children:n.map(S=>s.jsx("button",{onClick:()=>j(S.id),className:`
|
|
443
|
+
whitespace-nowrap py-4 px-1 border-b-2 font-medium text-sm transition-all duration-200
|
|
444
|
+
${b===S.id?"border-indigo-500 text-indigo-400":"border-transparent text-slate-500 hover:text-slate-300 hover:border-slate-700"}
|
|
445
|
+
`,children:S.label},S.id))})}),s.jsx("div",{className:"flex-1 animate-in fade-in slide-in-from-bottom-2 duration-300",children:(x=n.find(S=>S.id===b))==null?void 0:x.content})]})};var Us={},La={},Ji={},Hs={},zf={},Jg;function QN(){return Jg||(Jg=1,Object.defineProperty(zf,"__esModule",{value:!0})),zf}var Ki={},ec={},Kg;function Fs(){var r,u,o,h,f,Sp,j;if(Kg)return ec;Kg=1,Object.defineProperty(ec,"__esModule",{value:!0}),ec.CronField=void 0;let n=(j=class{constructor(x,S={rawValue:""}){nt(this,f);nt(this,r,!1);nt(this,u,!1);nt(this,o,!1);nt(this,h,[]);vg(this,"options",{rawValue:""});if(!Array.isArray(x))throw new Error(`${this.constructor.name} Validation error, values is not an array`);if(!(x.length>0))throw new Error(`${this.constructor.name} Validation error, values contains no values`);this.options={...S,rawValue:S.rawValue??""},Oe(this,h,x.sort(j.sorter)),Oe(this,o,this.options.wildcard!==void 0?this.options.wildcard:Ee(this,f,Sp).call(this)),Oe(this,r,this.options.rawValue.includes("L")||x.includes("L")),Oe(this,u,this.options.rawValue.includes("?")||x.includes("?"))}static get min(){throw new Error("min must be overridden")}static get max(){throw new Error("max must be overridden")}static get chars(){return Object.freeze([])}static get validChars(){return/^[?,*\dH/-]+$|^.*H\(\d+-\d+\)\/\d+.*$|^.*H\(\d+-\d+\).*$|^.*H\/\d+.*$/}static get constraints(){return{min:this.min,max:this.max,chars:this.chars,validChars:this.validChars}}get min(){return this.constructor.min}get max(){return this.constructor.max}get chars(){return this.constructor.chars}get hasLastChar(){return ee(this,r)}get hasQuestionMarkChar(){return ee(this,u)}get isWildcard(){return ee(this,o)}get values(){return ee(this,h)}static sorter(x,S){const C=typeof x=="number",z=typeof S=="number";return C&&z?x-S:!C&&!z?x.localeCompare(S):C?-1:1}static findNearestValueInList(x,S,C=!1){if(C){for(let z=x.length-1;z>=0;z--)if(x[z]<S)return x[z];return null}for(let z=0;z<x.length;z++)if(x[z]>S)return x[z];return null}findNearestValue(x,S=!1){return this.constructor.findNearestValueInList(this.values,x,S)}serialize(){return{wildcard:ee(this,o),values:ee(this,h)}}validate(){let x;const S=this.chars.length>0?` or chars ${this.chars.join("")}`:"",C=O=>k=>new RegExp(`^\\d{0,2}${k}$`).test(O),z=O=>(x=O,typeof O=="number"?O>=this.min&&O<=this.max:this.chars.some(C(O)));if(!ee(this,h).every(z))throw new Error(`${this.constructor.name} Validation error, got value ${x} expected range ${this.min}-${this.max}${S}`);const N=ee(this,h).find((O,k)=>ee(this,h).indexOf(O)!==k);if(N)throw new Error(`${this.constructor.name} Validation error, duplicate values found: ${N}`)}},r=new WeakMap,u=new WeakMap,o=new WeakMap,h=new WeakMap,f=new WeakSet,Sp=function(){return this.options.rawValue.length>0?["*","?"].includes(this.options.rawValue):Array.from({length:this.max-this.min+1},(x,S)=>S+this.min).every(x=>ee(this,h).includes(x))},j);return ec.CronField=n,ec}var ex;function XN(){if(ex)return Ki;ex=1,Object.defineProperty(Ki,"__esModule",{value:!0}),Ki.CronDayOfMonth=void 0;const n=Fs(),r=1,u=31,o=Object.freeze(["L"]);let h=class extends n.CronField{static get min(){return r}static get max(){return u}static get chars(){return o}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 Ki.CronDayOfMonth=h,Ki}var tc={},tx;function JN(){if(tx)return tc;tx=1,Object.defineProperty(tc,"__esModule",{value:!0}),tc.CronDayOfWeek=void 0;const n=Fs(),r=0,u=7,o=Object.freeze(["L"]);let h=class extends n.CronField{static get min(){return r}static get max(){return u}static get chars(){return o}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 tc.CronDayOfWeek=h,tc}var ac={},ax;function KN(){if(ax)return ac;ax=1,Object.defineProperty(ac,"__esModule",{value:!0}),ac.CronHour=void 0;const n=Fs(),r=0,u=23,o=Object.freeze([]);let h=class extends n.CronField{static get min(){return r}static get max(){return u}static get chars(){return o}constructor(b,j){super(b,j),this.validate()}get values(){return super.values}};return ac.CronHour=h,ac}var nc={},nx;function e2(){if(nx)return nc;nx=1,Object.defineProperty(nc,"__esModule",{value:!0}),nc.CronMinute=void 0;const n=Fs(),r=0,u=59,o=Object.freeze([]);let h=class extends n.CronField{static get min(){return r}static get max(){return u}static get chars(){return o}constructor(b,j){super(b,j),this.validate()}get values(){return super.values}};return nc.CronMinute=h,nc}var lc={},Lf={},Ma={},lx;function t2(){if(lx)return Ma;lx=1,Object.defineProperty(Ma,"__esModule",{value:!0});class n extends Error{}class r extends n{constructor(i){super(`Invalid DateTime: ${i.toMessage()}`)}}class u extends n{constructor(i){super(`Invalid Interval: ${i.toMessage()}`)}}class o extends n{constructor(i){super(`Invalid Duration: ${i.toMessage()}`)}}class h extends n{}class f extends n{constructor(i){super(`Invalid unit ${i}`)}}class b extends n{}class j extends n{constructor(){super("Zone is an abstract class")}}const y="numeric",x="short",S="long",C={year:y,month:y,day:y},z={year:y,month:x,day:y},_={year:y,month:x,day:y,weekday:x},N={year:y,month:S,day:y},O={year:y,month:S,day:y,weekday:S},k={hour:y,minute:y},P={hour:y,minute:y,second:y},D={hour:y,minute:y,second:y,timeZoneName:x},Q={hour:y,minute:y,second:y,timeZoneName:S},w={hour:y,minute:y,hourCycle:"h23"},K={hour:y,minute:y,second:y,hourCycle:"h23"},q={hour:y,minute:y,second:y,hourCycle:"h23",timeZoneName:x},Z={hour:y,minute:y,second:y,hourCycle:"h23",timeZoneName:S},R={year:y,month:y,day:y,hour:y,minute:y},ae={year:y,month:y,day:y,hour:y,minute:y,second:y},M={year:y,month:x,day:y,hour:y,minute:y},J={year:y,month:x,day:y,hour:y,minute:y,second:y},le={year:y,month:x,day:y,weekday:x,hour:y,minute:y},fe={year:y,month:S,day:y,hour:y,minute:y,timeZoneName:x},ve={year:y,month:S,day:y,hour:y,minute:y,second:y,timeZoneName:x},ue={year:y,month:S,day:y,weekday:S,hour:y,minute:y,timeZoneName:S},G={year:y,month:S,day:y,weekday:S,hour:y,minute:y,second:y,timeZoneName:S};class ne{get type(){throw new j}get name(){throw new j}get ianaName(){return this.name}get isUniversal(){throw new j}offsetName(i,m){throw new j}formatOffset(i,m){throw new j}offset(i){throw new j}equals(i){throw new j}get isValid(){throw new j}}let he=null;class me extends ne{static get instance(){return he===null&&(he=new me),he}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 is(this.offset(i),m)}offset(i){return-new Date(i).getTimezoneOffset()}equals(i){return i.type==="system"}get isValid(){return!0}}const ze=new Map;function H(g){let i=ze.get(g);return i===void 0&&(i=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:g,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",era:"short"}),ze.set(g,i)),i}const se={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};function ge(g,i){const m=g.format(i).replace(/\u200E/g,""),v=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(m),[,E,A,V,B,Y,de,be]=v;return[V,E,A,B,Y,de,be]}function pe(g,i){const m=g.formatToParts(i),v=[];for(let E=0;E<m.length;E++){const{type:A,value:V}=m[E],B=se[A];A==="era"?v[B]=V:De(B)||(v[B]=parseInt(V,10))}return v}const Te=new Map;class xe extends ne{static create(i){let m=Te.get(i);return m===void 0&&Te.set(i,m=new xe(i)),m}static resetCache(){Te.clear(),ze.clear()}static isValidSpecifier(i){return this.isValidZone(i)}static isValidZone(i){if(!i)return!1;try{return new Intl.DateTimeFormat("en-US",{timeZone:i}).format(),!0}catch{return!1}}constructor(i){super(),this.zoneName=i,this.valid=xe.isValidZone(i)}get type(){return"iana"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(i,{format:m,locale:v}){return Un(i,m,v,this.name)}formatOffset(i,m){return is(this.offset(i),m)}offset(i){if(!this.valid)return NaN;const m=new Date(i);if(isNaN(m))return NaN;const v=H(this.name);let[E,A,V,B,Y,de,be]=v.formatToParts?pe(v,m):ge(v,m);B==="BC"&&(E=-Math.abs(E)+1);const Ye=Kt({year:E,month:A,day:V,hour:Y===24?0:Y,minute:de,second:be,millisecond:0});let ke=+m;const jt=ke%1e3;return ke-=jt>=0?jt:1e3+jt,(Ye-ke)/(60*1e3)}equals(i){return i.type==="iana"&&i.name===this.name}get isValid(){return this.valid}}let Me={};function Ze(g,i={}){const m=JSON.stringify([g,i]);let v=Me[m];return v||(v=new Intl.ListFormat(g,i),Me[m]=v),v}const We=new Map;function Dt(g,i={}){const m=JSON.stringify([g,i]);let v=We.get(m);return v===void 0&&(v=new Intl.DateTimeFormat(g,i),We.set(m,v)),v}const da=new Map;function tn(g,i={}){const m=JSON.stringify([g,i]);let v=da.get(m);return v===void 0&&(v=new Intl.NumberFormat(g,i),da.set(m,v)),v}const an=new Map;function fa(g,i={}){const{base:m,...v}=i,E=JSON.stringify([g,v]);let A=an.get(E);return A===void 0&&(A=new Intl.RelativeTimeFormat(g,i),an.set(E,A)),A}let ha=null;function yn(){return ha||(ha=new Intl.DateTimeFormat().resolvedOptions().locale,ha)}const bn=new Map;function Va(g){let i=bn.get(g);return i===void 0&&(i=new Intl.DateTimeFormat(g).resolvedOptions(),bn.set(g,i)),i}const kt=new Map;function ma(g){let i=kt.get(g);if(!i){const m=new Intl.Locale(g);i="getWeekInfo"in m?m.getWeekInfo():m.weekInfo,"minimalDays"in i||(i={...dl,...i}),kt.set(g,i)}return i}function kn(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,E;try{v=Dt(g).resolvedOptions(),E=g}catch{const Y=g.substring(0,m);v=Dt(Y).resolvedOptions(),E=Y}const{numberingSystem:A,calendar:V}=v;return[E,A,V]}}function Ba(g,i,m){return(m||i)&&(g.includes("-u-")||(g+="-u"),m&&(g+=`-ca-${m}`),i&&(g+=`-nu-${i}`)),g}function ga(g){const i=[];for(let m=1;m<=12;m++){const v=Ce.utc(2009,m,1);i.push(g(v))}return i}function At(g){const i=[];for(let m=1;m<=7;m++){const v=Ce.utc(2016,11,13+m);i.push(g(v))}return i}function ul(g,i,m,v){const E=g.listingMode();return E==="error"?null:E==="en"?m(i):v(i)}function Zr(g){return g.numberingSystem&&g.numberingSystem!=="latn"?!1:g.numberingSystem==="latn"||!g.locale||g.locale.startsWith("en")||Va(g.locale).numberingSystem==="latn"}class Zs{constructor(i,m,v){this.padTo=v.padTo||0,this.floor=v.floor||!1;const{padTo:E,floor:A,...V}=v;if(!m||Object.keys(V).length>0){const B={useGrouping:!1,...v};v.padTo>0&&(B.minimumIntegerDigits=v.padTo),this.inf=tn(i,B)}}format(i){if(this.inf){const m=this.floor?Math.floor(i):i;return this.inf.format(m)}else{const m=this.floor?Math.floor(i):ls(i,3);return st(m,this.padTo)}}}class An{constructor(i,m,v){this.opts=v,this.originalZone=void 0;let E;if(this.opts.timeZone)this.dt=i;else if(i.zone.type==="fixed"){const V=-1*(i.offset/60),B=V>=0?`Etc/GMT+${V}`:`Etc/GMT${V}`;i.offset!==0&&xe.create(B).valid?(E=B,this.dt=i):(E="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,E=i.zone.name):(E="UTC",this.dt=i.setZone("UTC").plus({minutes:i.offset}),this.originalZone=i.zone);const A={...this.opts};A.timeZone=A.timeZone||E,this.dtf=Dt(m,A)}format(){return this.originalZone?this.formatToParts().map(({value:i})=>i).join(""):this.dtf.format(this.dt.toJSDate())}formatToParts(){const i=this.dtf.formatToParts(this.dt.toJSDate());return this.originalZone?i.map(m=>{if(m.type==="timeZoneName"){const v=this.originalZone.offsetName(this.dt.ts,{locale:this.dt.locale,format:this.opts.timeZoneName});return{...m,value:v}}else return m}):i}resolvedOptions(){return this.dtf.resolvedOptions()}}class Ws{constructor(i,m,v){this.opts={style:"long",...v},!m&&Xr()&&(this.rtf=fa(i,v))}format(i,m){return this.rtf?this.rtf.format(i,m):wn(m,i,this.opts.numeric,this.opts.style!=="long")}formatToParts(i,m){return this.rtf?this.rtf.formatToParts(i,m):[]}}const dl={firstDay:1,minimalDays:4,weekend:[6,7]};class Ie{static fromOpts(i){return Ie.create(i.locale,i.numberingSystem,i.outputCalendar,i.weekSettings,i.defaultToEN)}static create(i,m,v,E,A=!1){const V=i||mt.defaultLocale,B=V||(A?"en-US":yn()),Y=m||mt.defaultNumberingSystem,de=v||mt.defaultOutputCalendar,be=Jr(E)||mt.defaultWeekSettings;return new Ie(B,Y,de,be,V)}static resetCache(){ha=null,We.clear(),da.clear(),an.clear(),bn.clear(),kt.clear()}static fromObject({locale:i,numberingSystem:m,outputCalendar:v,weekSettings:E}={}){return Ie.create(i,m,v,E)}constructor(i,m,v,E,A){const[V,B,Y]=kn(i);this.locale=V,this.numberingSystem=m||B||null,this.outputCalendar=v||Y||null,this.weekSettings=E,this.intl=Ba(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=A,this.fastNumbersCached=null}get fastNumbers(){return this.fastNumbersCached==null&&(this.fastNumbersCached=Zr(this)),this.fastNumbersCached}listingMode(){const i=this.isEnglish(),m=(this.numberingSystem===null||this.numberingSystem==="latn")&&(this.outputCalendar===null||this.outputCalendar==="gregory");return i&&m?"en":"intl"}clone(i){return!i||Object.getOwnPropertyNames(i).length===0?this:Ie.create(i.locale||this.specifiedLocale,i.numberingSystem||this.numberingSystem,i.outputCalendar||this.outputCalendar,Jr(i.weekSettings)||this.weekSettings,i.defaultToEN||!1)}redefaultToEN(i={}){return this.clone({...i,defaultToEN:!0})}redefaultToSystem(i={}){return this.clone({...i,defaultToEN:!1})}months(i,m=!1){return ul(this,i,Oc,()=>{const v=this.intl==="ja"||this.intl.startsWith("ja-");m&=!v;const E=m?{month:i,day:"numeric"}:{month:i},A=m?"format":"standalone";if(!this.monthsCache[A][i]){const V=v?B=>this.dtFormatter(B,E).format():B=>this.extract(B,E,"month");this.monthsCache[A][i]=ga(V)}return this.monthsCache[A][i]})}weekdays(i,m=!1){return ul(this,i,nr,()=>{const v=m?{weekday:i,year:"numeric",month:"long",day:"numeric"}:{weekday:i},E=m?"format":"standalone";return this.weekdaysCache[E][i]||(this.weekdaysCache[E][i]=At(A=>this.extract(A,v,"weekday"))),this.weekdaysCache[E][i]})}meridiems(){return ul(this,void 0,()=>Hn,()=>{if(!this.meridiemCache){const i={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[Ce.utc(2016,11,13,9),Ce.utc(2016,11,13,19)].map(m=>this.extract(m,i,"dayperiod"))}return this.meridiemCache})}eras(i){return ul(this,i,ni,()=>{const m={era:i};return this.eraCache[i]||(this.eraCache[i]=[Ce.utc(-40,1,1),Ce.utc(2017,1,1)].map(v=>this.extract(v,m,"era"))),this.eraCache[i]})}extract(i,m,v){const E=this.dtFormatter(i,m),A=E.formatToParts(),V=A.find(B=>B.type.toLowerCase()===v);return V?V.value:null}numberFormatter(i={}){return new Zs(this.intl,i.forceSimple||this.fastNumbers,i)}dtFormatter(i,m={}){return new An(i,this.intl,m)}relFormatter(i={}){return new Ws(this.intl,this.isEnglish(),i)}listFormatter(i={}){return Ze(this.intl,i)}isEnglish(){return this.locale==="en"||this.locale.toLowerCase()==="en-us"||Va(this.intl).locale.startsWith("en-us")}getWeekSettings(){return this.weekSettings?this.weekSettings:jn()?ma(this.locale):dl}getStartOfWeek(){return this.getWeekSettings().firstDay}getMinDaysInFirstWeek(){return this.getWeekSettings().minimalDays}getWeekendDays(){return this.getWeekSettings().weekend}equals(i){return this.locale===i.locale&&this.numberingSystem===i.numberingSystem&&this.outputCalendar===i.outputCalendar}toString(){return`Locale(${this.locale}, ${this.numberingSystem}, ${this.outputCalendar})`}}let fl=null;class gt extends ne{static get utcInstance(){return fl===null&&(fl=new gt(0)),fl}static instance(i){return i===0?gt.utcInstance:new gt(i)}static parseSpecifier(i){if(i){const m=i.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(m)return new gt(rs(m[1],m[2]))}return null}constructor(i){super(),this.fixed=i}get type(){return"fixed"}get name(){return this.fixed===0?"UTC":`UTC${is(this.fixed,"narrow")}`}get ianaName(){return this.fixed===0?"Etc/UTC":`Etc/GMT${is(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(i,m){return is(this.fixed,m)}get isUniversal(){return!0}offset(){return this.fixed}equals(i){return i.type==="fixed"&&i.fixed===this.fixed}get isValid(){return!0}}class Bt extends ne{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 _t(g,i){if(De(g)||g===null)return i;if(g instanceof ne)return g;if(Lt(g)){const m=g.toLowerCase();return m==="default"?i:m==="local"||m==="system"?me.instance:m==="utc"||m==="gmt"?gt.utcInstance:gt.parseSpecifier(m)||xe.create(g)}else return va(g)?gt.instance(g):typeof g=="object"&&"offset"in g&&typeof g.offset=="function"?g:new Bt(g)}const zt={arab:"[٠-٩]",arabext:"[۰-۹]",bali:"[᭐-᭙]",beng:"[০-৯]",deva:"[०-९]",fullwide:"[0-9]",gujr:"[૦-૯]",hanidec:"[〇|一|二|三|四|五|六|七|八|九]",khmr:"[០-៩]",knda:"[೦-೯]",laoo:"[໐-໙]",limb:"[᥆-᥏]",mlym:"[൦-൯]",mong:"[᠐-᠙]",mymr:"[၀-၉]",orya:"[୦-୯]",tamldec:"[௦-௯]",telu:"[౦-౯]",thai:"[๐-๙]",tibt:"[༠-༩]",latn:"\\d"},es={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]},oe=zt.hanidec.replace(/[\[|\]]/g,"").split("");function ye(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(zt.hanidec)!==-1)i+=oe.indexOf(g[m]);else for(const E in es){const[A,V]=es[E];v>=A&&v<=V&&(i+=v-A)}}return parseInt(i,10)}else return i}const Qe=new Map;function Pt(){Qe.clear()}function Ke({numberingSystem:g},i=""){const m=g||"latn";let v=Qe.get(m);v===void 0&&(v=new Map,Qe.set(m,v));let E=v.get(i);return E===void 0&&(E=new RegExp(`${zt[m]}${i}`),v.set(i,E)),E}let xa=()=>Date.now(),ts="system",hl=null,bc=null,Wr=null,Is=60,ml,jc=null;class mt{static get now(){return xa}static set now(i){xa=i}static set defaultZone(i){ts=i}static get defaultZone(){return _t(ts,me.instance)}static get defaultLocale(){return hl}static set defaultLocale(i){hl=i}static get defaultNumberingSystem(){return bc}static set defaultNumberingSystem(i){bc=i}static get defaultOutputCalendar(){return Wr}static set defaultOutputCalendar(i){Wr=i}static get defaultWeekSettings(){return jc}static set defaultWeekSettings(i){jc=Jr(i)}static get twoDigitCutoffYear(){return Is}static set twoDigitCutoffYear(i){Is=i%100}static get throwOnInvalid(){return ml}static set throwOnInvalid(i){ml=i}static resetCaches(){Ie.resetCache(),xe.resetCache(),Ce.resetCache(),Pt()}}class pa{constructor(i,m){this.reason=i,this.explanation=m}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}}const Ir=[0,31,59,90,120,151,181,212,243,273,304,334],Qs=[0,31,60,91,121,152,182,213,244,274,305,335];function sa(g,i){return new pa("unit out of range",`you specified ${i} (of type ${typeof i}) as a ${g}, which is invalid`)}function Xs(g,i,m){const v=new Date(Date.UTC(g,i-1,m));g<100&&g>=0&&v.setUTCFullYear(v.getUTCFullYear()-1900);const E=v.getUTCDay();return E===0?7:E}function Qr(g,i,m){return m+(xl(g)?Qs:Ir)[i-1]}function nn(g,i){const m=xl(g)?Qs:Ir,v=m.findIndex(A=>A<i),E=i-m[v];return{month:v+1,day:E}}function Et(g,i){return(g-i+7)%7+1}function $t(g,i=4,m=1){const{year:v,month:E,day:A}=g,V=Qr(v,E,A),B=Et(Xs(v,E,A),m);let Y=Math.floor((V-B+14-i)/7),de;return Y<1?(de=v-1,Y=pl(de,i,m)):Y>pl(v,i,m)?(de=v+1,Y=1):de=v,{weekYear:de,weekNumber:Y,weekday:B,...cs(g)}}function _n(g,i=4,m=1){const{weekYear:v,weekNumber:E,weekday:A}=g,V=Et(Xs(v,1,i),m),B=sn(v);let Y=E*7+A-V-7+i,de;Y<1?(de=v-1,Y+=sn(de)):Y>B?(de=v+1,Y-=sn(v)):de=v;const{month:be,day:Le}=nn(de,Y);return{year:de,month:be,day:Le,...cs(g)}}function as(g){const{year:i,month:m,day:v}=g,E=Qr(i,m,v);return{year:i,ordinal:E,...cs(g)}}function Nc(g){const{year:i,ordinal:m}=g,{month:v,day:E}=nn(i,m);return{year:i,month:v,day:E,...cs(g)}}function wc(g,i){if(!De(g.localWeekday)||!De(g.localWeekNumber)||!De(g.localWeekYear)){if(!De(g.weekday)||!De(g.weekNumber)||!De(g.weekYear))throw new h("Cannot mix locale-based week fields with ISO-based week fields");return De(g.localWeekday)||(g.weekday=g.localWeekday),De(g.localWeekNumber)||(g.weekNumber=g.localWeekNumber),De(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 Sc(g,i=4,m=1){const v=ln(g.weekYear),E=Jt(g.weekNumber,1,pl(g.weekYear,i,m)),A=Jt(g.weekday,1,7);return v?E?A?!1:sa("weekday",g.weekday):sa("week",g.weekNumber):sa("weekYear",g.weekYear)}function ns(g){const i=ln(g.year),m=Jt(g.ordinal,1,sn(g.year));return i?m?!1:sa("ordinal",g.ordinal):sa("year",g.year)}function Js(g){const i=ln(g.year),m=Jt(g.month,1,12),v=Jt(g.day,1,er(g.year,g.month));return i?m?v?!1:sa("day",g.day):sa("month",g.month):sa("year",g.year)}function zn(g){const{hour:i,minute:m,second:v,millisecond:E}=g,A=Jt(i,0,23)||i===24&&m===0&&v===0&&E===0,V=Jt(m,0,59),B=Jt(v,0,59),Y=Jt(E,0,999);return A?V?B?Y?!1:sa("millisecond",E):sa("second",v):sa("minute",m):sa("hour",i)}function De(g){return typeof g>"u"}function va(g){return typeof g=="number"}function ln(g){return typeof g=="number"&&g%1===0}function Lt(g){return typeof g=="string"}function Ec(g){return Object.prototype.toString.call(g)==="[object Date]"}function Xr(){try{return typeof Intl<"u"&&!!Intl.RelativeTimeFormat}catch{return!1}}function jn(){try{return typeof Intl<"u"&&!!Intl.Locale&&("weekInfo"in Intl.Locale.prototype||"getWeekInfo"in Intl.Locale.prototype)}catch{return!1}}function gl(g){return Array.isArray(g)?g:[g]}function Tc(g,i,m){if(g.length!==0)return g.reduce((v,E)=>{const A=[i(E),E];return v&&m(v[0],A[0])===v[0]?v:A},null)[1]}function Cc(g,i){return i.reduce((m,v)=>(m[v]=g[v],m),{})}function Ln(g,i){return Object.prototype.hasOwnProperty.call(g,i)}function Jr(g){if(g==null)return null;if(typeof g!="object")throw new b("Week settings must be an object");if(!Jt(g.firstDay,1,7)||!Jt(g.minimalDays,1,7)||!Array.isArray(g.weekend)||g.weekend.some(i=>!Jt(i,1,7)))throw new b("Invalid week settings");return{firstDay:g.firstDay,minimalDays:g.minimalDays,weekend:Array.from(g.weekend)}}function Jt(g,i,m){return ln(g)&&g>=i&&g<=m}function Ks(g,i){return g-i*Math.floor(g/i)}function st(g,i=2){const m=g<0;let v;return m?v="-"+(""+-g).padStart(i,"0"):v=(""+g).padStart(i,"0"),v}function Tt(g){if(!(De(g)||g===null||g===""))return parseInt(g,10)}function Nn(g){if(!(De(g)||g===null||g===""))return parseFloat(g)}function Kr(g){if(!(De(g)||g===null||g==="")){const i=parseFloat("0."+g)*1e3;return Math.floor(i)}}function ls(g,i,m="round"){const v=10**i;switch(m){case"expand":return g>0?Math.ceil(g*v)/v:Math.floor(g*v)/v;case"trunc":return Math.trunc(g*v)/v;case"round":return Math.round(g*v)/v;case"floor":return Math.floor(g*v)/v;case"ceil":return Math.ceil(g*v)/v;default:throw new RangeError(`Value rounding ${m} is out of range`)}}function xl(g){return g%4===0&&(g%100!==0||g%400===0)}function sn(g){return xl(g)?366:365}function er(g,i){const m=Ks(i-1,12)+1,v=g+(i-m)/12;return m===2?xl(v)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][m-1]}function Kt(g){let i=Date.UTC(g.year,g.month-1,g.day,g.hour,g.minute,g.second,g.millisecond);return g.year<100&&g.year>=0&&(i=new Date(i),i.setUTCFullYear(g.year,g.month-1,g.day)),+i}function tr(g,i,m){return-Et(Xs(g,1,i),m)+i-1}function pl(g,i=4,m=1){const v=tr(g,i,m),E=tr(g+1,i,m);return(sn(g)-v+E)/7}function ss(g){return g>99?g:g>mt.twoDigitCutoffYear?1900+g:2e3+g}function Un(g,i,m,v=null){const E=new Date(g),A={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};v&&(A.timeZone=v);const V={timeZoneName:i,...A},B=new Intl.DateTimeFormat(m,V).formatToParts(E).find(Y=>Y.type.toLowerCase()==="timezonename");return B?B.value:null}function rs(g,i){let m=parseInt(g,10);Number.isNaN(m)&&(m=0);const v=parseInt(i,10)||0,E=m<0||Object.is(m,-0)?-v:v;return m*60+E}function ei(g){const i=Number(g);if(typeof g=="boolean"||g===""||!Number.isFinite(i))throw new b(`Invalid unit value ${g}`);return i}function rn(g,i){const m={};for(const v in g)if(Ln(g,v)){const E=g[v];if(E==null)continue;m[i(v)]=ei(E)}return m}function is(g,i){const m=Math.trunc(Math.abs(g/60)),v=Math.trunc(Math.abs(g%60)),E=g>=0?"+":"-";switch(i){case"short":return`${E}${st(m,2)}:${st(v,2)}`;case"narrow":return`${E}${m}${v>0?`:${v}`:""}`;case"techie":return`${E}${st(m,2)}${st(v,2)}`;default:throw new RangeError(`Value format ${i} is out of range for property format`)}}function cs(g){return Cc(g,["hour","minute","second","millisecond"])}const Mc=["January","February","March","April","May","June","July","August","September","October","November","December"],ar=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],ju=["J","F","M","A","M","J","J","A","S","O","N","D"];function Oc(g){switch(g){case"narrow":return[...ju];case"short":return[...ar];case"long":return[...Mc];case"numeric":return["1","2","3","4","5","6","7","8","9","10","11","12"];case"2-digit":return["01","02","03","04","05","06","07","08","09","10","11","12"];default:return null}}const os=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],Pa=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],ti=["M","T","W","T","F","S","S"];function nr(g){switch(g){case"narrow":return[...ti];case"short":return[...Pa];case"long":return[...os];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}const Hn=["AM","PM"],vl=["Before Christ","Anno Domini"],Rc=["BC","AD"],ai=["B","A"];function ni(g){switch(g){case"narrow":return[...ai];case"short":return[...Rc];case"long":return[...vl];default:return null}}function us(g){return Hn[g.hour<12?0:1]}function cn(g,i){return nr(i)[g.weekday-1]}function li(g,i){return Oc(i)[g.month-1]}function ds(g,i){return ni(i)[g.year<0?0:1]}function wn(g,i,m="always",v=!1){const E={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."]},A=["hours","minutes","seconds"].indexOf(g)===-1;if(m==="auto"&&A){const Le=g==="days";switch(i){case 1:return Le?"tomorrow":`next ${E[g][0]}`;case-1:return Le?"yesterday":`last ${E[g][0]}`;case 0:return Le?"today":`this ${E[g][0]}`}}const V=Object.is(i,-0)||i<0,B=Math.abs(i),Y=B===1,de=E[g],be=v?Y?de[1]:de[2]||de[1]:Y?E[g][0]:g;return V?`${B} ${be} ago`:`in ${B} ${be}`}function lr(g,i){let m="";for(const v of g)v.literal?m+=v.val:m+=i(v.val);return m}const sr={D:C,DD:z,DDD:N,DDDD:O,t:k,tt:P,ttt:D,tttt:Q,T:w,TT:K,TTT:q,TTTT:Z,f:R,ff:M,fff:fe,ffff:ue,F:ae,FF:J,FFF:ve,FFFF:G};class Yt{static create(i,m={}){return new Yt(i,m)}static parseFormat(i){let m=null,v="",E=!1;const A=[];for(let V=0;V<i.length;V++){const B=i.charAt(V);B==="'"?((v.length>0||E)&&A.push({literal:E||/^\s+$/.test(v),val:v===""?"'":v}),m=null,v="",E=!E):E||B===m?v+=B:(v.length>0&&A.push({literal:/^\s+$/.test(v),val:v}),v=B,m=B)}return v.length>0&&A.push({literal:E||/^\s+$/.test(v),val:v}),A}static macroTokenToFormatOpts(i){return sr[i]}constructor(i,m){this.opts=m,this.loc=i,this.systemLoc=null}formatWithSystemDefault(i,m){return this.systemLoc===null&&(this.systemLoc=this.loc.redefaultToSystem()),this.systemLoc.dtFormatter(i,{...this.opts,...m}).format()}dtFormatter(i,m={}){return this.loc.dtFormatter(i,{...this.opts,...m})}formatDateTime(i,m){return this.dtFormatter(i,m).format()}formatDateTimeParts(i,m){return this.dtFormatter(i,m).formatToParts()}formatInterval(i,m){return this.dtFormatter(i.start,m).dtf.formatRange(i.start.toJSDate(),i.end.toJSDate())}resolvedOptions(i,m){return this.dtFormatter(i,m).resolvedOptions()}num(i,m=0,v=void 0){if(this.opts.forceSimple)return st(i,m);const E={...this.opts};return m>0&&(E.padTo=m),v&&(E.signDisplay=v),this.loc.numberFormatter(E).format(i)}formatDateTimeFromString(i,m){const v=this.loc.listingMode()==="en",E=this.loc.outputCalendar&&this.loc.outputCalendar!=="gregory",A=(ke,jt)=>this.loc.extract(i,ke,jt),V=ke=>i.isOffsetFixed&&i.offset===0&&ke.allowZ?"Z":i.isValid?i.zone.formatOffset(i.ts,ke.format):"",B=()=>v?us(i):A({hour:"numeric",hourCycle:"h12"},"dayperiod"),Y=(ke,jt)=>v?li(i,ke):A(jt?{month:ke}:{month:ke,day:"numeric"},"month"),de=(ke,jt)=>v?cn(i,ke):A(jt?{weekday:ke}:{weekday:ke,month:"long",day:"numeric"},"weekday"),be=ke=>{const jt=Yt.macroTokenToFormatOpts(ke);return jt?this.formatWithSystemDefault(i,jt):ke},Le=ke=>v?ds(i,ke):A({era:ke},"era"),Ye=ke=>{switch(ke){case"S":return this.num(i.millisecond);case"u":case"SSS":return this.num(i.millisecond,3);case"s":return this.num(i.second);case"ss":return this.num(i.second,2);case"uu":return this.num(Math.floor(i.millisecond/10),2);case"uuu":return this.num(Math.floor(i.millisecond/100));case"m":return this.num(i.minute);case"mm":return this.num(i.minute,2);case"h":return this.num(i.hour%12===0?12:i.hour%12);case"hh":return this.num(i.hour%12===0?12:i.hour%12,2);case"H":return this.num(i.hour);case"HH":return this.num(i.hour,2);case"Z":return V({format:"narrow",allowZ:this.opts.allowZ});case"ZZ":return V({format:"short",allowZ:this.opts.allowZ});case"ZZZ":return V({format:"techie",allowZ:this.opts.allowZ});case"ZZZZ":return i.zone.offsetName(i.ts,{format:"short",locale:this.loc.locale});case"ZZZZZ":return i.zone.offsetName(i.ts,{format:"long",locale:this.loc.locale});case"z":return i.zoneName;case"a":return B();case"d":return E?A({day:"numeric"},"day"):this.num(i.day);case"dd":return E?A({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 E?A({month:"numeric",day:"numeric"},"month"):this.num(i.month);case"LL":return E?A({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 E?A({month:"numeric"},"month"):this.num(i.month);case"MM":return E?A({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 E?A({year:"numeric"},"year"):this.num(i.year);case"yy":return E?A({year:"2-digit"},"year"):this.num(i.year.toString().slice(-2),2);case"yyyy":return E?A({year:"numeric"},"year"):this.num(i.year,4);case"yyyyyy":return E?A({year:"numeric"},"year"):this.num(i.year,6);case"G":return Le("short");case"GG":return Le("long");case"GGGGG":return Le("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(ke)}};return lr(Yt.parseFormat(m),Ye)}formatDurationFromString(i,m){const v=this.opts.signMode==="negativeLargestOnly"?-1:1,E=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}},A=(be,Le)=>Ye=>{const ke=E(Ye);if(ke){const jt=Le.isNegativeDuration&&ke!==Le.largestUnit?v:1;let Wt;return this.opts.signMode==="negativeLargestOnly"&&ke!==Le.largestUnit?Wt="never":this.opts.signMode==="all"?Wt="always":Wt="auto",this.num(be.get(ke)*jt,Ye.length,Wt)}else return Ye},V=Yt.parseFormat(m),B=V.reduce((be,{literal:Le,val:Ye})=>Le?be:be.concat(Ye),[]),Y=i.shiftTo(...B.map(E).filter(be=>be)),de={isNegativeDuration:Y<0,largestUnit:Object.keys(Y.values)[0]};return lr(V,A(Y,de))}}const fs=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;function on(...g){const i=g.reduce((m,v)=>m+v.source,"");return RegExp(`^${i}$`)}function qn(...g){return i=>g.reduce(([m,v,E],A)=>{const[V,B,Y]=A(i,E);return[{...m,...V},B||v,Y]},[{},null,1]).slice(0,2)}function Ct(g,...i){if(g==null)return[null,null];for(const[m,v]of i){const E=m.exec(g);if(E)return v(E)}return[null,null]}function Sn(...g){return(i,m)=>{const v={};let E;for(E=0;E<g.length;E++)v[g[E]]=Tt(i[m+E]);return[v,null,m+E]}}const hs=/(?:([Zz])|([+-]\d\d)(?::?(\d\d))?)/,ms=`(?:${hs.source}?(?:\\[(${fs.source})\\])?)?`,si=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,rr=RegExp(`${si.source}${ms}`),gs=RegExp(`(?:[Tt]${rr.source})?`),xs=/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,ir=/(\d{4})-?W(\d\d)(?:-?(\d))?/,Dc=/(\d{4})-?(\d{3})/,Nu=Sn("weekYear","weekNumber","weekDay"),wu=Sn("year","ordinal"),Su=/(\d{4})-(\d\d)-(\d\d)/,cr=RegExp(`${si.source} ?(?:${hs.source}|(${fs.source}))?`),Eu=RegExp(`(?: ${cr.source})?`);function yl(g,i,m){const v=g[i];return De(v)?m:Tt(v)}function Tu(g,i){return[{year:yl(g,i),month:yl(g,i+1,1),day:yl(g,i+2,1)},null,i+3]}function bl(g,i){return[{hours:yl(g,i,0),minutes:yl(g,i+1,0),seconds:yl(g,i+2,0),milliseconds:Kr(g[i+3])},null,i+4]}function ps(g,i){const m=!g[i]&&!g[i+1],v=rs(g[i+1],g[i+2]),E=m?null:gt.instance(v);return[{},E,i+3]}function jl(g,i){const m=g[i]?xe.create(g[i]):null;return[{},m,i+1]}const Cu=RegExp(`^T?${si.source}$`),Mu=/^-?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 Ou(g){const[i,m,v,E,A,V,B,Y,de]=g,be=i[0]==="-",Le=Y&&Y[0]==="-",Ye=(ke,jt=!1)=>ke!==void 0&&(jt||ke&&be)?-ke:ke;return[{years:Ye(Nn(m)),months:Ye(Nn(v)),weeks:Ye(Nn(E)),days:Ye(Nn(A)),hours:Ye(Nn(V)),minutes:Ye(Nn(B)),seconds:Ye(Nn(Y),Y==="-0"),milliseconds:Ye(Kr(de),Le)}]}const Ru={GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function vs(g,i,m,v,E,A,V){const B={year:i.length===2?ss(Tt(i)):Tt(i),month:ar.indexOf(m)+1,day:Tt(v),hour:Tt(E),minute:Tt(A)};return V&&(B.second=Tt(V)),g&&(B.weekday=g.length>3?os.indexOf(g)+1:Pa.indexOf(g)+1),B}const Du=/^(?:(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 ku(g){const[,i,m,v,E,A,V,B,Y,de,be,Le]=g,Ye=vs(i,E,v,m,A,V,B);let ke;return Y?ke=Ru[Y]:de?ke=0:ke=rs(be,Le),[Ye,new gt(ke)]}function Au(g){return g.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}const kc=/^(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$/,_u=/^(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$/,zu=/^(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 Ac(g){const[,i,m,v,E,A,V,B]=g;return[vs(i,E,v,m,A,V,B),gt.utcInstance]}function Lu(g){const[,i,m,v,E,A,V,B]=g;return[vs(i,B,m,v,E,A,V),gt.utcInstance]}const Uu=on(xs,gs),Hu=on(ir,gs),qu=on(Dc,gs),Vu=on(rr),_c=qn(Tu,bl,ps,jl),ri=qn(Nu,bl,ps,jl),ys=qn(wu,bl,ps,jl),Bu=qn(bl,ps,jl);function zc(g){return Ct(g,[Uu,_c],[Hu,ri],[qu,ys],[Vu,Bu])}function Lc(g){return Ct(Au(g),[Du,ku])}function Uc(g){return Ct(g,[kc,Ac],[_u,Ac],[zu,Lu])}function Hc(g){return Ct(g,[Mu,Ou])}const qc=qn(bl);function Nl(g){return Ct(g,[Cu,qc])}const Pu=on(Su,Eu),$u=on(cr),Yu=qn(bl,ps,jl);function Vc(g){return Ct(g,[Pu,_c],[$u,Yu])}const ii="Invalid Duration",wl={weeks:{days:7,hours:168,minutes:10080,seconds:10080*60,milliseconds:10080*60*1e3},days:{hours:24,minutes:1440,seconds:1440*60,milliseconds:1440*60*1e3},hours:{minutes:60,seconds:3600,milliseconds:3600*1e3},minutes:{seconds:60,milliseconds:60*1e3},seconds:{milliseconds:1e3}},bs={years:{quarters:4,months:12,weeks:52,days:365,hours:365*24,minutes:365*24*60,seconds:365*24*60*60,milliseconds:365*24*60*60*1e3},quarters:{months:3,weeks:13,days:91,hours:2184,minutes:2184*60,seconds:2184*60*60,milliseconds:2184*60*60*1e3},months:{weeks:4,days:30,hours:720,minutes:720*60,seconds:720*60*60,milliseconds:720*60*60*1e3},...wl},ya=146097/400,un=146097/4800,Bc={years:{quarters:4,months:12,weeks:ya/7,days:ya,hours:ya*24,minutes:ya*24*60,seconds:ya*24*60*60,milliseconds:ya*24*60*60*1e3},quarters:{months:3,weeks:ya/28,days:ya/4,hours:ya*24/4,minutes:ya*24*60/4,seconds:ya*24*60*60/4,milliseconds:ya*24*60*60*1e3/4},months:{weeks:un/7,days:un,hours:un*24,minutes:un*24*60,seconds:un*24*60*60,milliseconds:un*24*60*60*1e3},...wl},En=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],ci=En.slice(0).reverse();function Oa(g,i,m=!1){const v={values:m?i.values:{...g.values,...i.values||{}},loc:g.loc.clone(i.loc),conversionAccuracy:i.conversionAccuracy||g.conversionAccuracy,matrix:i.matrix||g.matrix};return new $e(v)}function oi(g,i){var m;let v=(m=i.milliseconds)!=null?m:0;for(const E of ci.slice(1))i[E]&&(v+=i[E]*g[E].milliseconds);return v}function ui(g,i){const m=oi(g,i)<0?-1:1;En.reduceRight((v,E)=>{if(De(i[E]))return v;if(v){const A=i[v]*m,V=g[E][v],B=Math.floor(A/V);i[E]+=B*m,i[v]-=B*V*m}return E},null),En.reduce((v,E)=>{if(De(i[E]))return v;if(v){const A=i[v]%1;i[v]-=A,i[E]+=A*g[v][E]}return E},null)}function di(g){const i={};for(const[m,v]of Object.entries(g))v!==0&&(i[m]=v);return i}class $e{constructor(i){const m=i.conversionAccuracy==="longterm"||!1;let v=m?Bc:bs;i.matrix&&(v=i.matrix),this.values=i.values,this.loc=i.loc||Ie.create(),this.conversionAccuracy=m?"longterm":"casual",this.invalid=i.invalid||null,this.matrix=v,this.isLuxonDuration=!0}static fromMillis(i,m){return $e.fromObject({milliseconds:i},m)}static fromObject(i,m={}){if(i==null||typeof i!="object")throw new b(`Duration.fromObject: argument expected to be an object, got ${i===null?"null":typeof i}`);return new $e({values:rn(i,$e.normalizeUnit),loc:Ie.fromObject(m),conversionAccuracy:m.conversionAccuracy,matrix:m.matrix})}static fromDurationLike(i){if(va(i))return $e.fromMillis(i);if($e.isDuration(i))return i;if(typeof i=="object")return $e.fromObject(i);throw new b(`Unknown duration argument ${i} of type ${typeof i}`)}static fromISO(i,m){const[v]=Hc(i);return v?$e.fromObject(v,m):$e.invalid("unparsable",`the input "${i}" can't be parsed as ISO 8601`)}static fromISOTime(i,m){const[v]=Nl(i);return v?$e.fromObject(v,m):$e.invalid("unparsable",`the input "${i}" can't be parsed as ISO 8601`)}static invalid(i,m=null){if(!i)throw new b("need to specify a reason the Duration is invalid");const v=i instanceof pa?i:new pa(i,m);if(mt.throwOnInvalid)throw new o(v);return new $e({invalid:v})}static normalizeUnit(i){const m={year:"years",years:"years",quarter:"quarters",quarters:"quarters",month:"months",months:"months",week:"weeks",weeks:"weeks",day:"days",days:"days",hour:"hours",hours:"hours",minute:"minutes",minutes:"minutes",second:"seconds",seconds:"seconds",millisecond:"milliseconds",milliseconds:"milliseconds"}[i&&i.toLowerCase()];if(!m)throw new f(i);return m}static isDuration(i){return i&&i.isLuxonDuration||!1}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}toFormat(i,m={}){const v={...m,floor:m.round!==!1&&m.floor!==!1};return this.isValid?Yt.create(this.loc,v).formatDurationFromString(this,i):ii}toHuman(i={}){if(!this.isValid)return ii;const m=i.showZeros!==!1,v=En.map(E=>{const A=this.values[E];return De(A)||A===0&&!m?null:this.loc.numberFormatter({style:"unit",unitDisplay:"long",...i,unit:E.slice(0,-1)}).format(A)}).filter(E=>E);return this.loc.listFormatter({type:"conjunction",style:i.listStyle||"narrow",...i}).format(v)}toObject(){return this.isValid?{...this.values}:{}}toISO(){if(!this.isValid)return null;let i="P";return this.years!==0&&(i+=this.years+"Y"),(this.months!==0||this.quarters!==0)&&(i+=this.months+this.quarters*3+"M"),this.weeks!==0&&(i+=this.weeks+"W"),this.days!==0&&(i+=this.days+"D"),(this.hours!==0||this.minutes!==0||this.seconds!==0||this.milliseconds!==0)&&(i+="T"),this.hours!==0&&(i+=this.hours+"H"),this.minutes!==0&&(i+=this.minutes+"M"),(this.seconds!==0||this.milliseconds!==0)&&(i+=ls(this.seconds+this.milliseconds/1e3,3)+"S"),i==="P"&&(i+="T0S"),i}toISOTime(i={}){if(!this.isValid)return null;const m=this.toMillis();return m<0||m>=864e5?null:(i={suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended",...i,includeOffset:!1},Ce.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=$e.fromDurationLike(i),v={};for(const E of En)(Ln(m.values,E)||Ln(this.values,E))&&(v[E]=m.get(E)+this.get(E));return Oa(this,{values:v},!0)}minus(i){if(!this.isValid)return this;const m=$e.fromDurationLike(i);return this.plus(m.negate())}mapUnits(i){if(!this.isValid)return this;const m={};for(const v of Object.keys(this.values))m[v]=ei(i(this.values[v],v));return Oa(this,{values:m},!0)}get(i){return this[$e.normalizeUnit(i)]}set(i){if(!this.isValid)return this;const m={...this.values,...rn(i,$e.normalizeUnit)};return Oa(this,{values:m})}reconfigure({locale:i,numberingSystem:m,conversionAccuracy:v,matrix:E}={}){const V={loc:this.loc.clone({locale:i,numberingSystem:m}),matrix:E,conversionAccuracy:v};return Oa(this,V)}as(i){return this.isValid?this.shiftTo(i).get(i):NaN}normalize(){if(!this.isValid)return this;const i=this.toObject();return ui(this.matrix,i),Oa(this,{values:i},!0)}rescale(){if(!this.isValid)return this;const i=di(this.normalize().shiftToAll().toObject());return Oa(this,{values:i},!0)}shiftTo(...i){if(!this.isValid)return this;if(i.length===0)return this;i=i.map(V=>$e.normalizeUnit(V));const m={},v={},E=this.toObject();let A;for(const V of En)if(i.indexOf(V)>=0){A=V;let B=0;for(const de in v)B+=this.matrix[de][V]*v[de],v[de]=0;va(E[V])&&(B+=E[V]);const Y=Math.trunc(B);m[V]=Y,v[V]=(B*1e3-Y*1e3)/1e3}else va(E[V])&&(v[V]=E[V]);for(const V in v)v[V]!==0&&(m[A]+=V===A?v[V]:v[V]/this.matrix[A][V]);return ui(this.matrix,m),Oa(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 Oa(this,{values:i},!0)}removeZeros(){if(!this.isValid)return this;const i=di(this.values);return Oa(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,E){return v===void 0||v===0?E===void 0||E===0:v===E}for(const v of En)if(!m(this.values[v],i.values[v]))return!1;return!0}}const Sl="Invalid Interval";function Gu(g,i){return!g||!g.isValid?xt.invalid("missing or invalid start"):!i||!i.isValid?xt.invalid("missing or invalid end"):i<g?xt.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 xt{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 pa?i:new pa(i,m);if(mt.throwOnInvalid)throw new u(v);return new xt({invalid:v})}static fromDateTimes(i,m){const v=Na(i),E=Na(m),A=Gu(v,E);return A??new xt({start:v,end:E})}static after(i,m){const v=$e.fromDurationLike(m),E=Na(i);return xt.fromDateTimes(E,E.plus(v))}static before(i,m){const v=$e.fromDurationLike(m),E=Na(i);return xt.fromDateTimes(E.minus(v),E)}static fromISO(i,m){const[v,E]=(i||"").split("/",2);if(v&&E){let A,V;try{A=Ce.fromISO(v,m),V=A.isValid}catch{V=!1}let B,Y;try{B=Ce.fromISO(E,m),Y=B.isValid}catch{Y=!1}if(V&&Y)return xt.fromDateTimes(A,B);if(V){const de=$e.fromISO(E,m);if(de.isValid)return xt.after(A,de)}else if(Y){const de=$e.fromISO(v,m);if(de.isValid)return xt.before(B,de)}}return xt.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 E;return m!=null&&m.useLocaleWeeks?E=this.end.reconfigure({locale:v.locale}):E=this.end,E=E.startOf(i,m),Math.floor(E.diff(v,i).get(i))+(E.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?xt.fromDateTimes(i||this.s,m||this.e):this}splitAt(...i){if(!this.isValid)return[];const m=i.map(Na).filter(V=>this.contains(V)).sort((V,B)=>V.toMillis()-B.toMillis()),v=[];let{s:E}=this,A=0;for(;E<this.e;){const V=m[A]||this.e,B=+V>+this.e?this.e:V;v.push(xt.fromDateTimes(E,B)),E=B,A+=1}return v}splitBy(i){const m=$e.fromDurationLike(i);if(!this.isValid||!m.isValid||m.as("milliseconds")===0)return[];let{s:v}=this,E=1,A;const V=[];for(;v<this.e;){const B=this.start.plus(m.mapUnits(Y=>Y*E));A=+B>+this.e?this.e:B,V.push(xt.fromDateTimes(v,A)),v=A,E+=1}return V}divideEqually(i){return this.isValid?this.splitBy(this.length()/i).slice(0,i):[]}overlaps(i){return this.e>i.s&&this.s<i.e}abutsStart(i){return this.isValid?+this.e==+i.s:!1}abutsEnd(i){return this.isValid?+i.e==+this.s:!1}engulfs(i){return this.isValid?this.s<=i.s&&this.e>=i.e:!1}equals(i){return!this.isValid||!i.isValid?!1:this.s.equals(i.s)&&this.e.equals(i.e)}intersection(i){if(!this.isValid)return this;const m=this.s>i.s?this.s:i.s,v=this.e<i.e?this.e:i.e;return m>=v?null:xt.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 xt.fromDateTimes(m,v)}static merge(i){const[m,v]=i.sort((E,A)=>E.s-A.s).reduce(([E,A],V)=>A?A.overlaps(V)||A.abutsStart(V)?[E,A.union(V)]:[E.concat([A]),V]:[E,V],[[],null]);return v&&m.push(v),m}static xor(i){let m=null,v=0;const E=[],A=i.map(Y=>[{time:Y.s,type:"s"},{time:Y.e,type:"e"}]),V=Array.prototype.concat(...A),B=V.sort((Y,de)=>Y.time-de.time);for(const Y of B)v+=Y.type==="s"?1:-1,v===1?m=Y.time:(m&&+m!=+Y.time&&E.push(xt.fromDateTimes(m,Y.time)),m=null);return xt.merge(E)}difference(...i){return xt.xor([this].concat(i)).map(m=>this.intersection(m)).filter(m=>m&&!m.isEmpty())}toString(){return this.isValid?`[${this.s.toISO()} – ${this.e.toISO()})`:Sl}[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=C,m={}){return this.isValid?Yt.create(this.s.loc.clone(m),i).formatInterval(this):Sl}toISO(i){return this.isValid?`${this.s.toISO(i)}/${this.e.toISO(i)}`:Sl}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:Sl}toISOTime(i){return this.isValid?`${this.s.toISOTime(i)}/${this.e.toISOTime(i)}`:Sl}toFormat(i,{separator:m=" – "}={}){return this.isValid?`${this.s.toFormat(i)}${m}${this.e.toFormat(i)}`:Sl}toDuration(i,m){return this.isValid?this.e.diff(this.s,i,m):$e.invalid(this.invalidReason)}mapEndpoints(i){return xt.fromDateTimes(i(this.s),i(this.e))}}class js{static hasDST(i=mt.defaultZone){const m=Ce.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 _t(i,mt.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:E=null,outputCalendar:A="gregory"}={}){return(E||Ie.create(m,v,A)).months(i)}static monthsFormat(i="long",{locale:m=null,numberingSystem:v=null,locObj:E=null,outputCalendar:A="gregory"}={}){return(E||Ie.create(m,v,A)).months(i,!0)}static weekdays(i="long",{locale:m=null,numberingSystem:v=null,locObj:E=null}={}){return(E||Ie.create(m,v,null)).weekdays(i)}static weekdaysFormat(i="long",{locale:m=null,numberingSystem:v=null,locObj:E=null}={}){return(E||Ie.create(m,v,null)).weekdays(i,!0)}static meridiems({locale:i=null}={}){return Ie.create(i).meridiems()}static eras(i="short",{locale:m=null}={}){return Ie.create(m,null,"gregory").eras(i)}static features(){return{relative:Xr(),localeWeek:jn()}}}function ra(g,i){const m=E=>E.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),v=m(i)-m(g);return Math.floor($e.fromMillis(v).as("days"))}function Ns(g,i,m){const v=[["years",(Y,de)=>de.year-Y.year],["quarters",(Y,de)=>de.quarter-Y.quarter+(de.year-Y.year)*4],["months",(Y,de)=>de.month-Y.month+(de.year-Y.year)*12],["weeks",(Y,de)=>{const be=ra(Y,de);return(be-be%7)/7}],["days",ra]],E={},A=g;let V,B;for(const[Y,de]of v)m.indexOf(Y)>=0&&(V=Y,E[Y]=de(g,i),B=A.plus(E),B>i?(E[Y]--,g=A.plus(E),g>i&&(B=g,E[Y]--,g=A.plus(E))):g=B);return[g,E,B,V]}function Pc(g,i,m,v){let[E,A,V,B]=Ns(g,i,m);const Y=i-E,de=m.filter(Le=>["hours","minutes","seconds","milliseconds"].indexOf(Le)>=0);de.length===0&&(V<i&&(V=E.plus({[B]:1})),V!==E&&(A[B]=(A[B]||0)+Y/(V-E)));const be=$e.fromObject(A,v);return de.length>0?$e.fromMillis(Y,v).shiftTo(...de).plus(be):be}const $c="missing Intl.DateTimeFormat.formatToParts support";function Xe(g,i=m=>m){return{regex:g,deser:([m])=>i(ye(m))}}const or="[ ]",Yc=new RegExp(or,"g");function El(g){return g.replace(/\./g,"\\.?").replace(Yc,or)}function ur(g){return g.replace(/\./g,"").replace(Yc," ").toLowerCase()}function ea(g,i){return g===null?null:{regex:RegExp(g.map(El).join("|")),deser:([m])=>g.findIndex(v=>ur(m)===ur(v))+i}}function dr(g,i){return{regex:g,deser:([,m,v])=>rs(m,v),groups:i}}function ws(g){return{regex:g,deser:([i])=>i}}function Vn(g){return g.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function Tl(g,i){const m=Ke(i),v=Ke(i,"{2}"),E=Ke(i,"{3}"),A=Ke(i,"{4}"),V=Ke(i,"{6}"),B=Ke(i,"{1,2}"),Y=Ke(i,"{1,3}"),de=Ke(i,"{1,6}"),be=Ke(i,"{1,9}"),Le=Ke(i,"{2,4}"),Ye=Ke(i,"{4,6}"),ke=It=>({regex:RegExp(Vn(It.val)),deser:([Tn])=>Tn,literal:!0}),Wt=(It=>{if(g.literal)return ke(It);switch(It.val){case"G":return ea(i.eras("short"),0);case"GG":return ea(i.eras("long"),0);case"y":return Xe(de);case"yy":return Xe(Le,ss);case"yyyy":return Xe(A);case"yyyyy":return Xe(Ye);case"yyyyyy":return Xe(V);case"M":return Xe(B);case"MM":return Xe(v);case"MMM":return ea(i.months("short",!0),1);case"MMMM":return ea(i.months("long",!0),1);case"L":return Xe(B);case"LL":return Xe(v);case"LLL":return ea(i.months("short",!1),1);case"LLLL":return ea(i.months("long",!1),1);case"d":return Xe(B);case"dd":return Xe(v);case"o":return Xe(Y);case"ooo":return Xe(E);case"HH":return Xe(v);case"H":return Xe(B);case"hh":return Xe(v);case"h":return Xe(B);case"mm":return Xe(v);case"m":return Xe(B);case"q":return Xe(B);case"qq":return Xe(v);case"s":return Xe(B);case"ss":return Xe(v);case"S":return Xe(Y);case"SSS":return Xe(E);case"u":return ws(be);case"uu":return ws(B);case"uuu":return Xe(m);case"a":return ea(i.meridiems(),0);case"kkkk":return Xe(A);case"kk":return Xe(Le,ss);case"W":return Xe(B);case"WW":return Xe(v);case"E":case"c":return Xe(m);case"EEE":return ea(i.weekdays("short",!1),1);case"EEEE":return ea(i.weekdays("long",!1),1);case"ccc":return ea(i.weekdays("short",!0),1);case"cccc":return ea(i.weekdays("long",!0),1);case"Z":case"ZZ":return dr(new RegExp(`([+-]${B.source})(?::(${v.source}))?`),2);case"ZZZ":return dr(new RegExp(`([+-]${B.source})(${v.source})?`),2);case"z":return ws(/[a-z_+-/]{1,256}?/i);case" ":return ws(/[^\S\n\r]/);default:return ke(It)}})(g)||{invalidReason:$c};return Wt.token=g,Wt}const fi={year:{"2-digit":"yy",numeric:"yyyyy"},month:{numeric:"M","2-digit":"MM",short:"MMM",long:"MMMM"},day:{numeric:"d","2-digit":"dd"},weekday:{short:"EEE",long:"EEEE"},dayperiod:"a",dayPeriod:"a",hour12:{numeric:"h","2-digit":"hh"},hour24:{numeric:"H","2-digit":"HH"},minute:{numeric:"m","2-digit":"mm"},second:{numeric:"s","2-digit":"ss"},timeZoneName:{long:"ZZZZZ",short:"ZZZ"}};function Gc(g,i,m){const{type:v,value:E}=g;if(v==="literal"){const Y=/^\s+$/.test(E);return{literal:!Y,val:Y?" ":E}}const A=i[v];let V=v;v==="hour"&&(i.hour12!=null?V=i.hour12?"hour12":"hour24":i.hourCycle!=null?i.hourCycle==="h11"||i.hourCycle==="h12"?V="hour12":V="hour24":V=m.hour12?"hour12":"hour24");let B=fi[V];if(typeof B=="object"&&(B=B[A]),B)return{literal:!1,val:B}}function Bn(g){return[`^${g.map(m=>m.regex).reduce((m,v)=>`${m}(${v.source})`,"")}$`,g]}function Fc(g,i,m){const v=g.match(i);if(v){const E={};let A=1;for(const V in m)if(Ln(m,V)){const B=m[V],Y=B.groups?B.groups+1:1;!B.literal&&B.token&&(E[B.token.val[0]]=B.deser(v.slice(A,A+Y))),A+=Y}return[v,E]}else return[v,{}]}function Zc(g){const i=A=>{switch(A){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 De(g.z)||(m=xe.create(g.z)),De(g.Z)||(m||(m=new gt(g.Z)),v=g.Z),De(g.q)||(g.M=(g.q-1)*3+1),De(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),De(g.u)||(g.S=Kr(g.u)),[Object.keys(g).reduce((A,V)=>{const B=i(V);return B&&(A[B]=g[V]),A},{}),m,v]}let fr=null;function Zu(){return fr||(fr=Ce.fromMillis(1555555555555)),fr}function Wu(g,i){if(g.literal)return g;const m=Yt.macroTokenToFormatOpts(g.val),v=ba(m,i);return v==null||v.includes(void 0)?g:v}function Wc(g,i){return Array.prototype.concat(...g.map(m=>Wu(m,i)))}class hi{constructor(i,m){if(this.locale=i,this.format=m,this.tokens=Wc(Yt.parseFormat(m),i),this.units=this.tokens.map(v=>Tl(v,i)),this.disqualifyingUnit=this.units.find(v=>v.invalidReason),!this.disqualifyingUnit){const[v,E]=Bn(this.units);this.regex=RegExp(v,"i"),this.handlers=E}}explainFromTokens(i){if(this.isValid){const[m,v]=Fc(i,this.regex,this.handlers),[E,A,V]=v?Zc(v):[null,null,void 0];if(Ln(v,"a")&&Ln(v,"H"))throw new h("Can't include meridiem when specifying 24-hour format");return{input:i,tokens:this.tokens,regex:this.regex,rawMatches:m,matches:v,result:E,zone:A,specificOffset:V}}else return{input:i,tokens:this.tokens,invalidReason:this.invalidReason}}get isValid(){return!this.disqualifyingUnit}get invalidReason(){return this.disqualifyingUnit?this.disqualifyingUnit.invalidReason:null}}function mi(g,i,m){return new hi(g,m).explainFromTokens(i)}function gi(g,i,m){const{result:v,zone:E,specificOffset:A,invalidReason:V}=mi(g,i,m);return[v,E,A,V]}function ba(g,i){if(!g)return null;const v=Yt.create(i,g).dtFormatter(Zu()),E=v.formatToParts(),A=v.resolvedOptions();return E.map(V=>Gc(V,g,A))}const Cl="Invalid DateTime",oa=864e13;function $a(g){return new pa("unsupported zone",`the zone "${g.name}" is not supported`)}function Ss(g){return g.weekData===null&&(g.weekData=$t(g.c)),g.weekData}function Ml(g){return g.localWeekData===null&&(g.localWeekData=$t(g.c,g.loc.getMinDaysInFirstWeek(),g.loc.getStartOfWeek())),g.localWeekData}function Ya(g,i){const m={ts:g.ts,zone:g.zone,c:g.c,o:g.o,loc:g.loc,invalid:g.invalid};return new Ce({...m,...i,old:m})}function hr(g,i,m){let v=g-i*60*1e3;const E=m.offset(v);if(i===E)return[v,i];v-=(E-i)*60*1e3;const A=m.offset(v);return E===A?[v,E]:[g-Math.min(E,A)*60*1e3,Math.max(E,A)]}function Ga(g,i){g+=i*60*1e3;const m=new Date(g);return{year:m.getUTCFullYear(),month:m.getUTCMonth()+1,day:m.getUTCDate(),hour:m.getUTCHours(),minute:m.getUTCMinutes(),second:m.getUTCSeconds(),millisecond:m.getUTCMilliseconds()}}function Es(g,i,m){return hr(Kt(g),i,m)}function Ts(g,i){const m=g.o,v=g.c.year+Math.trunc(i.years),E=g.c.month+Math.trunc(i.months)+Math.trunc(i.quarters)*3,A={...g.c,year:v,month:E,day:Math.min(g.c.day,er(v,E))+Math.trunc(i.days)+Math.trunc(i.weeks)*7},V=$e.fromObject({years:i.years-Math.trunc(i.years),quarters:i.quarters-Math.trunc(i.quarters),months:i.months-Math.trunc(i.months),weeks:i.weeks-Math.trunc(i.weeks),days:i.days-Math.trunc(i.days),hours:i.hours,minutes:i.minutes,seconds:i.seconds,milliseconds:i.milliseconds}).as("milliseconds"),B=Kt(A);let[Y,de]=hr(B,m,g.zone);return V!==0&&(Y+=V,de=g.zone.offset(Y)),{ts:Y,o:de}}function Ra(g,i,m,v,E,A){const{setZone:V,zone:B}=m;if(g&&Object.keys(g).length!==0||i){const Y=i||B,de=Ce.fromObject(g,{...m,zone:Y,specificOffset:A});return V?de:de.setZone(B)}else return Ce.invalid(new pa("unparsable",`the input "${E}" can't be parsed as ${v}`))}function mr(g,i,m=!0){return g.isValid?Yt.create(Ie.create("en-US"),{allowZ:m,forceSimple:!0}).formatDateTimeFromString(g,i):null}function ta(g,i,m){const v=g.c.year>9999||g.c.year<0;let E="";if(v&&g.c.year>=0&&(E+="+"),E+=st(g.c.year,v?6:4),m==="year")return E;if(i){if(E+="-",E+=st(g.c.month),m==="month")return E;E+="-"}else if(E+=st(g.c.month),m==="month")return E;return E+=st(g.c.day),E}function gr(g,i,m,v,E,A,V){let B=!m||g.c.millisecond!==0||g.c.second!==0,Y="";switch(V){case"day":case"month":case"year":break;default:if(Y+=st(g.c.hour),V==="hour")break;if(i){if(Y+=":",Y+=st(g.c.minute),V==="minute")break;B&&(Y+=":",Y+=st(g.c.second))}else{if(Y+=st(g.c.minute),V==="minute")break;B&&(Y+=st(g.c.second))}if(V==="second")break;B&&(!v||g.c.millisecond!==0)&&(Y+=".",Y+=st(g.c.millisecond,3))}return E&&(g.isOffsetFixed&&g.offset===0&&!A?Y+="Z":g.o<0?(Y+="-",Y+=st(Math.trunc(-g.o/60)),Y+=":",Y+=st(Math.trunc(-g.o%60))):(Y+="+",Y+=st(Math.trunc(g.o/60)),Y+=":",Y+=st(Math.trunc(g.o%60)))),A&&(Y+="["+g.zone.ianaName+"]"),Y}const Fa={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},Ic={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},xr={ordinal:1,hour:0,minute:0,second:0,millisecond:0},Za=["year","month","day","hour","minute","second","millisecond"],xi=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],Qc=["year","ordinal","hour","minute","second","millisecond"];function Ol(g){const i={year:"year",years:"year",month:"month",months:"month",day:"day",days:"day",hour:"hour",hours:"hour",minute:"minute",minutes:"minute",quarter:"quarter",quarters:"quarter",second:"second",seconds:"second",millisecond:"millisecond",milliseconds:"millisecond",weekday:"weekday",weekdays:"weekday",weeknumber:"weekNumber",weeksnumber:"weekNumber",weeknumbers:"weekNumber",weekyear:"weekYear",weekyears:"weekYear",ordinal:"ordinal"}[g.toLowerCase()];if(!i)throw new f(g);return i}function pi(g){switch(g.toLowerCase()){case"localweekday":case"localweekdays":return"localWeekday";case"localweeknumber":case"localweeknumbers":return"localWeekNumber";case"localweekyear":case"localweekyears":return"localWeekYear";default:return Ol(g)}}function ja(g){if(dn===void 0&&(dn=mt.now()),g.type!=="iana")return g.offset(dn);const i=g.name;let m=ia.get(i);return m===void 0&&(m=g.offset(dn),ia.set(i,m)),m}function Pn(g,i){const m=_t(i.zone,mt.defaultZone);if(!m.isValid)return Ce.invalid($a(m));const v=Ie.fromObject(i);let E,A;if(De(g.year))E=mt.now();else{for(const Y of Za)De(g[Y])&&(g[Y]=Fa[Y]);const V=Js(g)||zn(g);if(V)return Ce.invalid(V);const B=ja(m);[E,A]=Es(g,B,m)}return new Ce({ts:E,zone:m,loc:v,o:A})}function $n(g,i,m){const v=De(m.round)?!0:m.round,E=De(m.rounding)?"trunc":m.rounding,A=(B,Y)=>(B=ls(B,v||m.calendary?0:2,m.calendary?"round":E),i.loc.clone(m).relFormatter(m).format(B,Y)),V=B=>m.calendary?i.hasSame(g,B)?0:i.startOf(B).diff(g.startOf(B),B).get(B):i.diff(g,B).get(B);if(m.unit)return A(V(m.unit),m.unit);for(const B of m.units){const Y=V(B);if(Math.abs(Y)>=1)return A(Y,B)}return A(g>i?-0:0,m.units[m.units.length-1])}function Cs(g){let i={},m;return g.length>0&&typeof g[g.length-1]=="object"?(i=g[g.length-1],m=Array.from(g).slice(0,g.length-1)):m=Array.from(g),[i,m]}let dn;const ia=new Map;class Ce{constructor(i){const m=i.zone||mt.defaultZone;let v=i.invalid||(Number.isNaN(i.ts)?new pa("invalid input"):null)||(m.isValid?null:$a(m));this.ts=De(i.ts)?mt.now():i.ts;let E=null,A=null;if(!v)if(i.old&&i.old.ts===this.ts&&i.old.zone.equals(m))[E,A]=[i.old.c,i.old.o];else{const B=va(i.o)&&!i.old?i.o:m.offset(this.ts);E=Ga(this.ts,B),v=Number.isNaN(E.year)?new pa("invalid input"):null,E=v?null:E,A=v?null:B}this._zone=m,this.loc=i.loc||Ie.create(),this.invalid=v,this.weekData=null,this.localWeekData=null,this.c=E,this.o=A,this.isLuxonDateTime=!0}static now(){return new Ce({})}static local(){const[i,m]=Cs(arguments),[v,E,A,V,B,Y,de]=m;return Pn({year:v,month:E,day:A,hour:V,minute:B,second:Y,millisecond:de},i)}static utc(){const[i,m]=Cs(arguments),[v,E,A,V,B,Y,de]=m;return i.zone=gt.utcInstance,Pn({year:v,month:E,day:A,hour:V,minute:B,second:Y,millisecond:de},i)}static fromJSDate(i,m={}){const v=Ec(i)?i.valueOf():NaN;if(Number.isNaN(v))return Ce.invalid("invalid input");const E=_t(m.zone,mt.defaultZone);return E.isValid?new Ce({ts:v,zone:E,loc:Ie.fromObject(m)}):Ce.invalid($a(E))}static fromMillis(i,m={}){if(va(i))return i<-oa||i>oa?Ce.invalid("Timestamp out of range"):new Ce({ts:i,zone:_t(m.zone,mt.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(va(i))return new Ce({ts:i*1e3,zone:_t(m.zone,mt.defaultZone),loc:Ie.fromObject(m)});throw new b("fromSeconds requires a numerical input")}static fromObject(i,m={}){i=i||{};const v=_t(m.zone,mt.defaultZone);if(!v.isValid)return Ce.invalid($a(v));const E=Ie.fromObject(m),A=rn(i,pi),{minDaysInFirstWeek:V,startOfWeek:B}=wc(A,E),Y=mt.now(),de=De(m.specificOffset)?v.offset(Y):m.specificOffset,be=!De(A.ordinal),Le=!De(A.year),Ye=!De(A.month)||!De(A.day),ke=Le||Ye,jt=A.weekYear||A.weekNumber;if((ke||be)&&jt)throw new h("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(Ye&&be)throw new h("Can't mix ordinal dates with month/day");const Wt=jt||A.weekday&&!ke;let It,Tn,fn=Ga(Y,de);Wt?(It=xi,Tn=Ic,fn=$t(fn,V,B)):be?(It=Qc,Tn=xr,fn=as(fn)):(It=Za,Tn=Fa);let pr=!1;for(const Qa of It){const vr=A[Qa];De(vr)?pr?A[Qa]=Tn[Qa]:A[Qa]=fn[Qa]:pr=!0}const Yn=Wt?Sc(A,V,B):be?ns(A):Js(A),Ia=Yn||zn(A);if(Ia)return Ce.invalid(Ia);const Cn=Wt?_n(A,V,B):be?Nc(A):A,[hn,vi]=Es(Cn,de,v),Gn=new Ce({ts:hn,zone:v,o:vi,loc:E});return A.weekday&&ke&&i.weekday!==Gn.weekday?Ce.invalid("mismatched weekday",`you can't specify both a weekday of ${A.weekday} and a date of ${Gn.toISO()}`):Gn.isValid?Gn:Ce.invalid(Gn.invalid)}static fromISO(i,m={}){const[v,E]=zc(i);return Ra(v,E,m,"ISO 8601",i)}static fromRFC2822(i,m={}){const[v,E]=Lc(i);return Ra(v,E,m,"RFC 2822",i)}static fromHTTP(i,m={}){const[v,E]=Uc(i);return Ra(v,E,m,"HTTP",m)}static fromFormat(i,m,v={}){if(De(i)||De(m))throw new b("fromFormat requires an input string and a format");const{locale:E=null,numberingSystem:A=null}=v,V=Ie.fromOpts({locale:E,numberingSystem:A,defaultToEN:!0}),[B,Y,de,be]=gi(V,i,m);return be?Ce.invalid(be):Ra(B,Y,v,`format ${m}`,i,de)}static fromString(i,m,v={}){return Ce.fromFormat(i,m,v)}static fromSQL(i,m={}){const[v,E]=Vc(i);return Ra(v,E,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 pa?i:new pa(i,m);if(mt.throwOnInvalid)throw new r(v);return new Ce({invalid:v})}static isDateTime(i){return i&&i.isLuxonDateTime||!1}static parseFormatForOpts(i,m={}){const v=ba(i,Ie.fromObject(m));return v?v.map(E=>E?E.val:null).join(""):null}static expandFormat(i,m={}){return Wc(Yt.parseFormat(i),Ie.fromObject(m)).map(E=>E.val).join("")}static resetCache(){dn=void 0,ia.clear()}get(i){return this[i]}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}get outputCalendar(){return this.isValid?this.loc.outputCalendar:null}get zone(){return this._zone}get zoneName(){return this.isValid?this.zone.name:null}get year(){return this.isValid?this.c.year:NaN}get quarter(){return this.isValid?Math.ceil(this.c.month/3):NaN}get month(){return this.isValid?this.c.month:NaN}get day(){return this.isValid?this.c.day:NaN}get hour(){return this.isValid?this.c.hour:NaN}get minute(){return this.isValid?this.c.minute:NaN}get second(){return this.isValid?this.c.second:NaN}get millisecond(){return this.isValid?this.c.millisecond:NaN}get weekYear(){return this.isValid?Ss(this).weekYear:NaN}get weekNumber(){return this.isValid?Ss(this).weekNumber:NaN}get weekday(){return this.isValid?Ss(this).weekday:NaN}get isWeekend(){return this.isValid&&this.loc.getWeekendDays().includes(this.weekday)}get localWeekday(){return this.isValid?Ml(this).weekday:NaN}get localWeekNumber(){return this.isValid?Ml(this).weekNumber:NaN}get localWeekYear(){return this.isValid?Ml(this).weekYear:NaN}get ordinal(){return this.isValid?as(this.c).ordinal:NaN}get monthShort(){return this.isValid?js.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?js.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?js.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?js.weekdays("long",{locObj:this.loc})[this.weekday-1]:null}get offset(){return this.isValid?+this.o:NaN}get offsetNameShort(){return this.isValid?this.zone.offsetName(this.ts,{format:"short",locale:this.locale}):null}get offsetNameLong(){return this.isValid?this.zone.offsetName(this.ts,{format:"long",locale:this.locale}):null}get isOffsetFixed(){return this.isValid?this.zone.isUniversal:null}get isInDST(){return this.isOffsetFixed?!1:this.offset>this.set({month:1,day:1}).offset||this.offset>this.set({month:5}).offset}getPossibleOffsets(){if(!this.isValid||this.isOffsetFixed)return[this];const i=864e5,m=6e4,v=Kt(this.c),E=this.zone.offset(v-i),A=this.zone.offset(v+i),V=this.zone.offset(v-E*m),B=this.zone.offset(v-A*m);if(V===B)return[this];const Y=v-V*m,de=v-B*m,be=Ga(Y,V),Le=Ga(de,B);return be.hour===Le.hour&&be.minute===Le.minute&&be.second===Le.second&&be.millisecond===Le.millisecond?[Ya(this,{ts:Y}),Ya(this,{ts:de})]:[this]}get isInLeapYear(){return xl(this.year)}get daysInMonth(){return er(this.year,this.month)}get daysInYear(){return this.isValid?sn(this.year):NaN}get weeksInWeekYear(){return this.isValid?pl(this.weekYear):NaN}get weeksInLocalWeekYear(){return this.isValid?pl(this.localWeekYear,this.loc.getMinDaysInFirstWeek(),this.loc.getStartOfWeek()):NaN}resolvedLocaleOptions(i={}){const{locale:m,numberingSystem:v,calendar:E}=Yt.create(this.loc.clone(i),i).resolvedOptions(this);return{locale:m,numberingSystem:v,outputCalendar:E}}toUTC(i=0,m={}){return this.setZone(gt.instance(i),m)}toLocal(){return this.setZone(mt.defaultZone)}setZone(i,{keepLocalTime:m=!1,keepCalendarTime:v=!1}={}){if(i=_t(i,mt.defaultZone),i.equals(this.zone))return this;if(i.isValid){let E=this.ts;if(m||v){const A=i.offset(this.ts),V=this.toObject();[E]=Es(V,A,i)}return Ya(this,{ts:E,zone:i})}else return Ce.invalid($a(i))}reconfigure({locale:i,numberingSystem:m,outputCalendar:v}={}){const E=this.loc.clone({locale:i,numberingSystem:m,outputCalendar:v});return Ya(this,{loc:E})}setLocale(i){return this.reconfigure({locale:i})}set(i){if(!this.isValid)return this;const m=rn(i,pi),{minDaysInFirstWeek:v,startOfWeek:E}=wc(m,this.loc),A=!De(m.weekYear)||!De(m.weekNumber)||!De(m.weekday),V=!De(m.ordinal),B=!De(m.year),Y=!De(m.month)||!De(m.day),de=B||Y,be=m.weekYear||m.weekNumber;if((de||V)&&be)throw new h("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(Y&&V)throw new h("Can't mix ordinal dates with month/day");let Le;A?Le=_n({...$t(this.c,v,E),...m},v,E):De(m.ordinal)?(Le={...this.toObject(),...m},De(m.day)&&(Le.day=Math.min(er(Le.year,Le.month),Le.day))):Le=Nc({...as(this.c),...m});const[Ye,ke]=Es(Le,this.o,this.zone);return Ya(this,{ts:Ye,o:ke})}plus(i){if(!this.isValid)return this;const m=$e.fromDurationLike(i);return Ya(this,Ts(this,m))}minus(i){if(!this.isValid)return this;const m=$e.fromDurationLike(i).negate();return Ya(this,Ts(this,m))}startOf(i,{useLocaleWeeks:m=!1}={}){if(!this.isValid)return this;const v={},E=$e.normalizeUnit(i);switch(E){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(E==="weeks")if(m){const A=this.loc.getStartOfWeek(),{weekday:V}=this;V<A&&(v.weekNumber=this.weekNumber-1),v.weekday=A}else v.weekday=1;if(E==="quarters"){const A=Math.ceil(this.month/3);v.month=(A-1)*3+1}return this.set(v)}endOf(i,m){return this.isValid?this.plus({[i]:1}).startOf(i,m).minus(1):this}toFormat(i,m={}){return this.isValid?Yt.create(this.loc.redefaultToEN(m)).formatDateTimeFromString(this,i):Cl}toLocaleString(i=C,m={}){return this.isValid?Yt.create(this.loc.clone(m),i).formatDateTime(this):Cl}toLocaleParts(i={}){return this.isValid?Yt.create(this.loc.clone(i),i).formatDateTimeParts(this):[]}toISO({format:i="extended",suppressSeconds:m=!1,suppressMilliseconds:v=!1,includeOffset:E=!0,extendedZone:A=!1,precision:V="milliseconds"}={}){if(!this.isValid)return null;V=Ol(V);const B=i==="extended";let Y=ta(this,B,V);return Za.indexOf(V)>=3&&(Y+="T"),Y+=gr(this,B,m,v,E,A,V),Y}toISODate({format:i="extended",precision:m="day"}={}){return this.isValid?ta(this,i==="extended",Ol(m)):null}toISOWeekDate(){return mr(this,"kkkk-'W'WW-c")}toISOTime({suppressMilliseconds:i=!1,suppressSeconds:m=!1,includeOffset:v=!0,includePrefix:E=!1,extendedZone:A=!1,format:V="extended",precision:B="milliseconds"}={}){return this.isValid?(B=Ol(B),(E&&Za.indexOf(B)>=3?"T":"")+gr(this,V==="extended",m,i,v,A,B)):null}toRFC2822(){return mr(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)}toHTTP(){return mr(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")}toSQLDate(){return this.isValid?ta(this,!0):null}toSQLTime({includeOffset:i=!0,includeZone:m=!1,includeOffsetSpace:v=!0}={}){let E="HH:mm:ss.SSS";return(m||i)&&(v&&(E+=" "),m?E+="z":i&&(E+="ZZ")),mr(this,E,!0)}toSQL(i={}){return this.isValid?`${this.toSQLDate()} ${this.toSQLTime(i)}`:null}toString(){return this.isValid?this.toISO():Cl}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`DateTime { ts: ${this.toISO()}, zone: ${this.zone.name}, locale: ${this.locale} }`:`DateTime { Invalid, reason: ${this.invalidReason} }`}valueOf(){return this.toMillis()}toMillis(){return this.isValid?this.ts:NaN}toSeconds(){return this.isValid?this.ts/1e3:NaN}toUnixInteger(){return this.isValid?Math.floor(this.ts/1e3):NaN}toJSON(){return this.toISO()}toBSON(){return this.toJSDate()}toObject(i={}){if(!this.isValid)return{};const m={...this.c};return i.includeConfig&&(m.outputCalendar=this.outputCalendar,m.numberingSystem=this.loc.numberingSystem,m.locale=this.loc.locale),m}toJSDate(){return new Date(this.isValid?this.ts:NaN)}diff(i,m="milliseconds",v={}){if(!this.isValid||!i.isValid)return $e.invalid("created by diffing an invalid DateTime");const E={locale:this.locale,numberingSystem:this.numberingSystem,...v},A=gl(m).map($e.normalizeUnit),V=i.valueOf()>this.valueOf(),B=V?this:i,Y=V?i:this,de=Pc(B,Y,A,E);return V?de.negate():de}diffNow(i="milliseconds",m={}){return this.diff(Ce.now(),i,m)}until(i){return this.isValid?xt.fromDateTimes(this,i):this}hasSame(i,m,v){if(!this.isValid)return!1;const E=i.valueOf(),A=this.setZone(i.zone,{keepLocalTime:!0});return A.startOf(m,v)<=E&&E<=A.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||Ce.fromObject({},{zone:this.zone}),v=i.padding?this<m?-i.padding:i.padding:0;let E=["years","months","days","hours","minutes","seconds"],A=i.unit;return Array.isArray(i.unit)&&(E=i.unit,A=void 0),$n(m,this.plus(v),{...i,numeric:"always",units:E,unit:A})}toRelativeCalendar(i={}){return this.isValid?$n(i.base||Ce.fromObject({},{zone:this.zone}),this,{...i,numeric:"auto",units:["years","months","days"],calendary:!0}):null}static min(...i){if(!i.every(Ce.isDateTime))throw new b("min requires all arguments be DateTimes");return Tc(i,m=>m.valueOf(),Math.min)}static max(...i){if(!i.every(Ce.isDateTime))throw new b("max requires all arguments be DateTimes");return Tc(i,m=>m.valueOf(),Math.max)}static fromFormatExplain(i,m,v={}){const{locale:E=null,numberingSystem:A=null}=v,V=Ie.fromOpts({locale:E,numberingSystem:A,defaultToEN:!0});return mi(V,i,m)}static fromStringExplain(i,m,v={}){return Ce.fromFormatExplain(i,m,v)}static buildFormatParser(i,m={}){const{locale:v=null,numberingSystem:E=null}=m,A=Ie.fromOpts({locale:v,numberingSystem:E,defaultToEN:!0});return new hi(A,i)}static fromFormatParser(i,m,v={}){if(De(i)||De(m))throw new b("fromFormatParser requires an input string and a format parser");const{locale:E=null,numberingSystem:A=null}=v,V=Ie.fromOpts({locale:E,numberingSystem:A,defaultToEN:!0});if(!V.equals(m.locale))throw new b(`fromFormatParser called with a locale of ${V}, but the format parser was created for ${m.locale}`);const{result:B,zone:Y,specificOffset:de,invalidReason:be}=m.explainFromTokens(i);return be?Ce.invalid(be):Ra(B,Y,v,`format ${m.format}`,i,de)}static get DATE_SHORT(){return C}static get DATE_MED(){return z}static get DATE_MED_WITH_WEEKDAY(){return _}static get DATE_FULL(){return N}static get DATE_HUGE(){return O}static get TIME_SIMPLE(){return k}static get TIME_WITH_SECONDS(){return P}static get TIME_WITH_SHORT_OFFSET(){return D}static get TIME_WITH_LONG_OFFSET(){return Q}static get TIME_24_SIMPLE(){return w}static get TIME_24_WITH_SECONDS(){return K}static get TIME_24_WITH_SHORT_OFFSET(){return q}static get TIME_24_WITH_LONG_OFFSET(){return Z}static get DATETIME_SHORT(){return R}static get DATETIME_SHORT_WITH_SECONDS(){return ae}static get DATETIME_MED(){return M}static get DATETIME_MED_WITH_SECONDS(){return J}static get DATETIME_MED_WITH_WEEKDAY(){return le}static get DATETIME_FULL(){return fe}static get DATETIME_FULL_WITH_SECONDS(){return ve}static get DATETIME_HUGE(){return ue}static get DATETIME_HUGE_WITH_SECONDS(){return G}}function Na(g){if(Ce.isDateTime(g))return g;if(g&&g.valueOf&&va(g.valueOf()))return Ce.fromJSDate(g);if(g&&typeof g=="object")return Ce.fromObject(g);throw new b(`Unknown datetime argument: ${g}, of type ${typeof g}`)}const Wa="3.7.2";return Ma.DateTime=Ce,Ma.Duration=$e,Ma.FixedOffsetZone=gt,Ma.IANAZone=xe,Ma.Info=js,Ma.Interval=xt,Ma.InvalidZone=Bt,Ma.Settings=mt,Ma.SystemZone=me,Ma.VERSION=Wa,Ma.Zone=ne,Ma}var sx;function yh(){return sx||(sx=1,(function(n){var f,b,j,y,x,Gf,C,Ql;Object.defineProperty(n,"__esModule",{value:!0}),n.CronDate=n.DAYS_IN_MONTH=n.DateMathOp=n.TimeUnit=void 0;const r=t2();var u;(function(N){N.Second="Second",N.Minute="Minute",N.Hour="Hour",N.Day="Day",N.Month="Month",N.Year="Year"})(u||(n.TimeUnit=u={}));var o;(function(N){N.Add="Add",N.Subtract="Subtract"})(o||(n.DateMathOp=o={})),n.DAYS_IN_MONTH=Object.freeze([31,29,31,30,31,30,31,31,30,31,30,31]);const _=class _{constructor(O,k){nt(this,C);nt(this,f);nt(this,b,null);nt(this,j,null);nt(this,y,{add:{[u.Year]:this.addYear.bind(this),[u.Month]:this.addMonth.bind(this),[u.Day]:this.addDay.bind(this),[u.Hour]:this.addHour.bind(this),[u.Minute]:this.addMinute.bind(this),[u.Second]:this.addSecond.bind(this)},subtract:{[u.Year]:this.subtractYear.bind(this),[u.Month]:this.subtractMonth.bind(this),[u.Day]:this.subtractDay.bind(this),[u.Hour]:this.subtractHour.bind(this),[u.Minute]:this.subtractMinute.bind(this),[u.Second]:this.subtractSecond.bind(this)}});const P={zone:k};if(O?O instanceof _?(Oe(this,f,ee(O,f)),Oe(this,b,ee(O,b)),Oe(this,j,ee(O,j))):O instanceof Date?Oe(this,f,r.DateTime.fromJSDate(O,P)):typeof O=="number"?Oe(this,f,r.DateTime.fromMillis(O,P)):(Oe(this,f,r.DateTime.fromISO(O,P)),ee(this,f).isValid||Oe(this,f,r.DateTime.fromRFC2822(O,P)),ee(this,f).isValid||Oe(this,f,r.DateTime.fromSQL(O,P)),ee(this,f).isValid||Oe(this,f,r.DateTime.fromFormat(O,"EEE, d MMM yyyy HH:mm:ss",P))):Oe(this,f,r.DateTime.local()),!ee(this,f).isValid)throw new Error(`CronDate: unhandled timestamp: ${O}`);k&&k!==ee(this,f).zoneName&&Oe(this,f,ee(this,f).setZone(k))}get dstStart(){return ee(this,b)}set dstStart(O){Oe(this,b,O)}get dstEnd(){return ee(this,j)}set dstEnd(O){Oe(this,j,O)}addYear(){Oe(this,f,ee(this,f).plus({years:1}))}addMonth(){Oe(this,f,ee(this,f).plus({months:1}).startOf("month"))}addDay(){Oe(this,f,ee(this,f).plus({days:1}).startOf("day"))}addHour(){Oe(this,f,ee(this,f).plus({hours:1}).startOf("hour"))}addMinute(){Oe(this,f,ee(this,f).plus({minutes:1}).startOf("minute"))}addSecond(){Oe(this,f,ee(this,f).plus({seconds:1}))}subtractYear(){Oe(this,f,ee(this,f).minus({years:1}))}subtractMonth(){Oe(this,f,ee(this,f).minus({months:1}).endOf("month").startOf("second"))}subtractDay(){Oe(this,f,ee(this,f).minus({days:1}).endOf("day").startOf("second"))}subtractHour(){Oe(this,f,ee(this,f).minus({hours:1}).endOf("hour").startOf("second"))}subtractMinute(){Oe(this,f,ee(this,f).minus({minutes:1}).endOf("minute").startOf("second"))}subtractSecond(){Oe(this,f,ee(this,f).minus({seconds:1}))}addUnit(O){ee(this,y).add[O]()}subtractUnit(O){ee(this,y).subtract[O]()}invokeDateOperation(O,k){if(O===o.Add){this.addUnit(k);return}if(O===o.Subtract){this.subtractUnit(k);return}throw new Error(`Invalid verb: ${O}`)}getDate(){return ee(this,f).day}getFullYear(){return ee(this,f).year}getDay(){const O=ee(this,f).weekday;return O===7?0:O}getMonth(){return ee(this,f).month-1}getHours(){return ee(this,f).hour}getMinutes(){return ee(this,f).minute}getSeconds(){return ee(this,f).second}getMilliseconds(){return ee(this,f).millisecond}getUTCOffset(){return ee(this,f).offset}setStartOfDay(){Oe(this,f,ee(this,f).startOf("day"))}setEndOfDay(){Oe(this,f,ee(this,f).endOf("day"))}getTime(){return ee(this,f).valueOf()}getUTCDate(){return Ee(this,C,Ql).call(this).day}getUTCFullYear(){return Ee(this,C,Ql).call(this).year}getUTCDay(){const O=Ee(this,C,Ql).call(this).weekday;return O===7?0:O}getUTCMonth(){return Ee(this,C,Ql).call(this).month-1}getUTCHours(){return Ee(this,C,Ql).call(this).hour}getUTCMinutes(){return Ee(this,C,Ql).call(this).minute}getUTCSeconds(){return Ee(this,C,Ql).call(this).second}toISOString(){return ee(this,f).toUTC().toISO()}toJSON(){return ee(this,f).toJSON()}setDate(O){Oe(this,f,ee(this,f).set({day:O}))}setFullYear(O){Oe(this,f,ee(this,f).set({year:O}))}setDay(O){Oe(this,f,ee(this,f).set({weekday:O}))}setMonth(O){Oe(this,f,ee(this,f).set({month:O+1}))}setHours(O){Oe(this,f,ee(this,f).set({hour:O}))}setMinutes(O){Oe(this,f,ee(this,f).set({minute:O}))}setSeconds(O){Oe(this,f,ee(this,f).set({second:O}))}setMilliseconds(O){Oe(this,f,ee(this,f).set({millisecond:O}))}toString(){return this.toDate().toString()}toDate(){return ee(this,f).toJSDate()}isLastDayOfMonth(){var P;const{day:O,month:k}=ee(this,f);if(k===2){const D=Ee(P=_,x,Gf).call(P,ee(this,f).year);return O===n.DAYS_IN_MONTH[k-1]-(D?0:1)}return O===n.DAYS_IN_MONTH[k-1]}isLastWeekdayOfMonth(){var D;const{day:O,month:k}=ee(this,f);let P;return k===2?P=n.DAYS_IN_MONTH[k-1]-(Ee(D=_,x,Gf).call(D,ee(this,f).year)?0:1):P=n.DAYS_IN_MONTH[k-1],O>P-7}applyDateOperation(O,k,P){if(k===u.Month||k===u.Day){this.invokeDateOperation(O,k);return}const D=this.getHours();this.invokeDateOperation(O,k);const Q=this.getHours(),w=Q-D;w===2?P!==24&&(this.dstStart=Q):w===0&&this.getMinutes()===0&&this.getSeconds()===0&&P!==24&&(this.dstEnd=Q)}};f=new WeakMap,b=new WeakMap,j=new WeakMap,y=new WeakMap,x=new WeakSet,Gf=function(O){return O%4===0&&O%100!==0||O%400===0},C=new WeakSet,Ql=function(){return ee(this,f).toUTC()},nt(_,x);let h=_;n.CronDate=h,n.default=h})(Lf)),Lf}var rx;function a2(){if(rx)return lc;rx=1,Object.defineProperty(lc,"__esModule",{value:!0}),lc.CronMonth=void 0;const n=yh(),r=Fs(),u=1,o=12,h=Object.freeze([]);let f=class extends r.CronField{static get min(){return u}static get max(){return o}static get chars(){return h}static get daysInMonth(){return n.DAYS_IN_MONTH}constructor(j,y){super(j,y),this.validate()}get values(){return super.values}};return lc.CronMonth=f,lc}var sc={},ix;function n2(){if(ix)return sc;ix=1,Object.defineProperty(sc,"__esModule",{value:!0}),sc.CronSecond=void 0;const n=Fs(),r=0,u=59,o=Object.freeze([]);let h=class extends n.CronField{static get min(){return r}static get max(){return u}static get chars(){return o}constructor(b,j){super(b,j),this.validate()}get values(){return super.values}};return sc.CronSecond=h,sc}var cx;function bh(){return cx||(cx=1,(function(n){var r=Hs&&Hs.__createBinding||(Object.create?(function(o,h,f,b){b===void 0&&(b=f);var j=Object.getOwnPropertyDescriptor(h,f);(!j||("get"in j?!h.__esModule:j.writable||j.configurable))&&(j={enumerable:!0,get:function(){return h[f]}}),Object.defineProperty(o,b,j)}):(function(o,h,f,b){b===void 0&&(b=f),o[b]=h[f]})),u=Hs&&Hs.__exportStar||function(o,h){for(var f in o)f!=="default"&&!Object.prototype.hasOwnProperty.call(h,f)&&r(h,o,f)};Object.defineProperty(n,"__esModule",{value:!0}),u(QN(),n),u(XN(),n),u(JN(),n),u(Fs(),n),u(KN(),n),u(e2(),n),u(a2(),n),u(n2(),n)})(Hs)),Hs}var ox;function Cp(){var u,o,h,f,b,j,y,x,Ep,Tp;if(ox)return Ji;ox=1,Object.defineProperty(Ji,"__esModule",{value:!0}),Ji.CronFieldCollection=void 0;const n=bh();let r=(x=class{constructor({second:_,minute:N,hour:O,dayOfMonth:k,month:P,dayOfWeek:D}){nt(this,u);nt(this,o);nt(this,h);nt(this,f);nt(this,b);nt(this,j);if(!_)throw new Error("Validation error, Field second is missing");if(!N)throw new Error("Validation error, Field minute is missing");if(!O)throw new Error("Validation error, Field hour is missing");if(!k)throw new Error("Validation error, Field dayOfMonth is missing");if(!P)throw new Error("Validation error, Field month is missing");if(!D)throw new Error("Validation error, Field dayOfWeek is missing");if(P.values.length===1&&!k.hasLastChar&&!(parseInt(k.values[0],10)<=n.CronMonth.daysInMonth[P.values[0]-1]))throw new Error("Invalid explicit day of month definition");Oe(this,u,_),Oe(this,o,N),Oe(this,h,O),Oe(this,b,P),Oe(this,j,D),Oe(this,f,k)}static from(_,N){return new x({second:this.resolveField(n.CronSecond,_.second,N.second),minute:this.resolveField(n.CronMinute,_.minute,N.minute),hour:this.resolveField(n.CronHour,_.hour,N.hour),dayOfMonth:this.resolveField(n.CronDayOfMonth,_.dayOfMonth,N.dayOfMonth),month:this.resolveField(n.CronMonth,_.month,N.month),dayOfWeek:this.resolveField(n.CronDayOfWeek,_.dayOfWeek,N.dayOfWeek)})}static resolveField(_,N,O){return O?O instanceof n.CronField?O:new _(O):N}get second(){return ee(this,u)}get minute(){return ee(this,o)}get hour(){return ee(this,h)}get dayOfMonth(){return ee(this,f)}get month(){return ee(this,b)}get dayOfWeek(){return ee(this,j)}static compactField(_){if(_.length===0)return[];const N=[];let O;return _.forEach((k,P,D)=>{if(O===void 0){O={start:k,count:1};return}const Q=D[P-1]||O.start,w=D[P+1];if(k==="L"||k==="W"){N.push(O),N.push({start:k,count:1}),O=void 0;return}if(O.step===void 0&&w!==void 0){const K=k-Q,q=w-k;if(K<=q){O={...O,count:2,end:k,step:K};return}O.step=1}k-(O.end??0)===O.step?(O.count++,O.end=k):(O.count===1?N.push({start:O.start,count:1}):O.count===2?(N.push({start:O.start,count:1}),N.push({start:O.end??Q,count:1})):N.push(O),O={start:k,count:1})}),O&&N.push(O),N}stringifyField(_){var P;let N=_.max,O=_.values;if(_ instanceof n.CronDayOfWeek){N=6;const D=ee(this,j).values;O=D[D.length-1]===7?D.slice(0,-1):D}_ instanceof n.CronDayOfMonth&&(N=ee(this,b).values.length===1?n.CronMonth.daysInMonth[ee(this,b).values[0]-1]:_.max);const k=x.compactField(O);if(k.length===1){const D=Ee(P=x,y,Ep).call(P,_,k[0],N);if(D)return D}return k.map(D=>{var w;const Q=D.count===1?D.start.toString():Ee(w=x,y,Tp).call(w,D,N);return _ instanceof n.CronDayOfWeek&&_.nthDay>0?`${Q}#${_.nthDay}`:Q}).join(",")}stringify(_=!1){const N=[];return _&&N.push(this.stringifyField(ee(this,u))),N.push(this.stringifyField(ee(this,o)),this.stringifyField(ee(this,h)),this.stringifyField(ee(this,f)),this.stringifyField(ee(this,b)),this.stringifyField(ee(this,j))),N.join(" ")}serialize(){return{second:ee(this,u).serialize(),minute:ee(this,o).serialize(),hour:ee(this,h).serialize(),dayOfMonth:ee(this,f).serialize(),month:ee(this,b).serialize(),dayOfWeek:ee(this,j).serialize()}}},u=new WeakMap,o=new WeakMap,h=new WeakMap,f=new WeakMap,b=new WeakMap,j=new WeakMap,y=new WeakSet,Ep=function(_,N,O){const k=N.step;return k?k===1&&N.start===_.min&&N.end&&N.end>=O?_.hasQuestionMarkChar?"?":"*":k!==1&&N.start===_.min&&N.end&&N.end>=O-k+1?`*/${k}`:null:null},Tp=function(_,N){const O=_.step;if(O===1)return`${_.start}-${_.end}`;const k=_.start===0?_.count-1:_.count;if(!O)throw new Error("Unexpected range step");if(!_.end)throw new Error("Unexpected range end");if(O*k>_.end){const P=(Q,w)=>{if(typeof _.start!="number")throw new Error("Unexpected range start");return w%O===0?_.start+w:null};if(typeof _.start!="number")throw new Error("Unexpected range start");const D={length:_.end-_.start+1};return Array.from(D,P).filter(Q=>Q!==null).join(",")}return _.end===N-O+1?`${_.start}/${O}`:`${_.start}-${_.end}/${O}`},nt(x,y),x);return Ji.CronFieldCollection=r,Ji}var Uf={},ux;function _p(){return ux||(ux=1,(function(n){var h,f,b,j,y,x,S,C,z,Xl,N,Vs,Mp,Op,Rp,Dp,Ff,kp,Ap,Vr;Object.defineProperty(n,"__esModule",{value:!0}),n.CronExpression=n.LOOPS_LIMIT_EXCEEDED_ERROR_MESSAGE=n.TIME_SPAN_OUT_OF_BOUNDS_ERROR_MESSAGE=void 0;const r=yh();n.TIME_SPAN_OUT_OF_BOUNDS_ERROR_MESSAGE="Out of the time span range",n.LOOPS_LIMIT_EXCEEDED_ERROR_MESSAGE="Invalid expression, loop limit exceeded";const u=1e4,R=class R{constructor(M,J){nt(this,N);nt(this,h);nt(this,f);nt(this,b);nt(this,j);nt(this,y);nt(this,x);nt(this,S,null);nt(this,C,!1);Oe(this,h,J),Oe(this,f,J.tz),Oe(this,j,J.startDate?new r.CronDate(J.startDate,ee(this,f)):null),Oe(this,y,J.endDate?new r.CronDate(J.endDate,ee(this,f)):null);let le=J.currentDate??J.startDate;if(le){const fe=new r.CronDate(le,ee(this,f));ee(this,j)&&fe.getTime()<ee(this,j).getTime()?le=ee(this,j):ee(this,y)&&fe.getTime()>ee(this,y).getTime()&&(le=ee(this,y))}Oe(this,b,new r.CronDate(le,ee(this,f))),Oe(this,x,M)}get fields(){return ee(this,x)}static fieldsToExpression(M,J){return new R(M,J||{})}next(){return Ee(this,N,Vr).call(this)}prev(){return Ee(this,N,Vr).call(this,!0)}hasNext(){const M=ee(this,b);try{return Ee(this,N,Vr).call(this),!0}catch{return!1}finally{Oe(this,b,M)}}hasPrev(){const M=ee(this,b);try{return Ee(this,N,Vr).call(this,!0),!0}catch{return!1}finally{Oe(this,b,M)}}take(M){const J=[];if(M>=0)for(let le=0;le<M;le++)try{J.push(this.next())}catch{return J}else for(let le=0;le>M;le--)try{J.push(this.prev())}catch{return J}return J}reset(M){Oe(this,b,new r.CronDate(M||ee(this,h).currentDate))}stringify(M=!1){return ee(this,x).stringify(M)}includesDate(M){const{second:J,minute:le,hour:fe,month:ve}=ee(this,x),ue=new r.CronDate(M,ee(this,f));return!(!J.values.includes(ue.getSeconds())||!le.values.includes(ue.getMinutes())||!fe.values.includes(ue.getHours())||!ve.values.includes(ue.getMonth()+1)||!Ee(this,N,Ff).call(this,ue)||ee(this,x).dayOfWeek.nthDay>0&&Math.ceil(ue.getDate()/7)!==ee(this,x).dayOfWeek.nthDay)}toString(){return ee(this,h).expression||this.stringify(!0)}[Symbol.iterator](){return{next:()=>({value:Ee(this,N,Vr).call(this),done:!this.hasNext()})}}};h=new WeakMap,f=new WeakMap,b=new WeakMap,j=new WeakMap,y=new WeakMap,x=new WeakMap,S=new WeakMap,C=new WeakMap,z=new WeakSet,Xl=function(M,J){return J.some(le=>le===M)},N=new WeakSet,Vs=function(M,J){return M[J?M.length-1:0]},Mp=function(M){const J=`${M.getFullYear()}-${M.getMonth()+1}-${M.getDate()}`;if(ee(this,S)===J)return ee(this,C);const le=new r.CronDate(M);le.setStartOfDay();const fe=new r.CronDate(M);return fe.setEndOfDay(),Oe(this,S,J),Oe(this,C,le.getUTCOffset()!==fe.getUTCOffset()),ee(this,C)},Op=function(M,J,le){const fe=ee(this,x).second.values,ve=M.getSeconds(),ue=ee(this,x).second.findNearestValue(ve,le);if(ue!==null){M.setSeconds(ue);return}M.applyDateOperation(J,r.TimeUnit.Minute,ee(this,x).hour.values.length),M.setSeconds(Ee(this,N,Vs).call(this,fe,le))},Rp=function(M,J,le){const fe=ee(this,x).minute.values,ve=ee(this,x).second.values,ue=M.getMinutes(),G=ee(this,x).minute.findNearestValue(ue,le);if(G!==null){M.setMinutes(G),M.setSeconds(Ee(this,N,Vs).call(this,ve,le));return}M.applyDateOperation(J,r.TimeUnit.Hour,ee(this,x).hour.values.length),M.setMinutes(Ee(this,N,Vs).call(this,fe,le)),M.setSeconds(Ee(this,N,Vs).call(this,ve,le))},Dp=function(M,J){const le=J.isLastWeekdayOfMonth();return M.some(fe=>{const ve=parseInt(fe.toString().charAt(0),10)%7;if(Number.isNaN(ve))throw new Error(`Invalid last weekday of the month expression: ${fe}`);return J.getDay()===ve&&le})},Ff=function(M){var ne,he,me;const J=ee(this,x).dayOfMonth.isWildcard,le=!J,fe=ee(this,x).dayOfWeek.isWildcard,ve=!fe,ue=Ee(ne=R,z,Xl).call(ne,M.getDate(),ee(this,x).dayOfMonth.values)||ee(this,x).dayOfMonth.hasLastChar&&M.isLastDayOfMonth(),G=Ee(he=R,z,Xl).call(he,M.getDay(),ee(this,x).dayOfWeek.values)||ee(this,x).dayOfWeek.hasLastChar&&Ee(me=R,z,Dp).call(me,ee(this,x).dayOfWeek.values,M);return!!(le&&ve&&(ue||G)||ue&&!ve||J&&!fe&&G)},kp=function(M,J,le){var ze,H;const fe=ee(this,x).hour.values,ve=fe,ue=M.getHours(),G=Ee(ze=R,z,Xl).call(ze,ue,fe),ne=M.dstStart===ue,he=M.dstEnd===ue;if(ne)return Ee(H=R,z,Xl).call(H,ue-1,fe)?!0:(M.invokeDateOperation(J,r.TimeUnit.Hour),!1);if(he&&!le)return M.dstEnd=null,M.applyDateOperation(r.DateMathOp.Add,r.TimeUnit.Hour,ve.length),!1;if(G)return!0;M.dstStart=null;const me=ee(this,x).hour.findNearestValue(ue,le);if(me===null)return M.applyDateOperation(J,r.TimeUnit.Day,ve.length),!1;if(Ee(this,N,Mp).call(this,M)){const se=le?ue-me:me-ue;for(let ge=0;ge<se;ge++)M.applyDateOperation(J,r.TimeUnit.Hour,ve.length)}else M.setHours(me);return M.setMinutes(Ee(this,N,Vs).call(this,ee(this,x).minute.values,le)),M.setSeconds(Ee(this,N,Vs).call(this,ee(this,x).second.values,le)),!1},Ap=function(M){if(!ee(this,j)&&!ee(this,y))return;const J=M.getTime();if(ee(this,j)&&J<ee(this,j).getTime())throw new Error(n.TIME_SPAN_OUT_OF_BOUNDS_ERROR_MESSAGE);if(ee(this,y)&&J>ee(this,y).getTime())throw new Error(n.TIME_SPAN_OUT_OF_BOUNDS_ERROR_MESSAGE)},Vr=function(M=!1){var ue,G,ne;const J=M?r.DateMathOp.Subtract:r.DateMathOp.Add,le=new r.CronDate(ee(this,b)),fe=le.getTime();let ve=0;for(;++ve<u;){if(Ee(this,N,Ap).call(this,le),!Ee(this,N,Ff).call(this,le)){le.applyDateOperation(J,r.TimeUnit.Day,ee(this,x).hour.values.length);continue}if(!(ee(this,x).dayOfWeek.nthDay<=0||Math.ceil(le.getDate()/7)===ee(this,x).dayOfWeek.nthDay)){le.applyDateOperation(J,r.TimeUnit.Day,ee(this,x).hour.values.length);continue}if(!Ee(ue=R,z,Xl).call(ue,le.getMonth()+1,ee(this,x).month.values)){le.applyDateOperation(J,r.TimeUnit.Month,ee(this,x).hour.values.length);continue}if(Ee(this,N,kp).call(this,le,J,M)){if(!Ee(G=R,z,Xl).call(G,le.getMinutes(),ee(this,x).minute.values)){Ee(this,N,Rp).call(this,le,J,M);continue}if(!Ee(ne=R,z,Xl).call(ne,le.getSeconds(),ee(this,x).second.values)){Ee(this,N,Op).call(this,le,J,M);continue}if(fe===le.getTime()){(J==="Add"||le.getMilliseconds()===0)&&le.applyDateOperation(J,r.TimeUnit.Second,ee(this,x).hour.values.length);continue}break}}if(ve>u)throw new Error(n.LOOPS_LIMIT_EXCEEDED_ERROR_MESSAGE);return le.getMilliseconds()!==0&&le.setMilliseconds(0),Oe(this,b,le),le},nt(R,z);let o=R;n.CronExpression=o,n.default=o})(Uf)),Uf}var Xo={},dx;function l2(){if(dx)return Xo;dx=1,Object.defineProperty(Xo,"__esModule",{value:!0}),Xo.seededRandom=u;function n(o){let h=2166136261;for(let f=0;f<o.length;f++)h^=o.charCodeAt(f),h=Math.imul(h,16777619);return()=>h>>>0}function r(o){return()=>{let h=o+=1831565813;return h=Math.imul(h^h>>>15,h|1),h^=h+Math.imul(h^h>>>7,h|61),((h^h>>>14)>>>0)/4294967296}}function u(o){const h=o?n(o)():Math.floor(Math.random()*1e10);return r(h)}return Xo}var fx;function Wf(){var x,S,zp,Bs,Lp,Up,Hp,qp,Vp,Bp,Pp,Zf,$p,Yp;if(fx)return La;fx=1,Object.defineProperty(La,"__esModule",{value:!0}),La.CronExpressionParser=La.DayOfWeek=La.Months=La.CronUnit=La.PredefinedExpressions=void 0;const n=Cp(),r=_p(),u=l2(),o=bh();var h;(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"})(h||(La.PredefinedExpressions=h={}));var f;(function(Z){Z.Second="Second",Z.Minute="Minute",Z.Hour="Hour",Z.DayOfMonth="DayOfMonth",Z.Month="Month",Z.DayOfWeek="DayOfWeek"})(f||(La.CronUnit=f={}));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||(La.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||(La.DayOfWeek=j={}));let y=(S=class{static parse(R,ae={}){var ge,pe,Te,xe,Me,Ze,We,Dt;const{strict:M=!1,hashSeed:J}=ae,le=(0,u.seededRandom)(J);R=h[R]||R;const fe=Ee(ge=S,x,zp).call(ge,R,M);if(!(fe.dayOfMonth==="*"||fe.dayOfWeek==="*"||!M))throw new Error("Cannot use both dayOfMonth and dayOfWeek together in strict mode!");const ve=Ee(pe=S,x,Bs).call(pe,f.Second,fe.second,o.CronSecond.constraints,le),ue=Ee(Te=S,x,Bs).call(Te,f.Minute,fe.minute,o.CronMinute.constraints,le),G=Ee(xe=S,x,Bs).call(xe,f.Hour,fe.hour,o.CronHour.constraints,le),ne=Ee(Me=S,x,Bs).call(Me,f.Month,fe.month,o.CronMonth.constraints,le),he=Ee(Ze=S,x,Bs).call(Ze,f.DayOfMonth,fe.dayOfMonth,o.CronDayOfMonth.constraints,le),{dayOfWeek:me,nthDayOfWeek:ze}=Ee(We=S,x,$p).call(We,fe.dayOfWeek),H=Ee(Dt=S,x,Bs).call(Dt,f.DayOfWeek,me,o.CronDayOfWeek.constraints,le),se=new n.CronFieldCollection({second:new o.CronSecond(ve,{rawValue:fe.second}),minute:new o.CronMinute(ue,{rawValue:fe.minute}),hour:new o.CronHour(G,{rawValue:fe.hour}),dayOfMonth:new o.CronDayOfMonth(he,{rawValue:fe.dayOfMonth}),month:new o.CronMonth(ne,{rawValue:fe.month}),dayOfWeek:new o.CronDayOfWeek(H,{rawValue:fe.dayOfWeek,nthDayOfWeek:ze})});return new r.CronExpression(se,{...ae,expression:R})}},x=new WeakSet,zp=function(R,ae){if(ae&&!R.length)throw new Error("Invalid cron expression");R=R||"0 * * * * *";const M=R.trim().split(/\s+/);if(ae&&M.length<6)throw new Error("Invalid cron expression, expected 6 fields");if(M.length>6)throw new Error("Invalid cron expression, too many fields");const J=["*","*","*","*","*","0"];M.length<J.length&&M.unshift(...J.slice(M.length));const[le,fe,ve,ue,G,ne]=M;return{second:le,minute:fe,hour:ve,dayOfMonth:ue,month:G,dayOfWeek:ne}},Bs=function(R,ae,M,J){if((R===f.Month||R===f.DayOfWeek)&&(ae=ae.replace(/[a-z]{3}/gi,le=>{le=le.toLowerCase();const fe=b[le]||j[le];if(fe===void 0)throw new Error(`Validation error, cannot resolve alias "${le}"`);return fe.toString()})),!M.validChars.test(ae))throw new Error(`Invalid characters, got value: ${ae}`);return ae=Ee(this,x,Lp).call(this,ae,M),ae=Ee(this,x,Up).call(this,ae,M,J),Ee(this,x,Hp).call(this,R,ae,M)},Lp=function(R,ae){return R.replace(/[*?]/g,ae.min+"-"+ae.max)},Up=function(R,ae,M){const J=M();return R.replace(/H(?:\((\d+)-(\d+)\))?(?:\/(\d+))?/g,(le,fe,ve,ue)=>{if(fe&&ve&&ue){const G=parseInt(fe,10),ne=parseInt(ve,10),he=parseInt(ue,10);if(G>ne)throw new Error(`Invalid range: ${G}-${ne}, min > max`);if(he<=0)throw new Error(`Invalid step: ${he}, must be positive`);const me=Math.max(G,ae.min),ze=Math.floor(J*he),H=[];for(let se=Math.floor(me/he)*he+ze;se<=ne;se+=he)se>=me&&H.push(se);return H.join(",")}else if(fe&&ve){const G=parseInt(fe,10),ne=parseInt(ve,10);if(G>ne)throw new Error(`Invalid range: ${G}-${ne}, min > max`);return String(Math.floor(J*(ne-G+1))+G)}else if(ue){const G=parseInt(ue,10);if(G<=0)throw new Error(`Invalid step: ${G}, must be positive`);const ne=Math.floor(J*G),he=[];for(let me=Math.floor(ae.min/G)*G+ne;me<=ae.max;me+=G)me>=ae.min&&he.push(me);return he.join(",")}else return String(Math.floor(J*(ae.max-ae.min+1)+ae.min))})},Hp=function(R,ae,M){const J=[];function le(ve,ue){var G;if(Array.isArray(ve))J.push(...ve);else if(Ee(G=S,x,Yp).call(G,ue,ve))J.push(ve);else{const ne=parseInt(ve.toString(),10);if(!(ne>=ue.min&&ne<=ue.max))throw new Error(`Constraint error, got value ${ve} expected range ${ue.min}-${ue.max}`);J.push(R===f.DayOfWeek?ne%7:ve)}}return ae.split(",").forEach(ve=>{var ue;if(!(ve.length>0))throw new Error("Invalid list value format");le(Ee(ue=S,x,qp).call(ue,R,ve,M),M)}),J},qp=function(R,ae,M){var le,fe;const J=ae.split("/");if(J.length>2)throw new Error(`Invalid repeat: ${ae}`);return J.length===2?(isNaN(parseInt(J[0],10))||(J[0]=`${J[0]}-${M.max}`),Ee(le=S,x,Zf).call(le,R,J[0],parseInt(J[1],10),M)):Ee(fe=S,x,Zf).call(fe,R,ae,1,M)},Vp=function(R,ae,M){if(!(!isNaN(R)&&!isNaN(ae)&&R>=M.min&&ae<=M.max))throw new Error(`Constraint error, got range ${R}-${ae} expected range ${M.min}-${M.max}`);if(R>ae)throw new Error(`Invalid range: ${R}-${ae}, min(${R}) > max(${ae})`)},Bp=function(R){if(!(!isNaN(R)&&R>0))throw new Error(`Constraint error, cannot repeat at every ${R} time.`)},Pp=function(R,ae,M,J){const le=[];R===f.DayOfWeek&&M%7===0&&le.push(0);for(let fe=ae;fe<=M;fe+=J)le.indexOf(fe)===-1&&le.push(fe);return le},Zf=function(R,ae,M,J){const le=ae.split("-");if(le.length<=1)return isNaN(+ae)?ae:+ae;const[fe,ve]=le.map(ue=>parseInt(ue,10));return Ee(this,x,Vp).call(this,fe,ve,J),Ee(this,x,Bp).call(this,M),Ee(this,x,Pp).call(this,R,fe,ve,M)},$p=function(R){const ae=R.split("#");if(ae.length<=1)return{dayOfWeek:ae[0]};const M=+ae[ae.length-1],J=R.match(/([,-/])/);if(J!==null)throw new Error(`Constraint error, invalid dayOfWeek \`#\` and \`${J==null?void 0:J[0]}\` special characters are incompatible`);if(!(ae.length<=2&&!isNaN(M)&&M>=1&&M<=5))throw new Error("Constraint error, invalid dayOfWeek occurrence number (#)");return{dayOfWeek:ae[0],nthDayOfWeek:M}},Yp=function(R,ae){return R.chars.some(M=>ae.toString().includes(M))},nt(S,x),S);return La.CronExpressionParser=y,La}var xn={};const s2={},r2=Object.freeze(Object.defineProperty({__proto__:null,default:s2},Symbol.toStringTag,{value:"Module"})),hx=Ny(r2);var mx;function i2(){var f,b,If,Gp;if(mx)return xn;mx=1;var n=xn&&xn.__createBinding||(Object.create?(function(x,S,C,z){z===void 0&&(z=C);var _=Object.getOwnPropertyDescriptor(S,C);(!_||("get"in _?!S.__esModule:_.writable||_.configurable))&&(_={enumerable:!0,get:function(){return S[C]}}),Object.defineProperty(x,z,_)}):(function(x,S,C,z){z===void 0&&(z=C),x[z]=S[C]})),r=xn&&xn.__setModuleDefault||(Object.create?(function(x,S){Object.defineProperty(x,"default",{enumerable:!0,value:S})}):function(x,S){x.default=S}),u=xn&&xn.__importStar||(function(){var x=function(S){return x=Object.getOwnPropertyNames||function(C){var z=[];for(var _ in C)Object.prototype.hasOwnProperty.call(C,_)&&(z[z.length]=_);return z},x(S)};return function(S){if(S&&S.__esModule)return S;var C={};if(S!=null)for(var z=x(S),_=0;_<z.length;_++)z[_]!=="default"&&n(C,S,z[_]);return r(C,S),C}})();Object.defineProperty(xn,"__esModule",{value:!0}),xn.CronFileParser=void 0;const o=Wf();let h=(b=class{static async parseFile(S){var _;const{readFile:C}=await Promise.resolve().then(()=>u(hx)),z=await C(S,"utf8");return Ee(_=b,f,If).call(_,z)}static parseFileSync(S){var _;const{readFileSync:C}=hx,z=C(S,"utf8");return Ee(_=b,f,If).call(_,z)}},f=new WeakSet,If=function(S){var _;const C=S.split(`
|
|
446
|
+
`),z={variables:{},expressions:[],errors:{}};for(const N of C){const O=N.trim();if(O.length===0||O.startsWith("#"))continue;const k=O.match(/^(.*)=(.*)$/);if(k){const[,P,D]=k;z.variables[P]=D.replace(/["']/g,"");continue}try{const P=Ee(_=b,f,Gp).call(_,O);z.expressions.push(P.interval)}catch(P){z.errors[O]=P}}return z},Gp=function(S){const C=S.split(" ");return{interval:o.CronExpressionParser.parse(C.slice(0,5).join(" ")),command:C.slice(5,C.length)}},nt(b,f),b);return xn.CronFileParser=h,xn}var gx;function c2(){return gx||(gx=1,(function(n){var r=Us&&Us.__createBinding||(Object.create?(function(x,S,C,z){z===void 0&&(z=C);var _=Object.getOwnPropertyDescriptor(S,C);(!_||("get"in _?!S.__esModule:_.writable||_.configurable))&&(_={enumerable:!0,get:function(){return S[C]}}),Object.defineProperty(x,z,_)}):(function(x,S,C,z){z===void 0&&(z=C),x[z]=S[C]})),u=Us&&Us.__exportStar||function(x,S){for(var C in x)C!=="default"&&!Object.prototype.hasOwnProperty.call(S,C)&&r(S,x,C)};Object.defineProperty(n,"__esModule",{value:!0}),n.CronFileParser=n.CronExpressionParser=n.CronExpression=n.CronFieldCollection=n.CronDate=void 0;const o=Wf();var h=yh();Object.defineProperty(n,"CronDate",{enumerable:!0,get:function(){return h.CronDate}});var f=Cp();Object.defineProperty(n,"CronFieldCollection",{enumerable:!0,get:function(){return f.CronFieldCollection}});var b=_p();Object.defineProperty(n,"CronExpression",{enumerable:!0,get:function(){return b.CronExpression}});var j=Wf();Object.defineProperty(n,"CronExpressionParser",{enumerable:!0,get:function(){return j.CronExpressionParser}});var y=i2();Object.defineProperty(n,"CronFileParser",{enumerable:!0,get:function(){return y.CronFileParser}}),u(bh(),n),n.default=o.CronExpressionParser})(Us)),Us}var o2=c2();const Fp=6048e5,u2=864e5,d2=6e4,f2=36e5,xx=Symbol.for("constructDateFrom");function Ha(n,r){return typeof n=="function"?n(r):n&&typeof n=="object"&&xx in n?n[xx](r):n instanceof Date?new n.constructor(r):new Date(r)}function Rt(n,r){return Ha(r||n,n)}function h2(n,r,u){return Ha(n,+Rt(n)+r)}function Jo(n,r,u){return h2(n,r*f2)}let m2={};function yu(){return m2}function mc(n,r){var j,y,x,S;const u=yu(),o=(r==null?void 0:r.weekStartsOn)??((y=(j=r==null?void 0:r.locale)==null?void 0:j.options)==null?void 0:y.weekStartsOn)??u.weekStartsOn??((S=(x=u.locale)==null?void 0:x.options)==null?void 0:S.weekStartsOn)??0,h=Rt(n,r==null?void 0:r.in),f=h.getDay(),b=(f<o?7:0)+f-o;return h.setDate(h.getDate()-b),h.setHours(0,0,0,0),h}function du(n,r){return mc(n,{...r,weekStartsOn:1})}function Zp(n,r){const u=Rt(n,r==null?void 0:r.in),o=u.getFullYear(),h=Ha(u,0);h.setFullYear(o+1,0,4),h.setHours(0,0,0,0);const f=du(h),b=Ha(u,0);b.setFullYear(o,0,4),b.setHours(0,0,0,0);const j=du(b);return u.getTime()>=f.getTime()?o+1:u.getTime()>=j.getTime()?o:o-1}function px(n){const r=Rt(n),u=new Date(Date.UTC(r.getFullYear(),r.getMonth(),r.getDate(),r.getHours(),r.getMinutes(),r.getSeconds(),r.getMilliseconds()));return u.setUTCFullYear(r.getFullYear()),+n-+u}function g2(n,...r){const u=Ha.bind(null,r.find(o=>typeof o=="object"));return r.map(u)}function vx(n,r){const u=Rt(n,r==null?void 0:r.in);return u.setHours(0,0,0,0),u}function x2(n,r,u){const[o,h]=g2(u==null?void 0:u.in,n,r),f=vx(o),b=vx(h),j=+f-px(f),y=+b-px(b);return Math.round((j-y)/u2)}function p2(n,r){const u=Zp(n,r),o=Ha(n,0);return o.setFullYear(u,0,4),o.setHours(0,0,0,0),du(o)}function v2(n,r){let u,o=r==null?void 0:r.in;return n.forEach(h=>{!o&&typeof h=="object"&&(o=Ha.bind(null,h));const f=Rt(h,o);(!u||u<f||isNaN(+f))&&(u=f)}),Ha(o,u||NaN)}function y2(n,r){let u,o=r==null?void 0:r.in;return n.forEach(h=>{!o&&typeof h=="object"&&(o=Ha.bind(null,h));const f=Rt(h,o);(!u||u>f||isNaN(+f))&&(u=f)}),Ha(o,u||NaN)}function b2(n){return n instanceof Date||typeof n=="object"&&Object.prototype.toString.call(n)==="[object Date]"}function j2(n){return!(!b2(n)&&typeof n!="number"||isNaN(+Rt(n)))}function N2(n){return r=>{const o=(n?Math[n]:Math.trunc)(r);return o===0?0:o}}function w2(n,r){return+Rt(n)-+Rt(r)}function yx(n,r,u){const o=w2(n,r)/d2;return N2(u==null?void 0:u.roundingMethod)(o)}function S2(n,r){const u=Rt(n,r==null?void 0:r.in);return u.setFullYear(u.getFullYear(),0,1),u.setHours(0,0,0,0),u}const E2={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"}},T2=(n,r,u)=>{let o;const h=E2[n];return typeof h=="string"?o=h:r===1?o=h.one:o=h.other.replace("{{count}}",r.toString()),u!=null&&u.addSuffix?u.comparison&&u.comparison>0?"in "+o:o+" ago":o};function Hf(n){return(r={})=>{const u=r.width?String(r.width):n.defaultWidth;return n.formats[u]||n.formats[n.defaultWidth]}}const C2={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},M2={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},O2={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},R2={date:Hf({formats:C2,defaultWidth:"full"}),time:Hf({formats:M2,defaultWidth:"full"}),dateTime:Hf({formats:O2,defaultWidth:"full"})},D2={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},k2=(n,r,u,o)=>D2[n];function rc(n){return(r,u)=>{const o=u!=null&&u.context?String(u.context):"standalone";let h;if(o==="formatting"&&n.formattingValues){const b=n.defaultFormattingWidth||n.defaultWidth,j=u!=null&&u.width?String(u.width):b;h=n.formattingValues[j]||n.formattingValues[b]}else{const b=n.defaultWidth,j=u!=null&&u.width?String(u.width):n.defaultWidth;h=n.values[j]||n.values[b]}const f=n.argumentCallback?n.argumentCallback(r):r;return h[f]}}const A2={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},_2={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},z2={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"]},L2={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"]},U2={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"}},H2={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"}},q2=(n,r)=>{const u=Number(n),o=u%100;if(o>20||o<10)switch(o%10){case 1:return u+"st";case 2:return u+"nd";case 3:return u+"rd"}return u+"th"},V2={ordinalNumber:q2,era:rc({values:A2,defaultWidth:"wide"}),quarter:rc({values:_2,defaultWidth:"wide",argumentCallback:n=>n-1}),month:rc({values:z2,defaultWidth:"wide"}),day:rc({values:L2,defaultWidth:"wide"}),dayPeriod:rc({values:U2,defaultWidth:"wide",formattingValues:H2,defaultFormattingWidth:"wide"})};function ic(n){return(r,u={})=>{const o=u.width,h=o&&n.matchPatterns[o]||n.matchPatterns[n.defaultMatchWidth],f=r.match(h);if(!f)return null;const b=f[0],j=o&&n.parsePatterns[o]||n.parsePatterns[n.defaultParseWidth],y=Array.isArray(j)?P2(j,C=>C.test(b)):B2(j,C=>C.test(b));let x;x=n.valueCallback?n.valueCallback(y):y,x=u.valueCallback?u.valueCallback(x):x;const S=r.slice(b.length);return{value:x,rest:S}}}function B2(n,r){for(const u in n)if(Object.prototype.hasOwnProperty.call(n,u)&&r(n[u]))return u}function P2(n,r){for(let u=0;u<n.length;u++)if(r(n[u]))return u}function $2(n){return(r,u={})=>{const o=r.match(n.matchPattern);if(!o)return null;const h=o[0],f=r.match(n.parsePattern);if(!f)return null;let b=n.valueCallback?n.valueCallback(f[0]):f[0];b=u.valueCallback?u.valueCallback(b):b;const j=r.slice(h.length);return{value:b,rest:j}}}const Y2=/^(\d+)(th|st|nd|rd)?/i,G2=/\d+/i,F2={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},Z2={any:[/^b/i,/^(a|c)/i]},W2={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},I2={any:[/1/i,/2/i,/3/i,/4/i]},Q2={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},X2={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]},J2={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},K2={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]},ew={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},tw={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}},aw={ordinalNumber:$2({matchPattern:Y2,parsePattern:G2,valueCallback:n=>parseInt(n,10)}),era:ic({matchPatterns:F2,defaultMatchWidth:"wide",parsePatterns:Z2,defaultParseWidth:"any"}),quarter:ic({matchPatterns:W2,defaultMatchWidth:"wide",parsePatterns:I2,defaultParseWidth:"any",valueCallback:n=>n+1}),month:ic({matchPatterns:Q2,defaultMatchWidth:"wide",parsePatterns:X2,defaultParseWidth:"any"}),day:ic({matchPatterns:J2,defaultMatchWidth:"wide",parsePatterns:K2,defaultParseWidth:"any"}),dayPeriod:ic({matchPatterns:ew,defaultMatchWidth:"any",parsePatterns:tw,defaultParseWidth:"any"})},nw={code:"en-US",formatDistance:T2,formatLong:R2,formatRelative:k2,localize:V2,match:aw,options:{weekStartsOn:0,firstWeekContainsDate:1}};function lw(n,r){const u=Rt(n,r==null?void 0:r.in);return x2(u,S2(u))+1}function sw(n,r){const u=Rt(n,r==null?void 0:r.in),o=+du(u)-+p2(u);return Math.round(o/Fp)+1}function Wp(n,r){var S,C,z,_;const u=Rt(n,r==null?void 0:r.in),o=u.getFullYear(),h=yu(),f=(r==null?void 0:r.firstWeekContainsDate)??((C=(S=r==null?void 0:r.locale)==null?void 0:S.options)==null?void 0:C.firstWeekContainsDate)??h.firstWeekContainsDate??((_=(z=h.locale)==null?void 0:z.options)==null?void 0:_.firstWeekContainsDate)??1,b=Ha((r==null?void 0:r.in)||n,0);b.setFullYear(o+1,0,f),b.setHours(0,0,0,0);const j=mc(b,r),y=Ha((r==null?void 0:r.in)||n,0);y.setFullYear(o,0,f),y.setHours(0,0,0,0);const x=mc(y,r);return+u>=+j?o+1:+u>=+x?o:o-1}function rw(n,r){var j,y,x,S;const u=yu(),o=(r==null?void 0:r.firstWeekContainsDate)??((y=(j=r==null?void 0:r.locale)==null?void 0:j.options)==null?void 0:y.firstWeekContainsDate)??u.firstWeekContainsDate??((S=(x=u.locale)==null?void 0:x.options)==null?void 0:S.firstWeekContainsDate)??1,h=Wp(n,r),f=Ha((r==null?void 0:r.in)||n,0);return f.setFullYear(h,0,o),f.setHours(0,0,0,0),mc(f,r)}function iw(n,r){const u=Rt(n,r==null?void 0:r.in),o=+mc(u,r)-+rw(u,r);return Math.round(o/Fp)+1}function ot(n,r){const u=n<0?"-":"",o=Math.abs(n).toString().padStart(r,"0");return u+o}const Wl={y(n,r){const u=n.getFullYear(),o=u>0?u:1-u;return ot(r==="yy"?o%100:o,r.length)},M(n,r){const u=n.getMonth();return r==="M"?String(u+1):ot(u+1,2)},d(n,r){return ot(n.getDate(),r.length)},a(n,r){const u=n.getHours()/12>=1?"pm":"am";switch(r){case"a":case"aa":return u.toUpperCase();case"aaa":return u;case"aaaaa":return u[0];case"aaaa":default:return u==="am"?"a.m.":"p.m."}},h(n,r){return ot(n.getHours()%12||12,r.length)},H(n,r){return ot(n.getHours(),r.length)},m(n,r){return ot(n.getMinutes(),r.length)},s(n,r){return ot(n.getSeconds(),r.length)},S(n,r){const u=r.length,o=n.getMilliseconds(),h=Math.trunc(o*Math.pow(10,u-3));return ot(h,r.length)}},qr={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},bx={G:function(n,r,u){const o=n.getFullYear()>0?1:0;switch(r){case"G":case"GG":case"GGG":return u.era(o,{width:"abbreviated"});case"GGGGG":return u.era(o,{width:"narrow"});case"GGGG":default:return u.era(o,{width:"wide"})}},y:function(n,r,u){if(r==="yo"){const o=n.getFullYear(),h=o>0?o:1-o;return u.ordinalNumber(h,{unit:"year"})}return Wl.y(n,r)},Y:function(n,r,u,o){const h=Wp(n,o),f=h>0?h:1-h;if(r==="YY"){const b=f%100;return ot(b,2)}return r==="Yo"?u.ordinalNumber(f,{unit:"year"}):ot(f,r.length)},R:function(n,r){const u=Zp(n);return ot(u,r.length)},u:function(n,r){const u=n.getFullYear();return ot(u,r.length)},Q:function(n,r,u){const o=Math.ceil((n.getMonth()+1)/3);switch(r){case"Q":return String(o);case"QQ":return ot(o,2);case"Qo":return u.ordinalNumber(o,{unit:"quarter"});case"QQQ":return u.quarter(o,{width:"abbreviated",context:"formatting"});case"QQQQQ":return u.quarter(o,{width:"narrow",context:"formatting"});case"QQQQ":default:return u.quarter(o,{width:"wide",context:"formatting"})}},q:function(n,r,u){const o=Math.ceil((n.getMonth()+1)/3);switch(r){case"q":return String(o);case"qq":return ot(o,2);case"qo":return u.ordinalNumber(o,{unit:"quarter"});case"qqq":return u.quarter(o,{width:"abbreviated",context:"standalone"});case"qqqqq":return u.quarter(o,{width:"narrow",context:"standalone"});case"qqqq":default:return u.quarter(o,{width:"wide",context:"standalone"})}},M:function(n,r,u){const o=n.getMonth();switch(r){case"M":case"MM":return Wl.M(n,r);case"Mo":return u.ordinalNumber(o+1,{unit:"month"});case"MMM":return u.month(o,{width:"abbreviated",context:"formatting"});case"MMMMM":return u.month(o,{width:"narrow",context:"formatting"});case"MMMM":default:return u.month(o,{width:"wide",context:"formatting"})}},L:function(n,r,u){const o=n.getMonth();switch(r){case"L":return String(o+1);case"LL":return ot(o+1,2);case"Lo":return u.ordinalNumber(o+1,{unit:"month"});case"LLL":return u.month(o,{width:"abbreviated",context:"standalone"});case"LLLLL":return u.month(o,{width:"narrow",context:"standalone"});case"LLLL":default:return u.month(o,{width:"wide",context:"standalone"})}},w:function(n,r,u,o){const h=iw(n,o);return r==="wo"?u.ordinalNumber(h,{unit:"week"}):ot(h,r.length)},I:function(n,r,u){const o=sw(n);return r==="Io"?u.ordinalNumber(o,{unit:"week"}):ot(o,r.length)},d:function(n,r,u){return r==="do"?u.ordinalNumber(n.getDate(),{unit:"date"}):Wl.d(n,r)},D:function(n,r,u){const o=lw(n);return r==="Do"?u.ordinalNumber(o,{unit:"dayOfYear"}):ot(o,r.length)},E:function(n,r,u){const o=n.getDay();switch(r){case"E":case"EE":case"EEE":return u.day(o,{width:"abbreviated",context:"formatting"});case"EEEEE":return u.day(o,{width:"narrow",context:"formatting"});case"EEEEEE":return u.day(o,{width:"short",context:"formatting"});case"EEEE":default:return u.day(o,{width:"wide",context:"formatting"})}},e:function(n,r,u,o){const h=n.getDay(),f=(h-o.weekStartsOn+8)%7||7;switch(r){case"e":return String(f);case"ee":return ot(f,2);case"eo":return u.ordinalNumber(f,{unit:"day"});case"eee":return u.day(h,{width:"abbreviated",context:"formatting"});case"eeeee":return u.day(h,{width:"narrow",context:"formatting"});case"eeeeee":return u.day(h,{width:"short",context:"formatting"});case"eeee":default:return u.day(h,{width:"wide",context:"formatting"})}},c:function(n,r,u,o){const h=n.getDay(),f=(h-o.weekStartsOn+8)%7||7;switch(r){case"c":return String(f);case"cc":return ot(f,r.length);case"co":return u.ordinalNumber(f,{unit:"day"});case"ccc":return u.day(h,{width:"abbreviated",context:"standalone"});case"ccccc":return u.day(h,{width:"narrow",context:"standalone"});case"cccccc":return u.day(h,{width:"short",context:"standalone"});case"cccc":default:return u.day(h,{width:"wide",context:"standalone"})}},i:function(n,r,u){const o=n.getDay(),h=o===0?7:o;switch(r){case"i":return String(h);case"ii":return ot(h,r.length);case"io":return u.ordinalNumber(h,{unit:"day"});case"iii":return u.day(o,{width:"abbreviated",context:"formatting"});case"iiiii":return u.day(o,{width:"narrow",context:"formatting"});case"iiiiii":return u.day(o,{width:"short",context:"formatting"});case"iiii":default:return u.day(o,{width:"wide",context:"formatting"})}},a:function(n,r,u){const h=n.getHours()/12>=1?"pm":"am";switch(r){case"a":case"aa":return u.dayPeriod(h,{width:"abbreviated",context:"formatting"});case"aaa":return u.dayPeriod(h,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return u.dayPeriod(h,{width:"narrow",context:"formatting"});case"aaaa":default:return u.dayPeriod(h,{width:"wide",context:"formatting"})}},b:function(n,r,u){const o=n.getHours();let h;switch(o===12?h=qr.noon:o===0?h=qr.midnight:h=o/12>=1?"pm":"am",r){case"b":case"bb":return u.dayPeriod(h,{width:"abbreviated",context:"formatting"});case"bbb":return u.dayPeriod(h,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return u.dayPeriod(h,{width:"narrow",context:"formatting"});case"bbbb":default:return u.dayPeriod(h,{width:"wide",context:"formatting"})}},B:function(n,r,u){const o=n.getHours();let h;switch(o>=17?h=qr.evening:o>=12?h=qr.afternoon:o>=4?h=qr.morning:h=qr.night,r){case"B":case"BB":case"BBB":return u.dayPeriod(h,{width:"abbreviated",context:"formatting"});case"BBBBB":return u.dayPeriod(h,{width:"narrow",context:"formatting"});case"BBBB":default:return u.dayPeriod(h,{width:"wide",context:"formatting"})}},h:function(n,r,u){if(r==="ho"){let o=n.getHours()%12;return o===0&&(o=12),u.ordinalNumber(o,{unit:"hour"})}return Wl.h(n,r)},H:function(n,r,u){return r==="Ho"?u.ordinalNumber(n.getHours(),{unit:"hour"}):Wl.H(n,r)},K:function(n,r,u){const o=n.getHours()%12;return r==="Ko"?u.ordinalNumber(o,{unit:"hour"}):ot(o,r.length)},k:function(n,r,u){let o=n.getHours();return o===0&&(o=24),r==="ko"?u.ordinalNumber(o,{unit:"hour"}):ot(o,r.length)},m:function(n,r,u){return r==="mo"?u.ordinalNumber(n.getMinutes(),{unit:"minute"}):Wl.m(n,r)},s:function(n,r,u){return r==="so"?u.ordinalNumber(n.getSeconds(),{unit:"second"}):Wl.s(n,r)},S:function(n,r){return Wl.S(n,r)},X:function(n,r,u){const o=n.getTimezoneOffset();if(o===0)return"Z";switch(r){case"X":return Nx(o);case"XXXX":case"XX":return Ps(o);case"XXXXX":case"XXX":default:return Ps(o,":")}},x:function(n,r,u){const o=n.getTimezoneOffset();switch(r){case"x":return Nx(o);case"xxxx":case"xx":return Ps(o);case"xxxxx":case"xxx":default:return Ps(o,":")}},O:function(n,r,u){const o=n.getTimezoneOffset();switch(r){case"O":case"OO":case"OOO":return"GMT"+jx(o,":");case"OOOO":default:return"GMT"+Ps(o,":")}},z:function(n,r,u){const o=n.getTimezoneOffset();switch(r){case"z":case"zz":case"zzz":return"GMT"+jx(o,":");case"zzzz":default:return"GMT"+Ps(o,":")}},t:function(n,r,u){const o=Math.trunc(+n/1e3);return ot(o,r.length)},T:function(n,r,u){return ot(+n,r.length)}};function jx(n,r=""){const u=n>0?"-":"+",o=Math.abs(n),h=Math.trunc(o/60),f=o%60;return f===0?u+String(h):u+String(h)+r+ot(f,2)}function Nx(n,r){return n%60===0?(n>0?"-":"+")+ot(Math.abs(n)/60,2):Ps(n,r)}function Ps(n,r=""){const u=n>0?"-":"+",o=Math.abs(n),h=ot(Math.trunc(o/60),2),f=ot(o%60,2);return u+h+r+f}const wx=(n,r)=>{switch(n){case"P":return r.date({width:"short"});case"PP":return r.date({width:"medium"});case"PPP":return r.date({width:"long"});case"PPPP":default:return r.date({width:"full"})}},Ip=(n,r)=>{switch(n){case"p":return r.time({width:"short"});case"pp":return r.time({width:"medium"});case"ppp":return r.time({width:"long"});case"pppp":default:return r.time({width:"full"})}},cw=(n,r)=>{const u=n.match(/(P+)(p+)?/)||[],o=u[1],h=u[2];if(!h)return wx(n,r);let f;switch(o){case"P":f=r.dateTime({width:"short"});break;case"PP":f=r.dateTime({width:"medium"});break;case"PPP":f=r.dateTime({width:"long"});break;case"PPPP":default:f=r.dateTime({width:"full"});break}return f.replace("{{date}}",wx(o,r)).replace("{{time}}",Ip(h,r))},ow={p:Ip,P:cw},uw=/^D+$/,dw=/^Y+$/,fw=["D","DD","YY","YYYY"];function hw(n){return uw.test(n)}function mw(n){return dw.test(n)}function gw(n,r,u){const o=xw(n,r,u);if(console.warn(o),fw.includes(n))throw new RangeError(o)}function xw(n,r,u){const o=n[0]==="Y"?"years":"days of the month";return`Use \`${n.toLowerCase()}\` instead of \`${n}\` (in \`${r}\`) for formatting ${o} to the input \`${u}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const pw=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,vw=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,yw=/^'([^]*?)'?$/,bw=/''/g,jw=/[a-zA-Z]/;function qs(n,r,u){var S,C,z,_;const o=yu(),h=o.locale??nw,f=o.firstWeekContainsDate??((C=(S=o.locale)==null?void 0:S.options)==null?void 0:C.firstWeekContainsDate)??1,b=o.weekStartsOn??((_=(z=o.locale)==null?void 0:z.options)==null?void 0:_.weekStartsOn)??0,j=Rt(n,u==null?void 0:u.in);if(!j2(j))throw new RangeError("Invalid time value");let y=r.match(vw).map(N=>{const O=N[0];if(O==="p"||O==="P"){const k=ow[O];return k(N,h.formatLong)}return N}).join("").match(pw).map(N=>{if(N==="''")return{isToken:!1,value:"'"};const O=N[0];if(O==="'")return{isToken:!1,value:Nw(N)};if(bx[O])return{isToken:!0,value:N};if(O.match(jw))throw new RangeError("Format string contains an unescaped latin alphabet character `"+O+"`");return{isToken:!1,value:N}});h.localize.preprocessor&&(y=h.localize.preprocessor(j,y));const x={firstWeekContainsDate:f,weekStartsOn:b,locale:h};return y.map(N=>{if(!N.isToken)return N.value;const O=N.value;(mw(O)||hw(O))&&gw(O,r,String(n));const k=bx[O[0]];return k(j,O,h.localize,x)}).join("")}function Nw(n){const r=n.match(yw);return r?r[1].replace(bw,"'"):n}function ww(n,r){return+Rt(n)>+Rt(r)}function Sw(n,r){return+Rt(n)<+Rt(r)}function Ew(n,r){const u=Rt(n,r==null?void 0:r.in);return u.setMinutes(0,0,0),u}const qf=fp,Ko=[{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"}],nl=160,eu=14,Tw=10,Cw=7,Sx=4,Mw=({configs:n,currentProjectId:r,onEditJob:u,queueStatus:o,queueAnalytics:h})=>{const f=U.useMemo(()=>Ew(new Date),[]),b=U.useMemo(()=>Jo(f,24),[f]),j=U.useMemo(()=>Jo(f,-24),[f]),y=b,x=U.useMemo(()=>{const w=[];for(let K=0;K<=24;K++)w.push(Jo(f,K));return w},[f]),S=U.useMemo(()=>{const w=[];return n.forEach(({projectId:K,config:q})=>{var ae,M,J,le,fe,ve;const Z={executor:q.executorEnabled!==!1?q.cronSchedule:null,reviewer:q.reviewerEnabled?q.reviewerSchedule:null,qa:q.qa.enabled?q.qa.schedule:null,audit:q.audit.enabled?q.audit.schedule:null,slicer:q.roadmapScanner.enabled?q.roadmapScanner.slicerSchedule:null,analytics:(ae=q.analytics)!=null&&ae.enabled?(M=q.analytics)==null?void 0:M.schedule:null,"pr-resolver":(J=q.prResolver)!=null&&J.enabled?q.prResolver.schedule:null,merger:(le=q.merger)!=null&&le.enabled?(fe=q.merger)==null?void 0:fe.schedule:null,manager:(ve=q.manager)!=null&&ve.enabled?q.manager.schedule:null},R=q.cronScheduleOffset||0;Object.entries(Z).forEach(([ue,G])=>{if(G)try{const ne=o2.CronExpressionParser.parse(G,{currentDate:f,endDate:b});for(;ne.hasNext();){const he=ne.next(),me=new Date(he.getTime());me.setMinutes(me.getMinutes()+R),ww(me,f)&&Sw(me,b)&&w.push({projectId:K,jobType:ue,time:me})}}catch(ne){console.error(`Failed to parse cron "${G}" for ${K}/${ue}`,ne)}})}),w},[n,f,b]),C=U.useMemo(()=>{const w=new Set;return n.length===0||(n.every(K=>K.config.executorEnabled===!1)&&w.add("executor"),n.every(K=>!K.config.reviewerEnabled)&&w.add("reviewer"),n.every(K=>!K.config.qa.enabled)&&w.add("qa"),n.every(K=>!K.config.audit.enabled)&&w.add("audit"),n.every(K=>!K.config.roadmapScanner.enabled)&&w.add("slicer"),n.every(K=>{var q;return!((q=K.config.analytics)!=null&&q.enabled)})&&w.add("analytics"),n.every(K=>{var q;return!((q=K.config.prResolver)!=null&&q.enabled)})&&w.add("pr-resolver"),n.every(K=>{var q;return!((q=K.config.merger)!=null&&q.enabled)})&&w.add("merger"),n.every(K=>{var q;return!((q=K.config.manager)!=null&&q.enabled)})&&w.add("manager")),w},[n]),z=U.useMemo(()=>{const w=new Map;let K=0;return n.forEach(q=>{q.projectId===r||(w.set(q.projectId,K%Ko.length),K++)}),w},[n,r]),_=w=>yx(w,f),N=U.useMemo(()=>{const w=[];for(let K=0;K<=24;K++)w.push(Jo(j,K));return w},[j]),O=w=>{const K=y2([v2([w,j]),y]);return yx(K,j)},k=U.useMemo(()=>{const w=(h==null?void 0:h.recentRuns)??[],K=new Map;for(const q of w){const Z=q.providerKey||"default",R=new Date(q.startedAt*1e3),ae=q.finishedAt?new Date(q.finishedAt*1e3):new Date;ae<j||R>y||(K.has(Z)||K.set(Z,[]),K.get(Z).push({id:q.id,jobType:q.jobType,status:q.status,projectPath:q.projectPath,startedAt:R,finishedAt:ae,throttledCount:q.throttledCount}))}if(o!=null&&o.running){const q=o.running.providerKey??"default";K.has(q)||K.set(q,[]),K.get(q).push({id:o.running.id,jobType:o.running.jobType,status:"running",projectPath:o.running.projectPath,startedAt:new Date((o.running.dispatchedAt??o.running.enqueuedAt)*1e3),finishedAt:new Date,throttledCount:0})}return Array.from(K.entries()).sort(([q],[Z])=>q.localeCompare(Z)).map(([q,Z])=>({providerKey:q,runs:Z.sort((R,ae)=>R.startedAt.getTime()-ae.startedAt.getTime())}))},[y,j,h,o]),P=w=>w.split(/[-_]/).map(K=>K.charAt(0).toUpperCase()+K.slice(1)).join(" "),D=n.length>1,Q=s.jsx("div",{className:"absolute inset-0 flex pointer-events-none",children:x.map((w,K)=>s.jsx("div",{className:"h-full border-l border-slate-800/20",style:{width:60}},K))});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."})]}),D&&s.jsxs("div",{className:"flex flex-wrap gap-2 justify-end max-w-sm",children:[s.jsxs("div",{className:"flex items-center gap-1 mr-1",children:[s.jsx("div",{className:"w-2 h-2 rounded-full bg-slate-400 shrink-0"}),s.jsx("span",{className:"text-[10px] text-slate-400 font-semibold",children:"current"})]}),n.filter(w=>w.projectId!==r).slice(0,5).map(w=>{const K=z.get(w.projectId)??0,q=Ko[K],Z=(w.projectId.split("/").pop()??w.projectId).slice(0,14);return s.jsxs("div",{className:"flex items-center gap-1",children:[s.jsx("div",{className:`w-2 h-2 rounded-full ${q.bg} shrink-0`}),s.jsx("span",{className:"text-[10px] text-slate-500",title:w.projectId,children:Z})]},w.projectId)})]})]}),s.jsx("div",{className:"overflow-x-auto custom-scrollbar",children:s.jsxs("div",{className:"relative min-w-[1600px]",style:{width:1440+nl},children:[s.jsxs("div",{className:"h-8 border-b border-slate-800 flex",children:[s.jsx("div",{style:{width:nl},className:"shrink-0 border-r border-slate-800"}),s.jsx("div",{className:"flex-1 relative",children:x.map((w,K)=>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:K*60},children:s.jsx("span",{className:"text-[10px] font-mono text-slate-500",children:qs(w,"HH:mm")})},K))})]}),s.jsxs("div",{className:"relative",children:[n.length===0&&s.jsx("div",{className:"flex items-center justify-center p-8",children:s.jsx("p",{className:"text-sm text-slate-500 italic",children:"No project data available for timeline."})}),qf.map(w=>{const K=C.has(w.id),q=S.filter(R=>R.jobType===w.id);if(!D)return s.jsxs("div",{className:`flex border-b border-slate-800/30 ${K?"opacity-40":""}`,children:[s.jsxs("div",{style:{width:nl},className:"shrink-0 p-3 border-r border-slate-800/50 flex items-center gap-2",children:[s.jsx("div",{className:`w-2 h-2 rounded-full ${w.color.bg} shrink-0`}),s.jsx("span",{className:"text-xs font-semibold text-slate-300",children:w.label})]}),s.jsxs("div",{className:"flex-1 relative h-10",children:[Q,q.length===0?s.jsx("div",{className:"absolute inset-0 flex items-center justify-center pointer-events-none",children:s.jsx("span",{className:"text-[10px] text-slate-600 italic",children:K?"Disabled":"No runs in this window"})}):q.map((R,ae)=>s.jsx("button",{type:"button",onClick:()=>u==null?void 0:u(R.projectId,R.jobType),style:{left:_(R.time)-3},className:`absolute top-1/2 -translate-y-1/2 h-4 w-6 rounded border ${w.color.bg} ${w.color.border} opacity-90 hover:opacity-100 hover:scale-110 transition-all cursor-pointer shadow-lg group`,title:`${w.label} at ${qs(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:qs(R.time,"HH:mm")})},ae))]})]},w.id);const Z=n.length*eu+Sx*2;return s.jsxs("div",{className:`flex border-b border-slate-800/30 ${K?"opacity-40":""}`,children:[s.jsxs("div",{style:{width:nl,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 ${w.color.bg} shrink-0`}),s.jsx("span",{className:"text-[10px] font-bold text-slate-400 uppercase tracking-wide",children:w.label})]}),n.map(R=>{const ae=R.projectId===r,M=(R.projectId.split("/").pop()??R.projectId).slice(0,14),J=z.get(R.projectId)??0,le=ae?w.color.bg:Ko[J].bg;return s.jsxs("div",{style:{height:eu},className:"flex items-center gap-1 overflow-hidden",children:[s.jsx("div",{className:`w-1 h-1 rounded-full shrink-0 ${le}`}),s.jsx("span",{className:`text-[9px] truncate ${ae?"text-slate-200 font-semibold":"text-slate-600"}`,title:R.projectId,children:ae?`${M} ★`:M})]},R.projectId)})]}),s.jsxs("div",{className:"flex-1 relative",style:{height:Z},children:[Q,n.map((R,ae)=>{const M=R.projectId===r,J=q.filter(ne=>ne.projectId===R.projectId),le=Sx+ae*eu,fe=M?Tw:Cw,ve=Math.floor((eu-fe)/2),ue=z.get(R.projectId)??0,G=M?{bg:w.color.bg,border:w.color.border}:Ko[ue];return s.jsxs(_e.Fragment,{children:[ae>0&&s.jsx("div",{className:"absolute left-0 right-0 border-t border-slate-800/20 pointer-events-none",style:{top:le}}),J.map((ne,he)=>s.jsx("button",{type:"button",onClick:()=>u==null?void 0:u(R.projectId,ne.jobType),style:{left:_(ne.time)-3,top:le+ve,height:fe},className:`absolute w-6 rounded border ${G.bg} ${G.border} ${M?"opacity-90":"opacity-50"} hover:opacity-100 hover:z-10 transition-all cursor-pointer group`,title:`${R.projectId} · ${w.label} @ ${qs(ne.time,"HH:mm")}`,children:s.jsx("div",{className:"absolute -top-5 left-1/2 -translate-x-1/2 px-1.5 py-0.5 rounded bg-slate-800 text-white text-[9px] whitespace-nowrap opacity-0 group-hover:opacity-100 transition-opacity pointer-events-none border border-slate-700 z-20",children:qs(ne.time,"HH:mm")})},he))]},R.projectId)}),q.length===0&&!K&&s.jsx("div",{className:"absolute inset-0 flex items-center justify-center pointer-events-none",children:s.jsx("span",{className:"text-[10px] text-slate-700 italic",children:"No runs in this window"})})]})]},w.id)})]}),s.jsx("div",{className:"absolute top-0 bottom-0 w-px bg-rose-500/50 z-10 pointer-events-none",style:{left:nl+_(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"})]}),D&&s.jsx("div",{className:"flex items-center gap-1.5",children:s.jsx("span",{children:"★ = current project · blocks in same column = scheduling overlap"})})]}),k.length>0&&s.jsxs("div",{className:"border-t border-slate-800",children:[s.jsxs("div",{className:"p-4 border-b border-slate-800 flex items-center justify-between gap-4",children:[s.jsxs("div",{children:[s.jsx("h4",{className:"text-sm font-medium text-slate-200",children:"Recent Execution Runs"}),s.jsx("p",{className:"text-xs text-slate-500 mt-0.5",children:"Last 24h of real runs grouped by provider bucket."})]}),s.jsxs("div",{className:"text-[10px] uppercase tracking-[0.2em] text-slate-500",children:[(h==null?void 0:h.recentRuns.length)??0," recorded runs"]})]}),s.jsx("div",{className:"overflow-x-auto custom-scrollbar","data-testid":"provider-execution-timeline",children:s.jsxs("div",{className:"relative min-w-[1600px]",style:{width:1440+nl},children:[s.jsxs("div",{className:"h-8 border-b border-slate-800 flex",children:[s.jsx("div",{style:{width:nl},className:"shrink-0 border-r border-slate-800"}),s.jsx("div",{className:"flex-1 relative flex",children:N.map((w,K)=>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:K*60},children:s.jsx("span",{className:"text-[10px] font-mono text-slate-500",children:qs(w,"HH:mm")})},K))})]}),s.jsx("div",{className:"relative",children:k.map(({providerKey:w,runs:K})=>s.jsxs("div",{className:"flex border-b border-slate-800/30 min-h-14","data-testid":`provider-execution-lane-${w}`,children:[s.jsxs("div",{style:{width:nl},className:"shrink-0 p-3 border-r border-slate-800/50 flex flex-col justify-center",children:[s.jsx("span",{className:"text-xs font-semibold text-slate-300 truncate",title:w,children:P(w)}),s.jsx("span",{className:"text-[10px] text-slate-500 font-mono truncate",children:w})]}),s.jsxs("div",{className:"flex-1 relative h-14",children:[s.jsx("div",{className:"absolute inset-0 flex pointer-events-none",children:N.map((q,Z)=>s.jsx("div",{className:"h-full border-l border-slate-800/20",style:{width:60}},Z))}),K.map(q=>{const Z=qf.find(ue=>ue.id===q.jobType)??qf[0],R=O(q.startedAt),ae=O(q.finishedAt),M=Math.max(ae-R,8),J=q.status==="running",le=q.status==="error"||q.status==="failed"||q.status==="errored",fe=J?"bg-green-500":le?"bg-red-500":Z.color.bg,ve=J?"border-green-400/60":le?"border-red-400/60":Z.color.border;return s.jsx("div",{className:`absolute top-1/2 -translate-y-1/2 h-8 rounded border ${fe} ${ve} opacity-85 shadow-lg ${J?"animate-pulse":""}`,style:{left:R,width:M},title:`${w} • ${Z.label} • ${qs(q.startedAt,"MMM d HH:mm")} • ${q.status}`,"data-testid":"provider-execution-run",children:s.jsxs("div",{className:"h-full px-2 flex items-center justify-between gap-2 text-[10px] text-white/90 overflow-hidden whitespace-nowrap",children:[s.jsx("span",{className:"font-semibold uppercase tracking-wide",children:Z.label}),s.jsx("span",{className:"text-white/70",children:q.status}),q.throttledCount>0&&s.jsxs("span",{className:"text-yellow-100",children:["throttle ",q.throttledCount,"x"]})]})},`${w}-${q.id}-${q.startedAt.getTime()}`)})]})]},w))}),s.jsx("div",{className:"absolute top-0 bottom-0 w-px bg-rose-500/50 z-10 pointer-events-none",style:{left:nl+O(new Date)},children:s.jsx("div",{className:"absolute top-0 h-2 w-2 rounded-full bg-rose-500 -translate-x-1/2"})})]})})]})]})},fu=[{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"}],jh=[{id:"night-surge",label:"Night Surge",description:"Dense overnight execution every 2h with daytime reviews.",schedules:{executor:"5 20,22,0,2,4,6 * * *",reviewer:"25 8,14,20 * * *",qa:"45 22,10 * * *",audit:"50 4 * * 1",slicer:"35 19,7 * * *",prResolver:"15 9,15,21 * * *",merger:"55 */4 * * *",manager:"15 7 * * *"},hints:{executor:"8pm–6am every 2h (6 runs)",reviewer:"8:25am, 2:25pm, 8:25pm",qa:"10:45pm & 10:45am",audit:"Mon 4:50am",slicer:"7:35pm & 7:35am",prResolver:"9:15am, 3:15pm, 9:15pm",merger:"Every 4h at :55",manager:"Daily at 7:15am"}},{id:"always-on",label:"Always On (Recommended)",description:"24/7 with maximum cadence — executor every hour, reviewer every 3h.",schedules:{executor:"5 * * * *",reviewer:"25 */3 * * *",qa:"45 2,10,18 * * *",audit:"50 3 * * 1",slicer:"35 */6 * * *",prResolver:"15 6,14,22 * * *",merger:"55 */4 * * *",manager:"15 7 * * *"},hints:{executor:"Every hour at :05",reviewer:"Every 3h at :25",qa:"2:45am, 10:45am & 6:45pm",audit:"Mon 3:50am",slicer:"Every 6h at :35",prResolver:"6:15am, 2:15pm & 10:15pm",merger:"Every 4h at :55",manager:"Daily at 7:15am"}},{id:"day-shift",label:"Day Shift",description:"Weekday daytime — hourly executor 8am–8pm, reviews 4x/day.",schedules:{executor:"5 8-20 * * 1-5",reviewer:"25 9,13,17,19 * * 1-5",qa:"45 10,14,18 * * 1-5",audit:"50 9 * * 1",slicer:"35 7 * * 1",prResolver:"15 8,12,16 * * 1-5",merger:"55 */4 * * 1-5",manager:"15 7 * * 1-5"},hints:{executor:"Hourly at :05, 8am–8pm weekdays",reviewer:"9:25am, 1:25pm, 5:25pm, 7:25pm",qa:"10:45am, 2:45pm & 6:45pm weekdays",audit:"Mon 9:50am",slicer:"Mon 7:35am",prResolver:"8:15am, 12:15pm & 4:15pm weekdays",merger:"Every 4h at :55 weekdays",manager:"Weekdays at 7:15am"}},{id:"minimal",label:"Minimal",description:"Twice-daily executor and reviewer with weekly heavy jobs.",schedules:{executor:"5 2,14 * * *",reviewer:"25 8,20 * * *",qa:"45 3 * * 0",audit:"50 4 * * 0",slicer:"35 1 * * 1",prResolver:"15 8 * * 1,4",merger:"55 */8 * * *",manager:"15 7 * * 1"},hints:{executor:"2:05am & 2:05pm",reviewer:"8:25am & 8:25pm",qa:"Sun 3:45am",audit:"Sun 4:50am",slicer:"Mon 1:35am",prResolver:"Mon & Thu at 8:15am",merger:"Every 8h at :55",manager:"Mon 7:15am"}}];function Br(n){return n?n.trim().replace(/\s+/g," "):""}function Il(n,r){return Br(n)===Br(r)}function Qf(n){if(n)return jh.find(r=>r.id===n)}function Qp(n,r,u,o,h,f,b,j,y){return Il(n.schedules.executor,r)&&Il(n.schedules.reviewer,u)&&Il(n.schedules.qa,o)&&Il(n.schedules.audit,h)&&Il(n.schedules.slicer,f)&&Il(n.schedules.prResolver,b)&&Il(n.schedules.merger,j)&&Il(n.schedules.manager,y)}function Ow(n,r,u,o,h,f,b,j){return jh.find(y=>Qp(y,n,r,u,o,h,f,b,j))}function Rw(n,r,u,o,h,f,b,j,y){const x=Qf(n);return x&&Qp(x,r,u,o,h,f,b,j,y)?x:Ow(r,u,o,h,f,b,j,y)}function Xt(n){const r=Br(n),u=r.split(/\s+/);if(u.length!==5)return r;const[o,h,f,b,j]=u,y=/^\d+$/.test(o),x=fu.find(S=>Br(S.value)===r);if(x)return x.label;if(o==="*/30"&&h==="*")return"Every 30 minutes";if(o==="0"&&h==="*")return"Every hour";if(o.startsWith("*/"))return`Every ${parseInt(o.replace("*/",""),10)} minutes`;if(y&&h.startsWith("*/")&&f==="*"&&b==="*"&&j==="*"){const S=parseInt(h.replace("*/",""),10);return o==="0"?`Every ${S} hours`:`Every ${S} hours at :${o.padStart(2,"0")}`}if(o==="0"&&h.startsWith("*/"))return`Every ${parseInt(h.replace("*/",""),10)} hours`;if(o==="0"&&h.includes("-")){const[S,C]=h.split("-");return`Every hour from ${cc(S)} to ${cc(C)}`}if(y&&h.includes("-")&&f==="*"&&b==="*"&&j==="*"){const[S,C]=h.split("-");return`Every hour from ${oc(S,o)} to ${oc(C,o)}`}if(o==="0"&&h.includes(",")){const S=h.split(",").map(cc);return S.length<=3?`At ${S.join(" and ")}`:`At ${S.slice(0,-1).join(", ")}, and ${S[S.length-1]}`}if(y&&h.includes(",")&&f==="*"&&b==="*"&&(j==="*"||j==="1-5")){const S=h.split(",").map(z=>oc(z,o)),C=j==="1-5"?"Weekdays at ":"At ";return S.length<=3?`${C}${S.join(" and ")}`:`${C}${S.slice(0,-1).join(", ")}, and ${S[S.length-1]}`}return o==="0"&&h!=="*"&&f==="*"&&b==="*"&&j==="*"?`Daily at ${cc(h)}`:y&&h!=="*"&&f==="*"&&b==="*"&&j==="*"?`Daily at ${oc(h,o)}`:o==="0"&&h!=="*"&&f==="*"&&b==="*"&&j==="1-5"?`Weekdays at ${cc(h)}`:y&&h!=="*"&&f==="*"&&b==="*"&&j==="1-5"?`Weekdays at ${oc(h,o)}`:r}function cc(n){const r=parseInt(n,10);return r===0?"12 AM":r<12?`${r} AM`:r===12?"12 PM":`${r-12} PM`}function oc(n,r){const u=r.padStart(2,"0"),o=parseInt(n,10);return Number.isNaN(o)?`${n}:${u}`:o===0?`12:${u} AM`:o<12?`${o}:${u} AM`:o===12?`12:${u} PM`:`${o-12}:${u} PM`}function Dw(n){const r=Br(n),u=fu.find(o=>Br(o.value)===r);return(u==null?void 0:u.value)??"__custom__"}function Ex(n){const r=new Date,u=n.getTime()-r.getTime(),o=Math.floor(u/6e4),h=Math.floor(o/60),f=Math.floor(h/24);return o<1?"less than a minute":o<60?`in ${o} minute${o>1?"s":""}`:h<24?`in ${h} hour${h>1?"s":""}`:`in ${f} day${f>1?"s":""}`}const kw=({label:n,value:r,onChange:u,helperText:o,placeholder:h="5 */3 * * *"})=>{const f=Dw(r),b=f==="__custom__",j=S=>{S!=="__custom__"&&u(S)},y=S=>{u(S.target.value)},x=fu.find(S=>S.value===f);return s.jsxs("div",{className:"space-y-3",children:[s.jsx(Je,{label:n,value:f,onChange:j,options:fu.map(S=>({label:S.label,value:S.value})),helperText:b?void 0:(x==null?void 0:x.description)||o}),b&&s.jsxs("div",{className:"space-y-2 mt-2",children:[s.jsx(we,{label:"Cron Expression",value:r,onChange:y,placeholder:h}),s.jsxs("div",{className:"text-xs text-slate-500 bg-slate-900/40 p-3 rounded-md border border-slate-800/60",children:[s.jsx("strong",{className:"text-slate-400",children:"Format:"})," minute hour day month weekday",s.jsx("br",{}),s.jsx("strong",{className:"text-slate-400",children:"Examples:"})," ",s.jsx("code",{className:"bg-slate-950 px-1 py-0.5 rounded text-indigo-300",children:"0 * * * *"})," (hourly),"," ",s.jsx("code",{className:"bg-slate-950 px-1 py-0.5 rounded text-indigo-300",children:"0 0 * * *"})," (daily at midnight)"]})]})]})},ll=({id:n,icon:r,title:u,description:o,value:h,onChange:f})=>s.jsxs("div",{id:n,className:"rounded-xl border border-slate-700 bg-slate-800/50 p-4 space-y-4",children:[s.jsxs("div",{className:"flex items-start gap-3",children:[s.jsx("div",{className:"mt-0.5 p-1.5 rounded-md bg-slate-800 text-slate-400",children:s.jsx(r,{size:14})}),s.jsxs("div",{children:[s.jsx("div",{className:"text-sm font-medium text-slate-200",children:u}),s.jsx("div",{className:"text-xs text-slate-500 mt-0.5",children:o})]})]}),s.jsx(kw,{label:"",value:h,onChange:f})]}),Aw=({form:n,scheduleMode:r,selectedTemplateId:u,onFieldChange:o,onSwitchToTemplate:h,onSwitchToCustom:f,onApplyTemplate:b})=>s.jsxs(rt,{className:"p-6 space-y-6",children:[s.jsxs("div",{className:"flex items-start justify-between gap-4",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200 mb-1",children:"Job Schedules"}),s.jsx("p",{className:"text-sm text-slate-400",children:"Configure when automated jobs run using a preset template or custom cron expressions"}),s.jsx("p",{className:"text-xs text-slate-500 mt-2 mb-2",children:"This tab only controls cadence. Runtime and provider settings live in the Jobs tab."})]}),s.jsxs("div",{className:"flex rounded-lg border border-slate-700 overflow-hidden shrink-0",children:[s.jsx("button",{type:"button",className:`px-4 py-1.5 text-sm font-medium transition-colors ${r==="template"?"bg-indigo-600 text-white":"bg-slate-800 text-slate-400 hover:text-slate-200"}`,onClick:h,children:"Template"}),s.jsx("button",{type:"button",className:`px-4 py-1.5 text-sm font-medium transition-colors ${r==="custom"?"bg-indigo-600 text-white":"bg-slate-800 text-slate-400 hover:text-slate-200"}`,onClick:f,children:"Custom"})]})]}),r==="template"?s.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3",children:jh.map(j=>{const y=u===j.id;return s.jsxs("button",{type:"button",onClick:()=>b(j),className:`text-left p-4 rounded-lg border transition-colors ${y?"border-indigo-500 bg-indigo-950/40":"border-slate-700 bg-slate-800/30 hover:border-slate-600"}`,children:[s.jsx("div",{className:"font-medium text-slate-200 mb-1",children:j.label}),s.jsx("p",{className:"text-xs text-slate-400 mb-3",children:j.description}),s.jsx("div",{className:"space-y-0.5",children:[["Executor",j.hints.executor],["Reviewer",j.hints.reviewer],["QA",j.hints.qa],["Audit",j.hints.audit],["Planner",j.hints.slicer],["PR Resolver",j.hints.prResolver],["Merger",j.hints.merger],["Manager",j.hints.manager]].map(([x,S])=>s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{className:"text-xs text-slate-500 w-16 shrink-0",children:x}),s.jsx("span",{className:"text-xs text-slate-400",children:S})]},x))})]},j.id)})}):s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[s.jsx(ll,{id:"job-schedule-executor",icon:pn,title:"PRD Executor",description:"Executes PRDs to generate code and create PRs",value:n.cronSchedule,onChange:j=>o("cronSchedule",j)}),s.jsx(ll,{id:"job-schedule-reviewer",icon:dh,title:"PR Reviewer",description:"Reviews PRs and provides feedback or automated fixes",value:n.reviewerSchedule,onChange:j=>o("reviewerSchedule",j)}),s.jsx(ll,{id:"job-schedule-qa",icon:rp,title:"Quality Assurance",description:"Automated UI testing using Playwright",value:n.qa.schedule,onChange:j=>o("qa",{...n.qa,schedule:j})}),s.jsx(ll,{id:"job-schedule-audit",icon:Gr,title:"Code Audit",description:"Automated code quality and security audits",value:n.audit.schedule,onChange:j=>o("audit",{...n.audit,schedule:j})}),s.jsx(ll,{id:"job-schedule-slicer",icon:hh,title:"Planner",description:"Generate PRDs from ROADMAP.md or audit findings",value:n.roadmapScanner.slicerSchedule,onChange:j=>o("roadmapScanner",{...n.roadmapScanner,slicerSchedule:j})}),n.analytics&&s.jsx(ll,{id:"job-schedule-analytics",icon:ch,title:"Analytics",description:"Fetch Amplitude data, analyze with AI, and create issues",value:n.analytics.schedule,onChange:j=>o("analytics",{...n.analytics,schedule:j})}),n.prResolver&&s.jsx(ll,{id:"job-schedule-pr-resolver",icon:fh,title:"PR Resolver",description:"Rebases PRs and applies review feedback",value:n.prResolver.schedule,onChange:j=>o("prResolver",{...n.prResolver,schedule:j})}),n.merger&&s.jsx(ll,{id:"job-schedule-merger",icon:pu,title:"Merge Orchestrator",description:"Scans, rebases, and merges approved PRs",value:n.merger.schedule,onChange:j=>o("merger",{...n.merger,schedule:j})}),n.manager&&s.jsx(ll,{id:"job-schedule-manager",icon:uh,title:"Manager",description:"Monitors roadmap, PRDs, docs, and system health",value:n.manager.schedule,onChange:j=>o("manager",{...n.manager,schedule:j})})]})]}),dc=({label:n,value:r=[],onChange:u,placeholder:o,helpText:h})=>{const[f,b]=_e.useState(""),j=()=>{f.trim()&&!r.includes(f.trim())&&(u([...r,f.trim()]),b(""))},y=S=>{u(r.filter(C=>C!==S))},x=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:n}),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:()=>y(S),className:"text-slate-500 hover:text-red-400","aria-label":`Remove ${S}`,title:`Remove ${S}`,children:s.jsx(Fr,{className:"h-3 w-3"})})]},S))}),s.jsxs("div",{className:"flex gap-2",children:[s.jsx("input",{type:"text",value:f,onChange:S=>b(S.target.value),onKeyDown:x,placeholder:o,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(Ue,{onClick:j,disabled:!f.trim(),"aria-label":`Add ${n.toLowerCase()} value`,children:s.jsx(Kl,{className:"h-4 w-4"})})]}),h&&s.jsx("p",{className:"text-xs text-slate-500 mt-1",children:h})]})},sl=({title:n,icon:r,description:u,enabled:o,onToggle:h,expanded:f,onExpandChange:b,scheduleSummary:j,providerLabel:y,children:x,id:S})=>s.jsxs("div",{id:S,className:`border border-slate-800 rounded-xl overflow-hidden transition-all duration-200 ${f?"bg-slate-900/50 ring-1 ring-indigo-500/20":"bg-slate-900/20 hover:bg-slate-900/40"}`,children:[s.jsxs("div",{className:"flex items-center justify-between p-4 cursor-pointer select-none",onClick:()=>b(!f),children:[s.jsxs("div",{className:"flex items-center gap-3 overflow-hidden",children:[s.jsx("div",{className:`p-2 rounded-lg ${f?"bg-indigo-500/20 text-indigo-400":"bg-slate-800 text-slate-400"}`,children:s.jsx(r,{className:"h-5 w-5"})}),s.jsxs("div",{className:"overflow-hidden",children:[s.jsx("h3",{className:"text-sm font-medium text-slate-200 truncate",children:n}),!f&&s.jsx("p",{className:"text-xs text-slate-500 truncate",children:u})]})]}),s.jsxs("div",{className:"flex items-center gap-4 shrink-0",children:[!f&&s.jsxs("div",{className:"hidden sm:flex items-center gap-2",children:[j&&s.jsx(St,{variant:"neutral",className:"bg-slate-800/50 text-[10px]",children:j}),y&&s.jsx(St,{variant:"info",className:"bg-blue-500/5 text-[10px]",children:y})]}),s.jsx("div",{onClick:C=>C.stopPropagation(),children:s.jsx(Ft,{checked:o,onChange:h})}),s.jsx(oh,{className:`h-5 w-5 text-slate-500 transition-transform duration-300 ${f?"rotate-180 text-indigo-400":""}`})]})]}),s.jsx("div",{className:`grid transition-all duration-300 ease-in-out ${f?"grid-rows-[1fr] opacity-100":"grid-rows-[0fr] opacity-0"}`,children:s.jsx("div",{className:"overflow-hidden",children:s.jsx("div",{className:"p-6 pt-0 space-y-6 border-t border-slate-800/50 mt-2",children:s.jsx("div",{className:"pt-6",children:x})})})})]}),rl=({summary:n,onOpen:r})=>s.jsxs("div",{className:"flex flex-col gap-4 rounded-xl border border-slate-800 bg-slate-950/50 p-4 md:flex-row md:items-center md:justify-between",children:[s.jsxs("div",{children:[s.jsx("div",{className:"text-[11px] font-semibold uppercase tracking-[0.18em] text-slate-500",children:"Cadence"}),s.jsx("div",{className:"mt-1 text-sm font-medium text-slate-200",children:n}),s.jsx("p",{className:"mt-1 text-xs text-slate-500",children:"Managed centrally in Automation > Schedules."})]}),s.jsx(Ue,{variant:"outline",size:"sm",onClick:r,className:"border-slate-700 text-slate-300 hover:bg-slate-800",children:"Open Schedules"})]}),_w=({form:n,updateField:r,handleRoadmapToggle:u,presetOptions:o,expandedJob:h,onExpandedJobChange:f,onOpenSchedule:b})=>{var x,S,C,z,_,N,O,k,P,D,Q;const j=(w,K)=>{const q={...n.jobProviders};K===""?delete q[w]:q[w]=K,r("jobProviders",q)},y=[{label:"Use Global (default)",value:""},...o];return s.jsxs("div",{className:"space-y-8",children:[s.jsxs("section",{className:"space-y-4",children:[s.jsxs("div",{className:"flex items-center justify-between pb-2 border-b border-slate-800/50",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200",children:"Prompt Augmentation"}),s.jsx("p",{className:"text-sm text-slate-400 mt-1",children:"Tune how repeated feedback patterns become prompt snippets."})]}),s.jsx("div",{className:"hidden rounded-lg bg-amber-500/10 p-2 text-amber-400 sm:block",children:s.jsx(kj,{className:"h-5 w-5"})})]}),s.jsx("div",{className:"rounded-xl border border-slate-800 bg-slate-950/40 p-4",children:s.jsxs("div",{className:"grid grid-cols-1 gap-6 md:grid-cols-2",children:[s.jsxs("div",{className:"flex items-center justify-between rounded-md border border-slate-800 bg-slate-950/40 p-3",children:[s.jsxs("div",{children:[s.jsx("span",{className:"text-sm font-medium text-slate-200",children:"Enable prompt augmentation"}),s.jsx("p",{className:"mt-0.5 text-xs text-slate-500",children:"Adds capped feedback snippets to future job prompts."})]}),s.jsx(Ft,{checked:n.feedback.enabled,onChange:w=>r("feedback",{...n.feedback,enabled:w})})]}),s.jsx(we,{label:"Activation Threshold",type:"number",min:"0",max:"1",step:"0.05",value:String(n.feedback.confidenceThreshold),onChange:w=>r("feedback",{...n.feedback,confidenceThreshold:Math.max(0,Math.min(1,Number(w.target.value||0)))}),helperText:"Minimum confidence required before a snippet can activate."}),s.jsx(we,{label:"TTL",type:"number",min:"1",value:String(n.feedback.augmentationTtlDays),onChange:w=>r("feedback",{...n.feedback,augmentationTtlDays:Math.max(1,Number(w.target.value||1))}),rightIcon:s.jsx("span",{className:"text-xs",children:"days"}),helperText:"How long an augmentation remains active before expiry."}),s.jsx(we,{label:"Max Snippets Per Job",type:"number",min:"0",value:String(n.feedback.maxActiveAugmentations),onChange:w=>r("feedback",{...n.feedback,maxActiveAugmentations:Math.max(0,Number(w.target.value||0))}),helperText:"Maximum active augmentation snippets applied to each job prompt."}),s.jsx(we,{label:"Success Streak Expiry",type:"number",min:"0",value:String(n.feedback.successStreakToExpire),onChange:w=>r("feedback",{...n.feedback,successStreakToExpire:Math.max(0,Number(w.target.value||0))}),helperText:"Consecutive successes before active snippets expire."})]})})]}),s.jsxs("section",{className:"space-y-4",children:[s.jsxs("div",{className:"flex items-center justify-between pb-2 border-b border-slate-800/50",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200",children:"Job Configurations"}),s.jsx("p",{className:"text-sm text-slate-400 mt-1",children:"Enable jobs, choose providers, and tune runtime behavior. Cadence stays in Automation > Schedules."})]}),s.jsx("span",{className:"text-xs text-slate-500",children:"9 total jobs"})]}),s.jsx(sl,{id:"job-section-executor",title:"PRD Executor",icon:pn,description:"Executes PRDs to generate code and create PRs",enabled:n.executorEnabled,onToggle:w=>r("executorEnabled",w),expanded:h==="executor",onExpandChange:w=>f(w?"executor":null),scheduleSummary:Xt(n.cronSchedule),providerLabel:n.jobProviders.executor?(x=o.find(w=>w.value===n.jobProviders.executor))==null?void 0:x.label:"Global",children:s.jsxs("div",{className:"space-y-6",children:[s.jsx(rl,{summary:Xt(n.cronSchedule),onOpen:()=>b("executor")}),s.jsxs("div",{className:"grid grid-cols-1 gap-6 md:grid-cols-2",children:[s.jsx(Je,{label:"Provider",value:n.jobProviders.executor??"",onChange:w=>j("executor",w),options:y}),s.jsx(we,{label:"Max Runtime",type:"number",value:String(n.maxRuntime),onChange:w=>r("maxRuntime",Number(w.target.value||0)),rightIcon:s.jsx("span",{className:"text-xs",children:"sec"}),helperText:"Maximum runtime for executor tasks"})]})]})}),s.jsx(sl,{id:"job-section-reviewer",title:"PR Reviewer",icon:dh,description:"Reviews PRs and provides feedback or automated fixes",enabled:n.reviewerEnabled,onToggle:w=>r("reviewerEnabled",w),expanded:h==="reviewer",onExpandChange:w=>f(w?"reviewer":null),scheduleSummary:Xt(n.reviewerSchedule),providerLabel:n.jobProviders.reviewer?(S=o.find(w=>w.value===n.jobProviders.reviewer))==null?void 0:S.label:"Global",children:s.jsxs("div",{className:"space-y-6",children:[s.jsx(rl,{summary:Xt(n.reviewerSchedule),onOpen:()=>b("reviewer")}),s.jsxs("div",{className:"grid grid-cols-1 gap-6 md:grid-cols-2",children:[s.jsx(Je,{label:"Provider",value:n.jobProviders.reviewer??"",onChange:w=>j("reviewer",w),options:y}),s.jsx(we,{label:"Max Runtime",type:"number",value:String(n.reviewerMaxRuntime),onChange:w=>r("reviewerMaxRuntime",Number(w.target.value||0)),rightIcon:s.jsx("span",{className:"text-xs",children:"sec"})}),s.jsx(we,{label:"Min Review Score",type:"number",min:"0",max:"100",value:String(n.minReviewScore),onChange:w=>r("minReviewScore",Number(w.target.value||0)),helperText:"PRs below this score will be marked as 'Needs Work'"}),s.jsx(we,{label:"Max Retries",type:"number",value:String(n.reviewerMaxRetries),onChange:w=>r("reviewerMaxRetries",Number(w.target.value||0)),helperText:"Fix attempts after initial review"}),s.jsx(we,{label:"Retry Delay",type:"number",value:String(n.reviewerRetryDelay),onChange:w=>r("reviewerRetryDelay",Number(w.target.value||0)),rightIcon:s.jsx("span",{className:"text-xs",children:"sec"})}),s.jsx("div",{className:"md:col-span-2",children:s.jsx(we,{label:"Max PRs Per Run",type:"number",value:String(n.reviewerMaxPrsPerRun),onChange:w=>r("reviewerMaxPrsPerRun",Number(w.target.value||0)),helperText:"Hard cap on PRs processed per run (0 = unlimited)"})})]})]})}),s.jsx(sl,{id:"job-section-qa",title:"Quality Assurance",icon:rp,description:"Automated UI testing using Playwright",enabled:n.qa.enabled,onToggle:w=>r("qa",{...n.qa,enabled:w}),expanded:h==="qa",onExpandChange:w=>f(w?"qa":null),scheduleSummary:Xt(n.qa.schedule),providerLabel:n.jobProviders.qa?(C=o.find(w=>w.value===n.jobProviders.qa))==null?void 0:C.label:"Global",children:s.jsxs("div",{className:"space-y-6",children:[s.jsx(rl,{summary:Xt(n.qa.schedule),onOpen:()=>b("qa")}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsx(Je,{label:"Provider",value:n.jobProviders.qa??"",onChange:w=>j("qa",w),options:y}),s.jsx(we,{label:"Max Runtime",type:"number",value:String(n.qa.maxRuntime),onChange:w=>r("qa",{...n.qa,maxRuntime:Number(w.target.value||0)}),rightIcon:s.jsx("span",{className:"text-xs",children:"sec"})}),s.jsx(Je,{label:"Artifacts",value:n.qa.artifacts,onChange:w=>r("qa",{...n.qa,artifacts:w}),options:[{label:"Screenshots",value:"screenshot"},{label:"Videos",value:"video"},{label:"Both",value:"both"}]}),s.jsx(we,{label:"Skip Label",value:n.qa.skipLabel,onChange:w=>r("qa",{...n.qa,skipLabel:w.target.value}),helperText:"GitHub label to skip QA"}),s.jsxs("div",{className:"flex items-center justify-between p-3 rounded-md border border-slate-800 bg-slate-950/40 mt-1.5",children:[s.jsxs("div",{children:[s.jsx("span",{className:"text-sm font-medium text-slate-200",children:"Auto-install Playwright"}),s.jsx("p",{className:"text-xs text-slate-500 mt-0.5",children:"Install browsers if missing"})]}),s.jsx(Ft,{checked:n.qa.autoInstallPlaywright,onChange:w=>r("qa",{...n.qa,autoInstallPlaywright:w})})]})]}),s.jsx(dc,{label:"QA Branch Patterns",value:n.qa.branchPatterns,onChange:w=>r("qa",{...n.qa,branchPatterns:w}),placeholder:"e.g., qa/, test/",helpText:"Branch patterns to match for QA"})]})}),s.jsx(sl,{id:"job-section-audit",title:"Code Audit",icon:Gr,description:"Automated code quality and security audits",enabled:n.audit.enabled,onToggle:w=>r("audit",{...n.audit,enabled:w}),expanded:h==="audit",onExpandChange:w=>f(w?"audit":null),scheduleSummary:Xt(n.audit.schedule),providerLabel:n.jobProviders.audit?(z=o.find(w=>w.value===n.jobProviders.audit))==null?void 0:z.label:"Global",children:s.jsxs("div",{className:"space-y-6",children:[s.jsx(rl,{summary:Xt(n.audit.schedule),onOpen:()=>b("audit")}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsx(Je,{label:"Provider",value:n.jobProviders.audit??"",onChange:w=>j("audit",w),options:y}),s.jsx(we,{label:"Max Runtime",type:"number",value:String(n.audit.maxRuntime),onChange:w=>r("audit",{...n.audit,maxRuntime:Number(w.target.value||0)}),rightIcon:s.jsx("span",{className:"text-xs",children:"sec"})}),s.jsx(Ft,{label:"Create Board Issues",checked:n.audit.createIssues,onChange:w=>r("audit",{...n.audit,createIssues:w}),className:"self-end pb-2"}),s.jsx(Je,{label:"Target Column",value:n.audit.targetColumn,disabled:!n.audit.createIssues,onChange:w=>r("audit",{...n.audit,targetColumn:w}),options:[{value:"Draft",label:"Draft"},{value:"Ready",label:"Ready"},{value:"In Progress",label:"In Progress"},{value:"Review",label:"Review"},{value:"Done",label:"Done"}]})]})]})}),s.jsx(sl,{id:"job-section-slicer",title:"Planner",icon:hh,description:"Generate one PRD per run using ROADMAP.md or audit findings",enabled:n.roadmapScanner.enabled,onToggle:u,expanded:h==="slicer",onExpandChange:w=>f(w?"slicer":null),scheduleSummary:Xt(n.roadmapScanner.slicerSchedule),providerLabel:n.jobProviders.slicer?(_=o.find(w=>w.value===n.jobProviders.slicer))==null?void 0:_.label:"Global",children:s.jsxs("div",{className:"space-y-6",children:[s.jsx(rl,{summary:Xt(n.roadmapScanner.slicerSchedule),onOpen:()=>b("slicer")}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsx(Je,{label:"Provider",value:n.jobProviders.slicer??"",onChange:w=>j("slicer",w),options:y}),s.jsx(we,{label:"Roadmap File Path",value:n.roadmapScanner.roadmapPath,onChange:w=>r("roadmapScanner",{...n.roadmapScanner,roadmapPath:w.target.value}),helperText:"Primary planning source (relative to project root)."}),s.jsx(we,{label:"Max Runtime",type:"number",value:String(n.roadmapScanner.slicerMaxRuntime||""),onChange:w=>r("roadmapScanner",{...n.roadmapScanner,slicerMaxRuntime:Number(w.target.value||0)}),rightIcon:s.jsx("span",{className:"text-xs",children:"sec"})}),s.jsx(Je,{label:"Priority Mode",value:n.roadmapScanner.priorityMode||"roadmap-first",onChange:w=>r("roadmapScanner",{...n.roadmapScanner,priorityMode:w==="audit-first"?"audit-first":"roadmap-first"}),options:[{label:"Roadmap first (recommended)",value:"roadmap-first"},{label:"Audit first",value:"audit-first"}]}),s.jsx(Je,{label:"Issue Column",value:n.roadmapScanner.issueColumn||"Ready",onChange:w=>r("roadmapScanner",{...n.roadmapScanner,issueColumn:w==="Draft"?"Draft":"Ready"}),options:[{label:"Ready (default)",value:"Ready"},{label:"Draft",value:"Draft"}]})]})]})}),s.jsx(sl,{id:"job-section-analytics",title:"Analytics (Amplitude)",icon:ch,description:"Fetch Amplitude data, analyze with AI, and create board issues",enabled:n.analytics.enabled,onToggle:w=>r("analytics",{...n.analytics,enabled:w}),expanded:h==="analytics",onExpandChange:w=>f(w?"analytics":null),scheduleSummary:Xt(n.analytics.schedule),providerLabel:n.jobProviders.analytics?(N=o.find(w=>w.value===n.jobProviders.analytics))==null?void 0:N.label:"Global",children:s.jsxs("div",{className:"space-y-6",children:[s.jsx(rl,{summary:Xt(n.analytics.schedule),onOpen:()=>b("analytics")}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsx(Je,{label:"Provider",value:n.jobProviders.analytics??"",onChange:w=>j("analytics",w),options:y}),s.jsx(we,{label:"Amplitude API Key",value:((O=n.providerEnv)==null?void 0:O.AMPLITUDE_API_KEY)??"",onChange:w=>r("providerEnv",{...n.providerEnv,AMPLITUDE_API_KEY:w.target.value}),placeholder:"Required"}),s.jsx(we,{label:"Amplitude Secret Key",type:"password",value:((k=n.providerEnv)==null?void 0:k.AMPLITUDE_SECRET_KEY)??"",onChange:w=>r("providerEnv",{...n.providerEnv,AMPLITUDE_SECRET_KEY:w.target.value}),placeholder:"Required"}),s.jsx(we,{label:"Max Runtime",type:"number",value:String(n.analytics.maxRuntime),onChange:w=>r("analytics",{...n.analytics,maxRuntime:Number(w.target.value||0)}),rightIcon:s.jsx("span",{className:"text-xs",children:"sec"})}),s.jsx(we,{label:"Lookback Days",type:"number",min:"1",max:"90",value:String(n.analytics.lookbackDays),onChange:w=>r("analytics",{...n.analytics,lookbackDays:Math.max(1,Math.min(90,Number(w.target.value||7)))})}),s.jsx(Je,{label:"Target Column",value:n.analytics.targetColumn,onChange:w=>r("analytics",{...n.analytics,targetColumn:w}),options:[{value:"Draft",label:"Draft"},{value:"Ready",label:"Ready"},{value:"In Progress",label:"In Progress"},{value:"Review",label:"Review"},{value:"Done",label:"Done"}]}),s.jsxs("div",{className:"md:col-span-2",children:[s.jsx("label",{className:"block text-sm font-medium text-slate-400 mb-1.5",children:"Analysis Prompt (optional)"}),s.jsx("textarea",{rows:4,value:n.analytics.analysisPrompt??"",onChange:w=>r("analytics",{...n.analytics,analysisPrompt:w.target.value}),placeholder:"Custom prompt for AI analysis. Leave empty to use default.",className:"w-full bg-slate-950/50 border border-white/10 text-slate-200 rounded-lg px-3 py-2.5 text-sm placeholder-slate-600 focus:outline-none focus:border-indigo-500/50 focus:ring-1 focus:ring-indigo-500/20 resize-y"})]})]})]})}),s.jsx(sl,{id:"job-section-pr-resolver",title:"PR Resolver",icon:fh,description:"Repo-wide conflict resolver that rebases PRs and applies feedback",enabled:n.prResolver.enabled,onToggle:w=>r("prResolver",{...n.prResolver,enabled:w}),expanded:h==="pr-resolver",onExpandChange:w=>f(w?"pr-resolver":null),scheduleSummary:Xt(n.prResolver.schedule),providerLabel:n.jobProviders["pr-resolver"]?(P=o.find(w=>w.value===n.jobProviders["pr-resolver"]))==null?void 0:P.label:"Global",children:s.jsxs("div",{className:"space-y-6",children:[s.jsx(rl,{summary:Xt(n.prResolver.schedule),onOpen:()=>b("pr-resolver")}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsx(Je,{label:"Provider",value:n.jobProviders["pr-resolver"]??"",onChange:w=>j("pr-resolver",w),options:y}),s.jsx(we,{label:"Max Runtime",type:"number",value:String(n.prResolver.maxRuntime),onChange:w=>r("prResolver",{...n.prResolver,maxRuntime:Number(w.target.value||0)}),rightIcon:s.jsx("span",{className:"text-xs",children:"sec"})}),s.jsx(we,{label:"Per-PR Timeout",type:"number",value:String(n.prResolver.perPrTimeout),onChange:w=>r("prResolver",{...n.prResolver,perPrTimeout:Math.max(0,Number(w.target.value||0))}),rightIcon:s.jsx("span",{className:"text-xs",children:"sec"})}),s.jsx(we,{label:"Max PRs Per Run",type:"number",min:"0",value:String(n.prResolver.maxPrsPerRun),onChange:w=>r("prResolver",{...n.prResolver,maxPrsPerRun:Math.max(0,Number(w.target.value||0))})}),s.jsx(we,{label:"Ready Label",value:n.prResolver.readyLabel,onChange:w=>r("prResolver",{...n.prResolver,readyLabel:w.target.value})})]}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[s.jsxs("div",{className:"flex items-center justify-between p-3 rounded-md border border-slate-800 bg-slate-950/40",children:[s.jsxs("div",{children:[s.jsx("span",{className:"text-sm font-medium text-slate-200",children:"AI conflict resolution"}),s.jsx("p",{className:"text-xs text-slate-500 mt-1",children:"AI help for non-trivial rebases"})]}),s.jsx(Ft,{checked:n.prResolver.aiConflictResolution,onChange:w=>r("prResolver",{...n.prResolver,aiConflictResolution:w})})]}),s.jsxs("div",{className:"flex items-center justify-between p-3 rounded-md border border-slate-800 bg-slate-950/40",children:[s.jsxs("div",{children:[s.jsx("span",{className:"text-sm font-medium text-slate-200",children:"AI review resolution"}),s.jsx("p",{className:"text-xs text-slate-500 mt-1",children:"Implement open review comments"})]}),s.jsx(Ft,{checked:n.prResolver.aiReviewResolution,onChange:w=>r("prResolver",{...n.prResolver,aiReviewResolution:w})})]})]}),s.jsx(dc,{label:"PR Resolver Branch Patterns",value:n.prResolver.branchPatterns,onChange:w=>r("prResolver",{...n.prResolver,branchPatterns:w}),placeholder:"e.g., feat/, night-watch/",helpText:"Branch patterns to filter PRs (empty = all)"})]})}),s.jsx(sl,{id:"job-section-merger",title:"Merge Orchestrator",icon:pu,description:"Repo-wide PR merge coordinator — scans, rebases, and merges",enabled:n.merger.enabled,onToggle:w=>r("merger",{...n.merger,enabled:w}),expanded:h==="merger",onExpandChange:w=>f(w?"merger":null),scheduleSummary:Xt(n.merger.schedule),providerLabel:n.jobProviders.merger?(D=o.find(w=>w.value===n.jobProviders.merger))==null?void 0:D.label:"Global",children:s.jsxs("div",{className:"space-y-6",children:[s.jsx(rl,{summary:Xt(n.merger.schedule),onOpen:()=>b("merger")}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsx(Je,{label:"Provider",value:n.jobProviders.merger??"",onChange:w=>j("merger",w),options:y}),s.jsx(we,{label:"Max Runtime",type:"number",value:String(n.merger.maxRuntime),onChange:w=>r("merger",{...n.merger,maxRuntime:Number(w.target.value||0)}),rightIcon:s.jsx("span",{className:"text-xs",children:"sec"})}),s.jsx(Je,{label:"Merge Method",value:n.merger.mergeMethod,onChange:w=>r("merger",{...n.merger,mergeMethod:w}),options:[{label:"Squash",value:"squash"},{label:"Merge",value:"merge"},{label:"Rebase",value:"rebase"}]}),s.jsx(we,{label:"Min Review Score",type:"number",min:"0",max:"100",value:String(n.merger.minReviewScore),onChange:w=>r("merger",{...n.merger,minReviewScore:Math.max(0,Math.min(100,Number(w.target.value||0)))})}),s.jsx(we,{label:"Max PRs Per Run",type:"number",min:"0",value:String(n.merger.maxPrsPerRun),onChange:w=>r("merger",{...n.merger,maxPrsPerRun:Math.max(0,Number(w.target.value||0))})}),s.jsx(Je,{label:"CI Policy",value:n.merger.ciPolicy,onChange:w=>r("merger",{...n.merger,ciPolicy:w}),options:[{label:"Fallback to Local Checks",value:"fallback-local"},{label:"Require GitHub CI",value:"ci-only"},{label:"Ignore CI",value:"ignore"}]}),s.jsx(we,{label:"Local Check Command",value:n.merger.localCheckCommand,onChange:w=>r("merger",{...n.merger,localCheckCommand:w.target.value}),helperText:"Used only when CI policy falls back to local checks."})]}),s.jsxs("div",{className:"flex items-center justify-between p-3 rounded-md border border-slate-800 bg-slate-950/40",children:[s.jsxs("div",{children:[s.jsx("span",{className:"text-sm font-medium text-slate-200",children:"Rebase before merge"}),s.jsx("p",{className:"text-xs text-slate-500 mt-1",children:"Rebase each PR against its base branch"})]}),s.jsx(Ft,{checked:n.merger.rebaseBeforeMerge,onChange:w=>r("merger",{...n.merger,rebaseBeforeMerge:w})})]}),s.jsx(dc,{label:"Merger Branch Patterns",value:n.merger.branchPatterns,onChange:w=>r("merger",{...n.merger,branchPatterns:w}),placeholder:"e.g., feat/, night-watch/"})]})}),s.jsx(sl,{id:"job-section-manager",title:"Manager",icon:uh,description:"Monitors roadmap, PRDs, docs, board state, and system health",enabled:n.manager.enabled,onToggle:w=>r("manager",{...n.manager,enabled:w}),expanded:h==="manager",onExpandChange:w=>f(w?"manager":null),scheduleSummary:Xt(n.manager.schedule),providerLabel:n.jobProviders.manager?(Q=o.find(w=>w.value===n.jobProviders.manager))==null?void 0:Q.label:"Global",children:s.jsxs("div",{className:"space-y-6",children:[s.jsx(rl,{summary:Xt(n.manager.schedule),onOpen:()=>b("manager")}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsx(Je,{label:"Provider",value:n.jobProviders.manager??"",onChange:w=>j("manager",w),options:y}),s.jsx(we,{label:"Max Runtime",type:"number",min:"0",value:String(n.manager.maxRuntime),onChange:w=>r("manager",{...n.manager,maxRuntime:Math.max(0,Number(w.target.value||0))}),rightIcon:s.jsx("span",{className:"text-xs",children:"sec"})}),s.jsx(Je,{label:"Output Mode",value:n.manager.outputMode,onChange:w=>r("manager",{...n.manager,outputMode:w}),options:[{value:"board-draft",label:"Board Draft"},{value:"filesystem-prd",label:"Filesystem PRD"},{value:"report-only",label:"Report Only"}]}),s.jsx(Je,{label:"Authority",value:n.manager.authority,onChange:w=>r("manager",{...n.manager,authority:w}),options:[{value:"draft",label:"Draft"},{value:"ready",label:"Ready"},{value:"workflow",label:"Workflow"}]}),s.jsx(Je,{label:"Target Column",value:n.manager.targetColumn,onChange:w=>r("manager",{...n.manager,targetColumn:w}),options:[{value:"Draft",label:"Draft"},{value:"Ready",label:"Ready"},{value:"In Progress",label:"In Progress"},{value:"Review",label:"Review"},{value:"Done",label:"Done"}]}),s.jsx(we,{label:"Memory Path",value:n.manager.memoryPath,onChange:w=>r("manager",{...n.manager,memoryPath:w.target.value})}),s.jsx(we,{label:"Generated Docs Directory",value:n.manager.docsDir,onChange:w=>r("manager",{...n.manager,docsDir:w.target.value})}),s.jsx(we,{label:"Weekly Summary Day",type:"number",min:"0",max:"6",value:String(n.manager.weeklySummaryDay),onChange:w=>r("manager",{...n.manager,weeklySummaryDay:Math.max(0,Math.min(6,Number(w.target.value||0)))}),helperText:"0 = Sunday, 1 = Monday"}),s.jsxs("div",{className:"flex items-center justify-between p-3 rounded-md border border-slate-800 bg-slate-950/40",children:[s.jsxs("div",{children:[s.jsx("span",{className:"text-sm font-medium text-slate-200",children:"Weekly summary"}),s.jsx("p",{className:"text-xs text-slate-500 mt-1",children:"Send a periodic project health summary"})]}),s.jsx(Ft,{checked:n.manager.weeklySummaryEnabled,onChange:w=>r("manager",{...n.manager,weeklySummaryEnabled:w})})]})]})]})})]})]})},Xp="5 * * * *",Jp="25 */3 * * *",zw={enabled:!0,roadmapPath:"ROADMAP.md",autoScanInterval:300,slicerSchedule:"35 */6 * * *",slicerMaxRuntime:600,priorityMode:"roadmap-first",issueColumn:"Ready"},Tx={enabled:!0,schedule:"45 2,10,18 * * *",maxRuntime:3600,branchPatterns:[],artifacts:"both",skipLabel:"skip-qa",autoInstallPlaywright:!0},Lw={enabled:!1,schedule:"50 3 * * 1",maxRuntime:1800,createIssues:!1,targetColumn:"Draft"},Uw={enabled:!1,schedule:"0 6 * * 1",maxRuntime:900,lookbackDays:7,targetColumn:"Draft",analysisPrompt:""},Cx={enabled:!0,schedule:"15 6,14,22 * * *",maxRuntime:3600,branchPatterns:[],maxPrsPerRun:0,perPrTimeout:600,aiConflictResolution:!0,aiReviewResolution:!1,readyLabel:"ready-to-merge"},Mx={enabled:!1,schedule:"55 */4 * * *",maxRuntime:1800,mergeMethod:"squash",minReviewScore:80,branchPatterns:[],rebaseBeforeMerge:!0,maxPrsPerRun:0,ciPolicy:"fallback-local",localCheckCommand:"yarn install --frozen-lockfile && yarn verify && yarn test"},Hw={enabled:!0,schedule:"15 7 * * *",maxRuntime:0,authority:"draft",outputMode:"board-draft",targetColumn:"Draft",memoryPath:".night-watch/manager/memory.md",docsDir:".night-watch/manager/docs",weeklySummaryEnabled:!0,weeklySummaryDay:1};function Pr(){return{...zw}}function Kp(){return{...Tx,branchPatterns:[...Tx.branchPatterns]}}function ev(){return{...Lw}}function Nh(){return{...Uw}}function gc(){return{...Cx,branchPatterns:[...Cx.branchPatterns]}}function bu(){return{...Mx,branchPatterns:[...Mx.branchPatterns]}}function xc(){return{...Hw}}const hu=["claude","claude-sonnet-4-6","claude-opus-4-6","codex","glm-47","glm-5"],tv={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"}}},qw={enabled:!0,mode:"conservative",maxConcurrency:1,maxWaitTime:7200,priority:{executor:50,reviewer:40,slicer:30,manager:25,qa:20,audit:10},providerBuckets:{}},Vw=["executor","reviewer","qa","audit","slicer","analytics","pr-resolver","merger","manager"],Bw=new Set(["overview","schedules","jobs"]),Vf=n=>{if(!n)return null;const r=n==="planner"?"slicer":n;return["executor","reviewer","qa","audit","slicer","analytics","pr-resolver","merger","manager"].includes(r)?r:null},tu=n=>({cronSchedule:n.cronSchedule||Xp,reviewerSchedule:n.reviewerSchedule||Jp,scheduleBundleId:n.scheduleBundleId??null,cronScheduleOffset:n.cronScheduleOffset??0,schedulingPriority:n.schedulingPriority??3,executorEnabled:n.executorEnabled??!0,reviewerEnabled:n.reviewerEnabled??!1,maxRuntime:n.maxRuntime??3600,reviewerMaxRuntime:n.reviewerMaxRuntime??1800,maxRetries:n.maxRetries??3,reviewerMaxRetries:n.reviewerMaxRetries??2,reviewerRetryDelay:n.reviewerRetryDelay??30,reviewerMaxPrsPerRun:n.reviewerMaxPrsPerRun??0,minReviewScore:n.minReviewScore??70,branchPatterns:n.branchPatterns||[],providerEnv:n.providerEnv||{},jobProviders:n.jobProviders||{},providerPresets:n.providerPresets??{},qa:n.qa||Kp(),audit:n.audit||ev(),analytics:n.analytics||Nh(),feedback:n.feedback??{enabled:!0,confidenceThreshold:.75,augmentationTtlDays:14,maxActiveAugmentations:3,successStreakToExpire:3},prResolver:n.prResolver??gc(),merger:n.merger??bu(),manager:n.manager??xc(),roadmapScanner:n.roadmapScanner||Pr(),queue:n.queue||qw}),ru=n=>{var r,u,o;return Rw(n.scheduleBundleId,n.cronSchedule,n.reviewerSchedule,n.qa.schedule,n.audit.schedule,n.roadmapScanner.slicerSchedule??Pr().slicerSchedule,((r=n.prResolver)==null?void 0:r.schedule)??gc().schedule,((u=n.merger)==null?void 0:u.schedule)??bu().schedule,((o=n.manager)==null?void 0:o.schedule)??xc().schedule)},au=n=>{const r=ru(n);return!n.scheduleBundleId&&r?{form:{...n,scheduleBundleId:r.id},detectedTemplate:r}:{form:n,detectedTemplate:r}},Pw=()=>{var An,Ws,dl,Ie,fl,gt,Bt,_t,zt,es;const n=Dn(),{addToast:r,selectedProjectId:u,globalModeLoading:o}=Zt(),[h,f]=U.useState(!1),[b,j]=U.useState(!1),[y,x]=U.useState(!1),[S,C]=U.useState(null),[z,_]=U.useState([]),[N,O]=U.useState(null),[k,P]=U.useState(null),[D,Q]=U.useState("overview"),[w,K]=U.useState(null),[q,Z]=U.useState(null),[R,ae]=U.useState(null),[M,J]=U.useState("template"),[le,fe]=U.useState(""),[ve,ue]=U.useState(!1),[G,ne]=U.useState(!1),he=U.useRef(null),me=U.useRef(!1),ze=U.useRef(null),{data:H,loading:se,error:ge,refetch:pe}=Ua(xp,[u],{enabled:!o}),{data:Te,loading:xe,refetch:Me}=Ua(vh,[u],{enabled:!o});U.useEffect(()=>{if(o)return;const oe=()=>{pe(),Gg().then(O).catch(()=>{}),dN(24).then(P).catch(()=>{}),nN().then(_).catch(()=>{})};oe();const ye=setInterval(oe,3e4);return()=>clearInterval(ye)},[u,o,pe]),U.useEffect(()=>{if(!Te)return;if(me.current){me.current=!1;return}const{form:oe,detectedTemplate:ye}=au(tu(Te));ae(oe),he.current=oe,J(ye?"template":"custom"),fe((ye==null?void 0:ye.id)??""),ue(!1)},[Te]),U.useEffect(()=>{!R||!he.current||ue(JSON.stringify(R)!==JSON.stringify(he.current))},[R]),U.useEffect(()=>{if(D!=="jobs"||!w)return;const oe=window.setTimeout(()=>{const ye=document.getElementById(`job-section-${w}`);ye&&ye.scrollIntoView({behavior:"smooth",block:"center"})},100);return()=>window.clearTimeout(oe)},[D,w]),U.useEffect(()=>{if(D!=="schedules"||M!=="custom"||!q)return;const oe=q,ye=window.setTimeout(()=>{const Qe=document.getElementById(`job-schedule-${oe}`);Qe&&Qe.scrollIntoView({behavior:"smooth",block:"center"}),Z(null)},100);return()=>window.clearTimeout(ye)},[D,M,q]);const Ze=(oe,ye)=>{ae(Qe=>Qe&&{...Qe,[oe]:ye})},We=()=>{if(J("template"),!R)return;const oe=ru(R);if(oe){fe(oe.id),Ze("scheduleBundleId",oe.id);return}const ye=Qf(le)??Qf("always-on");ye&&tn(ye)},Dt=()=>{J("custom"),Ze("scheduleBundleId",null),fe("")},da=oe=>{const ye=Vf(oe);ye&&(M!=="custom"&&Dt(),Q("schedules"),Z(ye))},tn=oe=>{fe(oe.id),ae(ye=>ye&&{...ye,cronSchedule:oe.schedules.executor,reviewerSchedule:oe.schedules.reviewer,scheduleBundleId:oe.id,qa:{...ye.qa,schedule:oe.schedules.qa},audit:{...ye.audit,schedule:oe.schedules.audit},roadmapScanner:{...ye.roadmapScanner,slicerSchedule:oe.schedules.slicer},prResolver:{...ye.prResolver,schedule:oe.schedules.prResolver},merger:{...ye.merger,schedule:oe.schedules.merger},manager:{...ye.manager,schedule:oe.schedules.manager}})},an=async()=>{if(R){ne(!0);try{const oe={};for(const Ke of Vw){const xa=R.jobProviders[Ke];typeof xa=="string"&&xa.trim().length>0?oe[Ke]=xa:Te!=null&&Te.jobProviders[Ke]&&(oe[Ke]=null)}const ye=await uu({cronSchedule:R.cronSchedule,reviewerSchedule:R.reviewerSchedule,scheduleBundleId:M==="template"?R.scheduleBundleId:null,cronScheduleOffset:R.cronScheduleOffset,schedulingPriority:R.schedulingPriority,executorEnabled:R.executorEnabled,reviewerEnabled:R.reviewerEnabled,maxRuntime:R.maxRuntime,reviewerMaxRuntime:R.reviewerMaxRuntime,maxRetries:R.maxRetries,reviewerMaxRetries:R.reviewerMaxRetries,reviewerRetryDelay:R.reviewerRetryDelay,reviewerMaxPrsPerRun:R.reviewerMaxPrsPerRun,minReviewScore:R.minReviewScore,branchPatterns:R.branchPatterns,providerEnv:R.providerEnv,jobProviders:oe,qa:R.qa,audit:R.audit,analytics:R.analytics,feedback:R.feedback,prResolver:R.prResolver,merger:R.merger,manager:R.manager,roadmapScanner:R.roadmapScanner,queue:R.queue}),{form:Qe}=au(tu(ye));ae(Qe),he.current=Qe,ue(!1);let Pt="";try{await uc()}catch(Ke){Pt=Ke instanceof Error?Ke.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,Me()}catch(oe){r({title:"Save Failed",message:oe instanceof Error?oe.message:"Failed to save configuration",type:"error"})}finally{ne(!1)}}},fa=()=>{if(he.current){ae(he.current);const oe=he.current,ye=ru(oe);J(ye?"template":"custom"),fe((ye==null?void 0:ye.id)??""),ue(!1)}},ha=async oe=>{try{const ye=await jp(oe),{form:Qe}=au(tu(ye));ae(Qe),he.current=Qe,ue(!1);let Pt="";try{await uc()}catch(Ke){Pt=Ke instanceof Error?Ke.message:"Failed to reinstall cron"}r(Pt?{title:"Saved (Cron Reinstall Failed)",message:Pt,type:"warning"}:{title:oe?"Roadmap Scanner Enabled":"Roadmap Scanner Disabled",message:`Roadmap scanner has been ${oe?"enabled":"disabled"}.`,type:"success"}),me.current=!0,Me(),pe()}catch(ye){r({title:"Toggle Failed",message:ye instanceof Error?ye.message:"Failed to toggle roadmap scanner",type:"error"})}},yn=async()=>{if(H){f(!0);try{H.paused?(await uc(),r({title:"Schedule Resumed",message:"Cron schedules are active.",type:"success"})):(await vp(),r({title:"Schedule Paused",message:"Cron schedules are deactivated.",type:"info"})),pe()}catch(oe){r({title:"Action Failed",message:oe instanceof Error?oe.message:"Toggle failed",type:"error"})}finally{f(!1)}}},bn=async()=>{if(window.confirm("Are you sure you want to clear all pending jobs?")){j(!0);try{const oe=await fN();r({title:"Queue Cleared",message:`Removed ${oe.cleared} pending jobs.`,type:"success"}),Gg().then(O)}catch(oe){r({title:"Clear Failed",message:oe instanceof Error?oe.message:"Failed to clear queue",type:"error"})}finally{j(!1)}}},Va=async oe=>{if(R){ne(!0);try{const ye=await uu({queue:{...R.queue,...oe}}),{form:Qe}=au(tu(ye));ae(Qe),he.current=Qe,ue(!1),r({title:"Settings Saved",message:"Queue configuration updated.",type:"success"}),me.current=!0,Me(),pe()}catch(ye){r({title:"Save Failed",message:ye instanceof Error?ye.message:"Save failed",type:"error"})}finally{ne(!1)}}},kt=async oe=>{const ye=oe==="planner"?"slicer":oe;C(oe);try{await pp(ye),r({title:"Job Triggered",message:`${oe} job queued successfully.`,type:"success"})}catch(Qe){r({title:"Trigger Failed",message:Qe instanceof Error?Qe.message:"Failed to trigger job",type:"error"})}finally{C(null)}},ma=oe=>{const ye=Vf(oe);ye&&(Q("jobs"),K(ye))};U.useEffect(()=>{if(!R||ze.current===n.search)return;ze.current=n.search;const oe=new URLSearchParams(n.search),ye=oe.get("tab"),Qe=ye==="queue"?"overview":ye,Pt=oe.get("mode"),Ke=Vf(oe.get("jobType"));if(Qe&&Bw.has(Qe)){if(Qe==="jobs"){Q("jobs"),Ke&&K(Ke);return}if(Qe==="schedules"){if(Ke){da(Ke);return}Q("schedules"),Pt==="custom"&&M!=="custom"&&Dt(),Pt==="template"&&M!=="template"&&We();return}Q(Qe);return}Pt==="custom"&&M!=="custom"&&(Q("schedules"),Dt()),Pt==="template"&&M!=="template"&&(Q("schedules"),We())},[n.search,R,M]);const kn=U.useMemo(()=>{const oe={...tv,...(R==null?void 0:R.providerPresets)??{}};return Object.entries(oe).map(([ye,Qe])=>({label:Qe.name||ye,value:ye}))},[R==null?void 0:R.providerPresets]);if(se||xe||!R)return s.jsx("div",{className:"flex items-center justify-center min-h-[400px] text-slate-500",children:"Loading automation state..."});if(ge||!H||!Te)return s.jsxs("div",{className:"flex flex-col items-center justify-center min-h-[400px] space-y-4",children:[s.jsx(vn,{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(Ue,{onClick:()=>{pe(),Me()},children:"Retry"})]});const Ba=H.paused,ga=R?ru(R):void 0,At=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(rt,{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($g,{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(Ue,{variant:"ghost",size:"sm",onClick:bn,loading:b,disabled:!(N!=null&&N.items.length),className:"text-slate-500 hover:text-red-400 hover:bg-red-400/10",children:[s.jsx(Gs,{className:"h-4 w-4 mr-1.5"}),"Clear"]}),s.jsx("div",{className:`p-1.5 rounded-lg cursor-pointer hover:bg-slate-800 transition-colors ${y?"text-indigo-400 bg-slate-800":"text-slate-500"}`,onClick:()=>x(!y),title:"Automation Settings",children:s.jsx(Bg,{className:"h-5 w-5"})})]})]}),s.jsx("div",{className:`transition-all duration-300 overflow-hidden ${y?"max-h-[500px]":"max-h-0"}`,children:s.jsxs("div",{className:"p-6 bg-slate-950/40 border-b border-slate-800 grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsx(Je,{label:"Dispatch Mode",value:((An=R==null?void 0:R.queue)==null?void 0:An.mode)||"auto",onChange:oe=>Va({mode:oe}),options:[{label:"Auto (Recommended)",value:"auto"},{label:"Conservative (1 at a time)",value:"conservative"},{label:"Provider-aware",value:"provider-aware"}]}),s.jsx(we,{label:"Max Concurrency",type:"number",min:"1",max:"20",value:String(((Ws=R==null?void 0:R.queue)==null?void 0:Ws.maxConcurrency)||1),onChange:oe=>Va({maxConcurrency:Number(oe.target.value)})}),s.jsx("div",{className:"md:col-span-2 flex items-center gap-3",children:s.jsx(Ft,{label:"Coordinator Enabled",checked:((dl=R==null?void 0:R.queue)==null?void 0:dl.enabled)??!0,onChange:oe=>Va({enabled:oe})})})]})}),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(oe=>s.jsxs("tr",{className:"hover:bg-slate-800/20 transition-colors group",children:[s.jsxs("td",{className:"px-6 py-4",children:[s.jsx("div",{className:"font-medium text-slate-200",children:oe.jobType}),s.jsx("div",{className:"text-[11px] text-slate-500 truncate max-w-[200px]",title:oe.projectPath,children:oe.projectName||oe.projectPath})]}),s.jsx("td",{className:"px-6 py-4",children:s.jsx(St,{variant:oe.status==="running"?"info":"neutral",className:"text-[10px]",children:oe.status})}),s.jsx("td",{className:"px-6 py-4 text-slate-400 font-mono text-xs",children:Ex(new Date(oe.enqueuedAt*1e3))}),s.jsx("td",{className:"px-6 py-4 text-right",children:s.jsx("button",{onClick:()=>ma(oe.jobType),className:"opacity-0 group-hover:opacity-100 p-2 text-slate-500 hover:text-indigo-400 transition-all",title:"Configure Job",children:s.jsx(Bg,{className:"h-4 w-4"})})})]},oe.id))})]})}):s.jsxs("div",{className:"py-12 flex flex-col items-center justify-center text-slate-500 text-sm italic",children:[s.jsx("div",{className:"mb-3 p-3 rounded-full bg-slate-900 border border-slate-800",children:s.jsx(Vg,{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(hc,{className:"h-3 w-3 animate-spin-slow"})," Live Update"]})]}),s.jsx(Mw,{configs:z,currentProjectId:u??void 0,onEditJob:(oe,ye)=>ma(ye),queueStatus:N,queueAnalytics:k})]}),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(rt,{className:"border-slate-800 overflow-hidden",children:k!=null&&k.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:k.recentRuns.map(oe=>s.jsxs("tr",{className:"hover:bg-slate-800/10 transition-colors",children:[s.jsx("td",{className:"px-6 py-4",children:s.jsx("span",{className:"font-medium text-slate-300 capitalize",children:oe.jobType})}),s.jsx("td",{className:"px-6 py-4",children:s.jsx(St,{variant:oe.status==="finished"?"success":oe.status==="failed"?"error":"neutral",className:"text-[10px]",children:oe.status})}),s.jsx("td",{className:"px-6 py-4 text-slate-400",children:oe.durationSeconds?`${oe.durationSeconds}s`:"--"}),s.jsx("td",{className:"px-6 py-4 text-slate-500 text-xs",children:Ex(new Date(oe.startedAt*1e3))}),s.jsx("td",{className:"px-6 py-4 text-right text-slate-500 font-mono text-xs",children:oe.providerKey||"default"})]},oe.id))})]})}):s.jsx("div",{className:"py-20 text-center text-slate-500 italic text-sm",children:"No recorded runs in the last 24 hours."})})]})]}),s.jsxs("div",{className:"space-y-6",children:[s.jsxs(rt,{className:"p-5 space-y-4 border-slate-800 bg-slate-900/20",children:[s.jsx("h4",{className:"text-xs font-bold text-slate-500 uppercase tracking-widest",children:"Automation Controls"}),s.jsxs("div",{className:"rounded-xl border border-slate-800 bg-slate-950/40 p-4",children:[s.jsx("div",{className:"text-[10px] text-slate-500 uppercase",children:"Schedule Template"}),s.jsx("div",{className:"mt-1 text-sm font-medium text-slate-200",children:(ga==null?void 0:ga.label)??"Custom"}),s.jsx("p",{className:"mt-1 text-xs text-slate-500",children:(ga==null?void 0:ga.description)??"Custom cron expressions are active for this project."})]}),s.jsx(Je,{label:"Scheduling Priority",value:String(R.schedulingPriority),onChange:oe=>Ze("schedulingPriority",Number(oe)),options:[{label:"1 - Lowest",value:"1"},{label:"2 - Low",value:"2"},{label:"3 - Balanced",value:"3"},{label:"4 - High",value:"4"},{label:"5 - Highest",value:"5"}],helperText:"Higher-priority projects get earlier balanced start slots and win queue tie-breakers first."}),s.jsx(we,{label:"Extra Start Delay",type:"number",min:"0",max:"59",value:String(R.cronScheduleOffset),onChange:oe=>Ze("cronScheduleOffset",Math.min(59,Math.max(0,Number(oe.target.value||0)))),helperText:"Manual delay in minutes added before cron jobs start. This stacks on top of automatic balancing."})]}),s.jsxs(rt,{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(rt,{className:"divide-y divide-slate-800 border-slate-800",children:[s.jsx("div",{className:"p-4 bg-slate-900/30",children:s.jsx("h4",{className:"text-xs font-bold text-slate-500 uppercase tracking-widest",children:"Manual Trigger"})}),s.jsx("div",{className:"p-2 space-y-1",children:[{id:"executor",label:"Run Executor",icon:pn,enabled:(R==null?void 0:R.executorEnabled)!==!1},{id:"reviewer",label:"Run Reviewer",icon:Gr,enabled:(R==null?void 0:R.reviewerEnabled)??!1},{id:"qa",label:"Run QA",icon:$g,enabled:((Ie=R==null?void 0:R.qa)==null?void 0:Ie.enabled)??!1},{id:"audit",label:"Run Audit",icon:Vg,enabled:((fl=R==null?void 0:R.audit)==null?void 0:fl.enabled)??!1},{id:"planner",label:"Run Planner",icon:hh,enabled:((gt=R==null?void 0:R.roadmapScanner)==null?void 0:gt.enabled)??!1},{id:"analytics",label:"Run Analytics",icon:ch,enabled:((Bt=R==null?void 0:R.analytics)==null?void 0:Bt.enabled)??!1},{id:"pr-resolver",label:"Run PR Resolver",icon:fh,enabled:((_t=R==null?void 0:R.prResolver)==null?void 0:_t.enabled)??!1},{id:"merger",label:"Run Merger",icon:pu,enabled:((zt=R==null?void 0:R.merger)==null?void 0:zt.enabled)??!1},{id:"manager",label:"Run Manager",icon:uh,enabled:((es=R==null?void 0:R.manager)==null?void 0:es.enabled)??!1}].map(oe=>s.jsxs("button",{onClick:()=>kt(oe.id),disabled:S===oe.id||!oe.enabled,className:`w-full flex items-center justify-between p-3 rounded-lg text-sm transition-colors group disabled:cursor-not-allowed ${oe.enabled?"text-slate-300 hover:bg-slate-800/40":"text-slate-600 opacity-50"}`,children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx(oe.icon,{className:`h-4 w-4 ${oe.enabled?"text-slate-500 group-hover:text-indigo-400":"text-slate-700"}`}),oe.label]}),S===oe.id?s.jsx(hc,{className:"h-3 w-3 animate-spin text-indigo-400"}):oe.enabled?s.jsx(pn,{className:"h-3 w-3 opacity-0 group-hover:opacity-100 transition-all fill-current text-indigo-400"}):s.jsx("span",{className:"text-[10px] text-slate-600 uppercase tracking-wider",children:"Off"})]},oe.id))})]})]})]}),ul=R?s.jsx(Aw,{form:{cronSchedule:R.cronSchedule,reviewerSchedule:R.reviewerSchedule,qa:R.qa,audit:R.audit,analytics:R.analytics,roadmapScanner:{...R.roadmapScanner,slicerSchedule:R.roadmapScanner.slicerSchedule??Pr().slicerSchedule},prResolver:R.prResolver,merger:R.merger,manager:R.manager},scheduleMode:M,selectedTemplateId:le,onFieldChange:(oe,ye)=>{Ze(oe,ye)},onSwitchToTemplate:We,onSwitchToCustom:Dt,onApplyTemplate:tn}):null,Zs=[{id:"overview",label:"Overview",content:At},{id:"schedules",label:"Schedules",content:ul},{id:"jobs",label:"Jobs",content:R?s.jsx(_w,{form:R,updateField:Ze,handleRoadmapToggle:ha,presetOptions:kn,expandedJob:w,onExpandedJobChange:K,onOpenSchedule:da}):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(St,{variant:Ba?"warning":"success",className:"px-3 py-1 text-xs uppercase tracking-wider",children:Ba?"Paused":"Active"})]}),s.jsx("p",{className:"text-sm text-slate-400 mt-1",children:"Manage automation overview, schedules, jobs, and live queue"})]}),s.jsx(Ue,{variant:Ba?"primary":"outline",size:"lg",className:Ba?"bg-emerald-600 hover:bg-emerald-700":"border-slate-700 hover:bg-slate-800",onClick:yn,loading:h,children:Ba?s.jsxs(s.Fragment,{children:[s.jsx(pn,{className:"h-5 w-5 mr-2 fill-current"})," Resume Scheduling"]}):s.jsxs(s.Fragment,{children:[s.jsx(cu,{className:"h-5 w-5 mr-2"})," Pause Scheduling"]})})]}),s.jsx(wp,{tabs:Zs,activeTab:D,onChange:Q}),ve&&s.jsx("div",{className:"fixed bottom-8 left-1/2 -translate-x-1/2 z-50 w-full max-w-2xl px-4 animate-in fade-in slide-in-from-bottom-4 duration-300",children:s.jsxs("div",{className:"bg-slate-900/90 backdrop-blur-md border border-indigo-500/30 rounded-2xl p-4 shadow-2xl flex items-center justify-between shadow-indigo-500/10",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"p-2 rounded-lg bg-indigo-500/20 text-indigo-400",children:s.jsx($s,{className:"h-5 w-5"})}),s.jsxs("div",{children:[s.jsx("div",{className:"text-sm font-semibold text-slate-200",children:"Unsaved changes"}),s.jsx("div",{className:"text-[11px] text-slate-400",children:"Save to apply and reinstall cron schedules"})]})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsxs(Ue,{variant:"ghost",size:"sm",onClick:fa,className:"text-slate-400",children:[s.jsx(mh,{className:"h-4 w-4 mr-1.5"}),"Reset"]}),s.jsxs(Ue,{variant:"primary",size:"sm",onClick:an,loading:G,children:[s.jsx(dp,{className:"h-4 w-4 mr-1.5"}),"Save"]})]})]})})]})},$w=({isOpen:n,onClose:r,title:u,children:o})=>(U.useEffect(()=>{const h=f=>{f.key==="Escape"&&r()};return n&&(document.addEventListener("keydown",h),document.body.style.overflow="hidden"),()=>{document.removeEventListener("keydown",h),document.body.style.overflow="unset"}},[n,r]),n?u1.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:u}),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(Fr,{className:"h-5 w-5"})})]}),s.jsx("div",{className:"flex-1 overflow-y-auto px-6 py-6 text-slate-300",children:o})]})]}),document.body):null),Yw=n=>["TOKEN","SECRET","KEY","PASSWORD","AUTH","API_KEY"].some(u=>n.toUpperCase().includes(u)),Gw=({value:n,isSensitive:r})=>{const[u,o]=_e.useState(!1);return r?s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{className:"text-sm text-slate-300 font-mono",children:u?n:"***********"}),s.jsx("button",{type:"button",onClick:()=>o(!u),className:"text-slate-500 hover:text-slate-300","aria-label":u?"Hide sensitive value":"Show sensitive value",title:u?"Hide sensitive value":"Show sensitive value",children:u?s.jsx(tj,{className:"h-4 w-4"}):s.jsx(dh,{className:"h-4 w-4"})})]}):s.jsx("span",{className:"text-sm text-slate-300 font-mono truncate max-w-xs",children:n})},av=({envVars:n,onChange:r,compact:u=!1})=>{const[o,h]=_e.useState(""),[f,b]=_e.useState(""),[j,y]=_e.useState(null),[x,S]=_e.useState(""),{addToast:C}=Zt(),z=()=>{if(o.trim()){if(!/^[A-Z_][A-Z0-9_]*$/.test(o)){C({title:"Invalid Key Format",message:"Key must be uppercase with underscores (e.g., API_KEY)",type:"error"});return}r({...n,[o]:f}),h(""),b("")}},_=D=>{const Q={...n};delete Q[D],r(Q)},N=D=>{y(D),S(n[D]??"")},O=()=>{j&&(r({...n,[j]:x}),y(null),S(""))},k=()=>{y(null),S("")},P=Object.entries(n);return s.jsxs("div",{className:"space-y-4",children:[!u&&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(([D,Q])=>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:D}),j===D?s.jsxs("div",{className:"flex items-center gap-2 flex-1",children:[s.jsx("input",{type:"text",value:x,onChange:w=>S(w.target.value),className:"flex-1 bg-slate-800 border border-slate-700 rounded px-2 py-1 text-sm text-slate-200"}),s.jsx("button",{type:"button",onClick:O,className:"p-1 text-green-400 hover:text-green-300","aria-label":`Save ${D} value`,title:`Save ${D} value`,children:s.jsx(R1,{className:"h-4 w-4"})}),s.jsx("button",{type:"button",onClick:k,className:"p-1 text-slate-400 hover:text-slate-300","aria-label":`Cancel editing ${D}`,title:`Cancel editing ${D}`,children:s.jsx(Fr,{className:"h-4 w-4"})})]}):s.jsx(Gw,{value:Q,isSensitive:Yw(D)})]}),j!==D&&s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("button",{type:"button",onClick:()=>N(D),className:"p-1 text-slate-400 hover:text-slate-200","aria-label":`Edit ${D}`,title:`Edit ${D}`,children:s.jsx(vu,{className:"h-4 w-4"})}),s.jsx("button",{type:"button",onClick:()=>_(D),className:"p-1 text-red-400 hover:text-red-300","aria-label":`Delete ${D}`,title:`Delete ${D}`,children:s.jsx(Gs,{className:"h-4 w-4"})})]})]},D))}),s.jsxs("div",{className:`flex items-end gap-3 ${u?"":"pt-4 border-t border-slate-800"}`,children:[s.jsxs("div",{className:"flex-1",children:[!u&&s.jsx("label",{className:"block text-xs font-medium text-slate-500 mb-1",children:"Key"}),s.jsx("input",{type:"text",value:o,onChange:D=>h(D.target.value.toUpperCase()),placeholder:u?"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:[!u&&s.jsx("label",{className:"block text-xs font-medium text-slate-500 mb-1",children:"Value"}),s.jsx("input",{type:"text",value:f,onChange:D=>b(D.target.value),placeholder:u?"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(Ue,{onClick:z,disabled:!o.trim(),size:u?"sm":"md",children:[s.jsx(Kl,{className:"h-4 w-4 mr-1"}),"Add"]})]})]})};function Fw(n,r){var u;return!!(n!=null&&n.startsWith("glm-")||(u=r==null?void 0:r.model)!=null&&u.startsWith("glm-"))}function Zw(n,r){var u,o;return Fw(n,r)?!((o=(u=r==null?void 0:r.envVars)==null?void 0:u.ANTHROPIC_API_KEY)!=null&&o.trim()):!1}const Ox={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:""}},Ww=({isOpen:n,onClose:r,onSave:u,presetId:o,preset:h,isBuiltIn:f,existingIds:b})=>{const[j,y]=_e.useState(""),[x,S]=_e.useState({name:"",command:"",subcommand:"",promptFlag:"",autoApproveFlag:"",workdirFlag:"",modelFlag:"",model:"",envVars:{}}),[C,z]=_e.useState(!1),[_,N]=_e.useState("custom"),[O,k]=_e.useState(null),P=Zw(o??j,x);_e.useEffect(()=>{n&&(o&&h?(y(o),S({name:h.name,command:h.command,subcommand:h.subcommand??"",promptFlag:h.promptFlag??"",autoApproveFlag:h.autoApproveFlag??"",workdirFlag:h.workdirFlag??"",modelFlag:h.modelFlag??"",model:h.model??"",envVars:h.envVars??{}}),o==="claude"||h.command==="claude"?N("claude"):o==="codex"||h.command==="codex"?N("codex"):N("custom")):(y(""),S({name:"",command:"",subcommand:"",promptFlag:"",autoApproveFlag:"",workdirFlag:"",modelFlag:"",model:"",envVars:{}}),N("custom")),k(null),z(!!(h!=null&&h.envVars&&Object.keys(h.envVars).length>0)))},[n,o,h]);const D=q=>{if(N(q),q!=="custom"&&Ox[q]){const Z=Ox[q];S(R=>({...R,...Z,envVars:R.envVars})),!o&&!j&&y(q)}},Q=(q,Z)=>{S(R=>({...R,[q]:Z})),k(null)},w=()=>{if(!x.name.trim())return k("Name is required"),!1;if(!x.command.trim())return k("Command is required"),!1;if(!o){if(!j.trim())return k("Preset ID is required"),!1;if(!/^[a-z0-9_-]+$/.test(j))return k("Preset ID must be lowercase letters, numbers, hyphens, and underscores only"),!1;if(b.includes(j))return k("A preset with this ID already exists"),!1}return!0},K=()=>{var Z,R,ae,M,J,le;if(!w())return;const q={name:x.name.trim(),command:x.command.trim()};(Z=x.subcommand)!=null&&Z.trim()&&(q.subcommand=x.subcommand.trim()),(R=x.promptFlag)!=null&&R.trim()&&(q.promptFlag=x.promptFlag.trim()),(ae=x.autoApproveFlag)!=null&&ae.trim()&&(q.autoApproveFlag=x.autoApproveFlag.trim()),(M=x.workdirFlag)!=null&&M.trim()&&(q.workdirFlag=x.workdirFlag.trim()),(J=x.modelFlag)!=null&&J.trim()&&(q.modelFlag=x.modelFlag.trim()),(le=x.model)!=null&&le.trim()&&(q.model=x.model.trim()),x.envVars&&Object.keys(x.envVars).length>0&&(q.envVars=x.envVars),u(o||j,q),r()};return s.jsx($w,{isOpen:n,onClose:r,title:o?`Edit Preset: ${h==null?void 0:h.name}`:"Add Provider Preset",children:s.jsxs("div",{className:"space-y-6",children:[O&&s.jsx("div",{className:"p-3 rounded-md bg-red-500/10 border border-red-500/20 text-red-400 text-sm",children:O}),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."})]})]})}),!f&&s.jsx("div",{children:s.jsx(Je,{label:"Template",value:_,onChange:D,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"})}),!o&&s.jsx(we,{label:"Preset ID",value:j,onChange:q=>y(q.target.value.toLowerCase().replace(/[^a-z0-9_-]/g,"")),placeholder:"e.g., my-custom-provider",helperText:"Unique identifier for this preset (lowercase, numbers, hyphens, underscores)"}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[s.jsx(we,{label:"Display Name",value:x.name,onChange:q=>Q("name",q.target.value),placeholder:"e.g., My Custom Provider",required:!0}),s.jsx(we,{label:"Command",value:x.command,onChange:q=>Q("command",q.target.value),placeholder:"e.g., claude, codex, npx",required:!0})]}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[s.jsx(we,{label:"Model",value:x.model??"",onChange:q=>Q("model",q.target.value),placeholder:"e.g., claude-opus-4-6",helperText:"Default model to use"}),s.jsx(we,{label:"Model Flag",value:x.modelFlag??"",onChange:q=>Q("modelFlag",q.target.value),placeholder:"e.g., --model",helperText:"Flag for specifying the model"})]}),s.jsxs("div",{className:"border-t border-slate-800 pt-4",children:[s.jsxs("button",{type:"button",onClick:()=>z(!C),className:"flex items-center gap-2 text-sm text-slate-400 hover:text-slate-200 transition-colors",children:[C?s.jsx(U1,{className:"h-4 w-4"}):s.jsx(oh,{className:"h-4 w-4"}),"Advanced Options"]}),C&&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(we,{label:"Subcommand",value:x.subcommand??"",onChange:q=>Q("subcommand",q.target.value),placeholder:"e.g., exec",helperText:"Subcommand after base command"}),s.jsx(we,{label:"Prompt Flag",value:x.promptFlag??"",onChange:q=>Q("promptFlag",q.target.value),placeholder:"e.g., -p",helperText:"Flag for passing the prompt"})]}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[s.jsx(we,{label:"Auto-Approve Flag",value:x.autoApproveFlag??"",onChange:q=>Q("autoApproveFlag",q.target.value),placeholder:"e.g., --dangerously-skip-permissions",helperText:"Flag to enable auto-approve mode"}),s.jsx(we,{label:"Workdir Flag",value:x.workdirFlag??"",onChange:q=>Q("workdirFlag",q.target.value),placeholder:"e.g., -C",helperText:"Flag for setting working directory"})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-slate-400 mb-2",children:"Environment Variables"}),s.jsx(av,{envVars:x.envVars??{},onChange:q=>Q("envVars",q),compact:!0})]})]})]}),s.jsxs("div",{className:"flex justify-end gap-3 pt-4 border-t border-slate-800",children:[s.jsx(Ue,{variant:"ghost",onClick:r,children:"Cancel"}),s.jsx(Ue,{onClick:K,children:o?"Save Changes":"Add Preset"})]})]})})},Iw=({form:n,updateField:r,projectName:u,doctorChecks:o,doctorLoading:h})=>s.jsxs("div",{className:"space-y-6",children:[s.jsx(rt,{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(we,{label:"Project Name",value:u,disabled:!0}),s.jsx(we,{label:"Default Branch",value:n.defaultBranch,onChange:f=>r("defaultBranch",f.target.value)}),s.jsx(we,{label:"PRD Directory",value:n.prdDir,onChange:f=>r("prdDir",f.target.value),helperText:"Directory containing PRD files (relative to project root)"}),s.jsx(we,{label:"Branch Prefix",value:n.branchPrefix,onChange:f=>r("branchPrefix",f.target.value)}),s.jsx(we,{label:"Templates Directory",value:n.templatesDir,onChange:f=>r("templatesDir",f.target.value),helperText:"Directory for custom template overrides"}),s.jsx(we,{label:"Max Log Size",type:"number",value:String(n.maxLogSize),onChange:f=>r("maxLogSize",Number(f.target.value||0)),rightIcon:s.jsx("span",{className:"text-xs",children:"bytes"}),helperText:"Maximum size for process log files"})]}),s.jsxs("div",{className:"pt-4 mt-4 border-t border-slate-800 space-y-6",children:[s.jsxs("div",{className:"rounded-lg border border-slate-800 bg-slate-900/40 p-4",children:[s.jsx(Ft,{checked:n.gitPushNoVerify,onChange:f=>r("gitPushNoVerify",f),label:"Use --no-verify on automated pushes"}),s.jsx("p",{className:"mt-2 text-sm text-slate-500",children:"Project-scoped. Bypasses local pre-push hooks for Night Watch controller and agent pushes in repos whose hooks block automation."})]}),s.jsx(dc,{label:"Branch Patterns",value:n.branchPatterns,onChange:f=>r("branchPatterns",f),placeholder:"e.g., feat/",helpText:"Branch patterns matched by reviewer and related automation jobs"}),s.jsx(dc,{label:"PRD Priority",value:n.prdPriority,onChange:f=>r("prdPriority",f),placeholder:"e.g., feature-x",helpText:"PRDs matching these names are executed first"})]})]})}),s.jsxs(rt,{className:"divide-y divide-slate-800",children:[s.jsxs("div",{className:"p-4 flex items-center gap-2",children:[s.jsx(lp,{className:"h-4 w-4 text-indigo-500"}),s.jsx("h3",{className:"text-base font-medium text-slate-200",children:"System Health"})]}),h?s.jsx("div",{className:"p-4 text-sm text-slate-500",children:"Loading health checks..."}):o.map((f,b)=>{const j=f.status==="pass",y=f.status==="warn",x=j?"bg-green-500/10 text-green-400 border-green-500/20":y?"bg-amber-500/10 text-amber-400 border-amber-500/20":"bg-red-500/10 text-red-400 border-red-500/20";return s.jsxs("div",{className:"p-4 flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("p",{className:"text-sm font-medium text-slate-200",children:f.name}),s.jsx("p",{className:"text-xs text-slate-500",children:f.detail})]}),s.jsx("span",{className:`inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium border ${x}`,children:f.status.toUpperCase()})]},`${f.name}-${b}`)})]})]}),Rx=({presetId:n,preset:r,isBuiltIn:u,onEdit:o,onDelete:h,onReset:f})=>{var x,S,C;const b=r.envVars?Object.keys(r.envVars).length:0,y=(n.startsWith("glm-")||((x=r.model)==null?void 0:x.startsWith("glm-")))&&!((C=(S=r.envVars)==null?void 0:S.ANTHROPIC_API_KEY)!=null&&C.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}),u&&s.jsx(St,{variant:"info",className:"text-[10px]",children:"Built-in"}),y&&s.jsxs("span",{className:"flex items-center gap-1 px-1.5 py-0.5 rounded text-[10px] bg-amber-900/40 text-amber-400 border border-amber-800/50",title:"GLM presets require ANTHROPIC_API_KEY in env vars",children:[s.jsx($s,{className:"h-3 w-3"}),"Missing ANTHROPIC_API_KEY"]})]}),s.jsxs("div",{className:"flex items-center gap-1",children:[s.jsx("button",{type:"button",onClick:o,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(vu,{className:"h-4 w-4"})}),u?f&&s.jsx("button",{type:"button",onClick:f,className:"p-1.5 text-slate-400 hover:text-indigo-400 hover:bg-slate-800 rounded transition-colors","aria-label":`Reset ${r.name} to defaults`,title:"Reset to defaults",children:s.jsx(mh,{className:"h-4 w-4"})}):h&&s.jsx("button",{type:"button",onClick:h,className:"p-1.5 text-slate-400 hover:text-red-400 hover:bg-slate-800 rounded transition-colors","aria-label":`Delete ${r.name} preset`,title:"Delete preset",children:s.jsx(Gs,{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(St,{variant:"neutral",className:"text-[10px] font-mono",children:r.model})]}),s.jsxs("div",{className:"flex items-center gap-3 mt-auto pt-2 border-t border-slate-800/50",children:[s.jsxs("span",{className:"text-xs text-slate-600 font-mono",children:["id: ",n]}),b>0&&s.jsxs("span",{className:"text-xs text-slate-500",children:[b," env var",b!==1?"s":""]})]})]})},Xf={0:"Su",1:"Mo",2:"Tu",3:"We",4:"Th",5:"Fr",6:"Sa"},Jf={executor:"Executor",reviewer:"Reviewer",qa:"QA",audit:"Audit",slicer:"Planner",analytics:"Analytics",planner:"Planner","pr-resolver":"PR Resolver",merger:"Merger",manager:"Manager"},Bf={label:"",presetId:"",days:[1,2,3,4,5],startTime:"23:00",endTime:"04:00",jobTypes:null,enabled:!0},Dx=({override:n,onChange:r,onSave:u,onCancel:o,isNew:h,presetOptions:f})=>{const b=N=>{const O=n.days.includes(N)?n.days.filter(k=>k!==N):[...n.days,N].sort((k,P)=>k-P);r({...n,days:O})},j=()=>{r({...n,days:[1,2,3,4,5]})},y=()=>{r({...n,days:[0,6]})},x=()=>{r({...n,days:[0,1,2,3,4,5,6]})},S=()=>{r({...n,jobTypes:null})},C=N=>{const O=n.jobTypes??[],k=O.includes(N)?O.filter(P=>P!==N):[...O,N];r({...n,jobTypes:k.length===0?null:k})},z=n.jobTypes===null||n.jobTypes===void 0,_=n.label.trim().length>0&&n.presetId.trim().length>0&&n.days.length>0&&n.startTime.trim().length>0&&n.endTime.trim().length>0;return s.jsxs("div",{className:"p-4 rounded-md border border-slate-700 bg-slate-900/50 space-y-4",children:[s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[s.jsx(we,{label:"Label",value:n.label,onChange:N=>r({...n,label:N.target.value}),placeholder:"e.g., Night Hours",required:!0}),s.jsx(Je,{label:"Provider",value:n.presetId,onChange:N=>r({...n,presetId:N}),options:f})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-slate-400 mb-2",children:"Days"}),s.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[Object.keys(Xf).map(N=>s.jsx("button",{type:"button",onClick:()=>b(N),className:`w-10 h-10 rounded-md text-sm font-medium transition-colors ${n.days.includes(N)?"bg-indigo-600 text-white":"bg-slate-800 text-slate-400 hover:bg-slate-700"}`,children:Xf[N]},N)),s.jsxs("div",{className:"flex gap-1 ml-2",children:[s.jsx("button",{type:"button",onClick:j,className:"px-3 py-2 text-xs rounded-md bg-slate-800 text-slate-400 hover:bg-slate-700 transition-colors",children:"Weekdays"}),s.jsx("button",{type:"button",onClick:y,className:"px-3 py-2 text-xs rounded-md bg-slate-800 text-slate-400 hover:bg-slate-700 transition-colors",children:"Weekend"}),s.jsx("button",{type:"button",onClick:x,className:"px-3 py-2 text-xs rounded-md bg-slate-800 text-slate-400 hover:bg-slate-700 transition-colors",children:"All"})]})]})]}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-slate-400 mb-2",children:"Start Time"}),s.jsx("input",{type:"time",value:n.startTime,onChange:N=>r({...n,startTime:N.target.value}),className:"w-full h-10 px-3 rounded-md bg-slate-800 border border-slate-700 text-slate-200 text-sm focus:outline-none focus:ring-2 focus:ring-indigo-500"})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-slate-400 mb-2",children:"End Time"}),s.jsx("input",{type:"time",value:n.endTime,onChange:N=>r({...n,endTime:N.target.value}),className:"w-full h-10 px-3 rounded-md bg-slate-800 border border-slate-700 text-slate-200 text-sm focus:outline-none focus:ring-2 focus:ring-indigo-500"})]})]}),s.jsxs("div",{children:[s.jsxs("div",{className:"flex items-center justify-between mb-2",children:[s.jsx("label",{className:"block text-sm font-medium text-slate-400",children:"Job Types"}),s.jsx("button",{type:"button",onClick:S,className:"text-xs text-indigo-400 hover:text-indigo-300 transition-colors",children:z?"All Jobs Selected":"Select All Jobs"})]}),s.jsx("div",{className:"flex flex-wrap gap-2",children:Object.keys(Jf).filter(N=>N!=="planner").map(N=>{var k;const O=z||(((k=n.jobTypes)==null?void 0:k.includes(N))??!1);return s.jsx("button",{type:"button",onClick:()=>C(N),className:`px-3 py-1.5 rounded-md text-sm transition-colors ${O?"bg-indigo-600 text-white":"bg-slate-800 text-slate-400 hover:bg-slate-700"}`,disabled:z,children:Jf[N]},N)})}),z&&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(Ft,{checked:n.enabled,onChange:N=>r({...n,enabled:N}),label:"Enabled"})}),s.jsxs("div",{className:"flex justify-end gap-2 pt-2",children:[s.jsx(Ue,{variant:"ghost",onClick:o,children:"Cancel"}),s.jsx(Ue,{onClick:u,disabled:!_,children:h?"Add Override":"Save Changes"})]})]})},Qw=({overrides:n,onChange:r,presetOptions:u})=>{const[o,h]=_e.useState(null),[f,b]=_e.useState(!1),[j,y]=_e.useState(Bf),x=()=>{r([...n,j]),y({...Bf}),b(!1)},S=(k,P)=>{const D=[...n];D[k]=P,r(D)},C=k=>{window.confirm("Are you sure you want to delete this schedule override?")&&r(n.filter((P,D)=>D!==k))},z=k=>{const P=[...n];P[k]={...P[k],enabled:!P[k].enabled},r(P)},_=k=>k.length===7?"Every day":k.length===5&&k.every(P=>P>=1&&P<=5)?"Weekdays":k.length===2&&k.includes(0)&&k.includes(6)?"Weekends":k.map(P=>Xf[P]).join(", "),N=k=>!k||k.length===0?"All Jobs":k.map(P=>Jf[P]).join(", "),O=k=>{const P=u.find(D=>D.value===k);return(P==null?void 0:P.label)||k};return s.jsxs("div",{className:"space-y-4",children:[s.jsx("div",{className:"space-y-3",children:n.length===0?s.jsx("p",{className:"text-slate-500 text-sm italic",children:"No schedule overrides configured."}):n.map((k,P)=>s.jsx("div",{children:o===P?s.jsx(Dx,{override:k,onChange:D=>S(P,D),onSave:()=>h(null),onCancel:()=>h(null),presetOptions:u}):s.jsxs("div",{className:`flex items-start justify-between p-4 rounded-md border bg-slate-950/40 ${k.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(Ft,{checked:k.enabled,onChange:()=>z(P)}),s.jsx("span",{className:"text-slate-100 font-medium",children:k.label})]}),s.jsxs("div",{className:"text-sm text-slate-400 ml-11",children:[s.jsx("span",{className:"text-indigo-400",children:O(k.presetId)})," · ",_(k.days)," · ",k.startTime," - ",k.endTime," · ",N(k.jobTypes)]})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("button",{type:"button",onClick:()=>h(P),className:"p-2 text-slate-400 hover:text-slate-200","aria-label":`Edit ${k.label}`,title:`Edit ${k.label}`,children:s.jsx(vu,{className:"h-4 w-4"})}),s.jsx("button",{type:"button",onClick:()=>C(P),className:"p-2 text-red-400 hover:text-red-300","aria-label":`Delete ${k.label}`,title:`Delete ${k.label}`,children:s.jsx(Gs,{className:"h-4 w-4"})})]})]})},P))}),f?s.jsx(Dx,{override:j,onChange:y,onSave:x,onCancel:()=>{b(!1),y({...Bf})},isNew:!0,presetOptions:u}):s.jsxs(Ue,{variant:"ghost",onClick:()=>b(!0),children:[s.jsx(Kl,{className:"h-4 w-4 mr-2"}),"Add Schedule Override"]})]})},Xw=({form:n,updateField:r,getAllPresets:u,getPresetOptions:o,handleEditPreset:h,handleDeletePreset:f,handleResetPreset:b,handleAddPreset:j})=>s.jsxs("div",{className:"space-y-6",children:[s.jsx(rt,{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(Je,{value:n.provider,onChange:y=>r("provider",y),options:o(n.providerPresets)})})]})}),s.jsxs(rt,{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(Ue,{onClick:j,variant:"primary",size:"sm",children:[s.jsx(Kl,{className:"h-4 w-4 mr-2"}),"Add Provider"]})]}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:[hu.map(y=>{const S=u()[y];return S?s.jsx(Rx,{presetId:y,preset:S,isBuiltIn:!0,onEdit:()=>h(y),onReset:()=>b(y)},y):null}),Object.entries(n.providerPresets).filter(([y])=>!hu.includes(y)).map(([y,x])=>s.jsx(Rx,{presetId:y,preset:x,isBuiltIn:!1,onEdit:()=>h(y),onDelete:()=>f(y)},y))]})]}),s.jsxs(rt,{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(Je,{label:"Primary Native Fallback",value:n.primaryFallbackModel,onChange:y=>r("primaryFallbackModel",y),options:[{label:"— None —",value:""},{label:"Claude Sonnet 4.6",value:"sonnet"},{label:"Claude Opus 4.6",value:"opus"}],helperText:"Used only when no primary fallback preset is configured"}),s.jsx(Je,{label:"Secondary Native Fallback",value:n.secondaryFallbackModel,onChange:y=>r("secondaryFallbackModel",y),options:[{label:"— None —",value:""},{label:"Claude Sonnet 4.6",value:"sonnet"},{label:"Claude Opus 4.6",value:"opus"}],helperText:"Tried only if the primary native fallback also rate-limits"}),s.jsx(Je,{label:"Primary Fallback Preset",value:n.primaryFallbackPreset,onChange:y=>r("primaryFallbackPreset",y),options:[{label:"— None —",value:""},...Object.entries(u()).map(([y,x])=>({label:x.name,value:y}))],helperText:"Automatic switch when global provider is throttled"}),s.jsx(Je,{label:"Secondary Fallback Preset",value:n.secondaryFallbackPreset,onChange:y=>r("secondaryFallbackPreset",y),options:[{label:"— None —",value:""},...Object.entries(u()).map(([y,x])=>({label:x.name,value:y}))]})]})]}),s.jsxs(rt,{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(Qw,{overrides:n.providerScheduleOverrides,onChange:y=>r("providerScheduleOverrides",y),presetOptions:Object.entries(u()).map(([y,x])=>({label:x.name,value:y}))})]}),s.jsxs(rt,{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(av,{envVars:n.providerEnv,onChange:y=>r("providerEnv",y)})]})]});function kx(n){return n.type==="telegram"?`telegram:${n.botToken}:${n.chatId}`:`${n.type}:${n.url}`}const Jw=[{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"}],Kw=(n,r)=>n.includes(r)?n.filter(u=>u!==r):[...n,r],Ax=({webhook:n,onChange:r,onSave:u,onCancel:o,isNew:h})=>s.jsxs("div",{className:"p-4 rounded-md border border-slate-700 bg-slate-900/50 space-y-4",children:[s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[s.jsx(Je,{label:"Type",value:n.type,onChange:f=>{const b=f;r(b==="telegram"?{type:b,botToken:"",chatId:"",events:n.events}:{type:b,url:"",events:n.events})},options:[{label:"Slack",value:"slack"},{label:"Discord",value:"discord"},{label:"Telegram",value:"telegram"}]}),n.type==="telegram"?s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"relative",children:s.jsx(we,{label:"Bot Token",type:"password",value:n.botToken||"",onChange:f=>r({...n,botToken:f.target.value}),placeholder:"123456789:ABCdefGHIjklMNOpqrsTUVwxyz"})}),s.jsx(we,{label:"Chat ID",value:n.chatId||"",onChange:f=>r({...n,chatId:f.target.value}),placeholder:"123456789"})]}):s.jsx("div",{className:"md:col-span-2",children:s.jsx(we,{label:"Webhook URL",type:"password",value:n.url||"",onChange:f=>r({...n,url:f.target.value}),placeholder:"https://hooks.slack.com/services/..."})})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-slate-400 mb-2",children:"Events"}),s.jsx("div",{className:"flex flex-wrap gap-2",children:Jw.map(f=>s.jsx("button",{type:"button",onClick:()=>r({...n,events:Kw(n.events,f.value)}),className:`px-3 py-1.5 rounded-md text-sm transition-colors ${n.events.includes(f.value)?"bg-indigo-600 text-white":"bg-slate-800 text-slate-400 hover:bg-slate-700"}`,children:f.label},f.value))})]}),s.jsxs("div",{className:"flex justify-end gap-2",children:[s.jsx(Ue,{variant:"ghost",onClick:o,children:"Cancel"}),s.jsx(Ue,{onClick:u,disabled:n.events.length===0||(n.type==="telegram"?!n.botToken||!n.chatId:!n.url),children:h?"Add Webhook":"Save Changes"})]})]}),eS=({notifications:n,onChange:r,globalWebhook:u,onSetGlobal:o,onUnsetGlobal:h})=>{const[f,b]=_e.useState(null),[j,y]=_e.useState(!1),[x,S]=_e.useState({type:"slack",url:"",events:[]}),C=()=>{r({webhooks:[...n.webhooks,x]}),S({type:"slack",url:"",events:[]}),y(!1)},z=(N,O)=>{const k=[...n.webhooks];k[N]=O,r({webhooks:k})},_=N=>{r({webhooks:n.webhooks.filter((O,k)=>k!==N)})};return s.jsxs("div",{className:"space-y-4",children:[s.jsx("div",{className:"text-sm text-slate-400 mb-4",children:"Receive notifications when events occur via Slack, Discord, or Telegram"}),s.jsx("div",{className:"space-y-3",children:n.webhooks.length===0?s.jsx("p",{className:"text-slate-500 text-sm italic",children:"No webhooks configured."}):n.webhooks.map((N,O)=>s.jsx("div",{children:f===O?s.jsx(Ax,{webhook:N,onChange:k=>z(O,k),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(k=>s.jsx("span",{className:"px-2 py-0.5 bg-slate-800 rounded text-xs text-slate-400",children:k.replace("_"," ")},k))})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[o!==void 0&&(()=>{const k=u!=null&&kx(N)===kx(u);return s.jsx("button",{type:"button",onClick:()=>k?h==null?void 0:h():o(N),className:`p-2 transition-colors ${k?"text-indigo-400 hover:text-indigo-300":"text-slate-500 hover:text-slate-300"}`,"aria-label":k?"Global channel (active)":"Set as global channel",title:k?"Global channel (active)":"Set as global channel",children:s.jsx(ij,{className:"h-4 w-4"})})})(),s.jsx("button",{type:"button",onClick:()=>b(O),className:"p-2 text-slate-400 hover:text-slate-200","aria-label":`Edit ${N.type} webhook`,title:`Edit ${N.type} webhook`,children:s.jsx(vu,{className:"h-4 w-4"})}),s.jsx("button",{type:"button",onClick:()=>_(O),className:"p-2 text-red-400 hover:text-red-300","aria-label":`Delete ${N.type} webhook`,title:`Delete ${N.type} webhook`,children:s.jsx(Gs,{className:"h-4 w-4"})})]})]})},O))}),j?s.jsx(Ax,{webhook:x,onChange:S,onSave:C,onCancel:()=>y(!1),isNew:!0}):s.jsxs(Ue,{variant:"ghost",onClick:()=>y(!0),children:[s.jsx(Kl,{className:"h-4 w-4 mr-2"}),"Add Webhook"]})]})},_x=[{label:"Executor",value:"executor"},{label:"Reviewer",value:"reviewer"},{label:"QA",value:"qa"},{label:"Audit",value:"audit"},{label:"Slicer / Planner",value:"slicer"},{label:"Analytics",value:"analytics"},{label:"PR Resolver",value:"pr-resolver"},{label:"Merger",value:"merger"}],zx=[{label:"workflow_run",value:"workflow_run"},{label:"check_suite",value:"check_suite"},{label:"pull_request",value:"pull_request"},{label:"repository_dispatch",value:"repository_dispatch"}];function tS(n){return encodeURIComponent(n.replace(/\//g,"~"))}function aS(){return typeof window>"u"||window.location.origin==="null"?"":window.location.origin}function nS(n){return(n==null?void 0:n.join(", "))??""}function lS(n){const r=n.split(",").map(u=>u.trim()).filter(Boolean);return r.length>0?r:void 0}function sS(n){return{event:"workflow_run",action:"completed",jobId:n}}function rS(n,r,u){const o=n&&r?`/api/projects/${tS(r)}/jobs/${u}/run`:`/api/jobs/${u}/run`;return`${aS()}${o}`}function iS(n){return[`payload='{"source":"manual"}'`,`signature=$(printf '%s' "$payload" | openssl dgst -sha256 -hmac "$NIGHT_WATCH_WEBHOOK_SECRET" | awk '{print $2}')`,`curl -X POST '${n}' \\`," -H 'Content-Type: application/json' \\",' -H "X-Night-Watch-Signature: sha256=$signature" \\',' --data "$payload"'].join(`
|
|
447
|
+
`)}const cS=({form:n,updateField:r,globalWebhook:u,isGlobalMode:o=!1,onSetGlobal:h,onUnsetGlobal:f,selectedProjectId:b})=>{const[j,y]=_e.useState(null),x=n.webhookTriggers,S=x.allowedJobIds[0]??"reviewer",C=rS(o,b,S),z=iS(C),_=w=>{r("webhookTriggers",{...x,...w})},N=w=>{_({github:{...x.github,...w}})},O=w=>{const K=x.allowedJobIds.includes(w)?x.allowedJobIds.filter(q=>q!==w):[...x.allowedJobIds,w];_({allowedJobIds:K})},k=w=>{const K=x.github.events.includes(w)?x.github.events.filter(q=>q!==w):[...x.github.events,w];N({events:K})},P=(w,K)=>{const q=x.github.rules.map((Z,R)=>R===w?{...Z,...K}:Z);N({rules:q})},D=w=>{N({rules:x.github.rules.filter((K,q)=>q!==w)})},Q=async(w,K)=>{var q;await((q=navigator.clipboard)==null?void 0:q.writeText(w)),y(K),window.setTimeout(()=>y(null),1500)};return s.jsxs("div",{className:"space-y-6",children:[s.jsxs(rt,{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(Ft,{checked:n.boardProvider.enabled,onChange:w=>r("boardProvider",{...n.boardProvider,enabled:w})})]}),n.boardProvider.enabled&&s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6 pt-6 border-t border-slate-800",children:[s.jsx(Je,{label:"Board Provider",value:n.boardProvider.provider,onChange:w=>r("boardProvider",{...n.boardProvider,provider:w}),options:[{label:"GitHub Projects",value:"github"},{label:"Local (SQLite)",value:"local"}]}),n.boardProvider.provider==="github"&&s.jsxs(s.Fragment,{children:[s.jsx(we,{label:"Project Number",type:"number",value:String(n.boardProvider.projectNumber||""),onChange:w=>r("boardProvider",{...n.boardProvider,projectNumber:w.target.value?Number(w.target.value):void 0}),helperText:"GitHub Projects V2 project number"}),s.jsx(we,{label:"Repository",value:n.boardProvider.repo||"",onChange:w=>r("boardProvider",{...n.boardProvider,repo:w.target.value||void 0}),helperText:"owner/repo (auto-detected if empty)"})]}),n.boardProvider.provider==="local"&&s.jsx("div",{className:"md:col-span-2",children:s.jsx("p",{className:"text-sm text-slate-400",children:"Local board uses SQLite for storage — no additional configuration needed."})})]})]}),s.jsxs(rt,{className:"p-6 space-y-6",children:[s.jsxs("div",{className:"flex items-center justify-between gap-4",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200",children:"Inbound Webhook Triggers"}),s.jsx("p",{className:"text-sm text-slate-400 mt-1",children:"Run signed Night Watch jobs from external systems"})]}),s.jsx(Ft,{checked:x.enabled,label:"Enabled",name:"webhookTriggers.enabled",onChange:w=>_({enabled:w})})]}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6 pt-6 border-t border-slate-800",children:[s.jsx(we,{label:"Secret Environment Variable",name:"webhookTriggers.secretEnv",value:x.secretEnv,onChange:w=>_({secretEnv:w.target.value}),helperText:"Server environment variable containing the shared HMAC secret"}),s.jsx(we,{label:"Signature Max Skew",min:0,name:"webhookTriggers.maxSkewSeconds",type:"number",value:String(x.maxSkewSeconds),onChange:w=>_({maxSkewSeconds:w.target.value?Math.max(0,Number(w.target.value)):0}),helperText:"Seconds, used when timestamp validation is required"}),s.jsx("div",{className:"md:col-span-2",children:s.jsx(Ft,{checked:x.requireTimestamp,label:"Require timestamp header",name:"webhookTriggers.requireTimestamp",onChange:w=>_({requireTimestamp:w})})})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-slate-400 mb-2",children:"Allowed Jobs"}),s.jsx("div",{className:"flex flex-wrap gap-2",children:_x.map(w=>s.jsx("button",{type:"button","aria-pressed":x.allowedJobIds.includes(w.value),onClick:()=>O(w.value),className:`px-3 py-1.5 rounded-md text-sm transition-colors ${x.allowedJobIds.includes(w.value)?"bg-indigo-600 text-white":"bg-slate-800 text-slate-400 hover:bg-slate-700"}`,children:w.label},w.value))})]}),s.jsxs("div",{className:"space-y-3",children:[s.jsxs("div",{className:"flex items-end gap-2",children:[s.jsx(we,{label:"Endpoint URL",readOnly:!0,value:C}),s.jsx(Ue,{"aria-label":"Copy endpoint URL",size:"icon",type:"button",variant:"outline",onClick:()=>Q(C,"endpoint"),children:s.jsx(qg,{className:"h-4 w-4"})})]}),s.jsxs("div",{children:[s.jsxs("div",{className:"flex items-center justify-between mb-2",children:[s.jsx("label",{className:"block text-sm font-medium text-slate-400",children:"Signed curl Example"}),s.jsxs(Ue,{size:"sm",type:"button",variant:"ghost",onClick:()=>Q(z,"curl"),children:[s.jsx(qg,{className:"h-4 w-4 mr-2"}),j==="curl"?"Copied":"Copy"]})]}),s.jsx("pre",{className:"overflow-x-auto rounded-lg border border-slate-800 bg-slate-950 p-3 text-xs text-slate-300",children:s.jsx("code",{children:z})})]})]}),s.jsxs("div",{className:"space-y-4 pt-6 border-t border-slate-800",children:[s.jsxs("div",{className:"flex items-center justify-between gap-4",children:[s.jsxs("div",{children:[s.jsx("h4",{className:"text-sm font-medium text-slate-300",children:"GitHub Events"}),s.jsx("p",{className:"text-xs text-slate-500 mt-1",children:"Rules dispatch the configured job when GitHub payloads match"})]}),s.jsx(Ft,{checked:x.github.enabled,label:"Enabled",name:"webhookTriggers.github.enabled",onChange:w=>N({enabled:w})})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-slate-400 mb-2",children:"Selected Events"}),s.jsx("div",{className:"flex flex-wrap gap-2",children:zx.map(w=>s.jsx("button",{type:"button","aria-pressed":x.github.events.includes(w.value),onClick:()=>k(w.value),className:`px-3 py-1.5 rounded-md text-sm transition-colors ${x.github.events.includes(w.value)?"bg-indigo-600 text-white":"bg-slate-800 text-slate-400 hover:bg-slate-700"}`,children:w.label},w.value))})]}),s.jsxs("div",{className:"space-y-3",children:[x.github.rules.map((w,K)=>s.jsxs("div",{className:"rounded-lg border border-slate-800 bg-slate-950/40 p-4 space-y-4",children:[s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[s.jsx(Je,{label:"Event",value:w.event,onChange:q=>P(K,{event:q}),options:zx}),s.jsx(we,{label:"Action",value:w.action??"",onChange:q=>P(K,{action:q.target.value||void 0}),placeholder:"completed"}),s.jsx(Je,{label:"Job",value:w.jobId,onChange:q=>P(K,{jobId:q}),options:_x})]}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-[1fr_auto_auto] gap-4 md:items-end",children:[s.jsx(we,{label:"Branch Patterns",value:nS(w.branchPatterns),onChange:q=>P(K,{branchPatterns:lS(q.target.value)}),placeholder:"main, release/*"}),s.jsx(Ft,{checked:w.onlyOnFailure??!1,label:"Only failures",onChange:q=>P(K,{onlyOnFailure:q})}),s.jsx(Ue,{"aria-label":`Delete GitHub rule ${K+1}`,size:"icon",type:"button",variant:"ghost",onClick:()=>D(K),children:s.jsx(Gs,{className:"h-4 w-4 text-red-400"})})]})]},K)),s.jsxs(Ue,{type:"button",variant:"ghost",onClick:()=>N({rules:[...x.github.rules,sS(S)]}),children:[s.jsx(Kl,{className:"h-4 w-4 mr-2"}),"Add GitHub Rule"]})]})]})]}),s.jsxs(rt,{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(eS,{notifications:n.notifications,onChange:w=>r("notifications",w),globalWebhook:u,onSetGlobal:h,onUnsetGlobal:f})]})]})};function oS(n,r,u,o){const{addToast:h}=Zt(),[f,b]=U.useState(!1),[j,y]=U.useState(null),[x,S]=U.useState(null),[C,z]=U.useState(null),_=U.useCallback(()=>({...tv,...n}),[n]),N=U.useCallback(q=>{const Z=_();return Object.entries(Z).map(([R,ae])=>({label:ae.name,value:R}))},[_]),O=U.useCallback(q=>{const Z=[];r===q&&Z.push("Global Provider");const R={executor:"Executor",reviewer:"Reviewer",qa:"QA",audit:"Audit",slicer:"Planner",analytics:"Analytics"};for(const[ae,M]of Object.entries(u))M===q&&Z.push(R[ae]??ae);return Z},[r,u]),k=U.useCallback(()=>{y(null),S(null),b(!0)},[]),P=U.useCallback(q=>{const R=_()[q];R&&(y(q),S(R),b(!0))},[_]),D=U.useCallback(async(q,Z)=>{const R=!j,ae={...n,[q]:Z};o("providerPresets",ae);try{await uu({providerPresets:{[q]:Z}}),h({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(M){h({title:"Save Failed",message:M instanceof Error?M.message:"Failed to save preset",type:"error"}),o("providerPresets",n)}},[j,n,o,h]),Q=U.useCallback(q=>{var ae,M;if(hu.includes(q)){h({title:"Cannot Delete",message:"Built-in presets cannot be deleted.",type:"error"});return}const Z=O(q);if(Z.length>0){z({presetId:q,presetName:((ae=_()[q])==null?void 0:ae.name)??q,references:Z});return}const R={...n};delete R[q],o("providerPresets",R),h({title:"Preset Deleted",message:`${((M=_()[q])==null?void 0:M.name)??q} has been removed.`,type:"success"})},[n,o,h,O,_]),w=U.useCallback(q=>{const Z={...n};delete Z[q],o("providerPresets",Z),h({title:"Preset Reset",message:`${q} has been reset to built-in defaults.`,type:"success"})},[n,o,h]),K=U.useCallback(()=>{if(!C)return;const{presetId:q}=C,Z={...n};delete Z[q],o("providerPresets",Z);const R={...u};for(const ae of Object.keys(R))R[ae]===q&&delete R[ae];o("jobProviders",R),r===q&&o("provider","claude"),z(null),h({title:"Preset Deleted",message:`${C.presetName} has been removed and all references cleared.`,type:"success"})},[C,n,u,r,o,h]);return{presetModalOpen:f,setPresetModalOpen:b,editingPresetId:j,editingPreset:x,deleteWarning:C,setDeleteWarning:z,getAllPresets:_,getPresetOptions:N,getPresetReferences:O,handleAddPreset:k,handleEditPreset:P,handleSavePreset:D,handleDeletePreset:Q,handleResetPreset:w,handleConfirmDelete:K}}const uS=["executor","reviewer","qa","audit","slicer","analytics","pr-resolver","merger","manager"],dS=["executor","reviewer","qa","audit","slicer","analytics","pr-resolver","merger","manager"],fS={enabled:!1,secretEnv:"NIGHT_WATCH_WEBHOOK_SECRET",allowedJobIds:dS,requireTimestamp:!1,maxSkewSeconds:300,github:{enabled:!1,events:[],rules:[]}},Lx=n=>{const r=n.primaryFallbackModel!==void 0?n.primaryFallbackModel??"":n.claudeModel??"",u=n.secondaryFallbackModel!==void 0?n.secondaryFallbackModel??"":n.primaryFallbackModel!==void 0?n.primaryFallbackModel??"":n.claudeModel??"";return{provider:n.provider,providerLabel:n.providerLabel??"",providerPresets:n.providerPresets??{},defaultBranch:n.defaultBranch,prdDir:n.prdDir||"docs/prds",branchPrefix:n.branchPrefix,branchPatterns:n.branchPatterns||[],gitPushNoVerify:n.gitPushNoVerify??!1,executorEnabled:n.executorEnabled??!0,reviewerEnabled:n.reviewerEnabled,minReviewScore:n.minReviewScore,maxRuntime:n.maxRuntime,reviewerMaxRuntime:n.reviewerMaxRuntime,maxLogSize:n.maxLogSize,cronSchedule:n.cronSchedule||Xp,reviewerSchedule:n.reviewerSchedule||Jp,scheduleBundleId:n.scheduleBundleId??null,cronScheduleOffset:n.cronScheduleOffset??0,schedulingPriority:n.schedulingPriority??3,maxRetries:n.maxRetries??3,reviewerMaxRetries:n.reviewerMaxRetries??2,reviewerRetryDelay:n.reviewerRetryDelay??30,reviewerMaxPrsPerRun:n.reviewerMaxPrsPerRun??0,providerEnv:n.providerEnv||{},notifications:n.notifications||{webhooks:[]},prdPriority:n.prdPriority||[],roadmapScanner:n.roadmapScanner||Pr(),templatesDir:n.templatesDir||".night-watch/templates",boardProvider:n.boardProvider||{enabled:!0,provider:"github"},jobProviders:n.jobProviders||{},fallbackOnRateLimit:n.fallbackOnRateLimit??!0,primaryFallbackModel:r,secondaryFallbackModel:u,primaryFallbackPreset:n.primaryFallbackPreset??"",secondaryFallbackPreset:n.secondaryFallbackPreset??"",claudeModel:r,providerScheduleOverrides:n.providerScheduleOverrides??[],qa:n.qa||Kp(),audit:{...ev(),...n.audit??{}},analytics:n.analytics||Nh(),feedback:n.feedback??{enabled:!0,confidenceThreshold:.75,augmentationTtlDays:14,maxActiveAugmentations:3,successStreakToExpire:3},prResolver:n.prResolver??gc(),merger:n.merger??bu(),manager:n.manager??xc(),queue:n.queue||{enabled:!0,mode:"conservative",maxConcurrency:1,maxWaitTime:7200,priority:{executor:50,reviewer:40,slicer:30,qa:20,audit:10},providerBuckets:{}},webhookTriggers:n.webhookTriggers??fS}},hS=()=>{const n=Dn(),r=gu(),{addToast:u,projectName:o,selectedProjectId:h,globalModeLoading:f,isGlobalMode:b,removeProjectFromList:j}=Zt(),[y,x]=_e.useState(!1),[S,C]=_e.useState(!1),[z,_]=_e.useState(!1),[N,O]=_e.useState(null),[k,P]=_e.useState(void 0),D=_e.useRef(null),[Q,w]=_e.useState(!1),K=_e.useRef(!1),q=_e.useRef(!1),[Z,R]=_e.useState("project"),ae=_e.useMemo(()=>{const xe=new URLSearchParams(n.search).get("tab");return xe==="jobs"||xe==="schedules"?xe:null},[n.search]),{data:M,loading:J,error:le,refetch:fe}=Ua(vh,[h],{enabled:!f}),{data:ve,loading:ue,refetch:G}=Ua(lN,[h],{enabled:!f}),ne=ve??[],he=(xe,Me)=>{O(Ze=>Ze&&{...Ze,[xe]:Me})},me=oS((N==null?void 0:N.providerPresets)??{},(N==null?void 0:N.provider)??"claude",(N==null?void 0:N.jobProviders)??{},he);_e.useEffect(()=>{hN().then(xe=>P(xe.webhook)).catch(()=>{})},[h]),_e.useEffect(()=>{ae&&r({pathname:"/scheduling",search:n.search},{replace:!0})},[ae,n.search,r]),_e.useEffect(()=>{if(ae)return;const Me=new URLSearchParams(n.search).get("tab");Me&&R({providers:"ai-providers",runtime:"ai-providers","ai-runtime":"ai-providers",notifications:"integrations",general:"project",advanced:"project"}[Me]??Me)},[ae,n.search]),_e.useEffect(()=>{if(M){if(K.current){K.current=!1;return}const xe=Lx(M);O(xe),D.current=xe,w(!1)}},[M]),_e.useEffect(()=>{if(!N||!D.current)return;const xe=JSON.stringify(N),Me=JSON.stringify(D.current);w(xe!==Me)},[N]),_e.useEffect(()=>{N&&q.current&&(q.current=!1,ze())},[N==null?void 0:N.jobProviders]);const ze=async()=>{var Ze,We,Dt,da,tn,an,fa,ha,yn,bn,Va;if(!N)return;const xe=N.cronSchedule!==(M==null?void 0:M.cronSchedule)||N.reviewerSchedule!==(M==null?void 0:M.reviewerSchedule)||N.cronScheduleOffset!==((M==null?void 0:M.cronScheduleOffset)??0)||N.schedulingPriority!==((M==null?void 0:M.schedulingPriority)??3)||N.executorEnabled!==((M==null?void 0:M.executorEnabled)??!0)||N.reviewerEnabled!==((M==null?void 0:M.reviewerEnabled)??!0)||N.queue.enabled!==(((Ze=M==null?void 0:M.queue)==null?void 0:Ze.enabled)??!0)||N.qa.enabled!==((M==null?void 0:M.qa.enabled)??!0)||N.qa.schedule!==(M==null?void 0:M.qa.schedule)||N.audit.enabled!==((M==null?void 0:M.audit.enabled)??!1)||N.audit.schedule!==(M==null?void 0:M.audit.schedule)||N.analytics.enabled!==(((We=M==null?void 0:M.analytics)==null?void 0:We.enabled)??!1)||N.analytics.schedule!==(((Dt=M==null?void 0:M.analytics)==null?void 0:Dt.schedule)??Nh().schedule)||N.prResolver.enabled!==(((da=M==null?void 0:M.prResolver)==null?void 0:da.enabled)??gc().enabled)||N.prResolver.schedule!==(((tn=M==null?void 0:M.prResolver)==null?void 0:tn.schedule)??gc().schedule)||N.merger.enabled!==(((an=M==null?void 0:M.merger)==null?void 0:an.enabled)??!1)||N.merger.schedule!==(((fa=M==null?void 0:M.merger)==null?void 0:fa.schedule)??bu().schedule)||N.manager.enabled!==(((ha=M==null?void 0:M.manager)==null?void 0:ha.enabled)??xc().enabled)||N.manager.schedule!==(((yn=M==null?void 0:M.manager)==null?void 0:yn.schedule)??xc().schedule)||N.roadmapScanner.enabled!==(((bn=M==null?void 0:M.roadmapScanner)==null?void 0:bn.enabled)??!0)||(N.roadmapScanner.slicerSchedule||Pr().slicerSchedule)!==(((Va=M==null?void 0:M.roadmapScanner)==null?void 0:Va.slicerSchedule)||Pr().slicerSchedule),Me={};for(const kt of uS){const ma=N.jobProviders[kt];typeof ma=="string"&&ma.trim().length>0?Me[kt]=ma:M!=null&&M.jobProviders[kt]&&(Me[kt]=null)}x(!0);try{const kt=N.primaryFallbackModel||null,ma=N.secondaryFallbackModel||null,kn=await uu({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:Me,fallbackOnRateLimit:N.fallbackOnRateLimit,primaryFallbackModel:kt,secondaryFallbackModel:ma,primaryFallbackPreset:N.primaryFallbackPreset||void 0,secondaryFallbackPreset:N.secondaryFallbackPreset||void 0,claudeModel:kt,providerScheduleOverrides:N.providerScheduleOverrides,qa:N.qa,audit:N.audit,analytics:N.analytics,feedback:N.feedback,prResolver:N.prResolver,merger:N.merger,manager:N.manager,queue:N.queue,webhookTriggers:N.webhookTriggers}),Ba=Lx(kn);O(Ba),D.current=Ba,w(!1);let ga="";if(xe)try{await uc()}catch(At){ga=At instanceof Error?At.message:"failed to reinstall cron schedules"}u(ga?{title:"Settings Saved (Cron Reinstall Failed)",message:ga,type:"warning"}:{title:"Settings Saved",message:xe?"Configuration updated and cron schedules reinstalled.":"Configuration updated successfully.",type:"success"}),K.current=!0,fe(),G()}catch(kt){u({title:"Save Failed",message:kt instanceof Error?kt.message:"Failed to save configuration",type:"error"})}finally{x(!1)}},H=()=>{D.current&&(O(D.current),w(!1),u({title:"Reset Complete",message:"Unsaved changes were discarded.",type:"info"}))},se=async xe=>{if(!(k!=null&&!window.confirm("Replace existing global channel?")))try{const Me=await Fg({webhook:xe});P(Me.webhook)}catch(Me){u({title:"Failed to set global channel",message:Me instanceof Error?Me.message:"Unknown error",type:"error"})}},ge=async()=>{try{await Fg({webhook:null}),P(null)}catch(xe){u({title:"Failed to unset global channel",message:xe instanceof Error?xe.message:"Unknown error",type:"error"})}},pe=async()=>{if(h){_(!0);try{await Jj(h),j(h),C(!1),u({title:"Project Removed",message:"Cron jobs uninstalled and all project data removed from the database.",type:"success"})}catch(xe){u({title:"Remove Failed",message:xe instanceof Error?xe.message:"Failed to remove project",type:"error"})}finally{_(!1)}}};if(ae)return s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx("div",{className:"text-slate-400",children:"Opening automation..."})});if(J||!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(le)return s.jsxs("div",{className:"flex flex-col items-center justify-center h-full space-y-4",children:[s.jsx(vn,{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:le.message}),s.jsx(Ue,{onClick:()=>fe(),children:"Retry"})]});const Te=[{id:"project",label:"Project",content:s.jsx(Iw,{form:N,updateField:he,projectName:o,doctorChecks:ne,doctorLoading:ue})},{id:"ai-providers",label:"AI Providers",content:s.jsx(Xw,{form:N,updateField:he,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(cS,{form:N,updateField:he,globalWebhook:k,isGlobalMode:b,onSetGlobal:se,onUnsetGlobal:ge,selectedProjectId:h})}];return s.jsxs("div",{className:"max-w-4xl mx-auto pb-32",children:[s.jsxs("div",{className:"flex items-center justify-between mb-6",children:[s.jsxs("div",{children:[s.jsx("h2",{className:"text-2xl font-bold text-slate-100",children:"Settings"}),s.jsx("p",{className:"text-sm text-slate-500 mt-1",children:"Configure project automation, providers, and integrations"})]}),Q&&s.jsxs(St,{variant:"warning",className:"animate-pulse",children:[s.jsx($s,{className:"h-3 w-3 mr-1"}),"Unsaved Changes"]})]}),s.jsx(wp,{tabs:Te,activeTab:Z,onChange:R}),Q&&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(vn,{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(Ue,{variant:"ghost",size:"sm",className:"text-slate-400 hover:text-slate-300",onClick:H,children:[s.jsx(mh,{className:"h-4 w-4 mr-2"}),"Discard"]}),s.jsxs(Ue,{size:"sm",className:"bg-indigo-600 hover:bg-indigo-500 shadow-lg shadow-indigo-500/20",onClick:ze,loading:y,children:[s.jsx(dp,{className:"h-4 w-4 mr-2"}),"Save Changes"]})]})]})}),b&&h&&s.jsxs("div",{className:"mt-10 rounded-lg border border-red-900/50 bg-red-950/20 p-6",children:[s.jsx("h3",{className:"text-lg font-medium text-red-400 mb-2",children:"Danger Zone"}),s.jsx("p",{className:"text-sm text-slate-400 mb-4",children:"Remove this project from Night Watch. This will uninstall cron jobs and delete all project data from the database. Files on disk will not be touched."}),s.jsxs(Ue,{variant:"secondary",className:"bg-red-600 hover:bg-red-700 text-white",onClick:()=>C(!0),children:[s.jsx(Gs,{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:()=>!z&&C(!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 ",o,"?"]})]}),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(Ue,{variant:"ghost",onClick:()=>C(!1),disabled:z,children:"Cancel"}),s.jsx(Ue,{variant:"secondary",className:"bg-red-600 hover:bg-red-700",onClick:pe,loading:z,children:"Remove"})]})]})]}),s.jsx(Ww,{isOpen:me.presetModalOpen,onClose:()=>{me.setPresetModalOpen(!1)},onSave:me.handleSavePreset,presetId:me.editingPresetId,preset:me.editingPreset,isBuiltIn:me.editingPresetId?hu.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(Ue,{variant:"ghost",onClick:()=>me.setDeleteWarning(null),children:"Cancel"}),s.jsx(Ue,{variant:"secondary",onClick:me.handleConfirmDelete,className:"bg-red-600 hover:bg-red-700",children:"Force Delete"})]})]})]})]})},mS=()=>(EN(),TN(),s.jsx(e1,{children:s.jsxs("div",{className:"flex h-screen bg-[#030712] text-slate-300 overflow-hidden relative",children:[s.jsx("div",{className:"absolute top-0 left-0 w-full h-96 bg-indigo-900/10 rounded-full blur-[120px] -translate-y-1/2 pointer-events-none z-0"}),s.jsx(jN,{}),s.jsxs("div",{className:"flex-1 flex flex-col min-w-0 z-10",children:[s.jsx(NN,{}),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(Rb,{children:[s.jsx(il,{path:"/",element:s.jsx(PN,{})}),s.jsx(il,{path:"/prs",element:s.jsx(YN,{})}),s.jsx(il,{path:"/board",element:s.jsx(DN,{})}),s.jsx(il,{path:"/scheduling",element:s.jsx(Pw,{})}),s.jsx(il,{path:"/logs",element:s.jsx($N,{})}),s.jsx(il,{path:"/roadmap",element:s.jsx(GN,{})}),s.jsx(il,{path:"/settings",element:s.jsx(hS,{})}),s.jsx(il,{path:"*",element:s.jsx(Mb,{to:"/",replace:!0})})]})})})]}),s.jsx(SN,{})]})})),nv=document.getElementById("root");if(!nv)throw new Error("Could not find root element to mount to");const gS=ky.createRoot(nv);gS.render(s.jsx(_e.StrictMode,{children:s.jsx(mS,{})}));
|