@jonit-dev/night-watch-cli 1.8.2 → 1.8.4-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (32) hide show
  1. package/dist/cli.js +1017 -553
  2. package/dist/commands/board.d.ts.map +1 -1
  3. package/dist/commands/board.js +20 -0
  4. package/dist/commands/board.js.map +1 -1
  5. package/dist/commands/doctor.d.ts.map +1 -1
  6. package/dist/commands/doctor.js +8 -12
  7. package/dist/commands/doctor.js.map +1 -1
  8. package/dist/commands/init.d.ts.map +1 -1
  9. package/dist/commands/init.js +96 -2
  10. package/dist/commands/init.js.map +1 -1
  11. package/dist/scripts/publish.sh +94 -26
  12. package/dist/templates/prd-executor.md +1 -0
  13. package/dist/templates/skills/_codex-block.md +58 -0
  14. package/dist/templates/skills/nw-add-issue.md +39 -0
  15. package/dist/templates/skills/nw-board-sync.md +47 -0
  16. package/dist/templates/skills/nw-create-prd.md +61 -0
  17. package/dist/templates/skills/nw-review.md +39 -0
  18. package/dist/templates/skills/nw-run.md +39 -0
  19. package/dist/templates/skills/nw-slice.md +33 -0
  20. package/dist/templates/skills/skills/_codex-block.md +58 -0
  21. package/dist/templates/skills/skills/nw-add-issue.md +39 -0
  22. package/dist/templates/skills/skills/nw-board-sync.md +47 -0
  23. package/dist/templates/skills/skills/nw-create-prd.md +61 -0
  24. package/dist/templates/skills/skills/nw-review.md +39 -0
  25. package/dist/templates/skills/skills/nw-run.md +39 -0
  26. package/dist/templates/skills/skills/nw-slice.md +33 -0
  27. package/dist/web/assets/index-BFxPiKyy.js +381 -0
  28. package/dist/web/assets/index-Cp7RYjoy.css +1 -0
  29. package/dist/web/assets/index-DTsfDC7m.js +381 -0
  30. package/dist/web/assets/index-ZABWMEZR.js +381 -0
  31. package/dist/web/index.html +2 -2
  32. package/package.json +12 -3
@@ -0,0 +1,381 @@
1
+ var qp=Object.defineProperty;var Z0=l=>{throw TypeError(l)};var Vp=(l,u,d)=>u in l?qp(l,u,{enumerable:!0,configurable:!0,writable:!0,value:d}):l[u]=d;var Q0=(l,u,d)=>Vp(l,typeof u!="symbol"?u+"":u,d),lf=(l,u,d)=>u.has(l)||Z0("Cannot "+d);var ee=(l,u,d)=>(lf(l,u,"read from private field"),d?d.call(l):u.get(l)),st=(l,u,d)=>u.has(l)?Z0("Cannot add the same private member more than once"):u instanceof WeakSet?u.add(l):u.set(l,d),Ee=(l,u,d,o)=>(lf(l,u,"write to private field"),o?o.call(l,d):u.set(l,d),d),Ne=(l,u,d)=>(lf(l,u,"access private method"),d);(function(){const u=document.createElement("link").relList;if(u&&u.supports&&u.supports("modulepreload"))return;for(const g of document.querySelectorAll('link[rel="modulepreload"]'))o(g);new MutationObserver(g=>{for(const f of g)if(f.type==="childList")for(const y of f.addedNodes)y.tagName==="LINK"&&y.rel==="modulepreload"&&o(y)}).observe(document,{childList:!0,subtree:!0});function d(g){const f={};return g.integrity&&(f.integrity=g.integrity),g.referrerPolicy&&(f.referrerPolicy=g.referrerPolicy),g.crossOrigin==="use-credentials"?f.credentials="include":g.crossOrigin==="anonymous"?f.credentials="omit":f.credentials="same-origin",f}function o(g){if(g.ep)return;g.ep=!0;const f=d(g);fetch(g.href,f)}})();function Rf(l){return l&&l.__esModule&&Object.prototype.hasOwnProperty.call(l,"default")?l.default:l}function Bp(l){if(Object.prototype.hasOwnProperty.call(l,"__esModule"))return l;var u=l.default;if(typeof u=="function"){var d=function o(){return this instanceof o?Reflect.construct(u,arguments,this.constructor):u.apply(this,arguments)};d.prototype=u.prototype}else d={};return Object.defineProperty(d,"__esModule",{value:!0}),Object.keys(l).forEach(function(o){var g=Object.getOwnPropertyDescriptor(l,o);Object.defineProperty(d,o,g.get?g:{enumerable:!0,get:function(){return l[o]}})}),d}var sf={exports:{}},Bi={};/**
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 P0;function Yp(){if(P0)return Bi;P0=1;var l=Symbol.for("react.transitional.element"),u=Symbol.for("react.fragment");function d(o,g,f){var y=null;if(f!==void 0&&(y=""+f),g.key!==void 0&&(y=""+g.key),"key"in g){f={};for(var w in g)w!=="key"&&(f[w]=g[w])}else f=g;return g=f.ref,{$$typeof:l,type:o,key:y,ref:g!==void 0?g:null,props:f}}return Bi.Fragment=u,Bi.jsx=d,Bi.jsxs=d,Bi}var W0;function $p(){return W0||(W0=1,sf.exports=Yp()),sf.exports}var s=$p(),rf={exports:{}},Ve={};/**
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 I0;function Fp(){if(I0)return Ve;I0=1;var l=Symbol.for("react.transitional.element"),u=Symbol.for("react.portal"),d=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),g=Symbol.for("react.profiler"),f=Symbol.for("react.consumer"),y=Symbol.for("react.context"),w=Symbol.for("react.forward_ref"),b=Symbol.for("react.suspense"),x=Symbol.for("react.memo"),S=Symbol.for("react.lazy"),j=Symbol.for("react.activity"),M=Symbol.iterator;function D(z){return z===null||typeof z!="object"?null:(z=M&&z[M]||z["@@iterator"],typeof z=="function"?z:null)}var _={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},T=Object.assign,B={};function X(z,I,me){this.props=z,this.context=I,this.refs=B,this.updater=me||_}X.prototype.isReactComponent={},X.prototype.setState=function(z,I){if(typeof z!="object"&&typeof z!="function"&&z!=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,z,I,"setState")},X.prototype.forceUpdate=function(z){this.updater.enqueueForceUpdate(this,z,"forceUpdate")};function Q(){}Q.prototype=X.prototype;function F(z,I,me){this.props=z,this.context=I,this.refs=B,this.updater=me||_}var ae=F.prototype=new Q;ae.constructor=F,T(ae,X.prototype),ae.isPureReactComponent=!0;var le=Array.isArray;function K(){}var P={H:null,A:null,T:null,S:null},J=Object.prototype.hasOwnProperty;function A(z,I,me){var xe=me.ref;return{$$typeof:l,type:z,key:I,ref:xe!==void 0?xe:null,props:me}}function k(z,I){return A(z.type,I,z.props)}function ne(z){return typeof z=="object"&&z!==null&&z.$$typeof===l}function R(z){var I={"=":"=0",":":"=2"};return"$"+z.replace(/[=:]/g,function(me){return I[me]})}var ie=/\/+/g;function ge(z,I){return typeof z=="object"&&z!==null&&z.key!=null?R(""+z.key):I.toString(36)}function he(z){switch(z.status){case"fulfilled":return z.value;case"rejected":throw z.reason;default:switch(typeof z.status=="string"?z.then(K,K):(z.status="pending",z.then(function(I){z.status==="pending"&&(z.status="fulfilled",z.value=I)},function(I){z.status==="pending"&&(z.status="rejected",z.reason=I)})),z.status){case"fulfilled":return z.value;case"rejected":throw z.reason}}throw z}function Y(z,I,me,xe,De){var Me=typeof z;(Me==="undefined"||Me==="boolean")&&(z=null);var He=!1;if(z===null)He=!0;else switch(Me){case"bigint":case"string":case"number":He=!0;break;case"object":switch(z.$$typeof){case l:case u:He=!0;break;case S:return He=z._init,Y(He(z._payload),I,me,xe,De)}}if(He)return De=De(z),He=xe===""?"."+ge(z,0):xe,le(De)?(me="",He!=null&&(me=He.replace(ie,"$&/")+"/"),Y(De,I,me,"",function(Pt){return Pt})):De!=null&&(ne(De)&&(De=k(De,me+(De.key==null||z&&z.key===De.key?"":(""+De.key).replace(ie,"$&/")+"/")+He)),I.push(De)),1;He=0;var Nt=xe===""?".":xe+":";if(le(z))for(var et=0;et<z.length;et++)xe=z[et],Me=Nt+ge(xe,et),He+=Y(xe,I,me,Me,De);else if(et=D(z),typeof et=="function")for(z=et.call(z),et=0;!(xe=z.next()).done;)xe=xe.value,Me=Nt+ge(xe,et++),He+=Y(xe,I,me,Me,De);else if(Me==="object"){if(typeof z.then=="function")return Y(he(z),I,me,xe,De);throw I=String(z),Error("Objects are not valid as a React child (found: "+(I==="[object Object]"?"object with keys {"+Object.keys(z).join(", ")+"}":I)+"). If you meant to render a collection of children, use an array instead.")}return He}function re(z,I,me){if(z==null)return z;var xe=[],De=0;return Y(z,xe,"","",function(Me){return I.call(me,Me,De++)}),xe}function ye(z){if(z._status===-1){var I=z._result;I=I(),I.then(function(me){(z._status===0||z._status===-1)&&(z._status=1,z._result=me)},function(me){(z._status===0||z._status===-1)&&(z._status=2,z._result=me)}),z._status===-1&&(z._status=0,z._result=I)}if(z._status===1)return z._result.default;throw z._result}var Te=typeof reportError=="function"?reportError:function(z){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var I=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof z=="object"&&z!==null&&typeof z.message=="string"?String(z.message):String(z),error:z});if(!window.dispatchEvent(I))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",z);return}console.error(z)},Ue={map:re,forEach:function(z,I,me){re(z,function(){I.apply(this,arguments)},me)},count:function(z){var I=0;return re(z,function(){I++}),I},toArray:function(z){return re(z,function(I){return I})||[]},only:function(z){if(!ne(z))throw Error("React.Children.only expected to receive a single React element child.");return z}};return Ve.Activity=j,Ve.Children=Ue,Ve.Component=X,Ve.Fragment=d,Ve.Profiler=g,Ve.PureComponent=F,Ve.StrictMode=o,Ve.Suspense=b,Ve.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=P,Ve.__COMPILER_RUNTIME={__proto__:null,c:function(z){return P.H.useMemoCache(z)}},Ve.cache=function(z){return function(){return z.apply(null,arguments)}},Ve.cacheSignal=function(){return null},Ve.cloneElement=function(z,I,me){if(z==null)throw Error("The argument must be a React element, but you passed "+z+".");var xe=T({},z.props),De=z.key;if(I!=null)for(Me in I.key!==void 0&&(De=""+I.key),I)!J.call(I,Me)||Me==="key"||Me==="__self"||Me==="__source"||Me==="ref"&&I.ref===void 0||(xe[Me]=I[Me]);var Me=arguments.length-2;if(Me===1)xe.children=me;else if(1<Me){for(var He=Array(Me),Nt=0;Nt<Me;Nt++)He[Nt]=arguments[Nt+2];xe.children=He}return A(z.type,De,xe)},Ve.createContext=function(z){return z={$$typeof:y,_currentValue:z,_currentValue2:z,_threadCount:0,Provider:null,Consumer:null},z.Provider=z,z.Consumer={$$typeof:f,_context:z},z},Ve.createElement=function(z,I,me){var xe,De={},Me=null;if(I!=null)for(xe in I.key!==void 0&&(Me=""+I.key),I)J.call(I,xe)&&xe!=="key"&&xe!=="__self"&&xe!=="__source"&&(De[xe]=I[xe]);var He=arguments.length-2;if(He===1)De.children=me;else if(1<He){for(var Nt=Array(He),et=0;et<He;et++)Nt[et]=arguments[et+2];De.children=Nt}if(z&&z.defaultProps)for(xe in He=z.defaultProps,He)De[xe]===void 0&&(De[xe]=He[xe]);return A(z,Me,De)},Ve.createRef=function(){return{current:null}},Ve.forwardRef=function(z){return{$$typeof:w,render:z}},Ve.isValidElement=ne,Ve.lazy=function(z){return{$$typeof:S,_payload:{_status:-1,_result:z},_init:ye}},Ve.memo=function(z,I){return{$$typeof:x,type:z,compare:I===void 0?null:I}},Ve.startTransition=function(z){var I=P.T,me={};P.T=me;try{var xe=z(),De=P.S;De!==null&&De(me,xe),typeof xe=="object"&&xe!==null&&typeof xe.then=="function"&&xe.then(K,Te)}catch(Me){Te(Me)}finally{I!==null&&me.types!==null&&(I.types=me.types),P.T=I}},Ve.unstable_useCacheRefresh=function(){return P.H.useCacheRefresh()},Ve.use=function(z){return P.H.use(z)},Ve.useActionState=function(z,I,me){return P.H.useActionState(z,I,me)},Ve.useCallback=function(z,I){return P.H.useCallback(z,I)},Ve.useContext=function(z){return P.H.useContext(z)},Ve.useDebugValue=function(){},Ve.useDeferredValue=function(z,I){return P.H.useDeferredValue(z,I)},Ve.useEffect=function(z,I){return P.H.useEffect(z,I)},Ve.useEffectEvent=function(z){return P.H.useEffectEvent(z)},Ve.useId=function(){return P.H.useId()},Ve.useImperativeHandle=function(z,I,me){return P.H.useImperativeHandle(z,I,me)},Ve.useInsertionEffect=function(z,I){return P.H.useInsertionEffect(z,I)},Ve.useLayoutEffect=function(z,I){return P.H.useLayoutEffect(z,I)},Ve.useMemo=function(z,I){return P.H.useMemo(z,I)},Ve.useOptimistic=function(z,I){return P.H.useOptimistic(z,I)},Ve.useReducer=function(z,I,me){return P.H.useReducer(z,I,me)},Ve.useRef=function(z){return P.H.useRef(z)},Ve.useState=function(z){return P.H.useState(z)},Ve.useSyncExternalStore=function(z,I,me){return P.H.useSyncExternalStore(z,I,me)},Ve.useTransition=function(){return P.H.useTransition()},Ve.version="19.2.4",Ve}var X0;function Af(){return X0||(X0=1,rf.exports=Fp()),rf.exports}var V=Af();const qe=Rf(V);var uf={exports:{}},Yi={},cf={exports:{}},of={};/**
18
+ * @license React
19
+ * scheduler.production.js
20
+ *
21
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
22
+ *
23
+ * This source code is licensed under the MIT license found in the
24
+ * LICENSE file in the root directory of this source tree.
25
+ */var J0;function Gp(){return J0||(J0=1,(function(l){function u(Y,re){var ye=Y.length;Y.push(re);e:for(;0<ye;){var Te=ye-1>>>1,Ue=Y[Te];if(0<g(Ue,re))Y[Te]=re,Y[ye]=Ue,ye=Te;else break e}}function d(Y){return Y.length===0?null:Y[0]}function o(Y){if(Y.length===0)return null;var re=Y[0],ye=Y.pop();if(ye!==re){Y[0]=ye;e:for(var Te=0,Ue=Y.length,z=Ue>>>1;Te<z;){var I=2*(Te+1)-1,me=Y[I],xe=I+1,De=Y[xe];if(0>g(me,ye))xe<Ue&&0>g(De,me)?(Y[Te]=De,Y[xe]=ye,Te=xe):(Y[Te]=me,Y[I]=ye,Te=I);else if(xe<Ue&&0>g(De,ye))Y[Te]=De,Y[xe]=ye,Te=xe;else break e}}return re}function g(Y,re){var ye=Y.sortIndex-re.sortIndex;return ye!==0?ye:Y.id-re.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 y=Date,w=y.now();l.unstable_now=function(){return y.now()-w}}var b=[],x=[],S=1,j=null,M=3,D=!1,_=!1,T=!1,B=!1,X=typeof setTimeout=="function"?setTimeout:null,Q=typeof clearTimeout=="function"?clearTimeout:null,F=typeof setImmediate<"u"?setImmediate:null;function ae(Y){for(var re=d(x);re!==null;){if(re.callback===null)o(x);else if(re.startTime<=Y)o(x),re.sortIndex=re.expirationTime,u(b,re);else break;re=d(x)}}function le(Y){if(T=!1,ae(Y),!_)if(d(b)!==null)_=!0,K||(K=!0,R());else{var re=d(x);re!==null&&he(le,re.startTime-Y)}}var K=!1,P=-1,J=5,A=-1;function k(){return B?!0:!(l.unstable_now()-A<J)}function ne(){if(B=!1,K){var Y=l.unstable_now();A=Y;var re=!0;try{e:{_=!1,T&&(T=!1,Q(P),P=-1),D=!0;var ye=M;try{t:{for(ae(Y),j=d(b);j!==null&&!(j.expirationTime>Y&&k());){var Te=j.callback;if(typeof Te=="function"){j.callback=null,M=j.priorityLevel;var Ue=Te(j.expirationTime<=Y);if(Y=l.unstable_now(),typeof Ue=="function"){j.callback=Ue,ae(Y),re=!0;break t}j===d(b)&&o(b),ae(Y)}else o(b);j=d(b)}if(j!==null)re=!0;else{var z=d(x);z!==null&&he(le,z.startTime-Y),re=!1}}break e}finally{j=null,M=ye,D=!1}re=void 0}}finally{re?R():K=!1}}}var R;if(typeof F=="function")R=function(){F(ne)};else if(typeof MessageChannel<"u"){var ie=new MessageChannel,ge=ie.port2;ie.port1.onmessage=ne,R=function(){ge.postMessage(null)}}else R=function(){X(ne,0)};function he(Y,re){P=X(function(){Y(l.unstable_now())},re)}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(Y){Y.callback=null},l.unstable_forceFrameRate=function(Y){0>Y||125<Y?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):J=0<Y?Math.floor(1e3/Y):5},l.unstable_getCurrentPriorityLevel=function(){return M},l.unstable_next=function(Y){switch(M){case 1:case 2:case 3:var re=3;break;default:re=M}var ye=M;M=re;try{return Y()}finally{M=ye}},l.unstable_requestPaint=function(){B=!0},l.unstable_runWithPriority=function(Y,re){switch(Y){case 1:case 2:case 3:case 4:case 5:break;default:Y=3}var ye=M;M=Y;try{return re()}finally{M=ye}},l.unstable_scheduleCallback=function(Y,re,ye){var Te=l.unstable_now();switch(typeof ye=="object"&&ye!==null?(ye=ye.delay,ye=typeof ye=="number"&&0<ye?Te+ye:Te):ye=Te,Y){case 1:var Ue=-1;break;case 2:Ue=250;break;case 5:Ue=1073741823;break;case 4:Ue=1e4;break;default:Ue=5e3}return Ue=ye+Ue,Y={id:S++,callback:re,priorityLevel:Y,startTime:ye,expirationTime:Ue,sortIndex:-1},ye>Te?(Y.sortIndex=ye,u(x,Y),d(b)===null&&Y===d(x)&&(T?(Q(P),P=-1):T=!0,he(le,ye-Te))):(Y.sortIndex=Ue,u(b,Y),_||D||(_=!0,K||(K=!0,R()))),Y},l.unstable_shouldYield=k,l.unstable_wrapCallback=function(Y){var re=M;return function(){var ye=M;M=re;try{return Y.apply(this,arguments)}finally{M=ye}}}})(of)),of}var K0;function Zp(){return K0||(K0=1,cf.exports=Gp()),cf.exports}var df={exports:{}},ra={};/**
26
+ * @license React
27
+ * react-dom.production.js
28
+ *
29
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
30
+ *
31
+ * This source code is licensed under the MIT license found in the
32
+ * LICENSE file in the root directory of this source tree.
33
+ */var eg;function Qp(){if(eg)return ra;eg=1;var l=Af();function u(b){var x="https://react.dev/errors/"+b;if(1<arguments.length){x+="?args[]="+encodeURIComponent(arguments[1]);for(var S=2;S<arguments.length;S++)x+="&args[]="+encodeURIComponent(arguments[S])}return"Minified React error #"+b+"; visit "+x+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function d(){}var o={d:{f:d,r:function(){throw Error(u(522))},D:d,C:d,L:d,m:d,X:d,S:d,M:d},p:0,findDOMNode:null},g=Symbol.for("react.portal");function f(b,x,S){var j=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:g,key:j==null?null:""+j,children:b,containerInfo:x,implementation:S}}var y=l.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function w(b,x){if(b==="font")return"";if(typeof x=="string")return x==="use-credentials"?x:""}return ra.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=o,ra.createPortal=function(b,x){var S=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!x||x.nodeType!==1&&x.nodeType!==9&&x.nodeType!==11)throw Error(u(299));return f(b,x,null,S)},ra.flushSync=function(b){var x=y.T,S=o.p;try{if(y.T=null,o.p=2,b)return b()}finally{y.T=x,o.p=S,o.d.f()}},ra.preconnect=function(b,x){typeof b=="string"&&(x?(x=x.crossOrigin,x=typeof x=="string"?x==="use-credentials"?x:"":void 0):x=null,o.d.C(b,x))},ra.prefetchDNS=function(b){typeof b=="string"&&o.d.D(b)},ra.preinit=function(b,x){if(typeof b=="string"&&x&&typeof x.as=="string"){var S=x.as,j=w(S,x.crossOrigin),M=typeof x.integrity=="string"?x.integrity:void 0,D=typeof x.fetchPriority=="string"?x.fetchPriority:void 0;S==="style"?o.d.S(b,typeof x.precedence=="string"?x.precedence:void 0,{crossOrigin:j,integrity:M,fetchPriority:D}):S==="script"&&o.d.X(b,{crossOrigin:j,integrity:M,fetchPriority:D,nonce:typeof x.nonce=="string"?x.nonce:void 0})}},ra.preinitModule=function(b,x){if(typeof b=="string")if(typeof x=="object"&&x!==null){if(x.as==null||x.as==="script"){var S=w(x.as,x.crossOrigin);o.d.M(b,{crossOrigin:S,integrity:typeof x.integrity=="string"?x.integrity:void 0,nonce:typeof x.nonce=="string"?x.nonce:void 0})}}else x==null&&o.d.M(b)},ra.preload=function(b,x){if(typeof b=="string"&&typeof x=="object"&&x!==null&&typeof x.as=="string"){var S=x.as,j=w(S,x.crossOrigin);o.d.L(b,S,{crossOrigin:j,integrity:typeof x.integrity=="string"?x.integrity:void 0,nonce:typeof x.nonce=="string"?x.nonce:void 0,type:typeof x.type=="string"?x.type:void 0,fetchPriority:typeof x.fetchPriority=="string"?x.fetchPriority:void 0,referrerPolicy:typeof x.referrerPolicy=="string"?x.referrerPolicy:void 0,imageSrcSet:typeof x.imageSrcSet=="string"?x.imageSrcSet:void 0,imageSizes:typeof x.imageSizes=="string"?x.imageSizes:void 0,media:typeof x.media=="string"?x.media:void 0})}},ra.preloadModule=function(b,x){if(typeof b=="string")if(x){var S=w(x.as,x.crossOrigin);o.d.m(b,{as:typeof x.as=="string"&&x.as!=="script"?x.as:void 0,crossOrigin:S,integrity:typeof x.integrity=="string"?x.integrity:void 0})}else o.d.m(b)},ra.requestFormReset=function(b){o.d.r(b)},ra.unstable_batchedUpdates=function(b,x){return b(x)},ra.useFormState=function(b,x,S){return y.H.useFormState(b,x,S)},ra.useFormStatus=function(){return y.H.useHostTransitionStatus()},ra.version="19.2.4",ra}var tg;function ay(){if(tg)return df.exports;tg=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(u){console.error(u)}}return l(),df.exports=Qp(),df.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 ag;function Pp(){if(ag)return Yi;ag=1;var l=Zp(),u=Af(),d=ay();function o(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var a=2;a<arguments.length;a++)t+="&args[]="+encodeURIComponent(arguments[a])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function g(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 y(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(o(188))}function x(e){var t=e.alternate;if(!t){if(t=f(e),t===null)throw Error(o(188));return t!==e?null:e}for(var a=e,n=t;;){var i=a.return;if(i===null)break;var c=i.alternate;if(c===null){if(n=i.return,n!==null){a=n;continue}break}if(i.child===c.child){for(c=i.child;c;){if(c===a)return b(i),e;if(c===n)return b(i),t;c=c.sibling}throw Error(o(188))}if(a.return!==n.return)a=i,n=c;else{for(var p=!1,E=i.child;E;){if(E===a){p=!0,a=i,n=c;break}if(E===n){p=!0,n=i,a=c;break}E=E.sibling}if(!p){for(E=c.child;E;){if(E===a){p=!0,a=c,n=i;break}if(E===n){p=!0,n=c,a=i;break}E=E.sibling}if(!p)throw Error(o(189))}}if(a.alternate!==n)throw Error(o(190))}if(a.tag!==3)throw Error(o(188));return a.stateNode.current===a?e:t}function S(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=S(e),t!==null)return t;e=e.sibling}return null}var j=Object.assign,M=Symbol.for("react.element"),D=Symbol.for("react.transitional.element"),_=Symbol.for("react.portal"),T=Symbol.for("react.fragment"),B=Symbol.for("react.strict_mode"),X=Symbol.for("react.profiler"),Q=Symbol.for("react.consumer"),F=Symbol.for("react.context"),ae=Symbol.for("react.forward_ref"),le=Symbol.for("react.suspense"),K=Symbol.for("react.suspense_list"),P=Symbol.for("react.memo"),J=Symbol.for("react.lazy"),A=Symbol.for("react.activity"),k=Symbol.for("react.memo_cache_sentinel"),ne=Symbol.iterator;function R(e){return e===null||typeof e!="object"?null:(e=ne&&e[ne]||e["@@iterator"],typeof e=="function"?e:null)}var ie=Symbol.for("react.client.reference");function ge(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===ie?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case T:return"Fragment";case X:return"Profiler";case B:return"StrictMode";case le:return"Suspense";case K:return"SuspenseList";case A:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case _:return"Portal";case F:return e.displayName||"Context";case Q:return(e._context.displayName||"Context")+".Consumer";case ae:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case P:return t=e.displayName||null,t!==null?t:ge(e.type)||"Memo";case J:t=e._payload,e=e._init;try{return ge(e(t))}catch{}}return null}var he=Array.isArray,Y=u.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,re=d.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ye={pending:!1,data:null,method:null,action:null},Te=[],Ue=-1;function z(e){return{current:e}}function I(e){0>Ue||(e.current=Te[Ue],Te[Ue]=null,Ue--)}function me(e,t){Ue++,Te[Ue]=e.current,e.current=t}var xe=z(null),De=z(null),Me=z(null),He=z(null);function Nt(e,t){switch(me(Me,t),me(De,e),me(xe,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?g0(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=g0(t),e=y0(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}I(xe),me(xe,e)}function et(){I(xe),I(De),I(Me)}function Pt(e){e.memoizedState!==null&&me(He,e);var t=xe.current,a=y0(t,e.type);t!==a&&(me(De,e),me(xe,a))}function Ft(e){De.current===e&&(I(xe),I(De)),He.current===e&&(I(He),Hi._currentValue=ye)}var mn,Ja;function da(e){if(mn===void 0)try{throw Error()}catch(a){var t=a.stack.trim().match(/\n( *(at )?)/);mn=t&&t[1]||"",Ja=-1<a.stack.indexOf(`
42
+ at`)?" (<anonymous>)":-1<a.stack.indexOf("@")?"@unknown:0:0":""}return`
43
+ `+mn+e+Ja}var fa=!1;function gn(e,t){if(!e||fa)return"";fa=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var n={DetermineComponentFrameRoot:function(){try{if(t){var oe=function(){throw Error()};if(Object.defineProperty(oe.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(oe,[])}catch(te){var W=te}Reflect.construct(e,[],oe)}else{try{oe.call()}catch(te){W=te}e.call(oe.prototype)}}else{try{throw Error()}catch(te){W=te}(oe=e())&&typeof oe.catch=="function"&&oe.catch(function(){})}}catch(te){if(te&&W&&typeof te.stack=="string")return[te.stack,W.stack]}return[null,null]}};n.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var i=Object.getOwnPropertyDescriptor(n.DetermineComponentFrameRoot,"name");i&&i.configurable&&Object.defineProperty(n.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var c=n.DetermineComponentFrameRoot(),p=c[0],E=c[1];if(p&&E){var O=p.split(`
44
+ `),Z=E.split(`
45
+ `);for(i=n=0;n<O.length&&!O[n].includes("DetermineComponentFrameRoot");)n++;for(;i<Z.length&&!Z[i].includes("DetermineComponentFrameRoot");)i++;if(n===O.length||i===Z.length)for(n=O.length-1,i=Z.length-1;1<=n&&0<=i&&O[n]!==Z[i];)i--;for(;1<=n&&0<=i;n--,i--)if(O[n]!==Z[i]){if(n!==1||i!==1)do if(n--,i--,0>i||O[n]!==Z[i]){var se=`
46
+ `+O[n].replace(" at new "," at ");return e.displayName&&se.includes("<anonymous>")&&(se=se.replace("<anonymous>",e.displayName)),se}while(1<=n&&0<=i);break}}}finally{fa=!1,Error.prepareStackTrace=a}return(a=e?e.displayName||e.name:"")?da(a):""}function yn(e,t){switch(e.tag){case 26:case 27:case 5:return da(e.type);case 16:return da("Lazy");case 13:return e.child!==t&&t!==null?da("Suspense Fallback"):da("Suspense");case 19:return da("SuspenseList");case 0:case 15:return gn(e.type,!1);case 11:return gn(e.type.render,!1);case 1:return gn(e.type,!0);case 31:return da("Activity");default:return""}}function xn(e){try{var t="",a=null;do t+=yn(e,a),a=e,e=e.return;while(e);return t}catch(n){return`
47
+ Error generating stack: `+n.message+`
48
+ `+n.stack}}var Ha=Object.prototype.hasOwnProperty,pn=l.unstable_scheduleCallback,de=l.unstable_cancelCallback,pe=l.unstable_shouldYield,Ye=l.unstable_requestPaint,ze=l.unstable_now,gt=l.unstable_getCurrentPriorityLevel,La=l.unstable_ImmediatePriority,vn=l.unstable_UserBlockingPriority,ce=l.unstable_NormalPriority,Se=l.unstable_LowPriority,Fe=l.unstable_IdlePriority,_e=l.log,ha=l.unstable_setDisableYieldValue,nt=null,pt=null;function vt(e){if(typeof _e=="function"&&ha(e),pt&&typeof pt.setStrictMode=="function")try{pt.setStrictMode(nt,e)}catch{}}var zt=Math.clz32?Math.clz32:eo,Ls=Math.log,Kc=Math.LN2;function eo(e){return e>>>=0,e===0?32:31-(Ls(e)/Kc|0)|0}var il=256,qs=262144,aa=4194304;function bn(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 Pl(e,t,a){var n=e.pendingLanes;if(n===0)return 0;var i=0,c=e.suspendedLanes,p=e.pingedLanes;e=e.warmLanes;var E=n&134217727;return E!==0?(n=E&~c,n!==0?i=bn(n):(p&=E,p!==0?i=bn(p):a||(a=E&~e,a!==0&&(i=bn(a))))):(E=n&~c,E!==0?i=bn(E):p!==0?i=bn(p):a||(a=n&~e,a!==0&&(i=bn(a)))),i===0?0:t!==0&&t!==i&&(t&c)===0&&(c=i&-i,a=t&-t,c>=a||c===32&&(a&4194048)!==0)?t:i}function ul(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function cu(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 Vr(){var e=aa;return aa<<=1,(aa&62914560)===0&&(aa=4194304),e}function Vs(e){for(var t=[],a=0;31>a;a++)t.push(e);return t}function cl(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function ou(e,t,a,n,i,c){var p=e.pendingLanes;e.pendingLanes=a,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=a,e.entangledLanes&=a,e.errorRecoveryDisabledLanes&=a,e.shellSuspendCounter=0;var E=e.entanglements,O=e.expirationTimes,Z=e.hiddenUpdates;for(a=p&~a;0<a;){var se=31-zt(a),oe=1<<se;E[se]=0,O[se]=-1;var W=Z[se];if(W!==null)for(Z[se]=null,se=0;se<W.length;se++){var te=W[se];te!==null&&(te.lane&=-536870913)}a&=~oe}n!==0&&xt(e,n,0),c!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=c&~(p&~t))}function xt(e,t,a){e.pendingLanes|=t,e.suspendedLanes&=~t;var n=31-zt(t);e.entangledLanes|=t,e.entanglements[n]=e.entanglements[n]|1073741824|a&261930}function ma(e,t){var a=e.entangledLanes|=t;for(e=e.entanglements;a;){var n=31-zt(a),i=1<<n;i&t|e[n]&t&&(e[n]|=t),a&=~i}}function Br(e,t){var a=t&-t;return a=(a&42)!==0?1:Bs(a),(a&(e.suspendedLanes|t))!==0?0:a}function Bs(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function na(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Ys(){var e=re.p;return e!==0?e:(e=window.event,e===void 0?32:q0(e.type))}function Yr(e,t){var a=re.p;try{return re.p=e,t()}finally{re.p=a}}var Ka=Math.random().toString(36).slice(2),Ot="__reactFiber$"+Ka,Bt="__reactProps$"+Ka,An="__reactContainer$"+Ka,Wl="__reactEvents$"+Ka,du="__reactListeners$"+Ka,fu="__reactHandles$"+Ka,hu="__reactResources$"+Ka,Il="__reactMarker$"+Ka;function $s(e){delete e[Ot],delete e[Bt],delete e[Wl],delete e[du],delete e[fu]}function _n(e){var t=e[Ot];if(t)return t;for(var a=e.parentNode;a;){if(t=a[An]||a[Ot]){if(a=t.alternate,t.child!==null||a!==null&&a.child!==null)for(e=N0(e);e!==null;){if(a=e[Ot])return a;e=N0(e)}return t}e=a,a=e.parentNode}return null}function Oe(e){if(e=e[Ot]||e[An]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function ga(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(o(33))}function en(e){var t=e[hu];return t||(t=e[hu]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function Ut(e){e[Il]=!0}var mu=new Set,$r={};function Sn(e,t){ol(e,t),ol(e+"Capture",t)}function ol(e,t){for($r[e]=t,e=0;e<t.length;e++)mu.add(t[e])}var gu=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]*$"),yu={},kn={};function Fr(e){return Ha.call(kn,e)?!0:Ha.call(yu,e)?!1:gu.test(e)?kn[e]=!0:(yu[e]=!0,!1)}function Wt(e,t,a){if(Fr(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 Fs(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 rt(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 Dt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function wn(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Gr(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 i=n.get,c=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(p){a=""+p,c.call(this,p)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return a},setValue:function(p){a=""+p},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Xl(e){if(!e._valueTracker){var t=wn(e)?"checked":"value";e._valueTracker=Gr(e,t,""+e[t])}}function dl(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var a=t.getValue(),n="";return e&&(n=wn(e)?e.checked?"true":"false":e.value),e=n,e!==a?(t.setValue(e),!0):!1}function tn(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var Gs=/[\n"\\]/g;function It(e){return e.replace(Gs,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Zs(e,t,a,n,i,c,p,E){e.name="",p!=null&&typeof p!="function"&&typeof p!="symbol"&&typeof p!="boolean"?e.type=p:e.removeAttribute("type"),t!=null?p==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+Dt(t)):e.value!==""+Dt(t)&&(e.value=""+Dt(t)):p!=="submit"&&p!=="reset"||e.removeAttribute("value"),t!=null?Jl(e,p,Dt(t)):a!=null?Jl(e,p,Dt(a)):n!=null&&e.removeAttribute("value"),i==null&&c!=null&&(e.defaultChecked=!!c),i!=null&&(e.checked=i&&typeof i!="function"&&typeof i!="symbol"),E!=null&&typeof E!="function"&&typeof E!="symbol"&&typeof E!="boolean"?e.name=""+Dt(E):e.removeAttribute("name")}function fl(e,t,a,n,i,c,p,E){if(c!=null&&typeof c!="function"&&typeof c!="symbol"&&typeof c!="boolean"&&(e.type=c),t!=null||a!=null){if(!(c!=="submit"&&c!=="reset"||t!=null)){Xl(e);return}a=a!=null?""+Dt(a):"",t=t!=null?""+Dt(t):a,E||t===e.value||(e.value=t),e.defaultValue=t}n=n??i,n=typeof n!="function"&&typeof n!="symbol"&&!!n,e.checked=E?e.checked:!!n,e.defaultChecked=!!n,p!=null&&typeof p!="function"&&typeof p!="symbol"&&typeof p!="boolean"&&(e.name=p),Xl(e)}function Jl(e,t,a){t==="number"&&tn(e.ownerDocument)===e||e.defaultValue===""+a||(e.defaultValue=""+a)}function zn(e,t,a,n){if(e=e.options,t){t={};for(var i=0;i<a.length;i++)t["$"+a[i]]=!0;for(a=0;a<e.length;a++)i=t.hasOwnProperty("$"+e[a].value),e[a].selected!==i&&(e[a].selected=i),i&&n&&(e[a].defaultSelected=!0)}else{for(a=""+Dt(a),t=null,i=0;i<e.length;i++){if(e[i].value===a){e[i].selected=!0,n&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function Kl(e,t,a){if(t!=null&&(t=""+Dt(t),t!==e.value&&(e.value=t),a==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=a!=null?""+Dt(a):""}function Zr(e,t,a,n){if(t==null){if(n!=null){if(a!=null)throw Error(o(92));if(he(n)){if(1<n.length)throw Error(o(93));n=n[0]}a=n}a==null&&(a=""),t=a}a=Dt(t),e.defaultValue=a,n=e.textContent,n===a&&n!==""&&n!==null&&(e.value=n),Xl(e)}function an(e,t){if(t){var a=e.firstChild;if(a&&a===e.lastChild&&a.nodeType===3){a.nodeValue=t;return}}e.textContent=t}var es=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 ts(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||es.has(t)?t==="float"?e.cssFloat=a:e[t]=(""+a).trim():e[t]=a+"px"}function xu(e,t,a){if(t!=null&&typeof t!="object")throw Error(o(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 i in t)n=t[i],t.hasOwnProperty(i)&&a[i]!==n&&ts(e,i,n)}else for(var c in t)t.hasOwnProperty(c)&&ts(e,c,t[c])}function Qs(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 to=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"]]),pu=/^[\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 as(e){return pu.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function qa(){}var Qr=null;function Ps(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Un=null,hl=null;function vu(e){var t=Oe(e);if(t&&(e=t.stateNode)){var a=e[Bt]||null;e:switch(e=t.stateNode,t.type){case"input":if(Zs(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="'+It(""+t)+'"][type="radio"]'),t=0;t<a.length;t++){var n=a[t];if(n!==e&&n.form===e.form){var i=n[Bt]||null;if(!i)throw Error(o(90));Zs(n,i.value,i.defaultValue,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name)}}for(t=0;t<a.length;t++)n=a[t],n.form===e.form&&dl(n)}break e;case"textarea":Kl(e,a.value,a.defaultValue);break e;case"select":t=a.value,t!=null&&zn(e,!!a.multiple,t,!1)}}}var Pr=!1;function Wr(e,t,a){if(Pr)return e(t,a);Pr=!0;try{var n=e(t);return n}finally{if(Pr=!1,(Un!==null||hl!==null)&&(hc(),Un&&(t=Un,e=hl,hl=Un=null,vu(t),e)))for(t=0;t<e.length;t++)vu(e[t])}}function ns(e,t){var a=e.stateNode;if(a===null)return null;var n=a[Bt]||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(o(231,t,typeof a));return a}var nn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Ir=!1;if(nn)try{var ls={};Object.defineProperty(ls,"passive",{get:function(){Ir=!0}}),window.addEventListener("test",ls,ls),window.removeEventListener("test",ls,ls)}catch{Ir=!1}var Nn=null,Ws=null,Is=null;function Yt(){if(Is)return Is;var e,t=Ws,a=t.length,n,i="value"in Nn?Nn.value:Nn.textContent,c=i.length;for(e=0;e<a&&t[e]===i[e];e++);var p=a-e;for(n=1;n<=p&&t[a-n]===i[c-n];n++);return Is=i.slice(e,1<n?1-n:void 0)}function ss(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function ln(){return!0}function Hn(){return!1}function Rt(e){function t(a,n,i,c,p){this._reactName=a,this._targetInst=i,this.type=n,this.nativeEvent=c,this.target=p,this.currentTarget=null;for(var E in e)e.hasOwnProperty(E)&&(a=e[E],this[E]=a?a(c):c[E]);return this.isDefaultPrevented=(c.defaultPrevented!=null?c.defaultPrevented:c.returnValue===!1)?ln:Hn,this.isPropagationStopped=Hn,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=ln)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=ln)},persist:function(){},isPersistent:ln}),t}var jn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},rs=Rt(jn),is=j({},jn,{view:0,detail:0}),Xr=Rt(is),Xs,us,cs,Js=j({},is,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:ds,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!==cs&&(cs&&e.type==="mousemove"?(Xs=e.screenX-cs.screenX,us=e.screenY-cs.screenY):us=Xs=0,cs=e),Xs)},movementY:function(e){return"movementY"in e?e.movementY:us}}),bu=Rt(Js),ao=j({},Js,{dataTransfer:0}),no=Rt(ao),lo=j({},is,{relatedTarget:0}),Ks=Rt(lo),so=j({},jn,{animationName:0,elapsedTime:0,pseudoElement:0}),ml=Rt(so),ro=j({},jn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),gl=Rt(ro),os=j({},jn,{data:0}),yl=Rt(os),io={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},uo={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"},co={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function oo(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=co[e])?!!t[e]:!1}function ds(){return oo}var fo=j({},is,{key:function(e){if(e.key){var t=io[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=ss(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?uo[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:ds,charCode:function(e){return e.type==="keypress"?ss(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?ss(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),ho=Rt(fo),mo=j({},Js,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Su=Rt(mo),go=j({},is,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:ds}),yo=Rt(go),wu=j({},jn,{propertyName:0,elapsedTime:0,pseudoElement:0}),xo=Rt(wu),po=j({},Js,{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}),vo=Rt(po),bo=j({},jn,{newState:0,oldState:0}),So=Rt(bo),Nu=[9,13,27,32],Jr=nn&&"CompositionEvent"in window,fs=null;nn&&"documentMode"in document&&(fs=document.documentMode);var wo=nn&&"TextEvent"in window&&!fs,ju=nn&&(!Jr||fs&&8<fs&&11>=fs),Eu=" ",Tu=!1;function Mu(e,t){switch(e){case"keyup":return Nu.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Cu(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var xl=!1;function No(e,t){switch(e){case"compositionend":return Cu(t);case"keypress":return t.which!==32?null:(Tu=!0,Eu);case"textInput":return e=t.data,e===Eu&&Tu?null:e;default:return null}}function jo(e,t){if(xl)return e==="compositionend"||!Jr&&Mu(e,t)?(e=Yt(),Is=Ws=Nn=null,xl=!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 ju&&t.locale!=="ko"?null:t.data;default:return null}}var Eo={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 Ou(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Eo[e.type]:t==="textarea"}function Kr(e,t,a,n){Un?hl?hl.push(n):hl=[n]:Un=n,t=bc(t,"onChange"),0<t.length&&(a=new rs("onChange","change",null,a,n),e.push({event:a,listeners:t}))}var pl=null,hs=null;function ya(e){c0(e,0)}function sn(e){var t=ga(e);if(dl(t))return e}function Du(e,t){if(e==="change")return t}var En=!1;if(nn){var ei;if(nn){var Ma="oninput"in document;if(!Ma){var ti=document.createElement("div");ti.setAttribute("oninput","return;"),Ma=typeof ti.oninput=="function"}ei=Ma}else ei=!1;En=ei&&(!document.documentMode||9<document.documentMode)}function ai(){pl&&(pl.detachEvent("onpropertychange",ni),hs=pl=null)}function ni(e){if(e.propertyName==="value"&&sn(hs)){var t=[];Kr(t,hs,e,Ps(e)),Wr(ya,t)}}function Pe(e,t,a){e==="focusin"?(ai(),pl=t,hs=a,pl.attachEvent("onpropertychange",ni)):e==="focusout"&&ai()}function vl(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return sn(hs)}function To(e,t){if(e==="click")return sn(t)}function bt(e,t){if(e==="input"||e==="change")return sn(t)}function ms(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var la=typeof Object.is=="function"?Object.is:ms;function gs(e,t){if(la(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var a=Object.keys(e),n=Object.keys(t);if(a.length!==n.length)return!1;for(n=0;n<a.length;n++){var i=a[n];if(!Ha.call(t,i)||!la(e[i],t[i]))return!1}return!0}function Ru(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Au(e,t){var a=Ru(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=Ru(a)}}function Je(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Je(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Mo(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=tn(e.document);t instanceof e.HTMLIFrameElement;){try{var a=typeof t.contentWindow.location.href=="string"}catch{a=!1}if(a)e=t.contentWindow;else break;t=tn(e.document)}return t}function er(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}var _u=nn&&"documentMode"in document&&11>=document.documentMode,bl=null,tr=null,Xt=null,ar=!1;function ys(e,t,a){var n=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;ar||bl==null||bl!==tn(n)||(n=bl,"selectionStart"in n&&er(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}),Xt&&gs(Xt,n)||(Xt=n,n=bc(tr,"onSelect"),0<n.length&&(t=new rs("onSelect","select",null,t,a),e.push({event:t,listeners:n}),t.target=bl)))}function Ln(e,t){var a={};return a[e.toLowerCase()]=t.toLowerCase(),a["Webkit"+e]="webkit"+t,a["Moz"+e]="moz"+t,a}var Sl={animationend:Ln("Animation","AnimationEnd"),animationiteration:Ln("Animation","AnimationIteration"),animationstart:Ln("Animation","AnimationStart"),transitionrun:Ln("Transition","TransitionRun"),transitionstart:Ln("Transition","TransitionStart"),transitioncancel:Ln("Transition","TransitionCancel"),transitionend:Ln("Transition","TransitionEnd")},li={},ku={};nn&&(ku=document.createElement("div").style,"AnimationEvent"in window||(delete Sl.animationend.animation,delete Sl.animationiteration.animation,delete Sl.animationstart.animation),"TransitionEvent"in window||delete Sl.transitionend.transition);function qn(e){if(li[e])return li[e];if(!Sl[e])return e;var t=Sl[e],a;for(a in t)if(t.hasOwnProperty(a)&&a in ku)return li[e]=t[a];return e}var zu=qn("animationend"),Uu=qn("animationiteration"),nr=qn("animationstart"),Co=qn("transitionrun"),Oo=qn("transitionstart"),Hu=qn("transitioncancel"),si=qn("transitionend"),ri=new Map,ii="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(" ");ii.push("scrollEnd");function xa(e,t){ri.set(e,t),Sn(t,[e])}var wl=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},ua=[],Va=0,xs=0;function Nl(){for(var e=Va,t=xs=Va=0;t<e;){var a=ua[t];ua[t++]=null;var n=ua[t];ua[t++]=null;var i=ua[t];ua[t++]=null;var c=ua[t];if(ua[t++]=null,n!==null&&i!==null){var p=n.pending;p===null?i.next=i:(i.next=p.next,p.next=i),n.pending=i}c!==0&&ps(a,i,c)}}function Ba(e,t,a,n){ua[Va++]=e,ua[Va++]=t,ua[Va++]=a,ua[Va++]=n,xs|=n,e.lanes|=n,e=e.alternate,e!==null&&(e.lanes|=n)}function lr(e,t,a,n){return Ba(e,t,a,n),vs(e)}function Ya(e,t){return Ba(e,null,null,t),vs(e)}function ps(e,t,a){e.lanes|=a;var n=e.alternate;n!==null&&(n.lanes|=a);for(var i=!1,c=e.return;c!==null;)c.childLanes|=a,n=c.alternate,n!==null&&(n.childLanes|=a),c.tag===22&&(e=c.stateNode,e===null||e._visibility&1||(i=!0)),e=c,c=c.return;return e.tag===3?(c=e.stateNode,i&&t!==null&&(i=31-zt(a),e=c.hiddenUpdates,n=e[i],n===null?e[i]=[t]:n.push(t),t.lane=a|536870912),c):null}function vs(e){if(50<Di)throw Di=0,Cd=null,Error(o(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Ca={};function sr(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 Jt(e,t,a,n){return new sr(e,t,a,n)}function rr(e){return e=e.prototype,!(!e||!e.isReactComponent)}function $a(e,t){var a=e.alternate;return a===null?(a=Jt(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 Lu(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 ir(e,t,a,n,i,c){var p=0;if(n=e,typeof e=="function")rr(e)&&(p=1);else if(typeof e=="string")p=Mp(e,a,xe.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case A:return e=Jt(31,a,t,i),e.elementType=A,e.lanes=c,e;case T:return Fa(a.children,i,c,t);case B:p=8,i|=24;break;case X:return e=Jt(12,a,t,i|2),e.elementType=X,e.lanes=c,e;case le:return e=Jt(13,a,t,i),e.elementType=le,e.lanes=c,e;case K:return e=Jt(19,a,t,i),e.elementType=K,e.lanes=c,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case F:p=10;break e;case Q:p=9;break e;case ae:p=11;break e;case P:p=14;break e;case J:p=16,n=null;break e}p=29,a=Error(o(130,e===null?"null":typeof e,"")),n=null}return t=Jt(p,a,t,i),t.elementType=e,t.type=n,t.lanes=c,t}function Fa(e,t,a,n){return e=Jt(7,e,n,t),e.lanes=a,e}function ui(e,t,a){return e=Jt(6,e,null,t),e.lanes=a,e}function qu(e){var t=Jt(18,null,null,0);return t.stateNode=e,t}function jl(e,t,a){return t=Jt(4,e.children!==null?e.children:[],e.key,t),t.lanes=a,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var ci=new WeakMap;function pa(e,t){if(typeof e=="object"&&e!==null){var a=ci.get(e);return a!==void 0?a:(t={value:e,source:t,stack:xn(t)},ci.set(e,t),t)}return{value:e,source:t,stack:xn(t)}}var Vn=[],Bn=0,bs=null,rn=0,sa=[],je=0,va=null,Ga=1,m="";function r(e,t){Vn[Bn++]=rn,Vn[Bn++]=bs,bs=e,rn=t}function h(e,t,a){sa[je++]=Ga,sa[je++]=m,sa[je++]=va,va=e;var n=Ga;e=m;var i=32-zt(n)-1;n&=~(1<<i),a+=1;var c=32-zt(t)+i;if(30<c){var p=i-i%5;c=(n&(1<<p)-1).toString(32),n>>=p,i-=p,Ga=1<<32-zt(t)+i|a<<i|n,m=c+e}else Ga=1<<c|a<<i|n,m=e}function v(e){e.return!==null&&(r(e,1),h(e,1,0))}function N(e){for(;e===bs;)bs=Vn[--Bn],Vn[Bn]=null,rn=Vn[--Bn],Vn[Bn]=null;for(;e===va;)va=sa[--je],sa[je]=null,m=sa[--je],sa[je]=null,Ga=sa[--je],sa[je]=null}function C(e,t){sa[je++]=Ga,sa[je++]=m,sa[je++]=va,Ga=t.id,m=t.overflow,va=e}var U=null,H=null,q=!1,fe=null,ve=!1,Le=Error(o(519));function We(e){var t=Error(o(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw un(pa(t,e)),Le}function Re(e){var t=e.stateNode,a=e.type,n=e.memoizedProps;switch(t[Ot]=e,t[Bt]=n,a){case"dialog":Qe("cancel",t),Qe("close",t);break;case"iframe":case"object":case"embed":Qe("load",t);break;case"video":case"audio":for(a=0;a<Ai.length;a++)Qe(Ai[a],t);break;case"source":Qe("error",t);break;case"img":case"image":case"link":Qe("error",t),Qe("load",t);break;case"details":Qe("toggle",t);break;case"input":Qe("invalid",t),fl(t,n.value,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name,!0);break;case"select":Qe("invalid",t);break;case"textarea":Qe("invalid",t),Zr(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||h0(t.textContent,a)?(n.popover!=null&&(Qe("beforetoggle",t),Qe("toggle",t)),n.onScroll!=null&&Qe("scroll",t),n.onScrollEnd!=null&&Qe("scrollend",t),n.onClick!=null&&(t.onclick=qa),t=!0):t=!1,t||We(e,!0)}function Tt(e){for(U=e.return;U;)switch(U.tag){case 5:case 31:case 13:ve=!1;return;case 27:case 3:ve=!0;return;default:U=U.return}}function Gt(e){if(e!==U)return!1;if(!q)return Tt(e),q=!0,!1;var t=e.tag,a;if((a=t!==3&&t!==27)&&((a=t===5)&&(a=e.type,a=!(a!=="form"&&a!=="button")||$d(e.type,e.memoizedProps)),a=!a),a&&H&&We(e),Tt(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));H=w0(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));H=w0(e)}else t===27?(t=H,Hl(e.type)?(e=Pd,Pd=null,H=e):H=t):H=U?Wa(e.stateNode.nextSibling):null;return!0}function Zt(){H=U=null,q=!1}function Tn(){var e=fe;return e!==null&&(Na===null?Na=e:Na.push.apply(Na,e),fe=null),e}function un(e){fe===null?fe=[e]:fe.push(e)}var ur=z(null),Yn=null,Za=null;function Mn(e,t,a){me(ur,t._currentValue),t._currentValue=a}function cn(e){e._currentValue=ur.current,I(ur)}function oi(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 $n(e,t,a,n){var i=e.child;for(i!==null&&(i.return=e);i!==null;){var c=i.dependencies;if(c!==null){var p=i.child;c=c.firstContext;e:for(;c!==null;){var E=c;c=i;for(var O=0;O<t.length;O++)if(E.context===t[O]){c.lanes|=a,E=c.alternate,E!==null&&(E.lanes|=a),oi(c.return,a,e),n||(p=null);break e}c=E.next}}else if(i.tag===18){if(p=i.return,p===null)throw Error(o(341));p.lanes|=a,c=p.alternate,c!==null&&(c.lanes|=a),oi(p,a,e),p=null}else p=i.child;if(p!==null)p.return=i;else for(p=i;p!==null;){if(p===e){p=null;break}if(i=p.sibling,i!==null){i.return=p.return,p=i;break}p=p.return}i=p}}function Qa(e,t,a,n){e=null;for(var i=t,c=!1;i!==null;){if(!c){if((i.flags&524288)!==0)c=!0;else if((i.flags&262144)!==0)break}if(i.tag===10){var p=i.alternate;if(p===null)throw Error(o(387));if(p=p.memoizedProps,p!==null){var E=i.type;la(i.pendingProps.value,p.value)||(e!==null?e.push(E):e=[E])}}else if(i===He.current){if(p=i.alternate,p===null)throw Error(o(387));p.memoizedState.memoizedState!==i.memoizedState.memoizedState&&(e!==null?e.push(Hi):e=[Hi])}i=i.return}e!==null&&$n(t,e,a,n),t.flags|=262144}function cr(e){for(e=e.firstContext;e!==null;){if(!la(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Ss(e){Yn=e,Za=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Kt(e){return Jf(Yn,e)}function Vu(e,t){return Yn===null&&Ss(e),Jf(e,t)}function Jf(e,t){var a=t._currentValue;if(t={context:t,memoizedValue:a,next:null},Za===null){if(e===null)throw Error(o(308));Za=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Za=Za.next=t;return a}var Nx=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()})}},jx=l.unstable_scheduleCallback,Ex=l.unstable_NormalPriority,Ht={$$typeof:F,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Do(){return{controller:new Nx,data:new Map,refCount:0}}function di(e){e.refCount--,e.refCount===0&&jx(Ex,function(){e.controller.abort()})}var fi=null,Ro=0,or=0,dr=null;function Tx(e,t){if(fi===null){var a=fi=[];Ro=0,or=kd(),dr={status:"pending",value:void 0,then:function(n){a.push(n)}}}return Ro++,t.then(Kf,Kf),t}function Kf(){if(--Ro===0&&fi!==null){dr!==null&&(dr.status="fulfilled");var e=fi;fi=null,or=0,dr=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function Mx(e,t){var a=[],n={status:"pending",value:null,reason:null,then:function(i){a.push(i)}};return e.then(function(){n.status="fulfilled",n.value=t;for(var i=0;i<a.length;i++)(0,a[i])(t)},function(i){for(n.status="rejected",n.reason=i,i=0;i<a.length;i++)(0,a[i])(void 0)}),n}var eh=Y.S;Y.S=function(e,t){Hm=ze(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&Tx(e,t),eh!==null&&eh(e,t)};var ws=z(null);function Ao(){var e=ws.current;return e!==null?e:yt.pooledCache}function Bu(e,t){t===null?me(ws,ws.current):me(ws,t.pool)}function th(){var e=Ao();return e===null?null:{parent:Ht._currentValue,pool:e}}var fr=Error(o(460)),_o=Error(o(474)),Yu=Error(o(542)),$u={then:function(){}};function ah(e){return e=e.status,e==="fulfilled"||e==="rejected"}function nh(e,t,a){switch(a=e[a],a===void 0?e.push(t):a!==t&&(t.then(qa,qa),t=a),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,sh(e),e;default:if(typeof t.status=="string")t.then(qa,qa);else{if(e=yt,e!==null&&100<e.shellSuspendCounter)throw Error(o(482));e=t,e.status="pending",e.then(function(n){if(t.status==="pending"){var i=t;i.status="fulfilled",i.value=n}},function(n){if(t.status==="pending"){var i=t;i.status="rejected",i.reason=n}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,sh(e),e}throw js=t,fr}}function Ns(e){try{var t=e._init;return t(e._payload)}catch(a){throw a!==null&&typeof a=="object"&&typeof a.then=="function"?(js=a,fr):a}}var js=null;function lh(){if(js===null)throw Error(o(459));var e=js;return js=null,e}function sh(e){if(e===fr||e===Yu)throw Error(o(483))}var hr=null,hi=0;function Fu(e){var t=hi;return hi+=1,hr===null&&(hr=[]),nh(hr,e,t)}function mi(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Gu(e,t){throw t.$$typeof===M?Error(o(525)):(e=Object.prototype.toString.call(t),Error(o(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function rh(e){function t($,L){if(e){var G=$.deletions;G===null?($.deletions=[L],$.flags|=16):G.push(L)}}function a($,L){if(!e)return null;for(;L!==null;)t($,L),L=L.sibling;return null}function n($){for(var L=new Map;$!==null;)$.key!==null?L.set($.key,$):L.set($.index,$),$=$.sibling;return L}function i($,L){return $=$a($,L),$.index=0,$.sibling=null,$}function c($,L,G){return $.index=G,e?(G=$.alternate,G!==null?(G=G.index,G<L?($.flags|=67108866,L):G):($.flags|=67108866,L)):($.flags|=1048576,L)}function p($){return e&&$.alternate===null&&($.flags|=67108866),$}function E($,L,G,ue){return L===null||L.tag!==6?(L=ui(G,$.mode,ue),L.return=$,L):(L=i(L,G),L.return=$,L)}function O($,L,G,ue){var Ce=G.type;return Ce===T?se($,L,G.props.children,ue,G.key):L!==null&&(L.elementType===Ce||typeof Ce=="object"&&Ce!==null&&Ce.$$typeof===J&&Ns(Ce)===L.type)?(L=i(L,G.props),mi(L,G),L.return=$,L):(L=ir(G.type,G.key,G.props,null,$.mode,ue),mi(L,G),L.return=$,L)}function Z($,L,G,ue){return L===null||L.tag!==4||L.stateNode.containerInfo!==G.containerInfo||L.stateNode.implementation!==G.implementation?(L=jl(G,$.mode,ue),L.return=$,L):(L=i(L,G.children||[]),L.return=$,L)}function se($,L,G,ue,Ce){return L===null||L.tag!==7?(L=Fa(G,$.mode,ue,Ce),L.return=$,L):(L=i(L,G),L.return=$,L)}function oe($,L,G){if(typeof L=="string"&&L!==""||typeof L=="number"||typeof L=="bigint")return L=ui(""+L,$.mode,G),L.return=$,L;if(typeof L=="object"&&L!==null){switch(L.$$typeof){case D:return G=ir(L.type,L.key,L.props,null,$.mode,G),mi(G,L),G.return=$,G;case _:return L=jl(L,$.mode,G),L.return=$,L;case J:return L=Ns(L),oe($,L,G)}if(he(L)||R(L))return L=Fa(L,$.mode,G,null),L.return=$,L;if(typeof L.then=="function")return oe($,Fu(L),G);if(L.$$typeof===F)return oe($,Vu($,L),G);Gu($,L)}return null}function W($,L,G,ue){var Ce=L!==null?L.key:null;if(typeof G=="string"&&G!==""||typeof G=="number"||typeof G=="bigint")return Ce!==null?null:E($,L,""+G,ue);if(typeof G=="object"&&G!==null){switch(G.$$typeof){case D:return G.key===Ce?O($,L,G,ue):null;case _:return G.key===Ce?Z($,L,G,ue):null;case J:return G=Ns(G),W($,L,G,ue)}if(he(G)||R(G))return Ce!==null?null:se($,L,G,ue,null);if(typeof G.then=="function")return W($,L,Fu(G),ue);if(G.$$typeof===F)return W($,L,Vu($,G),ue);Gu($,G)}return null}function te($,L,G,ue,Ce){if(typeof ue=="string"&&ue!==""||typeof ue=="number"||typeof ue=="bigint")return $=$.get(G)||null,E(L,$,""+ue,Ce);if(typeof ue=="object"&&ue!==null){switch(ue.$$typeof){case D:return $=$.get(ue.key===null?G:ue.key)||null,O(L,$,ue,Ce);case _:return $=$.get(ue.key===null?G:ue.key)||null,Z(L,$,ue,Ce);case J:return ue=Ns(ue),te($,L,G,ue,Ce)}if(he(ue)||R(ue))return $=$.get(G)||null,se(L,$,ue,Ce,null);if(typeof ue.then=="function")return te($,L,G,Fu(ue),Ce);if(ue.$$typeof===F)return te($,L,G,Vu(L,ue),Ce);Gu(L,ue)}return null}function be($,L,G,ue){for(var Ce=null,tt=null,we=L,$e=L=0,Xe=null;we!==null&&$e<G.length;$e++){we.index>$e?(Xe=we,we=null):Xe=we.sibling;var at=W($,we,G[$e],ue);if(at===null){we===null&&(we=Xe);break}e&&we&&at.alternate===null&&t($,we),L=c(at,L,$e),tt===null?Ce=at:tt.sibling=at,tt=at,we=Xe}if($e===G.length)return a($,we),q&&r($,$e),Ce;if(we===null){for(;$e<G.length;$e++)we=oe($,G[$e],ue),we!==null&&(L=c(we,L,$e),tt===null?Ce=we:tt.sibling=we,tt=we);return q&&r($,$e),Ce}for(we=n(we);$e<G.length;$e++)Xe=te(we,$,$e,G[$e],ue),Xe!==null&&(e&&Xe.alternate!==null&&we.delete(Xe.key===null?$e:Xe.key),L=c(Xe,L,$e),tt===null?Ce=Xe:tt.sibling=Xe,tt=Xe);return e&&we.forEach(function(Yl){return t($,Yl)}),q&&r($,$e),Ce}function Ae($,L,G,ue){if(G==null)throw Error(o(151));for(var Ce=null,tt=null,we=L,$e=L=0,Xe=null,at=G.next();we!==null&&!at.done;$e++,at=G.next()){we.index>$e?(Xe=we,we=null):Xe=we.sibling;var Yl=W($,we,at.value,ue);if(Yl===null){we===null&&(we=Xe);break}e&&we&&Yl.alternate===null&&t($,we),L=c(Yl,L,$e),tt===null?Ce=Yl:tt.sibling=Yl,tt=Yl,we=Xe}if(at.done)return a($,we),q&&r($,$e),Ce;if(we===null){for(;!at.done;$e++,at=G.next())at=oe($,at.value,ue),at!==null&&(L=c(at,L,$e),tt===null?Ce=at:tt.sibling=at,tt=at);return q&&r($,$e),Ce}for(we=n(we);!at.done;$e++,at=G.next())at=te(we,$,$e,at.value,ue),at!==null&&(e&&at.alternate!==null&&we.delete(at.key===null?$e:at.key),L=c(at,L,$e),tt===null?Ce=at:tt.sibling=at,tt=at);return e&&we.forEach(function(Lp){return t($,Lp)}),q&&r($,$e),Ce}function ht($,L,G,ue){if(typeof G=="object"&&G!==null&&G.type===T&&G.key===null&&(G=G.props.children),typeof G=="object"&&G!==null){switch(G.$$typeof){case D:e:{for(var Ce=G.key;L!==null;){if(L.key===Ce){if(Ce=G.type,Ce===T){if(L.tag===7){a($,L.sibling),ue=i(L,G.props.children),ue.return=$,$=ue;break e}}else if(L.elementType===Ce||typeof Ce=="object"&&Ce!==null&&Ce.$$typeof===J&&Ns(Ce)===L.type){a($,L.sibling),ue=i(L,G.props),mi(ue,G),ue.return=$,$=ue;break e}a($,L);break}else t($,L);L=L.sibling}G.type===T?(ue=Fa(G.props.children,$.mode,ue,G.key),ue.return=$,$=ue):(ue=ir(G.type,G.key,G.props,null,$.mode,ue),mi(ue,G),ue.return=$,$=ue)}return p($);case _:e:{for(Ce=G.key;L!==null;){if(L.key===Ce)if(L.tag===4&&L.stateNode.containerInfo===G.containerInfo&&L.stateNode.implementation===G.implementation){a($,L.sibling),ue=i(L,G.children||[]),ue.return=$,$=ue;break e}else{a($,L);break}else t($,L);L=L.sibling}ue=jl(G,$.mode,ue),ue.return=$,$=ue}return p($);case J:return G=Ns(G),ht($,L,G,ue)}if(he(G))return be($,L,G,ue);if(R(G)){if(Ce=R(G),typeof Ce!="function")throw Error(o(150));return G=Ce.call(G),Ae($,L,G,ue)}if(typeof G.then=="function")return ht($,L,Fu(G),ue);if(G.$$typeof===F)return ht($,L,Vu($,G),ue);Gu($,G)}return typeof G=="string"&&G!==""||typeof G=="number"||typeof G=="bigint"?(G=""+G,L!==null&&L.tag===6?(a($,L.sibling),ue=i(L,G),ue.return=$,$=ue):(a($,L),ue=ui(G,$.mode,ue),ue.return=$,$=ue),p($)):a($,L)}return function($,L,G,ue){try{hi=0;var Ce=ht($,L,G,ue);return hr=null,Ce}catch(we){if(we===fr||we===Yu)throw we;var tt=Jt(29,we,null,$.mode);return tt.lanes=ue,tt.return=$,tt}finally{}}}var Es=rh(!0),ih=rh(!1),El=!1;function ko(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function zo(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Tl(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Ml(e,t,a){var n=e.updateQueue;if(n===null)return null;if(n=n.shared,(lt&2)!==0){var i=n.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),n.pending=t,t=vs(e),ps(e,null,a),t}return Ba(e,n,t,a),vs(e)}function gi(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,ma(e,a)}}function Uo(e,t){var a=e.updateQueue,n=e.alternate;if(n!==null&&(n=n.updateQueue,a===n)){var i=null,c=null;if(a=a.firstBaseUpdate,a!==null){do{var p={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};c===null?i=c=p:c=c.next=p,a=a.next}while(a!==null);c===null?i=c=t:c=c.next=t}else i=c=t;a={baseState:n.baseState,firstBaseUpdate:i,lastBaseUpdate:c,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 Ho=!1;function yi(){if(Ho){var e=dr;if(e!==null)throw e}}function xi(e,t,a,n){Ho=!1;var i=e.updateQueue;El=!1;var c=i.firstBaseUpdate,p=i.lastBaseUpdate,E=i.shared.pending;if(E!==null){i.shared.pending=null;var O=E,Z=O.next;O.next=null,p===null?c=Z:p.next=Z,p=O;var se=e.alternate;se!==null&&(se=se.updateQueue,E=se.lastBaseUpdate,E!==p&&(E===null?se.firstBaseUpdate=Z:E.next=Z,se.lastBaseUpdate=O))}if(c!==null){var oe=i.baseState;p=0,se=Z=O=null,E=c;do{var W=E.lane&-536870913,te=W!==E.lane;if(te?(Ie&W)===W:(n&W)===W){W!==0&&W===or&&(Ho=!0),se!==null&&(se=se.next={lane:0,tag:E.tag,payload:E.payload,callback:null,next:null});e:{var be=e,Ae=E;W=t;var ht=a;switch(Ae.tag){case 1:if(be=Ae.payload,typeof be=="function"){oe=be.call(ht,oe,W);break e}oe=be;break e;case 3:be.flags=be.flags&-65537|128;case 0:if(be=Ae.payload,W=typeof be=="function"?be.call(ht,oe,W):be,W==null)break e;oe=j({},oe,W);break e;case 2:El=!0}}W=E.callback,W!==null&&(e.flags|=64,te&&(e.flags|=8192),te=i.callbacks,te===null?i.callbacks=[W]:te.push(W))}else te={lane:W,tag:E.tag,payload:E.payload,callback:E.callback,next:null},se===null?(Z=se=te,O=oe):se=se.next=te,p|=W;if(E=E.next,E===null){if(E=i.shared.pending,E===null)break;te=E,E=te.next,te.next=null,i.lastBaseUpdate=te,i.shared.pending=null}}while(!0);se===null&&(O=oe),i.baseState=O,i.firstBaseUpdate=Z,i.lastBaseUpdate=se,c===null&&(i.shared.lanes=0),Al|=p,e.lanes=p,e.memoizedState=oe}}function uh(e,t){if(typeof e!="function")throw Error(o(191,e));e.call(t)}function ch(e,t){var a=e.callbacks;if(a!==null)for(e.callbacks=null,e=0;e<a.length;e++)uh(a[e],t)}var mr=z(null),Zu=z(0);function oh(e,t){e=Jn,me(Zu,e),me(mr,t),Jn=e|t.baseLanes}function Lo(){me(Zu,Jn),me(mr,mr.current)}function qo(){Jn=Zu.current,I(mr),I(Zu)}var Oa=z(null),Pa=null;function Cl(e){var t=e.alternate;me(At,At.current&1),me(Oa,e),Pa===null&&(t===null||mr.current!==null||t.memoizedState!==null)&&(Pa=e)}function Vo(e){me(At,At.current),me(Oa,e),Pa===null&&(Pa=e)}function dh(e){e.tag===22?(me(At,At.current),me(Oa,e),Pa===null&&(Pa=e)):Ol()}function Ol(){me(At,At.current),me(Oa,Oa.current)}function Da(e){I(Oa),Pa===e&&(Pa=null),I(At)}var At=z(0);function Qu(e){for(var t=e;t!==null;){if(t.tag===13){var a=t.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||Zd(a)||Qd(a)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder==="forwards"||t.memoizedProps.revealOrder==="backwards"||t.memoizedProps.revealOrder==="unstable_legacy-backwards"||t.memoizedProps.revealOrder==="together")){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Fn=0,Be=null,dt=null,Lt=null,Pu=!1,gr=!1,Ts=!1,Wu=0,pi=0,yr=null,Cx=0;function Mt(){throw Error(o(321))}function Bo(e,t){if(t===null)return!1;for(var a=0;a<t.length&&a<e.length;a++)if(!la(e[a],t[a]))return!1;return!0}function Yo(e,t,a,n,i,c){return Fn=c,Be=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Y.H=e===null||e.memoizedState===null?Ph:nd,Ts=!1,c=a(n,i),Ts=!1,gr&&(c=hh(t,a,n,i)),fh(e),c}function fh(e){Y.H=Si;var t=dt!==null&&dt.next!==null;if(Fn=0,Lt=dt=Be=null,Pu=!1,pi=0,yr=null,t)throw Error(o(300));e===null||qt||(e=e.dependencies,e!==null&&cr(e)&&(qt=!0))}function hh(e,t,a,n){Be=e;var i=0;do{if(gr&&(yr=null),pi=0,gr=!1,25<=i)throw Error(o(301));if(i+=1,Lt=dt=null,e.updateQueue!=null){var c=e.updateQueue;c.lastEffect=null,c.events=null,c.stores=null,c.memoCache!=null&&(c.memoCache.index=0)}Y.H=Wh,c=t(a,n)}while(gr);return c}function Ox(){var e=Y.H,t=e.useState()[0];return t=typeof t.then=="function"?vi(t):t,e=e.useState()[0],(dt!==null?dt.memoizedState:null)!==e&&(Be.flags|=1024),t}function $o(){var e=Wu!==0;return Wu=0,e}function Fo(e,t,a){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a}function Go(e){if(Pu){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Pu=!1}Fn=0,Lt=dt=Be=null,gr=!1,pi=Wu=0,yr=null}function ca(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Lt===null?Be.memoizedState=Lt=e:Lt=Lt.next=e,Lt}function _t(){if(dt===null){var e=Be.alternate;e=e!==null?e.memoizedState:null}else e=dt.next;var t=Lt===null?Be.memoizedState:Lt.next;if(t!==null)Lt=t,dt=e;else{if(e===null)throw Be.alternate===null?Error(o(467)):Error(o(310));dt=e,e={memoizedState:dt.memoizedState,baseState:dt.baseState,baseQueue:dt.baseQueue,queue:dt.queue,next:null},Lt===null?Be.memoizedState=Lt=e:Lt=Lt.next=e}return Lt}function Iu(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function vi(e){var t=pi;return pi+=1,yr===null&&(yr=[]),e=nh(yr,e,t),t=Be,(Lt===null?t.memoizedState:Lt.next)===null&&(t=t.alternate,Y.H=t===null||t.memoizedState===null?Ph:nd),e}function Xu(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return vi(e);if(e.$$typeof===F)return Kt(e)}throw Error(o(438,String(e)))}function Zo(e){var t=null,a=Be.updateQueue;if(a!==null&&(t=a.memoCache),t==null){var n=Be.alternate;n!==null&&(n=n.updateQueue,n!==null&&(n=n.memoCache,n!=null&&(t={data:n.data.map(function(i){return i.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),a===null&&(a=Iu(),Be.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]=k;return t.index++,a}function Gn(e,t){return typeof t=="function"?t(e):t}function Ju(e){var t=_t();return Qo(t,dt,e)}function Qo(e,t,a){var n=e.queue;if(n===null)throw Error(o(311));n.lastRenderedReducer=a;var i=e.baseQueue,c=n.pending;if(c!==null){if(i!==null){var p=i.next;i.next=c.next,c.next=p}t.baseQueue=i=c,n.pending=null}if(c=e.baseState,i===null)e.memoizedState=c;else{t=i.next;var E=p=null,O=null,Z=t,se=!1;do{var oe=Z.lane&-536870913;if(oe!==Z.lane?(Ie&oe)===oe:(Fn&oe)===oe){var W=Z.revertLane;if(W===0)O!==null&&(O=O.next={lane:0,revertLane:0,gesture:null,action:Z.action,hasEagerState:Z.hasEagerState,eagerState:Z.eagerState,next:null}),oe===or&&(se=!0);else if((Fn&W)===W){Z=Z.next,W===or&&(se=!0);continue}else oe={lane:0,revertLane:Z.revertLane,gesture:null,action:Z.action,hasEagerState:Z.hasEagerState,eagerState:Z.eagerState,next:null},O===null?(E=O=oe,p=c):O=O.next=oe,Be.lanes|=W,Al|=W;oe=Z.action,Ts&&a(c,oe),c=Z.hasEagerState?Z.eagerState:a(c,oe)}else W={lane:oe,revertLane:Z.revertLane,gesture:Z.gesture,action:Z.action,hasEagerState:Z.hasEagerState,eagerState:Z.eagerState,next:null},O===null?(E=O=W,p=c):O=O.next=W,Be.lanes|=oe,Al|=oe;Z=Z.next}while(Z!==null&&Z!==t);if(O===null?p=c:O.next=E,!la(c,e.memoizedState)&&(qt=!0,se&&(a=dr,a!==null)))throw a;e.memoizedState=c,e.baseState=p,e.baseQueue=O,n.lastRenderedState=c}return i===null&&(n.lanes=0),[e.memoizedState,n.dispatch]}function Po(e){var t=_t(),a=t.queue;if(a===null)throw Error(o(311));a.lastRenderedReducer=e;var n=a.dispatch,i=a.pending,c=t.memoizedState;if(i!==null){a.pending=null;var p=i=i.next;do c=e(c,p.action),p=p.next;while(p!==i);la(c,t.memoizedState)||(qt=!0),t.memoizedState=c,t.baseQueue===null&&(t.baseState=c),a.lastRenderedState=c}return[c,n]}function mh(e,t,a){var n=Be,i=_t(),c=q;if(c){if(a===void 0)throw Error(o(407));a=a()}else a=t();var p=!la((dt||i).memoizedState,a);if(p&&(i.memoizedState=a,qt=!0),i=i.queue,Xo(xh.bind(null,n,i,e),[e]),i.getSnapshot!==t||p||Lt!==null&&Lt.memoizedState.tag&1){if(n.flags|=2048,xr(9,{destroy:void 0},yh.bind(null,n,i,a,t),null),yt===null)throw Error(o(349));c||(Fn&127)!==0||gh(n,t,a)}return a}function gh(e,t,a){e.flags|=16384,e={getSnapshot:t,value:a},t=Be.updateQueue,t===null?(t=Iu(),Be.updateQueue=t,t.stores=[e]):(a=t.stores,a===null?t.stores=[e]:a.push(e))}function yh(e,t,a,n){t.value=a,t.getSnapshot=n,ph(t)&&vh(e)}function xh(e,t,a){return a(function(){ph(t)&&vh(e)})}function ph(e){var t=e.getSnapshot;e=e.value;try{var a=t();return!la(e,a)}catch{return!0}}function vh(e){var t=Ya(e,2);t!==null&&ja(t,e,2)}function Wo(e){var t=ca();if(typeof e=="function"){var a=e;if(e=a(),Ts){vt(!0);try{a()}finally{vt(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Gn,lastRenderedState:e},t}function bh(e,t,a,n){return e.baseState=a,Qo(e,dt,typeof n=="function"?n:Gn)}function Dx(e,t,a,n,i){if(tc(e))throw Error(o(485));if(e=t.action,e!==null){var c={payload:i,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(p){c.listeners.push(p)}};Y.T!==null?a(!0):c.isTransition=!1,n(c),a=t.pending,a===null?(c.next=t.pending=c,Sh(t,c)):(c.next=a.next,t.pending=a.next=c)}}function Sh(e,t){var a=t.action,n=t.payload,i=e.state;if(t.isTransition){var c=Y.T,p={};Y.T=p;try{var E=a(i,n),O=Y.S;O!==null&&O(p,E),wh(e,t,E)}catch(Z){Io(e,t,Z)}finally{c!==null&&p.types!==null&&(c.types=p.types),Y.T=c}}else try{c=a(i,n),wh(e,t,c)}catch(Z){Io(e,t,Z)}}function wh(e,t,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(function(n){Nh(e,t,n)},function(n){return Io(e,t,n)}):Nh(e,t,a)}function Nh(e,t,a){t.status="fulfilled",t.value=a,jh(t),e.state=a,t=e.pending,t!==null&&(a=t.next,a===t?e.pending=null:(a=a.next,t.next=a,Sh(e,a)))}function Io(e,t,a){var n=e.pending;if(e.pending=null,n!==null){n=n.next;do t.status="rejected",t.reason=a,jh(t),t=t.next;while(t!==n)}e.action=null}function jh(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Eh(e,t){return t}function Th(e,t){if(q){var a=yt.formState;if(a!==null){e:{var n=Be;if(q){if(H){t:{for(var i=H,c=ve;i.nodeType!==8;){if(!c){i=null;break t}if(i=Wa(i.nextSibling),i===null){i=null;break t}}c=i.data,i=c==="F!"||c==="F"?i:null}if(i){H=Wa(i.nextSibling),n=i.data==="F!";break e}}We(n)}n=!1}n&&(t=a[0])}}return a=ca(),a.memoizedState=a.baseState=t,n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Eh,lastRenderedState:t},a.queue=n,a=Gh.bind(null,Be,n),n.dispatch=a,n=Wo(!1),c=ad.bind(null,Be,!1,n.queue),n=ca(),i={state:t,dispatch:null,action:e,pending:null},n.queue=i,a=Dx.bind(null,Be,i,c,a),i.dispatch=a,n.memoizedState=e,[t,a,!1]}function Mh(e){var t=_t();return Ch(t,dt,e)}function Ch(e,t,a){if(t=Qo(e,t,Eh)[0],e=Ju(Gn)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var n=vi(t)}catch(p){throw p===fr?Yu:p}else n=t;t=_t();var i=t.queue,c=i.dispatch;return a!==t.memoizedState&&(Be.flags|=2048,xr(9,{destroy:void 0},Rx.bind(null,i,a),null)),[n,c,e]}function Rx(e,t){e.action=t}function Oh(e){var t=_t(),a=dt;if(a!==null)return Ch(t,a,e);_t(),t=t.memoizedState,a=_t();var n=a.queue.dispatch;return a.memoizedState=e,[t,n,!1]}function xr(e,t,a,n){return e={tag:e,create:a,deps:n,inst:t,next:null},t=Be.updateQueue,t===null&&(t=Iu(),Be.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 Dh(){return _t().memoizedState}function Ku(e,t,a,n){var i=ca();Be.flags|=e,i.memoizedState=xr(1|t,{destroy:void 0},a,n===void 0?null:n)}function ec(e,t,a,n){var i=_t();n=n===void 0?null:n;var c=i.memoizedState.inst;dt!==null&&n!==null&&Bo(n,dt.memoizedState.deps)?i.memoizedState=xr(t,c,a,n):(Be.flags|=e,i.memoizedState=xr(1|t,c,a,n))}function Rh(e,t){Ku(8390656,8,e,t)}function Xo(e,t){ec(2048,8,e,t)}function Ax(e){Be.flags|=4;var t=Be.updateQueue;if(t===null)t=Iu(),Be.updateQueue=t,t.events=[e];else{var a=t.events;a===null?t.events=[e]:a.push(e)}}function Ah(e){var t=_t().memoizedState;return Ax({ref:t,nextImpl:e}),function(){if((lt&2)!==0)throw Error(o(440));return t.impl.apply(void 0,arguments)}}function _h(e,t){return ec(4,2,e,t)}function kh(e,t){return ec(4,4,e,t)}function zh(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 Uh(e,t,a){a=a!=null?a.concat([e]):null,ec(4,4,zh.bind(null,t,e),a)}function Jo(){}function Hh(e,t){var a=_t();t=t===void 0?null:t;var n=a.memoizedState;return t!==null&&Bo(t,n[1])?n[0]:(a.memoizedState=[e,t],e)}function Lh(e,t){var a=_t();t=t===void 0?null:t;var n=a.memoizedState;if(t!==null&&Bo(t,n[1]))return n[0];if(n=e(),Ts){vt(!0);try{e()}finally{vt(!1)}}return a.memoizedState=[n,t],n}function Ko(e,t,a){return a===void 0||(Fn&1073741824)!==0&&(Ie&261930)===0?e.memoizedState=t:(e.memoizedState=a,e=qm(),Be.lanes|=e,Al|=e,a)}function qh(e,t,a,n){return la(a,t)?a:mr.current!==null?(e=Ko(e,a,n),la(e,t)||(qt=!0),e):(Fn&42)===0||(Fn&1073741824)!==0&&(Ie&261930)===0?(qt=!0,e.memoizedState=a):(e=qm(),Be.lanes|=e,Al|=e,t)}function Vh(e,t,a,n,i){var c=re.p;re.p=c!==0&&8>c?c:8;var p=Y.T,E={};Y.T=E,ad(e,!1,t,a);try{var O=i(),Z=Y.S;if(Z!==null&&Z(E,O),O!==null&&typeof O=="object"&&typeof O.then=="function"){var se=Mx(O,n);bi(e,t,se,_a(e))}else bi(e,t,n,_a(e))}catch(oe){bi(e,t,{then:function(){},status:"rejected",reason:oe},_a())}finally{re.p=c,p!==null&&E.types!==null&&(p.types=E.types),Y.T=p}}function _x(){}function ed(e,t,a,n){if(e.tag!==5)throw Error(o(476));var i=Bh(e).queue;Vh(e,i,t,ye,a===null?_x:function(){return Yh(e),a(n)})}function Bh(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:Gn,lastRenderedState:ye},next:null};var a={};return t.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Gn,lastRenderedState:a},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Yh(e){var t=Bh(e);t.next===null&&(t=e.alternate.memoizedState),bi(e,t.next.queue,{},_a())}function td(){return Kt(Hi)}function $h(){return _t().memoizedState}function Fh(){return _t().memoizedState}function kx(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var a=_a();e=Tl(a);var n=Ml(t,e,a);n!==null&&(ja(n,t,a),gi(n,t,a)),t={cache:Do()},e.payload=t;return}t=t.return}}function zx(e,t,a){var n=_a();a={lane:n,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},tc(e)?Zh(t,a):(a=lr(e,t,a,n),a!==null&&(ja(a,e,n),Qh(a,t,n)))}function Gh(e,t,a){var n=_a();bi(e,t,a,n)}function bi(e,t,a,n){var i={lane:n,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(tc(e))Zh(t,i);else{var c=e.alternate;if(e.lanes===0&&(c===null||c.lanes===0)&&(c=t.lastRenderedReducer,c!==null))try{var p=t.lastRenderedState,E=c(p,a);if(i.hasEagerState=!0,i.eagerState=E,la(E,p))return Ba(e,t,i,0),yt===null&&Nl(),!1}catch{}finally{}if(a=lr(e,t,i,n),a!==null)return ja(a,e,n),Qh(a,t,n),!0}return!1}function ad(e,t,a,n){if(n={lane:2,revertLane:kd(),gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},tc(e)){if(t)throw Error(o(479))}else t=lr(e,a,n,2),t!==null&&ja(t,e,2)}function tc(e){var t=e.alternate;return e===Be||t!==null&&t===Be}function Zh(e,t){gr=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,ma(e,a)}}var Si={readContext:Kt,use:Xu,useCallback:Mt,useContext:Mt,useEffect:Mt,useImperativeHandle:Mt,useLayoutEffect:Mt,useInsertionEffect:Mt,useMemo:Mt,useReducer:Mt,useRef:Mt,useState:Mt,useDebugValue:Mt,useDeferredValue:Mt,useTransition:Mt,useSyncExternalStore:Mt,useId:Mt,useHostTransitionStatus:Mt,useFormState:Mt,useActionState:Mt,useOptimistic:Mt,useMemoCache:Mt,useCacheRefresh:Mt};Si.useEffectEvent=Mt;var Ph={readContext:Kt,use:Xu,useCallback:function(e,t){return ca().memoizedState=[e,t===void 0?null:t],e},useContext:Kt,useEffect:Rh,useImperativeHandle:function(e,t,a){a=a!=null?a.concat([e]):null,Ku(4194308,4,zh.bind(null,t,e),a)},useLayoutEffect:function(e,t){return Ku(4194308,4,e,t)},useInsertionEffect:function(e,t){Ku(4,2,e,t)},useMemo:function(e,t){var a=ca();t=t===void 0?null:t;var n=e();if(Ts){vt(!0);try{e()}finally{vt(!1)}}return a.memoizedState=[n,t],n},useReducer:function(e,t,a){var n=ca();if(a!==void 0){var i=a(t);if(Ts){vt(!0);try{a(t)}finally{vt(!1)}}}else i=t;return n.memoizedState=n.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},n.queue=e,e=e.dispatch=zx.bind(null,Be,e),[n.memoizedState,e]},useRef:function(e){var t=ca();return e={current:e},t.memoizedState=e},useState:function(e){e=Wo(e);var t=e.queue,a=Gh.bind(null,Be,t);return t.dispatch=a,[e.memoizedState,a]},useDebugValue:Jo,useDeferredValue:function(e,t){var a=ca();return Ko(a,e,t)},useTransition:function(){var e=Wo(!1);return e=Vh.bind(null,Be,e.queue,!0,!1),ca().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,a){var n=Be,i=ca();if(q){if(a===void 0)throw Error(o(407));a=a()}else{if(a=t(),yt===null)throw Error(o(349));(Ie&127)!==0||gh(n,t,a)}i.memoizedState=a;var c={value:a,getSnapshot:t};return i.queue=c,Rh(xh.bind(null,n,c,e),[e]),n.flags|=2048,xr(9,{destroy:void 0},yh.bind(null,n,c,a,t),null),a},useId:function(){var e=ca(),t=yt.identifierPrefix;if(q){var a=m,n=Ga;a=(n&~(1<<32-zt(n)-1)).toString(32)+a,t="_"+t+"R_"+a,a=Wu++,0<a&&(t+="H"+a.toString(32)),t+="_"}else a=Cx++,t="_"+t+"r_"+a.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:td,useFormState:Th,useActionState:Th,useOptimistic:function(e){var t=ca();t.memoizedState=t.baseState=e;var a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=a,t=ad.bind(null,Be,!0,a),a.dispatch=t,[e,t]},useMemoCache:Zo,useCacheRefresh:function(){return ca().memoizedState=kx.bind(null,Be)},useEffectEvent:function(e){var t=ca(),a={impl:e};return t.memoizedState=a,function(){if((lt&2)!==0)throw Error(o(440));return a.impl.apply(void 0,arguments)}}},nd={readContext:Kt,use:Xu,useCallback:Hh,useContext:Kt,useEffect:Xo,useImperativeHandle:Uh,useInsertionEffect:_h,useLayoutEffect:kh,useMemo:Lh,useReducer:Ju,useRef:Dh,useState:function(){return Ju(Gn)},useDebugValue:Jo,useDeferredValue:function(e,t){var a=_t();return qh(a,dt.memoizedState,e,t)},useTransition:function(){var e=Ju(Gn)[0],t=_t().memoizedState;return[typeof e=="boolean"?e:vi(e),t]},useSyncExternalStore:mh,useId:$h,useHostTransitionStatus:td,useFormState:Mh,useActionState:Mh,useOptimistic:function(e,t){var a=_t();return bh(a,dt,e,t)},useMemoCache:Zo,useCacheRefresh:Fh};nd.useEffectEvent=Ah;var Wh={readContext:Kt,use:Xu,useCallback:Hh,useContext:Kt,useEffect:Xo,useImperativeHandle:Uh,useInsertionEffect:_h,useLayoutEffect:kh,useMemo:Lh,useReducer:Po,useRef:Dh,useState:function(){return Po(Gn)},useDebugValue:Jo,useDeferredValue:function(e,t){var a=_t();return dt===null?Ko(a,e,t):qh(a,dt.memoizedState,e,t)},useTransition:function(){var e=Po(Gn)[0],t=_t().memoizedState;return[typeof e=="boolean"?e:vi(e),t]},useSyncExternalStore:mh,useId:$h,useHostTransitionStatus:td,useFormState:Oh,useActionState:Oh,useOptimistic:function(e,t){var a=_t();return dt!==null?bh(a,dt,e,t):(a.baseState=e,[e,a.queue.dispatch])},useMemoCache:Zo,useCacheRefresh:Fh};Wh.useEffectEvent=Ah;function ld(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 sd={enqueueSetState:function(e,t,a){e=e._reactInternals;var n=_a(),i=Tl(n);i.payload=t,a!=null&&(i.callback=a),t=Ml(e,i,n),t!==null&&(ja(t,e,n),gi(t,e,n))},enqueueReplaceState:function(e,t,a){e=e._reactInternals;var n=_a(),i=Tl(n);i.tag=1,i.payload=t,a!=null&&(i.callback=a),t=Ml(e,i,n),t!==null&&(ja(t,e,n),gi(t,e,n))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var a=_a(),n=Tl(a);n.tag=2,t!=null&&(n.callback=t),t=Ml(e,n,a),t!==null&&(ja(t,e,a),gi(t,e,a))}};function Ih(e,t,a,n,i,c,p){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(n,c,p):t.prototype&&t.prototype.isPureReactComponent?!gs(a,n)||!gs(i,c):!0}function Xh(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&&sd.enqueueReplaceState(t,t.state,null)}function Ms(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 i in e)a[i]===void 0&&(a[i]=e[i])}return a}function Jh(e){wl(e)}function Kh(e){console.error(e)}function em(e){wl(e)}function ac(e,t){try{var a=e.onUncaughtError;a(t.value,{componentStack:t.stack})}catch(n){setTimeout(function(){throw n})}}function tm(e,t,a){try{var n=e.onCaughtError;n(a.value,{componentStack:a.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(i){setTimeout(function(){throw i})}}function rd(e,t,a){return a=Tl(a),a.tag=3,a.payload={element:null},a.callback=function(){ac(e,t)},a}function am(e){return e=Tl(e),e.tag=3,e}function nm(e,t,a,n){var i=a.type.getDerivedStateFromError;if(typeof i=="function"){var c=n.value;e.payload=function(){return i(c)},e.callback=function(){tm(t,a,n)}}var p=a.stateNode;p!==null&&typeof p.componentDidCatch=="function"&&(e.callback=function(){tm(t,a,n),typeof i!="function"&&(_l===null?_l=new Set([this]):_l.add(this));var E=n.stack;this.componentDidCatch(n.value,{componentStack:E!==null?E:""})})}function Ux(e,t,a,n,i){if(a.flags|=32768,n!==null&&typeof n=="object"&&typeof n.then=="function"){if(t=a.alternate,t!==null&&Qa(t,a,i,!0),a=Oa.current,a!==null){switch(a.tag){case 31:case 13:return Pa===null?mc():a.alternate===null&&Ct===0&&(Ct=3),a.flags&=-257,a.flags|=65536,a.lanes=i,n===$u?a.flags|=16384:(t=a.updateQueue,t===null?a.updateQueue=new Set([n]):t.add(n),Rd(e,n,i)),!1;case 22:return a.flags|=65536,n===$u?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)),Rd(e,n,i)),!1}throw Error(o(435,a.tag))}return Rd(e,n,i),mc(),!1}if(q)return t=Oa.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=i,n!==Le&&(e=Error(o(422),{cause:n}),un(pa(e,a)))):(n!==Le&&(t=Error(o(423),{cause:n}),un(pa(t,a))),e=e.current.alternate,e.flags|=65536,i&=-i,e.lanes|=i,n=pa(n,a),i=rd(e.stateNode,n,i),Uo(e,i),Ct!==4&&(Ct=2)),!1;var c=Error(o(520),{cause:n});if(c=pa(c,a),Oi===null?Oi=[c]:Oi.push(c),Ct!==4&&(Ct=2),t===null)return!0;n=pa(n,a),a=t;do{switch(a.tag){case 3:return a.flags|=65536,e=i&-i,a.lanes|=e,e=rd(a.stateNode,n,e),Uo(a,e),!1;case 1:if(t=a.type,c=a.stateNode,(a.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||c!==null&&typeof c.componentDidCatch=="function"&&(_l===null||!_l.has(c))))return a.flags|=65536,i&=-i,a.lanes|=i,i=am(i),nm(i,e,a,n),Uo(a,i),!1}a=a.return}while(a!==null);return!1}var id=Error(o(461)),qt=!1;function ea(e,t,a,n){t.child=e===null?ih(t,null,a,n):Es(t,e.child,a,n)}function lm(e,t,a,n,i){a=a.render;var c=t.ref;if("ref"in n){var p={};for(var E in n)E!=="ref"&&(p[E]=n[E])}else p=n;return Ss(t),n=Yo(e,t,a,p,c,i),E=$o(),e!==null&&!qt?(Fo(e,t,i),Zn(e,t,i)):(q&&E&&v(t),t.flags|=1,ea(e,t,n,i),t.child)}function sm(e,t,a,n,i){if(e===null){var c=a.type;return typeof c=="function"&&!rr(c)&&c.defaultProps===void 0&&a.compare===null?(t.tag=15,t.type=c,rm(e,t,c,n,i)):(e=ir(a.type,null,n,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(c=e.child,!gd(e,i)){var p=c.memoizedProps;if(a=a.compare,a=a!==null?a:gs,a(p,n)&&e.ref===t.ref)return Zn(e,t,i)}return t.flags|=1,e=$a(c,n),e.ref=t.ref,e.return=t,t.child=e}function rm(e,t,a,n,i){if(e!==null){var c=e.memoizedProps;if(gs(c,n)&&e.ref===t.ref)if(qt=!1,t.pendingProps=n=c,gd(e,i))(e.flags&131072)!==0&&(qt=!0);else return t.lanes=e.lanes,Zn(e,t,i)}return ud(e,t,a,n,i)}function im(e,t,a,n){var i=n.children,c=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(c=c!==null?c.baseLanes|a:a,e!==null){for(n=t.child=e.child,i=0;n!==null;)i=i|n.lanes|n.childLanes,n=n.sibling;n=i&~c}else n=0,t.child=null;return um(e,t,c,a,n)}if((a&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Bu(t,c!==null?c.cachePool:null),c!==null?oh(t,c):Lo(),dh(t);else return n=t.lanes=536870912,um(e,t,c!==null?c.baseLanes|a:a,a,n)}else c!==null?(Bu(t,c.cachePool),oh(t,c),Ol(),t.memoizedState=null):(e!==null&&Bu(t,null),Lo(),Ol());return ea(e,t,i,a),t.child}function wi(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function um(e,t,a,n,i){var c=Ao();return c=c===null?null:{parent:Ht._currentValue,pool:c},t.memoizedState={baseLanes:a,cachePool:c},e!==null&&Bu(t,null),Lo(),dh(t),e!==null&&Qa(e,t,n,!0),t.childLanes=i,null}function nc(e,t){return t=sc({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function cm(e,t,a){return Es(t,e.child,null,a),e=nc(t,t.pendingProps),e.flags|=2,Da(t),t.memoizedState=null,e}function Hx(e,t,a){var n=t.pendingProps,i=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(q){if(n.mode==="hidden")return e=nc(t,n),t.lanes=536870912,wi(null,e);if(Vo(t),(e=H)?(e=S0(e,ve),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:va!==null?{id:Ga,overflow:m}:null,retryLane:536870912,hydrationErrors:null},a=qu(e),a.return=t,t.child=a,U=t,H=null)):e=null,e===null)throw We(t);return t.lanes=536870912,null}return nc(t,n)}var c=e.memoizedState;if(c!==null){var p=c.dehydrated;if(Vo(t),i)if(t.flags&256)t.flags&=-257,t=cm(e,t,a);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(o(558));else if(qt||Qa(e,t,a,!1),i=(a&e.childLanes)!==0,qt||i){if(n=yt,n!==null&&(p=Br(n,a),p!==0&&p!==c.retryLane))throw c.retryLane=p,Ya(e,p),ja(n,e,p),id;mc(),t=cm(e,t,a)}else e=c.treeContext,H=Wa(p.nextSibling),U=t,q=!0,fe=null,ve=!1,e!==null&&C(t,e),t=nc(t,n),t.flags|=4096;return t}return e=$a(e.child,{mode:n.mode,children:n.children}),e.ref=t.ref,t.child=e,e.return=t,e}function lc(e,t){var a=t.ref;if(a===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof a!="function"&&typeof a!="object")throw Error(o(284));(e===null||e.ref!==a)&&(t.flags|=4194816)}}function ud(e,t,a,n,i){return Ss(t),a=Yo(e,t,a,n,void 0,i),n=$o(),e!==null&&!qt?(Fo(e,t,i),Zn(e,t,i)):(q&&n&&v(t),t.flags|=1,ea(e,t,a,i),t.child)}function om(e,t,a,n,i,c){return Ss(t),t.updateQueue=null,a=hh(t,n,a,i),fh(e),n=$o(),e!==null&&!qt?(Fo(e,t,c),Zn(e,t,c)):(q&&n&&v(t),t.flags|=1,ea(e,t,a,c),t.child)}function dm(e,t,a,n,i){if(Ss(t),t.stateNode===null){var c=Ca,p=a.contextType;typeof p=="object"&&p!==null&&(c=Kt(p)),c=new a(n,c),t.memoizedState=c.state!==null&&c.state!==void 0?c.state:null,c.updater=sd,t.stateNode=c,c._reactInternals=t,c=t.stateNode,c.props=n,c.state=t.memoizedState,c.refs={},ko(t),p=a.contextType,c.context=typeof p=="object"&&p!==null?Kt(p):Ca,c.state=t.memoizedState,p=a.getDerivedStateFromProps,typeof p=="function"&&(ld(t,a,p,n),c.state=t.memoizedState),typeof a.getDerivedStateFromProps=="function"||typeof c.getSnapshotBeforeUpdate=="function"||typeof c.UNSAFE_componentWillMount!="function"&&typeof c.componentWillMount!="function"||(p=c.state,typeof c.componentWillMount=="function"&&c.componentWillMount(),typeof c.UNSAFE_componentWillMount=="function"&&c.UNSAFE_componentWillMount(),p!==c.state&&sd.enqueueReplaceState(c,c.state,null),xi(t,n,c,i),yi(),c.state=t.memoizedState),typeof c.componentDidMount=="function"&&(t.flags|=4194308),n=!0}else if(e===null){c=t.stateNode;var E=t.memoizedProps,O=Ms(a,E);c.props=O;var Z=c.context,se=a.contextType;p=Ca,typeof se=="object"&&se!==null&&(p=Kt(se));var oe=a.getDerivedStateFromProps;se=typeof oe=="function"||typeof c.getSnapshotBeforeUpdate=="function",E=t.pendingProps!==E,se||typeof c.UNSAFE_componentWillReceiveProps!="function"&&typeof c.componentWillReceiveProps!="function"||(E||Z!==p)&&Xh(t,c,n,p),El=!1;var W=t.memoizedState;c.state=W,xi(t,n,c,i),yi(),Z=t.memoizedState,E||W!==Z||El?(typeof oe=="function"&&(ld(t,a,oe,n),Z=t.memoizedState),(O=El||Ih(t,a,O,n,W,Z,p))?(se||typeof c.UNSAFE_componentWillMount!="function"&&typeof c.componentWillMount!="function"||(typeof c.componentWillMount=="function"&&c.componentWillMount(),typeof c.UNSAFE_componentWillMount=="function"&&c.UNSAFE_componentWillMount()),typeof c.componentDidMount=="function"&&(t.flags|=4194308)):(typeof c.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=n,t.memoizedState=Z),c.props=n,c.state=Z,c.context=p,n=O):(typeof c.componentDidMount=="function"&&(t.flags|=4194308),n=!1)}else{c=t.stateNode,zo(e,t),p=t.memoizedProps,se=Ms(a,p),c.props=se,oe=t.pendingProps,W=c.context,Z=a.contextType,O=Ca,typeof Z=="object"&&Z!==null&&(O=Kt(Z)),E=a.getDerivedStateFromProps,(Z=typeof E=="function"||typeof c.getSnapshotBeforeUpdate=="function")||typeof c.UNSAFE_componentWillReceiveProps!="function"&&typeof c.componentWillReceiveProps!="function"||(p!==oe||W!==O)&&Xh(t,c,n,O),El=!1,W=t.memoizedState,c.state=W,xi(t,n,c,i),yi();var te=t.memoizedState;p!==oe||W!==te||El||e!==null&&e.dependencies!==null&&cr(e.dependencies)?(typeof E=="function"&&(ld(t,a,E,n),te=t.memoizedState),(se=El||Ih(t,a,se,n,W,te,O)||e!==null&&e.dependencies!==null&&cr(e.dependencies))?(Z||typeof c.UNSAFE_componentWillUpdate!="function"&&typeof c.componentWillUpdate!="function"||(typeof c.componentWillUpdate=="function"&&c.componentWillUpdate(n,te,O),typeof c.UNSAFE_componentWillUpdate=="function"&&c.UNSAFE_componentWillUpdate(n,te,O)),typeof c.componentDidUpdate=="function"&&(t.flags|=4),typeof c.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof c.componentDidUpdate!="function"||p===e.memoizedProps&&W===e.memoizedState||(t.flags|=4),typeof c.getSnapshotBeforeUpdate!="function"||p===e.memoizedProps&&W===e.memoizedState||(t.flags|=1024),t.memoizedProps=n,t.memoizedState=te),c.props=n,c.state=te,c.context=O,n=se):(typeof c.componentDidUpdate!="function"||p===e.memoizedProps&&W===e.memoizedState||(t.flags|=4),typeof c.getSnapshotBeforeUpdate!="function"||p===e.memoizedProps&&W===e.memoizedState||(t.flags|=1024),n=!1)}return c=n,lc(e,t),n=(t.flags&128)!==0,c||n?(c=t.stateNode,a=n&&typeof a.getDerivedStateFromError!="function"?null:c.render(),t.flags|=1,e!==null&&n?(t.child=Es(t,e.child,null,i),t.child=Es(t,null,a,i)):ea(e,t,a,i),t.memoizedState=c.state,e=t.child):e=Zn(e,t,i),e}function fm(e,t,a,n){return Zt(),t.flags|=256,ea(e,t,a,n),t.child}var cd={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function od(e){return{baseLanes:e,cachePool:th()}}function dd(e,t,a){return e=e!==null?e.childLanes&~a:0,t&&(e|=Aa),e}function hm(e,t,a){var n=t.pendingProps,i=!1,c=(t.flags&128)!==0,p;if((p=c)||(p=e!==null&&e.memoizedState===null?!1:(At.current&2)!==0),p&&(i=!0,t.flags&=-129),p=(t.flags&32)!==0,t.flags&=-33,e===null){if(q){if(i?Cl(t):Ol(),(e=H)?(e=S0(e,ve),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:va!==null?{id:Ga,overflow:m}:null,retryLane:536870912,hydrationErrors:null},a=qu(e),a.return=t,t.child=a,U=t,H=null)):e=null,e===null)throw We(t);return Qd(e)?t.lanes=32:t.lanes=536870912,null}var E=n.children;return n=n.fallback,i?(Ol(),i=t.mode,E=sc({mode:"hidden",children:E},i),n=Fa(n,i,a,null),E.return=t,n.return=t,E.sibling=n,t.child=E,n=t.child,n.memoizedState=od(a),n.childLanes=dd(e,p,a),t.memoizedState=cd,wi(null,n)):(Cl(t),fd(t,E))}var O=e.memoizedState;if(O!==null&&(E=O.dehydrated,E!==null)){if(c)t.flags&256?(Cl(t),t.flags&=-257,t=hd(e,t,a)):t.memoizedState!==null?(Ol(),t.child=e.child,t.flags|=128,t=null):(Ol(),E=n.fallback,i=t.mode,n=sc({mode:"visible",children:n.children},i),E=Fa(E,i,a,null),E.flags|=2,n.return=t,E.return=t,n.sibling=E,t.child=n,Es(t,e.child,null,a),n=t.child,n.memoizedState=od(a),n.childLanes=dd(e,p,a),t.memoizedState=cd,t=wi(null,n));else if(Cl(t),Qd(E)){if(p=E.nextSibling&&E.nextSibling.dataset,p)var Z=p.dgst;p=Z,n=Error(o(419)),n.stack="",n.digest=p,un({value:n,source:null,stack:null}),t=hd(e,t,a)}else if(qt||Qa(e,t,a,!1),p=(a&e.childLanes)!==0,qt||p){if(p=yt,p!==null&&(n=Br(p,a),n!==0&&n!==O.retryLane))throw O.retryLane=n,Ya(e,n),ja(p,e,n),id;Zd(E)||mc(),t=hd(e,t,a)}else Zd(E)?(t.flags|=192,t.child=e.child,t=null):(e=O.treeContext,H=Wa(E.nextSibling),U=t,q=!0,fe=null,ve=!1,e!==null&&C(t,e),t=fd(t,n.children),t.flags|=4096);return t}return i?(Ol(),E=n.fallback,i=t.mode,O=e.child,Z=O.sibling,n=$a(O,{mode:"hidden",children:n.children}),n.subtreeFlags=O.subtreeFlags&65011712,Z!==null?E=$a(Z,E):(E=Fa(E,i,a,null),E.flags|=2),E.return=t,n.return=t,n.sibling=E,t.child=n,wi(null,n),n=t.child,E=e.child.memoizedState,E===null?E=od(a):(i=E.cachePool,i!==null?(O=Ht._currentValue,i=i.parent!==O?{parent:O,pool:O}:i):i=th(),E={baseLanes:E.baseLanes|a,cachePool:i}),n.memoizedState=E,n.childLanes=dd(e,p,a),t.memoizedState=cd,wi(e.child,n)):(Cl(t),a=e.child,e=a.sibling,a=$a(a,{mode:"visible",children:n.children}),a.return=t,a.sibling=null,e!==null&&(p=t.deletions,p===null?(t.deletions=[e],t.flags|=16):p.push(e)),t.child=a,t.memoizedState=null,a)}function fd(e,t){return t=sc({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function sc(e,t){return e=Jt(22,e,null,t),e.lanes=0,e}function hd(e,t,a){return Es(t,e.child,null,a),e=fd(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function mm(e,t,a){e.lanes|=t;var n=e.alternate;n!==null&&(n.lanes|=t),oi(e.return,t,a)}function md(e,t,a,n,i,c){var p=e.memoizedState;p===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:n,tail:a,tailMode:i,treeForkCount:c}:(p.isBackwards=t,p.rendering=null,p.renderingStartTime=0,p.last=n,p.tail=a,p.tailMode=i,p.treeForkCount=c)}function gm(e,t,a){var n=t.pendingProps,i=n.revealOrder,c=n.tail;n=n.children;var p=At.current,E=(p&2)!==0;if(E?(p=p&1|2,t.flags|=128):p&=1,me(At,p),ea(e,t,n,a),n=q?rn:0,!E&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&mm(e,a,t);else if(e.tag===19)mm(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(i){case"forwards":for(a=t.child,i=null;a!==null;)e=a.alternate,e!==null&&Qu(e)===null&&(i=a),a=a.sibling;a=i,a===null?(i=t.child,t.child=null):(i=a.sibling,a.sibling=null),md(t,!1,i,a,c,n);break;case"backwards":case"unstable_legacy-backwards":for(a=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&Qu(e)===null){t.child=i;break}e=i.sibling,i.sibling=a,a=i,i=e}md(t,!0,a,null,c,n);break;case"together":md(t,!1,null,null,void 0,n);break;default:t.memoizedState=null}return t.child}function Zn(e,t,a){if(e!==null&&(t.dependencies=e.dependencies),Al|=t.lanes,(a&t.childLanes)===0)if(e!==null){if(Qa(e,t,a,!1),(a&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(o(153));if(t.child!==null){for(e=t.child,a=$a(e,e.pendingProps),t.child=a,a.return=t;e.sibling!==null;)e=e.sibling,a=a.sibling=$a(e,e.pendingProps),a.return=t;a.sibling=null}return t.child}function gd(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&cr(e)))}function Lx(e,t,a){switch(t.tag){case 3:Nt(t,t.stateNode.containerInfo),Mn(t,Ht,e.memoizedState.cache),Zt();break;case 27:case 5:Pt(t);break;case 4:Nt(t,t.stateNode.containerInfo);break;case 10:Mn(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Vo(t),null;break;case 13:var n=t.memoizedState;if(n!==null)return n.dehydrated!==null?(Cl(t),t.flags|=128,null):(a&t.child.childLanes)!==0?hm(e,t,a):(Cl(t),e=Zn(e,t,a),e!==null?e.sibling:null);Cl(t);break;case 19:var i=(e.flags&128)!==0;if(n=(a&t.childLanes)!==0,n||(Qa(e,t,a,!1),n=(a&t.childLanes)!==0),i){if(n)return gm(e,t,a);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),me(At,At.current),n)break;return null;case 22:return t.lanes=0,im(e,t,a,t.pendingProps);case 24:Mn(t,Ht,e.memoizedState.cache)}return Zn(e,t,a)}function ym(e,t,a){if(e!==null)if(e.memoizedProps!==t.pendingProps)qt=!0;else{if(!gd(e,a)&&(t.flags&128)===0)return qt=!1,Lx(e,t,a);qt=(e.flags&131072)!==0}else qt=!1,q&&(t.flags&1048576)!==0&&h(t,rn,t.index);switch(t.lanes=0,t.tag){case 16:e:{var n=t.pendingProps;if(e=Ns(t.elementType),t.type=e,typeof e=="function")rr(e)?(n=Ms(e,n),t.tag=1,t=dm(null,t,e,n,a)):(t.tag=0,t=ud(null,t,e,n,a));else{if(e!=null){var i=e.$$typeof;if(i===ae){t.tag=11,t=lm(null,t,e,n,a);break e}else if(i===P){t.tag=14,t=sm(null,t,e,n,a);break e}}throw t=ge(e)||e,Error(o(306,t,""))}}return t;case 0:return ud(e,t,t.type,t.pendingProps,a);case 1:return n=t.type,i=Ms(n,t.pendingProps),dm(e,t,n,i,a);case 3:e:{if(Nt(t,t.stateNode.containerInfo),e===null)throw Error(o(387));n=t.pendingProps;var c=t.memoizedState;i=c.element,zo(e,t),xi(t,n,null,a);var p=t.memoizedState;if(n=p.cache,Mn(t,Ht,n),n!==c.cache&&$n(t,[Ht],a,!0),yi(),n=p.element,c.isDehydrated)if(c={element:n,isDehydrated:!1,cache:p.cache},t.updateQueue.baseState=c,t.memoizedState=c,t.flags&256){t=fm(e,t,n,a);break e}else if(n!==i){i=pa(Error(o(424)),t),un(i),t=fm(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(H=Wa(e.firstChild),U=t,q=!0,fe=null,ve=!0,a=ih(t,null,n,a),t.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling}else{if(Zt(),n===i){t=Zn(e,t,a);break e}ea(e,t,n,a)}t=t.child}return t;case 26:return lc(e,t),e===null?(a=M0(t.type,null,t.pendingProps,null))?t.memoizedState=a:q||(a=t.type,e=t.pendingProps,n=Sc(Me.current).createElement(a),n[Ot]=t,n[Bt]=e,ta(n,a,e),Ut(n),t.stateNode=n):t.memoizedState=M0(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Pt(t),e===null&&q&&(n=t.stateNode=j0(t.type,t.pendingProps,Me.current),U=t,ve=!0,i=H,Hl(t.type)?(Pd=i,H=Wa(n.firstChild)):H=i),ea(e,t,t.pendingProps.children,a),lc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&q&&((i=n=H)&&(n=mp(n,t.type,t.pendingProps,ve),n!==null?(t.stateNode=n,U=t,H=Wa(n.firstChild),ve=!1,i=!0):i=!1),i||We(t)),Pt(t),i=t.type,c=t.pendingProps,p=e!==null?e.memoizedProps:null,n=c.children,$d(i,c)?n=null:p!==null&&$d(i,p)&&(t.flags|=32),t.memoizedState!==null&&(i=Yo(e,t,Ox,null,null,a),Hi._currentValue=i),lc(e,t),ea(e,t,n,a),t.child;case 6:return e===null&&q&&((e=a=H)&&(a=gp(a,t.pendingProps,ve),a!==null?(t.stateNode=a,U=t,H=null,e=!0):e=!1),e||We(t)),null;case 13:return hm(e,t,a);case 4:return Nt(t,t.stateNode.containerInfo),n=t.pendingProps,e===null?t.child=Es(t,null,n,a):ea(e,t,n,a),t.child;case 11:return lm(e,t,t.type,t.pendingProps,a);case 7:return ea(e,t,t.pendingProps,a),t.child;case 8:return ea(e,t,t.pendingProps.children,a),t.child;case 12:return ea(e,t,t.pendingProps.children,a),t.child;case 10:return n=t.pendingProps,Mn(t,t.type,n.value),ea(e,t,n.children,a),t.child;case 9:return i=t.type._context,n=t.pendingProps.children,Ss(t),i=Kt(i),n=n(i),t.flags|=1,ea(e,t,n,a),t.child;case 14:return sm(e,t,t.type,t.pendingProps,a);case 15:return rm(e,t,t.type,t.pendingProps,a);case 19:return gm(e,t,a);case 31:return Hx(e,t,a);case 22:return im(e,t,a,t.pendingProps);case 24:return Ss(t),n=Kt(Ht),e===null?(i=Ao(),i===null&&(i=yt,c=Do(),i.pooledCache=c,c.refCount++,c!==null&&(i.pooledCacheLanes|=a),i=c),t.memoizedState={parent:n,cache:i},ko(t),Mn(t,Ht,i)):((e.lanes&a)!==0&&(zo(e,t),xi(t,null,null,a),yi()),i=e.memoizedState,c=t.memoizedState,i.parent!==n?(i={parent:n,cache:n},t.memoizedState=i,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=i),Mn(t,Ht,n)):(n=c.cache,Mn(t,Ht,n),n!==i.cache&&$n(t,[Ht],a,!0))),ea(e,t,t.pendingProps.children,a),t.child;case 29:throw t.pendingProps}throw Error(o(156,t.tag))}function Qn(e){e.flags|=4}function yd(e,t,a,n,i){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(i&335544128)===i)if(e.stateNode.complete)e.flags|=8192;else if($m())e.flags|=8192;else throw js=$u,_o}else e.flags&=-16777217}function xm(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!A0(t))if($m())e.flags|=8192;else throw js=$u,_o}function rc(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Vr():536870912,e.lanes|=t,Sr|=t)}function Ni(e,t){if(!q)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 St(e){var t=e.alternate!==null&&e.alternate.child===e.child,a=0,n=0;if(t)for(var i=e.child;i!==null;)a|=i.lanes|i.childLanes,n|=i.subtreeFlags&65011712,n|=i.flags&65011712,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)a|=i.lanes|i.childLanes,n|=i.subtreeFlags,n|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=n,e.childLanes=a,t}function qx(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 St(t),null;case 1:return St(t),null;case 3:return a=t.stateNode,n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),cn(Ht),et(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(e===null||e.child===null)&&(Gt(t)?Qn(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Tn())),St(t),null;case 26:var i=t.type,c=t.memoizedState;return e===null?(Qn(t),c!==null?(St(t),xm(t,c)):(St(t),yd(t,i,null,n,a))):c?c!==e.memoizedState?(Qn(t),St(t),xm(t,c)):(St(t),t.flags&=-16777217):(e=e.memoizedProps,e!==n&&Qn(t),St(t),yd(t,i,e,n,a)),null;case 27:if(Ft(t),a=Me.current,i=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==n&&Qn(t);else{if(!n){if(t.stateNode===null)throw Error(o(166));return St(t),null}e=xe.current,Gt(t)?Re(t):(e=j0(i,n,a),t.stateNode=e,Qn(t))}return St(t),null;case 5:if(Ft(t),i=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==n&&Qn(t);else{if(!n){if(t.stateNode===null)throw Error(o(166));return St(t),null}if(c=xe.current,Gt(t))Re(t);else{var p=Sc(Me.current);switch(c){case 1:c=p.createElementNS("http://www.w3.org/2000/svg",i);break;case 2:c=p.createElementNS("http://www.w3.org/1998/Math/MathML",i);break;default:switch(i){case"svg":c=p.createElementNS("http://www.w3.org/2000/svg",i);break;case"math":c=p.createElementNS("http://www.w3.org/1998/Math/MathML",i);break;case"script":c=p.createElement("div"),c.innerHTML="<script><\/script>",c=c.removeChild(c.firstChild);break;case"select":c=typeof n.is=="string"?p.createElement("select",{is:n.is}):p.createElement("select"),n.multiple?c.multiple=!0:n.size&&(c.size=n.size);break;default:c=typeof n.is=="string"?p.createElement(i,{is:n.is}):p.createElement(i)}}c[Ot]=t,c[Bt]=n;e:for(p=t.child;p!==null;){if(p.tag===5||p.tag===6)c.appendChild(p.stateNode);else if(p.tag!==4&&p.tag!==27&&p.child!==null){p.child.return=p,p=p.child;continue}if(p===t)break e;for(;p.sibling===null;){if(p.return===null||p.return===t)break e;p=p.return}p.sibling.return=p.return,p=p.sibling}t.stateNode=c;e:switch(ta(c,i,n),i){case"button":case"input":case"select":case"textarea":n=!!n.autoFocus;break e;case"img":n=!0;break e;default:n=!1}n&&Qn(t)}}return St(t),yd(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,a),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==n&&Qn(t);else{if(typeof n!="string"&&t.stateNode===null)throw Error(o(166));if(e=Me.current,Gt(t)){if(e=t.stateNode,a=t.memoizedProps,n=null,i=U,i!==null)switch(i.tag){case 27:case 5:n=i.memoizedProps}e[Ot]=t,e=!!(e.nodeValue===a||n!==null&&n.suppressHydrationWarning===!0||h0(e.nodeValue,a)),e||We(t,!0)}else e=Sc(e).createTextNode(n),e[Ot]=t,t.stateNode=e}return St(t),null;case 31:if(a=t.memoizedState,e===null||e.memoizedState!==null){if(n=Gt(t),a!==null){if(e===null){if(!n)throw Error(o(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(557));e[Ot]=t}else Zt(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;St(t),e=!1}else a=Tn(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),e=!0;if(!e)return t.flags&256?(Da(t),t):(Da(t),null);if((t.flags&128)!==0)throw Error(o(558))}return St(t),null;case 13:if(n=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(i=Gt(t),n!==null&&n.dehydrated!==null){if(e===null){if(!i)throw Error(o(318));if(i=t.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(o(317));i[Ot]=t}else Zt(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;St(t),i=!1}else i=Tn(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=i),i=!0;if(!i)return t.flags&256?(Da(t),t):(Da(t),null)}return Da(t),(t.flags&128)!==0?(t.lanes=a,t):(a=n!==null,e=e!==null&&e.memoizedState!==null,a&&(n=t.child,i=null,n.alternate!==null&&n.alternate.memoizedState!==null&&n.alternate.memoizedState.cachePool!==null&&(i=n.alternate.memoizedState.cachePool.pool),c=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(c=n.memoizedState.cachePool.pool),c!==i&&(n.flags|=2048)),a!==e&&a&&(t.child.flags|=8192),rc(t,t.updateQueue),St(t),null);case 4:return et(),e===null&&Ld(t.stateNode.containerInfo),St(t),null;case 10:return cn(t.type),St(t),null;case 19:if(I(At),n=t.memoizedState,n===null)return St(t),null;if(i=(t.flags&128)!==0,c=n.rendering,c===null)if(i)Ni(n,!1);else{if(Ct!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(c=Qu(e),c!==null){for(t.flags|=128,Ni(n,!1),e=c.updateQueue,t.updateQueue=e,rc(t,e),t.subtreeFlags=0,e=a,a=t.child;a!==null;)Lu(a,e),a=a.sibling;return me(At,At.current&1|2),q&&r(t,n.treeForkCount),t.child}e=e.sibling}n.tail!==null&&ze()>dc&&(t.flags|=128,i=!0,Ni(n,!1),t.lanes=4194304)}else{if(!i)if(e=Qu(c),e!==null){if(t.flags|=128,i=!0,e=e.updateQueue,t.updateQueue=e,rc(t,e),Ni(n,!0),n.tail===null&&n.tailMode==="hidden"&&!c.alternate&&!q)return St(t),null}else 2*ze()-n.renderingStartTime>dc&&a!==536870912&&(t.flags|=128,i=!0,Ni(n,!1),t.lanes=4194304);n.isBackwards?(c.sibling=t.child,t.child=c):(e=n.last,e!==null?e.sibling=c:t.child=c,n.last=c)}return n.tail!==null?(e=n.tail,n.rendering=e,n.tail=e.sibling,n.renderingStartTime=ze(),e.sibling=null,a=At.current,me(At,i?a&1|2:a&1),q&&r(t,n.treeForkCount),e):(St(t),null);case 22:case 23:return Da(t),qo(),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&&(St(t),t.subtreeFlags&6&&(t.flags|=8192)):St(t),a=t.updateQueue,a!==null&&rc(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&&I(ws),null;case 24:return a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),cn(Ht),St(t),null;case 25:return null;case 30:return null}throw Error(o(156,t.tag))}function Vx(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 cn(Ht),et(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Ft(t),null;case 31:if(t.memoizedState!==null){if(Da(t),t.alternate===null)throw Error(o(340));Zt()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Da(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(o(340));Zt()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return I(At),null;case 4:return et(),null;case 10:return cn(t.type),null;case 22:case 23:return Da(t),qo(),e!==null&&I(ws),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return cn(Ht),null;case 25:return null;default:return null}}function pm(e,t){switch(N(t),t.tag){case 3:cn(Ht),et();break;case 26:case 27:case 5:Ft(t);break;case 4:et();break;case 31:t.memoizedState!==null&&Da(t);break;case 13:Da(t);break;case 19:I(At);break;case 10:cn(t.type);break;case 22:case 23:Da(t),qo(),e!==null&&I(ws);break;case 24:cn(Ht)}}function ji(e,t){try{var a=t.updateQueue,n=a!==null?a.lastEffect:null;if(n!==null){var i=n.next;a=i;do{if((a.tag&e)===e){n=void 0;var c=a.create,p=a.inst;n=c(),p.destroy=n}a=a.next}while(a!==i)}}catch(E){ct(t,t.return,E)}}function Dl(e,t,a){try{var n=t.updateQueue,i=n!==null?n.lastEffect:null;if(i!==null){var c=i.next;n=c;do{if((n.tag&e)===e){var p=n.inst,E=p.destroy;if(E!==void 0){p.destroy=void 0,i=t;var O=a,Z=E;try{Z()}catch(se){ct(i,O,se)}}}n=n.next}while(n!==c)}}catch(se){ct(t,t.return,se)}}function vm(e){var t=e.updateQueue;if(t!==null){var a=e.stateNode;try{ch(t,a)}catch(n){ct(e,e.return,n)}}}function bm(e,t,a){a.props=Ms(e.type,e.memoizedProps),a.state=e.memoizedState;try{a.componentWillUnmount()}catch(n){ct(e,t,n)}}function Ei(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(i){ct(e,t,i)}}function Cn(e,t){var a=e.ref,n=e.refCleanup;if(a!==null)if(typeof n=="function")try{n()}catch(i){ct(e,t,i)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof a=="function")try{a(null)}catch(i){ct(e,t,i)}else a.current=null}function Sm(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(i){ct(e,e.return,i)}}function xd(e,t,a){try{var n=e.stateNode;up(n,e.type,a,t),n[Bt]=t}catch(i){ct(e,e.return,i)}}function wm(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Hl(e.type)||e.tag===4}function pd(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||wm(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&&Hl(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function vd(e,t,a){var 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=qa));else if(n!==4&&(n===27&&Hl(e.type)&&(a=e.stateNode,t=null),e=e.child,e!==null))for(vd(e,t,a),e=e.sibling;e!==null;)vd(e,t,a),e=e.sibling}function ic(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&&Hl(e.type)&&(a=e.stateNode),e=e.child,e!==null))for(ic(e,t,a),e=e.sibling;e!==null;)ic(e,t,a),e=e.sibling}function Nm(e){var t=e.stateNode,a=e.memoizedProps;try{for(var n=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);ta(t,n,a),t[Ot]=e,t[Bt]=a}catch(c){ct(e,e.return,c)}}var Pn=!1,Vt=!1,bd=!1,jm=typeof WeakSet=="function"?WeakSet:Set,Qt=null;function Bx(e,t){if(e=e.containerInfo,Bd=Cc,e=Mo(e),er(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 i=n.anchorOffset,c=n.focusNode;n=n.focusOffset;try{a.nodeType,c.nodeType}catch{a=null;break e}var p=0,E=-1,O=-1,Z=0,se=0,oe=e,W=null;t:for(;;){for(var te;oe!==a||i!==0&&oe.nodeType!==3||(E=p+i),oe!==c||n!==0&&oe.nodeType!==3||(O=p+n),oe.nodeType===3&&(p+=oe.nodeValue.length),(te=oe.firstChild)!==null;)W=oe,oe=te;for(;;){if(oe===e)break t;if(W===a&&++Z===i&&(E=p),W===c&&++se===n&&(O=p),(te=oe.nextSibling)!==null)break;oe=W,W=oe.parentNode}oe=te}a=E===-1||O===-1?null:{start:E,end:O}}else a=null}a=a||{start:0,end:0}}else a=null;for(Yd={focusedElem:e,selectionRange:a},Cc=!1,Qt=t;Qt!==null;)if(t=Qt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Qt=e;else for(;Qt!==null;){switch(t=Qt,c=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++)i=e[a],i.ref.impl=i.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&c!==null){e=void 0,a=t,i=c.memoizedProps,c=c.memoizedState,n=a.stateNode;try{var be=Ms(a.type,i);e=n.getSnapshotBeforeUpdate(be,c),n.__reactInternalSnapshotBeforeUpdate=e}catch(Ae){ct(a,a.return,Ae)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,a=e.nodeType,a===9)Gd(e);else if(a===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Gd(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(o(163))}if(e=t.sibling,e!==null){e.return=t.return,Qt=e;break}Qt=t.return}}function Em(e,t,a){var n=a.flags;switch(a.tag){case 0:case 11:case 15:In(e,a),n&4&&ji(5,a);break;case 1:if(In(e,a),n&4)if(e=a.stateNode,t===null)try{e.componentDidMount()}catch(p){ct(a,a.return,p)}else{var i=Ms(a.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(p){ct(a,a.return,p)}}n&64&&vm(a),n&512&&Ei(a,a.return);break;case 3:if(In(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{ch(e,t)}catch(p){ct(a,a.return,p)}}break;case 27:t===null&&n&4&&Nm(a);case 26:case 5:In(e,a),t===null&&n&4&&Sm(a),n&512&&Ei(a,a.return);break;case 12:In(e,a);break;case 31:In(e,a),n&4&&Cm(e,a);break;case 13:In(e,a),n&4&&Om(e,a),n&64&&(e=a.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(a=Ix.bind(null,a),yp(e,a))));break;case 22:if(n=a.memoizedState!==null||Pn,!n){t=t!==null&&t.memoizedState!==null||Vt,i=Pn;var c=Vt;Pn=n,(Vt=t)&&!c?Xn(e,a,(a.subtreeFlags&8772)!==0):In(e,a),Pn=i,Vt=c}break;case 30:break;default:In(e,a)}}function Tm(e){var t=e.alternate;t!==null&&(e.alternate=null,Tm(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&$s(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 jt=null,ba=!1;function Wn(e,t,a){for(a=a.child;a!==null;)Mm(e,t,a),a=a.sibling}function Mm(e,t,a){if(pt&&typeof pt.onCommitFiberUnmount=="function")try{pt.onCommitFiberUnmount(nt,a)}catch{}switch(a.tag){case 26:Vt||Cn(a,t),Wn(e,t,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:Vt||Cn(a,t);var n=jt,i=ba;Hl(a.type)&&(jt=a.stateNode,ba=!1),Wn(e,t,a),ki(a.stateNode),jt=n,ba=i;break;case 5:Vt||Cn(a,t);case 6:if(n=jt,i=ba,jt=null,Wn(e,t,a),jt=n,ba=i,jt!==null)if(ba)try{(jt.nodeType===9?jt.body:jt.nodeName==="HTML"?jt.ownerDocument.body:jt).removeChild(a.stateNode)}catch(c){ct(a,t,c)}else try{jt.removeChild(a.stateNode)}catch(c){ct(a,t,c)}break;case 18:jt!==null&&(ba?(e=jt,v0(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,a.stateNode),Or(e)):v0(jt,a.stateNode));break;case 4:n=jt,i=ba,jt=a.stateNode.containerInfo,ba=!0,Wn(e,t,a),jt=n,ba=i;break;case 0:case 11:case 14:case 15:Dl(2,a,t),Vt||Dl(4,a,t),Wn(e,t,a);break;case 1:Vt||(Cn(a,t),n=a.stateNode,typeof n.componentWillUnmount=="function"&&bm(a,t,n)),Wn(e,t,a);break;case 21:Wn(e,t,a);break;case 22:Vt=(n=Vt)||a.memoizedState!==null,Wn(e,t,a),Vt=n;break;default:Wn(e,t,a)}}function Cm(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Or(e)}catch(a){ct(t,t.return,a)}}}function Om(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Or(e)}catch(a){ct(t,t.return,a)}}function Yx(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new jm),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new jm),t;default:throw Error(o(435,e.tag))}}function uc(e,t){var a=Yx(e);t.forEach(function(n){if(!a.has(n)){a.add(n);var i=Xx.bind(null,e,n);n.then(i,i)}})}function Sa(e,t){var a=t.deletions;if(a!==null)for(var n=0;n<a.length;n++){var i=a[n],c=e,p=t,E=p;e:for(;E!==null;){switch(E.tag){case 27:if(Hl(E.type)){jt=E.stateNode,ba=!1;break e}break;case 5:jt=E.stateNode,ba=!1;break e;case 3:case 4:jt=E.stateNode.containerInfo,ba=!0;break e}E=E.return}if(jt===null)throw Error(o(160));Mm(c,p,i),jt=null,ba=!1,c=i.alternate,c!==null&&(c.return=null),i.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Dm(t,e),t=t.sibling}var on=null;function Dm(e,t){var a=e.alternate,n=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Sa(t,e),wa(e),n&4&&(Dl(3,e,e.return),ji(3,e),Dl(5,e,e.return));break;case 1:Sa(t,e),wa(e),n&512&&(Vt||a===null||Cn(a,a.return)),n&64&&Pn&&(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 i=on;if(Sa(t,e),wa(e),n&512&&(Vt||a===null||Cn(a,a.return)),n&4){var c=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,i=i.ownerDocument||i;t:switch(n){case"title":c=i.getElementsByTagName("title")[0],(!c||c[Il]||c[Ot]||c.namespaceURI==="http://www.w3.org/2000/svg"||c.hasAttribute("itemprop"))&&(c=i.createElement(n),i.head.insertBefore(c,i.querySelector("head > title"))),ta(c,n,a),c[Ot]=e,Ut(c),n=c;break e;case"link":var p=D0("link","href",i).get(n+(a.href||""));if(p){for(var E=0;E<p.length;E++)if(c=p[E],c.getAttribute("href")===(a.href==null||a.href===""?null:a.href)&&c.getAttribute("rel")===(a.rel==null?null:a.rel)&&c.getAttribute("title")===(a.title==null?null:a.title)&&c.getAttribute("crossorigin")===(a.crossOrigin==null?null:a.crossOrigin)){p.splice(E,1);break t}}c=i.createElement(n),ta(c,n,a),i.head.appendChild(c);break;case"meta":if(p=D0("meta","content",i).get(n+(a.content||""))){for(E=0;E<p.length;E++)if(c=p[E],c.getAttribute("content")===(a.content==null?null:""+a.content)&&c.getAttribute("name")===(a.name==null?null:a.name)&&c.getAttribute("property")===(a.property==null?null:a.property)&&c.getAttribute("http-equiv")===(a.httpEquiv==null?null:a.httpEquiv)&&c.getAttribute("charset")===(a.charSet==null?null:a.charSet)){p.splice(E,1);break t}}c=i.createElement(n),ta(c,n,a),i.head.appendChild(c);break;default:throw Error(o(468,n))}c[Ot]=e,Ut(c),n=c}e.stateNode=n}else R0(i,e.type,e.stateNode);else e.stateNode=O0(i,n,e.memoizedProps);else c!==n?(c===null?a.stateNode!==null&&(a=a.stateNode,a.parentNode.removeChild(a)):c.count--,n===null?R0(i,e.type,e.stateNode):O0(i,n,e.memoizedProps)):n===null&&e.stateNode!==null&&xd(e,e.memoizedProps,a.memoizedProps)}break;case 27:Sa(t,e),wa(e),n&512&&(Vt||a===null||Cn(a,a.return)),a!==null&&n&4&&xd(e,e.memoizedProps,a.memoizedProps);break;case 5:if(Sa(t,e),wa(e),n&512&&(Vt||a===null||Cn(a,a.return)),e.flags&32){i=e.stateNode;try{an(i,"")}catch(be){ct(e,e.return,be)}}n&4&&e.stateNode!=null&&(i=e.memoizedProps,xd(e,i,a!==null?a.memoizedProps:i)),n&1024&&(bd=!0);break;case 6:if(Sa(t,e),wa(e),n&4){if(e.stateNode===null)throw Error(o(162));n=e.memoizedProps,a=e.stateNode;try{a.nodeValue=n}catch(be){ct(e,e.return,be)}}break;case 3:if(jc=null,i=on,on=wc(t.containerInfo),Sa(t,e),on=i,wa(e),n&4&&a!==null&&a.memoizedState.isDehydrated)try{Or(t.containerInfo)}catch(be){ct(e,e.return,be)}bd&&(bd=!1,Rm(e));break;case 4:n=on,on=wc(e.stateNode.containerInfo),Sa(t,e),wa(e),on=n;break;case 12:Sa(t,e),wa(e);break;case 31:Sa(t,e),wa(e),n&4&&(n=e.updateQueue,n!==null&&(e.updateQueue=null,uc(e,n)));break;case 13:Sa(t,e),wa(e),e.child.flags&8192&&e.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&(oc=ze()),n&4&&(n=e.updateQueue,n!==null&&(e.updateQueue=null,uc(e,n)));break;case 22:i=e.memoizedState!==null;var O=a!==null&&a.memoizedState!==null,Z=Pn,se=Vt;if(Pn=Z||i,Vt=se||O,Sa(t,e),Vt=se,Pn=Z,wa(e),n&8192)e:for(t=e.stateNode,t._visibility=i?t._visibility&-2:t._visibility|1,i&&(a===null||O||Pn||Vt||Cs(e)),a=null,t=e;;){if(t.tag===5||t.tag===26){if(a===null){O=a=t;try{if(c=O.stateNode,i)p=c.style,typeof p.setProperty=="function"?p.setProperty("display","none","important"):p.display="none";else{E=O.stateNode;var oe=O.memoizedProps.style,W=oe!=null&&oe.hasOwnProperty("display")?oe.display:null;E.style.display=W==null||typeof W=="boolean"?"":(""+W).trim()}}catch(be){ct(O,O.return,be)}}}else if(t.tag===6){if(a===null){O=t;try{O.stateNode.nodeValue=i?"":O.memoizedProps}catch(be){ct(O,O.return,be)}}}else if(t.tag===18){if(a===null){O=t;try{var te=O.stateNode;i?b0(te,!0):b0(O.stateNode,!1)}catch(be){ct(O,O.return,be)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;a===t&&(a=null),t=t.return}a===t&&(a=null),t.sibling.return=t.return,t=t.sibling}n&4&&(n=e.updateQueue,n!==null&&(a=n.retryQueue,a!==null&&(n.retryQueue=null,uc(e,a))));break;case 19:Sa(t,e),wa(e),n&4&&(n=e.updateQueue,n!==null&&(e.updateQueue=null,uc(e,n)));break;case 30:break;case 21:break;default:Sa(t,e),wa(e)}}function wa(e){var t=e.flags;if(t&2){try{for(var a,n=e.return;n!==null;){if(wm(n)){a=n;break}n=n.return}if(a==null)throw Error(o(160));switch(a.tag){case 27:var i=a.stateNode,c=pd(e);ic(e,c,i);break;case 5:var p=a.stateNode;a.flags&32&&(an(p,""),a.flags&=-33);var E=pd(e);ic(e,E,p);break;case 3:case 4:var O=a.stateNode.containerInfo,Z=pd(e);vd(e,Z,O);break;default:throw Error(o(161))}}catch(se){ct(e,e.return,se)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Rm(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Rm(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function In(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)Em(e,t.alternate,t),t=t.sibling}function Cs(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Dl(4,t,t.return),Cs(t);break;case 1:Cn(t,t.return);var a=t.stateNode;typeof a.componentWillUnmount=="function"&&bm(t,t.return,a),Cs(t);break;case 27:ki(t.stateNode);case 26:case 5:Cn(t,t.return),Cs(t);break;case 22:t.memoizedState===null&&Cs(t);break;case 30:Cs(t);break;default:Cs(t)}e=e.sibling}}function Xn(e,t,a){for(a=a&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var n=t.alternate,i=e,c=t,p=c.flags;switch(c.tag){case 0:case 11:case 15:Xn(i,c,a),ji(4,c);break;case 1:if(Xn(i,c,a),n=c,i=n.stateNode,typeof i.componentDidMount=="function")try{i.componentDidMount()}catch(Z){ct(n,n.return,Z)}if(n=c,i=n.updateQueue,i!==null){var E=n.stateNode;try{var O=i.shared.hiddenCallbacks;if(O!==null)for(i.shared.hiddenCallbacks=null,i=0;i<O.length;i++)uh(O[i],E)}catch(Z){ct(n,n.return,Z)}}a&&p&64&&vm(c),Ei(c,c.return);break;case 27:Nm(c);case 26:case 5:Xn(i,c,a),a&&n===null&&p&4&&Sm(c),Ei(c,c.return);break;case 12:Xn(i,c,a);break;case 31:Xn(i,c,a),a&&p&4&&Cm(i,c);break;case 13:Xn(i,c,a),a&&p&4&&Om(i,c);break;case 22:c.memoizedState===null&&Xn(i,c,a),Ei(c,c.return);break;case 30:break;default:Xn(i,c,a)}t=t.sibling}}function Sd(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&&di(a))}function wd(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&di(e))}function dn(e,t,a,n){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Am(e,t,a,n),t=t.sibling}function Am(e,t,a,n){var i=t.flags;switch(t.tag){case 0:case 11:case 15:dn(e,t,a,n),i&2048&&ji(9,t);break;case 1:dn(e,t,a,n);break;case 3:dn(e,t,a,n),i&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&di(e)));break;case 12:if(i&2048){dn(e,t,a,n),e=t.stateNode;try{var c=t.memoizedProps,p=c.id,E=c.onPostCommit;typeof E=="function"&&E(p,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(O){ct(t,t.return,O)}}else dn(e,t,a,n);break;case 31:dn(e,t,a,n);break;case 13:dn(e,t,a,n);break;case 23:break;case 22:c=t.stateNode,p=t.alternate,t.memoizedState!==null?c._visibility&2?dn(e,t,a,n):Ti(e,t):c._visibility&2?dn(e,t,a,n):(c._visibility|=2,pr(e,t,a,n,(t.subtreeFlags&10256)!==0||!1)),i&2048&&Sd(p,t);break;case 24:dn(e,t,a,n),i&2048&&wd(t.alternate,t);break;default:dn(e,t,a,n)}}function pr(e,t,a,n,i){for(i=i&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var c=e,p=t,E=a,O=n,Z=p.flags;switch(p.tag){case 0:case 11:case 15:pr(c,p,E,O,i),ji(8,p);break;case 23:break;case 22:var se=p.stateNode;p.memoizedState!==null?se._visibility&2?pr(c,p,E,O,i):Ti(c,p):(se._visibility|=2,pr(c,p,E,O,i)),i&&Z&2048&&Sd(p.alternate,p);break;case 24:pr(c,p,E,O,i),i&&Z&2048&&wd(p.alternate,p);break;default:pr(c,p,E,O,i)}t=t.sibling}}function Ti(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var a=e,n=t,i=n.flags;switch(n.tag){case 22:Ti(a,n),i&2048&&Sd(n.alternate,n);break;case 24:Ti(a,n),i&2048&&wd(n.alternate,n);break;default:Ti(a,n)}t=t.sibling}}var Mi=8192;function vr(e,t,a){if(e.subtreeFlags&Mi)for(e=e.child;e!==null;)_m(e,t,a),e=e.sibling}function _m(e,t,a){switch(e.tag){case 26:vr(e,t,a),e.flags&Mi&&e.memoizedState!==null&&Cp(a,on,e.memoizedState,e.memoizedProps);break;case 5:vr(e,t,a);break;case 3:case 4:var n=on;on=wc(e.stateNode.containerInfo),vr(e,t,a),on=n;break;case 22:e.memoizedState===null&&(n=e.alternate,n!==null&&n.memoizedState!==null?(n=Mi,Mi=16777216,vr(e,t,a),Mi=n):vr(e,t,a));break;default:vr(e,t,a)}}function km(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 Ci(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];Qt=n,Um(n,e)}km(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)zm(e),e=e.sibling}function zm(e){switch(e.tag){case 0:case 11:case 15:Ci(e),e.flags&2048&&Dl(9,e,e.return);break;case 3:Ci(e);break;case 12:Ci(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,cc(e)):Ci(e);break;default:Ci(e)}}function cc(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];Qt=n,Um(n,e)}km(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Dl(8,t,t.return),cc(t);break;case 22:a=t.stateNode,a._visibility&2&&(a._visibility&=-3,cc(t));break;default:cc(t)}e=e.sibling}}function Um(e,t){for(;Qt!==null;){var a=Qt;switch(a.tag){case 0:case 11:case 15:Dl(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:di(a.memoizedState.cache)}if(n=a.child,n!==null)n.return=a,Qt=n;else e:for(a=e;Qt!==null;){n=Qt;var i=n.sibling,c=n.return;if(Tm(n),n===a){Qt=null;break e}if(i!==null){i.return=c,Qt=i;break e}Qt=c}}}var $x={getCacheForType:function(e){var t=Kt(Ht),a=t.data.get(e);return a===void 0&&(a=e(),t.data.set(e,a)),a},cacheSignal:function(){return Kt(Ht).controller.signal}},Fx=typeof WeakMap=="function"?WeakMap:Map,lt=0,yt=null,Ze=null,Ie=0,ut=0,Ra=null,Rl=!1,br=!1,Nd=!1,Jn=0,Ct=0,Al=0,Os=0,jd=0,Aa=0,Sr=0,Oi=null,Na=null,Ed=!1,oc=0,Hm=0,dc=1/0,fc=null,_l=null,$t=0,kl=null,wr=null,Kn=0,Td=0,Md=null,Lm=null,Di=0,Cd=null;function _a(){return(lt&2)!==0&&Ie!==0?Ie&-Ie:Y.T!==null?kd():Ys()}function qm(){if(Aa===0)if((Ie&536870912)===0||q){var e=qs;qs<<=1,(qs&3932160)===0&&(qs=262144),Aa=e}else Aa=536870912;return e=Oa.current,e!==null&&(e.flags|=32),Aa}function ja(e,t,a){(e===yt&&(ut===2||ut===9)||e.cancelPendingCommit!==null)&&(Nr(e,0),zl(e,Ie,Aa,!1)),cl(e,a),((lt&2)===0||e!==yt)&&(e===yt&&((lt&2)===0&&(Os|=a),Ct===4&&zl(e,Ie,Aa,!1)),On(e))}function Vm(e,t,a){if((lt&6)!==0)throw Error(o(327));var n=!a&&(t&127)===0&&(t&e.expiredLanes)===0||ul(e,t),i=n?Qx(e,t):Dd(e,t,!0),c=n;do{if(i===0){br&&!n&&zl(e,t,0,!1);break}else{if(a=e.current.alternate,c&&!Gx(a)){i=Dd(e,t,!1),c=!1;continue}if(i===2){if(c=t,e.errorRecoveryDisabledLanes&c)var p=0;else p=e.pendingLanes&-536870913,p=p!==0?p:p&536870912?536870912:0;if(p!==0){t=p;e:{var E=e;i=Oi;var O=E.current.memoizedState.isDehydrated;if(O&&(Nr(E,p).flags|=256),p=Dd(E,p,!1),p!==2){if(Nd&&!O){E.errorRecoveryDisabledLanes|=c,Os|=c,i=4;break e}c=Na,Na=i,c!==null&&(Na===null?Na=c:Na.push.apply(Na,c))}i=p}if(c=!1,i!==2)continue}}if(i===1){Nr(e,0),zl(e,t,0,!0);break}e:{switch(n=e,c=i,c){case 0:case 1:throw Error(o(345));case 4:if((t&4194048)!==t)break;case 6:zl(n,t,Aa,!Rl);break e;case 2:Na=null;break;case 3:case 5:break;default:throw Error(o(329))}if((t&62914560)===t&&(i=oc+300-ze(),10<i)){if(zl(n,t,Aa,!Rl),Pl(n,0,!0)!==0)break e;Kn=t,n.timeoutHandle=x0(Bm.bind(null,n,a,Na,fc,Ed,t,Aa,Os,Sr,Rl,c,"Throttled",-0,0),i);break e}Bm(n,a,Na,fc,Ed,t,Aa,Os,Sr,Rl,c,null,-0,0)}}break}while(!0);On(e)}function Bm(e,t,a,n,i,c,p,E,O,Z,se,oe,W,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:qa},_m(t,c,oe);var be=(c&62914560)===c?oc-ze():(c&4194048)===c?Hm-ze():0;if(be=Op(oe,be),be!==null){Kn=c,e.cancelPendingCommit=be(Wm.bind(null,e,t,c,a,n,i,p,E,O,se,oe,null,W,te)),zl(e,c,p,!Z);return}}Wm(e,t,c,a,n,i,p,E,O)}function Gx(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 i=a[n],c=i.getSnapshot;i=i.value;try{if(!la(c(),i))return!1}catch{return!1}}if(a=t.child,t.subtreeFlags&16384&&a!==null)a.return=t,t=a;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function zl(e,t,a,n){t&=~jd,t&=~Os,e.suspendedLanes|=t,e.pingedLanes&=~t,n&&(e.warmLanes|=t),n=e.expirationTimes;for(var i=t;0<i;){var c=31-zt(i),p=1<<c;n[c]=-1,i&=~p}a!==0&&xt(e,a,t)}function hc(){return(lt&6)===0?(Ri(0),!1):!0}function Od(){if(Ze!==null){if(ut===0)var e=Ze.return;else e=Ze,Za=Yn=null,Go(e),hr=null,hi=0,e=Ze;for(;e!==null;)pm(e.alternate,e),e=e.return;Ze=null}}function Nr(e,t){var a=e.timeoutHandle;a!==-1&&(e.timeoutHandle=-1,dp(a)),a=e.cancelPendingCommit,a!==null&&(e.cancelPendingCommit=null,a()),Kn=0,Od(),yt=e,Ze=a=$a(e.current,null),Ie=t,ut=0,Ra=null,Rl=!1,br=ul(e,t),Nd=!1,Sr=Aa=jd=Os=Al=Ct=0,Na=Oi=null,Ed=!1,(t&8)!==0&&(t|=t&32);var n=e.entangledLanes;if(n!==0)for(e=e.entanglements,n&=t;0<n;){var i=31-zt(n),c=1<<i;t|=e[i],n&=~c}return Jn=t,Nl(),a}function Ym(e,t){Be=null,Y.H=Si,t===fr||t===Yu?(t=lh(),ut=3):t===_o?(t=lh(),ut=4):ut=t===id?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,Ra=t,Ze===null&&(Ct=1,ac(e,pa(t,e.current)))}function $m(){var e=Oa.current;return e===null?!0:(Ie&4194048)===Ie?Pa===null:(Ie&62914560)===Ie||(Ie&536870912)!==0?e===Pa:!1}function Fm(){var e=Y.H;return Y.H=Si,e===null?Si:e}function Gm(){var e=Y.A;return Y.A=$x,e}function mc(){Ct=4,Rl||(Ie&4194048)!==Ie&&Oa.current!==null||(br=!0),(Al&134217727)===0&&(Os&134217727)===0||yt===null||zl(yt,Ie,Aa,!1)}function Dd(e,t,a){var n=lt;lt|=2;var i=Fm(),c=Gm();(yt!==e||Ie!==t)&&(fc=null,Nr(e,t)),t=!1;var p=Ct;e:do try{if(ut!==0&&Ze!==null){var E=Ze,O=Ra;switch(ut){case 8:Od(),p=6;break e;case 3:case 2:case 9:case 6:Oa.current===null&&(t=!0);var Z=ut;if(ut=0,Ra=null,jr(e,E,O,Z),a&&br){p=0;break e}break;default:Z=ut,ut=0,Ra=null,jr(e,E,O,Z)}}Zx(),p=Ct;break}catch(se){Ym(e,se)}while(!0);return t&&e.shellSuspendCounter++,Za=Yn=null,lt=n,Y.H=i,Y.A=c,Ze===null&&(yt=null,Ie=0,Nl()),p}function Zx(){for(;Ze!==null;)Zm(Ze)}function Qx(e,t){var a=lt;lt|=2;var n=Fm(),i=Gm();yt!==e||Ie!==t?(fc=null,dc=ze()+500,Nr(e,t)):br=ul(e,t);e:do try{if(ut!==0&&Ze!==null){t=Ze;var c=Ra;t:switch(ut){case 1:ut=0,Ra=null,jr(e,t,c,1);break;case 2:case 9:if(ah(c)){ut=0,Ra=null,Qm(t);break}t=function(){ut!==2&&ut!==9||yt!==e||(ut=7),On(e)},c.then(t,t);break e;case 3:ut=7;break e;case 4:ut=5;break e;case 7:ah(c)?(ut=0,Ra=null,Qm(t)):(ut=0,Ra=null,jr(e,t,c,7));break;case 5:var p=null;switch(Ze.tag){case 26:p=Ze.memoizedState;case 5:case 27:var E=Ze;if(p?A0(p):E.stateNode.complete){ut=0,Ra=null;var O=E.sibling;if(O!==null)Ze=O;else{var Z=E.return;Z!==null?(Ze=Z,gc(Z)):Ze=null}break t}}ut=0,Ra=null,jr(e,t,c,5);break;case 6:ut=0,Ra=null,jr(e,t,c,6);break;case 8:Od(),Ct=6;break e;default:throw Error(o(462))}}Px();break}catch(se){Ym(e,se)}while(!0);return Za=Yn=null,Y.H=n,Y.A=i,lt=a,Ze!==null?0:(yt=null,Ie=0,Nl(),Ct)}function Px(){for(;Ze!==null&&!pe();)Zm(Ze)}function Zm(e){var t=ym(e.alternate,e,Jn);e.memoizedProps=e.pendingProps,t===null?gc(e):Ze=t}function Qm(e){var t=e,a=t.alternate;switch(t.tag){case 15:case 0:t=om(a,t,t.pendingProps,t.type,void 0,Ie);break;case 11:t=om(a,t,t.pendingProps,t.type.render,t.ref,Ie);break;case 5:Go(t);default:pm(a,t),t=Ze=Lu(t,Jn),t=ym(a,t,Jn)}e.memoizedProps=e.pendingProps,t===null?gc(e):Ze=t}function jr(e,t,a,n){Za=Yn=null,Go(t),hr=null,hi=0;var i=t.return;try{if(Ux(e,i,t,a,Ie)){Ct=1,ac(e,pa(a,e.current)),Ze=null;return}}catch(c){if(i!==null)throw Ze=i,c;Ct=1,ac(e,pa(a,e.current)),Ze=null;return}t.flags&32768?(q||n===1?e=!0:br||(Ie&536870912)!==0?e=!1:(Rl=e=!0,(n===2||n===9||n===3||n===6)&&(n=Oa.current,n!==null&&n.tag===13&&(n.flags|=16384))),Pm(t,e)):gc(t)}function gc(e){var t=e;do{if((t.flags&32768)!==0){Pm(t,Rl);return}e=t.return;var a=qx(t.alternate,t,Jn);if(a!==null){Ze=a;return}if(t=t.sibling,t!==null){Ze=t;return}Ze=t=e}while(t!==null);Ct===0&&(Ct=5)}function Pm(e,t){do{var a=Vx(e.alternate,e);if(a!==null){a.flags&=32767,Ze=a;return}if(a=e.return,a!==null&&(a.flags|=32768,a.subtreeFlags=0,a.deletions=null),!t&&(e=e.sibling,e!==null)){Ze=e;return}Ze=e=a}while(e!==null);Ct=6,Ze=null}function Wm(e,t,a,n,i,c,p,E,O){e.cancelPendingCommit=null;do yc();while($t!==0);if((lt&6)!==0)throw Error(o(327));if(t!==null){if(t===e.current)throw Error(o(177));if(c=t.lanes|t.childLanes,c|=xs,ou(e,a,c,p,E,O),e===yt&&(Ze=yt=null,Ie=0),wr=t,kl=e,Kn=a,Td=c,Md=i,Lm=n,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,Jx(ce,function(){return e0(),null})):(e.callbackNode=null,e.callbackPriority=0),n=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||n){n=Y.T,Y.T=null,i=re.p,re.p=2,p=lt,lt|=4;try{Bx(e,t,a)}finally{lt=p,re.p=i,Y.T=n}}$t=1,Im(),Xm(),Jm()}}function Im(){if($t===1){$t=0;var e=kl,t=wr,a=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||a){a=Y.T,Y.T=null;var n=re.p;re.p=2;var i=lt;lt|=4;try{Dm(t,e);var c=Yd,p=Mo(e.containerInfo),E=c.focusedElem,O=c.selectionRange;if(p!==E&&E&&E.ownerDocument&&Je(E.ownerDocument.documentElement,E)){if(O!==null&&er(E)){var Z=O.start,se=O.end;if(se===void 0&&(se=Z),"selectionStart"in E)E.selectionStart=Z,E.selectionEnd=Math.min(se,E.value.length);else{var oe=E.ownerDocument||document,W=oe&&oe.defaultView||window;if(W.getSelection){var te=W.getSelection(),be=E.textContent.length,Ae=Math.min(O.start,be),ht=O.end===void 0?Ae:Math.min(O.end,be);!te.extend&&Ae>ht&&(p=ht,ht=Ae,Ae=p);var $=Au(E,Ae),L=Au(E,ht);if($&&L&&(te.rangeCount!==1||te.anchorNode!==$.node||te.anchorOffset!==$.offset||te.focusNode!==L.node||te.focusOffset!==L.offset)){var G=oe.createRange();G.setStart($.node,$.offset),te.removeAllRanges(),Ae>ht?(te.addRange(G),te.extend(L.node,L.offset)):(G.setEnd(L.node,L.offset),te.addRange(G))}}}}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 ue=oe[E];ue.element.scrollLeft=ue.left,ue.element.scrollTop=ue.top}}Cc=!!Bd,Yd=Bd=null}finally{lt=i,re.p=n,Y.T=a}}e.current=t,$t=2}}function Xm(){if($t===2){$t=0;var e=kl,t=wr,a=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||a){a=Y.T,Y.T=null;var n=re.p;re.p=2;var i=lt;lt|=4;try{Em(e,t.alternate,t)}finally{lt=i,re.p=n,Y.T=a}}$t=3}}function Jm(){if($t===4||$t===3){$t=0,Ye();var e=kl,t=wr,a=Kn,n=Lm;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?$t=5:($t=0,wr=kl=null,Km(e,e.pendingLanes));var i=e.pendingLanes;if(i===0&&(_l=null),na(a),t=t.stateNode,pt&&typeof pt.onCommitFiberRoot=="function")try{pt.onCommitFiberRoot(nt,t,void 0,(t.current.flags&128)===128)}catch{}if(n!==null){t=Y.T,i=re.p,re.p=2,Y.T=null;try{for(var c=e.onRecoverableError,p=0;p<n.length;p++){var E=n[p];c(E.value,{componentStack:E.stack})}}finally{Y.T=t,re.p=i}}(Kn&3)!==0&&yc(),On(e),i=e.pendingLanes,(a&261930)!==0&&(i&42)!==0?e===Cd?Di++:(Di=0,Cd=e):Di=0,Ri(0)}}function Km(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,di(t)))}function yc(){return Im(),Xm(),Jm(),e0()}function e0(){if($t!==5)return!1;var e=kl,t=Td;Td=0;var a=na(Kn),n=Y.T,i=re.p;try{re.p=32>a?32:a,Y.T=null,a=Md,Md=null;var c=kl,p=Kn;if($t=0,wr=kl=null,Kn=0,(lt&6)!==0)throw Error(o(331));var E=lt;if(lt|=4,zm(c.current),Am(c,c.current,p,a),lt=E,Ri(0,!1),pt&&typeof pt.onPostCommitFiberRoot=="function")try{pt.onPostCommitFiberRoot(nt,c)}catch{}return!0}finally{re.p=i,Y.T=n,Km(e,t)}}function t0(e,t,a){t=pa(a,t),t=rd(e.stateNode,t,2),e=Ml(e,t,2),e!==null&&(cl(e,2),On(e))}function ct(e,t,a){if(e.tag===3)t0(e,e,a);else for(;t!==null;){if(t.tag===3){t0(t,e,a);break}else if(t.tag===1){var n=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof n.componentDidCatch=="function"&&(_l===null||!_l.has(n))){e=pa(a,e),a=am(2),n=Ml(t,a,2),n!==null&&(nm(a,n,t,e),cl(n,2),On(n));break}}t=t.return}}function Rd(e,t,a){var n=e.pingCache;if(n===null){n=e.pingCache=new Fx;var i=new Set;n.set(t,i)}else i=n.get(t),i===void 0&&(i=new Set,n.set(t,i));i.has(a)||(Nd=!0,i.add(a),e=Wx.bind(null,e,t,a),t.then(e,e))}function Wx(e,t,a){var n=e.pingCache;n!==null&&n.delete(t),e.pingedLanes|=e.suspendedLanes&a,e.warmLanes&=~a,yt===e&&(Ie&a)===a&&(Ct===4||Ct===3&&(Ie&62914560)===Ie&&300>ze()-oc?(lt&2)===0&&Nr(e,0):jd|=a,Sr===Ie&&(Sr=0)),On(e)}function a0(e,t){t===0&&(t=Vr()),e=Ya(e,t),e!==null&&(cl(e,t),On(e))}function Ix(e){var t=e.memoizedState,a=0;t!==null&&(a=t.retryLane),a0(e,a)}function Xx(e,t){var a=0;switch(e.tag){case 31:case 13:var n=e.stateNode,i=e.memoizedState;i!==null&&(a=i.retryLane);break;case 19:n=e.stateNode;break;case 22:n=e.stateNode._retryCache;break;default:throw Error(o(314))}n!==null&&n.delete(t),a0(e,a)}function Jx(e,t){return pn(e,t)}var xc=null,Er=null,Ad=!1,pc=!1,_d=!1,Ul=0;function On(e){e!==Er&&e.next===null&&(Er===null?xc=Er=e:Er=Er.next=e),pc=!0,Ad||(Ad=!0,ep())}function Ri(e,t){if(!_d&&pc){_d=!0;do for(var a=!1,n=xc;n!==null;){if(e!==0){var i=n.pendingLanes;if(i===0)var c=0;else{var p=n.suspendedLanes,E=n.pingedLanes;c=(1<<31-zt(42|e)+1)-1,c&=i&~(p&~E),c=c&201326741?c&201326741|1:c?c|2:0}c!==0&&(a=!0,r0(n,c))}else c=Ie,c=Pl(n,n===yt?c:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),(c&3)===0||ul(n,c)||(a=!0,r0(n,c));n=n.next}while(a);_d=!1}}function Kx(){n0()}function n0(){pc=Ad=!1;var e=0;Ul!==0&&op()&&(e=Ul);for(var t=ze(),a=null,n=xc;n!==null;){var i=n.next,c=l0(n,t);c===0?(n.next=null,a===null?xc=i:a.next=i,i===null&&(Er=a)):(a=n,(e!==0||(c&3)!==0)&&(pc=!0)),n=i}$t!==0&&$t!==5||Ri(e),Ul!==0&&(Ul=0)}function l0(e,t){for(var a=e.suspendedLanes,n=e.pingedLanes,i=e.expirationTimes,c=e.pendingLanes&-62914561;0<c;){var p=31-zt(c),E=1<<p,O=i[p];O===-1?((E&a)===0||(E&n)!==0)&&(i[p]=cu(E,t)):O<=t&&(e.expiredLanes|=E),c&=~E}if(t=yt,a=Ie,a=Pl(e,e===t?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),n=e.callbackNode,a===0||e===t&&(ut===2||ut===9)||e.cancelPendingCommit!==null)return n!==null&&n!==null&&de(n),e.callbackNode=null,e.callbackPriority=0;if((a&3)===0||ul(e,a)){if(t=a&-a,t===e.callbackPriority)return t;switch(n!==null&&de(n),na(a)){case 2:case 8:a=vn;break;case 32:a=ce;break;case 268435456:a=Fe;break;default:a=ce}return n=s0.bind(null,e),a=pn(a,n),e.callbackPriority=t,e.callbackNode=a,t}return n!==null&&n!==null&&de(n),e.callbackPriority=2,e.callbackNode=null,2}function s0(e,t){if($t!==0&&$t!==5)return e.callbackNode=null,e.callbackPriority=0,null;var a=e.callbackNode;if(yc()&&e.callbackNode!==a)return null;var n=Ie;return n=Pl(e,e===yt?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),n===0?null:(Vm(e,n,t),l0(e,ze()),e.callbackNode!=null&&e.callbackNode===a?s0.bind(null,e):null)}function r0(e,t){if(yc())return null;Vm(e,t,!0)}function ep(){fp(function(){(lt&6)!==0?pn(La,Kx):n0()})}function kd(){if(Ul===0){var e=or;e===0&&(e=il,il<<=1,(il&261888)===0&&(il=256)),Ul=e}return Ul}function i0(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:as(""+e)}function u0(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 tp(e,t,a,n,i){if(t==="submit"&&a&&a.stateNode===i){var c=i0((i[Bt]||null).action),p=n.submitter;p&&(t=(t=p[Bt]||null)?i0(t.formAction):p.getAttribute("formAction"),t!==null&&(c=t,p=null));var E=new rs("action","action",null,n,i);e.push({event:E,listeners:[{instance:null,listener:function(){if(n.defaultPrevented){if(Ul!==0){var O=p?u0(i,p):new FormData(i);ed(a,{pending:!0,data:O,method:i.method,action:c},null,O)}}else typeof c=="function"&&(E.preventDefault(),O=p?u0(i,p):new FormData(i),ed(a,{pending:!0,data:O,method:i.method,action:c},c,O))},currentTarget:i}]})}}for(var zd=0;zd<ii.length;zd++){var Ud=ii[zd],ap=Ud.toLowerCase(),np=Ud[0].toUpperCase()+Ud.slice(1);xa(ap,"on"+np)}xa(zu,"onAnimationEnd"),xa(Uu,"onAnimationIteration"),xa(nr,"onAnimationStart"),xa("dblclick","onDoubleClick"),xa("focusin","onFocus"),xa("focusout","onBlur"),xa(Co,"onTransitionRun"),xa(Oo,"onTransitionStart"),xa(Hu,"onTransitionCancel"),xa(si,"onTransitionEnd"),ol("onMouseEnter",["mouseout","mouseover"]),ol("onMouseLeave",["mouseout","mouseover"]),ol("onPointerEnter",["pointerout","pointerover"]),ol("onPointerLeave",["pointerout","pointerover"]),Sn("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Sn("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Sn("onBeforeInput",["compositionend","keypress","textInput","paste"]),Sn("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Sn("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Sn("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ai="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(" "),lp=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Ai));function c0(e,t){t=(t&4)!==0;for(var a=0;a<e.length;a++){var n=e[a],i=n.event;n=n.listeners;e:{var c=void 0;if(t)for(var p=n.length-1;0<=p;p--){var E=n[p],O=E.instance,Z=E.currentTarget;if(E=E.listener,O!==c&&i.isPropagationStopped())break e;c=E,i.currentTarget=Z;try{c(i)}catch(se){wl(se)}i.currentTarget=null,c=O}else for(p=0;p<n.length;p++){if(E=n[p],O=E.instance,Z=E.currentTarget,E=E.listener,O!==c&&i.isPropagationStopped())break e;c=E,i.currentTarget=Z;try{c(i)}catch(se){wl(se)}i.currentTarget=null,c=O}}}}function Qe(e,t){var a=t[Wl];a===void 0&&(a=t[Wl]=new Set);var n=e+"__bubble";a.has(n)||(o0(t,e,2,!1),a.add(n))}function Hd(e,t,a){var n=0;t&&(n|=4),o0(a,e,n,t)}var vc="_reactListening"+Math.random().toString(36).slice(2);function Ld(e){if(!e[vc]){e[vc]=!0,mu.forEach(function(a){a!=="selectionchange"&&(lp.has(a)||Hd(a,!1,e),Hd(a,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[vc]||(t[vc]=!0,Hd("selectionchange",!1,t))}}function o0(e,t,a,n){switch(q0(t)){case 2:var i=Ap;break;case 8:i=_p;break;default:i=Kd}a=i.bind(null,t,a,e),i=void 0,!Ir||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(i=!0),n?i!==void 0?e.addEventListener(t,a,{capture:!0,passive:i}):e.addEventListener(t,a,!0):i!==void 0?e.addEventListener(t,a,{passive:i}):e.addEventListener(t,a,!1)}function qd(e,t,a,n,i){var c=n;if((t&1)===0&&(t&2)===0&&n!==null)e:for(;;){if(n===null)return;var p=n.tag;if(p===3||p===4){var E=n.stateNode.containerInfo;if(E===i)break;if(p===4)for(p=n.return;p!==null;){var O=p.tag;if((O===3||O===4)&&p.stateNode.containerInfo===i)return;p=p.return}for(;E!==null;){if(p=_n(E),p===null)return;if(O=p.tag,O===5||O===6||O===26||O===27){n=c=p;continue e}E=E.parentNode}}n=n.return}Wr(function(){var Z=c,se=Ps(a),oe=[];e:{var W=ri.get(e);if(W!==void 0){var te=rs,be=e;switch(e){case"keypress":if(ss(a)===0)break e;case"keydown":case"keyup":te=ho;break;case"focusin":be="focus",te=Ks;break;case"focusout":be="blur",te=Ks;break;case"beforeblur":case"afterblur":te=Ks;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=bu;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":te=no;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":te=yo;break;case zu:case Uu:case nr:te=ml;break;case si:te=xo;break;case"scroll":case"scrollend":te=Xr;break;case"wheel":te=vo;break;case"copy":case"cut":case"paste":te=gl;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":te=Su;break;case"toggle":case"beforetoggle":te=So}var Ae=(t&4)!==0,ht=!Ae&&(e==="scroll"||e==="scrollend"),$=Ae?W!==null?W+"Capture":null:W;Ae=[];for(var L=Z,G;L!==null;){var ue=L;if(G=ue.stateNode,ue=ue.tag,ue!==5&&ue!==26&&ue!==27||G===null||$===null||(ue=ns(L,$),ue!=null&&Ae.push(_i(L,ue,G))),ht)break;L=L.return}0<Ae.length&&(W=new te(W,be,null,a,se),oe.push({event:W,listeners:Ae}))}}if((t&7)===0){e:{if(W=e==="mouseover"||e==="pointerover",te=e==="mouseout"||e==="pointerout",W&&a!==Qr&&(be=a.relatedTarget||a.fromElement)&&(_n(be)||be[An]))break e;if((te||W)&&(W=se.window===se?se:(W=se.ownerDocument)?W.defaultView||W.parentWindow:window,te?(be=a.relatedTarget||a.toElement,te=Z,be=be?_n(be):null,be!==null&&(ht=f(be),Ae=be.tag,be!==ht||Ae!==5&&Ae!==27&&Ae!==6)&&(be=null)):(te=null,be=Z),te!==be)){if(Ae=bu,ue="onMouseLeave",$="onMouseEnter",L="mouse",(e==="pointerout"||e==="pointerover")&&(Ae=Su,ue="onPointerLeave",$="onPointerEnter",L="pointer"),ht=te==null?W:ga(te),G=be==null?W:ga(be),W=new Ae(ue,L+"leave",te,a,se),W.target=ht,W.relatedTarget=G,ue=null,_n(se)===Z&&(Ae=new Ae($,L+"enter",be,a,se),Ae.target=G,Ae.relatedTarget=ht,ue=Ae),ht=ue,te&&be)t:{for(Ae=sp,$=te,L=be,G=0,ue=$;ue;ue=Ae(ue))G++;ue=0;for(var Ce=L;Ce;Ce=Ae(Ce))ue++;for(;0<G-ue;)$=Ae($),G--;for(;0<ue-G;)L=Ae(L),ue--;for(;G--;){if($===L||L!==null&&$===L.alternate){Ae=$;break t}$=Ae($),L=Ae(L)}Ae=null}else Ae=null;te!==null&&d0(oe,W,te,Ae,!1),be!==null&&ht!==null&&d0(oe,ht,be,Ae,!0)}}e:{if(W=Z?ga(Z):window,te=W.nodeName&&W.nodeName.toLowerCase(),te==="select"||te==="input"&&W.type==="file")var tt=Du;else if(Ou(W))if(En)tt=bt;else{tt=vl;var we=Pe}else te=W.nodeName,!te||te.toLowerCase()!=="input"||W.type!=="checkbox"&&W.type!=="radio"?Z&&Qs(Z.elementType)&&(tt=Du):tt=To;if(tt&&(tt=tt(e,Z))){Kr(oe,tt,a,se);break e}we&&we(e,W,Z),e==="focusout"&&Z&&W.type==="number"&&Z.memoizedProps.value!=null&&Jl(W,"number",W.value)}switch(we=Z?ga(Z):window,e){case"focusin":(Ou(we)||we.contentEditable==="true")&&(bl=we,tr=Z,Xt=null);break;case"focusout":Xt=tr=bl=null;break;case"mousedown":ar=!0;break;case"contextmenu":case"mouseup":case"dragend":ar=!1,ys(oe,a,se);break;case"selectionchange":if(_u)break;case"keydown":case"keyup":ys(oe,a,se)}var $e;if(Jr)e:{switch(e){case"compositionstart":var Xe="onCompositionStart";break e;case"compositionend":Xe="onCompositionEnd";break e;case"compositionupdate":Xe="onCompositionUpdate";break e}Xe=void 0}else xl?Mu(e,a)&&(Xe="onCompositionEnd"):e==="keydown"&&a.keyCode===229&&(Xe="onCompositionStart");Xe&&(ju&&a.locale!=="ko"&&(xl||Xe!=="onCompositionStart"?Xe==="onCompositionEnd"&&xl&&($e=Yt()):(Nn=se,Ws="value"in Nn?Nn.value:Nn.textContent,xl=!0)),we=bc(Z,Xe),0<we.length&&(Xe=new yl(Xe,e,null,a,se),oe.push({event:Xe,listeners:we}),$e?Xe.data=$e:($e=Cu(a),$e!==null&&(Xe.data=$e)))),($e=wo?No(e,a):jo(e,a))&&(Xe=bc(Z,"onBeforeInput"),0<Xe.length&&(we=new yl("onBeforeInput","beforeinput",null,a,se),oe.push({event:we,listeners:Xe}),we.data=$e)),tp(oe,e,Z,a,se)}c0(oe,t)})}function _i(e,t,a){return{instance:e,listener:t,currentTarget:a}}function bc(e,t){for(var a=t+"Capture",n=[];e!==null;){var i=e,c=i.stateNode;if(i=i.tag,i!==5&&i!==26&&i!==27||c===null||(i=ns(e,a),i!=null&&n.unshift(_i(e,i,c)),i=ns(e,t),i!=null&&n.push(_i(e,i,c))),e.tag===3)return n;e=e.return}return[]}function sp(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function d0(e,t,a,n,i){for(var c=t._reactName,p=[];a!==null&&a!==n;){var E=a,O=E.alternate,Z=E.stateNode;if(E=E.tag,O!==null&&O===n)break;E!==5&&E!==26&&E!==27||Z===null||(O=Z,i?(Z=ns(a,c),Z!=null&&p.unshift(_i(a,Z,O))):i||(Z=ns(a,c),Z!=null&&p.push(_i(a,Z,O)))),a=a.return}p.length!==0&&e.push({event:t,listeners:p})}var rp=/\r\n?/g,ip=/\u0000|\uFFFD/g;function f0(e){return(typeof e=="string"?e:""+e).replace(rp,`
49
+ `).replace(ip,"")}function h0(e,t){return t=f0(t),f0(e)===t}function ft(e,t,a,n,i,c){switch(a){case"children":typeof n=="string"?t==="body"||t==="textarea"&&n===""||an(e,n):(typeof n=="number"||typeof n=="bigint")&&t!=="body"&&an(e,""+n);break;case"className":Fs(e,"class",n);break;case"tabIndex":Fs(e,"tabindex",n);break;case"dir":case"role":case"viewBox":case"width":case"height":Fs(e,a,n);break;case"style":xu(e,n,c);break;case"data":if(t!=="object"){Fs(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=as(""+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 c=="function"&&(a==="formAction"?(t!=="input"&&ft(e,t,"name",i.name,i,null),ft(e,t,"formEncType",i.formEncType,i,null),ft(e,t,"formMethod",i.formMethod,i,null),ft(e,t,"formTarget",i.formTarget,i,null)):(ft(e,t,"encType",i.encType,i,null),ft(e,t,"method",i.method,i,null),ft(e,t,"target",i.target,i,null)));if(n==null||typeof n=="symbol"||typeof n=="boolean"){e.removeAttribute(a);break}n=as(""+n),e.setAttribute(a,n);break;case"onClick":n!=null&&(e.onclick=qa);break;case"onScroll":n!=null&&Qe("scroll",e);break;case"onScrollEnd":n!=null&&Qe("scrollend",e);break;case"dangerouslySetInnerHTML":if(n!=null){if(typeof n!="object"||!("__html"in n))throw Error(o(61));if(a=n.__html,a!=null){if(i.children!=null)throw Error(o(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=as(""+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":Qe("beforetoggle",e),Qe("toggle",e),Wt(e,"popover",n);break;case"xlinkActuate":rt(e,"http://www.w3.org/1999/xlink","xlink:actuate",n);break;case"xlinkArcrole":rt(e,"http://www.w3.org/1999/xlink","xlink:arcrole",n);break;case"xlinkRole":rt(e,"http://www.w3.org/1999/xlink","xlink:role",n);break;case"xlinkShow":rt(e,"http://www.w3.org/1999/xlink","xlink:show",n);break;case"xlinkTitle":rt(e,"http://www.w3.org/1999/xlink","xlink:title",n);break;case"xlinkType":rt(e,"http://www.w3.org/1999/xlink","xlink:type",n);break;case"xmlBase":rt(e,"http://www.w3.org/XML/1998/namespace","xml:base",n);break;case"xmlLang":rt(e,"http://www.w3.org/XML/1998/namespace","xml:lang",n);break;case"xmlSpace":rt(e,"http://www.w3.org/XML/1998/namespace","xml:space",n);break;case"is":Wt(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=to.get(a)||a,Wt(e,a,n))}}function Vd(e,t,a,n,i,c){switch(a){case"style":xu(e,n,c);break;case"dangerouslySetInnerHTML":if(n!=null){if(typeof n!="object"||!("__html"in n))throw Error(o(61));if(a=n.__html,a!=null){if(i.children!=null)throw Error(o(60));e.innerHTML=a}}break;case"children":typeof n=="string"?an(e,n):(typeof n=="number"||typeof n=="bigint")&&an(e,""+n);break;case"onScroll":n!=null&&Qe("scroll",e);break;case"onScrollEnd":n!=null&&Qe("scrollend",e);break;case"onClick":n!=null&&(e.onclick=qa);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!$r.hasOwnProperty(a))e:{if(a[0]==="o"&&a[1]==="n"&&(i=a.endsWith("Capture"),t=a.slice(2,i?a.length-7:void 0),c=e[Bt]||null,c=c!=null?c[a]:null,typeof c=="function"&&e.removeEventListener(t,c,i),typeof n=="function")){typeof c!="function"&&c!==null&&(a in e?e[a]=null:e.hasAttribute(a)&&e.removeAttribute(a)),e.addEventListener(t,n,i);break e}a in e?e[a]=n:n===!0?e.setAttribute(a,""):Wt(e,a,n)}}}function ta(e,t,a){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Qe("error",e),Qe("load",e);var n=!1,i=!1,c;for(c in a)if(a.hasOwnProperty(c)){var p=a[c];if(p!=null)switch(c){case"src":n=!0;break;case"srcSet":i=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(o(137,t));default:ft(e,t,c,p,a,null)}}i&&ft(e,t,"srcSet",a.srcSet,a,null),n&&ft(e,t,"src",a.src,a,null);return;case"input":Qe("invalid",e);var E=c=p=i=null,O=null,Z=null;for(n in a)if(a.hasOwnProperty(n)){var se=a[n];if(se!=null)switch(n){case"name":i=se;break;case"type":p=se;break;case"checked":O=se;break;case"defaultChecked":Z=se;break;case"value":c=se;break;case"defaultValue":E=se;break;case"children":case"dangerouslySetInnerHTML":if(se!=null)throw Error(o(137,t));break;default:ft(e,t,n,se,a,null)}}fl(e,c,E,O,Z,p,i,!1);return;case"select":Qe("invalid",e),n=p=c=null;for(i in a)if(a.hasOwnProperty(i)&&(E=a[i],E!=null))switch(i){case"value":c=E;break;case"defaultValue":p=E;break;case"multiple":n=E;default:ft(e,t,i,E,a,null)}t=c,a=p,e.multiple=!!n,t!=null?zn(e,!!n,t,!1):a!=null&&zn(e,!!n,a,!0);return;case"textarea":Qe("invalid",e),c=i=n=null;for(p in a)if(a.hasOwnProperty(p)&&(E=a[p],E!=null))switch(p){case"value":n=E;break;case"defaultValue":i=E;break;case"children":c=E;break;case"dangerouslySetInnerHTML":if(E!=null)throw Error(o(91));break;default:ft(e,t,p,E,a,null)}Zr(e,n,i,c);return;case"option":for(O in a)if(a.hasOwnProperty(O)&&(n=a[O],n!=null))switch(O){case"selected":e.selected=n&&typeof n!="function"&&typeof n!="symbol";break;default:ft(e,t,O,n,a,null)}return;case"dialog":Qe("beforetoggle",e),Qe("toggle",e),Qe("cancel",e),Qe("close",e);break;case"iframe":case"object":Qe("load",e);break;case"video":case"audio":for(n=0;n<Ai.length;n++)Qe(Ai[n],e);break;case"image":Qe("error",e),Qe("load",e);break;case"details":Qe("toggle",e);break;case"embed":case"source":case"link":Qe("error",e),Qe("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(Z in a)if(a.hasOwnProperty(Z)&&(n=a[Z],n!=null))switch(Z){case"children":case"dangerouslySetInnerHTML":throw Error(o(137,t));default:ft(e,t,Z,n,a,null)}return;default:if(Qs(t)){for(se in a)a.hasOwnProperty(se)&&(n=a[se],n!==void 0&&Vd(e,t,se,n,a,void 0));return}}for(E in a)a.hasOwnProperty(E)&&(n=a[E],n!=null&&ft(e,t,E,n,a,null))}function up(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 i=null,c=null,p=null,E=null,O=null,Z=null,se=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":O=oe;default:n.hasOwnProperty(te)||ft(e,t,te,null,n,oe)}}for(var W in n){var te=n[W];if(oe=a[W],n.hasOwnProperty(W)&&(te!=null||oe!=null))switch(W){case"type":c=te;break;case"name":i=te;break;case"checked":Z=te;break;case"defaultChecked":se=te;break;case"value":p=te;break;case"defaultValue":E=te;break;case"children":case"dangerouslySetInnerHTML":if(te!=null)throw Error(o(137,t));break;default:te!==oe&&ft(e,t,W,te,n,oe)}}Zs(e,p,E,O,Z,se,c,i);return;case"select":te=p=E=W=null;for(c in a)if(O=a[c],a.hasOwnProperty(c)&&O!=null)switch(c){case"value":break;case"multiple":te=O;default:n.hasOwnProperty(c)||ft(e,t,c,null,n,O)}for(i in n)if(c=n[i],O=a[i],n.hasOwnProperty(i)&&(c!=null||O!=null))switch(i){case"value":W=c;break;case"defaultValue":E=c;break;case"multiple":p=c;default:c!==O&&ft(e,t,i,c,n,O)}t=E,a=p,n=te,W!=null?zn(e,!!a,W,!1):!!n!=!!a&&(t!=null?zn(e,!!a,t,!0):zn(e,!!a,a?[]:"",!1));return;case"textarea":te=W=null;for(E in a)if(i=a[E],a.hasOwnProperty(E)&&i!=null&&!n.hasOwnProperty(E))switch(E){case"value":break;case"children":break;default:ft(e,t,E,null,n,i)}for(p in n)if(i=n[p],c=a[p],n.hasOwnProperty(p)&&(i!=null||c!=null))switch(p){case"value":W=i;break;case"defaultValue":te=i;break;case"children":break;case"dangerouslySetInnerHTML":if(i!=null)throw Error(o(91));break;default:i!==c&&ft(e,t,p,i,n,c)}Kl(e,W,te);return;case"option":for(var be in a)if(W=a[be],a.hasOwnProperty(be)&&W!=null&&!n.hasOwnProperty(be))switch(be){case"selected":e.selected=!1;break;default:ft(e,t,be,null,n,W)}for(O in n)if(W=n[O],te=a[O],n.hasOwnProperty(O)&&W!==te&&(W!=null||te!=null))switch(O){case"selected":e.selected=W&&typeof W!="function"&&typeof W!="symbol";break;default:ft(e,t,O,W,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 Ae in a)W=a[Ae],a.hasOwnProperty(Ae)&&W!=null&&!n.hasOwnProperty(Ae)&&ft(e,t,Ae,null,n,W);for(Z in n)if(W=n[Z],te=a[Z],n.hasOwnProperty(Z)&&W!==te&&(W!=null||te!=null))switch(Z){case"children":case"dangerouslySetInnerHTML":if(W!=null)throw Error(o(137,t));break;default:ft(e,t,Z,W,n,te)}return;default:if(Qs(t)){for(var ht in a)W=a[ht],a.hasOwnProperty(ht)&&W!==void 0&&!n.hasOwnProperty(ht)&&Vd(e,t,ht,void 0,n,W);for(se in n)W=n[se],te=a[se],!n.hasOwnProperty(se)||W===te||W===void 0&&te===void 0||Vd(e,t,se,W,n,te);return}}for(var $ in a)W=a[$],a.hasOwnProperty($)&&W!=null&&!n.hasOwnProperty($)&&ft(e,t,$,null,n,W);for(oe in n)W=n[oe],te=a[oe],!n.hasOwnProperty(oe)||W===te||W==null&&te==null||ft(e,t,oe,W,n,te)}function m0(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function cp(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,a=performance.getEntriesByType("resource"),n=0;n<a.length;n++){var i=a[n],c=i.transferSize,p=i.initiatorType,E=i.duration;if(c&&E&&m0(p)){for(p=0,E=i.responseEnd,n+=1;n<a.length;n++){var O=a[n],Z=O.startTime;if(Z>E)break;var se=O.transferSize,oe=O.initiatorType;se&&m0(oe)&&(O=O.responseEnd,p+=se*(O<E?1:(E-Z)/(O-Z)))}if(--n,t+=8*(c+p)/(i.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 Bd=null,Yd=null;function Sc(e){return e.nodeType===9?e:e.ownerDocument}function g0(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function y0(e,t){if(e===0)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&t==="foreignObject"?0:e}function $d(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 Fd=null;function op(){var e=window.event;return e&&e.type==="popstate"?e===Fd?!1:(Fd=e,!0):(Fd=null,!1)}var x0=typeof setTimeout=="function"?setTimeout:void 0,dp=typeof clearTimeout=="function"?clearTimeout:void 0,p0=typeof Promise=="function"?Promise:void 0,fp=typeof queueMicrotask=="function"?queueMicrotask:typeof p0<"u"?function(e){return p0.resolve(null).then(e).catch(hp)}:x0;function hp(e){setTimeout(function(){throw e})}function Hl(e){return e==="head"}function v0(e,t){var a=t,n=0;do{var i=a.nextSibling;if(e.removeChild(a),i&&i.nodeType===8)if(a=i.data,a==="/$"||a==="/&"){if(n===0){e.removeChild(i),Or(t);return}n--}else if(a==="$"||a==="$?"||a==="$~"||a==="$!"||a==="&")n++;else if(a==="html")ki(e.ownerDocument.documentElement);else if(a==="head"){a=e.ownerDocument.head,ki(a);for(var c=a.firstChild;c;){var p=c.nextSibling,E=c.nodeName;c[Il]||E==="SCRIPT"||E==="STYLE"||E==="LINK"&&c.rel.toLowerCase()==="stylesheet"||a.removeChild(c),c=p}}else a==="body"&&ki(e.ownerDocument.body);a=i}while(a);Or(t)}function b0(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 Gd(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":Gd(a),$s(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}e.removeChild(a)}}function mp(e,t,a,n){for(;e.nodeType===1;){var i=a;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!n&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(n){if(!e[Il])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(c=e.getAttribute("rel"),c==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(c!==i.rel||e.getAttribute("href")!==(i.href==null||i.href===""?null:i.href)||e.getAttribute("crossorigin")!==(i.crossOrigin==null?null:i.crossOrigin)||e.getAttribute("title")!==(i.title==null?null:i.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(c=e.getAttribute("src"),(c!==(i.src==null?null:i.src)||e.getAttribute("type")!==(i.type==null?null:i.type)||e.getAttribute("crossorigin")!==(i.crossOrigin==null?null:i.crossOrigin))&&c&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var c=i.name==null?null:""+i.name;if(i.type==="hidden"&&e.getAttribute("name")===c)return e}else return e;if(e=Wa(e.nextSibling),e===null)break}return null}function gp(e,t,a){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!a||(e=Wa(e.nextSibling),e===null))return null;return e}function S0(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=Wa(e.nextSibling),e===null))return null;return e}function Zd(e){return e.data==="$?"||e.data==="$~"}function Qd(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function yp(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 Wa(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?"||t==="$~"||t==="&"||t==="F!"||t==="F")break;if(t==="/$"||t==="/&")return null}}return e}var Pd=null;function w0(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var a=e.data;if(a==="/$"||a==="/&"){if(t===0)return Wa(e.nextSibling);t--}else a!=="$"&&a!=="$!"&&a!=="$?"&&a!=="$~"&&a!=="&"||t++}e=e.nextSibling}return null}function N0(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var a=e.data;if(a==="$"||a==="$!"||a==="$?"||a==="$~"||a==="&"){if(t===0)return e;t--}else a!=="/$"&&a!=="/&"||t++}e=e.previousSibling}return null}function j0(e,t,a){switch(t=Sc(a),e){case"html":if(e=t.documentElement,!e)throw Error(o(452));return e;case"head":if(e=t.head,!e)throw Error(o(453));return e;case"body":if(e=t.body,!e)throw Error(o(454));return e;default:throw Error(o(451))}}function ki(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);$s(e)}var Ia=new Map,E0=new Set;function wc(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var el=re.d;re.d={f:xp,r:pp,D:vp,C:bp,L:Sp,m:wp,X:jp,S:Np,M:Ep};function xp(){var e=el.f(),t=hc();return e||t}function pp(e){var t=Oe(e);t!==null&&t.tag===5&&t.type==="form"?Yh(t):el.r(e)}var Tr=typeof document>"u"?null:document;function T0(e,t,a){var n=Tr;if(n&&typeof t=="string"&&t){var i=It(t);i='link[rel="'+e+'"][href="'+i+'"]',typeof a=="string"&&(i+='[crossorigin="'+a+'"]'),E0.has(i)||(E0.add(i),e={rel:e,crossOrigin:a,href:t},n.querySelector(i)===null&&(t=n.createElement("link"),ta(t,"link",e),Ut(t),n.head.appendChild(t)))}}function vp(e){el.D(e),T0("dns-prefetch",e,null)}function bp(e,t){el.C(e,t),T0("preconnect",e,t)}function Sp(e,t,a){el.L(e,t,a);var n=Tr;if(n&&e&&t){var i='link[rel="preload"][as="'+It(t)+'"]';t==="image"&&a&&a.imageSrcSet?(i+='[imagesrcset="'+It(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(i+='[imagesizes="'+It(a.imageSizes)+'"]')):i+='[href="'+It(e)+'"]';var c=i;switch(t){case"style":c=Mr(e);break;case"script":c=Cr(e)}Ia.has(c)||(e=j({rel:"preload",href:t==="image"&&a&&a.imageSrcSet?void 0:e,as:t},a),Ia.set(c,e),n.querySelector(i)!==null||t==="style"&&n.querySelector(zi(c))||t==="script"&&n.querySelector(Ui(c))||(t=n.createElement("link"),ta(t,"link",e),Ut(t),n.head.appendChild(t)))}}function wp(e,t){el.m(e,t);var a=Tr;if(a&&e){var n=t&&typeof t.as=="string"?t.as:"script",i='link[rel="modulepreload"][as="'+It(n)+'"][href="'+It(e)+'"]',c=i;switch(n){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":c=Cr(e)}if(!Ia.has(c)&&(e=j({rel:"modulepreload",href:e},t),Ia.set(c,e),a.querySelector(i)===null)){switch(n){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(Ui(c)))return}n=a.createElement("link"),ta(n,"link",e),Ut(n),a.head.appendChild(n)}}}function Np(e,t,a){el.S(e,t,a);var n=Tr;if(n&&e){var i=en(n).hoistableStyles,c=Mr(e);t=t||"default";var p=i.get(c);if(!p){var E={loading:0,preload:null};if(p=n.querySelector(zi(c)))E.loading=5;else{e=j({rel:"stylesheet",href:e,"data-precedence":t},a),(a=Ia.get(c))&&Wd(e,a);var O=p=n.createElement("link");Ut(O),ta(O,"link",e),O._p=new Promise(function(Z,se){O.onload=Z,O.onerror=se}),O.addEventListener("load",function(){E.loading|=1}),O.addEventListener("error",function(){E.loading|=2}),E.loading|=4,Nc(p,t,n)}p={type:"stylesheet",instance:p,count:1,state:E},i.set(c,p)}}}function jp(e,t){el.X(e,t);var a=Tr;if(a&&e){var n=en(a).hoistableScripts,i=Cr(e),c=n.get(i);c||(c=a.querySelector(Ui(i)),c||(e=j({src:e,async:!0},t),(t=Ia.get(i))&&Id(e,t),c=a.createElement("script"),Ut(c),ta(c,"link",e),a.head.appendChild(c)),c={type:"script",instance:c,count:1,state:null},n.set(i,c))}}function Ep(e,t){el.M(e,t);var a=Tr;if(a&&e){var n=en(a).hoistableScripts,i=Cr(e),c=n.get(i);c||(c=a.querySelector(Ui(i)),c||(e=j({src:e,async:!0,type:"module"},t),(t=Ia.get(i))&&Id(e,t),c=a.createElement("script"),Ut(c),ta(c,"link",e),a.head.appendChild(c)),c={type:"script",instance:c,count:1,state:null},n.set(i,c))}}function M0(e,t,a,n){var i=(i=Me.current)?wc(i):null;if(!i)throw Error(o(446));switch(e){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(t=Mr(a.href),a=en(i).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=Mr(a.href);var c=en(i).hoistableStyles,p=c.get(e);if(p||(i=i.ownerDocument||i,p={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},c.set(e,p),(c=i.querySelector(zi(e)))&&!c._p&&(p.instance=c,p.state.loading=5),Ia.has(e)||(a={rel:"preload",as:"style",href:a.href,crossOrigin:a.crossOrigin,integrity:a.integrity,media:a.media,hrefLang:a.hrefLang,referrerPolicy:a.referrerPolicy},Ia.set(e,a),c||Tp(i,e,a,p.state))),t&&n===null)throw Error(o(528,""));return p}if(t&&n!==null)throw Error(o(529,""));return null;case"script":return t=a.async,a=a.src,typeof a=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Cr(a),a=en(i).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(o(444,e))}}function Mr(e){return'href="'+It(e)+'"'}function zi(e){return'link[rel="stylesheet"]['+e+"]"}function C0(e){return j({},e,{"data-precedence":e.precedence,precedence:null})}function Tp(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}),ta(t,"link",a),Ut(t),e.head.appendChild(t))}function Cr(e){return'[src="'+It(e)+'"]'}function Ui(e){return"script[async]"+e}function O0(e,t,a){if(t.count++,t.instance===null)switch(t.type){case"style":var n=e.querySelector('style[data-href~="'+It(a.href)+'"]');if(n)return t.instance=n,Ut(n),n;var i=j({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return n=(e.ownerDocument||e).createElement("style"),Ut(n),ta(n,"style",i),Nc(n,a.precedence,e),t.instance=n;case"stylesheet":i=Mr(a.href);var c=e.querySelector(zi(i));if(c)return t.state.loading|=4,t.instance=c,Ut(c),c;n=C0(a),(i=Ia.get(i))&&Wd(n,i),c=(e.ownerDocument||e).createElement("link"),Ut(c);var p=c;return p._p=new Promise(function(E,O){p.onload=E,p.onerror=O}),ta(c,"link",n),t.state.loading|=4,Nc(c,a.precedence,e),t.instance=c;case"script":return c=Cr(a.src),(i=e.querySelector(Ui(c)))?(t.instance=i,Ut(i),i):(n=a,(i=Ia.get(c))&&(n=j({},a),Id(n,i)),e=e.ownerDocument||e,i=e.createElement("script"),Ut(i),ta(i,"link",n),e.head.appendChild(i),t.instance=i);case"void":return null;default:throw Error(o(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(n=t.instance,t.state.loading|=4,Nc(n,a.precedence,e));return t.instance}function Nc(e,t,a){for(var n=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),i=n.length?n[n.length-1]:null,c=i,p=0;p<n.length;p++){var E=n[p];if(E.dataset.precedence===t)c=E;else if(c!==i)break}c?c.parentNode.insertBefore(e,c.nextSibling):(t=a.nodeType===9?a.head:a,t.insertBefore(e,t.firstChild))}function Wd(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function Id(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var jc=null;function D0(e,t,a){if(jc===null){var n=new Map,i=jc=new Map;i.set(a,n)}else i=jc,n=i.get(a),n||(n=new Map,i.set(a,n));if(n.has(e))return n;for(n.set(e,null),a=a.getElementsByTagName(e),i=0;i<a.length;i++){var c=a[i];if(!(c[Il]||c[Ot]||e==="link"&&c.getAttribute("rel")==="stylesheet")&&c.namespaceURI!=="http://www.w3.org/2000/svg"){var p=c.getAttribute(t)||"";p=e+p;var E=n.get(p);E?E.push(c):n.set(p,[c])}}return n}function R0(e,t,a){e=e.ownerDocument||e,e.head.insertBefore(a,t==="title"?e.querySelector("head > title"):null)}function Mp(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 A0(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function Cp(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 i=Mr(n.href),c=t.querySelector(zi(i));if(c){t=c._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=Ec.bind(e),t.then(e,e)),a.state.loading|=4,a.instance=c,Ut(c);return}c=t.ownerDocument||t,n=C0(n),(i=Ia.get(i))&&Wd(n,i),c=c.createElement("link"),Ut(c);var p=c;p._p=new Promise(function(E,O){p.onload=E,p.onerror=O}),ta(c,"link",n),a.instance=c}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(a,t),(t=a.state.preload)&&(a.state.loading&3)===0&&(e.count++,a=Ec.bind(e),t.addEventListener("load",a),t.addEventListener("error",a))}}var Xd=0;function Op(e,t){return e.stylesheets&&e.count===0&&Mc(e,e.stylesheets),0<e.count||0<e.imgCount?function(a){var n=setTimeout(function(){if(e.stylesheets&&Mc(e,e.stylesheets),e.unsuspend){var c=e.unsuspend;e.unsuspend=null,c()}},6e4+t);0<e.imgBytes&&Xd===0&&(Xd=62500*cp());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Mc(e,e.stylesheets),e.unsuspend)){var c=e.unsuspend;e.unsuspend=null,c()}},(e.imgBytes>Xd?50:800)+t);return e.unsuspend=a,function(){e.unsuspend=null,clearTimeout(n),clearTimeout(i)}}:null}function Ec(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Mc(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Tc=null;function Mc(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Tc=new Map,t.forEach(Dp,e),Tc=null,Ec.call(e))}function Dp(e,t){if(!(t.state.loading&4)){var a=Tc.get(e);if(a)var n=a.get(null);else{a=new Map,Tc.set(e,a);for(var i=e.querySelectorAll("link[data-precedence],style[data-precedence]"),c=0;c<i.length;c++){var p=i[c];(p.nodeName==="LINK"||p.getAttribute("media")!=="not all")&&(a.set(p.dataset.precedence,p),n=p)}n&&a.set(null,n)}i=t.instance,p=i.getAttribute("data-precedence"),c=a.get(p)||n,c===n&&a.set(null,i),a.set(p,i),this.count++,n=Ec.bind(this),i.addEventListener("load",n),i.addEventListener("error",n),c?c.parentNode.insertBefore(i,c.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(i,e.firstChild)),t.state.loading|=4}}var Hi={$$typeof:F,Provider:null,Consumer:null,_currentValue:ye,_currentValue2:ye,_threadCount:0};function Rp(e,t,a,n,i,c,p,E,O){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=Vs(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Vs(0),this.hiddenUpdates=Vs(null),this.identifierPrefix=n,this.onUncaughtError=i,this.onCaughtError=c,this.onRecoverableError=p,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=O,this.incompleteTransitions=new Map}function _0(e,t,a,n,i,c,p,E,O,Z,se,oe){return e=new Rp(e,t,a,p,O,Z,se,oe,E),t=1,c===!0&&(t|=24),c=Jt(3,null,null,t),e.current=c,c.stateNode=e,t=Do(),t.refCount++,e.pooledCache=t,t.refCount++,c.memoizedState={element:n,isDehydrated:a,cache:t},ko(c),e}function k0(e){return e?(e=Ca,e):Ca}function z0(e,t,a,n,i,c){i=k0(i),n.context===null?n.context=i:n.pendingContext=i,n=Tl(t),n.payload={element:a},c=c===void 0?null:c,c!==null&&(n.callback=c),a=Ml(e,n,t),a!==null&&(ja(a,e,t),gi(a,e,t))}function U0(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var a=e.retryLane;e.retryLane=a!==0&&a<t?a:t}}function Jd(e,t){U0(e,t),(e=e.alternate)&&U0(e,t)}function H0(e){if(e.tag===13||e.tag===31){var t=Ya(e,67108864);t!==null&&ja(t,e,67108864),Jd(e,67108864)}}function L0(e){if(e.tag===13||e.tag===31){var t=_a();t=Bs(t);var a=Ya(e,t);a!==null&&ja(a,e,t),Jd(e,t)}}var Cc=!0;function Ap(e,t,a,n){var i=Y.T;Y.T=null;var c=re.p;try{re.p=2,Kd(e,t,a,n)}finally{re.p=c,Y.T=i}}function _p(e,t,a,n){var i=Y.T;Y.T=null;var c=re.p;try{re.p=8,Kd(e,t,a,n)}finally{re.p=c,Y.T=i}}function Kd(e,t,a,n){if(Cc){var i=ef(n);if(i===null)qd(e,t,n,Oc,a),V0(e,n);else if(zp(i,e,t,a,n))n.stopPropagation();else if(V0(e,n),t&4&&-1<kp.indexOf(e)){for(;i!==null;){var c=Oe(i);if(c!==null)switch(c.tag){case 3:if(c=c.stateNode,c.current.memoizedState.isDehydrated){var p=bn(c.pendingLanes);if(p!==0){var E=c;for(E.pendingLanes|=2,E.entangledLanes|=2;p;){var O=1<<31-zt(p);E.entanglements[1]|=O,p&=~O}On(c),(lt&6)===0&&(dc=ze()+500,Ri(0))}}break;case 31:case 13:E=Ya(c,2),E!==null&&ja(E,c,2),hc(),Jd(c,2)}if(c=ef(n),c===null&&qd(e,t,n,Oc,a),c===i)break;i=c}i!==null&&n.stopPropagation()}else qd(e,t,n,null,a)}}function ef(e){return e=Ps(e),tf(e)}var Oc=null;function tf(e){if(Oc=null,e=_n(e),e!==null){var t=f(e);if(t===null)e=null;else{var a=t.tag;if(a===13){if(e=y(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 Oc=e,null}function q0(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(gt()){case La:return 2;case vn:return 8;case ce:case Se:return 32;case Fe:return 268435456;default:return 32}default:return 32}}var af=!1,Ll=null,ql=null,Vl=null,Li=new Map,qi=new Map,Bl=[],kp="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 V0(e,t){switch(e){case"focusin":case"focusout":Ll=null;break;case"dragenter":case"dragleave":ql=null;break;case"mouseover":case"mouseout":Vl=null;break;case"pointerover":case"pointerout":Li.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":qi.delete(t.pointerId)}}function Vi(e,t,a,n,i,c){return e===null||e.nativeEvent!==c?(e={blockedOn:t,domEventName:a,eventSystemFlags:n,nativeEvent:c,targetContainers:[i]},t!==null&&(t=Oe(t),t!==null&&H0(t)),e):(e.eventSystemFlags|=n,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function zp(e,t,a,n,i){switch(t){case"focusin":return Ll=Vi(Ll,e,t,a,n,i),!0;case"dragenter":return ql=Vi(ql,e,t,a,n,i),!0;case"mouseover":return Vl=Vi(Vl,e,t,a,n,i),!0;case"pointerover":var c=i.pointerId;return Li.set(c,Vi(Li.get(c)||null,e,t,a,n,i)),!0;case"gotpointercapture":return c=i.pointerId,qi.set(c,Vi(qi.get(c)||null,e,t,a,n,i)),!0}return!1}function B0(e){var t=_n(e.target);if(t!==null){var a=f(t);if(a!==null){if(t=a.tag,t===13){if(t=y(a),t!==null){e.blockedOn=t,Yr(e.priority,function(){L0(a)});return}}else if(t===31){if(t=w(a),t!==null){e.blockedOn=t,Yr(e.priority,function(){L0(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 Dc(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var a=ef(e.nativeEvent);if(a===null){a=e.nativeEvent;var n=new a.constructor(a.type,a);Qr=n,a.target.dispatchEvent(n),Qr=null}else return t=Oe(a),t!==null&&H0(t),e.blockedOn=a,!1;t.shift()}return!0}function Y0(e,t,a){Dc(e)&&a.delete(t)}function Up(){af=!1,Ll!==null&&Dc(Ll)&&(Ll=null),ql!==null&&Dc(ql)&&(ql=null),Vl!==null&&Dc(Vl)&&(Vl=null),Li.forEach(Y0),qi.forEach(Y0)}function Rc(e,t){e.blockedOn===t&&(e.blockedOn=null,af||(af=!0,l.unstable_scheduleCallback(l.unstable_NormalPriority,Up)))}var Ac=null;function $0(e){Ac!==e&&(Ac=e,l.unstable_scheduleCallback(l.unstable_NormalPriority,function(){Ac===e&&(Ac=null);for(var t=0;t<e.length;t+=3){var a=e[t],n=e[t+1],i=e[t+2];if(typeof n!="function"){if(tf(n||a)===null)continue;break}var c=Oe(a);c!==null&&(e.splice(t,3),t-=3,ed(c,{pending:!0,data:i,method:a.method,action:n},n,i))}}))}function Or(e){function t(O){return Rc(O,e)}Ll!==null&&Rc(Ll,e),ql!==null&&Rc(ql,e),Vl!==null&&Rc(Vl,e),Li.forEach(t),qi.forEach(t);for(var a=0;a<Bl.length;a++){var n=Bl[a];n.blockedOn===e&&(n.blockedOn=null)}for(;0<Bl.length&&(a=Bl[0],a.blockedOn===null);)B0(a),a.blockedOn===null&&Bl.shift();if(a=(e.ownerDocument||e).$$reactFormReplay,a!=null)for(n=0;n<a.length;n+=3){var i=a[n],c=a[n+1],p=i[Bt]||null;if(typeof c=="function")p||$0(a);else if(p){var E=null;if(c&&c.hasAttribute("formAction")){if(i=c,p=c[Bt]||null)E=p.formAction;else if(tf(i)!==null)continue}else E=p.action;typeof E=="function"?a[n+1]=E:(a.splice(n,3),n-=3),$0(a)}}}function F0(){function e(c){c.canIntercept&&c.info==="react-transition"&&c.intercept({handler:function(){return new Promise(function(p){return i=p})},focusReset:"manual",scroll:"manual"})}function t(){i!==null&&(i(),i=null),n||setTimeout(a,20)}function a(){if(!n&&!navigation.transition){var c=navigation.currentEntry;c&&c.url!=null&&navigation.navigate(c.url,{state:c.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var n=!1,i=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),i!==null&&(i(),i=null)}}}function nf(e){this._internalRoot=e}_c.prototype.render=nf.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(o(409));var a=t.current,n=_a();z0(a,n,e,t,null,null)},_c.prototype.unmount=nf.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;z0(e.current,2,null,e,null,null),hc(),t[An]=null}};function _c(e){this._internalRoot=e}_c.prototype.unstable_scheduleHydration=function(e){if(e){var t=Ys();e={blockedOn:null,target:e,priority:t};for(var a=0;a<Bl.length&&t!==0&&t<Bl[a].priority;a++);Bl.splice(a,0,e),a===0&&B0(e)}};var G0=u.version;if(G0!=="19.2.4")throw Error(o(527,G0,"19.2.4"));re.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(o(188)):(e=Object.keys(e).join(","),Error(o(268,e)));return e=x(t),e=e!==null?S(e):null,e=e===null?null:e.stateNode,e};var Hp={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:Y,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var kc=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!kc.isDisabled&&kc.supportsFiber)try{nt=kc.inject(Hp),pt=kc}catch{}}return Yi.createRoot=function(e,t){if(!g(e))throw Error(o(299));var a=!1,n="",i=Jh,c=Kh,p=em;return t!=null&&(t.unstable_strictMode===!0&&(a=!0),t.identifierPrefix!==void 0&&(n=t.identifierPrefix),t.onUncaughtError!==void 0&&(i=t.onUncaughtError),t.onCaughtError!==void 0&&(c=t.onCaughtError),t.onRecoverableError!==void 0&&(p=t.onRecoverableError)),t=_0(e,1,!1,null,null,a,n,null,i,c,p,F0),e[An]=t.current,Ld(e),new nf(t)},Yi.hydrateRoot=function(e,t,a){if(!g(e))throw Error(o(299));var n=!1,i="",c=Jh,p=Kh,E=em,O=null;return a!=null&&(a.unstable_strictMode===!0&&(n=!0),a.identifierPrefix!==void 0&&(i=a.identifierPrefix),a.onUncaughtError!==void 0&&(c=a.onUncaughtError),a.onCaughtError!==void 0&&(p=a.onCaughtError),a.onRecoverableError!==void 0&&(E=a.onRecoverableError),a.formState!==void 0&&(O=a.formState)),t=_0(e,1,!0,t,a??null,n,i,O,c,p,E,F0),t.context=k0(null),a=t.current,n=_a(),n=Bs(n),i=Tl(n),i.callback=null,Ml(a,i,n),a=n,t.current.lanes=a,cl(t,a),On(t),e[An]=t.current,Ld(e),new _c(t)},Yi.version="19.2.4",Yi}var ng;function Wp(){if(ng)return uf.exports;ng=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(u){console.error(u)}}return l(),uf.exports=Pp(),uf.exports}var Ip=Wp();const Xp=Rf(Ip);/**
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 lg="popstate";function Jp(l={}){function u(g,f){let{pathname:y="/",search:w="",hash:b=""}=Us(g.location.hash.substring(1));return!y.startsWith("/")&&!y.startsWith(".")&&(y="/"+y),wf("",{pathname:y,search:w,hash:b},f.state&&f.state.usr||null,f.state&&f.state.key||"default")}function d(g,f){let y=g.document.querySelector("base"),w="";if(y&&y.getAttribute("href")){let b=g.location.href,x=b.indexOf("#");w=x===-1?b:b.slice(0,x)}return w+"#"+(typeof f=="string"?f:lu(f))}function o(g,f){Xa(g.pathname.charAt(0)==="/",`relative pathnames are not supported in hash history.push(${JSON.stringify(f)})`)}return ev(u,d,o,l)}function Et(l,u){if(l===!1||l===null||typeof l>"u")throw new Error(u)}function Xa(l,u){if(!l){typeof console<"u"&&console.warn(u);try{throw new Error(u)}catch{}}}function Kp(){return Math.random().toString(36).substring(2,10)}function sg(l,u){return{usr:l.state,key:l.key,idx:u}}function wf(l,u,d=null,o){return{pathname:typeof l=="string"?l:l.pathname,search:"",hash:"",...typeof u=="string"?Us(u):u,state:d,key:u&&u.key||o||Kp()}}function lu({pathname:l="/",search:u="",hash:d=""}){return u&&u!=="?"&&(l+=u.charAt(0)==="?"?u:"?"+u),d&&d!=="#"&&(l+=d.charAt(0)==="#"?d:"#"+d),l}function Us(l){let u={};if(l){let d=l.indexOf("#");d>=0&&(u.hash=l.substring(d),l=l.substring(0,d));let o=l.indexOf("?");o>=0&&(u.search=l.substring(o),l=l.substring(0,o)),l&&(u.pathname=l)}return u}function ev(l,u,d,o={}){let{window:g=document.defaultView,v5Compat:f=!1}=o,y=g.history,w="POP",b=null,x=S();x==null&&(x=0,y.replaceState({...y.state,idx:x},""));function S(){return(y.state||{idx:null}).idx}function j(){w="POP";let B=S(),X=B==null?null:B-x;x=B,b&&b({action:w,location:T.location,delta:X})}function M(B,X){w="PUSH";let Q=wf(T.location,B,X);d&&d(Q,B),x=S()+1;let F=sg(Q,x),ae=T.createHref(Q);try{y.pushState(F,"",ae)}catch(le){if(le instanceof DOMException&&le.name==="DataCloneError")throw le;g.location.assign(ae)}f&&b&&b({action:w,location:T.location,delta:1})}function D(B,X){w="REPLACE";let Q=wf(T.location,B,X);d&&d(Q,B),x=S();let F=sg(Q,x),ae=T.createHref(Q);y.replaceState(F,"",ae),f&&b&&b({action:w,location:T.location,delta:0})}function _(B){return tv(B)}let T={get action(){return w},get location(){return l(g,y)},listen(B){if(b)throw new Error("A history only accepts one active listener");return g.addEventListener(lg,j),b=B,()=>{g.removeEventListener(lg,j),b=null}},createHref(B){return u(g,B)},createURL:_,encodeLocation(B){let X=_(B);return{pathname:X.pathname,search:X.search,hash:X.hash}},push:M,replace:D,go(B){return y.go(B)}};return T}function tv(l,u=!1){let d="http://localhost";typeof window<"u"&&(d=window.location.origin!=="null"?window.location.origin:window.location.href),Et(d,"No window.location.(origin|href) available to create URL");let o=typeof l=="string"?l:lu(l);return o=o.replace(/ $/,"%20"),!u&&o.startsWith("//")&&(o=d+o),new URL(o,d)}function ny(l,u,d="/"){return av(l,u,d,!1)}function av(l,u,d,o){let g=typeof u=="string"?Us(u):u,f=sl(g.pathname||"/",d);if(f==null)return null;let y=ly(l);nv(y);let w=null;for(let b=0;w==null&&b<y.length;++b){let x=mv(f);w=fv(y[b],x,o)}return w}function ly(l,u=[],d=[],o="",g=!1){let f=(y,w,b=g,x)=>{let S={relativePath:x===void 0?y.path||"":x,caseSensitive:y.caseSensitive===!0,childrenIndex:w,route:y};if(S.relativePath.startsWith("/")){if(!S.relativePath.startsWith(o)&&b)return;Et(S.relativePath.startsWith(o),`Absolute route path "${S.relativePath}" nested under path "${o}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),S.relativePath=S.relativePath.slice(o.length)}let j=ll([o,S.relativePath]),M=d.concat(S);y.children&&y.children.length>0&&(Et(y.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${j}".`),ly(y.children,u,M,j,b)),!(y.path==null&&!y.index)&&u.push({path:j,score:ov(j,y.index),routesMeta:M})};return l.forEach((y,w)=>{var b;if(y.path===""||!((b=y.path)!=null&&b.includes("?")))f(y,w);else for(let x of sy(y.path))f(y,w,!0,x)}),u}function sy(l){let u=l.split("/");if(u.length===0)return[];let[d,...o]=u,g=d.endsWith("?"),f=d.replace(/\?$/,"");if(o.length===0)return g?[f,""]:[f];let y=sy(o.join("/")),w=[];return w.push(...y.map(b=>b===""?f:[f,b].join("/"))),g&&w.push(...y),w.map(b=>l.startsWith("/")&&b===""?"/":b)}function nv(l){l.sort((u,d)=>u.score!==d.score?d.score-u.score:dv(u.routesMeta.map(o=>o.childrenIndex),d.routesMeta.map(o=>o.childrenIndex)))}var lv=/^:[\w-]+$/,sv=3,rv=2,iv=1,uv=10,cv=-2,rg=l=>l==="*";function ov(l,u){let d=l.split("/"),o=d.length;return d.some(rg)&&(o+=cv),u&&(o+=rv),d.filter(g=>!rg(g)).reduce((g,f)=>g+(lv.test(f)?sv:f===""?iv:uv),o)}function dv(l,u){return l.length===u.length&&l.slice(0,-1).every((o,g)=>o===u[g])?l[l.length-1]-u[u.length-1]:0}function fv(l,u,d=!1){let{routesMeta:o}=l,g={},f="/",y=[];for(let w=0;w<o.length;++w){let b=o[w],x=w===o.length-1,S=f==="/"?u:u.slice(f.length)||"/",j=$c({path:b.relativePath,caseSensitive:b.caseSensitive,end:x},S),M=b.route;if(!j&&x&&d&&!o[o.length-1].route.index&&(j=$c({path:b.relativePath,caseSensitive:b.caseSensitive,end:!1},S)),!j)return null;Object.assign(g,j.params),y.push({params:g,pathname:ll([f,j.pathname]),pathnameBase:pv(ll([f,j.pathnameBase])),route:M}),j.pathnameBase!=="/"&&(f=ll([f,j.pathnameBase]))}return y}function $c(l,u){typeof l=="string"&&(l={path:l,caseSensitive:!1,end:!0});let[d,o]=hv(l.path,l.caseSensitive,l.end),g=u.match(d);if(!g)return null;let f=g[0],y=f.replace(/(.)\/+$/,"$1"),w=g.slice(1);return{params:o.reduce((x,{paramName:S,isOptional:j},M)=>{if(S==="*"){let _=w[M]||"";y=f.slice(0,f.length-_.length).replace(/(.)\/+$/,"$1")}const D=w[M];return j&&!D?x[S]=void 0:x[S]=(D||"").replace(/%2F/g,"/"),x},{}),pathname:f,pathnameBase:y,pattern:l}}function hv(l,u=!1,d=!0){Xa(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 o=[],g="^"+l.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(y,w,b)=>(o.push({paramName:w,isOptional:b!=null}),b?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return l.endsWith("*")?(o.push({paramName:"*"}),g+=l==="*"||l==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):d?g+="\\/*$":l!==""&&l!=="/"&&(g+="(?:(?=\\/|$))"),[new RegExp(g,u?void 0:"i"),o]}function mv(l){try{return l.split("/").map(u=>decodeURIComponent(u).replace(/\//g,"%2F")).join("/")}catch(u){return Xa(!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 (${u}).`),l}}function sl(l,u){if(u==="/")return l;if(!l.toLowerCase().startsWith(u.toLowerCase()))return null;let d=u.endsWith("/")?u.length-1:u.length,o=l.charAt(d);return o&&o!=="/"?null:l.slice(d)||"/"}var gv=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function yv(l,u="/"){let{pathname:d,search:o="",hash:g=""}=typeof l=="string"?Us(l):l,f;return d?(d=d.replace(/\/\/+/g,"/"),d.startsWith("/")?f=ig(d.substring(1),"/"):f=ig(d,u)):f=u,{pathname:f,search:vv(o),hash:bv(g)}}function ig(l,u){let d=u.replace(/\/+$/,"").split("/");return l.split("/").forEach(g=>{g===".."?d.length>1&&d.pop():g!=="."&&d.push(g)}),d.length>1?d.join("/"):"/"}function ff(l,u,d,o){return`Cannot include a '${l}' character in a manually specified \`to.${u}\` field [${JSON.stringify(o)}]. Please separate it out to the \`to.${d}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function xv(l){return l.filter((u,d)=>d===0||u.route.path&&u.route.path.length>0)}function _f(l){let u=xv(l);return u.map((d,o)=>o===u.length-1?d.pathname:d.pathnameBase)}function kf(l,u,d,o=!1){let g;typeof l=="string"?g=Us(l):(g={...l},Et(!g.pathname||!g.pathname.includes("?"),ff("?","pathname","search",g)),Et(!g.pathname||!g.pathname.includes("#"),ff("#","pathname","hash",g)),Et(!g.search||!g.search.includes("#"),ff("#","search","hash",g)));let f=l===""||g.pathname==="",y=f?"/":g.pathname,w;if(y==null)w=d;else{let j=u.length-1;if(!o&&y.startsWith("..")){let M=y.split("/");for(;M[0]==="..";)M.shift(),j-=1;g.pathname=M.join("/")}w=j>=0?u[j]:"/"}let b=yv(g,w),x=y&&y!=="/"&&y.endsWith("/"),S=(f||y===".")&&d.endsWith("/");return!b.pathname.endsWith("/")&&(x||S)&&(b.pathname+="/"),b}var ll=l=>l.join("/").replace(/\/\/+/g,"/"),pv=l=>l.replace(/\/+$/,"").replace(/^\/*/,"/"),vv=l=>!l||l==="?"?"":l.startsWith("?")?l:"?"+l,bv=l=>!l||l==="#"?"":l.startsWith("#")?l:"#"+l,Sv=class{constructor(l,u,d,o=!1){this.status=l,this.statusText=u||"",this.internal=o,d instanceof Error?(this.data=d.toString(),this.error=d):this.data=d}};function wv(l){return l!=null&&typeof l.status=="number"&&typeof l.statusText=="string"&&typeof l.internal=="boolean"&&"data"in l}function Nv(l){return l.map(u=>u.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var ry=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function iy(l,u){let d=l;if(typeof d!="string"||!gv.test(d))return{absoluteURL:void 0,isExternal:!1,to:d};let o=d,g=!1;if(ry)try{let f=new URL(window.location.href),y=d.startsWith("//")?new URL(f.protocol+d):new URL(d),w=sl(y.pathname,u);y.origin===f.origin&&w!=null?d=w+y.search+y.hash:g=!0}catch{Xa(!1,`<Link to="${d}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:o,isExternal:g,to:d}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var uy=["POST","PUT","PATCH","DELETE"];new Set(uy);var jv=["GET",...uy];new Set(jv);var Ur=V.createContext(null);Ur.displayName="DataRouter";var Pc=V.createContext(null);Pc.displayName="DataRouterState";var Ev=V.createContext(!1),cy=V.createContext({isTransitioning:!1});cy.displayName="ViewTransition";var Tv=V.createContext(new Map);Tv.displayName="Fetchers";var Mv=V.createContext(null);Mv.displayName="Await";var Ua=V.createContext(null);Ua.displayName="Navigation";var ru=V.createContext(null);ru.displayName="Location";var Rn=V.createContext({outlet:null,matches:[],isDataRoute:!1});Rn.displayName="Route";var zf=V.createContext(null);zf.displayName="RouteError";var oy="REACT_ROUTER_ERROR",Cv="REDIRECT",Ov="ROUTE_ERROR_RESPONSE";function Dv(l){if(l.startsWith(`${oy}:${Cv}:{`))try{let u=JSON.parse(l.slice(28));if(typeof u=="object"&&u&&typeof u.status=="number"&&typeof u.statusText=="string"&&typeof u.location=="string"&&typeof u.reloadDocument=="boolean"&&typeof u.replace=="boolean")return u}catch{}}function Rv(l){if(l.startsWith(`${oy}:${Ov}:{`))try{let u=JSON.parse(l.slice(40));if(typeof u=="object"&&u&&typeof u.status=="number"&&typeof u.statusText=="string")return new Sv(u.status,u.statusText,u.data)}catch{}}function Av(l,{relative:u}={}){Et(Hr(),"useHref() may be used only in the context of a <Router> component.");let{basename:d,navigator:o}=V.useContext(Ua),{hash:g,pathname:f,search:y}=iu(l,{relative:u}),w=f;return d!=="/"&&(w=f==="/"?d:ll([d,f])),o.createHref({pathname:w,search:y,hash:g})}function Hr(){return V.useContext(ru)!=null}function Ql(){return Et(Hr(),"useLocation() may be used only in the context of a <Router> component."),V.useContext(ru).location}var dy="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function fy(l){V.useContext(Ua).static||V.useLayoutEffect(l)}function Uf(){let{isDataRoute:l}=V.useContext(Rn);return l?Gv():_v()}function _v(){Et(Hr(),"useNavigate() may be used only in the context of a <Router> component.");let l=V.useContext(Ur),{basename:u,navigator:d}=V.useContext(Ua),{matches:o}=V.useContext(Rn),{pathname:g}=Ql(),f=JSON.stringify(_f(o)),y=V.useRef(!1);return fy(()=>{y.current=!0}),V.useCallback((b,x={})=>{if(Xa(y.current,dy),!y.current)return;if(typeof b=="number"){d.go(b);return}let S=kf(b,JSON.parse(f),g,x.relative==="path");l==null&&u!=="/"&&(S.pathname=S.pathname==="/"?u:ll([u,S.pathname])),(x.replace?d.replace:d.push)(S,x.state,x)},[u,d,f,g,l])}V.createContext(null);function iu(l,{relative:u}={}){let{matches:d}=V.useContext(Rn),{pathname:o}=Ql(),g=JSON.stringify(_f(d));return V.useMemo(()=>kf(l,JSON.parse(g),o,u==="path"),[l,g,o,u])}function kv(l,u){return hy(l,u)}function hy(l,u,d,o,g){var Q;Et(Hr(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:f}=V.useContext(Ua),{matches:y}=V.useContext(Rn),w=y[y.length-1],b=w?w.params:{},x=w?w.pathname:"/",S=w?w.pathnameBase:"/",j=w&&w.route;{let F=j&&j.path||"";gy(x,!j||F.endsWith("*")||F.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${x}" (under <Route path="${F}">) 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="${F}"> to <Route path="${F==="/"?"*":`${F}/*`}">.`)}let M=Ql(),D;if(u){let F=typeof u=="string"?Us(u):u;Et(S==="/"||((Q=F.pathname)==null?void 0:Q.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 "${F.pathname}" was given in the \`location\` prop.`),D=F}else D=M;let _=D.pathname||"/",T=_;if(S!=="/"){let F=S.replace(/^\//,"").split("/");T="/"+_.replace(/^\//,"").split("/").slice(F.length).join("/")}let B=ny(l,{pathname:T});Xa(j||B!=null,`No routes matched location "${D.pathname}${D.search}${D.hash}" `),Xa(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 "${D.pathname}${D.search}${D.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 X=qv(B&&B.map(F=>Object.assign({},F,{params:Object.assign({},b,F.params),pathname:ll([S,f.encodeLocation?f.encodeLocation(F.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:F.pathname]),pathnameBase:F.pathnameBase==="/"?S:ll([S,f.encodeLocation?f.encodeLocation(F.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:F.pathnameBase])})),y,d,o,g);return u&&X?V.createElement(ru.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...D},navigationType:"POP"}},X):X}function zv(){let l=Fv(),u=wv(l)?`${l.status} ${l.statusText}`:l instanceof Error?l.message:JSON.stringify(l),d=l instanceof Error?l.stack:null,o="rgba(200,200,200, 0.5)",g={padding:"0.5rem",backgroundColor:o},f={padding:"2px 4px",backgroundColor:o},y=null;return console.error("Error handled by React Router default ErrorBoundary:",l),y=V.createElement(V.Fragment,null,V.createElement("p",null,"💿 Hey developer 👋"),V.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",V.createElement("code",{style:f},"ErrorBoundary")," or"," ",V.createElement("code",{style:f},"errorElement")," prop on your route.")),V.createElement(V.Fragment,null,V.createElement("h2",null,"Unexpected Application Error!"),V.createElement("h3",{style:{fontStyle:"italic"}},u),d?V.createElement("pre",{style:g},d):null,y)}var Uv=V.createElement(zv,null),my=class extends V.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,u){return u.location!==l.location||u.revalidation!=="idle"&&l.revalidation==="idle"?{error:l.error,location:l.location,revalidation:l.revalidation}:{error:l.error!==void 0?l.error:u.error,location:u.location,revalidation:l.revalidation||u.revalidation}}componentDidCatch(l,u){this.props.onError?this.props.onError(l,u):console.error("React Router caught the following error during render",l)}render(){let l=this.state.error;if(this.context&&typeof l=="object"&&l&&"digest"in l&&typeof l.digest=="string"){const d=Rv(l.digest);d&&(l=d)}let u=l!==void 0?V.createElement(Rn.Provider,{value:this.props.routeContext},V.createElement(zf.Provider,{value:l,children:this.props.component})):this.props.children;return this.context?V.createElement(Hv,{error:l},u):u}};my.contextType=Ev;var hf=new WeakMap;function Hv({children:l,error:u}){let{basename:d}=V.useContext(Ua);if(typeof u=="object"&&u&&"digest"in u&&typeof u.digest=="string"){let o=Dv(u.digest);if(o){let g=hf.get(u);if(g)throw g;let f=iy(o.location,d);if(ry&&!hf.get(u))if(f.isExternal||o.reloadDocument)window.location.href=f.absoluteURL||f.to;else{const y=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(f.to,{replace:o.replace}));throw hf.set(u,y),y}return V.createElement("meta",{httpEquiv:"refresh",content:`0;url=${f.absoluteURL||f.to}`})}}return l}function Lv({routeContext:l,match:u,children:d}){let o=V.useContext(Ur);return o&&o.static&&o.staticContext&&(u.route.errorElement||u.route.ErrorBoundary)&&(o.staticContext._deepestRenderedBoundaryId=u.route.id),V.createElement(Rn.Provider,{value:l},d)}function qv(l,u=[],d=null,o=null,g=null){if(l==null){if(!d)return null;if(d.errors)l=d.matches;else if(u.length===0&&!d.initialized&&d.matches.length>0)l=d.matches;else return null}let f=l,y=d==null?void 0:d.errors;if(y!=null){let S=f.findIndex(j=>j.route.id&&(y==null?void 0:y[j.route.id])!==void 0);Et(S>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(y).join(",")}`),f=f.slice(0,Math.min(f.length,S+1))}let w=!1,b=-1;if(d)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:M,errors:D}=d,_=j.route.loader&&!M.hasOwnProperty(j.route.id)&&(!D||D[j.route.id]===void 0);if(j.route.lazy||_){w=!0,b>=0?f=f.slice(0,b+1):f=[f[0]];break}}}let x=d&&o?(S,j)=>{var M,D;o(S,{location:d.location,params:((D=(M=d.matches)==null?void 0:M[0])==null?void 0:D.params)??{},unstable_pattern:Nv(d.matches),errorInfo:j})}:void 0;return f.reduceRight((S,j,M)=>{let D,_=!1,T=null,B=null;d&&(D=y&&j.route.id?y[j.route.id]:void 0,T=j.route.errorElement||Uv,w&&(b<0&&M===0?(gy("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),_=!0,B=null):b===M&&(_=!0,B=j.route.hydrateFallbackElement||null)));let X=u.concat(f.slice(0,M+1)),Q=()=>{let F;return D?F=T:_?F=B:j.route.Component?F=V.createElement(j.route.Component,null):j.route.element?F=j.route.element:F=S,V.createElement(Lv,{match:j,routeContext:{outlet:S,matches:X,isDataRoute:d!=null},children:F})};return d&&(j.route.ErrorBoundary||j.route.errorElement||M===0)?V.createElement(my,{location:d.location,revalidation:d.revalidation,component:T,error:D,children:Q(),routeContext:{outlet:null,matches:X,isDataRoute:!0},onError:x}):Q()},null)}function Hf(l){return`${l} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Vv(l){let u=V.useContext(Ur);return Et(u,Hf(l)),u}function Bv(l){let u=V.useContext(Pc);return Et(u,Hf(l)),u}function Yv(l){let u=V.useContext(Rn);return Et(u,Hf(l)),u}function Lf(l){let u=Yv(l),d=u.matches[u.matches.length-1];return Et(d.route.id,`${l} can only be used on routes that contain a unique "id"`),d.route.id}function $v(){return Lf("useRouteId")}function Fv(){var o;let l=V.useContext(zf),u=Bv("useRouteError"),d=Lf("useRouteError");return l!==void 0?l:(o=u.errors)==null?void 0:o[d]}function Gv(){let{router:l}=Vv("useNavigate"),u=Lf("useNavigate"),d=V.useRef(!1);return fy(()=>{d.current=!0}),V.useCallback(async(g,f={})=>{Xa(d.current,dy),d.current&&(typeof g=="number"?await l.navigate(g):await l.navigate(g,{fromRouteId:u,...f}))},[l,u])}var ug={};function gy(l,u,d){!u&&!ug[l]&&(ug[l]=!0,Xa(!1,d))}V.memo(Zv);function Zv({routes:l,future:u,state:d,onError:o}){return hy(l,void 0,d,o,u)}function Qv({to:l,replace:u,state:d,relative:o}){Et(Hr(),"<Navigate> may be used only in the context of a <Router> component.");let{static:g}=V.useContext(Ua);Xa(!g,"<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}=V.useContext(Rn),{pathname:y}=Ql(),w=Uf(),b=kf(l,_f(f),y,o==="path"),x=JSON.stringify(b);return V.useEffect(()=>{w(JSON.parse(x),{replace:u,state:d,relative:o})},[w,x,o,u,d]),null}function al(l){Et(!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 Pv({basename:l="/",children:u=null,location:d,navigationType:o="POP",navigator:g,static:f=!1,unstable_useTransitions:y}){Et(!Hr(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let w=l.replace(/^\/*/,"/"),b=V.useMemo(()=>({basename:w,navigator:g,static:f,unstable_useTransitions:y,future:{}}),[w,g,f,y]);typeof d=="string"&&(d=Us(d));let{pathname:x="/",search:S="",hash:j="",state:M=null,key:D="default"}=d,_=V.useMemo(()=>{let T=sl(x,w);return T==null?null:{location:{pathname:T,search:S,hash:j,state:M,key:D},navigationType:o}},[w,x,S,j,M,D,o]);return Xa(_!=null,`<Router basename="${w}"> is not able to match the URL "${x}${S}${j}" because it does not start with the basename, so the <Router> won't render anything.`),_==null?null:V.createElement(Ua.Provider,{value:b},V.createElement(ru.Provider,{children:u,value:_}))}function Wv({children:l,location:u}){return kv(Nf(l),u)}function Nf(l,u=[]){let d=[];return V.Children.forEach(l,(o,g)=>{if(!V.isValidElement(o))return;let f=[...u,g];if(o.type===V.Fragment){d.push.apply(d,Nf(o.props.children,f));return}Et(o.type===al,`[${typeof o.type=="string"?o.type:o.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),Et(!o.props.index||!o.props.children,"An index route cannot have child routes.");let y={id:o.props.id||f.join("-"),caseSensitive:o.props.caseSensitive,element:o.props.element,Component:o.props.Component,index:o.props.index,path:o.props.path,middleware:o.props.middleware,loader:o.props.loader,action:o.props.action,hydrateFallbackElement:o.props.hydrateFallbackElement,HydrateFallback:o.props.HydrateFallback,errorElement:o.props.errorElement,ErrorBoundary:o.props.ErrorBoundary,hasErrorBoundary:o.props.hasErrorBoundary===!0||o.props.ErrorBoundary!=null||o.props.errorElement!=null,shouldRevalidate:o.props.shouldRevalidate,handle:o.props.handle,lazy:o.props.lazy};o.props.children&&(y.children=Nf(o.props.children,f)),d.push(y)}),d}var Bc="get",Yc="application/x-www-form-urlencoded";function Wc(l){return typeof HTMLElement<"u"&&l instanceof HTMLElement}function Iv(l){return Wc(l)&&l.tagName.toLowerCase()==="button"}function Xv(l){return Wc(l)&&l.tagName.toLowerCase()==="form"}function Jv(l){return Wc(l)&&l.tagName.toLowerCase()==="input"}function Kv(l){return!!(l.metaKey||l.altKey||l.ctrlKey||l.shiftKey)}function eb(l,u){return l.button===0&&(!u||u==="_self")&&!Kv(l)}var zc=null;function tb(){if(zc===null)try{new FormData(document.createElement("form"),0),zc=!1}catch{zc=!0}return zc}var ab=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function mf(l){return l!=null&&!ab.has(l)?(Xa(!1,`"${l}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Yc}"`),null):l}function nb(l,u){let d,o,g,f,y;if(Xv(l)){let w=l.getAttribute("action");o=w?sl(w,u):null,d=l.getAttribute("method")||Bc,g=mf(l.getAttribute("enctype"))||Yc,f=new FormData(l)}else if(Iv(l)||Jv(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(o=b?sl(b,u):null,d=l.getAttribute("formmethod")||w.getAttribute("method")||Bc,g=mf(l.getAttribute("formenctype"))||mf(w.getAttribute("enctype"))||Yc,f=new FormData(w,l),!tb()){let{name:x,type:S,value:j}=l;if(S==="image"){let M=x?`${x}.`:"";f.append(`${M}x`,"0"),f.append(`${M}y`,"0")}else x&&f.append(x,j)}}else{if(Wc(l))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');d=Bc,o=null,g=Yc,y=l}return f&&g==="text/plain"&&(y=f,f=void 0),{action:o,method:d.toLowerCase(),encType:g,formData:f,body:y}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function qf(l,u){if(l===!1||l===null||typeof l>"u")throw new Error(u)}function lb(l,u,d,o){let g=typeof l=="string"?new URL(l,typeof window>"u"?"server://singlefetch/":window.location.origin):l;return d?g.pathname.endsWith("/")?g.pathname=`${g.pathname}_.${o}`:g.pathname=`${g.pathname}.${o}`:g.pathname==="/"?g.pathname=`_root.${o}`:u&&sl(g.pathname,u)==="/"?g.pathname=`${u.replace(/\/$/,"")}/_root.${o}`:g.pathname=`${g.pathname.replace(/\/$/,"")}.${o}`,g}async function sb(l,u){if(l.id in u)return u[l.id];try{let d=await import(l.module);return u[l.id]=d,d}catch(d){return console.error(`Error loading route module \`${l.module}\`, reloading page...`),console.error(d),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function rb(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 ib(l,u,d){let o=await Promise.all(l.map(async g=>{let f=u.routes[g.route.id];if(f){let y=await sb(f,d);return y.links?y.links():[]}return[]}));return db(o.flat(1).filter(rb).filter(g=>g.rel==="stylesheet"||g.rel==="preload").map(g=>g.rel==="stylesheet"?{...g,rel:"prefetch",as:"style"}:{...g,rel:"prefetch"}))}function cg(l,u,d,o,g,f){let y=(b,x)=>d[x]?b.route.id!==d[x].route.id:!0,w=(b,x)=>{var S;return d[x].pathname!==b.pathname||((S=d[x].route.path)==null?void 0:S.endsWith("*"))&&d[x].params["*"]!==b.params["*"]};return f==="assets"?u.filter((b,x)=>y(b,x)||w(b,x)):f==="data"?u.filter((b,x)=>{var j;let S=o.routes[b.route.id];if(!S||!S.hasLoader)return!1;if(y(b,x)||w(b,x))return!0;if(b.route.shouldRevalidate){let M=b.route.shouldRevalidate({currentUrl:new URL(g.pathname+g.search+g.hash,window.origin),currentParams:((j=d[0])==null?void 0:j.params)||{},nextUrl:new URL(l,window.origin),nextParams:b.params,defaultShouldRevalidate:!0});if(typeof M=="boolean")return M}return!0}):[]}function ub(l,u,{includeHydrateFallback:d}={}){return cb(l.map(o=>{let g=u.routes[o.route.id];if(!g)return[];let f=[g.module];return g.clientActionModule&&(f=f.concat(g.clientActionModule)),g.clientLoaderModule&&(f=f.concat(g.clientLoaderModule)),d&&g.hydrateFallbackModule&&(f=f.concat(g.hydrateFallbackModule)),g.imports&&(f=f.concat(g.imports)),f}).flat(1))}function cb(l){return[...new Set(l)]}function ob(l){let u={},d=Object.keys(l).sort();for(let o of d)u[o]=l[o];return u}function db(l,u){let d=new Set;return new Set(u),l.reduce((o,g)=>{let f=JSON.stringify(ob(g));return d.has(f)||(d.add(f),o.push({key:f,link:g})),o},[])}function yy(){let l=V.useContext(Ur);return qf(l,"You must render this element inside a <DataRouterContext.Provider> element"),l}function fb(){let l=V.useContext(Pc);return qf(l,"You must render this element inside a <DataRouterStateContext.Provider> element"),l}var Vf=V.createContext(void 0);Vf.displayName="FrameworkContext";function xy(){let l=V.useContext(Vf);return qf(l,"You must render this element inside a <HydratedRouter> element"),l}function hb(l,u){let d=V.useContext(Vf),[o,g]=V.useState(!1),[f,y]=V.useState(!1),{onFocus:w,onBlur:b,onMouseEnter:x,onMouseLeave:S,onTouchStart:j}=u,M=V.useRef(null);V.useEffect(()=>{if(l==="render"&&y(!0),l==="viewport"){let T=X=>{X.forEach(Q=>{y(Q.isIntersecting)})},B=new IntersectionObserver(T,{threshold:.5});return M.current&&B.observe(M.current),()=>{B.disconnect()}}},[l]),V.useEffect(()=>{if(o){let T=setTimeout(()=>{y(!0)},100);return()=>{clearTimeout(T)}}},[o]);let D=()=>{g(!0)},_=()=>{g(!1),y(!1)};return d?l!=="intent"?[f,M,{}]:[f,M,{onFocus:$i(w,D),onBlur:$i(b,_),onMouseEnter:$i(x,D),onMouseLeave:$i(S,_),onTouchStart:$i(j,D)}]:[!1,M,{}]}function $i(l,u){return d=>{l&&l(d),d.defaultPrevented||u(d)}}function mb({page:l,...u}){let{router:d}=yy(),o=V.useMemo(()=>ny(d.routes,l,d.basename),[d.routes,l,d.basename]);return o?V.createElement(yb,{page:l,matches:o,...u}):null}function gb(l){let{manifest:u,routeModules:d}=xy(),[o,g]=V.useState([]);return V.useEffect(()=>{let f=!1;return ib(l,u,d).then(y=>{f||g(y)}),()=>{f=!0}},[l,u,d]),o}function yb({page:l,matches:u,...d}){let o=Ql(),{future:g,manifest:f,routeModules:y}=xy(),{basename:w}=yy(),{loaderData:b,matches:x}=fb(),S=V.useMemo(()=>cg(l,u,x,f,o,"data"),[l,u,x,f,o]),j=V.useMemo(()=>cg(l,u,x,f,o,"assets"),[l,u,x,f,o]),M=V.useMemo(()=>{if(l===o.pathname+o.search+o.hash)return[];let T=new Set,B=!1;if(u.forEach(Q=>{var ae;let F=f.routes[Q.route.id];!F||!F.hasLoader||(!S.some(le=>le.route.id===Q.route.id)&&Q.route.id in b&&((ae=y[Q.route.id])!=null&&ae.shouldRevalidate)||F.hasClientLoader?B=!0:T.add(Q.route.id))}),T.size===0)return[];let X=lb(l,w,g.unstable_trailingSlashAwareDataRequests,"data");return B&&T.size>0&&X.searchParams.set("_routes",u.filter(Q=>T.has(Q.route.id)).map(Q=>Q.route.id).join(",")),[X.pathname+X.search]},[w,g.unstable_trailingSlashAwareDataRequests,b,o,f,S,u,l,y]),D=V.useMemo(()=>ub(j,f),[j,f]),_=gb(j);return V.createElement(V.Fragment,null,M.map(T=>V.createElement("link",{key:T,rel:"prefetch",as:"fetch",href:T,...d})),D.map(T=>V.createElement("link",{key:T,rel:"modulepreload",href:T,...d})),_.map(({key:T,link:B})=>V.createElement("link",{key:T,nonce:d.nonce,...B,crossOrigin:B.crossOrigin??d.crossOrigin})))}function xb(...l){return u=>{l.forEach(d=>{typeof d=="function"?d(u):d!=null&&(d.current=u)})}}var pb=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{pb&&(window.__reactRouterVersion="7.13.0")}catch{}function vb({basename:l,children:u,unstable_useTransitions:d,window:o}){let g=V.useRef();g.current==null&&(g.current=Jp({window:o,v5Compat:!0}));let f=g.current,[y,w]=V.useState({action:f.action,location:f.location}),b=V.useCallback(x=>{d===!1?w(x):V.startTransition(()=>w(x))},[d]);return V.useLayoutEffect(()=>f.listen(b),[f,b]),V.createElement(Pv,{basename:l,children:u,location:y.location,navigationType:y.action,navigator:f,unstable_useTransitions:d})}var py=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,vy=V.forwardRef(function({onClick:u,discover:d="render",prefetch:o="none",relative:g,reloadDocument:f,replace:y,state:w,target:b,to:x,preventScrollReset:S,viewTransition:j,unstable_defaultShouldRevalidate:M,...D},_){let{basename:T,unstable_useTransitions:B}=V.useContext(Ua),X=typeof x=="string"&&py.test(x),Q=iy(x,T);x=Q.to;let F=Av(x,{relative:g}),[ae,le,K]=hb(o,D),P=wb(x,{replace:y,state:w,target:b,preventScrollReset:S,relative:g,viewTransition:j,unstable_defaultShouldRevalidate:M,unstable_useTransitions:B});function J(k){u&&u(k),k.defaultPrevented||P(k)}let A=V.createElement("a",{...D,...K,href:Q.absoluteURL||F,onClick:Q.isExternal||f?u:J,ref:xb(_,le),target:b,"data-discover":!X&&d==="render"?"true":void 0});return ae&&!X?V.createElement(V.Fragment,null,A,V.createElement(mb,{page:F})):A});vy.displayName="Link";var by=V.forwardRef(function({"aria-current":u="page",caseSensitive:d=!1,className:o="",end:g=!1,style:f,to:y,viewTransition:w,children:b,...x},S){let j=iu(y,{relative:x.relative}),M=Ql(),D=V.useContext(Pc),{navigator:_,basename:T}=V.useContext(Ua),B=D!=null&&Mb(j)&&w===!0,X=_.encodeLocation?_.encodeLocation(j).pathname:j.pathname,Q=M.pathname,F=D&&D.navigation&&D.navigation.location?D.navigation.location.pathname:null;d||(Q=Q.toLowerCase(),F=F?F.toLowerCase():null,X=X.toLowerCase()),F&&T&&(F=sl(F,T)||F);const ae=X!=="/"&&X.endsWith("/")?X.length-1:X.length;let le=Q===X||!g&&Q.startsWith(X)&&Q.charAt(ae)==="/",K=F!=null&&(F===X||!g&&F.startsWith(X)&&F.charAt(X.length)==="/"),P={isActive:le,isPending:K,isTransitioning:B},J=le?u:void 0,A;typeof o=="function"?A=o(P):A=[o,le?"active":null,K?"pending":null,B?"transitioning":null].filter(Boolean).join(" ");let k=typeof f=="function"?f(P):f;return V.createElement(vy,{...x,"aria-current":J,className:A,ref:S,style:k,to:y,viewTransition:w},typeof b=="function"?b(P):b)});by.displayName="NavLink";var bb=V.forwardRef(({discover:l="render",fetcherKey:u,navigate:d,reloadDocument:o,replace:g,state:f,method:y=Bc,action:w,onSubmit:b,relative:x,preventScrollReset:S,viewTransition:j,unstable_defaultShouldRevalidate:M,...D},_)=>{let{unstable_useTransitions:T}=V.useContext(Ua),B=Eb(),X=Tb(w,{relative:x}),Q=y.toLowerCase()==="get"?"get":"post",F=typeof w=="string"&&py.test(w),ae=le=>{if(b&&b(le),le.defaultPrevented)return;le.preventDefault();let K=le.nativeEvent.submitter,P=(K==null?void 0:K.getAttribute("formmethod"))||y,J=()=>B(K||le.currentTarget,{fetcherKey:u,method:P,navigate:d,replace:g,state:f,relative:x,preventScrollReset:S,viewTransition:j,unstable_defaultShouldRevalidate:M});T&&d!==!1?V.startTransition(()=>J()):J()};return V.createElement("form",{ref:_,method:Q,action:X,onSubmit:o?b:ae,...D,"data-discover":!F&&l==="render"?"true":void 0})});bb.displayName="Form";function Sb(l){return`${l} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Sy(l){let u=V.useContext(Ur);return Et(u,Sb(l)),u}function wb(l,{target:u,replace:d,state:o,preventScrollReset:g,relative:f,viewTransition:y,unstable_defaultShouldRevalidate:w,unstable_useTransitions:b}={}){let x=Uf(),S=Ql(),j=iu(l,{relative:f});return V.useCallback(M=>{if(eb(M,u)){M.preventDefault();let D=d!==void 0?d:lu(S)===lu(j),_=()=>x(l,{replace:D,state:o,preventScrollReset:g,relative:f,viewTransition:y,unstable_defaultShouldRevalidate:w});b?V.startTransition(()=>_()):_()}},[S,x,j,d,o,u,l,g,f,y,w,b])}var Nb=0,jb=()=>`__${String(++Nb)}__`;function Eb(){let{router:l}=Sy("useSubmit"),{basename:u}=V.useContext(Ua),d=$v(),o=l.fetch,g=l.navigate;return V.useCallback(async(f,y={})=>{let{action:w,method:b,encType:x,formData:S,body:j}=nb(f,u);if(y.navigate===!1){let M=y.fetcherKey||jb();await o(M,d,y.action||w,{unstable_defaultShouldRevalidate:y.unstable_defaultShouldRevalidate,preventScrollReset:y.preventScrollReset,formData:S,body:j,formMethod:y.method||b,formEncType:y.encType||x,flushSync:y.flushSync})}else await g(y.action||w,{unstable_defaultShouldRevalidate:y.unstable_defaultShouldRevalidate,preventScrollReset:y.preventScrollReset,formData:S,body:j,formMethod:y.method||b,formEncType:y.encType||x,replace:y.replace,state:y.state,fromRouteId:d,flushSync:y.flushSync,viewTransition:y.viewTransition})},[o,g,u,d])}function Tb(l,{relative:u}={}){let{basename:d}=V.useContext(Ua),o=V.useContext(Rn);Et(o,"useFormAction must be used inside a RouteContext");let[g]=o.matches.slice(-1),f={...iu(l||".",{relative:u})},y=Ql();if(l==null){f.search=y.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===".")&&g.route.index&&(f.search=f.search?f.search.replace(/^\?/,"?index&"):"?index"),d!=="/"&&(f.pathname=f.pathname==="/"?d:ll([d,f.pathname])),lu(f)}function Mb(l,{relative:u}={}){let d=V.useContext(cy);Et(d!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:o}=Sy("useViewTransitionState"),g=iu(l,{relative:u});if(!d.isTransitioning)return!1;let f=sl(d.currentLocation.pathname,o)||d.currentLocation.pathname,y=sl(d.nextLocation.pathname,o)||d.nextLocation.pathname;return $c(g.pathname,y)!=null||$c(g.pathname,f)!=null}var Cb=ay();const Ob=Rf(Cb);/**
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 wy=(...l)=>l.filter((u,d,o)=>!!u&&u.trim()!==""&&o.indexOf(u)===d).join(" ").trim();/**
66
+ * @license lucide-react v0.564.0 - ISC
67
+ *
68
+ * This source code is licensed under the ISC license.
69
+ * See the LICENSE file in the root directory of this source tree.
70
+ */const Db=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 Rb=l=>l.replace(/^([A-Z])|[\s-_]+(\w)/g,(u,d,o)=>o?o.toUpperCase():d.toLowerCase());/**
76
+ * @license lucide-react v0.564.0 - ISC
77
+ *
78
+ * This source code is licensed under the ISC license.
79
+ * See the LICENSE file in the root directory of this source tree.
80
+ */const og=l=>{const u=Rb(l);return u.charAt(0).toUpperCase()+u.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 Ab={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 _b=l=>{for(const u in l)if(u.startsWith("aria-")||u==="role"||u==="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 kb=V.forwardRef(({color:l="currentColor",size:u=24,strokeWidth:d=2,absoluteStrokeWidth:o,className:g="",children:f,iconNode:y,...w},b)=>V.createElement("svg",{ref:b,...Ab,width:u,height:u,stroke:l,strokeWidth:o?Number(d)*24/Number(u):d,className:wy("lucide",g),...!f&&!_b(w)&&{"aria-hidden":"true"},...w},[...y.map(([x,S])=>V.createElement(x,S)),...Array.isArray(f)?f:[f]]));/**
96
+ * @license lucide-react v0.564.0 - ISC
97
+ *
98
+ * This source code is licensed under the ISC license.
99
+ * See the LICENSE file in the root directory of this source tree.
100
+ */const ke=(l,u)=>{const d=V.forwardRef(({className:o,...g},f)=>V.createElement(kb,{ref:f,iconNode:u,className:wy(`lucide-${Db(og(l))}`,`lucide-${l}`,o),...g}));return d.displayName=og(l),d};/**
101
+ * @license lucide-react v0.564.0 - ISC
102
+ *
103
+ * This source code is licensed under the ISC license.
104
+ * See the LICENSE file in the root directory of this source tree.
105
+ */const zb=[["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"}]],Ny=ke("activity",zb);/**
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 Ub=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],Hb=ke("arrow-down",Ub);/**
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 Lb=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],dg=ke("arrow-right",Lb);/**
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 qb=[["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"}]],Vb=ke("arrow-up-down",qb);/**
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 Bb=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],Yb=ke("arrow-up",Bb);/**
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 $b=[["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"}]],Fb=ke("bell",$b);/**
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 Gb=[["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"}]],fg=ke("briefcase",Gb);/**
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 Zb=[["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"}]],Bf=ke("calendar",Zb);/**
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 Qb=[["path",{d:"M5 21v-6",key:"1hz6c0"}],["path",{d:"M12 21V3",key:"1lcnhd"}],["path",{d:"M19 21V9",key:"unv183"}]],Pb=ke("chart-no-axes-column",Qb);/**
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 Wb=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],jf=ke("check",Wb);/**
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 Ib=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],jy=ke("chevron-down",Ib);/**
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 Xb=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],Jb=ke("chevron-left",Xb);/**
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 Kb=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],e1=ke("chevron-right",Kb);/**
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 t1=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],a1=ke("chevron-up",t1);/**
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 n1=[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]],l1=ke("chevrons-up-down",n1);/**
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 s1=[["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"}]],rl=ke("circle-alert",s1);/**
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 r1=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 8v8",key:"napkw2"}],["path",{d:"m8 12 4 4 4-4",key:"k98ssh"}]],hg=ke("circle-arrow-down",r1);/**
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 i1=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],uu=ke("circle-check-big",i1);/**
191
+ * @license lucide-react v0.564.0 - ISC
192
+ *
193
+ * This source code is licensed under the ISC license.
194
+ * See the LICENSE file in the root directory of this source tree.
195
+ */const u1=[["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"}]],c1=ke("circle-x",u1);/**
196
+ * @license lucide-react v0.564.0 - ISC
197
+ *
198
+ * This source code is licensed under the ISC license.
199
+ * See the LICENSE file in the root directory of this source tree.
200
+ */const o1=[["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"}]],mg=ke("clipboard-list",o1);/**
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 d1=[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],Fc=ke("clock",d1);/**
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 f1=[["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"}]],Ey=ke("external-link",f1);/**
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 h1=[["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"}]],m1=ke("eye-off",h1);/**
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 g1=[["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"}]],y1=ke("eye",g1);/**
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 x1=[["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"}]],Ef=ke("file-text",x1);/**
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 p1=[["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"}]],v1=ke("git-pull-request",p1);/**
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 b1=[["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"}]],S1=ke("globe",b1);/**
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 w1=[["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"}]],N1=ke("house",w1);/**
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 j1=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],E1=ke("info",j1);/**
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 T1=[["path",{d:"M5 3v14",key:"9nsxs2"}],["path",{d:"M12 3v8",key:"1h2ygw"}],["path",{d:"M19 3v18",key:"1sk56x"}]],M1=ke("kanban",T1);/**
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 C1=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],Ty=ke("loader-circle",C1);/**
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 O1=[["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"}]],My=ke("map",O1);/**
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 D1=[["path",{d:"M5 12h14",key:"1ays0h"}]],R1=ke("minus",D1);/**
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 A1=[["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"}]],Cy=ke("pause",A1);/**
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 _1=[["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"}]],Yf=ke("pen",_1);/**
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 k1=[["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"}]],kr=ke("play",k1);/**
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 z1=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Lr=ke("plus",z1);/**
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 U1=[["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"}]],Oy=ke("rotate-ccw",U1);/**
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 H1=[["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"}]],L1=ke("save",H1);/**
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 q1=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],Ic=ke("search",q1);/**
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 V1=[["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"}]],B1=ke("settings",V1);/**
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 Y1=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],gg=ke("square",Y1);/**
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 $1=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],F1=ke("terminal",$1);/**
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 G1=[["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"}]],Z1=ke("test-tube-diagonal",G1);/**
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 Q1=[["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"}]],$f=ke("trash-2",Q1);/**
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 P1=[["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"}]],Xc=ke("triangle-alert",P1);/**
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 W1=[["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"}]],I1=ke("wifi",W1);/**
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 X1=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],qr=ke("x",X1),Ff="";let Gf=!1,Gc=null;function J1(l){Gf=l}function K1(l){Gc=l}function e2(){return Gf}function Dy(l){return encodeURIComponent(l.replace(/\//g,"~"))}function wt(l){return Gf&&Gc?l.replace("/api/",`/api/projects/${Dy(Gc)}/`):l}function t2(){return it("/api/mode")}function Ry(){return it("/api/projects")}async function it(l,u){const d=`${Ff}${l}`,o=await fetch(d,{headers:{"Content-Type":"application/json",...u==null?void 0:u.headers},...u});if(!o.ok){const g=await o.json().catch(()=>({error:"Unknown error"}));throw new Error(g.error||`HTTP ${o.status}: ${o.statusText}`)}return o.json()}function gf(){return it(wt("/api/status"))}function Ay(){return it(wt("/api/prs"))}function a2(l,u){const d=`?lines=${encodeURIComponent(u)}`;return it(wt(`/api/logs/${encodeURIComponent(l)}${d}`))}function Zf(){return it(wt("/api/config"))}async function _y(){if(e2()){const u=(await Ry()).filter(o=>o.valid);return(await Promise.all(u.map(async o=>{try{const g=await it(`/api/projects/${Dy(o.name)}/config`);return{projectId:o.name,config:g}}catch(g){return console.error(`Failed to fetch config for project ${o.name}`,g),null}}))).filter(o=>o!==null)}else{const l=await Zf();return[{projectId:Gc||"current",config:l}]}}function nl(l){return it(wt("/api/config"),{method:"PUT",body:JSON.stringify(l)})}function n2(){return it(wt("/api/doctor"))}function ky(){return it(wt("/api/schedule-info"))}function zy(){return it(wt("/api/actions/run"),{method:"POST"})}function Qf(){return it(wt("/api/actions/review"),{method:"POST"})}function Uy(){return it(wt("/api/actions/qa"),{method:"POST"})}function Hy(){return it(wt("/api/actions/audit"),{method:"POST"})}function Ly(){return it(wt("/api/actions/analytics"),{method:"POST"})}function qy(){return it(wt("/api/actions/planner"),{method:"POST"})}function nu(){return it(wt("/api/actions/install-cron"),{method:"POST"})}function l2(){return it(wt("/api/actions/uninstall-cron"),{method:"POST"})}function s2(l="all"){return it(wt("/api/actions/cancel"),{method:"POST",body:JSON.stringify({type:l})})}const Zl=["Draft","Ready","In Progress","Review","Done"];function Vy(){return it(wt("/api/board/status"))}function r2(l){return it(wt("/api/board/issues"),{method:"POST",body:JSON.stringify(l)})}function By(l,u){return it(wt(`/api/board/issues/${l}/move`),{method:"PATCH",body:JSON.stringify({column:u})})}async function i2(l){const u=`${Ff}${wt(`/api/board/issues/${l}`)}`,d=await fetch(u,{headers:{"Content-Type":"application/json"},method:"DELETE"});if(!d.ok){const o=await d.json().catch(()=>({error:"Unknown error"}));throw new Error(o.error||`HTTP ${d.status}: ${d.statusText}`)}}function u2(){return it(wt("/api/actions/clear-lock"),{method:"POST"})}function c2(l,u=[],d){const o=(d==null?void 0:d.enabled)??!0,g=V.useRef(l);g.current=l,V.useEffect(()=>{if(!o)return;const f=`${Ff}${wt("/api/status/events")}`,y=new EventSource(f);return y.addEventListener("status_changed",w=>{try{const b=JSON.parse(w.data);g.current(b)}catch{}}),()=>{y.close()}},[o,...u])}function o2(){return it("/api/queue/status")}function d2(l){const u=`?window=${encodeURIComponent(l)}`;return it(`/api/queue/analytics${u}`)}function f2(){return it("/api/global-notifications")}function yg(l){return it("/api/global-notifications",{method:"PUT",body:JSON.stringify(l)})}function h2(){return it(wt("/api/roadmap"))}function m2(){return it(wt("/api/roadmap/scan"),{method:"POST"})}function Yy(l){return it(wt("/api/roadmap/toggle"),{method:"PUT",body:JSON.stringify({enabled:l})})}function hn(l,u=[],d){const o=(d==null?void 0:d.enabled)??!0,[g,f]=V.useState(null),[y,w]=V.useState(!0),[b,x]=V.useState(null),S=V.useRef(l);S.current=l;const j=V.useRef(()=>{(async()=>{x(null);try{const D=await S.current();f(D)}catch(D){x(D instanceof Error?D:new Error("Unknown error"))}})()});return j.current=j.current.bind(j),V.useEffect(()=>{if(!o)return;let M=!1;return w(!0),x(null),(async()=>{try{const _=await S.current();M||f(_)}catch(_){M||x(_ instanceof Error?_:new Error("Unknown error"))}finally{M||w(!1)}})(),()=>{M=!0}},[...u,o]),{data:g,loading:y,error:b,refetch:j.current}}const xg=l=>{let u;const d=new Set,o=(x,S)=>{const j=typeof x=="function"?x(u):x;if(!Object.is(j,u)){const M=u;u=S??(typeof j!="object"||j===null)?j:Object.assign({},u,j),d.forEach(D=>D(u,M))}},g=()=>u,w={setState:o,getState:g,getInitialState:()=>b,subscribe:x=>(d.add(x),()=>d.delete(x))},b=u=l(o,g,w);return w},g2=l=>l?xg(l):xg,y2=l=>l;function x2(l,u=y2){const d=qe.useSyncExternalStore(l.subscribe,()=>u(l.getState()),()=>u(l.getInitialState()));return qe.useDebugValue(d),d}const pg=l=>{const u=g2(l),d=o=>x2(u,o);return Object.assign(d,u),d},p2=l=>l?pg(l):pg,v2=typeof localStorage<"u"?localStorage.getItem("nw-selected-project"):null,ia=p2(l=>({projectName:"Night Watch",setProjectName:u=>l({projectName:u}),toasts:[],addToast:u=>{const d=Math.random().toString(36).substring(7);l(o=>({toasts:[...o.toasts,{...u,id:d}]})),setTimeout(()=>{l(o=>({toasts:o.toasts.filter(g=>g.id!==d)}))},5e3)},removeToast:u=>l(d=>({toasts:d.toasts.filter(o=>o.id!==u)})),status:null,setStatus:u=>l(d=>!d.status||new Date(u.timestamp)>new Date(d.status.timestamp)?{status:u}:d),globalModeLoading:!0,setGlobalModeLoading:u=>l({globalModeLoading:u}),isGlobalMode:!1,setGlobalMode:u=>{J1(u),l({isGlobalMode:u})},projects:[],setProjects:u=>l({projects:u}),selectedProjectId:v2,selectProject:u=>{K1(u),u?localStorage.setItem("nw-selected-project",u):localStorage.removeItem("nw-selected-project"),l(d=>{const o=d.projects.find(g=>g.name===u);return{selectedProjectId:u,...o?{projectName:o.name}:{}}})}})),b2=()=>{const[l,u]=V.useState(!1),{projectName:d,isGlobalMode:o,projects:g,selectedProjectId:f,selectProject:y,globalModeLoading:w}=ia(),{data:b}=hn(Ay,[f],{enabled:!w}),x=(b==null?void 0:b.length)??0,S=V.useMemo(()=>[{icon:N1,label:"Dashboard",path:"/",section:"Overview"},{icon:F1,label:"Logs",path:"/logs"},{icon:M1,label:"Board",path:"/board",section:"Work"},{icon:v1,label:"Pull Requests",path:"/prs",badge:x},{icon:My,label:"Roadmap",path:"/roadmap"},{icon:Bf,label:"Schedules",path:"/scheduling",section:"Automation"},{icon:B1,label:"Settings",path:"/settings",section:"Config"}],[x]);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:o?"Projects":"Workspace"}),o?s.jsxs("div",{className:"relative",children:[s.jsx(fg,{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=>y(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:g.filter(j=>j.valid).map(j=>s.jsx("option",{value:j.name,children:j.name},j.name))}),s.jsx(l1,{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(fg,{className:"h-4 w-4 text-indigo-400 mr-3"}),s.jsx("span",{className:"truncate",children:d})]})]})}),s.jsx("nav",{className:"flex-1 py-6 overflow-y-auto overflow-x-hidden scrollbar-hide",children:s.jsx("ul",{className:"space-y-1.5 px-4",children:S.map(j=>s.jsxs(qe.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(by,{to:j.path,className:({isActive:M})=>`
345
+ flex items-center px-3.5 py-3 rounded-xl transition-all duration-200 group relative
346
+ ${M?"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:M})=>s.jsxs(s.Fragment,{children:[s.jsx(j.icon,{className:`h-5 w-5 transition-colors ${M?"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 ${M?"bg-indigo-500/20 text-indigo-300":"bg-white/5 text-slate-400 border border-white/5"}`,children:j.badge})),M&&!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:()=>u(!l),className:"p-2 rounded-lg hover:bg-white/5 text-slate-500 hover:text-slate-300 transition-colors",children:l?s.jsx(e1,{className:"h-5 w-5"}):s.jsx(Jb,{className:"h-5 w-5"})})})]})},S2=()=>{const{projectName:l}=ia();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(I1,{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(Ic,{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(Fb,{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"})]})]})},w2=({toast:l,onDismiss:u})=>{const d={success:s.jsx(uu,{className:"h-5 w-5 text-green-400"}),error:s.jsx(rl,{className:"h-5 w-5 text-red-400"}),info:s.jsx(E1,{className:"h-5 w-5 text-blue-400"}),warning:s.jsx(Xc,{className:"h-5 w-5 text-amber-400"})},o={success:"border-l-green-500",error:"border-l-red-500",info:"border-l-blue-500",warning:"border-l-amber-500"};return s.jsx("div",{className:`
349
+ pointer-events-auto w-full max-w-sm overflow-hidden rounded-lg
350
+ bg-slate-900 border border-slate-800 border-l-4 ${o[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:d[l.type]}),s.jsxs("div",{className:"ml-3 w-0 flex-1 pt-0.5",children:[s.jsx("p",{className:"text-sm font-medium text-slate-200",children:l.title}),l.message&&s.jsx("p",{className:"mt-1 text-sm text-slate-400",children:l.message})]}),s.jsx("div",{className:"ml-4 flex flex-shrink-0",children:s.jsxs("button",{type:"button",className:"inline-flex rounded-md text-slate-400 hover:text-slate-200 focus:outline-none focus:ring-2 focus:ring-indigo-500",onClick:()=>u(l.id),children:[s.jsx("span",{className:"sr-only",children:"Close"}),s.jsx(qr,{className:"h-5 w-5"})]})})]})})})},N2=()=>{const{toasts:l,removeToast:u}=ia();return s.jsx("div",{"aria-live":"assertive",className:"pointer-events-none fixed inset-0 flex flex-col items-end px-4 py-6 sm:items-end sm:p-6 z-[100] gap-4",children:l.map(d=>s.jsx(w2,{toast:d,onDismiss:u},d.id))})};function j2(){const{setGlobalMode:l,setGlobalModeLoading:u,setProjects:d,selectProject:o,selectedProjectId:g}=ia();V.useEffect(()=>{u(!0),t2().then(async({globalMode:f})=>{if(l(f),!f)return;const y=await Ry();d(y);const w=y.filter(b=>b.valid);g&&w.some(b=>b.name===g)?o(g):w.length>0&&o(w[0].name)}).catch(()=>{l(!1)}).finally(()=>{u(!1)})},[])}function vg(l){if(!(l!=null&&l.timestamp))return Number.NEGATIVE_INFINITY;const u=new Date(l.timestamp).getTime();return Number.isNaN(u)?Number.NEGATIVE_INFINITY:u}function Uc(l,u){return l?u?vg(l)>=vg(u)?l:u:l:u}function E2(){const{setStatus:l,setProjectName:u,selectedProjectId:d,globalModeLoading:o,status:g}=ia(),f=V.useRef(null);f.current=ia.getState().status,c2(y=>{Uc(y,f.current)===y&&l(y)},[d,o],{enabled:!o}),V.useEffect(()=>{if(o)return;gf().then(w=>{Uc(w,f.current)===w&&l(w)}).catch(()=>{});const y=setInterval(()=>{gf().then(w=>{Uc(w,f.current)===w&&l(w)}).catch(()=>{})},3e4);return()=>clearInterval(y)},[d,o,l]),V.useEffect(()=>{const y=()=>{gf().then(w=>{Uc(w,f.current)===w&&l(w)}).catch(()=>{})};return window.addEventListener("focus",y),()=>window.removeEventListener("focus",y)},[d,l]),V.useEffect(()=>{g!=null&&g.projectName&&u(g.projectName)},[g==null?void 0:g.projectName,u])}const Ke=({children:l,className:u="",onClick:d})=>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
+ ${d?"cursor-pointer hover:border-indigo-500/30 hover:shadow-indigo-500/5 group":""}
358
+ ${u}
359
+ `,onClick:d,children:[d&&s.jsx("div",{className:"absolute inset-0 bg-indigo-500/0 group-hover:bg-indigo-500/[0.02] transition-colors rounded-xl pointer-events-none"}),s.jsx("div",{className:"relative z-10",children:l})]}),mt=({children:l,variant:u="primary",size:d="md",loading:o=!1,className:g="",disabled:f,...y})=>{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"},x={sm:"h-8 px-3 text-xs tracking-wide",md:"h-10 px-4 py-2 text-sm",lg:"h-12 px-6 text-base",icon:"h-9 w-9"};return s.jsxs("button",{className:`${w} ${b[u]} ${x[d]} ${g}`,disabled:f||o,...y,children:[o&&s.jsx(Ty,{className:"mr-2 h-4 w-4 animate-spin"}),l]})},_r=({children:l,variant:u="default",className:d=""})=>{const o={default:"bg-indigo-500/10 text-indigo-400 ring-1 ring-inset ring-indigo-500/20",success:"bg-emerald-500/10 text-emerald-400 ring-1 ring-inset ring-emerald-500/20",warning:"bg-amber-500/10 text-amber-400 ring-1 ring-inset ring-amber-500/20",error:"bg-red-500/10 text-red-400 ring-1 ring-inset ring-red-500/20",neutral:"bg-slate-500/10 text-slate-400 ring-1 ring-inset ring-slate-500/20",info:"bg-blue-500/10 text-blue-400 ring-1 ring-inset ring-blue-500/20"};return s.jsx("span",{className:`inline-flex items-center px-2 py-0.5 rounded text-[11px] font-medium tracking-wide ${o[u]} ${d}`,children:l})},$y={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"}},T2=({defaultColumn:l,onClose:u,onCreated:d})=>{const[o,g]=V.useState(""),[f,y]=V.useState(""),[w,b]=V.useState(l),[x,S]=V.useState(!1),[j,M]=V.useState(null),{addToast:D}=ia(),_=async T=>{if(T.preventDefault(),!!o.trim()){S(!0),M(null);try{await r2({title:o.trim(),body:f,column:w}),D({title:"Issue created",message:`"${o.trim()}" added to ${w}`,type:"success"}),d(),u()}catch(B){M(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:u}),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:u,className:"p-1.5 rounded-lg hover:bg-white/5 text-slate-500 hover:text-slate-300 transition-colors",children:s.jsx(qr,{className:"h-5 w-5"})})]}),s.jsxs("form",{onSubmit:_,className:"p-6 space-y-4",children:[s.jsxs("div",{children:[s.jsx("label",{className:"text-xs font-medium text-slate-400 uppercase tracking-wide block mb-1.5",children:"Title"}),s.jsx("input",{type:"text",value:o,onChange:T=>g(T.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:T=>b(T.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:Zl.map(T=>s.jsx("option",{value:T,children:T},T))})]}),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:T=>y(T.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(mt,{variant:"ghost",type:"button",onClick:u,children:"Cancel"}),s.jsx(mt,{type:"submit",disabled:x||!o.trim(),children:x?"Creating...":"Create Issue"})]})]})]})]})},M2=({issue:l,onClose:u,onMoved:d,onClosed:o})=>{const[g,f]=V.useState(!1),[y,w]=V.useState(!1),{addToast:b}=ia(),x=async M=>{if(M!==l.column){f(!0);try{await By(l.number,M),b({title:"Issue moved",message:`#${l.number} moved to ${M}`,type:"success"}),d(),u()}catch(D){b({title:"Move failed",message:D instanceof Error?D.message:"Failed to move issue",type:"error"})}finally{f(!1)}}},S=async()=>{if(confirm(`Close issue #${l.number}: "${l.title}"?`)){w(!0);try{await i2(l.number),b({title:"Issue closed",message:`#${l.number} closed on GitHub`,type:"success"}),o(),u()}catch(M){b({title:"Close failed",message:M instanceof Error?M.message:"Failed to close issue",type:"error"})}finally{w(!1)}}},j=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:u}),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(_r,{variant:$y[j].badge,children:j})]}),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:u,className:"p-1.5 rounded-lg hover:bg-white/5 text-slate-500 hover:text-slate-300 transition-colors flex-shrink-0",children:s.jsx(qr,{className:"h-5 w-5"})})]}),s.jsxs("div",{className:"flex items-center space-x-3 px-6 py-3 border-b border-white/5 flex-shrink-0 flex-wrap gap-y-2",children:[s.jsxs("div",{className:"flex items-center space-x-2",children:[s.jsx("span",{className:"text-xs text-slate-500",children:"Move to:"}),Zl.filter(M=>M!==l.column).map(M=>s.jsx("button",{onClick:()=>x(M),disabled:g,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:M},M))]}),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(Ey,{className:"h-3.5 w-3.5"}),s.jsx("span",{children:"GitHub"})]}),s.jsx("button",{onClick:S,disabled:y,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:y?"Closing...":"Close Issue"})]})]}),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."})})]})]})},C2=({issue:l,onClick:u,onDragStart:d})=>{const[o,g]=V.useState(!1);return s.jsx("div",{className:"relative",draggable:!0,onDragStart:f=>{f.dataTransfer.setData("issueNumber",String(l.number)),f.dataTransfer.effectAllowed="move",g(!0),d(l)},onDragEnd:()=>g(!1),children:s.jsxs(Ke,{className:`p-3 cursor-grab hover:border-indigo-500/30 transition-all select-none ${o?"opacity-30":""}`,onClick:u,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(", ")})]})})},O2=({name:l,issues:u,draggingIssue:d,onIssueClick:o,onNewIssue:g,onMoveIssue:f,onDragStart:y})=>{const w=$y[l],[b,x]=V.useState(!1),S=d!==null&&d.column!==l;return s.jsxs("div",{className:`flex flex-col min-w-[220px] max-w-[220px] h-full rounded-xl transition-colors ${b&&S?"bg-indigo-500/5 ring-1 ring-indigo-500/30":""}`,onDragOver:j=>{S&&(j.preventDefault(),j.dataTransfer.dropEffect="move",x(!0))},onDragLeave:()=>x(!1),onDrop:j=>{j.preventDefault(),x(!1),d&&d.column!==l&&f(d,l)},children:[s.jsxs("div",{className:"flex items-center justify-between mb-3 flex-shrink-0",children:[s.jsxs("div",{className:"flex items-center space-x-2",children:[s.jsx("span",{className:`w-2.5 h-2.5 rounded-full ${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:u.length})]}),s.jsx("button",{onClick:()=>g(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(Lr,{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:u.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"})}):u.map(j=>s.jsx(C2,{issue:j,onClick:()=>o(j),onDragStart:y},j.id))})]})},D2=()=>{const[l,u]=V.useState(null),[d,o]=V.useState(null),[g,f]=V.useState(null),[y,w]=V.useState(null),b=V.useRef(!1),{addToast:x,selectedProjectId:S,globalModeLoading:j}=ia(),{data:M,loading:D,error:_,refetch:T}=hn(Vy,[S],{enabled:!j});V.useEffect(()=>{const Q=setInterval(()=>{b.current||T()},3e4);return()=>clearInterval(Q)},[T]);const B=V.useCallback(async(Q,F)=>{f(null);const ae=y??(M==null?void 0:M.columns);if(!ae)return;const le=ae,K={};for(const J of Zl)K[J]=(ae[J]??[]).filter(A=>A.number!==Q.number);const P={...Q,column:F};K[F]=[...K[F]??[],P],w(K),u(J=>(J==null?void 0:J.number)===Q.number?P:J),b.current=!0;try{await By(Q.number,F),T(),setTimeout(()=>{w(null),b.current=!1},800)}catch(J){w(le),u(A=>(A==null?void 0:A.number)===Q.number?Q:A),b.current=!1,x({title:"Move failed",message:J instanceof Error?J.message:"Failed to move issue",type:"error"})}},[x,T,y,M]);if(j||D)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(mt,{onClick:()=>T(),children:"Retry"})]});if(!M)return null;const X=y??M.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:[Zl.reduce((Q,F)=>{var ae;return Q+(((ae=X[F])==null?void 0:ae.length)??0)},0)," issues across ",Zl.length," columns"]})]}),s.jsxs(mt,{onClick:()=>o("Ready"),children:[s.jsx(Lr,{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:`${Zl.length*236}px`},children:Zl.map(Q=>s.jsx(O2,{name:Q,issues:X[Q]??[],draggingIssue:g,onIssueClick:u,onNewIssue:o,onMoveIssue:B,onDragStart:f},Q))})}),l&&s.jsx(M2,{issue:l,onClose:()=>u(null),onMoved:()=>T(),onClosed:()=>T()}),d&&s.jsx(T2,{defaultColumn:d,onClose:()=>o(null),onCreated:()=>T()})]})},R2=[{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"}],A2=({processes:l,activePrd:u,onCancelProcess:d,onForceClear:o,onViewLog:g,cancellingProcess:f,clearingLock:y,onTriggerJob:w,triggeringJob:b})=>{const x=j=>l.find(M=>M.name===j),S=(j,M)=>j.length<=M?j:j.slice(0,M-1)+"...";return s.jsx("div",{className:"grid grid-cols-2 md:grid-cols-3 lg:grid-cols-6 gap-3",children:R2.map(j=>{const M=x(j.processName),D=(M==null?void 0:M.running)??!1,_=M==null?void 0:M.pid,T=f===j.cancelType,B=D&&j.cancelType,X=!D&&j.name==="executor"&&u,Q=D?_?`PID: ${_}`:j.runningLabel:j.idleLabel,F=D&&j.name==="executor"&&u?S(u,20):null;return s.jsxs("div",{className:`flex items-center gap-2 p-2.5 rounded-lg border transition-colors ${D?"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 ${D?"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 ${D?"text-slate-200":"text-slate-400"}`,children:j.displayName}),s.jsx("div",{className:"text-xs text-slate-500 truncate",children:F?s.jsxs("span",{className:"flex items-center gap-1",children:[s.jsx(Ef,{className:"h-3 w-3 flex-shrink-0"}),F]}):Q})]}),s.jsxs("div",{className:"flex-shrink-0",children:[B&&s.jsx("button",{onClick:()=>j.cancelType&&d(j.cancelType),disabled:T,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(gg,{className:"h-3.5 w-3.5"})}),X&&s.jsx("button",{onClick:o,disabled:y,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(gg,{className:"h-3.5 w-3.5"})}),!B&&!X&&D&&s.jsx("button",{onClick:g,className:"p-1 text-slate-400 hover:text-slate-300 hover:bg-white/5 rounded transition-colors",title:"View log",children:s.jsx(Ef,{className:"h-3.5 w-3.5"})}),!D&&!X&&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(kr,{className:"h-3.5 w-3.5"})})]})]},j.name)})})},_2={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"},k2=()=>{var k,ne;const l=Uf(),[u,d]=V.useState(null),[o,g]=V.useState(!1),[f,y]=V.useState(null),{setProjectName:w,addToast:b,selectedProjectId:x,globalModeLoading:S,status:j}=ia(),{data:M}=hn(ky,[x],{enabled:!S}),{data:D,loading:_}=hn(()=>Vy().catch(()=>null),[x],{enabled:!S}),T=j;if(qe.useEffect(()=>{T!=null&&T.projectName&&w(T.projectName)},[T,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(!T)return s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx("div",{className:"text-slate-400",children:"Loading..."})});const B=T.prs.length,X=T.prs.filter(R=>R.reviewScore!==null&&R.reviewScore<70).length,Q=((k=D==null?void 0:D.columns.Ready)==null?void 0:k.length)??0,F=((ne=D==null?void 0:D.columns["In Progress"])==null?void 0:ne.length)??0;T.processes.find(R=>R.name==="executor"),T.processes.find(R=>R.name==="reviewer"),T.processes.find(R=>R.name==="qa"),T.processes.find(R=>R.name==="audit"),T.processes.find(R=>R.name==="planner"),T.processes.find(R=>R.name==="analytics");const ae=async R=>{d(R);try{const ie=await s2(R),ge=ie.results.every(he=>he.success);b({title:ge?"Process Cancelled":"Cancel Failed",message:ie.results.map(he=>he.message).join("; "),type:ge?"success":"error"})}catch(ie){b({title:"Cancel Failed",message:ie instanceof Error?ie.message:"Failed to cancel process",type:"error"})}finally{d(null)}},le=async()=>{g(!0);try{await u2(),b({title:"Lock Cleared",message:"Stale executor state removed",type:"success"})}catch(R){b({title:"Clear Failed",message:R instanceof Error?R.message:"Failed to clear lock",type:"error"})}finally{g(!1)}},K=async R=>{y(R);try{await{executor:zy,reviewer:Qf,qa:Uy,audit:Hy,planner:qy,analytics:Ly}[R](),b({title:"Job Triggered",message:`${R[0].toUpperCase()+R.slice(1)} job has been queued.`,type:"success"})}catch(ie){b({title:"Trigger Failed",message:ie instanceof Error?ie.message:`Failed to trigger ${R}`,type:"error"})}finally{y(null)}},P=R=>{if(!R)return"Not scheduled";try{const ie=new Date(R),ge=new Date,he=ie.getTime()-ge.getTime(),Y=Math.floor(he/6e4);return Y<0?"Running now...":Y<60?`in ${Y} min`:Y<1440?`in ${Math.floor(Y/60)} hr${Y>=120?"s":""}`:`in ${Math.floor(Y/1440)} day${Y>=2880?"s":""}`}catch{return"Unknown"}},A=(()=>{var ge,he,Y;if(M!=null&&M.paused)return null;const R=[{agent:"Executor",nextRun:(M==null?void 0:M.executor.nextRun)??null},{agent:"Reviewer",nextRun:(M==null?void 0:M.reviewer.nextRun)??null},{agent:"QA",nextRun:((ge=M==null?void 0:M.qa)==null?void 0:ge.nextRun)??null},{agent:"Auditor",nextRun:((he=M==null?void 0:M.audit)==null?void 0:he.nextRun)??null},{agent:"Planner",nextRun:((Y=M==null?void 0:M.planner)==null?void 0:Y.nextRun)??null}];let ie=null;for(const re of R)re.nextRun&&(!ie||new Date(re.nextRun)<new Date(ie.nextRun))&&(ie=re);return ie?{agent:ie.agent,time:P(ie.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(Ke,{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:Q})]}),s.jsx("div",{className:"p-2 bg-green-500/10 rounded-lg text-green-400",children:s.jsx(uu,{className:"h-5 w-5"})})]}),s.jsx("p",{className:"text-xs text-slate-500 mt-4",children:"issues ready to start"})]}),s.jsxs(Ke,{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:F})]}),s.jsx("div",{className:"p-2 bg-blue-500/10 rounded-lg text-blue-400",children:s.jsx(Ny,{className:"h-5 w-5"})})]}),s.jsx("p",{className:"text-xs text-slate-500 mt-4",children:"issues in progress"})]}),s.jsxs(Ke,{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(Fc,{className:"h-5 w-5"})})]}),s.jsx("p",{className:`text-xs mt-4 ${X>0?"text-red-400 font-medium":"text-slate-500"}`,children:X>0?`${X} need work`:"All passing"})]}),s.jsxs(Ke,{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:M!=null&&M.paused?"Paused":T.crontab.installed?"Active":"Inactive"})]}),s.jsx("div",{className:`p-2 rounded-lg ${M!=null&&M.paused?"bg-amber-500/10 text-amber-400":T.crontab.installed?"bg-indigo-500/10 text-indigo-400":"bg-slate-700/50 text-slate-500"}`,children:s.jsx(Bf,{className:"h-5 w-5"})})]}),s.jsx("p",{className:"text-xs text-slate-500 mt-4",children:M!=null&&M.paused?"All schedules paused":T.crontab.installed?`${T.crontab.entries.length} entr${T.crontab.entries.length===1?"y":"ies"} installed`:"No crontab entries"})]})]}),s.jsxs(Ke,{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(A2,{processes:T.processes,activePrd:T.activePrd,onCancelProcess:ae,onForceClear:le,onViewLog:()=>l("/logs"),cancellingProcess:u,clearingLock:o,onTriggerJob:K,triggeringJob:f})]}),A&&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:A.agent}),s.jsx("span",{children:A.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(dg,{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(dg,{className:"ml-1 h-3 w-3"})]})]}),s.jsx(Ke,{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..."})}):D?s.jsx("div",{className:"flex flex-wrap gap-3",children:Zl.map(R=>{var ge;const ie=((ge=D.columns[R])==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 ${_2[R]}`,children:[s.jsx("span",{className:"text-xs font-medium",children:R}),s.jsx("span",{className:"text-xs font-bold",children:ie})]},R)})}):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."]})})]})]})},Fy=[{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"}}],z2=()=>{const[l,u]=V.useState(!0),[d,o]=V.useState(""),[g,f]=V.useState("executor"),y=V.useRef(null),{selectedProjectId:w,globalModeLoading:b}=ia(),x=ia(Q=>Q.status),{data:S,loading:j,error:M,refetch:D}=hn(()=>a2(g,500),[g,w],{enabled:!b}),_=(S==null?void 0:S.lines)||[];V.useEffect(()=>{l&&y.current&&(y.current.scrollTop=y.current.scrollHeight)},[_,l]),V.useEffect(()=>{if(!l)return;const Q=window.setInterval(()=>{D()},3e3);return()=>window.clearInterval(Q)},[l,g,D]);const T=_.filter(Q=>Q.toLowerCase().includes(d.toLowerCase())),B=Q=>{f(Q),o("")},X=Q=>{if(!(x!=null&&x.processes))return!1;const F=x.processes.find(ae=>ae.name===Q);return(F==null?void 0:F.running)??!1};return M?s.jsxs("div",{className:"flex flex-col items-center justify-center h-full space-y-4",children:[s.jsx(rl,{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:M.message}),s.jsx(mt,{onClick:()=>D(),children:"Retry"})]}):s.jsxs("div",{className:"flex flex-col h-[calc(100vh-8rem)]",children:[s.jsxs("div",{className:"flex items-center justify-between mb-4 bg-slate-900 p-2 rounded-lg border border-slate-800 shadow-sm",children:[s.jsxs("div",{className:"flex items-center space-x-2",children:[s.jsxs("div",{className:"relative group",children:[s.jsx("input",{type:"text",placeholder:"Filter logs...",className:"pl-9 pr-4 py-1.5 rounded-md border border-slate-700 bg-slate-950 text-slate-200 text-sm focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:border-transparent w-64 placeholder:text-slate-600",value:d,onChange:Q=>o(Q.target.value)}),s.jsx(Ic,{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:Fy.map(({processName:Q,label:F})=>s.jsx("button",{onClick:()=>B(Q),className:`px-3 py-1.5 rounded text-sm font-medium transition-colors ${g===Q?"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:F}),X(Q)&&s.jsx("div",{className:"h-2 w-2 bg-green-500 rounded-full animate-pulse"})]})},Q))})]}),s.jsxs("div",{className:"flex items-center space-x-2",children:[s.jsxs(mt,{size:"sm",variant:"ghost",onClick:()=>D(),children:[s.jsx(hg,{className:"h-4 w-4 mr-2"}),"Refresh"]}),s.jsxs(mt,{size:"sm",variant:"ghost",onClick:()=>u(!l),children:[l?s.jsx(Cy,{className:"h-4 w-4 mr-2"}):s.jsx(kr,{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: ",g,".log"]}),s.jsxs("span",{children:[T.length," lines"]})]}),s.jsxs("div",{ref:y,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..."}):T.length===0?s.jsx("div",{className:"flex items-center justify-center h-full text-slate-500",children:d?"No logs match your filter":"No logs yet — logs will appear after the first run"}):T.map((Q,F)=>{const ae=Q.includes("[ERROR]"),le=Q.includes("[WARN]");return s.jsxs("div",{className:`leading-6 hover:bg-slate-800/50 px-2 rounded -mx-2 ${ae?"text-red-400":le?"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:F+1}),Q]},F)}),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:()=>u(!0),children:[s.jsx(hg,{className:"h-4 w-4 mr-2"}),"Scroll to bottom"]})]})]})},U2=()=>{const[l,u]=V.useState(null),[d,o]=V.useState(!1),[g,f]=V.useState("all"),[y,w]=V.useState("number"),[b,x]=V.useState("desc"),{addToast:S,selectedProjectId:j,globalModeLoading:M}=ia(),{data:D,loading:_,error:T,refetch:B}=hn(Ay,[j],{enabled:!M}),X=D??[],Q=k=>{switch(k){case"pass":return s.jsx(uu,{className:"h-4 w-4 text-green-500"});case"fail":return s.jsx(c1,{className:"h-4 w-4 text-red-500"});case"pending":return s.jsx(Ty,{className:"h-4 w-4 text-amber-500 animate-spin"});default:return s.jsx(rl,{className:"h-4 w-4 text-slate-500"})}},F=k=>{switch(k){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"}},ae=k=>k===null?"No review decision yet":k===100?"PR has been approved":k===0?"Changes have been requested":`Review score: ${k}`,le=V.useMemo(()=>X.filter(k=>{switch(g){case"needs-work":return k.ciStatus==="fail"||k.reviewScore===0;case"pending":return k.ciStatus==="pending"||k.ciStatus==="unknown"||k.reviewScore===null;case"passed":return k.ciStatus==="pass"&&k.reviewScore===100;case"all":default:return!0}}),[X,g]),K=V.useMemo(()=>[...le].sort((ne,R)=>{let ie=0;switch(y){case"number":ie=ne.number-R.number;break;case"title":ie=ne.title.localeCompare(R.title);break;case"branch":ie=ne.branch.localeCompare(R.branch);break;case"ciStatus":{const ge={fail:0,pending:1,unknown:2,pass:3};ie=(ge[ne.ciStatus]??2)-(ge[R.ciStatus]??2);break}case"reviewScore":{const ge=ne.reviewScore??-1,he=R.reviewScore??-1;ie=ge-he;break}}return b==="asc"?ie:-ie}),[le,y,b]),P=k=>{y===k?x(b==="asc"?"desc":"asc"):(w(k),x("desc"))},J=k=>y!==k?s.jsx(Vb,{className:"h-3 w-3 text-slate-600"}):b==="asc"?s.jsx(Yb,{className:"h-3 w-3 text-indigo-400"}):s.jsx(Hb,{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(T)return s.jsxs("div",{className:"flex flex-col items-center justify-center h-full space-y-4",children:[s.jsx(rl,{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:T.message}),s.jsx(mt,{onClick:()=>B(),children:"Retry"})]});const A=async()=>{o(!0);try{const k=await Qf();S({title:"Reviewer Started",message:k.pid?`Started with PID ${k.pid}`:"Reviewer started",type:"success"})}catch(k){S({title:"Reviewer Failed",message:k instanceof Error?k.message:"Failed to start reviewer",type:"error"})}finally{o(!1)}};return s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:"flex space-x-1",children:[s.jsx("button",{onClick:()=>f("all"),className:`px-3 py-1 rounded-full text-xs font-medium cursor-pointer border transition-colors ${g==="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 ${g==="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 ${g==="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 ${g==="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(mt,{size:"sm",onClick:A,disabled:d,children:[s.jsx(Ic,{className:"h-4 w-4 mr-2"}),d?"Starting...":"Run Reviewer Now"]})]}),s.jsx("div",{className:"bg-slate-900 rounded-lg shadow-sm border border-slate-800 overflow-hidden",children:s.jsxs("table",{className:"min-w-full divide-y divide-slate-800",children:[s.jsx("thead",{className:"bg-slate-950/50",children:s.jsxs("tr",{children:[s.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-slate-500 uppercase tracking-wider cursor-pointer hover:text-slate-300",onClick:()=>P("number"),children:s.jsxs("div",{className:"flex items-center space-x-1",children:[s.jsx("span",{children:"Title"}),J("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:()=>P("branch"),children:s.jsxs("div",{className:"flex items-center space-x-1",children:[s.jsx("span",{children:"Branch"}),J("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:()=>P("ciStatus"),children:s.jsxs("div",{className:"flex items-center space-x-1",children:[s.jsx("span",{children:"CI Status"}),J("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:()=>P("reviewScore"),children:s.jsxs("div",{className:"flex items-center space-x-1",children:[s.jsx("span",{children:"Review Score"}),J("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:[K.map(k=>s.jsxs("tr",{className:"hover:bg-slate-800/50 cursor-pointer transition-colors",onClick:()=>u(l===k.number?null:k.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:["#",k.number]}),s.jsx("span",{className:"font-medium text-slate-200",children:k.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:k.branch})}),s.jsx("td",{className:"px-6 py-4",children:s.jsxs("div",{className:"flex items-center space-x-2",title:F(k.ciStatus),children:[Q(k.ciStatus),s.jsx("span",{className:"text-sm capitalize text-slate-400",children:k.ciStatus})]})}),s.jsx("td",{className:"px-6 py-4",children:k.reviewScore!==null?s.jsxs("div",{className:"flex items-center space-x-2",title:ae(k.reviewScore),children:[s.jsx("div",{className:"w-24 h-2 bg-slate-800 rounded-full overflow-hidden",children:s.jsx("div",{className:`h-full ${k.reviewScore>=70?"bg-green-500":"bg-red-500"}`,style:{width:`${k.reviewScore}%`}})}),s.jsx("span",{className:`text-sm font-bold ${k.reviewScore>=70?"text-green-500":"text-red-500"}`,children:k.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:k.url,target:"_blank",rel:"noopener noreferrer",className:"text-slate-500 hover:text-indigo-400",onClick:ne=>ne.stopPropagation(),children:s.jsx(Ey,{className:"h-4 w-4"})})})]},k.number)),K.length===0&&s.jsx("tr",{children:s.jsx("td",{colSpan:5,className:"px-6 py-12 text-center text-slate-500",children:X.length===0?"No open PRs found.":`No PRs match the "${g}" filter.`})})]})]})}),l&&s.jsx(Ke,{className:"p-6 bg-slate-900 border-indigo-900/50 animate-in fade-in slide-in-from-top-4 duration-300",children:(()=>{const k=X.find(ne=>ne.number===l);return k?s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"font-bold text-slate-200",children:k.title}),s.jsxs("p",{className:"text-sm text-slate-400 mt-1",children:["Branch: ",s.jsx("span",{className:"font-mono",children:k.branch})]})]}),s.jsxs("div",{className:"flex items-center space-x-4",children:[s.jsxs("div",{className:"text-center",title:F(k.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:[Q(k.ciStatus),s.jsx("span",{className:"text-sm capitalize text-slate-300",children:k.ciStatus})]})]}),k.reviewScore!==null&&s.jsxs("div",{className:"text-center",title:ae(k.reviewScore),children:[s.jsx("div",{className:"text-xs text-slate-500",children:"Review Score"}),s.jsx("div",{className:`text-xl font-bold mt-1 ${k.reviewScore>=70?"text-green-500":"text-red-500"}`,children:k.reviewScore})]})]})]}):null})()})]})},Ta=qe.forwardRef(({className:l="",label:u,checked:d,onChange:o,...g},f)=>{const y=w=>{o&&o(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:d,onChange:y,...g}),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"})]}),u&&s.jsx("span",{className:"ml-3 text-sm font-medium text-slate-300 select-none",children:u})]})});Ta.displayName="Switch";const H2=()=>{const{addToast:l,selectedProjectId:u,globalModeLoading:d}=ia(),[o,g]=V.useState(!1),[f,y]=V.useState(!1),{data:w,loading:b,error:x,refetch:S}=hn(h2,[u],{enabled:!d});V.useEffect(()=>{if(!(w!=null&&w.enabled))return;const Q=setInterval(()=>{S()},1e4);return()=>clearInterval(Q)},[w==null?void 0:w.enabled,S]);const j=async Q=>{y(!0);try{await Yy(Q),l({title:Q?"Scanner Enabled":"Scanner Disabled",message:Q?"Roadmap scanner is now active.":"Roadmap scanner has been paused.",type:Q?"success":"info"}),S()}catch(F){l({title:"Toggle Failed",message:F instanceof Error?F.message:"Failed to toggle scanner",type:"error"})}finally{y(!1)}},M=async()=>{g(!0);try{const Q=await m2();Q.created.length>0?l({title:"Scan Complete",message:`Created ${Q.created.length} PRD(s): ${Q.created.join(", ")}`,type:"success"}):l({title:"Scan Complete",message:"No new PRDs to create.",type:"info"}),Q.errors.length>0&&l({title:"Scan Errors",message:Q.errors.join("; "),type:"warning"}),S()}catch(Q){l({title:"Scan Failed",message:Q instanceof Error?Q.message:"Failed to scan roadmap",type:"error"})}finally{g(!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(x)return s.jsxs("div",{className:"flex flex-col items-center justify-center h-full space-y-4",children:[s.jsx(rl,{className:"h-12 w-12 text-red-400"}),s.jsx("div",{className:"text-slate-300",children:"Failed to load roadmap data"}),s.jsx("div",{className:"text-sm text-slate-500",children:x.message}),s.jsx(mt,{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(Ke,{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(My,{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 D=w.totalItems>0?Math.round(w.processedItems/w.totalItems*100):0,_=q2(w.status),T=V2(w.items),B=w.lastScan?B2(w.lastScan):"Never",X=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(Ta,{label:w.enabled?"Enabled":"Disabled",checked:w.enabled,onChange:j,disabled:f}),s.jsxs(mt,{onClick:M,loading:o,disabled:!w.enabled||w.status==="complete",children:[s.jsx(kr,{className:"h-4 w-4 mr-2"}),"Scan Now"]})]})]}),s.jsx(Ke,{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 ",X," min"]})]}),w.enabled&&w.status==="complete"&&s.jsx("div",{className:"text-emerald-400",children:"Auto-scan paused - all items sliced"})]})]})}),s.jsxs(Ke,{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 (",D,"%)"]})]}),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 ${D===100?"bg-gradient-to-r from-emerald-500 to-emerald-400":"bg-gradient-to-r from-indigo-600 to-indigo-400"}`,style:{width:`${D}%`}})})]}),Object.entries(T).map(([Q,F])=>s.jsxs(Ke,{className:"p-6",children:[s.jsx("h3",{className:"text-lg font-semibold text-slate-200 mb-4",children:Q}),s.jsx("div",{className:"space-y-2",children:F.map(ae=>s.jsx(L2,{item:ae},ae.hash))})]},Q))]})};function L2({item:l}){const u=l.checked,d=l.processed;return s.jsxs("div",{className:`flex items-center justify-between p-3 rounded-lg border ${u?"bg-slate-950/30 border-slate-800/50":d?"bg-emerald-500/5 border-emerald-500/10":"bg-slate-950/50 border-slate-800"}`,children:[s.jsxs("div",{className:"flex items-center space-x-3 min-w-0 flex-1",children:[u?s.jsx(R1,{className:"h-4 w-4 text-slate-600 flex-shrink-0"}):d?s.jsx(uu,{className:"h-4 w-4 text-emerald-400 flex-shrink-0"}):s.jsx(Ef,{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 ${u?"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:u?s.jsx(_r,{variant:"neutral",children:"Skipped"}):d?s.jsx(_r,{variant:"success",children:l.prdFile||"Processed"}):s.jsx(_r,{variant:"warning",children:"Pending"})})]})}function q2(l){switch(l){case"complete":return{label:"Complete",icon:uu,textColor:"text-emerald-400",borderColor:"border-emerald-500/20 bg-emerald-500/5"};case"idle":return{label:"Idle",icon:Fc,textColor:"text-blue-400",borderColor:"border-blue-500/20 bg-blue-500/5"};case"scanning":return{label:"Scanning",icon:kr,textColor:"text-indigo-400",borderColor:"border-indigo-500/20 bg-indigo-500/5"};case"disabled":return{label:"Disabled",icon:rl,textColor:"text-slate-400",borderColor:"border-slate-500/20 bg-slate-500/5"};default:return{label:"No Roadmap",icon:rl,textColor:"text-slate-500",borderColor:"border-slate-500/20"}}}function V2(l){const u={};for(const d of l){const o=d.section||"General";u[o]||(u[o]=[]),u[o].push(d)}return u}function B2(l){try{const u=new Date(l),o=new Date().getTime()-u.getTime(),g=Math.floor(o/6e4);if(g<1)return"Just now";if(g<60)return`${g} min ago`;const f=Math.floor(g/60);return f<24?`${f} hr ago`:`${Math.floor(f/24)} day(s) ago`}catch{return"Unknown"}}const Gy=({tabs:l,activeTab:u,onChange:d,className:o=""})=>{var b,x;const[g,f]=qe.useState((b=l[0])==null?void 0:b.id),y=u||g,w=S=>{d?d(S):f(S)};return s.jsxs("div",{className:`flex flex-col ${o}`,children:[s.jsx("div",{className:"border-b border-slate-800 mb-6",children:s.jsx("nav",{className:"-mb-px flex space-x-8 overflow-x-auto scrollbar-hide",children: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
+ ${y===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:(x=l.find(S=>S.id===y))==null?void 0:x.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"}],Pf=[{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 zr(l){return l?l.trim().replace(/\s+/g," "):""}function Rr(l,u){return zr(l)===zr(u)}function Y2(l){if(l)return Pf.find(u=>u.id===l)}function Zy(l,u,d,o,g,f){return Rr(l.schedules.executor,u)&&Rr(l.schedules.reviewer,d)&&Rr(l.schedules.qa,o)&&Rr(l.schedules.audit,g)&&Rr(l.schedules.slicer,f)}function $2(l,u,d,o,g){return Pf.find(f=>Zy(f,l,u,d,o,g))}function au(l,u,d,o,g,f){const y=Y2(l);return y&&Zy(y,u,d,o,g,f)?y:$2(u,d,o,g,f)}function bg(l){const u=zr(l),d=u.split(/\s+/);if(d.length!==5)return u;const[o,g,f,y,w]=d,b=/^\d+$/.test(o),x=Zc.find(S=>zr(S.value)===u);if(x)return x.label;if(o==="*/30"&&g==="*")return"Every 30 minutes";if(o==="0"&&g==="*")return"Every hour";if(o.startsWith("*/"))return`Every ${parseInt(o.replace("*/",""),10)} minutes`;if(b&&g.startsWith("*/")&&f==="*"&&y==="*"&&w==="*"){const S=parseInt(g.replace("*/",""),10);return o==="0"?`Every ${S} hours`:`Every ${S} hours at :${o.padStart(2,"0")}`}if(o==="0"&&g.startsWith("*/"))return`Every ${parseInt(g.replace("*/",""),10)} hours`;if(o==="0"&&g.includes("-")){const[S,j]=g.split("-");return`Every hour from ${Fi(S)} to ${Fi(j)}`}if(b&&g.includes("-")&&f==="*"&&y==="*"&&w==="*"){const[S,j]=g.split("-");return`Every hour from ${Gi(S,o)} to ${Gi(j,o)}`}if(o==="0"&&g.includes(",")){const S=g.split(",").map(Fi);return S.length<=3?`At ${S.join(" and ")}`:`At ${S.slice(0,-1).join(", ")}, and ${S[S.length-1]}`}if(b&&g.includes(",")&&f==="*"&&y==="*"&&(w==="*"||w==="1-5")){const S=g.split(",").map(M=>Gi(M,o)),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 o==="0"&&g!=="*"&&f==="*"&&y==="*"&&w==="*"?`Daily at ${Fi(g)}`:b&&g!=="*"&&f==="*"&&y==="*"&&w==="*"?`Daily at ${Gi(g,o)}`:o==="0"&&g!=="*"&&f==="*"&&y==="*"&&w==="1-5"?`Weekdays at ${Fi(g)}`:b&&g!=="*"&&f==="*"&&y==="*"&&w==="1-5"?`Weekdays at ${Gi(g,o)}`:u}function Fi(l){const u=parseInt(l,10);return u===0?"12 AM":u<12?`${u} AM`:u===12?"12 PM":`${u-12} PM`}function Gi(l,u){const d=u.padStart(2,"0"),o=parseInt(l,10);return Number.isNaN(o)?`${l}:${d}`:o===0?`12:${d} AM`:o<12?`${o}:${d} AM`:o===12?`12:${d} PM`:`${o-12}:${d} PM`}function F2(l){const u=zr(l),d=Zc.find(o=>zr(o.value)===u);return(d==null?void 0:d.value)??"__custom__"}function G2(l){const u=new Date,d=l.getTime()-u.getTime(),o=Math.floor(d/6e4),g=Math.floor(o/60),f=Math.floor(g/24);return o<1?"less than a minute":o<60?`in ${o} minute${o>1?"s":""}`:g<24?`in ${g} hour${g>1?"s":""}`:`in ${f} day${f>1?"s":""}`}function Z2(l){const u={weekday:"short",month:"short",day:"numeric",hour:"numeric",minute:"2-digit",hour12:!0};return l.toLocaleDateString("en-US",u)}function Q2(l){const u=new Date,d=l.getTime()-u.getTime(),o=Math.floor(d/6e4);return o>=0&&o<30}const Ge=qe.forwardRef(({className:l="",label:u,error:d,helperText:o,rightIcon:g,...f},y)=>{const w=qe.useId(),b=f.id??w,x=d?`${b}-error`:void 0,S=!d&&o?`${b}-help`:void 0,j=[x,S].filter(Boolean).join(" ")||void 0;return s.jsxs("div",{className:"w-full",children:[u&&s.jsx("label",{htmlFor:b,className:"block text-sm font-medium text-slate-400 mb-1.5",children:u}),s.jsxs("div",{className:"relative",children:[s.jsx("input",{ref:y,id:b,"aria-describedby":j,"aria-invalid":d?!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
+ ${d?"border-red-500/50 focus:ring-red-500/50 focus:border-red-500":""}
370
+ ${g?"pr-10":""}
371
+ ${l}
372
+ `,...f}),g&&s.jsx("div",{className:"absolute inset-y-0 right-0 flex items-center pr-3 pointer-events-none text-slate-500",children:g})]}),d?s.jsx("p",{id:x,className:"mt-1.5 text-xs text-red-400",children:d}):o?s.jsx("p",{id:S,className:"mt-1.5 text-xs text-slate-500",children:o}):null]})});Ge.displayName="Input";const oa=qe.forwardRef(({className:l="",label:u,error:d,helperText:o,options:g,value:f,onChange:y,children:w,...b},x)=>{const S=qe.useId(),j=b.id??S,M=d?`${j}-error`:void 0,D=!d&&o?`${j}-help`:void 0,_=[M,D].filter(Boolean).join(" ")||void 0,T=B=>{y&&y(B.target.value)};return s.jsxs("div",{className:"w-full",children:[u&&s.jsx("label",{htmlFor:j,className:"block text-sm font-medium text-slate-400 mb-1.5",children:u}),s.jsxs("div",{className:"relative",children:[s.jsx("select",{ref:x,id:j,"aria-describedby":_,"aria-invalid":d?!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
+ ${d?"border-red-500/50 focus:ring-red-500/50 focus:border-red-500":""}
379
+ ${l}
380
+ `,value:f,onChange:T,...b,children:g?g.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(jy,{className:"h-4 w-4"})})]}),d?s.jsx("p",{id:M,className:"mt-1.5 text-xs text-red-400",children:d}):o?s.jsx("p",{id:D,className:"mt-1.5 text-xs text-slate-500",children:o}):null]})});oa.displayName="Select";const Dn=({label:l,value:u,onChange:d,helperText:o,placeholder:g="5 */3 * * *"})=>{const f=F2(u),y=f==="__custom__",w=S=>{S!=="__custom__"&&d(S)},b=S=>{d(S.target.value)},x=Zc.find(S=>S.value===f);return s.jsxs("div",{className:"space-y-3",children:[s.jsx(oa,{label:l,value:f,onChange:w,options:Zc.map(S=>({label:S.label,value:S.value})),helperText:y?void 0:(x==null?void 0:x.description)||o}),y&&s.jsxs("div",{className:"space-y-2 mt-2",children:[s.jsx(Ge,{label:"Cron Expression",value:u,onChange:b,placeholder:g}),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 Ds={},ka={},Zi={},Rs={},yf={},Sg;function P2(){return Sg||(Sg=1,Object.defineProperty(yf,"__esModule",{value:!0})),yf}var Qi={},Pi={},wg;function Hs(){var u,d,o,g,f,Qy,w;if(wg)return Pi;wg=1,Object.defineProperty(Pi,"__esModule",{value:!0}),Pi.CronField=void 0;let l=(w=class{constructor(x,S={rawValue:""}){st(this,f);st(this,u,!1);st(this,d,!1);st(this,o,!1);st(this,g,[]);Q0(this,"options",{rawValue:""});if(!Array.isArray(x))throw new Error(`${this.constructor.name} Validation error, values is not an array`);if(!(x.length>0))throw new Error(`${this.constructor.name} Validation error, values contains no values`);this.options={...S,rawValue:S.rawValue??""},Ee(this,g,x.sort(w.sorter)),Ee(this,o,this.options.wildcard!==void 0?this.options.wildcard:Ne(this,f,Qy).call(this)),Ee(this,u,this.options.rawValue.includes("L")||x.includes("L")),Ee(this,d,this.options.rawValue.includes("?")||x.includes("?"))}static get min(){throw new Error("min must be overridden")}static get max(){throw new Error("max must be overridden")}static get chars(){return Object.freeze([])}static get validChars(){return/^[?,*\dH/-]+$|^.*H\(\d+-\d+\)\/\d+.*$|^.*H\(\d+-\d+\).*$|^.*H\/\d+.*$/}static get constraints(){return{min:this.min,max:this.max,chars:this.chars,validChars:this.validChars}}get min(){return this.constructor.min}get max(){return this.constructor.max}get chars(){return this.constructor.chars}get hasLastChar(){return ee(this,u)}get hasQuestionMarkChar(){return ee(this,d)}get isWildcard(){return ee(this,o)}get values(){return ee(this,g)}static sorter(x,S){const j=typeof x=="number",M=typeof S=="number";return j&&M?x-S:!j&&!M?x.localeCompare(S):j?-1:1}static findNearestValueInList(x,S,j=!1){if(j){for(let M=x.length-1;M>=0;M--)if(x[M]<S)return x[M];return null}for(let M=0;M<x.length;M++)if(x[M]>S)return x[M];return null}findNearestValue(x,S=!1){return this.constructor.findNearestValueInList(this.values,x,S)}serialize(){return{wildcard:ee(this,o),values:ee(this,g)}}validate(){let x;const S=this.chars.length>0?` or chars ${this.chars.join("")}`:"",j=T=>B=>new RegExp(`^\\d{0,2}${B}$`).test(T),M=T=>(x=T,typeof T=="number"?T>=this.min&&T<=this.max:this.chars.some(j(T)));if(!ee(this,g).every(M))throw new Error(`${this.constructor.name} Validation error, got value ${x} expected range ${this.min}-${this.max}${S}`);const _=ee(this,g).find((T,B)=>ee(this,g).indexOf(T)!==B);if(_)throw new Error(`${this.constructor.name} Validation error, duplicate values found: ${_}`)}},u=new WeakMap,d=new WeakMap,o=new WeakMap,g=new WeakMap,f=new WeakSet,Qy=function(){return this.options.rawValue.length>0?["*","?"].includes(this.options.rawValue):Array.from({length:this.max-this.min+1},(x,S)=>S+this.min).every(x=>ee(this,g).includes(x))},w);return Pi.CronField=l,Pi}var Ng;function W2(){if(Ng)return Qi;Ng=1,Object.defineProperty(Qi,"__esModule",{value:!0}),Qi.CronDayOfMonth=void 0;const l=Hs(),u=1,d=31,o=Object.freeze(["L"]);let g=class extends l.CronField{static get min(){return u}static get max(){return d}static get chars(){return o}static get validChars(){return/^[?,*\dLH/-]+$|^.*H\(\d+-\d+\)\/\d+.*$|^.*H\(\d+-\d+\).*$|^.*H\/\d+.*$/}constructor(y,w){super(y,w),this.validate()}get values(){return super.values}};return Qi.CronDayOfMonth=g,Qi}var Wi={},jg;function I2(){if(jg)return Wi;jg=1,Object.defineProperty(Wi,"__esModule",{value:!0}),Wi.CronDayOfWeek=void 0;const l=Hs(),u=0,d=7,o=Object.freeze(["L"]);let g=class extends l.CronField{static get min(){return u}static get max(){return d}static get chars(){return o}static get validChars(){return/^[?,*\dLH#/-]+$|^.*H\(\d+-\d+\)\/\d+.*$|^.*H\(\d+-\d+\).*$|^.*H\/\d+.*$/}constructor(y,w){super(y,w),this.validate()}get values(){return super.values}get nthDay(){return this.options.nthDayOfWeek??0}};return Wi.CronDayOfWeek=g,Wi}var Ii={},Eg;function X2(){if(Eg)return Ii;Eg=1,Object.defineProperty(Ii,"__esModule",{value:!0}),Ii.CronHour=void 0;const l=Hs(),u=0,d=23,o=Object.freeze([]);let g=class extends l.CronField{static get min(){return u}static get max(){return d}static get chars(){return o}constructor(y,w){super(y,w),this.validate()}get values(){return super.values}};return Ii.CronHour=g,Ii}var Xi={},Tg;function J2(){if(Tg)return Xi;Tg=1,Object.defineProperty(Xi,"__esModule",{value:!0}),Xi.CronMinute=void 0;const l=Hs(),u=0,d=59,o=Object.freeze([]);let g=class extends l.CronField{static get min(){return u}static get max(){return d}static get chars(){return o}constructor(y,w){super(y,w),this.validate()}get values(){return super.values}};return Xi.CronMinute=g,Xi}var Ji={},xf={},Ea={},Mg;function K2(){if(Mg)return Ea;Mg=1,Object.defineProperty(Ea,"__esModule",{value:!0});class l extends Error{}class u extends l{constructor(r){super(`Invalid DateTime: ${r.toMessage()}`)}}class d extends l{constructor(r){super(`Invalid Interval: ${r.toMessage()}`)}}class o extends l{constructor(r){super(`Invalid Duration: ${r.toMessage()}`)}}class g extends l{}class f extends l{constructor(r){super(`Invalid unit ${r}`)}}class y extends l{}class w extends l{constructor(){super("Zone is an abstract class")}}const b="numeric",x="short",S="long",j={year:b,month:b,day:b},M={year:b,month:x,day:b},D={year:b,month:x,day:b,weekday:x},_={year:b,month:S,day:b},T={year:b,month:S,day:b,weekday:S},B={hour:b,minute:b},X={hour:b,minute:b,second:b},Q={hour:b,minute:b,second:b,timeZoneName:x},F={hour:b,minute:b,second:b,timeZoneName:S},ae={hour:b,minute:b,hourCycle:"h23"},le={hour:b,minute:b,second:b,hourCycle:"h23"},K={hour:b,minute:b,second:b,hourCycle:"h23",timeZoneName:x},P={hour:b,minute:b,second:b,hourCycle:"h23",timeZoneName:S},J={year:b,month:b,day:b,hour:b,minute:b},A={year:b,month:b,day:b,hour:b,minute:b,second:b},k={year:b,month:x,day:b,hour:b,minute:b},ne={year:b,month:x,day:b,hour:b,minute:b,second:b},R={year:b,month:x,day:b,weekday:x,hour:b,minute:b},ie={year:b,month:S,day:b,hour:b,minute:b,timeZoneName:x},ge={year:b,month:S,day:b,hour:b,minute:b,second:b,timeZoneName:x},he={year:b,month:S,day:b,weekday:S,hour:b,minute:b,timeZoneName:S},Y={year:b,month:S,day:b,weekday:S,hour:b,minute:b,second:b,timeZoneName:S};class re{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 Te extends re{static get instance(){return ye===null&&(ye=new Te),ye}get type(){return"system"}get name(){return new Intl.DateTimeFormat().resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(r,{format:h,locale:v}){return zn(r,h,v)}formatOffset(r,h){return es(this.offset(r),h)}offset(r){return-new Date(r).getTimezoneOffset()}equals(r){return r.type==="system"}get isValid(){return!0}}const Ue=new Map;function z(m){let r=Ue.get(m);return r===void 0&&(r=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:m,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",era:"short"}),Ue.set(m,r)),r}const I={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};function me(m,r){const h=m.format(r).replace(/\u200E/g,""),v=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(h),[,N,C,U,H,q,fe,ve]=v;return[U,N,C,H,q,fe,ve]}function xe(m,r){const h=m.formatToParts(r),v=[];for(let N=0;N<h.length;N++){const{type:C,value:U}=h[N],H=I[C];C==="era"?v[H]=U:Oe(H)||(v[H]=parseInt(U,10))}return v}const De=new Map;class Me extends re{static create(r){let h=De.get(r);return h===void 0&&De.set(r,h=new Me(r)),h}static resetCache(){De.clear(),Ue.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=Me.isValidZone(r)}get type(){return"iana"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(r,{format:h,locale:v}){return zn(r,h,v,this.name)}formatOffset(r,h){return es(this.offset(r),h)}offset(r){if(!this.valid)return NaN;const h=new Date(r);if(isNaN(h))return NaN;const v=z(this.name);let[N,C,U,H,q,fe,ve]=v.formatToParts?xe(v,h):me(v,h);H==="BC"&&(N=-Math.abs(N)+1);const We=It({year:N,month:C,day:U,hour:q===24?0:q,minute:fe,second:ve,millisecond:0});let Re=+h;const Tt=Re%1e3;return Re-=Tt>=0?Tt:1e3+Tt,(We-Re)/(60*1e3)}equals(r){return r.type==="iana"&&r.name===this.name}get isValid(){return this.valid}}let He={};function Nt(m,r={}){const h=JSON.stringify([m,r]);let v=He[h];return v||(v=new Intl.ListFormat(m,r),He[h]=v),v}const et=new Map;function Pt(m,r={}){const h=JSON.stringify([m,r]);let v=et.get(h);return v===void 0&&(v=new Intl.DateTimeFormat(m,r),et.set(h,v)),v}const Ft=new Map;function mn(m,r={}){const h=JSON.stringify([m,r]);let v=Ft.get(h);return v===void 0&&(v=new Intl.NumberFormat(m,r),Ft.set(h,v)),v}const Ja=new Map;function da(m,r={}){const{base:h,...v}=r,N=JSON.stringify([m,v]);let C=Ja.get(N);return C===void 0&&(C=new Intl.RelativeTimeFormat(m,r),Ja.set(N,C)),C}let fa=null;function gn(){return fa||(fa=new Intl.DateTimeFormat().resolvedOptions().locale,fa)}const yn=new Map;function xn(m){let r=yn.get(m);return r===void 0&&(r=new Intl.DateTimeFormat(m).resolvedOptions(),yn.set(m,r)),r}const Ha=new Map;function pn(m){let r=Ha.get(m);if(!r){const h=new Intl.Locale(m);r="getWeekInfo"in h?h.getWeekInfo():h.weekInfo,"minimalDays"in r||(r={...Fe,...r}),Ha.set(m,r)}return r}function de(m){const r=m.indexOf("-x-");r!==-1&&(m=m.substring(0,r));const h=m.indexOf("-u-");if(h===-1)return[m];{let v,N;try{v=Pt(m).resolvedOptions(),N=m}catch{const q=m.substring(0,h);v=Pt(q).resolvedOptions(),N=q}const{numberingSystem:C,calendar:U}=v;return[N,C,U]}}function pe(m,r,h){return(h||r)&&(m.includes("-u-")||(m+="-u"),h&&(m+=`-ca-${h}`),r&&(m+=`-nu-${r}`)),m}function Ye(m){const r=[];for(let h=1;h<=12;h++){const v=je.utc(2009,h,1);r.push(m(v))}return r}function ze(m){const r=[];for(let h=1;h<=7;h++){const v=je.utc(2016,11,13+h);r.push(m(v))}return r}function gt(m,r,h,v){const N=m.listingMode();return N==="error"?null:N==="en"?h(r):v(r)}function La(m){return m.numberingSystem&&m.numberingSystem!=="latn"?!1:m.numberingSystem==="latn"||!m.locale||m.locale.startsWith("en")||xn(m.locale).numberingSystem==="latn"}class vn{constructor(r,h,v){this.padTo=v.padTo||0,this.floor=v.floor||!1;const{padTo:N,floor:C,...U}=v;if(!h||Object.keys(U).length>0){const H={useGrouping:!1,...v};v.padTo>0&&(H.minimumIntegerDigits=v.padTo),this.inf=mn(r,H)}}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):Xl(r,3);return rt(h,this.padTo)}}}class ce{constructor(r,h,v){this.opts=v,this.originalZone=void 0;let N;if(this.opts.timeZone)this.dt=r;else if(r.zone.type==="fixed"){const U=-1*(r.offset/60),H=U>=0?`Etc/GMT+${U}`:`Etc/GMT${U}`;r.offset!==0&&Me.create(H).valid?(N=H,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=Pt(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 v=this.originalZone.offsetName(this.dt.ts,{locale:this.dt.locale,format:this.opts.timeZoneName});return{...h,value:v}}else return h}):r}resolvedOptions(){return this.dtf.resolvedOptions()}}class Se{constructor(r,h,v){this.opts={style:"long",...v},!h&&$r()&&(this.rtf=da(r,v))}format(r,h){return this.rtf?this.rtf.format(r,h):Nn(h,r,this.opts.numeric,this.opts.style!=="long")}formatToParts(r,h){return this.rtf?this.rtf.formatToParts(r,h):[]}}const Fe={firstDay:1,minimalDays:4,weekend:[6,7]};class _e{static fromOpts(r){return _e.create(r.locale,r.numberingSystem,r.outputCalendar,r.weekSettings,r.defaultToEN)}static create(r,h,v,N,C=!1){const U=r||xt.defaultLocale,H=U||(C?"en-US":gn()),q=h||xt.defaultNumberingSystem,fe=v||xt.defaultOutputCalendar,ve=Fr(N)||xt.defaultWeekSettings;return new _e(H,q,fe,ve,U)}static resetCache(){fa=null,et.clear(),Ft.clear(),Ja.clear(),yn.clear(),Ha.clear()}static fromObject({locale:r,numberingSystem:h,outputCalendar:v,weekSettings:N}={}){return _e.create(r,h,v,N)}constructor(r,h,v,N,C){const[U,H,q]=de(r);this.locale=U,this.numberingSystem=h||H||null,this.outputCalendar=v||q||null,this.weekSettings=N,this.intl=pe(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=La(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:_e.create(r.locale||this.specifiedLocale,r.numberingSystem||this.numberingSystem,r.outputCalendar||this.outputCalendar,Fr(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 gt(this,r,pu,()=>{const v=this.intl==="ja"||this.intl.startsWith("ja-");h&=!v;const N=h?{month:r,day:"numeric"}:{month:r},C=h?"format":"standalone";if(!this.monthsCache[C][r]){const U=v?H=>this.dtFormatter(H,N).format():H=>this.extract(H,N,"month");this.monthsCache[C][r]=Ye(U)}return this.monthsCache[C][r]})}weekdays(r,h=!1){return gt(this,r,Ps,()=>{const v=h?{weekday:r,year:"numeric",month:"long",day:"numeric"}:{weekday:r},N=h?"format":"standalone";return this.weekdaysCache[N][r]||(this.weekdaysCache[N][r]=ze(C=>this.extract(C,v,"weekday"))),this.weekdaysCache[N][r]})}meridiems(){return gt(this,void 0,()=>Un,()=>{if(!this.meridiemCache){const r={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[je.utc(2016,11,13,9),je.utc(2016,11,13,19)].map(h=>this.extract(h,r,"dayperiod"))}return this.meridiemCache})}eras(r){return gt(this,r,Wr,()=>{const h={era:r};return this.eraCache[r]||(this.eraCache[r]=[je.utc(-40,1,1),je.utc(2017,1,1)].map(v=>this.extract(v,h,"era"))),this.eraCache[r]})}extract(r,h,v){const N=this.dtFormatter(r,h),C=N.formatToParts(),U=C.find(H=>H.type.toLowerCase()===v);return U?U.value:null}numberFormatter(r={}){return new vn(this.intl,r.forceSimple||this.fastNumbers,r)}dtFormatter(r,h={}){return new ce(r,this.intl,h)}relFormatter(r={}){return new Se(this.intl,this.isEnglish(),r)}listFormatter(r={}){return Nt(this.intl,r)}isEnglish(){return this.locale==="en"||this.locale.toLowerCase()==="en-us"||xn(this.intl).locale.startsWith("en-us")}getWeekSettings(){return this.weekSettings?this.weekSettings:Sn()?pn(this.locale):Fe}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 ha=null;class nt extends re{static get utcInstance(){return ha===null&&(ha=new nt(0)),ha}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(Kl(h[1],h[2]))}return null}constructor(r){super(),this.fixed=r}get type(){return"fixed"}get name(){return this.fixed===0?"UTC":`UTC${es(this.fixed,"narrow")}`}get ianaName(){return this.fixed===0?"Etc/UTC":`Etc/GMT${es(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(r,h){return es(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 pt extends re{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 vt(m,r){if(Oe(m)||m===null)return r;if(m instanceof re)return m;if(Ut(m)){const h=m.toLowerCase();return h==="default"?r:h==="local"||h==="system"?Te.instance:h==="utc"||h==="gmt"?nt.utcInstance:nt.parseSpecifier(h)||Me.create(m)}else return ga(m)?nt.instance(m):typeof m=="object"&&"offset"in m&&typeof m.offset=="function"?m:new pt(m)}const zt={arab:"[٠-٩]",arabext:"[۰-۹]",bali:"[᭐-᭙]",beng:"[০-৯]",deva:"[०-९]",fullwide:"[0-9]",gujr:"[૦-૯]",hanidec:"[〇|一|二|三|四|五|六|七|八|九]",khmr:"[០-៩]",knda:"[೦-೯]",laoo:"[໐-໙]",limb:"[᥆-᥏]",mlym:"[൦-൯]",mong:"[᠐-᠙]",mymr:"[၀-၉]",orya:"[୦-୯]",tamldec:"[௦-௯]",telu:"[౦-౯]",thai:"[๐-๙]",tibt:"[༠-༩]",latn:"\\d"},Ls={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]},Kc=zt.hanidec.replace(/[\[|\]]/g,"").split("");function eo(m){let r=parseInt(m,10);if(isNaN(r)){r="";for(let h=0;h<m.length;h++){const v=m.charCodeAt(h);if(m[h].search(zt.hanidec)!==-1)r+=Kc.indexOf(m[h]);else for(const N in Ls){const[C,U]=Ls[N];v>=C&&v<=U&&(r+=v-C)}}return parseInt(r,10)}else return r}const il=new Map;function qs(){il.clear()}function aa({numberingSystem:m},r=""){const h=m||"latn";let v=il.get(h);v===void 0&&(v=new Map,il.set(h,v));let N=v.get(r);return N===void 0&&(N=new RegExp(`${zt[h]}${r}`),v.set(r,N)),N}let bn=()=>Date.now(),Pl="system",ul=null,cu=null,Vr=null,Vs=60,cl,ou=null;class xt{static get now(){return bn}static set now(r){bn=r}static set defaultZone(r){Pl=r}static get defaultZone(){return vt(Pl,Te.instance)}static get defaultLocale(){return ul}static set defaultLocale(r){ul=r}static get defaultNumberingSystem(){return cu}static set defaultNumberingSystem(r){cu=r}static get defaultOutputCalendar(){return Vr}static set defaultOutputCalendar(r){Vr=r}static get defaultWeekSettings(){return ou}static set defaultWeekSettings(r){ou=Fr(r)}static get twoDigitCutoffYear(){return Vs}static set twoDigitCutoffYear(r){Vs=r%100}static get throwOnInvalid(){return cl}static set throwOnInvalid(r){cl=r}static resetCaches(){_e.resetCache(),Me.resetCache(),je.resetCache(),qs()}}class ma{constructor(r,h){this.reason=r,this.explanation=h}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}}const Br=[0,31,59,90,120,151,181,212,243,273,304,334],Bs=[0,31,60,91,121,152,182,213,244,274,305,335];function na(m,r){return new ma("unit out of range",`you specified ${r} (of type ${typeof r}) as a ${m}, which is invalid`)}function Ys(m,r,h){const v=new Date(Date.UTC(m,r-1,h));m<100&&m>=0&&v.setUTCFullYear(v.getUTCFullYear()-1900);const N=v.getUTCDay();return N===0?7:N}function Yr(m,r,h){return h+(dl(m)?Bs:Br)[r-1]}function Ka(m,r){const h=dl(m)?Bs:Br,v=h.findIndex(C=>C<r),N=r-h[v];return{month:v+1,day:N}}function Ot(m,r){return(m-r+7)%7+1}function Bt(m,r=4,h=1){const{year:v,month:N,day:C}=m,U=Yr(v,N,C),H=Ot(Ys(v,N,C),h);let q=Math.floor((U-H+14-r)/7),fe;return q<1?(fe=v-1,q=fl(fe,r,h)):q>fl(v,r,h)?(fe=v+1,q=1):fe=v,{weekYear:fe,weekNumber:q,weekday:H,...ts(m)}}function An(m,r=4,h=1){const{weekYear:v,weekNumber:N,weekday:C}=m,U=Ot(Ys(v,1,r),h),H=tn(v);let q=N*7+C-U-7+r,fe;q<1?(fe=v-1,q+=tn(fe)):q>H?(fe=v+1,q-=tn(v)):fe=v;const{month:ve,day:Le}=Ka(fe,q);return{year:fe,month:ve,day:Le,...ts(m)}}function Wl(m){const{year:r,month:h,day:v}=m,N=Yr(r,h,v);return{year:r,ordinal:N,...ts(m)}}function du(m){const{year:r,ordinal:h}=m,{month:v,day:N}=Ka(r,h);return{year:r,month:v,day:N,...ts(m)}}function fu(m,r){if(!Oe(m.localWeekday)||!Oe(m.localWeekNumber)||!Oe(m.localWeekYear)){if(!Oe(m.weekday)||!Oe(m.weekNumber)||!Oe(m.weekYear))throw new g("Cannot mix locale-based week fields with ISO-based week fields");return Oe(m.localWeekday)||(m.weekday=m.localWeekday),Oe(m.localWeekNumber)||(m.weekNumber=m.localWeekNumber),Oe(m.localWeekYear)||(m.weekYear=m.localWeekYear),delete m.localWeekday,delete m.localWeekNumber,delete m.localWeekYear,{minDaysInFirstWeek:r.getMinDaysInFirstWeek(),startOfWeek:r.getStartOfWeek()}}else return{minDaysInFirstWeek:4,startOfWeek:1}}function hu(m,r=4,h=1){const v=en(m.weekYear),N=Wt(m.weekNumber,1,fl(m.weekYear,r,h)),C=Wt(m.weekday,1,7);return v?N?C?!1:na("weekday",m.weekday):na("week",m.weekNumber):na("weekYear",m.weekYear)}function Il(m){const r=en(m.year),h=Wt(m.ordinal,1,tn(m.year));return r?h?!1:na("ordinal",m.ordinal):na("year",m.year)}function $s(m){const r=en(m.year),h=Wt(m.month,1,12),v=Wt(m.day,1,Gs(m.year,m.month));return r?h?v?!1:na("day",m.day):na("month",m.month):na("year",m.year)}function _n(m){const{hour:r,minute:h,second:v,millisecond:N}=m,C=Wt(r,0,23)||r===24&&h===0&&v===0&&N===0,U=Wt(h,0,59),H=Wt(v,0,59),q=Wt(N,0,999);return C?U?H?q?!1:na("millisecond",N):na("second",v):na("minute",h):na("hour",r)}function Oe(m){return typeof m>"u"}function ga(m){return typeof m=="number"}function en(m){return typeof m=="number"&&m%1===0}function Ut(m){return typeof m=="string"}function mu(m){return Object.prototype.toString.call(m)==="[object Date]"}function $r(){try{return typeof Intl<"u"&&!!Intl.RelativeTimeFormat}catch{return!1}}function Sn(){try{return typeof Intl<"u"&&!!Intl.Locale&&("weekInfo"in Intl.Locale.prototype||"getWeekInfo"in Intl.Locale.prototype)}catch{return!1}}function ol(m){return Array.isArray(m)?m:[m]}function gu(m,r,h){if(m.length!==0)return m.reduce((v,N)=>{const C=[r(N),N];return v&&h(v[0],C[0])===v[0]?v:C},null)[1]}function yu(m,r){return r.reduce((h,v)=>(h[v]=m[v],h),{})}function kn(m,r){return Object.prototype.hasOwnProperty.call(m,r)}function Fr(m){if(m==null)return null;if(typeof m!="object")throw new y("Week settings must be an object");if(!Wt(m.firstDay,1,7)||!Wt(m.minimalDays,1,7)||!Array.isArray(m.weekend)||m.weekend.some(r=>!Wt(r,1,7)))throw new y("Invalid week settings");return{firstDay:m.firstDay,minimalDays:m.minimalDays,weekend:Array.from(m.weekend)}}function Wt(m,r,h){return en(m)&&m>=r&&m<=h}function Fs(m,r){return m-r*Math.floor(m/r)}function rt(m,r=2){const h=m<0;let v;return h?v="-"+(""+-m).padStart(r,"0"):v=(""+m).padStart(r,"0"),v}function Dt(m){if(!(Oe(m)||m===null||m===""))return parseInt(m,10)}function wn(m){if(!(Oe(m)||m===null||m===""))return parseFloat(m)}function Gr(m){if(!(Oe(m)||m===null||m==="")){const r=parseFloat("0."+m)*1e3;return Math.floor(r)}}function Xl(m,r,h="round"){const v=10**r;switch(h){case"expand":return m>0?Math.ceil(m*v)/v:Math.floor(m*v)/v;case"trunc":return Math.trunc(m*v)/v;case"round":return Math.round(m*v)/v;case"floor":return Math.floor(m*v)/v;case"ceil":return Math.ceil(m*v)/v;default:throw new RangeError(`Value rounding ${h} is out of range`)}}function dl(m){return m%4===0&&(m%100!==0||m%400===0)}function tn(m){return dl(m)?366:365}function Gs(m,r){const h=Fs(r-1,12)+1,v=m+(r-h)/12;return h===2?dl(v)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][h-1]}function It(m){let r=Date.UTC(m.year,m.month-1,m.day,m.hour,m.minute,m.second,m.millisecond);return m.year<100&&m.year>=0&&(r=new Date(r),r.setUTCFullYear(m.year,m.month-1,m.day)),+r}function Zs(m,r,h){return-Ot(Ys(m,1,r),h)+r-1}function fl(m,r=4,h=1){const v=Zs(m,r,h),N=Zs(m+1,r,h);return(tn(m)-v+N)/7}function Jl(m){return m>99?m:m>xt.twoDigitCutoffYear?1900+m:2e3+m}function zn(m,r,h,v=null){const N=new Date(m),C={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};v&&(C.timeZone=v);const U={timeZoneName:r,...C},H=new Intl.DateTimeFormat(h,U).formatToParts(N).find(q=>q.type.toLowerCase()==="timezonename");return H?H.value:null}function Kl(m,r){let h=parseInt(m,10);Number.isNaN(h)&&(h=0);const v=parseInt(r,10)||0,N=h<0||Object.is(h,-0)?-v:v;return h*60+N}function Zr(m){const r=Number(m);if(typeof m=="boolean"||m===""||!Number.isFinite(r))throw new y(`Invalid unit value ${m}`);return r}function an(m,r){const h={};for(const v in m)if(kn(m,v)){const N=m[v];if(N==null)continue;h[r(v)]=Zr(N)}return h}function es(m,r){const h=Math.trunc(Math.abs(m/60)),v=Math.trunc(Math.abs(m%60)),N=m>=0?"+":"-";switch(r){case"short":return`${N}${rt(h,2)}:${rt(v,2)}`;case"narrow":return`${N}${h}${v>0?`:${v}`:""}`;case"techie":return`${N}${rt(h,2)}${rt(v,2)}`;default:throw new RangeError(`Value format ${r} is out of range for property format`)}}function ts(m){return yu(m,["hour","minute","second","millisecond"])}const xu=["January","February","March","April","May","June","July","August","September","October","November","December"],Qs=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],to=["J","F","M","A","M","J","J","A","S","O","N","D"];function pu(m){switch(m){case"narrow":return[...to];case"short":return[...Qs];case"long":return[...xu];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 as=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],qa=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],Qr=["M","T","W","T","F","S","S"];function Ps(m){switch(m){case"narrow":return[...Qr];case"short":return[...qa];case"long":return[...as];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}const Un=["AM","PM"],hl=["Before Christ","Anno Domini"],vu=["BC","AD"],Pr=["B","A"];function Wr(m){switch(m){case"narrow":return[...Pr];case"short":return[...vu];case"long":return[...hl];default:return null}}function ns(m){return Un[m.hour<12?0:1]}function nn(m,r){return Ps(r)[m.weekday-1]}function Ir(m,r){return pu(r)[m.month-1]}function ls(m,r){return Wr(r)[m.year<0?0:1]}function Nn(m,r,h="always",v=!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(m)===-1;if(h==="auto"&&C){const Le=m==="days";switch(r){case 1:return Le?"tomorrow":`next ${N[m][0]}`;case-1:return Le?"yesterday":`last ${N[m][0]}`;case 0:return Le?"today":`this ${N[m][0]}`}}const U=Object.is(r,-0)||r<0,H=Math.abs(r),q=H===1,fe=N[m],ve=v?q?fe[1]:fe[2]||fe[1]:q?N[m][0]:m;return U?`${H} ${ve} ago`:`in ${H} ${ve}`}function Ws(m,r){let h="";for(const v of m)v.literal?h+=v.val:h+=r(v.val);return h}const Is={D:j,DD:M,DDD:_,DDDD:T,t:B,tt:X,ttt:Q,tttt:F,T:ae,TT:le,TTT:K,TTTT:P,f:J,ff:k,fff:ie,ffff:he,F:A,FF:ne,FFF:ge,FFFF:Y};class Yt{static create(r,h={}){return new Yt(r,h)}static parseFormat(r){let h=null,v="",N=!1;const C=[];for(let U=0;U<r.length;U++){const H=r.charAt(U);H==="'"?((v.length>0||N)&&C.push({literal:N||/^\s+$/.test(v),val:v===""?"'":v}),h=null,v="",N=!N):N||H===h?v+=H:(v.length>0&&C.push({literal:/^\s+$/.test(v),val:v}),v=H,h=H)}return v.length>0&&C.push({literal:N||/^\s+$/.test(v),val:v}),C}static macroTokenToFormatOpts(r){return Is[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,v=void 0){if(this.opts.forceSimple)return rt(r,h);const N={...this.opts};return h>0&&(N.padTo=h),v&&(N.signDisplay=v),this.loc.numberFormatter(N).format(r)}formatDateTimeFromString(r,h){const v=this.loc.listingMode()==="en",N=this.loc.outputCalendar&&this.loc.outputCalendar!=="gregory",C=(Re,Tt)=>this.loc.extract(r,Re,Tt),U=Re=>r.isOffsetFixed&&r.offset===0&&Re.allowZ?"Z":r.isValid?r.zone.formatOffset(r.ts,Re.format):"",H=()=>v?ns(r):C({hour:"numeric",hourCycle:"h12"},"dayperiod"),q=(Re,Tt)=>v?Ir(r,Re):C(Tt?{month:Re}:{month:Re,day:"numeric"},"month"),fe=(Re,Tt)=>v?nn(r,Re):C(Tt?{weekday:Re}:{weekday:Re,month:"long",day:"numeric"},"weekday"),ve=Re=>{const Tt=Yt.macroTokenToFormatOpts(Re);return Tt?this.formatWithSystemDefault(r,Tt):Re},Le=Re=>v?ls(r,Re):C({era:Re},"era"),We=Re=>{switch(Re){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 U({format:"narrow",allowZ:this.opts.allowZ});case"ZZ":return U({format:"short",allowZ:this.opts.allowZ});case"ZZZ":return U({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 H();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 fe("short",!0);case"cccc":return fe("long",!0);case"ccccc":return fe("narrow",!0);case"E":return this.num(r.weekday);case"EEE":return fe("short",!1);case"EEEE":return fe("long",!1);case"EEEEE":return fe("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 q("short",!0);case"LLLL":return q("long",!0);case"LLLLL":return q("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 q("short",!1);case"MMMM":return q("long",!1);case"MMMMM":return q("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 Le("short");case"GG":return Le("long");case"GGGGG":return Le("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 ve(Re)}};return Ws(Yt.parseFormat(h),We)}formatDurationFromString(r,h){const v=this.opts.signMode==="negativeLargestOnly"?-1:1,N=ve=>{switch(ve[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=(ve,Le)=>We=>{const Re=N(We);if(Re){const Tt=Le.isNegativeDuration&&Re!==Le.largestUnit?v:1;let Gt;return this.opts.signMode==="negativeLargestOnly"&&Re!==Le.largestUnit?Gt="never":this.opts.signMode==="all"?Gt="always":Gt="auto",this.num(ve.get(Re)*Tt,We.length,Gt)}else return We},U=Yt.parseFormat(h),H=U.reduce((ve,{literal:Le,val:We})=>Le?ve:ve.concat(We),[]),q=r.shiftTo(...H.map(N).filter(ve=>ve)),fe={isNegativeDuration:q<0,largestUnit:Object.keys(q.values)[0]};return Ws(U,C(q,fe))}}const ss=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;function ln(...m){const r=m.reduce((h,v)=>h+v.source,"");return RegExp(`^${r}$`)}function Hn(...m){return r=>m.reduce(([h,v,N],C)=>{const[U,H,q]=C(r,N);return[{...h,...U},H||v,q]},[{},null,1]).slice(0,2)}function Rt(m,...r){if(m==null)return[null,null];for(const[h,v]of r){const N=h.exec(m);if(N)return v(N)}return[null,null]}function jn(...m){return(r,h)=>{const v={};let N;for(N=0;N<m.length;N++)v[m[N]]=Dt(r[h+N]);return[v,null,h+N]}}const rs=/(?:([Zz])|([+-]\d\d)(?::?(\d\d))?)/,is=`(?:${rs.source}?(?:\\[(${ss.source})\\])?)?`,Xr=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,Xs=RegExp(`${Xr.source}${is}`),us=RegExp(`(?:[Tt]${Xs.source})?`),cs=/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,Js=/(\d{4})-?W(\d\d)(?:-?(\d))?/,bu=/(\d{4})-?(\d{3})/,ao=jn("weekYear","weekNumber","weekDay"),no=jn("year","ordinal"),lo=/(\d{4})-(\d\d)-(\d\d)/,Ks=RegExp(`${Xr.source} ?(?:${rs.source}|(${ss.source}))?`),so=RegExp(`(?: ${Ks.source})?`);function ml(m,r,h){const v=m[r];return Oe(v)?h:Dt(v)}function ro(m,r){return[{year:ml(m,r),month:ml(m,r+1,1),day:ml(m,r+2,1)},null,r+3]}function gl(m,r){return[{hours:ml(m,r,0),minutes:ml(m,r+1,0),seconds:ml(m,r+2,0),milliseconds:Gr(m[r+3])},null,r+4]}function os(m,r){const h=!m[r]&&!m[r+1],v=Kl(m[r+1],m[r+2]),N=h?null:nt.instance(v);return[{},N,r+3]}function yl(m,r){const h=m[r]?Me.create(m[r]):null;return[{},h,r+1]}const io=RegExp(`^T?${Xr.source}$`),uo=/^-?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 co(m){const[r,h,v,N,C,U,H,q,fe]=m,ve=r[0]==="-",Le=q&&q[0]==="-",We=(Re,Tt=!1)=>Re!==void 0&&(Tt||Re&&ve)?-Re:Re;return[{years:We(wn(h)),months:We(wn(v)),weeks:We(wn(N)),days:We(wn(C)),hours:We(wn(U)),minutes:We(wn(H)),seconds:We(wn(q),q==="-0"),milliseconds:We(Gr(fe),Le)}]}const oo={GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function ds(m,r,h,v,N,C,U){const H={year:r.length===2?Jl(Dt(r)):Dt(r),month:Qs.indexOf(h)+1,day:Dt(v),hour:Dt(N),minute:Dt(C)};return U&&(H.second=Dt(U)),m&&(H.weekday=m.length>3?as.indexOf(m)+1:qa.indexOf(m)+1),H}const fo=/^(?:(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 ho(m){const[,r,h,v,N,C,U,H,q,fe,ve,Le]=m,We=ds(r,N,v,h,C,U,H);let Re;return q?Re=oo[q]:fe?Re=0:Re=Kl(ve,Le),[We,new nt(Re)]}function mo(m){return m.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}const Su=/^(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$/,go=/^(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$/,yo=/^(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 wu(m){const[,r,h,v,N,C,U,H]=m;return[ds(r,N,v,h,C,U,H),nt.utcInstance]}function xo(m){const[,r,h,v,N,C,U,H]=m;return[ds(r,H,h,v,N,C,U),nt.utcInstance]}const po=ln(cs,us),vo=ln(Js,us),bo=ln(bu,us),So=ln(Xs),Nu=Hn(ro,gl,os,yl),Jr=Hn(ao,gl,os,yl),fs=Hn(no,gl,os,yl),wo=Hn(gl,os,yl);function ju(m){return Rt(m,[po,Nu],[vo,Jr],[bo,fs],[So,wo])}function Eu(m){return Rt(mo(m),[fo,ho])}function Tu(m){return Rt(m,[Su,wu],[go,wu],[yo,xo])}function Mu(m){return Rt(m,[uo,co])}const Cu=Hn(gl);function xl(m){return Rt(m,[io,Cu])}const No=ln(lo,so),jo=ln(Ks),Eo=Hn(gl,os,yl);function Ou(m){return Rt(m,[No,Nu],[jo,Eo])}const Kr="Invalid Duration",pl={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}},hs={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},...pl},ya=146097/400,sn=146097/4800,Du={years:{quarters:4,months:12,weeks:ya/7,days:ya,hours:ya*24,minutes:ya*24*60,seconds:ya*24*60*60,milliseconds:ya*24*60*60*1e3},quarters:{months:3,weeks:ya/28,days:ya/4,hours:ya*24/4,minutes:ya*24*60/4,seconds:ya*24*60*60/4,milliseconds:ya*24*60*60*1e3/4},months:{weeks:sn/7,days:sn,hours:sn*24,minutes:sn*24*60,seconds:sn*24*60*60,milliseconds:sn*24*60*60*1e3},...pl},En=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],ei=En.slice(0).reverse();function Ma(m,r,h=!1){const v={values:h?r.values:{...m.values,...r.values||{}},loc:m.loc.clone(r.loc),conversionAccuracy:r.conversionAccuracy||m.conversionAccuracy,matrix:r.matrix||m.matrix};return new Pe(v)}function ti(m,r){var h;let v=(h=r.milliseconds)!=null?h:0;for(const N of ei.slice(1))r[N]&&(v+=r[N]*m[N].milliseconds);return v}function ai(m,r){const h=ti(m,r)<0?-1:1;En.reduceRight((v,N)=>{if(Oe(r[N]))return v;if(v){const C=r[v]*h,U=m[N][v],H=Math.floor(C/U);r[N]+=H*h,r[v]-=H*U*h}return N},null),En.reduce((v,N)=>{if(Oe(r[N]))return v;if(v){const C=r[v]%1;r[v]-=C,r[N]+=C*m[v][N]}return N},null)}function ni(m){const r={};for(const[h,v]of Object.entries(m))v!==0&&(r[h]=v);return r}class Pe{constructor(r){const h=r.conversionAccuracy==="longterm"||!1;let v=h?Du:hs;r.matrix&&(v=r.matrix),this.values=r.values,this.loc=r.loc||_e.create(),this.conversionAccuracy=h?"longterm":"casual",this.invalid=r.invalid||null,this.matrix=v,this.isLuxonDuration=!0}static fromMillis(r,h){return Pe.fromObject({milliseconds:r},h)}static fromObject(r,h={}){if(r==null||typeof r!="object")throw new y(`Duration.fromObject: argument expected to be an object, got ${r===null?"null":typeof r}`);return new Pe({values:an(r,Pe.normalizeUnit),loc:_e.fromObject(h),conversionAccuracy:h.conversionAccuracy,matrix:h.matrix})}static fromDurationLike(r){if(ga(r))return Pe.fromMillis(r);if(Pe.isDuration(r))return r;if(typeof r=="object")return Pe.fromObject(r);throw new y(`Unknown duration argument ${r} of type ${typeof r}`)}static fromISO(r,h){const[v]=Mu(r);return v?Pe.fromObject(v,h):Pe.invalid("unparsable",`the input "${r}" can't be parsed as ISO 8601`)}static fromISOTime(r,h){const[v]=xl(r);return v?Pe.fromObject(v,h):Pe.invalid("unparsable",`the input "${r}" can't be parsed as ISO 8601`)}static invalid(r,h=null){if(!r)throw new y("need to specify a reason the Duration is invalid");const v=r instanceof ma?r:new ma(r,h);if(xt.throwOnInvalid)throw new o(v);return new Pe({invalid:v})}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 v={...h,floor:h.round!==!1&&h.floor!==!1};return this.isValid?Yt.create(this.loc,v).formatDurationFromString(this,r):Kr}toHuman(r={}){if(!this.isValid)return Kr;const h=r.showZeros!==!1,v=En.map(N=>{const C=this.values[N];return Oe(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(v)}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+=Xl(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},je.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?ti(this.matrix,this.values):NaN}valueOf(){return this.toMillis()}plus(r){if(!this.isValid)return this;const h=Pe.fromDurationLike(r),v={};for(const N of En)(kn(h.values,N)||kn(this.values,N))&&(v[N]=h.get(N)+this.get(N));return Ma(this,{values:v},!0)}minus(r){if(!this.isValid)return this;const h=Pe.fromDurationLike(r);return this.plus(h.negate())}mapUnits(r){if(!this.isValid)return this;const h={};for(const v of Object.keys(this.values))h[v]=Zr(r(this.values[v],v));return Ma(this,{values:h},!0)}get(r){return this[Pe.normalizeUnit(r)]}set(r){if(!this.isValid)return this;const h={...this.values,...an(r,Pe.normalizeUnit)};return Ma(this,{values:h})}reconfigure({locale:r,numberingSystem:h,conversionAccuracy:v,matrix:N}={}){const U={loc:this.loc.clone({locale:r,numberingSystem:h}),matrix:N,conversionAccuracy:v};return Ma(this,U)}as(r){return this.isValid?this.shiftTo(r).get(r):NaN}normalize(){if(!this.isValid)return this;const r=this.toObject();return ai(this.matrix,r),Ma(this,{values:r},!0)}rescale(){if(!this.isValid)return this;const r=ni(this.normalize().shiftToAll().toObject());return Ma(this,{values:r},!0)}shiftTo(...r){if(!this.isValid)return this;if(r.length===0)return this;r=r.map(U=>Pe.normalizeUnit(U));const h={},v={},N=this.toObject();let C;for(const U of En)if(r.indexOf(U)>=0){C=U;let H=0;for(const fe in v)H+=this.matrix[fe][U]*v[fe],v[fe]=0;ga(N[U])&&(H+=N[U]);const q=Math.trunc(H);h[U]=q,v[U]=(H*1e3-q*1e3)/1e3}else ga(N[U])&&(v[U]=N[U]);for(const U in v)v[U]!==0&&(h[C]+=U===C?v[U]:v[U]/this.matrix[C][U]);return ai(this.matrix,h),Ma(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 Ma(this,{values:r},!0)}removeZeros(){if(!this.isValid)return this;const r=ni(this.values);return Ma(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(v,N){return v===void 0||v===0?N===void 0||N===0:v===N}for(const v of En)if(!h(this.values[v],r.values[v]))return!1;return!0}}const vl="Invalid Interval";function To(m,r){return!m||!m.isValid?bt.invalid("missing or invalid start"):!r||!r.isValid?bt.invalid("missing or invalid end"):r<m?bt.invalid("end before start",`The end of an interval must be after its start, but you had start=${m.toISO()} and end=${r.toISO()}`):null}class bt{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 y("need to specify a reason the Interval is invalid");const v=r instanceof ma?r:new ma(r,h);if(xt.throwOnInvalid)throw new d(v);return new bt({invalid:v})}static fromDateTimes(r,h){const v=va(r),N=va(h),C=To(v,N);return C??new bt({start:v,end:N})}static after(r,h){const v=Pe.fromDurationLike(h),N=va(r);return bt.fromDateTimes(N,N.plus(v))}static before(r,h){const v=Pe.fromDurationLike(h),N=va(r);return bt.fromDateTimes(N.minus(v),N)}static fromISO(r,h){const[v,N]=(r||"").split("/",2);if(v&&N){let C,U;try{C=je.fromISO(v,h),U=C.isValid}catch{U=!1}let H,q;try{H=je.fromISO(N,h),q=H.isValid}catch{q=!1}if(U&&q)return bt.fromDateTimes(C,H);if(U){const fe=Pe.fromISO(N,h);if(fe.isValid)return bt.after(C,fe)}else if(q){const fe=Pe.fromISO(v,h);if(fe.isValid)return bt.before(H,fe)}}return bt.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 v=this.start.startOf(r,h);let N;return h!=null&&h.useLocaleWeeks?N=this.end.reconfigure({locale:v.locale}):N=this.end,N=N.startOf(r,h),Math.floor(N.diff(v,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?bt.fromDateTimes(r||this.s,h||this.e):this}splitAt(...r){if(!this.isValid)return[];const h=r.map(va).filter(U=>this.contains(U)).sort((U,H)=>U.toMillis()-H.toMillis()),v=[];let{s:N}=this,C=0;for(;N<this.e;){const U=h[C]||this.e,H=+U>+this.e?this.e:U;v.push(bt.fromDateTimes(N,H)),N=H,C+=1}return v}splitBy(r){const h=Pe.fromDurationLike(r);if(!this.isValid||!h.isValid||h.as("milliseconds")===0)return[];let{s:v}=this,N=1,C;const U=[];for(;v<this.e;){const H=this.start.plus(h.mapUnits(q=>q*N));C=+H>+this.e?this.e:H,U.push(bt.fromDateTimes(v,C)),v=C,N+=1}return U}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,v=this.e<r.e?this.e:r.e;return h>=v?null:bt.fromDateTimes(h,v)}union(r){if(!this.isValid)return this;const h=this.s<r.s?this.s:r.s,v=this.e>r.e?this.e:r.e;return bt.fromDateTimes(h,v)}static merge(r){const[h,v]=r.sort((N,C)=>N.s-C.s).reduce(([N,C],U)=>C?C.overlaps(U)||C.abutsStart(U)?[N,C.union(U)]:[N.concat([C]),U]:[N,U],[[],null]);return v&&h.push(v),h}static xor(r){let h=null,v=0;const N=[],C=r.map(q=>[{time:q.s,type:"s"},{time:q.e,type:"e"}]),U=Array.prototype.concat(...C),H=U.sort((q,fe)=>q.time-fe.time);for(const q of H)v+=q.type==="s"?1:-1,v===1?h=q.time:(h&&+h!=+q.time&&N.push(bt.fromDateTimes(h,q.time)),h=null);return bt.merge(N)}difference(...r){return bt.xor([this].concat(r)).map(h=>this.intersection(h)).filter(h=>h&&!h.isEmpty())}toString(){return this.isValid?`[${this.s.toISO()} – ${this.e.toISO()})`:vl}[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?Yt.create(this.s.loc.clone(h),r).formatInterval(this):vl}toISO(r){return this.isValid?`${this.s.toISO(r)}/${this.e.toISO(r)}`:vl}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:vl}toISOTime(r){return this.isValid?`${this.s.toISOTime(r)}/${this.e.toISOTime(r)}`:vl}toFormat(r,{separator:h=" – "}={}){return this.isValid?`${this.s.toFormat(r)}${h}${this.e.toFormat(r)}`:vl}toDuration(r,h){return this.isValid?this.e.diff(this.s,r,h):Pe.invalid(this.invalidReason)}mapEndpoints(r){return bt.fromDateTimes(r(this.s),r(this.e))}}class ms{static hasDST(r=xt.defaultZone){const h=je.now().setZone(r).set({month:12});return!r.isUniversal&&h.offset!==h.set({month:6}).offset}static isValidIANAZone(r){return Me.isValidZone(r)}static normalizeZone(r){return vt(r,xt.defaultZone)}static getStartOfWeek({locale:r=null,locObj:h=null}={}){return(h||_e.create(r)).getStartOfWeek()}static getMinimumDaysInFirstWeek({locale:r=null,locObj:h=null}={}){return(h||_e.create(r)).getMinDaysInFirstWeek()}static getWeekendWeekdays({locale:r=null,locObj:h=null}={}){return(h||_e.create(r)).getWeekendDays().slice()}static months(r="long",{locale:h=null,numberingSystem:v=null,locObj:N=null,outputCalendar:C="gregory"}={}){return(N||_e.create(h,v,C)).months(r)}static monthsFormat(r="long",{locale:h=null,numberingSystem:v=null,locObj:N=null,outputCalendar:C="gregory"}={}){return(N||_e.create(h,v,C)).months(r,!0)}static weekdays(r="long",{locale:h=null,numberingSystem:v=null,locObj:N=null}={}){return(N||_e.create(h,v,null)).weekdays(r)}static weekdaysFormat(r="long",{locale:h=null,numberingSystem:v=null,locObj:N=null}={}){return(N||_e.create(h,v,null)).weekdays(r,!0)}static meridiems({locale:r=null}={}){return _e.create(r).meridiems()}static eras(r="short",{locale:h=null}={}){return _e.create(h,null,"gregory").eras(r)}static features(){return{relative:$r(),localeWeek:Sn()}}}function la(m,r){const h=N=>N.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),v=h(r)-h(m);return Math.floor(Pe.fromMillis(v).as("days"))}function gs(m,r,h){const v=[["years",(q,fe)=>fe.year-q.year],["quarters",(q,fe)=>fe.quarter-q.quarter+(fe.year-q.year)*4],["months",(q,fe)=>fe.month-q.month+(fe.year-q.year)*12],["weeks",(q,fe)=>{const ve=la(q,fe);return(ve-ve%7)/7}],["days",la]],N={},C=m;let U,H;for(const[q,fe]of v)h.indexOf(q)>=0&&(U=q,N[q]=fe(m,r),H=C.plus(N),H>r?(N[q]--,m=C.plus(N),m>r&&(H=m,N[q]--,m=C.plus(N))):m=H);return[m,N,H,U]}function Ru(m,r,h,v){let[N,C,U,H]=gs(m,r,h);const q=r-N,fe=h.filter(Le=>["hours","minutes","seconds","milliseconds"].indexOf(Le)>=0);fe.length===0&&(U<r&&(U=N.plus({[H]:1})),U!==N&&(C[H]=(C[H]||0)+q/(U-N)));const ve=Pe.fromObject(C,v);return fe.length>0?Pe.fromMillis(q,v).shiftTo(...fe).plus(ve):ve}const Au="missing Intl.DateTimeFormat.formatToParts support";function Je(m,r=h=>h){return{regex:m,deser:([h])=>r(eo(h))}}const er="[  ]",_u=new RegExp(er,"g");function bl(m){return m.replace(/\./g,"\\.?").replace(_u,er)}function tr(m){return m.replace(/\./g,"").replace(_u," ").toLowerCase()}function Xt(m,r){return m===null?null:{regex:RegExp(m.map(bl).join("|")),deser:([h])=>m.findIndex(v=>tr(h)===tr(v))+r}}function ar(m,r){return{regex:m,deser:([,h,v])=>Kl(h,v),groups:r}}function ys(m){return{regex:m,deser:([r])=>r}}function Ln(m){return m.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function Sl(m,r){const h=aa(r),v=aa(r,"{2}"),N=aa(r,"{3}"),C=aa(r,"{4}"),U=aa(r,"{6}"),H=aa(r,"{1,2}"),q=aa(r,"{1,3}"),fe=aa(r,"{1,6}"),ve=aa(r,"{1,9}"),Le=aa(r,"{2,4}"),We=aa(r,"{4,6}"),Re=Zt=>({regex:RegExp(Ln(Zt.val)),deser:([Tn])=>Tn,literal:!0}),Gt=(Zt=>{if(m.literal)return Re(Zt);switch(Zt.val){case"G":return Xt(r.eras("short"),0);case"GG":return Xt(r.eras("long"),0);case"y":return Je(fe);case"yy":return Je(Le,Jl);case"yyyy":return Je(C);case"yyyyy":return Je(We);case"yyyyyy":return Je(U);case"M":return Je(H);case"MM":return Je(v);case"MMM":return Xt(r.months("short",!0),1);case"MMMM":return Xt(r.months("long",!0),1);case"L":return Je(H);case"LL":return Je(v);case"LLL":return Xt(r.months("short",!1),1);case"LLLL":return Xt(r.months("long",!1),1);case"d":return Je(H);case"dd":return Je(v);case"o":return Je(q);case"ooo":return Je(N);case"HH":return Je(v);case"H":return Je(H);case"hh":return Je(v);case"h":return Je(H);case"mm":return Je(v);case"m":return Je(H);case"q":return Je(H);case"qq":return Je(v);case"s":return Je(H);case"ss":return Je(v);case"S":return Je(q);case"SSS":return Je(N);case"u":return ys(ve);case"uu":return ys(H);case"uuu":return Je(h);case"a":return Xt(r.meridiems(),0);case"kkkk":return Je(C);case"kk":return Je(Le,Jl);case"W":return Je(H);case"WW":return Je(v);case"E":case"c":return Je(h);case"EEE":return Xt(r.weekdays("short",!1),1);case"EEEE":return Xt(r.weekdays("long",!1),1);case"ccc":return Xt(r.weekdays("short",!0),1);case"cccc":return Xt(r.weekdays("long",!0),1);case"Z":case"ZZ":return ar(new RegExp(`([+-]${H.source})(?::(${v.source}))?`),2);case"ZZZ":return ar(new RegExp(`([+-]${H.source})(${v.source})?`),2);case"z":return ys(/[a-z_+-/]{1,256}?/i);case" ":return ys(/[^\S\n\r]/);default:return Re(Zt)}})(m)||{invalidReason:Au};return Gt.token=m,Gt}const li={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 ku(m,r,h){const{type:v,value:N}=m;if(v==="literal"){const q=/^\s+$/.test(N);return{literal:!q,val:q?" ":N}}const C=r[v];let U=v;v==="hour"&&(r.hour12!=null?U=r.hour12?"hour12":"hour24":r.hourCycle!=null?r.hourCycle==="h11"||r.hourCycle==="h12"?U="hour12":U="hour24":U=h.hour12?"hour12":"hour24");let H=li[U];if(typeof H=="object"&&(H=H[C]),H)return{literal:!1,val:H}}function qn(m){return[`^${m.map(h=>h.regex).reduce((h,v)=>`${h}(${v.source})`,"")}$`,m]}function zu(m,r,h){const v=m.match(r);if(v){const N={};let C=1;for(const U in h)if(kn(h,U)){const H=h[U],q=H.groups?H.groups+1:1;!H.literal&&H.token&&(N[H.token.val[0]]=H.deser(v.slice(C,C+q))),C+=q}return[v,N]}else return[v,{}]}function Uu(m){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,v;return Oe(m.z)||(h=Me.create(m.z)),Oe(m.Z)||(h||(h=new nt(m.Z)),v=m.Z),Oe(m.q)||(m.M=(m.q-1)*3+1),Oe(m.h)||(m.h<12&&m.a===1?m.h+=12:m.h===12&&m.a===0&&(m.h=0)),m.G===0&&m.y&&(m.y=-m.y),Oe(m.u)||(m.S=Gr(m.u)),[Object.keys(m).reduce((C,U)=>{const H=r(U);return H&&(C[H]=m[U]),C},{}),h,v]}let nr=null;function Co(){return nr||(nr=je.fromMillis(1555555555555)),nr}function Oo(m,r){if(m.literal)return m;const h=Yt.macroTokenToFormatOpts(m.val),v=xa(h,r);return v==null||v.includes(void 0)?m:v}function Hu(m,r){return Array.prototype.concat(...m.map(h=>Oo(h,r)))}class si{constructor(r,h){if(this.locale=r,this.format=h,this.tokens=Hu(Yt.parseFormat(h),r),this.units=this.tokens.map(v=>Sl(v,r)),this.disqualifyingUnit=this.units.find(v=>v.invalidReason),!this.disqualifyingUnit){const[v,N]=qn(this.units);this.regex=RegExp(v,"i"),this.handlers=N}}explainFromTokens(r){if(this.isValid){const[h,v]=zu(r,this.regex,this.handlers),[N,C,U]=v?Uu(v):[null,null,void 0];if(kn(v,"a")&&kn(v,"H"))throw new g("Can't include meridiem when specifying 24-hour format");return{input:r,tokens:this.tokens,regex:this.regex,rawMatches:h,matches:v,result:N,zone:C,specificOffset:U}}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 ri(m,r,h){return new si(m,h).explainFromTokens(r)}function ii(m,r,h){const{result:v,zone:N,specificOffset:C,invalidReason:U}=ri(m,r,h);return[v,N,C,U]}function xa(m,r){if(!m)return null;const v=Yt.create(r,m).dtFormatter(Co()),N=v.formatToParts(),C=v.resolvedOptions();return N.map(U=>ku(U,m,C))}const wl="Invalid DateTime",ua=864e13;function Va(m){return new ma("unsupported zone",`the zone "${m.name}" is not supported`)}function xs(m){return m.weekData===null&&(m.weekData=Bt(m.c)),m.weekData}function Nl(m){return m.localWeekData===null&&(m.localWeekData=Bt(m.c,m.loc.getMinDaysInFirstWeek(),m.loc.getStartOfWeek())),m.localWeekData}function Ba(m,r){const h={ts:m.ts,zone:m.zone,c:m.c,o:m.o,loc:m.loc,invalid:m.invalid};return new je({...h,...r,old:h})}function lr(m,r,h){let v=m-r*60*1e3;const N=h.offset(v);if(r===N)return[v,r];v-=(N-r)*60*1e3;const C=h.offset(v);return N===C?[v,N]:[m-Math.min(N,C)*60*1e3,Math.max(N,C)]}function Ya(m,r){m+=r*60*1e3;const h=new Date(m);return{year:h.getUTCFullYear(),month:h.getUTCMonth()+1,day:h.getUTCDate(),hour:h.getUTCHours(),minute:h.getUTCMinutes(),second:h.getUTCSeconds(),millisecond:h.getUTCMilliseconds()}}function ps(m,r,h){return lr(It(m),r,h)}function vs(m,r){const h=m.o,v=m.c.year+Math.trunc(r.years),N=m.c.month+Math.trunc(r.months)+Math.trunc(r.quarters)*3,C={...m.c,year:v,month:N,day:Math.min(m.c.day,Gs(v,N))+Math.trunc(r.days)+Math.trunc(r.weeks)*7},U=Pe.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"),H=It(C);let[q,fe]=lr(H,h,m.zone);return U!==0&&(q+=U,fe=m.zone.offset(q)),{ts:q,o:fe}}function Ca(m,r,h,v,N,C){const{setZone:U,zone:H}=h;if(m&&Object.keys(m).length!==0||r){const q=r||H,fe=je.fromObject(m,{...h,zone:q,specificOffset:C});return U?fe:fe.setZone(H)}else return je.invalid(new ma("unparsable",`the input "${N}" can't be parsed as ${v}`))}function sr(m,r,h=!0){return m.isValid?Yt.create(_e.create("en-US"),{allowZ:h,forceSimple:!0}).formatDateTimeFromString(m,r):null}function Jt(m,r,h){const v=m.c.year>9999||m.c.year<0;let N="";if(v&&m.c.year>=0&&(N+="+"),N+=rt(m.c.year,v?6:4),h==="year")return N;if(r){if(N+="-",N+=rt(m.c.month),h==="month")return N;N+="-"}else if(N+=rt(m.c.month),h==="month")return N;return N+=rt(m.c.day),N}function rr(m,r,h,v,N,C,U){let H=!h||m.c.millisecond!==0||m.c.second!==0,q="";switch(U){case"day":case"month":case"year":break;default:if(q+=rt(m.c.hour),U==="hour")break;if(r){if(q+=":",q+=rt(m.c.minute),U==="minute")break;H&&(q+=":",q+=rt(m.c.second))}else{if(q+=rt(m.c.minute),U==="minute")break;H&&(q+=rt(m.c.second))}if(U==="second")break;H&&(!v||m.c.millisecond!==0)&&(q+=".",q+=rt(m.c.millisecond,3))}return N&&(m.isOffsetFixed&&m.offset===0&&!C?q+="Z":m.o<0?(q+="-",q+=rt(Math.trunc(-m.o/60)),q+=":",q+=rt(Math.trunc(-m.o%60))):(q+="+",q+=rt(Math.trunc(m.o/60)),q+=":",q+=rt(Math.trunc(m.o%60)))),C&&(q+="["+m.zone.ianaName+"]"),q}const $a={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},Lu={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},ir={ordinal:1,hour:0,minute:0,second:0,millisecond:0},Fa=["year","month","day","hour","minute","second","millisecond"],ui=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],qu=["year","ordinal","hour","minute","second","millisecond"];function jl(m){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"}[m.toLowerCase()];if(!r)throw new f(m);return r}function ci(m){switch(m.toLowerCase()){case"localweekday":case"localweekdays":return"localWeekday";case"localweeknumber":case"localweeknumbers":return"localWeekNumber";case"localweekyear":case"localweekyears":return"localWeekYear";default:return jl(m)}}function pa(m){if(rn===void 0&&(rn=xt.now()),m.type!=="iana")return m.offset(rn);const r=m.name;let h=sa.get(r);return h===void 0&&(h=m.offset(rn),sa.set(r,h)),h}function Vn(m,r){const h=vt(r.zone,xt.defaultZone);if(!h.isValid)return je.invalid(Va(h));const v=_e.fromObject(r);let N,C;if(Oe(m.year))N=xt.now();else{for(const q of Fa)Oe(m[q])&&(m[q]=$a[q]);const U=$s(m)||_n(m);if(U)return je.invalid(U);const H=pa(h);[N,C]=ps(m,H,h)}return new je({ts:N,zone:h,loc:v,o:C})}function Bn(m,r,h){const v=Oe(h.round)?!0:h.round,N=Oe(h.rounding)?"trunc":h.rounding,C=(H,q)=>(H=Xl(H,v||h.calendary?0:2,h.calendary?"round":N),r.loc.clone(h).relFormatter(h).format(H,q)),U=H=>h.calendary?r.hasSame(m,H)?0:r.startOf(H).diff(m.startOf(H),H).get(H):r.diff(m,H).get(H);if(h.unit)return C(U(h.unit),h.unit);for(const H of h.units){const q=U(H);if(Math.abs(q)>=1)return C(q,H)}return C(m>r?-0:0,h.units[h.units.length-1])}function bs(m){let r={},h;return m.length>0&&typeof m[m.length-1]=="object"?(r=m[m.length-1],h=Array.from(m).slice(0,m.length-1)):h=Array.from(m),[r,h]}let rn;const sa=new Map;class je{constructor(r){const h=r.zone||xt.defaultZone;let v=r.invalid||(Number.isNaN(r.ts)?new ma("invalid input"):null)||(h.isValid?null:Va(h));this.ts=Oe(r.ts)?xt.now():r.ts;let N=null,C=null;if(!v)if(r.old&&r.old.ts===this.ts&&r.old.zone.equals(h))[N,C]=[r.old.c,r.old.o];else{const H=ga(r.o)&&!r.old?r.o:h.offset(this.ts);N=Ya(this.ts,H),v=Number.isNaN(N.year)?new ma("invalid input"):null,N=v?null:N,C=v?null:H}this._zone=h,this.loc=r.loc||_e.create(),this.invalid=v,this.weekData=null,this.localWeekData=null,this.c=N,this.o=C,this.isLuxonDateTime=!0}static now(){return new je({})}static local(){const[r,h]=bs(arguments),[v,N,C,U,H,q,fe]=h;return Vn({year:v,month:N,day:C,hour:U,minute:H,second:q,millisecond:fe},r)}static utc(){const[r,h]=bs(arguments),[v,N,C,U,H,q,fe]=h;return r.zone=nt.utcInstance,Vn({year:v,month:N,day:C,hour:U,minute:H,second:q,millisecond:fe},r)}static fromJSDate(r,h={}){const v=mu(r)?r.valueOf():NaN;if(Number.isNaN(v))return je.invalid("invalid input");const N=vt(h.zone,xt.defaultZone);return N.isValid?new je({ts:v,zone:N,loc:_e.fromObject(h)}):je.invalid(Va(N))}static fromMillis(r,h={}){if(ga(r))return r<-ua||r>ua?je.invalid("Timestamp out of range"):new je({ts:r,zone:vt(h.zone,xt.defaultZone),loc:_e.fromObject(h)});throw new y(`fromMillis requires a numerical input, but received a ${typeof r} with value ${r}`)}static fromSeconds(r,h={}){if(ga(r))return new je({ts:r*1e3,zone:vt(h.zone,xt.defaultZone),loc:_e.fromObject(h)});throw new y("fromSeconds requires a numerical input")}static fromObject(r,h={}){r=r||{};const v=vt(h.zone,xt.defaultZone);if(!v.isValid)return je.invalid(Va(v));const N=_e.fromObject(h),C=an(r,ci),{minDaysInFirstWeek:U,startOfWeek:H}=fu(C,N),q=xt.now(),fe=Oe(h.specificOffset)?v.offset(q):h.specificOffset,ve=!Oe(C.ordinal),Le=!Oe(C.year),We=!Oe(C.month)||!Oe(C.day),Re=Le||We,Tt=C.weekYear||C.weekNumber;if((Re||ve)&&Tt)throw new g("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(We&&ve)throw new g("Can't mix ordinal dates with month/day");const Gt=Tt||C.weekday&&!Re;let Zt,Tn,un=Ya(q,fe);Gt?(Zt=ui,Tn=Lu,un=Bt(un,U,H)):ve?(Zt=qu,Tn=ir,un=Wl(un)):(Zt=Fa,Tn=$a);let ur=!1;for(const Qa of Zt){const cr=C[Qa];Oe(cr)?ur?C[Qa]=Tn[Qa]:C[Qa]=un[Qa]:ur=!0}const Yn=Gt?hu(C,U,H):ve?Il(C):$s(C),Za=Yn||_n(C);if(Za)return je.invalid(Za);const Mn=Gt?An(C,U,H):ve?du(C):C,[cn,oi]=ps(Mn,fe,v),$n=new je({ts:cn,zone:v,o:oi,loc:N});return C.weekday&&Re&&r.weekday!==$n.weekday?je.invalid("mismatched weekday",`you can't specify both a weekday of ${C.weekday} and a date of ${$n.toISO()}`):$n.isValid?$n:je.invalid($n.invalid)}static fromISO(r,h={}){const[v,N]=ju(r);return Ca(v,N,h,"ISO 8601",r)}static fromRFC2822(r,h={}){const[v,N]=Eu(r);return Ca(v,N,h,"RFC 2822",r)}static fromHTTP(r,h={}){const[v,N]=Tu(r);return Ca(v,N,h,"HTTP",h)}static fromFormat(r,h,v={}){if(Oe(r)||Oe(h))throw new y("fromFormat requires an input string and a format");const{locale:N=null,numberingSystem:C=null}=v,U=_e.fromOpts({locale:N,numberingSystem:C,defaultToEN:!0}),[H,q,fe,ve]=ii(U,r,h);return ve?je.invalid(ve):Ca(H,q,v,`format ${h}`,r,fe)}static fromString(r,h,v={}){return je.fromFormat(r,h,v)}static fromSQL(r,h={}){const[v,N]=Ou(r);return Ca(v,N,h,"SQL",r)}static invalid(r,h=null){if(!r)throw new y("need to specify a reason the DateTime is invalid");const v=r instanceof ma?r:new ma(r,h);if(xt.throwOnInvalid)throw new u(v);return new je({invalid:v})}static isDateTime(r){return r&&r.isLuxonDateTime||!1}static parseFormatForOpts(r,h={}){const v=xa(r,_e.fromObject(h));return v?v.map(N=>N?N.val:null).join(""):null}static expandFormat(r,h={}){return Hu(Yt.parseFormat(r),_e.fromObject(h)).map(N=>N.val).join("")}static resetCache(){rn=void 0,sa.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?xs(this).weekYear:NaN}get weekNumber(){return this.isValid?xs(this).weekNumber:NaN}get weekday(){return this.isValid?xs(this).weekday:NaN}get isWeekend(){return this.isValid&&this.loc.getWeekendDays().includes(this.weekday)}get localWeekday(){return this.isValid?Nl(this).weekday:NaN}get localWeekNumber(){return this.isValid?Nl(this).weekNumber:NaN}get localWeekYear(){return this.isValid?Nl(this).weekYear:NaN}get ordinal(){return this.isValid?Wl(this.c).ordinal:NaN}get monthShort(){return this.isValid?ms.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?ms.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?ms.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?ms.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,v=It(this.c),N=this.zone.offset(v-r),C=this.zone.offset(v+r),U=this.zone.offset(v-N*h),H=this.zone.offset(v-C*h);if(U===H)return[this];const q=v-U*h,fe=v-H*h,ve=Ya(q,U),Le=Ya(fe,H);return ve.hour===Le.hour&&ve.minute===Le.minute&&ve.second===Le.second&&ve.millisecond===Le.millisecond?[Ba(this,{ts:q}),Ba(this,{ts:fe})]:[this]}get isInLeapYear(){return dl(this.year)}get daysInMonth(){return Gs(this.year,this.month)}get daysInYear(){return this.isValid?tn(this.year):NaN}get weeksInWeekYear(){return this.isValid?fl(this.weekYear):NaN}get weeksInLocalWeekYear(){return this.isValid?fl(this.localWeekYear,this.loc.getMinDaysInFirstWeek(),this.loc.getStartOfWeek()):NaN}resolvedLocaleOptions(r={}){const{locale:h,numberingSystem:v,calendar:N}=Yt.create(this.loc.clone(r),r).resolvedOptions(this);return{locale:h,numberingSystem:v,outputCalendar:N}}toUTC(r=0,h={}){return this.setZone(nt.instance(r),h)}toLocal(){return this.setZone(xt.defaultZone)}setZone(r,{keepLocalTime:h=!1,keepCalendarTime:v=!1}={}){if(r=vt(r,xt.defaultZone),r.equals(this.zone))return this;if(r.isValid){let N=this.ts;if(h||v){const C=r.offset(this.ts),U=this.toObject();[N]=ps(U,C,r)}return Ba(this,{ts:N,zone:r})}else return je.invalid(Va(r))}reconfigure({locale:r,numberingSystem:h,outputCalendar:v}={}){const N=this.loc.clone({locale:r,numberingSystem:h,outputCalendar:v});return Ba(this,{loc:N})}setLocale(r){return this.reconfigure({locale:r})}set(r){if(!this.isValid)return this;const h=an(r,ci),{minDaysInFirstWeek:v,startOfWeek:N}=fu(h,this.loc),C=!Oe(h.weekYear)||!Oe(h.weekNumber)||!Oe(h.weekday),U=!Oe(h.ordinal),H=!Oe(h.year),q=!Oe(h.month)||!Oe(h.day),fe=H||q,ve=h.weekYear||h.weekNumber;if((fe||U)&&ve)throw new g("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(q&&U)throw new g("Can't mix ordinal dates with month/day");let Le;C?Le=An({...Bt(this.c,v,N),...h},v,N):Oe(h.ordinal)?(Le={...this.toObject(),...h},Oe(h.day)&&(Le.day=Math.min(Gs(Le.year,Le.month),Le.day))):Le=du({...Wl(this.c),...h});const[We,Re]=ps(Le,this.o,this.zone);return Ba(this,{ts:We,o:Re})}plus(r){if(!this.isValid)return this;const h=Pe.fromDurationLike(r);return Ba(this,vs(this,h))}minus(r){if(!this.isValid)return this;const h=Pe.fromDurationLike(r).negate();return Ba(this,vs(this,h))}startOf(r,{useLocaleWeeks:h=!1}={}){if(!this.isValid)return this;const v={},N=Pe.normalizeUnit(r);switch(N){case"years":v.month=1;case"quarters":case"months":v.day=1;case"weeks":case"days":v.hour=0;case"hours":v.minute=0;case"minutes":v.second=0;case"seconds":v.millisecond=0;break}if(N==="weeks")if(h){const C=this.loc.getStartOfWeek(),{weekday:U}=this;U<C&&(v.weekNumber=this.weekNumber-1),v.weekday=C}else v.weekday=1;if(N==="quarters"){const C=Math.ceil(this.month/3);v.month=(C-1)*3+1}return this.set(v)}endOf(r,h){return this.isValid?this.plus({[r]:1}).startOf(r,h).minus(1):this}toFormat(r,h={}){return this.isValid?Yt.create(this.loc.redefaultToEN(h)).formatDateTimeFromString(this,r):wl}toLocaleString(r=j,h={}){return this.isValid?Yt.create(this.loc.clone(h),r).formatDateTime(this):wl}toLocaleParts(r={}){return this.isValid?Yt.create(this.loc.clone(r),r).formatDateTimeParts(this):[]}toISO({format:r="extended",suppressSeconds:h=!1,suppressMilliseconds:v=!1,includeOffset:N=!0,extendedZone:C=!1,precision:U="milliseconds"}={}){if(!this.isValid)return null;U=jl(U);const H=r==="extended";let q=Jt(this,H,U);return Fa.indexOf(U)>=3&&(q+="T"),q+=rr(this,H,h,v,N,C,U),q}toISODate({format:r="extended",precision:h="day"}={}){return this.isValid?Jt(this,r==="extended",jl(h)):null}toISOWeekDate(){return sr(this,"kkkk-'W'WW-c")}toISOTime({suppressMilliseconds:r=!1,suppressSeconds:h=!1,includeOffset:v=!0,includePrefix:N=!1,extendedZone:C=!1,format:U="extended",precision:H="milliseconds"}={}){return this.isValid?(H=jl(H),(N&&Fa.indexOf(H)>=3?"T":"")+rr(this,U==="extended",h,r,v,C,H)):null}toRFC2822(){return sr(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)}toHTTP(){return sr(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")}toSQLDate(){return this.isValid?Jt(this,!0):null}toSQLTime({includeOffset:r=!0,includeZone:h=!1,includeOffsetSpace:v=!0}={}){let N="HH:mm:ss.SSS";return(h||r)&&(v&&(N+=" "),h?N+="z":r&&(N+="ZZ")),sr(this,N,!0)}toSQL(r={}){return this.isValid?`${this.toSQLDate()} ${this.toSQLTime(r)}`:null}toString(){return this.isValid?this.toISO():wl}[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",v={}){if(!this.isValid||!r.isValid)return Pe.invalid("created by diffing an invalid DateTime");const N={locale:this.locale,numberingSystem:this.numberingSystem,...v},C=ol(h).map(Pe.normalizeUnit),U=r.valueOf()>this.valueOf(),H=U?this:r,q=U?r:this,fe=Ru(H,q,C,N);return U?fe.negate():fe}diffNow(r="milliseconds",h={}){return this.diff(je.now(),r,h)}until(r){return this.isValid?bt.fromDateTimes(this,r):this}hasSame(r,h,v){if(!this.isValid)return!1;const N=r.valueOf(),C=this.setZone(r.zone,{keepLocalTime:!0});return C.startOf(h,v)<=N&&N<=C.endOf(h,v)}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||je.fromObject({},{zone:this.zone}),v=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),Bn(h,this.plus(v),{...r,numeric:"always",units:N,unit:C})}toRelativeCalendar(r={}){return this.isValid?Bn(r.base||je.fromObject({},{zone:this.zone}),this,{...r,numeric:"auto",units:["years","months","days"],calendary:!0}):null}static min(...r){if(!r.every(je.isDateTime))throw new y("min requires all arguments be DateTimes");return gu(r,h=>h.valueOf(),Math.min)}static max(...r){if(!r.every(je.isDateTime))throw new y("max requires all arguments be DateTimes");return gu(r,h=>h.valueOf(),Math.max)}static fromFormatExplain(r,h,v={}){const{locale:N=null,numberingSystem:C=null}=v,U=_e.fromOpts({locale:N,numberingSystem:C,defaultToEN:!0});return ri(U,r,h)}static fromStringExplain(r,h,v={}){return je.fromFormatExplain(r,h,v)}static buildFormatParser(r,h={}){const{locale:v=null,numberingSystem:N=null}=h,C=_e.fromOpts({locale:v,numberingSystem:N,defaultToEN:!0});return new si(C,r)}static fromFormatParser(r,h,v={}){if(Oe(r)||Oe(h))throw new y("fromFormatParser requires an input string and a format parser");const{locale:N=null,numberingSystem:C=null}=v,U=_e.fromOpts({locale:N,numberingSystem:C,defaultToEN:!0});if(!U.equals(h.locale))throw new y(`fromFormatParser called with a locale of ${U}, but the format parser was created for ${h.locale}`);const{result:H,zone:q,specificOffset:fe,invalidReason:ve}=h.explainFromTokens(r);return ve?je.invalid(ve):Ca(H,q,v,`format ${h.format}`,r,fe)}static get DATE_SHORT(){return j}static get DATE_MED(){return M}static get DATE_MED_WITH_WEEKDAY(){return D}static get DATE_FULL(){return _}static get DATE_HUGE(){return T}static get TIME_SIMPLE(){return B}static get TIME_WITH_SECONDS(){return X}static get TIME_WITH_SHORT_OFFSET(){return Q}static get TIME_WITH_LONG_OFFSET(){return F}static get TIME_24_SIMPLE(){return ae}static get TIME_24_WITH_SECONDS(){return le}static get TIME_24_WITH_SHORT_OFFSET(){return K}static get TIME_24_WITH_LONG_OFFSET(){return P}static get DATETIME_SHORT(){return J}static get DATETIME_SHORT_WITH_SECONDS(){return A}static get DATETIME_MED(){return k}static get DATETIME_MED_WITH_SECONDS(){return ne}static get DATETIME_MED_WITH_WEEKDAY(){return R}static get DATETIME_FULL(){return ie}static get DATETIME_FULL_WITH_SECONDS(){return ge}static get DATETIME_HUGE(){return he}static get DATETIME_HUGE_WITH_SECONDS(){return Y}}function va(m){if(je.isDateTime(m))return m;if(m&&m.valueOf&&ga(m.valueOf()))return je.fromJSDate(m);if(m&&typeof m=="object")return je.fromObject(m);throw new y(`Unknown datetime argument: ${m}, of type ${typeof m}`)}const Ga="3.7.2";return Ea.DateTime=je,Ea.Duration=Pe,Ea.FixedOffsetZone=nt,Ea.IANAZone=Me,Ea.Info=ms,Ea.Interval=bt,Ea.InvalidZone=pt,Ea.Settings=xt,Ea.SystemZone=Te,Ea.VERSION=Ga,Ea.Zone=re,Ea}var Cg;function Wf(){return Cg||(Cg=1,(function(l){var f,y,w,b,x,Tf,j,Fl;Object.defineProperty(l,"__esModule",{value:!0}),l.CronDate=l.DAYS_IN_MONTH=l.DateMathOp=l.TimeUnit=void 0;const u=K2();var d;(function(_){_.Second="Second",_.Minute="Minute",_.Hour="Hour",_.Day="Day",_.Month="Month",_.Year="Year"})(d||(l.TimeUnit=d={}));var o;(function(_){_.Add="Add",_.Subtract="Subtract"})(o||(l.DateMathOp=o={})),l.DAYS_IN_MONTH=Object.freeze([31,29,31,30,31,30,31,31,30,31,30,31]);const D=class D{constructor(T,B){st(this,j);st(this,f);st(this,y,null);st(this,w,null);st(this,b,{add:{[d.Year]:this.addYear.bind(this),[d.Month]:this.addMonth.bind(this),[d.Day]:this.addDay.bind(this),[d.Hour]:this.addHour.bind(this),[d.Minute]:this.addMinute.bind(this),[d.Second]:this.addSecond.bind(this)},subtract:{[d.Year]:this.subtractYear.bind(this),[d.Month]:this.subtractMonth.bind(this),[d.Day]:this.subtractDay.bind(this),[d.Hour]:this.subtractHour.bind(this),[d.Minute]:this.subtractMinute.bind(this),[d.Second]:this.subtractSecond.bind(this)}});const X={zone:B};if(T?T instanceof D?(Ee(this,f,ee(T,f)),Ee(this,y,ee(T,y)),Ee(this,w,ee(T,w))):T instanceof Date?Ee(this,f,u.DateTime.fromJSDate(T,X)):typeof T=="number"?Ee(this,f,u.DateTime.fromMillis(T,X)):(Ee(this,f,u.DateTime.fromISO(T,X)),ee(this,f).isValid||Ee(this,f,u.DateTime.fromRFC2822(T,X)),ee(this,f).isValid||Ee(this,f,u.DateTime.fromSQL(T,X)),ee(this,f).isValid||Ee(this,f,u.DateTime.fromFormat(T,"EEE, d MMM yyyy HH:mm:ss",X))):Ee(this,f,u.DateTime.local()),!ee(this,f).isValid)throw new Error(`CronDate: unhandled timestamp: ${T}`);B&&B!==ee(this,f).zoneName&&Ee(this,f,ee(this,f).setZone(B))}get dstStart(){return ee(this,y)}set dstStart(T){Ee(this,y,T)}get dstEnd(){return ee(this,w)}set dstEnd(T){Ee(this,w,T)}addYear(){Ee(this,f,ee(this,f).plus({years:1}))}addMonth(){Ee(this,f,ee(this,f).plus({months:1}).startOf("month"))}addDay(){Ee(this,f,ee(this,f).plus({days:1}).startOf("day"))}addHour(){Ee(this,f,ee(this,f).plus({hours:1}).startOf("hour"))}addMinute(){Ee(this,f,ee(this,f).plus({minutes:1}).startOf("minute"))}addSecond(){Ee(this,f,ee(this,f).plus({seconds:1}))}subtractYear(){Ee(this,f,ee(this,f).minus({years:1}))}subtractMonth(){Ee(this,f,ee(this,f).minus({months:1}).endOf("month").startOf("second"))}subtractDay(){Ee(this,f,ee(this,f).minus({days:1}).endOf("day").startOf("second"))}subtractHour(){Ee(this,f,ee(this,f).minus({hours:1}).endOf("hour").startOf("second"))}subtractMinute(){Ee(this,f,ee(this,f).minus({minutes:1}).endOf("minute").startOf("second"))}subtractSecond(){Ee(this,f,ee(this,f).minus({seconds:1}))}addUnit(T){ee(this,b).add[T]()}subtractUnit(T){ee(this,b).subtract[T]()}invokeDateOperation(T,B){if(T===o.Add){this.addUnit(B);return}if(T===o.Subtract){this.subtractUnit(B);return}throw new Error(`Invalid verb: ${T}`)}getDate(){return ee(this,f).day}getFullYear(){return ee(this,f).year}getDay(){const T=ee(this,f).weekday;return T===7?0:T}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(){Ee(this,f,ee(this,f).startOf("day"))}setEndOfDay(){Ee(this,f,ee(this,f).endOf("day"))}getTime(){return ee(this,f).valueOf()}getUTCDate(){return Ne(this,j,Fl).call(this).day}getUTCFullYear(){return Ne(this,j,Fl).call(this).year}getUTCDay(){const T=Ne(this,j,Fl).call(this).weekday;return T===7?0:T}getUTCMonth(){return Ne(this,j,Fl).call(this).month-1}getUTCHours(){return Ne(this,j,Fl).call(this).hour}getUTCMinutes(){return Ne(this,j,Fl).call(this).minute}getUTCSeconds(){return Ne(this,j,Fl).call(this).second}toISOString(){return ee(this,f).toUTC().toISO()}toJSON(){return ee(this,f).toJSON()}setDate(T){Ee(this,f,ee(this,f).set({day:T}))}setFullYear(T){Ee(this,f,ee(this,f).set({year:T}))}setDay(T){Ee(this,f,ee(this,f).set({weekday:T}))}setMonth(T){Ee(this,f,ee(this,f).set({month:T+1}))}setHours(T){Ee(this,f,ee(this,f).set({hour:T}))}setMinutes(T){Ee(this,f,ee(this,f).set({minute:T}))}setSeconds(T){Ee(this,f,ee(this,f).set({second:T}))}setMilliseconds(T){Ee(this,f,ee(this,f).set({millisecond:T}))}toString(){return this.toDate().toString()}toDate(){return ee(this,f).toJSDate()}isLastDayOfMonth(){var X;const{day:T,month:B}=ee(this,f);if(B===2){const Q=Ne(X=D,x,Tf).call(X,ee(this,f).year);return T===l.DAYS_IN_MONTH[B-1]-(Q?0:1)}return T===l.DAYS_IN_MONTH[B-1]}isLastWeekdayOfMonth(){var Q;const{day:T,month:B}=ee(this,f);let X;return B===2?X=l.DAYS_IN_MONTH[B-1]-(Ne(Q=D,x,Tf).call(Q,ee(this,f).year)?0:1):X=l.DAYS_IN_MONTH[B-1],T>X-7}applyDateOperation(T,B,X){if(B===d.Month||B===d.Day){this.invokeDateOperation(T,B);return}const Q=this.getHours();this.invokeDateOperation(T,B);const F=this.getHours(),ae=F-Q;ae===2?X!==24&&(this.dstStart=F):ae===0&&this.getMinutes()===0&&this.getSeconds()===0&&X!==24&&(this.dstEnd=F)}};f=new WeakMap,y=new WeakMap,w=new WeakMap,b=new WeakMap,x=new WeakSet,Tf=function(T){return T%4===0&&T%100!==0||T%400===0},j=new WeakSet,Fl=function(){return ee(this,f).toUTC()},st(D,x);let g=D;l.CronDate=g,l.default=g})(xf)),xf}var Og;function eS(){if(Og)return Ji;Og=1,Object.defineProperty(Ji,"__esModule",{value:!0}),Ji.CronMonth=void 0;const l=Wf(),u=Hs(),d=1,o=12,g=Object.freeze([]);let f=class extends u.CronField{static get min(){return d}static get max(){return o}static get chars(){return g}static get daysInMonth(){return l.DAYS_IN_MONTH}constructor(w,b){super(w,b),this.validate()}get values(){return super.values}};return Ji.CronMonth=f,Ji}var Ki={},Dg;function tS(){if(Dg)return Ki;Dg=1,Object.defineProperty(Ki,"__esModule",{value:!0}),Ki.CronSecond=void 0;const l=Hs(),u=0,d=59,o=Object.freeze([]);let g=class extends l.CronField{static get min(){return u}static get max(){return d}static get chars(){return o}constructor(y,w){super(y,w),this.validate()}get values(){return super.values}};return Ki.CronSecond=g,Ki}var Rg;function If(){return Rg||(Rg=1,(function(l){var u=Rs&&Rs.__createBinding||(Object.create?(function(o,g,f,y){y===void 0&&(y=f);var w=Object.getOwnPropertyDescriptor(g,f);(!w||("get"in w?!g.__esModule:w.writable||w.configurable))&&(w={enumerable:!0,get:function(){return g[f]}}),Object.defineProperty(o,y,w)}):(function(o,g,f,y){y===void 0&&(y=f),o[y]=g[f]})),d=Rs&&Rs.__exportStar||function(o,g){for(var f in o)f!=="default"&&!Object.prototype.hasOwnProperty.call(g,f)&&u(g,o,f)};Object.defineProperty(l,"__esModule",{value:!0}),d(P2(),l),d(W2(),l),d(I2(),l),d(Hs(),l),d(X2(),l),d(J2(),l),d(eS(),l),d(tS(),l)})(Rs)),Rs}var Ag;function Iy(){var d,o,g,f,y,w,b,x,Py,Wy;if(Ag)return Zi;Ag=1,Object.defineProperty(Zi,"__esModule",{value:!0}),Zi.CronFieldCollection=void 0;const l=If();let u=(x=class{constructor({second:D,minute:_,hour:T,dayOfMonth:B,month:X,dayOfWeek:Q}){st(this,d);st(this,o);st(this,g);st(this,f);st(this,y);st(this,w);if(!D)throw new Error("Validation error, Field second is missing");if(!_)throw new Error("Validation error, Field minute is missing");if(!T)throw new Error("Validation error, Field hour is missing");if(!B)throw new Error("Validation error, Field dayOfMonth is missing");if(!X)throw new Error("Validation error, Field month is missing");if(!Q)throw new Error("Validation error, Field dayOfWeek is missing");if(X.values.length===1&&!B.hasLastChar&&!(parseInt(B.values[0],10)<=l.CronMonth.daysInMonth[X.values[0]-1]))throw new Error("Invalid explicit day of month definition");Ee(this,d,D),Ee(this,o,_),Ee(this,g,T),Ee(this,y,X),Ee(this,w,Q),Ee(this,f,B)}static from(D,_){return new x({second:this.resolveField(l.CronSecond,D.second,_.second),minute:this.resolveField(l.CronMinute,D.minute,_.minute),hour:this.resolveField(l.CronHour,D.hour,_.hour),dayOfMonth:this.resolveField(l.CronDayOfMonth,D.dayOfMonth,_.dayOfMonth),month:this.resolveField(l.CronMonth,D.month,_.month),dayOfWeek:this.resolveField(l.CronDayOfWeek,D.dayOfWeek,_.dayOfWeek)})}static resolveField(D,_,T){return T?T instanceof l.CronField?T:new D(T):_}get second(){return ee(this,d)}get minute(){return ee(this,o)}get hour(){return ee(this,g)}get dayOfMonth(){return ee(this,f)}get month(){return ee(this,y)}get dayOfWeek(){return ee(this,w)}static compactField(D){if(D.length===0)return[];const _=[];let T;return D.forEach((B,X,Q)=>{if(T===void 0){T={start:B,count:1};return}const F=Q[X-1]||T.start,ae=Q[X+1];if(B==="L"||B==="W"){_.push(T),_.push({start:B,count:1}),T=void 0;return}if(T.step===void 0&&ae!==void 0){const le=B-F,K=ae-B;if(le<=K){T={...T,count:2,end:B,step:le};return}T.step=1}B-(T.end??0)===T.step?(T.count++,T.end=B):(T.count===1?_.push({start:T.start,count:1}):T.count===2?(_.push({start:T.start,count:1}),_.push({start:T.end??F,count:1})):_.push(T),T={start:B,count:1})}),T&&_.push(T),_}stringifyField(D){var X;let _=D.max,T=D.values;if(D instanceof l.CronDayOfWeek){_=6;const Q=ee(this,w).values;T=Q[Q.length-1]===7?Q.slice(0,-1):Q}D instanceof l.CronDayOfMonth&&(_=ee(this,y).values.length===1?l.CronMonth.daysInMonth[ee(this,y).values[0]-1]:D.max);const B=x.compactField(T);if(B.length===1){const Q=Ne(X=x,b,Py).call(X,D,B[0],_);if(Q)return Q}return B.map(Q=>{var ae;const F=Q.count===1?Q.start.toString():Ne(ae=x,b,Wy).call(ae,Q,_);return D instanceof l.CronDayOfWeek&&D.nthDay>0?`${F}#${D.nthDay}`:F}).join(",")}stringify(D=!1){const _=[];return D&&_.push(this.stringifyField(ee(this,d))),_.push(this.stringifyField(ee(this,o)),this.stringifyField(ee(this,g)),this.stringifyField(ee(this,f)),this.stringifyField(ee(this,y)),this.stringifyField(ee(this,w))),_.join(" ")}serialize(){return{second:ee(this,d).serialize(),minute:ee(this,o).serialize(),hour:ee(this,g).serialize(),dayOfMonth:ee(this,f).serialize(),month:ee(this,y).serialize(),dayOfWeek:ee(this,w).serialize()}}},d=new WeakMap,o=new WeakMap,g=new WeakMap,f=new WeakMap,y=new WeakMap,w=new WeakMap,b=new WeakSet,Py=function(D,_,T){const B=_.step;return B?B===1&&_.start===D.min&&_.end&&_.end>=T?D.hasQuestionMarkChar?"?":"*":B!==1&&_.start===D.min&&_.end&&_.end>=T-B+1?`*/${B}`:null:null},Wy=function(D,_){const T=D.step;if(T===1)return`${D.start}-${D.end}`;const B=D.start===0?D.count-1:D.count;if(!T)throw new Error("Unexpected range step");if(!D.end)throw new Error("Unexpected range end");if(T*B>D.end){const X=(F,ae)=>{if(typeof D.start!="number")throw new Error("Unexpected range start");return ae%T===0?D.start+ae:null};if(typeof D.start!="number")throw new Error("Unexpected range start");const Q={length:D.end-D.start+1};return Array.from(Q,X).filter(F=>F!==null).join(",")}return D.end===_-T+1?`${D.start}/${T}`:`${D.start}-${D.end}/${T}`},st(x,b),x);return Zi.CronFieldCollection=u,Zi}var pf={},_g;function nx(){return _g||(_g=1,(function(l){var g,f,y,w,b,x,S,j,M,Gl,_,_s,Xy,Jy,Ky,ex,Mf,tx,ax,Ar;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 u=Wf();l.TIME_SPAN_OUT_OF_BOUNDS_ERROR_MESSAGE="Out of the time span range",l.LOOPS_LIMIT_EXCEEDED_ERROR_MESSAGE="Invalid expression, loop limit exceeded";const d=1e4,J=class J{constructor(k,ne){st(this,_);st(this,g);st(this,f);st(this,y);st(this,w);st(this,b);st(this,x);st(this,S,null);st(this,j,!1);Ee(this,g,ne),Ee(this,f,ne.tz),Ee(this,w,ne.startDate?new u.CronDate(ne.startDate,ee(this,f)):null),Ee(this,b,ne.endDate?new u.CronDate(ne.endDate,ee(this,f)):null);let R=ne.currentDate??ne.startDate;if(R){const ie=new u.CronDate(R,ee(this,f));ee(this,w)&&ie.getTime()<ee(this,w).getTime()?R=ee(this,w):ee(this,b)&&ie.getTime()>ee(this,b).getTime()&&(R=ee(this,b))}Ee(this,y,new u.CronDate(R,ee(this,f))),Ee(this,x,k)}get fields(){return ee(this,x)}static fieldsToExpression(k,ne){return new J(k,ne||{})}next(){return Ne(this,_,Ar).call(this)}prev(){return Ne(this,_,Ar).call(this,!0)}hasNext(){const k=ee(this,y);try{return Ne(this,_,Ar).call(this),!0}catch{return!1}finally{Ee(this,y,k)}}hasPrev(){const k=ee(this,y);try{return Ne(this,_,Ar).call(this,!0),!0}catch{return!1}finally{Ee(this,y,k)}}take(k){const ne=[];if(k>=0)for(let R=0;R<k;R++)try{ne.push(this.next())}catch{return ne}else for(let R=0;R>k;R--)try{ne.push(this.prev())}catch{return ne}return ne}reset(k){Ee(this,y,new u.CronDate(k||ee(this,g).currentDate))}stringify(k=!1){return ee(this,x).stringify(k)}includesDate(k){const{second:ne,minute:R,hour:ie,month:ge}=ee(this,x),he=new u.CronDate(k,ee(this,f));return!(!ne.values.includes(he.getSeconds())||!R.values.includes(he.getMinutes())||!ie.values.includes(he.getHours())||!ge.values.includes(he.getMonth()+1)||!Ne(this,_,Mf).call(this,he)||ee(this,x).dayOfWeek.nthDay>0&&Math.ceil(he.getDate()/7)!==ee(this,x).dayOfWeek.nthDay)}toString(){return ee(this,g).expression||this.stringify(!0)}[Symbol.iterator](){return{next:()=>({value:Ne(this,_,Ar).call(this),done:!this.hasNext()})}}};g=new WeakMap,f=new WeakMap,y=new WeakMap,w=new WeakMap,b=new WeakMap,x=new WeakMap,S=new WeakMap,j=new WeakMap,M=new WeakSet,Gl=function(k,ne){return ne.some(R=>R===k)},_=new WeakSet,_s=function(k,ne){return k[ne?k.length-1:0]},Xy=function(k){const ne=`${k.getFullYear()}-${k.getMonth()+1}-${k.getDate()}`;if(ee(this,S)===ne)return ee(this,j);const R=new u.CronDate(k);R.setStartOfDay();const ie=new u.CronDate(k);return ie.setEndOfDay(),Ee(this,S,ne),Ee(this,j,R.getUTCOffset()!==ie.getUTCOffset()),ee(this,j)},Jy=function(k,ne,R){const ie=ee(this,x).second.values,ge=k.getSeconds(),he=ee(this,x).second.findNearestValue(ge,R);if(he!==null){k.setSeconds(he);return}k.applyDateOperation(ne,u.TimeUnit.Minute,ee(this,x).hour.values.length),k.setSeconds(Ne(this,_,_s).call(this,ie,R))},Ky=function(k,ne,R){const ie=ee(this,x).minute.values,ge=ee(this,x).second.values,he=k.getMinutes(),Y=ee(this,x).minute.findNearestValue(he,R);if(Y!==null){k.setMinutes(Y),k.setSeconds(Ne(this,_,_s).call(this,ge,R));return}k.applyDateOperation(ne,u.TimeUnit.Hour,ee(this,x).hour.values.length),k.setMinutes(Ne(this,_,_s).call(this,ie,R)),k.setSeconds(Ne(this,_,_s).call(this,ge,R))},ex=function(k,ne){const R=ne.isLastWeekdayOfMonth();return k.some(ie=>{const ge=parseInt(ie.toString().charAt(0),10)%7;if(Number.isNaN(ge))throw new Error(`Invalid last weekday of the month expression: ${ie}`);return ne.getDay()===ge&&R})},Mf=function(k){var re,ye,Te;const ne=ee(this,x).dayOfMonth.isWildcard,R=!ne,ie=ee(this,x).dayOfWeek.isWildcard,ge=!ie,he=Ne(re=J,M,Gl).call(re,k.getDate(),ee(this,x).dayOfMonth.values)||ee(this,x).dayOfMonth.hasLastChar&&k.isLastDayOfMonth(),Y=Ne(ye=J,M,Gl).call(ye,k.getDay(),ee(this,x).dayOfWeek.values)||ee(this,x).dayOfWeek.hasLastChar&&Ne(Te=J,M,ex).call(Te,ee(this,x).dayOfWeek.values,k);return!!(R&&ge&&(he||Y)||he&&!ge||ne&&!ie&&Y)},tx=function(k,ne,R){var Ue,z;const ie=ee(this,x).hour.values,ge=ie,he=k.getHours(),Y=Ne(Ue=J,M,Gl).call(Ue,he,ie),re=k.dstStart===he,ye=k.dstEnd===he;if(re)return Ne(z=J,M,Gl).call(z,he-1,ie)?!0:(k.invokeDateOperation(ne,u.TimeUnit.Hour),!1);if(ye&&!R)return k.dstEnd=null,k.applyDateOperation(u.DateMathOp.Add,u.TimeUnit.Hour,ge.length),!1;if(Y)return!0;k.dstStart=null;const Te=ee(this,x).hour.findNearestValue(he,R);if(Te===null)return k.applyDateOperation(ne,u.TimeUnit.Day,ge.length),!1;if(Ne(this,_,Xy).call(this,k)){const I=R?he-Te:Te-he;for(let me=0;me<I;me++)k.applyDateOperation(ne,u.TimeUnit.Hour,ge.length)}else k.setHours(Te);return k.setMinutes(Ne(this,_,_s).call(this,ee(this,x).minute.values,R)),k.setSeconds(Ne(this,_,_s).call(this,ee(this,x).second.values,R)),!1},ax=function(k){if(!ee(this,w)&&!ee(this,b))return;const ne=k.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)},Ar=function(k=!1){var he,Y,re;const ne=k?u.DateMathOp.Subtract:u.DateMathOp.Add,R=new u.CronDate(ee(this,y)),ie=R.getTime();let ge=0;for(;++ge<d;){if(Ne(this,_,ax).call(this,R),!Ne(this,_,Mf).call(this,R)){R.applyDateOperation(ne,u.TimeUnit.Day,ee(this,x).hour.values.length);continue}if(!(ee(this,x).dayOfWeek.nthDay<=0||Math.ceil(R.getDate()/7)===ee(this,x).dayOfWeek.nthDay)){R.applyDateOperation(ne,u.TimeUnit.Day,ee(this,x).hour.values.length);continue}if(!Ne(he=J,M,Gl).call(he,R.getMonth()+1,ee(this,x).month.values)){R.applyDateOperation(ne,u.TimeUnit.Month,ee(this,x).hour.values.length);continue}if(Ne(this,_,tx).call(this,R,ne,k)){if(!Ne(Y=J,M,Gl).call(Y,R.getMinutes(),ee(this,x).minute.values)){Ne(this,_,Ky).call(this,R,ne,k);continue}if(!Ne(re=J,M,Gl).call(re,R.getSeconds(),ee(this,x).second.values)){Ne(this,_,Jy).call(this,R,ne,k);continue}if(ie===R.getTime()){(ne==="Add"||R.getMilliseconds()===0)&&R.applyDateOperation(ne,u.TimeUnit.Second,ee(this,x).hour.values.length);continue}break}}if(ge>d)throw new Error(l.LOOPS_LIMIT_EXCEEDED_ERROR_MESSAGE);return R.getMilliseconds()!==0&&R.setMilliseconds(0),Ee(this,y,R),R},st(J,M);let o=J;l.CronExpression=o,l.default=o})(pf)),pf}var Hc={},kg;function aS(){if(kg)return Hc;kg=1,Object.defineProperty(Hc,"__esModule",{value:!0}),Hc.seededRandom=d;function l(o){let g=2166136261;for(let f=0;f<o.length;f++)g^=o.charCodeAt(f),g=Math.imul(g,16777619);return()=>g>>>0}function u(o){return()=>{let g=o+=1831565813;return g=Math.imul(g^g>>>15,g|1),g^=g+Math.imul(g^g>>>7,g|61),((g^g>>>14)>>>0)/4294967296}}function d(o){const g=o?l(o)():Math.floor(Math.random()*1e10);return u(g)}return Hc}var zg;function Of(){var x,S,lx,ks,sx,rx,ix,ux,cx,ox,dx,Cf,fx,hx;if(zg)return ka;zg=1,Object.defineProperty(ka,"__esModule",{value:!0}),ka.CronExpressionParser=ka.DayOfWeek=ka.Months=ka.CronUnit=ka.PredefinedExpressions=void 0;const l=Iy(),u=nx(),d=aS(),o=If();var g;(function(P){P["@yearly"]="0 0 0 1 1 *",P["@annually"]="0 0 0 1 1 *",P["@monthly"]="0 0 0 1 * *",P["@weekly"]="0 0 0 * * 0",P["@daily"]="0 0 0 * * *",P["@hourly"]="0 0 * * * *",P["@minutely"]="0 * * * * *",P["@secondly"]="* * * * * *",P["@weekdays"]="0 0 0 * * 1-5",P["@weekends"]="0 0 0 * * 0,6"})(g||(ka.PredefinedExpressions=g={}));var f;(function(P){P.Second="Second",P.Minute="Minute",P.Hour="Hour",P.DayOfMonth="DayOfMonth",P.Month="Month",P.DayOfWeek="DayOfWeek"})(f||(ka.CronUnit=f={}));var y;(function(P){P[P.jan=1]="jan",P[P.feb=2]="feb",P[P.mar=3]="mar",P[P.apr=4]="apr",P[P.may=5]="may",P[P.jun=6]="jun",P[P.jul=7]="jul",P[P.aug=8]="aug",P[P.sep=9]="sep",P[P.oct=10]="oct",P[P.nov=11]="nov",P[P.dec=12]="dec"})(y||(ka.Months=y={}));var w;(function(P){P[P.sun=0]="sun",P[P.mon=1]="mon",P[P.tue=2]="tue",P[P.wed=3]="wed",P[P.thu=4]="thu",P[P.fri=5]="fri",P[P.sat=6]="sat"})(w||(ka.DayOfWeek=w={}));let b=(S=class{static parse(J,A={}){var me,xe,De,Me,He,Nt,et,Pt;const{strict:k=!1,hashSeed:ne}=A,R=(0,d.seededRandom)(ne);J=g[J]||J;const ie=Ne(me=S,x,lx).call(me,J,k);if(!(ie.dayOfMonth==="*"||ie.dayOfWeek==="*"||!k))throw new Error("Cannot use both dayOfMonth and dayOfWeek together in strict mode!");const ge=Ne(xe=S,x,ks).call(xe,f.Second,ie.second,o.CronSecond.constraints,R),he=Ne(De=S,x,ks).call(De,f.Minute,ie.minute,o.CronMinute.constraints,R),Y=Ne(Me=S,x,ks).call(Me,f.Hour,ie.hour,o.CronHour.constraints,R),re=Ne(He=S,x,ks).call(He,f.Month,ie.month,o.CronMonth.constraints,R),ye=Ne(Nt=S,x,ks).call(Nt,f.DayOfMonth,ie.dayOfMonth,o.CronDayOfMonth.constraints,R),{dayOfWeek:Te,nthDayOfWeek:Ue}=Ne(et=S,x,fx).call(et,ie.dayOfWeek),z=Ne(Pt=S,x,ks).call(Pt,f.DayOfWeek,Te,o.CronDayOfWeek.constraints,R),I=new l.CronFieldCollection({second:new o.CronSecond(ge,{rawValue:ie.second}),minute:new o.CronMinute(he,{rawValue:ie.minute}),hour:new o.CronHour(Y,{rawValue:ie.hour}),dayOfMonth:new o.CronDayOfMonth(ye,{rawValue:ie.dayOfMonth}),month:new o.CronMonth(re,{rawValue:ie.month}),dayOfWeek:new o.CronDayOfWeek(z,{rawValue:ie.dayOfWeek,nthDayOfWeek:Ue})});return new u.CronExpression(I,{...A,expression:J})}},x=new WeakSet,lx=function(J,A){if(A&&!J.length)throw new Error("Invalid cron expression");J=J||"0 * * * * *";const k=J.trim().split(/\s+/);if(A&&k.length<6)throw new Error("Invalid cron expression, expected 6 fields");if(k.length>6)throw new Error("Invalid cron expression, too many fields");const ne=["*","*","*","*","*","0"];k.length<ne.length&&k.unshift(...ne.slice(k.length));const[R,ie,ge,he,Y,re]=k;return{second:R,minute:ie,hour:ge,dayOfMonth:he,month:Y,dayOfWeek:re}},ks=function(J,A,k,ne){if((J===f.Month||J===f.DayOfWeek)&&(A=A.replace(/[a-z]{3}/gi,R=>{R=R.toLowerCase();const ie=y[R]||w[R];if(ie===void 0)throw new Error(`Validation error, cannot resolve alias "${R}"`);return ie.toString()})),!k.validChars.test(A))throw new Error(`Invalid characters, got value: ${A}`);return A=Ne(this,x,sx).call(this,A,k),A=Ne(this,x,rx).call(this,A,k,ne),Ne(this,x,ix).call(this,J,A,k)},sx=function(J,A){return J.replace(/[*?]/g,A.min+"-"+A.max)},rx=function(J,A,k){const ne=k();return J.replace(/H(?:\((\d+)-(\d+)\))?(?:\/(\d+))?/g,(R,ie,ge,he)=>{if(ie&&ge&&he){const Y=parseInt(ie,10),re=parseInt(ge,10),ye=parseInt(he,10);if(Y>re)throw new Error(`Invalid range: ${Y}-${re}, min > max`);if(ye<=0)throw new Error(`Invalid step: ${ye}, must be positive`);const Te=Math.max(Y,A.min),Ue=Math.floor(ne*ye),z=[];for(let I=Math.floor(Te/ye)*ye+Ue;I<=re;I+=ye)I>=Te&&z.push(I);return z.join(",")}else if(ie&&ge){const Y=parseInt(ie,10),re=parseInt(ge,10);if(Y>re)throw new Error(`Invalid range: ${Y}-${re}, min > max`);return String(Math.floor(ne*(re-Y+1))+Y)}else if(he){const Y=parseInt(he,10);if(Y<=0)throw new Error(`Invalid step: ${Y}, must be positive`);const re=Math.floor(ne*Y),ye=[];for(let Te=Math.floor(A.min/Y)*Y+re;Te<=A.max;Te+=Y)Te>=A.min&&ye.push(Te);return ye.join(",")}else return String(Math.floor(ne*(A.max-A.min+1)+A.min))})},ix=function(J,A,k){const ne=[];function R(ge,he){var Y;if(Array.isArray(ge))ne.push(...ge);else if(Ne(Y=S,x,hx).call(Y,he,ge))ne.push(ge);else{const re=parseInt(ge.toString(),10);if(!(re>=he.min&&re<=he.max))throw new Error(`Constraint error, got value ${ge} expected range ${he.min}-${he.max}`);ne.push(J===f.DayOfWeek?re%7:ge)}}return A.split(",").forEach(ge=>{var he;if(!(ge.length>0))throw new Error("Invalid list value format");R(Ne(he=S,x,ux).call(he,J,ge,k),k)}),ne},ux=function(J,A,k){var R,ie;const ne=A.split("/");if(ne.length>2)throw new Error(`Invalid repeat: ${A}`);return ne.length===2?(isNaN(parseInt(ne[0],10))||(ne[0]=`${ne[0]}-${k.max}`),Ne(R=S,x,Cf).call(R,J,ne[0],parseInt(ne[1],10),k)):Ne(ie=S,x,Cf).call(ie,J,A,1,k)},cx=function(J,A,k){if(!(!isNaN(J)&&!isNaN(A)&&J>=k.min&&A<=k.max))throw new Error(`Constraint error, got range ${J}-${A} expected range ${k.min}-${k.max}`);if(J>A)throw new Error(`Invalid range: ${J}-${A}, min(${J}) > max(${A})`)},ox=function(J){if(!(!isNaN(J)&&J>0))throw new Error(`Constraint error, cannot repeat at every ${J} time.`)},dx=function(J,A,k,ne){const R=[];J===f.DayOfWeek&&k%7===0&&R.push(0);for(let ie=A;ie<=k;ie+=ne)R.indexOf(ie)===-1&&R.push(ie);return R},Cf=function(J,A,k,ne){const R=A.split("-");if(R.length<=1)return isNaN(+A)?A:+A;const[ie,ge]=R.map(he=>parseInt(he,10));return Ne(this,x,cx).call(this,ie,ge,ne),Ne(this,x,ox).call(this,k),Ne(this,x,dx).call(this,J,ie,ge,k)},fx=function(J){const A=J.split("#");if(A.length<=1)return{dayOfWeek:A[0]};const k=+A[A.length-1],ne=J.match(/([,-/])/);if(ne!==null)throw new Error(`Constraint error, invalid dayOfWeek \`#\` and \`${ne==null?void 0:ne[0]}\` special characters are incompatible`);if(!(A.length<=2&&!isNaN(k)&&k>=1&&k<=5))throw new Error("Constraint error, invalid dayOfWeek occurrence number (#)");return{dayOfWeek:A[0],nthDayOfWeek:k}},hx=function(J,A){return J.chars.some(k=>A.toString().includes(k))},st(S,x),S);return ka.CronExpressionParser=b,ka}var fn={};const nS={},lS=Object.freeze(Object.defineProperty({__proto__:null,default:nS},Symbol.toStringTag,{value:"Module"})),Ug=Bp(lS);var Hg;function sS(){var f,y,Df,mx;if(Hg)return fn;Hg=1;var l=fn&&fn.__createBinding||(Object.create?(function(x,S,j,M){M===void 0&&(M=j);var D=Object.getOwnPropertyDescriptor(S,j);(!D||("get"in D?!S.__esModule:D.writable||D.configurable))&&(D={enumerable:!0,get:function(){return S[j]}}),Object.defineProperty(x,M,D)}):(function(x,S,j,M){M===void 0&&(M=j),x[M]=S[j]})),u=fn&&fn.__setModuleDefault||(Object.create?(function(x,S){Object.defineProperty(x,"default",{enumerable:!0,value:S})}):function(x,S){x.default=S}),d=fn&&fn.__importStar||(function(){var x=function(S){return x=Object.getOwnPropertyNames||function(j){var M=[];for(var D in j)Object.prototype.hasOwnProperty.call(j,D)&&(M[M.length]=D);return M},x(S)};return function(S){if(S&&S.__esModule)return S;var j={};if(S!=null)for(var M=x(S),D=0;D<M.length;D++)M[D]!=="default"&&l(j,S,M[D]);return u(j,S),j}})();Object.defineProperty(fn,"__esModule",{value:!0}),fn.CronFileParser=void 0;const o=Of();let g=(y=class{static async parseFile(S){var D;const{readFile:j}=await Promise.resolve().then(()=>d(Ug)),M=await j(S,"utf8");return Ne(D=y,f,Df).call(D,M)}static parseFileSync(S){var D;const{readFileSync:j}=Ug,M=j(S,"utf8");return Ne(D=y,f,Df).call(D,M)}},f=new WeakSet,Df=function(S){var D;const j=S.split(`
381
+ `),M={variables:{},expressions:[],errors:{}};for(const _ of j){const T=_.trim();if(T.length===0||T.startsWith("#"))continue;const B=T.match(/^(.*)=(.*)$/);if(B){const[,X,Q]=B;M.variables[X]=Q.replace(/["']/g,"");continue}try{const X=Ne(D=y,f,mx).call(D,T);M.expressions.push(X.interval)}catch(X){M.errors[T]=X}}return M},mx=function(S){const j=S.split(" ");return{interval:o.CronExpressionParser.parse(j.slice(0,5).join(" ")),command:j.slice(5,j.length)}},st(y,f),y);return fn.CronFileParser=g,fn}var Lg;function rS(){return Lg||(Lg=1,(function(l){var u=Ds&&Ds.__createBinding||(Object.create?(function(x,S,j,M){M===void 0&&(M=j);var D=Object.getOwnPropertyDescriptor(S,j);(!D||("get"in D?!S.__esModule:D.writable||D.configurable))&&(D={enumerable:!0,get:function(){return S[j]}}),Object.defineProperty(x,M,D)}):(function(x,S,j,M){M===void 0&&(M=j),x[M]=S[j]})),d=Ds&&Ds.__exportStar||function(x,S){for(var j in x)j!=="default"&&!Object.prototype.hasOwnProperty.call(S,j)&&u(S,x,j)};Object.defineProperty(l,"__esModule",{value:!0}),l.CronFileParser=l.CronExpressionParser=l.CronExpression=l.CronFieldCollection=l.CronDate=void 0;const o=Of();var g=Wf();Object.defineProperty(l,"CronDate",{enumerable:!0,get:function(){return g.CronDate}});var f=Iy();Object.defineProperty(l,"CronFieldCollection",{enumerable:!0,get:function(){return f.CronFieldCollection}});var y=nx();Object.defineProperty(l,"CronExpression",{enumerable:!0,get:function(){return y.CronExpression}});var w=Of();Object.defineProperty(l,"CronExpressionParser",{enumerable:!0,get:function(){return w.CronExpressionParser}});var b=sS();Object.defineProperty(l,"CronFileParser",{enumerable:!0,get:function(){return b.CronFileParser}}),d(If(),l),l.default=o.CronExpressionParser})(Ds)),Ds}var iS=rS();const gx=6048e5,uS=864e5,cS=6e4,oS=36e5,qg=Symbol.for("constructDateFrom");function za(l,u){return typeof l=="function"?l(u):l&&typeof l=="object"&&qg in l?l[qg](u):l instanceof Date?new l.constructor(u):new Date(u)}function kt(l,u){return za(u||l,l)}function dS(l,u,d){return za(l,+kt(l)+u)}function Lc(l,u,d){return dS(l,u*oS)}let fS={};function Jc(){return fS}function su(l,u){var w,b,x,S;const d=Jc(),o=(u==null?void 0:u.weekStartsOn)??((b=(w=u==null?void 0:u.locale)==null?void 0:w.options)==null?void 0:b.weekStartsOn)??d.weekStartsOn??((S=(x=d.locale)==null?void 0:x.options)==null?void 0:S.weekStartsOn)??0,g=kt(l,u==null?void 0:u.in),f=g.getDay(),y=(f<o?7:0)+f-o;return g.setDate(g.getDate()-y),g.setHours(0,0,0,0),g}function Qc(l,u){return su(l,{...u,weekStartsOn:1})}function yx(l,u){const d=kt(l,u==null?void 0:u.in),o=d.getFullYear(),g=za(d,0);g.setFullYear(o+1,0,4),g.setHours(0,0,0,0);const f=Qc(g),y=za(d,0);y.setFullYear(o,0,4),y.setHours(0,0,0,0);const w=Qc(y);return d.getTime()>=f.getTime()?o+1:d.getTime()>=w.getTime()?o:o-1}function Vg(l){const u=kt(l),d=new Date(Date.UTC(u.getFullYear(),u.getMonth(),u.getDate(),u.getHours(),u.getMinutes(),u.getSeconds(),u.getMilliseconds()));return d.setUTCFullYear(u.getFullYear()),+l-+d}function hS(l,...u){const d=za.bind(null,u.find(o=>typeof o=="object"));return u.map(d)}function Bg(l,u){const d=kt(l,u==null?void 0:u.in);return d.setHours(0,0,0,0),d}function mS(l,u,d){const[o,g]=hS(d==null?void 0:d.in,l,u),f=Bg(o),y=Bg(g),w=+f-Vg(f),b=+y-Vg(y);return Math.round((w-b)/uS)}function gS(l,u){const d=yx(l,u),o=za(l,0);return o.setFullYear(d,0,4),o.setHours(0,0,0,0),Qc(o)}function yS(l,u){let d,o=u==null?void 0:u.in;return l.forEach(g=>{!o&&typeof g=="object"&&(o=za.bind(null,g));const f=kt(g,o);(!d||d<f||isNaN(+f))&&(d=f)}),za(o,d||NaN)}function xS(l,u){let d,o=u==null?void 0:u.in;return l.forEach(g=>{!o&&typeof g=="object"&&(o=za.bind(null,g));const f=kt(g,o);(!d||d>f||isNaN(+f))&&(d=f)}),za(o,d||NaN)}function pS(l){return l instanceof Date||typeof l=="object"&&Object.prototype.toString.call(l)==="[object Date]"}function vS(l){return!(!pS(l)&&typeof l!="number"||isNaN(+kt(l)))}function bS(l){return u=>{const o=(l?Math[l]:Math.trunc)(u);return o===0?0:o}}function SS(l,u){return+kt(l)-+kt(u)}function Yg(l,u,d){const o=SS(l,u)/cS;return bS(d==null?void 0:d.roundingMethod)(o)}function wS(l,u){const d=kt(l,u==null?void 0:u.in);return d.setFullYear(d.getFullYear(),0,1),d.setHours(0,0,0,0),d}const NS={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"}},jS=(l,u,d)=>{let o;const g=NS[l];return typeof g=="string"?o=g:u===1?o=g.one:o=g.other.replace("{{count}}",u.toString()),d!=null&&d.addSuffix?d.comparison&&d.comparison>0?"in "+o:o+" ago":o};function vf(l){return(u={})=>{const d=u.width?String(u.width):l.defaultWidth;return l.formats[d]||l.formats[l.defaultWidth]}}const ES={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},TS={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},MS={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},CS={date:vf({formats:ES,defaultWidth:"full"}),time:vf({formats:TS,defaultWidth:"full"}),dateTime:vf({formats:MS,defaultWidth:"full"})},OS={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},DS=(l,u,d,o)=>OS[l];function eu(l){return(u,d)=>{const o=d!=null&&d.context?String(d.context):"standalone";let g;if(o==="formatting"&&l.formattingValues){const y=l.defaultFormattingWidth||l.defaultWidth,w=d!=null&&d.width?String(d.width):y;g=l.formattingValues[w]||l.formattingValues[y]}else{const y=l.defaultWidth,w=d!=null&&d.width?String(d.width):l.defaultWidth;g=l.values[w]||l.values[y]}const f=l.argumentCallback?l.argumentCallback(u):u;return g[f]}}const RS={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},AS={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},_S={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"]},kS={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"]},zS={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"}},US={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"}},HS=(l,u)=>{const d=Number(l),o=d%100;if(o>20||o<10)switch(o%10){case 1:return d+"st";case 2:return d+"nd";case 3:return d+"rd"}return d+"th"},LS={ordinalNumber:HS,era:eu({values:RS,defaultWidth:"wide"}),quarter:eu({values:AS,defaultWidth:"wide",argumentCallback:l=>l-1}),month:eu({values:_S,defaultWidth:"wide"}),day:eu({values:kS,defaultWidth:"wide"}),dayPeriod:eu({values:zS,defaultWidth:"wide",formattingValues:US,defaultFormattingWidth:"wide"})};function tu(l){return(u,d={})=>{const o=d.width,g=o&&l.matchPatterns[o]||l.matchPatterns[l.defaultMatchWidth],f=u.match(g);if(!f)return null;const y=f[0],w=o&&l.parsePatterns[o]||l.parsePatterns[l.defaultParseWidth],b=Array.isArray(w)?VS(w,j=>j.test(y)):qS(w,j=>j.test(y));let x;x=l.valueCallback?l.valueCallback(b):b,x=d.valueCallback?d.valueCallback(x):x;const S=u.slice(y.length);return{value:x,rest:S}}}function qS(l,u){for(const d in l)if(Object.prototype.hasOwnProperty.call(l,d)&&u(l[d]))return d}function VS(l,u){for(let d=0;d<l.length;d++)if(u(l[d]))return d}function BS(l){return(u,d={})=>{const o=u.match(l.matchPattern);if(!o)return null;const g=o[0],f=u.match(l.parsePattern);if(!f)return null;let y=l.valueCallback?l.valueCallback(f[0]):f[0];y=d.valueCallback?d.valueCallback(y):y;const w=u.slice(g.length);return{value:y,rest:w}}}const YS=/^(\d+)(th|st|nd|rd)?/i,$S=/\d+/i,FS={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},GS={any:[/^b/i,/^(a|c)/i]},ZS={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},QS={any:[/1/i,/2/i,/3/i,/4/i]},PS={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},WS={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]},IS={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},XS={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]},JS={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},KS={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}},ew={ordinalNumber:BS({matchPattern:YS,parsePattern:$S,valueCallback:l=>parseInt(l,10)}),era:tu({matchPatterns:FS,defaultMatchWidth:"wide",parsePatterns:GS,defaultParseWidth:"any"}),quarter:tu({matchPatterns:ZS,defaultMatchWidth:"wide",parsePatterns:QS,defaultParseWidth:"any",valueCallback:l=>l+1}),month:tu({matchPatterns:PS,defaultMatchWidth:"wide",parsePatterns:WS,defaultParseWidth:"any"}),day:tu({matchPatterns:IS,defaultMatchWidth:"wide",parsePatterns:XS,defaultParseWidth:"any"}),dayPeriod:tu({matchPatterns:JS,defaultMatchWidth:"any",parsePatterns:KS,defaultParseWidth:"any"})},tw={code:"en-US",formatDistance:jS,formatLong:CS,formatRelative:DS,localize:LS,match:ew,options:{weekStartsOn:0,firstWeekContainsDate:1}};function aw(l,u){const d=kt(l,u==null?void 0:u.in);return mS(d,wS(d))+1}function nw(l,u){const d=kt(l,u==null?void 0:u.in),o=+Qc(d)-+gS(d);return Math.round(o/gx)+1}function xx(l,u){var S,j,M,D;const d=kt(l,u==null?void 0:u.in),o=d.getFullYear(),g=Jc(),f=(u==null?void 0:u.firstWeekContainsDate)??((j=(S=u==null?void 0:u.locale)==null?void 0:S.options)==null?void 0:j.firstWeekContainsDate)??g.firstWeekContainsDate??((D=(M=g.locale)==null?void 0:M.options)==null?void 0:D.firstWeekContainsDate)??1,y=za((u==null?void 0:u.in)||l,0);y.setFullYear(o+1,0,f),y.setHours(0,0,0,0);const w=su(y,u),b=za((u==null?void 0:u.in)||l,0);b.setFullYear(o,0,f),b.setHours(0,0,0,0);const x=su(b,u);return+d>=+w?o+1:+d>=+x?o:o-1}function lw(l,u){var w,b,x,S;const d=Jc(),o=(u==null?void 0:u.firstWeekContainsDate)??((b=(w=u==null?void 0:u.locale)==null?void 0:w.options)==null?void 0:b.firstWeekContainsDate)??d.firstWeekContainsDate??((S=(x=d.locale)==null?void 0:x.options)==null?void 0:S.firstWeekContainsDate)??1,g=xx(l,u),f=za((u==null?void 0:u.in)||l,0);return f.setFullYear(g,0,o),f.setHours(0,0,0,0),su(f,u)}function sw(l,u){const d=kt(l,u==null?void 0:u.in),o=+su(d,u)-+lw(d,u);return Math.round(o/gx)+1}function ot(l,u){const d=l<0?"-":"",o=Math.abs(l).toString().padStart(u,"0");return d+o}const $l={y(l,u){const d=l.getFullYear(),o=d>0?d:1-d;return ot(u==="yy"?o%100:o,u.length)},M(l,u){const d=l.getMonth();return u==="M"?String(d+1):ot(d+1,2)},d(l,u){return ot(l.getDate(),u.length)},a(l,u){const d=l.getHours()/12>=1?"pm":"am";switch(u){case"a":case"aa":return d.toUpperCase();case"aaa":return d;case"aaaaa":return d[0];case"aaaa":default:return d==="am"?"a.m.":"p.m."}},h(l,u){return ot(l.getHours()%12||12,u.length)},H(l,u){return ot(l.getHours(),u.length)},m(l,u){return ot(l.getMinutes(),u.length)},s(l,u){return ot(l.getSeconds(),u.length)},S(l,u){const d=u.length,o=l.getMilliseconds(),g=Math.trunc(o*Math.pow(10,d-3));return ot(g,u.length)}},Dr={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},$g={G:function(l,u,d){const o=l.getFullYear()>0?1:0;switch(u){case"G":case"GG":case"GGG":return d.era(o,{width:"abbreviated"});case"GGGGG":return d.era(o,{width:"narrow"});case"GGGG":default:return d.era(o,{width:"wide"})}},y:function(l,u,d){if(u==="yo"){const o=l.getFullYear(),g=o>0?o:1-o;return d.ordinalNumber(g,{unit:"year"})}return $l.y(l,u)},Y:function(l,u,d,o){const g=xx(l,o),f=g>0?g:1-g;if(u==="YY"){const y=f%100;return ot(y,2)}return u==="Yo"?d.ordinalNumber(f,{unit:"year"}):ot(f,u.length)},R:function(l,u){const d=yx(l);return ot(d,u.length)},u:function(l,u){const d=l.getFullYear();return ot(d,u.length)},Q:function(l,u,d){const o=Math.ceil((l.getMonth()+1)/3);switch(u){case"Q":return String(o);case"QQ":return ot(o,2);case"Qo":return d.ordinalNumber(o,{unit:"quarter"});case"QQQ":return d.quarter(o,{width:"abbreviated",context:"formatting"});case"QQQQQ":return d.quarter(o,{width:"narrow",context:"formatting"});case"QQQQ":default:return d.quarter(o,{width:"wide",context:"formatting"})}},q:function(l,u,d){const o=Math.ceil((l.getMonth()+1)/3);switch(u){case"q":return String(o);case"qq":return ot(o,2);case"qo":return d.ordinalNumber(o,{unit:"quarter"});case"qqq":return d.quarter(o,{width:"abbreviated",context:"standalone"});case"qqqqq":return d.quarter(o,{width:"narrow",context:"standalone"});case"qqqq":default:return d.quarter(o,{width:"wide",context:"standalone"})}},M:function(l,u,d){const o=l.getMonth();switch(u){case"M":case"MM":return $l.M(l,u);case"Mo":return d.ordinalNumber(o+1,{unit:"month"});case"MMM":return d.month(o,{width:"abbreviated",context:"formatting"});case"MMMMM":return d.month(o,{width:"narrow",context:"formatting"});case"MMMM":default:return d.month(o,{width:"wide",context:"formatting"})}},L:function(l,u,d){const o=l.getMonth();switch(u){case"L":return String(o+1);case"LL":return ot(o+1,2);case"Lo":return d.ordinalNumber(o+1,{unit:"month"});case"LLL":return d.month(o,{width:"abbreviated",context:"standalone"});case"LLLLL":return d.month(o,{width:"narrow",context:"standalone"});case"LLLL":default:return d.month(o,{width:"wide",context:"standalone"})}},w:function(l,u,d,o){const g=sw(l,o);return u==="wo"?d.ordinalNumber(g,{unit:"week"}):ot(g,u.length)},I:function(l,u,d){const o=nw(l);return u==="Io"?d.ordinalNumber(o,{unit:"week"}):ot(o,u.length)},d:function(l,u,d){return u==="do"?d.ordinalNumber(l.getDate(),{unit:"date"}):$l.d(l,u)},D:function(l,u,d){const o=aw(l);return u==="Do"?d.ordinalNumber(o,{unit:"dayOfYear"}):ot(o,u.length)},E:function(l,u,d){const o=l.getDay();switch(u){case"E":case"EE":case"EEE":return d.day(o,{width:"abbreviated",context:"formatting"});case"EEEEE":return d.day(o,{width:"narrow",context:"formatting"});case"EEEEEE":return d.day(o,{width:"short",context:"formatting"});case"EEEE":default:return d.day(o,{width:"wide",context:"formatting"})}},e:function(l,u,d,o){const g=l.getDay(),f=(g-o.weekStartsOn+8)%7||7;switch(u){case"e":return String(f);case"ee":return ot(f,2);case"eo":return d.ordinalNumber(f,{unit:"day"});case"eee":return d.day(g,{width:"abbreviated",context:"formatting"});case"eeeee":return d.day(g,{width:"narrow",context:"formatting"});case"eeeeee":return d.day(g,{width:"short",context:"formatting"});case"eeee":default:return d.day(g,{width:"wide",context:"formatting"})}},c:function(l,u,d,o){const g=l.getDay(),f=(g-o.weekStartsOn+8)%7||7;switch(u){case"c":return String(f);case"cc":return ot(f,u.length);case"co":return d.ordinalNumber(f,{unit:"day"});case"ccc":return d.day(g,{width:"abbreviated",context:"standalone"});case"ccccc":return d.day(g,{width:"narrow",context:"standalone"});case"cccccc":return d.day(g,{width:"short",context:"standalone"});case"cccc":default:return d.day(g,{width:"wide",context:"standalone"})}},i:function(l,u,d){const o=l.getDay(),g=o===0?7:o;switch(u){case"i":return String(g);case"ii":return ot(g,u.length);case"io":return d.ordinalNumber(g,{unit:"day"});case"iii":return d.day(o,{width:"abbreviated",context:"formatting"});case"iiiii":return d.day(o,{width:"narrow",context:"formatting"});case"iiiiii":return d.day(o,{width:"short",context:"formatting"});case"iiii":default:return d.day(o,{width:"wide",context:"formatting"})}},a:function(l,u,d){const g=l.getHours()/12>=1?"pm":"am";switch(u){case"a":case"aa":return d.dayPeriod(g,{width:"abbreviated",context:"formatting"});case"aaa":return d.dayPeriod(g,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return d.dayPeriod(g,{width:"narrow",context:"formatting"});case"aaaa":default:return d.dayPeriod(g,{width:"wide",context:"formatting"})}},b:function(l,u,d){const o=l.getHours();let g;switch(o===12?g=Dr.noon:o===0?g=Dr.midnight:g=o/12>=1?"pm":"am",u){case"b":case"bb":return d.dayPeriod(g,{width:"abbreviated",context:"formatting"});case"bbb":return d.dayPeriod(g,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return d.dayPeriod(g,{width:"narrow",context:"formatting"});case"bbbb":default:return d.dayPeriod(g,{width:"wide",context:"formatting"})}},B:function(l,u,d){const o=l.getHours();let g;switch(o>=17?g=Dr.evening:o>=12?g=Dr.afternoon:o>=4?g=Dr.morning:g=Dr.night,u){case"B":case"BB":case"BBB":return d.dayPeriod(g,{width:"abbreviated",context:"formatting"});case"BBBBB":return d.dayPeriod(g,{width:"narrow",context:"formatting"});case"BBBB":default:return d.dayPeriod(g,{width:"wide",context:"formatting"})}},h:function(l,u,d){if(u==="ho"){let o=l.getHours()%12;return o===0&&(o=12),d.ordinalNumber(o,{unit:"hour"})}return $l.h(l,u)},H:function(l,u,d){return u==="Ho"?d.ordinalNumber(l.getHours(),{unit:"hour"}):$l.H(l,u)},K:function(l,u,d){const o=l.getHours()%12;return u==="Ko"?d.ordinalNumber(o,{unit:"hour"}):ot(o,u.length)},k:function(l,u,d){let o=l.getHours();return o===0&&(o=24),u==="ko"?d.ordinalNumber(o,{unit:"hour"}):ot(o,u.length)},m:function(l,u,d){return u==="mo"?d.ordinalNumber(l.getMinutes(),{unit:"minute"}):$l.m(l,u)},s:function(l,u,d){return u==="so"?d.ordinalNumber(l.getSeconds(),{unit:"second"}):$l.s(l,u)},S:function(l,u){return $l.S(l,u)},X:function(l,u,d){const o=l.getTimezoneOffset();if(o===0)return"Z";switch(u){case"X":return Gg(o);case"XXXX":case"XX":return zs(o);case"XXXXX":case"XXX":default:return zs(o,":")}},x:function(l,u,d){const o=l.getTimezoneOffset();switch(u){case"x":return Gg(o);case"xxxx":case"xx":return zs(o);case"xxxxx":case"xxx":default:return zs(o,":")}},O:function(l,u,d){const o=l.getTimezoneOffset();switch(u){case"O":case"OO":case"OOO":return"GMT"+Fg(o,":");case"OOOO":default:return"GMT"+zs(o,":")}},z:function(l,u,d){const o=l.getTimezoneOffset();switch(u){case"z":case"zz":case"zzz":return"GMT"+Fg(o,":");case"zzzz":default:return"GMT"+zs(o,":")}},t:function(l,u,d){const o=Math.trunc(+l/1e3);return ot(o,u.length)},T:function(l,u,d){return ot(+l,u.length)}};function Fg(l,u=""){const d=l>0?"-":"+",o=Math.abs(l),g=Math.trunc(o/60),f=o%60;return f===0?d+String(g):d+String(g)+u+ot(f,2)}function Gg(l,u){return l%60===0?(l>0?"-":"+")+ot(Math.abs(l)/60,2):zs(l,u)}function zs(l,u=""){const d=l>0?"-":"+",o=Math.abs(l),g=ot(Math.trunc(o/60),2),f=ot(o%60,2);return d+g+u+f}const Zg=(l,u)=>{switch(l){case"P":return u.date({width:"short"});case"PP":return u.date({width:"medium"});case"PPP":return u.date({width:"long"});case"PPPP":default:return u.date({width:"full"})}},px=(l,u)=>{switch(l){case"p":return u.time({width:"short"});case"pp":return u.time({width:"medium"});case"ppp":return u.time({width:"long"});case"pppp":default:return u.time({width:"full"})}},rw=(l,u)=>{const d=l.match(/(P+)(p+)?/)||[],o=d[1],g=d[2];if(!g)return Zg(l,u);let f;switch(o){case"P":f=u.dateTime({width:"short"});break;case"PP":f=u.dateTime({width:"medium"});break;case"PPP":f=u.dateTime({width:"long"});break;case"PPPP":default:f=u.dateTime({width:"full"});break}return f.replace("{{date}}",Zg(o,u)).replace("{{time}}",px(g,u))},iw={p:px,P:rw},uw=/^D+$/,cw=/^Y+$/,ow=["D","DD","YY","YYYY"];function dw(l){return uw.test(l)}function fw(l){return cw.test(l)}function hw(l,u,d){const o=mw(l,u,d);if(console.warn(o),ow.includes(l))throw new RangeError(o)}function mw(l,u,d){const o=l[0]==="Y"?"years":"days of the month";return`Use \`${l.toLowerCase()}\` instead of \`${l}\` (in \`${u}\`) for formatting ${o} to the input \`${d}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const gw=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,yw=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,xw=/^'([^]*?)'?$/,pw=/''/g,vw=/[a-zA-Z]/;function As(l,u,d){var S,j,M,D;const o=Jc(),g=o.locale??tw,f=o.firstWeekContainsDate??((j=(S=o.locale)==null?void 0:S.options)==null?void 0:j.firstWeekContainsDate)??1,y=o.weekStartsOn??((D=(M=o.locale)==null?void 0:M.options)==null?void 0:D.weekStartsOn)??0,w=kt(l,d==null?void 0:d.in);if(!vS(w))throw new RangeError("Invalid time value");let b=u.match(yw).map(_=>{const T=_[0];if(T==="p"||T==="P"){const B=iw[T];return B(_,g.formatLong)}return _}).join("").match(gw).map(_=>{if(_==="''")return{isToken:!1,value:"'"};const T=_[0];if(T==="'")return{isToken:!1,value:bw(_)};if($g[T])return{isToken:!0,value:_};if(T.match(vw))throw new RangeError("Format string contains an unescaped latin alphabet character `"+T+"`");return{isToken:!1,value:_}});g.localize.preprocessor&&(b=g.localize.preprocessor(w,b));const x={firstWeekContainsDate:f,weekStartsOn:y,locale:g};return b.map(_=>{if(!_.isToken)return _.value;const T=_.value;(fw(T)||dw(T))&&hw(T,u,String(l));const B=$g[T[0]];return B(w,T,g.localize,x)}).join("")}function bw(l){const u=l.match(xw);return u?u[1].replace(pw,"'"):l}function Sw(l,u){return+kt(l)>+kt(u)}function ww(l,u){return+kt(l)<+kt(u)}function Nw(l,u){const d=kt(l,u==null?void 0:u.in);return d.setMinutes(0,0,0),d}const bf=Fy,qc=[{bg:"bg-indigo-400",border:"border-indigo-400/60"},{bg:"bg-cyan-400",border:"border-cyan-400/60"},{bg:"bg-rose-400",border:"border-rose-400/60"},{bg:"bg-violet-400",border:"border-violet-400/60"},{bg:"bg-amber-400",border:"border-amber-400/60"}],tl=160,Vc=14,jw=10,Ew=7,Qg=4,vx=({configs:l,currentProjectId:u,onEditJob:d,queueStatus:o,queueAnalytics:g})=>{const f=V.useMemo(()=>Nw(new Date),[]),y=V.useMemo(()=>Lc(f,24),[f]),w=V.useMemo(()=>Lc(f,-24),[f]),b=y,x=V.useMemo(()=>{const ae=[];for(let le=0;le<=24;le++)ae.push(Lc(f,le));return ae},[f]),S=V.useMemo(()=>{const ae=[];return l.forEach(({projectId:le,config:K})=>{var A,k;const P={executor:K.executorEnabled!==!1?K.cronSchedule:null,reviewer:K.reviewerEnabled?K.reviewerSchedule:null,qa:K.qa.enabled?K.qa.schedule:null,audit:K.audit.enabled?K.audit.schedule:null,slicer:K.roadmapScanner.enabled?K.roadmapScanner.slicerSchedule:null,analytics:(A=K.analytics)!=null&&A.enabled?(k=K.analytics)==null?void 0:k.schedule:null},J=K.cronScheduleOffset||0;Object.entries(P).forEach(([ne,R])=>{if(R)try{const ie=iS.CronExpressionParser.parse(R,{currentDate:f,endDate:y});for(;ie.hasNext();){const ge=ie.next(),he=new Date(ge.getTime());he.setMinutes(he.getMinutes()+J),Sw(he,f)&&ww(he,y)&&ae.push({projectId:le,jobType:ne,time:he})}}catch(ie){console.error(`Failed to parse cron "${R}" for ${le}/${ne}`,ie)}})}),ae},[l,f,y]),j=V.useMemo(()=>{const ae=new Set;return l.length===0||(l.every(le=>le.config.executorEnabled===!1)&&ae.add("executor"),l.every(le=>!le.config.reviewerEnabled)&&ae.add("reviewer"),l.every(le=>!le.config.qa.enabled)&&ae.add("qa"),l.every(le=>!le.config.audit.enabled)&&ae.add("audit"),l.every(le=>!le.config.roadmapScanner.enabled)&&ae.add("slicer"),l.every(le=>{var K;return!((K=le.config.analytics)!=null&&K.enabled)})&&ae.add("analytics")),ae},[l]),M=V.useMemo(()=>{const ae=new Map;let le=0;return l.forEach(K=>{K.projectId===u||(ae.set(K.projectId,le%qc.length),le++)}),ae},[l,u]),D=ae=>Yg(ae,f),_=V.useMemo(()=>{const ae=[];for(let le=0;le<=24;le++)ae.push(Lc(w,le));return ae},[w]),T=ae=>{const le=xS([yS([ae,w]),b]);return Yg(le,w)},B=V.useMemo(()=>{const ae=(g==null?void 0:g.recentRuns)??[],le=new Map;for(const K of ae){const P=K.providerKey||"default",J=new Date(K.startedAt*1e3),A=K.finishedAt?new Date(K.finishedAt*1e3):new Date;A<w||J>b||(le.has(P)||le.set(P,[]),le.get(P).push({id:K.id,jobType:K.jobType,status:K.status,projectPath:K.projectPath,startedAt:J,finishedAt:A,throttledCount:K.throttledCount}))}if(o!=null&&o.running){const K=o.running.providerKey??"default";le.has(K)||le.set(K,[]),le.get(K).push({id:o.running.id,jobType:o.running.jobType,status:"running",projectPath:o.running.projectPath,startedAt:new Date((o.running.dispatchedAt??o.running.enqueuedAt)*1e3),finishedAt:new Date,throttledCount:0})}return Array.from(le.entries()).sort(([K],[P])=>K.localeCompare(P)).map(([K,P])=>({providerKey:K,runs:P.sort((J,A)=>J.startedAt.getTime()-A.startedAt.getTime())}))},[b,w,g,o]),X=ae=>ae.split(/[-_]/).map(le=>le.charAt(0).toUpperCase()+le.slice(1)).join(" "),Q=l.length>1,F=s.jsx("div",{className:"absolute inset-0 flex pointer-events-none",children:x.map((ae,le)=>s.jsx("div",{className:"h-full border-l border-slate-800/20",style:{width:60}},le))});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."})]}),Q&&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(ae=>ae.projectId!==u).slice(0,5).map(ae=>{const le=M.get(ae.projectId)??0,K=qc[le],P=(ae.projectId.split("/").pop()??ae.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 ${K.bg} shrink-0`}),s.jsx("span",{className:"text-[10px] text-slate-500",title:ae.projectId,children:P})]},ae.projectId)})]})]}),s.jsx("div",{className:"overflow-x-auto custom-scrollbar",children:s.jsxs("div",{className:"relative min-w-[1600px]",style:{width:1440+tl},children:[s.jsxs("div",{className:"h-8 border-b border-slate-800 flex",children:[s.jsx("div",{style:{width:tl},className:"shrink-0 border-r border-slate-800"}),s.jsx("div",{className:"flex-1 relative",children:x.map((ae,le)=>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:le*60},children:s.jsx("span",{className:"text-[10px] font-mono text-slate-500",children:As(ae,"HH:mm")})},le))})]}),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."})}),bf.map(ae=>{const le=j.has(ae.id),K=S.filter(J=>J.jobType===ae.id);if(!Q)return s.jsxs("div",{className:`flex border-b border-slate-800/30 ${le?"opacity-40":""}`,children:[s.jsxs("div",{style:{width:tl},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 ${ae.color.bg} shrink-0`}),s.jsx("span",{className:"text-xs font-semibold text-slate-300",children:ae.label})]}),s.jsxs("div",{className:"flex-1 relative h-10",children:[F,K.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:le?"Disabled":"No runs in this window"})}):K.map((J,A)=>s.jsx("button",{type:"button",onClick:()=>d==null?void 0:d(J.projectId,J.jobType),style:{left:D(J.time)-3},className:`absolute top-1/2 -translate-y-1/2 h-4 w-6 rounded border ${ae.color.bg} ${ae.color.border} opacity-90 hover:opacity-100 hover:scale-110 transition-all cursor-pointer shadow-lg group`,title:`${ae.label} at ${As(J.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:As(J.time,"HH:mm")})},A))]})]},ae.id);const P=l.length*Vc+Qg*2;return s.jsxs("div",{className:`flex border-b border-slate-800/30 ${le?"opacity-40":""}`,children:[s.jsxs("div",{style:{width:tl,height:P},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 ${ae.color.bg} shrink-0`}),s.jsx("span",{className:"text-[10px] font-bold text-slate-400 uppercase tracking-wide",children:ae.label})]}),l.map(J=>{const A=J.projectId===u,k=(J.projectId.split("/").pop()??J.projectId).slice(0,14),ne=M.get(J.projectId)??0,R=A?ae.color.bg:qc[ne].bg;return s.jsxs("div",{style:{height:Vc},className:"flex items-center gap-1 overflow-hidden",children:[s.jsx("div",{className:`w-1 h-1 rounded-full shrink-0 ${R}`}),s.jsx("span",{className:`text-[9px] truncate ${A?"text-slate-200 font-semibold":"text-slate-600"}`,title:J.projectId,children:A?`${k} ★`:k})]},J.projectId)})]}),s.jsxs("div",{className:"flex-1 relative",style:{height:P},children:[F,l.map((J,A)=>{const k=J.projectId===u,ne=K.filter(re=>re.projectId===J.projectId),R=Qg+A*Vc,ie=k?jw:Ew,ge=Math.floor((Vc-ie)/2),he=M.get(J.projectId)??0,Y=k?{bg:ae.color.bg,border:ae.color.border}:qc[he];return s.jsxs(qe.Fragment,{children:[A>0&&s.jsx("div",{className:"absolute left-0 right-0 border-t border-slate-800/20 pointer-events-none",style:{top:R}}),ne.map((re,ye)=>s.jsx("button",{type:"button",onClick:()=>d==null?void 0:d(J.projectId,re.jobType),style:{left:D(re.time)-3,top:R+ge,height:ie},className:`absolute w-6 rounded border ${Y.bg} ${Y.border} ${k?"opacity-90":"opacity-50"} hover:opacity-100 hover:z-10 transition-all cursor-pointer group`,title:`${J.projectId} · ${ae.label} @ ${As(re.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:As(re.time,"HH:mm")})},ye))]},J.projectId)}),K.length===0&&!le&&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"})})]})]},ae.id)})]}),s.jsx("div",{className:"absolute top-0 bottom-0 w-px bg-rose-500/50 z-10 pointer-events-none",style:{left:tl+D(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"})]}),Q&&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:[(g==null?void 0:g.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+tl},children:[s.jsxs("div",{className:"h-8 border-b border-slate-800 flex",children:[s.jsx("div",{style:{width:tl},className:"shrink-0 border-r border-slate-800"}),s.jsx("div",{className:"flex-1 relative flex",children:_.map((ae,le)=>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:le*60},children:s.jsx("span",{className:"text-[10px] font-mono text-slate-500",children:As(ae,"HH:mm")})},le))})]}),s.jsx("div",{className:"relative",children:B.map(({providerKey:ae,runs:le})=>s.jsxs("div",{className:"flex border-b border-slate-800/30 min-h-14","data-testid":`provider-execution-lane-${ae}`,children:[s.jsxs("div",{style:{width:tl},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:ae,children:X(ae)}),s.jsx("span",{className:"text-[10px] text-slate-500 font-mono truncate",children:ae})]}),s.jsxs("div",{className:"flex-1 relative h-14",children:[s.jsx("div",{className:"absolute inset-0 flex pointer-events-none",children:_.map((K,P)=>s.jsx("div",{className:"h-full border-l border-slate-800/20",style:{width:60}},P))}),le.map(K=>{const P=bf.find(he=>he.id===K.jobType)??bf[0],J=T(K.startedAt),A=T(K.finishedAt),k=Math.max(A-J,8),ne=K.status==="running",R=K.status==="error"||K.status==="failed"||K.status==="errored",ie=ne?"bg-green-500":R?"bg-red-500":P.color.bg,ge=ne?"border-green-400/60":R?"border-red-400/60":P.color.border;return s.jsx("div",{className:`absolute top-1/2 -translate-y-1/2 h-8 rounded border ${ie} ${ge} opacity-85 shadow-lg ${ne?"animate-pulse":""}`,style:{left:J,width:k},title:`${ae} • ${P.label} • ${As(K.startedAt,"MMM d HH:mm")} • ${K.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:P.label}),s.jsx("span",{className:"text-white/70",children:K.status}),K.throttledCount>0&&s.jsxs("span",{className:"text-yellow-100",children:["throttle ",K.throttledCount,"x"]})]})},`${ae}-${K.id}-${K.startedAt.getTime()}`)})]})]},ae))}),s.jsx("div",{className:"absolute top-0 bottom-0 w-px bg-rose-500/50 z-10 pointer-events-none",style:{left:tl+T(new Date)},children:s.jsx("div",{className:"absolute top-0 h-2 w-2 rounded-full bg-rose-500 -translate-x-1/2"})})]})})]})]})},bx=({form:l,scheduleMode:u,selectedTemplateId:d,onFieldChange:o,onSwitchToTemplate:g,onSwitchToCustom:f,onApplyTemplate:y,allProjectConfigs:w,currentProjectId:b,onEditJob:x})=>{var S;return s.jsxs(Ke,{className:"p-6 space-y-6",children:[w&&w.length>0&&s.jsx(vx,{configs:w,currentProjectId:b,onEditJob:x}),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 ${u==="template"?"bg-indigo-600 text-white":"bg-slate-800 text-slate-400 hover:text-slate-200"}`,onClick:g,children:"Template"}),s.jsx("button",{type:"button",className:`px-4 py-1.5 text-sm font-medium transition-colors ${u==="custom"?"bg-indigo-600 text-white":"bg-slate-800 text-slate-400 hover:text-slate-200"}`,onClick:f,children:"Custom"})]})]}),u==="template"?s.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3",children:Pf.map(j=>{const M=d===j.id;return s.jsxs("button",{type:"button",onClick:()=>y(j),className:`text-left p-4 rounded-lg border transition-colors ${M?"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(([D,_])=>s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{className:"text-xs text-slate-500 w-16 shrink-0",children:D}),s.jsx("span",{className:"text-xs text-slate-400",children:_})]},D))})]},j.id)})}):s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsx(Dn,{label:"PRD Execution Schedule",value:l.cronSchedule,onChange:j=>o("cronSchedule",j)}),s.jsx(Dn,{label:"PR Review Schedule",value:l.reviewerSchedule,onChange:j=>o("reviewerSchedule",j)}),s.jsx(Dn,{label:"QA Schedule",value:l.qa.schedule,onChange:j=>o("qa",{...l.qa,schedule:j})}),s.jsx(Dn,{label:"Audit Schedule",value:l.audit.schedule,onChange:j=>o("audit",{...l.audit,schedule:j})}),((S=l.analytics)==null?void 0:S.enabled)&&s.jsx(Dn,{label:"Analytics Schedule",value:l.analytics.schedule,onChange:j=>o("analytics",{...l.analytics,schedule:j})}),l.roadmapScanner.enabled&&s.jsx(Dn,{label:"Planner Schedule",value:l.roadmapScanner.slicerSchedule||"35 */12 * * *",onChange:j=>o("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(oa,{label:"Scheduling Priority",value:String(l.schedulingPriority),onChange:j=>o("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(Ta,{checked:l.globalQueueEnabled??!0,onChange:j=>o("globalQueueEnabled",j)})]})}),s.jsx(Ge,{label:"Extra Start Delay",type:"number",min:"0",max:"59",value:String(l.cronScheduleOffset),onChange:j=>{const M=Math.min(59,Math.max(0,Number(j.target.value||0)));o("cronScheduleOffset",M)},helperText:"Manual delay in minutes added before cron jobs start. This stacks on top of automatic balancing."})]})]})},Tw=()=>{var Ft,mn,Ja,da,fa,gn,yn,xn,Ha,pn,de,pe,Ye,ze,gt,La,vn;const{addToast:l,selectedProjectId:u,globalModeLoading:d}=ia(),[o,g]=V.useState("overview"),[f,y]=V.useState(!1),[w,b]=V.useState(!1),[x,S]=V.useState(null),[j,M]=V.useState(null),[D,_]=V.useState([]),[T,B]=V.useState(null),[X,Q]=V.useState(null),[F,ae]=V.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:le,loading:K,error:P,refetch:J}=hn(ky,[u],{enabled:!d}),{data:A,loading:k,refetch:ne}=hn(Zf,[u],{enabled:!d});V.useEffect(()=>{const ce=setInterval(()=>{J()},3e4);return()=>clearInterval(ce)},[J]),V.useEffect(()=>{d||_y().then(_).catch(console.error)},[u,d]),V.useEffect(()=>{if(d)return;const ce=()=>{o2().then(B).catch(()=>{}),d2(24).then(Q).catch(()=>{})};ce();const Se=setInterval(ce,3e4);return()=>clearInterval(Se)},[d,u]),V.useEffect(()=>{var ce,Se,Fe,_e,ha,nt;if(A&&!F.isDirty){const vt=au(A.scheduleBundleId,A.cronSchedule,A.reviewerSchedule,((ce=A.qa)==null?void 0:ce.schedule)||"45 2,14 * * *",((Se=A.audit)==null?void 0:Se.schedule)||"50 3 * * 1",((Fe=A.roadmapScanner)==null?void 0:Fe.slicerSchedule)||"35 */12 * * *");ae({form:{cronSchedule:A.cronSchedule||"5 */3 * * *",reviewerSchedule:A.reviewerSchedule||"25 */6 * * *",qa:A.qa||{schedule:"45 2,14 * * *",enabled:!0},audit:A.audit||{schedule:"50 3 * * 1",enabled:!0},analytics:A.analytics||{schedule:"0 6 * * 1",enabled:!1},roadmapScanner:{enabled:((_e=A.roadmapScanner)==null?void 0:_e.enabled)??!0,slicerSchedule:((ha=A.roadmapScanner)==null?void 0:ha.slicerSchedule)||"35 */12 * * *"},scheduleBundleId:A.scheduleBundleId??null,schedulingPriority:A.schedulingPriority??3,cronScheduleOffset:A.cronScheduleOffset??0,globalQueueEnabled:((nt=A.queue)==null?void 0:nt.enabled)??!0},scheduleMode:vt?"template":"custom",selectedTemplateId:(vt==null?void 0:vt.id)??"",isDirty:!1})}},[A,F.isDirty]);const R=()=>{ne(),J()},ie=(ce,Se)=>ce instanceof Error?ce.message:Se,ge=async()=>{if(le){y(!0);try{le.paused?(await nu(),l({title:"Schedule Resumed",message:"Cron schedules have been reactivated.",type:"success"})):(await l2(),l({title:"Schedule Paused",message:"Cron schedules have been deactivated.",type:"info"})),R()}catch(ce){l({title:"Action Failed",message:ie(ce,"Failed to toggle schedule state"),type:"error"})}finally{y(!1)}}},he=async(ce,Se)=>{if(A){S(ce);try{ce==="executor"?await nl({executorEnabled:Se}):ce==="reviewer"?await nl({reviewerEnabled:Se}):ce==="qa"?await nl({qa:{...A.qa,enabled:Se}}):ce==="audit"?await nl({audit:{...A.audit,enabled:Se}}):ce==="analytics"?await nl({analytics:{...A.analytics,enabled:Se}}):await nl({roadmapScanner:{...A.roadmapScanner,enabled:Se}});let Fe="";try{await nu()}catch(_e){Fe=ie(_e,"Failed to reinstall cron schedules")}R(),l(Fe?{title:"Job Saved (Cron Reinstall Failed)",message:Fe,type:"warning"}:{title:"Job Updated",message:`${ce[0].toUpperCase()+ce.slice(1)} ${Se?"enabled":"disabled"}.`,type:"success"})}catch(Fe){l({title:"Update Failed",message:ie(Fe,"Failed to update job configuration"),type:"error"})}finally{S(null)}}},Y=async ce=>{M(ce);try{await{executor:zy,reviewer:Qf,qa:Uy,audit:Hy,planner:qy,analytics:Ly}[ce](),l({title:"Job Triggered",message:`${ce[0].toUpperCase()+ce.slice(1)} job has been queued.`,type:"success"}),J()}catch(Se){l({title:"Trigger Failed",message:ie(Se,`Failed to trigger ${ce} job`),type:"error"})}finally{M(null)}},re=(ce,Se)=>{ae(Fe=>({...Fe,form:{...Fe.form,[ce]:Se},isDirty:!0}))},ye=()=>{if(!F.form)return;const ce=au(F.form.scheduleBundleId,F.form.cronSchedule,F.form.reviewerSchedule,F.form.qa.schedule,F.form.audit.schedule,F.form.roadmapScanner.slicerSchedule||"35 */12 * * *");ae(Se=>({...Se,scheduleMode:"template",selectedTemplateId:(ce==null?void 0:ce.id)??"always-on",form:{...Se.form,scheduleBundleId:(ce==null?void 0:ce.id)??null},isDirty:!0}))},Te=()=>{ae(ce=>({...ce,scheduleMode:"custom",selectedTemplateId:"",form:{...ce.form,scheduleBundleId:null},isDirty:!0}))},Ue=ce=>{ae(Se=>({...Se,selectedTemplateId:ce.id,scheduleMode:"template",form:{...Se.form,cronSchedule:ce.schedules.executor,reviewerSchedule:ce.schedules.reviewer,scheduleBundleId:ce.id,qa:{...Se.form.qa,schedule:ce.schedules.qa},audit:{...Se.form.audit,schedule:ce.schedules.audit},roadmapScanner:{...Se.form.roadmapScanner,slicerSchedule:ce.schedules.slicer}},isDirty:!0}))},z=async()=>{var ce,Se;if(A){b(!0);try{await nl({cronSchedule:F.form.cronSchedule,reviewerSchedule:F.form.reviewerSchedule,scheduleBundleId:F.scheduleMode==="template"?F.form.scheduleBundleId:null,cronScheduleOffset:F.form.cronScheduleOffset,schedulingPriority:F.form.schedulingPriority,qa:{...A.qa,schedule:F.form.qa.schedule},audit:{...A.audit,schedule:F.form.audit.schedule},analytics:{...A.analytics,schedule:((ce=F.form.analytics)==null?void 0:ce.schedule)||((Se=A.analytics)==null?void 0:Se.schedule)||"0 6 * * 1"},roadmapScanner:{...A.roadmapScanner,slicerSchedule:F.form.roadmapScanner.slicerSchedule||"35 */12 * * *"},queue:{...A.queue,enabled:F.form.globalQueueEnabled??!0},executorEnabled:A.executorEnabled,reviewerEnabled:A.reviewerEnabled});let Fe="";try{await nu()}catch(_e){Fe=ie(_e,"Failed to reinstall cron schedules")}ae(_e=>({..._e,isDirty:!1})),R(),l(Fe?{title:"Schedules Saved (Cron Reinstall Failed)",message:Fe,type:"warning"}:{title:"Schedule Updated",message:"Cron schedules have been saved and installed.",type:"success"})}catch(Fe){l({title:"Save Failed",message:ie(Fe,"Failed to save schedules"),type:"error"})}finally{b(!1)}}},I=ce=>{if(!ce)return s.jsx("span",{className:"text-slate-500",children:"Not scheduled"});const Se=new Date(ce),Fe=Q2(Se);return s.jsxs("div",{className:"flex items-center space-x-2",children:[Fe&&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:G2(Se)}),s.jsxs("span",{className:"text-slate-500 ml-2",children:["(",Z2(Se),")"]})]})]})},me=ce=>{if(!ce||ce.delayMinutes<=0)return s.jsx("div",{className:"text-xs text-slate-500 mt-2",children:"Starts directly at the scheduled time."});const Se=[];return ce.balancedDelayMinutes>0&&Se.push(`auto +${ce.balancedDelayMinutes}m`),ce.manualDelayMinutes>0&&Se.push(`manual +${ce.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:[" ",Se.join(" - ")]})]})};if(K||k)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(P||!le||!A)return s.jsxs("div",{className:"flex flex-col items-center justify-center h-full space-y-4",children:[s.jsx(rl,{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:(P==null?void 0:P.message)||"Unknown error"}),s.jsx(mt,{onClick:()=>{J(),ne()},children:"Retry"})]});const xe=le.paused,De=xe?"bg-amber-500/10 text-amber-400 border-amber-500/20":"bg-green-500/10 text-green-400 border-green-500/20",Me=xe?"Paused":"Active",He=au(A.scheduleBundleId,A.cronSchedule,A.reviewerSchedule,((Ft=A.qa)==null?void 0:Ft.schedule)||"45 2,14 * * *",((mn=A.audit)==null?void 0:mn.schedule)||"50 3 * * 1",((Ja=A.roadmapScanner)==null?void 0:Ja.slicerSchedule)||"35 */12 * * *"),Nt=(ce,Se,Fe)=>!He||ce==="analytics"||!Rr(He.schedules[ce],Se)?bg(Fe):`${He.label} - ${He.hints[ce]}`,et=[{id:"executor",name:"Executor",description:"Creates implementation PRs from PRDs",icon:s.jsx(Fc,{className:"h-4 w-4"}),enabled:(A==null?void 0:A.executorEnabled)!==!1,schedule:le.executor.schedule,nextRun:le.executor.nextRun,delayInfo:le.executor},{id:"reviewer",name:"Reviewer",description:"Reviews PRs and manages merge readiness",icon:s.jsx(Ic,{className:"h-4 w-4"}),enabled:(A==null?void 0:A.reviewerEnabled)??!1,schedule:le.reviewer.schedule,nextRun:le.reviewer.nextRun,delayInfo:le.reviewer},{id:"qa",name:"QA",description:"Generates and runs quality checks on PRs",icon:s.jsx(Z1,{className:"h-4 w-4"}),enabled:((da=A==null?void 0:A.qa)==null?void 0:da.enabled)??!1,schedule:(fa=le.qa)==null?void 0:fa.schedule,nextRun:(gn=le.qa)==null?void 0:gn.nextRun,delayInfo:le.qa},{id:"audit",name:"Auditor",description:"Runs automated audit reports",icon:s.jsx(mg,{className:"h-4 w-4"}),enabled:((yn=A==null?void 0:A.audit)==null?void 0:yn.enabled)??!1,schedule:(xn=le.audit)==null?void 0:xn.schedule,nextRun:(Ha=le.audit)==null?void 0:Ha.nextRun,delayInfo:le.audit},{id:"planner",name:"Planner",description:"Creates PRDs from audit findings and pending roadmap items",icon:s.jsx(mg,{className:"h-4 w-4"}),enabled:((pn=A==null?void 0:A.roadmapScanner)==null?void 0:pn.enabled)??!1,schedule:((de=le.planner)==null?void 0:de.schedule)||((pe=A.roadmapScanner)==null?void 0:pe.slicerSchedule)||"35 */12 * * *",nextRun:(Ye=le.planner)==null?void 0:Ye.nextRun,delayInfo:le.planner},{id:"analytics",name:"Analytics",description:"Fetches Amplitude data, analyzes with AI, and creates board issues",icon:s.jsx(Pb,{className:"h-4 w-4"}),enabled:((ze=A==null?void 0:A.analytics)==null?void 0:ze.enabled)??!1,schedule:((gt=le.analytics)==null?void 0:gt.schedule)||((La=A.analytics)==null?void 0:La.schedule)||"0 6 * * 1",nextRun:(vn=le.analytics)==null?void 0:vn.nextRun,delayInfo:le.analytics}],Pt=[{id:"overview",label:"Overview",content:s.jsxs("div",{className:"space-y-6",children:[s.jsx(Ke,{className:`p-6 border-2 ${De}`,children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center space-x-4",children:[s.jsx(Fc,{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:Me}),s.jsx("div",{className:"text-sm text-slate-500 mt-1",children:"Automatic balancing spreads registered projects before queueing overlaps."})]})]}),s.jsx(mt,{variant:xe?"primary":"outline",size:"lg",onClick:ge,loading:f,children:xe?s.jsxs(s.Fragment,{children:[s.jsx(kr,{className:"h-5 w-5 mr-2"}),"Resume"]}):s.jsxs(s.Fragment,{children:[s.jsx(Cy,{className:"h-5 w-5 mr-2"}),"Pause"]})})]})}),s.jsxs(Ke,{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:et.map(ce=>{var Se,Fe,_e,ha,nt,pt,vt,zt;return s.jsxs("div",{className:`p-4 rounded-lg border ${ce.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:[ce.icon,s.jsx("h4",{className:"text-base font-semibold text-slate-200",children:ce.name})]}),s.jsx(Ta,{checked:ce.enabled,disabled:x!==null,"aria-label":`Toggle ${ce.name.toLowerCase()} automation`,onChange:Ls=>he(ce.id,Ls)})]}),ce.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:Nt(ce.id==="planner"?"slicer":ce.id,ce.id==="qa"?((Se=A==null?void 0:A.qa)==null?void 0:Se.schedule)||"":ce.id==="audit"?((Fe=A==null?void 0:A.audit)==null?void 0:Fe.schedule)||"":ce.id==="planner"?((_e=A==null?void 0:A.roadmapScanner)==null?void 0:_e.slicerSchedule)||"35 */12 * * *":ce.id==="analytics"?((ha=A==null?void 0:A.analytics)==null?void 0:ha.schedule)||"0 6 * * 1":ce.schedule,ce.id==="qa"?((nt=A==null?void 0:A.qa)==null?void 0:nt.schedule)||"":ce.id==="audit"?((pt=A==null?void 0:A.audit)==null?void 0:pt.schedule)||"":ce.id==="planner"?((vt=A==null?void 0:A.roadmapScanner)==null?void 0:vt.slicerSchedule)||"35 */12 * * *":ce.id==="analytics"?((zt=A==null?void 0:A.analytics)==null?void 0:zt.schedule)||"0 6 * * 1":ce.schedule)})]}),me(ce.delayInfo),s.jsxs("div",{children:[s.jsx("div",{className:"text-sm text-slate-400",children:"Next Run"}),I(ce.nextRun)]}),s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:`flex items-center space-x-2 text-sm ${ce.enabled?"text-green-400":"text-amber-400"}`,children:[s.jsx(jf,{className:"h-4 w-4"}),s.jsx("span",{children:ce.enabled?"Active":"Disabled"})]}),s.jsxs("button",{disabled:j!==null,onClick:()=>Y(ce.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===ce.id?s.jsx("div",{className:"h-3 w-3 border-2 border-current border-t-transparent rounded-full animate-spin"}):s.jsx(kr,{className:"h-3 w-3 fill-current"}),"Run now"]})]})]}):s.jsxs("div",{className:"text-slate-500 text-sm",children:[ce.name," is disabled."]})]},ce.id)})})]})]})},{id:"schedules",label:"Schedules",content:s.jsxs("div",{className:"space-y-6",children:[s.jsx(vx,{configs:D,currentProjectId:u??void 0,onEditJob:(ce,Se)=>{},queueStatus:T,queueAnalytics:X}),s.jsx(bx,{form:F.form,scheduleMode:F.scheduleMode,selectedTemplateId:F.selectedTemplateId,onFieldChange:re,onSwitchToTemplate:ye,onSwitchToCustom:Te,onApplyTemplate:Ue}),s.jsxs("div",{className:"flex justify-end pt-4",children:[s.jsx(mt,{variant:"ghost",onClick:()=>{var ce,Se,Fe,_e,ha,nt;if(A){const pt=au(A.scheduleBundleId,A.cronSchedule,A.reviewerSchedule,((ce=A.qa)==null?void 0:ce.schedule)||"45 2,14 * * *",((Se=A.audit)==null?void 0:Se.schedule)||"50 3 * * 1",((Fe=A.roadmapScanner)==null?void 0:Fe.slicerSchedule)||"35 */12 * * *");ae({form:{cronSchedule:A.cronSchedule||"5 */3 * * *",reviewerSchedule:A.reviewerSchedule||"25 */6 * * *",qa:A.qa||{schedule:"45 2,14 * * *",enabled:!0},audit:A.audit||{schedule:"50 3 * * 1",enabled:!0},analytics:A.analytics||{schedule:"0 6 * * 1",enabled:!1},roadmapScanner:{enabled:((_e=A.roadmapScanner)==null?void 0:_e.enabled)??!0,slicerSchedule:((ha=A.roadmapScanner)==null?void 0:ha.slicerSchedule)||"35 */12 * * *"},scheduleBundleId:A.scheduleBundleId??null,schedulingPriority:A.schedulingPriority??3,cronScheduleOffset:A.cronScheduleOffset??0,globalQueueEnabled:((nt=A.queue)==null?void 0:nt.enabled)??!0},scheduleMode:pt?"template":"custom",selectedTemplateId:(pt==null?void 0:pt.id)??"",isDirty:!1})}},disabled:!F.isDirty,children:"Reset"}),s.jsxs(mt,{onClick:z,loading:w,disabled:!F.isDirty,children:[s.jsx(jf,{className:"h-4 w-4 mr-2"}),"Save & Install"]})]})]})},{id:"crontab",label:"Crontab",content:s.jsxs(Ke,{className:"p-6",children:[s.jsxs("div",{className:"flex items-center space-x-2 mb-4",children:[s.jsx(Bf,{className:"h-5 w-5 text-slate-400"}),s.jsx("h3",{className:"text-lg font-semibold text-slate-200",children:"Active Crontab Entries"})]}),le.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:le.entries.map((ce,Se)=>s.jsx("div",{className:"bg-slate-950/50 rounded-lg p-3 font-mono text-sm text-slate-300 border border-slate-800",children:ce},Se))})]})}];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"}),He&&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:He.label}),s.jsxs("div",{className:"text-xs text-slate-500",children:["Priority ",le.schedulingPriority,"/5 across registered projects"]})]})]}),s.jsx(Gy,{tabs:Pt,activeTab:o,onChange:g})]})};function Pg(l){return l.type==="telegram"?`telegram:${l.botToken}:${l.chatId}`:`${l.type}:${l.url}`}const Mw=[{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"}],Cw=(l,u)=>l.includes(u)?l.filter(d=>d!==u):[...l,u],Wg=({webhook:l,onChange:u,onSave:d,onCancel:o,isNew:g})=>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(oa,{label:"Type",value:l.type,onChange:f=>{const y=f;u(y==="telegram"?{type:y,botToken:"",chatId:"",events:l.events}:{type:y,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(Ge,{label:"Bot Token",type:"password",value:l.botToken||"",onChange:f=>u({...l,botToken:f.target.value}),placeholder:"123456789:ABCdefGHIjklMNOpqrsTUVwxyz"})}),s.jsx(Ge,{label:"Chat ID",value:l.chatId||"",onChange:f=>u({...l,chatId:f.target.value}),placeholder:"123456789"})]}):s.jsx("div",{className:"md:col-span-2",children:s.jsx(Ge,{label:"Webhook URL",type:"password",value:l.url||"",onChange:f=>u({...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:Mw.map(f=>s.jsx("button",{type:"button",onClick:()=>u({...l,events:Cw(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(mt,{variant:"ghost",onClick:o,children:"Cancel"}),s.jsx(mt,{onClick:d,disabled:l.events.length===0||(l.type==="telegram"?!l.botToken||!l.chatId:!l.url),children:g?"Add Webhook":"Save Changes"})]})]}),Ig=({notifications:l,onChange:u,globalWebhook:d,onSetGlobal:o,onUnsetGlobal:g})=>{const[f,y]=qe.useState(null),[w,b]=qe.useState(!1),[x,S]=qe.useState({type:"slack",url:"",events:[]}),j=()=>{u({webhooks:[...l.webhooks,x]}),S({type:"slack",url:"",events:[]}),b(!1)},M=(_,T)=>{const B=[...l.webhooks];B[_]=T,u({webhooks:B})},D=_=>{u({webhooks:l.webhooks.filter((T,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((_,T)=>s.jsx("div",{children:f===T?s.jsx(Wg,{webhook:_,onChange:B=>M(T,B),onSave:()=>y(null),onCancel:()=>y(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:[o!==void 0&&(()=>{const B=d!=null&&Pg(_)===Pg(d);return s.jsx("button",{type:"button",onClick:()=>B?g==null?void 0:g():o(_),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(S1,{className:"h-4 w-4"})})})(),s.jsx("button",{type:"button",onClick:()=>y(T),className:"p-2 text-slate-400 hover:text-slate-200","aria-label":`Edit ${_.type} webhook`,title:`Edit ${_.type} webhook`,children:s.jsx(Yf,{className:"h-4 w-4"})}),s.jsx("button",{type:"button",onClick:()=>D(T),className:"p-2 text-red-400 hover:text-red-300","aria-label":`Delete ${_.type} webhook`,title:`Delete ${_.type} webhook`,children:s.jsx($f,{className:"h-4 w-4"})})]})]})},T))}),w?s.jsx(Wg,{webhook:x,onChange:S,onSave:j,onCancel:()=>b(!1),isNew:!0}):s.jsxs(mt,{variant:"ghost",onClick:()=>b(!0),children:[s.jsx(Lr,{className:"h-4 w-4 mr-2"}),"Add Webhook"]})]})},Xf=({label:l,value:u,onChange:d,placeholder:o,helpText:g})=>{const[f,y]=qe.useState(""),w=()=>{f.trim()&&!u.includes(f.trim())&&(d([...u,f.trim()]),y(""))},b=S=>{d(u.filter(j=>j!==S))},x=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:u.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(qr,{className:"h-3 w-3"})})]},S))}),s.jsxs("div",{className:"flex gap-2",children:[s.jsx("input",{type:"text",value:f,onChange:S=>y(S.target.value),onKeyDown:x,placeholder:o,className:"flex-1 bg-slate-800 border border-slate-700 rounded px-3 py-2 text-sm text-slate-200 placeholder-slate-500"}),s.jsx(mt,{onClick:w,disabled:!f.trim(),"aria-label":`Add ${l.toLowerCase()} value`,children:s.jsx(Lr,{className:"h-4 w-4"})})]}),g&&s.jsx("p",{className:"text-xs text-slate-500 mt-1",children:g})]})},Ow=({isOpen:l,onClose:u,title:d,children:o})=>(V.useEffect(()=>{const g=f=>{f.key==="Escape"&&u()};return l&&(document.addEventListener("keydown",g),document.body.style.overflow="hidden"),()=>{document.removeEventListener("keydown",g),document.body.style.overflow="unset"}},[l,u]),l?Ob.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:u,"aria-hidden":"true"}),s.jsxs("div",{className:"relative w-full max-w-2xl transform rounded-xl bg-slate-900 border border-slate-800 shadow-2xl transition-all flex flex-col max-h-[90vh]",children:[s.jsxs("div",{className:"flex items-center justify-between border-b border-slate-800 px-6 py-4",children:[s.jsx("h3",{className:"text-lg font-semibold text-slate-100",children:d}),s.jsx("button",{onClick:u,className:"rounded-full p-1 text-slate-400 hover:bg-slate-800 hover:text-slate-300 focus:outline-none focus:ring-2 focus:ring-indigo-500",children:s.jsx(qr,{className:"h-5 w-5"})})]}),s.jsx("div",{className:"flex-1 overflow-y-auto px-6 py-6 text-slate-300",children:o})]})]}),document.body):null),Dw=l=>["TOKEN","SECRET","KEY","PASSWORD","AUTH","API_KEY"].some(d=>l.toUpperCase().includes(d)),Rw=({value:l,isSensitive:u})=>{const[d,o]=qe.useState(!1);return u?s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{className:"text-sm text-slate-300 font-mono",children:d?l:"***********"}),s.jsx("button",{type:"button",onClick:()=>o(!d),className:"text-slate-500 hover:text-slate-300","aria-label":d?"Hide sensitive value":"Show sensitive value",title:d?"Hide sensitive value":"Show sensitive value",children:d?s.jsx(m1,{className:"h-4 w-4"}):s.jsx(y1,{className:"h-4 w-4"})})]}):s.jsx("span",{className:"text-sm text-slate-300 font-mono truncate max-w-xs",children:l})},Sx=({envVars:l,onChange:u,compact:d=!1})=>{const[o,g]=qe.useState(""),[f,y]=qe.useState(""),[w,b]=qe.useState(null),[x,S]=qe.useState(""),j=()=>{if(o.trim()){if(!/^[A-Z_][A-Z0-9_]*$/.test(o)){alert("Key must be uppercase with underscores (e.g., API_KEY)");return}u({...l,[o]:f}),g(""),y("")}},M=X=>{const Q={...l};delete Q[X],u(Q)},D=X=>{b(X),S(l[X]??"")},_=()=>{w&&(u({...l,[w]:x}),b(null),S(""))},T=()=>{b(null),S("")},B=Object.entries(l);return s.jsxs("div",{className:"space-y-4",children:[!d&&s.jsx("div",{className:"text-sm text-slate-400 mb-4",children:"Configure environment variables passed to the provider CLI (API keys, base URLs)"}),s.jsx("div",{className:"space-y-2",children:B.length===0?s.jsx("p",{className:"text-slate-500 text-sm italic",children:"No environment variables configured."}):B.map(([X,Q])=>s.jsxs("div",{className:"flex items-center justify-between p-3 rounded-md border border-slate-800 bg-slate-950/40",children:[s.jsxs("div",{className:"flex items-center gap-4 flex-1 min-w-0",children:[s.jsx("span",{className:"text-sm font-mono text-indigo-400 w-48 truncate",children:X}),w===X?s.jsxs("div",{className:"flex items-center gap-2 flex-1",children:[s.jsx("input",{type:"text",value:x,onChange:F=>S(F.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:_,className:"p-1 text-green-400 hover:text-green-300","aria-label":`Save ${X} value`,title:`Save ${X} value`,children:s.jsx(jf,{className:"h-4 w-4"})}),s.jsx("button",{type:"button",onClick:T,className:"p-1 text-slate-400 hover:text-slate-300","aria-label":`Cancel editing ${X}`,title:`Cancel editing ${X}`,children:s.jsx(qr,{className:"h-4 w-4"})})]}):s.jsx(Rw,{value:Q,isSensitive:Dw(X)})]}),w!==X&&s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("button",{type:"button",onClick:()=>D(X),className:"p-1 text-slate-400 hover:text-slate-200","aria-label":`Edit ${X}`,title:`Edit ${X}`,children:s.jsx(Yf,{className:"h-4 w-4"})}),s.jsx("button",{type:"button",onClick:()=>M(X),className:"p-1 text-red-400 hover:text-red-300","aria-label":`Delete ${X}`,title:`Delete ${X}`,children:s.jsx($f,{className:"h-4 w-4"})})]})]},X))}),s.jsxs("div",{className:`flex items-end gap-3 ${d?"":"pt-4 border-t border-slate-800"}`,children:[s.jsxs("div",{className:"flex-1",children:[!d&&s.jsx("label",{className:"block text-xs font-medium text-slate-500 mb-1",children:"Key"}),s.jsx("input",{type:"text",value:o,onChange:X=>g(X.target.value.toUpperCase()),placeholder:d?"ENV_VAR_NAME":"e.g., ANTHROPIC_BASE_URL",className:"w-full bg-slate-800 border border-slate-700 rounded px-3 py-2 text-sm text-slate-200 placeholder-slate-500"})]}),s.jsxs("div",{className:"flex-1",children:[!d&&s.jsx("label",{className:"block text-xs font-medium text-slate-500 mb-1",children:"Value"}),s.jsx("input",{type:"text",value:f,onChange:X=>y(X.target.value),placeholder:d?"value":"e.g., https://api.example.com",className:"w-full bg-slate-800 border border-slate-700 rounded px-3 py-2 text-sm text-slate-200 placeholder-slate-500"})]}),s.jsxs(mt,{onClick:j,disabled:!o.trim(),size:d?"sm":"md",children:[s.jsx(Lr,{className:"h-4 w-4 mr-1"}),"Add"]})]})]})};function Aw(l,u){var d;return!!(l!=null&&l.startsWith("glm-")||(d=u==null?void 0:u.model)!=null&&d.startsWith("glm-"))}function _w(l,u){var d,o;return Aw(l,u)?!((o=(d=u==null?void 0:u.envVars)==null?void 0:d.ANTHROPIC_API_KEY)!=null&&o.trim()):!1}const Xg={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:""}},kw=({isOpen:l,onClose:u,onSave:d,presetId:o,preset:g,isBuiltIn:f,existingIds:y})=>{const[w,b]=qe.useState(""),[x,S]=qe.useState({name:"",command:"",subcommand:"",promptFlag:"",autoApproveFlag:"",workdirFlag:"",modelFlag:"",model:"",envVars:{}}),[j,M]=qe.useState(!1),[D,_]=qe.useState("custom"),[T,B]=qe.useState(null),X=_w(o??w,x);qe.useEffect(()=>{l&&(o&&g?(b(o),S({name:g.name,command:g.command,subcommand:g.subcommand??"",promptFlag:g.promptFlag??"",autoApproveFlag:g.autoApproveFlag??"",workdirFlag:g.workdirFlag??"",modelFlag:g.modelFlag??"",model:g.model??"",envVars:g.envVars??{}}),o==="claude"||g.command==="claude"?_("claude"):o==="codex"||g.command==="codex"?_("codex"):_("custom")):(b(""),S({name:"",command:"",subcommand:"",promptFlag:"",autoApproveFlag:"",workdirFlag:"",modelFlag:"",model:"",envVars:{}}),_("custom")),B(null),M(!!(g!=null&&g.envVars&&Object.keys(g.envVars).length>0)))},[l,o,g]);const Q=K=>{if(_(K),K!=="custom"&&Xg[K]){const P=Xg[K];S(J=>({...J,...P,envVars:J.envVars})),!o&&!w&&b(K)}},F=(K,P)=>{S(J=>({...J,[K]:P})),B(null)},ae=()=>{if(!x.name.trim())return B("Name is required"),!1;if(!x.command.trim())return B("Command is required"),!1;if(!o){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(y.includes(w))return B("A preset with this ID already exists"),!1}return!0},le=()=>{var P,J,A,k,ne,R;if(!ae())return;const K={name:x.name.trim(),command:x.command.trim()};(P=x.subcommand)!=null&&P.trim()&&(K.subcommand=x.subcommand.trim()),(J=x.promptFlag)!=null&&J.trim()&&(K.promptFlag=x.promptFlag.trim()),(A=x.autoApproveFlag)!=null&&A.trim()&&(K.autoApproveFlag=x.autoApproveFlag.trim()),(k=x.workdirFlag)!=null&&k.trim()&&(K.workdirFlag=x.workdirFlag.trim()),(ne=x.modelFlag)!=null&&ne.trim()&&(K.modelFlag=x.modelFlag.trim()),(R=x.model)!=null&&R.trim()&&(K.model=x.model.trim()),x.envVars&&Object.keys(x.envVars).length>0&&(K.envVars=x.envVars),d(o||w,K),u()};return s.jsx(Ow,{isOpen:l,onClose:u,title:o?`Edit Preset: ${g==null?void 0:g.name}`:"Add Provider Preset",children:s.jsxs("div",{className:"space-y-6",children:[T&&s.jsx("div",{className:"p-3 rounded-md bg-red-500/10 border border-red-500/20 text-red-400 text-sm",children:T}),X&&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(Xc,{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(oa,{label:"Template",value:D,onChange:Q,options:[{label:"Start from scratch",value:"custom"},{label:"Claude (Anthropic)",value:"claude"},{label:"Codex (OpenAI)",value:"codex"}],helperText:"Start with a pre-configured template or customize from scratch"})}),!o&&s.jsx(Ge,{label:"Preset ID",value:w,onChange:K=>b(K.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(Ge,{label:"Display Name",value:x.name,onChange:K=>F("name",K.target.value),placeholder:"e.g., My Custom Provider",required:!0}),s.jsx(Ge,{label:"Command",value:x.command,onChange:K=>F("command",K.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(Ge,{label:"Model",value:x.model??"",onChange:K=>F("model",K.target.value),placeholder:"e.g., claude-opus-4-6",helperText:"Default model to use"}),s.jsx(Ge,{label:"Model Flag",value:x.modelFlag??"",onChange:K=>F("modelFlag",K.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:()=>M(!j),className:"flex items-center gap-2 text-sm text-slate-400 hover:text-slate-200 transition-colors",children:[j?s.jsx(a1,{className:"h-4 w-4"}):s.jsx(jy,{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(Ge,{label:"Subcommand",value:x.subcommand??"",onChange:K=>F("subcommand",K.target.value),placeholder:"e.g., exec",helperText:"Subcommand after base command"}),s.jsx(Ge,{label:"Prompt Flag",value:x.promptFlag??"",onChange:K=>F("promptFlag",K.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(Ge,{label:"Auto-Approve Flag",value:x.autoApproveFlag??"",onChange:K=>F("autoApproveFlag",K.target.value),placeholder:"e.g., --dangerously-skip-permissions",helperText:"Flag to enable auto-approve mode"}),s.jsx(Ge,{label:"Workdir Flag",value:x.workdirFlag??"",onChange:K=>F("workdirFlag",K.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(Sx,{envVars:x.envVars??{},onChange:K=>F("envVars",K),compact:!0})]})]})]}),s.jsxs("div",{className:"flex justify-end gap-3 pt-4 border-t border-slate-800",children:[s.jsx(mt,{variant:"ghost",onClick:u,children:"Cancel"}),s.jsx(mt,{onClick:le,children:o?"Save Changes":"Add Preset"})]})]})})},zw=({form:l,updateField:u,projectName:d,doctorChecks:o,doctorLoading:g})=>s.jsxs("div",{className:"space-y-6",children:[s.jsx(Ke,{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(Ge,{label:"Project Name",value:d,disabled:!0}),s.jsx(Ge,{label:"Default Branch",value:l.defaultBranch,onChange:f=>u("defaultBranch",f.target.value)}),s.jsx(Ge,{label:"PRD Directory",value:l.prdDir,onChange:f=>u("prdDir",f.target.value),helperText:"Directory containing PRD files (relative to project root)"}),s.jsx(Ge,{label:"Branch Prefix",value:l.branchPrefix,onChange:f=>u("branchPrefix",f.target.value)}),s.jsx("div",{className:"md:col-span-2",children:s.jsx(Ta,{label:"Enable PRD Executor",checked:l.executorEnabled,onChange:f=>u("executorEnabled",f)})}),s.jsx("div",{className:"md:col-span-2",children:s.jsx(Ta,{label:"Enable Automated Reviews",checked:l.reviewerEnabled,onChange:f=>u("reviewerEnabled",f)})}),s.jsx("div",{className:"md:col-span-2",children:s.jsx(Ta,{label:"Auto-merge approved PRs",checked:l.autoMerge,onChange:f=>u("autoMerge",f)})}),l.autoMerge&&s.jsx(oa,{label:"Merge Method",value:l.autoMergeMethod,onChange:f=>u("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(Xf,{label:"Branch Patterns",value:l.branchPatterns,onChange:f=>u("branchPatterns",f),placeholder:"e.g., feat/",helpText:"Branch patterns matched by reviewer and related automation jobs"})})]})}),s.jsxs(Ke,{className:"divide-y divide-slate-800",children:[s.jsxs("div",{className:"p-4 flex items-center gap-2",children:[s.jsx(Ny,{className:"h-4 w-4 text-indigo-500"}),s.jsx("h3",{className:"text-base font-medium text-slate-200",children:"System Health"})]}),g?s.jsx("div",{className:"p-4 text-sm text-slate-500",children:"Loading health checks..."}):o.map((f,y)=>{const w=f.status==="pass",b=f.status==="warn",x=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 ${x}`,children:f.status.toUpperCase()})]},`${f.name}-${y}`)})]})]}),Jg=({presetId:l,preset:u,isBuiltIn:d,onEdit:o,onDelete:g,onReset:f})=>{var x,S,j;const y=u.envVars?Object.keys(u.envVars).length:0,b=(l.startsWith("glm-")||((x=u.model)==null?void 0:x.startsWith("glm-")))&&!((j=(S=u.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:u.name}),d&&s.jsx(_r,{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(Xc,{className:"h-3 w-3"}),"Missing ANTHROPIC_API_KEY"]})]}),s.jsxs("div",{className:"flex items-center gap-1",children:[s.jsx("button",{type:"button",onClick:o,className:"p-1.5 text-slate-400 hover:text-slate-200 hover:bg-slate-800 rounded transition-colors","aria-label":`Edit ${u.name} preset`,title:"Edit preset",children:s.jsx(Yf,{className:"h-4 w-4"})}),d?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 ${u.name} to defaults`,title:"Reset to defaults",children:s.jsx(Oy,{className:"h-4 w-4"})}):g&&s.jsx("button",{type:"button",onClick:g,className:"p-1.5 text-slate-400 hover:text-red-400 hover:bg-slate-800 rounded transition-colors","aria-label":`Delete ${u.name} preset`,title:"Delete preset",children:s.jsx($f,{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:[u.command,u.subcommand&&` ${u.subcommand}`]})]}),u.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(_r,{variant:"neutral",className:"text-[10px] font-mono",children:u.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]}),y>0&&s.jsxs("span",{className:"text-xs text-slate-500",children:[y," env var",y!==1?"s":""]})]})]})},Kg=["claude","claude-sonnet-4-6","claude-opus-4-6","codex","glm-47","glm-5"],Uw=({form:l,updateField:u,jobProvidersChangedRef:d,getAllPresets:o,getPresetOptions:g,handleEditPreset:f,handleDeletePreset:y,handleResetPreset:w,handleAddPreset:b})=>s.jsxs("div",{className:"space-y-6",children:[s.jsxs(Ke,{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(mt,{onClick:b,children:[s.jsx(Lr,{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:[Kg.map(x=>{const j=o()[x];return j?s.jsx(Jg,{presetId:x,preset:j,isBuiltIn:!0,onEdit:()=>f(x),onReset:()=>w(x)},x):null}),Object.entries(l.providerPresets).filter(([x])=>!Kg.includes(x)).map(([x,S])=>s.jsx(Jg,{presetId:x,preset:S,isBuiltIn:!1,onEdit:()=>f(x),onDelete:()=>y(x)},x))]})]}),s.jsxs(Ke,{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(oa,{value:l.provider,onChange:x=>u("provider",x),options:g(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:x,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(oa,{value:l.jobProviders[x]??"",onChange:j=>{const M={...l.jobProviders};j===""?delete M[x]:M[x]=j,d.current=!0,u("jobProviders",M)},options:[{label:"Use Global (default)",value:""},...g(l.providerPresets)]})})]},x))]})]}),s.jsxs(Ke,{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(oa,{label:"Primary Fallback Preset",value:l.primaryFallbackPreset,onChange:x=>u("primaryFallbackPreset",x),options:[{label:"— None —",value:""},...Object.entries(o()).map(([x,S])=>({label:S.name,value:x}))],helperText:"Preset to use as the primary rate-limit fallback"}),s.jsx(oa,{label:"Secondary Fallback Preset",value:l.secondaryFallbackPreset,onChange:x=>u("secondaryFallbackPreset",x),options:[{label:"— None —",value:""},...Object.entries(o()).map(([x,S])=>({label:S.name,value:x}))],helperText:"Used only if the primary fallback preset is also rate-limited"})]})]}),s.jsxs(Ke,{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(Sx,{envVars:l.providerEnv,onChange:x=>u("providerEnv",x)})]}),s.jsxs(Ke,{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:x=>u("minReviewScore",Number(x.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(Ge,{label:"Max Runtime (Executor)",type:"number",value:String(l.maxRuntime),onChange:x=>u("maxRuntime",Number(x.target.value||0)),rightIcon:s.jsx("span",{className:"text-xs",children:"sec"})}),s.jsx(Ge,{label:"Max Runtime (Reviewer)",type:"number",value:String(l.reviewerMaxRuntime),onChange:x=>u("reviewerMaxRuntime",Number(x.target.value||0)),rightIcon:s.jsx("span",{className:"text-xs",children:"sec"})}),s.jsx(Ge,{label:"Max Log Size",type:"number",value:String(l.maxLogSize),onChange:x=>u("maxLogSize",Number(x.target.value||0)),rightIcon:s.jsx("span",{className:"text-xs",children:"bytes"})})]})]}),s.jsxs(Ke,{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(Ge,{label:"Max Retry Attempts",type:"number",min:"0",max:"10",value:String(l.reviewerMaxRetries),onChange:x=>{const S=Math.min(10,Math.max(0,Number(x.target.value||0)));u("reviewerMaxRetries",S)},helperText:"Additional fix attempts after initial review. 0 = no retries."}),s.jsx(Ge,{label:"Retry Delay (seconds)",type:"number",min:"0",max:"300",value:String(l.reviewerRetryDelay),onChange:x=>{const S=Math.min(300,Math.max(0,Number(x.target.value||0)));u("reviewerRetryDelay",S)},helperText:"Wait time between retry attempts to let CI settle."}),s.jsx(Ge,{label:"Max PRs Per Run",type:"number",min:"0",max:"100",value:String(l.reviewerMaxPrsPerRun),onChange:x=>{const S=Math.min(100,Math.max(0,Number(x.target.value||0)));u("reviewerMaxPrsPerRun",S)},helperText:"Hard cap on how many PRs the reviewer processes per run. 0 = unlimited."})]})]})]}),Hw=({form:l,updateField:u,handleRoadmapToggle:d})=>{var o,g;return s.jsxs("div",{className:"space-y-6",children:[s.jsx("div",{id:"job-section-qa",children:s.jsxs(Ke,{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(Ta,{checked:l.qa.enabled,onChange:f=>u("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(Dn,{label:"QA Schedule",value:l.qa.schedule,onChange:f=>u("qa",{...l.qa,schedule:f})}),s.jsx(Ge,{label:"Max Runtime",type:"number",value:String(l.qa.maxRuntime),onChange:f=>u("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(oa,{label:"Artifacts",value:l.qa.artifacts,onChange:f=>u("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(Ge,{label:"Skip Label",value:l.qa.skipLabel,onChange:f=>u("qa",{...l.qa,skipLabel:f.target.value}),helperText:"GitHub label to skip QA (PRs with this label are excluded)"})]}),s.jsx(Xf,{label:"QA Branch Patterns",value:l.qa.branchPatterns,onChange:f=>u("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(Ta,{checked:l.qa.autoInstallPlaywright,onChange:f=>u("qa",{...l.qa,autoInstallPlaywright:f})})]})]})]})}),s.jsx("div",{id:"job-section-audit",children:s.jsxs(Ke,{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(Ta,{checked:l.audit.enabled,onChange:f=>u("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(Dn,{label:"Audit Schedule",value:l.audit.schedule,onChange:f=>u("audit",{...l.audit,schedule:f})}),s.jsx(Ge,{label:"Max Runtime",type:"number",value:String(l.audit.maxRuntime),onChange:f=>u("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(Ke,{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(Ta,{checked:l.analytics.enabled,onChange:f=>u("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(Ge,{label:"Amplitude API Key",value:((o=l.providerEnv)==null?void 0:o.AMPLITUDE_API_KEY)??"",onChange:f=>u("providerEnv",{...l.providerEnv,AMPLITUDE_API_KEY:f.target.value}),placeholder:"Required",helperText:"Your Amplitude project API key"}),s.jsx(Ge,{label:"Amplitude Secret Key",type:"password",value:((g=l.providerEnv)==null?void 0:g.AMPLITUDE_SECRET_KEY)??"",onChange:f=>u("providerEnv",{...l.providerEnv,AMPLITUDE_SECRET_KEY:f.target.value}),placeholder:"Required",helperText:"Your Amplitude secret key"}),s.jsx(Dn,{label:"Analytics Schedule",value:l.analytics.schedule,onChange:f=>u("analytics",{...l.analytics,schedule:f})}),s.jsx(Ge,{label:"Max Runtime",type:"number",value:String(l.analytics.maxRuntime),onChange:f=>u("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(Ge,{label:"Lookback Days",type:"number",min:"1",max:"90",value:String(l.analytics.lookbackDays),onChange:f=>u("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(oa,{label:"Target Column",value:l.analytics.targetColumn,onChange:f=>u("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=>u("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(Ke,{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(Ta,{checked:l.roadmapScanner.enabled,"aria-label":"Enable planner",onChange:d})]}),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(Ge,{label:"Roadmap File Path",value:l.roadmapScanner.roadmapPath,onChange:f=>u("roadmapScanner",{...l.roadmapScanner,roadmapPath:f.target.value}),helperText:"Primary planning source (relative to project root)."}),s.jsx(Dn,{label:"Planner Schedule",value:l.roadmapScanner.slicerSchedule||"35 */12 * * *",onChange:f=>u("roadmapScanner",{...l.roadmapScanner,slicerSchedule:f})}),s.jsx(Ge,{label:"Planner Max Runtime",type:"number",value:String(l.roadmapScanner.slicerMaxRuntime||""),onChange:f=>u("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(oa,{label:"Planner Priority Mode",value:l.roadmapScanner.priorityMode||"roadmap-first",onChange:f=>u("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(oa,{label:"Planner Issue Column",value:l.roadmapScanner.issueColumn||"Draft",onChange:f=>u("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."})]})]})})]})},ey=["claude","claude-sonnet-4-6","claude-opus-4-6","codex","glm-47","glm-5"],Lw=["executor","reviewer","qa","audit","slicer","analytics"],Sf=l=>{var u,d,o,g,f,y,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:((u=l.roadmapScanner)==null?void 0:u.enabled)??!0,roadmapPath:((d=l.roadmapScanner)==null?void 0:d.roadmapPath)??"ROADMAP.md",autoScanInterval:((o=l.roadmapScanner)==null?void 0:o.autoScanInterval)??300,slicerSchedule:((g=l.roadmapScanner)==null?void 0:g.slicerSchedule)??"35 */12 * * *",slicerMaxRuntime:((f=l.roadmapScanner)==null?void 0:f.slicerMaxRuntime)??600,priorityMode:((y=l.roadmapScanner)==null?void 0:y.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}}}},ty=l=>{const u=au(l.scheduleBundleId,l.cronSchedule,l.reviewerSchedule,l.qa.schedule,l.audit.schedule,l.roadmapScanner.slicerSchedule??"35 */12 * * *");return u?{mode:"template",selectedTemplateId:u.id}:{mode:"custom",selectedTemplateId:""}},qw=()=>{const{addToast:l,projectName:u,selectedProjectId:d,globalModeLoading:o}=ia(),[g,f]=qe.useState(!1),[y,w]=qe.useState(null),[b,x]=qe.useState([]),[S,j]=qe.useState(void 0),M=qe.useRef(!1),D=qe.useRef(!1),[_,T]=qe.useState("template"),[B,X]=qe.useState("always-on"),[Q,F]=qe.useState("general"),[ae,le]=qe.useState(!1),[K,P]=qe.useState(null),[J,A]=qe.useState(null),[k,ne]=qe.useState(null),{data:R,loading:ie,error:ge,refetch:he}=hn(Zf,[d],{enabled:!o}),{data:Y,loading:re,refetch:ye}=hn(n2,[d],{enabled:!o}),Te=Y??[];qe.useEffect(()=>{_y().then(x).catch(console.error),f2().then(de=>j(de.webhook)).catch(()=>{})},[d]),qe.useEffect(()=>{const de=new URLSearchParams(location.search),pe=de.get("tab"),Ye=de.get("mode");pe&&F({providers:"ai-runtime",runtime:"ai-runtime",roadmap:"jobs",qa:"jobs",audit:"jobs",analytics:"jobs",board:"integrations",notifications:"integrations"}[pe]??pe),Ye==="custom"?T("custom"):Ye==="template"&&T("template");const ze=de.get("jobType");ze&&setTimeout(()=>{z("current",ze)},300)},[location.search,R]);const Ue=qe.useCallback(de=>{const pe=ty(de);T(pe.mode),X(pe.selectedTemplateId)},[]);qe.useEffect(()=>{if(R)if(M.current)M.current=!1;else{const de=Sf(R);w(de),Ue(de)}},[R,Ue]),qe.useEffect(()=>{y&&D.current&&(D.current=!1,Me())},[y==null?void 0:y.jobProviders]);const z=(de,pe)=>{if(de===u||de==="current"){if(["qa","audit","slicer","analytics"].includes(pe)){F("jobs"),setTimeout(()=>{const ze=document.getElementById(`job-section-${pe}`);ze&&(ze.scrollIntoView({behavior:"smooth",block:"center"}),ze.classList.add("ring-2","ring-indigo-500","ring-offset-2","ring-offset-slate-900","rounded-lg"),setTimeout(()=>ze.classList.remove("ring-2","ring-indigo-500","ring-offset-2","ring-offset-slate-900"),2e3))},50);return}_!=="custom"&&xe(),F("schedules"),setTimeout(()=>{const ze={executor:"job-schedule-executor",reviewer:"job-schedule-reviewer"},gt=document.getElementById(ze[pe]||"");gt&&(gt.scrollIntoView({behavior:"smooth",block:"center"}),gt.classList.add("ring-2","ring-indigo-500","ring-offset-2","ring-offset-slate-900","rounded-lg"),setTimeout(()=>gt.classList.remove("ring-2","ring-indigo-500","ring-offset-2","ring-offset-slate-900"),2e3))},50)}else l({title:"Project Switch Required",message:`To edit ${de}, please switch to that project in the sidebar.`,type:"info"})},I=(de,pe)=>{w(Ye=>Ye&&{...Ye,[de]:pe})},me=()=>{if(T("template"),!y)return;const de=ty(y);de.mode==="template"&&(X(de.selectedTemplateId),I("scheduleBundleId",de.selectedTemplateId))},xe=()=>{T("custom"),I("scheduleBundleId",null),X("")},De=de=>{X(de.id),w(pe=>pe&&{...pe,cronSchedule:de.schedules.executor,reviewerSchedule:de.schedules.reviewer,scheduleBundleId:de.id,qa:{...pe.qa,schedule:de.schedules.qa},audit:{...pe.audit,schedule:de.schedules.audit},roadmapScanner:{...pe.roadmapScanner,slicerSchedule:de.schedules.slicer},fallbackOnRateLimit:!0})},Me=async()=>{var Ye,ze,gt,La,vn;if(!y)return;const de=y.cronSchedule!==(R==null?void 0:R.cronSchedule)||y.reviewerSchedule!==(R==null?void 0:R.reviewerSchedule)||y.cronScheduleOffset!==((R==null?void 0:R.cronScheduleOffset)??0)||y.schedulingPriority!==((R==null?void 0:R.schedulingPriority)??3)||y.executorEnabled!==((R==null?void 0:R.executorEnabled)??!0)||y.reviewerEnabled!==((R==null?void 0:R.reviewerEnabled)??!0)||y.queue.enabled!==(((Ye=R==null?void 0:R.queue)==null?void 0:Ye.enabled)??!0)||y.qa.enabled!==((R==null?void 0:R.qa.enabled)??!0)||y.qa.schedule!==(R==null?void 0:R.qa.schedule)||y.audit.enabled!==((R==null?void 0:R.audit.enabled)??!0)||y.audit.schedule!==(R==null?void 0:R.audit.schedule)||y.analytics.enabled!==(((ze=R==null?void 0:R.analytics)==null?void 0:ze.enabled)??!1)||y.analytics.schedule!==(((gt=R==null?void 0:R.analytics)==null?void 0:gt.schedule)??"0 6 * * 1")||y.roadmapScanner.enabled!==(((La=R==null?void 0:R.roadmapScanner)==null?void 0:La.enabled)??!0)||(y.roadmapScanner.slicerSchedule||"35 */12 * * *")!==(((vn=R==null?void 0:R.roadmapScanner)==null?void 0:vn.slicerSchedule)||"35 */12 * * *"),pe={};for(const ce of Lw){const Se=y.jobProviders[ce];typeof Se=="string"&&Se.trim().length>0?pe[ce]=Se:R!=null&&R.jobProviders[ce]&&(pe[ce]=null)}f(!0);try{const ce=await nl({provider:y.provider,providerLabel:y.providerLabel.trim(),providerPresets:Object.keys(y.providerPresets).length>0?y.providerPresets:void 0,defaultBranch:y.defaultBranch,prdDir:y.prdDir,branchPrefix:y.branchPrefix,branchPatterns:y.branchPatterns,executorEnabled:y.executorEnabled,reviewerEnabled:y.reviewerEnabled,minReviewScore:y.minReviewScore,maxRuntime:y.maxRuntime,reviewerMaxRuntime:y.reviewerMaxRuntime,maxLogSize:y.maxLogSize,cronSchedule:y.cronSchedule,reviewerSchedule:y.reviewerSchedule,scheduleBundleId:_==="template"?y.scheduleBundleId:null,cronScheduleOffset:y.cronScheduleOffset,schedulingPriority:y.schedulingPriority,maxRetries:y.maxRetries,reviewerMaxRetries:y.reviewerMaxRetries,reviewerRetryDelay:y.reviewerRetryDelay,reviewerMaxPrsPerRun:y.reviewerMaxPrsPerRun,providerEnv:y.providerEnv,notifications:y.notifications,prdPriority:y.prdPriority,roadmapScanner:y.roadmapScanner,templatesDir:y.templatesDir,boardProvider:y.boardProvider,jobProviders:pe,autoMerge:y.autoMerge,autoMergeMethod:y.autoMergeMethod,fallbackOnRateLimit:y.fallbackOnRateLimit,primaryFallbackModel:y.primaryFallbackModel,secondaryFallbackModel:y.secondaryFallbackModel,primaryFallbackPreset:y.primaryFallbackPreset||void 0,secondaryFallbackPreset:y.secondaryFallbackPreset||void 0,claudeModel:y.primaryFallbackModel,qa:y.qa,audit:y.audit,analytics:y.analytics,queue:y.queue}),Se=Sf(ce);w(Se),Ue(Se);let Fe="";if(de)try{await nu()}catch(_e){Fe=_e instanceof Error?_e.message:"failed to reinstall cron schedules"}l(Fe?{title:"Settings Saved (Cron Reinstall Failed)",message:Fe,type:"warning"}:{title:"Settings Saved",message:de?"Configuration updated and cron schedules reinstalled.":"Configuration updated successfully.",type:"success"}),M.current=!0,he(),ye()}catch(ce){l({title:"Save Failed",message:ce instanceof Error?ce.message:"Failed to save configuration",type:"error"})}finally{f(!1)}},He=()=>{if(R){const de=Sf(R);w(de),Ue(de),l({title:"Reset Complete",message:"Unsaved changes were discarded.",type:"info"})}},Nt=async de=>{if(!(S!=null&&!window.confirm("Replace existing global channel?")))try{const pe=await yg({webhook:de});j(pe.webhook)}catch(pe){l({title:"Failed to set global channel",message:pe instanceof Error?pe.message:"Unknown error",type:"error"})}},et=async()=>{try{await yg({webhook:null}),j(null)}catch(de){l({title:"Failed to unset global channel",message:de instanceof Error?de.message:"Unknown error",type:"error"})}},Pt=async de=>{try{const pe=await Yy(de);I("roadmapScanner",pe.roadmapScanner);let Ye="";try{await nu()}catch(ze){Ye=ze instanceof Error?ze.message:"Failed to reinstall cron schedules"}l(Ye?{title:"Planner Saved (Cron Reinstall Failed)",message:Ye,type:"warning"}:{title:de?"Roadmap Scanner Enabled":"Roadmap Scanner Disabled",message:`Roadmap scanner has been ${de?"enabled":"disabled"}.`,type:"success"})}catch(pe){l({title:"Toggle Failed",message:pe instanceof Error?pe.message:"Failed to toggle roadmap scanner",type:"error"})}},Ft=()=>({...{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"}}},...y==null?void 0:y.providerPresets}),mn=de=>{const pe=Ft();return Object.entries(pe).map(([Ye,ze])=>({label:ze.name,value:Ye}))},Ja=(de,pe)=>{const Ye=[];pe.provider===de&&Ye.push("Global Provider");const ze={executor:"Executor",reviewer:"Reviewer",qa:"QA",audit:"Audit",slicer:"Planner",analytics:"Analytics"};for(const[gt,La]of Object.entries(pe.jobProviders))La===de&&Ye.push(ze[gt]??gt);return Ye},da=()=>{P(null),A(null),le(!0)},fa=de=>{const Ye=Ft()[de];Ye&&(P(de),A(Ye),le(!0))},gn=async(de,pe)=>{if(!y)return;const Ye=!K,ze={...y.providerPresets,[de]:pe};I("providerPresets",ze);try{await nl({providerPresets:{[de]:pe}}),l({title:Ye?"Preset Added":"Preset Updated",message:Ye?`${pe.name} has been added. You can now assign it to jobs.`:`${pe.name} has been saved.`,type:"success"})}catch(gt){l({title:"Save Failed",message:gt instanceof Error?gt.message:"Failed to save preset",type:"error"}),I("providerPresets",y.providerPresets)}},yn=de=>{var ze,gt;if(!y)return;if(ey.includes(de)){l({title:"Cannot Delete",message:"Built-in presets cannot be deleted.",type:"error"});return}const pe=Ja(de,y);if(pe.length>0){ne({presetId:de,presetName:((ze=Ft()[de])==null?void 0:ze.name)??de,references:pe});return}const Ye={...y.providerPresets};delete Ye[de],I("providerPresets",Ye),l({title:"Preset Deleted",message:`${((gt=Ft()[de])==null?void 0:gt.name)??de} has been removed.`,type:"success"})},xn=de=>{if(!y)return;const pe={...y.providerPresets};delete pe[de],I("providerPresets",pe),l({title:"Preset Reset",message:`${de} has been reset to built-in defaults.`,type:"success"})},Ha=()=>{if(!k||!y)return;const{presetId:de}=k,pe={...y.providerPresets};delete pe[de],I("providerPresets",pe);const Ye={...y.jobProviders};for(const ze of Object.keys(Ye))Ye[ze]===de&&delete Ye[ze];I("jobProviders",Ye),y.provider===de&&I("provider","claude"),ne(null),l({title:"Preset Deleted",message:`${k.presetName} has been removed and all references cleared.`,type:"success"})};if(ie||!y)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(rl,{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(mt,{onClick:()=>he(),children:"Retry"})]});const pn=[{id:"general",label:"General",content:s.jsx(zw,{form:y,updateField:I,projectName:u,doctorChecks:Te,doctorLoading:re})},{id:"ai-runtime",label:"AI & Runtime",content:s.jsx(Uw,{form:y,updateField:I,jobProvidersChangedRef:D,getAllPresets:Ft,getPresetOptions:mn,handleEditPreset:fa,handleDeletePreset:yn,handleResetPreset:xn,handleAddPreset:da})},{id:"jobs",label:"Jobs",content:s.jsx(Hw,{form:y,updateField:I,handleRoadmapToggle:Pt})},{id:"schedules",label:"Schedules",content:s.jsx(bx,{form:{cronSchedule:y.cronSchedule,reviewerSchedule:y.reviewerSchedule,qa:y.qa,audit:y.audit,analytics:y.analytics,roadmapScanner:{enabled:y.roadmapScanner.enabled,slicerSchedule:y.roadmapScanner.slicerSchedule||"35 */12 * * *"},scheduleBundleId:y.scheduleBundleId,schedulingPriority:y.schedulingPriority,cronScheduleOffset:y.cronScheduleOffset,globalQueueEnabled:y.queue.enabled},scheduleMode:_,selectedTemplateId:B,onFieldChange:(de,pe)=>{de==="globalQueueEnabled"?I("queue",{...y.queue,enabled:pe}):I(de,pe)},onSwitchToTemplate:me,onSwitchToCustom:xe,onApplyTemplate:De,allProjectConfigs:b,currentProjectId:d,onEditJob:z})},{id:"notifications",label:"Notifications",content:s.jsxs(Ke,{className:"p-6",children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200 mb-2",children:"Notification Webhooks"}),s.jsx(Ig,{notifications:y.notifications,onChange:de=>I("notifications",de),globalWebhook:S,onSetGlobal:Nt,onUnsetGlobal:et})]})},{id:"roadmap",label:"Planner",content:s.jsx(Ke,{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(Ta,{checked:y.roadmapScanner.enabled,"aria-label":"Enable planner",onChange:Pt})]})})},{id:"integrations",label:"Integrations",content:s.jsxs("div",{className:"space-y-6",children:[s.jsxs(Ke,{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(Ta,{checked:y.boardProvider.enabled,onChange:de=>I("boardProvider",{...y.boardProvider,enabled:de})})]}),y.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(oa,{label:"Board Provider",value:y.boardProvider.provider,onChange:de=>I("boardProvider",{...y.boardProvider,provider:de}),options:[{label:"GitHub Projects",value:"github"},{label:"Local (SQLite)",value:"local"}]}),y.boardProvider.provider==="github"&&s.jsxs(s.Fragment,{children:[s.jsx(Ge,{label:"Project Number",type:"number",value:String(y.boardProvider.projectNumber||""),onChange:de=>I("boardProvider",{...y.boardProvider,projectNumber:de.target.value?Number(de.target.value):void 0}),helperText:"GitHub Projects V2 project number"}),s.jsx(Ge,{label:"Repository",value:y.boardProvider.repo||"",onChange:de=>I("boardProvider",{...y.boardProvider,repo:de.target.value||void 0}),helperText:"owner/repo (auto-detected if empty)"})]}),y.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(Ke,{className:"p-6",children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200 mb-2",children:"Notification Webhooks"}),s.jsx(Ig,{notifications:y.notifications,onChange:de=>I("notifications",de)})]})]})},{id:"advanced",label:"Advanced",content:s.jsxs(Ke,{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(Ge,{label:"Templates Directory",value:y.templatesDir,onChange:de=>I("templatesDir",de.target.value),helperText:"Directory for custom template overrides"}),s.jsx(Ge,{label:"Max Retries",type:"number",min:"1",value:String(y.maxRetries),onChange:de=>{const pe=Math.max(1,Number(de.target.value||1));I("maxRetries",pe)},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(Xf,{label:"PRD Priority",value:y.prdPriority,onChange:de=>I("prdPriority",de),placeholder:"e.g., feature-x",helpText:"PRDs matching these names are executed first"})})]})}];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(Gy,{tabs:pn,activeTab:Q,onChange:F}),s.jsxs("div",{className:"flex items-center justify-end space-x-4 pt-6 mt-6 border-t border-slate-800",children:[s.jsxs(mt,{variant:"ghost",className:"text-slate-400 hover:text-slate-300",onClick:He,children:[s.jsx(Oy,{className:"h-4 w-4 mr-2"}),"Reset"]}),s.jsxs(mt,{onClick:Me,loading:g,children:[s.jsx(L1,{className:"h-4 w-4 mr-2"}),"Save Changes"]})]}),s.jsx(kw,{isOpen:ae,onClose:()=>{le(!1),P(null),A(null)},onSave:gn,presetId:K,preset:J,isBuiltIn:K?ey.includes(K):!1,existingIds:Object.keys(Ft())}),k&&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:()=>ne(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(Xc,{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:k.presetName})," is currently assigned to the following jobs:"]}),s.jsx("ul",{className:"list-disc list-inside text-sm text-slate-400 mb-4",children:k.references.map(de=>s.jsx("li",{children:de},de))}),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(mt,{variant:"ghost",onClick:()=>ne(null),children:"Cancel"}),s.jsx(mt,{variant:"secondary",onClick:Ha,className:"bg-red-600 hover:bg-red-700",children:"Force Delete"})]})]})]})]})},Vw=()=>(j2(),E2(),s.jsx(vb,{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(b2,{}),s.jsxs("div",{className:"flex-1 flex flex-col min-w-0 z-10",children:[s.jsx(S2,{}),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(Wv,{children:[s.jsx(al,{path:"/",element:s.jsx(k2,{})}),s.jsx(al,{path:"/prs",element:s.jsx(U2,{})}),s.jsx(al,{path:"/board",element:s.jsx(D2,{})}),s.jsx(al,{path:"/scheduling",element:s.jsx(Tw,{})}),s.jsx(al,{path:"/logs",element:s.jsx(z2,{})}),s.jsx(al,{path:"/roadmap",element:s.jsx(H2,{})}),s.jsx(al,{path:"/settings",element:s.jsx(qw,{})}),s.jsx(al,{path:"*",element:s.jsx(Qv,{to:"/",replace:!0})})]})})})]}),s.jsx(N2,{})]})})),wx=document.getElementById("root");if(!wx)throw new Error("Could not find root element to mount to");const Bw=Xp.createRoot(wx);Bw.render(s.jsx(qe.StrictMode,{children:s.jsx(Vw,{})}));