@jonit-dev/night-watch-cli 1.8.4-beta.1 → 1.8.4-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -0,0 +1,381 @@
|
|
|
1
|
+
var Up=Object.defineProperty;var P0=l=>{throw TypeError(l)};var Hp=(l,i,o)=>i in l?Up(l,i,{enumerable:!0,configurable:!0,writable:!0,value:o}):l[i]=o;var Q0=(l,i,o)=>Hp(l,typeof i!="symbol"?i+"":i,o),rf=(l,i,o)=>i.has(l)||P0("Cannot "+o);var ee=(l,i,o)=>(rf(l,i,"read from private field"),o?o.call(l):i.get(l)),nt=(l,i,o)=>i.has(l)?P0("Cannot add the same private member more than once"):i instanceof WeakSet?i.add(l):i.set(l,o),Ne=(l,i,o,c)=>(rf(l,i,"write to private field"),c?c.call(l,o):i.set(l,o),o),Se=(l,i,o)=>(rf(l,i,"access private method"),o);(function(){const i=document.createElement("link").relList;if(i&&i.supports&&i.supports("modulepreload"))return;for(const m of document.querySelectorAll('link[rel="modulepreload"]'))c(m);new MutationObserver(m=>{for(const f of m)if(f.type==="childList")for(const v of f.addedNodes)v.tagName==="LINK"&&v.rel==="modulepreload"&&c(v)}).observe(document,{childList:!0,subtree:!0});function o(m){const f={};return m.integrity&&(f.integrity=m.integrity),m.referrerPolicy&&(f.referrerPolicy=m.referrerPolicy),m.crossOrigin==="use-credentials"?f.credentials="include":m.crossOrigin==="anonymous"?f.credentials="omit":f.credentials="same-origin",f}function c(m){if(m.ep)return;m.ep=!0;const f=o(m);fetch(m.href,f)}})();function _f(l){return l&&l.__esModule&&Object.prototype.hasOwnProperty.call(l,"default")?l.default:l}function Lp(l){if(Object.prototype.hasOwnProperty.call(l,"__esModule"))return l;var i=l.default;if(typeof i=="function"){var o=function c(){return this instanceof c?Reflect.construct(i,arguments,this.constructor):i.apply(this,arguments)};o.prototype=i.prototype}else o={};return Object.defineProperty(o,"__esModule",{value:!0}),Object.keys(l).forEach(function(c){var m=Object.getOwnPropertyDescriptor(l,c);Object.defineProperty(o,c,m.get?m:{enumerable:!0,get:function(){return l[c]}})}),o}var uf={exports:{}},Li={};/**
|
|
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 W0;function qp(){if(W0)return Li;W0=1;var l=Symbol.for("react.transitional.element"),i=Symbol.for("react.fragment");function o(c,m,f){var v=null;if(f!==void 0&&(v=""+f),m.key!==void 0&&(v=""+m.key),"key"in m){f={};for(var w in m)w!=="key"&&(f[w]=m[w])}else f=m;return m=f.ref,{$$typeof:l,type:c,key:v,ref:m!==void 0?m:null,props:f}}return Li.Fragment=i,Li.jsx=o,Li.jsxs=o,Li}var I0;function Vp(){return I0||(I0=1,uf.exports=qp()),uf.exports}var s=Vp(),cf={exports:{}},Ue={};/**
|
|
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 X0;function Bp(){if(X0)return Ue;X0=1;var l=Symbol.for("react.transitional.element"),i=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),c=Symbol.for("react.strict_mode"),m=Symbol.for("react.profiler"),f=Symbol.for("react.consumer"),v=Symbol.for("react.context"),w=Symbol.for("react.forward_ref"),b=Symbol.for("react.suspense"),y=Symbol.for("react.memo"),S=Symbol.for("react.lazy"),j=Symbol.for("react.activity"),T=Symbol.iterator;function O(R){return R===null||typeof R!="object"?null:(R=T&&R[T]||R["@@iterator"],typeof R=="function"?R:null)}var _={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},M=Object.assign,B={};function se(R,le,me){this.props=R,this.context=le,this.refs=B,this.updater=me||_}se.prototype.isReactComponent={},se.prototype.setState=function(R,le){if(typeof R!="object"&&typeof R!="function"&&R!=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,R,le,"setState")},se.prototype.forceUpdate=function(R){this.updater.enqueueForceUpdate(this,R,"forceUpdate")};function Y(){}Y.prototype=se.prototype;function W(R,le,me){this.props=R,this.context=le,this.refs=B,this.updater=me||_}var K=W.prototype=new Y;K.constructor=W,M(K,se.prototype),K.isPureReactComponent=!0;var ae=Array.isArray;function Z(){}var G={H:null,A:null,T:null,S:null},Q=Object.prototype.hasOwnProperty;function D(R,le,me){var xe=me.ref;return{$$typeof:l,type:R,key:le,ref:xe!==void 0?xe:null,props:me}}function z(R,le){return D(R.type,le,R.props)}function ne(R){return typeof R=="object"&&R!==null&&R.$$typeof===l}function k(R){var le={"=":"=0",":":"=2"};return"$"+R.replace(/[=:]/g,function(me){return le[me]})}var ue=/\/+/g;function ge(R,le){return typeof R=="object"&&R!==null&&R.key!=null?k(""+R.key):le.toString(36)}function he(R){switch(R.status){case"fulfilled":return R.value;case"rejected":throw R.reason;default:switch(typeof R.status=="string"?R.then(Z,Z):(R.status="pending",R.then(function(le){R.status==="pending"&&(R.status="fulfilled",R.value=le)},function(le){R.status==="pending"&&(R.status="rejected",R.reason=le)})),R.status){case"fulfilled":return R.value;case"rejected":throw R.reason}}throw R}function $(R,le,me,xe,je){var Te=typeof R;(Te==="undefined"||Te==="boolean")&&(R=null);var Le=!1;if(R===null)Le=!0;else switch(Te){case"bigint":case"string":case"number":Le=!0;break;case"object":switch(R.$$typeof){case l:case i:Le=!0;break;case S:return Le=R._init,$(Le(R._payload),le,me,xe,je)}}if(Le)return je=je(R),Le=xe===""?"."+ge(R,0):xe,ae(je)?(me="",Le!=null&&(me=Le.replace(ue,"$&/")+"/"),$(je,le,me,"",function(ta){return ta})):je!=null&&(ne(je)&&(je=z(je,me+(je.key==null||R&&R.key===je.key?"":(""+je.key).replace(ue,"$&/")+"/")+Le)),le.push(je)),1;Le=0;var rt=xe===""?".":xe+":";if(ae(R))for(var Ie=0;Ie<R.length;Ie++)xe=R[Ie],Te=rt+ge(xe,Ie),Le+=$(xe,le,me,Te,je);else if(Ie=O(R),typeof Ie=="function")for(R=Ie.call(R),Ie=0;!(xe=R.next()).done;)xe=xe.value,Te=rt+ge(xe,Ie++),Le+=$(xe,le,me,Te,je);else if(Te==="object"){if(typeof R.then=="function")return $(he(R),le,me,xe,je);throw le=String(R),Error("Objects are not valid as a React child (found: "+(le==="[object Object]"?"object with keys {"+Object.keys(R).join(", ")+"}":le)+"). If you meant to render a collection of children, use an array instead.")}return Le}function ie(R,le,me){if(R==null)return R;var xe=[],je=0;return $(R,xe,"","",function(Te){return le.call(me,Te,je++)}),xe}function ye(R){if(R._status===-1){var le=R._result;le=le(),le.then(function(me){(R._status===0||R._status===-1)&&(R._status=1,R._result=me)},function(me){(R._status===0||R._status===-1)&&(R._status=2,R._result=me)}),R._status===-1&&(R._status=0,R._result=le)}if(R._status===1)return R._result.default;throw R._result}var Ee=typeof reportError=="function"?reportError:function(R){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var le=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof R=="object"&&R!==null&&typeof R.message=="string"?String(R.message):String(R),error:R});if(!window.dispatchEvent(le))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",R);return}console.error(R)},Oe={map:ie,forEach:function(R,le,me){ie(R,function(){le.apply(this,arguments)},me)},count:function(R){var le=0;return ie(R,function(){le++}),le},toArray:function(R){return ie(R,function(le){return le})||[]},only:function(R){if(!ne(R))throw Error("React.Children.only expected to receive a single React element child.");return R}};return Ue.Activity=j,Ue.Children=Oe,Ue.Component=se,Ue.Fragment=o,Ue.Profiler=m,Ue.PureComponent=W,Ue.StrictMode=c,Ue.Suspense=b,Ue.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=G,Ue.__COMPILER_RUNTIME={__proto__:null,c:function(R){return G.H.useMemoCache(R)}},Ue.cache=function(R){return function(){return R.apply(null,arguments)}},Ue.cacheSignal=function(){return null},Ue.cloneElement=function(R,le,me){if(R==null)throw Error("The argument must be a React element, but you passed "+R+".");var xe=M({},R.props),je=R.key;if(le!=null)for(Te in le.key!==void 0&&(je=""+le.key),le)!Q.call(le,Te)||Te==="key"||Te==="__self"||Te==="__source"||Te==="ref"&&le.ref===void 0||(xe[Te]=le[Te]);var Te=arguments.length-2;if(Te===1)xe.children=me;else if(1<Te){for(var Le=Array(Te),rt=0;rt<Te;rt++)Le[rt]=arguments[rt+2];xe.children=Le}return D(R.type,je,xe)},Ue.createContext=function(R){return R={$$typeof:v,_currentValue:R,_currentValue2:R,_threadCount:0,Provider:null,Consumer:null},R.Provider=R,R.Consumer={$$typeof:f,_context:R},R},Ue.createElement=function(R,le,me){var xe,je={},Te=null;if(le!=null)for(xe in le.key!==void 0&&(Te=""+le.key),le)Q.call(le,xe)&&xe!=="key"&&xe!=="__self"&&xe!=="__source"&&(je[xe]=le[xe]);var Le=arguments.length-2;if(Le===1)je.children=me;else if(1<Le){for(var rt=Array(Le),Ie=0;Ie<Le;Ie++)rt[Ie]=arguments[Ie+2];je.children=rt}if(R&&R.defaultProps)for(xe in Le=R.defaultProps,Le)je[xe]===void 0&&(je[xe]=Le[xe]);return D(R,Te,je)},Ue.createRef=function(){return{current:null}},Ue.forwardRef=function(R){return{$$typeof:w,render:R}},Ue.isValidElement=ne,Ue.lazy=function(R){return{$$typeof:S,_payload:{_status:-1,_result:R},_init:ye}},Ue.memo=function(R,le){return{$$typeof:y,type:R,compare:le===void 0?null:le}},Ue.startTransition=function(R){var le=G.T,me={};G.T=me;try{var xe=R(),je=G.S;je!==null&&je(me,xe),typeof xe=="object"&&xe!==null&&typeof xe.then=="function"&&xe.then(Z,Ee)}catch(Te){Ee(Te)}finally{le!==null&&me.types!==null&&(le.types=me.types),G.T=le}},Ue.unstable_useCacheRefresh=function(){return G.H.useCacheRefresh()},Ue.use=function(R){return G.H.use(R)},Ue.useActionState=function(R,le,me){return G.H.useActionState(R,le,me)},Ue.useCallback=function(R,le){return G.H.useCallback(R,le)},Ue.useContext=function(R){return G.H.useContext(R)},Ue.useDebugValue=function(){},Ue.useDeferredValue=function(R,le){return G.H.useDeferredValue(R,le)},Ue.useEffect=function(R,le){return G.H.useEffect(R,le)},Ue.useEffectEvent=function(R){return G.H.useEffectEvent(R)},Ue.useId=function(){return G.H.useId()},Ue.useImperativeHandle=function(R,le,me){return G.H.useImperativeHandle(R,le,me)},Ue.useInsertionEffect=function(R,le){return G.H.useInsertionEffect(R,le)},Ue.useLayoutEffect=function(R,le){return G.H.useLayoutEffect(R,le)},Ue.useMemo=function(R,le){return G.H.useMemo(R,le)},Ue.useOptimistic=function(R,le){return G.H.useOptimistic(R,le)},Ue.useReducer=function(R,le,me){return G.H.useReducer(R,le,me)},Ue.useRef=function(R){return G.H.useRef(R)},Ue.useState=function(R){return G.H.useState(R)},Ue.useSyncExternalStore=function(R,le,me){return G.H.useSyncExternalStore(R,le,me)},Ue.useTransition=function(){return G.H.useTransition()},Ue.version="19.2.4",Ue}var J0;function kf(){return J0||(J0=1,cf.exports=Bp()),cf.exports}var U=kf();const ze=_f(U);var of={exports:{}},qi={},df={exports:{}},ff={};/**
|
|
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 K0;function Yp(){return K0||(K0=1,(function(l){function i($,ie){var ye=$.length;$.push(ie);e:for(;0<ye;){var Ee=ye-1>>>1,Oe=$[Ee];if(0<m(Oe,ie))$[Ee]=ie,$[ye]=Oe,ye=Ee;else break e}}function o($){return $.length===0?null:$[0]}function c($){if($.length===0)return null;var ie=$[0],ye=$.pop();if(ye!==ie){$[0]=ye;e:for(var Ee=0,Oe=$.length,R=Oe>>>1;Ee<R;){var le=2*(Ee+1)-1,me=$[le],xe=le+1,je=$[xe];if(0>m(me,ye))xe<Oe&&0>m(je,me)?($[Ee]=je,$[xe]=ye,Ee=xe):($[Ee]=me,$[le]=ye,Ee=le);else if(xe<Oe&&0>m(je,ye))$[Ee]=je,$[xe]=ye,Ee=xe;else break e}}return ie}function m($,ie){var ye=$.sortIndex-ie.sortIndex;return ye!==0?ye:$.id-ie.id}if(l.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var f=performance;l.unstable_now=function(){return f.now()}}else{var v=Date,w=v.now();l.unstable_now=function(){return v.now()-w}}var b=[],y=[],S=1,j=null,T=3,O=!1,_=!1,M=!1,B=!1,se=typeof setTimeout=="function"?setTimeout:null,Y=typeof clearTimeout=="function"?clearTimeout:null,W=typeof setImmediate<"u"?setImmediate:null;function K($){for(var ie=o(y);ie!==null;){if(ie.callback===null)c(y);else if(ie.startTime<=$)c(y),ie.sortIndex=ie.expirationTime,i(b,ie);else break;ie=o(y)}}function ae($){if(M=!1,K($),!_)if(o(b)!==null)_=!0,Z||(Z=!0,k());else{var ie=o(y);ie!==null&&he(ae,ie.startTime-$)}}var Z=!1,G=-1,Q=5,D=-1;function z(){return B?!0:!(l.unstable_now()-D<Q)}function ne(){if(B=!1,Z){var $=l.unstable_now();D=$;var ie=!0;try{e:{_=!1,M&&(M=!1,Y(G),G=-1),O=!0;var ye=T;try{t:{for(K($),j=o(b);j!==null&&!(j.expirationTime>$&&z());){var Ee=j.callback;if(typeof Ee=="function"){j.callback=null,T=j.priorityLevel;var Oe=Ee(j.expirationTime<=$);if($=l.unstable_now(),typeof Oe=="function"){j.callback=Oe,K($),ie=!0;break t}j===o(b)&&c(b),K($)}else c(b);j=o(b)}if(j!==null)ie=!0;else{var R=o(y);R!==null&&he(ae,R.startTime-$),ie=!1}}break e}finally{j=null,T=ye,O=!1}ie=void 0}}finally{ie?k():Z=!1}}}var k;if(typeof W=="function")k=function(){W(ne)};else if(typeof MessageChannel<"u"){var ue=new MessageChannel,ge=ue.port2;ue.port1.onmessage=ne,k=function(){ge.postMessage(null)}}else k=function(){se(ne,0)};function he($,ie){G=se(function(){$(l.unstable_now())},ie)}l.unstable_IdlePriority=5,l.unstable_ImmediatePriority=1,l.unstable_LowPriority=4,l.unstable_NormalPriority=3,l.unstable_Profiling=null,l.unstable_UserBlockingPriority=2,l.unstable_cancelCallback=function($){$.callback=null},l.unstable_forceFrameRate=function($){0>$||125<$?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):Q=0<$?Math.floor(1e3/$):5},l.unstable_getCurrentPriorityLevel=function(){return T},l.unstable_next=function($){switch(T){case 1:case 2:case 3:var ie=3;break;default:ie=T}var ye=T;T=ie;try{return $()}finally{T=ye}},l.unstable_requestPaint=function(){B=!0},l.unstable_runWithPriority=function($,ie){switch($){case 1:case 2:case 3:case 4:case 5:break;default:$=3}var ye=T;T=$;try{return ie()}finally{T=ye}},l.unstable_scheduleCallback=function($,ie,ye){var Ee=l.unstable_now();switch(typeof ye=="object"&&ye!==null?(ye=ye.delay,ye=typeof ye=="number"&&0<ye?Ee+ye:Ee):ye=Ee,$){case 1:var Oe=-1;break;case 2:Oe=250;break;case 5:Oe=1073741823;break;case 4:Oe=1e4;break;default:Oe=5e3}return Oe=ye+Oe,$={id:S++,callback:ie,priorityLevel:$,startTime:ye,expirationTime:Oe,sortIndex:-1},ye>Ee?($.sortIndex=ye,i(y,$),o(b)===null&&$===o(y)&&(M?(Y(G),G=-1):M=!0,he(ae,ye-Ee))):($.sortIndex=Oe,i(b,$),_||O||(_=!0,Z||(Z=!0,k()))),$},l.unstable_shouldYield=z,l.unstable_wrapCallback=function($){var ie=T;return function(){var ye=T;T=ie;try{return $.apply(this,arguments)}finally{T=ye}}}})(ff)),ff}var eg;function $p(){return eg||(eg=1,df.exports=Yp()),df.exports}var hf={exports:{}},ua={};/**
|
|
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 tg;function Fp(){if(tg)return ua;tg=1;var l=kf();function i(b){var y="https://react.dev/errors/"+b;if(1<arguments.length){y+="?args[]="+encodeURIComponent(arguments[1]);for(var S=2;S<arguments.length;S++)y+="&args[]="+encodeURIComponent(arguments[S])}return"Minified React error #"+b+"; visit "+y+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function o(){}var c={d:{f:o,r:function(){throw Error(i(522))},D:o,C:o,L:o,m:o,X:o,S:o,M:o},p:0,findDOMNode:null},m=Symbol.for("react.portal");function f(b,y,S){var j=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:m,key:j==null?null:""+j,children:b,containerInfo:y,implementation:S}}var v=l.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function w(b,y){if(b==="font")return"";if(typeof y=="string")return y==="use-credentials"?y:""}return ua.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=c,ua.createPortal=function(b,y){var S=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!y||y.nodeType!==1&&y.nodeType!==9&&y.nodeType!==11)throw Error(i(299));return f(b,y,null,S)},ua.flushSync=function(b){var y=v.T,S=c.p;try{if(v.T=null,c.p=2,b)return b()}finally{v.T=y,c.p=S,c.d.f()}},ua.preconnect=function(b,y){typeof b=="string"&&(y?(y=y.crossOrigin,y=typeof y=="string"?y==="use-credentials"?y:"":void 0):y=null,c.d.C(b,y))},ua.prefetchDNS=function(b){typeof b=="string"&&c.d.D(b)},ua.preinit=function(b,y){if(typeof b=="string"&&y&&typeof y.as=="string"){var S=y.as,j=w(S,y.crossOrigin),T=typeof y.integrity=="string"?y.integrity:void 0,O=typeof y.fetchPriority=="string"?y.fetchPriority:void 0;S==="style"?c.d.S(b,typeof y.precedence=="string"?y.precedence:void 0,{crossOrigin:j,integrity:T,fetchPriority:O}):S==="script"&&c.d.X(b,{crossOrigin:j,integrity:T,fetchPriority:O,nonce:typeof y.nonce=="string"?y.nonce:void 0})}},ua.preinitModule=function(b,y){if(typeof b=="string")if(typeof y=="object"&&y!==null){if(y.as==null||y.as==="script"){var S=w(y.as,y.crossOrigin);c.d.M(b,{crossOrigin:S,integrity:typeof y.integrity=="string"?y.integrity:void 0,nonce:typeof y.nonce=="string"?y.nonce:void 0})}}else y==null&&c.d.M(b)},ua.preload=function(b,y){if(typeof b=="string"&&typeof y=="object"&&y!==null&&typeof y.as=="string"){var S=y.as,j=w(S,y.crossOrigin);c.d.L(b,S,{crossOrigin:j,integrity:typeof y.integrity=="string"?y.integrity:void 0,nonce:typeof y.nonce=="string"?y.nonce:void 0,type:typeof y.type=="string"?y.type:void 0,fetchPriority:typeof y.fetchPriority=="string"?y.fetchPriority:void 0,referrerPolicy:typeof y.referrerPolicy=="string"?y.referrerPolicy:void 0,imageSrcSet:typeof y.imageSrcSet=="string"?y.imageSrcSet:void 0,imageSizes:typeof y.imageSizes=="string"?y.imageSizes:void 0,media:typeof y.media=="string"?y.media:void 0})}},ua.preloadModule=function(b,y){if(typeof b=="string")if(y){var S=w(y.as,y.crossOrigin);c.d.m(b,{as:typeof y.as=="string"&&y.as!=="script"?y.as:void 0,crossOrigin:S,integrity:typeof y.integrity=="string"?y.integrity:void 0})}else c.d.m(b)},ua.requestFormReset=function(b){c.d.r(b)},ua.unstable_batchedUpdates=function(b,y){return b(y)},ua.useFormState=function(b,y,S){return v.H.useFormState(b,y,S)},ua.useFormStatus=function(){return v.H.useHostTransitionStatus()},ua.version="19.2.4",ua}var ag;function ty(){if(ag)return hf.exports;ag=1;function l(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(l)}catch(i){console.error(i)}}return l(),hf.exports=Fp(),hf.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 ng;function Gp(){if(ng)return qi;ng=1;var l=$p(),i=kf(),o=ty();function c(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var a=2;a<arguments.length;a++)t+="&args[]="+encodeURIComponent(arguments[a])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function m(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 v(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 w(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 b(e){if(f(e)!==e)throw Error(c(188))}function y(e){var t=e.alternate;if(!t){if(t=f(e),t===null)throw Error(c(188));return t!==e?null:e}for(var a=e,n=t;;){var u=a.return;if(u===null)break;var d=u.alternate;if(d===null){if(n=u.return,n!==null){a=n;continue}break}if(u.child===d.child){for(d=u.child;d;){if(d===a)return b(u),e;if(d===n)return b(u),t;d=d.sibling}throw Error(c(188))}if(a.return!==n.return)a=u,n=d;else{for(var x=!1,E=u.child;E;){if(E===a){x=!0,a=u,n=d;break}if(E===n){x=!0,n=u,a=d;break}E=E.sibling}if(!x){for(E=d.child;E;){if(E===a){x=!0,a=d,n=u;break}if(E===n){x=!0,n=d,a=u;break}E=E.sibling}if(!x)throw Error(c(189))}}if(a.alternate!==n)throw Error(c(190))}if(a.tag!==3)throw Error(c(188));return a.stateNode.current===a?e:t}function S(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=S(e),t!==null)return t;e=e.sibling}return null}var j=Object.assign,T=Symbol.for("react.element"),O=Symbol.for("react.transitional.element"),_=Symbol.for("react.portal"),M=Symbol.for("react.fragment"),B=Symbol.for("react.strict_mode"),se=Symbol.for("react.profiler"),Y=Symbol.for("react.consumer"),W=Symbol.for("react.context"),K=Symbol.for("react.forward_ref"),ae=Symbol.for("react.suspense"),Z=Symbol.for("react.suspense_list"),G=Symbol.for("react.memo"),Q=Symbol.for("react.lazy"),D=Symbol.for("react.activity"),z=Symbol.for("react.memo_cache_sentinel"),ne=Symbol.iterator;function k(e){return e===null||typeof e!="object"?null:(e=ne&&e[ne]||e["@@iterator"],typeof e=="function"?e:null)}var ue=Symbol.for("react.client.reference");function ge(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===ue?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case M:return"Fragment";case se:return"Profiler";case B:return"StrictMode";case ae:return"Suspense";case Z:return"SuspenseList";case D:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case _:return"Portal";case W:return e.displayName||"Context";case Y:return(e._context.displayName||"Context")+".Consumer";case K:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case G:return t=e.displayName||null,t!==null?t:ge(e.type)||"Memo";case Q:t=e._payload,e=e._init;try{return ge(e(t))}catch{}}return null}var he=Array.isArray,$=i.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ie=o.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ye={pending:!1,data:null,method:null,action:null},Ee=[],Oe=-1;function R(e){return{current:e}}function le(e){0>Oe||(e.current=Ee[Oe],Ee[Oe]=null,Oe--)}function me(e,t){Oe++,Ee[Oe]=e.current,e.current=t}var xe=R(null),je=R(null),Te=R(null),Le=R(null);function rt(e,t){switch(me(Te,t),me(je,e),me(xe,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?y0(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=y0(t),e=x0(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}le(xe),me(xe,e)}function Ie(){le(xe),le(je),le(Te)}function ta(e){e.memoizedState!==null&&me(Le,e);var t=xe.current,a=x0(t,e.type);t!==a&&(me(je,e),me(xe,a))}function ja(e){je.current===e&&(le(xe),le(je)),Le.current===e&&(le(Le),ki._currentValue=ye)}var fn,Ia;function P(e){if(fn===void 0)try{throw Error()}catch(a){var t=a.stack.trim().match(/\n( *(at )?)/);fn=t&&t[1]||"",Ia=-1<a.stack.indexOf(`
|
|
42
|
+
at`)?" (<anonymous>)":-1<a.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
43
|
+
`+fn+e+Ia}var fe=!1;function Ae(e,t){if(!e||fe)return"";fe=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var n={DetermineComponentFrameRoot:function(){try{if(t){var oe=function(){throw Error()};if(Object.defineProperty(oe.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(oe,[])}catch(te){var J=te}Reflect.construct(e,[],oe)}else{try{oe.call()}catch(te){J=te}e.call(oe.prototype)}}else{try{throw Error()}catch(te){J=te}(oe=e())&&typeof oe.catch=="function"&&oe.catch(function(){})}}catch(te){if(te&&J&&typeof te.stack=="string")return[te.stack,J.stack]}return[null,null]}};n.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var u=Object.getOwnPropertyDescriptor(n.DetermineComponentFrameRoot,"name");u&&u.configurable&&Object.defineProperty(n.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var d=n.DetermineComponentFrameRoot(),x=d[0],E=d[1];if(x&&E){var A=x.split(`
|
|
44
|
+
`),X=E.split(`
|
|
45
|
+
`);for(u=n=0;n<A.length&&!A[n].includes("DetermineComponentFrameRoot");)n++;for(;u<X.length&&!X[u].includes("DetermineComponentFrameRoot");)u++;if(n===A.length||u===X.length)for(n=A.length-1,u=X.length-1;1<=n&&0<=u&&A[n]!==X[u];)u--;for(;1<=n&&0<=u;n--,u--)if(A[n]!==X[u]){if(n!==1||u!==1)do if(n--,u--,0>u||A[n]!==X[u]){var re=`
|
|
46
|
+
`+A[n].replace(" at new "," at ");return e.displayName&&re.includes("<anonymous>")&&(re=re.replace("<anonymous>",e.displayName)),re}while(1<=n&&0<=u);break}}}finally{fe=!1,Error.prepareStackTrace=a}return(a=e?e.displayName||e.name:"")?P(a):""}function Be(e,t){switch(e.tag){case 26:case 27:case 5:return P(e.type);case 16:return P("Lazy");case 13:return e.child!==t&&t!==null?P("Suspense Fallback"):P("Suspense");case 19:return P("SuspenseList");case 0:case 15:return Ae(e.type,!1);case 11:return Ae(e.type.render,!1);case 1:return Ae(e.type,!0);case 31:return P("Activity");default:return""}}function lt(e){try{var t="",a=null;do t+=Be(e,a),a=e,e=e.return;while(e);return t}catch(n){return`
|
|
47
|
+
Error generating stack: `+n.message+`
|
|
48
|
+
`+n.stack}}var ht=Object.prototype.hasOwnProperty,_t=l.unstable_scheduleCallback,gt=l.unstable_cancelCallback,aa=l.unstable_shouldYield,Ua=l.unstable_requestPaint,Tt=l.unstable_now,En=l.unstable_getCurrentPriorityLevel,Bl=l.unstable_ImmediatePriority,Yl=l.unstable_UserBlockingPriority,_s=l.unstable_NormalPriority,eo=l.unstable_LowPriority,zr=l.unstable_IdlePriority,Xe=l.log,Ur=l.unstable_setDisableYieldValue,Nt=null,na=null;function Zt(e){if(typeof Xe=="function"&&Ur(e),na&&typeof na.setStrictMode=="function")try{na.setStrictMode(Nt,e)}catch{}}var Pt=Math.clz32?Math.clz32:ao,iu=Math.log,to=Math.LN2;function ao(e){return e>>>=0,e===0?32:31-(iu(e)/to|0)|0}var el=256,ks=262144,la=4194304;function hn(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 $l(e,t,a){var n=e.pendingLanes;if(n===0)return 0;var u=0,d=e.suspendedLanes,x=e.pingedLanes;e=e.warmLanes;var E=n&134217727;return E!==0?(n=E&~d,n!==0?u=hn(n):(x&=E,x!==0?u=hn(x):a||(a=E&~e,a!==0&&(u=hn(a))))):(E=n&~d,E!==0?u=hn(E):x!==0?u=hn(x):a||(a=n&~e,a!==0&&(u=hn(a)))),u===0?0:t!==0&&t!==u&&(t&d)===0&&(d=u&-u,a=t&-t,d>=a||d===32&&(a&4194048)!==0)?t:u}function tl(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function uu(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 Hr(){var e=la;return la<<=1,(la&62914560)===0&&(la=4194304),e}function zs(e){for(var t=[],a=0;31>a;a++)t.push(e);return t}function al(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function cu(e,t,a,n,u,d){var x=e.pendingLanes;e.pendingLanes=a,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=a,e.entangledLanes&=a,e.errorRecoveryDisabledLanes&=a,e.shellSuspendCounter=0;var E=e.entanglements,A=e.expirationTimes,X=e.hiddenUpdates;for(a=x&~a;0<a;){var re=31-Pt(a),oe=1<<re;E[re]=0,A[re]=-1;var J=X[re];if(J!==null)for(X[re]=null,re=0;re<J.length;re++){var te=J[re];te!==null&&(te.lane&=-536870913)}a&=~oe}n!==0&&yt(e,n,0),d!==0&&u===0&&e.tag!==0&&(e.suspendedLanes|=d&~(x&~t))}function yt(e,t,a){e.pendingLanes|=t,e.suspendedLanes&=~t;var n=31-Pt(t);e.entangledLanes|=t,e.entanglements[n]=e.entanglements[n]|1073741824|a&261930}function fa(e,t){var a=e.entangledLanes|=t;for(e=e.entanglements;a;){var n=31-Pt(a),u=1<<n;u&t|e[n]&t&&(e[n]|=t),a&=~u}}function Lr(e,t){var a=t&-t;return a=(a&42)!==0?1:Us(a),(a&(e.suspendedLanes|t))!==0?0:a}function Us(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 Hs(){var e=ie.p;return e!==0?e:(e=window.event,e===void 0?32:V0(e.type))}function qr(e,t){var a=ie.p;try{return ie.p=e,t()}finally{ie.p=a}}var Xa=Math.random().toString(36).slice(2),Mt="__reactFiber$"+Xa,qt="__reactProps$"+Xa,Tn="__reactContainer$"+Xa,Fl="__reactEvents$"+Xa,ou="__reactListeners$"+Xa,du="__reactHandles$"+Xa,fu="__reactResources$"+Xa,Gl="__reactMarker$"+Xa;function Ls(e){delete e[Mt],delete e[qt],delete e[Fl],delete e[ou],delete e[du]}function Mn(e){var t=e[Mt];if(t)return t;for(var a=e.parentNode;a;){if(t=a[Tn]||a[Mt]){if(a=t.alternate,t.child!==null||a!==null&&a.child!==null)for(e=j0(e);e!==null;){if(a=e[Mt])return a;e=j0(e)}return t}e=a,a=e.parentNode}return null}function Ce(e){if(e=e[Mt]||e[Tn]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function ha(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(c(33))}function Ja(e){var t=e[fu];return t||(t=e[fu]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function kt(e){e[Gl]=!0}var hu=new Set,Vr={};function mn(e,t){nl(e,t),nl(e+"Capture",t)}function nl(e,t){for(Vr[e]=t,e=0;e<t.length;e++)hu.add(t[e])}var mu=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]*$"),gu={},Cn={};function Br(e){return ht.call(Cn,e)?!0:ht.call(gu,e)?!1:mu.test(e)?Cn[e]=!0:(gu[e]=!0,!1)}function Qt(e,t,a){if(Br(t))if(a===null)e.removeAttribute(t);else{switch(typeof a){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var n=t.toLowerCase().slice(0,5);if(n!=="data-"&&n!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+a)}}function qs(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,n){if(n===null)e.removeAttribute(a);else{switch(typeof n){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(a);return}e.setAttributeNS(t,a,""+n)}}function Ct(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function gn(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Yr(e,t,a){var n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var u=n.get,d=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return u.call(this)},set:function(x){a=""+x,d.call(this,x)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return a},setValue:function(x){a=""+x},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Zl(e){if(!e._valueTracker){var t=gn(e)?"checked":"value";e._valueTracker=Yr(e,t,""+e[t])}}function ll(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var a=t.getValue(),n="";return e&&(n=gn(e)?e.checked?"true":"false":e.value),e=n,e!==a?(t.setValue(e),!0):!1}function Ka(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 Vs=/[\n"\\]/g;function Wt(e){return e.replace(Vs,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Bs(e,t,a,n,u,d,x,E){e.name="",x!=null&&typeof x!="function"&&typeof x!="symbol"&&typeof x!="boolean"?e.type=x:e.removeAttribute("type"),t!=null?x==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+Ct(t)):e.value!==""+Ct(t)&&(e.value=""+Ct(t)):x!=="submit"&&x!=="reset"||e.removeAttribute("value"),t!=null?Pl(e,x,Ct(t)):a!=null?Pl(e,x,Ct(a)):n!=null&&e.removeAttribute("value"),u==null&&d!=null&&(e.defaultChecked=!!d),u!=null&&(e.checked=u&&typeof u!="function"&&typeof u!="symbol"),E!=null&&typeof E!="function"&&typeof E!="symbol"&&typeof E!="boolean"?e.name=""+Ct(E):e.removeAttribute("name")}function sl(e,t,a,n,u,d,x,E){if(d!=null&&typeof d!="function"&&typeof d!="symbol"&&typeof d!="boolean"&&(e.type=d),t!=null||a!=null){if(!(d!=="submit"&&d!=="reset"||t!=null)){Zl(e);return}a=a!=null?""+Ct(a):"",t=t!=null?""+Ct(t):a,E||t===e.value||(e.value=t),e.defaultValue=t}n=n??u,n=typeof n!="function"&&typeof n!="symbol"&&!!n,e.checked=E?e.checked:!!n,e.defaultChecked=!!n,x!=null&&typeof x!="function"&&typeof x!="symbol"&&typeof x!="boolean"&&(e.name=x),Zl(e)}function Pl(e,t,a){t==="number"&&Ka(e.ownerDocument)===e||e.defaultValue===""+a||(e.defaultValue=""+a)}function On(e,t,a,n){if(e=e.options,t){t={};for(var u=0;u<a.length;u++)t["$"+a[u]]=!0;for(a=0;a<e.length;a++)u=t.hasOwnProperty("$"+e[a].value),e[a].selected!==u&&(e[a].selected=u),u&&n&&(e[a].defaultSelected=!0)}else{for(a=""+Ct(a),t=null,u=0;u<e.length;u++){if(e[u].value===a){e[u].selected=!0,n&&(e[u].defaultSelected=!0);return}t!==null||e[u].disabled||(t=e[u])}t!==null&&(t.selected=!0)}}function Ql(e,t,a){if(t!=null&&(t=""+Ct(t),t!==e.value&&(e.value=t),a==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=a!=null?""+Ct(a):""}function $r(e,t,a,n){if(t==null){if(n!=null){if(a!=null)throw Error(c(92));if(he(n)){if(1<n.length)throw Error(c(93));n=n[0]}a=n}a==null&&(a=""),t=a}a=Ct(t),e.defaultValue=a,n=e.textContent,n===a&&n!==""&&n!==null&&(e.value=n),Zl(e)}function en(e,t){if(t){var a=e.firstChild;if(a&&a===e.lastChild&&a.nodeType===3){a.nodeValue=t;return}}e.textContent=t}var Wl=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 Il(e,t,a){var n=t.indexOf("--")===0;a==null||typeof a=="boolean"||a===""?n?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":n?e.setProperty(t,a):typeof a!="number"||a===0||Wl.has(t)?t==="float"?e.cssFloat=a:e[t]=(""+a).trim():e[t]=a+"px"}function yu(e,t,a){if(t!=null&&typeof t!="object")throw Error(c(62));if(e=e.style,a!=null){for(var n in a)!a.hasOwnProperty(n)||t!=null&&t.hasOwnProperty(n)||(n.indexOf("--")===0?e.setProperty(n,""):n==="float"?e.cssFloat="":e[n]="");for(var u in t)n=t[u],t.hasOwnProperty(u)&&a[u]!==n&&Il(e,u,n)}else for(var d in t)t.hasOwnProperty(d)&&Il(e,d,t[d])}function Ys(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 no=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"]]),xu=/^[\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 Xl(e){return xu.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Ha(){}var Fr=null;function $s(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Dn=null,rl=null;function pu(e){var t=Ce(e);if(t&&(e=t.stateNode)){var a=e[qt]||null;e:switch(e=t.stateNode,t.type){case"input":if(Bs(e,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name),t=a.name,a.type==="radio"&&t!=null){for(a=e;a.parentNode;)a=a.parentNode;for(a=a.querySelectorAll('input[name="'+Wt(""+t)+'"][type="radio"]'),t=0;t<a.length;t++){var n=a[t];if(n!==e&&n.form===e.form){var u=n[qt]||null;if(!u)throw Error(c(90));Bs(n,u.value,u.defaultValue,u.defaultValue,u.checked,u.defaultChecked,u.type,u.name)}}for(t=0;t<a.length;t++)n=a[t],n.form===e.form&&ll(n)}break e;case"textarea":Ql(e,a.value,a.defaultValue);break e;case"select":t=a.value,t!=null&&On(e,!!a.multiple,t,!1)}}}var Gr=!1;function Zr(e,t,a){if(Gr)return e(t,a);Gr=!0;try{var n=e(t);return n}finally{if(Gr=!1,(Dn!==null||rl!==null)&&(fc(),Dn&&(t=Dn,e=rl,rl=Dn=null,pu(t),e)))for(t=0;t<e.length;t++)pu(e[t])}}function Jl(e,t){var a=e.stateNode;if(a===null)return null;var n=a[qt]||null;if(n===null)return null;a=n[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(n=!n.disabled)||(e=e.type,n=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!n;break e;default:e=!1}if(e)return null;if(a&&typeof a!="function")throw Error(c(231,t,typeof a));return a}var tn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Pr=!1;if(tn)try{var Kl={};Object.defineProperty(Kl,"passive",{get:function(){Pr=!0}}),window.addEventListener("test",Kl,Kl),window.removeEventListener("test",Kl,Kl)}catch{Pr=!1}var yn=null,Fs=null,Gs=null;function Vt(){if(Gs)return Gs;var e,t=Fs,a=t.length,n,u="value"in yn?yn.value:yn.textContent,d=u.length;for(e=0;e<a&&t[e]===u[e];e++);var x=a-e;for(n=1;n<=x&&t[a-n]===u[d-n];n++);return Gs=u.slice(e,1<n?1-n:void 0)}function es(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 an(){return!0}function Rn(){return!1}function Ot(e){function t(a,n,u,d,x){this._reactName=a,this._targetInst=u,this.type=n,this.nativeEvent=d,this.target=x,this.currentTarget=null;for(var E in e)e.hasOwnProperty(E)&&(a=e[E],this[E]=a?a(d):d[E]);return this.isDefaultPrevented=(d.defaultPrevented!=null?d.defaultPrevented:d.returnValue===!1)?an:Rn,this.isPropagationStopped=Rn,this}return j(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=an)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=an)},persist:function(){},isPersistent:an}),t}var xn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},ts=Ot(xn),as=j({},xn,{view:0,detail:0}),Qr=Ot(as),Zs,ns,ls,Ps=j({},as,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:rs,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!==ls&&(ls&&e.type==="mousemove"?(Zs=e.screenX-ls.screenX,ns=e.screenY-ls.screenY):ns=Zs=0,ls=e),Zs)},movementY:function(e){return"movementY"in e?e.movementY:ns}}),vu=Ot(Ps),lo=j({},Ps,{dataTransfer:0}),so=Ot(lo),ro=j({},as,{relatedTarget:0}),Qs=Ot(ro),io=j({},xn,{animationName:0,elapsedTime:0,pseudoElement:0}),il=Ot(io),uo=j({},xn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),ul=Ot(uo),ss=j({},xn,{data:0}),cl=Ot(ss),co={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},oo={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"},fo={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function ho(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=fo[e])?!!t[e]:!1}function rs(){return ho}var mo=j({},as,{key:function(e){if(e.key){var t=co[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=es(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?oo[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:rs,charCode:function(e){return e.type==="keypress"?es(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?es(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),go=Ot(mo),yo=j({},Ps,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),bu=Ot(yo),xo=j({},as,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:rs}),po=Ot(xo),Su=j({},xn,{propertyName:0,elapsedTime:0,pseudoElement:0}),vo=Ot(Su),bo=j({},Ps,{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}),So=Ot(bo),wo=j({},xn,{newState:0,oldState:0}),No=Ot(wo),wu=[9,13,27,32],Wr=tn&&"CompositionEvent"in window,is=null;tn&&"documentMode"in document&&(is=document.documentMode);var jo=tn&&"TextEvent"in window&&!is,Nu=tn&&(!Wr||is&&8<is&&11>=is),ju=" ",Eu=!1;function Tu(e,t){switch(e){case"keyup":return wu.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Mu(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var ol=!1;function Eo(e,t){switch(e){case"compositionend":return Mu(t);case"keypress":return t.which!==32?null:(Eu=!0,ju);case"textInput":return e=t.data,e===ju&&Eu?null:e;default:return null}}function To(e,t){if(ol)return e==="compositionend"||!Wr&&Tu(e,t)?(e=Vt(),Gs=Fs=yn=null,ol=!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 Nu&&t.locale!=="ko"?null:t.data;default:return null}}var Mo={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 Cu(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Mo[e.type]:t==="textarea"}function Ir(e,t,a,n){Dn?rl?rl.push(n):rl=[n]:Dn=n,t=vc(t,"onChange"),0<t.length&&(a=new ts("onChange","change",null,a,n),e.push({event:a,listeners:t}))}var dl=null,us=null;function ma(e){o0(e,0)}function nn(e){var t=ha(e);if(ll(t))return e}function Ou(e,t){if(e==="change")return t}var pn=!1;if(tn){var Xr;if(tn){var Ea="oninput"in document;if(!Ea){var Jr=document.createElement("div");Jr.setAttribute("oninput","return;"),Ea=typeof Jr.oninput=="function"}Xr=Ea}else Xr=!1;pn=Xr&&(!document.documentMode||9<document.documentMode)}function Kr(){dl&&(dl.detachEvent("onpropertychange",ei),us=dl=null)}function ei(e){if(e.propertyName==="value"&&nn(us)){var t=[];Ir(t,us,e,$s(e)),Zr(ma,t)}}function Fe(e,t,a){e==="focusin"?(Kr(),dl=t,us=a,dl.attachEvent("onpropertychange",ei)):e==="focusout"&&Kr()}function fl(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return nn(us)}function Co(e,t){if(e==="click")return nn(t)}function pt(e,t){if(e==="input"||e==="change")return nn(t)}function cs(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var ra=typeof Object.is=="function"?Object.is:cs;function os(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),n=Object.keys(t);if(a.length!==n.length)return!1;for(n=0;n<a.length;n++){var u=a[n];if(!ht.call(t,u)||!ra(e[u],t[u]))return!1}return!0}function Du(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Ru(e,t){var a=Du(e);e=0;for(var n;a;){if(a.nodeType===3){if(n=e+a.textContent.length,e<=t&&n>=t)return{node:a,offset:t-e};e=n}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=Du(a)}}function Qe(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Qe(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Oo(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Ka(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=Ka(e.document)}return t}function Ws(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 Au=tn&&"documentMode"in document&&11>=document.documentMode,hl=null,Is=null,It=null,Xs=!1;function ds(e,t,a){var n=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;Xs||hl==null||hl!==Ka(n)||(n=hl,"selectionStart"in n&&Ws(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}),It&&os(It,n)||(It=n,n=vc(Is,"onSelect"),0<n.length&&(t=new ts("onSelect","select",null,t,a),e.push({event:t,listeners:n}),t.target=hl)))}function An(e,t){var a={};return a[e.toLowerCase()]=t.toLowerCase(),a["Webkit"+e]="webkit"+t,a["Moz"+e]="moz"+t,a}var ml={animationend:An("Animation","AnimationEnd"),animationiteration:An("Animation","AnimationIteration"),animationstart:An("Animation","AnimationStart"),transitionrun:An("Transition","TransitionRun"),transitionstart:An("Transition","TransitionStart"),transitioncancel:An("Transition","TransitionCancel"),transitionend:An("Transition","TransitionEnd")},ti={},_u={};tn&&(_u=document.createElement("div").style,"AnimationEvent"in window||(delete ml.animationend.animation,delete ml.animationiteration.animation,delete ml.animationstart.animation),"TransitionEvent"in window||delete ml.transitionend.transition);function _n(e){if(ti[e])return ti[e];if(!ml[e])return e;var t=ml[e],a;for(a in t)if(t.hasOwnProperty(a)&&a in _u)return ti[e]=t[a];return e}var ku=_n("animationend"),zu=_n("animationiteration"),Js=_n("animationstart"),Do=_n("transitionrun"),Ro=_n("transitionstart"),Uu=_n("transitioncancel"),ai=_n("transitionend"),ni=new Map,li="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(" ");li.push("scrollEnd");function ga(e,t){ni.set(e,t),mn(t,[e])}var gl=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)},ca=[],La=0,fs=0;function yl(){for(var e=La,t=fs=La=0;t<e;){var a=ca[t];ca[t++]=null;var n=ca[t];ca[t++]=null;var u=ca[t];ca[t++]=null;var d=ca[t];if(ca[t++]=null,n!==null&&u!==null){var x=n.pending;x===null?u.next=u:(u.next=x.next,x.next=u),n.pending=u}d!==0&&hs(a,u,d)}}function qa(e,t,a,n){ca[La++]=e,ca[La++]=t,ca[La++]=a,ca[La++]=n,fs|=n,e.lanes|=n,e=e.alternate,e!==null&&(e.lanes|=n)}function Ks(e,t,a,n){return qa(e,t,a,n),ms(e)}function Va(e,t){return qa(e,null,null,t),ms(e)}function hs(e,t,a){e.lanes|=a;var n=e.alternate;n!==null&&(n.lanes|=a);for(var u=!1,d=e.return;d!==null;)d.childLanes|=a,n=d.alternate,n!==null&&(n.childLanes|=a),d.tag===22&&(e=d.stateNode,e===null||e._visibility&1||(u=!0)),e=d,d=d.return;return e.tag===3?(d=e.stateNode,u&&t!==null&&(u=31-Pt(a),e=d.hiddenUpdates,n=e[u],n===null?e[u]=[t]:n.push(t),t.lane=a|536870912),d):null}function ms(e){if(50<Mi)throw Mi=0,Dd=null,Error(c(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Ta={};function er(e,t,a,n){this.tag=e,this.key=a,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Xt(e,t,a,n){return new er(e,t,a,n)}function tr(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Ba(e,t){var a=e.alternate;return a===null?(a=Xt(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 Hu(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 ar(e,t,a,n,u,d){var x=0;if(n=e,typeof e=="function")tr(e)&&(x=1);else if(typeof e=="string")x=jp(e,a,xe.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case D:return e=Xt(31,a,t,u),e.elementType=D,e.lanes=d,e;case M:return Ya(a.children,u,d,t);case B:x=8,u|=24;break;case se:return e=Xt(12,a,t,u|2),e.elementType=se,e.lanes=d,e;case ae:return e=Xt(13,a,t,u),e.elementType=ae,e.lanes=d,e;case Z:return e=Xt(19,a,t,u),e.elementType=Z,e.lanes=d,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case W:x=10;break e;case Y:x=9;break e;case K:x=11;break e;case G:x=14;break e;case Q:x=16,n=null;break e}x=29,a=Error(c(130,e===null?"null":typeof e,"")),n=null}return t=Xt(x,a,t,u),t.elementType=e,t.type=n,t.lanes=d,t}function Ya(e,t,a,n){return e=Xt(7,e,n,t),e.lanes=a,e}function si(e,t,a){return e=Xt(6,e,null,t),e.lanes=a,e}function Lu(e){var t=Xt(18,null,null,0);return t.stateNode=e,t}function xl(e,t,a){return t=Xt(4,e.children!==null?e.children:[],e.key,t),t.lanes=a,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var ri=new WeakMap;function ya(e,t){if(typeof e=="object"&&e!==null){var a=ri.get(e);return a!==void 0?a:(t={value:e,source:t,stack:lt(t)},ri.set(e,t),t)}return{value:e,source:t,stack:lt(t)}}var kn=[],zn=0,gs=null,ln=0,ia=[],we=0,xa=null,$a=1,g="";function r(e,t){kn[zn++]=ln,kn[zn++]=gs,gs=e,ln=t}function h(e,t,a){ia[we++]=$a,ia[we++]=g,ia[we++]=xa,xa=e;var n=$a;e=g;var u=32-Pt(n)-1;n&=~(1<<u),a+=1;var d=32-Pt(t)+u;if(30<d){var x=u-u%5;d=(n&(1<<x)-1).toString(32),n>>=x,u-=x,$a=1<<32-Pt(t)+u|a<<u|n,g=d+e}else $a=1<<d|a<<u|n,g=e}function p(e){e.return!==null&&(r(e,1),h(e,1,0))}function N(e){for(;e===gs;)gs=kn[--zn],kn[zn]=null,ln=kn[--zn],kn[zn]=null;for(;e===xa;)xa=ia[--we],ia[we]=null,g=ia[--we],ia[we]=null,$a=ia[--we],ia[we]=null}function C(e,t){ia[we++]=$a,ia[we++]=g,ia[we++]=xa,$a=t.id,g=t.overflow,xa=e}var H=null,L=null,V=!1,de=null,pe=!1,ke=Error(c(519));function Ge(e){var t=Error(c(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw sn(ya(t,e)),ke}function De(e){var t=e.stateNode,a=e.type,n=e.memoizedProps;switch(t[Mt]=e,t[qt]=n,a){case"dialog":$e("cancel",t),$e("close",t);break;case"iframe":case"object":case"embed":$e("load",t);break;case"video":case"audio":for(a=0;a<Oi.length;a++)$e(Oi[a],t);break;case"source":$e("error",t);break;case"img":case"image":case"link":$e("error",t),$e("load",t);break;case"details":$e("toggle",t);break;case"input":$e("invalid",t),sl(t,n.value,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name,!0);break;case"select":$e("invalid",t);break;case"textarea":$e("invalid",t),$r(t,n.value,n.defaultValue,n.children)}a=n.children,typeof a!="string"&&typeof a!="number"&&typeof a!="bigint"||t.textContent===""+a||n.suppressHydrationWarning===!0||m0(t.textContent,a)?(n.popover!=null&&($e("beforetoggle",t),$e("toggle",t)),n.onScroll!=null&&$e("scroll",t),n.onScrollEnd!=null&&$e("scrollend",t),n.onClick!=null&&(t.onclick=Ha),t=!0):t=!1,t||Ge(e,!0)}function wt(e){for(H=e.return;H;)switch(H.tag){case 5:case 31:case 13:pe=!1;return;case 27:case 3:pe=!0;return;default:H=H.return}}function Yt(e){if(e!==H)return!1;if(!V)return wt(e),V=!0,!1;var t=e.tag,a;if((a=t!==3&&t!==27)&&((a=t===5)&&(a=e.type,a=!(a!=="form"&&a!=="button")||Gd(e.type,e.memoizedProps)),a=!a),a&&L&&Ge(e),wt(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(c(317));L=N0(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(c(317));L=N0(e)}else t===27?(t=L,Dl(e.type)?(e=Id,Id=null,L=e):L=t):L=H?Pa(e.stateNode.nextSibling):null;return!0}function $t(){L=H=null,V=!1}function vn(){var e=de;return e!==null&&(Sa===null?Sa=e:Sa.push.apply(Sa,e),de=null),e}function sn(e){de===null?de=[e]:de.push(e)}var nr=R(null),Un=null,Fa=null;function bn(e,t,a){me(nr,t._currentValue),t._currentValue=a}function rn(e){e._currentValue=nr.current,le(nr)}function ii(e,t,a){for(;e!==null;){var n=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,n!==null&&(n.childLanes|=t)):n!==null&&(n.childLanes&t)!==t&&(n.childLanes|=t),e===a)break;e=e.return}}function Hn(e,t,a,n){var u=e.child;for(u!==null&&(u.return=e);u!==null;){var d=u.dependencies;if(d!==null){var x=u.child;d=d.firstContext;e:for(;d!==null;){var E=d;d=u;for(var A=0;A<t.length;A++)if(E.context===t[A]){d.lanes|=a,E=d.alternate,E!==null&&(E.lanes|=a),ii(d.return,a,e),n||(x=null);break e}d=E.next}}else if(u.tag===18){if(x=u.return,x===null)throw Error(c(341));x.lanes|=a,d=x.alternate,d!==null&&(d.lanes|=a),ii(x,a,e),x=null}else x=u.child;if(x!==null)x.return=u;else for(x=u;x!==null;){if(x===e){x=null;break}if(u=x.sibling,u!==null){u.return=x.return,x=u;break}x=x.return}u=x}}function Ga(e,t,a,n){e=null;for(var u=t,d=!1;u!==null;){if(!d){if((u.flags&524288)!==0)d=!0;else if((u.flags&262144)!==0)break}if(u.tag===10){var x=u.alternate;if(x===null)throw Error(c(387));if(x=x.memoizedProps,x!==null){var E=u.type;ra(u.pendingProps.value,x.value)||(e!==null?e.push(E):e=[E])}}else if(u===Le.current){if(x=u.alternate,x===null)throw Error(c(387));x.memoizedState.memoizedState!==u.memoizedState.memoizedState&&(e!==null?e.push(ki):e=[ki])}u=u.return}e!==null&&Hn(t,e,a,n),t.flags|=262144}function lr(e){for(e=e.firstContext;e!==null;){if(!ra(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function ys(e){Un=e,Fa=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Jt(e){return Kf(Un,e)}function qu(e,t){return Un===null&&ys(e),Kf(e,t)}function Kf(e,t){var a=t._currentValue;if(t={context:t,memoizedValue:a,next:null},Fa===null){if(e===null)throw Error(c(308));Fa=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Fa=Fa.next=t;return a}var bx=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(a,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach(function(a){return a()})}},Sx=l.unstable_scheduleCallback,wx=l.unstable_NormalPriority,zt={$$typeof:W,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Ao(){return{controller:new bx,data:new Map,refCount:0}}function ui(e){e.refCount--,e.refCount===0&&Sx(wx,function(){e.controller.abort()})}var ci=null,_o=0,sr=0,rr=null;function Nx(e,t){if(ci===null){var a=ci=[];_o=0,sr=Ud(),rr={status:"pending",value:void 0,then:function(n){a.push(n)}}}return _o++,t.then(eh,eh),t}function eh(){if(--_o===0&&ci!==null){rr!==null&&(rr.status="fulfilled");var e=ci;ci=null,sr=0,rr=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function jx(e,t){var a=[],n={status:"pending",value:null,reason:null,then:function(u){a.push(u)}};return e.then(function(){n.status="fulfilled",n.value=t;for(var u=0;u<a.length;u++)(0,a[u])(t)},function(u){for(n.status="rejected",n.reason=u,u=0;u<a.length;u++)(0,a[u])(void 0)}),n}var th=$.S;$.S=function(e,t){Lm=Tt(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&Nx(e,t),th!==null&&th(e,t)};var xs=R(null);function ko(){var e=xs.current;return e!==null?e:mt.pooledCache}function Vu(e,t){t===null?me(xs,xs.current):me(xs,t.pool)}function ah(){var e=ko();return e===null?null:{parent:zt._currentValue,pool:e}}var ir=Error(c(460)),zo=Error(c(474)),Bu=Error(c(542)),Yu={then:function(){}};function nh(e){return e=e.status,e==="fulfilled"||e==="rejected"}function lh(e,t,a){switch(a=e[a],a===void 0?e.push(t):a!==t&&(t.then(Ha,Ha),t=a),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,rh(e),e;default:if(typeof t.status=="string")t.then(Ha,Ha);else{if(e=mt,e!==null&&100<e.shellSuspendCounter)throw Error(c(482));e=t,e.status="pending",e.then(function(n){if(t.status==="pending"){var u=t;u.status="fulfilled",u.value=n}},function(n){if(t.status==="pending"){var u=t;u.status="rejected",u.reason=n}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,rh(e),e}throw vs=t,ir}}function ps(e){try{var t=e._init;return t(e._payload)}catch(a){throw a!==null&&typeof a=="object"&&typeof a.then=="function"?(vs=a,ir):a}}var vs=null;function sh(){if(vs===null)throw Error(c(459));var e=vs;return vs=null,e}function rh(e){if(e===ir||e===Bu)throw Error(c(483))}var ur=null,oi=0;function $u(e){var t=oi;return oi+=1,ur===null&&(ur=[]),lh(ur,e,t)}function di(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Fu(e,t){throw t.$$typeof===T?Error(c(525)):(e=Object.prototype.toString.call(t),Error(c(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function ih(e){function t(F,q){if(e){var I=F.deletions;I===null?(F.deletions=[q],F.flags|=16):I.push(q)}}function a(F,q){if(!e)return null;for(;q!==null;)t(F,q),q=q.sibling;return null}function n(F){for(var q=new Map;F!==null;)F.key!==null?q.set(F.key,F):q.set(F.index,F),F=F.sibling;return q}function u(F,q){return F=Ba(F,q),F.index=0,F.sibling=null,F}function d(F,q,I){return F.index=I,e?(I=F.alternate,I!==null?(I=I.index,I<q?(F.flags|=67108866,q):I):(F.flags|=67108866,q)):(F.flags|=1048576,q)}function x(F){return e&&F.alternate===null&&(F.flags|=67108866),F}function E(F,q,I,ce){return q===null||q.tag!==6?(q=si(I,F.mode,ce),q.return=F,q):(q=u(q,I),q.return=F,q)}function A(F,q,I,ce){var Me=I.type;return Me===M?re(F,q,I.props.children,ce,I.key):q!==null&&(q.elementType===Me||typeof Me=="object"&&Me!==null&&Me.$$typeof===Q&&ps(Me)===q.type)?(q=u(q,I.props),di(q,I),q.return=F,q):(q=ar(I.type,I.key,I.props,null,F.mode,ce),di(q,I),q.return=F,q)}function X(F,q,I,ce){return q===null||q.tag!==4||q.stateNode.containerInfo!==I.containerInfo||q.stateNode.implementation!==I.implementation?(q=xl(I,F.mode,ce),q.return=F,q):(q=u(q,I.children||[]),q.return=F,q)}function re(F,q,I,ce,Me){return q===null||q.tag!==7?(q=Ya(I,F.mode,ce,Me),q.return=F,q):(q=u(q,I),q.return=F,q)}function oe(F,q,I){if(typeof q=="string"&&q!==""||typeof q=="number"||typeof q=="bigint")return q=si(""+q,F.mode,I),q.return=F,q;if(typeof q=="object"&&q!==null){switch(q.$$typeof){case O:return I=ar(q.type,q.key,q.props,null,F.mode,I),di(I,q),I.return=F,I;case _:return q=xl(q,F.mode,I),q.return=F,q;case Q:return q=ps(q),oe(F,q,I)}if(he(q)||k(q))return q=Ya(q,F.mode,I,null),q.return=F,q;if(typeof q.then=="function")return oe(F,$u(q),I);if(q.$$typeof===W)return oe(F,qu(F,q),I);Fu(F,q)}return null}function J(F,q,I,ce){var Me=q!==null?q.key:null;if(typeof I=="string"&&I!==""||typeof I=="number"||typeof I=="bigint")return Me!==null?null:E(F,q,""+I,ce);if(typeof I=="object"&&I!==null){switch(I.$$typeof){case O:return I.key===Me?A(F,q,I,ce):null;case _:return I.key===Me?X(F,q,I,ce):null;case Q:return I=ps(I),J(F,q,I,ce)}if(he(I)||k(I))return Me!==null?null:re(F,q,I,ce,null);if(typeof I.then=="function")return J(F,q,$u(I),ce);if(I.$$typeof===W)return J(F,q,qu(F,I),ce);Fu(F,I)}return null}function te(F,q,I,ce,Me){if(typeof ce=="string"&&ce!==""||typeof ce=="number"||typeof ce=="bigint")return F=F.get(I)||null,E(q,F,""+ce,Me);if(typeof ce=="object"&&ce!==null){switch(ce.$$typeof){case O:return F=F.get(ce.key===null?I:ce.key)||null,A(q,F,ce,Me);case _:return F=F.get(ce.key===null?I:ce.key)||null,X(q,F,ce,Me);case Q:return ce=ps(ce),te(F,q,I,ce,Me)}if(he(ce)||k(ce))return F=F.get(I)||null,re(q,F,ce,Me,null);if(typeof ce.then=="function")return te(F,q,I,$u(ce),Me);if(ce.$$typeof===W)return te(F,q,I,qu(q,ce),Me);Fu(q,ce)}return null}function ve(F,q,I,ce){for(var Me=null,Je=null,be=q,qe=q=0,Pe=null;be!==null&&qe<I.length;qe++){be.index>qe?(Pe=be,be=null):Pe=be.sibling;var Ke=J(F,be,I[qe],ce);if(Ke===null){be===null&&(be=Pe);break}e&&be&&Ke.alternate===null&&t(F,be),q=d(Ke,q,qe),Je===null?Me=Ke:Je.sibling=Ke,Je=Ke,be=Pe}if(qe===I.length)return a(F,be),V&&r(F,qe),Me;if(be===null){for(;qe<I.length;qe++)be=oe(F,I[qe],ce),be!==null&&(q=d(be,q,qe),Je===null?Me=be:Je.sibling=be,Je=be);return V&&r(F,qe),Me}for(be=n(be);qe<I.length;qe++)Pe=te(be,F,qe,I[qe],ce),Pe!==null&&(e&&Pe.alternate!==null&&be.delete(Pe.key===null?qe:Pe.key),q=d(Pe,q,qe),Je===null?Me=Pe:Je.sibling=Pe,Je=Pe);return e&&be.forEach(function(zl){return t(F,zl)}),V&&r(F,qe),Me}function Re(F,q,I,ce){if(I==null)throw Error(c(151));for(var Me=null,Je=null,be=q,qe=q=0,Pe=null,Ke=I.next();be!==null&&!Ke.done;qe++,Ke=I.next()){be.index>qe?(Pe=be,be=null):Pe=be.sibling;var zl=J(F,be,Ke.value,ce);if(zl===null){be===null&&(be=Pe);break}e&&be&&zl.alternate===null&&t(F,be),q=d(zl,q,qe),Je===null?Me=zl:Je.sibling=zl,Je=zl,be=Pe}if(Ke.done)return a(F,be),V&&r(F,qe),Me;if(be===null){for(;!Ke.done;qe++,Ke=I.next())Ke=oe(F,Ke.value,ce),Ke!==null&&(q=d(Ke,q,qe),Je===null?Me=Ke:Je.sibling=Ke,Je=Ke);return V&&r(F,qe),Me}for(be=n(be);!Ke.done;qe++,Ke=I.next())Ke=te(be,F,qe,Ke.value,ce),Ke!==null&&(e&&Ke.alternate!==null&&be.delete(Ke.key===null?qe:Ke.key),q=d(Ke,q,qe),Je===null?Me=Ke:Je.sibling=Ke,Je=Ke);return e&&be.forEach(function(zp){return t(F,zp)}),V&&r(F,qe),Me}function ft(F,q,I,ce){if(typeof I=="object"&&I!==null&&I.type===M&&I.key===null&&(I=I.props.children),typeof I=="object"&&I!==null){switch(I.$$typeof){case O:e:{for(var Me=I.key;q!==null;){if(q.key===Me){if(Me=I.type,Me===M){if(q.tag===7){a(F,q.sibling),ce=u(q,I.props.children),ce.return=F,F=ce;break e}}else if(q.elementType===Me||typeof Me=="object"&&Me!==null&&Me.$$typeof===Q&&ps(Me)===q.type){a(F,q.sibling),ce=u(q,I.props),di(ce,I),ce.return=F,F=ce;break e}a(F,q);break}else t(F,q);q=q.sibling}I.type===M?(ce=Ya(I.props.children,F.mode,ce,I.key),ce.return=F,F=ce):(ce=ar(I.type,I.key,I.props,null,F.mode,ce),di(ce,I),ce.return=F,F=ce)}return x(F);case _:e:{for(Me=I.key;q!==null;){if(q.key===Me)if(q.tag===4&&q.stateNode.containerInfo===I.containerInfo&&q.stateNode.implementation===I.implementation){a(F,q.sibling),ce=u(q,I.children||[]),ce.return=F,F=ce;break e}else{a(F,q);break}else t(F,q);q=q.sibling}ce=xl(I,F.mode,ce),ce.return=F,F=ce}return x(F);case Q:return I=ps(I),ft(F,q,I,ce)}if(he(I))return ve(F,q,I,ce);if(k(I)){if(Me=k(I),typeof Me!="function")throw Error(c(150));return I=Me.call(I),Re(F,q,I,ce)}if(typeof I.then=="function")return ft(F,q,$u(I),ce);if(I.$$typeof===W)return ft(F,q,qu(F,I),ce);Fu(F,I)}return typeof I=="string"&&I!==""||typeof I=="number"||typeof I=="bigint"?(I=""+I,q!==null&&q.tag===6?(a(F,q.sibling),ce=u(q,I),ce.return=F,F=ce):(a(F,q),ce=si(I,F.mode,ce),ce.return=F,F=ce),x(F)):a(F,q)}return function(F,q,I,ce){try{oi=0;var Me=ft(F,q,I,ce);return ur=null,Me}catch(be){if(be===ir||be===Bu)throw be;var Je=Xt(29,be,null,F.mode);return Je.lanes=ce,Je.return=F,Je}finally{}}}var bs=ih(!0),uh=ih(!1),pl=!1;function Uo(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Ho(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 vl(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function bl(e,t,a){var n=e.updateQueue;if(n===null)return null;if(n=n.shared,(at&2)!==0){var u=n.pending;return u===null?t.next=t:(t.next=u.next,u.next=t),n.pending=t,t=ms(e),hs(e,null,a),t}return qa(e,n,t,a),ms(e)}function fi(e,t,a){if(t=t.updateQueue,t!==null&&(t=t.shared,(a&4194048)!==0)){var n=t.lanes;n&=e.pendingLanes,a|=n,t.lanes=a,fa(e,a)}}function Lo(e,t){var a=e.updateQueue,n=e.alternate;if(n!==null&&(n=n.updateQueue,a===n)){var u=null,d=null;if(a=a.firstBaseUpdate,a!==null){do{var x={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};d===null?u=d=x:d=d.next=x,a=a.next}while(a!==null);d===null?u=d=t:d=d.next=t}else u=d=t;a={baseState:n.baseState,firstBaseUpdate:u,lastBaseUpdate:d,shared:n.shared,callbacks:n.callbacks},e.updateQueue=a;return}e=a.lastBaseUpdate,e===null?a.firstBaseUpdate=t:e.next=t,a.lastBaseUpdate=t}var qo=!1;function hi(){if(qo){var e=rr;if(e!==null)throw e}}function mi(e,t,a,n){qo=!1;var u=e.updateQueue;pl=!1;var d=u.firstBaseUpdate,x=u.lastBaseUpdate,E=u.shared.pending;if(E!==null){u.shared.pending=null;var A=E,X=A.next;A.next=null,x===null?d=X:x.next=X,x=A;var re=e.alternate;re!==null&&(re=re.updateQueue,E=re.lastBaseUpdate,E!==x&&(E===null?re.firstBaseUpdate=X:E.next=X,re.lastBaseUpdate=A))}if(d!==null){var oe=u.baseState;x=0,re=X=A=null,E=d;do{var J=E.lane&-536870913,te=J!==E.lane;if(te?(Ze&J)===J:(n&J)===J){J!==0&&J===sr&&(qo=!0),re!==null&&(re=re.next={lane:0,tag:E.tag,payload:E.payload,callback:null,next:null});e:{var ve=e,Re=E;J=t;var ft=a;switch(Re.tag){case 1:if(ve=Re.payload,typeof ve=="function"){oe=ve.call(ft,oe,J);break e}oe=ve;break e;case 3:ve.flags=ve.flags&-65537|128;case 0:if(ve=Re.payload,J=typeof ve=="function"?ve.call(ft,oe,J):ve,J==null)break e;oe=j({},oe,J);break e;case 2:pl=!0}}J=E.callback,J!==null&&(e.flags|=64,te&&(e.flags|=8192),te=u.callbacks,te===null?u.callbacks=[J]:te.push(J))}else te={lane:J,tag:E.tag,payload:E.payload,callback:E.callback,next:null},re===null?(X=re=te,A=oe):re=re.next=te,x|=J;if(E=E.next,E===null){if(E=u.shared.pending,E===null)break;te=E,E=te.next,te.next=null,u.lastBaseUpdate=te,u.shared.pending=null}}while(!0);re===null&&(A=oe),u.baseState=A,u.firstBaseUpdate=X,u.lastBaseUpdate=re,d===null&&(u.shared.lanes=0),El|=x,e.lanes=x,e.memoizedState=oe}}function ch(e,t){if(typeof e!="function")throw Error(c(191,e));e.call(t)}function oh(e,t){var a=e.callbacks;if(a!==null)for(e.callbacks=null,e=0;e<a.length;e++)ch(a[e],t)}var cr=R(null),Gu=R(0);function dh(e,t){e=Zn,me(Gu,e),me(cr,t),Zn=e|t.baseLanes}function Vo(){me(Gu,Zn),me(cr,cr.current)}function Bo(){Zn=Gu.current,le(cr),le(Gu)}var Ma=R(null),Za=null;function Sl(e){var t=e.alternate;me(Dt,Dt.current&1),me(Ma,e),Za===null&&(t===null||cr.current!==null||t.memoizedState!==null)&&(Za=e)}function Yo(e){me(Dt,Dt.current),me(Ma,e),Za===null&&(Za=e)}function fh(e){e.tag===22?(me(Dt,Dt.current),me(Ma,e),Za===null&&(Za=e)):wl()}function wl(){me(Dt,Dt.current),me(Ma,Ma.current)}function Ca(e){le(Ma),Za===e&&(Za=null),le(Dt)}var Dt=R(0);function Zu(e){for(var t=e;t!==null;){if(t.tag===13){var a=t.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||Qd(a)||Wd(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 Ln=0,He=null,ot=null,Ut=null,Pu=!1,or=!1,Ss=!1,Qu=0,gi=0,dr=null,Ex=0;function jt(){throw Error(c(321))}function $o(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 Fo(e,t,a,n,u,d){return Ln=d,He=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,$.H=e===null||e.memoizedState===null?Wh:sd,Ss=!1,d=a(n,u),Ss=!1,or&&(d=mh(t,a,n,u)),hh(e),d}function hh(e){$.H=pi;var t=ot!==null&&ot.next!==null;if(Ln=0,Ut=ot=He=null,Pu=!1,gi=0,dr=null,t)throw Error(c(300));e===null||Ht||(e=e.dependencies,e!==null&&lr(e)&&(Ht=!0))}function mh(e,t,a,n){He=e;var u=0;do{if(or&&(dr=null),gi=0,or=!1,25<=u)throw Error(c(301));if(u+=1,Ut=ot=null,e.updateQueue!=null){var d=e.updateQueue;d.lastEffect=null,d.events=null,d.stores=null,d.memoCache!=null&&(d.memoCache.index=0)}$.H=Ih,d=t(a,n)}while(or);return d}function Tx(){var e=$.H,t=e.useState()[0];return t=typeof t.then=="function"?yi(t):t,e=e.useState()[0],(ot!==null?ot.memoizedState:null)!==e&&(He.flags|=1024),t}function Go(){var e=Qu!==0;return Qu=0,e}function Zo(e,t,a){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a}function Po(e){if(Pu){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Pu=!1}Ln=0,Ut=ot=He=null,or=!1,gi=Qu=0,dr=null}function oa(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ut===null?He.memoizedState=Ut=e:Ut=Ut.next=e,Ut}function Rt(){if(ot===null){var e=He.alternate;e=e!==null?e.memoizedState:null}else e=ot.next;var t=Ut===null?He.memoizedState:Ut.next;if(t!==null)Ut=t,ot=e;else{if(e===null)throw He.alternate===null?Error(c(467)):Error(c(310));ot=e,e={memoizedState:ot.memoizedState,baseState:ot.baseState,baseQueue:ot.baseQueue,queue:ot.queue,next:null},Ut===null?He.memoizedState=Ut=e:Ut=Ut.next=e}return Ut}function Wu(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function yi(e){var t=gi;return gi+=1,dr===null&&(dr=[]),e=lh(dr,e,t),t=He,(Ut===null?t.memoizedState:Ut.next)===null&&(t=t.alternate,$.H=t===null||t.memoizedState===null?Wh:sd),e}function Iu(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return yi(e);if(e.$$typeof===W)return Jt(e)}throw Error(c(438,String(e)))}function Qo(e){var t=null,a=He.updateQueue;if(a!==null&&(t=a.memoCache),t==null){var n=He.alternate;n!==null&&(n=n.updateQueue,n!==null&&(n=n.memoCache,n!=null&&(t={data:n.data.map(function(u){return u.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),a===null&&(a=Wu(),He.updateQueue=a),a.memoCache=t,a=t.data[t.index],a===void 0)for(a=t.data[t.index]=Array(e),n=0;n<e;n++)a[n]=z;return t.index++,a}function qn(e,t){return typeof t=="function"?t(e):t}function Xu(e){var t=Rt();return Wo(t,ot,e)}function Wo(e,t,a){var n=e.queue;if(n===null)throw Error(c(311));n.lastRenderedReducer=a;var u=e.baseQueue,d=n.pending;if(d!==null){if(u!==null){var x=u.next;u.next=d.next,d.next=x}t.baseQueue=u=d,n.pending=null}if(d=e.baseState,u===null)e.memoizedState=d;else{t=u.next;var E=x=null,A=null,X=t,re=!1;do{var oe=X.lane&-536870913;if(oe!==X.lane?(Ze&oe)===oe:(Ln&oe)===oe){var J=X.revertLane;if(J===0)A!==null&&(A=A.next={lane:0,revertLane:0,gesture:null,action:X.action,hasEagerState:X.hasEagerState,eagerState:X.eagerState,next:null}),oe===sr&&(re=!0);else if((Ln&J)===J){X=X.next,J===sr&&(re=!0);continue}else oe={lane:0,revertLane:X.revertLane,gesture:null,action:X.action,hasEagerState:X.hasEagerState,eagerState:X.eagerState,next:null},A===null?(E=A=oe,x=d):A=A.next=oe,He.lanes|=J,El|=J;oe=X.action,Ss&&a(d,oe),d=X.hasEagerState?X.eagerState:a(d,oe)}else J={lane:oe,revertLane:X.revertLane,gesture:X.gesture,action:X.action,hasEagerState:X.hasEagerState,eagerState:X.eagerState,next:null},A===null?(E=A=J,x=d):A=A.next=J,He.lanes|=oe,El|=oe;X=X.next}while(X!==null&&X!==t);if(A===null?x=d:A.next=E,!ra(d,e.memoizedState)&&(Ht=!0,re&&(a=rr,a!==null)))throw a;e.memoizedState=d,e.baseState=x,e.baseQueue=A,n.lastRenderedState=d}return u===null&&(n.lanes=0),[e.memoizedState,n.dispatch]}function Io(e){var t=Rt(),a=t.queue;if(a===null)throw Error(c(311));a.lastRenderedReducer=e;var n=a.dispatch,u=a.pending,d=t.memoizedState;if(u!==null){a.pending=null;var x=u=u.next;do d=e(d,x.action),x=x.next;while(x!==u);ra(d,t.memoizedState)||(Ht=!0),t.memoizedState=d,t.baseQueue===null&&(t.baseState=d),a.lastRenderedState=d}return[d,n]}function gh(e,t,a){var n=He,u=Rt(),d=V;if(d){if(a===void 0)throw Error(c(407));a=a()}else a=t();var x=!ra((ot||u).memoizedState,a);if(x&&(u.memoizedState=a,Ht=!0),u=u.queue,Ko(ph.bind(null,n,u,e),[e]),u.getSnapshot!==t||x||Ut!==null&&Ut.memoizedState.tag&1){if(n.flags|=2048,fr(9,{destroy:void 0},xh.bind(null,n,u,a,t),null),mt===null)throw Error(c(349));d||(Ln&127)!==0||yh(n,t,a)}return a}function yh(e,t,a){e.flags|=16384,e={getSnapshot:t,value:a},t=He.updateQueue,t===null?(t=Wu(),He.updateQueue=t,t.stores=[e]):(a=t.stores,a===null?t.stores=[e]:a.push(e))}function xh(e,t,a,n){t.value=a,t.getSnapshot=n,vh(t)&&bh(e)}function ph(e,t,a){return a(function(){vh(t)&&bh(e)})}function vh(e){var t=e.getSnapshot;e=e.value;try{var a=t();return!ra(e,a)}catch{return!0}}function bh(e){var t=Va(e,2);t!==null&&wa(t,e,2)}function Xo(e){var t=oa();if(typeof e=="function"){var a=e;if(e=a(),Ss){Zt(!0);try{a()}finally{Zt(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:qn,lastRenderedState:e},t}function Sh(e,t,a,n){return e.baseState=a,Wo(e,ot,typeof n=="function"?n:qn)}function Mx(e,t,a,n,u){if(ec(e))throw Error(c(485));if(e=t.action,e!==null){var d={payload:u,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(x){d.listeners.push(x)}};$.T!==null?a(!0):d.isTransition=!1,n(d),a=t.pending,a===null?(d.next=t.pending=d,wh(t,d)):(d.next=a.next,t.pending=a.next=d)}}function wh(e,t){var a=t.action,n=t.payload,u=e.state;if(t.isTransition){var d=$.T,x={};$.T=x;try{var E=a(u,n),A=$.S;A!==null&&A(x,E),Nh(e,t,E)}catch(X){Jo(e,t,X)}finally{d!==null&&x.types!==null&&(d.types=x.types),$.T=d}}else try{d=a(u,n),Nh(e,t,d)}catch(X){Jo(e,t,X)}}function Nh(e,t,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(function(n){jh(e,t,n)},function(n){return Jo(e,t,n)}):jh(e,t,a)}function jh(e,t,a){t.status="fulfilled",t.value=a,Eh(t),e.state=a,t=e.pending,t!==null&&(a=t.next,a===t?e.pending=null:(a=a.next,t.next=a,wh(e,a)))}function Jo(e,t,a){var n=e.pending;if(e.pending=null,n!==null){n=n.next;do t.status="rejected",t.reason=a,Eh(t),t=t.next;while(t!==n)}e.action=null}function Eh(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Th(e,t){return t}function Mh(e,t){if(V){var a=mt.formState;if(a!==null){e:{var n=He;if(V){if(L){t:{for(var u=L,d=pe;u.nodeType!==8;){if(!d){u=null;break t}if(u=Pa(u.nextSibling),u===null){u=null;break t}}d=u.data,u=d==="F!"||d==="F"?u:null}if(u){L=Pa(u.nextSibling),n=u.data==="F!";break e}}Ge(n)}n=!1}n&&(t=a[0])}}return a=oa(),a.memoizedState=a.baseState=t,n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Th,lastRenderedState:t},a.queue=n,a=Zh.bind(null,He,n),n.dispatch=a,n=Xo(!1),d=ld.bind(null,He,!1,n.queue),n=oa(),u={state:t,dispatch:null,action:e,pending:null},n.queue=u,a=Mx.bind(null,He,u,d,a),u.dispatch=a,n.memoizedState=e,[t,a,!1]}function Ch(e){var t=Rt();return Oh(t,ot,e)}function Oh(e,t,a){if(t=Wo(e,t,Th)[0],e=Xu(qn)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var n=yi(t)}catch(x){throw x===ir?Bu:x}else n=t;t=Rt();var u=t.queue,d=u.dispatch;return a!==t.memoizedState&&(He.flags|=2048,fr(9,{destroy:void 0},Cx.bind(null,u,a),null)),[n,d,e]}function Cx(e,t){e.action=t}function Dh(e){var t=Rt(),a=ot;if(a!==null)return Oh(t,a,e);Rt(),t=t.memoizedState,a=Rt();var n=a.queue.dispatch;return a.memoizedState=e,[t,n,!1]}function fr(e,t,a,n){return e={tag:e,create:a,deps:n,inst:t,next:null},t=He.updateQueue,t===null&&(t=Wu(),He.updateQueue=t),a=t.lastEffect,a===null?t.lastEffect=e.next=e:(n=a.next,a.next=e,e.next=n,t.lastEffect=e),e}function Rh(){return Rt().memoizedState}function Ju(e,t,a,n){var u=oa();He.flags|=e,u.memoizedState=fr(1|t,{destroy:void 0},a,n===void 0?null:n)}function Ku(e,t,a,n){var u=Rt();n=n===void 0?null:n;var d=u.memoizedState.inst;ot!==null&&n!==null&&$o(n,ot.memoizedState.deps)?u.memoizedState=fr(t,d,a,n):(He.flags|=e,u.memoizedState=fr(1|t,d,a,n))}function Ah(e,t){Ju(8390656,8,e,t)}function Ko(e,t){Ku(2048,8,e,t)}function Ox(e){He.flags|=4;var t=He.updateQueue;if(t===null)t=Wu(),He.updateQueue=t,t.events=[e];else{var a=t.events;a===null?t.events=[e]:a.push(e)}}function _h(e){var t=Rt().memoizedState;return Ox({ref:t,nextImpl:e}),function(){if((at&2)!==0)throw Error(c(440));return t.impl.apply(void 0,arguments)}}function kh(e,t){return Ku(4,2,e,t)}function zh(e,t){return Ku(4,4,e,t)}function Uh(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 Hh(e,t,a){a=a!=null?a.concat([e]):null,Ku(4,4,Uh.bind(null,t,e),a)}function ed(){}function Lh(e,t){var a=Rt();t=t===void 0?null:t;var n=a.memoizedState;return t!==null&&$o(t,n[1])?n[0]:(a.memoizedState=[e,t],e)}function qh(e,t){var a=Rt();t=t===void 0?null:t;var n=a.memoizedState;if(t!==null&&$o(t,n[1]))return n[0];if(n=e(),Ss){Zt(!0);try{e()}finally{Zt(!1)}}return a.memoizedState=[n,t],n}function td(e,t,a){return a===void 0||(Ln&1073741824)!==0&&(Ze&261930)===0?e.memoizedState=t:(e.memoizedState=a,e=Vm(),He.lanes|=e,El|=e,a)}function Vh(e,t,a,n){return ra(a,t)?a:cr.current!==null?(e=td(e,a,n),ra(e,t)||(Ht=!0),e):(Ln&42)===0||(Ln&1073741824)!==0&&(Ze&261930)===0?(Ht=!0,e.memoizedState=a):(e=Vm(),He.lanes|=e,El|=e,t)}function Bh(e,t,a,n,u){var d=ie.p;ie.p=d!==0&&8>d?d:8;var x=$.T,E={};$.T=E,ld(e,!1,t,a);try{var A=u(),X=$.S;if(X!==null&&X(E,A),A!==null&&typeof A=="object"&&typeof A.then=="function"){var re=jx(A,n);xi(e,t,re,Ra(e))}else xi(e,t,n,Ra(e))}catch(oe){xi(e,t,{then:function(){},status:"rejected",reason:oe},Ra())}finally{ie.p=d,x!==null&&E.types!==null&&(x.types=E.types),$.T=x}}function Dx(){}function ad(e,t,a,n){if(e.tag!==5)throw Error(c(476));var u=Yh(e).queue;Bh(e,u,t,ye,a===null?Dx:function(){return $h(e),a(n)})}function Yh(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:ye,baseState:ye,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:qn,lastRenderedState:ye},next:null};var a={};return t.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:qn,lastRenderedState:a},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function $h(e){var t=Yh(e);t.next===null&&(t=e.alternate.memoizedState),xi(e,t.next.queue,{},Ra())}function nd(){return Jt(ki)}function Fh(){return Rt().memoizedState}function Gh(){return Rt().memoizedState}function Rx(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var a=Ra();e=vl(a);var n=bl(t,e,a);n!==null&&(wa(n,t,a),fi(n,t,a)),t={cache:Ao()},e.payload=t;return}t=t.return}}function Ax(e,t,a){var n=Ra();a={lane:n,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},ec(e)?Ph(t,a):(a=Ks(e,t,a,n),a!==null&&(wa(a,e,n),Qh(a,t,n)))}function Zh(e,t,a){var n=Ra();xi(e,t,a,n)}function xi(e,t,a,n){var u={lane:n,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(ec(e))Ph(t,u);else{var d=e.alternate;if(e.lanes===0&&(d===null||d.lanes===0)&&(d=t.lastRenderedReducer,d!==null))try{var x=t.lastRenderedState,E=d(x,a);if(u.hasEagerState=!0,u.eagerState=E,ra(E,x))return qa(e,t,u,0),mt===null&&yl(),!1}catch{}finally{}if(a=Ks(e,t,u,n),a!==null)return wa(a,e,n),Qh(a,t,n),!0}return!1}function ld(e,t,a,n){if(n={lane:2,revertLane:Ud(),gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},ec(e)){if(t)throw Error(c(479))}else t=Ks(e,a,n,2),t!==null&&wa(t,e,2)}function ec(e){var t=e.alternate;return e===He||t!==null&&t===He}function Ph(e,t){or=Pu=!0;var a=e.pending;a===null?t.next=t:(t.next=a.next,a.next=t),e.pending=t}function Qh(e,t,a){if((a&4194048)!==0){var n=t.lanes;n&=e.pendingLanes,a|=n,t.lanes=a,fa(e,a)}}var pi={readContext:Jt,use:Iu,useCallback:jt,useContext:jt,useEffect:jt,useImperativeHandle:jt,useLayoutEffect:jt,useInsertionEffect:jt,useMemo:jt,useReducer:jt,useRef:jt,useState:jt,useDebugValue:jt,useDeferredValue:jt,useTransition:jt,useSyncExternalStore:jt,useId:jt,useHostTransitionStatus:jt,useFormState:jt,useActionState:jt,useOptimistic:jt,useMemoCache:jt,useCacheRefresh:jt};pi.useEffectEvent=jt;var Wh={readContext:Jt,use:Iu,useCallback:function(e,t){return oa().memoizedState=[e,t===void 0?null:t],e},useContext:Jt,useEffect:Ah,useImperativeHandle:function(e,t,a){a=a!=null?a.concat([e]):null,Ju(4194308,4,Uh.bind(null,t,e),a)},useLayoutEffect:function(e,t){return Ju(4194308,4,e,t)},useInsertionEffect:function(e,t){Ju(4,2,e,t)},useMemo:function(e,t){var a=oa();t=t===void 0?null:t;var n=e();if(Ss){Zt(!0);try{e()}finally{Zt(!1)}}return a.memoizedState=[n,t],n},useReducer:function(e,t,a){var n=oa();if(a!==void 0){var u=a(t);if(Ss){Zt(!0);try{a(t)}finally{Zt(!1)}}}else u=t;return n.memoizedState=n.baseState=u,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:u},n.queue=e,e=e.dispatch=Ax.bind(null,He,e),[n.memoizedState,e]},useRef:function(e){var t=oa();return e={current:e},t.memoizedState=e},useState:function(e){e=Xo(e);var t=e.queue,a=Zh.bind(null,He,t);return t.dispatch=a,[e.memoizedState,a]},useDebugValue:ed,useDeferredValue:function(e,t){var a=oa();return td(a,e,t)},useTransition:function(){var e=Xo(!1);return e=Bh.bind(null,He,e.queue,!0,!1),oa().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,a){var n=He,u=oa();if(V){if(a===void 0)throw Error(c(407));a=a()}else{if(a=t(),mt===null)throw Error(c(349));(Ze&127)!==0||yh(n,t,a)}u.memoizedState=a;var d={value:a,getSnapshot:t};return u.queue=d,Ah(ph.bind(null,n,d,e),[e]),n.flags|=2048,fr(9,{destroy:void 0},xh.bind(null,n,d,a,t),null),a},useId:function(){var e=oa(),t=mt.identifierPrefix;if(V){var a=g,n=$a;a=(n&~(1<<32-Pt(n)-1)).toString(32)+a,t="_"+t+"R_"+a,a=Qu++,0<a&&(t+="H"+a.toString(32)),t+="_"}else a=Ex++,t="_"+t+"r_"+a.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:nd,useFormState:Mh,useActionState:Mh,useOptimistic:function(e){var t=oa();t.memoizedState=t.baseState=e;var a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=a,t=ld.bind(null,He,!0,a),a.dispatch=t,[e,t]},useMemoCache:Qo,useCacheRefresh:function(){return oa().memoizedState=Rx.bind(null,He)},useEffectEvent:function(e){var t=oa(),a={impl:e};return t.memoizedState=a,function(){if((at&2)!==0)throw Error(c(440));return a.impl.apply(void 0,arguments)}}},sd={readContext:Jt,use:Iu,useCallback:Lh,useContext:Jt,useEffect:Ko,useImperativeHandle:Hh,useInsertionEffect:kh,useLayoutEffect:zh,useMemo:qh,useReducer:Xu,useRef:Rh,useState:function(){return Xu(qn)},useDebugValue:ed,useDeferredValue:function(e,t){var a=Rt();return Vh(a,ot.memoizedState,e,t)},useTransition:function(){var e=Xu(qn)[0],t=Rt().memoizedState;return[typeof e=="boolean"?e:yi(e),t]},useSyncExternalStore:gh,useId:Fh,useHostTransitionStatus:nd,useFormState:Ch,useActionState:Ch,useOptimistic:function(e,t){var a=Rt();return Sh(a,ot,e,t)},useMemoCache:Qo,useCacheRefresh:Gh};sd.useEffectEvent=_h;var Ih={readContext:Jt,use:Iu,useCallback:Lh,useContext:Jt,useEffect:Ko,useImperativeHandle:Hh,useInsertionEffect:kh,useLayoutEffect:zh,useMemo:qh,useReducer:Io,useRef:Rh,useState:function(){return Io(qn)},useDebugValue:ed,useDeferredValue:function(e,t){var a=Rt();return ot===null?td(a,e,t):Vh(a,ot.memoizedState,e,t)},useTransition:function(){var e=Io(qn)[0],t=Rt().memoizedState;return[typeof e=="boolean"?e:yi(e),t]},useSyncExternalStore:gh,useId:Fh,useHostTransitionStatus:nd,useFormState:Dh,useActionState:Dh,useOptimistic:function(e,t){var a=Rt();return ot!==null?Sh(a,ot,e,t):(a.baseState=e,[e,a.queue.dispatch])},useMemoCache:Qo,useCacheRefresh:Gh};Ih.useEffectEvent=_h;function rd(e,t,a,n){t=e.memoizedState,a=a(n,t),a=a==null?t:j({},t,a),e.memoizedState=a,e.lanes===0&&(e.updateQueue.baseState=a)}var id={enqueueSetState:function(e,t,a){e=e._reactInternals;var n=Ra(),u=vl(n);u.payload=t,a!=null&&(u.callback=a),t=bl(e,u,n),t!==null&&(wa(t,e,n),fi(t,e,n))},enqueueReplaceState:function(e,t,a){e=e._reactInternals;var n=Ra(),u=vl(n);u.tag=1,u.payload=t,a!=null&&(u.callback=a),t=bl(e,u,n),t!==null&&(wa(t,e,n),fi(t,e,n))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var a=Ra(),n=vl(a);n.tag=2,t!=null&&(n.callback=t),t=bl(e,n,a),t!==null&&(wa(t,e,a),fi(t,e,a))}};function Xh(e,t,a,n,u,d,x){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(n,d,x):t.prototype&&t.prototype.isPureReactComponent?!os(a,n)||!os(u,d):!0}function Jh(e,t,a,n){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(a,n),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(a,n),t.state!==e&&id.enqueueReplaceState(t,t.state,null)}function ws(e,t){var a=t;if("ref"in t){a={};for(var n in t)n!=="ref"&&(a[n]=t[n])}if(e=e.defaultProps){a===t&&(a=j({},a));for(var u in e)a[u]===void 0&&(a[u]=e[u])}return a}function Kh(e){gl(e)}function em(e){console.error(e)}function tm(e){gl(e)}function tc(e,t){try{var a=e.onUncaughtError;a(t.value,{componentStack:t.stack})}catch(n){setTimeout(function(){throw n})}}function am(e,t,a){try{var n=e.onCaughtError;n(a.value,{componentStack:a.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(u){setTimeout(function(){throw u})}}function ud(e,t,a){return a=vl(a),a.tag=3,a.payload={element:null},a.callback=function(){tc(e,t)},a}function nm(e){return e=vl(e),e.tag=3,e}function lm(e,t,a,n){var u=a.type.getDerivedStateFromError;if(typeof u=="function"){var d=n.value;e.payload=function(){return u(d)},e.callback=function(){am(t,a,n)}}var x=a.stateNode;x!==null&&typeof x.componentDidCatch=="function"&&(e.callback=function(){am(t,a,n),typeof u!="function"&&(Tl===null?Tl=new Set([this]):Tl.add(this));var E=n.stack;this.componentDidCatch(n.value,{componentStack:E!==null?E:""})})}function _x(e,t,a,n,u){if(a.flags|=32768,n!==null&&typeof n=="object"&&typeof n.then=="function"){if(t=a.alternate,t!==null&&Ga(t,a,u,!0),a=Ma.current,a!==null){switch(a.tag){case 31:case 13:return Za===null?hc():a.alternate===null&&Et===0&&(Et=3),a.flags&=-257,a.flags|=65536,a.lanes=u,n===Yu?a.flags|=16384:(t=a.updateQueue,t===null?a.updateQueue=new Set([n]):t.add(n),_d(e,n,u)),!1;case 22:return a.flags|=65536,n===Yu?a.flags|=16384:(t=a.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([n])},a.updateQueue=t):(a=t.retryQueue,a===null?t.retryQueue=new Set([n]):a.add(n)),_d(e,n,u)),!1}throw Error(c(435,a.tag))}return _d(e,n,u),hc(),!1}if(V)return t=Ma.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=u,n!==ke&&(e=Error(c(422),{cause:n}),sn(ya(e,a)))):(n!==ke&&(t=Error(c(423),{cause:n}),sn(ya(t,a))),e=e.current.alternate,e.flags|=65536,u&=-u,e.lanes|=u,n=ya(n,a),u=ud(e.stateNode,n,u),Lo(e,u),Et!==4&&(Et=2)),!1;var d=Error(c(520),{cause:n});if(d=ya(d,a),Ti===null?Ti=[d]:Ti.push(d),Et!==4&&(Et=2),t===null)return!0;n=ya(n,a),a=t;do{switch(a.tag){case 3:return a.flags|=65536,e=u&-u,a.lanes|=e,e=ud(a.stateNode,n,e),Lo(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"&&(Tl===null||!Tl.has(d))))return a.flags|=65536,u&=-u,a.lanes|=u,u=nm(u),lm(u,e,a,n),Lo(a,u),!1}a=a.return}while(a!==null);return!1}var cd=Error(c(461)),Ht=!1;function Kt(e,t,a,n){t.child=e===null?uh(t,null,a,n):bs(t,e.child,a,n)}function sm(e,t,a,n,u){a=a.render;var d=t.ref;if("ref"in n){var x={};for(var E in n)E!=="ref"&&(x[E]=n[E])}else x=n;return ys(t),n=Fo(e,t,a,x,d,u),E=Go(),e!==null&&!Ht?(Zo(e,t,u),Vn(e,t,u)):(V&&E&&p(t),t.flags|=1,Kt(e,t,n,u),t.child)}function rm(e,t,a,n,u){if(e===null){var d=a.type;return typeof d=="function"&&!tr(d)&&d.defaultProps===void 0&&a.compare===null?(t.tag=15,t.type=d,im(e,t,d,n,u)):(e=ar(a.type,null,n,t,t.mode,u),e.ref=t.ref,e.return=t,t.child=e)}if(d=e.child,!xd(e,u)){var x=d.memoizedProps;if(a=a.compare,a=a!==null?a:os,a(x,n)&&e.ref===t.ref)return Vn(e,t,u)}return t.flags|=1,e=Ba(d,n),e.ref=t.ref,e.return=t,t.child=e}function im(e,t,a,n,u){if(e!==null){var d=e.memoizedProps;if(os(d,n)&&e.ref===t.ref)if(Ht=!1,t.pendingProps=n=d,xd(e,u))(e.flags&131072)!==0&&(Ht=!0);else return t.lanes=e.lanes,Vn(e,t,u)}return od(e,t,a,n,u)}function um(e,t,a,n){var u=n.children,d=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),n.mode==="hidden"){if((t.flags&128)!==0){if(d=d!==null?d.baseLanes|a:a,e!==null){for(n=t.child=e.child,u=0;n!==null;)u=u|n.lanes|n.childLanes,n=n.sibling;n=u&~d}else n=0,t.child=null;return cm(e,t,d,a,n)}if((a&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Vu(t,d!==null?d.cachePool:null),d!==null?dh(t,d):Vo(),fh(t);else return n=t.lanes=536870912,cm(e,t,d!==null?d.baseLanes|a:a,a,n)}else d!==null?(Vu(t,d.cachePool),dh(t,d),wl(),t.memoizedState=null):(e!==null&&Vu(t,null),Vo(),wl());return Kt(e,t,u,a),t.child}function vi(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function cm(e,t,a,n,u){var d=ko();return d=d===null?null:{parent:zt._currentValue,pool:d},t.memoizedState={baseLanes:a,cachePool:d},e!==null&&Vu(t,null),Vo(),fh(t),e!==null&&Ga(e,t,n,!0),t.childLanes=u,null}function ac(e,t){return t=lc({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function om(e,t,a){return bs(t,e.child,null,a),e=ac(t,t.pendingProps),e.flags|=2,Ca(t),t.memoizedState=null,e}function kx(e,t,a){var n=t.pendingProps,u=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(V){if(n.mode==="hidden")return e=ac(t,n),t.lanes=536870912,vi(null,e);if(Yo(t),(e=L)?(e=w0(e,pe),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:xa!==null?{id:$a,overflow:g}:null,retryLane:536870912,hydrationErrors:null},a=Lu(e),a.return=t,t.child=a,H=t,L=null)):e=null,e===null)throw Ge(t);return t.lanes=536870912,null}return ac(t,n)}var d=e.memoizedState;if(d!==null){var x=d.dehydrated;if(Yo(t),u)if(t.flags&256)t.flags&=-257,t=om(e,t,a);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(c(558));else if(Ht||Ga(e,t,a,!1),u=(a&e.childLanes)!==0,Ht||u){if(n=mt,n!==null&&(x=Lr(n,a),x!==0&&x!==d.retryLane))throw d.retryLane=x,Va(e,x),wa(n,e,x),cd;hc(),t=om(e,t,a)}else e=d.treeContext,L=Pa(x.nextSibling),H=t,V=!0,de=null,pe=!1,e!==null&&C(t,e),t=ac(t,n),t.flags|=4096;return t}return e=Ba(e.child,{mode:n.mode,children:n.children}),e.ref=t.ref,t.child=e,e.return=t,e}function nc(e,t){var a=t.ref;if(a===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof a!="function"&&typeof a!="object")throw Error(c(284));(e===null||e.ref!==a)&&(t.flags|=4194816)}}function od(e,t,a,n,u){return ys(t),a=Fo(e,t,a,n,void 0,u),n=Go(),e!==null&&!Ht?(Zo(e,t,u),Vn(e,t,u)):(V&&n&&p(t),t.flags|=1,Kt(e,t,a,u),t.child)}function dm(e,t,a,n,u,d){return ys(t),t.updateQueue=null,a=mh(t,n,a,u),hh(e),n=Go(),e!==null&&!Ht?(Zo(e,t,d),Vn(e,t,d)):(V&&n&&p(t),t.flags|=1,Kt(e,t,a,d),t.child)}function fm(e,t,a,n,u){if(ys(t),t.stateNode===null){var d=Ta,x=a.contextType;typeof x=="object"&&x!==null&&(d=Jt(x)),d=new a(n,d),t.memoizedState=d.state!==null&&d.state!==void 0?d.state:null,d.updater=id,t.stateNode=d,d._reactInternals=t,d=t.stateNode,d.props=n,d.state=t.memoizedState,d.refs={},Uo(t),x=a.contextType,d.context=typeof x=="object"&&x!==null?Jt(x):Ta,d.state=t.memoizedState,x=a.getDerivedStateFromProps,typeof x=="function"&&(rd(t,a,x,n),d.state=t.memoizedState),typeof a.getDerivedStateFromProps=="function"||typeof d.getSnapshotBeforeUpdate=="function"||typeof d.UNSAFE_componentWillMount!="function"&&typeof d.componentWillMount!="function"||(x=d.state,typeof d.componentWillMount=="function"&&d.componentWillMount(),typeof d.UNSAFE_componentWillMount=="function"&&d.UNSAFE_componentWillMount(),x!==d.state&&id.enqueueReplaceState(d,d.state,null),mi(t,n,d,u),hi(),d.state=t.memoizedState),typeof d.componentDidMount=="function"&&(t.flags|=4194308),n=!0}else if(e===null){d=t.stateNode;var E=t.memoizedProps,A=ws(a,E);d.props=A;var X=d.context,re=a.contextType;x=Ta,typeof re=="object"&&re!==null&&(x=Jt(re));var oe=a.getDerivedStateFromProps;re=typeof oe=="function"||typeof d.getSnapshotBeforeUpdate=="function",E=t.pendingProps!==E,re||typeof d.UNSAFE_componentWillReceiveProps!="function"&&typeof d.componentWillReceiveProps!="function"||(E||X!==x)&&Jh(t,d,n,x),pl=!1;var J=t.memoizedState;d.state=J,mi(t,n,d,u),hi(),X=t.memoizedState,E||J!==X||pl?(typeof oe=="function"&&(rd(t,a,oe,n),X=t.memoizedState),(A=pl||Xh(t,a,A,n,J,X,x))?(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=n,t.memoizedState=X),d.props=n,d.state=X,d.context=x,n=A):(typeof d.componentDidMount=="function"&&(t.flags|=4194308),n=!1)}else{d=t.stateNode,Ho(e,t),x=t.memoizedProps,re=ws(a,x),d.props=re,oe=t.pendingProps,J=d.context,X=a.contextType,A=Ta,typeof X=="object"&&X!==null&&(A=Jt(X)),E=a.getDerivedStateFromProps,(X=typeof E=="function"||typeof d.getSnapshotBeforeUpdate=="function")||typeof d.UNSAFE_componentWillReceiveProps!="function"&&typeof d.componentWillReceiveProps!="function"||(x!==oe||J!==A)&&Jh(t,d,n,A),pl=!1,J=t.memoizedState,d.state=J,mi(t,n,d,u),hi();var te=t.memoizedState;x!==oe||J!==te||pl||e!==null&&e.dependencies!==null&&lr(e.dependencies)?(typeof E=="function"&&(rd(t,a,E,n),te=t.memoizedState),(re=pl||Xh(t,a,re,n,J,te,A)||e!==null&&e.dependencies!==null&&lr(e.dependencies))?(X||typeof d.UNSAFE_componentWillUpdate!="function"&&typeof d.componentWillUpdate!="function"||(typeof d.componentWillUpdate=="function"&&d.componentWillUpdate(n,te,A),typeof d.UNSAFE_componentWillUpdate=="function"&&d.UNSAFE_componentWillUpdate(n,te,A)),typeof d.componentDidUpdate=="function"&&(t.flags|=4),typeof d.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof d.componentDidUpdate!="function"||x===e.memoizedProps&&J===e.memoizedState||(t.flags|=4),typeof d.getSnapshotBeforeUpdate!="function"||x===e.memoizedProps&&J===e.memoizedState||(t.flags|=1024),t.memoizedProps=n,t.memoizedState=te),d.props=n,d.state=te,d.context=A,n=re):(typeof d.componentDidUpdate!="function"||x===e.memoizedProps&&J===e.memoizedState||(t.flags|=4),typeof d.getSnapshotBeforeUpdate!="function"||x===e.memoizedProps&&J===e.memoizedState||(t.flags|=1024),n=!1)}return d=n,nc(e,t),n=(t.flags&128)!==0,d||n?(d=t.stateNode,a=n&&typeof a.getDerivedStateFromError!="function"?null:d.render(),t.flags|=1,e!==null&&n?(t.child=bs(t,e.child,null,u),t.child=bs(t,null,a,u)):Kt(e,t,a,u),t.memoizedState=d.state,e=t.child):e=Vn(e,t,u),e}function hm(e,t,a,n){return $t(),t.flags|=256,Kt(e,t,a,n),t.child}var dd={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function fd(e){return{baseLanes:e,cachePool:ah()}}function hd(e,t,a){return e=e!==null?e.childLanes&~a:0,t&&(e|=Da),e}function mm(e,t,a){var n=t.pendingProps,u=!1,d=(t.flags&128)!==0,x;if((x=d)||(x=e!==null&&e.memoizedState===null?!1:(Dt.current&2)!==0),x&&(u=!0,t.flags&=-129),x=(t.flags&32)!==0,t.flags&=-33,e===null){if(V){if(u?Sl(t):wl(),(e=L)?(e=w0(e,pe),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:xa!==null?{id:$a,overflow:g}:null,retryLane:536870912,hydrationErrors:null},a=Lu(e),a.return=t,t.child=a,H=t,L=null)):e=null,e===null)throw Ge(t);return Wd(e)?t.lanes=32:t.lanes=536870912,null}var E=n.children;return n=n.fallback,u?(wl(),u=t.mode,E=lc({mode:"hidden",children:E},u),n=Ya(n,u,a,null),E.return=t,n.return=t,E.sibling=n,t.child=E,n=t.child,n.memoizedState=fd(a),n.childLanes=hd(e,x,a),t.memoizedState=dd,vi(null,n)):(Sl(t),md(t,E))}var A=e.memoizedState;if(A!==null&&(E=A.dehydrated,E!==null)){if(d)t.flags&256?(Sl(t),t.flags&=-257,t=gd(e,t,a)):t.memoizedState!==null?(wl(),t.child=e.child,t.flags|=128,t=null):(wl(),E=n.fallback,u=t.mode,n=lc({mode:"visible",children:n.children},u),E=Ya(E,u,a,null),E.flags|=2,n.return=t,E.return=t,n.sibling=E,t.child=n,bs(t,e.child,null,a),n=t.child,n.memoizedState=fd(a),n.childLanes=hd(e,x,a),t.memoizedState=dd,t=vi(null,n));else if(Sl(t),Wd(E)){if(x=E.nextSibling&&E.nextSibling.dataset,x)var X=x.dgst;x=X,n=Error(c(419)),n.stack="",n.digest=x,sn({value:n,source:null,stack:null}),t=gd(e,t,a)}else if(Ht||Ga(e,t,a,!1),x=(a&e.childLanes)!==0,Ht||x){if(x=mt,x!==null&&(n=Lr(x,a),n!==0&&n!==A.retryLane))throw A.retryLane=n,Va(e,n),wa(x,e,n),cd;Qd(E)||hc(),t=gd(e,t,a)}else Qd(E)?(t.flags|=192,t.child=e.child,t=null):(e=A.treeContext,L=Pa(E.nextSibling),H=t,V=!0,de=null,pe=!1,e!==null&&C(t,e),t=md(t,n.children),t.flags|=4096);return t}return u?(wl(),E=n.fallback,u=t.mode,A=e.child,X=A.sibling,n=Ba(A,{mode:"hidden",children:n.children}),n.subtreeFlags=A.subtreeFlags&65011712,X!==null?E=Ba(X,E):(E=Ya(E,u,a,null),E.flags|=2),E.return=t,n.return=t,n.sibling=E,t.child=n,vi(null,n),n=t.child,E=e.child.memoizedState,E===null?E=fd(a):(u=E.cachePool,u!==null?(A=zt._currentValue,u=u.parent!==A?{parent:A,pool:A}:u):u=ah(),E={baseLanes:E.baseLanes|a,cachePool:u}),n.memoizedState=E,n.childLanes=hd(e,x,a),t.memoizedState=dd,vi(e.child,n)):(Sl(t),a=e.child,e=a.sibling,a=Ba(a,{mode:"visible",children:n.children}),a.return=t,a.sibling=null,e!==null&&(x=t.deletions,x===null?(t.deletions=[e],t.flags|=16):x.push(e)),t.child=a,t.memoizedState=null,a)}function md(e,t){return t=lc({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function lc(e,t){return e=Xt(22,e,null,t),e.lanes=0,e}function gd(e,t,a){return bs(t,e.child,null,a),e=md(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function gm(e,t,a){e.lanes|=t;var n=e.alternate;n!==null&&(n.lanes|=t),ii(e.return,t,a)}function yd(e,t,a,n,u,d){var x=e.memoizedState;x===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:n,tail:a,tailMode:u,treeForkCount:d}:(x.isBackwards=t,x.rendering=null,x.renderingStartTime=0,x.last=n,x.tail=a,x.tailMode=u,x.treeForkCount=d)}function ym(e,t,a){var n=t.pendingProps,u=n.revealOrder,d=n.tail;n=n.children;var x=Dt.current,E=(x&2)!==0;if(E?(x=x&1|2,t.flags|=128):x&=1,me(Dt,x),Kt(e,t,n,a),n=V?ln:0,!E&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&gm(e,a,t);else if(e.tag===19)gm(e,a,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(u){case"forwards":for(a=t.child,u=null;a!==null;)e=a.alternate,e!==null&&Zu(e)===null&&(u=a),a=a.sibling;a=u,a===null?(u=t.child,t.child=null):(u=a.sibling,a.sibling=null),yd(t,!1,u,a,d,n);break;case"backwards":case"unstable_legacy-backwards":for(a=null,u=t.child,t.child=null;u!==null;){if(e=u.alternate,e!==null&&Zu(e)===null){t.child=u;break}e=u.sibling,u.sibling=a,a=u,u=e}yd(t,!0,a,null,d,n);break;case"together":yd(t,!1,null,null,void 0,n);break;default:t.memoizedState=null}return t.child}function Vn(e,t,a){if(e!==null&&(t.dependencies=e.dependencies),El|=t.lanes,(a&t.childLanes)===0)if(e!==null){if(Ga(e,t,a,!1),(a&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(c(153));if(t.child!==null){for(e=t.child,a=Ba(e,e.pendingProps),t.child=a,a.return=t;e.sibling!==null;)e=e.sibling,a=a.sibling=Ba(e,e.pendingProps),a.return=t;a.sibling=null}return t.child}function xd(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&lr(e)))}function zx(e,t,a){switch(t.tag){case 3:rt(t,t.stateNode.containerInfo),bn(t,zt,e.memoizedState.cache),$t();break;case 27:case 5:ta(t);break;case 4:rt(t,t.stateNode.containerInfo);break;case 10:bn(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Yo(t),null;break;case 13:var n=t.memoizedState;if(n!==null)return n.dehydrated!==null?(Sl(t),t.flags|=128,null):(a&t.child.childLanes)!==0?mm(e,t,a):(Sl(t),e=Vn(e,t,a),e!==null?e.sibling:null);Sl(t);break;case 19:var u=(e.flags&128)!==0;if(n=(a&t.childLanes)!==0,n||(Ga(e,t,a,!1),n=(a&t.childLanes)!==0),u){if(n)return ym(e,t,a);t.flags|=128}if(u=t.memoizedState,u!==null&&(u.rendering=null,u.tail=null,u.lastEffect=null),me(Dt,Dt.current),n)break;return null;case 22:return t.lanes=0,um(e,t,a,t.pendingProps);case 24:bn(t,zt,e.memoizedState.cache)}return Vn(e,t,a)}function xm(e,t,a){if(e!==null)if(e.memoizedProps!==t.pendingProps)Ht=!0;else{if(!xd(e,a)&&(t.flags&128)===0)return Ht=!1,zx(e,t,a);Ht=(e.flags&131072)!==0}else Ht=!1,V&&(t.flags&1048576)!==0&&h(t,ln,t.index);switch(t.lanes=0,t.tag){case 16:e:{var n=t.pendingProps;if(e=ps(t.elementType),t.type=e,typeof e=="function")tr(e)?(n=ws(e,n),t.tag=1,t=fm(null,t,e,n,a)):(t.tag=0,t=od(null,t,e,n,a));else{if(e!=null){var u=e.$$typeof;if(u===K){t.tag=11,t=sm(null,t,e,n,a);break e}else if(u===G){t.tag=14,t=rm(null,t,e,n,a);break e}}throw t=ge(e)||e,Error(c(306,t,""))}}return t;case 0:return od(e,t,t.type,t.pendingProps,a);case 1:return n=t.type,u=ws(n,t.pendingProps),fm(e,t,n,u,a);case 3:e:{if(rt(t,t.stateNode.containerInfo),e===null)throw Error(c(387));n=t.pendingProps;var d=t.memoizedState;u=d.element,Ho(e,t),mi(t,n,null,a);var x=t.memoizedState;if(n=x.cache,bn(t,zt,n),n!==d.cache&&Hn(t,[zt],a,!0),hi(),n=x.element,d.isDehydrated)if(d={element:n,isDehydrated:!1,cache:x.cache},t.updateQueue.baseState=d,t.memoizedState=d,t.flags&256){t=hm(e,t,n,a);break e}else if(n!==u){u=ya(Error(c(424)),t),sn(u),t=hm(e,t,n,a);break e}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(L=Pa(e.firstChild),H=t,V=!0,de=null,pe=!0,a=uh(t,null,n,a),t.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling}else{if($t(),n===u){t=Vn(e,t,a);break e}Kt(e,t,n,a)}t=t.child}return t;case 26:return nc(e,t),e===null?(a=C0(t.type,null,t.pendingProps,null))?t.memoizedState=a:V||(a=t.type,e=t.pendingProps,n=bc(Te.current).createElement(a),n[Mt]=t,n[qt]=e,ea(n,a,e),kt(n),t.stateNode=n):t.memoizedState=C0(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return ta(t),e===null&&V&&(n=t.stateNode=E0(t.type,t.pendingProps,Te.current),H=t,pe=!0,u=L,Dl(t.type)?(Id=u,L=Pa(n.firstChild)):L=u),Kt(e,t,t.pendingProps.children,a),nc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&V&&((u=n=L)&&(n=dp(n,t.type,t.pendingProps,pe),n!==null?(t.stateNode=n,H=t,L=Pa(n.firstChild),pe=!1,u=!0):u=!1),u||Ge(t)),ta(t),u=t.type,d=t.pendingProps,x=e!==null?e.memoizedProps:null,n=d.children,Gd(u,d)?n=null:x!==null&&Gd(u,x)&&(t.flags|=32),t.memoizedState!==null&&(u=Fo(e,t,Tx,null,null,a),ki._currentValue=u),nc(e,t),Kt(e,t,n,a),t.child;case 6:return e===null&&V&&((e=a=L)&&(a=fp(a,t.pendingProps,pe),a!==null?(t.stateNode=a,H=t,L=null,e=!0):e=!1),e||Ge(t)),null;case 13:return mm(e,t,a);case 4:return rt(t,t.stateNode.containerInfo),n=t.pendingProps,e===null?t.child=bs(t,null,n,a):Kt(e,t,n,a),t.child;case 11:return sm(e,t,t.type,t.pendingProps,a);case 7:return Kt(e,t,t.pendingProps,a),t.child;case 8:return Kt(e,t,t.pendingProps.children,a),t.child;case 12:return Kt(e,t,t.pendingProps.children,a),t.child;case 10:return n=t.pendingProps,bn(t,t.type,n.value),Kt(e,t,n.children,a),t.child;case 9:return u=t.type._context,n=t.pendingProps.children,ys(t),u=Jt(u),n=n(u),t.flags|=1,Kt(e,t,n,a),t.child;case 14:return rm(e,t,t.type,t.pendingProps,a);case 15:return im(e,t,t.type,t.pendingProps,a);case 19:return ym(e,t,a);case 31:return kx(e,t,a);case 22:return um(e,t,a,t.pendingProps);case 24:return ys(t),n=Jt(zt),e===null?(u=ko(),u===null&&(u=mt,d=Ao(),u.pooledCache=d,d.refCount++,d!==null&&(u.pooledCacheLanes|=a),u=d),t.memoizedState={parent:n,cache:u},Uo(t),bn(t,zt,u)):((e.lanes&a)!==0&&(Ho(e,t),mi(t,null,null,a),hi()),u=e.memoizedState,d=t.memoizedState,u.parent!==n?(u={parent:n,cache:n},t.memoizedState=u,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=u),bn(t,zt,n)):(n=d.cache,bn(t,zt,n),n!==u.cache&&Hn(t,[zt],a,!0))),Kt(e,t,t.pendingProps.children,a),t.child;case 29:throw t.pendingProps}throw Error(c(156,t.tag))}function Bn(e){e.flags|=4}function pd(e,t,a,n,u){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(u&335544128)===u)if(e.stateNode.complete)e.flags|=8192;else if(Fm())e.flags|=8192;else throw vs=Yu,zo}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,!_0(t))if(Fm())e.flags|=8192;else throw vs=Yu,zo}function sc(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Hr():536870912,e.lanes|=t,yr|=t)}function bi(e,t){if(!V)switch(e.tailMode){case"hidden":t=e.tail;for(var a=null;t!==null;)t.alternate!==null&&(a=t),t=t.sibling;a===null?e.tail=null:a.sibling=null;break;case"collapsed":a=e.tail;for(var n=null;a!==null;)a.alternate!==null&&(n=a),a=a.sibling;n===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:n.sibling=null}}function vt(e){var t=e.alternate!==null&&e.alternate.child===e.child,a=0,n=0;if(t)for(var u=e.child;u!==null;)a|=u.lanes|u.childLanes,n|=u.subtreeFlags&65011712,n|=u.flags&65011712,u.return=e,u=u.sibling;else for(u=e.child;u!==null;)a|=u.lanes|u.childLanes,n|=u.subtreeFlags,n|=u.flags,u.return=e,u=u.sibling;return e.subtreeFlags|=n,e.childLanes=a,t}function Ux(e,t,a){var n=t.pendingProps;switch(N(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return vt(t),null;case 1:return vt(t),null;case 3:return a=t.stateNode,n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),rn(zt),Ie(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(e===null||e.child===null)&&(Yt(t)?Bn(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,vn())),vt(t),null;case 26:var u=t.type,d=t.memoizedState;return e===null?(Bn(t),d!==null?(vt(t),pm(t,d)):(vt(t),pd(t,u,null,n,a))):d?d!==e.memoizedState?(Bn(t),vt(t),pm(t,d)):(vt(t),t.flags&=-16777217):(e=e.memoizedProps,e!==n&&Bn(t),vt(t),pd(t,u,e,n,a)),null;case 27:if(ja(t),a=Te.current,u=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==n&&Bn(t);else{if(!n){if(t.stateNode===null)throw Error(c(166));return vt(t),null}e=xe.current,Yt(t)?De(t):(e=E0(u,n,a),t.stateNode=e,Bn(t))}return vt(t),null;case 5:if(ja(t),u=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==n&&Bn(t);else{if(!n){if(t.stateNode===null)throw Error(c(166));return vt(t),null}if(d=xe.current,Yt(t))De(t);else{var x=bc(Te.current);switch(d){case 1:d=x.createElementNS("http://www.w3.org/2000/svg",u);break;case 2:d=x.createElementNS("http://www.w3.org/1998/Math/MathML",u);break;default:switch(u){case"svg":d=x.createElementNS("http://www.w3.org/2000/svg",u);break;case"math":d=x.createElementNS("http://www.w3.org/1998/Math/MathML",u);break;case"script":d=x.createElement("div"),d.innerHTML="<script><\/script>",d=d.removeChild(d.firstChild);break;case"select":d=typeof n.is=="string"?x.createElement("select",{is:n.is}):x.createElement("select"),n.multiple?d.multiple=!0:n.size&&(d.size=n.size);break;default:d=typeof n.is=="string"?x.createElement(u,{is:n.is}):x.createElement(u)}}d[Mt]=t,d[qt]=n;e:for(x=t.child;x!==null;){if(x.tag===5||x.tag===6)d.appendChild(x.stateNode);else if(x.tag!==4&&x.tag!==27&&x.child!==null){x.child.return=x,x=x.child;continue}if(x===t)break e;for(;x.sibling===null;){if(x.return===null||x.return===t)break e;x=x.return}x.sibling.return=x.return,x=x.sibling}t.stateNode=d;e:switch(ea(d,u,n),u){case"button":case"input":case"select":case"textarea":n=!!n.autoFocus;break e;case"img":n=!0;break e;default:n=!1}n&&Bn(t)}}return vt(t),pd(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,a),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==n&&Bn(t);else{if(typeof n!="string"&&t.stateNode===null)throw Error(c(166));if(e=Te.current,Yt(t)){if(e=t.stateNode,a=t.memoizedProps,n=null,u=H,u!==null)switch(u.tag){case 27:case 5:n=u.memoizedProps}e[Mt]=t,e=!!(e.nodeValue===a||n!==null&&n.suppressHydrationWarning===!0||m0(e.nodeValue,a)),e||Ge(t,!0)}else e=bc(e).createTextNode(n),e[Mt]=t,t.stateNode=e}return vt(t),null;case 31:if(a=t.memoizedState,e===null||e.memoizedState!==null){if(n=Yt(t),a!==null){if(e===null){if(!n)throw Error(c(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(c(557));e[Mt]=t}else $t(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;vt(t),e=!1}else a=vn(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),e=!0;if(!e)return t.flags&256?(Ca(t),t):(Ca(t),null);if((t.flags&128)!==0)throw Error(c(558))}return vt(t),null;case 13:if(n=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(u=Yt(t),n!==null&&n.dehydrated!==null){if(e===null){if(!u)throw Error(c(318));if(u=t.memoizedState,u=u!==null?u.dehydrated:null,!u)throw Error(c(317));u[Mt]=t}else $t(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;vt(t),u=!1}else u=vn(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=u),u=!0;if(!u)return t.flags&256?(Ca(t),t):(Ca(t),null)}return Ca(t),(t.flags&128)!==0?(t.lanes=a,t):(a=n!==null,e=e!==null&&e.memoizedState!==null,a&&(n=t.child,u=null,n.alternate!==null&&n.alternate.memoizedState!==null&&n.alternate.memoizedState.cachePool!==null&&(u=n.alternate.memoizedState.cachePool.pool),d=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(d=n.memoizedState.cachePool.pool),d!==u&&(n.flags|=2048)),a!==e&&a&&(t.child.flags|=8192),sc(t,t.updateQueue),vt(t),null);case 4:return Ie(),e===null&&Vd(t.stateNode.containerInfo),vt(t),null;case 10:return rn(t.type),vt(t),null;case 19:if(le(Dt),n=t.memoizedState,n===null)return vt(t),null;if(u=(t.flags&128)!==0,d=n.rendering,d===null)if(u)bi(n,!1);else{if(Et!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(d=Zu(e),d!==null){for(t.flags|=128,bi(n,!1),e=d.updateQueue,t.updateQueue=e,sc(t,e),t.subtreeFlags=0,e=a,a=t.child;a!==null;)Hu(a,e),a=a.sibling;return me(Dt,Dt.current&1|2),V&&r(t,n.treeForkCount),t.child}e=e.sibling}n.tail!==null&&Tt()>oc&&(t.flags|=128,u=!0,bi(n,!1),t.lanes=4194304)}else{if(!u)if(e=Zu(d),e!==null){if(t.flags|=128,u=!0,e=e.updateQueue,t.updateQueue=e,sc(t,e),bi(n,!0),n.tail===null&&n.tailMode==="hidden"&&!d.alternate&&!V)return vt(t),null}else 2*Tt()-n.renderingStartTime>oc&&a!==536870912&&(t.flags|=128,u=!0,bi(n,!1),t.lanes=4194304);n.isBackwards?(d.sibling=t.child,t.child=d):(e=n.last,e!==null?e.sibling=d:t.child=d,n.last=d)}return n.tail!==null?(e=n.tail,n.rendering=e,n.tail=e.sibling,n.renderingStartTime=Tt(),e.sibling=null,a=Dt.current,me(Dt,u?a&1|2:a&1),V&&r(t,n.treeForkCount),e):(vt(t),null);case 22:case 23:return Ca(t),Bo(),n=t.memoizedState!==null,e!==null?e.memoizedState!==null!==n&&(t.flags|=8192):n&&(t.flags|=8192),n?(a&536870912)!==0&&(t.flags&128)===0&&(vt(t),t.subtreeFlags&6&&(t.flags|=8192)):vt(t),a=t.updateQueue,a!==null&&sc(t,a.retryQueue),a=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),n=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(n=t.memoizedState.cachePool.pool),n!==a&&(t.flags|=2048),e!==null&&le(xs),null;case 24:return a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),rn(zt),vt(t),null;case 25:return null;case 30:return null}throw Error(c(156,t.tag))}function Hx(e,t){switch(N(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return rn(zt),Ie(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return ja(t),null;case 31:if(t.memoizedState!==null){if(Ca(t),t.alternate===null)throw Error(c(340));$t()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Ca(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(c(340));$t()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return le(Dt),null;case 4:return Ie(),null;case 10:return rn(t.type),null;case 22:case 23:return Ca(t),Bo(),e!==null&&le(xs),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return rn(zt),null;case 25:return null;default:return null}}function vm(e,t){switch(N(t),t.tag){case 3:rn(zt),Ie();break;case 26:case 27:case 5:ja(t);break;case 4:Ie();break;case 31:t.memoizedState!==null&&Ca(t);break;case 13:Ca(t);break;case 19:le(Dt);break;case 10:rn(t.type);break;case 22:case 23:Ca(t),Bo(),e!==null&&le(xs);break;case 24:rn(zt)}}function Si(e,t){try{var a=t.updateQueue,n=a!==null?a.lastEffect:null;if(n!==null){var u=n.next;a=u;do{if((a.tag&e)===e){n=void 0;var d=a.create,x=a.inst;n=d(),x.destroy=n}a=a.next}while(a!==u)}}catch(E){ut(t,t.return,E)}}function Nl(e,t,a){try{var n=t.updateQueue,u=n!==null?n.lastEffect:null;if(u!==null){var d=u.next;n=d;do{if((n.tag&e)===e){var x=n.inst,E=x.destroy;if(E!==void 0){x.destroy=void 0,u=t;var A=a,X=E;try{X()}catch(re){ut(u,A,re)}}}n=n.next}while(n!==d)}}catch(re){ut(t,t.return,re)}}function bm(e){var t=e.updateQueue;if(t!==null){var a=e.stateNode;try{oh(t,a)}catch(n){ut(e,e.return,n)}}}function Sm(e,t,a){a.props=ws(e.type,e.memoizedProps),a.state=e.memoizedState;try{a.componentWillUnmount()}catch(n){ut(e,t,n)}}function wi(e,t){try{var a=e.ref;if(a!==null){switch(e.tag){case 26:case 27:case 5:var n=e.stateNode;break;case 30:n=e.stateNode;break;default:n=e.stateNode}typeof a=="function"?e.refCleanup=a(n):a.current=n}}catch(u){ut(e,t,u)}}function Sn(e,t){var a=e.ref,n=e.refCleanup;if(a!==null)if(typeof n=="function")try{n()}catch(u){ut(e,t,u)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof a=="function")try{a(null)}catch(u){ut(e,t,u)}else a.current=null}function wm(e){var t=e.type,a=e.memoizedProps,n=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":a.autoFocus&&n.focus();break e;case"img":a.src?n.src=a.src:a.srcSet&&(n.srcset=a.srcSet)}}catch(u){ut(e,e.return,u)}}function vd(e,t,a){try{var n=e.stateNode;sp(n,e.type,a,t),n[qt]=t}catch(u){ut(e,e.return,u)}}function Nm(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Dl(e.type)||e.tag===4}function bd(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Nm(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&&Dl(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 Sd(e,t,a){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a).insertBefore(e,t):(t=a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,t.appendChild(e),a=a._reactRootContainer,a!=null||t.onclick!==null||(t.onclick=Ha));else if(n!==4&&(n===27&&Dl(e.type)&&(a=e.stateNode,t=null),e=e.child,e!==null))for(Sd(e,t,a),e=e.sibling;e!==null;)Sd(e,t,a),e=e.sibling}function rc(e,t,a){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?a.insertBefore(e,t):a.appendChild(e);else if(n!==4&&(n===27&&Dl(e.type)&&(a=e.stateNode),e=e.child,e!==null))for(rc(e,t,a),e=e.sibling;e!==null;)rc(e,t,a),e=e.sibling}function jm(e){var t=e.stateNode,a=e.memoizedProps;try{for(var n=e.type,u=t.attributes;u.length;)t.removeAttributeNode(u[0]);ea(t,n,a),t[Mt]=e,t[qt]=a}catch(d){ut(e,e.return,d)}}var Yn=!1,Lt=!1,wd=!1,Em=typeof WeakSet=="function"?WeakSet:Set,Ft=null;function Lx(e,t){if(e=e.containerInfo,$d=Mc,e=Oo(e),Ws(e)){if("selectionStart"in e)var a={start:e.selectionStart,end:e.selectionEnd};else e:{a=(a=e.ownerDocument)&&a.defaultView||window;var n=a.getSelection&&a.getSelection();if(n&&n.rangeCount!==0){a=n.anchorNode;var u=n.anchorOffset,d=n.focusNode;n=n.focusOffset;try{a.nodeType,d.nodeType}catch{a=null;break e}var x=0,E=-1,A=-1,X=0,re=0,oe=e,J=null;t:for(;;){for(var te;oe!==a||u!==0&&oe.nodeType!==3||(E=x+u),oe!==d||n!==0&&oe.nodeType!==3||(A=x+n),oe.nodeType===3&&(x+=oe.nodeValue.length),(te=oe.firstChild)!==null;)J=oe,oe=te;for(;;){if(oe===e)break t;if(J===a&&++X===u&&(E=x),J===d&&++re===n&&(A=x),(te=oe.nextSibling)!==null)break;oe=J,J=oe.parentNode}oe=te}a=E===-1||A===-1?null:{start:E,end:A}}else a=null}a=a||{start:0,end:0}}else a=null;for(Fd={focusedElem:e,selectionRange:a},Mc=!1,Ft=t;Ft!==null;)if(t=Ft,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Ft=e;else for(;Ft!==null;){switch(t=Ft,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++)u=e[a],u.ref.impl=u.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&d!==null){e=void 0,a=t,u=d.memoizedProps,d=d.memoizedState,n=a.stateNode;try{var ve=ws(a.type,u);e=n.getSnapshotBeforeUpdate(ve,d),n.__reactInternalSnapshotBeforeUpdate=e}catch(Re){ut(a,a.return,Re)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,a=e.nodeType,a===9)Pd(e);else if(a===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Pd(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(c(163))}if(e=t.sibling,e!==null){e.return=t.return,Ft=e;break}Ft=t.return}}function Tm(e,t,a){var n=a.flags;switch(a.tag){case 0:case 11:case 15:Fn(e,a),n&4&&Si(5,a);break;case 1:if(Fn(e,a),n&4)if(e=a.stateNode,t===null)try{e.componentDidMount()}catch(x){ut(a,a.return,x)}else{var u=ws(a.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(u,t,e.__reactInternalSnapshotBeforeUpdate)}catch(x){ut(a,a.return,x)}}n&64&&bm(a),n&512&&wi(a,a.return);break;case 3:if(Fn(e,a),n&64&&(e=a.updateQueue,e!==null)){if(t=null,a.child!==null)switch(a.child.tag){case 27:case 5:t=a.child.stateNode;break;case 1:t=a.child.stateNode}try{oh(e,t)}catch(x){ut(a,a.return,x)}}break;case 27:t===null&&n&4&&jm(a);case 26:case 5:Fn(e,a),t===null&&n&4&&wm(a),n&512&&wi(a,a.return);break;case 12:Fn(e,a);break;case 31:Fn(e,a),n&4&&Om(e,a);break;case 13:Fn(e,a),n&4&&Dm(e,a),n&64&&(e=a.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(a=Px.bind(null,a),hp(e,a))));break;case 22:if(n=a.memoizedState!==null||Yn,!n){t=t!==null&&t.memoizedState!==null||Lt,u=Yn;var d=Lt;Yn=n,(Lt=t)&&!d?Gn(e,a,(a.subtreeFlags&8772)!==0):Fn(e,a),Yn=u,Lt=d}break;case 30:break;default:Fn(e,a)}}function Mm(e){var t=e.alternate;t!==null&&(e.alternate=null,Mm(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Ls(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var bt=null,pa=!1;function $n(e,t,a){for(a=a.child;a!==null;)Cm(e,t,a),a=a.sibling}function Cm(e,t,a){if(na&&typeof na.onCommitFiberUnmount=="function")try{na.onCommitFiberUnmount(Nt,a)}catch{}switch(a.tag){case 26:Lt||Sn(a,t),$n(e,t,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:Lt||Sn(a,t);var n=bt,u=pa;Dl(a.type)&&(bt=a.stateNode,pa=!1),$n(e,t,a),Ri(a.stateNode),bt=n,pa=u;break;case 5:Lt||Sn(a,t);case 6:if(n=bt,u=pa,bt=null,$n(e,t,a),bt=n,pa=u,bt!==null)if(pa)try{(bt.nodeType===9?bt.body:bt.nodeName==="HTML"?bt.ownerDocument.body:bt).removeChild(a.stateNode)}catch(d){ut(a,t,d)}else try{bt.removeChild(a.stateNode)}catch(d){ut(a,t,d)}break;case 18:bt!==null&&(pa?(e=bt,b0(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,a.stateNode),jr(e)):b0(bt,a.stateNode));break;case 4:n=bt,u=pa,bt=a.stateNode.containerInfo,pa=!0,$n(e,t,a),bt=n,pa=u;break;case 0:case 11:case 14:case 15:Nl(2,a,t),Lt||Nl(4,a,t),$n(e,t,a);break;case 1:Lt||(Sn(a,t),n=a.stateNode,typeof n.componentWillUnmount=="function"&&Sm(a,t,n)),$n(e,t,a);break;case 21:$n(e,t,a);break;case 22:Lt=(n=Lt)||a.memoizedState!==null,$n(e,t,a),Lt=n;break;default:$n(e,t,a)}}function Om(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{jr(e)}catch(a){ut(t,t.return,a)}}}function Dm(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{jr(e)}catch(a){ut(t,t.return,a)}}function qx(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Em),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Em),t;default:throw Error(c(435,e.tag))}}function ic(e,t){var a=qx(e);t.forEach(function(n){if(!a.has(n)){a.add(n);var u=Qx.bind(null,e,n);n.then(u,u)}})}function va(e,t){var a=t.deletions;if(a!==null)for(var n=0;n<a.length;n++){var u=a[n],d=e,x=t,E=x;e:for(;E!==null;){switch(E.tag){case 27:if(Dl(E.type)){bt=E.stateNode,pa=!1;break e}break;case 5:bt=E.stateNode,pa=!1;break e;case 3:case 4:bt=E.stateNode.containerInfo,pa=!0;break e}E=E.return}if(bt===null)throw Error(c(160));Cm(d,x,u),bt=null,pa=!1,d=u.alternate,d!==null&&(d.return=null),u.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Rm(t,e),t=t.sibling}var un=null;function Rm(e,t){var a=e.alternate,n=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:va(t,e),ba(e),n&4&&(Nl(3,e,e.return),Si(3,e),Nl(5,e,e.return));break;case 1:va(t,e),ba(e),n&512&&(Lt||a===null||Sn(a,a.return)),n&64&&Yn&&(e=e.updateQueue,e!==null&&(n=e.callbacks,n!==null&&(a=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=a===null?n:a.concat(n))));break;case 26:var u=un;if(va(t,e),ba(e),n&512&&(Lt||a===null||Sn(a,a.return)),n&4){var d=a!==null?a.memoizedState:null;if(n=e.memoizedState,a===null)if(n===null)if(e.stateNode===null){e:{n=e.type,a=e.memoizedProps,u=u.ownerDocument||u;t:switch(n){case"title":d=u.getElementsByTagName("title")[0],(!d||d[Gl]||d[Mt]||d.namespaceURI==="http://www.w3.org/2000/svg"||d.hasAttribute("itemprop"))&&(d=u.createElement(n),u.head.insertBefore(d,u.querySelector("head > title"))),ea(d,n,a),d[Mt]=e,kt(d),n=d;break e;case"link":var x=R0("link","href",u).get(n+(a.href||""));if(x){for(var E=0;E<x.length;E++)if(d=x[E],d.getAttribute("href")===(a.href==null||a.href===""?null:a.href)&&d.getAttribute("rel")===(a.rel==null?null:a.rel)&&d.getAttribute("title")===(a.title==null?null:a.title)&&d.getAttribute("crossorigin")===(a.crossOrigin==null?null:a.crossOrigin)){x.splice(E,1);break t}}d=u.createElement(n),ea(d,n,a),u.head.appendChild(d);break;case"meta":if(x=R0("meta","content",u).get(n+(a.content||""))){for(E=0;E<x.length;E++)if(d=x[E],d.getAttribute("content")===(a.content==null?null:""+a.content)&&d.getAttribute("name")===(a.name==null?null:a.name)&&d.getAttribute("property")===(a.property==null?null:a.property)&&d.getAttribute("http-equiv")===(a.httpEquiv==null?null:a.httpEquiv)&&d.getAttribute("charset")===(a.charSet==null?null:a.charSet)){x.splice(E,1);break t}}d=u.createElement(n),ea(d,n,a),u.head.appendChild(d);break;default:throw Error(c(468,n))}d[Mt]=e,kt(d),n=d}e.stateNode=n}else A0(u,e.type,e.stateNode);else e.stateNode=D0(u,n,e.memoizedProps);else d!==n?(d===null?a.stateNode!==null&&(a=a.stateNode,a.parentNode.removeChild(a)):d.count--,n===null?A0(u,e.type,e.stateNode):D0(u,n,e.memoizedProps)):n===null&&e.stateNode!==null&&vd(e,e.memoizedProps,a.memoizedProps)}break;case 27:va(t,e),ba(e),n&512&&(Lt||a===null||Sn(a,a.return)),a!==null&&n&4&&vd(e,e.memoizedProps,a.memoizedProps);break;case 5:if(va(t,e),ba(e),n&512&&(Lt||a===null||Sn(a,a.return)),e.flags&32){u=e.stateNode;try{en(u,"")}catch(ve){ut(e,e.return,ve)}}n&4&&e.stateNode!=null&&(u=e.memoizedProps,vd(e,u,a!==null?a.memoizedProps:u)),n&1024&&(wd=!0);break;case 6:if(va(t,e),ba(e),n&4){if(e.stateNode===null)throw Error(c(162));n=e.memoizedProps,a=e.stateNode;try{a.nodeValue=n}catch(ve){ut(e,e.return,ve)}}break;case 3:if(Nc=null,u=un,un=Sc(t.containerInfo),va(t,e),un=u,ba(e),n&4&&a!==null&&a.memoizedState.isDehydrated)try{jr(t.containerInfo)}catch(ve){ut(e,e.return,ve)}wd&&(wd=!1,Am(e));break;case 4:n=un,un=Sc(e.stateNode.containerInfo),va(t,e),ba(e),un=n;break;case 12:va(t,e),ba(e);break;case 31:va(t,e),ba(e),n&4&&(n=e.updateQueue,n!==null&&(e.updateQueue=null,ic(e,n)));break;case 13:va(t,e),ba(e),e.child.flags&8192&&e.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&(cc=Tt()),n&4&&(n=e.updateQueue,n!==null&&(e.updateQueue=null,ic(e,n)));break;case 22:u=e.memoizedState!==null;var A=a!==null&&a.memoizedState!==null,X=Yn,re=Lt;if(Yn=X||u,Lt=re||A,va(t,e),Lt=re,Yn=X,ba(e),n&8192)e:for(t=e.stateNode,t._visibility=u?t._visibility&-2:t._visibility|1,u&&(a===null||A||Yn||Lt||Ns(e)),a=null,t=e;;){if(t.tag===5||t.tag===26){if(a===null){A=a=t;try{if(d=A.stateNode,u)x=d.style,typeof x.setProperty=="function"?x.setProperty("display","none","important"):x.display="none";else{E=A.stateNode;var oe=A.memoizedProps.style,J=oe!=null&&oe.hasOwnProperty("display")?oe.display:null;E.style.display=J==null||typeof J=="boolean"?"":(""+J).trim()}}catch(ve){ut(A,A.return,ve)}}}else if(t.tag===6){if(a===null){A=t;try{A.stateNode.nodeValue=u?"":A.memoizedProps}catch(ve){ut(A,A.return,ve)}}}else if(t.tag===18){if(a===null){A=t;try{var te=A.stateNode;u?S0(te,!0):S0(A.stateNode,!1)}catch(ve){ut(A,A.return,ve)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;a===t&&(a=null),t=t.return}a===t&&(a=null),t.sibling.return=t.return,t=t.sibling}n&4&&(n=e.updateQueue,n!==null&&(a=n.retryQueue,a!==null&&(n.retryQueue=null,ic(e,a))));break;case 19:va(t,e),ba(e),n&4&&(n=e.updateQueue,n!==null&&(e.updateQueue=null,ic(e,n)));break;case 30:break;case 21:break;default:va(t,e),ba(e)}}function ba(e){var t=e.flags;if(t&2){try{for(var a,n=e.return;n!==null;){if(Nm(n)){a=n;break}n=n.return}if(a==null)throw Error(c(160));switch(a.tag){case 27:var u=a.stateNode,d=bd(e);rc(e,d,u);break;case 5:var x=a.stateNode;a.flags&32&&(en(x,""),a.flags&=-33);var E=bd(e);rc(e,E,x);break;case 3:case 4:var A=a.stateNode.containerInfo,X=bd(e);Sd(e,X,A);break;default:throw Error(c(161))}}catch(re){ut(e,e.return,re)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Am(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Am(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function Fn(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)Tm(e,t.alternate,t),t=t.sibling}function Ns(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Nl(4,t,t.return),Ns(t);break;case 1:Sn(t,t.return);var a=t.stateNode;typeof a.componentWillUnmount=="function"&&Sm(t,t.return,a),Ns(t);break;case 27:Ri(t.stateNode);case 26:case 5:Sn(t,t.return),Ns(t);break;case 22:t.memoizedState===null&&Ns(t);break;case 30:Ns(t);break;default:Ns(t)}e=e.sibling}}function Gn(e,t,a){for(a=a&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var n=t.alternate,u=e,d=t,x=d.flags;switch(d.tag){case 0:case 11:case 15:Gn(u,d,a),Si(4,d);break;case 1:if(Gn(u,d,a),n=d,u=n.stateNode,typeof u.componentDidMount=="function")try{u.componentDidMount()}catch(X){ut(n,n.return,X)}if(n=d,u=n.updateQueue,u!==null){var E=n.stateNode;try{var A=u.shared.hiddenCallbacks;if(A!==null)for(u.shared.hiddenCallbacks=null,u=0;u<A.length;u++)ch(A[u],E)}catch(X){ut(n,n.return,X)}}a&&x&64&&bm(d),wi(d,d.return);break;case 27:jm(d);case 26:case 5:Gn(u,d,a),a&&n===null&&x&4&&wm(d),wi(d,d.return);break;case 12:Gn(u,d,a);break;case 31:Gn(u,d,a),a&&x&4&&Om(u,d);break;case 13:Gn(u,d,a),a&&x&4&&Dm(u,d);break;case 22:d.memoizedState===null&&Gn(u,d,a),wi(d,d.return);break;case 30:break;default:Gn(u,d,a)}t=t.sibling}}function Nd(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&&ui(a))}function jd(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&ui(e))}function cn(e,t,a,n){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)_m(e,t,a,n),t=t.sibling}function _m(e,t,a,n){var u=t.flags;switch(t.tag){case 0:case 11:case 15:cn(e,t,a,n),u&2048&&Si(9,t);break;case 1:cn(e,t,a,n);break;case 3:cn(e,t,a,n),u&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&ui(e)));break;case 12:if(u&2048){cn(e,t,a,n),e=t.stateNode;try{var d=t.memoizedProps,x=d.id,E=d.onPostCommit;typeof E=="function"&&E(x,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(A){ut(t,t.return,A)}}else cn(e,t,a,n);break;case 31:cn(e,t,a,n);break;case 13:cn(e,t,a,n);break;case 23:break;case 22:d=t.stateNode,x=t.alternate,t.memoizedState!==null?d._visibility&2?cn(e,t,a,n):Ni(e,t):d._visibility&2?cn(e,t,a,n):(d._visibility|=2,hr(e,t,a,n,(t.subtreeFlags&10256)!==0||!1)),u&2048&&Nd(x,t);break;case 24:cn(e,t,a,n),u&2048&&jd(t.alternate,t);break;default:cn(e,t,a,n)}}function hr(e,t,a,n,u){for(u=u&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var d=e,x=t,E=a,A=n,X=x.flags;switch(x.tag){case 0:case 11:case 15:hr(d,x,E,A,u),Si(8,x);break;case 23:break;case 22:var re=x.stateNode;x.memoizedState!==null?re._visibility&2?hr(d,x,E,A,u):Ni(d,x):(re._visibility|=2,hr(d,x,E,A,u)),u&&X&2048&&Nd(x.alternate,x);break;case 24:hr(d,x,E,A,u),u&&X&2048&&jd(x.alternate,x);break;default:hr(d,x,E,A,u)}t=t.sibling}}function Ni(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var a=e,n=t,u=n.flags;switch(n.tag){case 22:Ni(a,n),u&2048&&Nd(n.alternate,n);break;case 24:Ni(a,n),u&2048&&jd(n.alternate,n);break;default:Ni(a,n)}t=t.sibling}}var ji=8192;function mr(e,t,a){if(e.subtreeFlags&ji)for(e=e.child;e!==null;)km(e,t,a),e=e.sibling}function km(e,t,a){switch(e.tag){case 26:mr(e,t,a),e.flags&ji&&e.memoizedState!==null&&Ep(a,un,e.memoizedState,e.memoizedProps);break;case 5:mr(e,t,a);break;case 3:case 4:var n=un;un=Sc(e.stateNode.containerInfo),mr(e,t,a),un=n;break;case 22:e.memoizedState===null&&(n=e.alternate,n!==null&&n.memoizedState!==null?(n=ji,ji=16777216,mr(e,t,a),ji=n):mr(e,t,a));break;default:mr(e,t,a)}}function zm(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function Ei(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var a=0;a<t.length;a++){var n=t[a];Ft=n,Hm(n,e)}zm(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Um(e),e=e.sibling}function Um(e){switch(e.tag){case 0:case 11:case 15:Ei(e),e.flags&2048&&Nl(9,e,e.return);break;case 3:Ei(e);break;case 12:Ei(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,uc(e)):Ei(e);break;default:Ei(e)}}function uc(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var a=0;a<t.length;a++){var n=t[a];Ft=n,Hm(n,e)}zm(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Nl(8,t,t.return),uc(t);break;case 22:a=t.stateNode,a._visibility&2&&(a._visibility&=-3,uc(t));break;default:uc(t)}e=e.sibling}}function Hm(e,t){for(;Ft!==null;){var a=Ft;switch(a.tag){case 0:case 11:case 15:Nl(8,a,t);break;case 23:case 22:if(a.memoizedState!==null&&a.memoizedState.cachePool!==null){var n=a.memoizedState.cachePool.pool;n!=null&&n.refCount++}break;case 24:ui(a.memoizedState.cache)}if(n=a.child,n!==null)n.return=a,Ft=n;else e:for(a=e;Ft!==null;){n=Ft;var u=n.sibling,d=n.return;if(Mm(n),n===a){Ft=null;break e}if(u!==null){u.return=d,Ft=u;break e}Ft=d}}}var Vx={getCacheForType:function(e){var t=Jt(zt),a=t.data.get(e);return a===void 0&&(a=e(),t.data.set(e,a)),a},cacheSignal:function(){return Jt(zt).controller.signal}},Bx=typeof WeakMap=="function"?WeakMap:Map,at=0,mt=null,Ye=null,Ze=0,it=0,Oa=null,jl=!1,gr=!1,Ed=!1,Zn=0,Et=0,El=0,js=0,Td=0,Da=0,yr=0,Ti=null,Sa=null,Md=!1,cc=0,Lm=0,oc=1/0,dc=null,Tl=null,Bt=0,Ml=null,xr=null,Pn=0,Cd=0,Od=null,qm=null,Mi=0,Dd=null;function Ra(){return(at&2)!==0&&Ze!==0?Ze&-Ze:$.T!==null?Ud():Hs()}function Vm(){if(Da===0)if((Ze&536870912)===0||V){var e=ks;ks<<=1,(ks&3932160)===0&&(ks=262144),Da=e}else Da=536870912;return e=Ma.current,e!==null&&(e.flags|=32),Da}function wa(e,t,a){(e===mt&&(it===2||it===9)||e.cancelPendingCommit!==null)&&(pr(e,0),Cl(e,Ze,Da,!1)),al(e,a),((at&2)===0||e!==mt)&&(e===mt&&((at&2)===0&&(js|=a),Et===4&&Cl(e,Ze,Da,!1)),wn(e))}function Bm(e,t,a){if((at&6)!==0)throw Error(c(327));var n=!a&&(t&127)===0&&(t&e.expiredLanes)===0||tl(e,t),u=n?Fx(e,t):Ad(e,t,!0),d=n;do{if(u===0){gr&&!n&&Cl(e,t,0,!1);break}else{if(a=e.current.alternate,d&&!Yx(a)){u=Ad(e,t,!1),d=!1;continue}if(u===2){if(d=t,e.errorRecoveryDisabledLanes&d)var x=0;else x=e.pendingLanes&-536870913,x=x!==0?x:x&536870912?536870912:0;if(x!==0){t=x;e:{var E=e;u=Ti;var A=E.current.memoizedState.isDehydrated;if(A&&(pr(E,x).flags|=256),x=Ad(E,x,!1),x!==2){if(Ed&&!A){E.errorRecoveryDisabledLanes|=d,js|=d,u=4;break e}d=Sa,Sa=u,d!==null&&(Sa===null?Sa=d:Sa.push.apply(Sa,d))}u=x}if(d=!1,u!==2)continue}}if(u===1){pr(e,0),Cl(e,t,0,!0);break}e:{switch(n=e,d=u,d){case 0:case 1:throw Error(c(345));case 4:if((t&4194048)!==t)break;case 6:Cl(n,t,Da,!jl);break e;case 2:Sa=null;break;case 3:case 5:break;default:throw Error(c(329))}if((t&62914560)===t&&(u=cc+300-Tt(),10<u)){if(Cl(n,t,Da,!jl),$l(n,0,!0)!==0)break e;Pn=t,n.timeoutHandle=p0(Ym.bind(null,n,a,Sa,dc,Md,t,Da,js,yr,jl,d,"Throttled",-0,0),u);break e}Ym(n,a,Sa,dc,Md,t,Da,js,yr,jl,d,null,-0,0)}}break}while(!0);wn(e)}function Ym(e,t,a,n,u,d,x,E,A,X,re,oe,J,te){if(e.timeoutHandle=-1,oe=t.subtreeFlags,oe&8192||(oe&16785408)===16785408){oe={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Ha},km(t,d,oe);var ve=(d&62914560)===d?cc-Tt():(d&4194048)===d?Lm-Tt():0;if(ve=Tp(oe,ve),ve!==null){Pn=d,e.cancelPendingCommit=ve(Im.bind(null,e,t,d,a,n,u,x,E,A,re,oe,null,J,te)),Cl(e,d,x,!X);return}}Im(e,t,d,a,n,u,x,E,A)}function Yx(e){for(var t=e;;){var a=t.tag;if((a===0||a===11||a===15)&&t.flags&16384&&(a=t.updateQueue,a!==null&&(a=a.stores,a!==null)))for(var n=0;n<a.length;n++){var u=a[n],d=u.getSnapshot;u=u.value;try{if(!ra(d(),u))return!1}catch{return!1}}if(a=t.child,t.subtreeFlags&16384&&a!==null)a.return=t,t=a;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Cl(e,t,a,n){t&=~Td,t&=~js,e.suspendedLanes|=t,e.pingedLanes&=~t,n&&(e.warmLanes|=t),n=e.expirationTimes;for(var u=t;0<u;){var d=31-Pt(u),x=1<<d;n[d]=-1,u&=~x}a!==0&&yt(e,a,t)}function fc(){return(at&6)===0?(Ci(0),!1):!0}function Rd(){if(Ye!==null){if(it===0)var e=Ye.return;else e=Ye,Fa=Un=null,Po(e),ur=null,oi=0,e=Ye;for(;e!==null;)vm(e.alternate,e),e=e.return;Ye=null}}function pr(e,t){var a=e.timeoutHandle;a!==-1&&(e.timeoutHandle=-1,up(a)),a=e.cancelPendingCommit,a!==null&&(e.cancelPendingCommit=null,a()),Pn=0,Rd(),mt=e,Ye=a=Ba(e.current,null),Ze=t,it=0,Oa=null,jl=!1,gr=tl(e,t),Ed=!1,yr=Da=Td=js=El=Et=0,Sa=Ti=null,Md=!1,(t&8)!==0&&(t|=t&32);var n=e.entangledLanes;if(n!==0)for(e=e.entanglements,n&=t;0<n;){var u=31-Pt(n),d=1<<u;t|=e[u],n&=~d}return Zn=t,yl(),a}function $m(e,t){He=null,$.H=pi,t===ir||t===Bu?(t=sh(),it=3):t===zo?(t=sh(),it=4):it=t===cd?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,Oa=t,Ye===null&&(Et=1,tc(e,ya(t,e.current)))}function Fm(){var e=Ma.current;return e===null?!0:(Ze&4194048)===Ze?Za===null:(Ze&62914560)===Ze||(Ze&536870912)!==0?e===Za:!1}function Gm(){var e=$.H;return $.H=pi,e===null?pi:e}function Zm(){var e=$.A;return $.A=Vx,e}function hc(){Et=4,jl||(Ze&4194048)!==Ze&&Ma.current!==null||(gr=!0),(El&134217727)===0&&(js&134217727)===0||mt===null||Cl(mt,Ze,Da,!1)}function Ad(e,t,a){var n=at;at|=2;var u=Gm(),d=Zm();(mt!==e||Ze!==t)&&(dc=null,pr(e,t)),t=!1;var x=Et;e:do try{if(it!==0&&Ye!==null){var E=Ye,A=Oa;switch(it){case 8:Rd(),x=6;break e;case 3:case 2:case 9:case 6:Ma.current===null&&(t=!0);var X=it;if(it=0,Oa=null,vr(e,E,A,X),a&&gr){x=0;break e}break;default:X=it,it=0,Oa=null,vr(e,E,A,X)}}$x(),x=Et;break}catch(re){$m(e,re)}while(!0);return t&&e.shellSuspendCounter++,Fa=Un=null,at=n,$.H=u,$.A=d,Ye===null&&(mt=null,Ze=0,yl()),x}function $x(){for(;Ye!==null;)Pm(Ye)}function Fx(e,t){var a=at;at|=2;var n=Gm(),u=Zm();mt!==e||Ze!==t?(dc=null,oc=Tt()+500,pr(e,t)):gr=tl(e,t);e:do try{if(it!==0&&Ye!==null){t=Ye;var d=Oa;t:switch(it){case 1:it=0,Oa=null,vr(e,t,d,1);break;case 2:case 9:if(nh(d)){it=0,Oa=null,Qm(t);break}t=function(){it!==2&&it!==9||mt!==e||(it=7),wn(e)},d.then(t,t);break e;case 3:it=7;break e;case 4:it=5;break e;case 7:nh(d)?(it=0,Oa=null,Qm(t)):(it=0,Oa=null,vr(e,t,d,7));break;case 5:var x=null;switch(Ye.tag){case 26:x=Ye.memoizedState;case 5:case 27:var E=Ye;if(x?_0(x):E.stateNode.complete){it=0,Oa=null;var A=E.sibling;if(A!==null)Ye=A;else{var X=E.return;X!==null?(Ye=X,mc(X)):Ye=null}break t}}it=0,Oa=null,vr(e,t,d,5);break;case 6:it=0,Oa=null,vr(e,t,d,6);break;case 8:Rd(),Et=6;break e;default:throw Error(c(462))}}Gx();break}catch(re){$m(e,re)}while(!0);return Fa=Un=null,$.H=n,$.A=u,at=a,Ye!==null?0:(mt=null,Ze=0,yl(),Et)}function Gx(){for(;Ye!==null&&!aa();)Pm(Ye)}function Pm(e){var t=xm(e.alternate,e,Zn);e.memoizedProps=e.pendingProps,t===null?mc(e):Ye=t}function Qm(e){var t=e,a=t.alternate;switch(t.tag){case 15:case 0:t=dm(a,t,t.pendingProps,t.type,void 0,Ze);break;case 11:t=dm(a,t,t.pendingProps,t.type.render,t.ref,Ze);break;case 5:Po(t);default:vm(a,t),t=Ye=Hu(t,Zn),t=xm(a,t,Zn)}e.memoizedProps=e.pendingProps,t===null?mc(e):Ye=t}function vr(e,t,a,n){Fa=Un=null,Po(t),ur=null,oi=0;var u=t.return;try{if(_x(e,u,t,a,Ze)){Et=1,tc(e,ya(a,e.current)),Ye=null;return}}catch(d){if(u!==null)throw Ye=u,d;Et=1,tc(e,ya(a,e.current)),Ye=null;return}t.flags&32768?(V||n===1?e=!0:gr||(Ze&536870912)!==0?e=!1:(jl=e=!0,(n===2||n===9||n===3||n===6)&&(n=Ma.current,n!==null&&n.tag===13&&(n.flags|=16384))),Wm(t,e)):mc(t)}function mc(e){var t=e;do{if((t.flags&32768)!==0){Wm(t,jl);return}e=t.return;var a=Ux(t.alternate,t,Zn);if(a!==null){Ye=a;return}if(t=t.sibling,t!==null){Ye=t;return}Ye=t=e}while(t!==null);Et===0&&(Et=5)}function Wm(e,t){do{var a=Hx(e.alternate,e);if(a!==null){a.flags&=32767,Ye=a;return}if(a=e.return,a!==null&&(a.flags|=32768,a.subtreeFlags=0,a.deletions=null),!t&&(e=e.sibling,e!==null)){Ye=e;return}Ye=e=a}while(e!==null);Et=6,Ye=null}function Im(e,t,a,n,u,d,x,E,A){e.cancelPendingCommit=null;do gc();while(Bt!==0);if((at&6)!==0)throw Error(c(327));if(t!==null){if(t===e.current)throw Error(c(177));if(d=t.lanes|t.childLanes,d|=fs,cu(e,a,d,x,E,A),e===mt&&(Ye=mt=null,Ze=0),xr=t,Ml=e,Pn=a,Cd=d,Od=u,qm=n,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,Wx(_s,function(){return t0(),null})):(e.callbackNode=null,e.callbackPriority=0),n=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||n){n=$.T,$.T=null,u=ie.p,ie.p=2,x=at,at|=4;try{Lx(e,t,a)}finally{at=x,ie.p=u,$.T=n}}Bt=1,Xm(),Jm(),Km()}}function Xm(){if(Bt===1){Bt=0;var e=Ml,t=xr,a=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||a){a=$.T,$.T=null;var n=ie.p;ie.p=2;var u=at;at|=4;try{Rm(t,e);var d=Fd,x=Oo(e.containerInfo),E=d.focusedElem,A=d.selectionRange;if(x!==E&&E&&E.ownerDocument&&Qe(E.ownerDocument.documentElement,E)){if(A!==null&&Ws(E)){var X=A.start,re=A.end;if(re===void 0&&(re=X),"selectionStart"in E)E.selectionStart=X,E.selectionEnd=Math.min(re,E.value.length);else{var oe=E.ownerDocument||document,J=oe&&oe.defaultView||window;if(J.getSelection){var te=J.getSelection(),ve=E.textContent.length,Re=Math.min(A.start,ve),ft=A.end===void 0?Re:Math.min(A.end,ve);!te.extend&&Re>ft&&(x=ft,ft=Re,Re=x);var F=Ru(E,Re),q=Ru(E,ft);if(F&&q&&(te.rangeCount!==1||te.anchorNode!==F.node||te.anchorOffset!==F.offset||te.focusNode!==q.node||te.focusOffset!==q.offset)){var I=oe.createRange();I.setStart(F.node,F.offset),te.removeAllRanges(),Re>ft?(te.addRange(I),te.extend(q.node,q.offset)):(I.setEnd(q.node,q.offset),te.addRange(I))}}}}for(oe=[],te=E;te=te.parentNode;)te.nodeType===1&&oe.push({element:te,left:te.scrollLeft,top:te.scrollTop});for(typeof E.focus=="function"&&E.focus(),E=0;E<oe.length;E++){var ce=oe[E];ce.element.scrollLeft=ce.left,ce.element.scrollTop=ce.top}}Mc=!!$d,Fd=$d=null}finally{at=u,ie.p=n,$.T=a}}e.current=t,Bt=2}}function Jm(){if(Bt===2){Bt=0;var e=Ml,t=xr,a=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||a){a=$.T,$.T=null;var n=ie.p;ie.p=2;var u=at;at|=4;try{Tm(e,t.alternate,t)}finally{at=u,ie.p=n,$.T=a}}Bt=3}}function Km(){if(Bt===4||Bt===3){Bt=0,Ua();var e=Ml,t=xr,a=Pn,n=qm;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?Bt=5:(Bt=0,xr=Ml=null,e0(e,e.pendingLanes));var u=e.pendingLanes;if(u===0&&(Tl=null),sa(a),t=t.stateNode,na&&typeof na.onCommitFiberRoot=="function")try{na.onCommitFiberRoot(Nt,t,void 0,(t.current.flags&128)===128)}catch{}if(n!==null){t=$.T,u=ie.p,ie.p=2,$.T=null;try{for(var d=e.onRecoverableError,x=0;x<n.length;x++){var E=n[x];d(E.value,{componentStack:E.stack})}}finally{$.T=t,ie.p=u}}(Pn&3)!==0&&gc(),wn(e),u=e.pendingLanes,(a&261930)!==0&&(u&42)!==0?e===Dd?Mi++:(Mi=0,Dd=e):Mi=0,Ci(0)}}function e0(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,ui(t)))}function gc(){return Xm(),Jm(),Km(),t0()}function t0(){if(Bt!==5)return!1;var e=Ml,t=Cd;Cd=0;var a=sa(Pn),n=$.T,u=ie.p;try{ie.p=32>a?32:a,$.T=null,a=Od,Od=null;var d=Ml,x=Pn;if(Bt=0,xr=Ml=null,Pn=0,(at&6)!==0)throw Error(c(331));var E=at;if(at|=4,Um(d.current),_m(d,d.current,x,a),at=E,Ci(0,!1),na&&typeof na.onPostCommitFiberRoot=="function")try{na.onPostCommitFiberRoot(Nt,d)}catch{}return!0}finally{ie.p=u,$.T=n,e0(e,t)}}function a0(e,t,a){t=ya(a,t),t=ud(e.stateNode,t,2),e=bl(e,t,2),e!==null&&(al(e,2),wn(e))}function ut(e,t,a){if(e.tag===3)a0(e,e,a);else for(;t!==null;){if(t.tag===3){a0(t,e,a);break}else if(t.tag===1){var n=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof n.componentDidCatch=="function"&&(Tl===null||!Tl.has(n))){e=ya(a,e),a=nm(2),n=bl(t,a,2),n!==null&&(lm(a,n,t,e),al(n,2),wn(n));break}}t=t.return}}function _d(e,t,a){var n=e.pingCache;if(n===null){n=e.pingCache=new Bx;var u=new Set;n.set(t,u)}else u=n.get(t),u===void 0&&(u=new Set,n.set(t,u));u.has(a)||(Ed=!0,u.add(a),e=Zx.bind(null,e,t,a),t.then(e,e))}function Zx(e,t,a){var n=e.pingCache;n!==null&&n.delete(t),e.pingedLanes|=e.suspendedLanes&a,e.warmLanes&=~a,mt===e&&(Ze&a)===a&&(Et===4||Et===3&&(Ze&62914560)===Ze&&300>Tt()-cc?(at&2)===0&&pr(e,0):Td|=a,yr===Ze&&(yr=0)),wn(e)}function n0(e,t){t===0&&(t=Hr()),e=Va(e,t),e!==null&&(al(e,t),wn(e))}function Px(e){var t=e.memoizedState,a=0;t!==null&&(a=t.retryLane),n0(e,a)}function Qx(e,t){var a=0;switch(e.tag){case 31:case 13:var n=e.stateNode,u=e.memoizedState;u!==null&&(a=u.retryLane);break;case 19:n=e.stateNode;break;case 22:n=e.stateNode._retryCache;break;default:throw Error(c(314))}n!==null&&n.delete(t),n0(e,a)}function Wx(e,t){return _t(e,t)}var yc=null,br=null,kd=!1,xc=!1,zd=!1,Ol=0;function wn(e){e!==br&&e.next===null&&(br===null?yc=br=e:br=br.next=e),xc=!0,kd||(kd=!0,Xx())}function Ci(e,t){if(!zd&&xc){zd=!0;do for(var a=!1,n=yc;n!==null;){if(e!==0){var u=n.pendingLanes;if(u===0)var d=0;else{var x=n.suspendedLanes,E=n.pingedLanes;d=(1<<31-Pt(42|e)+1)-1,d&=u&~(x&~E),d=d&201326741?d&201326741|1:d?d|2:0}d!==0&&(a=!0,i0(n,d))}else d=Ze,d=$l(n,n===mt?d:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),(d&3)===0||tl(n,d)||(a=!0,i0(n,d));n=n.next}while(a);zd=!1}}function Ix(){l0()}function l0(){xc=kd=!1;var e=0;Ol!==0&&ip()&&(e=Ol);for(var t=Tt(),a=null,n=yc;n!==null;){var u=n.next,d=s0(n,t);d===0?(n.next=null,a===null?yc=u:a.next=u,u===null&&(br=a)):(a=n,(e!==0||(d&3)!==0)&&(xc=!0)),n=u}Bt!==0&&Bt!==5||Ci(e),Ol!==0&&(Ol=0)}function s0(e,t){for(var a=e.suspendedLanes,n=e.pingedLanes,u=e.expirationTimes,d=e.pendingLanes&-62914561;0<d;){var x=31-Pt(d),E=1<<x,A=u[x];A===-1?((E&a)===0||(E&n)!==0)&&(u[x]=uu(E,t)):A<=t&&(e.expiredLanes|=E),d&=~E}if(t=mt,a=Ze,a=$l(e,e===t?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),n=e.callbackNode,a===0||e===t&&(it===2||it===9)||e.cancelPendingCommit!==null)return n!==null&&n!==null&>(n),e.callbackNode=null,e.callbackPriority=0;if((a&3)===0||tl(e,a)){if(t=a&-a,t===e.callbackPriority)return t;switch(n!==null&>(n),sa(a)){case 2:case 8:a=Yl;break;case 32:a=_s;break;case 268435456:a=zr;break;default:a=_s}return n=r0.bind(null,e),a=_t(a,n),e.callbackPriority=t,e.callbackNode=a,t}return n!==null&&n!==null&>(n),e.callbackPriority=2,e.callbackNode=null,2}function r0(e,t){if(Bt!==0&&Bt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var a=e.callbackNode;if(gc()&&e.callbackNode!==a)return null;var n=Ze;return n=$l(e,e===mt?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),n===0?null:(Bm(e,n,t),s0(e,Tt()),e.callbackNode!=null&&e.callbackNode===a?r0.bind(null,e):null)}function i0(e,t){if(gc())return null;Bm(e,t,!0)}function Xx(){cp(function(){(at&6)!==0?_t(Bl,Ix):l0()})}function Ud(){if(Ol===0){var e=sr;e===0&&(e=el,el<<=1,(el&261888)===0&&(el=256)),Ol=e}return Ol}function u0(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:Xl(""+e)}function c0(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 Jx(e,t,a,n,u){if(t==="submit"&&a&&a.stateNode===u){var d=u0((u[qt]||null).action),x=n.submitter;x&&(t=(t=x[qt]||null)?u0(t.formAction):x.getAttribute("formAction"),t!==null&&(d=t,x=null));var E=new ts("action","action",null,n,u);e.push({event:E,listeners:[{instance:null,listener:function(){if(n.defaultPrevented){if(Ol!==0){var A=x?c0(u,x):new FormData(u);ad(a,{pending:!0,data:A,method:u.method,action:d},null,A)}}else typeof d=="function"&&(E.preventDefault(),A=x?c0(u,x):new FormData(u),ad(a,{pending:!0,data:A,method:u.method,action:d},d,A))},currentTarget:u}]})}}for(var Hd=0;Hd<li.length;Hd++){var Ld=li[Hd],Kx=Ld.toLowerCase(),ep=Ld[0].toUpperCase()+Ld.slice(1);ga(Kx,"on"+ep)}ga(ku,"onAnimationEnd"),ga(zu,"onAnimationIteration"),ga(Js,"onAnimationStart"),ga("dblclick","onDoubleClick"),ga("focusin","onFocus"),ga("focusout","onBlur"),ga(Do,"onTransitionRun"),ga(Ro,"onTransitionStart"),ga(Uu,"onTransitionCancel"),ga(ai,"onTransitionEnd"),nl("onMouseEnter",["mouseout","mouseover"]),nl("onMouseLeave",["mouseout","mouseover"]),nl("onPointerEnter",["pointerout","pointerover"]),nl("onPointerLeave",["pointerout","pointerover"]),mn("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),mn("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),mn("onBeforeInput",["compositionend","keypress","textInput","paste"]),mn("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),mn("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),mn("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Oi="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(" "),tp=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Oi));function o0(e,t){t=(t&4)!==0;for(var a=0;a<e.length;a++){var n=e[a],u=n.event;n=n.listeners;e:{var d=void 0;if(t)for(var x=n.length-1;0<=x;x--){var E=n[x],A=E.instance,X=E.currentTarget;if(E=E.listener,A!==d&&u.isPropagationStopped())break e;d=E,u.currentTarget=X;try{d(u)}catch(re){gl(re)}u.currentTarget=null,d=A}else for(x=0;x<n.length;x++){if(E=n[x],A=E.instance,X=E.currentTarget,E=E.listener,A!==d&&u.isPropagationStopped())break e;d=E,u.currentTarget=X;try{d(u)}catch(re){gl(re)}u.currentTarget=null,d=A}}}}function $e(e,t){var a=t[Fl];a===void 0&&(a=t[Fl]=new Set);var n=e+"__bubble";a.has(n)||(d0(t,e,2,!1),a.add(n))}function qd(e,t,a){var n=0;t&&(n|=4),d0(a,e,n,t)}var pc="_reactListening"+Math.random().toString(36).slice(2);function Vd(e){if(!e[pc]){e[pc]=!0,hu.forEach(function(a){a!=="selectionchange"&&(tp.has(a)||qd(a,!1,e),qd(a,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[pc]||(t[pc]=!0,qd("selectionchange",!1,t))}}function d0(e,t,a,n){switch(V0(t)){case 2:var u=Op;break;case 8:u=Dp;break;default:u=tf}a=u.bind(null,t,a,e),u=void 0,!Pr||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(u=!0),n?u!==void 0?e.addEventListener(t,a,{capture:!0,passive:u}):e.addEventListener(t,a,!0):u!==void 0?e.addEventListener(t,a,{passive:u}):e.addEventListener(t,a,!1)}function Bd(e,t,a,n,u){var d=n;if((t&1)===0&&(t&2)===0&&n!==null)e:for(;;){if(n===null)return;var x=n.tag;if(x===3||x===4){var E=n.stateNode.containerInfo;if(E===u)break;if(x===4)for(x=n.return;x!==null;){var A=x.tag;if((A===3||A===4)&&x.stateNode.containerInfo===u)return;x=x.return}for(;E!==null;){if(x=Mn(E),x===null)return;if(A=x.tag,A===5||A===6||A===26||A===27){n=d=x;continue e}E=E.parentNode}}n=n.return}Zr(function(){var X=d,re=$s(a),oe=[];e:{var J=ni.get(e);if(J!==void 0){var te=ts,ve=e;switch(e){case"keypress":if(es(a)===0)break e;case"keydown":case"keyup":te=go;break;case"focusin":ve="focus",te=Qs;break;case"focusout":ve="blur",te=Qs;break;case"beforeblur":case"afterblur":te=Qs;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=vu;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":te=so;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":te=po;break;case ku:case zu:case Js:te=il;break;case ai:te=vo;break;case"scroll":case"scrollend":te=Qr;break;case"wheel":te=So;break;case"copy":case"cut":case"paste":te=ul;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":te=bu;break;case"toggle":case"beforetoggle":te=No}var Re=(t&4)!==0,ft=!Re&&(e==="scroll"||e==="scrollend"),F=Re?J!==null?J+"Capture":null:J;Re=[];for(var q=X,I;q!==null;){var ce=q;if(I=ce.stateNode,ce=ce.tag,ce!==5&&ce!==26&&ce!==27||I===null||F===null||(ce=Jl(q,F),ce!=null&&Re.push(Di(q,ce,I))),ft)break;q=q.return}0<Re.length&&(J=new te(J,ve,null,a,re),oe.push({event:J,listeners:Re}))}}if((t&7)===0){e:{if(J=e==="mouseover"||e==="pointerover",te=e==="mouseout"||e==="pointerout",J&&a!==Fr&&(ve=a.relatedTarget||a.fromElement)&&(Mn(ve)||ve[Tn]))break e;if((te||J)&&(J=re.window===re?re:(J=re.ownerDocument)?J.defaultView||J.parentWindow:window,te?(ve=a.relatedTarget||a.toElement,te=X,ve=ve?Mn(ve):null,ve!==null&&(ft=f(ve),Re=ve.tag,ve!==ft||Re!==5&&Re!==27&&Re!==6)&&(ve=null)):(te=null,ve=X),te!==ve)){if(Re=vu,ce="onMouseLeave",F="onMouseEnter",q="mouse",(e==="pointerout"||e==="pointerover")&&(Re=bu,ce="onPointerLeave",F="onPointerEnter",q="pointer"),ft=te==null?J:ha(te),I=ve==null?J:ha(ve),J=new Re(ce,q+"leave",te,a,re),J.target=ft,J.relatedTarget=I,ce=null,Mn(re)===X&&(Re=new Re(F,q+"enter",ve,a,re),Re.target=I,Re.relatedTarget=ft,ce=Re),ft=ce,te&&ve)t:{for(Re=ap,F=te,q=ve,I=0,ce=F;ce;ce=Re(ce))I++;ce=0;for(var Me=q;Me;Me=Re(Me))ce++;for(;0<I-ce;)F=Re(F),I--;for(;0<ce-I;)q=Re(q),ce--;for(;I--;){if(F===q||q!==null&&F===q.alternate){Re=F;break t}F=Re(F),q=Re(q)}Re=null}else Re=null;te!==null&&f0(oe,J,te,Re,!1),ve!==null&&ft!==null&&f0(oe,ft,ve,Re,!0)}}e:{if(J=X?ha(X):window,te=J.nodeName&&J.nodeName.toLowerCase(),te==="select"||te==="input"&&J.type==="file")var Je=Ou;else if(Cu(J))if(pn)Je=pt;else{Je=fl;var be=Fe}else te=J.nodeName,!te||te.toLowerCase()!=="input"||J.type!=="checkbox"&&J.type!=="radio"?X&&Ys(X.elementType)&&(Je=Ou):Je=Co;if(Je&&(Je=Je(e,X))){Ir(oe,Je,a,re);break e}be&&be(e,J,X),e==="focusout"&&X&&J.type==="number"&&X.memoizedProps.value!=null&&Pl(J,"number",J.value)}switch(be=X?ha(X):window,e){case"focusin":(Cu(be)||be.contentEditable==="true")&&(hl=be,Is=X,It=null);break;case"focusout":It=Is=hl=null;break;case"mousedown":Xs=!0;break;case"contextmenu":case"mouseup":case"dragend":Xs=!1,ds(oe,a,re);break;case"selectionchange":if(Au)break;case"keydown":case"keyup":ds(oe,a,re)}var qe;if(Wr)e:{switch(e){case"compositionstart":var Pe="onCompositionStart";break e;case"compositionend":Pe="onCompositionEnd";break e;case"compositionupdate":Pe="onCompositionUpdate";break e}Pe=void 0}else ol?Tu(e,a)&&(Pe="onCompositionEnd"):e==="keydown"&&a.keyCode===229&&(Pe="onCompositionStart");Pe&&(Nu&&a.locale!=="ko"&&(ol||Pe!=="onCompositionStart"?Pe==="onCompositionEnd"&&ol&&(qe=Vt()):(yn=re,Fs="value"in yn?yn.value:yn.textContent,ol=!0)),be=vc(X,Pe),0<be.length&&(Pe=new cl(Pe,e,null,a,re),oe.push({event:Pe,listeners:be}),qe?Pe.data=qe:(qe=Mu(a),qe!==null&&(Pe.data=qe)))),(qe=jo?Eo(e,a):To(e,a))&&(Pe=vc(X,"onBeforeInput"),0<Pe.length&&(be=new cl("onBeforeInput","beforeinput",null,a,re),oe.push({event:be,listeners:Pe}),be.data=qe)),Jx(oe,e,X,a,re)}o0(oe,t)})}function Di(e,t,a){return{instance:e,listener:t,currentTarget:a}}function vc(e,t){for(var a=t+"Capture",n=[];e!==null;){var u=e,d=u.stateNode;if(u=u.tag,u!==5&&u!==26&&u!==27||d===null||(u=Jl(e,a),u!=null&&n.unshift(Di(e,u,d)),u=Jl(e,t),u!=null&&n.push(Di(e,u,d))),e.tag===3)return n;e=e.return}return[]}function ap(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function f0(e,t,a,n,u){for(var d=t._reactName,x=[];a!==null&&a!==n;){var E=a,A=E.alternate,X=E.stateNode;if(E=E.tag,A!==null&&A===n)break;E!==5&&E!==26&&E!==27||X===null||(A=X,u?(X=Jl(a,d),X!=null&&x.unshift(Di(a,X,A))):u||(X=Jl(a,d),X!=null&&x.push(Di(a,X,A)))),a=a.return}x.length!==0&&e.push({event:t,listeners:x})}var np=/\r\n?/g,lp=/\u0000|\uFFFD/g;function h0(e){return(typeof e=="string"?e:""+e).replace(np,`
|
|
49
|
+
`).replace(lp,"")}function m0(e,t){return t=h0(t),h0(e)===t}function dt(e,t,a,n,u,d){switch(a){case"children":typeof n=="string"?t==="body"||t==="textarea"&&n===""||en(e,n):(typeof n=="number"||typeof n=="bigint")&&t!=="body"&&en(e,""+n);break;case"className":qs(e,"class",n);break;case"tabIndex":qs(e,"tabindex",n);break;case"dir":case"role":case"viewBox":case"width":case"height":qs(e,a,n);break;case"style":yu(e,n,d);break;case"data":if(t!=="object"){qs(e,"data",n);break}case"src":case"href":if(n===""&&(t!=="a"||a!=="href")){e.removeAttribute(a);break}if(n==null||typeof n=="function"||typeof n=="symbol"||typeof n=="boolean"){e.removeAttribute(a);break}n=Xl(""+n),e.setAttribute(a,n);break;case"action":case"formAction":if(typeof n=="function"){e.setAttribute(a,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof d=="function"&&(a==="formAction"?(t!=="input"&&dt(e,t,"name",u.name,u,null),dt(e,t,"formEncType",u.formEncType,u,null),dt(e,t,"formMethod",u.formMethod,u,null),dt(e,t,"formTarget",u.formTarget,u,null)):(dt(e,t,"encType",u.encType,u,null),dt(e,t,"method",u.method,u,null),dt(e,t,"target",u.target,u,null)));if(n==null||typeof n=="symbol"||typeof n=="boolean"){e.removeAttribute(a);break}n=Xl(""+n),e.setAttribute(a,n);break;case"onClick":n!=null&&(e.onclick=Ha);break;case"onScroll":n!=null&&$e("scroll",e);break;case"onScrollEnd":n!=null&&$e("scrollend",e);break;case"dangerouslySetInnerHTML":if(n!=null){if(typeof n!="object"||!("__html"in n))throw Error(c(61));if(a=n.__html,a!=null){if(u.children!=null)throw Error(c(60));e.innerHTML=a}}break;case"multiple":e.multiple=n&&typeof n!="function"&&typeof n!="symbol";break;case"muted":e.muted=n&&typeof n!="function"&&typeof n!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(n==null||typeof n=="function"||typeof n=="boolean"||typeof n=="symbol"){e.removeAttribute("xlink:href");break}a=Xl(""+n),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",a);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":n!=null&&typeof n!="function"&&typeof n!="symbol"?e.setAttribute(a,""+n):e.removeAttribute(a);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":n&&typeof n!="function"&&typeof n!="symbol"?e.setAttribute(a,""):e.removeAttribute(a);break;case"capture":case"download":n===!0?e.setAttribute(a,""):n!==!1&&n!=null&&typeof n!="function"&&typeof n!="symbol"?e.setAttribute(a,n):e.removeAttribute(a);break;case"cols":case"rows":case"size":case"span":n!=null&&typeof n!="function"&&typeof n!="symbol"&&!isNaN(n)&&1<=n?e.setAttribute(a,n):e.removeAttribute(a);break;case"rowSpan":case"start":n==null||typeof n=="function"||typeof n=="symbol"||isNaN(n)?e.removeAttribute(a):e.setAttribute(a,n);break;case"popover":$e("beforetoggle",e),$e("toggle",e),Qt(e,"popover",n);break;case"xlinkActuate":st(e,"http://www.w3.org/1999/xlink","xlink:actuate",n);break;case"xlinkArcrole":st(e,"http://www.w3.org/1999/xlink","xlink:arcrole",n);break;case"xlinkRole":st(e,"http://www.w3.org/1999/xlink","xlink:role",n);break;case"xlinkShow":st(e,"http://www.w3.org/1999/xlink","xlink:show",n);break;case"xlinkTitle":st(e,"http://www.w3.org/1999/xlink","xlink:title",n);break;case"xlinkType":st(e,"http://www.w3.org/1999/xlink","xlink:type",n);break;case"xmlBase":st(e,"http://www.w3.org/XML/1998/namespace","xml:base",n);break;case"xmlLang":st(e,"http://www.w3.org/XML/1998/namespace","xml:lang",n);break;case"xmlSpace":st(e,"http://www.w3.org/XML/1998/namespace","xml:space",n);break;case"is":Qt(e,"is",n);break;case"innerText":case"textContent":break;default:(!(2<a.length)||a[0]!=="o"&&a[0]!=="O"||a[1]!=="n"&&a[1]!=="N")&&(a=no.get(a)||a,Qt(e,a,n))}}function Yd(e,t,a,n,u,d){switch(a){case"style":yu(e,n,d);break;case"dangerouslySetInnerHTML":if(n!=null){if(typeof n!="object"||!("__html"in n))throw Error(c(61));if(a=n.__html,a!=null){if(u.children!=null)throw Error(c(60));e.innerHTML=a}}break;case"children":typeof n=="string"?en(e,n):(typeof n=="number"||typeof n=="bigint")&&en(e,""+n);break;case"onScroll":n!=null&&$e("scroll",e);break;case"onScrollEnd":n!=null&&$e("scrollend",e);break;case"onClick":n!=null&&(e.onclick=Ha);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Vr.hasOwnProperty(a))e:{if(a[0]==="o"&&a[1]==="n"&&(u=a.endsWith("Capture"),t=a.slice(2,u?a.length-7:void 0),d=e[qt]||null,d=d!=null?d[a]:null,typeof d=="function"&&e.removeEventListener(t,d,u),typeof n=="function")){typeof d!="function"&&d!==null&&(a in e?e[a]=null:e.hasAttribute(a)&&e.removeAttribute(a)),e.addEventListener(t,n,u);break e}a in e?e[a]=n:n===!0?e.setAttribute(a,""):Qt(e,a,n)}}}function ea(e,t,a){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":$e("error",e),$e("load",e);var n=!1,u=!1,d;for(d in a)if(a.hasOwnProperty(d)){var x=a[d];if(x!=null)switch(d){case"src":n=!0;break;case"srcSet":u=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(c(137,t));default:dt(e,t,d,x,a,null)}}u&&dt(e,t,"srcSet",a.srcSet,a,null),n&&dt(e,t,"src",a.src,a,null);return;case"input":$e("invalid",e);var E=d=x=u=null,A=null,X=null;for(n in a)if(a.hasOwnProperty(n)){var re=a[n];if(re!=null)switch(n){case"name":u=re;break;case"type":x=re;break;case"checked":A=re;break;case"defaultChecked":X=re;break;case"value":d=re;break;case"defaultValue":E=re;break;case"children":case"dangerouslySetInnerHTML":if(re!=null)throw Error(c(137,t));break;default:dt(e,t,n,re,a,null)}}sl(e,d,E,A,X,x,u,!1);return;case"select":$e("invalid",e),n=x=d=null;for(u in a)if(a.hasOwnProperty(u)&&(E=a[u],E!=null))switch(u){case"value":d=E;break;case"defaultValue":x=E;break;case"multiple":n=E;default:dt(e,t,u,E,a,null)}t=d,a=x,e.multiple=!!n,t!=null?On(e,!!n,t,!1):a!=null&&On(e,!!n,a,!0);return;case"textarea":$e("invalid",e),d=u=n=null;for(x in a)if(a.hasOwnProperty(x)&&(E=a[x],E!=null))switch(x){case"value":n=E;break;case"defaultValue":u=E;break;case"children":d=E;break;case"dangerouslySetInnerHTML":if(E!=null)throw Error(c(91));break;default:dt(e,t,x,E,a,null)}$r(e,n,u,d);return;case"option":for(A in a)if(a.hasOwnProperty(A)&&(n=a[A],n!=null))switch(A){case"selected":e.selected=n&&typeof n!="function"&&typeof n!="symbol";break;default:dt(e,t,A,n,a,null)}return;case"dialog":$e("beforetoggle",e),$e("toggle",e),$e("cancel",e),$e("close",e);break;case"iframe":case"object":$e("load",e);break;case"video":case"audio":for(n=0;n<Oi.length;n++)$e(Oi[n],e);break;case"image":$e("error",e),$e("load",e);break;case"details":$e("toggle",e);break;case"embed":case"source":case"link":$e("error",e),$e("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(X in a)if(a.hasOwnProperty(X)&&(n=a[X],n!=null))switch(X){case"children":case"dangerouslySetInnerHTML":throw Error(c(137,t));default:dt(e,t,X,n,a,null)}return;default:if(Ys(t)){for(re in a)a.hasOwnProperty(re)&&(n=a[re],n!==void 0&&Yd(e,t,re,n,a,void 0));return}}for(E in a)a.hasOwnProperty(E)&&(n=a[E],n!=null&&dt(e,t,E,n,a,null))}function sp(e,t,a,n){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var u=null,d=null,x=null,E=null,A=null,X=null,re=null;for(te in a){var oe=a[te];if(a.hasOwnProperty(te)&&oe!=null)switch(te){case"checked":break;case"value":break;case"defaultValue":A=oe;default:n.hasOwnProperty(te)||dt(e,t,te,null,n,oe)}}for(var J in n){var te=n[J];if(oe=a[J],n.hasOwnProperty(J)&&(te!=null||oe!=null))switch(J){case"type":d=te;break;case"name":u=te;break;case"checked":X=te;break;case"defaultChecked":re=te;break;case"value":x=te;break;case"defaultValue":E=te;break;case"children":case"dangerouslySetInnerHTML":if(te!=null)throw Error(c(137,t));break;default:te!==oe&&dt(e,t,J,te,n,oe)}}Bs(e,x,E,A,X,re,d,u);return;case"select":te=x=E=J=null;for(d in a)if(A=a[d],a.hasOwnProperty(d)&&A!=null)switch(d){case"value":break;case"multiple":te=A;default:n.hasOwnProperty(d)||dt(e,t,d,null,n,A)}for(u in n)if(d=n[u],A=a[u],n.hasOwnProperty(u)&&(d!=null||A!=null))switch(u){case"value":J=d;break;case"defaultValue":E=d;break;case"multiple":x=d;default:d!==A&&dt(e,t,u,d,n,A)}t=E,a=x,n=te,J!=null?On(e,!!a,J,!1):!!n!=!!a&&(t!=null?On(e,!!a,t,!0):On(e,!!a,a?[]:"",!1));return;case"textarea":te=J=null;for(E in a)if(u=a[E],a.hasOwnProperty(E)&&u!=null&&!n.hasOwnProperty(E))switch(E){case"value":break;case"children":break;default:dt(e,t,E,null,n,u)}for(x in n)if(u=n[x],d=a[x],n.hasOwnProperty(x)&&(u!=null||d!=null))switch(x){case"value":J=u;break;case"defaultValue":te=u;break;case"children":break;case"dangerouslySetInnerHTML":if(u!=null)throw Error(c(91));break;default:u!==d&&dt(e,t,x,u,n,d)}Ql(e,J,te);return;case"option":for(var ve in a)if(J=a[ve],a.hasOwnProperty(ve)&&J!=null&&!n.hasOwnProperty(ve))switch(ve){case"selected":e.selected=!1;break;default:dt(e,t,ve,null,n,J)}for(A in n)if(J=n[A],te=a[A],n.hasOwnProperty(A)&&J!==te&&(J!=null||te!=null))switch(A){case"selected":e.selected=J&&typeof J!="function"&&typeof J!="symbol";break;default:dt(e,t,A,J,n,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 Re in a)J=a[Re],a.hasOwnProperty(Re)&&J!=null&&!n.hasOwnProperty(Re)&&dt(e,t,Re,null,n,J);for(X in n)if(J=n[X],te=a[X],n.hasOwnProperty(X)&&J!==te&&(J!=null||te!=null))switch(X){case"children":case"dangerouslySetInnerHTML":if(J!=null)throw Error(c(137,t));break;default:dt(e,t,X,J,n,te)}return;default:if(Ys(t)){for(var ft in a)J=a[ft],a.hasOwnProperty(ft)&&J!==void 0&&!n.hasOwnProperty(ft)&&Yd(e,t,ft,void 0,n,J);for(re in n)J=n[re],te=a[re],!n.hasOwnProperty(re)||J===te||J===void 0&&te===void 0||Yd(e,t,re,J,n,te);return}}for(var F in a)J=a[F],a.hasOwnProperty(F)&&J!=null&&!n.hasOwnProperty(F)&&dt(e,t,F,null,n,J);for(oe in n)J=n[oe],te=a[oe],!n.hasOwnProperty(oe)||J===te||J==null&&te==null||dt(e,t,oe,J,n,te)}function g0(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function rp(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,a=performance.getEntriesByType("resource"),n=0;n<a.length;n++){var u=a[n],d=u.transferSize,x=u.initiatorType,E=u.duration;if(d&&E&&g0(x)){for(x=0,E=u.responseEnd,n+=1;n<a.length;n++){var A=a[n],X=A.startTime;if(X>E)break;var re=A.transferSize,oe=A.initiatorType;re&&g0(oe)&&(A=A.responseEnd,x+=re*(A<E?1:(E-X)/(A-X)))}if(--n,t+=8*(d+x)/(u.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var $d=null,Fd=null;function bc(e){return e.nodeType===9?e:e.ownerDocument}function y0(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 x0(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 Gd(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 Zd=null;function ip(){var e=window.event;return e&&e.type==="popstate"?e===Zd?!1:(Zd=e,!0):(Zd=null,!1)}var p0=typeof setTimeout=="function"?setTimeout:void 0,up=typeof clearTimeout=="function"?clearTimeout:void 0,v0=typeof Promise=="function"?Promise:void 0,cp=typeof queueMicrotask=="function"?queueMicrotask:typeof v0<"u"?function(e){return v0.resolve(null).then(e).catch(op)}:p0;function op(e){setTimeout(function(){throw e})}function Dl(e){return e==="head"}function b0(e,t){var a=t,n=0;do{var u=a.nextSibling;if(e.removeChild(a),u&&u.nodeType===8)if(a=u.data,a==="/$"||a==="/&"){if(n===0){e.removeChild(u),jr(t);return}n--}else if(a==="$"||a==="$?"||a==="$~"||a==="$!"||a==="&")n++;else if(a==="html")Ri(e.ownerDocument.documentElement);else if(a==="head"){a=e.ownerDocument.head,Ri(a);for(var d=a.firstChild;d;){var x=d.nextSibling,E=d.nodeName;d[Gl]||E==="SCRIPT"||E==="STYLE"||E==="LINK"&&d.rel.toLowerCase()==="stylesheet"||a.removeChild(d),d=x}}else a==="body"&&Ri(e.ownerDocument.body);a=u}while(a);jr(t)}function S0(e,t){var a=e;e=0;do{var n=a.nextSibling;if(a.nodeType===1?t?(a._stashedDisplay=a.style.display,a.style.display="none"):(a.style.display=a._stashedDisplay||"",a.getAttribute("style")===""&&a.removeAttribute("style")):a.nodeType===3&&(t?(a._stashedText=a.nodeValue,a.nodeValue=""):a.nodeValue=a._stashedText||""),n&&n.nodeType===8)if(a=n.data,a==="/$"){if(e===0)break;e--}else a!=="$"&&a!=="$?"&&a!=="$~"&&a!=="$!"||e++;a=n}while(a)}function Pd(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":Pd(a),Ls(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}e.removeChild(a)}}function dp(e,t,a,n){for(;e.nodeType===1;){var u=a;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!n&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(n){if(!e[Gl])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!==u.rel||e.getAttribute("href")!==(u.href==null||u.href===""?null:u.href)||e.getAttribute("crossorigin")!==(u.crossOrigin==null?null:u.crossOrigin)||e.getAttribute("title")!==(u.title==null?null:u.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(d=e.getAttribute("src"),(d!==(u.src==null?null:u.src)||e.getAttribute("type")!==(u.type==null?null:u.type)||e.getAttribute("crossorigin")!==(u.crossOrigin==null?null:u.crossOrigin))&&d&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var d=u.name==null?null:""+u.name;if(u.type==="hidden"&&e.getAttribute("name")===d)return e}else return e;if(e=Pa(e.nextSibling),e===null)break}return null}function fp(e,t,a){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!a||(e=Pa(e.nextSibling),e===null))return null;return e}function w0(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=Pa(e.nextSibling),e===null))return null;return e}function Qd(e){return e.data==="$?"||e.data==="$~"}function Wd(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function hp(e,t){var a=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||a.readyState!=="loading")t();else{var n=function(){t(),a.removeEventListener("DOMContentLoaded",n)};a.addEventListener("DOMContentLoaded",n),e._reactRetry=n}}function Pa(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 Id=null;function N0(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var a=e.data;if(a==="/$"||a==="/&"){if(t===0)return Pa(e.nextSibling);t--}else a!=="$"&&a!=="$!"&&a!=="$?"&&a!=="$~"&&a!=="&"||t++}e=e.nextSibling}return null}function j0(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 E0(e,t,a){switch(t=bc(a),e){case"html":if(e=t.documentElement,!e)throw Error(c(452));return e;case"head":if(e=t.head,!e)throw Error(c(453));return e;case"body":if(e=t.body,!e)throw Error(c(454));return e;default:throw Error(c(451))}}function Ri(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Ls(e)}var Qa=new Map,T0=new Set;function Sc(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Qn=ie.d;ie.d={f:mp,r:gp,D:yp,C:xp,L:pp,m:vp,X:Sp,S:bp,M:wp};function mp(){var e=Qn.f(),t=fc();return e||t}function gp(e){var t=Ce(e);t!==null&&t.tag===5&&t.type==="form"?$h(t):Qn.r(e)}var Sr=typeof document>"u"?null:document;function M0(e,t,a){var n=Sr;if(n&&typeof t=="string"&&t){var u=Wt(t);u='link[rel="'+e+'"][href="'+u+'"]',typeof a=="string"&&(u+='[crossorigin="'+a+'"]'),T0.has(u)||(T0.add(u),e={rel:e,crossOrigin:a,href:t},n.querySelector(u)===null&&(t=n.createElement("link"),ea(t,"link",e),kt(t),n.head.appendChild(t)))}}function yp(e){Qn.D(e),M0("dns-prefetch",e,null)}function xp(e,t){Qn.C(e,t),M0("preconnect",e,t)}function pp(e,t,a){Qn.L(e,t,a);var n=Sr;if(n&&e&&t){var u='link[rel="preload"][as="'+Wt(t)+'"]';t==="image"&&a&&a.imageSrcSet?(u+='[imagesrcset="'+Wt(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(u+='[imagesizes="'+Wt(a.imageSizes)+'"]')):u+='[href="'+Wt(e)+'"]';var d=u;switch(t){case"style":d=wr(e);break;case"script":d=Nr(e)}Qa.has(d)||(e=j({rel:"preload",href:t==="image"&&a&&a.imageSrcSet?void 0:e,as:t},a),Qa.set(d,e),n.querySelector(u)!==null||t==="style"&&n.querySelector(Ai(d))||t==="script"&&n.querySelector(_i(d))||(t=n.createElement("link"),ea(t,"link",e),kt(t),n.head.appendChild(t)))}}function vp(e,t){Qn.m(e,t);var a=Sr;if(a&&e){var n=t&&typeof t.as=="string"?t.as:"script",u='link[rel="modulepreload"][as="'+Wt(n)+'"][href="'+Wt(e)+'"]',d=u;switch(n){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":d=Nr(e)}if(!Qa.has(d)&&(e=j({rel:"modulepreload",href:e},t),Qa.set(d,e),a.querySelector(u)===null)){switch(n){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(_i(d)))return}n=a.createElement("link"),ea(n,"link",e),kt(n),a.head.appendChild(n)}}}function bp(e,t,a){Qn.S(e,t,a);var n=Sr;if(n&&e){var u=Ja(n).hoistableStyles,d=wr(e);t=t||"default";var x=u.get(d);if(!x){var E={loading:0,preload:null};if(x=n.querySelector(Ai(d)))E.loading=5;else{e=j({rel:"stylesheet",href:e,"data-precedence":t},a),(a=Qa.get(d))&&Xd(e,a);var A=x=n.createElement("link");kt(A),ea(A,"link",e),A._p=new Promise(function(X,re){A.onload=X,A.onerror=re}),A.addEventListener("load",function(){E.loading|=1}),A.addEventListener("error",function(){E.loading|=2}),E.loading|=4,wc(x,t,n)}x={type:"stylesheet",instance:x,count:1,state:E},u.set(d,x)}}}function Sp(e,t){Qn.X(e,t);var a=Sr;if(a&&e){var n=Ja(a).hoistableScripts,u=Nr(e),d=n.get(u);d||(d=a.querySelector(_i(u)),d||(e=j({src:e,async:!0},t),(t=Qa.get(u))&&Jd(e,t),d=a.createElement("script"),kt(d),ea(d,"link",e),a.head.appendChild(d)),d={type:"script",instance:d,count:1,state:null},n.set(u,d))}}function wp(e,t){Qn.M(e,t);var a=Sr;if(a&&e){var n=Ja(a).hoistableScripts,u=Nr(e),d=n.get(u);d||(d=a.querySelector(_i(u)),d||(e=j({src:e,async:!0,type:"module"},t),(t=Qa.get(u))&&Jd(e,t),d=a.createElement("script"),kt(d),ea(d,"link",e),a.head.appendChild(d)),d={type:"script",instance:d,count:1,state:null},n.set(u,d))}}function C0(e,t,a,n){var u=(u=Te.current)?Sc(u):null;if(!u)throw Error(c(446));switch(e){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(t=wr(a.href),a=Ja(u).hoistableStyles,n=a.get(t),n||(n={type:"style",instance:null,count:0,state:null},a.set(t,n)),n):{type:"void",instance:null,count:0,state:null};case"link":if(a.rel==="stylesheet"&&typeof a.href=="string"&&typeof a.precedence=="string"){e=wr(a.href);var d=Ja(u).hoistableStyles,x=d.get(e);if(x||(u=u.ownerDocument||u,x={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},d.set(e,x),(d=u.querySelector(Ai(e)))&&!d._p&&(x.instance=d,x.state.loading=5),Qa.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},Qa.set(e,a),d||Np(u,e,a,x.state))),t&&n===null)throw Error(c(528,""));return x}if(t&&n!==null)throw Error(c(529,""));return null;case"script":return t=a.async,a=a.src,typeof a=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Nr(a),a=Ja(u).hoistableScripts,n=a.get(t),n||(n={type:"script",instance:null,count:0,state:null},a.set(t,n)),n):{type:"void",instance:null,count:0,state:null};default:throw Error(c(444,e))}}function wr(e){return'href="'+Wt(e)+'"'}function Ai(e){return'link[rel="stylesheet"]['+e+"]"}function O0(e){return j({},e,{"data-precedence":e.precedence,precedence:null})}function Np(e,t,a,n){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?n.loading=1:(t=e.createElement("link"),n.preload=t,t.addEventListener("load",function(){return n.loading|=1}),t.addEventListener("error",function(){return n.loading|=2}),ea(t,"link",a),kt(t),e.head.appendChild(t))}function Nr(e){return'[src="'+Wt(e)+'"]'}function _i(e){return"script[async]"+e}function D0(e,t,a){if(t.count++,t.instance===null)switch(t.type){case"style":var n=e.querySelector('style[data-href~="'+Wt(a.href)+'"]');if(n)return t.instance=n,kt(n),n;var u=j({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return n=(e.ownerDocument||e).createElement("style"),kt(n),ea(n,"style",u),wc(n,a.precedence,e),t.instance=n;case"stylesheet":u=wr(a.href);var d=e.querySelector(Ai(u));if(d)return t.state.loading|=4,t.instance=d,kt(d),d;n=O0(a),(u=Qa.get(u))&&Xd(n,u),d=(e.ownerDocument||e).createElement("link"),kt(d);var x=d;return x._p=new Promise(function(E,A){x.onload=E,x.onerror=A}),ea(d,"link",n),t.state.loading|=4,wc(d,a.precedence,e),t.instance=d;case"script":return d=Nr(a.src),(u=e.querySelector(_i(d)))?(t.instance=u,kt(u),u):(n=a,(u=Qa.get(d))&&(n=j({},a),Jd(n,u)),e=e.ownerDocument||e,u=e.createElement("script"),kt(u),ea(u,"link",n),e.head.appendChild(u),t.instance=u);case"void":return null;default:throw Error(c(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(n=t.instance,t.state.loading|=4,wc(n,a.precedence,e));return t.instance}function wc(e,t,a){for(var n=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),u=n.length?n[n.length-1]:null,d=u,x=0;x<n.length;x++){var E=n[x];if(E.dataset.precedence===t)d=E;else if(d!==u)break}d?d.parentNode.insertBefore(e,d.nextSibling):(t=a.nodeType===9?a.head:a,t.insertBefore(e,t.firstChild))}function Xd(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function Jd(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var Nc=null;function R0(e,t,a){if(Nc===null){var n=new Map,u=Nc=new Map;u.set(a,n)}else u=Nc,n=u.get(a),n||(n=new Map,u.set(a,n));if(n.has(e))return n;for(n.set(e,null),a=a.getElementsByTagName(e),u=0;u<a.length;u++){var d=a[u];if(!(d[Gl]||d[Mt]||e==="link"&&d.getAttribute("rel")==="stylesheet")&&d.namespaceURI!=="http://www.w3.org/2000/svg"){var x=d.getAttribute(t)||"";x=e+x;var E=n.get(x);E?E.push(d):n.set(x,[d])}}return n}function A0(e,t,a){e=e.ownerDocument||e,e.head.insertBefore(a,t==="title"?e.querySelector("head > title"):null)}function jp(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 _0(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function Ep(e,t,a,n){if(a.type==="stylesheet"&&(typeof n.media!="string"||matchMedia(n.media).matches!==!1)&&(a.state.loading&4)===0){if(a.instance===null){var u=wr(n.href),d=t.querySelector(Ai(u));if(d){t=d._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=jc.bind(e),t.then(e,e)),a.state.loading|=4,a.instance=d,kt(d);return}d=t.ownerDocument||t,n=O0(n),(u=Qa.get(u))&&Xd(n,u),d=d.createElement("link"),kt(d);var x=d;x._p=new Promise(function(E,A){x.onload=E,x.onerror=A}),ea(d,"link",n),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=jc.bind(e),t.addEventListener("load",a),t.addEventListener("error",a))}}var Kd=0;function Tp(e,t){return e.stylesheets&&e.count===0&&Tc(e,e.stylesheets),0<e.count||0<e.imgCount?function(a){var n=setTimeout(function(){if(e.stylesheets&&Tc(e,e.stylesheets),e.unsuspend){var d=e.unsuspend;e.unsuspend=null,d()}},6e4+t);0<e.imgBytes&&Kd===0&&(Kd=62500*rp());var u=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Tc(e,e.stylesheets),e.unsuspend)){var d=e.unsuspend;e.unsuspend=null,d()}},(e.imgBytes>Kd?50:800)+t);return e.unsuspend=a,function(){e.unsuspend=null,clearTimeout(n),clearTimeout(u)}}:null}function jc(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Tc(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Ec=null;function Tc(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Ec=new Map,t.forEach(Mp,e),Ec=null,jc.call(e))}function Mp(e,t){if(!(t.state.loading&4)){var a=Ec.get(e);if(a)var n=a.get(null);else{a=new Map,Ec.set(e,a);for(var u=e.querySelectorAll("link[data-precedence],style[data-precedence]"),d=0;d<u.length;d++){var x=u[d];(x.nodeName==="LINK"||x.getAttribute("media")!=="not all")&&(a.set(x.dataset.precedence,x),n=x)}n&&a.set(null,n)}u=t.instance,x=u.getAttribute("data-precedence"),d=a.get(x)||n,d===n&&a.set(null,u),a.set(x,u),this.count++,n=jc.bind(this),u.addEventListener("load",n),u.addEventListener("error",n),d?d.parentNode.insertBefore(u,d.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(u,e.firstChild)),t.state.loading|=4}}var ki={$$typeof:W,Provider:null,Consumer:null,_currentValue:ye,_currentValue2:ye,_threadCount:0};function Cp(e,t,a,n,u,d,x,E,A){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=zs(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=zs(0),this.hiddenUpdates=zs(null),this.identifierPrefix=n,this.onUncaughtError=u,this.onCaughtError=d,this.onRecoverableError=x,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=A,this.incompleteTransitions=new Map}function k0(e,t,a,n,u,d,x,E,A,X,re,oe){return e=new Cp(e,t,a,x,A,X,re,oe,E),t=1,d===!0&&(t|=24),d=Xt(3,null,null,t),e.current=d,d.stateNode=e,t=Ao(),t.refCount++,e.pooledCache=t,t.refCount++,d.memoizedState={element:n,isDehydrated:a,cache:t},Uo(d),e}function z0(e){return e?(e=Ta,e):Ta}function U0(e,t,a,n,u,d){u=z0(u),n.context===null?n.context=u:n.pendingContext=u,n=vl(t),n.payload={element:a},d=d===void 0?null:d,d!==null&&(n.callback=d),a=bl(e,n,t),a!==null&&(wa(a,e,t),fi(a,e,t))}function H0(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var a=e.retryLane;e.retryLane=a!==0&&a<t?a:t}}function ef(e,t){H0(e,t),(e=e.alternate)&&H0(e,t)}function L0(e){if(e.tag===13||e.tag===31){var t=Va(e,67108864);t!==null&&wa(t,e,67108864),ef(e,67108864)}}function q0(e){if(e.tag===13||e.tag===31){var t=Ra();t=Us(t);var a=Va(e,t);a!==null&&wa(a,e,t),ef(e,t)}}var Mc=!0;function Op(e,t,a,n){var u=$.T;$.T=null;var d=ie.p;try{ie.p=2,tf(e,t,a,n)}finally{ie.p=d,$.T=u}}function Dp(e,t,a,n){var u=$.T;$.T=null;var d=ie.p;try{ie.p=8,tf(e,t,a,n)}finally{ie.p=d,$.T=u}}function tf(e,t,a,n){if(Mc){var u=af(n);if(u===null)Bd(e,t,n,Cc,a),B0(e,n);else if(Ap(u,e,t,a,n))n.stopPropagation();else if(B0(e,n),t&4&&-1<Rp.indexOf(e)){for(;u!==null;){var d=Ce(u);if(d!==null)switch(d.tag){case 3:if(d=d.stateNode,d.current.memoizedState.isDehydrated){var x=hn(d.pendingLanes);if(x!==0){var E=d;for(E.pendingLanes|=2,E.entangledLanes|=2;x;){var A=1<<31-Pt(x);E.entanglements[1]|=A,x&=~A}wn(d),(at&6)===0&&(oc=Tt()+500,Ci(0))}}break;case 31:case 13:E=Va(d,2),E!==null&&wa(E,d,2),fc(),ef(d,2)}if(d=af(n),d===null&&Bd(e,t,n,Cc,a),d===u)break;u=d}u!==null&&n.stopPropagation()}else Bd(e,t,n,null,a)}}function af(e){return e=$s(e),nf(e)}var Cc=null;function nf(e){if(Cc=null,e=Mn(e),e!==null){var t=f(e);if(t===null)e=null;else{var a=t.tag;if(a===13){if(e=v(t),e!==null)return e;e=null}else if(a===31){if(e=w(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 Cc=e,null}function V0(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(En()){case Bl:return 2;case Yl:return 8;case _s:case eo:return 32;case zr:return 268435456;default:return 32}default:return 32}}var lf=!1,Rl=null,Al=null,_l=null,zi=new Map,Ui=new Map,kl=[],Rp="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 B0(e,t){switch(e){case"focusin":case"focusout":Rl=null;break;case"dragenter":case"dragleave":Al=null;break;case"mouseover":case"mouseout":_l=null;break;case"pointerover":case"pointerout":zi.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ui.delete(t.pointerId)}}function Hi(e,t,a,n,u,d){return e===null||e.nativeEvent!==d?(e={blockedOn:t,domEventName:a,eventSystemFlags:n,nativeEvent:d,targetContainers:[u]},t!==null&&(t=Ce(t),t!==null&&L0(t)),e):(e.eventSystemFlags|=n,t=e.targetContainers,u!==null&&t.indexOf(u)===-1&&t.push(u),e)}function Ap(e,t,a,n,u){switch(t){case"focusin":return Rl=Hi(Rl,e,t,a,n,u),!0;case"dragenter":return Al=Hi(Al,e,t,a,n,u),!0;case"mouseover":return _l=Hi(_l,e,t,a,n,u),!0;case"pointerover":var d=u.pointerId;return zi.set(d,Hi(zi.get(d)||null,e,t,a,n,u)),!0;case"gotpointercapture":return d=u.pointerId,Ui.set(d,Hi(Ui.get(d)||null,e,t,a,n,u)),!0}return!1}function Y0(e){var t=Mn(e.target);if(t!==null){var a=f(t);if(a!==null){if(t=a.tag,t===13){if(t=v(a),t!==null){e.blockedOn=t,qr(e.priority,function(){q0(a)});return}}else if(t===31){if(t=w(a),t!==null){e.blockedOn=t,qr(e.priority,function(){q0(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 Oc(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var a=af(e.nativeEvent);if(a===null){a=e.nativeEvent;var n=new a.constructor(a.type,a);Fr=n,a.target.dispatchEvent(n),Fr=null}else return t=Ce(a),t!==null&&L0(t),e.blockedOn=a,!1;t.shift()}return!0}function $0(e,t,a){Oc(e)&&a.delete(t)}function _p(){lf=!1,Rl!==null&&Oc(Rl)&&(Rl=null),Al!==null&&Oc(Al)&&(Al=null),_l!==null&&Oc(_l)&&(_l=null),zi.forEach($0),Ui.forEach($0)}function Dc(e,t){e.blockedOn===t&&(e.blockedOn=null,lf||(lf=!0,l.unstable_scheduleCallback(l.unstable_NormalPriority,_p)))}var Rc=null;function F0(e){Rc!==e&&(Rc=e,l.unstable_scheduleCallback(l.unstable_NormalPriority,function(){Rc===e&&(Rc=null);for(var t=0;t<e.length;t+=3){var a=e[t],n=e[t+1],u=e[t+2];if(typeof n!="function"){if(nf(n||a)===null)continue;break}var d=Ce(a);d!==null&&(e.splice(t,3),t-=3,ad(d,{pending:!0,data:u,method:a.method,action:n},n,u))}}))}function jr(e){function t(A){return Dc(A,e)}Rl!==null&&Dc(Rl,e),Al!==null&&Dc(Al,e),_l!==null&&Dc(_l,e),zi.forEach(t),Ui.forEach(t);for(var a=0;a<kl.length;a++){var n=kl[a];n.blockedOn===e&&(n.blockedOn=null)}for(;0<kl.length&&(a=kl[0],a.blockedOn===null);)Y0(a),a.blockedOn===null&&kl.shift();if(a=(e.ownerDocument||e).$$reactFormReplay,a!=null)for(n=0;n<a.length;n+=3){var u=a[n],d=a[n+1],x=u[qt]||null;if(typeof d=="function")x||F0(a);else if(x){var E=null;if(d&&d.hasAttribute("formAction")){if(u=d,x=d[qt]||null)E=x.formAction;else if(nf(u)!==null)continue}else E=x.action;typeof E=="function"?a[n+1]=E:(a.splice(n,3),n-=3),F0(a)}}}function G0(){function e(d){d.canIntercept&&d.info==="react-transition"&&d.intercept({handler:function(){return new Promise(function(x){return u=x})},focusReset:"manual",scroll:"manual"})}function t(){u!==null&&(u(),u=null),n||setTimeout(a,20)}function a(){if(!n&&!navigation.transition){var d=navigation.currentEntry;d&&d.url!=null&&navigation.navigate(d.url,{state:d.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var n=!1,u=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(a,100),function(){n=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),u!==null&&(u(),u=null)}}}function sf(e){this._internalRoot=e}Ac.prototype.render=sf.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(c(409));var a=t.current,n=Ra();U0(a,n,e,t,null,null)},Ac.prototype.unmount=sf.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;U0(e.current,2,null,e,null,null),fc(),t[Tn]=null}};function Ac(e){this._internalRoot=e}Ac.prototype.unstable_scheduleHydration=function(e){if(e){var t=Hs();e={blockedOn:null,target:e,priority:t};for(var a=0;a<kl.length&&t!==0&&t<kl[a].priority;a++);kl.splice(a,0,e),a===0&&Y0(e)}};var Z0=i.version;if(Z0!=="19.2.4")throw Error(c(527,Z0,"19.2.4"));ie.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(c(188)):(e=Object.keys(e).join(","),Error(c(268,e)));return e=y(t),e=e!==null?S(e):null,e=e===null?null:e.stateNode,e};var kp={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:$,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var _c=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!_c.isDisabled&&_c.supportsFiber)try{Nt=_c.inject(kp),na=_c}catch{}}return qi.createRoot=function(e,t){if(!m(e))throw Error(c(299));var a=!1,n="",u=Kh,d=em,x=tm;return t!=null&&(t.unstable_strictMode===!0&&(a=!0),t.identifierPrefix!==void 0&&(n=t.identifierPrefix),t.onUncaughtError!==void 0&&(u=t.onUncaughtError),t.onCaughtError!==void 0&&(d=t.onCaughtError),t.onRecoverableError!==void 0&&(x=t.onRecoverableError)),t=k0(e,1,!1,null,null,a,n,null,u,d,x,G0),e[Tn]=t.current,Vd(e),new sf(t)},qi.hydrateRoot=function(e,t,a){if(!m(e))throw Error(c(299));var n=!1,u="",d=Kh,x=em,E=tm,A=null;return a!=null&&(a.unstable_strictMode===!0&&(n=!0),a.identifierPrefix!==void 0&&(u=a.identifierPrefix),a.onUncaughtError!==void 0&&(d=a.onUncaughtError),a.onCaughtError!==void 0&&(x=a.onCaughtError),a.onRecoverableError!==void 0&&(E=a.onRecoverableError),a.formState!==void 0&&(A=a.formState)),t=k0(e,1,!0,t,a??null,n,u,A,d,x,E,G0),t.context=z0(null),a=t.current,n=Ra(),n=Us(n),u=vl(n),u.callback=null,bl(a,u,n),a=n,t.current.lanes=a,al(t,a),wn(t),e[Tn]=t.current,Vd(e),new Ac(t)},qi.version="19.2.4",qi}var lg;function Zp(){if(lg)return of.exports;lg=1;function l(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(l)}catch(i){console.error(i)}}return l(),of.exports=Gp(),of.exports}var Pp=Zp();const Qp=_f(Pp);/**
|
|
50
|
+
* react-router v7.13.0
|
|
51
|
+
*
|
|
52
|
+
* Copyright (c) Remix Software Inc.
|
|
53
|
+
*
|
|
54
|
+
* This source code is licensed under the MIT license found in the
|
|
55
|
+
* LICENSE.md file in the root directory of this source tree.
|
|
56
|
+
*
|
|
57
|
+
* @license MIT
|
|
58
|
+
*/var sg="popstate";function Wp(l={}){function i(m,f){let{pathname:v="/",search:w="",hash:b=""}=Rs(m.location.hash.substring(1));return!v.startsWith("/")&&!v.startsWith(".")&&(v="/"+v),jf("",{pathname:v,search:w,hash:b},f.state&&f.state.usr||null,f.state&&f.state.key||"default")}function o(m,f){let v=m.document.querySelector("base"),w="";if(v&&v.getAttribute("href")){let b=m.location.href,y=b.indexOf("#");w=y===-1?b:b.slice(0,y)}return w+"#"+(typeof f=="string"?f:tu(f))}function c(m,f){Wa(m.pathname.charAt(0)==="/",`relative pathnames are not supported in hash history.push(${JSON.stringify(f)})`)}return Xp(i,o,c,l)}function St(l,i){if(l===!1||l===null||typeof l>"u")throw new Error(i)}function Wa(l,i){if(!l){typeof console<"u"&&console.warn(i);try{throw new Error(i)}catch{}}}function Ip(){return Math.random().toString(36).substring(2,10)}function rg(l,i){return{usr:l.state,key:l.key,idx:i}}function jf(l,i,o=null,c){return{pathname:typeof l=="string"?l:l.pathname,search:"",hash:"",...typeof i=="string"?Rs(i):i,state:o,key:i&&i.key||c||Ip()}}function tu({pathname:l="/",search:i="",hash:o=""}){return i&&i!=="?"&&(l+=i.charAt(0)==="?"?i:"?"+i),o&&o!=="#"&&(l+=o.charAt(0)==="#"?o:"#"+o),l}function Rs(l){let i={};if(l){let o=l.indexOf("#");o>=0&&(i.hash=l.substring(o),l=l.substring(0,o));let c=l.indexOf("?");c>=0&&(i.search=l.substring(c),l=l.substring(0,c)),l&&(i.pathname=l)}return i}function Xp(l,i,o,c={}){let{window:m=document.defaultView,v5Compat:f=!1}=c,v=m.history,w="POP",b=null,y=S();y==null&&(y=0,v.replaceState({...v.state,idx:y},""));function S(){return(v.state||{idx:null}).idx}function j(){w="POP";let B=S(),se=B==null?null:B-y;y=B,b&&b({action:w,location:M.location,delta:se})}function T(B,se){w="PUSH";let Y=jf(M.location,B,se);o&&o(Y,B),y=S()+1;let W=rg(Y,y),K=M.createHref(Y);try{v.pushState(W,"",K)}catch(ae){if(ae instanceof DOMException&&ae.name==="DataCloneError")throw ae;m.location.assign(K)}f&&b&&b({action:w,location:M.location,delta:1})}function O(B,se){w="REPLACE";let Y=jf(M.location,B,se);o&&o(Y,B),y=S();let W=rg(Y,y),K=M.createHref(Y);v.replaceState(W,"",K),f&&b&&b({action:w,location:M.location,delta:0})}function _(B){return Jp(B)}let M={get action(){return w},get location(){return l(m,v)},listen(B){if(b)throw new Error("A history only accepts one active listener");return m.addEventListener(sg,j),b=B,()=>{m.removeEventListener(sg,j),b=null}},createHref(B){return i(m,B)},createURL:_,encodeLocation(B){let se=_(B);return{pathname:se.pathname,search:se.search,hash:se.hash}},push:T,replace:O,go(B){return v.go(B)}};return M}function Jp(l,i=!1){let o="http://localhost";typeof window<"u"&&(o=window.location.origin!=="null"?window.location.origin:window.location.href),St(o,"No window.location.(origin|href) available to create URL");let c=typeof l=="string"?l:tu(l);return c=c.replace(/ $/,"%20"),!i&&c.startsWith("//")&&(c=o+c),new URL(c,o)}function ay(l,i,o="/"){return Kp(l,i,o,!1)}function Kp(l,i,o,c){let m=typeof i=="string"?Rs(i):i,f=Jn(m.pathname||"/",o);if(f==null)return null;let v=ny(l);ev(v);let w=null;for(let b=0;w==null&&b<v.length;++b){let y=dv(f);w=cv(v[b],y,c)}return w}function ny(l,i=[],o=[],c="",m=!1){let f=(v,w,b=m,y)=>{let S={relativePath:y===void 0?v.path||"":y,caseSensitive:v.caseSensitive===!0,childrenIndex:w,route:v};if(S.relativePath.startsWith("/")){if(!S.relativePath.startsWith(c)&&b)return;St(S.relativePath.startsWith(c),`Absolute route path "${S.relativePath}" nested under path "${c}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),S.relativePath=S.relativePath.slice(c.length)}let j=Xn([c,S.relativePath]),T=o.concat(S);v.children&&v.children.length>0&&(St(v.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${j}".`),ny(v.children,i,T,j,b)),!(v.path==null&&!v.index)&&i.push({path:j,score:iv(j,v.index),routesMeta:T})};return l.forEach((v,w)=>{var b;if(v.path===""||!((b=v.path)!=null&&b.includes("?")))f(v,w);else for(let y of ly(v.path))f(v,w,!0,y)}),i}function ly(l){let i=l.split("/");if(i.length===0)return[];let[o,...c]=i,m=o.endsWith("?"),f=o.replace(/\?$/,"");if(c.length===0)return m?[f,""]:[f];let v=ly(c.join("/")),w=[];return w.push(...v.map(b=>b===""?f:[f,b].join("/"))),m&&w.push(...v),w.map(b=>l.startsWith("/")&&b===""?"/":b)}function ev(l){l.sort((i,o)=>i.score!==o.score?o.score-i.score:uv(i.routesMeta.map(c=>c.childrenIndex),o.routesMeta.map(c=>c.childrenIndex)))}var tv=/^:[\w-]+$/,av=3,nv=2,lv=1,sv=10,rv=-2,ig=l=>l==="*";function iv(l,i){let o=l.split("/"),c=o.length;return o.some(ig)&&(c+=rv),i&&(c+=nv),o.filter(m=>!ig(m)).reduce((m,f)=>m+(tv.test(f)?av:f===""?lv:sv),c)}function uv(l,i){return l.length===i.length&&l.slice(0,-1).every((c,m)=>c===i[m])?l[l.length-1]-i[i.length-1]:0}function cv(l,i,o=!1){let{routesMeta:c}=l,m={},f="/",v=[];for(let w=0;w<c.length;++w){let b=c[w],y=w===c.length-1,S=f==="/"?i:i.slice(f.length)||"/",j=Yc({path:b.relativePath,caseSensitive:b.caseSensitive,end:y},S),T=b.route;if(!j&&y&&o&&!c[c.length-1].route.index&&(j=Yc({path:b.relativePath,caseSensitive:b.caseSensitive,end:!1},S)),!j)return null;Object.assign(m,j.params),v.push({params:m,pathname:Xn([f,j.pathname]),pathnameBase:gv(Xn([f,j.pathnameBase])),route:T}),j.pathnameBase!=="/"&&(f=Xn([f,j.pathnameBase]))}return v}function Yc(l,i){typeof l=="string"&&(l={path:l,caseSensitive:!1,end:!0});let[o,c]=ov(l.path,l.caseSensitive,l.end),m=i.match(o);if(!m)return null;let f=m[0],v=f.replace(/(.)\/+$/,"$1"),w=m.slice(1);return{params:c.reduce((y,{paramName:S,isOptional:j},T)=>{if(S==="*"){let _=w[T]||"";v=f.slice(0,f.length-_.length).replace(/(.)\/+$/,"$1")}const O=w[T];return j&&!O?y[S]=void 0:y[S]=(O||"").replace(/%2F/g,"/"),y},{}),pathname:f,pathnameBase:v,pattern:l}}function ov(l,i=!1,o=!0){Wa(l==="*"||!l.endsWith("*")||l.endsWith("/*"),`Route path "${l}" will be treated as if it were "${l.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${l.replace(/\*$/,"/*")}".`);let c=[],m="^"+l.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(v,w,b)=>(c.push({paramName:w,isOptional:b!=null}),b?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return l.endsWith("*")?(c.push({paramName:"*"}),m+=l==="*"||l==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):o?m+="\\/*$":l!==""&&l!=="/"&&(m+="(?:(?=\\/|$))"),[new RegExp(m,i?void 0:"i"),c]}function dv(l){try{return l.split("/").map(i=>decodeURIComponent(i).replace(/\//g,"%2F")).join("/")}catch(i){return Wa(!1,`The URL path "${l}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${i}).`),l}}function Jn(l,i){if(i==="/")return l;if(!l.toLowerCase().startsWith(i.toLowerCase()))return null;let o=i.endsWith("/")?i.length-1:i.length,c=l.charAt(o);return c&&c!=="/"?null:l.slice(o)||"/"}var fv=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function hv(l,i="/"){let{pathname:o,search:c="",hash:m=""}=typeof l=="string"?Rs(l):l,f;return o?(o=o.replace(/\/\/+/g,"/"),o.startsWith("/")?f=ug(o.substring(1),"/"):f=ug(o,i)):f=i,{pathname:f,search:yv(c),hash:xv(m)}}function ug(l,i){let o=i.replace(/\/+$/,"").split("/");return l.split("/").forEach(m=>{m===".."?o.length>1&&o.pop():m!=="."&&o.push(m)}),o.length>1?o.join("/"):"/"}function mf(l,i,o,c){return`Cannot include a '${l}' character in a manually specified \`to.${i}\` field [${JSON.stringify(c)}]. Please separate it out to the \`to.${o}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function mv(l){return l.filter((i,o)=>o===0||i.route.path&&i.route.path.length>0)}function zf(l){let i=mv(l);return i.map((o,c)=>c===i.length-1?o.pathname:o.pathnameBase)}function Uf(l,i,o,c=!1){let m;typeof l=="string"?m=Rs(l):(m={...l},St(!m.pathname||!m.pathname.includes("?"),mf("?","pathname","search",m)),St(!m.pathname||!m.pathname.includes("#"),mf("#","pathname","hash",m)),St(!m.search||!m.search.includes("#"),mf("#","search","hash",m)));let f=l===""||m.pathname==="",v=f?"/":m.pathname,w;if(v==null)w=o;else{let j=i.length-1;if(!c&&v.startsWith("..")){let T=v.split("/");for(;T[0]==="..";)T.shift(),j-=1;m.pathname=T.join("/")}w=j>=0?i[j]:"/"}let b=hv(m,w),y=v&&v!=="/"&&v.endsWith("/"),S=(f||v===".")&&o.endsWith("/");return!b.pathname.endsWith("/")&&(y||S)&&(b.pathname+="/"),b}var Xn=l=>l.join("/").replace(/\/\/+/g,"/"),gv=l=>l.replace(/\/+$/,"").replace(/^\/*/,"/"),yv=l=>!l||l==="?"?"":l.startsWith("?")?l:"?"+l,xv=l=>!l||l==="#"?"":l.startsWith("#")?l:"#"+l,pv=class{constructor(l,i,o,c=!1){this.status=l,this.statusText=i||"",this.internal=c,o instanceof Error?(this.data=o.toString(),this.error=o):this.data=o}};function vv(l){return l!=null&&typeof l.status=="number"&&typeof l.statusText=="string"&&typeof l.internal=="boolean"&&"data"in l}function bv(l){return l.map(i=>i.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var sy=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function ry(l,i){let o=l;if(typeof o!="string"||!fv.test(o))return{absoluteURL:void 0,isExternal:!1,to:o};let c=o,m=!1;if(sy)try{let f=new URL(window.location.href),v=o.startsWith("//")?new URL(f.protocol+o):new URL(o),w=Jn(v.pathname,i);v.origin===f.origin&&w!=null?o=w+v.search+v.hash:m=!0}catch{Wa(!1,`<Link to="${o}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:c,isExternal:m,to:o}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var iy=["POST","PUT","PATCH","DELETE"];new Set(iy);var Sv=["GET",...iy];new Set(Sv);var Rr=U.createContext(null);Rr.displayName="DataRouter";var Wc=U.createContext(null);Wc.displayName="DataRouterState";var wv=U.createContext(!1),uy=U.createContext({isTransitioning:!1});uy.displayName="ViewTransition";var Nv=U.createContext(new Map);Nv.displayName="Fetchers";var jv=U.createContext(null);jv.displayName="Await";var za=U.createContext(null);za.displayName="Navigation";var lu=U.createContext(null);lu.displayName="Location";var jn=U.createContext({outlet:null,matches:[],isDataRoute:!1});jn.displayName="Route";var Hf=U.createContext(null);Hf.displayName="RouteError";var cy="REACT_ROUTER_ERROR",Ev="REDIRECT",Tv="ROUTE_ERROR_RESPONSE";function Mv(l){if(l.startsWith(`${cy}:${Ev}:{`))try{let i=JSON.parse(l.slice(28));if(typeof i=="object"&&i&&typeof i.status=="number"&&typeof i.statusText=="string"&&typeof i.location=="string"&&typeof i.reloadDocument=="boolean"&&typeof i.replace=="boolean")return i}catch{}}function Cv(l){if(l.startsWith(`${cy}:${Tv}:{`))try{let i=JSON.parse(l.slice(40));if(typeof i=="object"&&i&&typeof i.status=="number"&&typeof i.statusText=="string")return new pv(i.status,i.statusText,i.data)}catch{}}function Ov(l,{relative:i}={}){St(Ar(),"useHref() may be used only in the context of a <Router> component.");let{basename:o,navigator:c}=U.useContext(za),{hash:m,pathname:f,search:v}=su(l,{relative:i}),w=f;return o!=="/"&&(w=f==="/"?o:Xn([o,f])),c.createHref({pathname:w,search:v,hash:m})}function Ar(){return U.useContext(lu)!=null}function Vl(){return St(Ar(),"useLocation() may be used only in the context of a <Router> component."),U.useContext(lu).location}var oy="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function dy(l){U.useContext(za).static||U.useLayoutEffect(l)}function Lf(){let{isDataRoute:l}=U.useContext(jn);return l?Yv():Dv()}function Dv(){St(Ar(),"useNavigate() may be used only in the context of a <Router> component.");let l=U.useContext(Rr),{basename:i,navigator:o}=U.useContext(za),{matches:c}=U.useContext(jn),{pathname:m}=Vl(),f=JSON.stringify(zf(c)),v=U.useRef(!1);return dy(()=>{v.current=!0}),U.useCallback((b,y={})=>{if(Wa(v.current,oy),!v.current)return;if(typeof b=="number"){o.go(b);return}let S=Uf(b,JSON.parse(f),m,y.relative==="path");l==null&&i!=="/"&&(S.pathname=S.pathname==="/"?i:Xn([i,S.pathname])),(y.replace?o.replace:o.push)(S,y.state,y)},[i,o,f,m,l])}U.createContext(null);function su(l,{relative:i}={}){let{matches:o}=U.useContext(jn),{pathname:c}=Vl(),m=JSON.stringify(zf(o));return U.useMemo(()=>Uf(l,JSON.parse(m),c,i==="path"),[l,m,c,i])}function Rv(l,i){return fy(l,i)}function fy(l,i,o,c,m){var Y;St(Ar(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:f}=U.useContext(za),{matches:v}=U.useContext(jn),w=v[v.length-1],b=w?w.params:{},y=w?w.pathname:"/",S=w?w.pathnameBase:"/",j=w&&w.route;{let W=j&&j.path||"";my(y,!j||W.endsWith("*")||W.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${y}" (under <Route path="${W}">) 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="${W}"> to <Route path="${W==="/"?"*":`${W}/*`}">.`)}let T=Vl(),O;if(i){let W=typeof i=="string"?Rs(i):i;St(S==="/"||((Y=W.pathname)==null?void 0:Y.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 "${W.pathname}" was given in the \`location\` prop.`),O=W}else O=T;let _=O.pathname||"/",M=_;if(S!=="/"){let W=S.replace(/^\//,"").split("/");M="/"+_.replace(/^\//,"").split("/").slice(W.length).join("/")}let B=ay(l,{pathname:M});Wa(j||B!=null,`No routes matched location "${O.pathname}${O.search}${O.hash}" `),Wa(B==null||B[B.length-1].route.element!==void 0||B[B.length-1].route.Component!==void 0||B[B.length-1].route.lazy!==void 0,`Matched leaf route at location "${O.pathname}${O.search}${O.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 se=Uv(B&&B.map(W=>Object.assign({},W,{params:Object.assign({},b,W.params),pathname:Xn([S,f.encodeLocation?f.encodeLocation(W.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:W.pathname]),pathnameBase:W.pathnameBase==="/"?S:Xn([S,f.encodeLocation?f.encodeLocation(W.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:W.pathnameBase])})),v,o,c,m);return i&&se?U.createElement(lu.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...O},navigationType:"POP"}},se):se}function Av(){let l=Bv(),i=vv(l)?`${l.status} ${l.statusText}`:l instanceof Error?l.message:JSON.stringify(l),o=l instanceof Error?l.stack:null,c="rgba(200,200,200, 0.5)",m={padding:"0.5rem",backgroundColor:c},f={padding:"2px 4px",backgroundColor:c},v=null;return console.error("Error handled by React Router default ErrorBoundary:",l),v=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"}},i),o?U.createElement("pre",{style:m},o):null,v)}var _v=U.createElement(Av,null),hy=class extends U.Component{constructor(l){super(l),this.state={location:l.location,revalidation:l.revalidation,error:l.error}}static getDerivedStateFromError(l){return{error:l}}static getDerivedStateFromProps(l,i){return i.location!==l.location||i.revalidation!=="idle"&&l.revalidation==="idle"?{error:l.error,location:l.location,revalidation:l.revalidation}:{error:l.error!==void 0?l.error:i.error,location:i.location,revalidation:l.revalidation||i.revalidation}}componentDidCatch(l,i){this.props.onError?this.props.onError(l,i):console.error("React Router caught the following error during render",l)}render(){let l=this.state.error;if(this.context&&typeof l=="object"&&l&&"digest"in l&&typeof l.digest=="string"){const o=Cv(l.digest);o&&(l=o)}let i=l!==void 0?U.createElement(jn.Provider,{value:this.props.routeContext},U.createElement(Hf.Provider,{value:l,children:this.props.component})):this.props.children;return this.context?U.createElement(kv,{error:l},i):i}};hy.contextType=wv;var gf=new WeakMap;function kv({children:l,error:i}){let{basename:o}=U.useContext(za);if(typeof i=="object"&&i&&"digest"in i&&typeof i.digest=="string"){let c=Mv(i.digest);if(c){let m=gf.get(i);if(m)throw m;let f=ry(c.location,o);if(sy&&!gf.get(i))if(f.isExternal||c.reloadDocument)window.location.href=f.absoluteURL||f.to;else{const v=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(f.to,{replace:c.replace}));throw gf.set(i,v),v}return U.createElement("meta",{httpEquiv:"refresh",content:`0;url=${f.absoluteURL||f.to}`})}}return l}function zv({routeContext:l,match:i,children:o}){let c=U.useContext(Rr);return c&&c.static&&c.staticContext&&(i.route.errorElement||i.route.ErrorBoundary)&&(c.staticContext._deepestRenderedBoundaryId=i.route.id),U.createElement(jn.Provider,{value:l},o)}function Uv(l,i=[],o=null,c=null,m=null){if(l==null){if(!o)return null;if(o.errors)l=o.matches;else if(i.length===0&&!o.initialized&&o.matches.length>0)l=o.matches;else return null}let f=l,v=o==null?void 0:o.errors;if(v!=null){let S=f.findIndex(j=>j.route.id&&(v==null?void 0:v[j.route.id])!==void 0);St(S>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(v).join(",")}`),f=f.slice(0,Math.min(f.length,S+1))}let w=!1,b=-1;if(o)for(let S=0;S<f.length;S++){let j=f[S];if((j.route.HydrateFallback||j.route.hydrateFallbackElement)&&(b=S),j.route.id){let{loaderData:T,errors:O}=o,_=j.route.loader&&!T.hasOwnProperty(j.route.id)&&(!O||O[j.route.id]===void 0);if(j.route.lazy||_){w=!0,b>=0?f=f.slice(0,b+1):f=[f[0]];break}}}let y=o&&c?(S,j)=>{var T,O;c(S,{location:o.location,params:((O=(T=o.matches)==null?void 0:T[0])==null?void 0:O.params)??{},unstable_pattern:bv(o.matches),errorInfo:j})}:void 0;return f.reduceRight((S,j,T)=>{let O,_=!1,M=null,B=null;o&&(O=v&&j.route.id?v[j.route.id]:void 0,M=j.route.errorElement||_v,w&&(b<0&&T===0?(my("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),_=!0,B=null):b===T&&(_=!0,B=j.route.hydrateFallbackElement||null)));let se=i.concat(f.slice(0,T+1)),Y=()=>{let W;return O?W=M:_?W=B:j.route.Component?W=U.createElement(j.route.Component,null):j.route.element?W=j.route.element:W=S,U.createElement(zv,{match:j,routeContext:{outlet:S,matches:se,isDataRoute:o!=null},children:W})};return o&&(j.route.ErrorBoundary||j.route.errorElement||T===0)?U.createElement(hy,{location:o.location,revalidation:o.revalidation,component:M,error:O,children:Y(),routeContext:{outlet:null,matches:se,isDataRoute:!0},onError:y}):Y()},null)}function qf(l){return`${l} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Hv(l){let i=U.useContext(Rr);return St(i,qf(l)),i}function Lv(l){let i=U.useContext(Wc);return St(i,qf(l)),i}function qv(l){let i=U.useContext(jn);return St(i,qf(l)),i}function Vf(l){let i=qv(l),o=i.matches[i.matches.length-1];return St(o.route.id,`${l} can only be used on routes that contain a unique "id"`),o.route.id}function Vv(){return Vf("useRouteId")}function Bv(){var c;let l=U.useContext(Hf),i=Lv("useRouteError"),o=Vf("useRouteError");return l!==void 0?l:(c=i.errors)==null?void 0:c[o]}function Yv(){let{router:l}=Hv("useNavigate"),i=Vf("useNavigate"),o=U.useRef(!1);return dy(()=>{o.current=!0}),U.useCallback(async(m,f={})=>{Wa(o.current,oy),o.current&&(typeof m=="number"?await l.navigate(m):await l.navigate(m,{fromRouteId:i,...f}))},[l,i])}var cg={};function my(l,i,o){!i&&!cg[l]&&(cg[l]=!0,Wa(!1,o))}U.memo($v);function $v({routes:l,future:i,state:o,onError:c}){return fy(l,void 0,o,c,i)}function Fv({to:l,replace:i,state:o,relative:c}){St(Ar(),"<Navigate> may be used only in the context of a <Router> component.");let{static:m}=U.useContext(za);Wa(!m,"<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(jn),{pathname:v}=Vl(),w=Lf(),b=Uf(l,zf(f),v,c==="path"),y=JSON.stringify(b);return U.useEffect(()=>{w(JSON.parse(y),{replace:i,state:o,relative:c})},[w,y,c,i,o]),null}function In(l){St(!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 Gv({basename:l="/",children:i=null,location:o,navigationType:c="POP",navigator:m,static:f=!1,unstable_useTransitions:v}){St(!Ar(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let w=l.replace(/^\/*/,"/"),b=U.useMemo(()=>({basename:w,navigator:m,static:f,unstable_useTransitions:v,future:{}}),[w,m,f,v]);typeof o=="string"&&(o=Rs(o));let{pathname:y="/",search:S="",hash:j="",state:T=null,key:O="default"}=o,_=U.useMemo(()=>{let M=Jn(y,w);return M==null?null:{location:{pathname:M,search:S,hash:j,state:T,key:O},navigationType:c}},[w,y,S,j,T,O,c]);return Wa(_!=null,`<Router basename="${w}"> is not able to match the URL "${y}${S}${j}" because it does not start with the basename, so the <Router> won't render anything.`),_==null?null:U.createElement(za.Provider,{value:b},U.createElement(lu.Provider,{children:i,value:_}))}function Zv({children:l,location:i}){return Rv(Ef(l),i)}function Ef(l,i=[]){let o=[];return U.Children.forEach(l,(c,m)=>{if(!U.isValidElement(c))return;let f=[...i,m];if(c.type===U.Fragment){o.push.apply(o,Ef(c.props.children,f));return}St(c.type===In,`[${typeof c.type=="string"?c.type:c.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),St(!c.props.index||!c.props.children,"An index route cannot have child routes.");let v={id:c.props.id||f.join("-"),caseSensitive:c.props.caseSensitive,element:c.props.element,Component:c.props.Component,index:c.props.index,path:c.props.path,middleware:c.props.middleware,loader:c.props.loader,action:c.props.action,hydrateFallbackElement:c.props.hydrateFallbackElement,HydrateFallback:c.props.HydrateFallback,errorElement:c.props.errorElement,ErrorBoundary:c.props.ErrorBoundary,hasErrorBoundary:c.props.hasErrorBoundary===!0||c.props.ErrorBoundary!=null||c.props.errorElement!=null,shouldRevalidate:c.props.shouldRevalidate,handle:c.props.handle,lazy:c.props.lazy};c.props.children&&(v.children=Ef(c.props.children,f)),o.push(v)}),o}var Vc="get",Bc="application/x-www-form-urlencoded";function Ic(l){return typeof HTMLElement<"u"&&l instanceof HTMLElement}function Pv(l){return Ic(l)&&l.tagName.toLowerCase()==="button"}function Qv(l){return Ic(l)&&l.tagName.toLowerCase()==="form"}function Wv(l){return Ic(l)&&l.tagName.toLowerCase()==="input"}function Iv(l){return!!(l.metaKey||l.altKey||l.ctrlKey||l.shiftKey)}function Xv(l,i){return l.button===0&&(!i||i==="_self")&&!Iv(l)}var kc=null;function Jv(){if(kc===null)try{new FormData(document.createElement("form"),0),kc=!1}catch{kc=!0}return kc}var Kv=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function yf(l){return l!=null&&!Kv.has(l)?(Wa(!1,`"${l}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Bc}"`),null):l}function eb(l,i){let o,c,m,f,v;if(Qv(l)){let w=l.getAttribute("action");c=w?Jn(w,i):null,o=l.getAttribute("method")||Vc,m=yf(l.getAttribute("enctype"))||Bc,f=new FormData(l)}else if(Pv(l)||Wv(l)&&(l.type==="submit"||l.type==="image")){let w=l.form;if(w==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let b=l.getAttribute("formaction")||w.getAttribute("action");if(c=b?Jn(b,i):null,o=l.getAttribute("formmethod")||w.getAttribute("method")||Vc,m=yf(l.getAttribute("formenctype"))||yf(w.getAttribute("enctype"))||Bc,f=new FormData(w,l),!Jv()){let{name:y,type:S,value:j}=l;if(S==="image"){let T=y?`${y}.`:"";f.append(`${T}x`,"0"),f.append(`${T}y`,"0")}else y&&f.append(y,j)}}else{if(Ic(l))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');o=Vc,c=null,m=Bc,v=l}return f&&m==="text/plain"&&(v=f,f=void 0),{action:c,method:o.toLowerCase(),encType:m,formData:f,body:v}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Bf(l,i){if(l===!1||l===null||typeof l>"u")throw new Error(i)}function tb(l,i,o,c){let m=typeof l=="string"?new URL(l,typeof window>"u"?"server://singlefetch/":window.location.origin):l;return o?m.pathname.endsWith("/")?m.pathname=`${m.pathname}_.${c}`:m.pathname=`${m.pathname}.${c}`:m.pathname==="/"?m.pathname=`_root.${c}`:i&&Jn(m.pathname,i)==="/"?m.pathname=`${i.replace(/\/$/,"")}/_root.${c}`:m.pathname=`${m.pathname.replace(/\/$/,"")}.${c}`,m}async function ab(l,i){if(l.id in i)return i[l.id];try{let o=await import(l.module);return i[l.id]=o,o}catch(o){return console.error(`Error loading route module \`${l.module}\`, reloading page...`),console.error(o),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function nb(l){return l==null?!1:l.href==null?l.rel==="preload"&&typeof l.imageSrcSet=="string"&&typeof l.imageSizes=="string":typeof l.rel=="string"&&typeof l.href=="string"}async function lb(l,i,o){let c=await Promise.all(l.map(async m=>{let f=i.routes[m.route.id];if(f){let v=await ab(f,o);return v.links?v.links():[]}return[]}));return ub(c.flat(1).filter(nb).filter(m=>m.rel==="stylesheet"||m.rel==="preload").map(m=>m.rel==="stylesheet"?{...m,rel:"prefetch",as:"style"}:{...m,rel:"prefetch"}))}function og(l,i,o,c,m,f){let v=(b,y)=>o[y]?b.route.id!==o[y].route.id:!0,w=(b,y)=>{var S;return o[y].pathname!==b.pathname||((S=o[y].route.path)==null?void 0:S.endsWith("*"))&&o[y].params["*"]!==b.params["*"]};return f==="assets"?i.filter((b,y)=>v(b,y)||w(b,y)):f==="data"?i.filter((b,y)=>{var j;let S=c.routes[b.route.id];if(!S||!S.hasLoader)return!1;if(v(b,y)||w(b,y))return!0;if(b.route.shouldRevalidate){let T=b.route.shouldRevalidate({currentUrl:new URL(m.pathname+m.search+m.hash,window.origin),currentParams:((j=o[0])==null?void 0:j.params)||{},nextUrl:new URL(l,window.origin),nextParams:b.params,defaultShouldRevalidate:!0});if(typeof T=="boolean")return T}return!0}):[]}function sb(l,i,{includeHydrateFallback:o}={}){return rb(l.map(c=>{let m=i.routes[c.route.id];if(!m)return[];let f=[m.module];return m.clientActionModule&&(f=f.concat(m.clientActionModule)),m.clientLoaderModule&&(f=f.concat(m.clientLoaderModule)),o&&m.hydrateFallbackModule&&(f=f.concat(m.hydrateFallbackModule)),m.imports&&(f=f.concat(m.imports)),f}).flat(1))}function rb(l){return[...new Set(l)]}function ib(l){let i={},o=Object.keys(l).sort();for(let c of o)i[c]=l[c];return i}function ub(l,i){let o=new Set;return new Set(i),l.reduce((c,m)=>{let f=JSON.stringify(ib(m));return o.has(f)||(o.add(f),c.push({key:f,link:m})),c},[])}function gy(){let l=U.useContext(Rr);return Bf(l,"You must render this element inside a <DataRouterContext.Provider> element"),l}function cb(){let l=U.useContext(Wc);return Bf(l,"You must render this element inside a <DataRouterStateContext.Provider> element"),l}var Yf=U.createContext(void 0);Yf.displayName="FrameworkContext";function yy(){let l=U.useContext(Yf);return Bf(l,"You must render this element inside a <HydratedRouter> element"),l}function ob(l,i){let o=U.useContext(Yf),[c,m]=U.useState(!1),[f,v]=U.useState(!1),{onFocus:w,onBlur:b,onMouseEnter:y,onMouseLeave:S,onTouchStart:j}=i,T=U.useRef(null);U.useEffect(()=>{if(l==="render"&&v(!0),l==="viewport"){let M=se=>{se.forEach(Y=>{v(Y.isIntersecting)})},B=new IntersectionObserver(M,{threshold:.5});return T.current&&B.observe(T.current),()=>{B.disconnect()}}},[l]),U.useEffect(()=>{if(c){let M=setTimeout(()=>{v(!0)},100);return()=>{clearTimeout(M)}}},[c]);let O=()=>{m(!0)},_=()=>{m(!1),v(!1)};return o?l!=="intent"?[f,T,{}]:[f,T,{onFocus:Vi(w,O),onBlur:Vi(b,_),onMouseEnter:Vi(y,O),onMouseLeave:Vi(S,_),onTouchStart:Vi(j,O)}]:[!1,T,{}]}function Vi(l,i){return o=>{l&&l(o),o.defaultPrevented||i(o)}}function db({page:l,...i}){let{router:o}=gy(),c=U.useMemo(()=>ay(o.routes,l,o.basename),[o.routes,l,o.basename]);return c?U.createElement(hb,{page:l,matches:c,...i}):null}function fb(l){let{manifest:i,routeModules:o}=yy(),[c,m]=U.useState([]);return U.useEffect(()=>{let f=!1;return lb(l,i,o).then(v=>{f||m(v)}),()=>{f=!0}},[l,i,o]),c}function hb({page:l,matches:i,...o}){let c=Vl(),{future:m,manifest:f,routeModules:v}=yy(),{basename:w}=gy(),{loaderData:b,matches:y}=cb(),S=U.useMemo(()=>og(l,i,y,f,c,"data"),[l,i,y,f,c]),j=U.useMemo(()=>og(l,i,y,f,c,"assets"),[l,i,y,f,c]),T=U.useMemo(()=>{if(l===c.pathname+c.search+c.hash)return[];let M=new Set,B=!1;if(i.forEach(Y=>{var K;let W=f.routes[Y.route.id];!W||!W.hasLoader||(!S.some(ae=>ae.route.id===Y.route.id)&&Y.route.id in b&&((K=v[Y.route.id])!=null&&K.shouldRevalidate)||W.hasClientLoader?B=!0:M.add(Y.route.id))}),M.size===0)return[];let se=tb(l,w,m.unstable_trailingSlashAwareDataRequests,"data");return B&&M.size>0&&se.searchParams.set("_routes",i.filter(Y=>M.has(Y.route.id)).map(Y=>Y.route.id).join(",")),[se.pathname+se.search]},[w,m.unstable_trailingSlashAwareDataRequests,b,c,f,S,i,l,v]),O=U.useMemo(()=>sb(j,f),[j,f]),_=fb(j);return U.createElement(U.Fragment,null,T.map(M=>U.createElement("link",{key:M,rel:"prefetch",as:"fetch",href:M,...o})),O.map(M=>U.createElement("link",{key:M,rel:"modulepreload",href:M,...o})),_.map(({key:M,link:B})=>U.createElement("link",{key:M,nonce:o.nonce,...B,crossOrigin:B.crossOrigin??o.crossOrigin})))}function mb(...l){return i=>{l.forEach(o=>{typeof o=="function"?o(i):o!=null&&(o.current=i)})}}var gb=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{gb&&(window.__reactRouterVersion="7.13.0")}catch{}function yb({basename:l,children:i,unstable_useTransitions:o,window:c}){let m=U.useRef();m.current==null&&(m.current=Wp({window:c,v5Compat:!0}));let f=m.current,[v,w]=U.useState({action:f.action,location:f.location}),b=U.useCallback(y=>{o===!1?w(y):U.startTransition(()=>w(y))},[o]);return U.useLayoutEffect(()=>f.listen(b),[f,b]),U.createElement(Gv,{basename:l,children:i,location:v.location,navigationType:v.action,navigator:f,unstable_useTransitions:o})}var xy=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,py=U.forwardRef(function({onClick:i,discover:o="render",prefetch:c="none",relative:m,reloadDocument:f,replace:v,state:w,target:b,to:y,preventScrollReset:S,viewTransition:j,unstable_defaultShouldRevalidate:T,...O},_){let{basename:M,unstable_useTransitions:B}=U.useContext(za),se=typeof y=="string"&&xy.test(y),Y=ry(y,M);y=Y.to;let W=Ov(y,{relative:m}),[K,ae,Z]=ob(c,O),G=vb(y,{replace:v,state:w,target:b,preventScrollReset:S,relative:m,viewTransition:j,unstable_defaultShouldRevalidate:T,unstable_useTransitions:B});function Q(z){i&&i(z),z.defaultPrevented||G(z)}let D=U.createElement("a",{...O,...Z,href:Y.absoluteURL||W,onClick:Y.isExternal||f?i:Q,ref:mb(_,ae),target:b,"data-discover":!se&&o==="render"?"true":void 0});return K&&!se?U.createElement(U.Fragment,null,D,U.createElement(db,{page:W})):D});py.displayName="Link";var vy=U.forwardRef(function({"aria-current":i="page",caseSensitive:o=!1,className:c="",end:m=!1,style:f,to:v,viewTransition:w,children:b,...y},S){let j=su(v,{relative:y.relative}),T=Vl(),O=U.useContext(Wc),{navigator:_,basename:M}=U.useContext(za),B=O!=null&&jb(j)&&w===!0,se=_.encodeLocation?_.encodeLocation(j).pathname:j.pathname,Y=T.pathname,W=O&&O.navigation&&O.navigation.location?O.navigation.location.pathname:null;o||(Y=Y.toLowerCase(),W=W?W.toLowerCase():null,se=se.toLowerCase()),W&&M&&(W=Jn(W,M)||W);const K=se!=="/"&&se.endsWith("/")?se.length-1:se.length;let ae=Y===se||!m&&Y.startsWith(se)&&Y.charAt(K)==="/",Z=W!=null&&(W===se||!m&&W.startsWith(se)&&W.charAt(se.length)==="/"),G={isActive:ae,isPending:Z,isTransitioning:B},Q=ae?i:void 0,D;typeof c=="function"?D=c(G):D=[c,ae?"active":null,Z?"pending":null,B?"transitioning":null].filter(Boolean).join(" ");let z=typeof f=="function"?f(G):f;return U.createElement(py,{...y,"aria-current":Q,className:D,ref:S,style:z,to:v,viewTransition:w},typeof b=="function"?b(G):b)});vy.displayName="NavLink";var xb=U.forwardRef(({discover:l="render",fetcherKey:i,navigate:o,reloadDocument:c,replace:m,state:f,method:v=Vc,action:w,onSubmit:b,relative:y,preventScrollReset:S,viewTransition:j,unstable_defaultShouldRevalidate:T,...O},_)=>{let{unstable_useTransitions:M}=U.useContext(za),B=wb(),se=Nb(w,{relative:y}),Y=v.toLowerCase()==="get"?"get":"post",W=typeof w=="string"&&xy.test(w),K=ae=>{if(b&&b(ae),ae.defaultPrevented)return;ae.preventDefault();let Z=ae.nativeEvent.submitter,G=(Z==null?void 0:Z.getAttribute("formmethod"))||v,Q=()=>B(Z||ae.currentTarget,{fetcherKey:i,method:G,navigate:o,replace:m,state:f,relative:y,preventScrollReset:S,viewTransition:j,unstable_defaultShouldRevalidate:T});M&&o!==!1?U.startTransition(()=>Q()):Q()};return U.createElement("form",{ref:_,method:Y,action:se,onSubmit:c?b:K,...O,"data-discover":!W&&l==="render"?"true":void 0})});xb.displayName="Form";function pb(l){return`${l} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function by(l){let i=U.useContext(Rr);return St(i,pb(l)),i}function vb(l,{target:i,replace:o,state:c,preventScrollReset:m,relative:f,viewTransition:v,unstable_defaultShouldRevalidate:w,unstable_useTransitions:b}={}){let y=Lf(),S=Vl(),j=su(l,{relative:f});return U.useCallback(T=>{if(Xv(T,i)){T.preventDefault();let O=o!==void 0?o:tu(S)===tu(j),_=()=>y(l,{replace:O,state:c,preventScrollReset:m,relative:f,viewTransition:v,unstable_defaultShouldRevalidate:w});b?U.startTransition(()=>_()):_()}},[S,y,j,o,c,i,l,m,f,v,w,b])}var bb=0,Sb=()=>`__${String(++bb)}__`;function wb(){let{router:l}=by("useSubmit"),{basename:i}=U.useContext(za),o=Vv(),c=l.fetch,m=l.navigate;return U.useCallback(async(f,v={})=>{let{action:w,method:b,encType:y,formData:S,body:j}=eb(f,i);if(v.navigate===!1){let T=v.fetcherKey||Sb();await c(T,o,v.action||w,{unstable_defaultShouldRevalidate:v.unstable_defaultShouldRevalidate,preventScrollReset:v.preventScrollReset,formData:S,body:j,formMethod:v.method||b,formEncType:v.encType||y,flushSync:v.flushSync})}else await m(v.action||w,{unstable_defaultShouldRevalidate:v.unstable_defaultShouldRevalidate,preventScrollReset:v.preventScrollReset,formData:S,body:j,formMethod:v.method||b,formEncType:v.encType||y,replace:v.replace,state:v.state,fromRouteId:o,flushSync:v.flushSync,viewTransition:v.viewTransition})},[c,m,i,o])}function Nb(l,{relative:i}={}){let{basename:o}=U.useContext(za),c=U.useContext(jn);St(c,"useFormAction must be used inside a RouteContext");let[m]=c.matches.slice(-1),f={...su(l||".",{relative:i})},v=Vl();if(l==null){f.search=v.search;let w=new URLSearchParams(f.search),b=w.getAll("index");if(b.some(S=>S==="")){w.delete("index"),b.filter(j=>j).forEach(j=>w.append("index",j));let S=w.toString();f.search=S?`?${S}`:""}}return(!l||l===".")&&m.route.index&&(f.search=f.search?f.search.replace(/^\?/,"?index&"):"?index"),o!=="/"&&(f.pathname=f.pathname==="/"?o:Xn([o,f.pathname])),tu(f)}function jb(l,{relative:i}={}){let o=U.useContext(uy);St(o!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:c}=by("useViewTransitionState"),m=su(l,{relative:i});if(!o.isTransitioning)return!1;let f=Jn(o.currentLocation.pathname,c)||o.currentLocation.pathname,v=Jn(o.nextLocation.pathname,c)||o.nextLocation.pathname;return Yc(m.pathname,v)!=null||Yc(m.pathname,f)!=null}var Eb=ty();const Tb=_f(Eb);/**
|
|
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 Sy=(...l)=>l.filter((i,o,c)=>!!i&&i.trim()!==""&&c.indexOf(i)===o).join(" ").trim();/**
|
|
66
|
+
* @license lucide-react v0.564.0 - ISC
|
|
67
|
+
*
|
|
68
|
+
* This source code is licensed under the ISC license.
|
|
69
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
70
|
+
*/const Mb=l=>l.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();/**
|
|
71
|
+
* @license lucide-react v0.564.0 - ISC
|
|
72
|
+
*
|
|
73
|
+
* This source code is licensed under the ISC license.
|
|
74
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
75
|
+
*/const Cb=l=>l.replace(/^([A-Z])|[\s-_]+(\w)/g,(i,o,c)=>c?c.toUpperCase():o.toLowerCase());/**
|
|
76
|
+
* @license lucide-react v0.564.0 - ISC
|
|
77
|
+
*
|
|
78
|
+
* This source code is licensed under the ISC license.
|
|
79
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
80
|
+
*/const dg=l=>{const i=Cb(l);return i.charAt(0).toUpperCase()+i.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 Ob={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 Db=l=>{for(const i in l)if(i.startsWith("aria-")||i==="role"||i==="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 Rb=U.forwardRef(({color:l="currentColor",size:i=24,strokeWidth:o=2,absoluteStrokeWidth:c,className:m="",children:f,iconNode:v,...w},b)=>U.createElement("svg",{ref:b,...Ob,width:i,height:i,stroke:l,strokeWidth:c?Number(o)*24/Number(i):o,className:Sy("lucide",m),...!f&&!Db(w)&&{"aria-hidden":"true"},...w},[...v.map(([y,S])=>U.createElement(y,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 _e=(l,i)=>{const o=U.forwardRef(({className:c,...m},f)=>U.createElement(Rb,{ref:f,iconNode:i,className:Sy(`lucide-${Mb(dg(l))}`,`lucide-${l}`,c),...m}));return o.displayName=dg(l),o};/**
|
|
101
|
+
* @license lucide-react v0.564.0 - ISC
|
|
102
|
+
*
|
|
103
|
+
* This source code is licensed under the ISC license.
|
|
104
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
105
|
+
*/const Ab=[["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"}]],wy=_e("activity",Ab);/**
|
|
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 _b=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],kb=_e("arrow-down",_b);/**
|
|
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 zb=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],fg=_e("arrow-right",zb);/**
|
|
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 Ub=[["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"}]],Hb=_e("arrow-up-down",Ub);/**
|
|
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 Lb=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],qb=_e("arrow-up",Lb);/**
|
|
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 Vb=[["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"}]],Bb=_e("bell",Vb);/**
|
|
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 Yb=[["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"}]],hg=_e("briefcase",Yb);/**
|
|
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 $b=[["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"}]],$f=_e("calendar",$b);/**
|
|
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 Fb=[["path",{d:"M5 21v-6",key:"1hz6c0"}],["path",{d:"M12 21V3",key:"1lcnhd"}],["path",{d:"M19 21V9",key:"unv183"}]],Gb=_e("chart-no-axes-column",Fb);/**
|
|
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 Zb=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Tf=_e("check",Zb);/**
|
|
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 Pb=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Ny=_e("chevron-down",Pb);/**
|
|
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 Qb=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],Wb=_e("chevron-left",Qb);/**
|
|
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 Ib=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Xb=_e("chevron-right",Ib);/**
|
|
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 Jb=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],Kb=_e("chevron-up",Jb);/**
|
|
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 e1=[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]],t1=_e("chevrons-up-down",e1);/**
|
|
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 a1=[["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"}]],Kn=_e("circle-alert",a1);/**
|
|
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 n1=[["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"}]],mg=_e("circle-arrow-down",n1);/**
|
|
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 l1=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],ru=_e("circle-check-big",l1);/**
|
|
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 s1=[["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"}]],r1=_e("circle-x",s1);/**
|
|
196
|
+
* @license lucide-react v0.564.0 - ISC
|
|
197
|
+
*
|
|
198
|
+
* This source code is licensed under the ISC license.
|
|
199
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
200
|
+
*/const i1=[["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"}]],gg=_e("clipboard-list",i1);/**
|
|
201
|
+
* @license lucide-react v0.564.0 - ISC
|
|
202
|
+
*
|
|
203
|
+
* This source code is licensed under the ISC license.
|
|
204
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
205
|
+
*/const u1=[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],$c=_e("clock",u1);/**
|
|
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 c1=[["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"}]],jy=_e("external-link",c1);/**
|
|
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 o1=[["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"}]],d1=_e("eye-off",o1);/**
|
|
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 f1=[["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"}]],h1=_e("eye",f1);/**
|
|
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 m1=[["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"}]],Mf=_e("file-text",m1);/**
|
|
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 g1=[["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"}]],y1=_e("git-pull-request",g1);/**
|
|
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 x1=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]],p1=_e("globe",x1);/**
|
|
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 v1=[["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"}]],b1=_e("house",v1);/**
|
|
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 S1=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],w1=_e("info",S1);/**
|
|
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 N1=[["path",{d:"M5 3v14",key:"9nsxs2"}],["path",{d:"M12 3v8",key:"1h2ygw"}],["path",{d:"M19 3v18",key:"1sk56x"}]],j1=_e("kanban",N1);/**
|
|
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 E1=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],Ey=_e("loader-circle",E1);/**
|
|
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 T1=[["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"}]],Ty=_e("map",T1);/**
|
|
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 M1=[["path",{d:"M5 12h14",key:"1ays0h"}]],C1=_e("minus",M1);/**
|
|
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 O1=[["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"}]],My=_e("pause",O1);/**
|
|
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 D1=[["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"}]],Ff=_e("pen",D1);/**
|
|
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 R1=[["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"}]],Or=_e("play",R1);/**
|
|
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 A1=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],_r=_e("plus",A1);/**
|
|
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 _1=[["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"}]],Cy=_e("rotate-ccw",_1);/**
|
|
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 k1=[["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"}]],z1=_e("save",k1);/**
|
|
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 U1=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],Xc=_e("search",U1);/**
|
|
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 H1=[["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"}]],L1=_e("settings",H1);/**
|
|
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 q1=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],yg=_e("square",q1);/**
|
|
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 V1=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],B1=_e("terminal",V1);/**
|
|
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 Y1=[["path",{d:"M21 7 6.82 21.18a2.83 2.83 0 0 1-3.99-.01a2.83 2.83 0 0 1 0-4L17 3",key:"1ub6xw"}],["path",{d:"m16 2 6 6",key:"1gw87d"}],["path",{d:"M12 16H4",key:"1cjfip"}]],$1=_e("test-tube-diagonal",Y1);/**
|
|
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 F1=[["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"}]],Jc=_e("trash-2",F1);/**
|
|
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 G1=[["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"}]],au=_e("triangle-alert",G1);/**
|
|
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 Z1=[["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"}]],P1=_e("wifi",Z1);/**
|
|
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 Q1=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],kr=_e("x",Q1),Oy=[{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"}}],Dy=[{id:"executor",label:"Executor",processName:"executor",color:{bg:"bg-blue-500",border:"border-blue-500/60"},triggerEndpoint:"/api/actions/run",scheduleTemplateKey:"executor",getEnabled:l=>l.executorEnabled??!0,getSchedule:l=>l.cronSchedule??"5 */2 * * *",settingsSection:"general",buildEnabledPatch:l=>({executorEnabled:l})},{id:"reviewer",label:"Reviewer",processName:"reviewer",color:{bg:"bg-green-500",border:"border-green-500/60"},triggerEndpoint:"/api/actions/review",scheduleTemplateKey:"reviewer",getEnabled:l=>l.reviewerEnabled??!0,getSchedule:l=>l.reviewerSchedule??"25 */3 * * *",settingsSection:"general",buildEnabledPatch:l=>({reviewerEnabled:l})},{id:"qa",label:"QA",processName:"qa",color:{bg:"bg-purple-500",border:"border-purple-500/60"},triggerEndpoint:"/api/actions/qa",scheduleTemplateKey:"qa",getEnabled:l=>{var i;return((i=l.qa)==null?void 0:i.enabled)??!0},getSchedule:l=>{var i;return((i=l.qa)==null?void 0:i.schedule)??"45 2,10,18 * * *"},settingsSection:"general",buildEnabledPatch:(l,i)=>({qa:{...i.qa??{},enabled:l}})},{id:"audit",label:"Audit",processName:"audit",color:{bg:"bg-orange-500",border:"border-orange-500/60"},triggerEndpoint:"/api/actions/audit",scheduleTemplateKey:"audit",getEnabled:l=>{var i;return((i=l.audit)==null?void 0:i.enabled)??!0},getSchedule:l=>{var i;return((i=l.audit)==null?void 0:i.schedule)??"50 3 * * 1"},settingsSection:"advanced",buildEnabledPatch:(l,i)=>({audit:{...i.audit??{},enabled:l}})},{id:"slicer",label:"Planner",processName:"planner",color:{bg:"bg-yellow-500",border:"border-yellow-500/60"},triggerEndpoint:"/api/actions/planner",scheduleTemplateKey:"slicer",getEnabled:l=>{var i;return((i=l.roadmapScanner)==null?void 0:i.enabled)??!0},getSchedule:l=>{var i;return((i=l.roadmapScanner)==null?void 0:i.slicerSchedule)??"35 */6 * * *"},settingsSection:"advanced",buildEnabledPatch:(l,i)=>({roadmapScanner:{...i.roadmapScanner??{},enabled:l}})},{id:"analytics",label:"Analytics",processName:"analytics",color:{bg:"bg-pink-500",border:"border-pink-500/60"},triggerEndpoint:"/api/actions/analytics",scheduleTemplateKey:"analytics",getEnabled:l=>{var i;return((i=l.analytics)==null?void 0:i.enabled)??!1},getSchedule:l=>{var i;return((i=l.analytics)==null?void 0:i.schedule)??"0 6 * * 1"},settingsSection:"advanced",buildEnabledPatch:(l,i)=>({analytics:{...i.analytics??{},enabled:l}})}];function Ry(l){return Dy.find(i=>i.id===l)}const Gf="";let Zf=!1,Fc=null;function W1(l){Zf=l}function xg(l){Fc=l}function I1(){return Zf}function Pf(l){return encodeURIComponent(l.replace(/\//g,"~"))}function xt(l){return Zf&&Fc?l.replace("/api/",`/api/projects/${Pf(Fc)}/`):l}function X1(){return tt("/api/mode")}function Ay(){return tt("/api/projects")}function J1(l){const i=Pf(l);return tt(`/api/projects/${i}`,{method:"DELETE"})}async function tt(l,i){const o=`${Gf}${l}`,c=await fetch(o,{headers:{"Content-Type":"application/json",...i==null?void 0:i.headers},...i});if(!c.ok){const m=await c.json().catch(()=>({error:"Unknown error"}));throw new Error(m.error||`HTTP ${c.status}: ${c.statusText}`)}return c.json()}function xf(){return tt(xt("/api/status"))}function _y(){return tt(xt("/api/prs"))}function K1(l,i){const o=`?lines=${encodeURIComponent(i)}`;return tt(xt(`/api/logs/${encodeURIComponent(l)}${o}`))}function Qf(){return tt(xt("/api/config"))}async function ky(){if(I1()){const i=(await Ay()).filter(c=>c.valid);return(await Promise.all(i.map(async c=>{try{const m=await tt(`/api/projects/${Pf(c.name)}/config`);return{projectId:c.name,config:m}}catch(m){return console.error(`Failed to fetch config for project ${c.name}`,m),null}}))).filter(c=>c!==null)}else{const l=await Qf();return[{projectId:Fc||"current",config:l}]}}function Gc(l){return tt(xt("/api/config"),{method:"PUT",body:JSON.stringify(l)})}function eS(){return tt(xt("/api/doctor"))}function zy(){return tt(xt("/api/schedule-info"))}function tS(){return tt(xt("/api/actions/run"),{method:"POST"})}function Uy(){return tt(xt("/api/actions/review"),{method:"POST"})}function aS(){return tt(xt("/api/actions/qa"),{method:"POST"})}function nS(){return tt(xt("/api/actions/audit"),{method:"POST"})}function lS(){return tt(xt("/api/actions/analytics"),{method:"POST"})}function sS(){return tt(xt("/api/actions/planner"),{method:"POST"})}function rS(l){const i=Ry(l);return i?tt(xt(i.triggerEndpoint),{method:"POST"}):Promise.reject(new Error(`Unknown job ID: ${l}`))}function eu(){return tt(xt("/api/actions/install-cron"),{method:"POST"})}function iS(){return tt(xt("/api/actions/uninstall-cron"),{method:"POST"})}function uS(l="all"){return tt(xt("/api/actions/cancel"),{method:"POST",body:JSON.stringify({type:l})})}const ql=["Draft","Ready","In Progress","Review","Done"];function Hy(){return tt(xt("/api/board/status"))}function cS(l){return tt(xt("/api/board/issues"),{method:"POST",body:JSON.stringify(l)})}function Ly(l,i){return tt(xt(`/api/board/issues/${l}/move`),{method:"PATCH",body:JSON.stringify({column:i})})}async function oS(l){const i=`${Gf}${xt(`/api/board/issues/${l}`)}`,o=await fetch(i,{headers:{"Content-Type":"application/json"},method:"DELETE"});if(!o.ok){const c=await o.json().catch(()=>({error:"Unknown error"}));throw new Error(c.error||`HTTP ${o.status}: ${o.statusText}`)}}function dS(){return tt(xt("/api/actions/clear-lock"),{method:"POST"})}function fS(l,i=[],o){const c=(o==null?void 0:o.enabled)??!0,m=U.useRef(l);m.current=l,U.useEffect(()=>{if(!c)return;const f=`${Gf}${xt("/api/status/events")}`,v=new EventSource(f);return v.addEventListener("status_changed",w=>{try{const b=JSON.parse(w.data);m.current(b)}catch{}}),()=>{v.close()}},[c,...i])}function hS(){return tt("/api/queue/status")}function mS(l){const i=`?window=${encodeURIComponent(l)}`;return tt(`/api/queue/analytics${i}`)}function gS(){return tt("/api/global-notifications")}function pg(l){return tt("/api/global-notifications",{method:"PUT",body:JSON.stringify(l)})}function yS(){return tt(xt("/api/roadmap"))}function xS(){return tt(xt("/api/roadmap/scan"),{method:"POST"})}function qy(l){return tt(xt("/api/roadmap/toggle"),{method:"PUT",body:JSON.stringify({enabled:l})})}function dn(l,i=[],o){const c=(o==null?void 0:o.enabled)??!0,[m,f]=U.useState(null),[v,w]=U.useState(!0),[b,y]=U.useState(null),S=U.useRef(l);S.current=l;const j=U.useRef(()=>{(async()=>{y(null);try{const O=await S.current();f(O)}catch(O){y(O instanceof Error?O:new Error("Unknown error"))}})()});return U.useEffect(()=>{if(!c)return;let T=!1;return w(!0),y(null),(async()=>{try{const _=await S.current();T||f(_)}catch(_){T||y(_ instanceof Error?_:new Error("Unknown error"))}finally{T||w(!1)}})(),()=>{T=!0}},[...i,c]),{data:m,loading:v,error:b,refetch:j.current}}const vg=l=>{let i;const o=new Set,c=(y,S)=>{const j=typeof y=="function"?y(i):y;if(!Object.is(j,i)){const T=i;i=S??(typeof j!="object"||j===null)?j:Object.assign({},i,j),o.forEach(O=>O(i,T))}},m=()=>i,w={setState:c,getState:m,getInitialState:()=>b,subscribe:y=>(o.add(y),()=>o.delete(y))},b=i=l(c,m,w);return w},pS=l=>l?vg(l):vg,vS=l=>l;function bS(l,i=vS){const o=ze.useSyncExternalStore(l.subscribe,()=>i(l.getState()),()=>i(l.getInitialState()));return ze.useDebugValue(o),o}const bg=l=>{const i=pS(l),o=c=>bS(i,c);return Object.assign(o,i),o},SS=l=>l?bg(l):bg,wS=typeof localStorage<"u"?localStorage.getItem("nw-selected-project"):null,Gt=SS((l,i)=>({projectName:"Night Watch",setProjectName:o=>l({projectName:o}),toasts:[],addToast:o=>{const c=Math.random().toString(36).substring(7);l(m=>({toasts:[...m.toasts,{...o,id:c}]})),setTimeout(()=>{l(m=>({toasts:m.toasts.filter(f=>f.id!==c)}))},5e3)},removeToast:o=>l(c=>({toasts:c.toasts.filter(m=>m.id!==o)})),status:null,setStatus:o=>l(c=>!c.status||new Date(o.timestamp)>new Date(c.status.timestamp)?{status:o}:c),globalModeLoading:!0,setGlobalModeLoading:o=>l({globalModeLoading:o}),isGlobalMode:!1,setGlobalMode:o=>{W1(o),l({isGlobalMode:o})},projects:[],setProjects:o=>l({projects:o}),selectedProjectId:wS,selectProject:o=>{xg(o),o?localStorage.setItem("nw-selected-project",o):localStorage.removeItem("nw-selected-project"),l(c=>{const m=c.projects.find(f=>f.name===o);return{selectedProjectId:o,...m?{projectName:m.name}:{}}})},removeProjectFromList:o=>{l(c=>{var w;const m=c.projects.filter(b=>b.name!==o),f=c.selectedProjectId===o,v=f?((w=m[0])==null?void 0:w.name)??null:c.selectedProjectId;return f&&(xg(v),v?localStorage.setItem("nw-selected-project",v):localStorage.removeItem("nw-selected-project")),{projects:m,selectedProjectId:v,...f&&m[0]?{projectName:m[0].name}:{}}})},getJobStates:()=>{const{status:o}=i(),c=o==null?void 0:o.config;return Dy.map(m=>({id:m.id,label:m.label,processName:m.processName,color:m.color,enabled:c?m.getEnabled(c):!0,schedule:c?m.getSchedule(c):"",triggerEndpoint:m.triggerEndpoint}))}})),NS=()=>{const[l,i]=U.useState(!1),{projectName:o,isGlobalMode:c,projects:m,selectedProjectId:f,selectProject:v,globalModeLoading:w}=Gt(),{data:b}=dn(_y,[f],{enabled:!w}),y=(b==null?void 0:b.length)??0,S=U.useMemo(()=>[{icon:b1,label:"Dashboard",path:"/",section:"Overview"},{icon:B1,label:"Logs",path:"/logs"},{icon:j1,label:"Board",path:"/board",section:"Work"},{icon:y1,label:"Pull Requests",path:"/prs",badge:y},{icon:Ty,label:"Roadmap",path:"/roadmap"},{icon:$f,label:"Schedules",path:"/scheduling",section:"Automation"},{icon:L1,label:"Settings",path:"/settings",section:"Config"}],[y]);return s.jsxs("aside",{className:`
|
|
341
|
+
relative flex flex-col transition-all duration-300 ease-[cubic-bezier(0.25,0.1,0.25,1)]
|
|
342
|
+
${l?"w-20":"w-72"} h-screen flex-shrink-0 z-50
|
|
343
|
+
bg-[#030712]/80 backdrop-blur-xl border-r border-white/5
|
|
344
|
+
`,children:[s.jsx("div",{className:`p-6 border-b border-white/5 ${l?"items-center justify-center flex":""}`,children:l?s.jsx("div",{className:"relative group",children:s.jsx("div",{className:"h-10 w-10 bg-indigo-600 rounded-xl flex items-center justify-center text-white font-bold cursor-pointer shadow-lg shadow-indigo-500/20 group-hover:bg-indigo-500 transition-colors bg-gradient-to-br from-indigo-500 to-indigo-700",title:"Switch Project",children:"NW"})}):s.jsxs("div",{className:"relative w-full",children:[s.jsx("label",{className:"text-[10px] font-bold text-slate-500 uppercase tracking-widest mb-3 block pl-1",children:c?"Projects":"Workspace"}),c?s.jsxs("div",{className:"relative",children:[s.jsx(hg,{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:j=>v(j.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:m.filter(j=>j.valid).map(j=>s.jsx("option",{value:j.name,children:j.name},j.name))}),s.jsx(t1,{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(hg,{className:"h-4 w-4 text-indigo-400 mr-3"}),s.jsx("span",{className:"truncate",children:o})]})]})}),s.jsx("nav",{className:"flex-1 py-6 overflow-y-auto overflow-x-hidden scrollbar-hide",children:s.jsx("ul",{className:"space-y-1.5 px-4",children:S.map(j=>s.jsxs(ze.Fragment,{children:[j.section&&!l&&s.jsx("li",{className:"text-[10px] font-bold text-slate-600 uppercase tracking-widest px-3.5 pt-4 pb-1",children:j.section}),s.jsx("li",{children:s.jsx(vy,{to:j.path,className:({isActive:T})=>`
|
|
345
|
+
flex items-center px-3.5 py-3 rounded-xl transition-all duration-200 group relative
|
|
346
|
+
${T?"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"}
|
|
347
|
+
${l?"justify-center":""}
|
|
348
|
+
`,children:({isActive:T})=>s.jsxs(s.Fragment,{children:[s.jsx(j.icon,{className:`h-5 w-5 transition-colors ${T?"text-indigo-400 drop-shadow-[0_0_8px_rgba(99,102,241,0.5)]":"text-slate-500 group-hover:text-slate-300"} ${l?"":"mr-3.5"}`}),!l&&s.jsx("span",{className:"flex-1 text-sm font-medium tracking-wide",children:j.label}),j.badge&&(l?s.jsx("span",{className:"absolute top-2 right-2 h-2 w-2 bg-indigo-500 rounded-full border border-[#030712] shadow-sm"}):s.jsx("span",{className:`text-[10px] font-bold px-2 py-0.5 rounded-md ${T?"bg-indigo-500/20 text-indigo-300":"bg-white/5 text-slate-400 border border-white/5"}`,children:j.badge})),T&&!l&&s.jsx("div",{className:"absolute left-0 top-1/2 -translate-y-1/2 w-1 h-6 bg-indigo-500 rounded-r-full shadow-[0_0_10px_rgba(99,102,241,0.4)]"}),l&&s.jsx("div",{className:"absolute left-full ml-4 px-3 py-1.5 bg-[#111827] text-white text-xs font-medium rounded-md border border-white/10 shadow-xl opacity-0 group-hover:opacity-100 pointer-events-none whitespace-nowrap z-50 transition-opacity translate-x-2 group-hover:translate-x-0",children:j.label})]})})})]},j.path))})}),s.jsx("div",{className:"p-4 border-t border-white/5 flex justify-end",children:s.jsx("button",{onClick:()=>i(!l),className:"p-2 rounded-lg hover:bg-white/5 text-slate-500 hover:text-slate-300 transition-colors",children:l?s.jsx(Xb,{className:"h-5 w-5"}):s.jsx(Wb,{className:"h-5 w-5"})})})]})},jS=()=>{const{projectName:l}=Gt();return s.jsxs("header",{className:"h-20 flex items-center justify-between px-8 z-40 sticky top-0 bg-[#030712]/80 backdrop-blur-md border-b border-white/5",children:[s.jsxs("div",{className:"flex items-center space-x-6",children:[s.jsxs("div",{children:[s.jsx("div",{className:"text-xs font-mono text-indigo-400 mb-0.5 tracking-tight",children:"Active Project"}),s.jsx("h1",{className:"text-xl font-semibold text-white tracking-tight leading-none",children:l})]}),s.jsx("div",{className:"h-8 w-px bg-white/10 mx-2"}),s.jsxs("div",{className:"flex items-center space-x-2 text-xs font-medium px-3 py-1.5 rounded-full border transition-colors bg-emerald-500/5 text-emerald-400 border-emerald-500/20 shadow-[0_0_10px_-4px_rgba(16,185,129,0.3)]",children:[s.jsx(P1,{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(Xc,{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(Bb,{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"})]})]})},ES=({toast:l,onDismiss:i})=>{const o={success:s.jsx(ru,{className:"h-5 w-5 text-green-400"}),error:s.jsx(Kn,{className:"h-5 w-5 text-red-400"}),info:s.jsx(w1,{className:"h-5 w-5 text-blue-400"}),warning:s.jsx(au,{className:"h-5 w-5 text-amber-400"})},c={success:"border-l-green-500",error:"border-l-red-500",info:"border-l-blue-500",warning:"border-l-amber-500"};return s.jsx("div",{className:`
|
|
349
|
+
pointer-events-auto w-full max-w-sm overflow-hidden rounded-lg
|
|
350
|
+
bg-slate-900 border border-slate-800 border-l-4 ${c[l.type]}
|
|
351
|
+
shadow-lg ring-1 ring-black ring-opacity-5 transition-all
|
|
352
|
+
animate-in slide-in-from-right-full fade-in duration-300
|
|
353
|
+
`,children:s.jsx("div",{className:"p-4",children:s.jsxs("div",{className:"flex items-start",children:[s.jsx("div",{className:"flex-shrink-0",children:o[l.type]}),s.jsxs("div",{className:"ml-3 w-0 flex-1 pt-0.5",children:[s.jsx("p",{className:"text-sm font-medium text-slate-200",children:l.title}),l.message&&s.jsx("p",{className:"mt-1 text-sm text-slate-400",children:l.message})]}),s.jsx("div",{className:"ml-4 flex flex-shrink-0",children:s.jsxs("button",{type:"button",className:"inline-flex rounded-md text-slate-400 hover:text-slate-200 focus:outline-none focus:ring-2 focus:ring-indigo-500",onClick:()=>i(l.id),children:[s.jsx("span",{className:"sr-only",children:"Close"}),s.jsx(kr,{className:"h-5 w-5"})]})})]})})})},TS=()=>{const{toasts:l,removeToast:i}=Gt();return s.jsx("div",{"aria-live":"assertive",className:"pointer-events-none fixed inset-0 flex flex-col items-end px-4 py-6 sm:items-end sm:p-6 z-[100] gap-4",children:l.map(o=>s.jsx(ES,{toast:o,onDismiss:i},o.id))})};function MS(){const{setGlobalMode:l,setGlobalModeLoading:i,setProjects:o,selectProject:c,selectedProjectId:m}=Gt();U.useEffect(()=>{i(!0),X1().then(async({globalMode:f})=>{if(l(f),!f)return;const v=await Ay();o(v);const w=v.filter(b=>b.valid);m&&w.some(b=>b.name===m)?c(m):w.length>0&&c(w[0].name)}).catch(()=>{l(!1)}).finally(()=>{i(!1)})},[])}function Sg(l){if(!(l!=null&&l.timestamp))return Number.NEGATIVE_INFINITY;const i=new Date(l.timestamp).getTime();return Number.isNaN(i)?Number.NEGATIVE_INFINITY:i}function zc(l,i){return l?i?Sg(l)>=Sg(i)?l:i:l:i}function CS(){const{setStatus:l,setProjectName:i,selectedProjectId:o,globalModeLoading:c,status:m}=Gt(),f=U.useRef(null);f.current=Gt.getState().status,fS(v=>{zc(v,f.current)===v&&l(v)},[o,c],{enabled:!c}),U.useEffect(()=>{if(c)return;xf().then(w=>{zc(w,f.current)===w&&l(w)}).catch(()=>{});const v=setInterval(()=>{xf().then(w=>{zc(w,f.current)===w&&l(w)}).catch(()=>{})},3e4);return()=>clearInterval(v)},[o,c,l]),U.useEffect(()=>{const v=()=>{xf().then(w=>{zc(w,f.current)===w&&l(w)}).catch(()=>{})};return window.addEventListener("focus",v),()=>window.removeEventListener("focus",v)},[o,l]),U.useEffect(()=>{m!=null&&m.projectName&&i(m.projectName)},[m==null?void 0:m.projectName,i])}const et=({children:l,className:i="",onClick:o})=>s.jsxs("div",{className:`
|
|
354
|
+
relative bg-[#0b101b] rounded-xl border border-white/5
|
|
355
|
+
shadow-[0_4px_20px_-4px_rgba(0,0,0,0.5)]
|
|
356
|
+
transition-all duration-300
|
|
357
|
+
${o?"cursor-pointer hover:border-indigo-500/30 hover:shadow-indigo-500/5 group":""}
|
|
358
|
+
${i}
|
|
359
|
+
`,onClick:o,children:[o&&s.jsx("div",{className:"absolute inset-0 bg-indigo-500/0 group-hover:bg-indigo-500/[0.02] transition-colors rounded-xl pointer-events-none"}),s.jsx("div",{className:"relative z-10",children:l})]}),We=({children:l,variant:i="primary",size:o="md",loading:c=!1,className:m="",disabled:f,...v})=>{const w="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]",b={primary:"bg-indigo-600 text-white hover:bg-indigo-500 focus:ring-indigo-500 shadow-[0_0_15px_-3px_rgba(79,70,229,0.4)] border border-indigo-500/50 hover:shadow-[0_0_20px_-3px_rgba(79,70,229,0.5)]",secondary:"bg-[#1f2937] text-slate-200 hover:bg-[#374151] focus:ring-slate-500 border border-white/5",danger:"bg-red-600/10 text-red-400 hover:bg-red-600/20 focus:ring-red-500 border border-red-900/50 hover:border-red-500/50",ghost:"bg-transparent text-slate-400 hover:bg-white/5 hover:text-slate-200 focus:ring-slate-400",outline:"border border-slate-700/50 bg-transparent text-slate-300 hover:bg-white/5 hover:border-slate-500 focus:ring-slate-400"},y={sm:"h-8 px-3 text-xs tracking-wide",md:"h-10 px-4 py-2 text-sm",lg:"h-12 px-6 text-base",icon:"h-9 w-9"};return s.jsxs("button",{className:`${w} ${b[i]} ${y[o]} ${m}`,disabled:f||c,...v,children:[c&&s.jsx(Ey,{className:"mr-2 h-4 w-4 animate-spin"}),l]})},Cr=({children:l,variant:i="default",className:o=""})=>{const c={default:"bg-indigo-500/10 text-indigo-400 ring-1 ring-inset ring-indigo-500/20",success:"bg-emerald-500/10 text-emerald-400 ring-1 ring-inset ring-emerald-500/20",warning:"bg-amber-500/10 text-amber-400 ring-1 ring-inset ring-amber-500/20",error:"bg-red-500/10 text-red-400 ring-1 ring-inset ring-red-500/20",neutral:"bg-slate-500/10 text-slate-400 ring-1 ring-inset ring-slate-500/20",info:"bg-blue-500/10 text-blue-400 ring-1 ring-inset ring-blue-500/20"};return s.jsx("span",{className:`inline-flex items-center px-2 py-0.5 rounded text-[11px] font-medium tracking-wide ${c[i]} ${o}`,children:l})},Vy={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"}},OS=({defaultColumn:l,onClose:i,onCreated:o})=>{const[c,m]=U.useState(""),[f,v]=U.useState(""),[w,b]=U.useState(l),[y,S]=U.useState(!1),[j,T]=U.useState(null),{addToast:O}=Gt(),_=async M=>{if(M.preventDefault(),!!c.trim()){S(!0),T(null);try{await cS({title:c.trim(),body:f,column:w}),O({title:"Issue created",message:`"${c.trim()}" added to ${w}`,type:"success"}),o(),i()}catch(B){T(B instanceof Error?B.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:i}),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:i,className:"p-1.5 rounded-lg hover:bg-white/5 text-slate-500 hover:text-slate-300 transition-colors",children:s.jsx(kr,{className:"h-5 w-5"})})]}),s.jsxs("form",{onSubmit:_,className:"p-6 space-y-4",children:[s.jsxs("div",{children:[s.jsx("label",{className:"text-xs font-medium text-slate-400 uppercase tracking-wide block mb-1.5",children:"Title"}),s.jsx("input",{type:"text",value:c,onChange:M=>m(M.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:w,onChange:M=>b(M.target.value),className:"w-full bg-slate-950/50 border border-white/10 text-slate-200 rounded-lg px-3 py-2.5 text-sm focus:outline-none focus:border-indigo-500/50 appearance-none cursor-pointer",children:ql.map(M=>s.jsx("option",{value:M,children:M},M))})]}),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:M=>v(M.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"})]}),j&&s.jsx("p",{className:"text-sm text-red-400",children:j}),s.jsxs("div",{className:"flex justify-end space-x-3 pt-2",children:[s.jsx(We,{variant:"ghost",type:"button",onClick:i,children:"Cancel"}),s.jsx(We,{type:"submit",disabled:y||!c.trim(),children:y?"Creating...":"Create Issue"})]})]})]})]})},DS=({issue:l,onClose:i,onMoved:o,onClosed:c})=>{const[m,f]=U.useState(!1),[v,w]=U.useState(!1),[b,y]=U.useState(!1),{addToast:S}=Gt(),j=async _=>{if(_!==l.column){f(!0);try{await Ly(l.number,_),S({title:"Issue moved",message:`#${l.number} moved to ${_}`,type:"success"}),o(),i()}catch(M){S({title:"Move failed",message:M instanceof Error?M.message:"Failed to move issue",type:"error"})}finally{f(!1)}}},T=async()=>{y(!1),w(!0);try{await oS(l.number),S({title:"Issue closed",message:`#${l.number} closed on GitHub`,type:"success"}),c(),i()}catch(_){S({title:"Close failed",message:_ instanceof Error?_.message:"Failed to close issue",type:"error"})}finally{w(!1)}},O=l.column??"Draft";return s.jsxs("div",{className:"fixed inset-0 z-50 flex justify-end",children:[s.jsx("div",{className:"absolute inset-0 bg-black/40 backdrop-blur-sm",onClick:i}),s.jsxs("div",{className:"relative bg-[#0a0f1e] border-l border-white/10 w-full max-w-xl flex flex-col shadow-2xl overflow-hidden",children:[s.jsxs("div",{className:"flex items-start justify-between p-6 border-b border-white/5 flex-shrink-0",children:[s.jsxs("div",{className:"flex-1 min-w-0 pr-4",children:[s.jsxs("div",{className:"flex items-center space-x-2 mb-2",children:[s.jsxs("span",{className:"text-slate-500 text-sm font-mono",children:["#",l.number]}),s.jsx(Cr,{variant:Vy[O].badge,children:O})]}),s.jsx("h2",{className:"text-lg font-semibold text-slate-100 leading-snug",children:l.title}),l.assignees.length>0&&s.jsxs("p",{className:"text-xs text-slate-500 mt-1",children:["Assigned to: ",l.assignees.join(", ")]})]}),s.jsx("button",{onClick:i,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(kr,{className:"h-5 w-5"})})]}),s.jsxs("div",{className:"flex items-center space-x-3 px-6 py-3 border-b border-white/5 flex-shrink-0 flex-wrap gap-y-2",children:[s.jsxs("div",{className:"flex items-center space-x-2",children:[s.jsx("span",{className:"text-xs text-slate-500",children:"Move to:"}),ql.filter(_=>_!==l.column).map(_=>s.jsx("button",{onClick:()=>j(_),disabled:m,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:_},_))]}),s.jsxs("div",{className:"flex items-center space-x-2 ml-auto",children:[l.url&&!l.url.startsWith("local://")&&s.jsxs("a",{href:l.url,target:"_blank",rel:"noopener noreferrer",className:"flex items-center space-x-1 text-xs text-indigo-400 hover:text-indigo-300 transition-colors",children:[s.jsx(jy,{className:"h-3.5 w-3.5"}),s.jsx("span",{children:"GitHub"})]}),s.jsx("button",{onClick:()=>y(!0),disabled:v,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:v?"Closing...":"Close Issue"})]})]}),b&&s.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center",children:[s.jsx("div",{className:"absolute inset-0 bg-black/40 backdrop-blur-sm",onClick:()=>y(!1)}),s.jsxs("div",{className:"relative bg-[#0a0f1e] border border-white/10 rounded-xl p-6 max-w-sm w-full mx-4 shadow-2xl",children:[s.jsx("h3",{className:"text-sm font-semibold text-slate-100 mb-2",children:"Close issue?"}),s.jsxs("p",{className:"text-sm text-slate-400 mb-4",children:["Close issue #",l.number,': "',l.title,'"?']}),s.jsxs("div",{className:"flex justify-end space-x-3",children:[s.jsx(We,{variant:"ghost",onClick:()=>y(!1),children:"Cancel"}),s.jsx(We,{onClick:T,children:"Confirm"})]})]})]}),s.jsx("div",{className:"flex-1 overflow-y-auto p-6",children:l.body?s.jsx("pre",{className:"text-sm text-slate-300 whitespace-pre-wrap font-mono leading-relaxed break-words",children:l.body}):s.jsx("p",{className:"text-slate-500 text-sm italic",children:"No description provided."})})]})]})},RS=({issue:l,onClick:i,onDragStart:o})=>{const[c,m]=U.useState(!1);return s.jsx("div",{className:"relative",draggable:!0,onDragStart:f=>{f.dataTransfer.setData("issueNumber",String(l.number)),f.dataTransfer.effectAllowed="move",m(!0),o(l)},onDragEnd:()=>m(!1),children:s.jsxs(et,{className:`p-3 cursor-grab hover:border-indigo-500/30 transition-all select-none ${c?"opacity-30":""}`,onClick:i,children:[s.jsxs("span",{className:"text-[10px] font-mono text-slate-600",children:["#",l.number]}),s.jsx("p",{className:"text-xs font-medium text-slate-200 line-clamp-2 mt-0.5 leading-snug",children:l.title}),l.assignees.length>0&&s.jsx("p",{className:"text-[10px] text-slate-500 mt-1.5 truncate",children:l.assignees.join(", ")})]})})},AS=({name:l,issues:i,draggingIssue:o,onIssueClick:c,onNewIssue:m,onMoveIssue:f,onDragStart:v})=>{const w=Vy[l],[b,y]=U.useState(!1),S=o!==null&&o.column!==l;return s.jsxs("div",{className:`flex flex-col min-w-[220px] max-w-[220px] h-full rounded-xl transition-colors ${b&&S?"bg-indigo-500/5 ring-1 ring-indigo-500/30":""}`,onDragOver:j=>{S&&(j.preventDefault(),j.dataTransfer.dropEffect="move",y(!0))},onDragLeave:()=>y(!1),onDrop:j=>{j.preventDefault(),y(!1),o&&o.column!==l&&f(o,l)},children:[s.jsxs("div",{className:"flex items-center justify-between mb-3 flex-shrink-0",children:[s.jsxs("div",{className:"flex items-center space-x-2",children:[s.jsx("span",{className:`w-2.5 h-2.5 rounded-full ${w.dot}`}),s.jsx("span",{className:"text-xs font-semibold text-slate-400 uppercase tracking-wider",children:l}),s.jsx("span",{className:"text-[10px] font-bold text-slate-600 bg-slate-800 rounded-full px-1.5 py-0.5",children:i.length})]}),s.jsx("button",{onClick:()=>m(l),className:"p-1 rounded-md hover:bg-white/5 text-slate-600 hover:text-slate-400 transition-colors",title:`Add issue to ${l}`,children:s.jsx(_r,{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:i.length===0?s.jsx("div",{className:`border-2 border-dashed rounded-xl h-24 flex items-center justify-center transition-colors ${b&&S?"border-indigo-500/40":"border-slate-800"}`,children:s.jsx("span",{className:"text-xs text-slate-700",children:b&&S?"Drop here":"No issues"})}):i.map(j=>s.jsx(RS,{issue:j,onClick:()=>c(j),onDragStart:v},j.id))})]})},_S=()=>{const[l,i]=U.useState(null),[o,c]=U.useState(null),[m,f]=U.useState(null),[v,w]=U.useState(null),b=U.useRef(!1),{addToast:y,selectedProjectId:S,globalModeLoading:j}=Gt(),{data:T,loading:O,error:_,refetch:M}=dn(Hy,[S],{enabled:!j});U.useEffect(()=>{const Y=setInterval(()=>{b.current||M()},3e4);return()=>clearInterval(Y)},[M]);const B=U.useCallback(async(Y,W)=>{f(null);const K=v??(T==null?void 0:T.columns);if(!K)return;const ae=K,Z={};for(const Q of ql)Z[Q]=(K[Q]??[]).filter(D=>D.number!==Y.number);const G={...Y,column:W};Z[W]=[...Z[W]??[],G],w(Z),i(Q=>(Q==null?void 0:Q.number)===Y.number?G:Q),b.current=!0;try{await Ly(Y.number,W),M(),setTimeout(()=>{w(null),b.current=!1},800)}catch(Q){w(ae),i(D=>(D==null?void 0:D.number)===Y.number?Y:D),b.current=!1,y({title:"Move failed",message:Q instanceof Error?Q.message:"Failed to move issue",type:"error"})}},[y,M,v,T]);if(j||O)return s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx("div",{className:"text-slate-400",children:"Loading board..."})});if(_&&_.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(_)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:_.message}),s.jsx(We,{onClick:()=>M(),children:"Retry"})]});if(!T)return null;const se=v??T.columns;return s.jsxs("div",{className:"flex flex-col h-full",children:[s.jsxs("div",{className:"flex items-center justify-between mb-6 flex-shrink-0",children:[s.jsxs("div",{children:[s.jsx("h1",{className:"text-2xl font-bold text-slate-100",children:"Board"}),s.jsxs("p",{className:"text-sm text-slate-500 mt-1",children:[ql.reduce((Y,W)=>{var K;return Y+(((K=se[W])==null?void 0:K.length)??0)},0)," issues across ",ql.length," columns"]})]}),s.jsxs(We,{onClick:()=>c("Ready"),children:[s.jsx(_r,{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:`${ql.length*236}px`},children:ql.map(Y=>s.jsx(AS,{name:Y,issues:se[Y]??[],draggingIssue:m,onIssueClick:i,onNewIssue:c,onMoveIssue:B,onDragStart:f},Y))})}),l&&s.jsx(DS,{issue:l,onClose:()=>i(null),onMoved:()=>M(),onClosed:()=>M()}),o&&s.jsx(OS,{defaultColumn:o,onClose:()=>c(null),onCreated:()=>M()})]})},kS=[{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"}],zS=({processes:l,activePrd:i,onCancelProcess:o,onForceClear:c,onViewLog:m,cancellingProcess:f,clearingLock:v,onTriggerJob:w,triggeringJob:b})=>{const y=j=>l.find(T=>T.name===j),S=(j,T)=>j.length<=T?j:j.slice(0,T-1)+"...";return s.jsx("div",{className:"grid grid-cols-2 md:grid-cols-3 lg:grid-cols-6 gap-3",children:kS.map(j=>{const T=y(j.processName),O=(T==null?void 0:T.running)??!1,_=T==null?void 0:T.pid,M=f===j.cancelType,B=O&&j.cancelType,se=!O&&j.name==="executor"&&i,Y=O?_?`PID: ${_}`:j.runningLabel:j.idleLabel,W=O&&j.name==="executor"&&i?S(i,20):null;return s.jsxs("div",{className:`flex items-center gap-2 p-2.5 rounded-lg border transition-colors ${O?"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 ${O?"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 ${O?"text-slate-200":"text-slate-400"}`,children:j.displayName}),s.jsx("div",{className:"text-xs text-slate-500 truncate",children:W?s.jsxs("span",{className:"flex items-center gap-1",children:[s.jsx(Mf,{className:"h-3 w-3 flex-shrink-0"}),W]}):Y})]}),s.jsxs("div",{className:"flex-shrink-0",children:[B&&s.jsx("button",{onClick:()=>j.cancelType&&o(j.cancelType),disabled:M,className:"p-1 text-red-400 hover:text-red-300 hover:bg-red-500/10 rounded transition-colors disabled:opacity-50",title:"Stop process",children:s.jsx(yg,{className:"h-3.5 w-3.5"})}),se&&s.jsx("button",{onClick:c,disabled:v,className:"p-1 text-amber-400 hover:text-amber-300 hover:bg-amber-500/10 rounded transition-colors disabled:opacity-50",title:"Force clear stale state",children:s.jsx(yg,{className:"h-3.5 w-3.5"})}),!B&&!se&&O&&s.jsx("button",{onClick:m,className:"p-1 text-slate-400 hover:text-slate-300 hover:bg-white/5 rounded transition-colors",title:"View log",children:s.jsx(Mf,{className:"h-3.5 w-3.5"})}),!O&&!se&&s.jsx("button",{onClick:()=>w(j.triggerId),disabled:b!==null,className:"p-1 text-slate-500 hover:text-green-400 hover:bg-green-500/10 rounded transition-colors disabled:opacity-50",title:`Run ${j.displayName}`,children:b===j.triggerId?s.jsx("div",{className:"h-3.5 w-3.5 border-2 border-current border-t-transparent rounded-full animate-spin"}):s.jsx(Or,{className:"h-3.5 w-3.5"})})]})]},j.name)})})},US={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"},HS=()=>{var z,ne;const l=Lf(),[i,o]=U.useState(null),[c,m]=U.useState(!1),[f,v]=U.useState(null),{setProjectName:w,addToast:b,selectedProjectId:y,globalModeLoading:S,status:j}=Gt(),{data:T}=dn(zy,[y],{enabled:!S}),{data:O,loading:_}=dn(()=>Hy().catch(()=>null),[y],{enabled:!S}),M=j;if(ze.useEffect(()=>{M!=null&&M.projectName&&w(M.projectName)},[M,w]),S)return s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx("div",{className:"text-slate-400",children:"Loading..."})});if(!M)return s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx("div",{className:"text-slate-400",children:"Loading..."})});const B=M.prs.length,se=M.prs.filter(k=>k.reviewScore!==null&&k.reviewScore<70).length,Y=((z=O==null?void 0:O.columns.Ready)==null?void 0:z.length)??0,W=((ne=O==null?void 0:O.columns["In Progress"])==null?void 0:ne.length)??0;M.processes.find(k=>k.name==="executor"),M.processes.find(k=>k.name==="reviewer"),M.processes.find(k=>k.name==="qa"),M.processes.find(k=>k.name==="audit"),M.processes.find(k=>k.name==="planner"),M.processes.find(k=>k.name==="analytics");const K=async k=>{o(k);try{const ue=await uS(k),ge=ue.results.every(he=>he.success);b({title:ge?"Process Cancelled":"Cancel Failed",message:ue.results.map(he=>he.message).join("; "),type:ge?"success":"error"})}catch(ue){b({title:"Cancel Failed",message:ue instanceof Error?ue.message:"Failed to cancel process",type:"error"})}finally{o(null)}},ae=async()=>{m(!0);try{await dS(),b({title:"Lock Cleared",message:"Stale executor state removed",type:"success"})}catch(k){b({title:"Clear Failed",message:k instanceof Error?k.message:"Failed to clear lock",type:"error"})}finally{m(!1)}},Z=async k=>{v(k);try{await{executor:tS,reviewer:Uy,qa:aS,audit:nS,planner:sS,analytics:lS}[k](),b({title:"Job Triggered",message:`${k[0].toUpperCase()+k.slice(1)} job has been queued.`,type:"success"})}catch(ue){b({title:"Trigger Failed",message:ue instanceof Error?ue.message:`Failed to trigger ${k}`,type:"error"})}finally{v(null)}},G=k=>{if(!k)return"Not scheduled";try{const ue=new Date(k),ge=new Date,he=ue.getTime()-ge.getTime(),$=Math.floor(he/6e4);return $<0?"Running now...":$<60?`in ${$} min`:$<1440?`in ${Math.floor($/60)} hr${$>=120?"s":""}`:`in ${Math.floor($/1440)} day${$>=2880?"s":""}`}catch{return"Unknown"}},D=(()=>{var ge,he,$;if(T!=null&&T.paused)return null;const k=[{agent:"Executor",nextRun:(T==null?void 0:T.executor.nextRun)??null},{agent:"Reviewer",nextRun:(T==null?void 0:T.reviewer.nextRun)??null},{agent:"QA",nextRun:((ge=T==null?void 0:T.qa)==null?void 0:ge.nextRun)??null},{agent:"Auditor",nextRun:((he=T==null?void 0:T.audit)==null?void 0:he.nextRun)??null},{agent:"Planner",nextRun:(($=T==null?void 0:T.planner)==null?void 0:$.nextRun)??null}];let ue=null;for(const ie of k)ie.nextRun&&(!ue||new Date(ie.nextRun)<new Date(ue.nextRun))&&(ue=ie);return ue?{agent:ue.agent,time:G(ue.nextRun)}:null})();return s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4",children:[s.jsxs(et,{className:"p-5",onClick:()=>l("/board"),children:[s.jsxs("div",{className:"flex justify-between items-start",children:[s.jsxs("div",{children:[s.jsx("p",{className:"text-sm font-medium text-slate-500",children:"Board Ready"}),s.jsx("h3",{className:"text-3xl font-bold text-slate-100 mt-1",children:Y})]}),s.jsx("div",{className:"p-2 bg-green-500/10 rounded-lg text-green-400",children:s.jsx(ru,{className:"h-5 w-5"})})]}),s.jsx("p",{className:"text-xs text-slate-500 mt-4",children:"issues ready to start"})]}),s.jsxs(et,{className:"p-5",onClick:()=>l("/board"),children:[s.jsxs("div",{className:"flex justify-between items-start",children:[s.jsxs("div",{children:[s.jsx("p",{className:"text-sm font-medium text-slate-500",children:"In Progress"}),s.jsx("h3",{className:"text-3xl font-bold text-slate-100 mt-1",children:W})]}),s.jsx("div",{className:"p-2 bg-blue-500/10 rounded-lg text-blue-400",children:s.jsx(wy,{className:"h-5 w-5"})})]}),s.jsx("p",{className:"text-xs text-slate-500 mt-4",children:"issues in progress"})]}),s.jsxs(et,{className:"p-5",onClick:()=>l("/prs"),children:[s.jsxs("div",{className:"flex justify-between items-start",children:[s.jsxs("div",{children:[s.jsx("p",{className:"text-sm font-medium text-slate-500",children:"Open PRs"}),s.jsx("h3",{className:"text-3xl font-bold text-slate-100 mt-1",children:B})]}),s.jsx("div",{className:"p-2 bg-purple-500/10 rounded-lg text-purple-400",children:s.jsx($c,{className:"h-5 w-5"})})]}),s.jsx("p",{className:`text-xs mt-4 ${se>0?"text-red-400 font-medium":"text-slate-500"}`,children:se>0?`${se} need work`:"All passing"})]}),s.jsxs(et,{className:"p-5",children:[s.jsxs("div",{className:"flex justify-between items-start",children:[s.jsxs("div",{children:[s.jsx("p",{className:"text-sm font-medium text-slate-500",children:"Automation"}),s.jsx("h3",{className:"text-3xl font-bold text-slate-100 mt-1",children:T!=null&&T.paused?"Paused":M.crontab.installed?"Active":"Inactive"})]}),s.jsx("div",{className:`p-2 rounded-lg ${T!=null&&T.paused?"bg-amber-500/10 text-amber-400":M.crontab.installed?"bg-indigo-500/10 text-indigo-400":"bg-slate-700/50 text-slate-500"}`,children:s.jsx($f,{className:"h-5 w-5"})})]}),s.jsx("p",{className:"text-xs text-slate-500 mt-4",children:T!=null&&T.paused?"All schedules paused":M.crontab.installed?`${M.crontab.entries.length} entr${M.crontab.entries.length===1?"y":"ies"} installed`:"No crontab entries"})]})]}),s.jsxs(et,{className:"p-4",children:[s.jsxs("div",{className:"flex items-center justify-between mb-3",children:[s.jsx("h2",{className:"text-base font-semibold text-slate-200",children:"Agents"}),s.jsx("button",{onClick:()=>l("/logs"),className:"text-xs text-slate-400 hover:text-slate-300 transition-colors",children:"View logs"})]}),s.jsx(zS,{processes:M.processes,activePrd:M.activePrd,onCancelProcess:K,onForceClear:ae,onViewLog:()=>l("/logs"),cancellingProcess:i,clearingLock:c,onTriggerJob:Z,triggeringJob:f})]}),D&&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:D.agent}),s.jsx("span",{children:D.time})]}),s.jsxs("button",{onClick:()=>l("/scheduling"),className:"text-sm text-indigo-400 hover:text-indigo-300 flex items-center transition-colors",children:["Manage Schedules ",s.jsx(fg,{className:"ml-1 h-3 w-3"})]})]}),s.jsxs("div",{className:"mt-6",children:[s.jsxs("div",{className:"flex items-center justify-between mb-4",children:[s.jsx("h2",{className:"text-lg font-semibold text-slate-200",children:"GitHub Board"}),s.jsxs("button",{onClick:()=>l("/board"),className:"text-sm text-indigo-400 hover:text-indigo-300 flex items-center transition-colors",children:["View board ",s.jsx(fg,{className:"ml-1 h-3 w-3"})]})]}),s.jsx(et,{className:"p-4",children:_?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:ql.map(k=>{var ge;const ue=((ge=O.columns[k])==null?void 0:ge.length)??0;return s.jsxs("button",{onClick:()=>l("/board"),className:`inline-flex items-center space-x-2 px-3 py-2 rounded-lg ring-1 ring-inset transition-colors hover:opacity-80 ${US[k]}`,children:[s.jsx("span",{className:"text-xs font-medium",children:k}),s.jsx("span",{className:"text-xs font-bold",children:ue})]},k)})}):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."]})})]})]})},LS=()=>{const[l,i]=U.useState(!0),[o,c]=U.useState(""),[m,f]=U.useState("executor"),v=U.useRef(null),{selectedProjectId:w,globalModeLoading:b}=Gt(),y=Gt(Y=>Y.status),{data:S,loading:j,error:T,refetch:O}=dn(()=>K1(m,500),[m,w],{enabled:!b}),_=(S==null?void 0:S.lines)||[];U.useEffect(()=>{l&&v.current&&(v.current.scrollTop=v.current.scrollHeight)},[_,l]),U.useEffect(()=>{if(!l)return;const Y=window.setInterval(()=>{O()},3e3);return()=>window.clearInterval(Y)},[l,m,O]);const M=_.filter(Y=>Y.toLowerCase().includes(o.toLowerCase())),B=Y=>{f(Y),c("")},se=Y=>{if(!(y!=null&&y.processes))return!1;const W=y.processes.find(K=>K.name===Y);return(W==null?void 0:W.running)??!1};return T?s.jsxs("div",{className:"flex flex-col items-center justify-center h-full space-y-4",children:[s.jsx(Kn,{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:T.message}),s.jsx(We,{onClick:()=>O(),children:"Retry"})]}):s.jsxs("div",{className:"flex flex-col h-[calc(100vh-8rem)]",children:[s.jsxs("div",{className:"flex items-center justify-between mb-4 bg-slate-900 p-2 rounded-lg border border-slate-800 shadow-sm",children:[s.jsxs("div",{className:"flex items-center space-x-2",children:[s.jsxs("div",{className:"relative group",children:[s.jsx("input",{type:"text",placeholder:"Filter logs...",className:"pl-9 pr-4 py-1.5 rounded-md border border-slate-700 bg-slate-950 text-slate-200 text-sm focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:border-transparent w-64 placeholder:text-slate-600",value:o,onChange:Y=>c(Y.target.value)}),s.jsx(Xc,{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:Oy.map(({processName:Y,label:W})=>s.jsx("button",{onClick:()=>B(Y),className:`px-3 py-1.5 rounded text-sm font-medium transition-colors ${m===Y?"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:W}),se(Y)&&s.jsx("div",{className:"h-2 w-2 bg-green-500 rounded-full animate-pulse"})]})},Y))})]}),s.jsxs("div",{className:"flex items-center space-x-2",children:[s.jsxs(We,{size:"sm",variant:"ghost",onClick:()=>O(),children:[s.jsx(mg,{className:"h-4 w-4 mr-2"}),"Refresh"]}),s.jsxs(We,{size:"sm",variant:"ghost",onClick:()=>i(!l),children:[l?s.jsx(My,{className:"h-4 w-4 mr-2"}):s.jsx(Or,{className:"h-4 w-4 mr-2"}),l?"Pause":"Resume"]})]})]}),s.jsxs("div",{className:"flex-1 bg-slate-900 rounded-xl overflow-hidden shadow-inner border border-slate-800 flex flex-col relative",children:[s.jsxs("div",{className:"bg-slate-950/50 backdrop-blur text-xs text-slate-500 px-4 py-1.5 flex justify-between border-b border-slate-800",children:[s.jsxs("span",{children:["File: ",m,".log"]}),s.jsxs("span",{children:[M.length," lines"]})]}),s.jsxs("div",{ref:v,className:"flex-1 overflow-y-auto p-4 font-mono text-sm terminal-scroll bg-slate-900",children:[j?s.jsx("div",{className:"flex items-center justify-center h-full text-slate-500",children:"Loading logs..."}):M.length===0?s.jsx("div",{className:"flex items-center justify-center h-full text-slate-500",children:o?"No logs match your filter":"No logs yet — logs will appear after the first run"}):M.map((Y,W)=>{const K=Y.includes("[ERROR]"),ae=Y.includes("[WARN]");return s.jsxs("div",{className:`leading-6 hover:bg-slate-800/50 px-2 rounded -mx-2 ${K?"text-red-400":ae?"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:W+1}),Y]},W)}),l&&s.jsx("div",{className:"h-4"})," "]}),!l&&s.jsxs("div",{className:"absolute bottom-4 right-4 bg-indigo-600 text-white px-3 py-1.5 rounded-full shadow-lg shadow-indigo-900/40 text-xs font-medium flex items-center cursor-pointer hover:bg-indigo-500 transition-colors",onClick:()=>i(!0),children:[s.jsx(mg,{className:"h-4 w-4 mr-2"}),"Scroll to bottom"]})]})]})},qS=()=>{const[l,i]=U.useState(null),[o,c]=U.useState(!1),[m,f]=U.useState("all"),[v,w]=U.useState("number"),[b,y]=U.useState("desc"),{addToast:S,selectedProjectId:j,globalModeLoading:T}=Gt(),{data:O,loading:_,error:M,refetch:B}=dn(_y,[j],{enabled:!T}),se=O??[],Y=z=>{switch(z){case"pass":return s.jsx(ru,{className:"h-4 w-4 text-green-500"});case"fail":return s.jsx(r1,{className:"h-4 w-4 text-red-500"});case"pending":return s.jsx(Ey,{className:"h-4 w-4 text-amber-500 animate-spin"});default:return s.jsx(Kn,{className:"h-4 w-4 text-slate-500"})}},W=z=>{switch(z){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"}},K=z=>z===null?"No review decision yet":z===100?"PR has been approved":z===0?"Changes have been requested":`Review score: ${z}`,ae=U.useMemo(()=>se.filter(z=>{switch(m){case"needs-work":return z.ciStatus==="fail"||z.reviewScore===0;case"pending":return z.ciStatus==="pending"||z.ciStatus==="unknown"||z.reviewScore===null;case"passed":return z.ciStatus==="pass"&&z.reviewScore===100;case"all":default:return!0}}),[se,m]),Z=U.useMemo(()=>[...ae].sort((ne,k)=>{let ue=0;switch(v){case"number":ue=ne.number-k.number;break;case"title":ue=ne.title.localeCompare(k.title);break;case"branch":ue=ne.branch.localeCompare(k.branch);break;case"ciStatus":{const ge={fail:0,pending:1,unknown:2,pass:3};ue=(ge[ne.ciStatus]??2)-(ge[k.ciStatus]??2);break}case"reviewScore":{const ge=ne.reviewScore??-1,he=k.reviewScore??-1;ue=ge-he;break}}return b==="asc"?ue:-ue}),[ae,v,b]),G=z=>{v===z?y(b==="asc"?"desc":"asc"):(w(z),y("desc"))},Q=z=>v!==z?s.jsx(Hb,{className:"h-3 w-3 text-slate-600"}):b==="asc"?s.jsx(qb,{className:"h-3 w-3 text-indigo-400"}):s.jsx(kb,{className:"h-3 w-3 text-indigo-400"});if(_)return s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx("div",{className:"text-slate-400",children:"Loading PRs..."})});if(M)return s.jsxs("div",{className:"flex flex-col items-center justify-center h-full space-y-4",children:[s.jsx(Kn,{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:M.message}),s.jsx(We,{onClick:()=>B(),children:"Retry"})]});const D=async()=>{c(!0);try{const z=await Uy();S({title:"Reviewer Started",message:z.pid?`Started with PID ${z.pid}`:"Reviewer started",type:"success"})}catch(z){S({title:"Reviewer Failed",message:z instanceof Error?z.message:"Failed to start reviewer",type:"error"})}finally{c(!1)}};return s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:"flex space-x-1",children:[s.jsx("button",{onClick:()=>f("all"),className:`px-3 py-1 rounded-full text-xs font-medium cursor-pointer border transition-colors ${m==="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 ${m==="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 ${m==="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 ${m==="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(We,{size:"sm",onClick:D,disabled:o,children:[s.jsx(Xc,{className:"h-4 w-4 mr-2"}),o?"Starting...":"Run Reviewer Now"]})]}),s.jsx("div",{className:"bg-slate-900 rounded-lg shadow-sm border border-slate-800 overflow-hidden",children:s.jsxs("table",{className:"min-w-full divide-y divide-slate-800",children:[s.jsx("thead",{className:"bg-slate-950/50",children:s.jsxs("tr",{children:[s.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-slate-500 uppercase tracking-wider cursor-pointer hover:text-slate-300",onClick:()=>G("number"),children:s.jsxs("div",{className:"flex items-center space-x-1",children:[s.jsx("span",{children:"Title"}),Q("number")]})}),s.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-slate-500 uppercase tracking-wider cursor-pointer hover:text-slate-300",onClick:()=>G("branch"),children:s.jsxs("div",{className:"flex items-center space-x-1",children:[s.jsx("span",{children:"Branch"}),Q("branch")]})}),s.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-slate-500 uppercase tracking-wider cursor-pointer hover:text-slate-300",onClick:()=>G("ciStatus"),children:s.jsxs("div",{className:"flex items-center space-x-1",children:[s.jsx("span",{children:"CI Status"}),Q("ciStatus")]})}),s.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-slate-500 uppercase tracking-wider cursor-pointer hover:text-slate-300",onClick:()=>G("reviewScore"),children:s.jsxs("div",{className:"flex items-center space-x-1",children:[s.jsx("span",{children:"Review Score"}),Q("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:[Z.map(z=>s.jsxs("tr",{className:"hover:bg-slate-800/50 cursor-pointer transition-colors",onClick:()=>i(l===z.number?null:z.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:["#",z.number]}),s.jsx("span",{className:"font-medium text-slate-200",children:z.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:z.branch})}),s.jsx("td",{className:"px-6 py-4",children:s.jsxs("div",{className:"flex items-center space-x-2",title:W(z.ciStatus),children:[Y(z.ciStatus),s.jsx("span",{className:"text-sm capitalize text-slate-400",children:z.ciStatus})]})}),s.jsx("td",{className:"px-6 py-4",children:z.reviewScore!==null?s.jsxs("div",{className:"flex items-center space-x-2",title:K(z.reviewScore),children:[s.jsx("div",{className:"w-24 h-2 bg-slate-800 rounded-full overflow-hidden",children:s.jsx("div",{className:`h-full ${z.reviewScore>=70?"bg-green-500":"bg-red-500"}`,style:{width:`${z.reviewScore}%`}})}),s.jsx("span",{className:`text-sm font-bold ${z.reviewScore>=70?"text-green-500":"text-red-500"}`,children:z.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:z.url,target:"_blank",rel:"noopener noreferrer",className:"text-slate-500 hover:text-indigo-400",onClick:ne=>ne.stopPropagation(),children:s.jsx(jy,{className:"h-4 w-4"})})})]},z.number)),Z.length===0&&s.jsx("tr",{children:s.jsx("td",{colSpan:5,className:"px-6 py-12 text-center text-slate-500",children:se.length===0?"No open PRs found.":`No PRs match the "${m}" filter.`})})]})]})}),l&&s.jsx(et,{className:"p-6 bg-slate-900 border-indigo-900/50 animate-in fade-in slide-in-from-top-4 duration-300",children:(()=>{const z=se.find(ne=>ne.number===l);return z?s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"font-bold text-slate-200",children:z.title}),s.jsxs("p",{className:"text-sm text-slate-400 mt-1",children:["Branch: ",s.jsx("span",{className:"font-mono",children:z.branch})]})]}),s.jsxs("div",{className:"flex items-center space-x-4",children:[s.jsxs("div",{className:"text-center",title:W(z.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:[Y(z.ciStatus),s.jsx("span",{className:"text-sm capitalize text-slate-300",children:z.ciStatus})]})]}),z.reviewScore!==null&&s.jsxs("div",{className:"text-center",title:K(z.reviewScore),children:[s.jsx("div",{className:"text-xs text-slate-500",children:"Review Score"}),s.jsx("div",{className:`text-xl font-bold mt-1 ${z.reviewScore>=70?"text-green-500":"text-red-500"}`,children:z.reviewScore})]})]})]}):null})()})]})},_a=ze.forwardRef(({className:l="",label:i,checked:o,onChange:c,...m},f)=>{const v=w=>{c&&c(w.target.checked)};return s.jsxs("label",{className:`inline-flex items-center cursor-pointer ${l}`,children:[s.jsxs("div",{className:"relative",children:[s.jsx("input",{type:"checkbox",className:"sr-only peer",ref:f,checked:o,onChange:v,...m}),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"})]}),i&&s.jsx("span",{className:"ml-3 text-sm font-medium text-slate-300 select-none",children:i})]})});_a.displayName="Switch";const VS=()=>{const{addToast:l,selectedProjectId:i,globalModeLoading:o}=Gt(),[c,m]=U.useState(!1),[f,v]=U.useState(!1),{data:w,loading:b,error:y,refetch:S}=dn(yS,[i],{enabled:!o});U.useEffect(()=>{if(!(w!=null&&w.enabled))return;const Y=setInterval(()=>{S()},1e4);return()=>clearInterval(Y)},[w==null?void 0:w.enabled,S]);const j=async Y=>{v(!0);try{await qy(Y),l({title:Y?"Scanner Enabled":"Scanner Disabled",message:Y?"Roadmap scanner is now active.":"Roadmap scanner has been paused.",type:Y?"success":"info"}),S()}catch(W){l({title:"Toggle Failed",message:W instanceof Error?W.message:"Failed to toggle scanner",type:"error"})}finally{v(!1)}},T=async()=>{m(!0);try{const Y=await xS();Y.created.length>0?l({title:"Scan Complete",message:`Created ${Y.created.length} PRD(s): ${Y.created.join(", ")}`,type:"success"}):l({title:"Scan Complete",message:"No new PRDs to create.",type:"info"}),Y.errors.length>0&&l({title:"Scan Errors",message:Y.errors.join("; "),type:"warning"}),S()}catch(Y){l({title:"Scan Failed",message:Y instanceof Error?Y.message:"Failed to scan roadmap",type:"error"})}finally{m(!1)}};if(b)return s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx("div",{className:"text-slate-400",children:"Loading roadmap scanner..."})});if(y)return s.jsxs("div",{className:"flex flex-col items-center justify-center h-full space-y-4",children:[s.jsx(Kn,{className:"h-12 w-12 text-red-400"}),s.jsx("div",{className:"text-slate-300",children:"Failed to load roadmap data"}),s.jsx("div",{className:"text-sm text-slate-500",children:y.message}),s.jsx(We,{onClick:()=>S(),children:"Retry"})]});if(!w)return null;if(w.status==="no-roadmap")return s.jsxs("div",{className:"space-y-6 max-w-6xl mx-auto",children:[s.jsx("div",{className:"flex items-center justify-between",children:s.jsx("h1",{className:"text-3xl font-bold text-slate-100",children:"Roadmap Scanner"})}),s.jsx(et,{className:"p-12",children:s.jsxs("div",{className:"flex flex-col items-center text-center space-y-4",children:[s.jsx("div",{className:"p-4 bg-slate-800 rounded-full",children:s.jsx(Ty,{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 O=w.totalItems>0?Math.round(w.processedItems/w.totalItems*100):0,_=YS(w.status),M=$S(w.items),B=w.lastScan?FS(w.lastScan):"Never",se=w.autoScanInterval?Math.round(w.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(_a,{label:w.enabled?"Enabled":"Disabled",checked:w.enabled,onChange:j,disabled:f}),s.jsxs(We,{onClick:T,loading:c,disabled:!w.enabled||w.status==="complete",children:[s.jsx(Or,{className:"h-4 w-4 mr-2"}),"Scan Now"]})]})]}),s.jsx(et,{className:`p-6 border-2 ${_.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(_.icon,{className:`h-8 w-8 ${_.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 ${_.textColor}`,children:_.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:B})]}),w.enabled&&w.status!=="complete"&&s.jsxs("div",{children:["Auto-scan: ",s.jsxs("span",{className:"text-slate-300",children:["every ",se," min"]})]}),w.enabled&&w.status==="complete"&&s.jsx("div",{className:"text-emerald-400",children:"Auto-scan paused - all items sliced"})]})]})}),s.jsxs(et,{className:"p-6",children:[s.jsxs("div",{className:"flex items-center justify-between mb-3",children:[s.jsx("h3",{className:"text-sm font-medium text-slate-300",children:"Progress"}),s.jsxs("span",{className:"text-sm text-slate-400",children:[w.processedItems," / ",w.totalItems," items (",O,"%)"]})]}),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 ${O===100?"bg-gradient-to-r from-emerald-500 to-emerald-400":"bg-gradient-to-r from-indigo-600 to-indigo-400"}`,style:{width:`${O}%`}})})]}),Object.entries(M).map(([Y,W])=>s.jsxs(et,{className:"p-6",children:[s.jsx("h3",{className:"text-lg font-semibold text-slate-200 mb-4",children:Y}),s.jsx("div",{className:"space-y-2",children:W.map(K=>s.jsx(BS,{item:K},K.hash))})]},Y))]})};function BS({item:l}){const i=l.checked,o=l.processed;return s.jsxs("div",{className:`flex items-center justify-between p-3 rounded-lg border ${i?"bg-slate-950/30 border-slate-800/50":o?"bg-emerald-500/5 border-emerald-500/10":"bg-slate-950/50 border-slate-800"}`,children:[s.jsxs("div",{className:"flex items-center space-x-3 min-w-0 flex-1",children:[i?s.jsx(C1,{className:"h-4 w-4 text-slate-600 flex-shrink-0"}):o?s.jsx(ru,{className:"h-4 w-4 text-emerald-400 flex-shrink-0"}):s.jsx(Mf,{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 ${i?"line-through text-slate-600":"text-slate-200"}`,children:l.title}),l.description&&s.jsx("div",{className:"text-xs text-slate-500 truncate mt-0.5",children:l.description})]})]}),s.jsx("div",{className:"flex-shrink-0 ml-3",children:i?s.jsx(Cr,{variant:"neutral",children:"Skipped"}):o?s.jsx(Cr,{variant:"success",children:l.prdFile||"Processed"}):s.jsx(Cr,{variant:"warning",children:"Pending"})})]})}function YS(l){switch(l){case"complete":return{label:"Complete",icon:ru,textColor:"text-emerald-400",borderColor:"border-emerald-500/20 bg-emerald-500/5"};case"idle":return{label:"Idle",icon:$c,textColor:"text-blue-400",borderColor:"border-blue-500/20 bg-blue-500/5"};case"scanning":return{label:"Scanning",icon:Or,textColor:"text-indigo-400",borderColor:"border-indigo-500/20 bg-indigo-500/5"};case"disabled":return{label:"Disabled",icon:Kn,textColor:"text-slate-400",borderColor:"border-slate-500/20 bg-slate-500/5"};default:return{label:"No Roadmap",icon:Kn,textColor:"text-slate-500",borderColor:"border-slate-500/20"}}}function $S(l){const i={};for(const o of l){const c=o.section||"General";i[c]||(i[c]=[]),i[c].push(o)}return i}function FS(l){try{const i=new Date(l),c=new Date().getTime()-i.getTime(),m=Math.floor(c/6e4);if(m<1)return"Just now";if(m<60)return`${m} min ago`;const f=Math.floor(m/60);return f<24?`${f} hr ago`:`${Math.floor(f/24)} day(s) ago`}catch{return"Unknown"}}const By=({tabs:l,activeTab:i,onChange:o,className:c=""})=>{var b,y;const[m,f]=ze.useState((b=l[0])==null?void 0:b.id),v=i||m,w=S=>{o?o(S):f(S)};return s.jsxs("div",{className:`flex flex-col ${c}`,children:[s.jsx("div",{className:"border-b border-slate-800 mb-6",children:s.jsx("nav",{className:"-mb-px flex space-x-8 overflow-x-auto scrollbar-hide",children:l.map(S=>s.jsx("button",{onClick:()=>w(S.id),className:`
|
|
360
|
+
whitespace-nowrap py-4 px-1 border-b-2 font-medium text-sm transition-all duration-200
|
|
361
|
+
${v===S.id?"border-indigo-500 text-indigo-400":"border-transparent text-slate-500 hover:text-slate-300 hover:border-slate-700"}
|
|
362
|
+
`,children:S.label},S.id))})}),s.jsx("div",{className:"flex-1 animate-in fade-in slide-in-from-bottom-2 duration-300",children:(y=l.find(S=>S.id===v))==null?void 0:y.content})]})},Zc=[{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"}],Wf=[{id:"night-surge",label:"Night Surge",description:"Dense overnight execution every 2h with daytime reviews.",schedules:{executor:"5 20,22,0,2,4,6 * * *",reviewer:"25 8,14,20 * * *",qa:"45 22,10 * * *",audit:"50 4 * * 1",slicer:"35 19,7 * * *"},hints:{executor:"8pm–6am every 2h (6 runs)",reviewer:"8:25am, 2:25pm, 8:25pm",qa:"10:45pm & 10:45am",audit:"Mon 4:50am",slicer:"7:35pm & 7:35am"}},{id:"always-on",label:"Always On (Recommended)",description:"24/7 with maximum cadence — executor every hour, reviewer every 3h.",schedules:{executor:"5 * * * *",reviewer:"25 */3 * * *",qa:"45 2,10,18 * * *",audit:"50 3 * * 1",slicer:"35 */6 * * *"},hints:{executor:"Every hour at :05",reviewer:"Every 3h at :25",qa:"2:45am, 10:45am & 6:45pm",audit:"Mon 3:50am",slicer:"Every 6h at :35"}},{id:"day-shift",label:"Day Shift",description:"Weekday daytime — hourly executor 8am–8pm, reviews 4x/day.",schedules:{executor:"5 8-20 * * 1-5",reviewer:"25 9,13,17,19 * * 1-5",qa:"45 10,14,18 * * 1-5",audit:"50 9 * * 1",slicer:"35 7 * * 1"},hints:{executor:"Hourly at :05, 8am–8pm weekdays",reviewer:"9:25am, 1:25pm, 5:25pm, 7:25pm",qa:"10:45am, 2:45pm & 6:45pm weekdays",audit:"Mon 9:50am",slicer:"Mon 7:35am"}},{id:"minimal",label:"Minimal",description:"Twice-daily executor and reviewer with weekly heavy jobs.",schedules:{executor:"5 2,14 * * *",reviewer:"25 8,20 * * *",qa:"45 3 * * 0",audit:"50 4 * * 0",slicer:"35 1 * * 1"},hints:{executor:"2:05am & 2:05pm",reviewer:"8:25am & 8:25pm",qa:"Sun 3:45am",audit:"Sun 4:50am",slicer:"Mon 1:35am"}}];function Dr(l){return l?l.trim().replace(/\s+/g," "):""}function Tr(l,i){return Dr(l)===Dr(i)}function GS(l){if(l)return Wf.find(i=>i.id===l)}function Yy(l,i,o,c,m,f){return Tr(l.schedules.executor,i)&&Tr(l.schedules.reviewer,o)&&Tr(l.schedules.qa,c)&&Tr(l.schedules.audit,m)&&Tr(l.schedules.slicer,f)}function ZS(l,i,o,c,m){return Wf.find(f=>Yy(f,l,i,o,c,m))}function Ki(l,i,o,c,m,f){const v=GS(l);return v&&Yy(v,i,o,c,m,f)?v:ZS(i,o,c,m,f)}function wg(l){const i=Dr(l),o=i.split(/\s+/);if(o.length!==5)return i;const[c,m,f,v,w]=o,b=/^\d+$/.test(c),y=Zc.find(S=>Dr(S.value)===i);if(y)return y.label;if(c==="*/30"&&m==="*")return"Every 30 minutes";if(c==="0"&&m==="*")return"Every hour";if(c.startsWith("*/"))return`Every ${parseInt(c.replace("*/",""),10)} minutes`;if(b&&m.startsWith("*/")&&f==="*"&&v==="*"&&w==="*"){const S=parseInt(m.replace("*/",""),10);return c==="0"?`Every ${S} hours`:`Every ${S} hours at :${c.padStart(2,"0")}`}if(c==="0"&&m.startsWith("*/"))return`Every ${parseInt(m.replace("*/",""),10)} hours`;if(c==="0"&&m.includes("-")){const[S,j]=m.split("-");return`Every hour from ${Bi(S)} to ${Bi(j)}`}if(b&&m.includes("-")&&f==="*"&&v==="*"&&w==="*"){const[S,j]=m.split("-");return`Every hour from ${Yi(S,c)} to ${Yi(j,c)}`}if(c==="0"&&m.includes(",")){const S=m.split(",").map(Bi);return S.length<=3?`At ${S.join(" and ")}`:`At ${S.slice(0,-1).join(", ")}, and ${S[S.length-1]}`}if(b&&m.includes(",")&&f==="*"&&v==="*"&&(w==="*"||w==="1-5")){const S=m.split(",").map(T=>Yi(T,c)),j=w==="1-5"?"Weekdays at ":"At ";return S.length<=3?`${j}${S.join(" and ")}`:`${j}${S.slice(0,-1).join(", ")}, and ${S[S.length-1]}`}return c==="0"&&m!=="*"&&f==="*"&&v==="*"&&w==="*"?`Daily at ${Bi(m)}`:b&&m!=="*"&&f==="*"&&v==="*"&&w==="*"?`Daily at ${Yi(m,c)}`:c==="0"&&m!=="*"&&f==="*"&&v==="*"&&w==="1-5"?`Weekdays at ${Bi(m)}`:b&&m!=="*"&&f==="*"&&v==="*"&&w==="1-5"?`Weekdays at ${Yi(m,c)}`:i}function Bi(l){const i=parseInt(l,10);return i===0?"12 AM":i<12?`${i} AM`:i===12?"12 PM":`${i-12} PM`}function Yi(l,i){const o=i.padStart(2,"0"),c=parseInt(l,10);return Number.isNaN(c)?`${l}:${o}`:c===0?`12:${o} AM`:c<12?`${c}:${o} AM`:c===12?`12:${o} PM`:`${c-12}:${o} PM`}function PS(l){const i=Dr(l),o=Zc.find(c=>Dr(c.value)===i);return(o==null?void 0:o.value)??"__custom__"}function QS(l){const i=new Date,o=l.getTime()-i.getTime(),c=Math.floor(o/6e4),m=Math.floor(c/60),f=Math.floor(m/24);return c<1?"less than a minute":c<60?`in ${c} minute${c>1?"s":""}`:m<24?`in ${m} hour${m>1?"s":""}`:`in ${f} day${f>1?"s":""}`}function WS(l){const i={weekday:"short",month:"short",day:"numeric",hour:"numeric",minute:"2-digit",hour12:!0};return l.toLocaleDateString("en-US",i)}function IS(l){const i=new Date,o=l.getTime()-i.getTime(),c=Math.floor(o/6e4);return c>=0&&c<30}const Ve=ze.forwardRef(({className:l="",label:i,error:o,helperText:c,rightIcon:m,...f},v)=>{const w=ze.useId(),b=f.id??w,y=o?`${b}-error`:void 0,S=!o&&c?`${b}-help`:void 0,j=[y,S].filter(Boolean).join(" ")||void 0;return s.jsxs("div",{className:"w-full",children:[i&&s.jsx("label",{htmlFor:b,className:"block text-sm font-medium text-slate-400 mb-1.5",children:i}),s.jsxs("div",{className:"relative",children:[s.jsx("input",{ref:v,id:b,"aria-describedby":j,"aria-invalid":o?!0:f["aria-invalid"],className:`
|
|
363
|
+
w-full rounded-lg bg-slate-950 border border-slate-800
|
|
364
|
+
px-3 py-2 text-sm text-slate-200
|
|
365
|
+
placeholder:text-slate-600
|
|
366
|
+
focus:outline-none focus:ring-2 focus:ring-indigo-500/50 focus:border-indigo-500
|
|
367
|
+
disabled:opacity-50 disabled:cursor-not-allowed
|
|
368
|
+
transition-all duration-200
|
|
369
|
+
${o?"border-red-500/50 focus:ring-red-500/50 focus:border-red-500":""}
|
|
370
|
+
${m?"pr-10":""}
|
|
371
|
+
${l}
|
|
372
|
+
`,...f}),m&&s.jsx("div",{className:"absolute inset-y-0 right-0 flex items-center pr-3 pointer-events-none text-slate-500",children:m})]}),o?s.jsx("p",{id:y,className:"mt-1.5 text-xs text-red-400",children:o}):c?s.jsx("p",{id:S,className:"mt-1.5 text-xs text-slate-500",children:c}):null]})});Ve.displayName="Input";const da=ze.forwardRef(({className:l="",label:i,error:o,helperText:c,options:m,value:f,onChange:v,children:w,...b},y)=>{const S=ze.useId(),j=b.id??S,T=o?`${j}-error`:void 0,O=!o&&c?`${j}-help`:void 0,_=[T,O].filter(Boolean).join(" ")||void 0,M=B=>{v&&v(B.target.value)};return s.jsxs("div",{className:"w-full",children:[i&&s.jsx("label",{htmlFor:j,className:"block text-sm font-medium text-slate-400 mb-1.5",children:i}),s.jsxs("div",{className:"relative",children:[s.jsx("select",{ref:y,id:j,"aria-describedby":_,"aria-invalid":o?!0:b["aria-invalid"],className:`
|
|
373
|
+
w-full appearance-none rounded-lg bg-slate-950 border border-slate-800
|
|
374
|
+
px-3 py-2 pr-10 text-sm text-slate-200
|
|
375
|
+
focus:outline-none focus:ring-2 focus:ring-indigo-500/50 focus:border-indigo-500
|
|
376
|
+
disabled:opacity-50 disabled:cursor-not-allowed
|
|
377
|
+
transition-all duration-200
|
|
378
|
+
${o?"border-red-500/50 focus:ring-red-500/50 focus:border-red-500":""}
|
|
379
|
+
${l}
|
|
380
|
+
`,value:f,onChange:M,...b,children:m?m.map(B=>s.jsx("option",{value:B.value,children:B.label},B.value)):w}),s.jsx("div",{className:"pointer-events-none absolute inset-y-0 right-0 flex items-center px-2 text-slate-500",children:s.jsx(Ny,{className:"h-4 w-4"})})]}),o?s.jsx("p",{id:T,className:"mt-1.5 text-xs text-red-400",children:o}):c?s.jsx("p",{id:O,className:"mt-1.5 text-xs text-slate-500",children:c}):null]})});da.displayName="Select";const Nn=({label:l,value:i,onChange:o,helperText:c,placeholder:m="5 */3 * * *"})=>{const f=PS(i),v=f==="__custom__",w=S=>{S!=="__custom__"&&o(S)},b=S=>{o(S.target.value)},y=Zc.find(S=>S.value===f);return s.jsxs("div",{className:"space-y-3",children:[s.jsx(da,{label:l,value:f,onChange:w,options:Zc.map(S=>({label:S.label,value:S.value})),helperText:v?void 0:(y==null?void 0:y.description)||c}),v&&s.jsxs("div",{className:"space-y-2 mt-2",children:[s.jsx(Ve,{label:"Cron Expression",value:i,onChange:b,placeholder:m}),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)"]})]})]})};var Es={},Aa={},$i={},Ts={},pf={},Ng;function XS(){return Ng||(Ng=1,Object.defineProperty(pf,"__esModule",{value:!0})),pf}var Fi={},Gi={},jg;function As(){var i,o,c,m,f,$y,w;if(jg)return Gi;jg=1,Object.defineProperty(Gi,"__esModule",{value:!0}),Gi.CronField=void 0;let l=(w=class{constructor(y,S={rawValue:""}){nt(this,f);nt(this,i,!1);nt(this,o,!1);nt(this,c,!1);nt(this,m,[]);Q0(this,"options",{rawValue:""});if(!Array.isArray(y))throw new Error(`${this.constructor.name} Validation error, values is not an array`);if(!(y.length>0))throw new Error(`${this.constructor.name} Validation error, values contains no values`);this.options={...S,rawValue:S.rawValue??""},Ne(this,m,y.sort(w.sorter)),Ne(this,c,this.options.wildcard!==void 0?this.options.wildcard:Se(this,f,$y).call(this)),Ne(this,i,this.options.rawValue.includes("L")||y.includes("L")),Ne(this,o,this.options.rawValue.includes("?")||y.includes("?"))}static get min(){throw new Error("min must be overridden")}static get max(){throw new Error("max must be overridden")}static get chars(){return Object.freeze([])}static get validChars(){return/^[?,*\dH/-]+$|^.*H\(\d+-\d+\)\/\d+.*$|^.*H\(\d+-\d+\).*$|^.*H\/\d+.*$/}static get constraints(){return{min:this.min,max:this.max,chars:this.chars,validChars:this.validChars}}get min(){return this.constructor.min}get max(){return this.constructor.max}get chars(){return this.constructor.chars}get hasLastChar(){return ee(this,i)}get hasQuestionMarkChar(){return ee(this,o)}get isWildcard(){return ee(this,c)}get values(){return ee(this,m)}static sorter(y,S){const j=typeof y=="number",T=typeof S=="number";return j&&T?y-S:!j&&!T?y.localeCompare(S):j?-1:1}static findNearestValueInList(y,S,j=!1){if(j){for(let T=y.length-1;T>=0;T--)if(y[T]<S)return y[T];return null}for(let T=0;T<y.length;T++)if(y[T]>S)return y[T];return null}findNearestValue(y,S=!1){return this.constructor.findNearestValueInList(this.values,y,S)}serialize(){return{wildcard:ee(this,c),values:ee(this,m)}}validate(){let y;const S=this.chars.length>0?` or chars ${this.chars.join("")}`:"",j=M=>B=>new RegExp(`^\\d{0,2}${B}$`).test(M),T=M=>(y=M,typeof M=="number"?M>=this.min&&M<=this.max:this.chars.some(j(M)));if(!ee(this,m).every(T))throw new Error(`${this.constructor.name} Validation error, got value ${y} expected range ${this.min}-${this.max}${S}`);const _=ee(this,m).find((M,B)=>ee(this,m).indexOf(M)!==B);if(_)throw new Error(`${this.constructor.name} Validation error, duplicate values found: ${_}`)}},i=new WeakMap,o=new WeakMap,c=new WeakMap,m=new WeakMap,f=new WeakSet,$y=function(){return this.options.rawValue.length>0?["*","?"].includes(this.options.rawValue):Array.from({length:this.max-this.min+1},(y,S)=>S+this.min).every(y=>ee(this,m).includes(y))},w);return Gi.CronField=l,Gi}var Eg;function JS(){if(Eg)return Fi;Eg=1,Object.defineProperty(Fi,"__esModule",{value:!0}),Fi.CronDayOfMonth=void 0;const l=As(),i=1,o=31,c=Object.freeze(["L"]);let m=class extends l.CronField{static get min(){return i}static get max(){return o}static get chars(){return c}static get validChars(){return/^[?,*\dLH/-]+$|^.*H\(\d+-\d+\)\/\d+.*$|^.*H\(\d+-\d+\).*$|^.*H\/\d+.*$/}constructor(v,w){super(v,w),this.validate()}get values(){return super.values}};return Fi.CronDayOfMonth=m,Fi}var Zi={},Tg;function KS(){if(Tg)return Zi;Tg=1,Object.defineProperty(Zi,"__esModule",{value:!0}),Zi.CronDayOfWeek=void 0;const l=As(),i=0,o=7,c=Object.freeze(["L"]);let m=class extends l.CronField{static get min(){return i}static get max(){return o}static get chars(){return c}static get validChars(){return/^[?,*\dLH#/-]+$|^.*H\(\d+-\d+\)\/\d+.*$|^.*H\(\d+-\d+\).*$|^.*H\/\d+.*$/}constructor(v,w){super(v,w),this.validate()}get values(){return super.values}get nthDay(){return this.options.nthDayOfWeek??0}};return Zi.CronDayOfWeek=m,Zi}var Pi={},Mg;function e2(){if(Mg)return Pi;Mg=1,Object.defineProperty(Pi,"__esModule",{value:!0}),Pi.CronHour=void 0;const l=As(),i=0,o=23,c=Object.freeze([]);let m=class extends l.CronField{static get min(){return i}static get max(){return o}static get chars(){return c}constructor(v,w){super(v,w),this.validate()}get values(){return super.values}};return Pi.CronHour=m,Pi}var Qi={},Cg;function t2(){if(Cg)return Qi;Cg=1,Object.defineProperty(Qi,"__esModule",{value:!0}),Qi.CronMinute=void 0;const l=As(),i=0,o=59,c=Object.freeze([]);let m=class extends l.CronField{static get min(){return i}static get max(){return o}static get chars(){return c}constructor(v,w){super(v,w),this.validate()}get values(){return super.values}};return Qi.CronMinute=m,Qi}var Wi={},vf={},Na={},Og;function a2(){if(Og)return Na;Og=1,Object.defineProperty(Na,"__esModule",{value:!0});class l extends Error{}class i extends l{constructor(r){super(`Invalid DateTime: ${r.toMessage()}`)}}class o extends l{constructor(r){super(`Invalid Interval: ${r.toMessage()}`)}}class c extends l{constructor(r){super(`Invalid Duration: ${r.toMessage()}`)}}class m extends l{}class f extends l{constructor(r){super(`Invalid unit ${r}`)}}class v extends l{}class w extends l{constructor(){super("Zone is an abstract class")}}const b="numeric",y="short",S="long",j={year:b,month:b,day:b},T={year:b,month:y,day:b},O={year:b,month:y,day:b,weekday:y},_={year:b,month:S,day:b},M={year:b,month:S,day:b,weekday:S},B={hour:b,minute:b},se={hour:b,minute:b,second:b},Y={hour:b,minute:b,second:b,timeZoneName:y},W={hour:b,minute:b,second:b,timeZoneName:S},K={hour:b,minute:b,hourCycle:"h23"},ae={hour:b,minute:b,second:b,hourCycle:"h23"},Z={hour:b,minute:b,second:b,hourCycle:"h23",timeZoneName:y},G={hour:b,minute:b,second:b,hourCycle:"h23",timeZoneName:S},Q={year:b,month:b,day:b,hour:b,minute:b},D={year:b,month:b,day:b,hour:b,minute:b,second:b},z={year:b,month:y,day:b,hour:b,minute:b},ne={year:b,month:y,day:b,hour:b,minute:b,second:b},k={year:b,month:y,day:b,weekday:y,hour:b,minute:b},ue={year:b,month:S,day:b,hour:b,minute:b,timeZoneName:y},ge={year:b,month:S,day:b,hour:b,minute:b,second:b,timeZoneName:y},he={year:b,month:S,day:b,weekday:S,hour:b,minute:b,timeZoneName:S},$={year:b,month:S,day:b,weekday:S,hour:b,minute:b,second:b,timeZoneName:S};class ie{get type(){throw new w}get name(){throw new w}get ianaName(){return this.name}get isUniversal(){throw new w}offsetName(r,h){throw new w}formatOffset(r,h){throw new w}offset(r){throw new w}equals(r){throw new w}get isValid(){throw new w}}let ye=null;class Ee extends ie{static get instance(){return ye===null&&(ye=new Ee),ye}get type(){return"system"}get name(){return new Intl.DateTimeFormat().resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(r,{format:h,locale:p}){return On(r,h,p)}formatOffset(r,h){return Wl(this.offset(r),h)}offset(r){return-new Date(r).getTimezoneOffset()}equals(r){return r.type==="system"}get isValid(){return!0}}const Oe=new Map;function R(g){let r=Oe.get(g);return r===void 0&&(r=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"}),Oe.set(g,r)),r}const le={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};function me(g,r){const h=g.format(r).replace(/\u200E/g,""),p=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(h),[,N,C,H,L,V,de,pe]=p;return[H,N,C,L,V,de,pe]}function xe(g,r){const h=g.formatToParts(r),p=[];for(let N=0;N<h.length;N++){const{type:C,value:H}=h[N],L=le[C];C==="era"?p[L]=H:Ce(L)||(p[L]=parseInt(H,10))}return p}const je=new Map;class Te extends ie{static create(r){let h=je.get(r);return h===void 0&&je.set(r,h=new Te(r)),h}static resetCache(){je.clear(),Oe.clear()}static isValidSpecifier(r){return this.isValidZone(r)}static isValidZone(r){if(!r)return!1;try{return new Intl.DateTimeFormat("en-US",{timeZone:r}).format(),!0}catch{return!1}}constructor(r){super(),this.zoneName=r,this.valid=Te.isValidZone(r)}get type(){return"iana"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(r,{format:h,locale:p}){return On(r,h,p,this.name)}formatOffset(r,h){return Wl(this.offset(r),h)}offset(r){if(!this.valid)return NaN;const h=new Date(r);if(isNaN(h))return NaN;const p=R(this.name);let[N,C,H,L,V,de,pe]=p.formatToParts?xe(p,h):me(p,h);L==="BC"&&(N=-Math.abs(N)+1);const Ge=Wt({year:N,month:C,day:H,hour:V===24?0:V,minute:de,second:pe,millisecond:0});let De=+h;const wt=De%1e3;return De-=wt>=0?wt:1e3+wt,(Ge-De)/(60*1e3)}equals(r){return r.type==="iana"&&r.name===this.name}get isValid(){return this.valid}}let Le={};function rt(g,r={}){const h=JSON.stringify([g,r]);let p=Le[h];return p||(p=new Intl.ListFormat(g,r),Le[h]=p),p}const Ie=new Map;function ta(g,r={}){const h=JSON.stringify([g,r]);let p=Ie.get(h);return p===void 0&&(p=new Intl.DateTimeFormat(g,r),Ie.set(h,p)),p}const ja=new Map;function fn(g,r={}){const h=JSON.stringify([g,r]);let p=ja.get(h);return p===void 0&&(p=new Intl.NumberFormat(g,r),ja.set(h,p)),p}const Ia=new Map;function P(g,r={}){const{base:h,...p}=r,N=JSON.stringify([g,p]);let C=Ia.get(N);return C===void 0&&(C=new Intl.RelativeTimeFormat(g,r),Ia.set(N,C)),C}let fe=null;function Ae(){return fe||(fe=new Intl.DateTimeFormat().resolvedOptions().locale,fe)}const Be=new Map;function lt(g){let r=Be.get(g);return r===void 0&&(r=new Intl.DateTimeFormat(g).resolvedOptions(),Be.set(g,r)),r}const ht=new Map;function _t(g){let r=ht.get(g);if(!r){const h=new Intl.Locale(g);r="getWeekInfo"in h?h.getWeekInfo():h.weekInfo,"minimalDays"in r||(r={...zr,...r}),ht.set(g,r)}return r}function gt(g){const r=g.indexOf("-x-");r!==-1&&(g=g.substring(0,r));const h=g.indexOf("-u-");if(h===-1)return[g];{let p,N;try{p=ta(g).resolvedOptions(),N=g}catch{const V=g.substring(0,h);p=ta(V).resolvedOptions(),N=V}const{numberingSystem:C,calendar:H}=p;return[N,C,H]}}function aa(g,r,h){return(h||r)&&(g.includes("-u-")||(g+="-u"),h&&(g+=`-ca-${h}`),r&&(g+=`-nu-${r}`)),g}function Ua(g){const r=[];for(let h=1;h<=12;h++){const p=we.utc(2009,h,1);r.push(g(p))}return r}function Tt(g){const r=[];for(let h=1;h<=7;h++){const p=we.utc(2016,11,13+h);r.push(g(p))}return r}function En(g,r,h,p){const N=g.listingMode();return N==="error"?null:N==="en"?h(r):p(r)}function Bl(g){return g.numberingSystem&&g.numberingSystem!=="latn"?!1:g.numberingSystem==="latn"||!g.locale||g.locale.startsWith("en")||lt(g.locale).numberingSystem==="latn"}class Yl{constructor(r,h,p){this.padTo=p.padTo||0,this.floor=p.floor||!1;const{padTo:N,floor:C,...H}=p;if(!h||Object.keys(H).length>0){const L={useGrouping:!1,...p};p.padTo>0&&(L.minimumIntegerDigits=p.padTo),this.inf=fn(r,L)}}format(r){if(this.inf){const h=this.floor?Math.floor(r):r;return this.inf.format(h)}else{const h=this.floor?Math.floor(r):Zl(r,3);return st(h,this.padTo)}}}class _s{constructor(r,h,p){this.opts=p,this.originalZone=void 0;let N;if(this.opts.timeZone)this.dt=r;else if(r.zone.type==="fixed"){const H=-1*(r.offset/60),L=H>=0?`Etc/GMT+${H}`:`Etc/GMT${H}`;r.offset!==0&&Te.create(L).valid?(N=L,this.dt=r):(N="UTC",this.dt=r.offset===0?r:r.setZone("UTC").plus({minutes:r.offset}),this.originalZone=r.zone)}else r.zone.type==="system"?this.dt=r:r.zone.type==="iana"?(this.dt=r,N=r.zone.name):(N="UTC",this.dt=r.setZone("UTC").plus({minutes:r.offset}),this.originalZone=r.zone);const C={...this.opts};C.timeZone=C.timeZone||N,this.dtf=ta(h,C)}format(){return this.originalZone?this.formatToParts().map(({value:r})=>r).join(""):this.dtf.format(this.dt.toJSDate())}formatToParts(){const r=this.dtf.formatToParts(this.dt.toJSDate());return this.originalZone?r.map(h=>{if(h.type==="timeZoneName"){const p=this.originalZone.offsetName(this.dt.ts,{locale:this.dt.locale,format:this.opts.timeZoneName});return{...h,value:p}}else return h}):r}resolvedOptions(){return this.dtf.resolvedOptions()}}class eo{constructor(r,h,p){this.opts={style:"long",...p},!h&&Vr()&&(this.rtf=P(r,p))}format(r,h){return this.rtf?this.rtf.format(r,h):yn(h,r,this.opts.numeric,this.opts.style!=="long")}formatToParts(r,h){return this.rtf?this.rtf.formatToParts(r,h):[]}}const zr={firstDay:1,minimalDays:4,weekend:[6,7]};class Xe{static fromOpts(r){return Xe.create(r.locale,r.numberingSystem,r.outputCalendar,r.weekSettings,r.defaultToEN)}static create(r,h,p,N,C=!1){const H=r||yt.defaultLocale,L=H||(C?"en-US":Ae()),V=h||yt.defaultNumberingSystem,de=p||yt.defaultOutputCalendar,pe=Br(N)||yt.defaultWeekSettings;return new Xe(L,V,de,pe,H)}static resetCache(){fe=null,Ie.clear(),ja.clear(),Ia.clear(),Be.clear(),ht.clear()}static fromObject({locale:r,numberingSystem:h,outputCalendar:p,weekSettings:N}={}){return Xe.create(r,h,p,N)}constructor(r,h,p,N,C){const[H,L,V]=gt(r);this.locale=H,this.numberingSystem=h||L||null,this.outputCalendar=p||V||null,this.weekSettings=N,this.intl=aa(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=C,this.fastNumbersCached=null}get fastNumbers(){return this.fastNumbersCached==null&&(this.fastNumbersCached=Bl(this)),this.fastNumbersCached}listingMode(){const r=this.isEnglish(),h=(this.numberingSystem===null||this.numberingSystem==="latn")&&(this.outputCalendar===null||this.outputCalendar==="gregory");return r&&h?"en":"intl"}clone(r){return!r||Object.getOwnPropertyNames(r).length===0?this:Xe.create(r.locale||this.specifiedLocale,r.numberingSystem||this.numberingSystem,r.outputCalendar||this.outputCalendar,Br(r.weekSettings)||this.weekSettings,r.defaultToEN||!1)}redefaultToEN(r={}){return this.clone({...r,defaultToEN:!0})}redefaultToSystem(r={}){return this.clone({...r,defaultToEN:!1})}months(r,h=!1){return En(this,r,xu,()=>{const p=this.intl==="ja"||this.intl.startsWith("ja-");h&=!p;const N=h?{month:r,day:"numeric"}:{month:r},C=h?"format":"standalone";if(!this.monthsCache[C][r]){const H=p?L=>this.dtFormatter(L,N).format():L=>this.extract(L,N,"month");this.monthsCache[C][r]=Ua(H)}return this.monthsCache[C][r]})}weekdays(r,h=!1){return En(this,r,$s,()=>{const p=h?{weekday:r,year:"numeric",month:"long",day:"numeric"}:{weekday:r},N=h?"format":"standalone";return this.weekdaysCache[N][r]||(this.weekdaysCache[N][r]=Tt(C=>this.extract(C,p,"weekday"))),this.weekdaysCache[N][r]})}meridiems(){return En(this,void 0,()=>Dn,()=>{if(!this.meridiemCache){const r={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[we.utc(2016,11,13,9),we.utc(2016,11,13,19)].map(h=>this.extract(h,r,"dayperiod"))}return this.meridiemCache})}eras(r){return En(this,r,Zr,()=>{const h={era:r};return this.eraCache[r]||(this.eraCache[r]=[we.utc(-40,1,1),we.utc(2017,1,1)].map(p=>this.extract(p,h,"era"))),this.eraCache[r]})}extract(r,h,p){const N=this.dtFormatter(r,h),C=N.formatToParts(),H=C.find(L=>L.type.toLowerCase()===p);return H?H.value:null}numberFormatter(r={}){return new Yl(this.intl,r.forceSimple||this.fastNumbers,r)}dtFormatter(r,h={}){return new _s(r,this.intl,h)}relFormatter(r={}){return new eo(this.intl,this.isEnglish(),r)}listFormatter(r={}){return rt(this.intl,r)}isEnglish(){return this.locale==="en"||this.locale.toLowerCase()==="en-us"||lt(this.intl).locale.startsWith("en-us")}getWeekSettings(){return this.weekSettings?this.weekSettings:mn()?_t(this.locale):zr}getStartOfWeek(){return this.getWeekSettings().firstDay}getMinDaysInFirstWeek(){return this.getWeekSettings().minimalDays}getWeekendDays(){return this.getWeekSettings().weekend}equals(r){return this.locale===r.locale&&this.numberingSystem===r.numberingSystem&&this.outputCalendar===r.outputCalendar}toString(){return`Locale(${this.locale}, ${this.numberingSystem}, ${this.outputCalendar})`}}let Ur=null;class Nt extends ie{static get utcInstance(){return Ur===null&&(Ur=new Nt(0)),Ur}static instance(r){return r===0?Nt.utcInstance:new Nt(r)}static parseSpecifier(r){if(r){const h=r.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(h)return new Nt(Ql(h[1],h[2]))}return null}constructor(r){super(),this.fixed=r}get type(){return"fixed"}get name(){return this.fixed===0?"UTC":`UTC${Wl(this.fixed,"narrow")}`}get ianaName(){return this.fixed===0?"Etc/UTC":`Etc/GMT${Wl(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(r,h){return Wl(this.fixed,h)}get isUniversal(){return!0}offset(){return this.fixed}equals(r){return r.type==="fixed"&&r.fixed===this.fixed}get isValid(){return!0}}class na extends ie{constructor(r){super(),this.zoneName=r}get type(){return"invalid"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(){return null}formatOffset(){return""}offset(){return NaN}equals(){return!1}get isValid(){return!1}}function Zt(g,r){if(Ce(g)||g===null)return r;if(g instanceof ie)return g;if(kt(g)){const h=g.toLowerCase();return h==="default"?r:h==="local"||h==="system"?Ee.instance:h==="utc"||h==="gmt"?Nt.utcInstance:Nt.parseSpecifier(h)||Te.create(g)}else return ha(g)?Nt.instance(g):typeof g=="object"&&"offset"in g&&typeof g.offset=="function"?g:new na(g)}const Pt={arab:"[٠-٩]",arabext:"[۰-۹]",bali:"[᭐-᭙]",beng:"[০-৯]",deva:"[०-९]",fullwide:"[0-9]",gujr:"[૦-૯]",hanidec:"[〇|一|二|三|四|五|六|七|八|九]",khmr:"[០-៩]",knda:"[೦-೯]",laoo:"[໐-໙]",limb:"[᥆-᥏]",mlym:"[൦-൯]",mong:"[᠐-᠙]",mymr:"[၀-၉]",orya:"[୦-୯]",tamldec:"[௦-௯]",telu:"[౦-౯]",thai:"[๐-๙]",tibt:"[༠-༩]",latn:"\\d"},iu={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]},to=Pt.hanidec.replace(/[\[|\]]/g,"").split("");function ao(g){let r=parseInt(g,10);if(isNaN(r)){r="";for(let h=0;h<g.length;h++){const p=g.charCodeAt(h);if(g[h].search(Pt.hanidec)!==-1)r+=to.indexOf(g[h]);else for(const N in iu){const[C,H]=iu[N];p>=C&&p<=H&&(r+=p-C)}}return parseInt(r,10)}else return r}const el=new Map;function ks(){el.clear()}function la({numberingSystem:g},r=""){const h=g||"latn";let p=el.get(h);p===void 0&&(p=new Map,el.set(h,p));let N=p.get(r);return N===void 0&&(N=new RegExp(`${Pt[h]}${r}`),p.set(r,N)),N}let hn=()=>Date.now(),$l="system",tl=null,uu=null,Hr=null,zs=60,al,cu=null;class yt{static get now(){return hn}static set now(r){hn=r}static set defaultZone(r){$l=r}static get defaultZone(){return Zt($l,Ee.instance)}static get defaultLocale(){return tl}static set defaultLocale(r){tl=r}static get defaultNumberingSystem(){return uu}static set defaultNumberingSystem(r){uu=r}static get defaultOutputCalendar(){return Hr}static set defaultOutputCalendar(r){Hr=r}static get defaultWeekSettings(){return cu}static set defaultWeekSettings(r){cu=Br(r)}static get twoDigitCutoffYear(){return zs}static set twoDigitCutoffYear(r){zs=r%100}static get throwOnInvalid(){return al}static set throwOnInvalid(r){al=r}static resetCaches(){Xe.resetCache(),Te.resetCache(),we.resetCache(),ks()}}class fa{constructor(r,h){this.reason=r,this.explanation=h}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}}const Lr=[0,31,59,90,120,151,181,212,243,273,304,334],Us=[0,31,60,91,121,152,182,213,244,274,305,335];function sa(g,r){return new fa("unit out of range",`you specified ${r} (of type ${typeof r}) as a ${g}, which is invalid`)}function Hs(g,r,h){const p=new Date(Date.UTC(g,r-1,h));g<100&&g>=0&&p.setUTCFullYear(p.getUTCFullYear()-1900);const N=p.getUTCDay();return N===0?7:N}function qr(g,r,h){return h+(ll(g)?Us:Lr)[r-1]}function Xa(g,r){const h=ll(g)?Us:Lr,p=h.findIndex(C=>C<r),N=r-h[p];return{month:p+1,day:N}}function Mt(g,r){return(g-r+7)%7+1}function qt(g,r=4,h=1){const{year:p,month:N,day:C}=g,H=qr(p,N,C),L=Mt(Hs(p,N,C),h);let V=Math.floor((H-L+14-r)/7),de;return V<1?(de=p-1,V=sl(de,r,h)):V>sl(p,r,h)?(de=p+1,V=1):de=p,{weekYear:de,weekNumber:V,weekday:L,...Il(g)}}function Tn(g,r=4,h=1){const{weekYear:p,weekNumber:N,weekday:C}=g,H=Mt(Hs(p,1,r),h),L=Ka(p);let V=N*7+C-H-7+r,de;V<1?(de=p-1,V+=Ka(de)):V>L?(de=p+1,V-=Ka(p)):de=p;const{month:pe,day:ke}=Xa(de,V);return{year:de,month:pe,day:ke,...Il(g)}}function Fl(g){const{year:r,month:h,day:p}=g,N=qr(r,h,p);return{year:r,ordinal:N,...Il(g)}}function ou(g){const{year:r,ordinal:h}=g,{month:p,day:N}=Xa(r,h);return{year:r,month:p,day:N,...Il(g)}}function du(g,r){if(!Ce(g.localWeekday)||!Ce(g.localWeekNumber)||!Ce(g.localWeekYear)){if(!Ce(g.weekday)||!Ce(g.weekNumber)||!Ce(g.weekYear))throw new m("Cannot mix locale-based week fields with ISO-based week fields");return Ce(g.localWeekday)||(g.weekday=g.localWeekday),Ce(g.localWeekNumber)||(g.weekNumber=g.localWeekNumber),Ce(g.localWeekYear)||(g.weekYear=g.localWeekYear),delete g.localWeekday,delete g.localWeekNumber,delete g.localWeekYear,{minDaysInFirstWeek:r.getMinDaysInFirstWeek(),startOfWeek:r.getStartOfWeek()}}else return{minDaysInFirstWeek:4,startOfWeek:1}}function fu(g,r=4,h=1){const p=Ja(g.weekYear),N=Qt(g.weekNumber,1,sl(g.weekYear,r,h)),C=Qt(g.weekday,1,7);return p?N?C?!1:sa("weekday",g.weekday):sa("week",g.weekNumber):sa("weekYear",g.weekYear)}function Gl(g){const r=Ja(g.year),h=Qt(g.ordinal,1,Ka(g.year));return r?h?!1:sa("ordinal",g.ordinal):sa("year",g.year)}function Ls(g){const r=Ja(g.year),h=Qt(g.month,1,12),p=Qt(g.day,1,Vs(g.year,g.month));return r?h?p?!1:sa("day",g.day):sa("month",g.month):sa("year",g.year)}function Mn(g){const{hour:r,minute:h,second:p,millisecond:N}=g,C=Qt(r,0,23)||r===24&&h===0&&p===0&&N===0,H=Qt(h,0,59),L=Qt(p,0,59),V=Qt(N,0,999);return C?H?L?V?!1:sa("millisecond",N):sa("second",p):sa("minute",h):sa("hour",r)}function Ce(g){return typeof g>"u"}function ha(g){return typeof g=="number"}function Ja(g){return typeof g=="number"&&g%1===0}function kt(g){return typeof g=="string"}function hu(g){return Object.prototype.toString.call(g)==="[object Date]"}function Vr(){try{return typeof Intl<"u"&&!!Intl.RelativeTimeFormat}catch{return!1}}function mn(){try{return typeof Intl<"u"&&!!Intl.Locale&&("weekInfo"in Intl.Locale.prototype||"getWeekInfo"in Intl.Locale.prototype)}catch{return!1}}function nl(g){return Array.isArray(g)?g:[g]}function mu(g,r,h){if(g.length!==0)return g.reduce((p,N)=>{const C=[r(N),N];return p&&h(p[0],C[0])===p[0]?p:C},null)[1]}function gu(g,r){return r.reduce((h,p)=>(h[p]=g[p],h),{})}function Cn(g,r){return Object.prototype.hasOwnProperty.call(g,r)}function Br(g){if(g==null)return null;if(typeof g!="object")throw new v("Week settings must be an object");if(!Qt(g.firstDay,1,7)||!Qt(g.minimalDays,1,7)||!Array.isArray(g.weekend)||g.weekend.some(r=>!Qt(r,1,7)))throw new v("Invalid week settings");return{firstDay:g.firstDay,minimalDays:g.minimalDays,weekend:Array.from(g.weekend)}}function Qt(g,r,h){return Ja(g)&&g>=r&&g<=h}function qs(g,r){return g-r*Math.floor(g/r)}function st(g,r=2){const h=g<0;let p;return h?p="-"+(""+-g).padStart(r,"0"):p=(""+g).padStart(r,"0"),p}function Ct(g){if(!(Ce(g)||g===null||g===""))return parseInt(g,10)}function gn(g){if(!(Ce(g)||g===null||g===""))return parseFloat(g)}function Yr(g){if(!(Ce(g)||g===null||g==="")){const r=parseFloat("0."+g)*1e3;return Math.floor(r)}}function Zl(g,r,h="round"){const p=10**r;switch(h){case"expand":return g>0?Math.ceil(g*p)/p:Math.floor(g*p)/p;case"trunc":return Math.trunc(g*p)/p;case"round":return Math.round(g*p)/p;case"floor":return Math.floor(g*p)/p;case"ceil":return Math.ceil(g*p)/p;default:throw new RangeError(`Value rounding ${h} is out of range`)}}function ll(g){return g%4===0&&(g%100!==0||g%400===0)}function Ka(g){return ll(g)?366:365}function Vs(g,r){const h=qs(r-1,12)+1,p=g+(r-h)/12;return h===2?ll(p)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][h-1]}function Wt(g){let r=Date.UTC(g.year,g.month-1,g.day,g.hour,g.minute,g.second,g.millisecond);return g.year<100&&g.year>=0&&(r=new Date(r),r.setUTCFullYear(g.year,g.month-1,g.day)),+r}function Bs(g,r,h){return-Mt(Hs(g,1,r),h)+r-1}function sl(g,r=4,h=1){const p=Bs(g,r,h),N=Bs(g+1,r,h);return(Ka(g)-p+N)/7}function Pl(g){return g>99?g:g>yt.twoDigitCutoffYear?1900+g:2e3+g}function On(g,r,h,p=null){const N=new Date(g),C={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};p&&(C.timeZone=p);const H={timeZoneName:r,...C},L=new Intl.DateTimeFormat(h,H).formatToParts(N).find(V=>V.type.toLowerCase()==="timezonename");return L?L.value:null}function Ql(g,r){let h=parseInt(g,10);Number.isNaN(h)&&(h=0);const p=parseInt(r,10)||0,N=h<0||Object.is(h,-0)?-p:p;return h*60+N}function $r(g){const r=Number(g);if(typeof g=="boolean"||g===""||!Number.isFinite(r))throw new v(`Invalid unit value ${g}`);return r}function en(g,r){const h={};for(const p in g)if(Cn(g,p)){const N=g[p];if(N==null)continue;h[r(p)]=$r(N)}return h}function Wl(g,r){const h=Math.trunc(Math.abs(g/60)),p=Math.trunc(Math.abs(g%60)),N=g>=0?"+":"-";switch(r){case"short":return`${N}${st(h,2)}:${st(p,2)}`;case"narrow":return`${N}${h}${p>0?`:${p}`:""}`;case"techie":return`${N}${st(h,2)}${st(p,2)}`;default:throw new RangeError(`Value format ${r} is out of range for property format`)}}function Il(g){return gu(g,["hour","minute","second","millisecond"])}const yu=["January","February","March","April","May","June","July","August","September","October","November","December"],Ys=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],no=["J","F","M","A","M","J","J","A","S","O","N","D"];function xu(g){switch(g){case"narrow":return[...no];case"short":return[...Ys];case"long":return[...yu];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 Xl=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],Ha=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],Fr=["M","T","W","T","F","S","S"];function $s(g){switch(g){case"narrow":return[...Fr];case"short":return[...Ha];case"long":return[...Xl];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}const Dn=["AM","PM"],rl=["Before Christ","Anno Domini"],pu=["BC","AD"],Gr=["B","A"];function Zr(g){switch(g){case"narrow":return[...Gr];case"short":return[...pu];case"long":return[...rl];default:return null}}function Jl(g){return Dn[g.hour<12?0:1]}function tn(g,r){return $s(r)[g.weekday-1]}function Pr(g,r){return xu(r)[g.month-1]}function Kl(g,r){return Zr(r)[g.year<0?0:1]}function yn(g,r,h="always",p=!1){const N={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."]},C=["hours","minutes","seconds"].indexOf(g)===-1;if(h==="auto"&&C){const ke=g==="days";switch(r){case 1:return ke?"tomorrow":`next ${N[g][0]}`;case-1:return ke?"yesterday":`last ${N[g][0]}`;case 0:return ke?"today":`this ${N[g][0]}`}}const H=Object.is(r,-0)||r<0,L=Math.abs(r),V=L===1,de=N[g],pe=p?V?de[1]:de[2]||de[1]:V?N[g][0]:g;return H?`${L} ${pe} ago`:`in ${L} ${pe}`}function Fs(g,r){let h="";for(const p of g)p.literal?h+=p.val:h+=r(p.val);return h}const Gs={D:j,DD:T,DDD:_,DDDD:M,t:B,tt:se,ttt:Y,tttt:W,T:K,TT:ae,TTT:Z,TTTT:G,f:Q,ff:z,fff:ue,ffff:he,F:D,FF:ne,FFF:ge,FFFF:$};class Vt{static create(r,h={}){return new Vt(r,h)}static parseFormat(r){let h=null,p="",N=!1;const C=[];for(let H=0;H<r.length;H++){const L=r.charAt(H);L==="'"?((p.length>0||N)&&C.push({literal:N||/^\s+$/.test(p),val:p===""?"'":p}),h=null,p="",N=!N):N||L===h?p+=L:(p.length>0&&C.push({literal:/^\s+$/.test(p),val:p}),p=L,h=L)}return p.length>0&&C.push({literal:N||/^\s+$/.test(p),val:p}),C}static macroTokenToFormatOpts(r){return Gs[r]}constructor(r,h){this.opts=h,this.loc=r,this.systemLoc=null}formatWithSystemDefault(r,h){return this.systemLoc===null&&(this.systemLoc=this.loc.redefaultToSystem()),this.systemLoc.dtFormatter(r,{...this.opts,...h}).format()}dtFormatter(r,h={}){return this.loc.dtFormatter(r,{...this.opts,...h})}formatDateTime(r,h){return this.dtFormatter(r,h).format()}formatDateTimeParts(r,h){return this.dtFormatter(r,h).formatToParts()}formatInterval(r,h){return this.dtFormatter(r.start,h).dtf.formatRange(r.start.toJSDate(),r.end.toJSDate())}resolvedOptions(r,h){return this.dtFormatter(r,h).resolvedOptions()}num(r,h=0,p=void 0){if(this.opts.forceSimple)return st(r,h);const N={...this.opts};return h>0&&(N.padTo=h),p&&(N.signDisplay=p),this.loc.numberFormatter(N).format(r)}formatDateTimeFromString(r,h){const p=this.loc.listingMode()==="en",N=this.loc.outputCalendar&&this.loc.outputCalendar!=="gregory",C=(De,wt)=>this.loc.extract(r,De,wt),H=De=>r.isOffsetFixed&&r.offset===0&&De.allowZ?"Z":r.isValid?r.zone.formatOffset(r.ts,De.format):"",L=()=>p?Jl(r):C({hour:"numeric",hourCycle:"h12"},"dayperiod"),V=(De,wt)=>p?Pr(r,De):C(wt?{month:De}:{month:De,day:"numeric"},"month"),de=(De,wt)=>p?tn(r,De):C(wt?{weekday:De}:{weekday:De,month:"long",day:"numeric"},"weekday"),pe=De=>{const wt=Vt.macroTokenToFormatOpts(De);return wt?this.formatWithSystemDefault(r,wt):De},ke=De=>p?Kl(r,De):C({era:De},"era"),Ge=De=>{switch(De){case"S":return this.num(r.millisecond);case"u":case"SSS":return this.num(r.millisecond,3);case"s":return this.num(r.second);case"ss":return this.num(r.second,2);case"uu":return this.num(Math.floor(r.millisecond/10),2);case"uuu":return this.num(Math.floor(r.millisecond/100));case"m":return this.num(r.minute);case"mm":return this.num(r.minute,2);case"h":return this.num(r.hour%12===0?12:r.hour%12);case"hh":return this.num(r.hour%12===0?12:r.hour%12,2);case"H":return this.num(r.hour);case"HH":return this.num(r.hour,2);case"Z":return H({format:"narrow",allowZ:this.opts.allowZ});case"ZZ":return H({format:"short",allowZ:this.opts.allowZ});case"ZZZ":return H({format:"techie",allowZ:this.opts.allowZ});case"ZZZZ":return r.zone.offsetName(r.ts,{format:"short",locale:this.loc.locale});case"ZZZZZ":return r.zone.offsetName(r.ts,{format:"long",locale:this.loc.locale});case"z":return r.zoneName;case"a":return L();case"d":return N?C({day:"numeric"},"day"):this.num(r.day);case"dd":return N?C({day:"2-digit"},"day"):this.num(r.day,2);case"c":return this.num(r.weekday);case"ccc":return de("short",!0);case"cccc":return de("long",!0);case"ccccc":return de("narrow",!0);case"E":return this.num(r.weekday);case"EEE":return de("short",!1);case"EEEE":return de("long",!1);case"EEEEE":return de("narrow",!1);case"L":return N?C({month:"numeric",day:"numeric"},"month"):this.num(r.month);case"LL":return N?C({month:"2-digit",day:"numeric"},"month"):this.num(r.month,2);case"LLL":return V("short",!0);case"LLLL":return V("long",!0);case"LLLLL":return V("narrow",!0);case"M":return N?C({month:"numeric"},"month"):this.num(r.month);case"MM":return N?C({month:"2-digit"},"month"):this.num(r.month,2);case"MMM":return V("short",!1);case"MMMM":return V("long",!1);case"MMMMM":return V("narrow",!1);case"y":return N?C({year:"numeric"},"year"):this.num(r.year);case"yy":return N?C({year:"2-digit"},"year"):this.num(r.year.toString().slice(-2),2);case"yyyy":return N?C({year:"numeric"},"year"):this.num(r.year,4);case"yyyyyy":return N?C({year:"numeric"},"year"):this.num(r.year,6);case"G":return ke("short");case"GG":return ke("long");case"GGGGG":return ke("narrow");case"kk":return this.num(r.weekYear.toString().slice(-2),2);case"kkkk":return this.num(r.weekYear,4);case"W":return this.num(r.weekNumber);case"WW":return this.num(r.weekNumber,2);case"n":return this.num(r.localWeekNumber);case"nn":return this.num(r.localWeekNumber,2);case"ii":return this.num(r.localWeekYear.toString().slice(-2),2);case"iiii":return this.num(r.localWeekYear,4);case"o":return this.num(r.ordinal);case"ooo":return this.num(r.ordinal,3);case"q":return this.num(r.quarter);case"qq":return this.num(r.quarter,2);case"X":return this.num(Math.floor(r.ts/1e3));case"x":return this.num(r.ts);default:return pe(De)}};return Fs(Vt.parseFormat(h),Ge)}formatDurationFromString(r,h){const p=this.opts.signMode==="negativeLargestOnly"?-1:1,N=pe=>{switch(pe[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}},C=(pe,ke)=>Ge=>{const De=N(Ge);if(De){const wt=ke.isNegativeDuration&&De!==ke.largestUnit?p:1;let Yt;return this.opts.signMode==="negativeLargestOnly"&&De!==ke.largestUnit?Yt="never":this.opts.signMode==="all"?Yt="always":Yt="auto",this.num(pe.get(De)*wt,Ge.length,Yt)}else return Ge},H=Vt.parseFormat(h),L=H.reduce((pe,{literal:ke,val:Ge})=>ke?pe:pe.concat(Ge),[]),V=r.shiftTo(...L.map(N).filter(pe=>pe)),de={isNegativeDuration:V<0,largestUnit:Object.keys(V.values)[0]};return Fs(H,C(V,de))}}const es=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;function an(...g){const r=g.reduce((h,p)=>h+p.source,"");return RegExp(`^${r}$`)}function Rn(...g){return r=>g.reduce(([h,p,N],C)=>{const[H,L,V]=C(r,N);return[{...h,...H},L||p,V]},[{},null,1]).slice(0,2)}function Ot(g,...r){if(g==null)return[null,null];for(const[h,p]of r){const N=h.exec(g);if(N)return p(N)}return[null,null]}function xn(...g){return(r,h)=>{const p={};let N;for(N=0;N<g.length;N++)p[g[N]]=Ct(r[h+N]);return[p,null,h+N]}}const ts=/(?:([Zz])|([+-]\d\d)(?::?(\d\d))?)/,as=`(?:${ts.source}?(?:\\[(${es.source})\\])?)?`,Qr=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,Zs=RegExp(`${Qr.source}${as}`),ns=RegExp(`(?:[Tt]${Zs.source})?`),ls=/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,Ps=/(\d{4})-?W(\d\d)(?:-?(\d))?/,vu=/(\d{4})-?(\d{3})/,lo=xn("weekYear","weekNumber","weekDay"),so=xn("year","ordinal"),ro=/(\d{4})-(\d\d)-(\d\d)/,Qs=RegExp(`${Qr.source} ?(?:${ts.source}|(${es.source}))?`),io=RegExp(`(?: ${Qs.source})?`);function il(g,r,h){const p=g[r];return Ce(p)?h:Ct(p)}function uo(g,r){return[{year:il(g,r),month:il(g,r+1,1),day:il(g,r+2,1)},null,r+3]}function ul(g,r){return[{hours:il(g,r,0),minutes:il(g,r+1,0),seconds:il(g,r+2,0),milliseconds:Yr(g[r+3])},null,r+4]}function ss(g,r){const h=!g[r]&&!g[r+1],p=Ql(g[r+1],g[r+2]),N=h?null:Nt.instance(p);return[{},N,r+3]}function cl(g,r){const h=g[r]?Te.create(g[r]):null;return[{},h,r+1]}const co=RegExp(`^T?${Qr.source}$`),oo=/^-?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 fo(g){const[r,h,p,N,C,H,L,V,de]=g,pe=r[0]==="-",ke=V&&V[0]==="-",Ge=(De,wt=!1)=>De!==void 0&&(wt||De&&pe)?-De:De;return[{years:Ge(gn(h)),months:Ge(gn(p)),weeks:Ge(gn(N)),days:Ge(gn(C)),hours:Ge(gn(H)),minutes:Ge(gn(L)),seconds:Ge(gn(V),V==="-0"),milliseconds:Ge(Yr(de),ke)}]}const ho={GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function rs(g,r,h,p,N,C,H){const L={year:r.length===2?Pl(Ct(r)):Ct(r),month:Ys.indexOf(h)+1,day:Ct(p),hour:Ct(N),minute:Ct(C)};return H&&(L.second=Ct(H)),g&&(L.weekday=g.length>3?Xl.indexOf(g)+1:Ha.indexOf(g)+1),L}const mo=/^(?:(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 go(g){const[,r,h,p,N,C,H,L,V,de,pe,ke]=g,Ge=rs(r,N,p,h,C,H,L);let De;return V?De=ho[V]:de?De=0:De=Ql(pe,ke),[Ge,new Nt(De)]}function yo(g){return g.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}const bu=/^(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$/,xo=/^(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$/,po=/^(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 Su(g){const[,r,h,p,N,C,H,L]=g;return[rs(r,N,p,h,C,H,L),Nt.utcInstance]}function vo(g){const[,r,h,p,N,C,H,L]=g;return[rs(r,L,h,p,N,C,H),Nt.utcInstance]}const bo=an(ls,ns),So=an(Ps,ns),wo=an(vu,ns),No=an(Zs),wu=Rn(uo,ul,ss,cl),Wr=Rn(lo,ul,ss,cl),is=Rn(so,ul,ss,cl),jo=Rn(ul,ss,cl);function Nu(g){return Ot(g,[bo,wu],[So,Wr],[wo,is],[No,jo])}function ju(g){return Ot(yo(g),[mo,go])}function Eu(g){return Ot(g,[bu,Su],[xo,Su],[po,vo])}function Tu(g){return Ot(g,[oo,fo])}const Mu=Rn(ul);function ol(g){return Ot(g,[co,Mu])}const Eo=an(ro,io),To=an(Qs),Mo=Rn(ul,ss,cl);function Cu(g){return Ot(g,[Eo,wu],[To,Mo])}const Ir="Invalid Duration",dl={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}},us={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},...dl},ma=146097/400,nn=146097/4800,Ou={years:{quarters:4,months:12,weeks:ma/7,days:ma,hours:ma*24,minutes:ma*24*60,seconds:ma*24*60*60,milliseconds:ma*24*60*60*1e3},quarters:{months:3,weeks:ma/28,days:ma/4,hours:ma*24/4,minutes:ma*24*60/4,seconds:ma*24*60*60/4,milliseconds:ma*24*60*60*1e3/4},months:{weeks:nn/7,days:nn,hours:nn*24,minutes:nn*24*60,seconds:nn*24*60*60,milliseconds:nn*24*60*60*1e3},...dl},pn=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],Xr=pn.slice(0).reverse();function Ea(g,r,h=!1){const p={values:h?r.values:{...g.values,...r.values||{}},loc:g.loc.clone(r.loc),conversionAccuracy:r.conversionAccuracy||g.conversionAccuracy,matrix:r.matrix||g.matrix};return new Fe(p)}function Jr(g,r){var h;let p=(h=r.milliseconds)!=null?h:0;for(const N of Xr.slice(1))r[N]&&(p+=r[N]*g[N].milliseconds);return p}function Kr(g,r){const h=Jr(g,r)<0?-1:1;pn.reduceRight((p,N)=>{if(Ce(r[N]))return p;if(p){const C=r[p]*h,H=g[N][p],L=Math.floor(C/H);r[N]+=L*h,r[p]-=L*H*h}return N},null),pn.reduce((p,N)=>{if(Ce(r[N]))return p;if(p){const C=r[p]%1;r[p]-=C,r[N]+=C*g[p][N]}return N},null)}function ei(g){const r={};for(const[h,p]of Object.entries(g))p!==0&&(r[h]=p);return r}class Fe{constructor(r){const h=r.conversionAccuracy==="longterm"||!1;let p=h?Ou:us;r.matrix&&(p=r.matrix),this.values=r.values,this.loc=r.loc||Xe.create(),this.conversionAccuracy=h?"longterm":"casual",this.invalid=r.invalid||null,this.matrix=p,this.isLuxonDuration=!0}static fromMillis(r,h){return Fe.fromObject({milliseconds:r},h)}static fromObject(r,h={}){if(r==null||typeof r!="object")throw new v(`Duration.fromObject: argument expected to be an object, got ${r===null?"null":typeof r}`);return new Fe({values:en(r,Fe.normalizeUnit),loc:Xe.fromObject(h),conversionAccuracy:h.conversionAccuracy,matrix:h.matrix})}static fromDurationLike(r){if(ha(r))return Fe.fromMillis(r);if(Fe.isDuration(r))return r;if(typeof r=="object")return Fe.fromObject(r);throw new v(`Unknown duration argument ${r} of type ${typeof r}`)}static fromISO(r,h){const[p]=Tu(r);return p?Fe.fromObject(p,h):Fe.invalid("unparsable",`the input "${r}" can't be parsed as ISO 8601`)}static fromISOTime(r,h){const[p]=ol(r);return p?Fe.fromObject(p,h):Fe.invalid("unparsable",`the input "${r}" can't be parsed as ISO 8601`)}static invalid(r,h=null){if(!r)throw new v("need to specify a reason the Duration is invalid");const p=r instanceof fa?r:new fa(r,h);if(yt.throwOnInvalid)throw new c(p);return new Fe({invalid:p})}static normalizeUnit(r){const h={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"}[r&&r.toLowerCase()];if(!h)throw new f(r);return h}static isDuration(r){return r&&r.isLuxonDuration||!1}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}toFormat(r,h={}){const p={...h,floor:h.round!==!1&&h.floor!==!1};return this.isValid?Vt.create(this.loc,p).formatDurationFromString(this,r):Ir}toHuman(r={}){if(!this.isValid)return Ir;const h=r.showZeros!==!1,p=pn.map(N=>{const C=this.values[N];return Ce(C)||C===0&&!h?null:this.loc.numberFormatter({style:"unit",unitDisplay:"long",...r,unit:N.slice(0,-1)}).format(C)}).filter(N=>N);return this.loc.listFormatter({type:"conjunction",style:r.listStyle||"narrow",...r}).format(p)}toObject(){return this.isValid?{...this.values}:{}}toISO(){if(!this.isValid)return null;let r="P";return this.years!==0&&(r+=this.years+"Y"),(this.months!==0||this.quarters!==0)&&(r+=this.months+this.quarters*3+"M"),this.weeks!==0&&(r+=this.weeks+"W"),this.days!==0&&(r+=this.days+"D"),(this.hours!==0||this.minutes!==0||this.seconds!==0||this.milliseconds!==0)&&(r+="T"),this.hours!==0&&(r+=this.hours+"H"),this.minutes!==0&&(r+=this.minutes+"M"),(this.seconds!==0||this.milliseconds!==0)&&(r+=Zl(this.seconds+this.milliseconds/1e3,3)+"S"),r==="P"&&(r+="T0S"),r}toISOTime(r={}){if(!this.isValid)return null;const h=this.toMillis();return h<0||h>=864e5?null:(r={suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended",...r,includeOffset:!1},we.fromMillis(h,{zone:"UTC"}).toISOTime(r))}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?Jr(this.matrix,this.values):NaN}valueOf(){return this.toMillis()}plus(r){if(!this.isValid)return this;const h=Fe.fromDurationLike(r),p={};for(const N of pn)(Cn(h.values,N)||Cn(this.values,N))&&(p[N]=h.get(N)+this.get(N));return Ea(this,{values:p},!0)}minus(r){if(!this.isValid)return this;const h=Fe.fromDurationLike(r);return this.plus(h.negate())}mapUnits(r){if(!this.isValid)return this;const h={};for(const p of Object.keys(this.values))h[p]=$r(r(this.values[p],p));return Ea(this,{values:h},!0)}get(r){return this[Fe.normalizeUnit(r)]}set(r){if(!this.isValid)return this;const h={...this.values,...en(r,Fe.normalizeUnit)};return Ea(this,{values:h})}reconfigure({locale:r,numberingSystem:h,conversionAccuracy:p,matrix:N}={}){const H={loc:this.loc.clone({locale:r,numberingSystem:h}),matrix:N,conversionAccuracy:p};return Ea(this,H)}as(r){return this.isValid?this.shiftTo(r).get(r):NaN}normalize(){if(!this.isValid)return this;const r=this.toObject();return Kr(this.matrix,r),Ea(this,{values:r},!0)}rescale(){if(!this.isValid)return this;const r=ei(this.normalize().shiftToAll().toObject());return Ea(this,{values:r},!0)}shiftTo(...r){if(!this.isValid)return this;if(r.length===0)return this;r=r.map(H=>Fe.normalizeUnit(H));const h={},p={},N=this.toObject();let C;for(const H of pn)if(r.indexOf(H)>=0){C=H;let L=0;for(const de in p)L+=this.matrix[de][H]*p[de],p[de]=0;ha(N[H])&&(L+=N[H]);const V=Math.trunc(L);h[H]=V,p[H]=(L*1e3-V*1e3)/1e3}else ha(N[H])&&(p[H]=N[H]);for(const H in p)p[H]!==0&&(h[C]+=H===C?p[H]:p[H]/this.matrix[C][H]);return Kr(this.matrix,h),Ea(this,{values:h},!0)}shiftToAll(){return this.isValid?this.shiftTo("years","months","weeks","days","hours","minutes","seconds","milliseconds"):this}negate(){if(!this.isValid)return this;const r={};for(const h of Object.keys(this.values))r[h]=this.values[h]===0?0:-this.values[h];return Ea(this,{values:r},!0)}removeZeros(){if(!this.isValid)return this;const r=ei(this.values);return Ea(this,{values:r},!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(r){if(!this.isValid||!r.isValid||!this.loc.equals(r.loc))return!1;function h(p,N){return p===void 0||p===0?N===void 0||N===0:p===N}for(const p of pn)if(!h(this.values[p],r.values[p]))return!1;return!0}}const fl="Invalid Interval";function Co(g,r){return!g||!g.isValid?pt.invalid("missing or invalid start"):!r||!r.isValid?pt.invalid("missing or invalid end"):r<g?pt.invalid("end before start",`The end of an interval must be after its start, but you had start=${g.toISO()} and end=${r.toISO()}`):null}class pt{constructor(r){this.s=r.start,this.e=r.end,this.invalid=r.invalid||null,this.isLuxonInterval=!0}static invalid(r,h=null){if(!r)throw new v("need to specify a reason the Interval is invalid");const p=r instanceof fa?r:new fa(r,h);if(yt.throwOnInvalid)throw new o(p);return new pt({invalid:p})}static fromDateTimes(r,h){const p=xa(r),N=xa(h),C=Co(p,N);return C??new pt({start:p,end:N})}static after(r,h){const p=Fe.fromDurationLike(h),N=xa(r);return pt.fromDateTimes(N,N.plus(p))}static before(r,h){const p=Fe.fromDurationLike(h),N=xa(r);return pt.fromDateTimes(N.minus(p),N)}static fromISO(r,h){const[p,N]=(r||"").split("/",2);if(p&&N){let C,H;try{C=we.fromISO(p,h),H=C.isValid}catch{H=!1}let L,V;try{L=we.fromISO(N,h),V=L.isValid}catch{V=!1}if(H&&V)return pt.fromDateTimes(C,L);if(H){const de=Fe.fromISO(N,h);if(de.isValid)return pt.after(C,de)}else if(V){const de=Fe.fromISO(p,h);if(de.isValid)return pt.before(L,de)}}return pt.invalid("unparsable",`the input "${r}" can't be parsed as ISO 8601`)}static isInterval(r){return r&&r.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(r="milliseconds"){return this.isValid?this.toDuration(r).get(r):NaN}count(r="milliseconds",h){if(!this.isValid)return NaN;const p=this.start.startOf(r,h);let N;return h!=null&&h.useLocaleWeeks?N=this.end.reconfigure({locale:p.locale}):N=this.end,N=N.startOf(r,h),Math.floor(N.diff(p,r).get(r))+(N.valueOf()!==this.end.valueOf())}hasSame(r){return this.isValid?this.isEmpty()||this.e.minus(1).hasSame(this.s,r):!1}isEmpty(){return this.s.valueOf()===this.e.valueOf()}isAfter(r){return this.isValid?this.s>r:!1}isBefore(r){return this.isValid?this.e<=r:!1}contains(r){return this.isValid?this.s<=r&&this.e>r:!1}set({start:r,end:h}={}){return this.isValid?pt.fromDateTimes(r||this.s,h||this.e):this}splitAt(...r){if(!this.isValid)return[];const h=r.map(xa).filter(H=>this.contains(H)).sort((H,L)=>H.toMillis()-L.toMillis()),p=[];let{s:N}=this,C=0;for(;N<this.e;){const H=h[C]||this.e,L=+H>+this.e?this.e:H;p.push(pt.fromDateTimes(N,L)),N=L,C+=1}return p}splitBy(r){const h=Fe.fromDurationLike(r);if(!this.isValid||!h.isValid||h.as("milliseconds")===0)return[];let{s:p}=this,N=1,C;const H=[];for(;p<this.e;){const L=this.start.plus(h.mapUnits(V=>V*N));C=+L>+this.e?this.e:L,H.push(pt.fromDateTimes(p,C)),p=C,N+=1}return H}divideEqually(r){return this.isValid?this.splitBy(this.length()/r).slice(0,r):[]}overlaps(r){return this.e>r.s&&this.s<r.e}abutsStart(r){return this.isValid?+this.e==+r.s:!1}abutsEnd(r){return this.isValid?+r.e==+this.s:!1}engulfs(r){return this.isValid?this.s<=r.s&&this.e>=r.e:!1}equals(r){return!this.isValid||!r.isValid?!1:this.s.equals(r.s)&&this.e.equals(r.e)}intersection(r){if(!this.isValid)return this;const h=this.s>r.s?this.s:r.s,p=this.e<r.e?this.e:r.e;return h>=p?null:pt.fromDateTimes(h,p)}union(r){if(!this.isValid)return this;const h=this.s<r.s?this.s:r.s,p=this.e>r.e?this.e:r.e;return pt.fromDateTimes(h,p)}static merge(r){const[h,p]=r.sort((N,C)=>N.s-C.s).reduce(([N,C],H)=>C?C.overlaps(H)||C.abutsStart(H)?[N,C.union(H)]:[N.concat([C]),H]:[N,H],[[],null]);return p&&h.push(p),h}static xor(r){let h=null,p=0;const N=[],C=r.map(V=>[{time:V.s,type:"s"},{time:V.e,type:"e"}]),H=Array.prototype.concat(...C),L=H.sort((V,de)=>V.time-de.time);for(const V of L)p+=V.type==="s"?1:-1,p===1?h=V.time:(h&&+h!=+V.time&&N.push(pt.fromDateTimes(h,V.time)),h=null);return pt.merge(N)}difference(...r){return pt.xor([this].concat(r)).map(h=>this.intersection(h)).filter(h=>h&&!h.isEmpty())}toString(){return this.isValid?`[${this.s.toISO()} – ${this.e.toISO()})`:fl}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Interval { start: ${this.s.toISO()}, end: ${this.e.toISO()} }`:`Interval { Invalid, reason: ${this.invalidReason} }`}toLocaleString(r=j,h={}){return this.isValid?Vt.create(this.s.loc.clone(h),r).formatInterval(this):fl}toISO(r){return this.isValid?`${this.s.toISO(r)}/${this.e.toISO(r)}`:fl}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:fl}toISOTime(r){return this.isValid?`${this.s.toISOTime(r)}/${this.e.toISOTime(r)}`:fl}toFormat(r,{separator:h=" – "}={}){return this.isValid?`${this.s.toFormat(r)}${h}${this.e.toFormat(r)}`:fl}toDuration(r,h){return this.isValid?this.e.diff(this.s,r,h):Fe.invalid(this.invalidReason)}mapEndpoints(r){return pt.fromDateTimes(r(this.s),r(this.e))}}class cs{static hasDST(r=yt.defaultZone){const h=we.now().setZone(r).set({month:12});return!r.isUniversal&&h.offset!==h.set({month:6}).offset}static isValidIANAZone(r){return Te.isValidZone(r)}static normalizeZone(r){return Zt(r,yt.defaultZone)}static getStartOfWeek({locale:r=null,locObj:h=null}={}){return(h||Xe.create(r)).getStartOfWeek()}static getMinimumDaysInFirstWeek({locale:r=null,locObj:h=null}={}){return(h||Xe.create(r)).getMinDaysInFirstWeek()}static getWeekendWeekdays({locale:r=null,locObj:h=null}={}){return(h||Xe.create(r)).getWeekendDays().slice()}static months(r="long",{locale:h=null,numberingSystem:p=null,locObj:N=null,outputCalendar:C="gregory"}={}){return(N||Xe.create(h,p,C)).months(r)}static monthsFormat(r="long",{locale:h=null,numberingSystem:p=null,locObj:N=null,outputCalendar:C="gregory"}={}){return(N||Xe.create(h,p,C)).months(r,!0)}static weekdays(r="long",{locale:h=null,numberingSystem:p=null,locObj:N=null}={}){return(N||Xe.create(h,p,null)).weekdays(r)}static weekdaysFormat(r="long",{locale:h=null,numberingSystem:p=null,locObj:N=null}={}){return(N||Xe.create(h,p,null)).weekdays(r,!0)}static meridiems({locale:r=null}={}){return Xe.create(r).meridiems()}static eras(r="short",{locale:h=null}={}){return Xe.create(h,null,"gregory").eras(r)}static features(){return{relative:Vr(),localeWeek:mn()}}}function ra(g,r){const h=N=>N.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),p=h(r)-h(g);return Math.floor(Fe.fromMillis(p).as("days"))}function os(g,r,h){const p=[["years",(V,de)=>de.year-V.year],["quarters",(V,de)=>de.quarter-V.quarter+(de.year-V.year)*4],["months",(V,de)=>de.month-V.month+(de.year-V.year)*12],["weeks",(V,de)=>{const pe=ra(V,de);return(pe-pe%7)/7}],["days",ra]],N={},C=g;let H,L;for(const[V,de]of p)h.indexOf(V)>=0&&(H=V,N[V]=de(g,r),L=C.plus(N),L>r?(N[V]--,g=C.plus(N),g>r&&(L=g,N[V]--,g=C.plus(N))):g=L);return[g,N,L,H]}function Du(g,r,h,p){let[N,C,H,L]=os(g,r,h);const V=r-N,de=h.filter(ke=>["hours","minutes","seconds","milliseconds"].indexOf(ke)>=0);de.length===0&&(H<r&&(H=N.plus({[L]:1})),H!==N&&(C[L]=(C[L]||0)+V/(H-N)));const pe=Fe.fromObject(C,p);return de.length>0?Fe.fromMillis(V,p).shiftTo(...de).plus(pe):pe}const Ru="missing Intl.DateTimeFormat.formatToParts support";function Qe(g,r=h=>h){return{regex:g,deser:([h])=>r(ao(h))}}const Ws="[ ]",Au=new RegExp(Ws,"g");function hl(g){return g.replace(/\./g,"\\.?").replace(Au,Ws)}function Is(g){return g.replace(/\./g,"").replace(Au," ").toLowerCase()}function It(g,r){return g===null?null:{regex:RegExp(g.map(hl).join("|")),deser:([h])=>g.findIndex(p=>Is(h)===Is(p))+r}}function Xs(g,r){return{regex:g,deser:([,h,p])=>Ql(h,p),groups:r}}function ds(g){return{regex:g,deser:([r])=>r}}function An(g){return g.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function ml(g,r){const h=la(r),p=la(r,"{2}"),N=la(r,"{3}"),C=la(r,"{4}"),H=la(r,"{6}"),L=la(r,"{1,2}"),V=la(r,"{1,3}"),de=la(r,"{1,6}"),pe=la(r,"{1,9}"),ke=la(r,"{2,4}"),Ge=la(r,"{4,6}"),De=$t=>({regex:RegExp(An($t.val)),deser:([vn])=>vn,literal:!0}),Yt=($t=>{if(g.literal)return De($t);switch($t.val){case"G":return It(r.eras("short"),0);case"GG":return It(r.eras("long"),0);case"y":return Qe(de);case"yy":return Qe(ke,Pl);case"yyyy":return Qe(C);case"yyyyy":return Qe(Ge);case"yyyyyy":return Qe(H);case"M":return Qe(L);case"MM":return Qe(p);case"MMM":return It(r.months("short",!0),1);case"MMMM":return It(r.months("long",!0),1);case"L":return Qe(L);case"LL":return Qe(p);case"LLL":return It(r.months("short",!1),1);case"LLLL":return It(r.months("long",!1),1);case"d":return Qe(L);case"dd":return Qe(p);case"o":return Qe(V);case"ooo":return Qe(N);case"HH":return Qe(p);case"H":return Qe(L);case"hh":return Qe(p);case"h":return Qe(L);case"mm":return Qe(p);case"m":return Qe(L);case"q":return Qe(L);case"qq":return Qe(p);case"s":return Qe(L);case"ss":return Qe(p);case"S":return Qe(V);case"SSS":return Qe(N);case"u":return ds(pe);case"uu":return ds(L);case"uuu":return Qe(h);case"a":return It(r.meridiems(),0);case"kkkk":return Qe(C);case"kk":return Qe(ke,Pl);case"W":return Qe(L);case"WW":return Qe(p);case"E":case"c":return Qe(h);case"EEE":return It(r.weekdays("short",!1),1);case"EEEE":return It(r.weekdays("long",!1),1);case"ccc":return It(r.weekdays("short",!0),1);case"cccc":return It(r.weekdays("long",!0),1);case"Z":case"ZZ":return Xs(new RegExp(`([+-]${L.source})(?::(${p.source}))?`),2);case"ZZZ":return Xs(new RegExp(`([+-]${L.source})(${p.source})?`),2);case"z":return ds(/[a-z_+-/]{1,256}?/i);case" ":return ds(/[^\S\n\r]/);default:return De($t)}})(g)||{invalidReason:Ru};return Yt.token=g,Yt}const ti={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 _u(g,r,h){const{type:p,value:N}=g;if(p==="literal"){const V=/^\s+$/.test(N);return{literal:!V,val:V?" ":N}}const C=r[p];let H=p;p==="hour"&&(r.hour12!=null?H=r.hour12?"hour12":"hour24":r.hourCycle!=null?r.hourCycle==="h11"||r.hourCycle==="h12"?H="hour12":H="hour24":H=h.hour12?"hour12":"hour24");let L=ti[H];if(typeof L=="object"&&(L=L[C]),L)return{literal:!1,val:L}}function _n(g){return[`^${g.map(h=>h.regex).reduce((h,p)=>`${h}(${p.source})`,"")}$`,g]}function ku(g,r,h){const p=g.match(r);if(p){const N={};let C=1;for(const H in h)if(Cn(h,H)){const L=h[H],V=L.groups?L.groups+1:1;!L.literal&&L.token&&(N[L.token.val[0]]=L.deser(p.slice(C,C+V))),C+=V}return[p,N]}else return[p,{}]}function zu(g){const r=C=>{switch(C){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 h=null,p;return Ce(g.z)||(h=Te.create(g.z)),Ce(g.Z)||(h||(h=new Nt(g.Z)),p=g.Z),Ce(g.q)||(g.M=(g.q-1)*3+1),Ce(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),Ce(g.u)||(g.S=Yr(g.u)),[Object.keys(g).reduce((C,H)=>{const L=r(H);return L&&(C[L]=g[H]),C},{}),h,p]}let Js=null;function Do(){return Js||(Js=we.fromMillis(1555555555555)),Js}function Ro(g,r){if(g.literal)return g;const h=Vt.macroTokenToFormatOpts(g.val),p=ga(h,r);return p==null||p.includes(void 0)?g:p}function Uu(g,r){return Array.prototype.concat(...g.map(h=>Ro(h,r)))}class ai{constructor(r,h){if(this.locale=r,this.format=h,this.tokens=Uu(Vt.parseFormat(h),r),this.units=this.tokens.map(p=>ml(p,r)),this.disqualifyingUnit=this.units.find(p=>p.invalidReason),!this.disqualifyingUnit){const[p,N]=_n(this.units);this.regex=RegExp(p,"i"),this.handlers=N}}explainFromTokens(r){if(this.isValid){const[h,p]=ku(r,this.regex,this.handlers),[N,C,H]=p?zu(p):[null,null,void 0];if(Cn(p,"a")&&Cn(p,"H"))throw new m("Can't include meridiem when specifying 24-hour format");return{input:r,tokens:this.tokens,regex:this.regex,rawMatches:h,matches:p,result:N,zone:C,specificOffset:H}}else return{input:r,tokens:this.tokens,invalidReason:this.invalidReason}}get isValid(){return!this.disqualifyingUnit}get invalidReason(){return this.disqualifyingUnit?this.disqualifyingUnit.invalidReason:null}}function ni(g,r,h){return new ai(g,h).explainFromTokens(r)}function li(g,r,h){const{result:p,zone:N,specificOffset:C,invalidReason:H}=ni(g,r,h);return[p,N,C,H]}function ga(g,r){if(!g)return null;const p=Vt.create(r,g).dtFormatter(Do()),N=p.formatToParts(),C=p.resolvedOptions();return N.map(H=>_u(H,g,C))}const gl="Invalid DateTime",ca=864e13;function La(g){return new fa("unsupported zone",`the zone "${g.name}" is not supported`)}function fs(g){return g.weekData===null&&(g.weekData=qt(g.c)),g.weekData}function yl(g){return g.localWeekData===null&&(g.localWeekData=qt(g.c,g.loc.getMinDaysInFirstWeek(),g.loc.getStartOfWeek())),g.localWeekData}function qa(g,r){const h={ts:g.ts,zone:g.zone,c:g.c,o:g.o,loc:g.loc,invalid:g.invalid};return new we({...h,...r,old:h})}function Ks(g,r,h){let p=g-r*60*1e3;const N=h.offset(p);if(r===N)return[p,r];p-=(N-r)*60*1e3;const C=h.offset(p);return N===C?[p,N]:[g-Math.min(N,C)*60*1e3,Math.max(N,C)]}function Va(g,r){g+=r*60*1e3;const h=new Date(g);return{year:h.getUTCFullYear(),month:h.getUTCMonth()+1,day:h.getUTCDate(),hour:h.getUTCHours(),minute:h.getUTCMinutes(),second:h.getUTCSeconds(),millisecond:h.getUTCMilliseconds()}}function hs(g,r,h){return Ks(Wt(g),r,h)}function ms(g,r){const h=g.o,p=g.c.year+Math.trunc(r.years),N=g.c.month+Math.trunc(r.months)+Math.trunc(r.quarters)*3,C={...g.c,year:p,month:N,day:Math.min(g.c.day,Vs(p,N))+Math.trunc(r.days)+Math.trunc(r.weeks)*7},H=Fe.fromObject({years:r.years-Math.trunc(r.years),quarters:r.quarters-Math.trunc(r.quarters),months:r.months-Math.trunc(r.months),weeks:r.weeks-Math.trunc(r.weeks),days:r.days-Math.trunc(r.days),hours:r.hours,minutes:r.minutes,seconds:r.seconds,milliseconds:r.milliseconds}).as("milliseconds"),L=Wt(C);let[V,de]=Ks(L,h,g.zone);return H!==0&&(V+=H,de=g.zone.offset(V)),{ts:V,o:de}}function Ta(g,r,h,p,N,C){const{setZone:H,zone:L}=h;if(g&&Object.keys(g).length!==0||r){const V=r||L,de=we.fromObject(g,{...h,zone:V,specificOffset:C});return H?de:de.setZone(L)}else return we.invalid(new fa("unparsable",`the input "${N}" can't be parsed as ${p}`))}function er(g,r,h=!0){return g.isValid?Vt.create(Xe.create("en-US"),{allowZ:h,forceSimple:!0}).formatDateTimeFromString(g,r):null}function Xt(g,r,h){const p=g.c.year>9999||g.c.year<0;let N="";if(p&&g.c.year>=0&&(N+="+"),N+=st(g.c.year,p?6:4),h==="year")return N;if(r){if(N+="-",N+=st(g.c.month),h==="month")return N;N+="-"}else if(N+=st(g.c.month),h==="month")return N;return N+=st(g.c.day),N}function tr(g,r,h,p,N,C,H){let L=!h||g.c.millisecond!==0||g.c.second!==0,V="";switch(H){case"day":case"month":case"year":break;default:if(V+=st(g.c.hour),H==="hour")break;if(r){if(V+=":",V+=st(g.c.minute),H==="minute")break;L&&(V+=":",V+=st(g.c.second))}else{if(V+=st(g.c.minute),H==="minute")break;L&&(V+=st(g.c.second))}if(H==="second")break;L&&(!p||g.c.millisecond!==0)&&(V+=".",V+=st(g.c.millisecond,3))}return N&&(g.isOffsetFixed&&g.offset===0&&!C?V+="Z":g.o<0?(V+="-",V+=st(Math.trunc(-g.o/60)),V+=":",V+=st(Math.trunc(-g.o%60))):(V+="+",V+=st(Math.trunc(g.o/60)),V+=":",V+=st(Math.trunc(g.o%60)))),C&&(V+="["+g.zone.ianaName+"]"),V}const Ba={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},Hu={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},ar={ordinal:1,hour:0,minute:0,second:0,millisecond:0},Ya=["year","month","day","hour","minute","second","millisecond"],si=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],Lu=["year","ordinal","hour","minute","second","millisecond"];function xl(g){const r={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(!r)throw new f(g);return r}function ri(g){switch(g.toLowerCase()){case"localweekday":case"localweekdays":return"localWeekday";case"localweeknumber":case"localweeknumbers":return"localWeekNumber";case"localweekyear":case"localweekyears":return"localWeekYear";default:return xl(g)}}function ya(g){if(ln===void 0&&(ln=yt.now()),g.type!=="iana")return g.offset(ln);const r=g.name;let h=ia.get(r);return h===void 0&&(h=g.offset(ln),ia.set(r,h)),h}function kn(g,r){const h=Zt(r.zone,yt.defaultZone);if(!h.isValid)return we.invalid(La(h));const p=Xe.fromObject(r);let N,C;if(Ce(g.year))N=yt.now();else{for(const V of Ya)Ce(g[V])&&(g[V]=Ba[V]);const H=Ls(g)||Mn(g);if(H)return we.invalid(H);const L=ya(h);[N,C]=hs(g,L,h)}return new we({ts:N,zone:h,loc:p,o:C})}function zn(g,r,h){const p=Ce(h.round)?!0:h.round,N=Ce(h.rounding)?"trunc":h.rounding,C=(L,V)=>(L=Zl(L,p||h.calendary?0:2,h.calendary?"round":N),r.loc.clone(h).relFormatter(h).format(L,V)),H=L=>h.calendary?r.hasSame(g,L)?0:r.startOf(L).diff(g.startOf(L),L).get(L):r.diff(g,L).get(L);if(h.unit)return C(H(h.unit),h.unit);for(const L of h.units){const V=H(L);if(Math.abs(V)>=1)return C(V,L)}return C(g>r?-0:0,h.units[h.units.length-1])}function gs(g){let r={},h;return g.length>0&&typeof g[g.length-1]=="object"?(r=g[g.length-1],h=Array.from(g).slice(0,g.length-1)):h=Array.from(g),[r,h]}let ln;const ia=new Map;class we{constructor(r){const h=r.zone||yt.defaultZone;let p=r.invalid||(Number.isNaN(r.ts)?new fa("invalid input"):null)||(h.isValid?null:La(h));this.ts=Ce(r.ts)?yt.now():r.ts;let N=null,C=null;if(!p)if(r.old&&r.old.ts===this.ts&&r.old.zone.equals(h))[N,C]=[r.old.c,r.old.o];else{const L=ha(r.o)&&!r.old?r.o:h.offset(this.ts);N=Va(this.ts,L),p=Number.isNaN(N.year)?new fa("invalid input"):null,N=p?null:N,C=p?null:L}this._zone=h,this.loc=r.loc||Xe.create(),this.invalid=p,this.weekData=null,this.localWeekData=null,this.c=N,this.o=C,this.isLuxonDateTime=!0}static now(){return new we({})}static local(){const[r,h]=gs(arguments),[p,N,C,H,L,V,de]=h;return kn({year:p,month:N,day:C,hour:H,minute:L,second:V,millisecond:de},r)}static utc(){const[r,h]=gs(arguments),[p,N,C,H,L,V,de]=h;return r.zone=Nt.utcInstance,kn({year:p,month:N,day:C,hour:H,minute:L,second:V,millisecond:de},r)}static fromJSDate(r,h={}){const p=hu(r)?r.valueOf():NaN;if(Number.isNaN(p))return we.invalid("invalid input");const N=Zt(h.zone,yt.defaultZone);return N.isValid?new we({ts:p,zone:N,loc:Xe.fromObject(h)}):we.invalid(La(N))}static fromMillis(r,h={}){if(ha(r))return r<-ca||r>ca?we.invalid("Timestamp out of range"):new we({ts:r,zone:Zt(h.zone,yt.defaultZone),loc:Xe.fromObject(h)});throw new v(`fromMillis requires a numerical input, but received a ${typeof r} with value ${r}`)}static fromSeconds(r,h={}){if(ha(r))return new we({ts:r*1e3,zone:Zt(h.zone,yt.defaultZone),loc:Xe.fromObject(h)});throw new v("fromSeconds requires a numerical input")}static fromObject(r,h={}){r=r||{};const p=Zt(h.zone,yt.defaultZone);if(!p.isValid)return we.invalid(La(p));const N=Xe.fromObject(h),C=en(r,ri),{minDaysInFirstWeek:H,startOfWeek:L}=du(C,N),V=yt.now(),de=Ce(h.specificOffset)?p.offset(V):h.specificOffset,pe=!Ce(C.ordinal),ke=!Ce(C.year),Ge=!Ce(C.month)||!Ce(C.day),De=ke||Ge,wt=C.weekYear||C.weekNumber;if((De||pe)&&wt)throw new m("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(Ge&&pe)throw new m("Can't mix ordinal dates with month/day");const Yt=wt||C.weekday&&!De;let $t,vn,sn=Va(V,de);Yt?($t=si,vn=Hu,sn=qt(sn,H,L)):pe?($t=Lu,vn=ar,sn=Fl(sn)):($t=Ya,vn=Ba);let nr=!1;for(const Ga of $t){const lr=C[Ga];Ce(lr)?nr?C[Ga]=vn[Ga]:C[Ga]=sn[Ga]:nr=!0}const Un=Yt?fu(C,H,L):pe?Gl(C):Ls(C),Fa=Un||Mn(C);if(Fa)return we.invalid(Fa);const bn=Yt?Tn(C,H,L):pe?ou(C):C,[rn,ii]=hs(bn,de,p),Hn=new we({ts:rn,zone:p,o:ii,loc:N});return C.weekday&&De&&r.weekday!==Hn.weekday?we.invalid("mismatched weekday",`you can't specify both a weekday of ${C.weekday} and a date of ${Hn.toISO()}`):Hn.isValid?Hn:we.invalid(Hn.invalid)}static fromISO(r,h={}){const[p,N]=Nu(r);return Ta(p,N,h,"ISO 8601",r)}static fromRFC2822(r,h={}){const[p,N]=ju(r);return Ta(p,N,h,"RFC 2822",r)}static fromHTTP(r,h={}){const[p,N]=Eu(r);return Ta(p,N,h,"HTTP",h)}static fromFormat(r,h,p={}){if(Ce(r)||Ce(h))throw new v("fromFormat requires an input string and a format");const{locale:N=null,numberingSystem:C=null}=p,H=Xe.fromOpts({locale:N,numberingSystem:C,defaultToEN:!0}),[L,V,de,pe]=li(H,r,h);return pe?we.invalid(pe):Ta(L,V,p,`format ${h}`,r,de)}static fromString(r,h,p={}){return we.fromFormat(r,h,p)}static fromSQL(r,h={}){const[p,N]=Cu(r);return Ta(p,N,h,"SQL",r)}static invalid(r,h=null){if(!r)throw new v("need to specify a reason the DateTime is invalid");const p=r instanceof fa?r:new fa(r,h);if(yt.throwOnInvalid)throw new i(p);return new we({invalid:p})}static isDateTime(r){return r&&r.isLuxonDateTime||!1}static parseFormatForOpts(r,h={}){const p=ga(r,Xe.fromObject(h));return p?p.map(N=>N?N.val:null).join(""):null}static expandFormat(r,h={}){return Uu(Vt.parseFormat(r),Xe.fromObject(h)).map(N=>N.val).join("")}static resetCache(){ln=void 0,ia.clear()}get(r){return this[r]}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?fs(this).weekYear:NaN}get weekNumber(){return this.isValid?fs(this).weekNumber:NaN}get weekday(){return this.isValid?fs(this).weekday:NaN}get isWeekend(){return this.isValid&&this.loc.getWeekendDays().includes(this.weekday)}get localWeekday(){return this.isValid?yl(this).weekday:NaN}get localWeekNumber(){return this.isValid?yl(this).weekNumber:NaN}get localWeekYear(){return this.isValid?yl(this).weekYear:NaN}get ordinal(){return this.isValid?Fl(this.c).ordinal:NaN}get monthShort(){return this.isValid?cs.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?cs.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?cs.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?cs.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 r=864e5,h=6e4,p=Wt(this.c),N=this.zone.offset(p-r),C=this.zone.offset(p+r),H=this.zone.offset(p-N*h),L=this.zone.offset(p-C*h);if(H===L)return[this];const V=p-H*h,de=p-L*h,pe=Va(V,H),ke=Va(de,L);return pe.hour===ke.hour&&pe.minute===ke.minute&&pe.second===ke.second&&pe.millisecond===ke.millisecond?[qa(this,{ts:V}),qa(this,{ts:de})]:[this]}get isInLeapYear(){return ll(this.year)}get daysInMonth(){return Vs(this.year,this.month)}get daysInYear(){return this.isValid?Ka(this.year):NaN}get weeksInWeekYear(){return this.isValid?sl(this.weekYear):NaN}get weeksInLocalWeekYear(){return this.isValid?sl(this.localWeekYear,this.loc.getMinDaysInFirstWeek(),this.loc.getStartOfWeek()):NaN}resolvedLocaleOptions(r={}){const{locale:h,numberingSystem:p,calendar:N}=Vt.create(this.loc.clone(r),r).resolvedOptions(this);return{locale:h,numberingSystem:p,outputCalendar:N}}toUTC(r=0,h={}){return this.setZone(Nt.instance(r),h)}toLocal(){return this.setZone(yt.defaultZone)}setZone(r,{keepLocalTime:h=!1,keepCalendarTime:p=!1}={}){if(r=Zt(r,yt.defaultZone),r.equals(this.zone))return this;if(r.isValid){let N=this.ts;if(h||p){const C=r.offset(this.ts),H=this.toObject();[N]=hs(H,C,r)}return qa(this,{ts:N,zone:r})}else return we.invalid(La(r))}reconfigure({locale:r,numberingSystem:h,outputCalendar:p}={}){const N=this.loc.clone({locale:r,numberingSystem:h,outputCalendar:p});return qa(this,{loc:N})}setLocale(r){return this.reconfigure({locale:r})}set(r){if(!this.isValid)return this;const h=en(r,ri),{minDaysInFirstWeek:p,startOfWeek:N}=du(h,this.loc),C=!Ce(h.weekYear)||!Ce(h.weekNumber)||!Ce(h.weekday),H=!Ce(h.ordinal),L=!Ce(h.year),V=!Ce(h.month)||!Ce(h.day),de=L||V,pe=h.weekYear||h.weekNumber;if((de||H)&&pe)throw new m("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(V&&H)throw new m("Can't mix ordinal dates with month/day");let ke;C?ke=Tn({...qt(this.c,p,N),...h},p,N):Ce(h.ordinal)?(ke={...this.toObject(),...h},Ce(h.day)&&(ke.day=Math.min(Vs(ke.year,ke.month),ke.day))):ke=ou({...Fl(this.c),...h});const[Ge,De]=hs(ke,this.o,this.zone);return qa(this,{ts:Ge,o:De})}plus(r){if(!this.isValid)return this;const h=Fe.fromDurationLike(r);return qa(this,ms(this,h))}minus(r){if(!this.isValid)return this;const h=Fe.fromDurationLike(r).negate();return qa(this,ms(this,h))}startOf(r,{useLocaleWeeks:h=!1}={}){if(!this.isValid)return this;const p={},N=Fe.normalizeUnit(r);switch(N){case"years":p.month=1;case"quarters":case"months":p.day=1;case"weeks":case"days":p.hour=0;case"hours":p.minute=0;case"minutes":p.second=0;case"seconds":p.millisecond=0;break}if(N==="weeks")if(h){const C=this.loc.getStartOfWeek(),{weekday:H}=this;H<C&&(p.weekNumber=this.weekNumber-1),p.weekday=C}else p.weekday=1;if(N==="quarters"){const C=Math.ceil(this.month/3);p.month=(C-1)*3+1}return this.set(p)}endOf(r,h){return this.isValid?this.plus({[r]:1}).startOf(r,h).minus(1):this}toFormat(r,h={}){return this.isValid?Vt.create(this.loc.redefaultToEN(h)).formatDateTimeFromString(this,r):gl}toLocaleString(r=j,h={}){return this.isValid?Vt.create(this.loc.clone(h),r).formatDateTime(this):gl}toLocaleParts(r={}){return this.isValid?Vt.create(this.loc.clone(r),r).formatDateTimeParts(this):[]}toISO({format:r="extended",suppressSeconds:h=!1,suppressMilliseconds:p=!1,includeOffset:N=!0,extendedZone:C=!1,precision:H="milliseconds"}={}){if(!this.isValid)return null;H=xl(H);const L=r==="extended";let V=Xt(this,L,H);return Ya.indexOf(H)>=3&&(V+="T"),V+=tr(this,L,h,p,N,C,H),V}toISODate({format:r="extended",precision:h="day"}={}){return this.isValid?Xt(this,r==="extended",xl(h)):null}toISOWeekDate(){return er(this,"kkkk-'W'WW-c")}toISOTime({suppressMilliseconds:r=!1,suppressSeconds:h=!1,includeOffset:p=!0,includePrefix:N=!1,extendedZone:C=!1,format:H="extended",precision:L="milliseconds"}={}){return this.isValid?(L=xl(L),(N&&Ya.indexOf(L)>=3?"T":"")+tr(this,H==="extended",h,r,p,C,L)):null}toRFC2822(){return er(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)}toHTTP(){return er(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")}toSQLDate(){return this.isValid?Xt(this,!0):null}toSQLTime({includeOffset:r=!0,includeZone:h=!1,includeOffsetSpace:p=!0}={}){let N="HH:mm:ss.SSS";return(h||r)&&(p&&(N+=" "),h?N+="z":r&&(N+="ZZ")),er(this,N,!0)}toSQL(r={}){return this.isValid?`${this.toSQLDate()} ${this.toSQLTime(r)}`:null}toString(){return this.isValid?this.toISO():gl}[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(r={}){if(!this.isValid)return{};const h={...this.c};return r.includeConfig&&(h.outputCalendar=this.outputCalendar,h.numberingSystem=this.loc.numberingSystem,h.locale=this.loc.locale),h}toJSDate(){return new Date(this.isValid?this.ts:NaN)}diff(r,h="milliseconds",p={}){if(!this.isValid||!r.isValid)return Fe.invalid("created by diffing an invalid DateTime");const N={locale:this.locale,numberingSystem:this.numberingSystem,...p},C=nl(h).map(Fe.normalizeUnit),H=r.valueOf()>this.valueOf(),L=H?this:r,V=H?r:this,de=Du(L,V,C,N);return H?de.negate():de}diffNow(r="milliseconds",h={}){return this.diff(we.now(),r,h)}until(r){return this.isValid?pt.fromDateTimes(this,r):this}hasSame(r,h,p){if(!this.isValid)return!1;const N=r.valueOf(),C=this.setZone(r.zone,{keepLocalTime:!0});return C.startOf(h,p)<=N&&N<=C.endOf(h,p)}equals(r){return this.isValid&&r.isValid&&this.valueOf()===r.valueOf()&&this.zone.equals(r.zone)&&this.loc.equals(r.loc)}toRelative(r={}){if(!this.isValid)return null;const h=r.base||we.fromObject({},{zone:this.zone}),p=r.padding?this<h?-r.padding:r.padding:0;let N=["years","months","days","hours","minutes","seconds"],C=r.unit;return Array.isArray(r.unit)&&(N=r.unit,C=void 0),zn(h,this.plus(p),{...r,numeric:"always",units:N,unit:C})}toRelativeCalendar(r={}){return this.isValid?zn(r.base||we.fromObject({},{zone:this.zone}),this,{...r,numeric:"auto",units:["years","months","days"],calendary:!0}):null}static min(...r){if(!r.every(we.isDateTime))throw new v("min requires all arguments be DateTimes");return mu(r,h=>h.valueOf(),Math.min)}static max(...r){if(!r.every(we.isDateTime))throw new v("max requires all arguments be DateTimes");return mu(r,h=>h.valueOf(),Math.max)}static fromFormatExplain(r,h,p={}){const{locale:N=null,numberingSystem:C=null}=p,H=Xe.fromOpts({locale:N,numberingSystem:C,defaultToEN:!0});return ni(H,r,h)}static fromStringExplain(r,h,p={}){return we.fromFormatExplain(r,h,p)}static buildFormatParser(r,h={}){const{locale:p=null,numberingSystem:N=null}=h,C=Xe.fromOpts({locale:p,numberingSystem:N,defaultToEN:!0});return new ai(C,r)}static fromFormatParser(r,h,p={}){if(Ce(r)||Ce(h))throw new v("fromFormatParser requires an input string and a format parser");const{locale:N=null,numberingSystem:C=null}=p,H=Xe.fromOpts({locale:N,numberingSystem:C,defaultToEN:!0});if(!H.equals(h.locale))throw new v(`fromFormatParser called with a locale of ${H}, but the format parser was created for ${h.locale}`);const{result:L,zone:V,specificOffset:de,invalidReason:pe}=h.explainFromTokens(r);return pe?we.invalid(pe):Ta(L,V,p,`format ${h.format}`,r,de)}static get DATE_SHORT(){return j}static get DATE_MED(){return T}static get DATE_MED_WITH_WEEKDAY(){return O}static get DATE_FULL(){return _}static get DATE_HUGE(){return M}static get TIME_SIMPLE(){return B}static get TIME_WITH_SECONDS(){return se}static get TIME_WITH_SHORT_OFFSET(){return Y}static get TIME_WITH_LONG_OFFSET(){return W}static get TIME_24_SIMPLE(){return K}static get TIME_24_WITH_SECONDS(){return ae}static get TIME_24_WITH_SHORT_OFFSET(){return Z}static get TIME_24_WITH_LONG_OFFSET(){return G}static get DATETIME_SHORT(){return Q}static get DATETIME_SHORT_WITH_SECONDS(){return D}static get DATETIME_MED(){return z}static get DATETIME_MED_WITH_SECONDS(){return ne}static get DATETIME_MED_WITH_WEEKDAY(){return k}static get DATETIME_FULL(){return ue}static get DATETIME_FULL_WITH_SECONDS(){return ge}static get DATETIME_HUGE(){return he}static get DATETIME_HUGE_WITH_SECONDS(){return $}}function xa(g){if(we.isDateTime(g))return g;if(g&&g.valueOf&&ha(g.valueOf()))return we.fromJSDate(g);if(g&&typeof g=="object")return we.fromObject(g);throw new v(`Unknown datetime argument: ${g}, of type ${typeof g}`)}const $a="3.7.2";return Na.DateTime=we,Na.Duration=Fe,Na.FixedOffsetZone=Nt,Na.IANAZone=Te,Na.Info=cs,Na.Interval=pt,Na.InvalidZone=na,Na.Settings=yt,Na.SystemZone=Ee,Na.VERSION=$a,Na.Zone=ie,Na}var Dg;function If(){return Dg||(Dg=1,(function(l){var f,v,w,b,y,Cf,j,Hl;Object.defineProperty(l,"__esModule",{value:!0}),l.CronDate=l.DAYS_IN_MONTH=l.DateMathOp=l.TimeUnit=void 0;const i=a2();var o;(function(_){_.Second="Second",_.Minute="Minute",_.Hour="Hour",_.Day="Day",_.Month="Month",_.Year="Year"})(o||(l.TimeUnit=o={}));var c;(function(_){_.Add="Add",_.Subtract="Subtract"})(c||(l.DateMathOp=c={})),l.DAYS_IN_MONTH=Object.freeze([31,29,31,30,31,30,31,31,30,31,30,31]);const O=class O{constructor(M,B){nt(this,j);nt(this,f);nt(this,v,null);nt(this,w,null);nt(this,b,{add:{[o.Year]:this.addYear.bind(this),[o.Month]:this.addMonth.bind(this),[o.Day]:this.addDay.bind(this),[o.Hour]:this.addHour.bind(this),[o.Minute]:this.addMinute.bind(this),[o.Second]:this.addSecond.bind(this)},subtract:{[o.Year]:this.subtractYear.bind(this),[o.Month]:this.subtractMonth.bind(this),[o.Day]:this.subtractDay.bind(this),[o.Hour]:this.subtractHour.bind(this),[o.Minute]:this.subtractMinute.bind(this),[o.Second]:this.subtractSecond.bind(this)}});const se={zone:B};if(M?M instanceof O?(Ne(this,f,ee(M,f)),Ne(this,v,ee(M,v)),Ne(this,w,ee(M,w))):M instanceof Date?Ne(this,f,i.DateTime.fromJSDate(M,se)):typeof M=="number"?Ne(this,f,i.DateTime.fromMillis(M,se)):(Ne(this,f,i.DateTime.fromISO(M,se)),ee(this,f).isValid||Ne(this,f,i.DateTime.fromRFC2822(M,se)),ee(this,f).isValid||Ne(this,f,i.DateTime.fromSQL(M,se)),ee(this,f).isValid||Ne(this,f,i.DateTime.fromFormat(M,"EEE, d MMM yyyy HH:mm:ss",se))):Ne(this,f,i.DateTime.local()),!ee(this,f).isValid)throw new Error(`CronDate: unhandled timestamp: ${M}`);B&&B!==ee(this,f).zoneName&&Ne(this,f,ee(this,f).setZone(B))}get dstStart(){return ee(this,v)}set dstStart(M){Ne(this,v,M)}get dstEnd(){return ee(this,w)}set dstEnd(M){Ne(this,w,M)}addYear(){Ne(this,f,ee(this,f).plus({years:1}))}addMonth(){Ne(this,f,ee(this,f).plus({months:1}).startOf("month"))}addDay(){Ne(this,f,ee(this,f).plus({days:1}).startOf("day"))}addHour(){Ne(this,f,ee(this,f).plus({hours:1}).startOf("hour"))}addMinute(){Ne(this,f,ee(this,f).plus({minutes:1}).startOf("minute"))}addSecond(){Ne(this,f,ee(this,f).plus({seconds:1}))}subtractYear(){Ne(this,f,ee(this,f).minus({years:1}))}subtractMonth(){Ne(this,f,ee(this,f).minus({months:1}).endOf("month").startOf("second"))}subtractDay(){Ne(this,f,ee(this,f).minus({days:1}).endOf("day").startOf("second"))}subtractHour(){Ne(this,f,ee(this,f).minus({hours:1}).endOf("hour").startOf("second"))}subtractMinute(){Ne(this,f,ee(this,f).minus({minutes:1}).endOf("minute").startOf("second"))}subtractSecond(){Ne(this,f,ee(this,f).minus({seconds:1}))}addUnit(M){ee(this,b).add[M]()}subtractUnit(M){ee(this,b).subtract[M]()}invokeDateOperation(M,B){if(M===c.Add){this.addUnit(B);return}if(M===c.Subtract){this.subtractUnit(B);return}throw new Error(`Invalid verb: ${M}`)}getDate(){return ee(this,f).day}getFullYear(){return ee(this,f).year}getDay(){const M=ee(this,f).weekday;return M===7?0:M}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(){Ne(this,f,ee(this,f).startOf("day"))}setEndOfDay(){Ne(this,f,ee(this,f).endOf("day"))}getTime(){return ee(this,f).valueOf()}getUTCDate(){return Se(this,j,Hl).call(this).day}getUTCFullYear(){return Se(this,j,Hl).call(this).year}getUTCDay(){const M=Se(this,j,Hl).call(this).weekday;return M===7?0:M}getUTCMonth(){return Se(this,j,Hl).call(this).month-1}getUTCHours(){return Se(this,j,Hl).call(this).hour}getUTCMinutes(){return Se(this,j,Hl).call(this).minute}getUTCSeconds(){return Se(this,j,Hl).call(this).second}toISOString(){return ee(this,f).toUTC().toISO()}toJSON(){return ee(this,f).toJSON()}setDate(M){Ne(this,f,ee(this,f).set({day:M}))}setFullYear(M){Ne(this,f,ee(this,f).set({year:M}))}setDay(M){Ne(this,f,ee(this,f).set({weekday:M}))}setMonth(M){Ne(this,f,ee(this,f).set({month:M+1}))}setHours(M){Ne(this,f,ee(this,f).set({hour:M}))}setMinutes(M){Ne(this,f,ee(this,f).set({minute:M}))}setSeconds(M){Ne(this,f,ee(this,f).set({second:M}))}setMilliseconds(M){Ne(this,f,ee(this,f).set({millisecond:M}))}toString(){return this.toDate().toString()}toDate(){return ee(this,f).toJSDate()}isLastDayOfMonth(){var se;const{day:M,month:B}=ee(this,f);if(B===2){const Y=Se(se=O,y,Cf).call(se,ee(this,f).year);return M===l.DAYS_IN_MONTH[B-1]-(Y?0:1)}return M===l.DAYS_IN_MONTH[B-1]}isLastWeekdayOfMonth(){var Y;const{day:M,month:B}=ee(this,f);let se;return B===2?se=l.DAYS_IN_MONTH[B-1]-(Se(Y=O,y,Cf).call(Y,ee(this,f).year)?0:1):se=l.DAYS_IN_MONTH[B-1],M>se-7}applyDateOperation(M,B,se){if(B===o.Month||B===o.Day){this.invokeDateOperation(M,B);return}const Y=this.getHours();this.invokeDateOperation(M,B);const W=this.getHours(),K=W-Y;K===2?se!==24&&(this.dstStart=W):K===0&&this.getMinutes()===0&&this.getSeconds()===0&&se!==24&&(this.dstEnd=W)}};f=new WeakMap,v=new WeakMap,w=new WeakMap,b=new WeakMap,y=new WeakSet,Cf=function(M){return M%4===0&&M%100!==0||M%400===0},j=new WeakSet,Hl=function(){return ee(this,f).toUTC()},nt(O,y);let m=O;l.CronDate=m,l.default=m})(vf)),vf}var Rg;function n2(){if(Rg)return Wi;Rg=1,Object.defineProperty(Wi,"__esModule",{value:!0}),Wi.CronMonth=void 0;const l=If(),i=As(),o=1,c=12,m=Object.freeze([]);let f=class extends i.CronField{static get min(){return o}static get max(){return c}static get chars(){return m}static get daysInMonth(){return l.DAYS_IN_MONTH}constructor(w,b){super(w,b),this.validate()}get values(){return super.values}};return Wi.CronMonth=f,Wi}var Ii={},Ag;function l2(){if(Ag)return Ii;Ag=1,Object.defineProperty(Ii,"__esModule",{value:!0}),Ii.CronSecond=void 0;const l=As(),i=0,o=59,c=Object.freeze([]);let m=class extends l.CronField{static get min(){return i}static get max(){return o}static get chars(){return c}constructor(v,w){super(v,w),this.validate()}get values(){return super.values}};return Ii.CronSecond=m,Ii}var _g;function Xf(){return _g||(_g=1,(function(l){var i=Ts&&Ts.__createBinding||(Object.create?(function(c,m,f,v){v===void 0&&(v=f);var w=Object.getOwnPropertyDescriptor(m,f);(!w||("get"in w?!m.__esModule:w.writable||w.configurable))&&(w={enumerable:!0,get:function(){return m[f]}}),Object.defineProperty(c,v,w)}):(function(c,m,f,v){v===void 0&&(v=f),c[v]=m[f]})),o=Ts&&Ts.__exportStar||function(c,m){for(var f in c)f!=="default"&&!Object.prototype.hasOwnProperty.call(m,f)&&i(m,c,f)};Object.defineProperty(l,"__esModule",{value:!0}),o(XS(),l),o(JS(),l),o(KS(),l),o(As(),l),o(e2(),l),o(t2(),l),o(n2(),l),o(l2(),l)})(Ts)),Ts}var kg;function Zy(){var o,c,m,f,v,w,b,y,Fy,Gy;if(kg)return $i;kg=1,Object.defineProperty($i,"__esModule",{value:!0}),$i.CronFieldCollection=void 0;const l=Xf();let i=(y=class{constructor({second:O,minute:_,hour:M,dayOfMonth:B,month:se,dayOfWeek:Y}){nt(this,o);nt(this,c);nt(this,m);nt(this,f);nt(this,v);nt(this,w);if(!O)throw new Error("Validation error, Field second is missing");if(!_)throw new Error("Validation error, Field minute is missing");if(!M)throw new Error("Validation error, Field hour is missing");if(!B)throw new Error("Validation error, Field dayOfMonth is missing");if(!se)throw new Error("Validation error, Field month is missing");if(!Y)throw new Error("Validation error, Field dayOfWeek is missing");if(se.values.length===1&&!B.hasLastChar&&!(parseInt(B.values[0],10)<=l.CronMonth.daysInMonth[se.values[0]-1]))throw new Error("Invalid explicit day of month definition");Ne(this,o,O),Ne(this,c,_),Ne(this,m,M),Ne(this,v,se),Ne(this,w,Y),Ne(this,f,B)}static from(O,_){return new y({second:this.resolveField(l.CronSecond,O.second,_.second),minute:this.resolveField(l.CronMinute,O.minute,_.minute),hour:this.resolveField(l.CronHour,O.hour,_.hour),dayOfMonth:this.resolveField(l.CronDayOfMonth,O.dayOfMonth,_.dayOfMonth),month:this.resolveField(l.CronMonth,O.month,_.month),dayOfWeek:this.resolveField(l.CronDayOfWeek,O.dayOfWeek,_.dayOfWeek)})}static resolveField(O,_,M){return M?M instanceof l.CronField?M:new O(M):_}get second(){return ee(this,o)}get minute(){return ee(this,c)}get hour(){return ee(this,m)}get dayOfMonth(){return ee(this,f)}get month(){return ee(this,v)}get dayOfWeek(){return ee(this,w)}static compactField(O){if(O.length===0)return[];const _=[];let M;return O.forEach((B,se,Y)=>{if(M===void 0){M={start:B,count:1};return}const W=Y[se-1]||M.start,K=Y[se+1];if(B==="L"||B==="W"){_.push(M),_.push({start:B,count:1}),M=void 0;return}if(M.step===void 0&&K!==void 0){const ae=B-W,Z=K-B;if(ae<=Z){M={...M,count:2,end:B,step:ae};return}M.step=1}B-(M.end??0)===M.step?(M.count++,M.end=B):(M.count===1?_.push({start:M.start,count:1}):M.count===2?(_.push({start:M.start,count:1}),_.push({start:M.end??W,count:1})):_.push(M),M={start:B,count:1})}),M&&_.push(M),_}stringifyField(O){var se;let _=O.max,M=O.values;if(O instanceof l.CronDayOfWeek){_=6;const Y=ee(this,w).values;M=Y[Y.length-1]===7?Y.slice(0,-1):Y}O instanceof l.CronDayOfMonth&&(_=ee(this,v).values.length===1?l.CronMonth.daysInMonth[ee(this,v).values[0]-1]:O.max);const B=y.compactField(M);if(B.length===1){const Y=Se(se=y,b,Fy).call(se,O,B[0],_);if(Y)return Y}return B.map(Y=>{var K;const W=Y.count===1?Y.start.toString():Se(K=y,b,Gy).call(K,Y,_);return O instanceof l.CronDayOfWeek&&O.nthDay>0?`${W}#${O.nthDay}`:W}).join(",")}stringify(O=!1){const _=[];return O&&_.push(this.stringifyField(ee(this,o))),_.push(this.stringifyField(ee(this,c)),this.stringifyField(ee(this,m)),this.stringifyField(ee(this,f)),this.stringifyField(ee(this,v)),this.stringifyField(ee(this,w))),_.join(" ")}serialize(){return{second:ee(this,o).serialize(),minute:ee(this,c).serialize(),hour:ee(this,m).serialize(),dayOfMonth:ee(this,f).serialize(),month:ee(this,v).serialize(),dayOfWeek:ee(this,w).serialize()}}},o=new WeakMap,c=new WeakMap,m=new WeakMap,f=new WeakMap,v=new WeakMap,w=new WeakMap,b=new WeakSet,Fy=function(O,_,M){const B=_.step;return B?B===1&&_.start===O.min&&_.end&&_.end>=M?O.hasQuestionMarkChar?"?":"*":B!==1&&_.start===O.min&&_.end&&_.end>=M-B+1?`*/${B}`:null:null},Gy=function(O,_){const M=O.step;if(M===1)return`${O.start}-${O.end}`;const B=O.start===0?O.count-1:O.count;if(!M)throw new Error("Unexpected range step");if(!O.end)throw new Error("Unexpected range end");if(M*B>O.end){const se=(W,K)=>{if(typeof O.start!="number")throw new Error("Unexpected range start");return K%M===0?O.start+K:null};if(typeof O.start!="number")throw new Error("Unexpected range start");const Y={length:O.end-O.start+1};return Array.from(Y,se).filter(W=>W!==null).join(",")}return O.end===_-M+1?`${O.start}/${M}`:`${O.start}-${O.end}/${M}`},nt(y,b),y);return $i.CronFieldCollection=i,$i}var bf={},zg;function Ky(){return zg||(zg=1,(function(l){var m,f,v,w,b,y,S,j,T,Ll,_,Cs,Py,Qy,Wy,Iy,Of,Xy,Jy,Mr;Object.defineProperty(l,"__esModule",{value:!0}),l.CronExpression=l.LOOPS_LIMIT_EXCEEDED_ERROR_MESSAGE=l.TIME_SPAN_OUT_OF_BOUNDS_ERROR_MESSAGE=void 0;const i=If();l.TIME_SPAN_OUT_OF_BOUNDS_ERROR_MESSAGE="Out of the time span range",l.LOOPS_LIMIT_EXCEEDED_ERROR_MESSAGE="Invalid expression, loop limit exceeded";const o=1e4,Q=class Q{constructor(z,ne){nt(this,_);nt(this,m);nt(this,f);nt(this,v);nt(this,w);nt(this,b);nt(this,y);nt(this,S,null);nt(this,j,!1);Ne(this,m,ne),Ne(this,f,ne.tz),Ne(this,w,ne.startDate?new i.CronDate(ne.startDate,ee(this,f)):null),Ne(this,b,ne.endDate?new i.CronDate(ne.endDate,ee(this,f)):null);let k=ne.currentDate??ne.startDate;if(k){const ue=new i.CronDate(k,ee(this,f));ee(this,w)&&ue.getTime()<ee(this,w).getTime()?k=ee(this,w):ee(this,b)&&ue.getTime()>ee(this,b).getTime()&&(k=ee(this,b))}Ne(this,v,new i.CronDate(k,ee(this,f))),Ne(this,y,z)}get fields(){return ee(this,y)}static fieldsToExpression(z,ne){return new Q(z,ne||{})}next(){return Se(this,_,Mr).call(this)}prev(){return Se(this,_,Mr).call(this,!0)}hasNext(){const z=ee(this,v);try{return Se(this,_,Mr).call(this),!0}catch{return!1}finally{Ne(this,v,z)}}hasPrev(){const z=ee(this,v);try{return Se(this,_,Mr).call(this,!0),!0}catch{return!1}finally{Ne(this,v,z)}}take(z){const ne=[];if(z>=0)for(let k=0;k<z;k++)try{ne.push(this.next())}catch{return ne}else for(let k=0;k>z;k--)try{ne.push(this.prev())}catch{return ne}return ne}reset(z){Ne(this,v,new i.CronDate(z||ee(this,m).currentDate))}stringify(z=!1){return ee(this,y).stringify(z)}includesDate(z){const{second:ne,minute:k,hour:ue,month:ge}=ee(this,y),he=new i.CronDate(z,ee(this,f));return!(!ne.values.includes(he.getSeconds())||!k.values.includes(he.getMinutes())||!ue.values.includes(he.getHours())||!ge.values.includes(he.getMonth()+1)||!Se(this,_,Of).call(this,he)||ee(this,y).dayOfWeek.nthDay>0&&Math.ceil(he.getDate()/7)!==ee(this,y).dayOfWeek.nthDay)}toString(){return ee(this,m).expression||this.stringify(!0)}[Symbol.iterator](){return{next:()=>({value:Se(this,_,Mr).call(this),done:!this.hasNext()})}}};m=new WeakMap,f=new WeakMap,v=new WeakMap,w=new WeakMap,b=new WeakMap,y=new WeakMap,S=new WeakMap,j=new WeakMap,T=new WeakSet,Ll=function(z,ne){return ne.some(k=>k===z)},_=new WeakSet,Cs=function(z,ne){return z[ne?z.length-1:0]},Py=function(z){const ne=`${z.getFullYear()}-${z.getMonth()+1}-${z.getDate()}`;if(ee(this,S)===ne)return ee(this,j);const k=new i.CronDate(z);k.setStartOfDay();const ue=new i.CronDate(z);return ue.setEndOfDay(),Ne(this,S,ne),Ne(this,j,k.getUTCOffset()!==ue.getUTCOffset()),ee(this,j)},Qy=function(z,ne,k){const ue=ee(this,y).second.values,ge=z.getSeconds(),he=ee(this,y).second.findNearestValue(ge,k);if(he!==null){z.setSeconds(he);return}z.applyDateOperation(ne,i.TimeUnit.Minute,ee(this,y).hour.values.length),z.setSeconds(Se(this,_,Cs).call(this,ue,k))},Wy=function(z,ne,k){const ue=ee(this,y).minute.values,ge=ee(this,y).second.values,he=z.getMinutes(),$=ee(this,y).minute.findNearestValue(he,k);if($!==null){z.setMinutes($),z.setSeconds(Se(this,_,Cs).call(this,ge,k));return}z.applyDateOperation(ne,i.TimeUnit.Hour,ee(this,y).hour.values.length),z.setMinutes(Se(this,_,Cs).call(this,ue,k)),z.setSeconds(Se(this,_,Cs).call(this,ge,k))},Iy=function(z,ne){const k=ne.isLastWeekdayOfMonth();return z.some(ue=>{const ge=parseInt(ue.toString().charAt(0),10)%7;if(Number.isNaN(ge))throw new Error(`Invalid last weekday of the month expression: ${ue}`);return ne.getDay()===ge&&k})},Of=function(z){var ie,ye,Ee;const ne=ee(this,y).dayOfMonth.isWildcard,k=!ne,ue=ee(this,y).dayOfWeek.isWildcard,ge=!ue,he=Se(ie=Q,T,Ll).call(ie,z.getDate(),ee(this,y).dayOfMonth.values)||ee(this,y).dayOfMonth.hasLastChar&&z.isLastDayOfMonth(),$=Se(ye=Q,T,Ll).call(ye,z.getDay(),ee(this,y).dayOfWeek.values)||ee(this,y).dayOfWeek.hasLastChar&&Se(Ee=Q,T,Iy).call(Ee,ee(this,y).dayOfWeek.values,z);return!!(k&&ge&&(he||$)||he&&!ge||ne&&!ue&&$)},Xy=function(z,ne,k){var Oe,R;const ue=ee(this,y).hour.values,ge=ue,he=z.getHours(),$=Se(Oe=Q,T,Ll).call(Oe,he,ue),ie=z.dstStart===he,ye=z.dstEnd===he;if(ie)return Se(R=Q,T,Ll).call(R,he-1,ue)?!0:(z.invokeDateOperation(ne,i.TimeUnit.Hour),!1);if(ye&&!k)return z.dstEnd=null,z.applyDateOperation(i.DateMathOp.Add,i.TimeUnit.Hour,ge.length),!1;if($)return!0;z.dstStart=null;const Ee=ee(this,y).hour.findNearestValue(he,k);if(Ee===null)return z.applyDateOperation(ne,i.TimeUnit.Day,ge.length),!1;if(Se(this,_,Py).call(this,z)){const le=k?he-Ee:Ee-he;for(let me=0;me<le;me++)z.applyDateOperation(ne,i.TimeUnit.Hour,ge.length)}else z.setHours(Ee);return z.setMinutes(Se(this,_,Cs).call(this,ee(this,y).minute.values,k)),z.setSeconds(Se(this,_,Cs).call(this,ee(this,y).second.values,k)),!1},Jy=function(z){if(!ee(this,w)&&!ee(this,b))return;const ne=z.getTime();if(ee(this,w)&&ne<ee(this,w).getTime())throw new Error(l.TIME_SPAN_OUT_OF_BOUNDS_ERROR_MESSAGE);if(ee(this,b)&&ne>ee(this,b).getTime())throw new Error(l.TIME_SPAN_OUT_OF_BOUNDS_ERROR_MESSAGE)},Mr=function(z=!1){var he,$,ie;const ne=z?i.DateMathOp.Subtract:i.DateMathOp.Add,k=new i.CronDate(ee(this,v)),ue=k.getTime();let ge=0;for(;++ge<o;){if(Se(this,_,Jy).call(this,k),!Se(this,_,Of).call(this,k)){k.applyDateOperation(ne,i.TimeUnit.Day,ee(this,y).hour.values.length);continue}if(!(ee(this,y).dayOfWeek.nthDay<=0||Math.ceil(k.getDate()/7)===ee(this,y).dayOfWeek.nthDay)){k.applyDateOperation(ne,i.TimeUnit.Day,ee(this,y).hour.values.length);continue}if(!Se(he=Q,T,Ll).call(he,k.getMonth()+1,ee(this,y).month.values)){k.applyDateOperation(ne,i.TimeUnit.Month,ee(this,y).hour.values.length);continue}if(Se(this,_,Xy).call(this,k,ne,z)){if(!Se($=Q,T,Ll).call($,k.getMinutes(),ee(this,y).minute.values)){Se(this,_,Wy).call(this,k,ne,z);continue}if(!Se(ie=Q,T,Ll).call(ie,k.getSeconds(),ee(this,y).second.values)){Se(this,_,Qy).call(this,k,ne,z);continue}if(ue===k.getTime()){(ne==="Add"||k.getMilliseconds()===0)&&k.applyDateOperation(ne,i.TimeUnit.Second,ee(this,y).hour.values.length);continue}break}}if(ge>o)throw new Error(l.LOOPS_LIMIT_EXCEEDED_ERROR_MESSAGE);return k.getMilliseconds()!==0&&k.setMilliseconds(0),Ne(this,v,k),k},nt(Q,T);let c=Q;l.CronExpression=c,l.default=c})(bf)),bf}var Uc={},Ug;function s2(){if(Ug)return Uc;Ug=1,Object.defineProperty(Uc,"__esModule",{value:!0}),Uc.seededRandom=o;function l(c){let m=2166136261;for(let f=0;f<c.length;f++)m^=c.charCodeAt(f),m=Math.imul(m,16777619);return()=>m>>>0}function i(c){return()=>{let m=c+=1831565813;return m=Math.imul(m^m>>>15,m|1),m^=m+Math.imul(m^m>>>7,m|61),((m^m>>>14)>>>0)/4294967296}}function o(c){const m=c?l(c)():Math.floor(Math.random()*1e10);return i(m)}return Uc}var Hg;function Rf(){var y,S,ex,Os,tx,ax,nx,lx,sx,rx,ix,Df,ux,cx;if(Hg)return Aa;Hg=1,Object.defineProperty(Aa,"__esModule",{value:!0}),Aa.CronExpressionParser=Aa.DayOfWeek=Aa.Months=Aa.CronUnit=Aa.PredefinedExpressions=void 0;const l=Zy(),i=Ky(),o=s2(),c=Xf();var m;(function(G){G["@yearly"]="0 0 0 1 1 *",G["@annually"]="0 0 0 1 1 *",G["@monthly"]="0 0 0 1 * *",G["@weekly"]="0 0 0 * * 0",G["@daily"]="0 0 0 * * *",G["@hourly"]="0 0 * * * *",G["@minutely"]="0 * * * * *",G["@secondly"]="* * * * * *",G["@weekdays"]="0 0 0 * * 1-5",G["@weekends"]="0 0 0 * * 0,6"})(m||(Aa.PredefinedExpressions=m={}));var f;(function(G){G.Second="Second",G.Minute="Minute",G.Hour="Hour",G.DayOfMonth="DayOfMonth",G.Month="Month",G.DayOfWeek="DayOfWeek"})(f||(Aa.CronUnit=f={}));var v;(function(G){G[G.jan=1]="jan",G[G.feb=2]="feb",G[G.mar=3]="mar",G[G.apr=4]="apr",G[G.may=5]="may",G[G.jun=6]="jun",G[G.jul=7]="jul",G[G.aug=8]="aug",G[G.sep=9]="sep",G[G.oct=10]="oct",G[G.nov=11]="nov",G[G.dec=12]="dec"})(v||(Aa.Months=v={}));var w;(function(G){G[G.sun=0]="sun",G[G.mon=1]="mon",G[G.tue=2]="tue",G[G.wed=3]="wed",G[G.thu=4]="thu",G[G.fri=5]="fri",G[G.sat=6]="sat"})(w||(Aa.DayOfWeek=w={}));let b=(S=class{static parse(Q,D={}){var me,xe,je,Te,Le,rt,Ie,ta;const{strict:z=!1,hashSeed:ne}=D,k=(0,o.seededRandom)(ne);Q=m[Q]||Q;const ue=Se(me=S,y,ex).call(me,Q,z);if(!(ue.dayOfMonth==="*"||ue.dayOfWeek==="*"||!z))throw new Error("Cannot use both dayOfMonth and dayOfWeek together in strict mode!");const ge=Se(xe=S,y,Os).call(xe,f.Second,ue.second,c.CronSecond.constraints,k),he=Se(je=S,y,Os).call(je,f.Minute,ue.minute,c.CronMinute.constraints,k),$=Se(Te=S,y,Os).call(Te,f.Hour,ue.hour,c.CronHour.constraints,k),ie=Se(Le=S,y,Os).call(Le,f.Month,ue.month,c.CronMonth.constraints,k),ye=Se(rt=S,y,Os).call(rt,f.DayOfMonth,ue.dayOfMonth,c.CronDayOfMonth.constraints,k),{dayOfWeek:Ee,nthDayOfWeek:Oe}=Se(Ie=S,y,ux).call(Ie,ue.dayOfWeek),R=Se(ta=S,y,Os).call(ta,f.DayOfWeek,Ee,c.CronDayOfWeek.constraints,k),le=new l.CronFieldCollection({second:new c.CronSecond(ge,{rawValue:ue.second}),minute:new c.CronMinute(he,{rawValue:ue.minute}),hour:new c.CronHour($,{rawValue:ue.hour}),dayOfMonth:new c.CronDayOfMonth(ye,{rawValue:ue.dayOfMonth}),month:new c.CronMonth(ie,{rawValue:ue.month}),dayOfWeek:new c.CronDayOfWeek(R,{rawValue:ue.dayOfWeek,nthDayOfWeek:Oe})});return new i.CronExpression(le,{...D,expression:Q})}},y=new WeakSet,ex=function(Q,D){if(D&&!Q.length)throw new Error("Invalid cron expression");Q=Q||"0 * * * * *";const z=Q.trim().split(/\s+/);if(D&&z.length<6)throw new Error("Invalid cron expression, expected 6 fields");if(z.length>6)throw new Error("Invalid cron expression, too many fields");const ne=["*","*","*","*","*","0"];z.length<ne.length&&z.unshift(...ne.slice(z.length));const[k,ue,ge,he,$,ie]=z;return{second:k,minute:ue,hour:ge,dayOfMonth:he,month:$,dayOfWeek:ie}},Os=function(Q,D,z,ne){if((Q===f.Month||Q===f.DayOfWeek)&&(D=D.replace(/[a-z]{3}/gi,k=>{k=k.toLowerCase();const ue=v[k]||w[k];if(ue===void 0)throw new Error(`Validation error, cannot resolve alias "${k}"`);return ue.toString()})),!z.validChars.test(D))throw new Error(`Invalid characters, got value: ${D}`);return D=Se(this,y,tx).call(this,D,z),D=Se(this,y,ax).call(this,D,z,ne),Se(this,y,nx).call(this,Q,D,z)},tx=function(Q,D){return Q.replace(/[*?]/g,D.min+"-"+D.max)},ax=function(Q,D,z){const ne=z();return Q.replace(/H(?:\((\d+)-(\d+)\))?(?:\/(\d+))?/g,(k,ue,ge,he)=>{if(ue&&ge&&he){const $=parseInt(ue,10),ie=parseInt(ge,10),ye=parseInt(he,10);if($>ie)throw new Error(`Invalid range: ${$}-${ie}, min > max`);if(ye<=0)throw new Error(`Invalid step: ${ye}, must be positive`);const Ee=Math.max($,D.min),Oe=Math.floor(ne*ye),R=[];for(let le=Math.floor(Ee/ye)*ye+Oe;le<=ie;le+=ye)le>=Ee&&R.push(le);return R.join(",")}else if(ue&&ge){const $=parseInt(ue,10),ie=parseInt(ge,10);if($>ie)throw new Error(`Invalid range: ${$}-${ie}, min > max`);return String(Math.floor(ne*(ie-$+1))+$)}else if(he){const $=parseInt(he,10);if($<=0)throw new Error(`Invalid step: ${$}, must be positive`);const ie=Math.floor(ne*$),ye=[];for(let Ee=Math.floor(D.min/$)*$+ie;Ee<=D.max;Ee+=$)Ee>=D.min&&ye.push(Ee);return ye.join(",")}else return String(Math.floor(ne*(D.max-D.min+1)+D.min))})},nx=function(Q,D,z){const ne=[];function k(ge,he){var $;if(Array.isArray(ge))ne.push(...ge);else if(Se($=S,y,cx).call($,he,ge))ne.push(ge);else{const ie=parseInt(ge.toString(),10);if(!(ie>=he.min&&ie<=he.max))throw new Error(`Constraint error, got value ${ge} expected range ${he.min}-${he.max}`);ne.push(Q===f.DayOfWeek?ie%7:ge)}}return D.split(",").forEach(ge=>{var he;if(!(ge.length>0))throw new Error("Invalid list value format");k(Se(he=S,y,lx).call(he,Q,ge,z),z)}),ne},lx=function(Q,D,z){var k,ue;const ne=D.split("/");if(ne.length>2)throw new Error(`Invalid repeat: ${D}`);return ne.length===2?(isNaN(parseInt(ne[0],10))||(ne[0]=`${ne[0]}-${z.max}`),Se(k=S,y,Df).call(k,Q,ne[0],parseInt(ne[1],10),z)):Se(ue=S,y,Df).call(ue,Q,D,1,z)},sx=function(Q,D,z){if(!(!isNaN(Q)&&!isNaN(D)&&Q>=z.min&&D<=z.max))throw new Error(`Constraint error, got range ${Q}-${D} expected range ${z.min}-${z.max}`);if(Q>D)throw new Error(`Invalid range: ${Q}-${D}, min(${Q}) > max(${D})`)},rx=function(Q){if(!(!isNaN(Q)&&Q>0))throw new Error(`Constraint error, cannot repeat at every ${Q} time.`)},ix=function(Q,D,z,ne){const k=[];Q===f.DayOfWeek&&z%7===0&&k.push(0);for(let ue=D;ue<=z;ue+=ne)k.indexOf(ue)===-1&&k.push(ue);return k},Df=function(Q,D,z,ne){const k=D.split("-");if(k.length<=1)return isNaN(+D)?D:+D;const[ue,ge]=k.map(he=>parseInt(he,10));return Se(this,y,sx).call(this,ue,ge,ne),Se(this,y,rx).call(this,z),Se(this,y,ix).call(this,Q,ue,ge,z)},ux=function(Q){const D=Q.split("#");if(D.length<=1)return{dayOfWeek:D[0]};const z=+D[D.length-1],ne=Q.match(/([,-/])/);if(ne!==null)throw new Error(`Constraint error, invalid dayOfWeek \`#\` and \`${ne==null?void 0:ne[0]}\` special characters are incompatible`);if(!(D.length<=2&&!isNaN(z)&&z>=1&&z<=5))throw new Error("Constraint error, invalid dayOfWeek occurrence number (#)");return{dayOfWeek:D[0],nthDayOfWeek:z}},cx=function(Q,D){return Q.chars.some(z=>D.toString().includes(z))},nt(S,y),S);return Aa.CronExpressionParser=b,Aa}var on={};const r2={},i2=Object.freeze(Object.defineProperty({__proto__:null,default:r2},Symbol.toStringTag,{value:"Module"})),Lg=Lp(i2);var qg;function u2(){var f,v,Af,ox;if(qg)return on;qg=1;var l=on&&on.__createBinding||(Object.create?(function(y,S,j,T){T===void 0&&(T=j);var O=Object.getOwnPropertyDescriptor(S,j);(!O||("get"in O?!S.__esModule:O.writable||O.configurable))&&(O={enumerable:!0,get:function(){return S[j]}}),Object.defineProperty(y,T,O)}):(function(y,S,j,T){T===void 0&&(T=j),y[T]=S[j]})),i=on&&on.__setModuleDefault||(Object.create?(function(y,S){Object.defineProperty(y,"default",{enumerable:!0,value:S})}):function(y,S){y.default=S}),o=on&&on.__importStar||(function(){var y=function(S){return y=Object.getOwnPropertyNames||function(j){var T=[];for(var O in j)Object.prototype.hasOwnProperty.call(j,O)&&(T[T.length]=O);return T},y(S)};return function(S){if(S&&S.__esModule)return S;var j={};if(S!=null)for(var T=y(S),O=0;O<T.length;O++)T[O]!=="default"&&l(j,S,T[O]);return i(j,S),j}})();Object.defineProperty(on,"__esModule",{value:!0}),on.CronFileParser=void 0;const c=Rf();let m=(v=class{static async parseFile(S){var O;const{readFile:j}=await Promise.resolve().then(()=>o(Lg)),T=await j(S,"utf8");return Se(O=v,f,Af).call(O,T)}static parseFileSync(S){var O;const{readFileSync:j}=Lg,T=j(S,"utf8");return Se(O=v,f,Af).call(O,T)}},f=new WeakSet,Af=function(S){var O;const j=S.split(`
|
|
381
|
+
`),T={variables:{},expressions:[],errors:{}};for(const _ of j){const M=_.trim();if(M.length===0||M.startsWith("#"))continue;const B=M.match(/^(.*)=(.*)$/);if(B){const[,se,Y]=B;T.variables[se]=Y.replace(/["']/g,"");continue}try{const se=Se(O=v,f,ox).call(O,M);T.expressions.push(se.interval)}catch(se){T.errors[M]=se}}return T},ox=function(S){const j=S.split(" ");return{interval:c.CronExpressionParser.parse(j.slice(0,5).join(" ")),command:j.slice(5,j.length)}},nt(v,f),v);return on.CronFileParser=m,on}var Vg;function c2(){return Vg||(Vg=1,(function(l){var i=Es&&Es.__createBinding||(Object.create?(function(y,S,j,T){T===void 0&&(T=j);var O=Object.getOwnPropertyDescriptor(S,j);(!O||("get"in O?!S.__esModule:O.writable||O.configurable))&&(O={enumerable:!0,get:function(){return S[j]}}),Object.defineProperty(y,T,O)}):(function(y,S,j,T){T===void 0&&(T=j),y[T]=S[j]})),o=Es&&Es.__exportStar||function(y,S){for(var j in y)j!=="default"&&!Object.prototype.hasOwnProperty.call(S,j)&&i(S,y,j)};Object.defineProperty(l,"__esModule",{value:!0}),l.CronFileParser=l.CronExpressionParser=l.CronExpression=l.CronFieldCollection=l.CronDate=void 0;const c=Rf();var m=If();Object.defineProperty(l,"CronDate",{enumerable:!0,get:function(){return m.CronDate}});var f=Zy();Object.defineProperty(l,"CronFieldCollection",{enumerable:!0,get:function(){return f.CronFieldCollection}});var v=Ky();Object.defineProperty(l,"CronExpression",{enumerable:!0,get:function(){return v.CronExpression}});var w=Rf();Object.defineProperty(l,"CronExpressionParser",{enumerable:!0,get:function(){return w.CronExpressionParser}});var b=u2();Object.defineProperty(l,"CronFileParser",{enumerable:!0,get:function(){return b.CronFileParser}}),o(Xf(),l),l.default=c.CronExpressionParser})(Es)),Es}var o2=c2();const dx=6048e5,d2=864e5,f2=6e4,h2=36e5,Bg=Symbol.for("constructDateFrom");function ka(l,i){return typeof l=="function"?l(i):l&&typeof l=="object"&&Bg in l?l[Bg](i):l instanceof Date?new l.constructor(i):new Date(i)}function At(l,i){return ka(i||l,l)}function m2(l,i,o){return ka(l,+At(l)+i)}function Hc(l,i,o){return m2(l,i*h2)}let g2={};function Kc(){return g2}function nu(l,i){var w,b,y,S;const o=Kc(),c=(i==null?void 0:i.weekStartsOn)??((b=(w=i==null?void 0:i.locale)==null?void 0:w.options)==null?void 0:b.weekStartsOn)??o.weekStartsOn??((S=(y=o.locale)==null?void 0:y.options)==null?void 0:S.weekStartsOn)??0,m=At(l,i==null?void 0:i.in),f=m.getDay(),v=(f<c?7:0)+f-c;return m.setDate(m.getDate()-v),m.setHours(0,0,0,0),m}function Pc(l,i){return nu(l,{...i,weekStartsOn:1})}function fx(l,i){const o=At(l,i==null?void 0:i.in),c=o.getFullYear(),m=ka(o,0);m.setFullYear(c+1,0,4),m.setHours(0,0,0,0);const f=Pc(m),v=ka(o,0);v.setFullYear(c,0,4),v.setHours(0,0,0,0);const w=Pc(v);return o.getTime()>=f.getTime()?c+1:o.getTime()>=w.getTime()?c:c-1}function Yg(l){const i=At(l),o=new Date(Date.UTC(i.getFullYear(),i.getMonth(),i.getDate(),i.getHours(),i.getMinutes(),i.getSeconds(),i.getMilliseconds()));return o.setUTCFullYear(i.getFullYear()),+l-+o}function y2(l,...i){const o=ka.bind(null,i.find(c=>typeof c=="object"));return i.map(o)}function $g(l,i){const o=At(l,i==null?void 0:i.in);return o.setHours(0,0,0,0),o}function x2(l,i,o){const[c,m]=y2(o==null?void 0:o.in,l,i),f=$g(c),v=$g(m),w=+f-Yg(f),b=+v-Yg(v);return Math.round((w-b)/d2)}function p2(l,i){const o=fx(l,i),c=ka(l,0);return c.setFullYear(o,0,4),c.setHours(0,0,0,0),Pc(c)}function v2(l,i){let o,c=i==null?void 0:i.in;return l.forEach(m=>{!c&&typeof m=="object"&&(c=ka.bind(null,m));const f=At(m,c);(!o||o<f||isNaN(+f))&&(o=f)}),ka(c,o||NaN)}function b2(l,i){let o,c=i==null?void 0:i.in;return l.forEach(m=>{!c&&typeof m=="object"&&(c=ka.bind(null,m));const f=At(m,c);(!o||o>f||isNaN(+f))&&(o=f)}),ka(c,o||NaN)}function S2(l){return l instanceof Date||typeof l=="object"&&Object.prototype.toString.call(l)==="[object Date]"}function w2(l){return!(!S2(l)&&typeof l!="number"||isNaN(+At(l)))}function N2(l){return i=>{const c=(l?Math[l]:Math.trunc)(i);return c===0?0:c}}function j2(l,i){return+At(l)-+At(i)}function Fg(l,i,o){const c=j2(l,i)/f2;return N2(o==null?void 0:o.roundingMethod)(c)}function E2(l,i){const o=At(l,i==null?void 0:i.in);return o.setFullYear(o.getFullYear(),0,1),o.setHours(0,0,0,0),o}const T2={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"}},M2=(l,i,o)=>{let c;const m=T2[l];return typeof m=="string"?c=m:i===1?c=m.one:c=m.other.replace("{{count}}",i.toString()),o!=null&&o.addSuffix?o.comparison&&o.comparison>0?"in "+c:c+" ago":c};function Sf(l){return(i={})=>{const o=i.width?String(i.width):l.defaultWidth;return l.formats[o]||l.formats[l.defaultWidth]}}const C2={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},O2={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},D2={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},R2={date:Sf({formats:C2,defaultWidth:"full"}),time:Sf({formats:O2,defaultWidth:"full"}),dateTime:Sf({formats:D2,defaultWidth:"full"})},A2={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},_2=(l,i,o,c)=>A2[l];function Xi(l){return(i,o)=>{const c=o!=null&&o.context?String(o.context):"standalone";let m;if(c==="formatting"&&l.formattingValues){const v=l.defaultFormattingWidth||l.defaultWidth,w=o!=null&&o.width?String(o.width):v;m=l.formattingValues[w]||l.formattingValues[v]}else{const v=l.defaultWidth,w=o!=null&&o.width?String(o.width):l.defaultWidth;m=l.values[w]||l.values[v]}const f=l.argumentCallback?l.argumentCallback(i):i;return m[f]}}const k2={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},z2={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},U2={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"]},H2={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"]},L2={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"}},q2={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"}},V2=(l,i)=>{const o=Number(l),c=o%100;if(c>20||c<10)switch(c%10){case 1:return o+"st";case 2:return o+"nd";case 3:return o+"rd"}return o+"th"},B2={ordinalNumber:V2,era:Xi({values:k2,defaultWidth:"wide"}),quarter:Xi({values:z2,defaultWidth:"wide",argumentCallback:l=>l-1}),month:Xi({values:U2,defaultWidth:"wide"}),day:Xi({values:H2,defaultWidth:"wide"}),dayPeriod:Xi({values:L2,defaultWidth:"wide",formattingValues:q2,defaultFormattingWidth:"wide"})};function Ji(l){return(i,o={})=>{const c=o.width,m=c&&l.matchPatterns[c]||l.matchPatterns[l.defaultMatchWidth],f=i.match(m);if(!f)return null;const v=f[0],w=c&&l.parsePatterns[c]||l.parsePatterns[l.defaultParseWidth],b=Array.isArray(w)?$2(w,j=>j.test(v)):Y2(w,j=>j.test(v));let y;y=l.valueCallback?l.valueCallback(b):b,y=o.valueCallback?o.valueCallback(y):y;const S=i.slice(v.length);return{value:y,rest:S}}}function Y2(l,i){for(const o in l)if(Object.prototype.hasOwnProperty.call(l,o)&&i(l[o]))return o}function $2(l,i){for(let o=0;o<l.length;o++)if(i(l[o]))return o}function F2(l){return(i,o={})=>{const c=i.match(l.matchPattern);if(!c)return null;const m=c[0],f=i.match(l.parsePattern);if(!f)return null;let v=l.valueCallback?l.valueCallback(f[0]):f[0];v=o.valueCallback?o.valueCallback(v):v;const w=i.slice(m.length);return{value:v,rest:w}}}const G2=/^(\d+)(th|st|nd|rd)?/i,Z2=/\d+/i,P2={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},Q2={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]},X2={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},J2={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]},K2={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},ew={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]},tw={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},aw={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}},nw={ordinalNumber:F2({matchPattern:G2,parsePattern:Z2,valueCallback:l=>parseInt(l,10)}),era:Ji({matchPatterns:P2,defaultMatchWidth:"wide",parsePatterns:Q2,defaultParseWidth:"any"}),quarter:Ji({matchPatterns:W2,defaultMatchWidth:"wide",parsePatterns:I2,defaultParseWidth:"any",valueCallback:l=>l+1}),month:Ji({matchPatterns:X2,defaultMatchWidth:"wide",parsePatterns:J2,defaultParseWidth:"any"}),day:Ji({matchPatterns:K2,defaultMatchWidth:"wide",parsePatterns:ew,defaultParseWidth:"any"}),dayPeriod:Ji({matchPatterns:tw,defaultMatchWidth:"any",parsePatterns:aw,defaultParseWidth:"any"})},lw={code:"en-US",formatDistance:M2,formatLong:R2,formatRelative:_2,localize:B2,match:nw,options:{weekStartsOn:0,firstWeekContainsDate:1}};function sw(l,i){const o=At(l,i==null?void 0:i.in);return x2(o,E2(o))+1}function rw(l,i){const o=At(l,i==null?void 0:i.in),c=+Pc(o)-+p2(o);return Math.round(c/dx)+1}function hx(l,i){var S,j,T,O;const o=At(l,i==null?void 0:i.in),c=o.getFullYear(),m=Kc(),f=(i==null?void 0:i.firstWeekContainsDate)??((j=(S=i==null?void 0:i.locale)==null?void 0:S.options)==null?void 0:j.firstWeekContainsDate)??m.firstWeekContainsDate??((O=(T=m.locale)==null?void 0:T.options)==null?void 0:O.firstWeekContainsDate)??1,v=ka((i==null?void 0:i.in)||l,0);v.setFullYear(c+1,0,f),v.setHours(0,0,0,0);const w=nu(v,i),b=ka((i==null?void 0:i.in)||l,0);b.setFullYear(c,0,f),b.setHours(0,0,0,0);const y=nu(b,i);return+o>=+w?c+1:+o>=+y?c:c-1}function iw(l,i){var w,b,y,S;const o=Kc(),c=(i==null?void 0:i.firstWeekContainsDate)??((b=(w=i==null?void 0:i.locale)==null?void 0:w.options)==null?void 0:b.firstWeekContainsDate)??o.firstWeekContainsDate??((S=(y=o.locale)==null?void 0:y.options)==null?void 0:S.firstWeekContainsDate)??1,m=hx(l,i),f=ka((i==null?void 0:i.in)||l,0);return f.setFullYear(m,0,c),f.setHours(0,0,0,0),nu(f,i)}function uw(l,i){const o=At(l,i==null?void 0:i.in),c=+nu(o,i)-+iw(o,i);return Math.round(c/dx)+1}function ct(l,i){const o=l<0?"-":"",c=Math.abs(l).toString().padStart(i,"0");return o+c}const Ul={y(l,i){const o=l.getFullYear(),c=o>0?o:1-o;return ct(i==="yy"?c%100:c,i.length)},M(l,i){const o=l.getMonth();return i==="M"?String(o+1):ct(o+1,2)},d(l,i){return ct(l.getDate(),i.length)},a(l,i){const o=l.getHours()/12>=1?"pm":"am";switch(i){case"a":case"aa":return o.toUpperCase();case"aaa":return o;case"aaaaa":return o[0];case"aaaa":default:return o==="am"?"a.m.":"p.m."}},h(l,i){return ct(l.getHours()%12||12,i.length)},H(l,i){return ct(l.getHours(),i.length)},m(l,i){return ct(l.getMinutes(),i.length)},s(l,i){return ct(l.getSeconds(),i.length)},S(l,i){const o=i.length,c=l.getMilliseconds(),m=Math.trunc(c*Math.pow(10,o-3));return ct(m,i.length)}},Er={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Gg={G:function(l,i,o){const c=l.getFullYear()>0?1:0;switch(i){case"G":case"GG":case"GGG":return o.era(c,{width:"abbreviated"});case"GGGGG":return o.era(c,{width:"narrow"});case"GGGG":default:return o.era(c,{width:"wide"})}},y:function(l,i,o){if(i==="yo"){const c=l.getFullYear(),m=c>0?c:1-c;return o.ordinalNumber(m,{unit:"year"})}return Ul.y(l,i)},Y:function(l,i,o,c){const m=hx(l,c),f=m>0?m:1-m;if(i==="YY"){const v=f%100;return ct(v,2)}return i==="Yo"?o.ordinalNumber(f,{unit:"year"}):ct(f,i.length)},R:function(l,i){const o=fx(l);return ct(o,i.length)},u:function(l,i){const o=l.getFullYear();return ct(o,i.length)},Q:function(l,i,o){const c=Math.ceil((l.getMonth()+1)/3);switch(i){case"Q":return String(c);case"QQ":return ct(c,2);case"Qo":return o.ordinalNumber(c,{unit:"quarter"});case"QQQ":return o.quarter(c,{width:"abbreviated",context:"formatting"});case"QQQQQ":return o.quarter(c,{width:"narrow",context:"formatting"});case"QQQQ":default:return o.quarter(c,{width:"wide",context:"formatting"})}},q:function(l,i,o){const c=Math.ceil((l.getMonth()+1)/3);switch(i){case"q":return String(c);case"qq":return ct(c,2);case"qo":return o.ordinalNumber(c,{unit:"quarter"});case"qqq":return o.quarter(c,{width:"abbreviated",context:"standalone"});case"qqqqq":return o.quarter(c,{width:"narrow",context:"standalone"});case"qqqq":default:return o.quarter(c,{width:"wide",context:"standalone"})}},M:function(l,i,o){const c=l.getMonth();switch(i){case"M":case"MM":return Ul.M(l,i);case"Mo":return o.ordinalNumber(c+1,{unit:"month"});case"MMM":return o.month(c,{width:"abbreviated",context:"formatting"});case"MMMMM":return o.month(c,{width:"narrow",context:"formatting"});case"MMMM":default:return o.month(c,{width:"wide",context:"formatting"})}},L:function(l,i,o){const c=l.getMonth();switch(i){case"L":return String(c+1);case"LL":return ct(c+1,2);case"Lo":return o.ordinalNumber(c+1,{unit:"month"});case"LLL":return o.month(c,{width:"abbreviated",context:"standalone"});case"LLLLL":return o.month(c,{width:"narrow",context:"standalone"});case"LLLL":default:return o.month(c,{width:"wide",context:"standalone"})}},w:function(l,i,o,c){const m=uw(l,c);return i==="wo"?o.ordinalNumber(m,{unit:"week"}):ct(m,i.length)},I:function(l,i,o){const c=rw(l);return i==="Io"?o.ordinalNumber(c,{unit:"week"}):ct(c,i.length)},d:function(l,i,o){return i==="do"?o.ordinalNumber(l.getDate(),{unit:"date"}):Ul.d(l,i)},D:function(l,i,o){const c=sw(l);return i==="Do"?o.ordinalNumber(c,{unit:"dayOfYear"}):ct(c,i.length)},E:function(l,i,o){const c=l.getDay();switch(i){case"E":case"EE":case"EEE":return o.day(c,{width:"abbreviated",context:"formatting"});case"EEEEE":return o.day(c,{width:"narrow",context:"formatting"});case"EEEEEE":return o.day(c,{width:"short",context:"formatting"});case"EEEE":default:return o.day(c,{width:"wide",context:"formatting"})}},e:function(l,i,o,c){const m=l.getDay(),f=(m-c.weekStartsOn+8)%7||7;switch(i){case"e":return String(f);case"ee":return ct(f,2);case"eo":return o.ordinalNumber(f,{unit:"day"});case"eee":return o.day(m,{width:"abbreviated",context:"formatting"});case"eeeee":return o.day(m,{width:"narrow",context:"formatting"});case"eeeeee":return o.day(m,{width:"short",context:"formatting"});case"eeee":default:return o.day(m,{width:"wide",context:"formatting"})}},c:function(l,i,o,c){const m=l.getDay(),f=(m-c.weekStartsOn+8)%7||7;switch(i){case"c":return String(f);case"cc":return ct(f,i.length);case"co":return o.ordinalNumber(f,{unit:"day"});case"ccc":return o.day(m,{width:"abbreviated",context:"standalone"});case"ccccc":return o.day(m,{width:"narrow",context:"standalone"});case"cccccc":return o.day(m,{width:"short",context:"standalone"});case"cccc":default:return o.day(m,{width:"wide",context:"standalone"})}},i:function(l,i,o){const c=l.getDay(),m=c===0?7:c;switch(i){case"i":return String(m);case"ii":return ct(m,i.length);case"io":return o.ordinalNumber(m,{unit:"day"});case"iii":return o.day(c,{width:"abbreviated",context:"formatting"});case"iiiii":return o.day(c,{width:"narrow",context:"formatting"});case"iiiiii":return o.day(c,{width:"short",context:"formatting"});case"iiii":default:return o.day(c,{width:"wide",context:"formatting"})}},a:function(l,i,o){const m=l.getHours()/12>=1?"pm":"am";switch(i){case"a":case"aa":return o.dayPeriod(m,{width:"abbreviated",context:"formatting"});case"aaa":return o.dayPeriod(m,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return o.dayPeriod(m,{width:"narrow",context:"formatting"});case"aaaa":default:return o.dayPeriod(m,{width:"wide",context:"formatting"})}},b:function(l,i,o){const c=l.getHours();let m;switch(c===12?m=Er.noon:c===0?m=Er.midnight:m=c/12>=1?"pm":"am",i){case"b":case"bb":return o.dayPeriod(m,{width:"abbreviated",context:"formatting"});case"bbb":return o.dayPeriod(m,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return o.dayPeriod(m,{width:"narrow",context:"formatting"});case"bbbb":default:return o.dayPeriod(m,{width:"wide",context:"formatting"})}},B:function(l,i,o){const c=l.getHours();let m;switch(c>=17?m=Er.evening:c>=12?m=Er.afternoon:c>=4?m=Er.morning:m=Er.night,i){case"B":case"BB":case"BBB":return o.dayPeriod(m,{width:"abbreviated",context:"formatting"});case"BBBBB":return o.dayPeriod(m,{width:"narrow",context:"formatting"});case"BBBB":default:return o.dayPeriod(m,{width:"wide",context:"formatting"})}},h:function(l,i,o){if(i==="ho"){let c=l.getHours()%12;return c===0&&(c=12),o.ordinalNumber(c,{unit:"hour"})}return Ul.h(l,i)},H:function(l,i,o){return i==="Ho"?o.ordinalNumber(l.getHours(),{unit:"hour"}):Ul.H(l,i)},K:function(l,i,o){const c=l.getHours()%12;return i==="Ko"?o.ordinalNumber(c,{unit:"hour"}):ct(c,i.length)},k:function(l,i,o){let c=l.getHours();return c===0&&(c=24),i==="ko"?o.ordinalNumber(c,{unit:"hour"}):ct(c,i.length)},m:function(l,i,o){return i==="mo"?o.ordinalNumber(l.getMinutes(),{unit:"minute"}):Ul.m(l,i)},s:function(l,i,o){return i==="so"?o.ordinalNumber(l.getSeconds(),{unit:"second"}):Ul.s(l,i)},S:function(l,i){return Ul.S(l,i)},X:function(l,i,o){const c=l.getTimezoneOffset();if(c===0)return"Z";switch(i){case"X":return Pg(c);case"XXXX":case"XX":return Ds(c);case"XXXXX":case"XXX":default:return Ds(c,":")}},x:function(l,i,o){const c=l.getTimezoneOffset();switch(i){case"x":return Pg(c);case"xxxx":case"xx":return Ds(c);case"xxxxx":case"xxx":default:return Ds(c,":")}},O:function(l,i,o){const c=l.getTimezoneOffset();switch(i){case"O":case"OO":case"OOO":return"GMT"+Zg(c,":");case"OOOO":default:return"GMT"+Ds(c,":")}},z:function(l,i,o){const c=l.getTimezoneOffset();switch(i){case"z":case"zz":case"zzz":return"GMT"+Zg(c,":");case"zzzz":default:return"GMT"+Ds(c,":")}},t:function(l,i,o){const c=Math.trunc(+l/1e3);return ct(c,i.length)},T:function(l,i,o){return ct(+l,i.length)}};function Zg(l,i=""){const o=l>0?"-":"+",c=Math.abs(l),m=Math.trunc(c/60),f=c%60;return f===0?o+String(m):o+String(m)+i+ct(f,2)}function Pg(l,i){return l%60===0?(l>0?"-":"+")+ct(Math.abs(l)/60,2):Ds(l,i)}function Ds(l,i=""){const o=l>0?"-":"+",c=Math.abs(l),m=ct(Math.trunc(c/60),2),f=ct(c%60,2);return o+m+i+f}const Qg=(l,i)=>{switch(l){case"P":return i.date({width:"short"});case"PP":return i.date({width:"medium"});case"PPP":return i.date({width:"long"});case"PPPP":default:return i.date({width:"full"})}},mx=(l,i)=>{switch(l){case"p":return i.time({width:"short"});case"pp":return i.time({width:"medium"});case"ppp":return i.time({width:"long"});case"pppp":default:return i.time({width:"full"})}},cw=(l,i)=>{const o=l.match(/(P+)(p+)?/)||[],c=o[1],m=o[2];if(!m)return Qg(l,i);let f;switch(c){case"P":f=i.dateTime({width:"short"});break;case"PP":f=i.dateTime({width:"medium"});break;case"PPP":f=i.dateTime({width:"long"});break;case"PPPP":default:f=i.dateTime({width:"full"});break}return f.replace("{{date}}",Qg(c,i)).replace("{{time}}",mx(m,i))},ow={p:mx,P:cw},dw=/^D+$/,fw=/^Y+$/,hw=["D","DD","YY","YYYY"];function mw(l){return dw.test(l)}function gw(l){return fw.test(l)}function yw(l,i,o){const c=xw(l,i,o);if(console.warn(c),hw.includes(l))throw new RangeError(c)}function xw(l,i,o){const c=l[0]==="Y"?"years":"days of the month";return`Use \`${l.toLowerCase()}\` instead of \`${l}\` (in \`${i}\`) for formatting ${c} to the input \`${o}\`; 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,bw=/^'([^]*?)'?$/,Sw=/''/g,ww=/[a-zA-Z]/;function Ms(l,i,o){var S,j,T,O;const c=Kc(),m=c.locale??lw,f=c.firstWeekContainsDate??((j=(S=c.locale)==null?void 0:S.options)==null?void 0:j.firstWeekContainsDate)??1,v=c.weekStartsOn??((O=(T=c.locale)==null?void 0:T.options)==null?void 0:O.weekStartsOn)??0,w=At(l,o==null?void 0:o.in);if(!w2(w))throw new RangeError("Invalid time value");let b=i.match(vw).map(_=>{const M=_[0];if(M==="p"||M==="P"){const B=ow[M];return B(_,m.formatLong)}return _}).join("").match(pw).map(_=>{if(_==="''")return{isToken:!1,value:"'"};const M=_[0];if(M==="'")return{isToken:!1,value:Nw(_)};if(Gg[M])return{isToken:!0,value:_};if(M.match(ww))throw new RangeError("Format string contains an unescaped latin alphabet character `"+M+"`");return{isToken:!1,value:_}});m.localize.preprocessor&&(b=m.localize.preprocessor(w,b));const y={firstWeekContainsDate:f,weekStartsOn:v,locale:m};return b.map(_=>{if(!_.isToken)return _.value;const M=_.value;(gw(M)||mw(M))&&yw(M,i,String(l));const B=Gg[M[0]];return B(w,M,m.localize,y)}).join("")}function Nw(l){const i=l.match(bw);return i?i[1].replace(Sw,"'"):l}function jw(l,i){return+At(l)>+At(i)}function Ew(l,i){return+At(l)<+At(i)}function Tw(l,i){const o=At(l,i==null?void 0:i.in);return o.setMinutes(0,0,0),o}const wf=Oy,Lc=[{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"}],Wn=160,qc=14,Mw=10,Cw=7,Wg=4,gx=({configs:l,currentProjectId:i,onEditJob:o,queueStatus:c,queueAnalytics:m})=>{const f=U.useMemo(()=>Tw(new Date),[]),v=U.useMemo(()=>Hc(f,24),[f]),w=U.useMemo(()=>Hc(f,-24),[f]),b=v,y=U.useMemo(()=>{const K=[];for(let ae=0;ae<=24;ae++)K.push(Hc(f,ae));return K},[f]),S=U.useMemo(()=>{const K=[];return l.forEach(({projectId:ae,config:Z})=>{var D,z;const G={executor:Z.executorEnabled!==!1?Z.cronSchedule:null,reviewer:Z.reviewerEnabled?Z.reviewerSchedule:null,qa:Z.qa.enabled?Z.qa.schedule:null,audit:Z.audit.enabled?Z.audit.schedule:null,slicer:Z.roadmapScanner.enabled?Z.roadmapScanner.slicerSchedule:null,analytics:(D=Z.analytics)!=null&&D.enabled?(z=Z.analytics)==null?void 0:z.schedule:null},Q=Z.cronScheduleOffset||0;Object.entries(G).forEach(([ne,k])=>{if(k)try{const ue=o2.CronExpressionParser.parse(k,{currentDate:f,endDate:v});for(;ue.hasNext();){const ge=ue.next(),he=new Date(ge.getTime());he.setMinutes(he.getMinutes()+Q),jw(he,f)&&Ew(he,v)&&K.push({projectId:ae,jobType:ne,time:he})}}catch(ue){console.error(`Failed to parse cron "${k}" for ${ae}/${ne}`,ue)}})}),K},[l,f,v]),j=U.useMemo(()=>{const K=new Set;return l.length===0||(l.every(ae=>ae.config.executorEnabled===!1)&&K.add("executor"),l.every(ae=>!ae.config.reviewerEnabled)&&K.add("reviewer"),l.every(ae=>!ae.config.qa.enabled)&&K.add("qa"),l.every(ae=>!ae.config.audit.enabled)&&K.add("audit"),l.every(ae=>!ae.config.roadmapScanner.enabled)&&K.add("slicer"),l.every(ae=>{var Z;return!((Z=ae.config.analytics)!=null&&Z.enabled)})&&K.add("analytics")),K},[l]),T=U.useMemo(()=>{const K=new Map;let ae=0;return l.forEach(Z=>{Z.projectId===i||(K.set(Z.projectId,ae%Lc.length),ae++)}),K},[l,i]),O=K=>Fg(K,f),_=U.useMemo(()=>{const K=[];for(let ae=0;ae<=24;ae++)K.push(Hc(w,ae));return K},[w]),M=K=>{const ae=b2([v2([K,w]),b]);return Fg(ae,w)},B=U.useMemo(()=>{const K=(m==null?void 0:m.recentRuns)??[],ae=new Map;for(const Z of K){const G=Z.providerKey||"default",Q=new Date(Z.startedAt*1e3),D=Z.finishedAt?new Date(Z.finishedAt*1e3):new Date;D<w||Q>b||(ae.has(G)||ae.set(G,[]),ae.get(G).push({id:Z.id,jobType:Z.jobType,status:Z.status,projectPath:Z.projectPath,startedAt:Q,finishedAt:D,throttledCount:Z.throttledCount}))}if(c!=null&&c.running){const Z=c.running.providerKey??"default";ae.has(Z)||ae.set(Z,[]),ae.get(Z).push({id:c.running.id,jobType:c.running.jobType,status:"running",projectPath:c.running.projectPath,startedAt:new Date((c.running.dispatchedAt??c.running.enqueuedAt)*1e3),finishedAt:new Date,throttledCount:0})}return Array.from(ae.entries()).sort(([Z],[G])=>Z.localeCompare(G)).map(([Z,G])=>({providerKey:Z,runs:G.sort((Q,D)=>Q.startedAt.getTime()-D.startedAt.getTime())}))},[b,w,m,c]),se=K=>K.split(/[-_]/).map(ae=>ae.charAt(0).toUpperCase()+ae.slice(1)).join(" "),Y=l.length>1,W=s.jsx("div",{className:"absolute inset-0 flex pointer-events-none",children:y.map((K,ae)=>s.jsx("div",{className:"h-full border-l border-slate-800/20",style:{width:60}},ae))});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."})]}),Y&&s.jsxs("div",{className:"flex flex-wrap gap-2 justify-end max-w-sm",children:[s.jsxs("div",{className:"flex items-center gap-1 mr-1",children:[s.jsx("div",{className:"w-2 h-2 rounded-full bg-slate-400 shrink-0"}),s.jsx("span",{className:"text-[10px] text-slate-400 font-semibold",children:"current"})]}),l.filter(K=>K.projectId!==i).slice(0,5).map(K=>{const ae=T.get(K.projectId)??0,Z=Lc[ae],G=(K.projectId.split("/").pop()??K.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 ${Z.bg} shrink-0`}),s.jsx("span",{className:"text-[10px] text-slate-500",title:K.projectId,children:G})]},K.projectId)})]})]}),s.jsx("div",{className:"overflow-x-auto custom-scrollbar",children:s.jsxs("div",{className:"relative min-w-[1600px]",style:{width:1440+Wn},children:[s.jsxs("div",{className:"h-8 border-b border-slate-800 flex",children:[s.jsx("div",{style:{width:Wn},className:"shrink-0 border-r border-slate-800"}),s.jsx("div",{className:"flex-1 relative",children:y.map((K,ae)=>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:ae*60},children:s.jsx("span",{className:"text-[10px] font-mono text-slate-500",children:Ms(K,"HH:mm")})},ae))})]}),s.jsxs("div",{className:"relative",children:[l.length===0&&s.jsx("div",{className:"flex items-center justify-center p-8",children:s.jsx("p",{className:"text-sm text-slate-500 italic",children:"No project data available for timeline."})}),wf.map(K=>{const ae=j.has(K.id),Z=S.filter(Q=>Q.jobType===K.id);if(!Y)return s.jsxs("div",{className:`flex border-b border-slate-800/30 ${ae?"opacity-40":""}`,children:[s.jsxs("div",{style:{width:Wn},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 ${K.color.bg} shrink-0`}),s.jsx("span",{className:"text-xs font-semibold text-slate-300",children:K.label})]}),s.jsxs("div",{className:"flex-1 relative h-10",children:[W,Z.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:ae?"Disabled":"No runs in this window"})}):Z.map((Q,D)=>s.jsx("button",{type:"button",onClick:()=>o==null?void 0:o(Q.projectId,Q.jobType),style:{left:O(Q.time)-3},className:`absolute top-1/2 -translate-y-1/2 h-4 w-6 rounded border ${K.color.bg} ${K.color.border} opacity-90 hover:opacity-100 hover:scale-110 transition-all cursor-pointer shadow-lg group`,title:`${K.label} at ${Ms(Q.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:Ms(Q.time,"HH:mm")})},D))]})]},K.id);const G=l.length*qc+Wg*2;return s.jsxs("div",{className:`flex border-b border-slate-800/30 ${ae?"opacity-40":""}`,children:[s.jsxs("div",{style:{width:Wn,height:G},className:"shrink-0 border-r border-slate-800/50 flex flex-col px-2 py-1",children:[s.jsxs("div",{className:"flex items-center gap-1 mb-0.5",children:[s.jsx("div",{className:`w-1.5 h-1.5 rounded-full ${K.color.bg} shrink-0`}),s.jsx("span",{className:"text-[10px] font-bold text-slate-400 uppercase tracking-wide",children:K.label})]}),l.map(Q=>{const D=Q.projectId===i,z=(Q.projectId.split("/").pop()??Q.projectId).slice(0,14),ne=T.get(Q.projectId)??0,k=D?K.color.bg:Lc[ne].bg;return s.jsxs("div",{style:{height:qc},className:"flex items-center gap-1 overflow-hidden",children:[s.jsx("div",{className:`w-1 h-1 rounded-full shrink-0 ${k}`}),s.jsx("span",{className:`text-[9px] truncate ${D?"text-slate-200 font-semibold":"text-slate-600"}`,title:Q.projectId,children:D?`${z} ★`:z})]},Q.projectId)})]}),s.jsxs("div",{className:"flex-1 relative",style:{height:G},children:[W,l.map((Q,D)=>{const z=Q.projectId===i,ne=Z.filter(ie=>ie.projectId===Q.projectId),k=Wg+D*qc,ue=z?Mw:Cw,ge=Math.floor((qc-ue)/2),he=T.get(Q.projectId)??0,$=z?{bg:K.color.bg,border:K.color.border}:Lc[he];return s.jsxs(ze.Fragment,{children:[D>0&&s.jsx("div",{className:"absolute left-0 right-0 border-t border-slate-800/20 pointer-events-none",style:{top:k}}),ne.map((ie,ye)=>s.jsx("button",{type:"button",onClick:()=>o==null?void 0:o(Q.projectId,ie.jobType),style:{left:O(ie.time)-3,top:k+ge,height:ue},className:`absolute w-6 rounded border ${$.bg} ${$.border} ${z?"opacity-90":"opacity-50"} hover:opacity-100 hover:z-10 transition-all cursor-pointer group`,title:`${Q.projectId} · ${K.label} @ ${Ms(ie.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:Ms(ie.time,"HH:mm")})},ye))]},Q.projectId)}),Z.length===0&&!ae&&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"})})]})]},K.id)})]}),s.jsx("div",{className:"absolute top-0 bottom-0 w-px bg-rose-500/50 z-10 pointer-events-none",style:{left:Wn+O(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"})]}),Y&&s.jsx("div",{className:"flex items-center gap-1.5",children:s.jsx("span",{children:"★ = current project · blocks in same column = scheduling overlap"})})]}),B.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:[(m==null?void 0:m.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+Wn},children:[s.jsxs("div",{className:"h-8 border-b border-slate-800 flex",children:[s.jsx("div",{style:{width:Wn},className:"shrink-0 border-r border-slate-800"}),s.jsx("div",{className:"flex-1 relative flex",children:_.map((K,ae)=>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:ae*60},children:s.jsx("span",{className:"text-[10px] font-mono text-slate-500",children:Ms(K,"HH:mm")})},ae))})]}),s.jsx("div",{className:"relative",children:B.map(({providerKey:K,runs:ae})=>s.jsxs("div",{className:"flex border-b border-slate-800/30 min-h-14","data-testid":`provider-execution-lane-${K}`,children:[s.jsxs("div",{style:{width:Wn},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:K,children:se(K)}),s.jsx("span",{className:"text-[10px] text-slate-500 font-mono truncate",children:K})]}),s.jsxs("div",{className:"flex-1 relative h-14",children:[s.jsx("div",{className:"absolute inset-0 flex pointer-events-none",children:_.map((Z,G)=>s.jsx("div",{className:"h-full border-l border-slate-800/20",style:{width:60}},G))}),ae.map(Z=>{const G=wf.find(he=>he.id===Z.jobType)??wf[0],Q=M(Z.startedAt),D=M(Z.finishedAt),z=Math.max(D-Q,8),ne=Z.status==="running",k=Z.status==="error"||Z.status==="failed"||Z.status==="errored",ue=ne?"bg-green-500":k?"bg-red-500":G.color.bg,ge=ne?"border-green-400/60":k?"border-red-400/60":G.color.border;return s.jsx("div",{className:`absolute top-1/2 -translate-y-1/2 h-8 rounded border ${ue} ${ge} opacity-85 shadow-lg ${ne?"animate-pulse":""}`,style:{left:Q,width:z},title:`${K} • ${G.label} • ${Ms(Z.startedAt,"MMM d HH:mm")} • ${Z.status}`,"data-testid":"provider-execution-run",children:s.jsxs("div",{className:"h-full px-2 flex items-center justify-between gap-2 text-[10px] text-white/90 overflow-hidden whitespace-nowrap",children:[s.jsx("span",{className:"font-semibold uppercase tracking-wide",children:G.label}),s.jsx("span",{className:"text-white/70",children:Z.status}),Z.throttledCount>0&&s.jsxs("span",{className:"text-yellow-100",children:["throttle ",Z.throttledCount,"x"]})]})},`${K}-${Z.id}-${Z.startedAt.getTime()}`)})]})]},K))}),s.jsx("div",{className:"absolute top-0 bottom-0 w-px bg-rose-500/50 z-10 pointer-events-none",style:{left:Wn+M(new Date)},children:s.jsx("div",{className:"absolute top-0 h-2 w-2 rounded-full bg-rose-500 -translate-x-1/2"})})]})})]})]})},yx=({form:l,scheduleMode:i,selectedTemplateId:o,onFieldChange:c,onSwitchToTemplate:m,onSwitchToCustom:f,onApplyTemplate:v,allProjectConfigs:w,currentProjectId:b,onEditJob:y})=>{var S;return s.jsxs(et,{className:"p-6 space-y-6",children:[w&&w.length>0&&s.jsx(gx,{configs:w,currentProjectId:b,onEditJob:y}),s.jsxs("div",{className:"flex items-start justify-between gap-4",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200 mb-1",children:"Job Schedules"}),s.jsx("p",{className:"text-sm text-slate-400",children:"Configure when automated jobs run using a preset template or custom cron expressions"})]}),s.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 ${i==="template"?"bg-indigo-600 text-white":"bg-slate-800 text-slate-400 hover:text-slate-200"}`,onClick:m,children:"Template"}),s.jsx("button",{type:"button",className:`px-4 py-1.5 text-sm font-medium transition-colors ${i==="custom"?"bg-indigo-600 text-white":"bg-slate-800 text-slate-400 hover:text-slate-200"}`,onClick:f,children:"Custom"})]})]}),i==="template"?s.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3",children:Wf.map(j=>{const T=o===j.id;return s.jsxs("button",{type:"button",onClick:()=>v(j),className:`text-left p-4 rounded-lg border transition-colors ${T?"border-indigo-500 bg-indigo-950/40":"border-slate-700 bg-slate-800/30 hover:border-slate-600"}`,children:[s.jsx("div",{className:"font-medium text-slate-200 mb-1",children: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],["Slicer",j.hints.slicer]].map(([O,_])=>s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{className:"text-xs text-slate-500 w-16 shrink-0",children:O}),s.jsx("span",{className:"text-xs text-slate-400",children:_})]},O))})]},j.id)})}):s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsx(Nn,{label:"PRD Execution Schedule",value:l.cronSchedule,onChange:j=>c("cronSchedule",j)}),s.jsx(Nn,{label:"PR Review Schedule",value:l.reviewerSchedule,onChange:j=>c("reviewerSchedule",j)}),s.jsx(Nn,{label:"QA Schedule",value:l.qa.schedule,onChange:j=>c("qa",{...l.qa,schedule:j})}),s.jsx(Nn,{label:"Audit Schedule",value:l.audit.schedule,onChange:j=>c("audit",{...l.audit,schedule:j})}),((S=l.analytics)==null?void 0:S.enabled)&&s.jsx(Nn,{label:"Analytics Schedule",value:l.analytics.schedule,onChange:j=>c("analytics",{...l.analytics,schedule:j})}),l.roadmapScanner.enabled&&s.jsx(Nn,{label:"Planner Schedule",value:l.roadmapScanner.slicerSchedule||"35 */12 * * *",onChange:j=>c("roadmapScanner",{...l.roadmapScanner,slicerSchedule:j})})]}),s.jsxs("div",{className:"pt-4 border-t border-slate-800 grid grid-cols-1 md:grid-cols-3 gap-6",children:[s.jsx(da,{label:"Scheduling Priority",value:String(l.schedulingPriority),onChange:j=>c("schedulingPriority",Number(j)),options:[{label:"1 - Lowest",value:"1"},{label:"2 - Low",value:"2"},{label:"3 - Balanced",value:"3"},{label:"4 - High",value:"4"},{label:"5 - Highest",value:"5"}],helperText:"Higher-priority projects get earlier balanced start slots and win queue tie-breakers first."}),s.jsx("div",{className:"rounded-xl border border-slate-800 bg-slate-950/50 p-4",children:s.jsxs("div",{className:"flex items-center justify-between gap-4",children:[s.jsxs("div",{children:[s.jsx("div",{className:"text-sm font-medium text-slate-200",children:"Global Queue"}),s.jsx("p",{className:"text-xs text-slate-400 mt-1",children:"Queue overlapping jobs across projects instead of letting them burst the provider API."})]}),s.jsx(_a,{checked:l.globalQueueEnabled??!0,onChange:j=>c("globalQueueEnabled",j)})]})}),s.jsx(Ve,{label:"Extra Start Delay",type:"number",min:"0",max:"59",value:String(l.cronScheduleOffset),onChange:j=>{const T=Math.min(59,Math.max(0,Number(j.target.value||0)));c("cronScheduleOffset",T)},helperText:"Manual delay in minutes added before cron jobs start. This stacks on top of automatic balancing."})]})]})},Ow=()=>{var ja,fn,Ia;const{addToast:l,selectedProjectId:i,globalModeLoading:o}=Gt(),[c,m]=U.useState("overview"),[f,v]=U.useState(!1),[w,b]=U.useState(!1),[y,S]=U.useState(null),[j,T]=U.useState(null),[O,_]=U.useState([]),[M,B]=U.useState(null),[se,Y]=U.useState(null),[W,K]=U.useState({form:{cronSchedule:"5 */3 * * *",reviewerSchedule:"25 */6 * * *",qa:{schedule:"45 2,14 * * *",enabled:!0},audit:{schedule:"50 3 * * 1",enabled:!0},analytics:{schedule:"0 6 * * 1",enabled:!1},roadmapScanner:{slicerSchedule:"35 */12 * * *",enabled:!0},scheduleBundleId:null,schedulingPriority:3,cronScheduleOffset:0,globalQueueEnabled:!0},scheduleMode:"template",selectedTemplateId:"always-on",isDirty:!1}),{data:ae,loading:Z,error:G,refetch:Q}=dn(zy,[i],{enabled:!o}),{data:D,loading:z,refetch:ne}=dn(Qf,[i],{enabled:!o});U.useEffect(()=>{const P=setInterval(()=>{Q()},3e4);return()=>clearInterval(P)},[Q]),U.useEffect(()=>{o||ky().then(_).catch(console.error)},[i,o]),U.useEffect(()=>{if(o)return;const P=()=>{hS().then(B).catch(()=>{}),mS(24).then(Y).catch(()=>{})};P();const fe=setInterval(P,3e4);return()=>clearInterval(fe)},[o,i]),U.useEffect(()=>{var P,fe,Ae,Be,lt,ht;if(D&&!W.isDirty){const gt=Ki(D.scheduleBundleId,D.cronSchedule,D.reviewerSchedule,((P=D.qa)==null?void 0:P.schedule)||"45 2,14 * * *",((fe=D.audit)==null?void 0:fe.schedule)||"50 3 * * 1",((Ae=D.roadmapScanner)==null?void 0:Ae.slicerSchedule)||"35 */12 * * *");K({form:{cronSchedule:D.cronSchedule||"5 */3 * * *",reviewerSchedule:D.reviewerSchedule||"25 */6 * * *",qa:D.qa||{schedule:"45 2,14 * * *",enabled:!0},audit:D.audit||{schedule:"50 3 * * 1",enabled:!0},analytics:D.analytics||{schedule:"0 6 * * 1",enabled:!1},roadmapScanner:{enabled:((Be=D.roadmapScanner)==null?void 0:Be.enabled)??!0,slicerSchedule:((lt=D.roadmapScanner)==null?void 0:lt.slicerSchedule)||"35 */12 * * *"},scheduleBundleId:D.scheduleBundleId??null,schedulingPriority:D.schedulingPriority??3,cronScheduleOffset:D.cronScheduleOffset??0,globalQueueEnabled:((ht=D.queue)==null?void 0:ht.enabled)??!0},scheduleMode:gt?"template":"custom",selectedTemplateId:(gt==null?void 0:gt.id)??"",isDirty:!1})}},[D,W.isDirty]);const k=()=>{ne(),Q()},ue=(P,fe)=>P instanceof Error?P.message:fe,ge=async()=>{if(ae){v(!0);try{ae.paused?(await eu(),l({title:"Schedule Resumed",message:"Cron schedules have been reactivated.",type:"success"})):(await iS(),l({title:"Schedule Paused",message:"Cron schedules have been deactivated.",type:"info"})),k()}catch(P){l({title:"Action Failed",message:ue(P,"Failed to toggle schedule state"),type:"error"})}finally{v(!1)}}},he=async(P,fe)=>{if(!D)return;const Be=Ry(P==="planner"?"slicer":P);if(Be){S(P);try{await Gc(Be.buildEnabledPatch(fe,D));let lt="";try{await eu()}catch(ht){lt=ue(ht,"Failed to reinstall cron schedules")}k(),l(lt?{title:"Job Saved (Cron Reinstall Failed)",message:lt,type:"warning"}:{title:"Job Updated",message:`${P[0].toUpperCase()+P.slice(1)} ${fe?"enabled":"disabled"}.`,type:"success"})}catch(lt){l({title:"Update Failed",message:ue(lt,"Failed to update job configuration"),type:"error"})}finally{S(null)}}},$=async P=>{const fe=P==="planner"?"slicer":P;T(P);try{await rS(fe),l({title:"Job Triggered",message:`${P[0].toUpperCase()+P.slice(1)} job has been queued.`,type:"success"}),Q()}catch(Ae){l({title:"Trigger Failed",message:ue(Ae,`Failed to trigger ${P} job`),type:"error"})}finally{T(null)}},ie=(P,fe)=>{K(Ae=>({...Ae,form:{...Ae.form,[P]:fe},isDirty:!0}))},ye=()=>{if(!W.form)return;const P=Ki(W.form.scheduleBundleId,W.form.cronSchedule,W.form.reviewerSchedule,W.form.qa.schedule,W.form.audit.schedule,W.form.roadmapScanner.slicerSchedule||"35 */12 * * *");K(fe=>({...fe,scheduleMode:"template",selectedTemplateId:(P==null?void 0:P.id)??"always-on",form:{...fe.form,scheduleBundleId:(P==null?void 0:P.id)??null},isDirty:!0}))},Ee=()=>{K(P=>({...P,scheduleMode:"custom",selectedTemplateId:"",form:{...P.form,scheduleBundleId:null},isDirty:!0}))},Oe=P=>{K(fe=>({...fe,selectedTemplateId:P.id,scheduleMode:"template",form:{...fe.form,cronSchedule:P.schedules.executor,reviewerSchedule:P.schedules.reviewer,scheduleBundleId:P.id,qa:{...fe.form.qa,schedule:P.schedules.qa},audit:{...fe.form.audit,schedule:P.schedules.audit},roadmapScanner:{...fe.form.roadmapScanner,slicerSchedule:P.schedules.slicer}},isDirty:!0}))},R=async()=>{var P,fe;if(D){b(!0);try{await Gc({cronSchedule:W.form.cronSchedule,reviewerSchedule:W.form.reviewerSchedule,scheduleBundleId:W.scheduleMode==="template"?W.form.scheduleBundleId:null,cronScheduleOffset:W.form.cronScheduleOffset,schedulingPriority:W.form.schedulingPriority,qa:{...D.qa,schedule:W.form.qa.schedule},audit:{...D.audit,schedule:W.form.audit.schedule},analytics:{...D.analytics,schedule:((P=W.form.analytics)==null?void 0:P.schedule)||((fe=D.analytics)==null?void 0:fe.schedule)||"0 6 * * 1"},roadmapScanner:{...D.roadmapScanner,slicerSchedule:W.form.roadmapScanner.slicerSchedule||"35 */12 * * *"},queue:{...D.queue,enabled:W.form.globalQueueEnabled??!0},executorEnabled:D.executorEnabled,reviewerEnabled:D.reviewerEnabled});let Ae="";try{await eu()}catch(Be){Ae=ue(Be,"Failed to reinstall cron schedules")}K(Be=>({...Be,isDirty:!1})),k(),l(Ae?{title:"Schedules Saved (Cron Reinstall Failed)",message:Ae,type:"warning"}:{title:"Schedule Updated",message:"Cron schedules have been saved and installed.",type:"success"})}catch(Ae){l({title:"Save Failed",message:ue(Ae,"Failed to save schedules"),type:"error"})}finally{b(!1)}}},le=P=>{if(!P)return s.jsx("span",{className:"text-slate-500",children:"Not scheduled"});const fe=new Date(P),Ae=IS(fe);return s.jsxs("div",{className:"flex items-center space-x-2",children:[Ae&&s.jsxs("span",{className:"relative flex h-3 w-3",children:[s.jsx("span",{className:"animate-ping absolute inline-flex h-full w-full rounded-full bg-green-400 opacity-75"}),s.jsx("span",{className:"relative inline-flex rounded-full h-3 w-3 bg-green-500"})]}),s.jsxs("div",{className:"text-sm",children:[s.jsx("span",{className:"text-slate-200 font-medium",children:QS(fe)}),s.jsxs("span",{className:"text-slate-500 ml-2",children:["(",WS(fe),")"]})]})]})},me=P=>{if(!P||P.delayMinutes<=0)return s.jsx("div",{className:"text-xs text-slate-500 mt-2",children:"Starts directly at the scheduled time."});const fe=[];return P.balancedDelayMinutes>0&&fe.push(`auto +${P.balancedDelayMinutes}m`),P.manualDelayMinutes>0&&fe.push(`manual +${P.manualDelayMinutes}m`),s.jsxs("div",{className:"text-xs text-slate-500 mt-2",children:["Delayed after cron fire:",s.jsxs("span",{className:"text-slate-300",children:[" ",fe.join(" - ")]})]})},xe=U.useMemo(()=>{var P,fe,Ae,Be,lt,ht,_t,gt,aa,Ua,Tt,En,Bl,Yl;return!D||!ae?[]:[{id:"executor",name:"Executor",description:"Creates implementation PRs from PRDs",icon:s.jsx($c,{className:"h-4 w-4"}),enabled:(D==null?void 0:D.executorEnabled)!==!1,schedule:ae.executor.schedule,nextRun:ae.executor.nextRun,delayInfo:ae.executor},{id:"reviewer",name:"Reviewer",description:"Reviews PRs and manages merge readiness",icon:s.jsx(Xc,{className:"h-4 w-4"}),enabled:(D==null?void 0:D.reviewerEnabled)??!1,schedule:ae.reviewer.schedule,nextRun:ae.reviewer.nextRun,delayInfo:ae.reviewer},{id:"qa",name:"QA",description:"Generates and runs quality checks on PRs",icon:s.jsx($1,{className:"h-4 w-4"}),enabled:((P=D==null?void 0:D.qa)==null?void 0:P.enabled)??!1,schedule:(fe=ae.qa)==null?void 0:fe.schedule,nextRun:(Ae=ae.qa)==null?void 0:Ae.nextRun,delayInfo:ae.qa},{id:"audit",name:"Auditor",description:"Runs automated audit reports",icon:s.jsx(gg,{className:"h-4 w-4"}),enabled:((Be=D==null?void 0:D.audit)==null?void 0:Be.enabled)??!1,schedule:(lt=ae.audit)==null?void 0:lt.schedule,nextRun:(ht=ae.audit)==null?void 0:ht.nextRun,delayInfo:ae.audit},{id:"planner",name:"Planner",description:"Creates PRDs from audit findings and pending roadmap items",icon:s.jsx(gg,{className:"h-4 w-4"}),enabled:((_t=D==null?void 0:D.roadmapScanner)==null?void 0:_t.enabled)??!1,schedule:((gt=ae.planner)==null?void 0:gt.schedule)||((aa=D.roadmapScanner)==null?void 0:aa.slicerSchedule)||"35 */12 * * *",nextRun:(Ua=ae.planner)==null?void 0:Ua.nextRun,delayInfo:ae.planner},{id:"analytics",name:"Analytics",description:"Fetches Amplitude data, analyzes with AI, and creates board issues",icon:s.jsx(Gb,{className:"h-4 w-4"}),enabled:((Tt=D==null?void 0:D.analytics)==null?void 0:Tt.enabled)??!1,schedule:((En=ae.analytics)==null?void 0:En.schedule)||((Bl=D.analytics)==null?void 0:Bl.schedule)||"0 6 * * 1",nextRun:(Yl=ae.analytics)==null?void 0:Yl.nextRun,delayInfo:ae.analytics}]},[D,ae]);if(Z||z)return s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx("div",{className:"text-slate-400",children:"Loading scheduling information..."})});if(G||!ae||!D)return s.jsxs("div",{className:"flex flex-col items-center justify-center h-full space-y-4",children:[s.jsx(Kn,{className:"h-12 w-12 text-red-400"}),s.jsx("div",{className:"text-slate-300",children:"Failed to load schedule information"}),s.jsx("div",{className:"text-sm text-slate-500",children:(G==null?void 0:G.message)||"Unknown error"}),s.jsx(We,{onClick:()=>{Q(),ne()},children:"Retry"})]});const je=ae.paused,Te=je?"bg-amber-500/10 text-amber-400 border-amber-500/20":"bg-green-500/10 text-green-400 border-green-500/20",Le=je?"Paused":"Active",rt=Ki(D.scheduleBundleId,D.cronSchedule,D.reviewerSchedule,((ja=D.qa)==null?void 0:ja.schedule)||"45 2,14 * * *",((fn=D.audit)==null?void 0:fn.schedule)||"50 3 * * 1",((Ia=D.roadmapScanner)==null?void 0:Ia.slicerSchedule)||"35 */12 * * *"),Ie=(P,fe,Ae)=>!rt||P==="analytics"||!Tr(rt.schedules[P],fe)?wg(Ae):`${rt.label} - ${rt.hints[P]}`,ta=[{id:"overview",label:"Overview",content:s.jsxs("div",{className:"space-y-6",children:[s.jsx(et,{className:`p-6 border-2 ${Te}`,children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center space-x-4",children:[s.jsx($c,{className:"h-8 w-8"}),s.jsxs("div",{children:[s.jsx("div",{className:"text-sm text-slate-400",children:"Automation Status"}),s.jsx("div",{className:"text-2xl font-bold",children:Le}),s.jsx("div",{className:"text-sm text-slate-500 mt-1",children:"Automatic balancing spreads registered projects before queueing overlaps."})]})]}),s.jsx(We,{variant:je?"primary":"outline",size:"lg",onClick:ge,loading:f,children:je?s.jsxs(s.Fragment,{children:[s.jsx(Or,{className:"h-5 w-5 mr-2"}),"Resume"]}):s.jsxs(s.Fragment,{children:[s.jsx(My,{className:"h-5 w-5 mr-2"}),"Pause"]})})]})}),s.jsxs(et,{className:"p-6",children:[s.jsx("h3",{className:"text-lg font-semibold text-slate-200 mb-4",children:"Agents"}),s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:xe.map(P=>{var fe,Ae,Be,lt,ht,_t,gt,aa;return s.jsxs("div",{className:`p-4 rounded-lg border ${P.enabled?"border-slate-800":"border-slate-800 opacity-50"}`,children:[s.jsxs("div",{className:"flex items-center justify-between mb-3",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[P.icon,s.jsx("h4",{className:"text-base font-semibold text-slate-200",children:P.name})]}),s.jsx(_a,{checked:P.enabled,disabled:y!==null,"aria-label":`Toggle ${P.name.toLowerCase()} automation`,onChange:Ua=>he(P.id,Ua)})]}),P.enabled?s.jsxs("div",{className:"space-y-3 mt-3",children:[s.jsxs("div",{children:[s.jsx("div",{className:"text-sm text-slate-400",children:"Schedule"}),s.jsx("div",{className:"text-sm text-slate-200 font-medium",children:Ie(P.id==="planner"?"slicer":P.id,P.id==="qa"?((fe=D==null?void 0:D.qa)==null?void 0:fe.schedule)||"":P.id==="audit"?((Ae=D==null?void 0:D.audit)==null?void 0:Ae.schedule)||"":P.id==="planner"?((Be=D==null?void 0:D.roadmapScanner)==null?void 0:Be.slicerSchedule)||"35 */12 * * *":P.id==="analytics"?((lt=D==null?void 0:D.analytics)==null?void 0:lt.schedule)||"0 6 * * 1":P.schedule,P.id==="qa"?((ht=D==null?void 0:D.qa)==null?void 0:ht.schedule)||"":P.id==="audit"?((_t=D==null?void 0:D.audit)==null?void 0:_t.schedule)||"":P.id==="planner"?((gt=D==null?void 0:D.roadmapScanner)==null?void 0:gt.slicerSchedule)||"35 */12 * * *":P.id==="analytics"?((aa=D==null?void 0:D.analytics)==null?void 0:aa.schedule)||"0 6 * * 1":P.schedule)})]}),me(P.delayInfo),s.jsxs("div",{children:[s.jsx("div",{className:"text-sm text-slate-400",children:"Next Run"}),le(P.nextRun)]}),s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:`flex items-center space-x-2 text-sm ${P.enabled?"text-green-400":"text-amber-400"}`,children:[s.jsx(Tf,{className:"h-4 w-4"}),s.jsx("span",{children:P.enabled?"Active":"Disabled"})]}),s.jsxs("button",{disabled:j!==null,onClick:()=>$(P.id),className:"flex items-center gap-1.5 px-3 py-1.5 rounded-md text-xs font-medium text-green-400 bg-green-500/10 hover:bg-green-500/20 border border-green-500/30 hover:border-green-500/50 disabled:opacity-40 disabled:cursor-not-allowed transition-colors",children:[j===P.id?s.jsx("div",{className:"h-3 w-3 border-2 border-current border-t-transparent rounded-full animate-spin"}):s.jsx(Or,{className:"h-3 w-3 fill-current"}),"Run now"]})]})]}):s.jsxs("div",{className:"text-slate-500 text-sm",children:[P.name," is disabled."]})]},P.id)})})]})]})},{id:"schedules",label:"Schedules",content:s.jsxs("div",{className:"space-y-6",children:[s.jsx(gx,{configs:O,currentProjectId:i??void 0,onEditJob:(P,fe)=>{},queueStatus:M,queueAnalytics:se}),s.jsx(yx,{form:W.form,scheduleMode:W.scheduleMode,selectedTemplateId:W.selectedTemplateId,onFieldChange:ie,onSwitchToTemplate:ye,onSwitchToCustom:Ee,onApplyTemplate:Oe}),s.jsxs("div",{className:"flex justify-end pt-4",children:[s.jsx(We,{variant:"ghost",onClick:()=>{var P,fe,Ae,Be,lt,ht;if(D){const _t=Ki(D.scheduleBundleId,D.cronSchedule,D.reviewerSchedule,((P=D.qa)==null?void 0:P.schedule)||"45 2,14 * * *",((fe=D.audit)==null?void 0:fe.schedule)||"50 3 * * 1",((Ae=D.roadmapScanner)==null?void 0:Ae.slicerSchedule)||"35 */12 * * *");K({form:{cronSchedule:D.cronSchedule||"5 */3 * * *",reviewerSchedule:D.reviewerSchedule||"25 */6 * * *",qa:D.qa||{schedule:"45 2,14 * * *",enabled:!0},audit:D.audit||{schedule:"50 3 * * 1",enabled:!0},analytics:D.analytics||{schedule:"0 6 * * 1",enabled:!1},roadmapScanner:{enabled:((Be=D.roadmapScanner)==null?void 0:Be.enabled)??!0,slicerSchedule:((lt=D.roadmapScanner)==null?void 0:lt.slicerSchedule)||"35 */12 * * *"},scheduleBundleId:D.scheduleBundleId??null,schedulingPriority:D.schedulingPriority??3,cronScheduleOffset:D.cronScheduleOffset??0,globalQueueEnabled:((ht=D.queue)==null?void 0:ht.enabled)??!0},scheduleMode:_t?"template":"custom",selectedTemplateId:(_t==null?void 0:_t.id)??"",isDirty:!1})}},disabled:!W.isDirty,children:"Reset"}),s.jsxs(We,{onClick:R,loading:w,disabled:!W.isDirty,children:[s.jsx(Tf,{className:"h-4 w-4 mr-2"}),"Save & Install"]})]})]})},{id:"crontab",label:"Crontab",content:s.jsxs(et,{className:"p-6",children:[s.jsxs("div",{className:"flex items-center space-x-2 mb-4",children:[s.jsx($f,{className:"h-5 w-5 text-slate-400"}),s.jsx("h3",{className:"text-lg font-semibold text-slate-200",children:"Active Crontab Entries"})]}),ae.entries.length===0?s.jsx("div",{className:"text-slate-500 text-sm",children:"No crontab entries found."}):s.jsx("div",{className:"space-y-2",children:ae.entries.map((P,fe)=>s.jsx("div",{className:"bg-slate-950/50 rounded-lg p-3 font-mono text-sm text-slate-300 border border-slate-800",children:P},fe))})]})}];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:"Scheduling"}),rt&&s.jsxs("div",{className:"text-right",children:[s.jsx("div",{className:"text-xs uppercase tracking-wide text-slate-500",children:"Schedule Bundle"}),s.jsx("div",{className:"text-sm font-medium text-indigo-300",children:rt.label}),s.jsxs("div",{className:"text-xs text-slate-500",children:["Priority ",ae.schedulingPriority,"/5 across registered projects"]})]})]}),s.jsx(By,{tabs:ta,activeTab:c,onChange:m})]})};function Ig(l){return l.type==="telegram"?`telegram:${l.botToken}:${l.chatId}`:`${l.type}:${l.url}`}const Dw=[{label:"Run Started",value:"run_started"},{label:"Run Succeeded",value:"run_succeeded"},{label:"Run Failed",value:"run_failed"},{label:"Run Timeout",value:"run_timeout"},{label:"Review Completed",value:"review_completed"},{label:"PR Auto-Merged",value:"pr_auto_merged"},{label:"Rate Limit Fallback",value:"rate_limit_fallback"},{label:"QA Completed",value:"qa_completed"}],Rw=(l,i)=>l.includes(i)?l.filter(o=>o!==i):[...l,i],Xg=({webhook:l,onChange:i,onSave:o,onCancel:c,isNew:m})=>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(da,{label:"Type",value:l.type,onChange:f=>{const v=f;i(v==="telegram"?{type:v,botToken:"",chatId:"",events:l.events}:{type:v,url:"",events:l.events})},options:[{label:"Slack",value:"slack"},{label:"Discord",value:"discord"},{label:"Telegram",value:"telegram"}]}),l.type==="telegram"?s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"relative",children:s.jsx(Ve,{label:"Bot Token",type:"password",value:l.botToken||"",onChange:f=>i({...l,botToken:f.target.value}),placeholder:"123456789:ABCdefGHIjklMNOpqrsTUVwxyz"})}),s.jsx(Ve,{label:"Chat ID",value:l.chatId||"",onChange:f=>i({...l,chatId:f.target.value}),placeholder:"123456789"})]}):s.jsx("div",{className:"md:col-span-2",children:s.jsx(Ve,{label:"Webhook URL",type:"password",value:l.url||"",onChange:f=>i({...l,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:Dw.map(f=>s.jsx("button",{type:"button",onClick:()=>i({...l,events:Rw(l.events,f.value)}),className:`px-3 py-1.5 rounded-md text-sm transition-colors ${l.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(We,{variant:"ghost",onClick:c,children:"Cancel"}),s.jsx(We,{onClick:o,disabled:l.events.length===0||(l.type==="telegram"?!l.botToken||!l.chatId:!l.url),children:m?"Add Webhook":"Save Changes"})]})]}),xx=({notifications:l,onChange:i,globalWebhook:o,onSetGlobal:c,onUnsetGlobal:m})=>{const[f,v]=ze.useState(null),[w,b]=ze.useState(!1),[y,S]=ze.useState({type:"slack",url:"",events:[]}),j=()=>{i({webhooks:[...l.webhooks,y]}),S({type:"slack",url:"",events:[]}),b(!1)},T=(_,M)=>{const B=[...l.webhooks];B[_]=M,i({webhooks:B})},O=_=>{i({webhooks:l.webhooks.filter((M,B)=>B!==_)})};return s.jsxs("div",{className:"space-y-4",children:[s.jsx("div",{className:"text-sm text-slate-400 mb-4",children:"Receive notifications when events occur via Slack, Discord, or Telegram"}),s.jsx("div",{className:"space-y-3",children:l.webhooks.length===0?s.jsx("p",{className:"text-slate-500 text-sm italic",children:"No webhooks configured."}):l.webhooks.map((_,M)=>s.jsx("div",{children:f===M?s.jsx(Xg,{webhook:_,onChange:B=>T(M,B),onSave:()=>v(null),onCancel:()=>v(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:_.type}),_.type==="telegram"&&s.jsxs("span",{className:"text-xs text-slate-500",children:["Chat ID: ",_.chatId]})]}),s.jsx("div",{className:"flex flex-wrap gap-1",children:_.events.map(B=>s.jsx("span",{className:"px-2 py-0.5 bg-slate-800 rounded text-xs text-slate-400",children:B.replace("_"," ")},B))})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[c!==void 0&&(()=>{const B=o!=null&&Ig(_)===Ig(o);return s.jsx("button",{type:"button",onClick:()=>B?m==null?void 0:m():c(_),className:`p-2 transition-colors ${B?"text-indigo-400 hover:text-indigo-300":"text-slate-500 hover:text-slate-300"}`,"aria-label":B?"Global channel (active)":"Set as global channel",title:B?"Global channel (active)":"Set as global channel",children:s.jsx(p1,{className:"h-4 w-4"})})})(),s.jsx("button",{type:"button",onClick:()=>v(M),className:"p-2 text-slate-400 hover:text-slate-200","aria-label":`Edit ${_.type} webhook`,title:`Edit ${_.type} webhook`,children:s.jsx(Ff,{className:"h-4 w-4"})}),s.jsx("button",{type:"button",onClick:()=>O(M),className:"p-2 text-red-400 hover:text-red-300","aria-label":`Delete ${_.type} webhook`,title:`Delete ${_.type} webhook`,children:s.jsx(Jc,{className:"h-4 w-4"})})]})]})},M))}),w?s.jsx(Xg,{webhook:y,onChange:S,onSave:j,onCancel:()=>b(!1),isNew:!0}):s.jsxs(We,{variant:"ghost",onClick:()=>b(!0),children:[s.jsx(_r,{className:"h-4 w-4 mr-2"}),"Add Webhook"]})]})},Aw=({isOpen:l,onClose:i,title:o,children:c})=>(U.useEffect(()=>{const m=f=>{f.key==="Escape"&&i()};return l&&(document.addEventListener("keydown",m),document.body.style.overflow="hidden"),()=>{document.removeEventListener("keydown",m),document.body.style.overflow="unset"}},[l,i]),l?Tb.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:i,"aria-hidden":"true"}),s.jsxs("div",{className:"relative w-full max-w-2xl transform rounded-xl bg-slate-900 border border-slate-800 shadow-2xl transition-all flex flex-col max-h-[90vh]",children:[s.jsxs("div",{className:"flex items-center justify-between border-b border-slate-800 px-6 py-4",children:[s.jsx("h3",{className:"text-lg font-semibold text-slate-100",children:o}),s.jsx("button",{onClick:i,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(kr,{className:"h-5 w-5"})})]}),s.jsx("div",{className:"flex-1 overflow-y-auto px-6 py-6 text-slate-300",children:c})]})]}),document.body):null),_w=l=>["TOKEN","SECRET","KEY","PASSWORD","AUTH","API_KEY"].some(o=>l.toUpperCase().includes(o)),kw=({value:l,isSensitive:i})=>{const[o,c]=ze.useState(!1);return i?s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{className:"text-sm text-slate-300 font-mono",children:o?l:"***********"}),s.jsx("button",{type:"button",onClick:()=>c(!o),className:"text-slate-500 hover:text-slate-300","aria-label":o?"Hide sensitive value":"Show sensitive value",title:o?"Hide sensitive value":"Show sensitive value",children:o?s.jsx(d1,{className:"h-4 w-4"}):s.jsx(h1,{className:"h-4 w-4"})})]}):s.jsx("span",{className:"text-sm text-slate-300 font-mono truncate max-w-xs",children:l})},px=({envVars:l,onChange:i,compact:o=!1})=>{const[c,m]=ze.useState(""),[f,v]=ze.useState(""),[w,b]=ze.useState(null),[y,S]=ze.useState(""),{addToast:j}=Gt(),T=()=>{if(c.trim()){if(!/^[A-Z_][A-Z0-9_]*$/.test(c)){j({title:"Invalid Key Format",message:"Key must be uppercase with underscores (e.g., API_KEY)",type:"error"});return}i({...l,[c]:f}),m(""),v("")}},O=Y=>{const W={...l};delete W[Y],i(W)},_=Y=>{b(Y),S(l[Y]??"")},M=()=>{w&&(i({...l,[w]:y}),b(null),S(""))},B=()=>{b(null),S("")},se=Object.entries(l);return s.jsxs("div",{className:"space-y-4",children:[!o&&s.jsx("div",{className:"text-sm text-slate-400 mb-4",children:"Configure environment variables passed to the provider CLI (API keys, base URLs)"}),s.jsx("div",{className:"space-y-2",children:se.length===0?s.jsx("p",{className:"text-slate-500 text-sm italic",children:"No environment variables configured."}):se.map(([Y,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",{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:Y}),w===Y?s.jsxs("div",{className:"flex items-center gap-2 flex-1",children:[s.jsx("input",{type:"text",value:y,onChange:K=>S(K.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:M,className:"p-1 text-green-400 hover:text-green-300","aria-label":`Save ${Y} value`,title:`Save ${Y} value`,children:s.jsx(Tf,{className:"h-4 w-4"})}),s.jsx("button",{type:"button",onClick:B,className:"p-1 text-slate-400 hover:text-slate-300","aria-label":`Cancel editing ${Y}`,title:`Cancel editing ${Y}`,children:s.jsx(kr,{className:"h-4 w-4"})})]}):s.jsx(kw,{value:W,isSensitive:_w(Y)})]}),w!==Y&&s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("button",{type:"button",onClick:()=>_(Y),className:"p-1 text-slate-400 hover:text-slate-200","aria-label":`Edit ${Y}`,title:`Edit ${Y}`,children:s.jsx(Ff,{className:"h-4 w-4"})}),s.jsx("button",{type:"button",onClick:()=>O(Y),className:"p-1 text-red-400 hover:text-red-300","aria-label":`Delete ${Y}`,title:`Delete ${Y}`,children:s.jsx(Jc,{className:"h-4 w-4"})})]})]},Y))}),s.jsxs("div",{className:`flex items-end gap-3 ${o?"":"pt-4 border-t border-slate-800"}`,children:[s.jsxs("div",{className:"flex-1",children:[!o&&s.jsx("label",{className:"block text-xs font-medium text-slate-500 mb-1",children:"Key"}),s.jsx("input",{type:"text",value:c,onChange:Y=>m(Y.target.value.toUpperCase()),placeholder:o?"ENV_VAR_NAME":"e.g., ANTHROPIC_BASE_URL",className:"w-full bg-slate-800 border border-slate-700 rounded px-3 py-2 text-sm text-slate-200 placeholder-slate-500"})]}),s.jsxs("div",{className:"flex-1",children:[!o&&s.jsx("label",{className:"block text-xs font-medium text-slate-500 mb-1",children:"Value"}),s.jsx("input",{type:"text",value:f,onChange:Y=>v(Y.target.value),placeholder:o?"value":"e.g., https://api.example.com",className:"w-full bg-slate-800 border border-slate-700 rounded px-3 py-2 text-sm text-slate-200 placeholder-slate-500"})]}),s.jsxs(We,{onClick:T,disabled:!c.trim(),size:o?"sm":"md",children:[s.jsx(_r,{className:"h-4 w-4 mr-1"}),"Add"]})]})]})};function zw(l,i){var o;return!!(l!=null&&l.startsWith("glm-")||(o=i==null?void 0:i.model)!=null&&o.startsWith("glm-"))}function Uw(l,i){var o,c;return zw(l,i)?!((c=(o=i==null?void 0:i.envVars)==null?void 0:o.ANTHROPIC_API_KEY)!=null&&c.trim()):!1}const Jg={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:""}},Hw=({isOpen:l,onClose:i,onSave:o,presetId:c,preset:m,isBuiltIn:f,existingIds:v})=>{const[w,b]=ze.useState(""),[y,S]=ze.useState({name:"",command:"",subcommand:"",promptFlag:"",autoApproveFlag:"",workdirFlag:"",modelFlag:"",model:"",envVars:{}}),[j,T]=ze.useState(!1),[O,_]=ze.useState("custom"),[M,B]=ze.useState(null),se=Uw(c??w,y);ze.useEffect(()=>{l&&(c&&m?(b(c),S({name:m.name,command:m.command,subcommand:m.subcommand??"",promptFlag:m.promptFlag??"",autoApproveFlag:m.autoApproveFlag??"",workdirFlag:m.workdirFlag??"",modelFlag:m.modelFlag??"",model:m.model??"",envVars:m.envVars??{}}),c==="claude"||m.command==="claude"?_("claude"):c==="codex"||m.command==="codex"?_("codex"):_("custom")):(b(""),S({name:"",command:"",subcommand:"",promptFlag:"",autoApproveFlag:"",workdirFlag:"",modelFlag:"",model:"",envVars:{}}),_("custom")),B(null),T(!!(m!=null&&m.envVars&&Object.keys(m.envVars).length>0)))},[l,c,m]);const Y=Z=>{if(_(Z),Z!=="custom"&&Jg[Z]){const G=Jg[Z];S(Q=>({...Q,...G,envVars:Q.envVars})),!c&&!w&&b(Z)}},W=(Z,G)=>{S(Q=>({...Q,[Z]:G})),B(null)},K=()=>{if(!y.name.trim())return B("Name is required"),!1;if(!y.command.trim())return B("Command is required"),!1;if(!c){if(!w.trim())return B("Preset ID is required"),!1;if(!/^[a-z0-9_-]+$/.test(w))return B("Preset ID must be lowercase letters, numbers, hyphens, and underscores only"),!1;if(v.includes(w))return B("A preset with this ID already exists"),!1}return!0},ae=()=>{var G,Q,D,z,ne,k;if(!K())return;const Z={name:y.name.trim(),command:y.command.trim()};(G=y.subcommand)!=null&&G.trim()&&(Z.subcommand=y.subcommand.trim()),(Q=y.promptFlag)!=null&&Q.trim()&&(Z.promptFlag=y.promptFlag.trim()),(D=y.autoApproveFlag)!=null&&D.trim()&&(Z.autoApproveFlag=y.autoApproveFlag.trim()),(z=y.workdirFlag)!=null&&z.trim()&&(Z.workdirFlag=y.workdirFlag.trim()),(ne=y.modelFlag)!=null&&ne.trim()&&(Z.modelFlag=y.modelFlag.trim()),(k=y.model)!=null&&k.trim()&&(Z.model=y.model.trim()),y.envVars&&Object.keys(y.envVars).length>0&&(Z.envVars=y.envVars),o(c||w,Z),i()};return s.jsx(Aw,{isOpen:l,onClose:i,title:c?`Edit Preset: ${m==null?void 0:m.name}`:"Add Provider Preset",children:s.jsxs("div",{className:"space-y-6",children:[M&&s.jsx("div",{className:"p-3 rounded-md bg-red-500/10 border border-red-500/20 text-red-400 text-sm",children:M}),se&&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(au,{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(da,{label:"Template",value:O,onChange:Y,options:[{label:"Start from scratch",value:"custom"},{label:"Claude (Anthropic)",value:"claude"},{label:"Codex (OpenAI)",value:"codex"}],helperText:"Start with a pre-configured template or customize from scratch"})}),!c&&s.jsx(Ve,{label:"Preset ID",value:w,onChange:Z=>b(Z.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(Ve,{label:"Display Name",value:y.name,onChange:Z=>W("name",Z.target.value),placeholder:"e.g., My Custom Provider",required:!0}),s.jsx(Ve,{label:"Command",value:y.command,onChange:Z=>W("command",Z.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(Ve,{label:"Model",value:y.model??"",onChange:Z=>W("model",Z.target.value),placeholder:"e.g., claude-opus-4-6",helperText:"Default model to use"}),s.jsx(Ve,{label:"Model Flag",value:y.modelFlag??"",onChange:Z=>W("modelFlag",Z.target.value),placeholder:"e.g., --model",helperText:"Flag for specifying the model"})]}),s.jsxs("div",{className:"border-t border-slate-800 pt-4",children:[s.jsxs("button",{type:"button",onClick:()=>T(!j),className:"flex items-center gap-2 text-sm text-slate-400 hover:text-slate-200 transition-colors",children:[j?s.jsx(Kb,{className:"h-4 w-4"}):s.jsx(Ny,{className:"h-4 w-4"}),"Advanced Options"]}),j&&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(Ve,{label:"Subcommand",value:y.subcommand??"",onChange:Z=>W("subcommand",Z.target.value),placeholder:"e.g., exec",helperText:"Subcommand after base command"}),s.jsx(Ve,{label:"Prompt Flag",value:y.promptFlag??"",onChange:Z=>W("promptFlag",Z.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(Ve,{label:"Auto-Approve Flag",value:y.autoApproveFlag??"",onChange:Z=>W("autoApproveFlag",Z.target.value),placeholder:"e.g., --dangerously-skip-permissions",helperText:"Flag to enable auto-approve mode"}),s.jsx(Ve,{label:"Workdir Flag",value:y.workdirFlag??"",onChange:Z=>W("workdirFlag",Z.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(px,{envVars:y.envVars??{},onChange:Z=>W("envVars",Z),compact:!0})]})]})]}),s.jsxs("div",{className:"flex justify-end gap-3 pt-4 border-t border-slate-800",children:[s.jsx(We,{variant:"ghost",onClick:i,children:"Cancel"}),s.jsx(We,{onClick:ae,children:c?"Save Changes":"Add Preset"})]})]})})},Jf=({label:l,value:i,onChange:o,placeholder:c,helpText:m})=>{const[f,v]=ze.useState(""),w=()=>{f.trim()&&!i.includes(f.trim())&&(o([...i,f.trim()]),v(""))},b=S=>{o(i.filter(j=>j!==S))},y=S=>{S.key==="Enter"&&(S.preventDefault(),w())};return s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-slate-400 mb-2",children:l}),s.jsx("div",{className:"flex flex-wrap gap-2 mb-2",children:i.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:()=>b(S),className:"text-slate-500 hover:text-red-400","aria-label":`Remove ${S}`,title:`Remove ${S}`,children:s.jsx(kr,{className:"h-3 w-3"})})]},S))}),s.jsxs("div",{className:"flex gap-2",children:[s.jsx("input",{type:"text",value:f,onChange:S=>v(S.target.value),onKeyDown:y,placeholder:c,className:"flex-1 bg-slate-800 border border-slate-700 rounded px-3 py-2 text-sm text-slate-200 placeholder-slate-500"}),s.jsx(We,{onClick:w,disabled:!f.trim(),"aria-label":`Add ${l.toLowerCase()} value`,children:s.jsx(_r,{className:"h-4 w-4"})})]}),m&&s.jsx("p",{className:"text-xs text-slate-500 mt-1",children:m})]})},Lw=({form:l,updateField:i,projectName:o,doctorChecks:c,doctorLoading:m})=>s.jsxs("div",{className:"space-y-6",children:[s.jsx(et,{className:"p-6 space-y-6",children:s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200",children:"Project Configuration"}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6 mt-4",children:[s.jsx(Ve,{label:"Project Name",value:o,disabled:!0}),s.jsx(Ve,{label:"Default Branch",value:l.defaultBranch,onChange:f=>i("defaultBranch",f.target.value)}),s.jsx(Ve,{label:"PRD Directory",value:l.prdDir,onChange:f=>i("prdDir",f.target.value),helperText:"Directory containing PRD files (relative to project root)"}),s.jsx(Ve,{label:"Branch Prefix",value:l.branchPrefix,onChange:f=>i("branchPrefix",f.target.value)}),s.jsx("div",{className:"md:col-span-2",children:s.jsx(_a,{label:"Enable PRD Executor",checked:l.executorEnabled,onChange:f=>i("executorEnabled",f)})}),s.jsx("div",{className:"md:col-span-2",children:s.jsx(_a,{label:"Enable Automated Reviews",checked:l.reviewerEnabled,onChange:f=>i("reviewerEnabled",f)})}),s.jsx("div",{className:"md:col-span-2",children:s.jsx(_a,{label:"Auto-merge approved PRs",checked:l.autoMerge,onChange:f=>i("autoMerge",f)})}),l.autoMerge&&s.jsx(da,{label:"Merge Method",value:l.autoMergeMethod,onChange:f=>i("autoMergeMethod",f),options:[{label:"Squash",value:"squash"},{label:"Merge",value:"merge"},{label:"Rebase",value:"rebase"}]})]}),s.jsx("div",{className:"pt-4 mt-4 border-t border-slate-800",children:s.jsx(Jf,{label:"Branch Patterns",value:l.branchPatterns,onChange:f=>i("branchPatterns",f),placeholder:"e.g., feat/",helpText:"Branch patterns matched by reviewer and related automation jobs"})})]})}),s.jsxs(et,{className:"divide-y divide-slate-800",children:[s.jsxs("div",{className:"p-4 flex items-center gap-2",children:[s.jsx(wy,{className:"h-4 w-4 text-indigo-500"}),s.jsx("h3",{className:"text-base font-medium text-slate-200",children:"System Health"})]}),m?s.jsx("div",{className:"p-4 text-sm text-slate-500",children:"Loading health checks..."}):c.map((f,v)=>{const w=f.status==="pass",b=f.status==="warn",y=w?"bg-green-500/10 text-green-400 border-green-500/20":b?"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 ${y}`,children:f.status.toUpperCase()})]},`${f.name}-${v}`)})]})]}),Kg=({presetId:l,preset:i,isBuiltIn:o,onEdit:c,onDelete:m,onReset:f})=>{var y,S,j;const v=i.envVars?Object.keys(i.envVars).length:0,b=(l.startsWith("glm-")||((y=i.model)==null?void 0:y.startsWith("glm-")))&&!((j=(S=i.envVars)==null?void 0:S.ANTHROPIC_API_KEY)!=null&&j.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:i.name}),o&&s.jsx(Cr,{variant:"info",className:"text-[10px]",children:"Built-in"}),b&&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(au,{className:"h-3 w-3"}),"Missing ANTHROPIC_API_KEY"]})]}),s.jsxs("div",{className:"flex items-center gap-1",children:[s.jsx("button",{type:"button",onClick:c,className:"p-1.5 text-slate-400 hover:text-slate-200 hover:bg-slate-800 rounded transition-colors","aria-label":`Edit ${i.name} preset`,title:"Edit preset",children:s.jsx(Ff,{className:"h-4 w-4"})}),o?f&&s.jsx("button",{type:"button",onClick:f,className:"p-1.5 text-slate-400 hover:text-indigo-400 hover:bg-slate-800 rounded transition-colors","aria-label":`Reset ${i.name} to defaults`,title:"Reset to defaults",children:s.jsx(Cy,{className:"h-4 w-4"})}):m&&s.jsx("button",{type:"button",onClick:m,className:"p-1.5 text-slate-400 hover:text-red-400 hover:bg-slate-800 rounded transition-colors","aria-label":`Delete ${i.name} preset`,title:"Delete preset",children:s.jsx(Jc,{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:[i.command,i.subcommand&&` ${i.subcommand}`]})]}),i.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(Cr,{variant:"neutral",className:"text-[10px] font-mono",children:i.model})]}),s.jsxs("div",{className:"flex items-center gap-3 mt-auto pt-2 border-t border-slate-800/50",children:[s.jsxs("span",{className:"text-xs text-slate-600 font-mono",children:["id: ",l]}),v>0&&s.jsxs("span",{className:"text-xs text-slate-500",children:[v," env var",v!==1?"s":""]})]})]})},Qc=["claude","claude-sonnet-4-6","claude-opus-4-6","codex","glm-47","glm-5"],qw={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"}}},Vw=({form:l,updateField:i,jobProvidersChangedRef:o,getAllPresets:c,getPresetOptions:m,handleEditPreset:f,handleDeletePreset:v,handleResetPreset:w,handleAddPreset:b})=>s.jsxs("div",{className:"space-y-6",children:[s.jsxs(et,{className:"p-6 space-y-6",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200",children:"Provider Presets"}),s.jsx("p",{className:"text-sm text-slate-400 mt-1",children:"Configure AI provider presets with custom commands, models, and environment variables"})]}),s.jsxs(We,{onClick:b,children:[s.jsx(_r,{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:[Qc.map(y=>{const j=c()[y];return j?s.jsx(Kg,{presetId:y,preset:j,isBuiltIn:!0,onEdit:()=>f(y),onReset:()=>w(y)},y):null}),Object.entries(l.providerPresets).filter(([y])=>!Qc.includes(y)).map(([y,S])=>s.jsx(Kg,{presetId:y,preset:S,isBuiltIn:!1,onEdit:()=>f(y),onDelete:()=>v(y)},y))]})]}),s.jsxs(et,{className:"p-6 space-y-6",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200",children:"Job Assignments"}),s.jsx("p",{className:"text-sm text-slate-400 mt-1",children:"Assign provider presets to specific job types. Jobs without an assignment use the global provider."})]}),s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"flex items-center justify-between p-4 rounded-md border border-indigo-500/30 bg-indigo-500/5 gap-4",children:[s.jsxs("div",{children:[s.jsx("span",{className:"text-sm font-medium text-slate-200",children:"Global Provider"}),s.jsx("p",{className:"text-xs text-slate-500 mt-1",children:"Default preset for all jobs without a specific assignment"})]}),s.jsx("div",{className:"w-64",children:s.jsx(da,{value:l.provider,onChange:y=>i("provider",y),options:m(l.providerPresets)})})]}),[{key:"executor",label:"Executor"},{key:"reviewer",label:"Reviewer"},{key:"qa",label:"QA"},{key:"audit",label:"Audit"},{key:"slicer",label:"Planner"},{key:"analytics",label:"Analytics"}].map(({key:y,label:S})=>s.jsxs("div",{className:"flex items-center justify-between p-3 rounded-md border border-slate-800 bg-slate-950/40 gap-4",children:[s.jsx("span",{className:"text-sm font-medium text-slate-200 whitespace-nowrap",children:S}),s.jsx("div",{className:"w-64",children:s.jsx(da,{value:l.jobProviders[y]??"",onChange:j=>{const T={...l.jobProviders};j===""?delete T[y]:T[y]=j,o.current=!0,i("jobProviders",T)},options:[{label:"Use Global (default)",value:""},...m(l.providerPresets)]})})]},y))]})]}),s.jsxs(et,{className:"p-6 space-y-6",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200",children:"Rate Limit Fallback"}),s.jsx("p",{className:"text-sm text-slate-400 mt-1",children:"Preset to use when the active provider is rate-limited"})]}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsx(da,{label:"Primary Fallback Preset",value:l.primaryFallbackPreset,onChange:y=>i("primaryFallbackPreset",y),options:[{label:"— None —",value:""},...Object.entries(c()).map(([y,S])=>({label:S.name,value:y}))],helperText:"Preset to use as the primary rate-limit fallback"}),s.jsx(da,{label:"Secondary Fallback Preset",value:l.secondaryFallbackPreset,onChange:y=>i("secondaryFallbackPreset",y),options:[{label:"— None —",value:""},...Object.entries(c()).map(([y,S])=>({label:S.name,value:y}))],helperText:"Used only if the primary fallback preset is also rate-limited"})]})]}),s.jsxs(et,{className:"p-6",children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200 mb-2",children:"Global Provider Environment Variables"}),s.jsx("p",{className:"text-sm text-slate-400 mb-4",children:"Environment variables passed to all provider CLIs. Preset-level env vars take precedence."}),s.jsx(px,{envVars:l.providerEnv,onChange:y=>i("providerEnv",y)})]}),s.jsxs(et,{className:"p-6 space-y-6",children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200",children:"Performance"}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-slate-400 mb-2",children:"Min Review Score (0-100)"}),s.jsxs("div",{className:"flex items-center space-x-4",children:[s.jsx("input",{type:"range",min:"0",max:"100",value:l.minReviewScore,onChange:y=>i("minReviewScore",Number(y.target.value)),className:"w-full h-2 bg-slate-800 rounded-lg appearance-none cursor-pointer accent-indigo-500"}),s.jsx("span",{className:"text-sm font-bold text-slate-200 w-10",children:l.minReviewScore})]}),s.jsx("p",{className:"text-xs text-slate-500 mt-1",children:'PRs below this score will be marked as "Needs Work".'})]}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsx(Ve,{label:"Max Runtime (Executor)",type:"number",value:String(l.maxRuntime),onChange:y=>i("maxRuntime",Number(y.target.value||0)),rightIcon:s.jsx("span",{className:"text-xs",children:"sec"})}),s.jsx(Ve,{label:"Max Runtime (Reviewer)",type:"number",value:String(l.reviewerMaxRuntime),onChange:y=>i("reviewerMaxRuntime",Number(y.target.value||0)),rightIcon:s.jsx("span",{className:"text-xs",children:"sec"})}),s.jsx(Ve,{label:"Max Log Size",type:"number",value:String(l.maxLogSize),onChange:y=>i("maxLogSize",Number(y.target.value||0)),rightIcon:s.jsx("span",{className:"text-xs",children:"bytes"})})]})]}),s.jsxs(et,{className:"p-6 space-y-6",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200",children:"Retry Settings"}),s.jsx("p",{className:"text-sm text-slate-400 mt-1",children:"Configure automatic retry behavior for the PR reviewer when fixes do not fully resolve issues."})]}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsx(Ve,{label:"Max Retry Attempts",type:"number",min:"0",max:"10",value:String(l.reviewerMaxRetries),onChange:y=>{const S=Math.min(10,Math.max(0,Number(y.target.value||0)));i("reviewerMaxRetries",S)},helperText:"Additional fix attempts after initial review. 0 = no retries."}),s.jsx(Ve,{label:"Retry Delay (seconds)",type:"number",min:"0",max:"300",value:String(l.reviewerRetryDelay),onChange:y=>{const S=Math.min(300,Math.max(0,Number(y.target.value||0)));i("reviewerRetryDelay",S)},helperText:"Wait time between retry attempts to let CI settle."}),s.jsx(Ve,{label:"Max PRs Per Run",type:"number",min:"0",max:"100",value:String(l.reviewerMaxPrsPerRun),onChange:y=>{const S=Math.min(100,Math.max(0,Number(y.target.value||0)));i("reviewerMaxPrsPerRun",S)},helperText:"Hard cap on how many PRs the reviewer processes per run. 0 = unlimited."})]})]})]}),Bw=({form:l,updateField:i,handleRoadmapToggle:o})=>{var c,m;return s.jsxs("div",{className:"space-y-6",children:[s.jsx("div",{id:"job-section-qa",children:s.jsxs(et,{className:"p-6 space-y-6",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200",children:"Quality Assurance"}),s.jsx("p",{className:"text-sm text-slate-400",children:"Automated UI testing using Playwright"})]}),s.jsx(_a,{checked:l.qa.enabled,onChange:f=>i("qa",{...l.qa,enabled:f})})]}),l.qa.enabled&&s.jsxs("div",{className:"space-y-6 pt-4 border-t border-slate-800",children:[s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsx(Nn,{label:"QA Schedule",value:l.qa.schedule,onChange:f=>i("qa",{...l.qa,schedule:f})}),s.jsx(Ve,{label:"Max Runtime",type:"number",value:String(l.qa.maxRuntime),onChange:f=>i("qa",{...l.qa,maxRuntime:Number(f.target.value||0)}),rightIcon:s.jsx("span",{className:"text-xs",children:"sec"}),helperText:"Maximum runtime for QA tasks (default: 3600 seconds)"}),s.jsx(da,{label:"Artifacts",value:l.qa.artifacts,onChange:f=>i("qa",{...l.qa,artifacts:f}),options:[{label:"Screenshots",value:"screenshot"},{label:"Videos",value:"video"},{label:"Both",value:"both"}],helperText:"What artifacts to capture for UI tests"}),s.jsx(Ve,{label:"Skip Label",value:l.qa.skipLabel,onChange:f=>i("qa",{...l.qa,skipLabel:f.target.value}),helperText:"GitHub label to skip QA (PRs with this label are excluded)"})]}),s.jsx(Jf,{label:"QA Branch Patterns",value:l.qa.branchPatterns,onChange:f=>i("qa",{...l.qa,branchPatterns:f}),placeholder:"e.g., qa/, test/",helpText:"Branch patterns to match for QA (defaults to top-level branchPatterns if empty)"}),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:"Auto-install Playwright"}),s.jsx("p",{className:"text-xs text-slate-500 mt-1",children:"Automatically install Playwright browsers if missing during QA run"})]}),s.jsx(_a,{checked:l.qa.autoInstallPlaywright,onChange:f=>i("qa",{...l.qa,autoInstallPlaywright:f})})]})]})]})}),s.jsx("div",{id:"job-section-audit",children:s.jsxs(et,{className:"p-6 space-y-6",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200",children:"Code Audit"}),s.jsx("p",{className:"text-sm text-slate-400",children:"Automated code quality and security audits"})]}),s.jsx(_a,{checked:l.audit.enabled,onChange:f=>i("audit",{...l.audit,enabled:f})})]}),l.audit.enabled&&s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6 pt-4 border-t border-slate-800",children:[s.jsx(Nn,{label:"Audit Schedule",value:l.audit.schedule,onChange:f=>i("audit",{...l.audit,schedule:f})}),s.jsx(Ve,{label:"Max Runtime",type:"number",value:String(l.audit.maxRuntime),onChange:f=>i("audit",{...l.audit,maxRuntime:Number(f.target.value||0)}),rightIcon:s.jsx("span",{className:"text-xs",children:"sec"}),helperText:"Maximum runtime for audit tasks (default: 1800 seconds)"})]})]})}),s.jsx("div",{id:"job-section-analytics",children:s.jsxs(et,{className:"p-6 space-y-6",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200",children:"Analytics (Amplitude)"}),s.jsx("p",{className:"text-sm text-slate-400",children:"Fetch Amplitude data, analyze with AI, and create board issues"})]}),s.jsx(_a,{checked:l.analytics.enabled,onChange:f=>i("analytics",{...l.analytics,enabled:f})})]}),l.analytics.enabled&&s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6 pt-4 border-t border-slate-800",children:[s.jsx(Ve,{label:"Amplitude API Key",value:((c=l.providerEnv)==null?void 0:c.AMPLITUDE_API_KEY)??"",onChange:f=>i("providerEnv",{...l.providerEnv,AMPLITUDE_API_KEY:f.target.value}),placeholder:"Required",helperText:"Your Amplitude project API key"}),s.jsx(Ve,{label:"Amplitude Secret Key",type:"password",value:((m=l.providerEnv)==null?void 0:m.AMPLITUDE_SECRET_KEY)??"",onChange:f=>i("providerEnv",{...l.providerEnv,AMPLITUDE_SECRET_KEY:f.target.value}),placeholder:"Required",helperText:"Your Amplitude secret key"}),s.jsx(Nn,{label:"Analytics Schedule",value:l.analytics.schedule,onChange:f=>i("analytics",{...l.analytics,schedule:f})}),s.jsx(Ve,{label:"Max Runtime",type:"number",value:String(l.analytics.maxRuntime),onChange:f=>i("analytics",{...l.analytics,maxRuntime:Number(f.target.value||0)}),rightIcon:s.jsx("span",{className:"text-xs",children:"sec"}),helperText:"Maximum runtime for analytics job (default: 900 seconds)"}),s.jsx(Ve,{label:"Lookback Days",type:"number",min:"1",max:"90",value:String(l.analytics.lookbackDays),onChange:f=>i("analytics",{...l.analytics,lookbackDays:Math.max(1,Math.min(90,Number(f.target.value||7)))}),helperText:"Number of days to look back in Amplitude (1-90)"}),s.jsx(da,{label:"Target Column",value:l.analytics.targetColumn,onChange:f=>i("analytics",{...l.analytics,targetColumn:f}),options:[{value:"Draft",label:"Draft"},{value:"Ready",label:"Ready"},{value:"In Progress",label:"In Progress"},{value:"Review",label:"Review"},{value:"Done",label:"Done"}],helperText:"Board column for created issues"}),s.jsxs("div",{className:"md:col-span-2",children:[s.jsx("label",{className:"block text-sm font-medium text-slate-400 mb-1.5",children:"Analysis Prompt (optional)"}),s.jsx("textarea",{rows:4,value:l.analytics.analysisPrompt??"",onChange:f=>i("analytics",{...l.analytics,analysisPrompt:f.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("p",{className:"mt-1.5 text-xs text-slate-500",children:"Custom prompt for AI analysis. Leave empty to use default."})]})]})]})}),s.jsx("div",{id:"job-section-slicer",children:s.jsxs(et,{className:"p-6 space-y-6",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200",children:"Planner"}),s.jsx("p",{className:"text-sm text-slate-400",children:"Generate one PRD per run using ROADMAP.md first, then audit findings when roadmap work is exhausted"})]}),s.jsx(_a,{checked:l.roadmapScanner.enabled,"aria-label":"Enable planner",onChange:o})]}),l.roadmapScanner.enabled&&s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6 pt-4 border-t border-slate-800",children:[s.jsx(Ve,{label:"Roadmap File Path",value:l.roadmapScanner.roadmapPath,onChange:f=>i("roadmapScanner",{...l.roadmapScanner,roadmapPath:f.target.value}),helperText:"Primary planning source (relative to project root)."}),s.jsx(Nn,{label:"Planner Schedule",value:l.roadmapScanner.slicerSchedule||"35 */12 * * *",onChange:f=>i("roadmapScanner",{...l.roadmapScanner,slicerSchedule:f})}),s.jsx(Ve,{label:"Planner Max Runtime",type:"number",value:String(l.roadmapScanner.slicerMaxRuntime||""),onChange:f=>i("roadmapScanner",{...l.roadmapScanner,slicerMaxRuntime:Number(f.target.value||0)}),rightIcon:s.jsx("span",{className:"text-xs",children:"sec"}),helperText:"Maximum runtime for planner tasks"}),s.jsx(da,{label:"Planner Priority Mode",value:l.roadmapScanner.priorityMode||"roadmap-first",onChange:f=>i("roadmapScanner",{...l.roadmapScanner,priorityMode:f==="audit-first"?"audit-first":"roadmap-first"}),options:[{label:"Roadmap first (recommended)",value:"roadmap-first"},{label:"Audit first",value:"audit-first"}],helperText:"Choose whether planner consumes roadmap items or audit findings first."}),s.jsx(da,{label:"Planner Issue Column",value:l.roadmapScanner.issueColumn||"Draft",onChange:f=>i("roadmapScanner",{...l.roadmapScanner,issueColumn:f==="Ready"?"Ready":"Draft"}),options:[{label:"Draft (default)",value:"Draft"},{label:"Ready",value:"Ready"}],helperText:"Column where planner-created issues are added after PRD generation."})]})]})})]})},Yw=({form:l,scheduleMode:i,selectedTemplateId:o,onFieldChange:c,onSwitchToTemplate:m,onSwitchToCustom:f,onApplyTemplate:v,allProjectConfigs:w,currentProjectId:b,onEditJob:y})=>s.jsx(yx,{form:l,scheduleMode:i,selectedTemplateId:o,onFieldChange:c,onSwitchToTemplate:m,onSwitchToCustom:f,onApplyTemplate:v,allProjectConfigs:w,currentProjectId:b,onEditJob:y}),$w=({form:l,updateField:i})=>s.jsxs("div",{className:"space-y-6",children:[s.jsxs(et,{className:"p-6 space-y-6",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200",children:"Board Provider"}),s.jsx("p",{className:"text-sm text-slate-400",children:"Track PRDs and their status using GitHub Projects or local SQLite"})]}),s.jsx(_a,{checked:l.boardProvider.enabled,onChange:o=>i("boardProvider",{...l.boardProvider,enabled:o})})]}),l.boardProvider.enabled&&s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6 pt-4 border-t border-slate-800",children:[s.jsx(da,{label:"Board Provider",value:l.boardProvider.provider,onChange:o=>i("boardProvider",{...l.boardProvider,provider:o}),options:[{label:"GitHub Projects",value:"github"},{label:"Local (SQLite)",value:"local"}]}),l.boardProvider.provider==="github"&&s.jsxs(s.Fragment,{children:[s.jsx(Ve,{label:"Project Number",type:"number",value:String(l.boardProvider.projectNumber||""),onChange:o=>i("boardProvider",{...l.boardProvider,projectNumber:o.target.value?Number(o.target.value):void 0}),helperText:"GitHub Projects V2 project number"}),s.jsx(Ve,{label:"Repository",value:l.boardProvider.repo||"",onChange:o=>i("boardProvider",{...l.boardProvider,repo:o.target.value||void 0}),helperText:"owner/repo (auto-detected if empty)"})]}),l.boardProvider.provider==="local"&&s.jsx("div",{className:"md:col-span-2",children:s.jsx("p",{className:"text-sm text-slate-400",children:"Local board uses SQLite for storage — no additional configuration needed."})})]})]}),s.jsxs(et,{className:"p-6",children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200 mb-2",children:"Notification Webhooks"}),s.jsx(xx,{notifications:l.notifications,onChange:o=>i("notifications",o)})]})]}),Fw=({form:l,updateField:i})=>s.jsxs(et,{className:"p-6 space-y-6",children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200",children:"Advanced Settings"}),s.jsx("p",{className:"text-sm text-slate-400",children:"Templates, retry policy, and PRD execution priority"}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsx(Ve,{label:"Templates Directory",value:l.templatesDir,onChange:o=>i("templatesDir",o.target.value),helperText:"Directory for custom template overrides"}),s.jsx(Ve,{label:"Max Retries",type:"number",min:"1",value:String(l.maxRetries),onChange:o=>{const c=Math.max(1,Number(o.target.value||1));i("maxRetries",c)},helperText:"Retry attempts for rate-limited API calls"})]}),s.jsx("div",{className:"pt-4 border-t border-slate-800 space-y-4",children:s.jsx(Jf,{label:"PRD Priority",value:l.prdPriority,onChange:o=>i("prdPriority",o),placeholder:"e.g., feature-x",helpText:"PRDs matching these names are executed first"})})]});function Gw(l,i,o,c){const{addToast:m}=Gt(),[f,v]=U.useState(!1),[w,b]=U.useState(null),[y,S]=U.useState(null),[j,T]=U.useState(null),O=U.useCallback(()=>({...qw,...l}),[l]),_=U.useCallback(Z=>{const G=O();return Object.entries(G).map(([Q,D])=>({label:D.name,value:Q}))},[O]),M=U.useCallback(Z=>{const G=[];i===Z&&G.push("Global Provider");const Q={executor:"Executor",reviewer:"Reviewer",qa:"QA",audit:"Audit",slicer:"Planner",analytics:"Analytics"};for(const[D,z]of Object.entries(o))z===Z&&G.push(Q[D]??D);return G},[i,o]),B=U.useCallback(()=>{b(null),S(null),v(!0)},[]),se=U.useCallback(Z=>{const Q=O()[Z];Q&&(b(Z),S(Q),v(!0))},[O]),Y=U.useCallback(async(Z,G)=>{const Q=!w,D={...l,[Z]:G};c("providerPresets",D);try{await Gc({providerPresets:{[Z]:G}}),m({title:Q?"Preset Added":"Preset Updated",message:Q?`${G.name} has been added. You can now assign it to jobs.`:`${G.name} has been saved.`,type:"success"})}catch(z){m({title:"Save Failed",message:z instanceof Error?z.message:"Failed to save preset",type:"error"}),c("providerPresets",l)}},[w,l,c,m]),W=U.useCallback(Z=>{var D,z;if(Qc.includes(Z)){m({title:"Cannot Delete",message:"Built-in presets cannot be deleted.",type:"error"});return}const G=M(Z);if(G.length>0){T({presetId:Z,presetName:((D=O()[Z])==null?void 0:D.name)??Z,references:G});return}const Q={...l};delete Q[Z],c("providerPresets",Q),m({title:"Preset Deleted",message:`${((z=O()[Z])==null?void 0:z.name)??Z} has been removed.`,type:"success"})},[l,c,m,M,O]),K=U.useCallback(Z=>{const G={...l};delete G[Z],c("providerPresets",G),m({title:"Preset Reset",message:`${Z} has been reset to built-in defaults.`,type:"success"})},[l,c,m]),ae=U.useCallback(()=>{if(!j)return;const{presetId:Z}=j,G={...l};delete G[Z],c("providerPresets",G);const Q={...o};for(const D of Object.keys(Q))Q[D]===Z&&delete Q[D];c("jobProviders",Q),i===Z&&c("provider","claude"),T(null),m({title:"Preset Deleted",message:`${j.presetName} has been removed and all references cleared.`,type:"success"})},[j,l,o,i,c,m]);return{presetModalOpen:f,setPresetModalOpen:v,editingPresetId:w,editingPreset:y,deleteWarning:j,setDeleteWarning:T,getAllPresets:O,getPresetOptions:_,getPresetReferences:M,handleAddPreset:B,handleEditPreset:se,handleSavePreset:Y,handleDeletePreset:W,handleResetPreset:K,handleConfirmDelete:ae}}const Zw=["executor","reviewer","qa","audit","slicer","analytics"],Nf=l=>{var i,o,c,m,f,v,w;return{provider:l.provider,providerLabel:l.providerLabel??"",providerPresets:l.providerPresets??{},defaultBranch:l.defaultBranch,prdDir:l.prdDir||"docs/prds",branchPrefix:l.branchPrefix,branchPatterns:l.branchPatterns||[],executorEnabled:l.executorEnabled??!0,reviewerEnabled:l.reviewerEnabled,minReviewScore:l.minReviewScore,maxRuntime:l.maxRuntime,reviewerMaxRuntime:l.reviewerMaxRuntime,maxLogSize:l.maxLogSize,cronSchedule:l.cronSchedule||"5 */3 * * *",reviewerSchedule:l.reviewerSchedule||"25 */6 * * *",scheduleBundleId:l.scheduleBundleId??null,cronScheduleOffset:l.cronScheduleOffset??0,schedulingPriority:l.schedulingPriority??3,maxRetries:l.maxRetries??3,reviewerMaxRetries:l.reviewerMaxRetries??2,reviewerRetryDelay:l.reviewerRetryDelay??30,reviewerMaxPrsPerRun:l.reviewerMaxPrsPerRun??0,providerEnv:l.providerEnv||{},notifications:l.notifications||{webhooks:[]},prdPriority:l.prdPriority||[],roadmapScanner:{enabled:((i=l.roadmapScanner)==null?void 0:i.enabled)??!0,roadmapPath:((o=l.roadmapScanner)==null?void 0:o.roadmapPath)??"ROADMAP.md",autoScanInterval:((c=l.roadmapScanner)==null?void 0:c.autoScanInterval)??300,slicerSchedule:((m=l.roadmapScanner)==null?void 0:m.slicerSchedule)??"35 */12 * * *",slicerMaxRuntime:((f=l.roadmapScanner)==null?void 0:f.slicerMaxRuntime)??600,priorityMode:((v=l.roadmapScanner)==null?void 0:v.priorityMode)??"roadmap-first",issueColumn:((w=l.roadmapScanner)==null?void 0:w.issueColumn)??"Draft"},templatesDir:l.templatesDir||".night-watch/templates",boardProvider:l.boardProvider||{enabled:!0,provider:"github"},jobProviders:l.jobProviders||{},autoMerge:l.autoMerge??!1,autoMergeMethod:l.autoMergeMethod??"squash",fallbackOnRateLimit:l.fallbackOnRateLimit??!0,primaryFallbackModel:l.primaryFallbackModel??l.claudeModel??"sonnet",secondaryFallbackModel:l.secondaryFallbackModel??l.primaryFallbackModel??l.claudeModel??"sonnet",primaryFallbackPreset:l.primaryFallbackPreset??"",secondaryFallbackPreset:l.secondaryFallbackPreset??"",claudeModel:l.primaryFallbackModel??l.claudeModel??"sonnet",qa:l.qa||{enabled:!0,schedule:"45 2,14 * * *",maxRuntime:3600,branchPatterns:[],artifacts:"both",skipLabel:"skip-qa",autoInstallPlaywright:!0},audit:l.audit||{enabled:!0,schedule:"50 3 * * 1",maxRuntime:1800},analytics:l.analytics||{enabled:!1,schedule:"0 6 * * 1",maxRuntime:900,lookbackDays:7,targetColumn:"Draft",analysisPrompt:""},queue:l.queue||{enabled:!0,maxConcurrency:1,maxWaitTime:7200,priority:{executor:50,reviewer:40,slicer:30,qa:20,audit:10}}}},ey=l=>{const i=Ki(l.scheduleBundleId,l.cronSchedule,l.reviewerSchedule,l.qa.schedule,l.audit.schedule,l.roadmapScanner.slicerSchedule??"35 */12 * * *");return i?{mode:"template",selectedTemplateId:i.id}:{mode:"custom",selectedTemplateId:""}},Pw=()=>{const{addToast:l,projectName:i,selectedProjectId:o,globalModeLoading:c,isGlobalMode:m,removeProjectFromList:f}=Gt(),[v,w]=ze.useState(!1),[b,y]=ze.useState(!1),[S,j]=ze.useState(!1),[T,O]=ze.useState(null),[_,M]=ze.useState([]),[B,se]=ze.useState(void 0),Y=ze.useRef(!1),W=ze.useRef(!1),[K,ae]=ze.useState("template"),[Z,G]=ze.useState("always-on"),[Q,D]=ze.useState("general"),[z,ne]=ze.useState(null),{data:k,loading:ue,error:ge,refetch:he}=dn(Qf,[o],{enabled:!c}),{data:$,loading:ie,refetch:ye}=dn(eS,[o],{enabled:!c}),Ee=$??[],Oe=(P,fe)=>{O(Ae=>Ae&&{...Ae,[P]:fe})},R=Gw((T==null?void 0:T.providerPresets)??{},(T==null?void 0:T.provider)??"claude",(T==null?void 0:T.jobProviders)??{},Oe);ze.useEffect(()=>{ky().then(M).catch(console.error),gS().then(P=>se(P.webhook)).catch(()=>{})},[o]),ze.useEffect(()=>{const P=new URLSearchParams(location.search),fe=P.get("tab"),Ae=P.get("mode");fe&&D({providers:"ai-runtime",runtime:"ai-runtime",roadmap:"jobs",qa:"jobs",audit:"jobs",analytics:"jobs",board:"integrations",notifications:"integrations"}[fe]??fe),Ae==="custom"?ae("custom"):Ae==="template"&&ae("template");const Be=P.get("jobType");Be&&setTimeout(()=>{me("current",Be)},300)},[location.search,k]);const le=ze.useCallback(P=>{const fe=ey(P);ae(fe.mode),G(fe.selectedTemplateId)},[]);ze.useEffect(()=>{if(k)if(Y.current)Y.current=!1;else{const P=Nf(k);O(P),le(P)}},[k,le]),ze.useEffect(()=>{T&&W.current&&(W.current=!1,Le())},[T==null?void 0:T.jobProviders]),ze.useEffect(()=>{if(z){const P=setTimeout(()=>ne(null),2e3);return()=>clearTimeout(P)}},[z]);const me=(P,fe)=>{if(P===i||P==="current"){if(["qa","audit","slicer","analytics"].includes(fe)){D("jobs"),setTimeout(()=>{const Be=document.getElementById(`job-section-${fe}`);Be&&(Be.scrollIntoView({behavior:"smooth",block:"center"}),ne(`job-section-${fe}`))},50);return}K!=="custom"&&je(),D("schedules"),setTimeout(()=>{const lt={executor:"job-schedule-executor",reviewer:"job-schedule-reviewer"}[fe]||"",ht=document.getElementById(lt);ht&&(ht.scrollIntoView({behavior:"smooth",block:"center"}),ne(lt))},50)}else l({title:"Project Switch Required",message:`To edit ${P}, please switch to that project in the sidebar.`,type:"info"})},xe=()=>{if(ae("template"),!T)return;const P=ey(T);P.mode==="template"&&(G(P.selectedTemplateId),Oe("scheduleBundleId",P.selectedTemplateId))},je=()=>{ae("custom"),Oe("scheduleBundleId",null),G("")},Te=P=>{G(P.id),O(fe=>fe&&{...fe,cronSchedule:P.schedules.executor,reviewerSchedule:P.schedules.reviewer,scheduleBundleId:P.id,qa:{...fe.qa,schedule:P.schedules.qa},audit:{...fe.audit,schedule:P.schedules.audit},roadmapScanner:{...fe.roadmapScanner,slicerSchedule:P.schedules.slicer},fallbackOnRateLimit:!0})},Le=async()=>{var Ae,Be,lt,ht,_t;if(!T)return;const P=T.cronSchedule!==(k==null?void 0:k.cronSchedule)||T.reviewerSchedule!==(k==null?void 0:k.reviewerSchedule)||T.cronScheduleOffset!==((k==null?void 0:k.cronScheduleOffset)??0)||T.schedulingPriority!==((k==null?void 0:k.schedulingPriority)??3)||T.executorEnabled!==((k==null?void 0:k.executorEnabled)??!0)||T.reviewerEnabled!==((k==null?void 0:k.reviewerEnabled)??!0)||T.queue.enabled!==(((Ae=k==null?void 0:k.queue)==null?void 0:Ae.enabled)??!0)||T.qa.enabled!==((k==null?void 0:k.qa.enabled)??!0)||T.qa.schedule!==(k==null?void 0:k.qa.schedule)||T.audit.enabled!==((k==null?void 0:k.audit.enabled)??!0)||T.audit.schedule!==(k==null?void 0:k.audit.schedule)||T.analytics.enabled!==(((Be=k==null?void 0:k.analytics)==null?void 0:Be.enabled)??!1)||T.analytics.schedule!==(((lt=k==null?void 0:k.analytics)==null?void 0:lt.schedule)??"0 6 * * 1")||T.roadmapScanner.enabled!==(((ht=k==null?void 0:k.roadmapScanner)==null?void 0:ht.enabled)??!0)||(T.roadmapScanner.slicerSchedule||"35 */12 * * *")!==(((_t=k==null?void 0:k.roadmapScanner)==null?void 0:_t.slicerSchedule)||"35 */12 * * *"),fe={};for(const gt of Zw){const aa=T.jobProviders[gt];typeof aa=="string"&&aa.trim().length>0?fe[gt]=aa:k!=null&&k.jobProviders[gt]&&(fe[gt]=null)}w(!0);try{const gt=await Gc({provider:T.provider,providerLabel:T.providerLabel.trim(),providerPresets:Object.keys(T.providerPresets).length>0?T.providerPresets:void 0,defaultBranch:T.defaultBranch,prdDir:T.prdDir,branchPrefix:T.branchPrefix,branchPatterns:T.branchPatterns,executorEnabled:T.executorEnabled,reviewerEnabled:T.reviewerEnabled,minReviewScore:T.minReviewScore,maxRuntime:T.maxRuntime,reviewerMaxRuntime:T.reviewerMaxRuntime,maxLogSize:T.maxLogSize,cronSchedule:T.cronSchedule,reviewerSchedule:T.reviewerSchedule,scheduleBundleId:K==="template"?T.scheduleBundleId:null,cronScheduleOffset:T.cronScheduleOffset,schedulingPriority:T.schedulingPriority,maxRetries:T.maxRetries,reviewerMaxRetries:T.reviewerMaxRetries,reviewerRetryDelay:T.reviewerRetryDelay,reviewerMaxPrsPerRun:T.reviewerMaxPrsPerRun,providerEnv:T.providerEnv,notifications:T.notifications,prdPriority:T.prdPriority,roadmapScanner:T.roadmapScanner,templatesDir:T.templatesDir,boardProvider:T.boardProvider,jobProviders:fe,autoMerge:T.autoMerge,autoMergeMethod:T.autoMergeMethod,fallbackOnRateLimit:T.fallbackOnRateLimit,primaryFallbackModel:T.primaryFallbackModel,secondaryFallbackModel:T.secondaryFallbackModel,primaryFallbackPreset:T.primaryFallbackPreset||void 0,secondaryFallbackPreset:T.secondaryFallbackPreset||void 0,claudeModel:T.primaryFallbackModel,qa:T.qa,audit:T.audit,analytics:T.analytics,queue:T.queue}),aa=Nf(gt);O(aa),le(aa);let Ua="";if(P)try{await eu()}catch(Tt){Ua=Tt instanceof Error?Tt.message:"failed to reinstall cron schedules"}l(Ua?{title:"Settings Saved (Cron Reinstall Failed)",message:Ua,type:"warning"}:{title:"Settings Saved",message:P?"Configuration updated and cron schedules reinstalled.":"Configuration updated successfully.",type:"success"}),Y.current=!0,he(),ye()}catch(gt){l({title:"Save Failed",message:gt instanceof Error?gt.message:"Failed to save configuration",type:"error"})}finally{w(!1)}},rt=()=>{if(k){const P=Nf(k);O(P),le(P),l({title:"Reset Complete",message:"Unsaved changes were discarded.",type:"info"})}},Ie=async P=>{if(!(B!=null&&!window.confirm("Replace existing global channel?")))try{const fe=await pg({webhook:P});se(fe.webhook)}catch(fe){l({title:"Failed to set global channel",message:fe instanceof Error?fe.message:"Unknown error",type:"error"})}},ta=async()=>{try{await pg({webhook:null}),se(null)}catch(P){l({title:"Failed to unset global channel",message:P instanceof Error?P.message:"Unknown error",type:"error"})}},ja=async P=>{try{const fe=await qy(P);Oe("roadmapScanner",fe.roadmapScanner);let Ae="";try{await eu()}catch(Be){Ae=Be instanceof Error?Be.message:"Failed to reinstall cron schedules"}l(Ae?{title:"Planner Saved (Cron Reinstall Failed)",message:Ae,type:"warning"}:{title:P?"Roadmap Scanner Enabled":"Roadmap Scanner Disabled",message:`Roadmap scanner has been ${P?"enabled":"disabled"}.`,type:"success"})}catch(fe){l({title:"Toggle Failed",message:fe instanceof Error?fe.message:"Failed to toggle roadmap scanner",type:"error"})}},fn=async()=>{if(o){j(!0);try{await J1(o),f(o),y(!1),l({title:"Project Removed",message:"Cron jobs uninstalled and all project data removed from the database.",type:"success"})}catch(P){l({title:"Remove Failed",message:P instanceof Error?P.message:"Failed to remove project",type:"error"})}finally{j(!1)}}};if(ue||!T)return s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx("div",{className:"text-slate-400",children:"Loading settings..."})});if(ge)return s.jsxs("div",{className:"flex flex-col items-center justify-center h-full space-y-4",children:[s.jsx(Kn,{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:ge.message}),s.jsx(We,{onClick:()=>he(),children:"Retry"})]});const Ia=[{id:"general",label:"General",content:s.jsx(Lw,{form:T,updateField:Oe,projectName:i,doctorChecks:Ee,doctorLoading:ie})},{id:"ai-runtime",label:"AI & Runtime",content:s.jsx(Vw,{form:T,updateField:Oe,jobProvidersChangedRef:W,getAllPresets:R.getAllPresets,getPresetOptions:R.getPresetOptions,handleEditPreset:R.handleEditPreset,handleDeletePreset:R.handleDeletePreset,handleResetPreset:R.handleResetPreset,handleAddPreset:R.handleAddPreset})},{id:"jobs",label:"Jobs",content:s.jsx(Bw,{form:T,updateField:Oe,handleRoadmapToggle:ja})},{id:"schedules",label:"Schedules",content:s.jsx(Yw,{form:{cronSchedule:T.cronSchedule,reviewerSchedule:T.reviewerSchedule,qa:T.qa,audit:T.audit,analytics:T.analytics,roadmapScanner:{enabled:T.roadmapScanner.enabled,slicerSchedule:T.roadmapScanner.slicerSchedule||"35 */12 * * *"},scheduleBundleId:T.scheduleBundleId,schedulingPriority:T.schedulingPriority,cronScheduleOffset:T.cronScheduleOffset,globalQueueEnabled:T.queue.enabled},scheduleMode:K,selectedTemplateId:Z,onFieldChange:(P,fe)=>{P==="globalQueueEnabled"?Oe("queue",{...T.queue,enabled:fe}):Oe(P,fe)},onSwitchToTemplate:xe,onSwitchToCustom:je,onApplyTemplate:Te,allProjectConfigs:_,currentProjectId:o,onEditJob:me})},{id:"notifications",label:"Notifications",content:s.jsxs(et,{className:"p-6",children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200 mb-2",children:"Notification Webhooks"}),s.jsx(xx,{notifications:T.notifications,onChange:P=>Oe("notifications",P),globalWebhook:B,onSetGlobal:Ie,onUnsetGlobal:ta})]})},{id:"integrations",label:"Integrations",content:s.jsx($w,{form:T,updateField:Oe})},{id:"advanced",label:"Advanced",content:s.jsx(Fw,{form:T,updateField:Oe})}];return s.jsxs("div",{className:"max-w-4xl mx-auto pb-10",children:[s.jsx("h2",{className:"text-2xl font-bold text-slate-100 mb-6",children:"Settings"}),s.jsx(By,{tabs:Ia,activeTab:Q,onChange:D}),s.jsxs("div",{className:"flex items-center justify-end space-x-4 pt-6 mt-6 border-t border-slate-800",children:[s.jsxs(We,{variant:"ghost",className:"text-slate-400 hover:text-slate-300",onClick:rt,children:[s.jsx(Cy,{className:"h-4 w-4 mr-2"}),"Reset"]}),s.jsxs(We,{onClick:Le,loading:v,children:[s.jsx(z1,{className:"h-4 w-4 mr-2"}),"Save Changes"]})]}),m&&o&&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(We,{variant:"secondary",className:"bg-red-600 hover:bg-red-700 text-white",onClick:()=>y(!0),children:[s.jsx(Jc,{className:"h-4 w-4 mr-2"}),"Remove Project"]})]}),b&&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:()=>!S&&y(!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(au,{className:"h-6 w-6 text-red-400"}),s.jsxs("h3",{className:"text-lg font-semibold text-slate-100",children:["Remove ",i,"?"]})]}),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(We,{variant:"ghost",onClick:()=>y(!1),disabled:S,children:"Cancel"}),s.jsx(We,{variant:"secondary",className:"bg-red-600 hover:bg-red-700",onClick:fn,loading:S,children:"Remove"})]})]})]}),s.jsx(Hw,{isOpen:R.presetModalOpen,onClose:()=>{R.setPresetModalOpen(!1)},onSave:R.handleSavePreset,presetId:R.editingPresetId,preset:R.editingPreset,isBuiltIn:R.editingPresetId?Qc.includes(R.editingPresetId):!1,existingIds:Object.keys(R.getAllPresets())}),R.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:()=>R.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(au,{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:R.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:R.deleteWarning.references.map(P=>s.jsx("li",{children:P},P))}),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(We,{variant:"ghost",onClick:()=>R.setDeleteWarning(null),children:"Cancel"}),s.jsx(We,{variant:"secondary",onClick:R.handleConfirmDelete,className:"bg-red-600 hover:bg-red-700",children:"Force Delete"})]})]})]})]})},Qw=()=>(MS(),CS(),s.jsx(yb,{children:s.jsxs("div",{className:"flex h-screen bg-[#030712] text-slate-300 overflow-hidden relative",children:[s.jsx("div",{className:"absolute top-0 left-0 w-full h-96 bg-indigo-900/10 rounded-full blur-[120px] -translate-y-1/2 pointer-events-none z-0"}),s.jsx(NS,{}),s.jsxs("div",{className:"flex-1 flex flex-col min-w-0 z-10",children:[s.jsx(jS,{}),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(Zv,{children:[s.jsx(In,{path:"/",element:s.jsx(HS,{})}),s.jsx(In,{path:"/prs",element:s.jsx(qS,{})}),s.jsx(In,{path:"/board",element:s.jsx(_S,{})}),s.jsx(In,{path:"/scheduling",element:s.jsx(Ow,{})}),s.jsx(In,{path:"/logs",element:s.jsx(LS,{})}),s.jsx(In,{path:"/roadmap",element:s.jsx(VS,{})}),s.jsx(In,{path:"/settings",element:s.jsx(Pw,{})}),s.jsx(In,{path:"*",element:s.jsx(Fv,{to:"/",replace:!0})})]})})})]}),s.jsx(TS,{})]})})),vx=document.getElementById("root");if(!vx)throw new Error("Could not find root element to mount to");const Ww=Qp.createRoot(vx);Ww.render(s.jsx(ze.StrictMode,{children:s.jsx(Qw,{})}));
|