easy-devops 1.3.2 → 1.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ui/assets/index-BQIUfiNs.js +452 -0
- package/dist/ui/assets/index-D_5mc2NX.css +1 -0
- package/dist/ui/index.html +2 -2
- package/package.json +1 -1
- package/src/core/deploy/engine.js +197 -54
- package/src/core/deploy/ezfile.js +13 -10
- package/src/core/deploy/hubCommands.js +9 -1
- package/src/core/hubPermissions.js +1 -0
- package/src/dashboard/controllers/deploymentsController.js +12 -1
- package/src/dashboard/routes/deployments.js +1 -0
- package/dist/ui/assets/index-CMRzkIKj.css +0 -1
- package/dist/ui/assets/index-GEcisbty.js +0 -453
|
@@ -0,0 +1,452 @@
|
|
|
1
|
+
(function(){const o=document.createElement("link").relList;if(o&&o.supports&&o.supports("modulepreload"))return;for(const d of document.querySelectorAll('link[rel="modulepreload"]'))u(d);new MutationObserver(d=>{for(const h of d)if(h.type==="childList")for(const x of h.addedNodes)x.tagName==="LINK"&&x.rel==="modulepreload"&&u(x)}).observe(document,{childList:!0,subtree:!0});function c(d){const h={};return d.integrity&&(h.integrity=d.integrity),d.referrerPolicy&&(h.referrerPolicy=d.referrerPolicy),d.crossOrigin==="use-credentials"?h.credentials="include":d.crossOrigin==="anonymous"?h.credentials="omit":h.credentials="same-origin",h}function u(d){if(d.ep)return;d.ep=!0;const h=c(d);fetch(d.href,h)}})();var Sd={exports:{}},_i={};/**
|
|
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 qp;function U0(){if(qp)return _i;qp=1;var s=Symbol.for("react.transitional.element"),o=Symbol.for("react.fragment");function c(u,d,h){var x=null;if(h!==void 0&&(x=""+h),d.key!==void 0&&(x=""+d.key),"key"in d){h={};for(var m in d)m!=="key"&&(h[m]=d[m])}else h=d;return d=h.ref,{$$typeof:s,type:u,key:x,ref:d!==void 0?d:null,props:h}}return _i.Fragment=o,_i.jsx=c,_i.jsxs=c,_i}var $p;function H0(){return $p||($p=1,Sd.exports=U0()),Sd.exports}var a=H0(),kd={exports:{}},Te={};/**
|
|
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 Gp;function B0(){if(Gp)return Te;Gp=1;var s=Symbol.for("react.transitional.element"),o=Symbol.for("react.portal"),c=Symbol.for("react.fragment"),u=Symbol.for("react.strict_mode"),d=Symbol.for("react.profiler"),h=Symbol.for("react.consumer"),x=Symbol.for("react.context"),m=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),b=Symbol.for("react.memo"),j=Symbol.for("react.lazy"),y=Symbol.for("react.activity"),N=Symbol.for("react.view_transition"),C=Symbol.iterator;function B(E){return E===null||typeof E!="object"?null:(E=C&&E[C]||E["@@iterator"],typeof E=="function"?E:null)}var S={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},T=Object.assign,A={};function k(E,I,K){this.props=E,this.context=I,this.refs=A,this.updater=K||S}k.prototype.isReactComponent={},k.prototype.setState=function(E,I){if(typeof E!="object"&&typeof E!="function"&&E!=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,E,I,"setState")},k.prototype.forceUpdate=function(E){this.updater.enqueueForceUpdate(this,E,"forceUpdate")};function X(){}X.prototype=k.prototype;function R(E,I,K){this.props=E,this.context=I,this.refs=A,this.updater=K||S}var M=R.prototype=new X;M.constructor=R,T(M,k.prototype),M.isPureReactComponent=!0;var ne=Array.isArray;function L(){}var Q={H:null,A:null,T:null,S:null},ce=Object.prototype.hasOwnProperty;function P(E,I,K){var W=K.ref;return{$$typeof:s,type:E,key:I,ref:W!==void 0?W:null,props:K}}function ae(E,I){return P(E.type,I,E.props)}function O(E){return typeof E=="object"&&E!==null&&E.$$typeof===s}function D(E){var I={"=":"=0",":":"=2"};return"$"+E.replace(/[=:]/g,function(K){return I[K]})}var le=/\/+/g;function F(E,I){return typeof E=="object"&&E!==null&&E.key!=null?D(""+E.key):I.toString(36)}function te(E){switch(E.status){case"fulfilled":return E.value;case"rejected":throw E.reason;default:switch(typeof E.status=="string"?E.then(L,L):(E.status="pending",E.then(function(I){E.status==="pending"&&(E.status="fulfilled",E.value=I)},function(I){E.status==="pending"&&(E.status="rejected",E.reason=I)})),E.status){case"fulfilled":return E.value;case"rejected":throw E.reason}}throw E}function de(E,I,K,W,je){var Ce=typeof E;(Ce==="undefined"||Ce==="boolean")&&(E=null);var De=!1;if(E===null)De=!0;else switch(Ce){case"bigint":case"string":case"number":De=!0;break;case"object":switch(E.$$typeof){case s:case o:De=!0;break;case j:return De=E._init,de(De(E._payload),I,K,W,je)}}if(De)return je=je(E),De=W===""?"."+F(E,0):W,ne(je)?(K="",De!=null&&(K=De.replace(le,"$&/")+"/"),de(je,I,K,"",function($t){return $t})):je!=null&&(O(je)&&(je=ae(je,K+(je.key==null||E&&E.key===je.key?"":(""+je.key).replace(le,"$&/")+"/")+De)),I.push(je)),1;De=0;var fe=W===""?".":W+":";if(ne(E))for(var ye=0;ye<E.length;ye++)W=E[ye],Ce=fe+F(W,ye),De+=de(W,I,K,Ce,je);else if(ye=B(E),typeof ye=="function")for(E=ye.call(E),ye=0;!(W=E.next()).done;)W=W.value,Ce=fe+F(W,ye++),De+=de(W,I,K,Ce,je);else if(Ce==="object"){if(typeof E.then=="function")return de(te(E),I,K,W,je);throw I=String(E),Error("Objects are not valid as a React child (found: "+(I==="[object Object]"?"object with keys {"+Object.keys(E).join(", ")+"}":I)+"). If you meant to render a collection of children, use an array instead.")}return De}function Y(E,I,K){if(E==null)return E;var W=[],je=0;return de(E,W,"","",function(Ce){return I.call(K,Ce,je++)}),W}function re(E){if(E._status===-1){var I=E._result,K=I();K.then(function(W){(E._status===0||E._status===-1)&&(E._status=1,E._result=W,K.status===void 0&&(K.status="fulfilled",K.value=W))},function(W){(E._status===0||E._status===-1)&&(E._status=2,E._result=W,K.status===void 0&&(K.status="rejected",K.reason=W))}),E._status===-1&&(E._status=0,E._result=K)}if(E._status===1)return E._result.default;throw E._result}var Se=typeof reportError=="function"?reportError:function(E){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var I=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(I))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",E);return}console.error(E)};function ke(E){var I=Q.T,K={};K.types=I!==null?I.types:null,Q.T=K;try{var W=E(),je=Q.S;je!==null&&je(K,W),typeof W=="object"&&W!==null&&typeof W.then=="function"&&W.then(L,Se)}catch(Ce){Se(Ce)}finally{I!==null&&K.types!==null&&(I.types=K.types),Q.T=I}}function Ve(E){var I=Q.T;if(I!==null){var K=I.types;K===null?I.types=[E]:K.indexOf(E)===-1&&K.push(E)}else ke(Ve.bind(null,E))}var $e={map:Y,forEach:function(E,I,K){Y(E,function(){I.apply(this,arguments)},K)},count:function(E){var I=0;return Y(E,function(){I++}),I},toArray:function(E){return Y(E,function(I){return I})||[]},only:function(E){if(!O(E))throw Error("React.Children.only expected to receive a single React element child.");return E}};return Te.Activity=y,Te.Children=$e,Te.Component=k,Te.Fragment=c,Te.Profiler=d,Te.PureComponent=R,Te.StrictMode=u,Te.Suspense=p,Te.ViewTransition=N,Te.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=Q,Te.__COMPILER_RUNTIME={__proto__:null,c:function(E){return Q.H.useMemoCache(E)}},Te.addTransitionType=Ve,Te.cache=function(E){return function(){return E.apply(null,arguments)}},Te.cacheSignal=function(){return null},Te.cloneElement=function(E,I,K){if(E==null)throw Error("The argument must be a React element, but you passed "+E+".");var W=T({},E.props),je=E.key;if(I!=null)for(Ce in I.key!==void 0&&(je=""+I.key),I)!ce.call(I,Ce)||Ce==="key"||Ce==="__self"||Ce==="__source"||Ce==="ref"&&I.ref===void 0||(W[Ce]=I[Ce]);var Ce=arguments.length-2;if(Ce===1)W.children=K;else if(1<Ce){for(var De=Array(Ce),fe=0;fe<Ce;fe++)De[fe]=arguments[fe+2];W.children=De}return P(E.type,je,W)},Te.createContext=function(E){return E={$$typeof:x,_currentValue:E,_currentValue2:E,_threadCount:0,Provider:null,Consumer:null},E.Provider=E,E.Consumer={$$typeof:h,_context:E},E},Te.createElement=function(E,I,K){var W,je={},Ce=null;if(I!=null)for(W in I.key!==void 0&&(Ce=""+I.key),I)ce.call(I,W)&&W!=="key"&&W!=="__self"&&W!=="__source"&&(je[W]=I[W]);var De=arguments.length-2;if(De===1)je.children=K;else if(1<De){for(var fe=Array(De),ye=0;ye<De;ye++)fe[ye]=arguments[ye+2];je.children=fe}if(E&&E.defaultProps)for(W in De=E.defaultProps,De)je[W]===void 0&&(je[W]=De[W]);return P(E,Ce,je)},Te.createRef=function(){return{current:null}},Te.forwardRef=function(E){return{$$typeof:m,render:E}},Te.isValidElement=O,Te.lazy=function(E){return{$$typeof:j,_payload:{_status:-1,_result:E},_init:re}},Te.memo=function(E,I){return{$$typeof:b,type:E,compare:I===void 0?null:I}},Te.startTransition=ke,Te.unstable_useCacheRefresh=function(){return Q.H.useCacheRefresh()},Te.use=function(E){return Q.H.use(E)},Te.useActionState=function(E,I,K){return Q.H.useActionState(E,I,K)},Te.useCallback=function(E,I){return Q.H.useCallback(E,I)},Te.useContext=function(E){return Q.H.useContext(E)},Te.useDebugValue=function(){},Te.useDeferredValue=function(E,I){return Q.H.useDeferredValue(E,I)},Te.useEffect=function(E,I){return Q.H.useEffect(E,I)},Te.useEffectEvent=function(E){return Q.H.useEffectEvent(E)},Te.useId=function(){return Q.H.useId()},Te.useImperativeHandle=function(E,I,K){return Q.H.useImperativeHandle(E,I,K)},Te.useInsertionEffect=function(E,I){return Q.H.useInsertionEffect(E,I)},Te.useLayoutEffect=function(E,I){return Q.H.useLayoutEffect(E,I)},Te.useMemo=function(E,I){return Q.H.useMemo(E,I)},Te.useOptimistic=function(E,I){return Q.H.useOptimistic(E,I)},Te.useReducer=function(E,I,K){return Q.H.useReducer(E,I,K)},Te.useRef=function(E){return Q.H.useRef(E)},Te.useState=function(E){return Q.H.useState(E)},Te.useSyncExternalStore=function(E,I,K){return Q.H.useSyncExternalStore(E,I,K)},Te.useTransition=function(){return Q.H.useTransition()},Te.version="19.3.1",Te}var Yp;function Id(){return Yp||(Yp=1,kd.exports=B0()),kd.exports}var g=Id(),Td={exports:{}},Mi={},Cd={exports:{}},Ed={};/**
|
|
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 Vp;function q0(){return Vp||(Vp=1,(function(s){function o(te,de){var Y=te.length;te.push(de);e:for(;0<Y;){var re=Y-1>>>1,Se=te[re];if(0<d(Se,de))te[re]=de,te[Y]=Se,Y=re;else break e}}function c(te){return te.length===0?null:te[0]}function u(te){if(te.length===0)return null;var de=te[0],Y=te.pop();if(Y!==de){te[0]=Y;e:for(var re=0,Se=te.length,ke=Se>>>1;re<ke;){var Ve=2*(re+1)-1,$e=te[Ve],E=Ve+1,I=te[E];if(0>d($e,Y))E<Se&&0>d(I,$e)?(te[re]=I,te[E]=Y,re=E):(te[re]=$e,te[Ve]=Y,re=Ve);else if(E<Se&&0>d(I,Y))te[re]=I,te[E]=Y,re=E;else break e}}return de}function d(te,de){var Y=te.sortIndex-de.sortIndex;return Y!==0?Y:te.id-de.id}if(s.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var h=performance;s.unstable_now=function(){return h.now()}}else{var x=Date,m=x.now();s.unstable_now=function(){return x.now()-m}}var p=[],b=[],j=1,y=null,N=3,C=!1,B=!1,S=!1,T=!1,A=typeof setTimeout=="function"?setTimeout:null,k=typeof clearTimeout=="function"?clearTimeout:null,X=typeof setImmediate<"u"?setImmediate:null;function R(te){for(var de=c(b);de!==null;){if(de.callback===null)u(b);else if(de.startTime<=te)u(b),de.sortIndex=de.expirationTime,o(p,de);else break;de=c(b)}}function M(te){if(S=!1,R(te),!B)if(c(p)!==null)B=!0,ne||(ne=!0,O());else{var de=c(b);de!==null&&F(M,de.startTime-te)}}var ne=!1,L=-1,Q=5,ce=-1;function P(){return T?!0:!(s.unstable_now()-ce<Q)}function ae(){if(T=!1,ne){var te=s.unstable_now();ce=te;var de=!0;try{e:{B=!1,S&&(S=!1,k(L),L=-1),C=!0;var Y=N;try{t:{for(R(te),y=c(p);y!==null&&!(y.expirationTime>te&&P());){var re=y.callback;if(typeof re=="function"){y.callback=null,N=y.priorityLevel;var Se=re(y.expirationTime<=te);if(te=s.unstable_now(),typeof Se=="function"){y.callback=Se,R(te),de=!0;break t}y===c(p)&&u(p),R(te)}else u(p);y=c(p)}if(y!==null)de=!0;else{var ke=c(b);ke!==null&&F(M,ke.startTime-te),de=!1}}break e}finally{y=null,N=Y,C=!1}de=void 0}}finally{de?O():ne=!1}}}var O;if(typeof X=="function")O=function(){X(ae)};else if(typeof MessageChannel<"u"){var D=new MessageChannel,le=D.port2;D.port1.onmessage=ae,O=function(){le.postMessage(null)}}else O=function(){A(ae,0)};function F(te,de){L=A(function(){te(s.unstable_now())},de)}s.unstable_IdlePriority=5,s.unstable_ImmediatePriority=1,s.unstable_LowPriority=4,s.unstable_NormalPriority=3,s.unstable_Profiling=null,s.unstable_UserBlockingPriority=2,s.unstable_cancelCallback=function(te){te.callback=null},s.unstable_forceFrameRate=function(te){0>te||125<te?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):Q=0<te?Math.floor(1e3/te):5},s.unstable_getCurrentPriorityLevel=function(){return N},s.unstable_next=function(te){switch(N){case 1:case 2:case 3:var de=3;break;default:de=N}var Y=N;N=de;try{return te()}finally{N=Y}},s.unstable_requestPaint=function(){T=!0},s.unstable_runWithPriority=function(te,de){switch(te){case 1:case 2:case 3:case 4:case 5:break;default:te=3}var Y=N;N=te;try{return de()}finally{N=Y}},s.unstable_scheduleCallback=function(te,de,Y){var re=s.unstable_now();switch(typeof Y=="object"&&Y!==null?(Y=Y.delay,Y=typeof Y=="number"&&0<Y?re+Y:re):Y=re,te){case 1:var Se=-1;break;case 2:Se=250;break;case 5:Se=1073741823;break;case 4:Se=1e4;break;default:Se=5e3}return Se=Y+Se,te={id:j++,callback:de,priorityLevel:te,startTime:Y,expirationTime:Se,sortIndex:-1},Y>re?(te.sortIndex=Y,o(b,te),c(p)===null&&te===c(b)&&(S?(k(L),L=-1):S=!0,F(M,Y-re))):(te.sortIndex=Se,o(p,te),B||C||(B=!0,ne||(ne=!0,O()))),te},s.unstable_shouldYield=P,s.unstable_wrapCallback=function(te){var de=N;return function(){var Y=N;N=de;try{return te.apply(this,arguments)}finally{N=Y}}}})(Ed)),Ed}var Xp;function $0(){return Xp||(Xp=1,Cd.exports=q0()),Cd.exports}var zd={exports:{}},Ot={};/**
|
|
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 Qp;function G0(){if(Qp)return Ot;Qp=1;var s=Id();function o(j){var y="https://react.dev/errors/"+j;if(1<arguments.length){y+="?args[]="+encodeURIComponent(arguments[1]);for(var N=2;N<arguments.length;N++)y+="&args[]="+encodeURIComponent(arguments[N])}return"Minified React error #"+j+"; visit "+y+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function c(){}var u={d:{f:c,r:function(){throw Error(o(522))},D:c,C:c,L:c,m:c,X:c,S:c,M:c},p:0,findDOMNode:null},d=Symbol.for("react.portal"),h=Symbol.for("react.recoverable"),x=Symbol.for("react.optimistic_key");function m(j,y,N){var C=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:d,key:C==null?null:C===x?x:""+C,children:j,containerInfo:y,implementation:N}}var p=s.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function b(j,y){if(j==="font")return"";if(typeof y=="string")return y==="use-credentials"?y:""}return Ot.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=u,Ot.browser=function(j){return{$$typeof:h,_reason:j}},Ot.createPortal=function(j,y){var N=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!y||y.nodeType!==1&&y.nodeType!==9&&y.nodeType!==11)throw Error(o(299));return m(j,y,null,N)},Ot.flushSync=function(j){var y=p.T,N=u.p;try{if(p.T=null,u.p=2,j)return j()}finally{p.T=y,u.p=N,u.d.f()}},Ot.preconnect=function(j,y){typeof j=="string"&&(y?(y=y.crossOrigin,y=typeof y=="string"?y==="use-credentials"?y:"":void 0):y=null,u.d.C(j,y))},Ot.prefetchDNS=function(j){typeof j=="string"&&u.d.D(j)},Ot.preinit=function(j,y){if(typeof j=="string"&&y&&typeof y.as=="string"){var N=y.as,C=b(N,y.crossOrigin),B=typeof y.integrity=="string"?y.integrity:void 0,S=typeof y.fetchPriority=="string"?y.fetchPriority:void 0;N==="style"?u.d.S(j,typeof y.precedence=="string"?y.precedence:void 0,{crossOrigin:C,integrity:B,fetchPriority:S}):N==="script"&&u.d.X(j,{crossOrigin:C,integrity:B,fetchPriority:S,nonce:typeof y.nonce=="string"?y.nonce:void 0})}},Ot.preinitModule=function(j,y){if(typeof j=="string")if(typeof y=="object"&&y!==null){if(y.as==null||y.as==="script"){var N=b(y.as,y.crossOrigin);u.d.M(j,{crossOrigin:N,integrity:typeof y.integrity=="string"?y.integrity:void 0,nonce:typeof y.nonce=="string"?y.nonce:void 0,fetchPriority:typeof y.fetchPriority=="string"?y.fetchPriority:void 0})}}else y==null&&u.d.M(j)},Ot.preload=function(j,y){if(typeof j=="string"&&typeof y=="object"&&y!==null&&typeof y.as=="string"){var N=y.as,C=b(N,y.crossOrigin);u.d.L(j,N,{crossOrigin:C,integrity:typeof y.integrity=="string"?y.integrity:void 0,nonce:typeof y.nonce=="string"?y.nonce:void 0,type:typeof y.type=="string"?y.type:void 0,fetchPriority:typeof y.fetchPriority=="string"?y.fetchPriority:void 0,referrerPolicy:typeof y.referrerPolicy=="string"?y.referrerPolicy:void 0,imageSrcSet:typeof y.imageSrcSet=="string"?y.imageSrcSet:void 0,imageSizes:typeof y.imageSizes=="string"?y.imageSizes:void 0,media:typeof y.media=="string"?y.media:void 0})}},Ot.preloadModule=function(j,y){if(typeof j=="string")if(y){var N=b(y.as,y.crossOrigin);u.d.m(j,{as:typeof y.as=="string"&&y.as!=="script"?y.as:void 0,crossOrigin:N,integrity:typeof y.integrity=="string"?y.integrity:void 0,nonce:typeof y.nonce=="string"?y.nonce:void 0,fetchPriority:typeof y.fetchPriority=="string"?y.fetchPriority:void 0})}else u.d.m(j)},Ot.requestFormReset=function(j){u.d.r(j)},Ot.unstable_batchedUpdates=function(j,y){return j(y)},Ot.useFormState=function(j,y,N){return p.H.useFormState(j,y,N)},Ot.useFormStatus=function(){return p.H.useHostTransitionStatus()},Ot.version="19.3.1",Ot}var Zp;function Ug(){if(Zp)return zd.exports;Zp=1;function s(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(s)}catch(o){console.error(o)}}return s(),zd.exports=G0(),zd.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 Kp;function Y0(){if(Kp)return Mi;Kp=1;var s=$0(),o=Id(),c=Ug();function u(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n])}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 d(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function h(e){for(var t=e,n=t;n&&!n.alternate;)t=n,(t.flags&4098)!==0&&(e=t.return),n=t.return;for(;t.return;)t=t.return;return t.tag===3?e:null}function x(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 m(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function p(e){if(h(e)!==e)throw Error(u(188))}function b(e){var t=e.alternate;if(!t){if(t=h(e),t===null)throw Error(u(188));return t!==e?null:e}for(var n=e,l=t;;){var i=n.return;if(i===null)break;var r=i.alternate;if(r===null){if(l=i.return,l!==null){n=l;continue}break}if(i.child===r.child){for(r=i.child;r;){if(r===n)return p(i),e;if(r===l)return p(i),t;r=r.sibling}throw Error(u(188))}if(n.return!==l.return)n=i,l=r;else{for(var f=!1,v=i.child;v;){if(v===n){f=!0,n=i,l=r;break}if(v===l){f=!0,l=i,n=r;break}v=v.sibling}if(!f){for(v=r.child;v;){if(v===n){f=!0,n=r,l=i;break}if(v===l){f=!0,l=r,n=i;break}v=v.sibling}if(!f)throw Error(u(189))}}if(n.alternate!==l)throw Error(u(190))}if(n.tag!==3)throw Error(u(188));return n.stateNode.current===n?e:t}function j(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=j(e),t!==null)return t;e=e.sibling}return null}function y(e,t,n,l,i,r){for(;e!==null;){if((e.tag===5||e.tag===27||e.tag===6)&&n(e,l,i,r)||(e.tag!==22||e.memoizedState===null)&&(t||e.tag!==5&&e.tag!==27)&&y(e.child,t,n,l,i,r))return!0;e=e.sibling}return!1}function N(e){for(e=e.return;e!==null;){if(e.tag===3||e.tag===5||e.tag===27)return e;e=e.return}return null}function C(e){var t=!1;for(e=e.return;e!==null&&(e.tag===4&&(t=!0),!(e.tag===3||e.tag===5||e.tag===27));)e=e.return;return t}function B(e){var t=[null,null],n=N(e);return n===null||S(t,e,n.child,{foundSelf:!1}),t}function S(e,t,n,l){for(;n!==null;){if(n===t)l.foundSelf=!0;else if(n.tag===5||n.tag===27||n.tag===6){if(l.foundSelf)return e[1]=n,!0;e[0]=n}else if((n.tag!==22||n.memoizedState===null)&&S(e,t,n.child,l))return!0;n=n.sibling}return!1}function T(e){switch(e.tag){case 5:case 27:case 6:return e.stateNode;case 3:return e.stateNode.containerInfo;default:throw Error(u(559))}}var A=null,k=null;function X(e,t,n){return e===n?!0:e===t?(A=e,!0):!1}function R(e,t,n){return e===n?(k=e,!1):e===t?(k!==null&&(A=e),!0):!1}function M(e){if(e===null)return null;do e=e===null?null:e.return;while(e&&e.tag!==5&&e.tag!==27&&e.tag!==3);return e||null}function ne(e,t,n){for(var l=0,i=e;i;i=n(i))l++;i=0;for(var r=t;r;r=n(r))i++;for(;0<l-i;)e=n(e),l--;for(;0<i-l;)t=n(t),i--;for(;l--;){if(e===t||t!==null&&e===t.alternate)return e;e=n(e),t=n(t)}return null}var L=Object.assign,Q=Symbol.for("react.element"),ce=Symbol.for("react.transitional.element"),P=Symbol.for("react.portal"),ae=Symbol.for("react.fragment"),O=Symbol.for("react.strict_mode"),D=Symbol.for("react.profiler"),le=Symbol.for("react.consumer"),F=Symbol.for("react.context"),te=Symbol.for("react.forward_ref"),de=Symbol.for("react.suspense"),Y=Symbol.for("react.suspense_list"),re=Symbol.for("react.memo"),Se=Symbol.for("react.lazy"),ke=Symbol.for("react.activity"),Ve=Symbol.for("react.legacy_hidden"),$e=Symbol.for("react.memo_cache_sentinel"),E=Symbol.for("react.view_transition"),I=Symbol.for("react.recoverable"),K=Symbol.iterator;function W(e){return e===null||typeof e!="object"?null:(e=K&&e[K]||e["@@iterator"],typeof e=="function"?e:null)}var je=Symbol.for("react.client.reference");function Ce(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===je?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case ae:return"Fragment";case D:return"Profiler";case O:return"StrictMode";case de:return"Suspense";case Y:return"SuspenseList";case ke:return"Activity";case E:return"ViewTransition"}if(typeof e=="object")switch(e.$$typeof){case P:return"Portal";case F:return e.displayName||"Context";case le:return(e._context.displayName||"Context")+".Consumer";case te:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case re:return t=e.displayName||null,t!==null?t:Ce(e.type)||"Memo";case Se:t=e._payload,e=e._init;try{return Ce(e(t))}catch{}}return null}var De=Array.isArray,fe=o.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ye=c.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,$t={pending:!1,data:null,method:null,action:null},Qn=[],an=-1;function Gt(e){return{current:e}}function rt(e){0>an||(e.current=Qn[an],Qn[an]=null,an--)}function Le(e,t){an++,Qn[an]=e.current,e.current=t}var Ut=Gt(null),jn=Gt(null),Kt=Gt(null),ca=Gt(null);function Zn(e,t){switch(Le(Kt,t),Le(jn,e),Le(Ut,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Jx(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Jx(t),e=Px(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}rt(Ut),Le(Ut,e)}function ln(){rt(Ut),rt(jn),rt(Kt)}function V(e){var t=e.memoizedState;t!==null&&(ks._currentValue=t.memoizedState,Le(ca,e)),t=Ut.current;var n=Px(t,e.type);t!==n&&(Le(jn,e),Le(Ut,n))}function pe(e){jn.current===e&&(rt(Ut),rt(jn)),ca.current===e&&(rt(ca),ks._currentValue=$t)}var Ae,Jt;function wt(e){if(Ae===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);Ae=t&&t[1]||"",Jt=-1<n.stack.indexOf(`
|
|
42
|
+
at`)?" (<anonymous>)":-1<n.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
43
|
+
`+Ae+e+Jt}var We=!1;function ol(e,t){if(!e||We)return"";We=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var l={DetermineComponentFrameRoot:function(){try{if(t){var J=function(){throw Error()};if(Object.defineProperty(J.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(J,[])}catch(se){var _=se}Reflect.construct(e,[],J)}else{try{J.call()}catch(se){_=se}J=!1;try{var $=Object.getOwnPropertyDescriptor(e.prototype,"props");Object.defineProperty(e.prototype,"props",{configurable:!0,set:function(){throw Error()}}),J=!0,new e}finally{J&&($!==void 0?Object.defineProperty(e.prototype,"props",$):delete e.prototype.props)}}}else{try{throw Error()}catch(se){_=se}(J=e())&&typeof J.catch=="function"&&J.catch(function(){})}}catch(se){if(se&&_&&typeof se.stack=="string")return[se.stack,_.stack]}return[null,null]}};l.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var i=Object.getOwnPropertyDescriptor(l.DetermineComponentFrameRoot,"name");i&&i.configurable&&Object.defineProperty(l.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var r=l.DetermineComponentFrameRoot(),f=r[0],v=r[1];if(f&&v){var w=f.split(`
|
|
44
|
+
`),H=v.split(`
|
|
45
|
+
`);for(i=l=0;l<w.length&&!w[l].includes("DetermineComponentFrameRoot");)l++;for(;i<H.length&&!H[i].includes("DetermineComponentFrameRoot");)i++;if(l===w.length||i===H.length)for(l=w.length-1,i=H.length-1;1<=l&&0<=i&&w[l]!==H[i];)i--;for(;1<=l&&0<=i;l--,i--)if(w[l]!==H[i]){if(l!==1||i!==1)do if(l--,i--,0>i||w[l]!==H[i]){var G=`
|
|
46
|
+
`+w[l].replace(" at new "," at ");return e.displayName&&G.includes("<anonymous>")&&(G=G.replace("<anonymous>",e.displayName)),G}while(1<=l&&0<=i);break}}}finally{We=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:"")?wt(n):""}function Po(e,t){switch(e.tag){case 26:case 27:case 5:return wt(e.type);case 16:return wt("Lazy");case 13:return e.child!==t&&t!==null?wt("Suspense Fallback"):wt("Suspense");case 19:return wt("SuspenseList");case 0:case 15:return ol(e.type,!1);case 11:return ol(e.type.render,!1);case 1:return ol(e.type,!0);case 31:return wt("Activity");case 30:return wt("ViewTransition");default:return""}}function be(e){try{var t="",n=null;do t+=Po(e,n),n=e,e=e.return;while(e);return t}catch(l){return`
|
|
47
|
+
Error generating stack: `+l.message+`
|
|
48
|
+
`+l.stack}}var ot=Object.prototype.hasOwnProperty,Ht=s.unstable_scheduleCallback,ft=s.unstable_cancelCallback,ct=s.unstable_shouldYield,sn=s.unstable_requestPaint,rn=s.unstable_now,Vy=s.unstable_getCurrentPriorityLevel,yf=s.unstable_ImmediatePriority,vf=s.unstable_UserBlockingPriority,Ii=s.unstable_NormalPriority,Xy=s.unstable_LowPriority,bf=s.unstable_IdlePriority,Qy=s.log,Zy=s.unstable_setDisableYieldValue,qs=null,on=null;function Aa(e){if(typeof Qy=="function"&&Zy(e),on&&typeof on.setStrictMode=="function")try{on.setStrictMode(qs,e)}catch{}}var cn=Math.clz32?Math.clz32:Py,Ky=Math.log,Jy=Math.LN2;function Py(e){return e>>>=0,e===0?32:31-(Ky(e)/Jy|0)|0}var Wi=256,er=262144,tr=4194304;function cl(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&-e;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 nr(e,t,n){var l=e.pendingLanes;if(l===0)return 0;var i=0,r=e.suspendedLanes,f=e.pingedLanes;e=e.warmLanes;var v=l&134217727;return v!==0?(l=v&~r,l!==0?i=cl(l):(f&=v,f!==0?i=cl(f):n||(n=v&~e,n!==0&&(i=cl(n))))):(v=l&~r,v!==0?i=cl(v):f!==0?i=cl(f):n||(n=l&~e,n!==0&&(i=cl(n)))),i===0?0:t!==0&&t!==i&&(t&r)===0&&(r=i&-i,n=t&-t,r>=n||r===32&&(n&4194048)!==0)?t:i}function $s(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function jf(e,t){(t&8)!==0&&(t|=t&32);var n=e.entangledLanes;if(n!==0)for(e=e.entanglements,n&=t;0<n;){var l=31-cn(n),i=1<<l;t|=e[l],n&=~i}return t}function Fy(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 Nf(){var e=tr;return tr<<=1,(tr&62914560)===0&&(tr=4194304),e}function Fo(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Gs(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Iy(e,t,n,l,i,r){var f=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var v=e.entanglements,w=e.expirationTimes,H=e.hiddenUpdates;for(n=f&~n;0<n;){var G=31-cn(n),J=1<<G;v[G]=0,w[G]=-1;var _=H[G];if(_!==null)for(H[G]=null,G=0;G<_.length;G++){var $=_[G];$!==null&&($.lane&=-536870913)}n&=~J}l!==0&&wf(e,l,0),r!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=r&~(f&~t))}function wf(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var l=31-cn(t);e.entangledLanes|=t,e.entanglements[l]=e.entanglements[l]|1073741824|n&261930}function Sf(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var l=31-cn(n),i=1<<l;i&t|e[l]&t&&(e[l]|=t),n&=~i}}function kf(e,t){var n=t&-t;return n=(n&42)!==0?1:Io(n),(n&(e.suspendedLanes|t))!==0?0:n}function Io(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 Wo(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Tf(){var e=ye.p;return e!==0?e:(e=window.event,e===void 0?32:_p(e.type))}function Cf(e,t){var n=ye.p;try{return ye.p=e,t()}finally{ye.p=n}}var ua=Math.random().toString(36).slice(2),zt="__reactFiber$"+ua,Pt="__reactProps$"+ua,Bl="__reactContainer$"+ua,Ef="__reactEvents$"+ua,Wy="__reactListeners$"+ua,ev="__reactHandles$"+ua,zf="__reactResources$"+ua,Ys="__reactMarker$"+ua,ar="__reactLoad$"+ua;function lr(e){delete e[zt],delete e[Pt],delete e[Wy],delete e[ev]}function ul(e){var t;if(t=e[zt])return t;for(var n=e.parentNode;n;){if(t=n[Bl]||n[zt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=hp(e);e!==null;){if(n=e[zt])return n;e=hp(e)}return t}e=n,n=e.parentNode}return null}function ql(e){if(e=e[zt]||e[Bl]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Vs(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(u(33))}function $l(e){var t=e[zf];return t||(t=e[zf]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function St(e){e[Ys]=!0}function Rf(e){e[ar]=void 0}var Af=new Set,Df={};function dl(e,t){Gl(e,t),Gl(e+"Capture",t)}function Gl(e,t){for(Df[e]=t,e=0;e<t.length;e++)Af.add(t[e])}var tv=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]*$"),_f={},Mf={};function nv(e){return ot.call(Mf,e)?!0:ot.call(_f,e)?!1:tv.test(e)?Mf[e]=!0:(_f[e]=!0,!1)}var Ge=!1;function Of(){var e=Ge;return Ge=!1,e}function sr(e,t,n){if(nv(t))if(n===null)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var l=t.toLowerCase().slice(0,5);if(l!=="data-"&&l!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,n)}}function ir(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,n)}}function da(e,t,n,l){if(l===null)e.removeAttribute(n);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(n);return}e.setAttributeNS(t,n,l)}}function un(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Lf(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function av(e,t,n){var l=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof l<"u"&&typeof l.get=="function"&&typeof l.set=="function"){var i=l.get,r=l.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(f){n=""+f,r.call(this,f)}}),Object.defineProperty(e,t,{enumerable:l.enumerable}),{getValue:function(){return n},setValue:function(f){n=""+f},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function ec(e){if(!e._valueTracker){var t=Lf(e)?"checked":"value";e._valueTracker=av(e,t,""+e[t])}}function Uf(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),l="";return e&&(l=Lf(e)?e.checked?"true":"false":e.value),e=l,e!==n?(t.setValue(e),!0):!1}var lv=/[\n"\\]/g;function Nn(e){return e.replace(lv,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function tc(e,t,n,l,i,r,f,v){e.name="",f!=null&&typeof f!="function"&&typeof f!="symbol"&&typeof f!="boolean"?e.type=f:e.removeAttribute("type"),t!=null?f==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+un(t)):e.value!==""+un(t)&&(e.value=""+un(t)):f!=="submit"&&f!=="reset"||e.removeAttribute("value"),t!=null?f==="number"&&e.value==t?nc(e,un(e.value)):nc(e,un(t)):n!=null?nc(e,un(n)):l!=null&&e.removeAttribute("value"),i==null&&r!=null&&(e.defaultChecked=!!r),i!=null&&(e.checked=i&&typeof i!="function"&&typeof i!="symbol"),v!=null&&typeof v!="function"&&typeof v!="symbol"&&typeof v!="boolean"?e.name=""+un(v):e.removeAttribute("name")}function Hf(e,t,n,l,i,r,f,v){if(r!=null&&typeof r!="function"&&typeof r!="symbol"&&typeof r!="boolean"&&(e.type=r),t!=null||n!=null){if(!(r!=="submit"&&r!=="reset"||t!=null)){ec(e);return}n=n!=null?""+un(n):"",t=t!=null?""+un(t):n,v||t===e.value||(e.value=t),e.defaultValue=t}l=l??i,l=typeof l!="function"&&typeof l!="symbol"&&!!l,e.checked=v?e.checked:!!l,e.defaultChecked=!!l,f!=null&&typeof f!="function"&&typeof f!="symbol"&&typeof f!="boolean"&&(e.name=f),ec(e)}function nc(e,t){e.defaultValue!==""+t&&(e.defaultValue=""+t)}function Yl(e,t,n,l){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t["$"+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty("$"+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&l&&(e[n].defaultSelected=!0)}else{for(n=""+un(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,l&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function Bf(e,t,n){if(t!=null&&(t=""+un(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n!=null?""+un(n):""}function qf(e,t,n,l){if(t==null){if(l!=null){if(n!=null)throw Error(u(92));if(De(l)){if(1<l.length)throw Error(u(93));l=l[0]}n=l}n==null&&(n=""),t=n}n=un(t),e.defaultValue=n,l=e.textContent,l===n&&l!==""&&l!==null&&(e.value=l),ec(e)}function Vl(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var sv=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 $f(e,t,n){var l=t.indexOf("--")===0;n==null||typeof n=="boolean"||n===""?l?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":l?e.setProperty(t,n):typeof n!="number"||n===0||sv.has(t)?t==="float"?e.cssFloat=n:e[t]=(""+n).trim():e[t]=n+"px"}function Gf(e,t,n){if(t!=null&&typeof t!="object")throw Error(u(62));if(e=e.style,n!=null){for(var l in n)!n.hasOwnProperty(l)||t!=null&&t.hasOwnProperty(l)||(l.indexOf("--")===0?e.setProperty(l,""):l==="float"?e.cssFloat="":e[l]="",Ge=!0);for(var i in t)l=t[i],t.hasOwnProperty(i)&&n[i]!==l&&($f(e,i,l),Ge=!0)}else for(var r in t)t.hasOwnProperty(r)&&$f(e,r,t[r])}function ac(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 iv=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"],["maskType","mask-type"],["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"]]),rv=/^[\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 rr(e){return rv.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Kn(){}var lc=null;function sc(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Xl=null,Ql=null;function Yf(e){var t=ql(e);if(t&&(e=t.stateNode)){var n=e[Pt]||null;e:switch(e=t.stateNode,t.type){case"input":if(tc(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll('input[name="'+Nn(""+t)+'"][type="radio"]'),t=0;t<n.length;t++){var l=n[t];if(l!==e&&l.form===e.form){var i=l[Pt]||null;if(!i)throw Error(u(90));tc(l,i.value,i.defaultValue,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name)}}for(t=0;t<n.length;t++)l=n[t],l.form===e.form&&Uf(l)}break e;case"textarea":Bf(e,n.value,n.defaultValue);break e;case"select":t=n.value,t!=null&&Yl(e,!!n.multiple,t,!1)}}}var ic=!1;function Vf(e,t,n){if(ic)return e(t,n);ic=!0;try{var l=e(t);return l}finally{if(ic=!1,(Xl!==null||Ql!==null)&&(ro(),Xl&&(t=Xl,e=Ql,Ql=Xl=null,Yf(t),e)))for(t=0;t<e.length;t++)Yf(e[t])}}function Xs(e,t){var n=e.stateNode;if(n===null)return null;var l=n[Pt]||null;if(l===null)return null;n=l[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(l=!l.disabled)||(e=e.type,l=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!l;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(u(231,t,typeof n));return n}var fa=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),rc=!1;if(fa)try{var Qs={};Object.defineProperty(Qs,"passive",{get:function(){rc=!0}}),window.addEventListener("test",Qs,Qs),window.removeEventListener("test",Qs,Qs)}catch{rc=!1}var Da=null,oc=null,or=null;function Xf(){if(or)return or;var e,t=oc,n=t.length,l,i="value"in Da?Da.value:Da.textContent,r=i.length;for(e=0;e<n&&t[e]===i[e];e++);var f=n-e;for(l=1;l<=f&&t[n-l]===i[r-l];l++);return or=i.slice(e,1<l?1-l:void 0)}function cr(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 ur(){return!0}function Qf(){return!1}function Yt(e){function t(n,l,i,r,f){this._reactName=n,this._targetInst=i,this.type=l,this.nativeEvent=r,this.target=f,this.currentTarget=null;for(var v in e)e.hasOwnProperty(v)&&(n=e[v],this[v]=n?n(r):r[v]);return this.isDefaultPrevented=(r.defaultPrevented!=null?r.defaultPrevented:r.returnValue===!1)?ur:Qf,this.isPropagationStopped=Qf,this}return L(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=ur)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=ur)},persist:function(){},isPersistent:ur}),t}var _a={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},dr=Yt(_a),Zs=L({},_a,{view:0,detail:0}),ov=Yt(Zs),cc,uc,Ks,fr=L({},Zs,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:fc,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!==Ks&&(Ks&&e.type==="mousemove"?(cc=e.screenX-Ks.screenX,uc=e.screenY-Ks.screenY):uc=cc=0,Ks=e),cc)},movementY:function(e){return"movementY"in e?e.movementY:uc}}),Zf=Yt(fr),cv=L({},fr,{dataTransfer:0}),uv=Yt(cv),dv=L({},Zs,{relatedTarget:0}),dc=Yt(dv),fv=L({},_a,{animationName:0,elapsedTime:0,pseudoElement:0}),hv=Yt(fv),mv=L({},_a,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),xv=Yt(mv),pv=L({},_a,{data:0}),Kf=Yt(pv),gv={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},yv={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"},vv={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function bv(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=vv[e])?!!t[e]:!1}function fc(){return bv}var jv=L({},Zs,{key:function(e){if(e.key){var t=gv[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=cr(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?yv[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:fc,charCode:function(e){return e.type==="keypress"?cr(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?cr(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Nv=Yt(jv),wv=L({},fr,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Jf=Yt(wv),Sv=L({},_a,{submitter:0}),kv=Yt(Sv),Tv=L({},Zs,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:fc}),Cv=Yt(Tv),Ev=L({},_a,{propertyName:0,elapsedTime:0,pseudoElement:0}),zv=Yt(Ev),Rv=L({},fr,{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}),Av=Yt(Rv),Dv=L({},_a,{newState:0,oldState:0,source:0}),_v=Yt(Dv),Mv=[9,13,27,32],hc=fa&&"CompositionEvent"in window,Js=null;fa&&"documentMode"in document&&(Js=document.documentMode);var Ov=fa&&"TextEvent"in window&&!Js,Pf=fa&&(!hc||Js&&8<Js&&11>=Js),Ff=" ",If=!1;function Wf(e,t){switch(e){case"keyup":return Mv.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function eh(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Zl=!1;function Lv(e,t){switch(e){case"compositionend":return eh(t);case"keypress":return t.which!==32?null:(If=!0,Ff);case"textInput":return e=t.data,e===Ff&&If?null:e;default:return null}}function Uv(e,t){if(Zl)return e==="compositionend"||!hc&&Wf(e,t)?(e=Xf(),or=oc=Da=null,Zl=!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 Pf&&t.locale!=="ko"?null:t.data;default:return null}}var Hv={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 th(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Hv[e.type]:t==="textarea"}function nh(e,t,n,l){Xl?Ql?Ql.push(l):Ql=[l]:Xl=l,t=mo(t,"onChange"),0<t.length&&(n=new dr("onChange","change",null,n,l),e.push({event:n,listeners:t}))}var Ps=null,Fs=null;function Bv(e){Yx(e,0)}function hr(e){var t=Vs(e);if(Uf(t))return e}function ah(e,t){if(e==="change")return t}var lh=!1;if(fa){var mc;if(fa){var xc="oninput"in document;if(!xc){var sh=document.createElement("div");sh.setAttribute("oninput","return;"),xc=typeof sh.oninput=="function"}mc=xc}else mc=!1;lh=mc&&(!document.documentMode||9<document.documentMode)}function ih(){Ps&&(Ps.detachEvent("onpropertychange",rh),Fs=Ps=null)}function rh(e){if(e.propertyName==="value"&&hr(Fs)){var t=[];nh(t,Fs,e,sc(e)),Vf(Bv,t)}}function qv(e,t,n){e==="focusin"?(ih(),Ps=t,Fs=n,Ps.attachEvent("onpropertychange",rh)):e==="focusout"&&ih()}function $v(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return hr(Fs)}function Gv(e,t){if(e==="click")return hr(t)}function Yv(e,t){if(e==="input"||e==="change")return hr(t)}function Vv(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var dn=typeof Object.is=="function"?Object.is:Vv;function Is(e,t){if(dn(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),l=Object.keys(t);if(n.length!==l.length)return!1;for(l=0;l<n.length;l++){var i=n[l];if(!ot.call(t,i)||!dn(e[i],t[i]))return!1}return!0}function pc(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}}function oh(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function ch(e,t){var n=oh(e);e=0;for(var l;n;){if(n.nodeType===3){if(l=e+n.textContent.length,e<=t&&l>=t)return{node:n,offset:t-e};e=l}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=oh(n)}}function uh(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?uh(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function dh(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=pc(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=pc(e.document)}return t}function gc(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 Xv=fa&&"documentMode"in document&&11>=document.documentMode,Kl=null,yc=null,Ws=null,vc=!1;function fh(e,t,n){var l=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;vc||Kl==null||Kl!==pc(l)||(l=Kl,"selectionStart"in l&&gc(l)?l={start:l.selectionStart,end:l.selectionEnd}:(l=(l.ownerDocument&&l.ownerDocument.defaultView||window).getSelection(),l={anchorNode:l.anchorNode,anchorOffset:l.anchorOffset,focusNode:l.focusNode,focusOffset:l.focusOffset}),Ws&&Is(Ws,l)||(Ws=l,l=mo(yc,"onSelect"),0<l.length&&(t=new dr("onSelect","select",null,t,n),e.push({event:t,listeners:l}),t.target=Kl)))}function fl(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Jl={animationend:fl("Animation","AnimationEnd"),animationiteration:fl("Animation","AnimationIteration"),animationstart:fl("Animation","AnimationStart"),transitionrun:fl("Transition","TransitionRun"),transitionstart:fl("Transition","TransitionStart"),transitioncancel:fl("Transition","TransitionCancel"),transitionend:fl("Transition","TransitionEnd")},bc={},hh={};fa&&(hh=document.createElement("div").style,"AnimationEvent"in window||(delete Jl.animationend.animation,delete Jl.animationiteration.animation,delete Jl.animationstart.animation),"TransitionEvent"in window||delete Jl.transitionend.transition);function hl(e){if(bc[e])return bc[e];if(!Jl[e])return e;var t=Jl[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in hh)return bc[e]=t[n];return e}var mh=hl("animationend"),xh=hl("animationiteration"),ph=hl("animationstart"),Qv=hl("transitionrun"),Zv=hl("transitionstart"),Kv=hl("transitioncancel"),gh=hl("transitionend"),yh=new Map,jc="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error fullscreenChange fullscreenError 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(" ");jc.push("scrollEnd");function Un(e,t){yh.set(e,t),dl(t,[e])}var Jv=0;function ha(e,t){if(e.name!=null&&e.name!=="auto")return e.name;if(t.autoName!==null)return t.autoName;e=$n.identifierPrefix;var n=Jv++;return e="_"+e+"t_"+n.toString(32)+"_",t.autoName=e}function vh(e){if(e==null||typeof e=="string")return e;var t=null,n=xs;if(n!==null)for(var l=0;l<n.length;l++){var i=e[n[l]];if(i!=null){if(i==="none")return"none";t=t==null?i:t+(" "+i)}}return t??e.default}function ma(e,t){return e=vh(e),t=vh(t),t==null?e==="auto"?null:e:t==="auto"?null:t}var mr=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)},wn=[],Pl=0,Nc=0;function xr(){for(var e=Pl,t=Nc=Pl=0;t<e;){var n=wn[t];wn[t++]=null;var l=wn[t];wn[t++]=null;var i=wn[t];wn[t++]=null;var r=wn[t];if(wn[t++]=null,l!==null&&i!==null){var f=l.pending;f===null?i.next=i:(i.next=f.next,f.next=i),l.pending=i}r!==0&&bh(n,i,r)}}function pr(e,t,n,l){wn[Pl++]=e,wn[Pl++]=t,wn[Pl++]=n,wn[Pl++]=l,Nc|=l,e.lanes|=l,e=e.alternate,e!==null&&(e.lanes|=l)}function wc(e,t,n,l){return pr(e,t,n,l),gr(e)}function ml(e,t){return pr(e,null,null,t),gr(e)}function bh(e,t,n){e.lanes|=n;var l=e.alternate;l!==null&&(l.lanes|=n);for(var i=!1,r=e.return;r!==null;)r.childLanes|=n,l=r.alternate,l!==null&&(l.childLanes|=n),r.tag===22&&(e=r.stateNode,e===null||e._visibility&1||(i=!0)),e=r,r=r.return;return e.tag===3?(r=e.stateNode,i&&t!==null&&(i=31-cn(n),e=r.hiddenUpdates,l=e[i],l===null?e[i]=[t]:l.push(t),t.lane=n|536870912),r):null}function gr(e){if(50<ji)throw ji=0,io=null,Error(u(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Fl={};function Pv(e,t,n,l){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=l,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ft(e,t,n,l){return new Pv(e,t,n,l)}function Sc(e){return e=e.prototype,!(!e||!e.isReactComponent)}function xa(e,t){var n=e.alternate;return n===null?(n=Ft(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&1206910976,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function jh(e,t){e.flags&=1206910978;var n=e.alternate;return n===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=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function yr(e,t,n,l,i,r){var f=0;if(l=e,typeof l=="function")Sc(l)&&(f=1);else if(typeof l=="string")f=S0(e,n,Ut.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(l){case ke:return e=Ft(31,n,t,i),e.elementType=ke,e.lanes=r,e;case ae:return xl(n.children,i,r,t);case O:f=8,i|=24;break;case D:return e=Ft(12,n,t,i|2),e.elementType=D,e.lanes=r,e;case de:return e=Ft(13,n,t,i),e.elementType=de,e.lanes=r,e;case Y:return e=Ft(19,n,t,i),e.elementType=Y,e.lanes=r,e;case Ve:case E:return e=i|32,e=Ft(30,n,t,e),e.elementType=E,e.lanes=r,e.stateNode={autoName:null,paired:null,clones:null,ref:null},e;default:if(typeof l=="object"&&l!==null)switch(l.$$typeof){case F:f=10;break e;case le:f=9;break e;case te:f=11;break e;case re:f=14;break e;case Se:f=16,l=null;break e}f=29,n=Error(u(130,e===null?"null":typeof e,"")),l=null}return t=Ft(f,n,t,i),t.elementType=e,t.type=l,t.lanes=r,t}function xl(e,t,n,l){return e=Ft(7,e,l,t),e.lanes=n,e}function kc(e,t,n){return e=Ft(6,e,null,t),e.lanes=n,e}function Nh(e){var t=Ft(18,null,null,0);return t.stateNode=e,t}function Tc(e,t,n){return t=Ft(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var wh=new WeakMap;function Sn(e,t){if(typeof e=="object"&&e!==null){var n=wh.get(e);return n!==void 0?n:(t={value:e,source:t,stack:be(t)},wh.set(e,t),t)}return{value:e,source:t,stack:be(t)}}var Il=[],Wl=0,vr=null,ei=0,kn=[],Tn=0,Ma=null,Jn=1,Pn="";function pa(e,t){Il[Wl++]=ei,Il[Wl++]=vr,vr=e,ei=t}function Sh(e,t,n){kn[Tn++]=Jn,kn[Tn++]=Pn,kn[Tn++]=Ma,Ma=e;var l=Jn;e=Pn;var i=32-cn(l)-1;l&=~(1<<i),n+=1;var r=32-cn(t)+i;if(30<r){var f=i-i%5;r=(l&(1<<f)-1).toString(32),l>>=f,i-=f,Jn=1<<32-cn(t)+i|n<<i|l,Pn=r+e}else Jn=1<<r|n<<i|l,Pn=e}function br(e){e.return!==null&&(pa(e,1),Sh(e,1,0))}function Cc(e){for(;e===vr;)vr=Il[--Wl],Il[Wl]=null,ei=Il[--Wl],Il[Wl]=null;for(;e===Ma;)Ma=kn[--Tn],kn[Tn]=null,Pn=kn[--Tn],kn[Tn]=null,Jn=kn[--Tn],kn[Tn]=null}function kh(e,t){kn[Tn++]=Jn,kn[Tn++]=Pn,kn[Tn++]=Ma,Jn=t.id,Pn=t.overflow,Ma=e}var kt=null,tt=null,_e=!1,Oa=null,Cn=!1,Ec=Error(u(519));function La(e){var t=Error(u(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw ti(Sn(t,e)),Ec}function Th(e){var t=e.stateNode,n=e.type,l=e.memoizedProps;switch(t[zt]=e,t[Pt]=l,n){case"dialog":Oe("cancel",t),Oe("close",t);break;case"iframe":case"object":case"embed":Oe("load",t);break;case"video":case"audio":for(n=0;n<wi.length;n++)Oe(wi[n],t);break;case"source":Oe("error",t);break;case"img":case"image":case"link":Oe("error",t),Oe("load",t);break;case"details":Oe("toggle",t);break;case"input":Oe("invalid",t),Hf(t,l.value,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name,!0);break;case"select":Oe("invalid",t);break;case"textarea":Oe("invalid",t),qf(t,l.value,l.defaultValue,l.children)}n=l.children,typeof n!="string"&&typeof n!="number"&&typeof n!="bigint"||t.textContent===""+n||l.suppressHydrationWarning===!0||Zx(t.textContent,n)?(l.popover!=null&&(Oe("beforetoggle",t),Oe("toggle",t)),l.onScroll!=null&&Oe("scroll",t),l.onScrollEnd!=null&&Oe("scrollend",t),l.onClick!=null&&(t.onclick=Kn),t=!0):t=!1,t||La(e,!0)}function jr(e){for(kt=e.return;kt;)switch(kt.tag){case 5:case 31:case 13:Cn=!1;return;case 27:case 3:Cn=!0;return;default:kt=kt.return}}function es(e){if(e!==kt)return!1;if(!_e)return jr(e),_e=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!=="form"&&n!=="button")||ld(e.type,e.memoizedProps)),n=!n),n&&tt&&La(e),jr(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(u(317));tt=fp(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(u(317));tt=fp(e)}else t===27?(t=tt,Ia(e.type)?(e=hd,hd=null,tt=e):tt=t):tt=kt?zn(e.stateNode.nextSibling):null;return!0}function pl(){tt=kt=null,_e=!1}function zc(){var e=Oa;return e!==null&&(en===null?en=e:en.push.apply(en,e),Oa=null),e}function ti(e){Oa===null?Oa=[e]:Oa.push(e)}var Rc=Gt(null),gl=null,ga=null;function Ua(e,t,n){Le(Rc,t._currentValue),t._currentValue=n}function ya(e){e._currentValue=Rc.current,rt(Rc)}function Nr(e,t,n){for(;e!==null;){var l=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,l!==null&&(l.childLanes|=t)):l!==null&&(l.childLanes&t)!==t&&(l.childLanes|=t),e===n)break;e=e.return}}function Ac(e,t,n,l){var i=e.child;for(i!==null&&(i.return=e);i!==null;){var r=i.dependencies;if(r!==null){var f=i.child;r=r.firstContext;e:for(;r!==null;){var v=r;r=i;for(var w=0;w<t.length;w++)if(v.context===t[w]){r.lanes|=n,v=r.alternate,v!==null&&(v.lanes|=n),Nr(r.return,n,e),l||(f=null);break e}r=v.next}}else if(i.tag===18){if(f=i.return,f===null)throw Error(u(341));f.lanes|=n,r=f.alternate,r!==null&&(r.lanes|=n),Nr(f,n,e),f=null}else i.tag===13&&i.memoizedState!==null&&i.memoizedState.dehydrated===null?(i.lanes|=n,f=i.alternate,f!==null&&(f.lanes|=n),Nr(i.return,n,e),f=i.child,f=f!==null?f.sibling:null):f=i.child;if(f!==null)f.return=i;else for(f=i;f!==null;){if(f===e){f=null;break}if(i=f.sibling,i!==null){i.return=f.return,f=i;break}f=f.return}i=f}}function yl(e,t,n,l){e=null;for(var i=t,r=!1;i!==null;){if(!r){if((i.flags&524288)!==0)r=!0;else if((i.flags&262144)!==0)break}if(i.tag===10){var f=i.alternate;if(f===null)throw Error(u(387));if(f=f.memoizedProps,f!==null){var v=i.type;dn(i.pendingProps.value,f.value)||(e!==null?e.push(v):e=[v])}}else if(i===ca.current){if(f=i.alternate,f===null)throw Error(u(387));f.memoizedState.memoizedState!==i.memoizedState.memoizedState&&(e!==null?e.push(ks):e=[ks])}i=i.return}return e!==null&&Ac(t,e,n,l),t.flags|=262144,e!==null}function wr(e){for(e=e.firstContext;e!==null;){if(!dn(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function vl(e){gl=e,ga=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Rt(e){return Ch(gl,e)}function Sr(e,t){return gl===null&&vl(e),Ch(e,t)}function Ch(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},ga===null){if(e===null)throw Error(u(308));ga=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else ga=ga.next=t;return n}var Fv=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(n,l){e.push(l)}};this.abort=function(){t.aborted=!0,e.forEach(function(n){return n()})}},Iv=s.unstable_scheduleCallback,Wv=s.unstable_NormalPriority,mt={$$typeof:F,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Dc(){return{controller:new Fv,data:new Map,refCount:0}}function ni(e){e.refCount--,e.refCount===0&&Iv(Wv,function(){e.controller.abort()})}function Eh(e,t){if((e.pendingLanes&4194048)!==0){var n=e.transitionTypes;for(n===null&&(n=e.transitionTypes=[]),e=0;e<t.length;e++){var l=t[e];n.indexOf(l)===-1&&n.push(l)}}}var ai=null;function eb(e){var t=e.transitionTypes;return e.transitionTypes=null,t}var li=null,_c=0,bl=0,ts=null;function tb(e,t){if(li===null){var n=li=[];_c=0,bl=Ju(),ts={status:"pending",value:void 0,then:function(l){n.push(l)}}}return _c++,t.then(zh,zh),t}function zh(){if(--_c===0&&(ai=null,li!==null)){ts!==null&&(ts.status="fulfilled");var e=li;li=null,bl=0,ts=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function nb(e,t){var n=[],l={status:"pending",value:null,reason:null,then:function(i){n.push(i)}};return e.then(function(){l.status="fulfilled",l.value=t;for(var i=0;i<n.length;i++)(0,n[i])(t)},function(i){for(l.status="rejected",l.reason=i,i=0;i<n.length;i++)(0,n[i])(void 0)}),l}var Rh=fe.S;fe.S=function(e,t){if(Nx=rn(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&tb(e,t),ai!==null)for(var n=vs;n!==null;)Eh(n,ai),n=n.next;if(n=e.types,n!==null){for(var l=vs;l!==null;)Eh(l,n),l=l.next;if(bl!==0){l=ai,l===null&&(l=ai=[]);for(var i=0;i<n.length;i++){var r=n[i];l.indexOf(r)===-1&&l.push(r)}}}Rh!==null&&Rh(e,t)};var jl=Gt(null);function Mc(){var e=jl.current;return e!==null?e:et.pooledCache}function kr(e,t){t===null?Le(jl,jl.current):Le(jl,t.pool)}function Ah(){var e=Mc();return e===null?null:{parent:mt._currentValue,pool:e}}var ns=Error(u(460)),Oc=Error(u(474)),Tr=Error(u(542)),Cr={then:function(){}};function Dh(e){return e=e.status,e==="fulfilled"||e==="rejected"}function _h(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(Kn,Kn),t=n),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Oh(e),e===void 0&&!("reason"in t)?Error(u(600)):e;default:if(typeof t.status=="string")t.then(Kn,Kn);else{if(e=et,e!==null&&100<e.shellSuspendCounter)throw Error(u(482));e=t,e.status="pending",e.then(function(l){if(t.status==="pending"){var i=t;i.status="fulfilled",i.value=l}},function(l){if(t.status==="pending"){var i=t;i.status="rejected",i.reason=l}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Oh(e),e}throw wl=t,ns}}function Nl(e){try{var t=e._init;return t(e._payload)}catch(n){throw n!==null&&typeof n=="object"&&typeof n.then=="function"?(wl=n,ns):n}}var wl=null;function Mh(){if(wl===null)throw Error(u(459));var e=wl;return wl=null,e}function Oh(e){if(e===ns||e===Tr)throw Error(u(483))}var as=null,si=0;function Er(e){var t=si;return si+=1,as===null&&(as=[]),_h(as,e,t)}function Ha(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function zr(e,t){throw t.$$typeof===Q?Error(u(525)):(e=Object.prototype.toString.call(t),Error(u(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function Lh(e){function t(U,z){if(e){var q=U.deletions;q===null?(U.deletions=[z],U.flags|=16):q.push(z)}}function n(U,z){if(!e)return null;for(;z!==null;)t(U,z),z=z.sibling;return null}function l(U){for(var z=new Map;U!==null;)U.key===null?z.set(U.index,U):z.set(U.key,U),U=U.sibling;return z}function i(U,z){return U=xa(U,z),U.index=0,U.sibling=null,U}function r(U,z,q){return U.index=q,e?(q=U.alternate,q!==null?(q=q.index,q<z?(U.flags|=2,z):q):(U.flags|=134217730,z)):(U.flags|=1048576,z)}function f(U){return e&&U.alternate===null&&(U.flags|=134217730),U}function v(U,z,q,Z){return z===null||z.tag!==6?(z=kc(q,U.mode,Z),z.return=U,z):(z=i(z,q),z.return=U,z)}function w(U,z,q,Z){var me=q.type;return me===ae?(U=G(U,z,q.props.children,Z,q.key),Ha(U,q),U):z!==null&&(z.elementType===me||typeof me=="object"&&me!==null&&me.$$typeof===Se&&Nl(me)===z.type)?(z=i(z,q.props),Ha(z,q),z.return=U,z):(z=yr(q.type,q.key,q.props,null,U.mode,Z),Ha(z,q),z.return=U,z)}function H(U,z,q,Z){return z===null||z.tag!==4||z.stateNode.containerInfo!==q.containerInfo||z.stateNode.implementation!==q.implementation?(z=Tc(q,U.mode,Z),z.return=U,z):(z=i(z,q.children||[]),z.return=U,z)}function G(U,z,q,Z,me){return z===null||z.tag!==7?(z=xl(q,U.mode,Z,me),z.return=U,z):(z=i(z,q),z.return=U,z)}function J(U,z,q){if(typeof z=="string"&&z!==""||typeof z=="number"||typeof z=="bigint")return z=kc(""+z,U.mode,q),z.return=U,z;if(typeof z=="object"&&z!==null){switch(z.$$typeof){case ce:return q=yr(z.type,z.key,z.props,null,U.mode,q),Ha(q,z),q.return=U,q;case P:return z=Tc(z,U.mode,q),z.return=U,z;case Se:return z=Nl(z),J(U,z,q)}if(De(z)||W(z))return z=xl(z,U.mode,q,null),z.return=U,z;if(typeof z.then=="function")return J(U,Er(z),q);if(z.$$typeof===F)return J(U,Sr(U,z),q);zr(U,z)}return null}function _(U,z,q,Z){var me=z!==null?z.key:null;if(typeof q=="string"&&q!==""||typeof q=="number"||typeof q=="bigint")return me!==null?null:v(U,z,""+q,Z);if(typeof q=="object"&&q!==null){switch(q.$$typeof){case ce:return q.key===me?w(U,z,q,Z):null;case P:return q.key===me?H(U,z,q,Z):null;case Se:return q=Nl(q),_(U,z,q,Z)}if(De(q)||W(q))return me!==null?null:G(U,z,q,Z,null);if(typeof q.then=="function")return _(U,z,Er(q),Z);if(q.$$typeof===F)return _(U,z,Sr(U,q),Z);zr(U,q)}return null}function $(U,z,q,Z,me){if(typeof Z=="string"&&Z!==""||typeof Z=="number"||typeof Z=="bigint")return U=U.get(q)||null,v(z,U,""+Z,me);if(typeof Z=="object"&&Z!==null){switch(Z.$$typeof){case ce:return U=U.get(Z.key===null?q:Z.key)||null,w(z,U,Z,me);case P:return U=U.get(Z.key===null?q:Z.key)||null,H(z,U,Z,me);case Se:return Z=Nl(Z),$(U,z,q,Z,me)}if(De(Z)||W(Z))return U=U.get(q)||null,G(z,U,Z,me,null);if(typeof Z.then=="function")return $(U,z,q,Er(Z),me);if(Z.$$typeof===F)return $(U,z,q,Sr(z,Z),me);zr(z,Z)}return null}function se(U,z,q,Z){for(var me=null,He=null,ge=z,Ne=z=0,gt=null;ge!==null&&Ne<q.length;Ne++){ge.index>Ne?(gt=ge,ge=null):gt=ge.sibling;var qe=_(U,ge,q[Ne],Z);if(qe===null){ge===null&&(ge=gt);break}e&&ge&&qe.alternate===null&&t(U,ge),z=r(qe,z,Ne),He===null?me=qe:He.sibling=qe,He=qe,ge=gt}if(Ne===q.length)return n(U,ge),_e&&pa(U,Ne),me;if(ge===null){for(;Ne<q.length;Ne++)ge=J(U,q[Ne],Z),ge!==null&&(z=r(ge,z,Ne),He===null?me=ge:He.sibling=ge,He=ge);return _e&&pa(U,Ne),me}for(ge=l(ge);Ne<q.length;Ne++)gt=$(ge,U,Ne,q[Ne],Z),gt!==null&&(e&&(qe=gt.alternate,qe!==null&&ge.delete(qe.key===null?Ne:qe.key)),z=r(gt,z,Ne),He===null?me=gt:He.sibling=gt,He=gt);return e&&ge.forEach(function(al){return t(U,al)}),_e&&pa(U,Ne),me}function xe(U,z,q,Z){if(q==null)throw Error(u(151));for(var me=null,He=null,ge=z,Ne=z=0,gt=null,qe=q.next();ge!==null&&!qe.done;Ne++,qe=q.next()){ge.index>Ne?(gt=ge,ge=null):gt=ge.sibling;var al=_(U,ge,qe.value,Z);if(al===null){ge===null&&(ge=gt);break}e&&ge&&al.alternate===null&&t(U,ge),z=r(al,z,Ne),He===null?me=al:He.sibling=al,He=al,ge=gt}if(qe.done)return n(U,ge),_e&&pa(U,Ne),me;if(ge===null){for(;!qe.done;Ne++,qe=q.next())qe=J(U,qe.value,Z),qe!==null&&(z=r(qe,z,Ne),He===null?me=qe:He.sibling=qe,He=qe);return _e&&pa(U,Ne),me}for(ge=l(ge);!qe.done;Ne++,qe=q.next())qe=$(ge,U,Ne,qe.value,Z),qe!==null&&(e&&(gt=qe.alternate,gt!==null&&ge.delete(gt.key===null?Ne:gt.key)),z=r(qe,z,Ne),He===null?me=qe:He.sibling=qe,He=qe);return e&&ge.forEach(function(L0){return t(U,L0)}),_e&&pa(U,Ne),me}function Re(U,z,q,Z){if(typeof q=="object"&&q!==null&&q.type===ae&&q.key===null&&q.props.ref===void 0&&(q=q.props.children),typeof q=="object"&&q!==null){switch(q.$$typeof){case ce:e:{for(var me=q.key;z!==null;){if(z.key===me){if(me=q.type,me===ae){if(z.tag===7){n(U,z.sibling),Z=i(z,q.props.children),Ha(Z,q),Z.return=U,U=Z;break e}}else if(z.elementType===me||typeof me=="object"&&me!==null&&me.$$typeof===Se&&Nl(me)===z.type){n(U,z.sibling),Z=i(z,q.props),Ha(Z,q),Z.return=U,U=Z;break e}n(U,z);break}else t(U,z);z=z.sibling}q.type===ae?(Z=xl(q.props.children,U.mode,Z,q.key),Ha(Z,q),Z.return=U,U=Z):(Z=yr(q.type,q.key,q.props,null,U.mode,Z),Ha(Z,q),Z.return=U,U=Z)}return f(U);case P:e:{for(me=q.key;z!==null;){if(z.key===me)if(z.tag===4&&z.stateNode.containerInfo===q.containerInfo&&z.stateNode.implementation===q.implementation){n(U,z.sibling),Z=i(z,q.children||[]),Z.return=U,U=Z;break e}else{n(U,z);break}else t(U,z);z=z.sibling}Z=Tc(q,U.mode,Z),Z.return=U,U=Z}return f(U);case Se:return q=Nl(q),Re(U,z,q,Z)}if(De(q))return se(U,z,q,Z);if(W(q)){if(me=W(q),typeof me!="function")throw Error(u(150));return q=me.call(q),xe(U,z,q,Z)}if(typeof q.then=="function")return Re(U,z,Er(q),Z);if(q.$$typeof===F)return Re(U,z,Sr(U,q),Z);zr(U,q)}return typeof q=="string"&&q!==""||typeof q=="number"||typeof q=="bigint"?(q=""+q,z!==null&&z.tag===6?(n(U,z.sibling),Z=i(z,q),Z.return=U,U=Z):(n(U,z),Z=kc(q,U.mode,Z),Z.return=U,U=Z),f(U)):n(U,z)}return function(U,z,q,Z){try{si=0;var me=Re(U,z,q,Z);return as=null,me}catch(ge){if(ge===ns||ge===Tr)throw ge;var He=Ft(29,ge,null,U.mode);return He.lanes=Z,He.return=U,He}finally{}}}var Sl=Lh(!0),Uh=Lh(!1),Ba=!1;function Lc(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Uc(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 qa(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function $a(e,t,n){var l=e.updateQueue;if(l===null)return null;if(l=l.shared,(Xe&2)!==0){var i=l.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),l.pending=t,t=gr(e),bh(e,null,n),t}return pr(e,l,t,n),gr(e)}function ii(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194048)!==0)){var l=t.lanes;l&=e.pendingLanes,n|=l,t.lanes=n,Sf(e,n)}}function Hc(e,t){var n=e.updateQueue,l=e.alternate;if(l!==null&&(l=l.updateQueue,n===l)){var i=null,r=null;if(n=n.firstBaseUpdate,n!==null){do{var f={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};r===null?i=r=f:r=r.next=f,n=n.next}while(n!==null);r===null?i=r=t:r=r.next=t}else i=r=t;n={baseState:l.baseState,firstBaseUpdate:i,lastBaseUpdate:r,shared:l.shared,callbacks:l.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var Bc=!1;function ri(){if(Bc){var e=ts;if(e!==null)throw e}}function oi(e,t,n,l){Bc=!1;var i=e.updateQueue;Ba=!1;var r=i.firstBaseUpdate,f=i.lastBaseUpdate,v=i.shared.pending;if(v!==null){i.shared.pending=null;var w=v,H=w.next;w.next=null,f===null?r=H:f.next=H,f=w;var G=e.alternate;G!==null&&(G=G.updateQueue,v=G.lastBaseUpdate,v!==f&&(v===null?G.firstBaseUpdate=H:v.next=H,G.lastBaseUpdate=w))}if(r!==null){var J=i.baseState;f=0,G=H=w=null,v=r;do{var _=v.lane&-536870913,$=_!==v.lane;if($?(Ue&_)===_:(l&_)===_){_!==0&&_===bl&&(Bc=!0),G!==null&&(G=G.next={lane:0,tag:v.tag,payload:v.payload,callback:null,next:null});e:{var se=e,xe=v;_=t;var Re=n;switch(xe.tag){case 1:if(se=xe.payload,typeof se=="function"){J=se.call(Re,J,_);break e}J=se;break e;case 3:se.flags=se.flags&-65537|128;case 0:if(se=xe.payload,_=typeof se=="function"?se.call(Re,J,_):se,_==null)break e;J=L({},J,_);break e;case 2:Ba=!0}}_=v.callback,_!==null&&(e.flags|=64,$&&(e.flags|=8192),$=i.callbacks,$===null?i.callbacks=[_]:$.push(_))}else $={lane:_,tag:v.tag,payload:v.payload,callback:v.callback,next:null},G===null?(H=G=$,w=J):G=G.next=$,f|=_;if(v=v.next,v===null){if(v=i.shared.pending,v===null)break;$=v,v=$.next,$.next=null,i.lastBaseUpdate=$,i.shared.pending=null}}while(!0);G===null&&(w=J),i.baseState=w,i.firstBaseUpdate=H,i.lastBaseUpdate=G,r===null&&(i.shared.lanes=0),Ka|=f,e.lanes=f,e.memoizedState=J}}function Hh(e,t){if(typeof e!="function")throw Error(u(191,e));e.call(t)}function Bh(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)Hh(n[e],t)}var Ga=Gt(null),Rr=Gt(0);function qh(e,t){e=wa,Le(Rr,e),Le(Ga,t),wa=e|t.baseLanes}function qc(){Le(Rr,wa),Le(Ga,Ga.current)}function $c(){wa=Rr.current,rt(Ga),rt(Rr)}var At=Gt(null),Bt=null;function Ya(e){var t=e.alternate;Le(Dt,Dt.current&1),Le(At,e),Bt===null&&(t===null||Ga.current!==null||t.memoizedState!==null)&&(Bt=e)}function Gc(e){Le(Dt,Dt.current),Le(At,e),Bt===null&&(Bt=e)}function $h(e){e.tag===22?(Le(Dt,Dt.current),Le(At,e),Bt===null&&(Bt=e)):Va()}function Va(){Le(Dt,Dt.current),Le(At,At.current)}function fn(e){rt(At),Bt===e&&(Bt=null),rt(Dt)}var Dt=Gt(0);function ci(e,t){Le(At,At.current),Le(Dt,t)}function Yc(e){rt(Dt),rt(At),Bt===e&&(Bt=null)}function Ar(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||dd(n)||fd(n)))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!=="independent"){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 va=0,ze=null,Ie=null,xt=null,Dr=!1,ls=!1,kl=!1,_r=0,ui=0,ss=null,ab=0;function ut(){throw Error(u(321))}function Vc(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!dn(e[n],t[n]))return!1;return!0}function Xc(e,t,n,l,i,r){return va=r,ze=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,fe.H=e===null||e.memoizedState===null?Sm:km,kl=!1,r=n(l,i),kl=!1,ls&&(r=Yh(t,n,l,i)),Gh(e),r}function Gh(e){fe.H=qr;var t=Ie!==null&&Ie.next!==null;if(va=0,xt=Ie=ze=null,Dr=!1,ui=0,ss=null,t)throw Error(u(300));e===null||pt||(e=e.dependencies,e!==null&&wr(e)&&(pt=!0))}function Yh(e,t,n,l){ze=e;var i=0;do{if(ls&&(ss=null),ui=0,ls=!1,25<=i)throw Error(u(301));if(i+=1,xt=Ie=null,e.updateQueue!=null){var r=e.updateQueue;r.lastEffect=null,r.events=null,r.stores=null,r.memoCache!=null&&(r.memoCache.index=0)}fe.H=db,r=t(n,l)}while(ls);return r}function lb(){var e=fe.H,t=e.useState()[0];return t=typeof t.then=="function"?di(t):t,e=e.useState()[0],(Ie!==null?Ie.memoizedState:null)!==e&&(ze.flags|=1024),t}function Qc(){var e=_r!==0;return _r=0,e}function Zc(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function Kc(e){if(Dr){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Dr=!1}va=0,xt=Ie=ze=null,ls=!1,ui=_r=0,ss=null}function Vt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return xt===null?ze.memoizedState=xt=e:xt=xt.next=e,xt}function ht(){if(Ie===null){var e=ze.alternate;e=e!==null?e.memoizedState:null}else e=Ie.next;var t=xt===null?ze.memoizedState:xt.next;if(t!==null)xt=t,Ie=e;else{if(e===null)throw ze.alternate===null?Error(u(467)):Error(u(310));Ie=e,e={memoizedState:Ie.memoizedState,baseState:Ie.baseState,baseQueue:Ie.baseQueue,queue:Ie.queue,next:null},xt===null?ze.memoizedState=xt=e:xt=xt.next=e}return xt}function Mr(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function di(e){var t=ui;return ui+=1,ss===null&&(ss=[]),e=_h(ss,e,t),t=ze,(xt===null?t.memoizedState:xt.next)===null&&(t=t.alternate,fe.H=t===null||t.memoizedState===null?Sm:km),e}function Or(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return di(e);if(e.$$typeof===I)return;if(e.$$typeof===F)return Rt(e)}throw Error(u(438,String(e)))}function Jc(e){var t=null,n=ze.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var l=ze.alternate;l!==null&&(l=l.updateQueue,l!==null&&(l=l.memoCache,l!=null&&(t={data:l.data.map(function(i){return i.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),n===null&&(n=Mr(),ze.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),l=0;l<e;l++)n[l]=$e;return t.index++,n}function ba(e,t){return typeof t=="function"?t(e):t}function Lr(e){var t=ht();return Pc(t,Ie,e)}function Pc(e,t,n){var l=e.queue;if(l===null)throw Error(u(311));l.lastRenderedReducer=n;var i=e.baseQueue,r=l.pending;if(r!==null){if(i!==null){var f=i.next;i.next=r.next,r.next=f}t.baseQueue=i=r,l.pending=null}if(r=e.baseState,i===null)e.memoizedState=r;else{t=i.next;var v=f=null,w=null,H=t,G=!1;do{var J=H.lane&-536870913;if(J!==H.lane?(Ue&J)===J:(va&J)===J){var _=H.revertLane;if(_===0)w!==null&&(w=w.next={lane:0,revertLane:0,gesture:null,action:H.action,hasEagerState:H.hasEagerState,eagerState:H.eagerState,next:null}),J===bl&&(G=!0);else if((va&_)===_){H=H.next,_===bl&&(G=!0);continue}else J={lane:0,revertLane:H.revertLane,gesture:null,action:H.action,hasEagerState:H.hasEagerState,eagerState:H.eagerState,next:null},w===null?(v=w=J,f=r):w=w.next=J,ze.lanes|=_,Ka|=_;J=H.action,kl&&n(r,J),r=H.hasEagerState?H.eagerState:n(r,J)}else _={lane:J,revertLane:H.revertLane,gesture:H.gesture,action:H.action,hasEagerState:H.hasEagerState,eagerState:H.eagerState,next:null},w===null?(v=w=_,f=r):w=w.next=_,ze.lanes|=J,Ka|=J;H=H.next}while(H!==null&&H!==t);if(w===null?f=r:w.next=v,!dn(r,e.memoizedState)&&(pt=!0,G&&(n=ts,n!==null)))throw n;e.memoizedState=r,e.baseState=f,e.baseQueue=w,l.lastRenderedState=r}return i===null&&(l.lanes=0),[e.memoizedState,l.dispatch]}function Fc(e){var t=ht(),n=t.queue;if(n===null)throw Error(u(311));n.lastRenderedReducer=e;var l=n.dispatch,i=n.pending,r=t.memoizedState;if(i!==null){n.pending=null;var f=i=i.next;do r=e(r,f.action),f=f.next;while(f!==i);dn(r,t.memoizedState)||(pt=!0),t.memoizedState=r,t.baseQueue===null&&(t.baseState=r),n.lastRenderedState=r}return[r,l]}function Vh(e,t,n){var l=ze,i=ht(),r=_e;if(r){if(n===void 0)throw Error(u(407));n=n()}else n=t();var f=!dn((Ie||i).memoizedState,n);if(f&&(i.memoizedState=n,pt=!0),i=i.queue,eu(Zh.bind(null,l,i,e),[e]),e=i.getSnapshot!==t||f||xt!==null&&(xt.memoizedState.tag&1)!==0,is(e?9:8,{destroy:void 0},Qh.bind(null,l,i,n,t),null),e){if(l.flags|=2048,et===null)throw Error(u(349));r||(va&127)!==0||Xh(l,t,n)}return n}function Xh(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=ze.updateQueue,t===null?(t=Mr(),ze.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Qh(e,t,n,l){t.value=n,t.getSnapshot=l,Kh(t)&&Jh(e)}function Zh(e,t,n){return n(function(){Kh(t)&&Jh(e)})}function Kh(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!dn(e,n)}catch{return!0}}function Jh(e){var t=ml(e,2);t!==null&&tn(t,e,2)}function Ic(e){var t=Vt();if(typeof e=="function"){var n=e;if(e=n(),kl){Aa(!0);try{n()}finally{Aa(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ba,lastRenderedState:e},t}function Ph(e,t,n,l){return e.baseState=n,Pc(e,Ie,typeof l=="function"?l:ba)}function sb(e,t,n,l,i){if(Br(e))throw Error(u(485));if(e=t.action,e!==null){var r={payload:i,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(f){r.listeners.push(f)}};fe.T!==null?n(!0):r.isTransition=!1,l(r),n=t.pending,n===null?(r.next=t.pending=r,Fh(t,r)):(r.next=n.next,t.pending=n.next=r)}}function Fh(e,t){var n=t.action,l=t.payload,i=e.state;if(t.isTransition){var r=fe.T,f={};f.types=r!==null?r.types:null,fe.T=f;try{var v=n(i,l),w=fe.S;w!==null&&w(f,v),Ih(e,t,v)}catch(H){Wc(e,t,H)}finally{r!==null&&f.types!==null&&(r.types=f.types),fe.T=r}}else try{r=n(i,l),Ih(e,t,r)}catch(H){Wc(e,t,H)}}function Ih(e,t,n){n!==null&&typeof n=="object"&&typeof n.then=="function"?n.then(function(l){Wh(e,t,l)},function(l){return Wc(e,t,l)}):Wh(e,t,n)}function Wh(e,t,n){t.status="fulfilled",t.value=n,em(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,Fh(e,n)))}function Wc(e,t,n){var l=e.pending;if(e.pending=null,l!==null){l=l.next;do t.status="rejected",t.reason=n,em(t),t=t.next;while(t!==l)}e.action=null}function em(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function tm(e,t){return t}function nm(e,t){if(_e){var n=et.formState;if(n!==null){e:{var l=ze;if(_e){if(tt){t:{for(var i=tt,r=Cn;i.nodeType!==8;){if(!r){i=null;break t}if(i=zn(i.nextSibling),i===null){i=null;break t}}r=i.data,i=r==="F!"||r==="F"?i:null}if(i){tt=zn(i.nextSibling),l=i.data==="F!";break e}}La(l)}l=!1}l&&(t=n[0])}}return n=Vt(),n.memoizedState=n.baseState=t,l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:tm,lastRenderedState:t},n.queue=l,n=jm.bind(null,ze,l),l.dispatch=n,l=Ic(!1),r=su.bind(null,ze,!1,l.queue),l=Vt(),i={state:t,dispatch:null,action:e,pending:null},l.queue=i,n=sb.bind(null,ze,i,r,n),i.dispatch=n,l.memoizedState=e,[t,n,!1]}function am(e){var t=ht();return lm(t,Ie,e)}function lm(e,t,n){if(t=Pc(e,t,tm)[0],e=Lr(ba)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var l=di(t)}catch(f){throw f===ns?Tr:f}else l=t;t=ht();var i=t.queue,r=i.dispatch;return n!==t.memoizedState&&(ze.flags|=2048,is(9,{destroy:void 0},ib.bind(null,i,n),null)),[l,r,e]}function ib(e,t){e.action=t}function sm(e){var t=ht(),n=Ie;if(n!==null)return lm(t,n,e);ht(),t=t.memoizedState,n=ht();var l=n.queue.dispatch;return n.memoizedState=e,[t,l,!1]}function is(e,t,n,l){return e={tag:e,create:n,deps:l,inst:t,next:null},t=ze.updateQueue,t===null&&(t=Mr(),ze.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(l=n.next,n.next=e,e.next=l,t.lastEffect=e),e}function im(){return ht().memoizedState}function Ur(e,t,n,l){var i=Vt();ze.flags|=e,i.memoizedState=is(1|t,{destroy:void 0},n,l===void 0?null:l)}function Hr(e,t,n,l){var i=ht();l=l===void 0?null:l;var r=i.memoizedState.inst;Ie!==null&&l!==null&&Vc(l,Ie.memoizedState.deps)?i.memoizedState=is(t,r,n,l):(ze.flags|=e,i.memoizedState=is(1|t,r,n,l))}function rm(e,t){Ur(8390656,8,e,t)}function eu(e,t){Hr(2048,8,e,t)}function rb(e){ze.flags|=4;var t=ze.updateQueue;if(t===null)t=Mr(),ze.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function om(e){var t=ht().memoizedState;return rb({ref:t,nextImpl:e}),function(){if((Xe&2)!==0)throw Error(u(440));return t.impl.apply(void 0,arguments)}}function cm(e,t){return Hr(4,2,e,t)}function um(e,t){return Hr(4,4,e,t)}function dm(e,t){if(typeof t=="function"){e=e();var n=t(e);return function(){typeof n=="function"?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function fm(e,t,n){n=n!=null?n.concat([e]):null,Hr(4,4,dm.bind(null,t,e),n)}function tu(){}function hm(e,t){var n=ht();t=t===void 0?null:t;var l=n.memoizedState;return t!==null&&Vc(t,l[1])?l[0]:(n.memoizedState=[e,t],e)}function mm(e,t){var n=ht();t=t===void 0?null:t;var l=n.memoizedState;if(t!==null&&Vc(t,l[1]))return l[0];if(l=e(),kl){Aa(!0);try{e()}finally{Aa(!1)}}return n.memoizedState=[l,t],l}function nu(e,t,n){return n===void 0||(va&1073741824)!==0&&(Ue&261930)===0?e.memoizedState=t:(e.memoizedState=n,e=Sx(),ze.lanes|=e,Ka|=e,n)}function xm(e,t,n,l){return dn(n,t)?n:Ga.current!==null?(e=nu(e,n,l),dn(e,t)||(pt=!0),e):(va&106)===0||(va&1073741824)!==0&&(Ue&261930)===0?(pt=!0,e.memoizedState=n):(e=Sx(),ze.lanes|=e,Ka|=e,t)}function pm(e,t,n,l,i){var r=ye.p;ye.p=r!==0&&8>r?r:8;var f=fe.T,v={};v.types=f!==null?f.types:null,fe.T=v,su(e,!1,t,n);try{var w=i(),H=fe.S;if(H!==null&&H(v,w),w!==null&&typeof w=="object"&&typeof w.then=="function"){var G=nb(w,l);fi(e,t,G,pn(e))}else fi(e,t,l,pn(e))}catch(J){fi(e,t,{then:function(){},status:"rejected",reason:J},pn())}finally{ye.p=r,f!==null&&v.types!==null&&(f.types=v.types),fe.T=f}}function ob(){}function au(e,t,n,l){if(e.tag!==5)throw Error(u(476));var i=gm(e).queue;pm(e,i,t,$t,n===null?ob:function(){return ym(e),n(l)})}function gm(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:$t,baseState:$t,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ba,lastRenderedState:$t},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ba,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function ym(e){var t=gm(e);t.next===null&&(t=e.alternate.memoizedState),fi(e,t.next.queue,{},pn())}function lu(){return Rt(ks)}function vm(){return ht().memoizedState}function bm(){return ht().memoizedState}function cb(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=pn();e=qa(n);var l=$a(t,e,n);l!==null&&(tn(l,t,n),ii(l,t,n)),t={cache:Dc()},e.payload=t;return}t=t.return}}function ub(e,t,n){var l=pn();n={lane:l,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Br(e)?Nm(t,n):(n=wc(e,t,n,l),n!==null&&(tn(n,e,l),wm(n,t,l)))}function jm(e,t,n){var l=pn();fi(e,t,n,l)}function fi(e,t,n,l){var i={lane:l,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Br(e))Nm(t,i);else{var r=e.alternate;if(e.lanes===0&&(r===null||r.lanes===0)&&(r=t.lastRenderedReducer,r!==null))try{var f=t.lastRenderedState,v=r(f,n);if(i.hasEagerState=!0,i.eagerState=v,dn(v,f))return pr(e,t,i,0),et===null&&xr(),!1}catch{}finally{}if(n=wc(e,t,i,l),n!==null)return tn(n,e,l),wm(n,t,l),!0}return!1}function su(e,t,n,l){if(l={lane:2,revertLane:Ju(),gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},Br(e)){if(t)throw Error(u(479))}else t=wc(e,n,l,2),t!==null&&tn(t,e,2)}function Br(e){var t=e.alternate;return e===ze||t!==null&&t===ze}function Nm(e,t){ls=Dr=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function wm(e,t,n){if((n&4194048)!==0){var l=t.lanes;l&=e.pendingLanes,n|=l,t.lanes=n,Sf(e,n)}}var qr={readContext:Rt,use:Or,useCallback:ut,useContext:ut,useEffect:ut,useImperativeHandle:ut,useLayoutEffect:ut,useInsertionEffect:ut,useMemo:ut,useReducer:ut,useRef:ut,useState:ut,useDebugValue:ut,useDeferredValue:ut,useTransition:ut,useSyncExternalStore:ut,useId:ut,useHostTransitionStatus:ut,useFormState:ut,useActionState:ut,useOptimistic:ut,useMemoCache:ut,useCacheRefresh:ut,useEffectEvent:ut},Sm={readContext:Rt,use:Or,useCallback:function(e,t){return Vt().memoizedState=[e,t===void 0?null:t],e},useContext:Rt,useEffect:rm,useImperativeHandle:function(e,t,n){n=n!=null?n.concat([e]):null,Ur(4194308,4,dm.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Ur(4194308,4,e,t)},useInsertionEffect:function(e,t){Ur(4,2,e,t)},useMemo:function(e,t){var n=Vt();t=t===void 0?null:t;var l=e();if(kl){Aa(!0);try{e()}finally{Aa(!1)}}return n.memoizedState=[l,t],l},useReducer:function(e,t,n){var l=Vt();if(n!==void 0){var i=n(t);if(kl){Aa(!0);try{n(t)}finally{Aa(!1)}}}else i=t;return l.memoizedState=l.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},l.queue=e,e=e.dispatch=ub.bind(null,ze,e),[l.memoizedState,e]},useRef:function(e){var t=Vt();return e={current:e},t.memoizedState=e},useState:function(e){e=Ic(e);var t=e.queue,n=jm.bind(null,ze,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:tu,useDeferredValue:function(e,t){var n=Vt();return nu(n,e,t)},useTransition:function(){var e=Ic(!1);return e=pm.bind(null,ze,e.queue,!0,!1),Vt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var l=ze,i=Vt();if(_e){if(n===void 0)throw Error(u(407));n=n()}else{if(n=t(),et===null)throw Error(u(349));(Ue&127)!==0||Xh(l,t,n)}i.memoizedState=n;var r={value:n,getSnapshot:t};return i.queue=r,rm(Zh.bind(null,l,r,e),[e]),l.flags|=2048,is(9,{destroy:void 0},Qh.bind(null,l,r,n,t),null),n},useId:function(){var e=Vt(),t=et.identifierPrefix;if(_e){var n=Pn,l=Jn;n=(l&~(1<<32-cn(l)-1)).toString(32)+n,t="_"+t+"R_"+n,n=_r++,0<n&&(t+="H"+n.toString(32)),t+="_"}else n=ab++,t="_"+t+"r_"+n.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:lu,useFormState:nm,useActionState:nm,useOptimistic:function(e){var t=Vt();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=su.bind(null,ze,!0,n),n.dispatch=t,[e,t]},useMemoCache:Jc,useCacheRefresh:function(){return Vt().memoizedState=cb.bind(null,ze)},useEffectEvent:function(e){var t=Vt(),n={impl:e};return t.memoizedState=n,function(){if((Xe&2)!==0)throw Error(u(440));return n.impl.apply(void 0,arguments)}}},km={readContext:Rt,use:Or,useCallback:hm,useContext:Rt,useEffect:eu,useImperativeHandle:fm,useInsertionEffect:cm,useLayoutEffect:um,useMemo:mm,useReducer:Lr,useRef:im,useState:function(){return Lr(ba)},useDebugValue:tu,useDeferredValue:function(e,t){var n=ht();return xm(n,Ie.memoizedState,e,t)},useTransition:function(){var e=Lr(ba)[0],t=ht().memoizedState;return[typeof e=="boolean"?e:di(e),t]},useSyncExternalStore:Vh,useId:vm,useHostTransitionStatus:lu,useFormState:am,useActionState:am,useOptimistic:function(e,t){var n=ht();return Ph(n,Ie,e,t)},useMemoCache:Jc,useCacheRefresh:bm,useEffectEvent:om},db={readContext:Rt,use:Or,useCallback:hm,useContext:Rt,useEffect:eu,useImperativeHandle:fm,useInsertionEffect:cm,useLayoutEffect:um,useMemo:mm,useReducer:Fc,useRef:im,useState:function(){return Fc(ba)},useDebugValue:tu,useDeferredValue:function(e,t){var n=ht();return Ie===null?nu(n,e,t):xm(n,Ie.memoizedState,e,t)},useTransition:function(){var e=Fc(ba)[0],t=ht().memoizedState;return[typeof e=="boolean"?e:di(e),t]},useSyncExternalStore:Vh,useId:vm,useHostTransitionStatus:lu,useFormState:sm,useActionState:sm,useOptimistic:function(e,t){var n=ht();return Ie!==null?Ph(n,Ie,e,t):(n.baseState=e,[e,n.queue.dispatch])},useMemoCache:Jc,useCacheRefresh:bm,useEffectEvent:om};function iu(e,t,n,l){t=e.memoizedState,n=n(l,t),n=n==null?t:L({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var ru={enqueueSetState:function(e,t,n){e=e._reactInternals;var l=pn(),i=qa(l);i.payload=t,n!=null&&(i.callback=n),t=$a(e,i,l),t!==null&&(tn(t,e,l),ii(t,e,l))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var l=pn(),i=qa(l);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=$a(e,i,l),t!==null&&(tn(t,e,l),ii(t,e,l))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=pn(),l=qa(n);l.tag=2,t!=null&&(l.callback=t),t=$a(e,l,n),t!==null&&(tn(t,e,n),ii(t,e,n))}};function Tm(e,t,n,l,i,r,f){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(l,r,f):t.prototype&&t.prototype.isPureReactComponent?!Is(n,l)||!Is(i,r):!0}function Cm(e,t,n,l){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,l),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,l),t.state!==e&&ru.enqueueReplaceState(t,t.state,null)}function Tl(e,t){var n=t;if("ref"in t){n={};for(var l in t)l!=="ref"&&(n[l]=t[l])}if(e=e.defaultProps){n===t&&(n=L({},n));for(var i in e)n[i]===void 0&&(n[i]=e[i])}return n}function Em(e){mr(e)}function zm(e){console.error(e)}function Rm(e){mr(e)}function $r(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(l){setTimeout(function(){throw l})}}function Am(e,t,n){try{var l=e.onCaughtError;l(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(i){setTimeout(function(){throw i})}}function ou(e,t,n){return n=qa(n),n.tag=3,n.payload={element:null},n.callback=function(){$r(e,t)},n}function Dm(e){return e=qa(e),e.tag=3,e}function _m(e,t,n,l){var i=n.type.getDerivedStateFromError;if(typeof i=="function"){var r=l.value;e.payload=function(){return i(r)},e.callback=function(){Am(t,n,l)}}var f=n.stateNode;f!==null&&typeof f.componentDidCatch=="function"&&(e.callback=function(){Am(t,n,l),typeof i!="function"&&(Ja===null?Ja=new Set([this]):Ja.add(this));var v=l.stack;this.componentDidCatch(l.value,{componentStack:v!==null?v:""})})}function fb(e,t,n,l,i){if(n.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){if(t=n.alternate,t!==null&&yl(t,n,i,!0),n=At.current,n!==null){switch(n.tag){case 31:case 13:case 19:return Bt===null?oo():n.alternate===null&&dt===0&&(dt=3),n.flags&=-257,n.flags|=65536,n.lanes=i,l===Cr?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([l]):t.add(l),Qu(e,l,i)),!1;case 22:return n.flags|=65536,l===Cr?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([l])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([l]):n.add(l)),Qu(e,l,i)),!1}throw Error(u(435,n.tag))}return Qu(e,l,i),oo(),!1}if(_e)return t=At.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=i,l!==Ec&&(e=Error(u(422),{cause:l}),ti(Sn(e,n)))):(l!==Ec&&(t=Error(u(423),{cause:l}),ti(Sn(t,n))),e=e.current.alternate,e.flags|=65536,i&=-i,e.lanes|=i,l=Sn(l,n),i=ou(e.stateNode,l,i),Hc(e,i),dt!==4&&(dt=2)),!1;var r=Error(u(520),{cause:l});if(r=Sn(r,n),bi===null?bi=[r]:bi.push(r),dt!==4&&(dt=2),t===null)return!0;l=Sn(l,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=i&-i,n.lanes|=e,e=ou(n.stateNode,l,e),Hc(n,e),!1;case 1:if(t=n.type,r=n.stateNode,(n.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||r!==null&&typeof r.componentDidCatch=="function"&&(Ja===null||!Ja.has(r))))return n.flags|=65536,i&=-i,n.lanes|=i,i=Dm(i),_m(i,e,n,l),Hc(n,i),!1;break;case 22:if(n.memoizedState!==null)return n.flags|=65536,!1}n=n.return}while(n!==null);return!1}var cu=Error(u(461)),pt=!1;function vt(e,t,n,l){t.child=e===null?Uh(t,null,n,l):Sl(t,e.child,n,l)}function Mm(e,t,n,l,i){n=n.render;var r=t.ref;if("ref"in l){var f={};for(var v in l)v!=="ref"&&(f[v]=l[v])}else f=l;return vl(t),l=Xc(e,t,n,f,r,i),v=Qc(),e!==null&&!pt?(Zc(e,t,i),ja(e,t,i)):(_e&&v&&br(t),t.flags|=1,vt(e,t,l,i),t.child)}function Om(e,t,n,l,i){if(e===null){var r=n.type;return typeof r=="function"&&!Sc(r)&&r.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=r,Lm(e,t,r,l,i)):(e=yr(n.type,null,l,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(r=e.child,!gu(e,i)){var f=r.memoizedProps;if(n=n.compare,n=n!==null?n:Is,n(f,l)&&e.ref===t.ref)return ja(e,t,i)}return t.flags|=1,e=xa(r,l),e.ref=t.ref,e.return=t,t.child=e}function Lm(e,t,n,l,i){if(e!==null){var r=e.memoizedProps;if(Is(r,l)&&e.ref===t.ref)if(pt=!1,t.pendingProps=l=r,gu(e,i))(e.flags&131072)!==0&&(pt=!0);else return t.lanes=e.lanes,ja(e,t,i)}return uu(e,t,n,l,i)}function Um(e,t,n,l){var i=l.children,r=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),l.mode==="hidden"){if((t.flags&128)!==0){if(r=r!==null?r.baseLanes|n:n,e!==null){for(l=t.child=e.child,i=0;l!==null;)i=i|l.lanes|l.childLanes,l=l.sibling;l=i&~r}else l=0,t.child=null;return Hm(e,t,r,n,l)}if((n&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&kr(t,r!==null?r.cachePool:null),r!==null?qh(t,r):qc(),$h(t);else return l=t.lanes=536870912,Hm(e,t,r!==null?r.baseLanes|n:n,n,l)}else r!==null?(kr(t,r.cachePool),qh(t,r),Va(),t.memoizedState=null):(e!==null&&kr(t,null),qc(),Va());return vt(e,t,i,n),t.child}function hi(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Hm(e,t,n,l,i){var r=Mc();return r=r===null?null:{parent:mt._currentValue,pool:r},t.memoizedState={baseLanes:n,cachePool:r},e!==null&&kr(t,null),qc(),$h(t),e!==null&&yl(e,t,l,!0),t.childLanes=i,null}function Gr(e,t){return t=Yr({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Bm(e,t,n){return Sl(t,e.child,null,n),e=Gr(t,t.pendingProps),e.flags|=2,fn(t),t.memoizedState=null,e}function hb(e,t,n){var l=t.pendingProps,i=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(_e){if(l.mode==="hidden")return e=Gr(t,l),t.lanes=536870912,e.memoizedState={baseLanes:0,cachePool:null},hi(null,e);if(Gc(t),(e=tt)?(e=dp(e,Cn),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ma!==null?{id:Jn,overflow:Pn}:null,retryLane:536870912,hydrationErrors:null},n=Nh(e),n.return=t,t.child=n,kt=t,tt=null)):e=null,e===null)throw La(t);return t.lanes=536870912,null}return Gr(t,l)}var r=e.memoizedState;if(r!==null){var f=r.dehydrated;if(Gc(t),i)if(t.flags&256)t.flags&=-257,t=Bm(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(u(558));else if(pt||yl(e,t,n,!1),i=(n&e.childLanes)!==0,pt||i){if(Ga.current===null){if(l=et,l!==null&&(f=kf(l,n),f!==0&&f!==r.retryLane))throw r.retryLane=f,ml(e,f),tn(l,e,f),cu;oo()}t=Bm(e,t,n)}else e=r.treeContext,tt=zn(f.nextSibling),kt=t,_e=!0,Oa=null,Cn=!1,e!==null&&kh(t,e),t=Gr(t,l),t.flags|=134221824;return t}return e=xa(e.child,{mode:l.mode,children:l.children}),e.ref=t.ref,t.child=e,e.return=t,e}function rs(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!="function"&&typeof n!="object")throw Error(u(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function uu(e,t,n,l,i){return vl(t),n=Xc(e,t,n,l,void 0,i),l=Qc(),e!==null&&!pt?(Zc(e,t,i),ja(e,t,i)):(_e&&l&&br(t),t.flags|=1,vt(e,t,n,i),t.child)}function qm(e,t,n,l,i,r){return vl(t),t.updateQueue=null,n=Yh(t,l,n,i),Gh(e),l=Qc(),e!==null&&!pt?(Zc(e,t,r),ja(e,t,r)):(_e&&l&&br(t),t.flags|=1,vt(e,t,n,r),t.child)}function $m(e,t,n,l,i){if(vl(t),t.stateNode===null){var r=Fl,f=n.contextType;typeof f=="object"&&f!==null&&(r=Rt(f)),r=new n(l,r),t.memoizedState=r.state!==null&&r.state!==void 0?r.state:null,r.updater=ru,t.stateNode=r,r._reactInternals=t,r=t.stateNode,r.props=l,r.state=t.memoizedState,r.refs={},Lc(t),f=n.contextType,r.context=typeof f=="object"&&f!==null?Rt(f):Fl,r.state=t.memoizedState,f=n.getDerivedStateFromProps,typeof f=="function"&&(iu(t,n,f,l),r.state=t.memoizedState),typeof n.getDerivedStateFromProps=="function"||typeof r.getSnapshotBeforeUpdate=="function"||typeof r.UNSAFE_componentWillMount!="function"&&typeof r.componentWillMount!="function"||(f=r.state,typeof r.componentWillMount=="function"&&r.componentWillMount(),typeof r.UNSAFE_componentWillMount=="function"&&r.UNSAFE_componentWillMount(),f!==r.state&&ru.enqueueReplaceState(r,r.state,null),oi(t,l,r,i),ri(),r.state=t.memoizedState),typeof r.componentDidMount=="function"&&(t.flags|=4194308),l=!0}else if(e===null){r=t.stateNode;var v=t.memoizedProps,w=Tl(n,v);r.props=w;var H=r.context,G=n.contextType;f=Fl,typeof G=="object"&&G!==null&&(f=Rt(G));var J=n.getDerivedStateFromProps;G=typeof J=="function"||typeof r.getSnapshotBeforeUpdate=="function",v=t.pendingProps!==v,G||typeof r.UNSAFE_componentWillReceiveProps!="function"&&typeof r.componentWillReceiveProps!="function"||(v||H!==f)&&Cm(t,r,l,f),Ba=!1;var _=t.memoizedState;r.state=_,oi(t,l,r,i),ri(),H=t.memoizedState,v||_!==H||Ba?(typeof J=="function"&&(iu(t,n,J,l),H=t.memoizedState),(w=Ba||Tm(t,n,w,l,_,H,f))?(G||typeof r.UNSAFE_componentWillMount!="function"&&typeof r.componentWillMount!="function"||(typeof r.componentWillMount=="function"&&r.componentWillMount(),typeof r.UNSAFE_componentWillMount=="function"&&r.UNSAFE_componentWillMount()),typeof r.componentDidMount=="function"&&(t.flags|=4194308)):(typeof r.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=l,t.memoizedState=H),r.props=l,r.state=H,r.context=f,l=w):(typeof r.componentDidMount=="function"&&(t.flags|=4194308),l=!1)}else{r=t.stateNode,Uc(e,t),f=t.memoizedProps,G=Tl(n,f),r.props=G,J=t.pendingProps,_=r.context,H=n.contextType,w=Fl,typeof H=="object"&&H!==null&&(w=Rt(H)),v=n.getDerivedStateFromProps,(H=typeof v=="function"||typeof r.getSnapshotBeforeUpdate=="function")||typeof r.UNSAFE_componentWillReceiveProps!="function"&&typeof r.componentWillReceiveProps!="function"||(f!==J||_!==w)&&Cm(t,r,l,w),Ba=!1,_=t.memoizedState,r.state=_,oi(t,l,r,i),ri();var $=t.memoizedState;f!==J||_!==$||Ba||e!==null&&e.dependencies!==null&&wr(e.dependencies)?(typeof v=="function"&&(iu(t,n,v,l),$=t.memoizedState),(G=Ba||Tm(t,n,G,l,_,$,w)||e!==null&&e.dependencies!==null&&wr(e.dependencies))?(H||typeof r.UNSAFE_componentWillUpdate!="function"&&typeof r.componentWillUpdate!="function"||(typeof r.componentWillUpdate=="function"&&r.componentWillUpdate(l,$,w),typeof r.UNSAFE_componentWillUpdate=="function"&&r.UNSAFE_componentWillUpdate(l,$,w)),typeof r.componentDidUpdate=="function"&&(t.flags|=4),typeof r.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof r.componentDidUpdate!="function"||f===e.memoizedProps&&_===e.memoizedState||(t.flags|=4),typeof r.getSnapshotBeforeUpdate!="function"||f===e.memoizedProps&&_===e.memoizedState||(t.flags|=1024),t.memoizedProps=l,t.memoizedState=$),r.props=l,r.state=$,r.context=w,l=G):(typeof r.componentDidUpdate!="function"||f===e.memoizedProps&&_===e.memoizedState||(t.flags|=4),typeof r.getSnapshotBeforeUpdate!="function"||f===e.memoizedProps&&_===e.memoizedState||(t.flags|=1024),l=!1)}return r=l,rs(e,t),l=(t.flags&128)!==0,r||l?(r=t.stateNode,n=l&&typeof n.getDerivedStateFromError!="function"?null:r.render(),t.flags|=1,e!==null&&l?(t.child=Sl(t,e.child,null,i),t.child=Sl(t,null,n,i)):vt(e,t,n,i),t.memoizedState=r.state,e=t.child):e=ja(e,t,i),e}function Gm(e,t,n,l){return pl(),t.flags|=256,vt(e,t,n,l),t.child}var du={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function fu(e){return{baseLanes:e,cachePool:Ah()}}function hu(e,t,n){return e=e!==null?e.childLanes&~n:0,t&&(e|=xn),e}function Ym(e,t,n){var l=t.pendingProps,i=!1,r=(t.flags&128)!==0,f;if((f=r)||(f=e!==null&&e.memoizedState===null?!1:(Dt.current&2)!==0),f&&(i=!0,t.flags&=-129),f=(t.flags&32)!==0,t.flags&=-33,e===null){if(_e){if(i?Ya(t):Va(),(e=tt)?(e=dp(e,Cn),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ma!==null?{id:Jn,overflow:Pn}:null,retryLane:536870912,hydrationErrors:null},n=Nh(e),n.return=t,t.child=n,kt=t,tt=null)):e=null,e===null)throw La(t);return fd(e)?t.lanes=32:t.lanes=536870912,null}return r=l.children,l=l.fallback,i?(Va(),i=t.mode,r=Yr({mode:"hidden",children:r},i),l=xl(l,i,n,null),r.return=t,l.return=t,r.sibling=l,t.child=r,l=t.child,l.memoizedState=fu(n),l.childLanes=hu(e,f,n),t.memoizedState=du,hi(null,l)):(Ya(t),mu(t,r))}var v=e.memoizedState;if(v!==null){var w=v.dehydrated;if(w!==null)return mb(e,t,r,f,l,w,v,n)}return i?(Va(),i=l.fallback,r=t.mode,v=e.child,w=v.sibling,l=xa(v,{mode:"hidden",children:l.children}),l.subtreeFlags=v.subtreeFlags&1206910976,w!==null?i=xa(w,i):(i=xl(i,r,n,null),i.flags|=2),i.return=t,l.return=t,l.sibling=i,t.child=l,hi(null,l),l=t.child,i=e.child.memoizedState,i===null?i=fu(n):(r=i.cachePool,r!==null?(v=mt._currentValue,r=r.parent!==v?{parent:v,pool:v}:r):r=Ah(),i={baseLanes:i.baseLanes|n,cachePool:r}),l.memoizedState=i,l.childLanes=hu(e,f,n),t.memoizedState=du,hi(e.child,l)):(Ya(t),n=e.child,e=n.sibling,n=xa(n,{mode:"visible",children:l.children}),n.return=t,n.sibling=null,e!==null&&(f=t.deletions,f===null?(t.deletions=[e],t.flags|=16):f.push(e)),t.child=n,t.memoizedState=null,n)}function mu(e,t){return t=Yr({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Yr(e,t){return e=Ft(22,e,null,t),e.lanes=0,e}function Vr(e,t,n){return Sl(t,e.child,null,n),e=mu(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function mb(e,t,n,l,i,r,f,v){if(n)return t.flags&256?(Ya(t),t.flags&=-257,Vr(e,t,v)):t.memoizedState!==null?(Va(),t.child=e.child,t.flags|=128,null):(Va(),r=i.fallback,f=t.mode,i=Yr({mode:"visible",children:i.children},f),r=xl(r,f,v,null),r.flags|=2,i.return=t,r.return=t,i.sibling=r,t.child=i,Sl(t,e.child,null,v),i=t.child,i.memoizedState=fu(v),i.childLanes=hu(e,l,v),t.memoizedState=du,hi(null,i));if(Ya(t),fd(r)){if(l=r.nextSibling&&r.nextSibling.dataset,l)var w=l.dgst;return l=w,l!==""&&(i=Error(u(419)),i.stack="",i.digest=l,ti({value:i,source:null,stack:null})),Vr(e,t,v)}if(pt||yl(e,t,v,!1),l=(v&e.childLanes)!==0,pt||l){if(Ga.current!==null)return Vr(e,t,v);if(l=et,l!==null&&(i=kf(l,v),i!==0&&i!==f.retryLane))throw f.retryLane=i,ml(e,i),tn(l,e,i),cu;return dd(r)||oo(),Vr(e,t,v)}return dd(r)?(t.flags|=192,t.child=e.child,null):(e=f.treeContext,tt=zn(r.nextSibling),kt=t,_e=!0,Oa=null,Cn=!1,e!==null&&kh(t,e),t=mu(t,i.children),t.flags|=134221824,t)}function Vm(e,t,n){e.lanes|=t;var l=e.alternate;l!==null&&(l.lanes|=t),Nr(e.return,t,n)}function Xm(e){for(var t=null;e!==null;){var n=e.alternate;n!==null&&Ar(n)===null&&(t=e),e=e.sibling}return t}function Xr(e,t,n,l,i,r){var f=e.memoizedState;f===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:l,tail:n,tailMode:i,treeForkCount:r}:(f.isBackwards=t,f.rendering=null,f.renderingStartTime=0,f.last=l,f.tail=n,f.tailMode=i,f.treeForkCount=r)}function xu(e){var t=e.child;for(e.child=null;t!==null;){var n=t.sibling;t.sibling=e.child,e.child=t,t=n}}function pu(e,t,n){var l=t.pendingProps,i=l.revealOrder,r=l.tail;l=l.children;var f=Dt.current;if(t.flags&128)return ci(t,f),null;var v=(f&2)!==0;if(v?(f=f&1|2,t.flags|=128):f&=1,ci(t,f),i==="backwards"&&e!==null?(xu(e),vt(e,t,l,n),xu(e)):vt(e,t,l,n),l=_e?ei:0,!v&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Vm(e,n,t);else if(e.tag===19)Vm(e,n,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"backwards":n=Xm(t.child),n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null,xu(t)),Xr(t,!0,i,null,r,l);break;case"unstable_legacy-backwards":for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&Ar(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Xr(t,!0,n,null,r,l);break;case"together":Xr(t,!1,null,null,void 0,l);break;case"independent":t.memoizedState=null;break;default:n=Xm(t.child),n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Xr(t,!1,i,n,r,l)}return t.child}function Qm(e,t,n){var l=t.pendingProps;return Ua(t,t.type,l.value),vt(e,t,l.children,n),t.child}function ja(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Ka|=t.lanes,(n&t.childLanes)===0)if(e!==null){if(yl(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(u(153));if(t.child!==null){for(e=t.child,n=xa(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=xa(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function gu(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&wr(e)))}function xb(e,t,n){switch(t.tag){case 3:Zn(t,t.stateNode.containerInfo),Ua(t,mt,e.memoizedState.cache),pl();break;case 27:case 5:V(t);break;case 4:Zn(t,t.stateNode.containerInfo);break;case 10:Ua(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Gc(t),null;break;case 13:var l=t.memoizedState;if(l!==null){if(l.dehydrated!==null)return Ya(t),t.flags|=128,null;l=yl(e,t,n,!1);var i=t.child.childLanes;return l||(n&i)!==0?Ym(e,t,n):(Ya(t),e=ja(e,t,n),e!==null?e.sibling:null)}Ya(t);break;case 19:if(t.flags&128)return pu(e,t,n);if(i=(e.flags&128)!==0,l=(n&t.childLanes)!==0,l||(yl(e,t,n,!1),l=(n&t.childLanes)!==0),i){if(l)return pu(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),ci(t,Dt.current),l)break;return null;case 22:return t.lanes=0,Um(e,t,n,t.pendingProps);case 24:Ua(t,mt,e.memoizedState.cache)}return ja(e,t,n)}function Zm(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)pt=!0;else{if(!gu(e,n)&&(t.flags&128)===0)return pt=!1,xb(e,t,n);pt=(e.flags&131072)!==0}else pt=!1,_e&&(t.flags&1048576)!==0&&Sh(t,ei,t.index);switch(t.lanes=0,t.tag){case 16:e:{var l=t.pendingProps;if(e=Nl(t.elementType),t.type=e,typeof e=="function")Sc(e)?(l=Tl(e,l),t.tag=1,t=$m(null,t,e,l,n)):(t.tag=0,t=uu(null,t,e,l,n));else{if(e!=null){var i=e.$$typeof;if(i===te){t.tag=11,t=Mm(null,t,e,l,n);break e}else if(i===re){t.tag=14,t=Om(null,t,e,l,n);break e}else if(i===F){t.tag=10,t.type=e,t=Qm(null,t,n);break e}}throw t=Ce(e)||e,Error(u(306,t,""))}}return t;case 0:return uu(e,t,t.type,t.pendingProps,n);case 1:return l=t.type,i=Tl(l,t.pendingProps),$m(e,t,l,i,n);case 3:e:{if(Zn(t,t.stateNode.containerInfo),e===null)throw Error(u(387));l=t.pendingProps;var r=t.memoizedState;i=r.element,Uc(e,t),oi(t,l,null,n);var f=t.memoizedState;if(l=f.cache,Ua(t,mt,l),l!==r.cache&&Ac(t,[mt],n,!0),ri(),l=f.element,r.isDehydrated)if(r={element:l,isDehydrated:!1,cache:f.cache},t.updateQueue.baseState=r,t.memoizedState=r,t.flags&256){t=Gm(e,t,l,n);break e}else if(l!==i){i=Sn(Error(u(424)),t),ti(i),t=Gm(e,t,l,n);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(tt=zn(e.firstChild),kt=t,_e=!0,Oa=null,Cn=!0,n=Uh(t,null,l,n),t.child=n;n;)n.flags=n.flags&-3|134221824,n=n.sibling}else{if(pl(),l===i){t=ja(e,t,n);break e}vt(e,t,l,n)}t=t.child}return t;case 26:return rs(e,t),e===null?(n=yp(t.type,null,t.pendingProps,null))?t.memoizedState=n:_e||(t.stateNode=Fx(t.type,t.pendingProps,Kt.current,t)):t.memoizedState=yp(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return V(t),e===null&&_e&&(l=t.stateNode=mp(t.type,t.pendingProps,Kt.current),kt=t,Cn=!0,i=tt,Ia(t.type)?(hd=i,tt=zn(l.firstChild)):tt=i),vt(e,t,t.pendingProps.children,n),rs(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&_e&&((i=l=tt)&&(l=c0(l,t.type,t.pendingProps,Cn),l!==null?(t.stateNode=l,kt=t,tt=zn(l.firstChild),Cn=!1,i=!0):i=!1),i||La(t)),V(t),i=t.type,r=t.pendingProps,f=e!==null?e.memoizedProps:null,l=r.children,ld(i,r)?l=null:f!==null&&ld(i,f)&&(t.flags|=32),t.memoizedState!==null&&(i=Xc(e,t,lb,null,null,n),ks._currentValue=i),rs(e,t),vt(e,t,l,n),t.child;case 6:return e===null&&_e&&((e=n=tt)&&(n=u0(n,t.pendingProps,Cn),n!==null?(t.stateNode=n,kt=t,tt=null,e=!0):e=!1),e||La(t)),null;case 13:return Ym(e,t,n);case 4:return Zn(t,t.stateNode.containerInfo),l=t.pendingProps,e===null?t.child=Sl(t,null,l,n):vt(e,t,l,n),t.child;case 11:return Mm(e,t,t.type,t.pendingProps,n);case 7:return l=t.pendingProps,rs(e,t),vt(e,t,l,n),t.child;case 8:return vt(e,t,t.pendingProps.children,n),t.child;case 12:return vt(e,t,t.pendingProps.children,n),t.child;case 10:return Qm(e,t,n);case 9:return i=t.type._context,l=t.pendingProps.children,vl(t),i=Rt(i),l=l(i),t.flags|=1,vt(e,t,l,n),t.child;case 14:return Om(e,t,t.type,t.pendingProps,n);case 15:return Lm(e,t,t.type,t.pendingProps,n);case 19:return pu(e,t,n);case 31:return hb(e,t,n);case 22:return Um(e,t,n,t.pendingProps);case 24:return vl(t),l=Rt(mt),e===null?(i=Mc(),i===null&&(i=et,r=Dc(),i.pooledCache=r,r.refCount++,r!==null&&(i.pooledCacheLanes|=n),i=r),t.memoizedState={parent:l,cache:i},Lc(t),Ua(t,mt,i)):((e.lanes&n)!==0&&(Uc(e,t),oi(t,null,null,n),ri()),i=e.memoizedState,r=t.memoizedState,i.parent!==l?(i={parent:l,cache:l},t.memoizedState=i,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=i),Ua(t,mt,l)):(l=r.cache,Ua(t,mt,l),l!==i.cache&&Ac(t,[mt],n,!0))),vt(e,t,t.pendingProps.children,n),t.child;case 30:return t.stateNode===null&&(t.stateNode={autoName:null,paired:null,clones:null,ref:null}),l=t.pendingProps,l.name!=null&&l.name!=="auto"?t.flags|=e===null?18882560:18874368:_e&&br(t),e!==null&&e.memoizedProps.name!==l.name?t.flags|=4194816:rs(e,t),vt(e,t,l.children,n),t.child;case 29:throw t.pendingProps}throw Error(u(156,t.tag))}function Na(e){e.flags|=4}function yu(e,t,n,l,i){var r;if((r=(e.mode&32)!==0)&&(r=n===null?Np(t,l):Np(t,l)&&(l.src!==n.src||l.srcSet!==n.srcSet)),r){if(e.flags|=16777216,(i&335544128)===i)if(e.stateNode.complete)e.flags|=8192;else if(Ex())e.flags|=8192;else throw wl=Cr,Oc}else e.flags&=-16777217}function Km(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!wp(t))if(Ex())e.flags|=8192;else throw wl=Cr,Oc}function Qr(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Nf():536870912,e.lanes|=t,fs|=t)}function mi(e,t){if(!_e)switch(e.tailMode){case"visible":break;case"collapsed":for(var n=e.tail,l=null;n!==null;)n.alternate!==null&&(l=n),n=n.sibling;l===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:l.sibling=null;break;default:for(t=e.tail,n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null}}function nt(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,l=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,l|=i.subtreeFlags&1206910976,l|=i.flags&1206910976,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,l|=i.subtreeFlags,l|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=l,e.childLanes=n,t}function pb(e,t,n){var l=t.pendingProps;switch(Cc(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return nt(t),null;case 1:return nt(t),null;case 3:return n=t.stateNode,l=null,e!==null&&(l=e.memoizedState.cache),t.memoizedState.cache!==l&&(t.flags|=2048),ya(mt),ln(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(es(t)?Na(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,zc())),nt(t),null;case 26:var i=t.type,r=t.memoizedState;return e===null?(Na(t),r!==null?(nt(t),Km(t,r)):(nt(t),yu(t,i,null,l,n))):r?r!==e.memoizedState?(Na(t),nt(t),Km(t,r)):(nt(t),t.flags&=-16777217):(e=e.memoizedProps,e!==l&&Na(t),nt(t),yu(t,i,e,l,n)),null;case 27:if(pe(t),n=Kt.current,i=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==l&&Na(t);else{if(!l){if(t.stateNode===null)throw Error(u(166));return nt(t),t.subtreeFlags&=-33554433,null}e=Ut.current,es(t)?Th(t):(e=mp(i,l,n),t.stateNode=e,Na(t))}return nt(t),t.subtreeFlags&=-33554433,null;case 5:if(pe(t),i=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==l&&Na(t);else{if(!l){if(t.stateNode===null)throw Error(u(166));return nt(t),t.subtreeFlags&=-33554433,null}if(r=Ut.current,es(t))Th(t);else{var f=ki(Kt.current);switch(r){case 1:r=f.createElementNS("http://www.w3.org/2000/svg",i);break;case 2:r=f.createElementNS("http://www.w3.org/1998/Math/MathML",i);break;default:switch(i){case"svg":r=f.createElementNS("http://www.w3.org/2000/svg",i);break;case"math":r=f.createElementNS("http://www.w3.org/1998/Math/MathML",i);break;case"script":r=f.createElement("div"),r.innerHTML="<script><\/script>",r=r.removeChild(r.firstChild);break;case"select":r=typeof l.is=="string"?f.createElement("select",{is:l.is}):f.createElement("select"),l.multiple?r.multiple=!0:l.size&&(r.size=l.size);break;default:r=typeof l.is=="string"?f.createElement(i,{is:l.is}):f.createElement(i)}}r[zt]=t,r[Pt]=l;e:for(f=t.child;f!==null;){if(f.tag===5||f.tag===6)r.appendChild(f.stateNode);else if(f.tag!==4&&f.tag!==27&&f.child!==null){f.child.return=f,f=f.child;continue}if(f===t)break e;for(;f.sibling===null;){if(f.return===null||f.return===t)break e;f=f.return}f.sibling.return=f.return,f=f.sibling}t.stateNode=r;e:switch(Mt(r,i,l),i){case"button":case"input":case"select":case"textarea":l=!!l.autoFocus;break e;case"img":l=!0;break e;default:l=!1}l&&Na(t)}}return nt(t),t.subtreeFlags&=-33554433,yu(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==l&&Na(t);else{if(typeof l!="string"&&t.stateNode===null)throw Error(u(166));if(e=Kt.current,es(t)){if(e=t.stateNode,n=t.memoizedProps,l=null,i=kt,i!==null)switch(i.tag){case 27:case 5:l=i.memoizedProps}e[zt]=t,e=!!(e.nodeValue===n||l!==null&&l.suppressHydrationWarning===!0||Zx(e.nodeValue,n)),e||La(t,!0)}else e=ki(e).createTextNode(l),e[zt]=t,t.stateNode=e}return nt(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(l=es(t),n!==null){if(e===null){if(!l)throw Error(u(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(u(557));e[zt]=t}else pl(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;nt(t),e=!1}else n=zc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(fn(t),t):(fn(t),null);if((t.flags&128)!==0)throw Error(u(558))}return nt(t),null;case 13:if(l=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(i=es(t),l!==null&&l.dehydrated!==null){if(e===null){if(!i)throw Error(u(318));if(i=t.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(u(317));i[zt]=t}else pl(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;nt(t),i=!1}else i=zc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=i),i=!0;if(!i)return t.flags&256?(fn(t),t):(fn(t),null)}return fn(t),(t.flags&128)!==0?(t.lanes=n,t):(n=l!==null,e=e!==null&&e.memoizedState!==null,n&&(l=t.child,i=null,l.alternate!==null&&l.alternate.memoizedState!==null&&l.alternate.memoizedState.cachePool!==null&&(i=l.alternate.memoizedState.cachePool.pool),r=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(r=l.memoizedState.cachePool.pool),r!==i&&(l.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),Qr(t,t.updateQueue),nt(t),null);case 4:return ln(),e===null&&Wu(t.stateNode.containerInfo),t.flags|=67108864,nt(t),null;case 10:return ya(t.type),nt(t),null;case 19:if(Yc(t),l=t.memoizedState,l===null)return nt(t),null;if(i=(t.flags&128)!==0,r=l.rendering,r===null)if(i)mi(l,!1);else{if(dt!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(r=Ar(e),r!==null){for(t.flags|=128,mi(l,!1),e=r.updateQueue,t.updateQueue=e,Qr(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)jh(n,e),n=n.sibling;return ci(t,Dt.current&1|2),_e&&pa(t,l.treeForkCount),t.child}e=e.sibling}l.tail!==null&&rn()>lo&&(t.flags|=128,i=!0,mi(l,!1),t.lanes=4194304)}else{if(!i)if(e=Ar(r),e!==null){if(t.flags|=128,i=!0,e=e.updateQueue,t.updateQueue=e,Qr(t,e),mi(l,!0),l.tail===null&&l.tailMode!=="collapsed"&&l.tailMode!=="visible"&&!r.alternate&&!_e)return nt(t),null}else 2*rn()-l.renderingStartTime>lo&&n!==536870912&&(t.flags|=128,i=!0,mi(l,!1),t.lanes=4194304);l.isBackwards?(r.sibling=t.child,t.child=r):(e=l.last,e!==null?e.sibling=r:t.child=r,l.last=r)}if(l.tail!==null){e=l.tail;e:{for(n=e;n!==null;){if(n.alternate!==null){n=!1;break e}n=n.sibling}n=!0}return l.rendering=e,l.tail=e.sibling,l.renderingStartTime=rn(),e.sibling=null,r=Dt.current,r=i?r&1|2:r&1,l.tailMode==="visible"||l.tailMode==="collapsed"||!n||_e?ci(t,r):(n=r,Le(At,t),Le(Dt,n),Bt===null&&(Bt=t)),_e&&pa(t,l.treeForkCount),e}return nt(t),null;case 22:case 23:return fn(t),$c(),l=t.memoizedState!==null,e!==null?e.memoizedState!==null!==l&&(t.flags|=8192):l&&(t.flags|=8192),l?(n&536870912)!==0&&(t.flags&128)===0&&(nt(t),t.subtreeFlags&6&&(t.flags|=8192)):nt(t),n=t.updateQueue,n!==null&&Qr(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),l=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(l=t.memoizedState.cachePool.pool),l!==n&&(t.flags|=2048),e!==null&&rt(jl),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),ya(mt),nt(t),null;case 25:return null;case 30:return t.flags|=33554432,nt(t),null}throw Error(u(156,t.tag))}function gb(e,t){switch(Cc(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ya(mt),ln(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return pe(t),null;case 31:if(t.memoizedState!==null){if(fn(t),t.alternate===null)throw Error(u(340));pl()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(fn(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(u(340));pl()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Yc(t),e=t.flags,e&65536?(t.flags=e&-65537|128,e=t.memoizedState,e!==null&&(e.rendering=null,e.tail=null),t.flags|=4,t):null;case 4:return ln(),null;case 10:return ya(t.type),null;case 22:case 23:return fn(t),$c(),e!==null&&rt(jl),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return ya(mt),null;case 25:return null;default:return null}}function Jm(e,t){switch(Cc(t),t.tag){case 3:ya(mt),ln();break;case 26:case 27:case 5:pe(t);break;case 4:ln();break;case 31:t.memoizedState!==null&&fn(t);break;case 13:fn(t);break;case 19:Yc(t);break;case 10:ya(t.type);break;case 22:case 23:fn(t),$c(),e!==null&&rt(jl);break;case 24:ya(mt)}}function xi(e,t){try{var n=t.updateQueue,l=n!==null?n.lastEffect:null;if(l!==null){var i=l.next;n=i;do{if((n.tag&e)===e){l=void 0;var r=n.create,f=n.inst;l=r(),f.destroy=l}n=n.next}while(n!==i)}}catch(v){Je(t,t.return,v)}}function Xa(e,t,n){try{var l=t.updateQueue,i=l!==null?l.lastEffect:null;if(i!==null){var r=i.next;l=r;do{if((l.tag&e)===e){var f=l.inst,v=f.destroy;if(v!==void 0){f.destroy=void 0,i=t;var w=n,H=v;try{H()}catch(G){Je(i,w,G)}}}l=l.next}while(l!==r)}}catch(G){Je(t,t.return,G)}}function Pm(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{Bh(t,n)}catch(l){Je(e,e.return,l)}}}function Fm(e,t,n){n.props=Tl(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(l){Je(e,t,l)}}function Fn(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var l=e.stateNode;break;case 30:var i=e.stateNode,r=ha(e.memoizedProps,i);(i.ref===null||i.ref.name!==r)&&(i.ref=lp(r)),l=i.ref;break;case 7:if(e.stateNode===null){var f=new gn(e);y(e.child,!1,r0,f,void 0,void 0),e.stateNode=f}l=e.stateNode;break;default:l=e.stateNode}typeof n=="function"?e.refCleanup=n(l):n.current=l}}catch(v){Je(e,t,v)}}function _t(e,t){var n=e.ref,l=e.refCleanup;if(n!==null)if(typeof l=="function")try{l()}catch(i){Je(e,t,i)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n=="function")try{n(null)}catch(i){Je(e,t,i)}else n.current=null}function Zr(e,t){if((e.tag===5||e.tag===27||e.tag===6)&&e.alternate===null&&t!==null)for(var n=0;n<t.length;n++)up(e.stateNode,t[n])}function Im(e){for(var t=e.return;t!==null&&(bu(t)&&up(e.stateNode,t.stateNode),!vu(t));)t=t.return}function pi(e){for(var t=e.return;t!==null&&(bu(t)&&o0(e.stateNode,t.stateNode),!vu(t));)t=t.return}function vu(e){return e.tag===5||e.tag===3||e.tag===27}function bu(e){return e&&e.tag===7&&e.stateNode!==null}function ju(e){var t=e.type,n=e.memoizedProps,l=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":n.autoFocus&&l.focus();break e;case"img":n.src?l.src=n.src:n.srcSet&&(l.srcset=n.srcSet)}}catch(i){Je(e,e.return,i)}}function Nu(e,t,n){try{var l=e.stateNode;Yb(l,e.type,n,t),l[Pt]=t}catch(i){Je(e,e.return,i)}}function Wm(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Ia(e.type)||e.tag===4}function wu(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&&Ia(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 Su(e,t,n,l){var i=e.tag;if(i===5||i===6)i=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n).insertBefore(i,t):(t=n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,t.appendChild(i),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Kn)),Zr(e,l),Ge=!0;else if(i!==4&&(i===27&&(Zr(e,l),l=null,Ia(e.type)&&(n=e.stateNode,t=null)),e=e.child,e!==null))for(Su(e,t,n,l),e=e.sibling;e!==null;)Su(e,t,n,l),e=e.sibling}function Kr(e,t,n,l){var i=e.tag;if(i===5||i===6)i=e.stateNode,t?n.insertBefore(i,t):n.appendChild(i),Zr(e,l),Ge=!0;else if(i!==4&&(i===27&&(Zr(e,l),l=null,Ia(e.type)&&(n=e.stateNode)),e=e.child,e!==null))for(Kr(e,t,n,l),e=e.sibling;e!==null;)Kr(e,t,n,l),e=e.sibling}function ex(e){var t=e.stateNode,n=e.memoizedProps;try{for(var l=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);Mt(t,l,n),t[zt]=e,t[Pt]=n}catch(r){Je(e,e.return,r)}}var Jr=!1,hn=null;function tx(e){(e.tag===30||(e.subtreeFlags&33554432)!==0)&&(Jr=!0)}var In=null;function nx(){var e=In;return In=null,e}var It=0;function os(e,t,n,l,i){return It=0,ax(e.child,t,n,l,i)}function ax(e,t,n,l,i){for(var r=!1;e!==null;){if(e.tag===5){var f=e.stateNode;if(l!==null){var v=rd(f);l.push(v),v.view&&(r=!0)}else r||rd(f).view&&(r=!0);Jr=!0,np(f,It===0?t:t+"_"+It,n),It++}else(e.tag!==22||e.memoizedState===null)&&(e.tag===30&&i||ax(e.child,t,n,l,i)&&(r=!0));e=e.sibling}return r}function Wn(e,t){for(;e!==null;)e.tag===5?ap(e.stateNode,e.memoizedProps):(e.tag!==22||e.memoizedState===null)&&(e.tag===30&&t||Wn(e.child,t)),e=e.sibling}function Pr(e){if((e.subtreeFlags&18874368)!==0)for(e=e.child;e!==null;){if((e.tag!==22||e.memoizedState===null)&&(Pr(e),e.tag===30&&(e.flags&18874368)!==0&&e.stateNode.paired)){var t=e.memoizedProps;if(t.name==null||t.name==="auto")throw Error(u(544));var n=t.name;t=ma(t.default,t.share),t!=="none"&&(os(e,n,t,null,!1)||Wn(e.child,!1))}e=e.sibling}}function ku(e,t){if(e.tag===30){var n=e.stateNode,l=e.memoizedProps,i=ha(l,n),r=ma(l.default,n.paired?l.share:l.enter);r!=="none"?os(e,i,r,null,!1)?(Pr(e),n.paired||t||ps(e,l.onEnter)):Wn(e.child,!1):Pr(e)}else if((e.subtreeFlags&33554432)!==0)for(e=e.child;e!==null;)ku(e,t),e=e.sibling;else Pr(e)}function Tu(e){if(hn!==null&&hn.size!==0){var t=hn;if((e.subtreeFlags&18874368)!==0)for(e=e.child;e!==null;){if(e.tag!==22||e.memoizedState===null){if(e.tag===30&&(e.flags&18874368)!==0){var n=e.memoizedProps,l=n.name;if(l!=null&&l!=="auto"){var i=t.get(l);if(i!==void 0){var r=ma(n.default,n.share);if(r!=="none"&&(os(e,l,r,null,!1)?(r=e.stateNode,i.paired=r,r.paired=i,ps(e,n.onShare)):Wn(e.child,!1)),t.delete(l),t.size===0)break}}}Tu(e)}e=e.sibling}}}function Cu(e){if(e.tag===30){var t=e.memoizedProps,n=ha(t,e.stateNode),l=hn!==null?hn.get(n):void 0,i=ma(t.default,l!==void 0?t.share:t.exit);i!=="none"&&(os(e,n,i,null,!1)?l!==void 0?(i=e.stateNode,l.paired=i,i.paired=l,hn.delete(n),ps(e,t.onShare)):ps(e,t.onExit):Wn(e.child,!1)),hn!==null&&Tu(e)}else if((e.subtreeFlags&33554432)!==0)for(e=e.child;e!==null;)Cu(e),e=e.sibling;else hn!==null&&Tu(e)}function lx(e){for(e=e.child;e!==null;){if(e.tag===30){var t=e.memoizedProps,n=ha(t,e.stateNode);t=ma(t.default,t.update),e.flags&=-5,t!=="none"&&os(e,n,t,e.memoizedState=[],!1)}else(e.subtreeFlags&33554432)!==0&&lx(e);e=e.sibling}}function Eu(e){if((e.subtreeFlags&18874368)!==0)for(e=e.child;e!==null;){if(e.tag!==22||e.memoizedState===null){if(e.tag===30&&(e.flags&18874368)!==0){var t=e.stateNode;t.paired!==null&&(t.paired=null,Wn(e.child,!1))}Eu(e)}e=e.sibling}}function Fr(e){if(e.tag===30)e.stateNode.paired=null,Wn(e.child,!1),Eu(e);else if((e.subtreeFlags&33554432)!==0)for(e=e.child;e!==null;)Fr(e),e=e.sibling;else Eu(e)}function sx(e){for(e=e.child;e!==null;)e.tag===30?Wn(e.child,!1):(e.subtreeFlags&33554432)!==0&&sx(e),e=e.sibling}function zu(e,t,n,l,i,r,f){for(var v=!1;t!==null;){if(t.tag===5){var w=t.stateNode;if(r!==null&&It<r.length){var H=r[It],G=rd(w);(H.view||G.view)&&(v=!0);var J;if(J=(e.flags&4)===0)if(G.clip)J=!0;else{J=H.rect;var _=G.rect;J=J.y!==_.y||J.x!==_.x||J.height!==_.height||J.width!==_.width}J&&(e.flags|=4),G.abs?G=!H.abs:(H=H.rect,G=G.rect,G=H.height!==G.height||H.width!==G.width),G&&(e.flags|=32)}else e.flags|=32;(e.flags&4)!==0&&np(w,It===0?n:n+"_"+It,i),v&&(e.flags&4)!==0||(In===null&&(In=[]),In.push(w,It===0?l:l+"_"+It,t.memoizedProps)),It++}else(t.tag!==22||t.memoizedState===null)&&(t.tag===30&&f?e.flags|=t.flags&32:zu(e,t.child,n,l,i,r,f)&&(v=!0));t=t.sibling}return v}function ix(e,t){for(e=e.child;e!==null;){if(e.tag===30){var n=e.memoizedProps,l=e.stateNode,i=ha(n,l),r=ma(n.default,n.update),f;f=e.memoizedState,e.memoizedState=null,l=e;var v=e.child;It=0,i=zu(l,v,i,i,r,f,!1),(e.flags&4)!==0&&i&&ps(e,n.onUpdate)}else(e.subtreeFlags&33554432)!==0&&ix(e);e=e.sibling}}var Tt=!1,Qe=!1,ea=!1,Ru=!1,rx=typeof WeakSet=="function"?WeakSet:Set,Ct=null,ta=!1,gi=!1,Ir=!1,Au=!1;function yb(e,t,n){if(e=e.containerInfo,nd=Ts,e=dh(e),gc(e)){if("selectionStart"in e)var l={start:e.selectionStart,end:e.selectionEnd};else e:{l=(l=e.ownerDocument)&&l.defaultView||window;var i=l.getSelection&&l.getSelection();if(i&&i.rangeCount!==0){l=i.anchorNode;var r=i.anchorOffset,f=i.focusNode;i=i.focusOffset;try{l.nodeType,f.nodeType}catch{l=null;break e}var v=0,w=-1,H=-1,G=0,J=0,_=e,$=null;t:for(;;){for(var se;_!==l||r!==0&&_.nodeType!==3||(w=v+r),_!==f||i!==0&&_.nodeType!==3||(H=v+i),_.nodeType===3&&(v+=_.nodeValue.length),(se=_.firstChild)!==null;)$=_,_=se;for(;;){if(_===e)break t;if($===l&&++G===r&&(w=v),$===f&&++J===i&&(H=v),(se=_.nextSibling)!==null)break;_=$,$=_.parentNode}_=se}l=w===-1||H===-1?null:{start:w,end:H}}else l=null}l=l||{start:0,end:0}}else l=null;for(ad={focusedElem:e,selectionRange:l},Ts=!1,n=(n&335544064)===n,Ct=t,t=n?9270:1024;Ct!==null;){if(e=Ct,n&&(l=e.deletions,l!==null))for(r=0;r<l.length;r++)n&&Cu(l[r]);if(e.alternate===null&&(e.flags&2)!==0)n&&tx(e),Wr(n);else{if(e.tag===22){if(l=e.alternate,e.memoizedState!==null){l!==null&&l.memoizedState===null&&n&&Cu(l),Wr(n);continue}else if(l!==null&&l.memoizedState!==null){n&&tx(e),Wr(n);continue}}l=e.child,(e.subtreeFlags&t)!==0&&l!==null?(l.return=e,Ct=l):(n&&lx(e),Wr(n))}}hn=null}function Wr(e){for(;Ct!==null;){var t=Ct,n=e,l=t.alternate,i=t.flags;switch(t.tag){case 0:case 11:case 15:break;case 1:if((i&1024)!==0&&l!==null){n=void 0,i=l.memoizedProps,l=l.memoizedState;var r=t.stateNode;try{var f=Tl(t.type,i);n=r.getSnapshotBeforeUpdate(f,l),r.__reactInternalSnapshotBeforeUpdate=n}catch(v){Je(t,t.return,v)}}break;case 3:if((i&1024)!==0){if(l=t.stateNode.containerInfo,n=l.nodeType,n===9)ud(l);else if(n===1)switch(l.nodeName){case"HEAD":case"HTML":case"BODY":ud(l);break;default:l.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;case 30:n&&l!==null&&(n=ha(l.memoizedProps,l.stateNode),i=t.memoizedProps,i=ma(i.default,i.update),i!=="none"&&os(l,n,i,l.memoizedState=[],!0));break;default:if((i&1024)!==0)throw Error(u(163))}if(l=t.sibling,l!==null){l.return=t.return,Ct=l;break}Ct=t.return}}function ox(e,t,n){var l=n.flags;switch(n.tag){case 0:case 11:case 15:na(e,n),l&4&&xi(5,n);break;case 1:if(na(e,n),l&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(f){Je(n,n.return,f)}else{var i=Tl(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(f){Je(n,n.return,f)}}l&64&&Pm(n),l&512&&Fn(n,n.return);break;case 3:if(na(e,n),l&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{Bh(e,t)}catch(f){Je(n,n.return,f)}}break;case 27:t===null&&l&4&&ex(n);case 26:case 5:na(e,n),t===null&&l&4&&ju(n),l&512&&Fn(n,n.return);break;case 12:na(e,n);break;case 31:na(e,n),l&4&&fx(e,n);break;case 13:na(e,n),l&4&&hx(e,n),l&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=Rb.bind(null,n),d0(e,n))));break;case 22:if(l=n.memoizedState!==null||Tt,!l){var r=t!==null&&t.memoizedState!==null||Qe;t=Tt,i=Qe,Tt=l,(Qe=r)&&!i?(l=2,(n.subtreeFlags&8772)!==0&&(l|=1),qn(e,n,l)):na(e,n),Tt=t,Qe=i}break;case 30:na(e,n),l&512&&Fn(n,n.return);break;case 7:l&512&&Fn(n,n.return);default:na(e,n)}}function Du(e,t){for(e=e.child;e!==null;)cx(e,t),e=e.sibling}function cx(e,t){switch(e.tag){case 5:case 26:try{var n=e.stateNode;if(t){var l=n.style;typeof l.setProperty=="function"?l.setProperty("display","none","important"):l.display="none"}else{var i=e.stateNode,r=e.memoizedProps.style,f=r!=null&&r.hasOwnProperty("display")?r.display:null;i.style.display=f==null||typeof f=="boolean"?"":(""+f).trim()}}catch(w){Je(e,e.return,w)}_u(e,t);break;case 6:try{e.stateNode.nodeValue=t?"":e.memoizedProps,Ge=!0}catch(w){Je(e,e.return,w)}break;case 18:try{var v=e.stateNode;t?tp(v,!0):tp(e.stateNode,!1)}catch(w){Je(e,e.return,w)}break;case 22:case 23:e.memoizedState===null&&Du(e,t);break;default:Du(e,t)}}function _u(e,t){if(e.subtreeFlags&67108864)for(e=e.child;e!==null;){e:{var n=e,l=t;switch(n.tag){case 4:cx(n,l);break e;case 22:n.memoizedState===null&&_u(n,l);break e;default:_u(n,l)}}e=e.sibling}}function ux(e){var t=e.alternate;t!==null&&(e.alternate=null,ux(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&lr(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 lt=null,Wt=!1;function Hn(e,t,n){for(n=n.child;n!==null;)dx(e,t,n),n=n.sibling}function dx(e,t,n){if(on&&typeof on.onCommitFiberUnmount=="function")try{on.onCommitFiberUnmount(qs,n)}catch{}switch(n.tag){case 26:Qe||_t(n,t),Hn(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&!Qe&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:Qe||_t(n,t),pi(n);var l=lt,i=Wt;Ia(n.type)&&(lt=n.stateNode,Wt=!1),Hn(e,t,n),xp(n.stateNode,n.type,n.memoizedProps),lt=l,Wt=i;break;case 5:Qe||_t(n,t),pi(n);case 6:if(n.tag===6&&pi(n),l=lt,i=Wt,lt=null,Hn(e,t,n),lt=l,Wt=i,lt!==null)if(Wt)try{(lt.nodeType===9?lt.body:lt.nodeName==="HTML"?lt.ownerDocument.body:lt).removeChild(n.stateNode),Ge=!0}catch(r){Je(n,t,r)}else try{lt.removeChild(n.stateNode),Ge=!0}catch(r){Je(n,t,r)}break;case 18:lt!==null&&(Wt?(e=lt,ep(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,n.stateNode),Cs(e)):ep(lt,n.stateNode));break;case 4:l=lt,i=Wt,lt=n.stateNode.containerInfo,Wt=!0,Hn(e,t,n),lt=l,Wt=i;break;case 0:case 11:case 14:case 15:Xa(2,n,t),Qe||Xa(4,n,t),Hn(e,t,n);break;case 1:Qe||(_t(n,t),l=n.stateNode,typeof l.componentWillUnmount=="function"&&Fm(n,t,l)),Hn(e,t,n);break;case 21:Hn(e,t,n);break;case 22:Qe=(l=Qe)||n.memoizedState!==null,Hn(e,t,n),Qe=l;break;case 30:_t(n,t),Hn(e,t,n);break;case 7:Qe||_t(n,t),Hn(e,t,n);break;default:Hn(e,t,n)}}function fx(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Cs(e)}catch(n){Je(t,t.return,n)}}}function hx(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Cs(e)}catch(n){Je(t,t.return,n)}}function vb(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new rx),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new rx),t;default:throw Error(u(435,e.tag))}}function eo(e,t){var n=vb(e);t.forEach(function(l){if(!n.has(l)){n.add(l);var i=Ab.bind(null,e,l);l.then(i,i)}})}function Xt(e,t,n){var l=t.deletions;if(l!==null)for(var i=0;i<l.length;i++){var r=l[i],f=e,v=t,w=v;e:for(;w!==null;){switch(w.tag){case 27:if(Ia(w.type)){lt=w.stateNode,Wt=!1;break e}break;case 5:lt=w.stateNode,Wt=!1;break e;case 3:case 4:lt=w.stateNode.containerInfo,Wt=!0;break e}w=w.return}if(lt===null)throw Error(u(160));dx(f,v,r),lt=null,Wt=!1,f=r.alternate,f!==null&&(f.return=null),r.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)mx(t,e,n),t=t.sibling}var Bn=null;function mx(e,t,n){var l=e.alternate,i=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(i&4&&(l=e.updateQueue,l=l!==null?l.events:null,l!==null))for(var r=0;r<l.length;r++){var f=l[r];f.ref.impl=f.nextImpl}Xt(t,e,n),Qt(e),i&4&&(Xa(3,e,e.return),xi(3,e),Xa(5,e,e.return));break;case 1:Xt(t,e,n),Qt(e),i&512&&(Qe||l===null||_t(l,l.return)),i&64&&Tt&&(e=e.updateQueue,e!==null&&(t=e.callbacks,t!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?t:n.concat(t))));break;case 26:if(r=Bn,Xt(t,e,n),Qt(e),i&512&&(Qe||l===null||_t(l,l.return)),i&4)if(i=l!==null?l.memoizedState:null,n=e.memoizedState,l===null)if(n===null)if(e.stateNode===null)if(Tt)e.stateNode=Fx(e.type,e.memoizedProps,t.containerInfo,e);else{e:{t=e.type,n=e.memoizedProps,i=r.ownerDocument||r;t:switch(t){case"title":l=i.getElementsByTagName("title")[0],(!l||l[Ys]||l[zt]||l.namespaceURI==="http://www.w3.org/2000/svg"||l.hasAttribute("itemprop"))&&(l=i.createElement(t),i.head.insertBefore(l,i.querySelector("head > title"))),Mt(l,t,n),l[zt]=e,St(l),t=l;break e;case"link":if(r=jp("link","href",i).get(t+(n.href||""))){for(f=0;f<r.length;f++)if(l=r[f],l.getAttribute("href")===(n.href==null||n.href===""?null:n.href)&&l.getAttribute("rel")===(n.rel==null?null:n.rel)&&l.getAttribute("title")===(n.title==null?null:n.title)&&l.getAttribute("crossorigin")===(n.crossOrigin==null?null:n.crossOrigin)){r.splice(f,1);break t}}l=i.createElement(t),Mt(l,t,n),i.head.appendChild(l);break;case"meta":if(r=jp("meta","content",i).get(t+(n.content||""))){for(f=0;f<r.length;f++)if(l=r[f],l.getAttribute("content")===(n.content==null?null:""+n.content)&&l.getAttribute("name")===(n.name==null?null:n.name)&&l.getAttribute("property")===(n.property==null?null:n.property)&&l.getAttribute("http-equiv")===(n.httpEquiv==null?null:n.httpEquiv)&&l.getAttribute("charset")===(n.charSet==null?null:n.charSet)){r.splice(f,1);break t}}l=i.createElement(t),Mt(l,t,n),i.head.appendChild(l);break;default:throw Error(u(468,t))}l[zt]=e,St(l),t=l}e.stateNode=t}else Tt||gd(r,e.type,e.stateNode);else e.stateNode=bp(r,n,e.memoizedProps);else i!==n?(i===null?(t=l.stateNode,t===null||Qe||t.parentNode.removeChild(t)):i.count--,n===null?Tt||gd(r,e.type,e.stateNode):bp(r,n,e.memoizedProps)):n===null&&e.stateNode!==null&&Nu(e,e.memoizedProps,l.memoizedProps);break;case 27:Xt(t,e,n),Qt(e),i&512&&(Qe||l===null||_t(l,l.return)),l!==null&&i&4&&Nu(e,e.memoizedProps,l.memoizedProps);break;case 5:if(r=ea,ea=!1,Xt(t,e,n),ea=r,Qt(e),i&512&&(Qe||l===null||_t(l,l.return)),e.flags&32){t=e.stateNode;try{Vl(t,""),Ge=!0}catch(G){Je(e,e.return,G)}}i&4&&e.stateNode!=null&&(t=e.memoizedProps,Nu(e,t,l!==null?l.memoizedProps:t)),i&1024&&(Ru=!0);break;case 6:if(Xt(t,e,n),Qt(e),i&4){if(e.stateNode===null)throw Error(u(162));t=e.memoizedProps,n=e.stateNode;try{n.nodeValue=t,Ge=!0}catch(G){Je(e,e.return,G)}}break;case 3:if(Ge=!1,po=null,r=Bn,Bn=Ti(t.containerInfo),Xt(t,e,n),Bn=r,Qt(e),i&4&&l!==null&&l.memoizedState.isDehydrated)try{Cs(t.containerInfo)}catch(G){Je(e,e.return,G)}Ru&&(Ru=!1,xx(e)),Ge=!1;break;case 4:i=ea,ea=Tt,l=Of(),r=Bn,Bn=Ti(e.stateNode.containerInfo),Xt(t,e,n),Qt(e),Bn=r,Ge&&gi&&(Ir=!0),Ge=l,ea=i;break;case 12:Xt(t,e,n),Qt(e);break;case 31:Xt(t,e,n),Qt(e),i&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,eo(e,t)));break;case 13:Xt(t,e,n),Qt(e),e.child.flags&8192&&e.memoizedState!==null!=(l!==null&&l.memoizedState!==null)&&(ao=rn()),i&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,eo(e,t)));break;case 22:r=e.memoizedState!==null,f=l!==null&&l.memoizedState!==null;var v=Tt,w=Qe,H=ea;Tt=v||r,ea=H||r,Qe=w||f,Xt(t,e,n),Qe=w,ea=H,Tt=v,Qt(e),i&8192&&(t=e.stateNode,t._visibility=r?t._visibility&-2:t._visibility|1,!r||l===null||f||Tt||Qe||(t=f||Qe,n=Tt,l=Qe,Tt=r||Tt,Qe=t,Qa(e,2),Tt=n,Qe=l),!r&&ea||Du(e,r)),i&4&&(t=e.updateQueue,t!==null&&(n=t.retryQueue,n!==null&&(t.retryQueue=null,eo(e,n))));break;case 19:Xt(t,e,n),Qt(e),i&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,eo(e,t)));break;case 30:i&512&&(Qe||l===null||_t(l,l.return)),i=Of(),r=gi,f=(n&335544064)===n,v=e.memoizedProps,gi=f&&ma(v.default,v.update)!=="none",Xt(t,e,n),Qt(e),f&&l!==null&&Ge&&(e.flags|=4),gi=r,Ge=i;break;case 21:break;case 7:i&512&&(Qe||l===null||_t(l,l.return)),l&&l.stateNode!==null&&(l.stateNode._fragmentFiber=e);default:Xt(t,e,n),Qt(e)}}function Qt(e){var t=e.flags;if(t&2){try{for(var n,l=e.return;l!==null;){if(Wm(l)){n=l;break}l=l.return}l=null;for(var i=e.return;i!==null;){if(bu(i)){var r=i.stateNode;l===null?l=[r]:l.push(r)}if(vu(i))break;i=i.return}var f=l;if(n==null)throw Error(u(160));switch(n.tag){case 27:var v=n.stateNode,w=wu(e);Kr(e,w,v,f);break;case 5:var H=n.stateNode;n.flags&32&&(Vl(H,""),n.flags&=-33);var G=wu(e);Kr(e,G,H,f);break;case 3:case 4:var J=n.stateNode.containerInfo,_=wu(e);Su(e,_,J,f);break;default:throw Error(u(161))}}catch($){Je(e,e.return,$)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function xx(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;xx(t),t.tag===5&&t.flags&1024&&(t=t.stateNode,Ts=!0,t.reset(),Ts=!1),e=e.sibling}}function cs(e,t){if(t.subtreeFlags&9270)for(t=t.child;t!==null;)px(t,e),t=t.sibling;else ix(t)}function px(e,t){var n=e.alternate;if(n===null)ku(e,!1);else switch(e.tag){case 3:if(Au=ta=!1,nx(),cs(t,e),!ta&&!Ir){if(e=In,e!==null)for(var l=0;l<e.length;l+=3){n=e[l];var i=e[l+1];ap(n,e[l+2]),n=n.ownerDocument.documentElement,n!==null&&n.animate({opacity:[0,0],pointerEvents:["none","none"]},{duration:0,fill:"forwards",pseudoElement:"::view-transition-group("+i+")"})}e=t.containerInfo,e=e.nodeType===9?e.documentElement:e.ownerDocument.documentElement,e!==null&&e.style.viewTransitionName===""&&(e.style.viewTransitionName="none",e.animate({opacity:[0,0],pointerEvents:["none","none"]},{duration:0,fill:"forwards",pseudoElement:"::view-transition-group(root)"}),e.animate({width:[0,0],height:[0,0]},{duration:0,fill:"forwards",pseudoElement:"::view-transition"})),Au=!0}In=null;break;case 5:cs(t,e);break;case 4:l=ta,ta=!1,cs(t,e),ta&&(Ir=!0),ta=l;break;case 22:e.memoizedState===null&&(n.memoizedState!==null?ku(e,!1):cs(t,e));break;case 30:l=ta,i=nx(),ta=!1,cs(t,e),ta&&(e.flags|=4);var r=e.memoizedProps,f=e.stateNode;t=ha(r,f),f=ha(n.memoizedProps,f);var v=ma(r.default,r.update);v==="none"?t=!1:(r=n.memoizedState,n.memoizedState=null,n=e.child,It=0,t=zu(e,n,t,f,v,r,!0),It!==(r===null?0:r.length)&&(e.flags|=32)),(e.flags&4)!==0&&t?(ps(e,e.memoizedProps.onUpdate),In=i):i!==null&&(i.push.apply(i,In),In=i),ta=(e.flags&32)!==0?!0:l;break;default:cs(t,e)}}function na(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)ox(e,t.alternate,t),t=t.sibling}function Qa(e,t){for(e=e.child;e!==null;){var n=e,l=t;switch(n.tag){case 0:case 11:case 14:case 15:Xa(4,n,n.return),Qa(n,l);break;case 1:_t(n,n.return);var i=n.stateNode;typeof i.componentWillUnmount=="function"&&Fm(n,n.return,i),Qa(n,l);break;case 27:(l&2)!==0&&xp(n.stateNode,n.type,n.memoizedProps);case 5:_t(n,n.return),n.tag!==5&&n.tag!==27||pi(n),Qa(n,l);break;case 6:pi(n);break;case 26:_t(n,n.return),i=n.stateNode,n.memoizedState!==null||i===null||Qe||i.parentNode.removeChild(i),Qa(n,l);break;case 22:n.memoizedState===null&&Qa(n,l);break;case 30:_t(n,n.return),Qa(n,l);break;case 7:_t(n,n.return);default:Qa(n,l)}e=e.sibling}}function qn(e,t,n){for(n=(t.subtreeFlags&8772)!==0?n:n&-2,t=t.child;t!==null;){var l=t.alternate,i=e,r=t,f=r.flags,v=(n&1)!==0;switch(r.tag){case 0:case 11:case 15:qn(i,r,n),xi(4,r);break;case 1:if(qn(i,r,n),l=r,i=l.stateNode,typeof i.componentDidMount=="function")try{i.componentDidMount()}catch(G){Je(l,l.return,G)}if(l=r,i=l.updateQueue,i!==null){var w=l.stateNode;try{var H=i.shared.hiddenCallbacks;if(H!==null)for(i.shared.hiddenCallbacks=null,i=0;i<H.length;i++)Hh(H[i],w)}catch(G){Je(l,l.return,G)}}v&&f&64&&Pm(r),Fn(r,r.return);break;case 27:(n&2)!==0&&ex(r);case 5:r.tag!==5&&r.tag!==27||Im(r),qn(i,r,n),v&&l===null&&f&4&&ju(r),Fn(r,r.return);break;case 6:Im(r);break;case 26:w=r.stateNode,r.memoizedState!==null||w===null||Tt||gd(Ti(w.ownerDocument),r.type,w),qn(i,r,n),v&&l===null&&f&4&&ju(r),Fn(r,r.return);break;case 12:qn(i,r,n);break;case 31:qn(i,r,n),v&&f&4&&fx(i,r);break;case 13:qn(i,r,n),v&&f&4&&hx(i,r);break;case 22:r.memoizedState===null&&qn(i,r,n),Fn(r,r.return);break;case 30:qn(i,r,n),Fn(r,r.return);break;case 7:Fn(r,r.return);default:qn(i,r,n)}t=t.sibling}}function Mu(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&ni(n))}function Ou(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&ni(e))}function En(e,t,n,l){var i=(n&335544064)===n;if(t.subtreeFlags&(i?10262:10256))for(t=t.child;t!==null;)gx(e,t,n,l),t=t.sibling;else i&&sx(t)}function gx(e,t,n,l){var i=(n&335544064)===n;i&&t.alternate===null&&t.return!==null&&t.return.alternate!==null&&Fr(t);var r=t.flags;switch(t.tag){case 0:case 11:case 15:En(e,t,n,l),r&2048&&xi(9,t);break;case 1:En(e,t,n,l);break;case 3:En(e,t,n,l),i&&Au&&(e=e.containerInfo,e=e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,e.style.viewTransitionName==="root"&&(e.style.viewTransitionName=""),e=e.ownerDocument.documentElement,e!==null&&e.style.viewTransitionName==="none"&&(e.style.viewTransitionName="")),r&2048&&(r=null,t.alternate!==null&&(r=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==r&&(t.refCount++,r!=null&&ni(r)));break;case 12:if(r&2048){En(e,t,n,l),r=t.stateNode;try{var f=t.memoizedProps,v=f.id,w=f.onPostCommit;typeof w=="function"&&w(v,t.alternate===null?"mount":"update",r.passiveEffectDuration,-0)}catch(H){Je(t,t.return,H)}}else En(e,t,n,l);break;case 31:En(e,t,n,l);break;case 13:En(e,t,n,l);break;case 23:break;case 22:f=t.stateNode,v=t.alternate,t.memoizedState!==null?(i&&v!==null&&v.memoizedState===null&&Fr(v),f._visibility&2?En(e,t,n,l):yi(e,t)):(i&&v!==null&&v.memoizedState!==null&&Fr(t),f._visibility&2?En(e,t,n,l):(f._visibility|=2,us(e,t,n,l,(t.subtreeFlags&10256)!==0||!1))),r&2048&&Mu(v,t);break;case 24:En(e,t,n,l),r&2048&&Ou(t.alternate,t);break;case 30:i&&(r=t.alternate,r!==null&&(Wn(r.child,!0),Wn(t.child,!0))),En(e,t,n,l);break;default:En(e,t,n,l)}}function us(e,t,n,l,i){for(i=i&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var r=e,f=t,v=n,w=l,H=f.flags;switch(f.tag){case 0:case 11:case 15:us(r,f,v,w,i),xi(8,f);break;case 23:break;case 22:var G=f.stateNode;f.memoizedState!==null?G._visibility&2?us(r,f,v,w,i):yi(r,f):(G._visibility|=2,us(r,f,v,w,i)),i&&H&2048&&Mu(f.alternate,f);break;case 24:us(r,f,v,w,i),i&&H&2048&&Ou(f.alternate,f);break;default:us(r,f,v,w,i)}t=t.sibling}}function yi(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,l=t,i=l.flags;switch(l.tag){case 22:yi(n,l),i&2048&&Mu(l.alternate,l);break;case 24:yi(n,l),i&2048&&Ou(l.alternate,l);break;default:yi(n,l)}t=t.sibling}}var Cl=8192;function El(e,t,n){if(e.subtreeFlags&Cl)for(e=e.child;e!==null;)yx(e,t,n),e=e.sibling}function yx(e,t,n){switch(e.tag){case 26:El(e,t,n),e.flags&Cl&&(e.memoizedState!==null?k0(n,Bn,e.memoizedState,e.memoizedProps):(e=e.stateNode,(t&335544128)===t&&kp(n,e)));break;case 5:El(e,t,n),e.flags&Cl&&(e=e.stateNode,(t&335544128)===t&&kp(n,e));break;case 3:case 4:var l=Bn;Bn=Ti(e.stateNode.containerInfo),El(e,t,n),Bn=l;break;case 22:e.memoizedState===null&&(l=e.alternate,l!==null&&l.memoizedState!==null?(l=Cl,Cl=16777216,El(e,t,n),Cl=l):El(e,t,n));break;case 30:if((e.flags&Cl)!==0&&(l=e.memoizedProps.name,l!=null&&l!=="auto")){var i=e.stateNode;i.paired=null,hn===null&&(hn=new Map),hn.set(l,i)}El(e,t,n);break;default:El(e,t,n)}}function vx(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 vi(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var n=0;n<t.length;n++){var l=t[n];Ct=l,jx(l,e)}vx(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)bx(e),e=e.sibling}function bx(e){switch(e.tag){case 0:case 11:case 15:vi(e),e.flags&2048&&Xa(9,e,e.return);break;case 3:vi(e);break;case 12:vi(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,to(e)):vi(e);break;default:vi(e)}}function to(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var n=0;n<t.length;n++){var l=t[n];Ct=l,jx(l,e)}vx(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Xa(8,t,t.return),to(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,to(t));break;default:to(t)}e=e.sibling}}function jx(e,t){for(;Ct!==null;){var n=Ct;switch(n.tag){case 0:case 11:case 15:Xa(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var l=n.memoizedState.cachePool.pool;l!=null&&l.refCount++}break;case 24:ni(n.memoizedState.cache)}if(l=n.child,l!==null)l.return=n,Ct=l;else e:for(n=e;Ct!==null;){l=Ct;var i=l.sibling,r=l.return;if(ux(l),l===n){Ct=null;break e}if(i!==null){i.return=r,Ct=i;break e}Ct=r}}}var bb={getCacheForType:function(e){var t=Rt(mt),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return Rt(mt).controller.signal}},jb=typeof WeakMap=="function"?WeakMap:Map,Xe=0,et=null,Me=null,Ue=0,Ke=0,mn=null,Za=!1,ds=!1,Lu=!1,wa=0,dt=0,Ka=0,zl=0,no=0,xn=0,fs=0,bi=null,en=null,Uu=!1,ao=0,Nx=0,lo=1/0,so=null,Ja=null,st=0,$n=null,Rl=null,aa=0,Hu=0,Bu=null,wx=null,hs=null,ms=null,xs=null,ji=0,io=null;function pn(){return(Xe&2)!==0&&Ue!==0?Ue&-Ue:fe.T!==null?Ju():Tf()}function Sx(){if(xn===0)if((Ue&536870912)===0||_e){var e=er;er<<=1,(er&3932160)===0&&(er=262144),xn=e}else xn=536870912;return e=At.current,e!==null&&(e.flags|=32),xn}function ps(e,t){if(t!=null){var n=e.stateNode,l=n.ref;l===null&&(l=n.ref=lp(ha(e.memoizedProps,n))),ms===null&&(ms=[]),ms.push(t.bind(null,l))}}function tn(e,t,n){(e===et&&(Ke===2||Ke===9)||e.cancelPendingCommit!==null)&&(gs(e,0),Pa(e,Ue,xn,!1)),Gs(e,n),((Xe&2)===0||e!==et)&&(e===et&&((Xe&2)===0&&(zl|=n),dt===4&&Pa(e,Ue,xn,!1)),la(e))}function kx(e,t,n){if((Xe&6)!==0)throw Error(u(327));var l=!n&&(t&127)===0&&(t&e.expiredLanes)===0||$s(e,t),i=l?Sb(e,t):$u(e,t,!0),r=l;do{if(i===0){ds&&!l&&Pa(e,t,0,!1);break}else{if(n=e.current.alternate,r&&!Nb(n)){i=$u(e,t,!1),r=!1;continue}if(i===2){if(r=t,e.errorRecoveryDisabledLanes&r)var f=0;else f=e.pendingLanes&-536870913,f=f!==0?f:f&536870912?536870912:0;if(f!==0){t=f;e:{var v=e;i=bi;var w=v.current.memoizedState.isDehydrated;if(w&&(gs(v,f).flags|=256),f=$u(v,f,!1),f!==2&&f!==6){if(Lu&&!w){v.errorRecoveryDisabledLanes|=r,zl|=r,i=4;break e}r=en,en=i,r!==null&&(en===null?en=r:en.push.apply(en,r))}i=f}if(r=!1,i!==2)continue}}if(i===1){gs(e,0),Pa(e,t,0,!0);break}e:{switch(l=e,r=i,r){case 0:case 1:throw Error(u(345));case 4:if((t&4194048)!==t&&(t&62914560)!==t)break;case 6:Pa(l,t,xn,!Za);break e;case 2:en=null;break;case 3:case 5:break;default:throw Error(u(329))}if((t&62914560)===t&&(i=ao+300-rn(),10<i)){if(Pa(l,t,xn,!Za),nr(l,0,!0)!==0)break e;aa=t,l.timeoutHandle=id(Tx.bind(null,l,n,en,so,Uu,t,xn,zl,fs,Za,r,"Throttled",-0,0),i);break e}Tx(l,n,en,so,Uu,t,xn,zl,fs,Za,r,null,-0,0)}}break}while(!0);la(e)}function Tx(e,t,n,l,i,r,f,v,w,H,G,J,_,$){e.timeoutHandle=-1;var se=t.subtreeFlags,xe=(r&335544064)===r;if(J=null,(xe||se&8192||(se&16785408)===16785408)&&(J={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Kn},hn=null,yx(t,r,J),xe&&(se=J,xe=e.containerInfo,xe=(xe.nodeType===9?xe:xe.ownerDocument).__reactViewTransition,xe!=null&&(se.count++,se.waitingForViewTransition=!0,se=zi.bind(se),xe.finished.then(se,se))),se=(r&62914560)===r?ao-rn():(r&4194048)===r?Nx-rn():0,se=T0(J,se),se!==null)){aa=r,e.cancelPendingCommit=se(Mx.bind(null,e,t,r,n,l,i,f,v,w,H,G,J,null,_,$)),Pa(e,r,f,!H);return}Mx(e,t,r,n,l,i,f,v,w,H,G,J)}function Nb(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var l=0;l<n.length;l++){var i=n[l],r=i.getSnapshot;i=i.value;try{if(!dn(r(),i))return!1}catch{return!1}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;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 Pa(e,t,n,l){t=jf(e,t),t&=~no,t&=~zl,e.suspendedLanes|=t,e.pingedLanes&=~t,l&&(e.warmLanes|=t),l=e.expirationTimes;for(var i=t;0<i;){var r=31-cn(i),f=1<<r;l[r]=-1,i&=~f}n!==0&&wf(e,n,t)}function ro(){return(Xe&6)===0?(Ni(0),!1):!0}function qu(){if(Me!==null){if(Ke===0)var e=Me.return;else e=Me,ga=gl=null,Kc(e),as=null,si=0,e=Me;for(;e!==null;)Jm(e.alternate,e),e=e.return;Me=null}}function gs(e,t){var n=e.timeoutHandle;return n!==-1&&(e.timeoutHandle=-1,Qb(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),aa=0,qu(),et=e,Me=n=xa(e.current,null),Ue=t,Ke=0,mn=null,Za=!1,ds=$s(e,t),Lu=!1,fs=xn=no=zl=Ka=dt=0,en=bi=null,Uu=!1,wa=jf(e,t),xr(),n}function Cx(e,t){ze=null,fe.H=qr,t===ns||t===Tr?(t=Mh(),Ke=3):t===Oc?(t=Mh(),Ke=4):Ke=t===cu?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,mn=t,Me===null&&(dt=1,$r(e,Sn(t,e.current)))}function Ex(){var e=At.current;return e===null?!0:(Ue&4194048)===Ue?Bt===null:(Ue&62914560)===Ue||(Ue&536870912)!==0?e===Bt:!1}function zx(){var e=fe.H;return fe.H=qr,e===null?qr:e}function Rx(){var e=fe.A;return fe.A=bb,e}function oo(){dt=4,Za||(Ue&4194048)!==Ue&&At.current!==null||(ds=!0),(Ka&134217727)===0&&(zl&134217727)===0||et===null||Pa(et,Ue,xn,!1)}function $u(e,t,n){var l=Xe;Xe|=2;var i=zx(),r=Rx();(et!==e||Ue!==t)&&(so=null,gs(e,t)),t=!1;var f=dt;e:do try{if(Ke!==0&&Me!==null){var v=Me,w=mn;switch(Ke){case 8:qu(),f=6;break e;case 3:case 2:case 9:case 6:At.current===null&&(t=!0);var H=Ke;if(Ke=0,mn=null,ys(e,v,w,H),n&&ds){f=0;break e}break;default:H=Ke,Ke=0,mn=null,ys(e,v,w,H)}}wb(),f=dt;break}catch(G){Cx(e,G)}while(!0);return t&&e.shellSuspendCounter++,ga=gl=null,Xe=l,fe.H=i,fe.A=r,Me===null&&(et=null,Ue=0,xr()),f}function wb(){for(;Me!==null;)Ax(Me)}function Sb(e,t){var n=Xe;Xe|=2;var l=zx(),i=Rx();et!==e||Ue!==t?(so=null,lo=rn()+500,gs(e,t)):ds=$s(e,t);e:do try{if(Ke!==0&&Me!==null){t=Me;var r=mn;t:switch(Ke){case 1:Ke=0,mn=null,ys(e,t,r,1);break;case 2:case 9:if(Dh(r)){Ke=0,mn=null,Dx(t);break}t=function(){Ke!==2&&Ke!==9||et!==e||(Ke=7),la(e)},r.then(t,t);break e;case 3:Ke=7;break e;case 4:Ke=5;break e;case 7:Dh(r)?(Ke=0,mn=null,Dx(t)):(Ke=0,mn=null,ys(e,t,r,7));break;case 5:var f=null;switch(Me.tag){case 26:f=Me.memoizedState;case 5:case 27:var v=Me;if(f?wp(f):v.stateNode.complete){Ke=0,mn=null;var w=v.sibling;if(w!==null)Me=w;else{var H=v.return;H!==null?(Me=H,co(H)):Me=null}break t}}Ke=0,mn=null,ys(e,t,r,5);break;case 6:Ke=0,mn=null,ys(e,t,r,6);break;case 8:qu(),dt=6;break e;default:throw Error(u(462))}}kb();break}catch(G){Cx(e,G)}while(!0);return ga=gl=null,fe.H=l,fe.A=i,Xe=n,Me!==null?0:(et=null,Ue=0,xr(),dt)}function kb(){for(;Me!==null&&!ct();)Ax(Me)}function Ax(e){var t=Zm(e.alternate,e,wa);e.memoizedProps=e.pendingProps,t===null?co(e):Me=t}function Dx(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=qm(n,t,t.pendingProps,t.type,void 0,Ue);break;case 11:t=qm(n,t,t.pendingProps,t.type.render,t.ref,Ue);break;case 5:Kc(t);var l=t;l===kt&&(_e?(jr(l),l.tag===5&&l.stateNode!=null&&(tt=l.stateNode)):(jr(l),_e=!0));default:Jm(n,t),t=Me=jh(t,wa),t=Zm(n,t,wa)}e.memoizedProps=e.pendingProps,t===null?co(e):Me=t}function ys(e,t,n,l){ga=gl=null,Kc(t),as=null,si=0;var i=t.return;try{if(fb(e,i,t,n,Ue)){dt=1,$r(e,Sn(n,e.current)),Me=null;return}}catch(r){if(i!==null)throw Me=i,r;dt=1,$r(e,Sn(n,e.current)),Me=null;return}t.flags&32768?(_e||l===1?e=!0:ds||(Ue&536870912)!==0?e=!1:(Za=e=!0,(l===2||l===9||l===3||l===6)&&(l=At.current,l!==null&&l.tag===13&&(l.flags|=16384))),_x(t,e)):co(t)}function co(e){var t=e;do{if((t.flags&32768)!==0){_x(t,Za);return}e=t.return;var n=pb(t.alternate,t,wa);if(n!==null){Me=n;return}if(t=t.sibling,t!==null){Me=t;return}Me=t=e}while(t!==null);dt===0&&(dt=5)}function _x(e,t){do{var n=gb(e.alternate,e);if(n!==null){n.flags&=32767,Me=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){Me=e;return}Me=e=n}while(e!==null);dt=6,Me=null}function Mx(e,t,n,l,i,r,f,v,w,H,G,J){e.cancelPendingCommit=null;do uo();while(st!==0);if((Xe&6)!==0)throw Error(u(327));if(t!==null){if(t===e.current)throw Error(u(177));e===et&&(Me=et=null,Ue=0),Rl=t,$n=e,aa=n,Bu=i,wx=l,Tb(e,t,n,f,v,w,J)}}function Tb(e,t,n,l,i,r,f){var v=t.lanes|t.childLanes;if(Hu=v,v|=Nc,Iy(e,n,v,l,i,r),ms=null,(n&335544064)===n?(xs=eb(e),l=10262):(xs=null,l=10256),(t.subtreeFlags&l)!==0||(t.flags&l)!==0?(e.callbackNode=null,e.callbackPriority=0,Db(Ii,function(){return Xu(),null})):(e.callbackNode=null,e.callbackPriority=0),Jr=!1,l=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||l){l=fe.T,fe.T=null,i=ye.p,ye.p=2,r=Xe,Xe|=4;try{yb(e,t,n)}finally{Xe=r,ye.p=i,fe.T=l}}st=1,Jr?hs=Ib(f,e.containerInfo,xs,Gu,Yu,Eb,Vu,Xu,Cb):(Gu(),Yu(),Vu())}function Cb(e){if(st!==0){var t=$n.onRecoverableError;t(e,{componentStack:null})}}function Eb(){st===3&&(st=0,px(Rl,$n),st=4)}function Gu(){if(st===1){st=0;var e=$n,t=Rl,n=aa,l=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||l){l=fe.T,fe.T=null;var i=ye.p;ye.p=2;var r=Xe;Xe|=4;try{gi=Ir=!1,mx(t,e,n),n=ad;var f=dh(e.containerInfo),v=n.focusedElem,w=n.selectionRange;if(f!==v&&v&&v.ownerDocument&&uh(v.ownerDocument.documentElement,v)){if(w!==null&&gc(v)){var H=w.start,G=w.end;if(G===void 0&&(G=H),"selectionStart"in v)v.selectionStart=H,v.selectionEnd=Math.min(G,v.value.length);else{var J=v.ownerDocument||document,_=J&&J.defaultView||window;if(_.getSelection){var $=_.getSelection(),se=v.textContent.length,xe=Math.min(w.start,se),Re=w.end===void 0?xe:Math.min(w.end,se);!$.extend&&xe>Re&&(f=Re,Re=xe,xe=f);var U=ch(v,xe),z=ch(v,Re);if(U&&z&&($.rangeCount!==1||$.anchorNode!==U.node||$.anchorOffset!==U.offset||$.focusNode!==z.node||$.focusOffset!==z.offset)){var q=J.createRange();q.setStart(U.node,U.offset),$.removeAllRanges(),xe>Re?($.addRange(q),$.extend(z.node,z.offset)):(q.setEnd(z.node,z.offset),$.addRange(q))}}}}for(J=[],$=v;$=$.parentNode;)$.nodeType===1&&J.push({element:$,left:$.scrollLeft,top:$.scrollTop});for(typeof v.focus=="function"&&v.focus(),v=0;v<J.length;v++){var Z=J[v];Z.element.scrollLeft=Z.left,Z.element.scrollTop=Z.top}}Ts=!!nd,ad=nd=null}finally{Xe=r,ye.p=i,fe.T=l}}e.current=t,st=2}}function Yu(){if(st===2){st=0;var e=$n,t=Rl,n=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||n){n=fe.T,fe.T=null;var l=ye.p;ye.p=2;var i=Xe;Xe|=4;try{ox(e,t.alternate,t)}finally{Xe=i,ye.p=l,fe.T=n}}st=3}}function Vu(){if(st===4||st===3){st=0;var e=hs;hs=null,sn();var t=$n,n=Rl,l=aa,i=wx,r=(l&335544064)===l?10262:10256;if((n.subtreeFlags&r)!==0||(n.flags&r)!==0?st=5:(st=0,Rl=$n=null,Ox(t,t.pendingLanes)),r=t.pendingLanes,r===0&&(Ja=null),Wo(l),n=n.stateNode,on&&typeof on.onCommitFiberRoot=="function")try{on.onCommitFiberRoot(qs,n,void 0,(n.current.flags&128)===128)}catch{}if(i!==null){n=fe.T,r=ye.p,ye.p=2,fe.T=null;try{for(var f=t.onRecoverableError,v=0;v<i.length;v++){var w=i[v];f(w.value,{componentStack:w.stack})}}finally{fe.T=n,ye.p=r}}if(i=ms,f=xs,xs=null,i!==null&&(ms=null,f===null&&(f=[]),e!==null))for(w=0;w<i.length;w++)n=(0,i[w])(f),n!==void 0&&e.finished.finally(n);(aa&3)!==0&&uo(),la(t),r=t.pendingLanes,(l&261930)!==0&&(r&42)!==0?t===io?ji++:(ji=0,io=t):(ji=0,io=null),Ni(0)}}function Ox(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,ni(t)))}function uo(){return hs!==null&&(hs.skipTransition(),hs=null),Gu(),Yu(),Vu(),Xu()}function Xu(){if(st!==5)return!1;var e=$n,t=Hu;Hu=0;var n=Wo(aa),l=fe.T,i=ye.p;try{ye.p=32>n?32:n,fe.T=null,n=Bu,Bu=null;var r=$n,f=aa;if(st=0,Rl=$n=null,aa=0,(Xe&6)!==0)throw Error(u(331));var v=Xe;if(Xe|=4,bx(r.current),gx(r,r.current,f,n),Xe=v,Ni(0,!1),on&&typeof on.onPostCommitFiberRoot=="function")try{on.onPostCommitFiberRoot(qs,r)}catch{}return!0}finally{ye.p=i,fe.T=l,Ox(e,t)}}function Lx(e,t,n){t=Sn(n,t),t=ou(e.stateNode,t,2),e=$a(e,t,2),e!==null&&(Gs(e,2),la(e))}function Je(e,t,n){if(e.tag===3)Lx(e,e,n);else for(;t!==null;){if(t.tag===3){Lx(t,e,n);break}else if(t.tag===1){var l=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof l.componentDidCatch=="function"&&(Ja===null||!Ja.has(l))){e=Sn(n,e),n=Dm(2),l=$a(t,n,2),l!==null&&(_m(n,l,t,e),Gs(l,2),la(l));break}}t=t.return}}function Qu(e,t,n){var l=e.pingCache;if(l===null){l=e.pingCache=new jb;var i=new Set;l.set(t,i)}else i=l.get(t),i===void 0&&(i=new Set,l.set(t,i));i.has(n)||(Lu=!0,i.add(n),e=zb.bind(null,e,t,n),t.then(e,e))}function zb(e,t,n){var l=e.pingCache;l!==null&&l.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,et===e&&(Ue&n)===n&&((dt===4||dt===3&&(Ue&62914560)===Ue&&300>rn()-ao)&&(Xe&2)===0?gs(e,0):no|=n,fs===Ue&&(fs=0)),la(e)}function Ux(e,t){t===0&&(t=Nf()),e=ml(e,t),e!==null&&(Gs(e,t),la(e))}function Rb(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Ux(e,n)}function Ab(e,t){var n=0;switch(e.tag){case 31:case 13:var l=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:l=e.stateNode;break;case 22:l=e.stateNode._retryCache;break;default:throw Error(u(314))}l!==null&&l.delete(t),Ux(e,n)}function Db(e,t){return Ht(e,t)}var vs=null,bs=null,Zu=!1,fo=!1,Ku=!1,Fa=0;function la(e){e!==bs&&e.next===null&&(bs===null?vs=bs=e:bs=bs.next=e),fo=!0,Zu||(Zu=!0,Mb())}function Ni(e,t){if(!Ku&&fo){Ku=!0;do for(var n=!1,l=vs;l!==null;){if(e!==0){var i=l.pendingLanes;if(i===0)var r=0;else{var f=l.suspendedLanes,v=l.pingedLanes;r=(1<<31-cn(42|e)+1)-1,r&=i&~(f&~v),r=r&201326741?r&201326741|1:r?r|2:0}r!==0&&(n=!0,$x(l,r))}else r=Ue,r=nr(l,l===et?r:0,l.cancelPendingCommit!==null||l.timeoutHandle!==-1),(r&3)===0||$s(l,r)||(n=!0,$x(l,r));l=l.next}while(n);Ku=!1}}function _b(){Hx()}function Hx(){fo=Zu=!1;var e=0;Fa!==0&&Xb()&&(e=Fa);for(var t=rn(),n=null,l=vs;l!==null;){var i=l.next,r=Bx(l,t);r===0?(l.next=null,n===null?vs=i:n.next=i,i===null&&(bs=n)):(n=l,(e!==0||(r&3)!==0)&&(fo=!0)),l=i}st!==0&&st!==5||Ni(e),Fa!==0&&(Fa=0)}function Bx(e,t){for(var n=e.suspendedLanes,l=e.pingedLanes,i=e.expirationTimes,r=e.pendingLanes&-62914561;0<r;){var f=31-cn(r),v=1<<f,w=i[f];w===-1?((v&n)===0||(v&l)!==0)&&(i[f]=Fy(v,t)):w<=t&&(e.expiredLanes|=v),r&=~v}if(t=et,n=Ue,n=nr(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l=e.callbackNode,n===0||e===t&&(Ke===2||Ke===9)||e.cancelPendingCommit!==null)return l!==null&&l!==null&&ft(l),e.callbackNode=null,e.callbackPriority=0;if((n&3)===0||$s(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(l!==null&&ft(l),Wo(n)){case 2:case 8:n=vf;break;case 32:n=Ii;break;case 268435456:n=bf;break;default:n=Ii}return l=qx.bind(null,e),n=Ht(n,l),e.callbackPriority=t,e.callbackNode=n,t}return l!==null&&l!==null&&ft(l),e.callbackPriority=2,e.callbackNode=null,2}function qx(e,t){if(st!==0&&st!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(uo()&&e.callbackNode!==n)return null;var l=Ue;return l=nr(e,e===et?l:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l===0?null:(kx(e,l,t),Bx(e,rn()),e.callbackNode!=null&&e.callbackNode===n?qx.bind(null,e):null)}function $x(e,t){if(uo())return null;kx(e,t,!0)}function Mb(){Zb(function(){(Xe&6)!==0?Ht(yf,_b):Hx()})}function Ju(){if(Fa===0){var e=bl;e===0&&(e=Wi,Wi<<=1,(Wi&261888)===0&&(Wi=256)),Fa=e}return Fa}function Gx(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:rr(e)}function Ob(e,t,n,l,i){if(t==="submit"&&n&&n.stateNode===i){var r=Gx((i[Pt]||null).action),f=l.submitter;f&&(t=(t=f[Pt]||null)?Gx(t.formAction):f.getAttribute("formAction"),t!==null&&(r=t,f=null));var v=new dr("action","action",null,l,i);e.push({event:v,listeners:[{instance:null,listener:function(){if(l.defaultPrevented){if(Fa!==0){var w=new FormData(i,f);au(n,{pending:!0,data:w,method:i.method,action:r},null,w)}}else typeof r=="function"&&(v.preventDefault(),w=new FormData(i,f),au(n,{pending:!0,data:w,method:i.method,action:r},r,w))},currentTarget:i}]})}}for(var Pu=0;Pu<jc.length;Pu++){var Fu=jc[Pu],Lb=Fu.toLowerCase(),Ub=Fu[0].toUpperCase()+Fu.slice(1);Un(Lb,"on"+Ub)}Un(mh,"onAnimationEnd"),Un(xh,"onAnimationIteration"),Un(ph,"onAnimationStart"),Un("dblclick","onDoubleClick"),Un("focusin","onFocus"),Un("focusout","onBlur"),Un(Qv,"onTransitionRun"),Un(Zv,"onTransitionStart"),Un(Kv,"onTransitionCancel"),Un(gh,"onTransitionEnd"),Gl("onMouseEnter",["mouseout","mouseover"]),Gl("onMouseLeave",["mouseout","mouseover"]),Gl("onPointerEnter",["pointerout","pointerover"]),Gl("onPointerLeave",["pointerout","pointerover"]),dl("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),dl("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),dl("onBeforeInput",["compositionend","keypress","textInput","paste"]),dl("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),dl("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),dl("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var wi="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(" "),Hb=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(wi));function Yx(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var l=e[n],i=l.event;l=l.listeners;e:{var r=void 0;if(t)for(var f=l.length-1;0<=f;f--){var v=l[f],w=v.instance,H=v.currentTarget;if(v=v.listener,w!==r&&i.isPropagationStopped())break e;r=v,i.currentTarget=H;try{r(i)}catch(G){mr(G)}i.currentTarget=null,r=w}else for(f=0;f<l.length;f++){if(v=l[f],w=v.instance,H=v.currentTarget,v=v.listener,w!==r&&i.isPropagationStopped())break e;r=v,i.currentTarget=H;try{r(i)}catch(G){mr(G)}i.currentTarget=null,r=w}}}}function Oe(e,t){var n=t[Ef];n===void 0&&(n=t[Ef]=new Set);var l=e+"__bubble";n.has(l)||(Vx(t,e,2,!1),n.add(l))}function Iu(e,t,n){var l=0;t&&(l|=4),Vx(n,e,l,t)}var ho="_reactListening"+Math.random().toString(36).slice(2);function Wu(e){if(!e[ho]){e[ho]=!0,Af.forEach(function(n){n!=="selectionchange"&&(Hb.has(n)||Iu(n,!1,e),Iu(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[ho]||(t[ho]=!0,Iu("selectionchange",!1,t))}}function Vx(e,t,n,l){switch(_p(t)){case 2:var i=R0;break;case 8:i=A0;break;default:i=vd}n=i.bind(null,t,n,e),i=void 0,!rc||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(i=!0),l?i!==void 0?e.addEventListener(t,n,{capture:!0,passive:i}):e.addEventListener(t,n,!0):i!==void 0?e.addEventListener(t,n,{passive:i}):e.addEventListener(t,n,!1)}function ed(e,t,n,l,i){var r=l;if((t&1)===0&&(t&2)===0&&l!==null)e:for(;;){if(l===null)return;var f=l.tag;if(f===3||f===4){var v=l.stateNode.containerInfo;if(v===i)break;if(f===4)for(f=l.return;f!==null;){var w=f.tag;if((w===3||w===4)&&f.stateNode.containerInfo===i)return;f=f.return}for(;v!==null;){if(f=ul(v),f===null)return;if(w=f.tag,w===5||w===6||w===26||w===27){l=r=f;continue e}v=v.parentNode}}l=l.return}Vf(function(){var H=r,G=sc(n),J=[];e:{var _=yh.get(e);if(_!==void 0){var $=dr,se=e;switch(e){case"keypress":if(cr(n)===0)break e;case"keydown":case"keyup":$=Nv;break;case"focusin":se="focus",$=dc;break;case"focusout":se="blur",$=dc;break;case"beforeblur":case"afterblur":$=dc;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":$=Zf;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":$=uv;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":$=Cv;break;case mh:case xh:case ph:$=hv;break;case gh:$=zv;break;case"scroll":case"scrollend":$=ov;break;case"wheel":$=Av;break;case"copy":case"cut":case"paste":$=xv;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":$=Jf;break;case"submit":$=kv;break;case"toggle":case"beforetoggle":$=_v}var xe=(t&4)!==0,Re=!xe&&(e==="scroll"||e==="scrollend"),U=xe?_!==null?_+"Capture":null:_;xe=[];for(var z=H,q;z!==null;){var Z=z;if(q=Z.stateNode,Z=Z.tag,Z!==5&&Z!==26&&Z!==27||q===null||U===null||(Z=Xs(z,U),Z!=null&&xe.push(Si(z,Z,q))),Re)break;z=z.return}0<xe.length&&(_=new $(_,se,null,n,G),J.push({event:_,listeners:xe}))}}if((t&7)===0){e:{if($=e==="mouseover"||e==="pointerover",_=e==="mouseout"||e==="pointerout",$&&n!==lc&&(se=n.relatedTarget||n.fromElement)&&(ul(se)||se[Bl]))break e;(_||$)&&(se=G.window===G?G:($=G.ownerDocument)?$.defaultView||$.parentWindow:window,_?($=n.relatedTarget||n.toElement,_=H,$=$?ul($):null,$!==null&&(Re=h($),xe=$.tag,$!==Re||xe!==5&&xe!==27&&xe!==6)&&($=null)):(_=null,$=H),_!==$&&(xe=Zf,Z="onMouseLeave",U="onMouseEnter",z="mouse",(e==="pointerout"||e==="pointerover")&&(xe=Jf,Z="onPointerLeave",U="onPointerEnter",z="pointer"),Re=_==null?se:Vs(_),q=$==null?se:Vs($),se=new xe(Z,z+"leave",_,n,G),se.target=Re,se.relatedTarget=q,Z=null,ul(G)===H&&(xe=new xe(U,z+"enter",$,n,G),xe.target=q,xe.relatedTarget=Re,Z=xe),Re=Z,xe=_&&$?ne(_,$,Bb):null,_!==null&&Xx(J,se,_,xe,!1),$!==null&&Re!==null&&Xx(J,Re,$,xe,!0)))}e:{if(_=H?Vs(H):window,$=_.nodeName&&_.nodeName.toLowerCase(),$==="select"||$==="input"&&_.type==="file")var me=ah;else if(th(_))if(lh)me=Yv;else{me=$v;var He=qv}else $=_.nodeName,!$||$.toLowerCase()!=="input"||_.type!=="checkbox"&&_.type!=="radio"?H&&ac(H.elementType)&&(me=ah):me=Gv;if(me&&(me=me(e,H))){nh(J,me,n,G);break e}He&&He(e,_,H)}switch(He=H?Vs(H):window,e){case"focusin":(th(He)||He.contentEditable==="true")&&(Kl=He,yc=H,Ws=null);break;case"focusout":Ws=yc=Kl=null;break;case"mousedown":vc=!0;break;case"contextmenu":case"mouseup":case"dragend":vc=!1,fh(J,n,G);break;case"selectionchange":if(Xv)break;case"keydown":case"keyup":fh(J,n,G)}var ge;if(hc)e:{switch(e){case"compositionstart":var Ne="onCompositionStart";break e;case"compositionend":Ne="onCompositionEnd";break e;case"compositionupdate":Ne="onCompositionUpdate";break e}Ne=void 0}else Zl?Wf(e,n)&&(Ne="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(Ne="onCompositionStart");Ne&&(Pf&&n.locale!=="ko"&&(Zl||Ne!=="onCompositionStart"?Ne==="onCompositionEnd"&&Zl&&(ge=Xf()):(Da=G,oc="value"in Da?Da.value:Da.textContent,Zl=!0)),He=mo(H,Ne),0<He.length&&(Ne=new Kf(Ne,e,null,n,G),J.push({event:Ne,listeners:He}),ge?Ne.data=ge:(ge=eh(n),ge!==null&&(Ne.data=ge)))),(ge=Ov?Lv(e,n):Uv(e,n))&&(Ne=mo(H,"onBeforeInput"),0<Ne.length&&(He=new Kf("onBeforeInput","beforeinput",null,n,G),J.push({event:He,listeners:Ne}),He.data=ge)),Ob(J,e,H,n,G)}Yx(J,t)})}function Si(e,t,n){return{instance:e,listener:t,currentTarget:n}}function mo(e,t){for(var n=t+"Capture",l=[];e!==null;){var i=e,r=i.stateNode;if(i=i.tag,i!==5&&i!==26&&i!==27||r===null||(i=Xs(e,n),i!=null&&l.unshift(Si(e,i,r)),i=Xs(e,t),i!=null&&l.push(Si(e,i,r))),e.tag===3)return l;e=e.return}return[]}function Bb(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Xx(e,t,n,l,i){for(var r=t._reactName,f=[];n!==null&&n!==l;){var v=n,w=v.alternate,H=v.stateNode;if(v=v.tag,w!==null&&w===l)break;v!==5&&v!==26&&v!==27||H===null||(w=H,i?(H=Xs(n,r),H!=null&&f.unshift(Si(n,H,w))):i||(H=Xs(n,r),H!=null&&f.push(Si(n,H,w)))),n=n.return}f.length!==0&&e.push({event:t,listeners:f})}var qb=/\r\n?/g,$b=/\u0000|\uFFFD/g;function Qx(e){return(typeof e=="string"?e:""+e).replace(qb,`
|
|
49
|
+
`).replace($b,"")}function Zx(e,t){return t=Qx(t),Qx(e)===t}function Pe(e,t,n,l,i,r){switch(n){case"children":if(typeof l=="string")t==="body"||t==="textarea"&&l===""||Vl(e,l);else if(typeof l=="number"||typeof l=="bigint")t!=="body"&&Vl(e,""+l);else return;break;case"className":ir(e,"class",l);break;case"tabIndex":ir(e,"tabindex",l);break;case"dir":case"role":case"viewBox":case"width":case"height":ir(e,n,l);break;case"style":Gf(e,l,r);return;case"data":if(t!=="object"){ir(e,"data",l);break}case"src":case"href":if(l===""&&(t!=="a"||n!=="href")){e.removeAttribute(n);break}if(l==null||typeof l=="function"||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(n);break}l=rr(l),e.setAttribute(n,l);break;case"action":case"formAction":if(typeof l=="function"){e.setAttribute(n,"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 r=="function"&&(n==="formAction"?(t!=="input"&&Pe(e,t,"name",i.name,i,null),Pe(e,t,"formEncType",i.formEncType,i,null),Pe(e,t,"formMethod",i.formMethod,i,null),Pe(e,t,"formTarget",i.formTarget,i,null)):(Pe(e,t,"encType",i.encType,i,null),Pe(e,t,"method",i.method,i,null),Pe(e,t,"target",i.target,i,null)));if(l==null||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(n);break}l=rr(l),e.setAttribute(n,l);break;case"onClick":l!=null&&(e.onclick=Kn);return;case"onScroll":l!=null&&Oe("scroll",e);return;case"onScrollEnd":l!=null&&Oe("scrollend",e);return;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(u(61));if(n=l.__html,n!=null){if(i.children!=null)throw Error(u(60));r?.__html!==n&&(e.innerHTML=n)}}break;case"multiple":e.multiple=l&&typeof l!="function"&&typeof l!="symbol";break;case"muted":e.muted=l&&typeof l!="function"&&typeof l!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(l==null||typeof l=="function"||typeof l=="boolean"||typeof l=="symbol"){e.removeAttribute("xlink:href");break}n=rr(l),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",n);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":l!=null&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(n,l):e.removeAttribute(n);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"credentialless":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":l&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(n,""):e.removeAttribute(n);break;case"capture":case"download":l===!0?e.setAttribute(n,""):l!==!1&&l!=null&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(n,l):e.removeAttribute(n);break;case"cols":case"rows":case"size":case"span":l!=null&&typeof l!="function"&&typeof l!="symbol"&&!isNaN(l)&&1<=l?e.setAttribute(n,l):e.removeAttribute(n);break;case"rowSpan":case"start":l==null||typeof l=="function"||typeof l=="symbol"||isNaN(l)?e.removeAttribute(n):e.setAttribute(n,l);break;case"popover":Oe("beforetoggle",e),Oe("toggle",e),sr(e,"popover",l);break;case"xlinkActuate":da(e,"http://www.w3.org/1999/xlink","xlink:actuate",l);break;case"xlinkArcrole":da(e,"http://www.w3.org/1999/xlink","xlink:arcrole",l);break;case"xlinkRole":da(e,"http://www.w3.org/1999/xlink","xlink:role",l);break;case"xlinkShow":da(e,"http://www.w3.org/1999/xlink","xlink:show",l);break;case"xlinkTitle":da(e,"http://www.w3.org/1999/xlink","xlink:title",l);break;case"xlinkType":da(e,"http://www.w3.org/1999/xlink","xlink:type",l);break;case"xmlBase":da(e,"http://www.w3.org/XML/1998/namespace","xml:base",l);break;case"xmlLang":da(e,"http://www.w3.org/XML/1998/namespace","xml:lang",l);break;case"xmlSpace":da(e,"http://www.w3.org/XML/1998/namespace","xml:space",l);break;case"is":sr(e,"is",l);break;case"innerText":case"textContent":return;default:if(!(2<n.length)||n[0]!=="o"&&n[0]!=="O"||n[1]!=="n"&&n[1]!=="N")n=iv.get(n)||n,sr(e,n,l);else return}Ge=!0}function td(e,t,n,l,i,r){switch(n){case"style":Gf(e,l,r);return;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(u(61));if(n=l.__html,n!=null){if(i.children!=null)throw Error(u(60));r?.__html!==n&&(e.innerHTML=n)}}break;case"children":if(typeof l=="string")Vl(e,l);else if(typeof l=="number"||typeof l=="bigint")Vl(e,""+l);else return;break;case"onScroll":l!=null&&Oe("scroll",e);return;case"onScrollEnd":l!=null&&Oe("scrollend",e);return;case"onClick":l!=null&&(e.onclick=Kn);return;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":return;case"innerText":case"textContent":return;default:if(!Df.hasOwnProperty(n))e:{if(n[0]==="o"&&n[1]==="n"&&(i=n.endsWith("Capture"),r=n.slice(2,i?n.length-7:void 0),t=e[Pt]||null,t=t!=null?t[n]:null,typeof t=="function"&&e.removeEventListener(r,t,i),typeof l=="function")){typeof t!="function"&&t!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(r,l,i);break e}Ge=!0,n in e?e[n]=l:l===!0?e.setAttribute(n,""):sr(e,n,l)}return}Ge=!0}function Mt(e,t,n){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Oe("error",e),Oe("load",e);var l=!1,i=!1,r;for(r in n)if(n.hasOwnProperty(r)){var f=n[r];if(f!=null)switch(r){case"src":l=!0;break;case"srcSet":i=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(u(137,t));default:Pe(e,t,r,f,n,null)}}i&&Pe(e,t,"srcSet",n.srcSet,n,null),l&&Pe(e,t,"src",n.src,n,null);return;case"input":Oe("invalid",e);var v=r=f=i=null,w=null,H=null;for(l in n)if(n.hasOwnProperty(l)){var G=n[l];if(G!=null)switch(l){case"name":i=G;break;case"type":f=G;break;case"checked":w=G;break;case"defaultChecked":H=G;break;case"value":r=G;break;case"defaultValue":v=G;break;case"children":case"dangerouslySetInnerHTML":if(G!=null)throw Error(u(137,t));break;default:Pe(e,t,l,G,n,null)}}Hf(e,r,v,w,H,f,i,!1);return;case"select":Oe("invalid",e),l=f=r=null;for(i in n)if(n.hasOwnProperty(i)&&(v=n[i],v!=null))switch(i){case"value":r=v;break;case"defaultValue":f=v;break;case"multiple":l=v;default:Pe(e,t,i,v,n,null)}t=r,n=f,e.multiple=!!l,t!=null?Yl(e,!!l,t,!1):n!=null&&Yl(e,!!l,n,!0);return;case"textarea":Oe("invalid",e),r=i=l=null;for(f in n)if(n.hasOwnProperty(f)&&(v=n[f],v!=null))switch(f){case"value":l=v;break;case"defaultValue":i=v;break;case"children":r=v;break;case"dangerouslySetInnerHTML":if(v!=null)throw Error(u(91));break;default:Pe(e,t,f,v,n,null)}qf(e,l,i,r);return;case"option":for(w in n)if(n.hasOwnProperty(w)&&(l=n[w],l!=null))switch(w){case"selected":e.selected=l&&typeof l!="function"&&typeof l!="symbol";break;default:Pe(e,t,w,l,n,null)}return;case"dialog":Oe("beforetoggle",e),Oe("toggle",e),Oe("cancel",e),Oe("close",e);break;case"iframe":case"object":Oe("load",e);break;case"video":case"audio":for(l=0;l<wi.length;l++)Oe(wi[l],e);break;case"image":Oe("error",e),Oe("load",e);break;case"details":Oe("toggle",e);break;case"embed":case"source":case"link":Oe("error",e),Oe("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(H in n)if(n.hasOwnProperty(H)&&(l=n[H],l!=null))switch(H){case"children":case"dangerouslySetInnerHTML":throw Error(u(137,t));default:Pe(e,t,H,l,n,null)}return;default:if(ac(t)){for(G in n)n.hasOwnProperty(G)&&(l=n[G],l!==void 0&&td(e,t,G,l,n,void 0));return}}for(v in n)n.hasOwnProperty(v)&&(l=n[v],l!=null&&Pe(e,t,v,l,n,null))}var Gb={};function Yb(e,t,n,l){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var i=null,r=null,f=null,v=null,w=null,H=null,G=null;for($ in n){var J=n[$];if(n.hasOwnProperty($)&&J!=null)switch($){case"checked":break;case"value":break;case"defaultValue":w=J;default:l.hasOwnProperty($)||Pe(e,t,$,null,l,J)}}for(var _ in l){var $=l[_];if(J=n[_],l.hasOwnProperty(_)&&($!=null||J!=null))switch(_){case"type":$!==J&&(Ge=!0),r=$;break;case"name":$!==J&&(Ge=!0),i=$;break;case"checked":$!==J&&(Ge=!0),H=$;break;case"defaultChecked":$!==J&&(Ge=!0),G=$;break;case"value":$!==J&&(Ge=!0),f=$;break;case"defaultValue":$!==J&&(Ge=!0),v=$;break;case"children":case"dangerouslySetInnerHTML":if($!=null)throw Error(u(137,t));break;default:$!==J&&Pe(e,t,_,$,l,J)}}tc(e,f,v,w,H,G,r,i);return;case"select":$=f=v=_=null;for(r in n)if(w=n[r],n.hasOwnProperty(r)&&w!=null)switch(r){case"value":break;case"multiple":$=w;default:l.hasOwnProperty(r)||Pe(e,t,r,null,l,w)}for(i in l)if(r=l[i],w=n[i],l.hasOwnProperty(i)&&(r!=null||w!=null))switch(i){case"value":r!==w&&(Ge=!0),_=r;break;case"defaultValue":r!==w&&(Ge=!0),v=r;break;case"multiple":r!==w&&(Ge=!0),f=r;default:r!==w&&Pe(e,t,i,r,l,w)}t=v,n=f,l=$,_!=null?Yl(e,!!n,_,!1):!!l!=!!n&&(t!=null?Yl(e,!!n,t,!0):Yl(e,!!n,n?[]:"",!1));return;case"textarea":$=_=null;for(v in n)if(i=n[v],n.hasOwnProperty(v)&&i!=null&&!l.hasOwnProperty(v))switch(v){case"value":break;case"children":break;default:Pe(e,t,v,null,l,i)}for(f in l)if(i=l[f],r=n[f],l.hasOwnProperty(f)&&(i!=null||r!=null))switch(f){case"value":i!==r&&(Ge=!0),_=i;break;case"defaultValue":i!==r&&(Ge=!0),$=i;break;case"children":break;case"dangerouslySetInnerHTML":if(i!=null)throw Error(u(91));break;default:i!==r&&Pe(e,t,f,i,l,r)}Bf(e,_,$);return;case"option":for(var se in n)if(_=n[se],n.hasOwnProperty(se)&&_!=null&&!l.hasOwnProperty(se))switch(se){case"selected":e.selected=!1;break;default:Pe(e,t,se,null,l,_)}for(w in l)if(_=l[w],$=n[w],l.hasOwnProperty(w)&&_!==$&&(_!=null||$!=null))switch(w){case"selected":_!==$&&(Ge=!0),e.selected=_&&typeof _!="function"&&typeof _!="symbol";break;default:Pe(e,t,w,_,l,$)}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 xe in n)_=n[xe],n.hasOwnProperty(xe)&&_!=null&&!l.hasOwnProperty(xe)&&Pe(e,t,xe,null,l,_);for(H in l)if(_=l[H],$=n[H],l.hasOwnProperty(H)&&_!==$&&(_!=null||$!=null))switch(H){case"children":case"dangerouslySetInnerHTML":if(_!=null)throw Error(u(137,t));break;default:Pe(e,t,H,_,l,$)}return;default:if(ac(t)){for(var Re in n)_=n[Re],n.hasOwnProperty(Re)&&_!==void 0&&!l.hasOwnProperty(Re)&&td(e,t,Re,void 0,l,_);for(G in l)_=l[G],$=n[G],!l.hasOwnProperty(G)||_===$||_===void 0&&$===void 0||td(e,t,G,_,l,$);return}}for(var U in n)_=n[U],n.hasOwnProperty(U)&&_!=null&&!l.hasOwnProperty(U)&&Pe(e,t,U,null,l,_);for(J in l)_=l[J],$=n[J],!l.hasOwnProperty(J)||_===$||_==null&&$==null||Pe(e,t,J,_,l,$)}function Kx(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function Vb(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,n=performance.getEntriesByType("resource"),l=0;l<n.length;l++){var i=n[l],r=i.transferSize,f=i.initiatorType,v=i.duration;if(r&&v&&Kx(f)){for(f=0,v=i.responseEnd,l+=1;l<n.length;l++){var w=n[l],H=w.startTime;if(H>v)break;var G=w.transferSize,J=w.initiatorType;G&&Kx(J)&&(w=w.responseEnd,f+=G*(w<v?1:(v-H)/(w-H)))}if(--l,t+=8*(r+f)/(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 nd=null,ad=null;function ki(e){return e.nodeType===9?e:e.ownerDocument}function Jx(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 Px(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 Fx(e,t,n,l){return n=ki(n).createElement(e),n[zt]=l,n[Pt]=t,Mt(n,e,t),St(n),n}function ld(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 sd=null;function Xb(){var e=window.event;return e&&e.type==="popstate"?e===sd?!1:(sd=e,!0):(sd=null,!1)}var id=typeof setTimeout=="function"?setTimeout:void 0,Qb=typeof clearTimeout=="function"?clearTimeout:void 0,Ix=typeof Promise=="function"?Promise:void 0,Wx=typeof requestAnimationFrame=="function"?requestAnimationFrame:id,Zb=typeof queueMicrotask=="function"?queueMicrotask:typeof Ix<"u"?function(e){return Ix.resolve(null).then(e).catch(Kb)}:id;function Kb(e){setTimeout(function(){throw e})}function Ia(e){return e==="head"}function ep(e,t){var n=t,l=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n==="/$"||n==="/&"){if(l===0){e.removeChild(i),Cs(t);return}l--}else if(n==="$"||n==="$?"||n==="$~"||n==="$!"||n==="&")l++;else if(n==="html")md(e.ownerDocument.documentElement);else if(n==="head"){n=e.ownerDocument.head,md(n);for(var r=n.firstChild;r;){var f=r.nextSibling,v=r.nodeName;r[Ys]||v==="SCRIPT"||v==="STYLE"||v==="LINK"&&r.rel.toLowerCase()==="stylesheet"||n.removeChild(r),r=f}}else n==="body"&&md(e.ownerDocument.body);n=i}while(n);Cs(t)}function tp(e,t){var n=e;e=0;do{var l=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display="none"):(n.style.display=n._stashedDisplay||"",n.getAttribute("style")===""&&n.removeAttribute("style")):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=""):n.nodeValue=n._stashedText||""),l&&l.nodeType===8)if(n=l.data,n==="/$"){if(e===0)break;e--}else n!=="$"&&n!=="$?"&&n!=="$~"&&n!=="$!"||e++;n=l}while(n)}function np(e,t,n){if(t=CSS.escape(t)!==t?"r-"+btoa(t).replace(/=/g,""):t,e.style.viewTransitionName=t,n!=null&&(e.style.viewTransitionClass=n),n=getComputedStyle(e),n.display==="inline"){if(t=e.getClientRects(),t.length===1)var l=1;else for(var i=l=0;i<t.length;i++){var r=t[i];0<r.width&&0<r.height&&l++}l===1&&(e=e.style,e.display=t.length===1?"inline-block":"block",e.marginTop="-"+n.paddingTop,e.marginBottom="-"+n.paddingBottom)}}function ap(e,t){e=e.style,t=t.style;var n=t!=null?t.hasOwnProperty("viewTransitionName")?t.viewTransitionName:t.hasOwnProperty("view-transition-name")?t["view-transition-name"]:null:null;e.viewTransitionName=n==null||typeof n=="boolean"?"":(""+n).trim(),n=t!=null?t.hasOwnProperty("viewTransitionClass")?t.viewTransitionClass:t.hasOwnProperty("view-transition-class")?t["view-transition-class"]:null:null,e.viewTransitionClass=n==null||typeof n=="boolean"?"":(""+n).trim(),e.display==="inline-block"&&(t==null?e.display=e.margin="":(n=t.display,e.display=n==null||typeof n=="boolean"?"":n,n=t.margin,n!=null?e.margin=n:(n=t.hasOwnProperty("marginTop")?t.marginTop:t["margin-top"],e.marginTop=n==null||typeof n=="boolean"?"":n,t=t.hasOwnProperty("marginBottom")?t.marginBottom:t["margin-bottom"],e.marginBottom=t==null||typeof t=="boolean"?"":t)))}function Jb(e,t,n){return n=n.ownerDocument.defaultView,{rect:e,abs:t.position==="absolute"||t.position==="fixed",clip:t.clipPath!=="none"||t.overflow!=="visible"||t.filter!=="none"||t.mask!=="none"||t.mask!=="none"||t.borderRadius!=="0px",view:0<=e.bottom&&0<=e.right&&e.top<=n.innerHeight&&e.left<=n.innerWidth}}function rd(e){var t=e.getBoundingClientRect(),n=getComputedStyle(e);return Jb(t,n,e)}function Pb(e){return e.documentElement.clientHeight}function Fb(e){this.addEventListener("load",e),this.addEventListener("error",e)}function Ib(e,t,n,l,i,r,f,v,w){var H=t.nodeType===9?t:t.ownerDocument;try{var G=H.startViewTransition({update:function(){var _=H.defaultView,$=_.navigation&&_.navigation.transition,se=H.fonts.status;l();var xe=[];if(se==="loaded"&&(Pb(H),H.fonts.status==="loading"&&xe.push(H.fonts.ready)),se=xe.length,e!==null)for(var Re=e.suspenseyImages,U=0,z=0;z<Re.length;z++){var q=Re[z];if(!q.complete){var Z=q.getBoundingClientRect();if(0<Z.bottom&&0<Z.right&&Z.top<_.innerHeight&&Z.left<_.innerWidth){if(U+=Sp(q),U>go){xe.length=se;break}q=new Promise(Fb.bind(q)),xe.push(q)}}}if(0<xe.length)return _=Promise.race([Promise.all(xe),new Promise(function(me){return setTimeout(me,500)})]).then(i,i),($?Promise.allSettled([$.finished,_]):_).then(r,r);if(i(),$)return $.finished.then(r,r);r()},types:n});H.__reactViewTransition=G;var J=[];return G.ready.then(function(){for(var _=H.documentElement.getAnimations({subtree:!0}),$=0;$<_.length;$++){var se=_[$],xe=se.effect,Re=xe.pseudoElement;if(Re!=null&&Re.startsWith("::view-transition")){J.push(se),se=xe.getKeyframes();for(var U=Re=void 0,z=!0,q=0;q<se.length;q++){var Z=se[q],me=Z.width;if(Re===void 0)Re=me;else if(Re!==me){z=!1;break}if(me=Z.height,U===void 0)U=me;else if(U!==me){z=!1;break}delete Z.width,delete Z.height,Z.transform==="none"&&delete Z.transform}z&&Re!==void 0&&U!==void 0&&(xe.setKeyframes(se),z=getComputedStyle(xe.target,xe.pseudoElement),z.width!==Re||z.height!==U)&&(z=se[0],z.width=Re,z.height=U,z=se[se.length-1],z.width=Re,z.height=U,xe.setKeyframes(se))}}f()},function(_){H.__reactViewTransition===G&&(H.__reactViewTransition=null);try{if(typeof _=="object"&&_!==null)switch(_.name){case"InvalidStateError":(_.message==="View transition was skipped because document visibility state is hidden."||_.message==="Skipping view transition because document visibility state has become hidden."||_.message==="Skipping view transition because viewport size changed."||_.message==="Transition was aborted because of invalid state")&&(_=null)}_!==null&&w(_)}finally{l(),i(),f()}}),G.finished.finally(function(){for(var _=0;_<J.length;_++)J[_].cancel();H.__reactViewTransition===G&&(H.__reactViewTransition=null),v()}),G}catch{return l(),i(),f(),null}}function Al(e,t){this._scope=document.documentElement,this._selector="::view-transition-"+e+"("+t+")"}Al.prototype.animate=function(e,t){return t=typeof t=="number"?{duration:t}:L({},t),t.pseudoElement=this._selector,this._scope.animate(e,t)},Al.prototype.getAnimations=function(){for(var e=this._scope,t=this._selector,n=e.getAnimations({subtree:!0}),l=[],i=0;i<n.length;i++){var r=n[i].effect;r!==null&&r.target===e&&r.pseudoElement===t&&l.push(n[i])}return l},Al.prototype.getComputedStyle=function(){return getComputedStyle(this._scope,this._selector)};function lp(e){return{name:e,group:new Al("group",e),imagePair:new Al("image-pair",e),old:new Al("old",e),new:new Al("new",e)}}function gn(e){this._fragmentFiber=e,this._observers=this._eventListeners=null}gn.prototype.addEventListener=function(e,t,n){var l=null,i=null;if(!(n!=null&&typeof n!="boolean"&&(l=n.signal||null,l!==null&&l.aborted))){this._eventListeners===null&&(this._eventListeners=[]);var r=this._eventListeners;if(ip(r,e,t,n)===-1){var f=this,v=t;n!=null&&typeof n!="boolean"&&n.once===!0&&(v=function(w){f.removeEventListener(e,t,n),typeof t=="function"?t.call(this,w):t.handleEvent(w)}),l!==null&&(i=f.removeEventListener.bind(f,e,t,n),l.addEventListener("abort",i,{once:!0}),i=l.removeEventListener.bind(l,"abort",i)),l=js(n),r.push({type:e,listener:t,optionsOrUseCapture:n,attachedListener:v,cleanup:i}),y(this._fragmentFiber.child,!1,Wb,e,v,l)}this._eventListeners=r}};function Wb(e,t,n,l){return T(e).addEventListener(t,n,l),!1}gn.prototype.removeEventListener=function(e,t,n){var l=this._eventListeners;if(l!==null&&(t=ip(l,e,t,n),t!==-1)){var i=l[t];n=i.attachedListener;var r=i.cleanup;i=js(i.optionsOrUseCapture),y(this._fragmentFiber.child,!1,e0,e,n,i),l.splice(t,1),r!==null&&r()}};function e0(e,t,n,l){return T(e).removeEventListener(t,n,l),!1}function js(e){return e!=null&&typeof e!="boolean"&&(e.once===!0||e.signal instanceof AbortSignal)?{capture:e.capture,passive:e.passive}:e}function sp(e){return e==null?"c=0":typeof e=="boolean"?"c="+(e?"1":"0"):"c="+(e.capture?"1":"0")}function ip(e,t,n,l){if(e.length===0)return-1;l=sp(l);for(var i=0;i<e.length;i++){var r=e[i];if(r.type===t&&r.listener===n&&sp(r.optionsOrUseCapture)===l)return i}return-1}gn.prototype.dispatchEvent=function(e){var t=N(this._fragmentFiber);if(t===null)return!0;t=T(t);var n=this._eventListeners;if(n!==null&&0<n.length||!e.bubbles){var l=t.nodeType===9?t.createComment(""):document.createTextNode("");if(n)for(var i=0;i<n.length;i++){var r=n[i];l.addEventListener(r.type,r.attachedListener,js(r.optionsOrUseCapture))}if(t.appendChild(l),e=l.dispatchEvent(e),n)for(i=0;i<n.length;i++)r=n[i],l.removeEventListener(r.type,r.attachedListener,js(r.optionsOrUseCapture));return t.removeChild(l),e}return t.dispatchEvent(e)},gn.prototype.focus=function(e){y(this._fragmentFiber.child,!0,rp,e,void 0,void 0)};function rp(e,t){return e.tag===6?!1:(e=T(e),f0(e,t))}gn.prototype.focusLast=function(e){var t=[];y(this._fragmentFiber.child,!0,od,t,void 0,void 0);for(var n=t.length-1;0<=n&&!rp(t[n],e);n--);};function od(e,t){return t.push(e),!1}gn.prototype.blur=function(){var e=N(this._fragmentFiber);e!==null&&(e=T(e),e=ki(e).activeElement,e!==null&&y(this._fragmentFiber.child,!1,t0,e,void 0,void 0))};function t0(e,t){return e.tag===6?!1:(e=T(e),e===t||e.contains(t)?(t.blur(),!0):!1)}gn.prototype.observeUsing=function(e){this._observers===null&&(this._observers=new Set),this._observers.add(e),y(this._fragmentFiber.child,!1,n0,e,void 0,void 0)};function n0(e,t){return e.tag===6||(e=T(e),t.observe(e)),!1}gn.prototype.unobserveUsing=function(e){var t=this._observers;if(t!==null&&t.has(e)){t.delete(e),y(this._fragmentFiber.child,!1,a0,e,void 0,void 0);for(var n=t=0;n<Gn.length;n++){var l=Gn[n];l.fragmentInstance===this&&l.observer===e?e.unobserve(l.instance):Gn[t++]=l}Gn.length=t}};function a0(e,t){return e.tag===6||(e=T(e),t.unobserve(e)),!1}var Gn=[],cd=!1;function l0(e,t,n){Gn.push({fragmentInstance:e,observer:t,instance:n}),cd||(cd=!0,h0(function(){cd=!1;var l=Gn;Gn=[];for(var i=0;i<l.length;i++){var r=l[i];r.observer.unobserve(r.instance)}}))}gn.prototype.getClientRects=function(){var e=[];return y(this._fragmentFiber.child,!1,s0,e,void 0,void 0),e};function s0(e,t){if(e.tag===6){e=e.stateNode;var n=e.ownerDocument.createRange();n.selectNodeContents(e),t.push.apply(t,n.getClientRects())}else e=T(e),t.push.apply(t,e.getClientRects());return!1}gn.prototype.getRootNode=function(e){var t=N(this._fragmentFiber);return t===null?this:T(t).getRootNode(e)},gn.prototype.compareDocumentPosition=function(e){var t=N(this._fragmentFiber);if(t===null)return Node.DOCUMENT_POSITION_DISCONNECTED;var n=[];y(this._fragmentFiber.child,!1,od,n,void 0,void 0);var l=T(t);if(n.length===0){if(n=l,C(this._fragmentFiber)){e:{for(t=this._fragmentFiber.return;t!==null;){if(t.tag===4){t=t.stateNode.containerInfo;break e}if(t.tag===3||t.tag===5||t.tag===27)break;t=t.return}t=null}t!=null&&(n=t)}t=this._fragmentFiber;var i=l=n.compareDocumentPosition(e);return n===e?i=Node.DOCUMENT_POSITION_CONTAINS:l&Node.DOCUMENT_POSITION_CONTAINED_BY&&(n=B(t)[1],n===null?i=Node.DOCUMENT_POSITION_PRECEDING:(e=T(n).compareDocumentPosition(e),i=e===0||e&Node.DOCUMENT_POSITION_FOLLOWING?Node.DOCUMENT_POSITION_FOLLOWING:Node.DOCUMENT_POSITION_PRECEDING)),i|=Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC}t=T(n[0]),i=T(n[n.length-1]);var r=C(this._fragmentFiber)?t.parentElement:l;if(r==null)return Node.DOCUMENT_POSITION_DISCONNECTED;l=r.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY,r=r.compareDocumentPosition(i)&Node.DOCUMENT_POSITION_CONTAINED_BY;var f=t.compareDocumentPosition(e),v=i.compareDocumentPosition(e),w=f&Node.DOCUMENT_POSITION_CONTAINED_BY||v&Node.DOCUMENT_POSITION_CONTAINED_BY;return v=l&&r&&f&Node.DOCUMENT_POSITION_FOLLOWING&&v&Node.DOCUMENT_POSITION_PRECEDING,t=l&&t===e||r&&i===e||w||v?Node.DOCUMENT_POSITION_CONTAINED_BY:!l&&t===e||!r&&i===e?Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC:f,t&Node.DOCUMENT_POSITION_DISCONNECTED||t&Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC||i0(t,this._fragmentFiber,n[0],n[n.length-1],e)?t:Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC};function i0(e,t,n,l,i){var r=ul(i);if(e&Node.DOCUMENT_POSITION_CONTAINED_BY){if(n=!!r)e:{for(;r!==null;){if(r.tag===7&&(r===t||r.alternate===t)){n=!0;break e}r=r.return}n=!1}return n}if(e&Node.DOCUMENT_POSITION_CONTAINS){if(r===null)return r=i.ownerDocument,i===r||i===r.documentElement||i===r.body;e:{for(r=t,t=N(t);r!==null;){if(!(r.tag!==5&&r.tag!==3&&r.tag!==27||r!==t&&r.alternate!==t)){r=!0;break e}r=r.return}r=!1}return r}return e&Node.DOCUMENT_POSITION_PRECEDING?((t=!!r)&&!(t=r===n)&&(t=ne(n,r,M),t===null?t=!1:(y(t,!0,X,r,n),r=A,A=null,t=r!==null)),t):e&Node.DOCUMENT_POSITION_FOLLOWING?((t=!!r)&&!(t=r===l)&&(t=ne(l,r,M),t===null?t=!1:(y(t,!0,R,r,l),r=A,k=A=null,t=r!==null)),t):!1}function op(e,t){var n=e.ownerDocument.createRange();n.selectNodeContents(e),e=n.getBoundingClientRect(),window.scrollTo(window.scrollX+e.left,t?window.scrollY+e.top:window.scrollY+e.bottom-window.innerHeight)}gn.prototype.scrollIntoView=function(e){if(typeof e=="object")throw Error(u(566));var t=[];y(this._fragmentFiber.child,!1,od,t,void 0,void 0);var n=e!==!1;if(t.length===0){var l=B(this._fragmentFiber);if(l=n?l[1]||l[0]||N(this._fragmentFiber):l[0]||l[1],l===null)return;if(l.tag===6){e=T(l),op(e,n);return}if(l=T(l),l.nodeType!==9){if(l.nodeType===11){n="host"in l?l.host:null,n!==null&&n.scrollIntoView(e);return}l.scrollIntoView(e)}}for(l=n?t.length-1:0;l!==(n?-1:t.length);){var i=t[l];i.tag===6?(i=T(i),op(i,n)):T(i).scrollIntoView(e),l+=n?-1:1}};function r0(e,t){return e=T(e),cp(e,t),!1}function cp(e,t){e.reactFragments==null&&(e.reactFragments=new Set),e.reactFragments.add(t)}function up(e,t){var n=t._eventListeners;if(n!==null)for(var l=0;l<n.length;l++){var i=n[l];e.addEventListener(i.type,i.attachedListener,js(i.optionsOrUseCapture))}e.nodeType!==3&&(n=t._observers,n!==null&&n.forEach(function(r){for(var f=0,v=0;v<Gn.length;v++){var w=Gn[v];(w.fragmentInstance!==t||w.observer!==r||w.instance!==e)&&(Gn[f++]=w)}Gn.length=f,r.observe(e)}),cp(e,t))}function o0(e,t){var n=t._eventListeners;if(n!==null)for(var l=0;l<n.length;l++){var i=n[l];e.removeEventListener(i.type,i.attachedListener,js(i.optionsOrUseCapture))}e.nodeType!==3&&(n=t._observers,n!==null&&n.forEach(function(r){typeof r.rootMargin=="string"?l0(t,r,e):r.unobserve(e)}),e.reactFragments!=null&&e.reactFragments.delete(t))}function ud(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case"HTML":case"HEAD":case"BODY":ud(n),lr(n);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(n.rel.toLowerCase()==="stylesheet")continue}e.removeChild(n)}}function c0(e,t,n,l){for(;e.nodeType===1;){var i=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!l&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(l){if(!e[Ys])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(r=e.getAttribute("rel"),r==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(r!==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(r=e.getAttribute("src"),(r!==(i.src==null?null:i.src)||e.getAttribute("type")!==(i.type==null?null:i.type)||e.getAttribute("crossorigin")!==(i.crossOrigin==null?null:i.crossOrigin))&&r&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var r=i.name==null?null:""+i.name;if(i.type==="hidden"&&e.getAttribute("name")===r)return e}else return e;if(e=zn(e.nextSibling),e===null)break}return null}function u0(e,t,n){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!n||(e=zn(e.nextSibling),e===null))return null;return e}function dp(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=zn(e.nextSibling),e===null))return null;return e}function dd(e){return e.data==="$?"||e.data==="$~"}function fd(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function d0(e,t){var n=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||n.readyState!=="loading")t();else{var l=function(){t(),n.removeEventListener("DOMContentLoaded",l)};n.addEventListener("DOMContentLoaded",l),e._reactRetry=l}}function zn(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 hd=null;function fp(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"||n==="/&"){if(t===0)return zn(e.nextSibling);t--}else n!=="$"&&n!=="$!"&&n!=="$?"&&n!=="$~"&&n!=="&"||t++}e=e.nextSibling}return null}function hp(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"||n==="$~"||n==="&"){if(t===0)return e;t--}else n!=="/$"&&n!=="/&"||t++}e=e.previousSibling}return null}function f0(e,t){function n(){l=!0}if(e.ownerDocument.activeElement===e)return!0;var l=!1;try{e.ownerDocument.addEventListener("focus",n,!0),(e.focus||HTMLElement.prototype.focus).call(e,t)}finally{e.ownerDocument.removeEventListener("focus",n,!0)}return l}function h0(e){Wx(function(){Wx(function(t){return e(t)})})}function mp(e,t,n){switch(t=ki(n),e){case"html":if(e=t.documentElement,!e)throw Error(u(452));return e;case"head":if(e=t.head,!e)throw Error(u(453));return e;case"body":if(e=t.body,!e)throw Error(u(454));return e;default:throw Error(u(451))}}function xp(e,t,n){for(var l in n){var i=n[l];n.hasOwnProperty(l)&&i!=null&&Pe(e,t,l,null,Gb,i)}n.dangerouslySetInnerHTML!=null&&(e.textContent=""),e.onclick===Kn&&(e.onclick=null),lr(e)}function md(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);lr(e)}var Rn=new Map,pp=new Set;function Ti(e){if(typeof e.getRootNode=="function"){var t=e.getRootNode();if(t.nodeType===9||t.nodeType===11)return t}return e.nodeType===9?e:e.ownerDocument}var Sa=ye.d;ye.d={f:m0,r:x0,D:p0,C:g0,L:y0,m:v0,X:j0,S:b0,M:N0};function m0(){var e=Sa.f(),t=ro();return e||t}function x0(e){var t=ql(e);t!==null&&t.tag===5&&t.type==="form"?ym(t):Sa.r(e)}var Ns=typeof document>"u"?null:document;function gp(e,t,n){var l=Ns;if(l&&typeof t=="string"&&t){var i=Nn(t);i='link[rel="'+e+'"][href="'+i+'"]',typeof n=="string"&&(i+='[crossorigin="'+n+'"]'),pp.has(i)||(pp.add(i),e={rel:e,crossOrigin:n,href:t},l.querySelector(i)===null&&(t=l.createElement("link"),Mt(t,"link",e),St(t),l.head.appendChild(t)))}}function p0(e){Sa.D(e),gp("dns-prefetch",e,null)}function g0(e,t){Sa.C(e,t),gp("preconnect",e,t)}function y0(e,t,n){Sa.L(e,t,n);var l=Ns;if(l&&e&&t){var i='link[rel="preload"][as="'+Nn(t)+'"]';t==="image"&&n&&n.imageSrcSet?(i+='[imagesrcset="'+Nn(n.imageSrcSet)+'"]',typeof n.imageSizes=="string"&&(i+='[imagesizes="'+Nn(n.imageSizes)+'"]')):i+='[href="'+Nn(e)+'"]';var r=i;switch(t){case"style":r=ws(e);break;case"script":r=Ss(e)}if(!(Rn.has(r)||(e=L({rel:"preload",href:t==="image"&&n&&n.imageSrcSet?void 0:e,as:t},n),Rn.set(r,e),l.querySelector(i)!==null||t==="style"&&l.querySelector(Ci(r))||t==="script"&&l.querySelector(Ei(r))))){var f=l.createElement("link");Mt(f,"link",e),t==="style"&&(f[ar]=!0,f.onload=f.onerror=function(){Rf(f)}),St(f),l.head.appendChild(f)}}}function v0(e,t){Sa.m(e,t);var n=Ns;if(n&&e){var l=t&&typeof t.as=="string"?t.as:"script",i='link[rel="modulepreload"][as="'+Nn(l)+'"][href="'+Nn(e)+'"]',r=i;switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":r=Ss(e)}if(!Rn.has(r)&&(e=L({rel:"modulepreload",href:e},t),Rn.set(r,e),n.querySelector(i)===null)){switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(Ei(r)))return}l=n.createElement("link"),Mt(l,"link",e),St(l),n.head.appendChild(l)}}}function b0(e,t,n){Sa.S(e,t,n);var l=Ns;if(l&&e){var i=$l(l).hoistableStyles,r=ws(e);t=t||"default";var f=i.get(r);if(!f){var v={loading:0,preload:null};if(f=l.querySelector(Ci(r)))v.loading=5;else{e=L({rel:"stylesheet",href:e,"data-precedence":t},n),(n=Rn.get(r))&&xd(e,n);var w=f=l.createElement("link");St(w),Mt(w,"link",e),w._p=new Promise(function(H,G){w.onload=H,w.onerror=G}),w.addEventListener("load",function(){v.loading|=1}),w.addEventListener("error",function(){v.loading|=2}),v.loading|=4,xo(f,t,l)}f={type:"stylesheet",instance:f,count:1,state:v},i.set(r,f)}}}function j0(e,t){Sa.X(e,t);var n=Ns;if(n&&e){var l=$l(n).hoistableScripts,i=Ss(e),r=l.get(i);r||(r=n.querySelector(Ei(i)),r||(e=L({src:e,async:!0},t),(t=Rn.get(i))&&pd(e,t),r=n.createElement("script"),St(r),Mt(r,"link",e),n.head.appendChild(r)),r={type:"script",instance:r,count:1,state:null},l.set(i,r))}}function N0(e,t){Sa.M(e,t);var n=Ns;if(n&&e){var l=$l(n).hoistableScripts,i=Ss(e),r=l.get(i);r||(r=n.querySelector(Ei(i)),r||(e=L({src:e,async:!0,type:"module"},t),(t=Rn.get(i))&&pd(e,t),r=n.createElement("script"),St(r),Mt(r,"link",e),n.head.appendChild(r)),r={type:"script",instance:r,count:1,state:null},l.set(i,r))}}function yp(e,t,n,l){var i=(i=Kt.current)?Ti(i):null;if(!i)throw Error(u(446));switch(e){case"meta":case"title":return null;case"style":return typeof n.precedence=="string"&&typeof n.href=="string"?(n=ws(n.href),t=$l(i).hoistableStyles,l=t.get(n),l||(l={type:"style",instance:null,count:0,state:null},t.set(n,l)),l):{type:"void",instance:null,count:0,state:null};case"link":if(n.rel==="stylesheet"&&typeof n.href=="string"&&typeof n.precedence=="string"){e=ws(n.href);var r=$l(i).hoistableStyles,f=r.get(e);if(f||(i=i.ownerDocument||i,f={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},r.set(e,f),(r=i.querySelector(Ci(e)))?r._p||(f.instance=r,f.state.loading=5):(r=Rn.get(e),r||(r={rel:"preload",as:"style",href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},Rn.set(e,r)),w0(i,e,r,f.state))),t&&l===null)throw Error(u(528,""));return f}if(t&&l!==null)throw Error(u(529,""));return null;case"script":return t=n.async,n=n.src,typeof n=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(n=Ss(n),t=$l(i).hoistableScripts,l=t.get(n),l||(l={type:"script",instance:null,count:0,state:null},t.set(n,l)),l):{type:"void",instance:null,count:0,state:null};default:throw Error(u(444,e))}}function ws(e){return'href="'+Nn(e)+'"'}function Ci(e){return'link[rel="stylesheet"]['+e+"]"}function vp(e){return L({},e,{"data-precedence":e.precedence,precedence:null})}function w0(e,t,n,l){if(t=e.querySelector('link[rel="preload"][as="style"]['+t+"]")){if(t[ar]!==!0){l.loading=1;return}}else t=e.createElement("link"),t[ar]=!0,t.onload=t.onerror=Rf.bind(null,t),Mt(t,"link",n),St(t),e.head.appendChild(t);l.preload=t,t.addEventListener("load",function(){return l.loading|=1}),t.addEventListener("error",function(){return l.loading|=2})}function Ss(e){return'[src="'+Nn(e)+'"]'}function Ei(e){return"script[async]"+e}function bp(e,t,n){if(t.count++,t.instance===null)switch(t.type){case"style":var l=e.querySelector('style[data-href~="'+Nn(n.href)+'"]');if(l)return t.instance=l,St(l),l;var i=L({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return l=(e.ownerDocument||e).createElement("style"),St(l),Mt(l,"style",i),xo(l,n.precedence,e),t.instance=l;case"stylesheet":i=ws(n.href);var r=e.querySelector(Ci(i));if(r)return t.state.loading|=4,t.instance=r,St(r),r;l=vp(n),(i=Rn.get(i))&&xd(l,i),r=(e.ownerDocument||e).createElement("link"),St(r);var f=r;return f._p=new Promise(function(v,w){f.onload=v,f.onerror=w}),Mt(r,"link",l),t.state.loading|=4,xo(r,n.precedence,e),t.instance=r;case"script":return r=Ss(n.src),(i=e.querySelector(Ei(r)))?(t.instance=i,St(i),i):(l=n,(i=Rn.get(r))&&(l=L({},n),pd(l,i)),e=e.ownerDocument||e,i=e.createElement("script"),St(i),Mt(i,"link",l),e.head.appendChild(i),t.instance=i);case"void":return null;default:throw Error(u(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(l=t.instance,t.state.loading|=4,xo(l,n.precedence,e));return t.instance}function xo(e,t,n){for(var l=n.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),i=l.length?l[l.length-1]:null,r=i,f=0;f<l.length;f++){var v=l[f];if(v.dataset.precedence===t)r=v;else if(r!==i)break}r?r.parentNode.insertBefore(e,r.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function xd(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function pd(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var po=null;function jp(e,t,n){if(po===null){var l=new Map,i=po=new Map;i.set(n,l)}else i=po,l=i.get(n),l||(l=new Map,i.set(n,l));if(l.has(e))return l;for(l.set(e,null),n=n.getElementsByTagName(e),i=0;i<n.length;i++){var r=n[i];if(!(r[Ys]||r[zt]||e==="link"&&r.getAttribute("rel")==="stylesheet")&&r.namespaceURI!=="http://www.w3.org/2000/svg"){var f=r.getAttribute(t)||"";f=e+f;var v=l.get(f);v?v.push(r):l.set(f,[r])}}return l}function gd(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t==="title"?e.querySelector("head > title"):null)}function S0(e,t,n){if(n===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 Np(e,t){return e==="img"&&t.src!=null&&t.src!==""&&t.onLoad==null&&t.loading!=="lazy"}function wp(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function Sp(e){return(e.width||100)*(e.height||100)*(typeof devicePixelRatio=="number"?devicePixelRatio:1)*.25}function kp(e,t){typeof t.decode=="function"&&(e.imgCount++,t.complete||(e.imgBytes+=Sp(t),e.suspenseyImages.push(t)),e=C0.bind(e),t.decode().then(e,e))}function k0(e,t,n,l){if(n.type==="stylesheet"&&(typeof l.media!="string"||matchMedia(l.media).matches!==!1)&&(n.state.loading&4)===0){if(n.instance===null){var i=ws(l.href),r=t.querySelector(Ci(i));if(r){t=r._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=zi.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=r,St(r);return}r=t.ownerDocument||t,l=vp(l),(i=Rn.get(i))&&xd(l,i),r=r.createElement("link"),St(r);var f=r;f._p=new Promise(function(v,w){f.onload=v,f.onerror=w}),Mt(r,"link",l),n.instance=r}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&(n.state.loading&3)===0&&(e.count++,n=zi.bind(e),t.addEventListener("load",n),t.addEventListener("error",n))}}var go=0;function T0(e,t){return e.stylesheets&&e.count===0&&vo(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var l=setTimeout(function(){if(e.stylesheets&&vo(e,e.stylesheets),e.unsuspend){var r=e.unsuspend;e.unsuspend=null,r()}},6e4+t);0<e.imgBytes&&go===0&&(go=62500*Vb());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&vo(e,e.stylesheets),e.unsuspend)){var r=e.unsuspend;e.unsuspend=null,r()}},(e.imgBytes>go?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(l),clearTimeout(i)}}:null}function Tp(e){if(e.count===0&&(e.imgCount===0||!e.waitingForImages)){if(e.stylesheets)vo(e,e.stylesheets);else if(e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}}}function zi(){this.count--,Tp(this)}function C0(){this.imgCount--,Tp(this)}var yo=null;function vo(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,yo=new Map,t.forEach(E0,e),yo=null,zi.call(e))}function E0(e,t){if(!(t.state.loading&4)){var n=yo.get(e);if(n)var l=n.get(null);else{n=new Map,yo.set(e,n);for(var i=e.querySelectorAll("link[data-precedence],style[data-precedence]"),r=0;r<i.length;r++){var f=i[r];(f.nodeName==="LINK"||f.getAttribute("media")!=="not all")&&(n.set(f.dataset.precedence,f),l=f)}l&&n.set(null,l)}i=t.instance,f=i.getAttribute("data-precedence"),r=n.get(f)||l,r===l&&n.set(null,i),n.set(f,i),this.count++,l=zi.bind(this),i.addEventListener("load",l),i.addEventListener("error",l),r?r.parentNode.insertBefore(i,r.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(i,e.firstChild)),t.state.loading|=4}}var ks={$$typeof:F,Provider:null,Consumer:null,_currentValue:$t,_currentValue2:$t,_threadCount:0};function z0(e,t,n,l,i,r,f,v,w){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=Fo(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Fo(0),this.hiddenUpdates=Fo(null),this.identifierPrefix=l,this.onUncaughtError=i,this.onCaughtError=r,this.onRecoverableError=f,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=w,this.transitionTypes=null,this.incompleteTransitions=new Map}function Cp(e,t,n,l,i,r,f,v,w,H,G,J){return e=new z0(e,t,n,f,w,H,G,J,v),t=1,r===!0&&(t|=24),r=Ft(3,null,null,t),e.current=r,r.stateNode=e,t=Dc(),t.refCount++,e.pooledCache=t,t.refCount++,r.memoizedState={element:l,isDehydrated:n,cache:t},Lc(r),e}function Ep(e){return e?(e=Fl,e):Fl}function zp(e,t,n,l,i,r){i=Ep(i),l.context===null?l.context=i:l.pendingContext=i,l=qa(t),l.payload={element:n},r=r===void 0?null:r,r!==null&&(l.callback=r),n=$a(e,l,t),n!==null&&(tn(n,e,t),ii(n,e,t))}function Rp(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function yd(e,t){Rp(e,t),(e=e.alternate)&&Rp(e,t)}function Ap(e){if(e.tag===13||e.tag===31){var t=ml(e,67108864);t!==null&&tn(t,e,67108864),yd(e,67108864)}}function Dp(e){if(e.tag===13||e.tag===31){var t=pn();t=Io(t);var n=ml(e,t);n!==null&&tn(n,e,t),yd(e,t)}}var Ts=!0;function R0(e,t,n,l){var i=fe.T;fe.T=null;var r=ye.p;try{ye.p=2,vd(e,t,n,l)}finally{ye.p=r,fe.T=i}}function A0(e,t,n,l){var i=fe.T;fe.T=null;var r=ye.p;try{ye.p=8,vd(e,t,n,l)}finally{ye.p=r,fe.T=i}}function vd(e,t,n,l){if(Ts){var i=bd(l);if(i===null)ed(e,t,l,bo,n),Mp(e,l);else if(_0(i,e,t,n,l))l.stopPropagation();else if(Mp(e,l),t&4&&-1<D0.indexOf(e)){for(;i!==null;){var r=ql(i);if(r!==null)switch(r.tag){case 3:if(r=r.stateNode,r.current.memoizedState.isDehydrated){var f=cl(r.pendingLanes);if(f!==0){var v=r;for(v.pendingLanes|=2,v.entangledLanes|=2;f;){var w=1<<31-cn(f);v.entanglements[1]|=w,f&=~w}la(r),(Xe&6)===0&&(lo=rn()+500,Ni(0))}}break;case 31:case 13:v=ml(r,2),v!==null&&tn(v,r,2),ro(),yd(r,2)}if(r=bd(l),r===null&&ed(e,t,l,bo,n),r===i)break;i=r}i!==null&&l.stopPropagation()}else ed(e,t,l,null,n)}}function bd(e){return e=sc(e),jd(e)}var bo=null;function jd(e){if(bo=null,e=ul(e),e!==null){var t=h(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=x(t),e!==null)return e;e=null}else if(n===31){if(e=m(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return bo=e,null}function _p(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"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"fullscreenerror":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"resize":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(Vy()){case yf:return 2;case vf:return 8;case Ii:case Xy:return 32;case bf:return 268435456;default:return 32}default:return 32}}var Nd=!1,Wa=null,el=null,tl=null,Ri=new Map,Ai=new Map,nl=[],D0="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 Mp(e,t){switch(e){case"focusin":case"focusout":Wa=null;break;case"dragenter":case"dragleave":el=null;break;case"mouseover":case"mouseout":tl=null;break;case"pointerover":case"pointerout":Ri.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ai.delete(t.pointerId)}}function Di(e,t,n,l,i,r){return e===null||e.nativeEvent!==r?(e={blockedOn:t,domEventName:n,eventSystemFlags:l,nativeEvent:r,targetContainers:[i]},t!==null&&(t=ql(t),t!==null&&Ap(t)),e):(e.eventSystemFlags|=l,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function _0(e,t,n,l,i){switch(t){case"focusin":return Wa=Di(Wa,e,t,n,l,i),!0;case"dragenter":return el=Di(el,e,t,n,l,i),!0;case"mouseover":return tl=Di(tl,e,t,n,l,i),!0;case"pointerover":var r=i.pointerId;return Ri.set(r,Di(Ri.get(r)||null,e,t,n,l,i)),!0;case"gotpointercapture":return r=i.pointerId,Ai.set(r,Di(Ai.get(r)||null,e,t,n,l,i)),!0}return!1}function Op(e){var t=ul(e.target);if(t!==null){var n=h(t);if(n!==null){if(t=n.tag,t===13){if(t=x(n),t!==null){e.blockedOn=t,Cf(e.priority,function(){Dp(n)});return}}else if(t===31){if(t=m(n),t!==null){e.blockedOn=t,Cf(e.priority,function(){Dp(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function jo(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=bd(e.nativeEvent);if(n===null){n=e.nativeEvent;var l=new n.constructor(n.type,n);lc=l,n.target.dispatchEvent(l),lc=null}else return t=ql(n),t!==null&&Ap(t),e.blockedOn=n,!1;t.shift()}return!0}function Lp(e,t,n){jo(e)&&n.delete(t)}function M0(){Nd=!1,Wa!==null&&jo(Wa)&&(Wa=null),el!==null&&jo(el)&&(el=null),tl!==null&&jo(tl)&&(tl=null),Ri.forEach(Lp),Ai.forEach(Lp)}function No(e,t){e.blockedOn===t&&(e.blockedOn=null,Nd||(Nd=!0,s.unstable_scheduleCallback(s.unstable_NormalPriority,M0)))}var wo=null;function Up(e){wo!==e&&(wo=e,s.unstable_scheduleCallback(s.unstable_NormalPriority,function(){wo===e&&(wo=null);for(var t=0;t<e.length;t+=3){var n=e[t],l=e[t+1],i=e[t+2];if(typeof l!="function"){if(jd(l||n)===null)continue;break}var r=ql(n);r!==null&&(e.splice(t,3),t-=3,au(r,{pending:!0,data:i,method:n.method,action:l},l,i))}}))}function Cs(e){function t(w){return No(w,e)}Wa!==null&&No(Wa,e),el!==null&&No(el,e),tl!==null&&No(tl,e),Ri.forEach(t),Ai.forEach(t);for(var n=0;n<nl.length;n++){var l=nl[n];l.blockedOn===e&&(l.blockedOn=null)}for(;0<nl.length&&(n=nl[0],n.blockedOn===null);)Op(n),n.blockedOn===null&&nl.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(l=0;l<n.length;l+=3){var i=n[l],r=n[l+1],f=i[Pt]||null;if(typeof r=="function")f||Up(n);else if(f){var v=null;if(r&&r.hasAttribute("formAction")){if(i=r,f=r[Pt]||null)v=f.formAction;else if(jd(i)!==null)continue}else v=f.action;typeof v=="function"?n[l+1]=v:(n.splice(l,3),l-=3),Up(n)}}}function Hp(){function e(r){r.canIntercept&&r.info==="react-transition"&&r.intercept({handler:function(){return new Promise(function(f){return i=f})},focusReset:"manual",scroll:"manual"})}function t(){i!==null&&(i(),i=null),l||setTimeout(n,20)}function n(){if(!l&&!navigation.transition){var r=navigation.currentEntry;r&&r.url!=null&&navigation.navigate(r.url,{state:r.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var l=!1,i=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(n,100),function(){l=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),i!==null&&(i(),i=null)}}}function wd(e){this._internalRoot=e}So.prototype.render=wd.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(u(409));var n=t.current,l=pn();zp(n,l,e,t,null,null)},So.prototype.unmount=wd.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;zp(e.current,2,null,e,null,null),ro(),t[Bl]=null}};function So(e){this._internalRoot=e}So.prototype.unstable_scheduleHydration=function(e){if(e){var t=Tf();e={blockedOn:null,target:e,priority:t};for(var n=0;n<nl.length&&t!==0&&t<nl[n].priority;n++);nl.splice(n,0,e),n===0&&Op(e)}};var Bp=o.version;if(Bp!=="19.3.1")throw Error(u(527,Bp,"19.3.1"));ye.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(u(188)):(e=Object.keys(e).join(","),Error(u(268,e)));return e=b(t),e=e!==null?j(e):null,e=e===null?null:e.stateNode,e};var O0={bundleType:0,version:"19.3.1",rendererPackageName:"react-dom",currentDispatcherRef:fe,reconcilerVersion:"19.3.1"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var ko=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!ko.isDisabled&&ko.supportsFiber)try{qs=ko.inject(O0),on=ko}catch{}}return Mi.createRoot=function(e,t){if(!d(e))throw Error(u(299));var n=!1,l="",i=Em,r=zm,f=Rm;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(l=t.identifierPrefix),t.onUncaughtError!==void 0&&(i=t.onUncaughtError),t.onCaughtError!==void 0&&(r=t.onCaughtError),t.onRecoverableError!==void 0&&(f=t.onRecoverableError)),t=Cp(e,1,!1,null,null,n,l,null,i,r,f,Hp),e[Bl]=t.current,Wu(e),new wd(t)},Mi.hydrateRoot=function(e,t,n){if(!d(e))throw Error(u(299));var l=!1,i="",r=Em,f=zm,v=Rm,w=null;return n!=null&&(n.unstable_strictMode===!0&&(l=!0),n.identifierPrefix!==void 0&&(i=n.identifierPrefix),n.onUncaughtError!==void 0&&(r=n.onUncaughtError),n.onCaughtError!==void 0&&(f=n.onCaughtError),n.onRecoverableError!==void 0&&(v=n.onRecoverableError),n.formState!==void 0&&(w=n.formState)),t=Cp(e,1,!0,t,n??null,l,i,w,r,f,v,Hp),t.context=Ep(null),n=t.current,l=pn(),l=Io(l),i=qa(l),i.callback=null,$a(n,i,l),n=l,t.current.lanes=n,Gs(t,n),la(t),e[Bl]=t.current,Wu(e),new So(t)},Mi.version="19.3.1",Mi}var Jp;function V0(){if(Jp)return Td.exports;Jp=1;function s(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(s)}catch(o){console.error(o)}}return s(),Td.exports=Y0(),Td.exports}var X0=V0();/**
|
|
50
|
+
* react-router v7.18.5
|
|
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 Wd=/^(?:[a-z][a-z0-9+.-]*:|[\\/]{2})/i,Hg=/^[\\/]{2}/;function Q0(s,o){return o+s.replace(/\\/g,"/")}var Pp="popstate";function Fp(s){return typeof s=="object"&&s!=null&&"pathname"in s&&"search"in s&&"hash"in s&&"state"in s&&"key"in s}function Z0(s={}){function o(d,h){let{pathname:x="/",search:m="",hash:p=""}=Ll(d.location.hash.substring(1));return!x.startsWith("/")&&!x.startsWith(".")&&(x="/"+x),qd("",{pathname:x,search:m,hash:p},h.state&&h.state.usr||null,h.state&&h.state.key||"default")}function c(d,h){let x=d.document.querySelector("base"),m="";if(x&&x.getAttribute("href")){let p=d.location.href,b=p.indexOf("#");m=b===-1?p:p.slice(0,b)}return m+"#"+(typeof h=="string"?h:Rs(h))}function u(d,h){Mn(d.pathname.charAt(0)==="/",`relative pathnames are not supported in hash history.push(${JSON.stringify(h)})`)}return J0(o,c,u,s)}function it(s,o){if(s===!1||s===null||typeof s>"u")throw new Error(o)}function Mn(s,o){if(!s){typeof console<"u"&&console.warn(o);try{throw new Error(o)}catch{}}}function K0(){return Math.random().toString(36).substring(2,10)}function Ip(s,o){return{usr:s.state,key:s.key,idx:o,masked:s.mask?{pathname:s.pathname,search:s.search,hash:s.hash}:void 0}}function qd(s,o,c=null,u,d){return{pathname:typeof s=="string"?s:s.pathname,search:"",hash:"",...typeof o=="string"?Ll(o):o,state:c,key:o&&o.key||u||K0(),mask:d}}function Rs({pathname:s="/",search:o="",hash:c=""}){return o&&o!=="?"&&(s+=o.charAt(0)==="?"?o:"?"+o),c&&c!=="#"&&(s+=c.charAt(0)==="#"?c:"#"+c),s}function Ll(s){let o={};if(s){let c=s.indexOf("#");c>=0&&(o.hash=s.substring(c),s=s.substring(0,c));let u=s.indexOf("?");u>=0&&(o.search=s.substring(u),s=s.substring(0,u)),s&&(o.pathname=s)}return o}function J0(s,o,c,u={}){let{window:d=document.defaultView,v5Compat:h=!1}=u,x=d.history,m="POP",p=null,b=j();b==null&&(b=0,x.replaceState({...x.state,idx:b},""));function j(){return(x.state||{idx:null}).idx}function y(){m="POP";let T=j(),A=T==null?null:T-b;b=T,p&&p({action:m,location:S.location,delta:A})}function N(T,A){m="PUSH";let k=Fp(T)?T:qd(S.location,T,A);c&&c(k,T),b=j()+1;let X=Ip(k,b),R=S.createHref(k.mask||k);try{x.pushState(X,"",R)}catch(M){if(M instanceof DOMException&&M.name==="DataCloneError")throw M;d.location.assign(R)}h&&p&&p({action:m,location:S.location,delta:1})}function C(T,A){m="REPLACE";let k=Fp(T)?T:qd(S.location,T,A);c&&c(k,T),b=j();let X=Ip(k,b),R=S.createHref(k.mask||k);x.replaceState(X,"",R),h&&p&&p({action:m,location:S.location,delta:0})}function B(T){return P0(d,T)}let S={get action(){return m},get location(){return s(d,x)},listen(T){if(p)throw new Error("A history only accepts one active listener");return d.addEventListener(Pp,y),p=T,()=>{d.removeEventListener(Pp,y),p=null}},createHref(T){return o(d,T)},createURL:B,encodeLocation(T){let A=B(T);return{pathname:A.pathname,search:A.search,hash:A.hash}},push:N,replace:C,go(T){return x.go(T)}};return S}function P0(s,o,c=!1){let u="http://localhost";s&&(u=s.location.origin!=="null"?s.location.origin:s.location.href),it(u,"No window.location.(origin|href) available to create URL");let d=typeof o=="string"?o:Rs(o);return d=d.replace(/ $/,"%20"),!c&&Hg.test(d)&&(d=u+d),new URL(d,u)}function Bg(s,o,c="/"){return F0(s,o,c,!1)}function F0(s,o,c,u,d){let h=typeof o=="string"?Ll(o):o,x=Ca(h.pathname||"/",c);if(x==null)return null;let m=I0(s),p=null,b=c1(x);for(let j=0;p==null&&j<m.length;++j)p=o1(m[j],b,u);return p}function I0(s){let o=qg(s);return W0(o),o}function qg(s,o=[],c=[],u="",d=!1){let h=(x,m,p=d,b)=>{let j={relativePath:b===void 0?x.path||"":b,caseSensitive:x.caseSensitive===!0,childrenIndex:m,route:x};if(j.relativePath.startsWith("/")){if(!j.relativePath.startsWith(u)&&p)return;it(j.relativePath.startsWith(u),`Absolute route path "${j.relativePath}" nested under path "${u}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),j.relativePath=j.relativePath.slice(u.length)}let y=Yn([u,j.relativePath]),N=c.concat(j);x.children&&x.children.length>0&&(it(x.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${y}".`),qg(x.children,o,N,y,p)),!(x.path==null&&!x.index)&&o.push({path:y,score:i1(y,x.index),routesMeta:N.map((C,B)=>{let[S,T]=Yg(C.relativePath,C.caseSensitive,B===N.length-1);return{...C,matcher:S,compiledParams:T}})})};return s.forEach((x,m)=>{if(x.path===""||!x.path?.includes("?"))h(x,m);else for(let p of $g(x.path))h(x,m,!0,p)}),o}function $g(s){let o=s.split("/");if(o.length===0)return[];let[c,...u]=o,d=c.endsWith("?"),h=c.replace(/\?$/,"");if(u.length===0)return d?[h,""]:[h];let x=$g(u.join("/")),m=[];return m.push(...x.map(p=>p===""?h:[h,p].join("/"))),d&&m.push(...x),m.map(p=>s.startsWith("/")&&p===""?"/":p)}function W0(s){s.sort((o,c)=>o.score!==c.score?c.score-o.score:r1(o.routesMeta.map(u=>u.childrenIndex),c.routesMeta.map(u=>u.childrenIndex)))}var e1=/^:[\w-]+$/,t1=3,n1=2,a1=1,l1=10,s1=-2,Wp=s=>s==="*";function i1(s,o){let c=s.split("/"),u=c.length;return c.some(Wp)&&(u+=s1),o&&(u+=n1),c.filter(d=>!Wp(d)).reduce((d,h)=>d+(e1.test(h)?t1:h===""?a1:l1),u)}function r1(s,o){return s.length===o.length&&s.slice(0,-1).every((u,d)=>u===o[d])?s[s.length-1]-o[o.length-1]:0}function o1(s,o,c=!1){let{routesMeta:u}=s,d={},h="/",x=[];for(let m=0;m<u.length;++m){let p=u[m],b=m===u.length-1,j=h==="/"?o:o.slice(h.length)||"/",y={path:p.relativePath,caseSensitive:p.caseSensitive,end:b},N=p.matcher&&p.compiledParams?Gg(y,j,p.matcher,p.compiledParams):Mo(y,j),C=p.route;if(!N&&b&&c&&!u[u.length-1].route.index&&(N=Mo({path:p.relativePath,caseSensitive:p.caseSensitive,end:!1},j)),!N)return null;Object.assign(d,N.params),x.push({params:d,pathname:Yn([h,N.pathname]),pathnameBase:f1(Yn([h,N.pathnameBase])),route:C}),N.pathnameBase!=="/"&&(h=Yn([h,N.pathnameBase]))}return x}function Mo(s,o){typeof s=="string"&&(s={path:s,caseSensitive:!1,end:!0});let[c,u]=Yg(s.path,s.caseSensitive,s.end);return Gg(s,o,c,u)}function Gg(s,o,c,u){let d=o.match(c);if(!d)return null;let h=d[0],x=As(h,1),m=d.slice(1);return{params:u.reduce((b,{paramName:j,isOptional:y},N)=>{if(j==="*"){let B=m[N]||"";x=As(h.slice(0,h.length-B.length),1)}const C=m[N];return y&&!C?b[j]=void 0:b[j]=(C||"").replace(/%2F/g,"/"),b},{}),pathname:h,pathnameBase:x,pattern:s}}function Yg(s,o=!1,c=!0){Mn(s==="*"||!s.endsWith("*")||s.endsWith("/*"),`Route path "${s}" will be treated as if it were "${s.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${s.replace(/\*$/,"/*")}".`);let u=[],d="^"+s.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(x,m,p,b,j)=>{if(u.push({paramName:m,isOptional:p!=null}),p){let y=j.charAt(b+x.length);return y&&y!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return s.endsWith("*")?(u.push({paramName:"*"}),d+=s==="*"||s==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):c?d+="\\/*$":s!==""&&s!=="/"&&(d+="(?:(?=\\/|$))"),[new RegExp(d,o?void 0:"i"),u]}function c1(s){try{return s.split("/").map(o=>decodeURIComponent(o).replace(/\//g,"%2F")).join("/")}catch(o){return Mn(!1,`The URL path "${s}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${o}).`),s}}function Ca(s,o){if(o==="/")return s;if(!s.toLowerCase().startsWith(o.toLowerCase()))return null;let c=o.endsWith("/")?o.length-1:o.length,u=s.charAt(c);return u&&u!=="/"?null:s.slice(c)||"/"}function u1(s,o="/"){let{pathname:c,search:u="",hash:d=""}=typeof s=="string"?Ll(s):s,h;return c?(c=Xg(c),c.startsWith("/")||c.startsWith("\\")?h=eg(c.substring(1),"/"):h=eg(c,o)):h=o,{pathname:h,search:h1(u),hash:m1(d)}}function eg(s,o){let c=As(o).split("/");return s.split("/").forEach(d=>{d===".."?c.length>1&&c.pop():d!=="."&&c.push(d)}),c.length>1?c.join("/"):"/"}function Rd(s,o,c,u){return`Cannot include a '${s}' character in a manually specified \`to.${o}\` field [${JSON.stringify(u)}]. Please separate it out to the \`to.${c}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function d1(s){return s.filter((o,c)=>c===0||o.route.path&&o.route.path.length>0)}function Vg(s){let o=d1(s);return o.map((c,u)=>u===o.length-1?c.pathname:c.pathnameBase)}function ef(s,o,c,u=!1){let d;typeof s=="string"?d=Ll(s):(d={...s},it(!d.pathname||!d.pathname.includes("?"),Rd("?","pathname","search",d)),it(!d.pathname||!d.pathname.includes("#"),Rd("#","pathname","hash",d)),it(!d.search||!d.search.includes("#"),Rd("#","search","hash",d)));let h=s===""||d.pathname==="",x=h?"/":d.pathname,m;if(x==null)m=c;else{let y=o.length-1;if(!u&&x.startsWith("..")){let N=x.split("/");for(;N[0]==="..";)N.shift(),y-=1;d.pathname=N.join("/")}m=y>=0?o[y]:"/"}let p=u1(d,m),b=x&&x!=="/"&&x.endsWith("/"),j=(h||x===".")&&c.endsWith("/");return!p.pathname.endsWith("/")&&(b||j)&&(p.pathname+="/"),p}var Xg=s=>s.replace(/[\\/]{2,}/g,"/"),Yn=s=>Xg(s.join("/"));function As(s,o=0){let c=s.length;for(;c>o&&s.charCodeAt(c-1)===47;)c--;return c===s.length?s:s.slice(0,c)}var f1=s=>As(s).replace(/^\/*/,"/"),h1=s=>!s||s==="?"?"":s.startsWith("?")?s:"?"+s,m1=s=>!s||s==="#"?"":s.startsWith("#")?s:"#"+s,x1=class{constructor(s,o,c,u=!1){this.status=s,this.statusText=o||"",this.internal=u,c instanceof Error?(this.data=c.toString(),this.error=c):this.data=c}};function p1(s){return s!=null&&typeof s.status=="number"&&typeof s.statusText=="string"&&typeof s.internal=="boolean"&&"data"in s}function g1(s){let o=s.map(c=>c.route.path).filter(Boolean);return Yn(o)||"/"}var Qg=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Zg(s,o){let c=s;if(typeof c!="string"||!Wd.test(c))return{absoluteURL:void 0,isExternal:!1,to:c};let u=c,d=!1;if(Qg)try{let h=new URL(window.location.href),x=Hg.test(c)?new URL(Q0(c,h.protocol)):new URL(c),m=Ca(x.pathname,o);x.origin===h.origin&&m!=null?c=m+x.search+x.hash:d=!0}catch{Mn(!1,`<Link to="${c}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:u,isExternal:d,to:c}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var tg=new URL("http://localhost");function Kg(s){if(s.createURL)return s.createURL("/");try{return new URL(s.createHref("/"),tg)}catch{return tg}}function Ad(s,o){return s.origin===o.origin&&(s.origin!=="null"||s.protocol===o.protocol&&s.host===o.host)}function y1(s,o){if(s.startsWith("//"))return!0;let c=o.protocol.toLowerCase();return s.toLowerCase().startsWith(c)?o.host===""||s.slice(c.length).startsWith("//"):!1}function Jg(s,o,c,u){let d=null;try{d=s==null?null:new URL(s,c)}catch{}let h=new URL(o,c),x=d!=null&&!Ad(d,c),m=!Ad(h,c);if(u==="reject"){if(x||m)throw new Error("External navigation is not allowed")}else if(m&&(d==null||!y1(s,d)||!Ad(d,h)))throw new Error("External navigation is not allowed")}var Pg=["POST","PUT","PATCH","DELETE"];new Set(Pg);var v1=["GET",...Pg];new Set(v1);var b1=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];function j1(s){try{return b1.includes(new URL(s).protocol)}catch{return!1}}var Os=g.createContext(null);Os.displayName="DataRouter";var $o=g.createContext(null);$o.displayName="DataRouterState";var Fg=g.createContext(!1);function N1(){return g.useContext(Fg)}var Ig=g.createContext({isTransitioning:!1});Ig.displayName="ViewTransition";var w1=g.createContext(new Map);w1.displayName="Fetchers";var S1=g.createContext(null);S1.displayName="Await";var Ln=g.createContext(null);Ln.displayName="Navigation";var Yi=g.createContext(null);Yi.displayName="Location";var ia=g.createContext({outlet:null,matches:[],isDataRoute:!1});ia.displayName="Route";var tf=g.createContext(null);tf.displayName="RouteError";var Wg="REACT_ROUTER_ERROR",k1="REDIRECT",T1="ROUTE_ERROR_RESPONSE";function C1(s){if(s.startsWith(`${Wg}:${k1}:{`))try{let o=JSON.parse(s.slice(28));if(typeof o=="object"&&o&&typeof o.status=="number"&&typeof o.statusText=="string"&&typeof o.location=="string"&&typeof o.reloadDocument=="boolean"&&typeof o.replace=="boolean")return o}catch{}}function E1(s){if(s.startsWith(`${Wg}:${T1}:{`))try{let o=JSON.parse(s.slice(40));if(typeof o=="object"&&o&&typeof o.status=="number"&&typeof o.statusText=="string")return new x1(o.status,o.statusText,o.data)}catch{}}function z1(s,{relative:o}={}){it(Vi(),"useHref() may be used only in the context of a <Router> component.");let{basename:c,navigator:u}=g.useContext(Ln),{hash:d,pathname:h,search:x}=Qi(s,{relative:o}),m=h;return c!=="/"&&(m=h==="/"?c:Yn([c,h])),u.createHref({pathname:m,search:x,hash:d})}function Vi(){return g.useContext(Yi)!=null}function vn(){return it(Vi(),"useLocation() may be used only in the context of a <Router> component."),g.useContext(Yi).location}var ey="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function ty(s){g.useContext(Ln).static||g.useLayoutEffect(s)}function Xi(){let{isDataRoute:s}=g.useContext(ia);return s?V1():R1()}function R1(){it(Vi(),"useNavigate() may be used only in the context of a <Router> component.");let s=g.useContext(Os),{basename:o,navigator:c}=g.useContext(Ln),{matches:u}=g.useContext(ia),{pathname:d}=vn(),h=JSON.stringify(Vg(u)),x=g.useRef(!1);return ty(()=>{x.current=!0}),g.useCallback((p,b={})=>{if(Mn(x.current,ey),!x.current)return;if(typeof p=="number"){c.go(p);return}let j=ef(p,JSON.parse(h),d,b.relative==="path");s==null&&o!=="/"&&(j.pathname=j.pathname==="/"?o:Yn([o,j.pathname])),Jg(typeof p=="string"?p:Rs(p),c.createHref(j),Kg(c),"reject"),(b.replace?c.replace:c.push)(j,b.state,b)},[o,c,h,d,s])}var A1=g.createContext(null);function D1(s){let o=g.useContext(ia).outlet;return g.useMemo(()=>o&&g.createElement(A1.Provider,{value:s},o),[o,s])}function Qi(s,{relative:o}={}){let{matches:c}=g.useContext(ia),{pathname:u}=vn(),d=JSON.stringify(Vg(c));return g.useMemo(()=>ef(s,JSON.parse(d),u,o==="path"),[s,d,u,o])}function _1(s,o){return ny(s,o)}function ny(s,o,c){it(Vi(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:u}=g.useContext(Ln),{matches:d}=g.useContext(ia),h=d[d.length-1],x=h?h.params:{},m=h?h.pathname:"/",p=h?h.pathnameBase:"/",b=h&&h.route;{let T=b&&b.path||"";ly(m,!b||T.endsWith("*")||T.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${m}" (under <Route path="${T}">) 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="${T}"> to <Route path="${T==="/"?"*":`${T}/*`}">.`)}let j=vn(),y;if(o){let T=typeof o=="string"?Ll(o):o;it(p==="/"||T.pathname?.startsWith(p),`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 "${p}" but pathname "${T.pathname}" was given in the \`location\` prop.`),y=T}else y=j;let N=y.pathname||"/",C=N;if(p!=="/"){let T=p.replace(/^\//,"").split("/");C="/"+N.replace(/^\//,"").split("/").slice(T.length).join("/")}let B=c&&c.state.matches.length?c.state.matches.map(T=>Object.assign(T,{route:c.manifest[T.route.id]||T.route})):Bg(s,{pathname:C});Mn(b||B!=null,`No routes matched location "${y.pathname}${y.search}${y.hash}" `),Mn(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 "${y.pathname}${y.search}${y.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 S=H1(B&&B.map(T=>Object.assign({},T,{params:Object.assign({},x,T.params),pathname:Yn([p,u.encodeLocation?u.encodeLocation(T.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:T.pathname]),pathnameBase:T.pathnameBase==="/"?p:Yn([p,u.encodeLocation?u.encodeLocation(T.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:T.pathnameBase])})),d,c);return o&&S?g.createElement(Yi.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",mask:void 0,...y},navigationType:"POP"}},S):S}function M1(){let s=Y1(),o=p1(s)?`${s.status} ${s.statusText}`:s instanceof Error?s.message:JSON.stringify(s),c=s instanceof Error?s.stack:null,u="rgba(200,200,200, 0.5)",d={padding:"0.5rem",backgroundColor:u},h={padding:"2px 4px",backgroundColor:u},x=null;return console.error("Error handled by React Router default ErrorBoundary:",s),x=g.createElement(g.Fragment,null,g.createElement("p",null,"💿 Hey developer 👋"),g.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",g.createElement("code",{style:h},"ErrorBoundary")," or"," ",g.createElement("code",{style:h},"errorElement")," prop on your route.")),g.createElement(g.Fragment,null,g.createElement("h2",null,"Unexpected Application Error!"),g.createElement("h3",{style:{fontStyle:"italic"}},o),c?g.createElement("pre",{style:d},c):null,x)}var O1=g.createElement(M1,null),ay=class extends g.Component{constructor(s){super(s),this.state={location:s.location,revalidation:s.revalidation,error:s.error}}static getDerivedStateFromError(s){return{error:s}}static getDerivedStateFromProps(s,o){return o.location!==s.location||o.revalidation!=="idle"&&s.revalidation==="idle"?{error:s.error,location:s.location,revalidation:s.revalidation}:{error:s.error!==void 0?s.error:o.error,location:o.location,revalidation:s.revalidation||o.revalidation}}componentDidCatch(s,o){this.props.onError?this.props.onError(s,o):console.error("React Router caught the following error during render",s)}render(){let s=this.state.error;if(this.context&&typeof s=="object"&&s&&"digest"in s&&typeof s.digest=="string"){const c=E1(s.digest);c&&(s=c)}let o=s!==void 0?g.createElement(ia.Provider,{value:this.props.routeContext},g.createElement(tf.Provider,{value:s,children:this.props.component})):this.props.children;return this.context?g.createElement(L1,{error:s},o):o}};ay.contextType=Fg;var Dd=new WeakMap;function L1({children:s,error:o}){let{basename:c,navigator:u}=g.useContext(Ln);if(typeof o=="object"&&o&&"digest"in o&&typeof o.digest=="string"){let d=C1(o.digest);if(d){let h=Dd.get(o);if(h)throw h;let x=Zg(d.location,c),m=x.absoluteURL||x.to;if(Jg(d.location,m,Kg(u),"allow-explicit"),j1(m))throw new Error("Invalid redirect location");if(Qg&&!Dd.get(o))if(x.isExternal||d.reloadDocument)window.location.href=m;else{const p=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(x.to,{replace:d.replace}));throw Dd.set(o,p),p}return g.createElement("meta",{httpEquiv:"refresh",content:`0;url=${m}`})}}return s}function U1({routeContext:s,match:o,children:c}){let u=g.useContext(Os);return u&&u.static&&u.staticContext&&(o.route.errorElement||o.route.ErrorBoundary)&&(u.staticContext._deepestRenderedBoundaryId=o.route.id),g.createElement(ia.Provider,{value:s},c)}function H1(s,o=[],c){let u=c?.state;if(s==null){if(!u)return null;if(u.errors)s=u.matches;else if(o.length===0&&!u.initialized&&u.matches.length>0)s=u.matches;else return null}let d=s,h=u?.errors;if(h!=null){let j=d.findIndex(y=>y.route.id&&h?.[y.route.id]!==void 0);it(j>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(h).join(",")}`),d=d.slice(0,Math.min(d.length,j+1))}let x=!1,m=-1;if(c&&u){x=u.renderFallback;for(let j=0;j<d.length;j++){let y=d[j];if((y.route.HydrateFallback||y.route.hydrateFallbackElement)&&(m=j),y.route.id){let{loaderData:N,errors:C}=u,B=y.route.loader&&!N.hasOwnProperty(y.route.id)&&(!C||C[y.route.id]===void 0);if(y.route.lazy||B){c.isStatic&&(x=!0),m>=0?d=d.slice(0,m+1):d=[d[0]];break}}}}let p=c?.onError,b=u&&p?(j,y)=>{p(j,{location:u.location,params:u.matches?.[0]?.params??{},pattern:g1(u.matches),errorInfo:y})}:void 0;return d.reduceRight((j,y,N)=>{let C,B=!1,S=null,T=null;u&&(C=h&&y.route.id?h[y.route.id]:void 0,S=y.route.errorElement||O1,x&&(m<0&&N===0?(ly("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),B=!0,T=null):m===N&&(B=!0,T=y.route.hydrateFallbackElement||null)));let A=o.concat(d.slice(0,N+1)),k=()=>{let X;return C?X=S:B?X=T:y.route.Component?X=g.createElement(y.route.Component,null):y.route.element?X=y.route.element:X=j,g.createElement(U1,{match:y,routeContext:{outlet:j,matches:A,isDataRoute:u!=null},children:X})};return u&&(y.route.ErrorBoundary||y.route.errorElement||N===0)?g.createElement(ay,{location:u.location,revalidation:u.revalidation,component:S,error:C,children:k(),routeContext:{outlet:null,matches:A,isDataRoute:!0},onError:b}):k()},null)}function nf(s){return`${s} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function B1(s){let o=g.useContext(Os);return it(o,nf(s)),o}function q1(s){let o=g.useContext($o);return it(o,nf(s)),o}function $1(s){let o=g.useContext(ia);return it(o,nf(s)),o}function af(s){let o=$1(s),c=o.matches[o.matches.length-1];return it(c.route.id,`${s} can only be used on routes that contain a unique "id"`),c.route.id}function G1(){return af("useRouteId")}function Y1(){let s=g.useContext(tf),o=q1("useRouteError"),c=af("useRouteError");return s!==void 0?s:o.errors?.[c]}function V1(){let{router:s}=B1("useNavigate"),o=af("useNavigate"),c=g.useRef(!1);return ty(()=>{c.current=!0}),g.useCallback(async(d,h={})=>{Mn(c.current,ey),c.current&&(typeof d=="number"?await s.navigate(d):await s.navigate(d,{fromRouteId:o,...h}))},[s,o])}var ng={};function ly(s,o,c){!o&&!ng[s]&&(ng[s]=!0,Mn(!1,c))}g.memo(X1);function X1({routes:s,manifest:o,future:c,state:u,isStatic:d,onError:h}){return ny(s,void 0,{manifest:o,state:u,isStatic:d,onError:h})}function Q1(s){return D1(s.context)}function An(s){it(!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 Z1({basename:s="/",children:o=null,location:c,navigationType:u="POP",navigator:d,static:h=!1,useTransitions:x}){it(!Vi(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let m=s.replace(/^\/*/,"/"),p=g.useMemo(()=>({basename:m,navigator:d,static:h,useTransitions:x,future:{}}),[m,d,h,x]);typeof c=="string"&&(c=Ll(c));let{pathname:b="/",search:j="",hash:y="",state:N=null,key:C="default",mask:B}=c,S=g.useMemo(()=>{let T=Ca(b,m);return T==null?null:{location:{pathname:T,search:j,hash:y,state:N,key:C,mask:B},navigationType:u}},[m,b,j,y,N,C,u,B]);return Mn(S!=null,`<Router basename="${m}"> is not able to match the URL "${b}${j}${y}" because it does not start with the basename, so the <Router> won't render anything.`),S==null?null:g.createElement(Ln.Provider,{value:p},g.createElement(Yi.Provider,{children:o,value:S}))}function K1({children:s,location:o}){return _1($d(s),o)}function $d(s,o=[]){let c=[];return g.Children.forEach(s,(u,d)=>{if(!g.isValidElement(u))return;let h=[...o,d];if(u.type===g.Fragment){c.push.apply(c,$d(u.props.children,h));return}it(u.type===An,`[${typeof u.type=="string"?u.type:u.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),it(!u.props.index||!u.props.children,"An index route cannot have child routes.");let x={id:u.props.id||h.join("-"),caseSensitive:u.props.caseSensitive,element:u.props.element,Component:u.props.Component,index:u.props.index,path:u.props.path,middleware:u.props.middleware,loader:u.props.loader,action:u.props.action,hydrateFallbackElement:u.props.hydrateFallbackElement,HydrateFallback:u.props.HydrateFallback,errorElement:u.props.errorElement,ErrorBoundary:u.props.ErrorBoundary,hasErrorBoundary:u.props.hasErrorBoundary===!0||u.props.ErrorBoundary!=null||u.props.errorElement!=null,shouldRevalidate:u.props.shouldRevalidate,handle:u.props.handle,lazy:u.props.lazy};u.props.children&&(x.children=$d(u.props.children,h)),c.push(x)}),c}var Ro="get",Ao="application/x-www-form-urlencoded";function Go(s){return typeof HTMLElement<"u"&&s instanceof HTMLElement}function J1(s){return Go(s)&&s.tagName.toLowerCase()==="button"}function P1(s){return Go(s)&&s.tagName.toLowerCase()==="form"}function F1(s){return Go(s)&&s.tagName.toLowerCase()==="input"}function I1(s){return!!(s.metaKey||s.altKey||s.ctrlKey||s.shiftKey)}function W1(s,o){return s.button===0&&(!o||o==="_self")&&!I1(s)}function Gd(s=""){return new URLSearchParams(typeof s=="string"||Array.isArray(s)||s instanceof URLSearchParams?s:Object.keys(s).reduce((o,c)=>{let u=s[c];return o.concat(Array.isArray(u)?u.map(d=>[c,d]):[[c,u]])},[]))}function ej(s,o){let c=Gd(s);return o&&o.forEach((u,d)=>{c.has(d)||o.getAll(d).forEach(h=>{c.append(d,h)})}),c}var To=null;function tj(){if(To===null)try{new FormData(document.createElement("form"),0),To=!1}catch{To=!0}return To}var nj=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function _d(s){return s!=null&&!nj.has(s)?(Mn(!1,`"${s}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Ao}"`),null):s}function aj(s,o){let c,u,d,h,x;if(P1(s)){let m=s.getAttribute("action");u=m?Ca(m,o):null,c=s.getAttribute("method")||Ro,d=_d(s.getAttribute("enctype"))||Ao,h=new FormData(s)}else if(J1(s)||F1(s)&&(s.type==="submit"||s.type==="image")){let m=s.form;if(m==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let p=s.getAttribute("formaction")||m.getAttribute("action");if(u=p?Ca(p,o):null,c=s.getAttribute("formmethod")||m.getAttribute("method")||Ro,d=_d(s.getAttribute("formenctype"))||_d(m.getAttribute("enctype"))||Ao,h=new FormData(m,s),!tj()){let{name:b,type:j,value:y}=s;if(j==="image"){let N=b?`${b}.`:"";h.append(`${N}x`,"0"),h.append(`${N}y`,"0")}else b&&h.append(b,y)}}else{if(Go(s))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');c=Ro,u=null,d=Ao,x=s}return h&&d==="text/plain"&&(x=h,h=void 0),{action:u,method:c.toLowerCase(),encType:d,formData:h,body:x}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function lf(s,o){if(s===!1||s===null||typeof s>"u")throw new Error(o)}function sy(s,o,c,u){let d=typeof s=="string"?new URL(s,typeof window>"u"?"server://singlefetch/":window.location.origin):s;return c?d.pathname.endsWith("/")?d.pathname=`${d.pathname}_.${u}`:d.pathname=`${d.pathname}.${u}`:d.pathname==="/"?d.pathname=`_root.${u}`:o&&Ca(d.pathname,o)==="/"?d.pathname=`${As(o)}/_root.${u}`:d.pathname=`${As(d.pathname)}.${u}`,d}async function lj(s,o){if(s.id in o)return o[s.id];try{let c=await import(s.module);return o[s.id]=c,c}catch(c){return console.error(`Error loading route module \`${s.module}\`, reloading page...`),console.error(c),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function sj(s){return s==null?!1:s.href==null?s.rel==="preload"&&typeof s.imageSrcSet=="string"&&typeof s.imageSizes=="string":typeof s.rel=="string"&&typeof s.href=="string"}async function ij(s,o,c){let u=await Promise.all(s.map(async d=>{let h=o.routes[d.route.id];if(h){let x=await lj(h,c);return x.links?x.links():[]}return[]}));return uj(u.flat(1).filter(sj).filter(d=>d.rel==="stylesheet"||d.rel==="preload").map(d=>d.rel==="stylesheet"?{...d,rel:"prefetch",as:"style"}:{...d,rel:"prefetch"}))}function ag(s,o,c,u,d,h){let x=(p,b)=>c[b]?p.route.id!==c[b].route.id:!0,m=(p,b)=>c[b].pathname!==p.pathname||c[b].route.path?.endsWith("*")&&c[b].params["*"]!==p.params["*"];return h==="assets"?o.filter((p,b)=>x(p,b)||m(p,b)):h==="data"?o.filter((p,b)=>{let j=u.routes[p.route.id];if(!j||!j.hasLoader)return!1;if(x(p,b)||m(p,b))return!0;if(p.route.shouldRevalidate){let y=p.route.shouldRevalidate({currentUrl:new URL(d.pathname+d.search+d.hash,window.origin),currentParams:c[0]?.params||{},nextUrl:new URL(s,window.origin),nextParams:p.params,defaultShouldRevalidate:!0});if(typeof y=="boolean")return y}return!0}):[]}function rj(s,o,{includeHydrateFallback:c}={}){return oj(s.map(u=>{let d=o.routes[u.route.id];if(!d)return[];let h=[d.module];return d.clientActionModule&&(h=h.concat(d.clientActionModule)),d.clientLoaderModule&&(h=h.concat(d.clientLoaderModule)),c&&d.hydrateFallbackModule&&(h=h.concat(d.hydrateFallbackModule)),d.imports&&(h=h.concat(d.imports)),h}).flat(1))}function oj(s){return[...new Set(s)]}function cj(s){let o={},c=Object.keys(s).sort();for(let u of c)o[u]=s[u];return o}function uj(s,o){let c=new Set;return new Set(o),s.reduce((u,d)=>{let h=JSON.stringify(cj(d));return c.has(h)||(c.add(h),u.push({key:h,link:d})),u},[])}function sf(){let s=g.useContext(Os);return lf(s,"You must render this element inside a <DataRouterContext.Provider> element"),s}function dj(){let s=g.useContext($o);return lf(s,"You must render this element inside a <DataRouterStateContext.Provider> element"),s}var rf=g.createContext(void 0);rf.displayName="FrameworkContext";function Yo(){let s=g.useContext(rf);return lf(s,"You must render this element inside a <HydratedRouter> element"),s}function fj(s,o){let c=g.useContext(rf),[u,d]=g.useState(!1),[h,x]=g.useState(!1),{onFocus:m,onBlur:p,onMouseEnter:b,onMouseLeave:j,onTouchStart:y}=o,N=g.useRef(null);g.useEffect(()=>{if(s==="render"&&x(!0),s==="viewport"){let S=A=>{A.forEach(k=>{x(k.isIntersecting)})},T=new IntersectionObserver(S,{threshold:.5});return N.current&&T.observe(N.current),()=>{T.disconnect()}}},[s]),g.useEffect(()=>{if(u){let S=setTimeout(()=>{x(!0)},100);return()=>{clearTimeout(S)}}},[u]);let C=()=>{d(!0)},B=()=>{d(!1),x(!1)};return c?s!=="intent"?[h,N,{}]:[h,N,{onFocus:Oi(m,C),onBlur:Oi(p,B),onMouseEnter:Oi(b,C),onMouseLeave:Oi(j,B),onTouchStart:Oi(y,C)}]:[!1,N,{}]}function Oi(s,o){return c=>{s&&s(c),c.defaultPrevented||o(c)}}function hj({page:s,...o}){let c=N1(),{nonce:u}=Yo(),{router:d}=sf(),h=g.useMemo(()=>Bg(d.routes,s,d.basename),[d.routes,s,d.basename]);return h?(o.nonce==null&&u&&(o={...o,nonce:u}),c?g.createElement(xj,{page:s,matches:h,...o}):g.createElement(pj,{page:s,matches:h,...o})):null}function mj(s){let{manifest:o,routeModules:c}=Yo(),[u,d]=g.useState([]);return g.useEffect(()=>{let h=!1;return ij(s,o,c).then(x=>{h||d(x)}),()=>{h=!0}},[s,o,c]),u}function xj({page:s,matches:o,...c}){let u=vn(),{future:d}=Yo(),{basename:h}=sf(),x=g.useMemo(()=>{if(s===u.pathname+u.search+u.hash)return[];let m=sy(s,h,d.v8_trailingSlashAwareDataRequests,"rsc"),p=!1,b=[];for(let j of o)typeof j.route.shouldRevalidate=="function"?p=!0:b.push(j.route.id);return p&&b.length>0&&m.searchParams.set("_routes",b.join(",")),[m.pathname+m.search]},[h,d.v8_trailingSlashAwareDataRequests,s,u,o]);return g.createElement(g.Fragment,null,x.map(m=>g.createElement("link",{key:m,rel:"prefetch",as:"fetch",href:m,...c})))}function pj({page:s,matches:o,...c}){let u=vn(),{future:d,manifest:h,routeModules:x}=Yo(),{basename:m}=sf(),{loaderData:p,matches:b}=dj(),j=g.useMemo(()=>ag(s,o,b,h,u,"data"),[s,o,b,h,u]),y=g.useMemo(()=>ag(s,o,b,h,u,"assets"),[s,o,b,h,u]),N=g.useMemo(()=>{if(s===u.pathname+u.search+u.hash)return[];let S=new Set,T=!1;if(o.forEach(k=>{let X=h.routes[k.route.id];!X||!X.hasLoader||(!j.some(R=>R.route.id===k.route.id)&&k.route.id in p&&x[k.route.id]?.shouldRevalidate||X.hasClientLoader?T=!0:S.add(k.route.id))}),S.size===0)return[];let A=sy(s,m,d.v8_trailingSlashAwareDataRequests,"data");return T&&S.size>0&&A.searchParams.set("_routes",o.filter(k=>S.has(k.route.id)).map(k=>k.route.id).join(",")),[A.pathname+A.search]},[m,d.v8_trailingSlashAwareDataRequests,p,u,h,j,o,s,x]),C=g.useMemo(()=>rj(y,h),[y,h]),B=mj(y);return g.createElement(g.Fragment,null,N.map(S=>g.createElement("link",{key:S,rel:"prefetch",as:"fetch",href:S,...c})),C.map(S=>g.createElement("link",{key:S,rel:"modulepreload",href:S,...c})),B.map(({key:S,link:T})=>g.createElement("link",{key:S,nonce:c.nonce,...T,crossOrigin:T.crossOrigin??c.crossOrigin})))}function gj(...s){return o=>{s.forEach(c=>{typeof c=="function"?c(o):c!=null&&(c.current=o)})}}var yj=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{yj&&(window.__reactRouterVersion="7.18.5")}catch{}function vj({basename:s,children:o,useTransitions:c,window:u}){let d=g.useRef();d.current==null&&(d.current=Z0({window:u,v5Compat:!0}));let h=d.current,[x,m]=g.useState({action:h.action,location:h.location}),p=g.useCallback(b=>{c===!1?m(b):g.startTransition(()=>m(b))},[c]);return g.useLayoutEffect(()=>h.listen(p),[h,p]),g.createElement(Z1,{basename:s,children:o,location:x.location,navigationType:x.action,navigator:h,useTransitions:c})}var bt=g.forwardRef(function({onClick:o,discover:c="render",prefetch:u="none",relative:d,reloadDocument:h,replace:x,mask:m,state:p,target:b,to:j,preventScrollReset:y,viewTransition:N,defaultShouldRevalidate:C,...B},S){let{basename:T,navigator:A,useTransitions:k}=g.useContext(Ln),X=typeof j=="string"&&Wd.test(j),R=Zg(j,T);j=R.to;let M=z1(j,{relative:d}),ne=vn(),L=null;if(m){let F=ef(m,[],ne.mask?ne.mask.pathname:"/",!0);T!=="/"&&(F.pathname=F.pathname==="/"?T:Yn([T,F.pathname])),L=A.createHref(F)}let[Q,ce,P]=fj(u,B),ae=Nj(j,{replace:x,mask:m,state:p,target:b,preventScrollReset:y,relative:d,viewTransition:N,defaultShouldRevalidate:C,useTransitions:k});function O(F){o&&o(F),F.defaultPrevented||ae(F)}let D=!(R.isExternal||h),le=g.createElement("a",{...B,...P,href:(D?L:void 0)||R.absoluteURL||M,onClick:D?O:o,ref:gj(S,ce),target:b,"data-discover":!X&&c==="render"?"true":void 0});return Q&&!X?g.createElement(g.Fragment,null,le,g.createElement(hj,{page:M})):le});bt.displayName="Link";var iy=g.forwardRef(function({"aria-current":o="page",caseSensitive:c=!1,className:u="",end:d=!1,style:h,to:x,viewTransition:m,children:p,...b},j){let y=Qi(x,{relative:b.relative}),N=vn(),C=g.useContext($o),{navigator:B,basename:S}=g.useContext(Ln),T=C!=null&&Cj(y)&&m===!0,A=B.encodeLocation?B.encodeLocation(y).pathname:y.pathname,k=N.pathname,X=C&&C.navigation&&C.navigation.location?C.navigation.location.pathname:null;c||(k=k.toLowerCase(),X=X?X.toLowerCase():null,A=A.toLowerCase()),X&&S&&(X=Ca(X,S)||X);const R=A!=="/"&&A.endsWith("/")?A.length-1:A.length;let M=k===A||!d&&k.startsWith(A)&&k.charAt(R)==="/",ne=X!=null&&(X===A||!d&&X.startsWith(A)&&X.charAt(A.length)==="/"),L={isActive:M,isPending:ne,isTransitioning:T},Q=M?o:void 0,ce;typeof u=="function"?ce=u(L):ce=[u,M?"active":null,ne?"pending":null,T?"transitioning":null].filter(Boolean).join(" ");let P=typeof h=="function"?h(L):h;return g.createElement(bt,{...b,"aria-current":Q,className:ce,ref:j,style:P,to:x,viewTransition:m},typeof p=="function"?p(L):p)});iy.displayName="NavLink";var bj=g.forwardRef(({discover:s="render",fetcherKey:o,navigate:c,reloadDocument:u,replace:d,state:h,method:x=Ro,action:m,onSubmit:p,relative:b,preventScrollReset:j,viewTransition:y,defaultShouldRevalidate:N,...C},B)=>{let{useTransitions:S}=g.useContext(Ln),T=kj(),A=Tj(m,{relative:b}),k=x.toLowerCase()==="get"?"get":"post",X=typeof m=="string"&&Wd.test(m),R=M=>{if(p&&p(M),M.defaultPrevented)return;M.preventDefault();let ne=M.nativeEvent.submitter,L=ne?.getAttribute("formmethod")||x,Q=()=>T(ne||M.currentTarget,{fetcherKey:o,method:L,navigate:c,replace:d,state:h,relative:b,preventScrollReset:j,viewTransition:y,defaultShouldRevalidate:N});S&&c!==!1?g.startTransition(()=>Q()):Q()};return g.createElement("form",{ref:B,method:k,action:A,onSubmit:u?p:R,...C,"data-discover":!X&&s==="render"?"true":void 0})});bj.displayName="Form";function jj(s){return`${s} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function ry(s){let o=g.useContext(Os);return it(o,jj(s)),o}function Nj(s,{target:o,replace:c,mask:u,state:d,preventScrollReset:h,relative:x,viewTransition:m,defaultShouldRevalidate:p,useTransitions:b}={}){let j=Xi(),y=vn(),N=Qi(s,{relative:x});return g.useCallback(C=>{if(W1(C,o)){C.preventDefault();let B=c!==void 0?c:Rs(y)===Rs(N),S=()=>j(s,{replace:B,mask:u,state:d,preventScrollReset:h,relative:x,viewTransition:m,defaultShouldRevalidate:p});b?g.startTransition(()=>S()):S()}},[y,j,N,c,u,d,o,s,h,x,m,p,b])}function Vo(s){Mn(typeof URLSearchParams<"u","You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let o=g.useRef(Gd(s)),c=g.useRef(!1),u=vn(),d=g.useMemo(()=>ej(u.search,c.current?null:o.current),[u.search]),h=Xi(),x=g.useCallback((m,p)=>{const b=Gd(typeof m=="function"?m(new URLSearchParams(d)):m);c.current=!0,h("?"+b,p)},[h,d]);return[d,x]}var wj=0,Sj=()=>`__${String(++wj)}__`;function kj(){let{router:s}=ry("useSubmit"),{basename:o}=g.useContext(Ln),c=G1(),u=s.fetch,d=s.navigate;return g.useCallback(async(h,x={})=>{let{action:m,method:p,encType:b,formData:j,body:y}=aj(h,o);if(x.navigate===!1){let N=x.fetcherKey||Sj();await u(N,c,x.action||m,{defaultShouldRevalidate:x.defaultShouldRevalidate,preventScrollReset:x.preventScrollReset,formData:j,body:y,formMethod:x.method||p,formEncType:x.encType||b,flushSync:x.flushSync})}else await d(x.action||m,{defaultShouldRevalidate:x.defaultShouldRevalidate,preventScrollReset:x.preventScrollReset,formData:j,body:y,formMethod:x.method||p,formEncType:x.encType||b,replace:x.replace,state:x.state,fromRouteId:c,flushSync:x.flushSync,viewTransition:x.viewTransition})},[u,d,o,c])}function Tj(s,{relative:o}={}){let{basename:c}=g.useContext(Ln),u=g.useContext(ia);it(u,"useFormAction must be used inside a RouteContext");let[d]=u.matches.slice(-1),h={...Qi(s||".",{relative:o})},x=vn();if(s==null){h.search=x.search;let m=new URLSearchParams(h.search),p=m.getAll("index");if(p.some(j=>j==="")){m.delete("index"),p.filter(y=>y).forEach(y=>m.append("index",y));let j=m.toString();h.search=j?`?${j}`:""}}return(!s||s===".")&&d.route.index&&(h.search=h.search?h.search.replace(/^\?/,"?index&"):"?index"),c!=="/"&&(h.pathname=h.pathname==="/"?c:Yn([c,h.pathname])),Rs(h)}function Cj(s,{relative:o}={}){let c=g.useContext(Ig);it(c!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:u}=ry("useViewTransitionState"),d=Qi(s,{relative:o});if(!c.isTransitioning)return!1;let h=Ca(c.currentLocation.pathname,u)||c.currentLocation.pathname,x=Ca(c.nextLocation.pathname,u)||c.nextLocation.pathname;return Mo(d.pathname,x)!=null||Mo(d.pathname,h)!=null}var Ej=Ug();const oy="ez-theme",cy=g.createContext(null);function zj(){try{const s=localStorage.getItem(oy);if(s==="light"||s==="dark")return s}catch{}return"dark"}function Rj({children:s}){const[o,c]=g.useState(zj);g.useEffect(()=>{document.documentElement.dataset.theme=o;try{localStorage.setItem(oy,o)}catch{}},[o]);const u=g.useCallback(()=>{c(h=>h==="dark"?"light":"dark")},[]),d=g.useMemo(()=>({theme:o,setTheme:c,toggleTheme:u}),[o,u]);return a.jsx(cy.Provider,{value:d,children:s})}function uy(){const s=g.useContext(cy);if(!s)throw new Error("useTheme must be used inside ThemeProvider");return s}/**
|
|
61
|
+
* @license lucide-react v0.511.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 Aj=s=>s.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Dj=s=>s.replace(/^([A-Z])|[\s-_]+(\w)/g,(o,c,u)=>u?u.toUpperCase():c.toLowerCase()),lg=s=>{const o=Dj(s);return o.charAt(0).toUpperCase()+o.slice(1)},dy=(...s)=>s.filter((o,c,u)=>!!o&&o.trim()!==""&&u.indexOf(o)===c).join(" ").trim(),_j=s=>{for(const o in s)if(o.startsWith("aria-")||o==="role"||o==="title")return!0};/**
|
|
66
|
+
* @license lucide-react v0.511.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
|
+
*/var Mj={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"};/**
|
|
71
|
+
* @license lucide-react v0.511.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 Oj=g.forwardRef(({color:s="currentColor",size:o=24,strokeWidth:c=2,absoluteStrokeWidth:u,className:d="",children:h,iconNode:x,...m},p)=>g.createElement("svg",{ref:p,...Mj,width:o,height:o,stroke:s,strokeWidth:u?Number(c)*24/Number(o):c,className:dy("lucide",d),...!h&&!_j(m)&&{"aria-hidden":"true"},...m},[...x.map(([b,j])=>g.createElement(b,j)),...Array.isArray(h)?h:[h]]));/**
|
|
76
|
+
* @license lucide-react v0.511.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 ue=(s,o)=>{const c=g.forwardRef(({className:u,...d},h)=>g.createElement(Oj,{ref:h,iconNode:o,className:dy(`lucide-${Aj(lg(s))}`,`lucide-${s}`,u),...d}));return c.displayName=lg(s),c};/**
|
|
81
|
+
* @license lucide-react v0.511.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
|
+
*/const Lj=[["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"}]],Oo=ue("activity",Lj);/**
|
|
86
|
+
* @license lucide-react v0.511.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 Uj=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],Hj=ue("arrow-down",Uj);/**
|
|
91
|
+
* @license lucide-react v0.511.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 Bj=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],qj=ue("arrow-left",Bj);/**
|
|
96
|
+
* @license lucide-react v0.511.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 $j=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],Ls=ue("arrow-right",$j);/**
|
|
101
|
+
* @license lucide-react v0.511.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 Gj=[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M17 17H4a1 1 0 0 1-.74-1.673C4.59 13.956 6 12.499 6 8a6 6 0 0 1 .258-1.742",key:"178tsu"}],["path",{d:"m2 2 20 20",key:"1ooewy"}],["path",{d:"M8.668 3.01A6 6 0 0 1 18 8c0 2.687.77 4.653 1.707 6.05",key:"1hqiys"}]],Yj=ue("bell-off",Gj);/**
|
|
106
|
+
* @license lucide-react v0.511.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 Vj=[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M22 8c0-2.3-.8-4.3-2-6",key:"5bb3ad"}],["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"}],["path",{d:"M4 2C2.8 3.7 2 5.7 2 8",key:"tap9e0"}]],sg=ue("bell-ring",Vj);/**
|
|
111
|
+
* @license lucide-react v0.511.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 Xj=[["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"}]],of=ue("bell",Xj);/**
|
|
116
|
+
* @license lucide-react v0.511.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 Qj=[["path",{d:"M2.97 12.92A2 2 0 0 0 2 14.63v3.24a2 2 0 0 0 .97 1.71l3 1.8a2 2 0 0 0 2.06 0L12 19v-5.5l-5-3-4.03 2.42Z",key:"lc1i9w"}],["path",{d:"m7 16.5-4.74-2.85",key:"1o9zyk"}],["path",{d:"m7 16.5 5-3",key:"va8pkn"}],["path",{d:"M7 16.5v5.17",key:"jnp8gn"}],["path",{d:"M12 13.5V19l3.97 2.38a2 2 0 0 0 2.06 0l3-1.8a2 2 0 0 0 .97-1.71v-3.24a2 2 0 0 0-.97-1.71L17 10.5l-5 3Z",key:"8zsnat"}],["path",{d:"m17 16.5-5-3",key:"8arw3v"}],["path",{d:"m17 16.5 4.74-2.85",key:"8rfmw"}],["path",{d:"M17 16.5v5.17",key:"k6z78m"}],["path",{d:"M7.97 4.42A2 2 0 0 0 7 6.13v4.37l5 3 5-3V6.13a2 2 0 0 0-.97-1.71l-3-1.8a2 2 0 0 0-2.06 0l-3 1.8Z",key:"1xygjf"}],["path",{d:"M12 8 7.26 5.15",key:"1vbdud"}],["path",{d:"m12 8 4.74-2.85",key:"3rx089"}],["path",{d:"M12 13.5V8",key:"1io7kd"}]],fy=ue("boxes",Qj);/**
|
|
121
|
+
* @license lucide-react v0.511.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 Zj=[["path",{d:"M17 21v-2a1 1 0 0 1-1-1v-1a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2v1a1 1 0 0 1-1 1",key:"10bnsj"}],["path",{d:"M19 15V6.5a1 1 0 0 0-7 0v11a1 1 0 0 1-7 0V9",key:"1eqmu1"}],["path",{d:"M21 21v-2h-4",key:"14zm7j"}],["path",{d:"M3 5h4V3",key:"z442eg"}],["path",{d:"M7 5a1 1 0 0 1 1 1v1a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V6a1 1 0 0 1 1-1V3",key:"ebdjd7"}]],Kj=ue("cable",Zj);/**
|
|
126
|
+
* @license lucide-react v0.511.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 Jj=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],hy=ue("check",Jj);/**
|
|
131
|
+
* @license lucide-react v0.511.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 Pj=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Fj=ue("chevron-down",Pj);/**
|
|
136
|
+
* @license lucide-react v0.511.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 Ij=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Wj=ue("chevron-right",Ij);/**
|
|
141
|
+
* @license lucide-react v0.511.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 e2=[["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"}]],t2=ue("circle-alert",e2);/**
|
|
146
|
+
* @license lucide-react v0.511.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 n2=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],Dl=ue("circle-check",n2);/**
|
|
151
|
+
* @license lucide-react v0.511.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 a2=[["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"}]],Yd=ue("circle-x",a2);/**
|
|
156
|
+
* @license lucide-react v0.511.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 l2=[["path",{d:"m18 16 4-4-4-4",key:"1inbqp"}],["path",{d:"m6 8-4 4 4 4",key:"15zrgr"}],["path",{d:"m14.5 4-5 16",key:"e7oirm"}]],s2=ue("code-xml",l2);/**
|
|
161
|
+
* @license lucide-react v0.511.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 i2=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],r2=ue("copy",i2);/**
|
|
166
|
+
* @license lucide-react v0.511.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 o2=[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]],Vd=ue("download",o2);/**
|
|
171
|
+
* @license lucide-react v0.511.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 c2=[["path",{d:"M21.54 15H17a2 2 0 0 0-2 2v4.54",key:"1djwo0"}],["path",{d:"M7 3.34V5a3 3 0 0 0 3 3a2 2 0 0 1 2 2c0 1.1.9 2 2 2a2 2 0 0 0 2-2c0-1.1.9-2 2-2h3.17",key:"1tzkfa"}],["path",{d:"M11 21.95V18a2 2 0 0 0-2-2a2 2 0 0 1-2-2v-1a2 2 0 0 0-2-2H2.05",key:"14pb5j"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],_l=ue("earth",c2);/**
|
|
176
|
+
* @license lucide-react v0.511.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 u2=[["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"}]],d2=ue("eye-off",u2);/**
|
|
181
|
+
* @license lucide-react v0.511.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 f2=[["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"}]],h2=ue("eye",f2);/**
|
|
186
|
+
* @license lucide-react v0.511.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 m2=[["path",{d:"M14 2v6a2 2 0 0 0 .245.96l5.51 10.08A2 2 0 0 1 18 22H6a2 2 0 0 1-1.755-2.96l5.51-10.08A2 2 0 0 0 10 8V2",key:"18mbvz"}],["path",{d:"M6.453 15h11.094",key:"3shlmq"}],["path",{d:"M8.5 2h7",key:"csnxdl"}]],x2=ue("flask-conical",m2);/**
|
|
191
|
+
* @license lucide-react v0.511.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 p2=[["path",{d:"M2 9V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2v-1",key:"fm4g5t"}],["path",{d:"M2 13h10",key:"pgb2dq"}],["path",{d:"m9 16 3-3-3-3",key:"6m91ic"}]],g2=ue("folder-input",p2);/**
|
|
196
|
+
* @license lucide-react v0.511.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 y2=[["path",{d:"m12 14 4-4",key:"9kzdfg"}],["path",{d:"M3.34 19a10 10 0 1 1 17.32 0",key:"19p75a"}]],v2=ue("gauge",y2);/**
|
|
201
|
+
* @license lucide-react v0.511.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 b2=[["line",{x1:"6",x2:"6",y1:"3",y2:"15",key:"17qcm7"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M18 9a9 9 0 0 1-9 9",key:"n2h4wq"}]],j2=ue("git-branch",b2);/**
|
|
206
|
+
* @license lucide-react v0.511.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 N2=[["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"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]],w2=ue("history",N2);/**
|
|
211
|
+
* @license lucide-react v0.511.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 S2=[["polyline",{points:"22 12 16 12 14 15 10 15 8 12 2 12",key:"o97t9d"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}]],k2=ue("inbox",S2);/**
|
|
216
|
+
* @license lucide-react v0.511.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 T2=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],my=ue("info",T2);/**
|
|
221
|
+
* @license lucide-react v0.511.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 C2=[["path",{d:"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z",key:"1s6t7t"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]],Zi=ue("key-round",C2);/**
|
|
226
|
+
* @license lucide-react v0.511.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 E2=[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]],z2=ue("layout-dashboard",E2);/**
|
|
231
|
+
* @license lucide-react v0.511.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 R2=[["path",{d:"M9 17H7A5 5 0 0 1 7 7",key:"10o201"}],["path",{d:"M15 7h2a5 5 0 0 1 4 8",key:"1d3206"}],["line",{x1:"8",x2:"12",y1:"12",y2:"12",key:"rvw6j4"}],["line",{x1:"2",x2:"22",y1:"2",y2:"22",key:"a6p6uj"}]],A2=ue("link-2-off",R2);/**
|
|
236
|
+
* @license lucide-react v0.511.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 D2=[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]],_2=ue("link-2",D2);/**
|
|
241
|
+
* @license lucide-react v0.511.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 M2=[["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 18h.01",key:"1tta3j"}],["path",{d:"M3 6h.01",key:"1rqtza"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 18h13",key:"1lx6n3"}],["path",{d:"M8 6h13",key:"ik3vkj"}]],O2=ue("list",M2);/**
|
|
246
|
+
* @license lucide-react v0.511.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 L2=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],sl=ue("loader-circle",L2);/**
|
|
251
|
+
* @license lucide-react v0.511.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 U2=[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]],cf=ue("lock",U2);/**
|
|
256
|
+
* @license lucide-react v0.511.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 H2=[["path",{d:"m16 17 5-5-5-5",key:"1bji2h"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}]],B2=ue("log-out",H2);/**
|
|
261
|
+
* @license lucide-react v0.511.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 q2=[["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 18h16",key:"19g7jn"}],["path",{d:"M4 6h16",key:"1o0s65"}]],$2=ue("menu",q2);/**
|
|
266
|
+
* @license lucide-react v0.511.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 G2=[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]],xy=ue("moon",G2);/**
|
|
271
|
+
* @license lucide-react v0.511.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 Y2=[["rect",{x:"14",y:"4",width:"4",height:"16",rx:"1",key:"zuxfzm"}],["rect",{x:"6",y:"4",width:"4",height:"16",rx:"1",key:"1okwgv"}]],py=ue("pause",Y2);/**
|
|
276
|
+
* @license lucide-react v0.511.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 V2=[["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"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]],uf=ue("pencil",V2);/**
|
|
281
|
+
* @license lucide-react v0.511.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 X2=[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]],Ki=ue("play",X2);/**
|
|
286
|
+
* @license lucide-react v0.511.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 Q2=[["path",{d:"M6.3 20.3a2.4 2.4 0 0 0 3.4 0L12 18l-6-6-2.3 2.3a2.4 2.4 0 0 0 0 3.4Z",key:"goz73y"}],["path",{d:"m2 22 3-3",key:"19mgm9"}],["path",{d:"M7.5 13.5 10 11",key:"7xgeeb"}],["path",{d:"M10.5 16.5 13 14",key:"10btkg"}],["path",{d:"m18 3-4 4h6l-4 4",key:"16psg9"}]],Z2=ue("plug-zap",Q2);/**
|
|
291
|
+
* @license lucide-react v0.511.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 K2=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],sa=ue("plus",K2);/**
|
|
296
|
+
* @license lucide-react v0.511.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 J2=[["path",{d:"M18.36 6.64A9 9 0 0 1 20.77 15",key:"dxknvb"}],["path",{d:"M6.16 6.16a9 9 0 1 0 12.68 12.68",key:"1x7qb5"}],["path",{d:"M12 2v4",key:"3427ic"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],P2=ue("power-off",J2);/**
|
|
301
|
+
* @license lucide-react v0.511.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 F2=[["path",{d:"M12 2v10",key:"mnfbl"}],["path",{d:"M18.4 6.6a9 9 0 1 1-12.77.04",key:"obofu9"}]],I2=ue("power",F2);/**
|
|
306
|
+
* @license lucide-react v0.511.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 W2=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],Lt=ue("refresh-cw",W2);/**
|
|
311
|
+
* @license lucide-react v0.511.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 eN=[["path",{d:"M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09z",key:"m3kijz"}],["path",{d:"m12 15-3-3a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.35 22.35 0 0 1-4 2z",key:"1fmvmk"}],["path",{d:"M9 12H4s.55-3.03 2-4c1.62-1.08 5 0 5 0",key:"1f8sc4"}],["path",{d:"M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5",key:"qeys4"}]],qi=ue("rocket",eN);/**
|
|
316
|
+
* @license lucide-react v0.511.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 tN=[["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"}]],nN=ue("rotate-ccw",tN);/**
|
|
321
|
+
* @license lucide-react v0.511.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 aN=[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]],df=ue("rotate-cw",aN);/**
|
|
326
|
+
* @license lucide-react v0.511.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 lN=[["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"}]],Xd=ue("save",lN);/**
|
|
331
|
+
* @license lucide-react v0.511.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 sN=[["path",{d:"M15 12h-5",key:"r7krc0"}],["path",{d:"M15 8h-5",key:"1khuty"}],["path",{d:"M19 17V5a2 2 0 0 0-2-2H4",key:"zz82l3"}],["path",{d:"M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3",key:"1ph1d7"}]],$i=ue("scroll-text",sN);/**
|
|
336
|
+
* @license lucide-react v0.511.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 iN=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],rN=ue("search",iN);/**
|
|
341
|
+
* @license lucide-react v0.511.0 - ISC
|
|
342
|
+
*
|
|
343
|
+
* This source code is licensed under the ISC license.
|
|
344
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
345
|
+
*/const oN=[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]],gy=ue("send",oN);/**
|
|
346
|
+
* @license lucide-react v0.511.0 - ISC
|
|
347
|
+
*
|
|
348
|
+
* This source code is licensed under the ISC license.
|
|
349
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
350
|
+
*/const cN=[["path",{d:"m10.852 14.772-.383.923",key:"11vil6"}],["path",{d:"M13.148 14.772a3 3 0 1 0-2.296-5.544l-.383-.923",key:"1v3clb"}],["path",{d:"m13.148 9.228.383-.923",key:"t2zzyc"}],["path",{d:"m13.53 15.696-.382-.924a3 3 0 1 1-2.296-5.544",key:"1bxfiv"}],["path",{d:"m14.772 10.852.923-.383",key:"k9m8cz"}],["path",{d:"m14.772 13.148.923.383",key:"1xvhww"}],["path",{d:"M4.5 10H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v4a2 2 0 0 1-2 2h-.5",key:"tn8das"}],["path",{d:"M4.5 14H4a2 2 0 0 0-2 2v4a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-4a2 2 0 0 0-2-2h-.5",key:"1g2pve"}],["path",{d:"M6 18h.01",key:"uhywen"}],["path",{d:"M6 6h.01",key:"1utrut"}],["path",{d:"m9.228 10.852-.923-.383",key:"1wtb30"}],["path",{d:"m9.228 13.148-.923.383",key:"1a830x"}]],yy=ue("server-cog",cN);/**
|
|
351
|
+
* @license lucide-react v0.511.0 - ISC
|
|
352
|
+
*
|
|
353
|
+
* This source code is licensed under the ISC license.
|
|
354
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
355
|
+
*/const uN=[["path",{d:"M20 7h-9",key:"3s1dr2"}],["path",{d:"M14 17H5",key:"gfn3mx"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}],["circle",{cx:"7",cy:"7",r:"3",key:"dfmy0x"}]],ff=ue("settings-2",uN);/**
|
|
356
|
+
* @license lucide-react v0.511.0 - ISC
|
|
357
|
+
*
|
|
358
|
+
* This source code is licensed under the ISC license.
|
|
359
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
360
|
+
*/const dN=[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]],Us=ue("server",dN);/**
|
|
361
|
+
* @license lucide-react v0.511.0 - ISC
|
|
362
|
+
*
|
|
363
|
+
* This source code is licensed under the ISC license.
|
|
364
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
365
|
+
*/const fN=[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],hN=ue("settings",fN);/**
|
|
366
|
+
* @license lucide-react v0.511.0 - ISC
|
|
367
|
+
*
|
|
368
|
+
* This source code is licensed under the ISC license.
|
|
369
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
370
|
+
*/const mN=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M12 16h.01",key:"1drbdi"}]],Ra=ue("shield-alert",mN);/**
|
|
371
|
+
* @license lucide-react v0.511.0 - ISC
|
|
372
|
+
*
|
|
373
|
+
* This source code is licensed under the ISC license.
|
|
374
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
375
|
+
*/const xN=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],Ea=ue("shield-check",xN);/**
|
|
376
|
+
* @license lucide-react v0.511.0 - ISC
|
|
377
|
+
*
|
|
378
|
+
* This source code is licensed under the ISC license.
|
|
379
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
380
|
+
*/const pN=[["path",{d:"m2 2 20 20",key:"1ooewy"}],["path",{d:"M5 5a1 1 0 0 0-1 1v7c0 5 3.5 7.5 7.67 8.94a1 1 0 0 0 .67.01c2.35-.82 4.48-1.97 5.9-3.71",key:"1jlk70"}],["path",{d:"M9.309 3.652A12.252 12.252 0 0 0 11.24 2.28a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1v7a9.784 9.784 0 0 1-.08 1.264",key:"18rp1v"}]],gN=ue("shield-off",pN);/**
|
|
381
|
+
* @license lucide-react v0.511.0 - ISC
|
|
382
|
+
*
|
|
383
|
+
* This source code is licensed under the ISC license.
|
|
384
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
385
|
+
*/const yN=[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]],vy=ue("sparkles",yN);/**
|
|
386
|
+
* @license lucide-react v0.511.0 - ISC
|
|
387
|
+
*
|
|
388
|
+
* This source code is licensed under the ISC license.
|
|
389
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
390
|
+
*/const vN=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],hf=ue("square",vN);/**
|
|
391
|
+
* @license lucide-react v0.511.0 - ISC
|
|
392
|
+
*
|
|
393
|
+
* This source code is licensed under the ISC license.
|
|
394
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
395
|
+
*/const bN=[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]],by=ue("sun",bN);/**
|
|
396
|
+
* @license lucide-react v0.511.0 - ISC
|
|
397
|
+
*
|
|
398
|
+
* This source code is licensed under the ISC license.
|
|
399
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
400
|
+
*/const jN=[["path",{d:"M9 3H5a2 2 0 0 0-2 2v4m6-6h10a2 2 0 0 1 2 2v4M9 3v18m0 0h10a2 2 0 0 0 2-2V9M9 21H5a2 2 0 0 1-2-2V9m0 0h18",key:"gugj83"}]],NN=ue("table-2",jN);/**
|
|
401
|
+
* @license lucide-react v0.511.0 - ISC
|
|
402
|
+
*
|
|
403
|
+
* This source code is licensed under the ISC license.
|
|
404
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
405
|
+
*/const wN=[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]],Ul=ue("trash-2",wN);/**
|
|
406
|
+
* @license lucide-react v0.511.0 - ISC
|
|
407
|
+
*
|
|
408
|
+
* This source code is licensed under the ISC license.
|
|
409
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
410
|
+
*/const SN=[["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"}]],Ds=ue("triangle-alert",SN);/**
|
|
411
|
+
* @license lucide-react v0.511.0 - ISC
|
|
412
|
+
*
|
|
413
|
+
* This source code is licensed under the ISC license.
|
|
414
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
415
|
+
*/const kN=[["path",{d:"M9 14 4 9l5-5",key:"102s5s"}],["path",{d:"M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11",key:"f3b9sd"}]],TN=ue("undo-2",kN);/**
|
|
416
|
+
* @license lucide-react v0.511.0 - ISC
|
|
417
|
+
*
|
|
418
|
+
* This source code is licensed under the ISC license.
|
|
419
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
420
|
+
*/const CN=[["path",{d:"m19 5 3-3",key:"yk6iyv"}],["path",{d:"m2 22 3-3",key:"19mgm9"}],["path",{d:"M6.3 20.3a2.4 2.4 0 0 0 3.4 0L12 18l-6-6-2.3 2.3a2.4 2.4 0 0 0 0 3.4Z",key:"goz73y"}],["path",{d:"M7.5 13.5 10 11",key:"7xgeeb"}],["path",{d:"M10.5 16.5 13 14",key:"10btkg"}],["path",{d:"m12 6 6 6 2.3-2.3a2.4 2.4 0 0 0 0-3.4l-2.6-2.6a2.4 2.4 0 0 0-3.4 0Z",key:"1snsnr"}]],EN=ue("unplug",CN);/**
|
|
421
|
+
* @license lucide-react v0.511.0 - ISC
|
|
422
|
+
*
|
|
423
|
+
* This source code is licensed under the ISC license.
|
|
424
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
425
|
+
*/const zN=[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]],RN=ue("upload",zN);/**
|
|
426
|
+
* @license lucide-react v0.511.0 - ISC
|
|
427
|
+
*
|
|
428
|
+
* This source code is licensed under the ISC license.
|
|
429
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
430
|
+
*/const AN=[["path",{d:"m21.64 3.64-1.28-1.28a1.21 1.21 0 0 0-1.72 0L2.36 18.64a1.21 1.21 0 0 0 0 1.72l1.28 1.28a1.2 1.2 0 0 0 1.72 0L21.64 5.36a1.2 1.2 0 0 0 0-1.72",key:"ul74o6"}],["path",{d:"m14 7 3 3",key:"1r5n42"}],["path",{d:"M5 6v4",key:"ilb8ba"}],["path",{d:"M19 14v4",key:"blhpug"}],["path",{d:"M10 2v2",key:"7u0qdc"}],["path",{d:"M7 8H3",key:"zfb6yr"}],["path",{d:"M21 16h-4",key:"1cnmox"}],["path",{d:"M11 3H9",key:"1obp7u"}]],DN=ue("wand-sparkles",AN);/**
|
|
431
|
+
* @license lucide-react v0.511.0 - ISC
|
|
432
|
+
*
|
|
433
|
+
* This source code is licensed under the ISC license.
|
|
434
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
435
|
+
*/const _N=[["path",{d:"M18 16.98h-5.99c-1.1 0-1.95.94-2.48 1.9A4 4 0 0 1 2 17c.01-.7.2-1.4.57-2",key:"q3hayz"}],["path",{d:"m6 17 3.13-5.78c.53-.97.1-2.18-.5-3.1a4 4 0 1 1 6.89-4.06",key:"1go1hn"}],["path",{d:"m12 6 3.13 5.73C15.66 12.7 16.9 13 18 13a4 4 0 0 1 0 8",key:"qlwsc0"}]],Lo=ue("webhook",_N);/**
|
|
436
|
+
* @license lucide-react v0.511.0 - ISC
|
|
437
|
+
*
|
|
438
|
+
* This source code is licensed under the ISC license.
|
|
439
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
440
|
+
*/const MN=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Hs=ue("x",MN);function ie(...s){return s.filter(Boolean).join(" ")}const jy=g.createContext(null),ON={success:{icon:Dl,iconClass:"text-ok"},error:{icon:t2,iconClass:"text-bad"},warning:{icon:Ds,iconClass:"text-warn"},info:{icon:my,iconClass:"text-info"}},LN=6e3;let ig=0;function UN(){return ig+=1,`toast-${Date.now().toString(36)}-${ig}`}function HN({children:s}){const[o,c]=g.useState([]),u=g.useRef(new Map),d=m=>{const p=u.current.get(m);p&&clearTimeout(p),u.current.delete(m),c(b=>b.filter(j=>j.id!==m))},h=m=>{const p=UN(),b={id:p,title:m.title,description:m.description,tone:m.tone??"info"};c(y=>{const N=[...y,b];return N.length>5?N.slice(N.length-5):N});const j=setTimeout(()=>d(p),m.durationMs??LN);return u.current.set(p,j),p},x=g.useMemo(()=>({push:h,dismiss:d,success:(m,p)=>h({title:m,description:p,tone:"success"}),error:(m,p)=>h({title:m,description:p,tone:"error"}),warning:(m,p)=>h({title:m,description:p,tone:"warning"}),info:(m,p)=>h({title:m,description:p,tone:"info"})}),[]);return g.useEffect(()=>{const m=u.current;return()=>{for(const p of m.values())clearTimeout(p);m.clear()}},[]),a.jsxs(jy.Provider,{value:x,children:[s,a.jsx("div",{className:"pointer-events-none fixed inset-x-3 bottom-3 z-[70] flex flex-col items-end gap-2 sm:inset-x-auto sm:right-4 sm:bottom-4 sm:w-[380px]","aria-live":"polite","aria-atomic":"false",children:o.map(m=>{const{icon:p,iconClass:b}=ON[m.tone];return a.jsxs("div",{role:m.tone==="error"?"alert":"status",className:"toast-enter pointer-events-auto flex w-full items-start gap-3 rounded-md border border-line bg-raised px-3.5 py-3 shadow-pop",children:[a.jsx(p,{className:ie("mt-0.5 size-4 shrink-0",b),"aria-hidden":"true"}),a.jsxs("div",{className:"min-w-0 flex-1",children:[a.jsx("div",{className:"text-sm font-medium text-ink",children:m.title}),m.description&&a.jsx("div",{className:"mt-0.5 break-words text-xs text-muted",children:m.description})]}),a.jsx("button",{type:"button",onClick:()=>d(m.id),"aria-label":"Dismiss notification",className:"-mr-1 -mt-1 rounded-sm p-1 text-faint transition-colors hover:bg-inset hover:text-ink",children:a.jsx(Hs,{className:"size-3.5","aria-hidden":"true"})})]},m.id)})})]})}function Nt(){const s=g.useContext(jy);if(!s)throw new Error("useToast must be used inside ToastProvider");return s}const BN={primary:"bg-accent text-accent-ink border border-transparent hover:bg-accent-hover shadow-sm",secondary:"bg-raised text-ink border border-line hover:border-line-strong hover:bg-inset",ghost:"bg-transparent text-muted border border-transparent hover:text-ink hover:bg-inset",danger:"bg-bad text-white border border-transparent hover:opacity-90 shadow-sm",dangerGhost:"bg-bad-soft text-bad border border-transparent hover:border-bad/40 hover:bg-bad/15"},qN={sm:"h-8 px-3 text-xs gap-1.5 rounded-sm",md:"h-9 px-4 text-sm gap-2 rounded-md",lg:"h-10 px-5 text-sm gap-2 rounded-md"};function Ta(s="secondary",o="md",c){return ie("inline-flex select-none items-center justify-center whitespace-nowrap font-medium transition-colors duration-[var(--ez-motion-fast)] disabled:pointer-events-none disabled:opacity-50",BN[s],qN[o],c)}const ee=g.forwardRef(function({variant:o="secondary",size:c="md",loading:u=!1,icon:d,className:h,children:x,disabled:m,...p},b){return a.jsxs("button",{ref:b,type:"button",className:Ta(o,c,h),disabled:m||u,"aria-busy":u||void 0,...p,children:[u?a.jsx(sl,{className:"spin size-4","aria-hidden":"true"}):d,x]})}),at=g.forwardRef(function({label:o,variant:c="ghost",size:u="md",className:d,children:h,...x},m){return a.jsx("button",{ref:m,type:"button","aria-label":o,title:o,className:Ta(c,u==="sm"?"sm":"md",ie("!px-0",u==="sm"?"size-8":"size-9",d)),...x,children:h})}),$N={sm:"sm:max-w-sm",md:"sm:max-w-lg",lg:"sm:max-w-2xl",xl:"sm:max-w-4xl"},GN='a[href], button:not([disabled]), textarea:not([disabled]), input:not([disabled]), select:not([disabled]), [tabindex]:not([tabindex="-1"])';function yn({open:s,onClose:o,title:c,description:u,children:d,footer:h,size:x="md",preventClose:m=!1,bodyClassName:p}){const b=g.useId(),j=g.useId(),y=g.useRef(null),N=g.useRef(null),C=g.useRef(o);C.current=o;const B=g.useRef(m);return B.current=m,g.useEffect(()=>{if(!s)return;N.current=document.activeElement;const S=document.body.style.overflow;document.body.style.overflow="hidden";const T=window.setTimeout(()=>{const k=y.current;if(!k)return;(k.querySelector("[data-autofocus]")??k).focus()},0),A=k=>{if(k.key==="Escape"&&!B.current){k.stopPropagation(),C.current();return}if(k.key!=="Tab")return;const X=y.current;if(!X)return;const R=Array.from(X.querySelectorAll(GN)).filter(Q=>Q.offsetParent!==null);if(R.length===0){k.preventDefault(),X.focus();return}const M=R[0],ne=R[R.length-1],L=document.activeElement;k.shiftKey&&(L===M||L===X)?(k.preventDefault(),ne.focus()):!k.shiftKey&&L===ne&&(k.preventDefault(),M.focus())};return document.addEventListener("keydown",A,!0),()=>{window.clearTimeout(T),document.removeEventListener("keydown",A,!0),document.body.style.overflow=S,N.current?.focus()}},[s]),s?Ej.createPortal(a.jsx("div",{className:"fade-enter fixed inset-0 z-[60] flex items-end justify-center bg-[var(--ez-overlay)] p-0 backdrop-blur-[2px] sm:items-center sm:p-6",onMouseDown:S=>{S.target===S.currentTarget&&!m&&o()},children:a.jsxs("div",{ref:y,role:"dialog","aria-modal":"true","aria-labelledby":b,"aria-describedby":u?j:void 0,tabIndex:-1,className:ie("panel-enter flex max-h-[92vh] w-full flex-col overflow-hidden rounded-t-xl border border-line bg-surface shadow-pop outline-none sm:rounded-xl",$N[x]),children:[a.jsxs("div",{className:"flex items-start justify-between gap-4 border-b border-line px-5 py-4",children:[a.jsxs("div",{className:"min-w-0",children:[a.jsx("h2",{id:b,className:"text-base font-semibold text-ink",children:c}),u&&a.jsx("p",{id:j,className:"mt-1 text-sm text-muted",children:u})]}),a.jsx(at,{label:"Close",size:"sm",onClick:o,disabled:m,className:"-mr-1 -mt-1",children:a.jsx(Hs,{className:"size-4","aria-hidden":"true"})})]}),d&&a.jsx("div",{className:ie("min-h-0 flex-1 overflow-y-auto px-5 py-4",p),children:d}),h&&a.jsx("div",{className:"flex flex-wrap items-center justify-end gap-2 border-t border-line bg-raised/40 px-5 py-3",children:h})]})}),document.body):null}class Be extends Error{status;payload;constructor(o,c,u){super(u??YN(o,c)),this.name="ApiError",this.status=o,this.payload=c}get code(){const{error:o}=this.payload;if(typeof o=="string")return o;if(o&&typeof o=="object")return o.step}get blockedReason(){return this.status!==403?null:this.payload.reason??null}}function YN(s,o){const{error:c}=o;return typeof c=="string"&&c&&c!=="Forbidden"?c:c&&typeof c=="object"?c.cause||c.consequence||"The request failed.":s===403?"Request blocked by the dashboard.":s===401?"Your session ended. Please sign in again.":s===0?"Cannot reach the dashboard.":`Request failed (HTTP ${s}).`}function VN(s){if(s instanceof Be)return s;const o=s instanceof Error?s.message:"Something went wrong.";return new Be(0,{error:o})}function yt(s,o=[],c={}){const u=c.enabled??!0,d=g.useRef(s);d.current=s;const[h,x]=g.useState(0),[m,p]=g.useState({data:null,error:null,loading:u});g.useEffect(()=>{if(!u){p({data:null,error:null,loading:!1});return}const y=new AbortController;return p(N=>({...N,loading:!0,error:null})),d.current(y.signal).then(N=>{y.signal.aborted||p({data:N,error:null,loading:!1})}).catch(N=>{y.signal.aborted||N?.name!=="AbortError"&&p(C=>({...C,error:VN(N),loading:!1}))}),()=>y.abort()},[...o,u,h]);const b=g.useCallback(()=>x(y=>y+1),[]),j=g.useCallback(y=>{p(N=>({...N,data:typeof y=="function"?y(N.data):y}))},[]);return{data:m.data,error:m.error,loading:m.loading,reload:b,setData:j}}function Ml(s,o,c=!0){const u=g.useRef(s);u.current=s,g.useEffect(()=>{if(!c)return;const d=setInterval(()=>u.current(),o);return()=>clearInterval(d)},[o,c])}function Hl(s){const o=g.useRef(s);o.current=s,g.useEffect(()=>{const c=()=>{document.visibilityState==="visible"&&o.current()};return document.addEventListener("visibilitychange",c),()=>document.removeEventListener("visibilitychange",c)},[])}function Vn(s){g.useEffect(()=>{document.title=s?`${s} · Easy DevOps`:"Easy DevOps"},[s])}let Qd=null;function rg(s){Qd=s}function bn(){return g.useCallback(s=>Qd?Qd(s):Promise.resolve(!1),[])}function XN({children:s}){const[o,c]=g.useState(null),u=g.useRef(null),d=g.useCallback(m=>(u.current?.resolve(!1),new Promise(p=>{u.current={resolve:p},c(m)})),[]);g.useEffect(()=>(rg(d),()=>rg(null)),[d]);const h=g.useCallback(m=>{c(null);const p=u.current;u.current=null,p?.resolve(m)},[]),x=o?.tone==="danger";return a.jsxs(a.Fragment,{children:[s,a.jsx(yn,{open:o!==null,onClose:()=>h(!1),title:o?.title??"",size:"sm",bodyClassName:"px-5 py-4",footer:a.jsxs(a.Fragment,{children:[a.jsx(ee,{variant:"ghost",onClick:()=>h(!1),"data-autofocus":!0,children:o?.cancelLabel??"Cancel"}),a.jsx(ee,{variant:x?"danger":"primary",onClick:()=>h(!0),children:o?.confirmLabel??"Confirm"})]}),children:a.jsx("div",{className:"text-sm text-muted",children:o?.body})})]})}const QN="modulepreload",ZN=function(s,o){return new URL(s,o).href},og={},KN=function(o,c,u){let d=Promise.resolve();if(c&&c.length>0){let x=function(j){return Promise.all(j.map(y=>Promise.resolve(y).then(N=>({status:"fulfilled",value:N}),N=>({status:"rejected",reason:N}))))};const m=document.getElementsByTagName("link"),p=document.querySelector("meta[property=csp-nonce]"),b=p?.nonce||p?.getAttribute("nonce");d=x(c.map(j=>{if(j=ZN(j,u),j in og)return;og[j]=!0;const y=j.endsWith(".css"),N=y?'[rel="stylesheet"]':"";if(!!u)for(let S=m.length-1;S>=0;S--){const T=m[S];if(T.href===j&&(!y||T.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${j}"]${N}`))return;const B=document.createElement("link");if(B.rel=y?"stylesheet":QN,y||(B.as="script"),B.crossOrigin="",B.href=j,b&&B.setAttribute("nonce",b),document.head.appendChild(B),y)return new Promise((S,T)=>{B.addEventListener("load",S),B.addEventListener("error",()=>T(new Error(`Unable to preload CSS for ${j}`)))})}))}function h(x){const m=new Event("vite:preloadError",{cancelable:!0});if(m.payload=x,window.dispatchEvent(m),!m.defaultPrevented)throw x}return d.then(x=>{for(const m of x||[])m.status==="rejected"&&h(m.reason);return o().catch(h)})},JN="/api",PN=new Set(["POST","PUT","PATCH","DELETE"]),FN=!1,IN="Your session ended. Please sign in again.",Zd=new Set,Kd=new Set;function WN(s){return Zd.add(s),()=>Zd.delete(s)}function ew(s){return Kd.add(s),()=>Kd.delete(s)}function tw(s){if(!s)return"";const o=new URLSearchParams;for(const[u,d]of Object.entries(s))d!=null&&o.set(u,String(d));const c=o.toString();return c?`?${c}`:""}async function nw(s){const o=await s.text();if(!o)return{};try{const c=JSON.parse(o);return c&&typeof c=="object"?c:{error:String(c)}}catch{return{error:o.replace(/<[^>]+>/g," ").replace(/\s+/g," ").trim().slice(0,240)}}}async function he(s,o={}){const c=o.method??"GET",u={Accept:"application/json"};let d;o.body!==void 0&&(u["Content-Type"]="application/json",d=JSON.stringify(o.body)),PN.has(c)&&(u["X-EZ-Request"]="1");let h;try{h=await fetch(`${JN}${s}${tw(o.query)}`,{method:c,headers:u,body:d,credentials:"same-origin",signal:o.signal})}catch(m){throw m?.name==="AbortError"?m:new Be(0,{error:"Cannot reach the dashboard."})}if(h.status===204)return;if(!h.ok){const m=await nw(h),p=new Be(h.status,m);if(!o.skipAuthEvents){if(h.status===401)for(const b of Zd)b(IN);else if(h.status===403)for(const b of Kd)b(p)}throw p}const x=await h.text();if(x)return JSON.parse(x)}function Ye(s){return encodeURIComponent(s)}const oe={auth:{status:s=>he("/auth",{signal:s}),login:s=>he("/login",{method:"POST",body:{password:s},skipAuthEvents:!0}),setup:s=>he("/setup",{method:"POST",body:s,skipAuthEvents:!0}),logout:()=>he("/logout",{method:"POST"})},domains:{list:s=>he("/domains",{signal:s}),create:s=>he("/domains",{method:"POST",body:s}),update:(s,o)=>he(`/domains/${Ye(s)}`,{method:"PUT",body:o}),remove:(s,o)=>he(`/domains/${Ye(s)}`,{method:"DELETE",query:{deleteCert:o}}),toggle:s=>he(`/domains/${Ye(s)}/toggle`,{method:"PUT"}),reload:s=>he(`/domains/${Ye(s)}/reload`,{method:"POST"}),notifications:(s,o)=>he(`/domains/${Ye(s)}/notifications`,{signal:o}),saveNotifications:(s,o)=>he(`/domains/${Ye(s)}/notifications`,{method:"PUT",body:o})},ssl:{list:s=>he("/ssl",{signal:s}),create:s=>he("/ssl/create",{method:"POST",body:s}),confirmDns:s=>he("/ssl/create-confirm",{method:"POST",body:{domain:s}}),cancelDns:s=>he("/ssl/create-cancel",{method:"POST",body:{domain:s}}),renew:s=>he(`/ssl/renew/${Ye(s)}`,{method:"POST"}),renewAll:()=>he("/ssl/renew-all",{method:"POST"}),remove:s=>he(`/ssl/${Ye(s)}`,{method:"DELETE"})},nginx:{status:s=>he("/nginx/status",{signal:s}),reload:()=>he("/nginx/reload",{method:"POST"}),restart:()=>he("/nginx/restart",{method:"POST"}),start:()=>he("/nginx/start",{method:"POST"}),stop:()=>he("/nginx/stop",{method:"POST"}),test:()=>he("/nginx/test",{method:"POST"}),configs:s=>he("/nginx/configs",{signal:s}),getConfig:(s,o)=>he(`/nginx/config/${Ye(s)}`,{signal:o}),saveConfig:(s,o)=>he(`/nginx/config/${Ye(s)}`,{method:"POST",body:{content:o}}),logs:s=>he("/nginx/logs",{signal:s})},processes:{list:s=>he("/processes",{signal:s}),action:(s,o)=>he(`/processes/${Ye(s)}/${o}`,{method:"POST"}),logs:(s,o=200,c)=>he(`/processes/${Ye(s)}/logs`,{signal:c,query:{lines:o}})},deployments:{list:s=>he("/deployments",{signal:s}),get:(s,o)=>he(`/deployments/${Ye(s)}`,{signal:o}),create:s=>he("/deployments",{method:"POST",body:s}),update:(s,o)=>he(`/deployments/${Ye(s)}`,{method:"PUT",body:o}),remove:(s,o={})=>he(`/deployments/${Ye(s)}`,{method:"DELETE",query:{deleteDomain:o.deleteDomain?1:void 0,purgeData:o.purgeData?1:void 0}}),linkDomain:(s,o,c=!1)=>he(`/deployments/${Ye(s)}/domain`,{method:"PUT",body:{domain:o,ssl:c}}),unlinkDomain:s=>he(`/deployments/${Ye(s)}/domain`,{method:"DELETE"}),move:(s,o)=>he(`/deployments/${Ye(s)}/move`,{method:"POST",body:{path:o}}),deploy:(s,o)=>he(`/deployments/${Ye(s)}/deploy`,{method:"POST",body:o?{ref:o}:{}}),rollback:(s,o)=>he(`/deployments/${Ye(s)}/rollback`,{method:"POST",body:o?{releaseId:o}:{}}),removeRelease:(s,o)=>he(`/deployments/${Ye(s)}/releases/${Ye(o)}`,{method:"DELETE"}),run:(s,o,c)=>he(`/deployments/${Ye(s)}/runs/${Ye(o)}`,{signal:c}),issueHookToken:s=>he(`/deployments/${Ye(s)}/hook-token`,{method:"POST"}),revokeHookToken:s=>he(`/deployments/${Ye(s)}/hook-token`,{method:"DELETE"}),generateDeployKey:s=>he(`/deployments/${Ye(s)}/deploy-key`,{method:"POST"}),github:(s,o)=>he(`/deployments/${Ye(s)}/github`,{signal:o}),applyGithub:(s,o)=>he(`/deployments/${Ye(s)}/github/apply`,{method:"POST",body:o}),hook:s=>he("/deployments/hook",{signal:s}),updateHook:s=>he("/deployments/hook",{method:"PUT",body:s})},service:{status:s=>he("/service",{signal:s}),start:()=>he("/service/start",{method:"POST"}),stop:()=>he("/service/stop",{method:"POST"}),restart:()=>he("/service/restart",{method:"POST"})},settings:{get:s=>he("/settings",{signal:s}),update:s=>he("/settings",{method:"POST",body:s}),permissions:s=>he("/settings/permissions",{signal:s}),setupPermissions:s=>he("/settings/permissions/setup",{method:"POST",body:{password:s},skipAuthEvents:!0}),backup:s=>he("/settings/backup",{signal:s}),restore:s=>he("/settings/restore",{method:"POST",body:s}),channels:{list:s=>he("/settings/channels",{signal:s}),create:s=>he("/settings/channels",{method:"POST",body:s}),update:(s,o)=>he(`/settings/channels/${Ye(s)}`,{method:"PUT",body:o}),remove:s=>he(`/settings/channels/${Ye(s)}`,{method:"DELETE"}),test:s=>he(`/settings/channels/${Ye(s)}/test`,{method:"POST"})}},hub:{status:s=>he("/hub/status",{signal:s}),connect:s=>he("/hub/connect",{method:"POST",body:{connectionString:s}}),unlink:()=>he("/hub/link",{method:"DELETE"}),updatePermissions:s=>he("/hub/permissions",{method:"PUT",body:s})}},Ny=g.createContext(null);function aw(s){if(s instanceof Be)return s;const o=s instanceof Error?s.message:"Cannot reach the dashboard.";return new Be(0,{error:o})}function lw({children:s}){const[o,c]=g.useState("loading"),[u,d]=g.useState(null),[h,x]=g.useState(null),[m,p]=g.useState(null),[b,j]=g.useState(null),y=g.useRef("loading");y.current=o;const N=g.useCallback(M=>{d(M),x(null),c(M.authenticated?"authenticated":"unauthenticated")},[]),C=g.useCallback(async()=>{c("loading");try{N(await oe.auth.status())}catch(M){x(aw(M)),c("error")}},[N]);g.useEffect(()=>{C()},[C]);const B=g.useCallback(M=>{p(M??"Your session ended. Please sign in again."),j(null),d(ne=>ne&&{...ne,authenticated:!1}),c("unauthenticated")},[]);g.useEffect(()=>{const M=WN(L=>{y.current==="authenticated"&&B(L)}),ne=ew(L=>j(L));return()=>{M(),ne()}},[B]);const S=g.useCallback(async()=>{try{N(await oe.auth.status())}catch{d(M=>M&&{...M,authenticated:!0}),c("authenticated")}p(null),j(null)},[N]),T=g.useCallback(async M=>{await oe.auth.login(M),await S()},[S]),A=g.useCallback(async M=>{await oe.auth.setup(M),await S()},[S]),k=g.useCallback(async()=>{try{await oe.auth.logout()}catch{}d(M=>M&&{...M,authenticated:!1}),p(null),j(null),c("unauthenticated")},[]),X=g.useCallback(()=>j(null),[]),R=g.useMemo(()=>({phase:o,auth:u,bootError:h,sessionMessage:m,blocked:b,login:T,setup:A,logout:k,retryBoot:C,dismissBlocked:X,reportUnauthorized:B}),[o,u,h,m,b,T,A,k,C,X,B]);return a.jsx(Ny.Provider,{value:R,children:s})}function Xn(){const s=g.useContext(Ny);if(!s)throw new Error("useAuth must be used inside AuthProvider");return s}const cg=50,wy=g.createContext(null);function sw({children:s}){const{phase:o,reportUnauthorized:c}=Xn(),u=o==="authenticated",[d,h]=g.useState(null),[x,m]=g.useState(!1),[p,b]=g.useState(null),[j,y]=g.useState(null),[N,C]=g.useState(null),[B,S]=g.useState([]),[T,A]=g.useState(0),[k,X]=g.useState(null),[R,M]=g.useState(0),ne=g.useCallback(()=>A(0),[]),L=g.useCallback(()=>{S([]),A(0)},[]);g.useEffect(()=>{if(!u){h(null),m(!1),b(null),y(null),C(null),S([]),A(0),X(null);return}let ce=!1,P=null;const ae=()=>{m(!0),b(null)},O=()=>m(!1),D=Y=>{m(!1);const re=Y.data;if(Y.message==="UNAUTHORIZED"||re?.reason==="unauthorized"){c();return}if(Y.message==="FORBIDDEN"||re?.reason){b(re?.detail??"Live updates were blocked by the dashboard.");return}b("Live updates are unavailable. Data still refreshes on the page.")},le=Y=>y(Y),F=Y=>C(Y),te=Y=>{S(re=>{const Se=re.filter(Ve=>Ve.id!==Y.id),ke=[Y,...Se];return ke.length>cg?ke.slice(0,cg):ke}),A(re=>Math.min(re+1,99))},de=Y=>{X(Y),M(re=>re+1)};return(async()=>{try{if(!FN){const{createRealtimeClient:Y}=await KN(async()=>{const{createRealtimeClient:re}=await import("./socket-DwLPrgsr.js");return{createRealtimeClient:re}},[],import.meta.url);P=Y()}if(ce){P.disconnect();return}P.on("connect",ae),P.on("disconnect",O),P.on("connect_error",D),P.on("nginx:status",le),P.on("domain:health",F),P.on("notification:new",te),P.on("local:changed",de),h(P),P.connect()}catch{ce||b("Could not start the live connection.")}})(),()=>{ce=!0,P&&(P.off("connect",ae),P.off("disconnect",O),P.off("connect_error",D),P.off("nginx:status",le),P.off("domain:health",F),P.off("notification:new",te),P.off("local:changed",de),P.disconnect()),m(!1)}},[u,c]);const Q=g.useMemo(()=>({client:d,connected:x,connectionError:p,nginxStatus:j,domainHealth:N,notifications:B,unread:T,markAllRead:ne,clearNotifications:L,lastChange:k,changeSeq:R}),[d,x,p,j,N,B,T,ne,L,k,R]);return a.jsx(wy.Provider,{value:Q,children:s})}function ra(){const s=g.useContext(wy);if(!s)throw new Error("useRealtime must be used inside RealtimeProvider");return s}const Sy=g.createContext(null);function iw({children:s}){const{phase:o}=Xn(),c=o==="authenticated",{client:u,connected:d}=ra(),h=yt(T=>oe.service.status(T),[c],{enabled:c}),{setData:x,reload:m}=h;Ml(m,6e4,c);const p=g.useCallback(T=>{x(A=>A&&{...A,backgroundService:{...A.backgroundService,...T}})},[x]),b=g.useRef(null),j=g.useRef(!1),y=g.useRef(!1);y.current=h.loading;const N=g.useCallback(()=>{b.current&&clearTimeout(b.current),b.current=setTimeout(()=>{if(b.current=null,y.current){j.current=!0;return}m()},250)},[m]);g.useEffect(()=>{!h.loading&&j.current&&(j.current=!1,m())},[h.loading,m]),g.useEffect(()=>()=>{b.current&&clearTimeout(b.current)},[]),g.useEffect(()=>{if(!c||!u)return;const T=A=>{p(A),N()};return u.on("service:changed",T),()=>u.off("service:changed",T)},[c,u,p,N]);const C=g.useRef(!1),B=g.useRef(!1);g.useEffect(()=>{if(!c){C.current=!1,B.current=!1;return}d&&!C.current&&(B.current&&N(),B.current=!0),C.current=d},[c,d,N]);const S=g.useMemo(()=>({service:h.data,loading:h.loading,error:h.error,reload:h.reload,applyBackgroundService:p}),[h.data,h.loading,h.error,h.reload,p]);return a.jsx(Sy.Provider,{value:S,children:s})}function Ji(){const s=g.useContext(Sy);if(!s)throw new Error("useService must be used inside ServiceProvider");return s}const ky=[{label:"Manage",items:[{to:"/",label:"Overview",title:"Overview",description:"The state of nginx, your domains and their certificates at a glance.",icon:z2},{to:"/domains",label:"Domains",title:"Domains",description:"Reverse-proxy hosts, their backends and their nginx configuration.",icon:_l},{to:"/ssl",label:"SSL certificates",title:"SSL certificates",description:"Issue and renew Let’s Encrypt certificates for your domains.",icon:Ea},{to:"/nginx",label:"Nginx",title:"Nginx",description:"Service status, configuration files and live logs.",icon:Us},{to:"/deployments",label:"Deployments",title:"Deployments",description:"Put a project from a git repository on this server and keep it deployed.",icon:qi}]},{label:"Monitor",items:[{to:"/notifications",label:"Notifications",title:"Notifications",description:"Delivery channels, test messages and recent events.",icon:of},{to:"/processes",label:"Processes",title:"Processes",description:"The Easy DevOps background service and your own PM2 apps.",icon:fy},{to:"/logs",label:"Logs",title:"Logs",description:"nginx access and error output as it is written.",icon:$i}]},{label:"System",items:[{to:"/settings",label:"Settings",title:"Settings",description:"Access, authentication, Hub pairing and backup.",icon:hN}]}],rw=ky.flatMap(s=>s.items);function Ty(s){return rw.find(o=>o.to==="/"?s==="/":s===o.to||s.startsWith(`${o.to}/`))}function Cy({className:s}){return a.jsxs("span",{className:ie("inline-flex shrink-0 items-center",s),"aria-hidden":"true",children:[a.jsx("img",{src:"/brand/mark-dark.png",alt:"",className:"brand-logo-dark h-full w-auto"}),a.jsx("img",{src:"/brand/mark-light.png",alt:"",className:"brand-logo-light h-full w-auto"})]})}const ow=new Intl.DateTimeFormat(void 0,{day:"numeric",month:"short",year:"numeric"}),cw=new Intl.DateTimeFormat(void 0,{day:"numeric",month:"short",hour:"2-digit",minute:"2-digit"});function Ey(s){if(s==null||s==="")return"—";const o=typeof s=="number"?new Date(s):new Date(s);return Number.isNaN(o.getTime())?"—":ow.format(o)}function mf(s){if(s==null||s==="")return"—";const o=typeof s=="number"?new Date(s):new Date(s);return Number.isNaN(o.getTime())?"—":cw.format(o)}function Pi(s){const o=Math.max(0,Math.round((Date.now()-s)/1e3));if(o<10)return"just now";if(o<60)return`${o}s ago`;const c=Math.floor(o/60);if(c<60)return`${c}m ago`;const u=Math.floor(c/60);return u<24?`${u}h ago`:`${Math.floor(u/24)}d ago`}function zy(s){if(s==null)return"—";if(s<1024)return`${s} B`;const o=["KB","MB","GB","TB"];let c=s/1024,u=0;for(;c>=1024&&u<o.length-1;)c/=1024,u+=1;return`${c.toFixed(c<10?1:0)} ${o[u]}`}function Xo(s){if(s==null||s<0)return"—";const o=Math.floor(s/6e4);if(o<1)return"<1m";if(o<60)return`${o}m`;const c=Math.floor(o/60);return c<24?`${c}h ${o%60}m`:`${Math.floor(c/24)}d ${c%24}h`}function _s(s){return s===null?"Unknown":s<0?`Expired ${Math.abs(s)} day${Math.abs(s)===1?"":"s"} ago`:s===0?"Expires today":`${s} day${s===1?"":"s"} left`}function uw(s){return s==null?"—":`${s.toFixed(1)}%`}function _n(s,o,c=`${o}s`){return`${s} ${s===1?o:c}`}function dw(s,o=48){if(s.length<=o)return s;const c=Math.ceil((o-1)/2),u=Math.floor((o-1)/2);return`${s.slice(0,c)}…${s.slice(-u)}`}const fw={personal:"Personal","windows-service":"Windows service",systemd:"systemd",unknown:"Unknown"},hw={personal:"Startup supervisor · runs as you, starts at logon","windows-service":"WinSW service · NT SERVICE\\EasyDevOps",systemd:"systemd unit · starts at boot",unknown:"Not reported by this API"},mw={personal:"No administrator needed — run it in a normal PowerShell. Personal mode starts at logon and stops when you sign out.","windows-service":"Run it in an Administrator PowerShell. It creates a Windows service that runs as NT SERVICE\\EasyDevOps and never asks for an account password.",systemd:"Run it once with sudo; the unit then starts at boot.",unknown:"Run it in a terminal with the rights your platform requires."};function xw(s){switch(s.backgroundService.mechanism){case"startup-supervisor":return"personal";case"winsw":return"windows-service";case"systemd":return"systemd";default:return"unknown"}}function pw(s){return s==="logon"?"At logon":s==="boot"?"At boot":"Unknown"}function gw(s){return s.jobsRunningHere?"This dashboard":s.jobsOwnerRole==="daemon"?"Background service":s.jobsOwnerRole==="dashboard"?"Another dashboard process":s.running?"Background service":"Paused — no owner"}function Fi(s){if(!s)return null;const o=s.backgroundService,c=xw(s),u=o.startsAt==="logon"||o.startsAt==="boot"?o.startsAt:"unknown",d=o.runtime??null,h=o.stoppedAt??null,x=Array.from(new Set([...o.warnings??[],...d?.warnings??[]]));return{running:o.running,connected:o.connected,jobsRunningHere:o.jobsRunningHere,jobsOwnerLabel:gw(o),pid:o.pid,version:o.version,startedAt:o.startedAt,uptimeMs:o.startedAt?Math.max(0,Date.now()-o.startedAt):null,heartbeatAgeMs:o.heartbeatAgeMs??null,mechanism:c,mechanismLabel:fw[c],mechanismDetail:hw[c],startsAt:u,startsAtLabel:pw(u),installed:o.installed===!0,stoppedByUser:o.stoppedByUser===!0,stoppedAt:h,stoppedAtLabel:h?mf(h):null,state:o.state??null,detail:o.detail??null,enabledOnBoot:o.enabledOnBoot??null,restarts:o.restarts??0,crashLooping:o.crashLooping===!0,dataDir:o.dataDir,installCommand:s.install.command,installGuidance:mw[c],runtime:d,warnings:x}}function Uo(s){return s?s.running?"Running":s.stoppedByUser?"Stopped by you":s.installed?"Not running":"Not installed":"Unknown"}function yw(s){if(!s)return null;const o=s.pinned,c=o?.version??null,u=s.systemNode.version??null,d=!!(o&&o.kind!=="none"&&o.exists!==!1),h=d&&!!(c&&u)&&c===u&&!o?.differsFromSystem;return{serviceVersion:c,servicePath:o?.path??null,systemVersion:u,systemPath:s.systemNode.path??null,sameAsSystem:h,broken:o?.broken===!0,pinned:d,kind:o?.kind??null,manager:s.manager?.managed?s.manager.manager??null:null}}const vw={neutral:"bg-inset text-muted",accent:"bg-accent-soft text-accent-text",ok:"bg-ok-soft text-ok",warn:"bg-warn-soft text-warn",bad:"bg-bad-soft text-bad",info:"bg-info-soft text-info"},Ry={neutral:"bg-faint",accent:"bg-accent",ok:"bg-ok",warn:"bg-warn",bad:"bg-bad",info:"bg-info"};function ve({tone:s="neutral",children:o,className:c,dot:u=!1}){return a.jsxs("span",{className:ie("inline-flex items-center gap-1.5 rounded-pill px-2 py-0.5 text-2xs font-medium tracking-wide",vw[s],c),children:[u&&a.jsx("span",{className:ie("size-1.5 rounded-full",Ry[s]),"aria-hidden":"true"}),o]})}function Zt({tone:s="ok",pulse:o=!1,className:c}){return a.jsx("span",{className:ie("inline-block size-2 shrink-0 rounded-full",Ry[s],o&&"live-dot",c),"aria-hidden":"true"})}const bw='a[href], button:not([disabled]), textarea:not([disabled]), input:not([disabled]), select:not([disabled]), [tabindex]:not([tabindex="-1"])';function ug({onNavigate:s}){const{service:o}=Ji(),c=Fi(o),u=c?c.running?{tone:"ok",label:"Service running"}:c.stoppedByUser?{tone:"warn",label:"Service stopped by you"}:{tone:"warn",label:"Service stopped"}:{tone:"neutral",label:"Checking service…"};return a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:ie("flex h-[var(--ez-topbar-height)] shrink-0 items-center gap-2.5 border-b border-line px-4",s&&"pr-12"),children:[a.jsx(Cy,{className:"h-5"}),a.jsxs("div",{className:"min-w-0",children:[a.jsx("div",{className:"truncate text-sm font-semibold tracking-tight text-ink",children:"Easy DevOps"}),a.jsx("div",{className:"text-2xs text-faint",children:"Server control plane"})]})]}),a.jsx("nav",{"aria-label":"Main navigation",className:"flex-1 overflow-y-auto px-3 py-4",children:ky.map((d,h)=>a.jsxs("div",{className:ie(h>0&&"mt-5"),children:[a.jsx("div",{className:"mb-1.5 px-2 text-2xs font-semibold uppercase tracking-[0.14em] text-faint",children:d.label}),a.jsx("div",{className:"space-y-0.5",children:d.items.map(x=>{const m=x.icon;return a.jsx(iy,{to:x.to,end:x.to==="/",onClick:s,className:({isActive:p})=>ie("group relative flex items-center gap-2.5 rounded-md px-2.5 py-2 text-[13px] font-medium transition-colors duration-[var(--ez-motion-fast)]",p?"bg-accent-soft text-ink":"text-muted hover:bg-inset hover:text-ink"),children:({isActive:p})=>a.jsxs(a.Fragment,{children:[a.jsx("span",{className:ie("absolute left-0 top-1/2 h-4 w-0.5 -translate-y-1/2 rounded-pill bg-accent transition-opacity duration-[var(--ez-motion-fast)]",p?"opacity-100":"opacity-0"),"aria-hidden":"true"}),a.jsx(m,{className:ie("size-4 shrink-0 transition-colors",p?"text-accent-text":"text-faint group-hover:text-muted"),"aria-hidden":"true"}),x.label]})},x.to)})})]},d.label))}),a.jsx("div",{className:"border-t border-line p-3",children:a.jsxs(bt,{to:"/processes",onClick:s,className:"flex items-center gap-2.5 rounded-md border border-line bg-raised/60 px-2.5 py-2 transition-colors hover:border-line-strong hover:bg-inset","aria-label":`Background service: ${u.label}. Open Processes.`,children:[a.jsx(Zt,{tone:u.tone,pulse:u.tone==="ok"}),a.jsxs("div",{className:"min-w-0",children:[a.jsx("div",{className:"text-2xs font-medium text-ink",children:"Background service"}),a.jsx("div",{className:"truncate text-2xs text-faint",children:u.label})]})]})})]})}function jw({open:s,onClose:o}){const c=g.useRef(null),u=g.useRef(null);return g.useEffect(()=>{if(!s)return;const d=document.activeElement,h=document.body.style.overflow;document.body.style.overflow="hidden";const x=window.setTimeout(()=>u.current?.focus(),0),m=p=>{if(p.key==="Escape"){p.preventDefault(),o();return}if(p.key!=="Tab")return;const b=c.current;if(!b)return;const j=Array.from(b.querySelectorAll(bw)).filter(B=>B.offsetParent!==null);if(j.length===0)return;const y=j[0],N=j[j.length-1],C=document.activeElement;p.shiftKey&&(C===y||C===b)?(p.preventDefault(),N.focus()):!p.shiftKey&&C===N&&(p.preventDefault(),y.focus())};return document.addEventListener("keydown",m,!0),()=>{window.clearTimeout(x),document.removeEventListener("keydown",m,!0),document.body.style.overflow=h,d?.focus()}},[s,o]),a.jsxs(a.Fragment,{children:[a.jsx("aside",{className:"hidden w-[var(--ez-sidebar-width)] shrink-0 flex-col border-r border-line bg-surface lg:flex",children:a.jsx(ug,{})}),s&&a.jsxs("div",{className:"fixed inset-0 z-50 lg:hidden",children:[a.jsx("div",{className:"fade-enter absolute inset-0 bg-[var(--ez-overlay)] backdrop-blur-[1px]",onClick:o,"aria-hidden":"true"}),a.jsxs("aside",{ref:c,role:"dialog","aria-modal":"true","aria-label":"Main navigation",tabIndex:-1,className:"drawer-enter absolute inset-y-0 left-0 flex w-[276px] flex-col border-r border-line bg-surface shadow-pop outline-none",children:[a.jsx(at,{ref:u,label:"Close navigation",size:"sm",onClick:o,className:"absolute right-2 top-2 z-10",children:a.jsx(Hs,{className:"size-4","aria-hidden":"true"})}),a.jsx(ug,{onNavigate:o})]})]})]})}function Nw(s){return s.type==="nginx_down"?Us:s.type==="cert_expiry"?Ra:s.type==="domain_health"?Oo:s.type==="deploy"?qi:vy}function ww(s){return s==="danger"?"text-bad":s==="warning"?"text-warn":s==="success"?"text-ok":s==="info"?"text-info":"text-muted"}function Sw(){const{notifications:s,unread:o,markAllRead:c,clearNotifications:u}=ra(),[d,h]=g.useState(!1),[,x]=g.useState(0),m=g.useRef(null),p=g.useRef(null);g.useEffect(()=>{if(!d)return;c();const j=N=>{m.current&&!m.current.contains(N.target)&&h(!1)},y=N=>{N.key==="Escape"&&(h(!1),p.current?.focus())};return document.addEventListener("pointerdown",j),document.addEventListener("keydown",y),()=>{document.removeEventListener("pointerdown",j),document.removeEventListener("keydown",y)}},[d,c]),g.useEffect(()=>{d&&c()},[d,s.length,c]),g.useEffect(()=>{if(!d)return;const j=setInterval(()=>x(y=>y+1),3e4);return()=>clearInterval(j)},[d]);const b=o>0?`Notifications, ${o} unread`:"Notifications";return a.jsxs("div",{ref:m,className:"sm:relative",children:[a.jsxs("div",{className:"relative",children:[a.jsx(at,{ref:p,label:b,onClick:()=>h(j=>!j),"aria-expanded":d,"aria-haspopup":"dialog","aria-controls":"notifications-panel",className:ie(d&&"bg-inset text-ink"),children:a.jsx(of,{className:"size-4.5","aria-hidden":"true"})}),o>0&&a.jsx("span",{className:"pointer-events-none absolute -right-0.5 -top-0.5 flex h-4 min-w-4 items-center justify-center rounded-pill bg-accent px-1 text-[10px] font-semibold leading-none text-accent-ink","aria-hidden":"true",children:o>9?"9+":o})]}),d&&a.jsxs("div",{id:"notifications-panel",role:"dialog","aria-label":"Notifications",className:"panel-enter absolute right-3 top-[calc(100%+10px)] z-50 w-[min(92vw,360px)] overflow-hidden rounded-lg border border-line bg-surface shadow-pop sm:right-0",children:[a.jsxs("div",{className:"flex items-center justify-between border-b border-line px-4 py-2.5",children:[a.jsx("span",{className:"text-sm font-semibold text-ink",children:"Notifications"}),s.length>0&&a.jsx("button",{type:"button",onClick:u,className:"text-2xs text-muted transition-colors hover:text-ink",children:"Clear all"})]}),a.jsx("div",{className:"max-h-[min(60vh,320px)] overflow-y-auto",children:s.length===0?a.jsxs("div",{className:"flex flex-col items-center gap-2 px-4 py-8 text-center",children:[a.jsx(Yj,{className:"size-5 text-faint","aria-hidden":"true"}),a.jsx("div",{className:"text-xs text-muted",children:"All clear — no notifications yet."})]}):s.map(j=>{const y=Nw(j);return a.jsxs("div",{className:"flex items-start gap-2.5 border-b border-line/70 px-4 py-2.5 last:border-0",children:[a.jsx(y,{className:ie("mt-0.5 size-4 shrink-0",ww(j.severity)),"aria-hidden":"true"}),a.jsxs("div",{className:"min-w-0 flex-1",children:[a.jsx("div",{className:"text-xs leading-snug text-ink",children:j.message}),a.jsx("div",{className:"mt-0.5 text-2xs text-faint",children:Pi(j.timestamp)})]})]},j.id)})}),a.jsx("div",{className:"border-t border-line bg-raised/50 px-4 py-2",children:a.jsx(bt,{to:"/notifications",onClick:()=>h(!1),className:"text-2xs font-medium text-muted transition-colors hover:text-ink",children:"Open notification settings"})})]})]})}function kw({onMenu:s}){const{pathname:o}=vn(),{theme:c,toggleTheme:u}=uy(),{nginxStatus:d,connected:h,connectionError:x}=ra(),{logout:m}=Xn(),p=Nt(),[b,j]=g.useState(!1),y=Ty(o)?.title??"Easy DevOps",N=d?.running===!0,C=d===null?"Unknown":N?"Running":"Stopped",B=async()=>{if(!b){j(!0);try{await m(),p.success("Signed out","Your dashboard session has ended.")}finally{j(!1)}}};return a.jsxs("header",{className:"sticky top-0 z-30 flex h-[var(--ez-topbar-height)] shrink-0 items-center justify-between gap-3 border-b border-line bg-canvas/85 px-3 backdrop-blur sm:px-5",children:[a.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[a.jsx(at,{label:"Open navigation",size:"sm",onClick:s,className:"lg:hidden",children:a.jsx($2,{className:"size-4.5","aria-hidden":"true"})}),a.jsx("div",{className:"truncate text-sm font-semibold text-ink",children:y})]}),a.jsxs("div",{className:"flex shrink-0 items-center gap-1 sm:gap-1.5",children:[a.jsxs(bt,{to:"/nginx","aria-label":`Nginx is ${C.toLowerCase()}. Open Nginx.`,className:"hidden items-center gap-1.5 rounded-pill border border-line bg-raised px-2.5 py-1 text-2xs transition-colors hover:border-line-strong hover:bg-inset sm:inline-flex",children:[a.jsx(Zt,{tone:d===null?"neutral":N?"ok":"bad",pulse:N&&h}),a.jsx("span",{className:"font-medium text-ink",children:"nginx"}),a.jsx("span",{className:"text-faint",children:C})]}),a.jsx(bt,{to:"/nginx","aria-label":`Nginx is ${C.toLowerCase()}. Open Nginx.`,className:"flex size-9 items-center justify-center rounded-md transition-colors hover:bg-inset sm:hidden",children:a.jsx(Zt,{tone:d===null?"neutral":N?"ok":"bad",pulse:N&&h})}),a.jsxs("span",{className:"hidden items-center gap-1.5 pl-1 pr-2 text-2xs text-faint md:flex",title:x??(h?"Live updates are connected.":"Reconnecting to live updates…"),children:[a.jsx("span",{className:ie("size-1.5 rounded-full",x?"bg-bad":h?"bg-ok live-dot":"bg-faint"),"aria-hidden":"true"}),x?"Live blocked":h?"Live":"Connecting"]}),a.jsx(Sw,{}),a.jsx(at,{label:c==="dark"?"Switch to light theme":"Switch to dark theme",onClick:u,children:c==="dark"?a.jsx(by,{className:"size-4.5","aria-hidden":"true"}):a.jsx(xy,{className:"size-4.5","aria-hidden":"true"})}),a.jsx(at,{label:"Sign out",onClick:B,disabled:b,className:"hover:text-bad",children:a.jsx(B2,{className:"size-4.5","aria-hidden":"true"})})]})]})}function Ze({className:s,children:o,...c}){return a.jsx("div",{className:ie("rounded-lg border border-line bg-surface shadow-card",s),...c,children:o})}function nn({title:s,description:o,actions:c,className:u,icon:d}){return a.jsxs("div",{className:ie("flex flex-wrap items-start justify-between gap-3 border-b border-line px-4 py-3.5 sm:px-5",u),children:[a.jsxs("div",{className:"flex min-w-0 items-start gap-3",children:[d&&a.jsx("div",{className:"mt-0.5 text-muted",children:d}),a.jsxs("div",{className:"min-w-0",children:[a.jsx("h2",{className:"text-sm font-semibold text-ink",children:s}),o&&a.jsx("p",{className:"mt-0.5 text-xs text-muted",children:o})]})]}),c&&a.jsx("div",{className:"flex shrink-0 flex-wrap items-center gap-2",children:c})]})}function Dn({className:s,children:o,...c}){return a.jsx("div",{className:ie("px-4 py-4 sm:px-5",s),...c,children:o})}function Md({className:s,children:o}){return a.jsx("div",{className:ie("flex flex-wrap items-center justify-between gap-2 border-t border-line bg-raised/50 px-4 py-3 sm:px-5",s),children:o})}function Ms({className:s}){return a.jsx(sl,{className:ie("spin size-4 text-muted",s),"aria-hidden":"true"})}function Fe({className:s}){return a.jsx("div",{className:ie("skeleton",s),"aria-hidden":"true"})}function za({children:s}){return a.jsx("div",{className:"page-enter space-y-5","aria-busy":"true","aria-label":"Loading",children:s})}function Tw(){return a.jsx("div",{className:"flex min-h-full items-center justify-center bg-canvas",children:a.jsxs("div",{className:"flex items-center gap-3 text-muted",children:[a.jsx(sl,{className:"spin size-5 text-accent-text","aria-hidden":"true"}),a.jsx("span",{className:"text-sm",children:"Loading Easy DevOps…"})]})})}function On({title:s,description:o,action:c,icon:u,className:d}){return a.jsxs("div",{className:ie("flex flex-col items-center justify-center px-6 py-12 text-center",d),children:[a.jsx("div",{className:"mb-3 flex size-10 items-center justify-center rounded-full bg-inset text-faint",children:u??a.jsx(k2,{className:"size-5","aria-hidden":"true"})}),a.jsx("h3",{className:"text-sm font-medium text-ink",children:s}),o&&a.jsx("p",{className:"mt-1 max-w-md text-xs text-muted",children:o}),c&&a.jsx("div",{className:"mt-4",children:c})]})}function we({tone:s="info",title:o,children:c,action:u,className:d}){const h={info:"border-info/25 bg-info-soft text-info",warning:"border-warn/30 bg-warn-soft text-warn",danger:"border-bad/30 bg-bad-soft text-bad",success:"border-ok/30 bg-ok-soft text-ok"}[s],x={info:my,warning:Ds,danger:Ds,success:Dl}[s];return a.jsx("div",{className:ie("rounded-md border px-3.5 py-3 text-xs",h,d),role:"status",children:a.jsxs("div",{className:"flex items-start gap-2.5",children:[a.jsx(x,{className:"mt-0.5 size-3.5 shrink-0","aria-hidden":"true"}),a.jsxs("div",{className:"min-w-0 flex-1 text-muted",children:[o&&a.jsx("div",{className:"font-medium text-ink",children:o}),c&&a.jsx("div",{className:ie(o?"mt-0.5":void 0,"break-words"),children:c})]}),u&&a.jsx("div",{className:"shrink-0",children:u})]})})}function Et({error:s,onRetry:o,title:c,className:u}){const d=s instanceof Be?s:null,h=d?.status===403,x=typeof d?.payload?.detail=="string"?d.payload.detail:void 0,m=d?.message??(s instanceof Error?s.message:"Something went wrong while loading this section.");return a.jsx(Ze,{className:ie("border-bad/25",u),children:a.jsxs("div",{className:"flex flex-col items-center justify-center px-6 py-10 text-center",children:[a.jsx("div",{className:"mb-3 flex size-10 items-center justify-center rounded-full bg-bad-soft text-bad",children:h?a.jsx(Ra,{className:"size-5","aria-hidden":"true"}):a.jsx(Ds,{className:"size-5","aria-hidden":"true"})}),a.jsx("h3",{className:"text-sm font-semibold text-ink",children:c??(h?"Request blocked":"Could not load this section")}),a.jsx("p",{className:"mt-1 max-w-md text-xs text-muted",children:m}),x&&a.jsx("p",{className:"mt-1 max-w-md break-all font-mono text-2xs text-faint",children:x}),d&&a.jsxs("p",{className:"mt-2 text-2xs text-faint",children:["HTTP ",d.status,d.code?` · ${d.code}`:""]}),o&&a.jsx(ee,{className:"mt-4",variant:"secondary",size:"sm",icon:a.jsx(Lt,{className:"size-3.5","aria-hidden":"true"}),onClick:o,children:"Try again"})]})})}const dg="ez-service-banner-dismissed";function Od({children:s}){return a.jsx("code",{className:"font-mono text-ink",children:s})}function Cw(s){return s.startsAt==="logon"?"at your next logon":s.startsAt==="boot"?"at the next boot":"when the service starts"}function Ew(s){return s.running?{code:"running",tone:"info",title:"Background service is running",body:"This dashboard is the interface only.",action:"Open Processes"}:s.stoppedByUser?{code:"stopped_by_user",tone:"warning",title:"The background service is stopped",body:a.jsxs(a.Fragment,{children:["You stopped it",s.stoppedAtLabel?` on ${s.stoppedAtLabel}`:"",", so monitoring and notifications are paused. It starts again ",Cw(s),", or run"," ",a.jsx(Od,{children:"ezz service start"})," to start it now."]}),action:"Open Processes"}:{code:"not_running",tone:"warning",title:"The background service is not running",body:s.installed?a.jsxs(a.Fragment,{children:["Monitoring and notifications run in this dashboard and stop when it closes. Start the service with ",a.jsx(Od,{children:"ezz service start"}),"."]}):a.jsxs(a.Fragment,{children:["Monitoring and notifications would run in this dashboard and stop when it closes. Set up the service with ",a.jsx(Od,{children:s.installCommand}),"."]}),action:"Open Processes"}}function zw(){const{service:s}=Ji(),{pathname:o}=vn(),[c,u]=g.useState(()=>{try{return sessionStorage.getItem(dg)}catch{return null}}),d=Fi(s),h=d?Ew(d):null,x=o!=="/processes",m=g.useMemo(()=>!d||!h?"":[h.code,d.pid,d.startedAt,d.stoppedByUser,d.stoppedAt,d.startsAt,d.installed].join("|"),[d,h]);if(!d||!h||c===m)return null;const p=()=>{u(m);try{sessionStorage.setItem(dg,m)}catch{}};return a.jsx("div",{className:"fade-enter mb-5",children:a.jsx(we,{tone:h.tone,title:h.title,action:a.jsxs("div",{className:"flex items-center gap-1",children:[x&&a.jsxs(bt,{to:"/processes",className:ie("inline-flex items-center gap-1 rounded-sm px-2 py-1 text-xs font-medium text-ink","border border-line bg-raised transition-colors hover:border-line-strong hover:bg-inset"),children:[h.action,a.jsx(Ls,{className:"size-3","aria-hidden":"true"})]}),a.jsx(at,{label:"Dismiss banner",size:"sm",onClick:p,children:a.jsx(Hs,{className:"size-3.5","aria-hidden":"true"})})]}),children:h.body})})}const Rw={host_missing:"The request arrived without a Host header.",host_port_mismatch:"The request was addressed to a different port.",host_not_local:"The request hostname does not mean this machine.",origin_malformed:"The request carried an unreadable Origin.",origin_port_mismatch:"The request came from a different port.",origin_not_local:"The request came from another site.",origin_cross_site:"The request came from another site.",missing_request_header:"The request was missing the dashboard’s safety header."};function Aw(){const{blocked:s,dismissBlocked:o}=Xn();if(!s)return null;const c=s.blockedReason,u=typeof s.payload.detail=="string"?s.payload.detail:void 0;return a.jsx("div",{className:"fade-enter mb-5 rounded-md border border-bad/30 bg-bad-soft px-3.5 py-3 text-xs",role:"alert",children:a.jsxs("div",{className:"flex items-start gap-2.5",children:[a.jsx(Ra,{className:"mt-0.5 size-4 shrink-0 text-bad","aria-hidden":"true"}),a.jsxs("div",{className:"min-w-0 flex-1",children:[a.jsx("div",{className:"font-medium text-ink",children:"Request blocked"}),a.jsx("div",{className:"mt-0.5 text-muted",children:c?Rw[c]??"The dashboard refused this request.":s.message}),u&&a.jsx("div",{className:"mt-1 break-all font-mono text-2xs text-faint",children:u}),a.jsx("div",{className:"mt-1.5 text-2xs text-faint",children:"This happens when a request comes from another site or through a different port. Try reloading the dashboard from its own address."})]}),a.jsx(ee,{variant:"ghost",size:"sm",onClick:o,className:"-mr-1 -mt-1 shrink-0",children:"Dismiss"})]})})}class Dw extends g.Component{state={error:null};static getDerivedStateFromError(o){return{error:o}}componentDidCatch(o,c){console.error(`[ui] ${this.props.area??"page"} crashed`,o,c.componentStack)}render(){return this.state.error?a.jsx(Ze,{className:"border-bad/30",children:a.jsxs("div",{className:"flex flex-col items-center justify-center px-6 py-12 text-center",children:[a.jsx("div",{className:"mb-3 flex size-10 items-center justify-center rounded-full bg-bad-soft text-bad",children:a.jsx(Ra,{className:"size-5","aria-hidden":"true"})}),a.jsx("h2",{className:"text-sm font-semibold text-ink",children:this.props.area?`${this.props.area} hit an error`:"This page hit an error"}),a.jsx("p",{className:"mt-1 max-w-lg text-xs text-muted",children:"The rest of the dashboard still works. Try again, or reload the page if it keeps happening."}),a.jsx("p",{className:"mt-2 max-w-lg break-all font-mono text-2xs text-faint",children:this.state.error.message}),a.jsx(ee,{className:"mt-4",size:"sm",icon:a.jsx(Lt,{className:"size-3.5","aria-hidden":"true"}),onClick:()=>this.setState({error:null}),children:"Try again"})]})}):this.props.children}}function _w(){const[s,o]=g.useState(!1),{pathname:c}=vn(),u=g.useRef(null),d=g.useCallback(()=>o(!1),[]);g.useEffect(()=>{o(!1),u.current?.scrollTo({top:0}),u.current?.focus({preventScroll:!0})},[c]),g.useEffect(()=>{const x=window.matchMedia("(min-width: 1024px)"),m=()=>{x.matches&&o(!1)};return x.addEventListener("change",m),()=>x.removeEventListener("change",m)},[]);const h=Ty(c);return a.jsxs("div",{className:"flex h-full min-h-0 bg-canvas",children:[a.jsx("a",{href:"#main-content",className:"sr-only focus:not-sr-only focus:absolute focus:left-3 focus:top-3 focus:z-[80] focus:rounded-md focus:border focus:border-line focus:bg-surface focus:px-3 focus:py-2 focus:text-sm focus:text-ink focus:shadow-pop",children:"Skip to content"}),a.jsx(jw,{open:s,onClose:d}),a.jsxs("div",{className:"flex min-w-0 flex-1 flex-col",children:[a.jsx(kw,{onMenu:()=>o(!0)}),a.jsx("main",{ref:u,id:"main-content",tabIndex:-1,className:"min-h-0 flex-1 overflow-y-auto outline-none",children:a.jsxs("div",{className:"mx-auto w-full max-w-[var(--ez-content-max)] px-3 py-4 sm:px-5 sm:py-5 lg:px-7 lg:py-6",children:[a.jsx(zw,{}),a.jsx(Aw,{}),a.jsx("div",{className:"page-enter",children:a.jsx(Dw,{area:h?.title,children:a.jsx(Q1,{})})},c)]})})]})]})}function Mw(){const{bootError:s,retryBoot:o}=Xn(),[c,u]=g.useState(!1),d=async()=>{u(!0),await o(),u(!1)};return a.jsx("div",{className:"flex min-h-full items-center justify-center bg-canvas px-4 py-10",children:a.jsxs("div",{className:"w-full max-w-md rounded-xl border border-line bg-surface p-6 shadow-card",children:[a.jsx("div",{className:"mb-4 flex size-10 items-center justify-center rounded-full bg-bad-soft text-bad",children:a.jsx(Z2,{className:"size-5","aria-hidden":"true"})}),a.jsx("h1",{className:"text-lg font-semibold text-ink",children:"Cannot reach the dashboard"}),a.jsxs("p",{className:"mt-1 text-sm text-muted",children:[s?.message??"The dashboard did not answer."," Check that Easy DevOps is running, then try again."]}),s&&a.jsxs("p",{className:"mt-2 text-2xs text-faint",children:["HTTP ",s.status===0?"connection failed":s.status]}),a.jsx(ee,{variant:"primary",loading:c,onClick:d,icon:a.jsx(Lt,{className:"size-4","aria-hidden":"true"}),className:"mt-5",children:"Try again"})]})})}const xf="w-full rounded-md border border-line bg-canvas px-3 text-sm text-ink placeholder:text-faint transition-colors duration-[var(--ez-motion-fast)] hover:border-line-strong focus:border-accent focus:outline-none focus:ring-2 focus:ring-accent/25 disabled:opacity-60",Qo="border-bad/60 hover:border-bad focus:border-bad focus:ring-bad/25";function Zo({htmlFor:s,children:o,optional:c,trailing:u}){return a.jsxs("div",{className:"mb-1.5 flex items-baseline justify-between gap-2",children:[a.jsxs("label",{htmlFor:s,className:"flex items-baseline gap-2 text-xs font-medium text-muted",children:[a.jsx("span",{children:o}),c&&a.jsx("span",{className:"text-2xs font-normal text-faint",children:"Optional"})]}),u]})}function Ko({id:s,children:o}){return a.jsx("p",{id:s,className:"mt-1.5 text-xs text-bad",role:"alert",children:o})}function Ol({id:s,children:o}){return a.jsx("p",{id:s,className:"mt-1.5 text-xs text-faint",children:o})}function Ee({label:s,hint:o,error:c,optional:u,trailing:d,id:h,className:x,...m}){const p=g.useId(),b=h??p,j=`${b}-error`,y=`${b}-hint`;return a.jsxs("div",{className:x,children:[s&&a.jsx(Zo,{htmlFor:b,optional:u,children:s}),a.jsxs("div",{className:"relative",children:[a.jsx("input",{id:b,className:ie(xf,"h-9",!!d&&"pr-10",c&&Qo),"aria-invalid":c?!0:void 0,"aria-describedby":c?j:o?y:void 0,...m}),d&&a.jsx("div",{className:"absolute inset-y-0 right-0 flex items-center pr-1.5",children:d})]}),c?a.jsx(Ko,{id:j,children:c}):o?a.jsx(Ol,{id:y,children:o}):null]})}function Ho({label:s,hint:o,error:c,optional:u,id:d,className:h,...x}){const m=g.useId(),p=d??m,b=`${p}-error`,j=`${p}-hint`;return a.jsxs("div",{className:h,children:[s&&a.jsx(Zo,{htmlFor:p,optional:u,children:s}),a.jsx("textarea",{id:p,className:ie(xf,"min-h-24 py-2 leading-relaxed",c&&Qo),"aria-invalid":c?!0:void 0,"aria-describedby":c?b:o?j:void 0,...x}),c?a.jsx(Ko,{id:b,children:c}):o?a.jsx(Ol,{id:j,children:o}):null]})}function rl({label:s,hint:o,error:c,optional:u,id:d,className:h,children:x,...m}){const p=g.useId(),b=d??p,j=`${b}-error`,y=`${b}-hint`;return a.jsxs("div",{className:h,children:[s&&a.jsx(Zo,{htmlFor:b,optional:u,children:s}),a.jsx("select",{id:b,className:ie(xf,"h-9 cursor-pointer pr-8",c&&Qo),"aria-invalid":c?!0:void 0,"aria-describedby":c?j:o?y:void 0,...m,children:x}),c?a.jsx(Ko,{id:j,children:c}):o?a.jsx(Ol,{id:y,children:o}):null]})}function Ow({label:s,hint:o,error:c,optional:u,value:d,onChange:h,normalize:x,max:m,placeholder:p,className:b,id:j}){const y=g.useId(),N=j??y,[C,B]=g.useState(""),[S,T]=g.useState(null),A=`${N}-error`,k=`${N}-hint`,X=S??c??null,R=()=>{const M=C.trim();if(!M)return;let ne=d;for(const L of M.split(/[\n,]/)){if(!L.trim())continue;const Q=x(L,ne);if(Q.error||!Q.value){T(Q.error??"This path cannot be added."),B(L.trim());return}ne.includes(Q.value)||(ne=[...ne,Q.value])}h(ne),B(""),T(null)};return a.jsxs("div",{className:b,children:[s&&a.jsx(Zo,{htmlFor:N,optional:u,trailing:m?a.jsxs("span",{className:"text-2xs font-normal text-faint",children:[d.length,"/",m]}):void 0,children:s}),a.jsxs("div",{className:ie("flex min-h-9 w-full flex-wrap items-center gap-1.5 rounded-md border bg-canvas px-2 py-1.5 transition-colors duration-[var(--ez-motion-fast)]",X?Qo:"border-line hover:border-line-strong focus-within:border-accent focus-within:ring-2 focus-within:ring-accent/25"),children:[d.map(M=>a.jsxs("span",{className:"inline-flex max-w-full items-center gap-1 rounded-sm border border-line bg-inset py-0.5 pl-2 pr-1 font-mono text-xs text-ink",children:[a.jsx("span",{className:"truncate",children:M}),a.jsx("button",{type:"button",onClick:()=>{h(d.filter(ne=>ne!==M)),T(null)},className:"shrink-0 rounded-sm p-0.5 text-faint transition-colors hover:bg-canvas hover:text-bad focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-accent/50","aria-label":`Remove ${M}`,children:a.jsx(Hs,{className:"size-3","aria-hidden":"true"})})]},M)),a.jsx("input",{id:N,value:C,onChange:M=>{B(M.target.value),S&&T(null)},onKeyDown:M=>{(M.key==="Enter"||M.key===",")&&(M.preventDefault(),R()),M.key==="Backspace"&&!C&&d.length>0&&h(d.slice(0,-1))},onBlur:R,placeholder:d.length===0?p:void 0,"aria-invalid":X?!0:void 0,"aria-describedby":X?A:o?k:void 0,className:"h-6 min-w-24 flex-1 bg-transparent font-mono text-sm text-ink placeholder:text-faint focus:outline-none",spellCheck:!1,autoComplete:"off"}),a.jsx("button",{type:"button",onClick:R,disabled:!C.trim(),className:"shrink-0 rounded-sm p-1 text-faint transition-colors hover:bg-inset hover:text-ink focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-accent/50 disabled:pointer-events-none disabled:opacity-40","aria-label":"Add path",children:a.jsx(sa,{className:"size-3.5","aria-hidden":"true"})})]}),X?a.jsx(Ko,{id:A,children:X}):o?a.jsx(Ol,{id:k,children:o}):null]})}function il({label:s,hint:o,checked:c,onChange:u,disabled:d,className:h,id:x}){const m=g.useId(),p=x??m;return a.jsxs("div",{className:ie("flex items-start gap-2.5",h),children:[a.jsx("input",{id:p,type:"checkbox",checked:c,disabled:d,onChange:b=>u(b.target.checked),className:"mt-0.5 size-4 shrink-0 cursor-pointer rounded border-line accent-[var(--ez-accent)]"}),a.jsxs("div",{className:"min-w-0",children:[a.jsx("label",{htmlFor:p,className:ie("cursor-pointer text-sm text-ink",d&&"cursor-not-allowed opacity-60"),children:s}),o&&a.jsx("p",{className:"mt-0.5 text-xs text-faint",children:o})]})]})}function qt({checked:s,onChange:o,label:c,description:u,disabled:d,className:h}){const x=g.useId();return a.jsxs("div",{className:ie("flex items-start justify-between gap-4",h),children:[a.jsxs("div",{className:"min-w-0",children:[a.jsx("div",{id:x,className:"text-sm text-ink",children:c}),u&&a.jsx("div",{className:"mt-0.5 text-xs text-faint",children:u})]}),a.jsx("button",{type:"button",role:"switch","aria-checked":s,"aria-labelledby":x,disabled:d,onClick:()=>o(!s),className:ie("relative mt-0.5 inline-flex h-5 w-9 shrink-0 items-center rounded-pill border transition-colors duration-[var(--ez-motion-fast)] disabled:opacity-50",s?"border-accent bg-accent":"border-line-strong bg-inset","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent/50"),children:a.jsx("span",{className:ie("inline-block size-3.5 rounded-full bg-white shadow-sm transition-transform duration-[var(--ez-motion-fast)]",s?"translate-x-[18px]":"translate-x-[3px]")})})]})}function ka({children:s,className:o}){return a.jsx("div",{className:ie("grid gap-4 sm:grid-cols-2",o),children:s})}const Lw=["Domains, certificates and nginx configs in one flow","Live nginx status, health checks and log tails","Processes, notifications and Hub pairing built in","Local-first: no Docker, no cloud account"],Uw="This code has expired. Get a new one with: ezz dashboard setup-code";function fg(s){return s?.setupCodeRequired!==!0?!1:s.setupCodeExpiresAt===null||s.setupCodeExpiresAt<=Date.now()}function hg({compact:s=!1}){return a.jsxs("div",{className:"flex items-center gap-2.5",children:[a.jsx(Cy,{className:"h-6"}),a.jsxs("div",{children:[a.jsx("div",{className:"text-sm font-semibold tracking-tight text-ink",children:"Easy DevOps"}),!s&&a.jsx("div",{className:"text-2xs text-faint",children:"Server control plane"})]})]})}function Hw({children:s}){const{theme:o,toggleTheme:c}=uy();return a.jsxs("div",{className:"relative flex min-h-full items-center justify-center overflow-hidden bg-canvas px-4 py-8 sm:py-12",children:[a.jsxs("div",{className:"pointer-events-none absolute inset-0","aria-hidden":"true",children:[a.jsx("div",{className:"absolute -top-48 left-1/2 h-[420px] w-[760px] -translate-x-1/2 rounded-full bg-accent-soft blur-3xl"}),a.jsx("div",{className:"absolute -bottom-56 right-[-120px] h-[380px] w-[520px] rounded-full bg-info-soft blur-3xl"})]}),a.jsxs("div",{className:"relative grid w-full max-w-4xl overflow-hidden rounded-xl border border-line bg-surface shadow-card lg:grid-cols-[1.02fr_1fr]",children:[a.jsxs("aside",{className:"hidden flex-col justify-between gap-8 border-r border-line bg-raised/40 p-8 lg:flex",children:[a.jsx(hg,{}),a.jsxs("div",{children:[a.jsx("h2",{className:"max-w-sm text-2xl font-semibold leading-snug tracking-tight text-ink",children:"nginx, certificates and processes — one calm console."}),a.jsx("ul",{className:"mt-6 space-y-3",children:Lw.map(u=>a.jsxs("li",{className:"flex items-start gap-2.5 text-sm text-muted",children:[a.jsx("span",{className:"mt-0.5 flex size-4 shrink-0 items-center justify-center rounded-full bg-ok-soft text-ok",children:a.jsx(hy,{className:"size-2.5","aria-hidden":"true"})}),u]},u))})]}),a.jsxs("div",{className:"flex items-center gap-2 text-2xs text-faint",children:[a.jsx(cf,{className:"size-3.5","aria-hidden":"true"}),"Runs on this server. Nothing leaves it."]})]}),a.jsxs("section",{className:"relative p-6 sm:p-8",children:[a.jsxs("div",{className:"mb-6 flex items-start justify-between gap-4 lg:justify-end",children:[a.jsx("div",{className:"lg:hidden",children:a.jsx(hg,{compact:!0})}),a.jsx(at,{label:o==="dark"?"Switch to light theme":"Switch to dark theme",onClick:c,children:o==="dark"?a.jsx(by,{className:"size-4.5","aria-hidden":"true"}):a.jsx(xy,{className:"size-4.5","aria-hidden":"true"})})]}),s]})]})]})}function Ay({show:s,onToggle:o}){return a.jsx(at,{label:s?"Hide password":"Show password",size:"sm",onClick:o,className:"text-faint hover:text-ink",children:s?a.jsx(d2,{className:"size-4","aria-hidden":"true"}):a.jsx(h2,{className:"size-4","aria-hidden":"true"})})}function Dy({error:s}){if(!s)return null;const o=typeof s.payload.hint=="string"?s.payload.hint:void 0;return a.jsx(we,{tone:"danger",title:s.message,className:"mb-4",children:o??(s.status===429?"Wait a moment before trying again.":void 0)})}function Bw(){const{login:s,retryBoot:o,sessionMessage:c}=Xn(),[u,d]=g.useState(""),[h,x]=g.useState(!1),[m,p]=g.useState(null),[b,j]=g.useState(null),[y,N]=g.useState(!1),C=async B=>{if(B.preventDefault(),!u){p("Enter your password.");return}p(null),j(null),N(!0);try{await s(u)}catch(S){const T=S instanceof Be?S:null;if(T?.payload.needsSetup){await o();return}if(T?.status===409){await o();return}j(T)}finally{N(!1)}};return a.jsxs("div",{className:"mx-auto w-full max-w-sm",children:[a.jsxs("div",{className:"mb-6",children:[a.jsx("div",{className:"mb-1 text-2xs font-semibold uppercase tracking-[0.14em] text-faint",children:"Dashboard"}),a.jsx("h1",{className:"text-xl font-semibold tracking-tight text-ink",children:"Welcome back"}),a.jsx("p",{className:"mt-1 text-sm text-muted",children:"Sign in to manage this server."})]}),c&&a.jsx(we,{tone:"info",title:"You were signed out",className:"mb-4",children:c}),a.jsx(Dy,{error:b}),a.jsxs("form",{onSubmit:C,noValidate:!0,children:[a.jsx(Ee,{label:"Password",type:h?"text":"password",value:u,onChange:B=>{d(B.target.value),m&&p(null)},error:m,autoComplete:"current-password",autoFocus:!0,trailing:a.jsx(Ay,{show:h,onToggle:()=>x(B=>!B)})}),a.jsxs(ee,{type:"submit",variant:"primary",size:"lg",loading:y,className:"mt-5 w-full",children:["Sign in",!y&&a.jsx(Ls,{className:"size-4","aria-hidden":"true"})]})]})]})}function qw(){const{auth:s,setup:o,retryBoot:c}=Xn(),u=s?.minPasswordLength??8,d=s?.canUseNoPassword===!0,h=s?.setupCodeRequired===!0,x=fg(s),[m,p]=g.useState("password"),[b,j]=g.useState(""),[y,N]=g.useState(""),[C,B]=g.useState(""),[S,T]=g.useState(!1),[A,k]=g.useState({}),[X,R]=g.useState(null),[M,ne]=g.useState(!1),L=async Q=>{Q.preventDefault();const ce={};if(h&&!b.trim()&&(ce.code="Enter the setup code shown by the server."),m==="password"&&(y.length<u&&(ce.password=`Use at least ${u} characters.`),C!==y&&(ce.confirm="The two passwords do not match.")),k(ce),!(Object.keys(ce).length>0)){R(null),ne(!0);try{if(m==="none")await o({mode:"none"});else{const P=b.trim();await o({password:y,mode:"password",...P?{setupCode:P}:{}})}}catch(P){const ae=P instanceof Be?P:null;if(ae?.status===409){await c();return}if(ae?.status===400&&fg(s)){R(null);return}R(ae)}finally{ne(!1)}}};return a.jsxs("div",{className:"mx-auto w-full max-w-sm",children:[a.jsxs("div",{className:"mb-6",children:[a.jsx("div",{className:"mb-1 text-2xs font-semibold uppercase tracking-[0.14em] text-faint",children:"First run"}),a.jsx("h1",{className:"text-xl font-semibold tracking-tight text-ink",children:"Set up this dashboard"}),a.jsx("p",{className:"mt-1 text-sm text-muted",children:"Choose how Easy DevOps protects itself. You can change this later in Settings."})]}),a.jsx(Dy,{error:X}),a.jsxs("form",{onSubmit:L,noValidate:!0,children:[a.jsxs("div",{className:ie("grid gap-2",d&&"grid-cols-2"),role:"group","aria-label":"Authentication method",children:[a.jsxs("button",{type:"button","aria-pressed":m==="password",onClick:()=>p("password"),className:ie("rounded-md border p-3 text-left transition-colors duration-[var(--ez-motion-fast)]",m==="password"?"border-accent bg-accent-soft":"border-line bg-raised hover:border-line-strong hover:bg-inset"),children:[a.jsxs("span",{className:"flex items-center gap-1.5 text-sm font-medium text-ink",children:[a.jsx(Zi,{className:"size-3.5 text-accent-text","aria-hidden":"true"}),"Password"]}),a.jsx("span",{className:"mt-1 block text-2xs text-muted",children:"Required to sign in from any browser."})]}),d&&a.jsxs("button",{type:"button","aria-pressed":m==="none",onClick:()=>p("none"),className:ie("rounded-md border p-3 text-left transition-colors duration-[var(--ez-motion-fast)]",m==="none"?"border-accent bg-accent-soft":"border-line bg-raised hover:border-line-strong hover:bg-inset"),children:[a.jsxs("span",{className:"flex items-center gap-1.5 text-sm font-medium text-ink",children:[a.jsx(gN,{className:"size-3.5 text-warn","aria-hidden":"true"}),"No password"]}),a.jsx("span",{className:"mt-1 block text-2xs text-muted",children:"Only from this machine, while bound to loopback."})]})]}),h&&x&&a.jsx(we,{tone:"warning",title:Uw,className:"mt-4",children:"Run that on the server, then reload this page to enter the new code."}),h&&a.jsx(Ee,{className:"mt-4",label:"Setup code",value:b,onChange:Q=>{j(Q.target.value),A.code&&k(ce=>({...ce,code:void 0}))},error:A.code,hint:"Printed in the terminal where the dashboard was started.",autoComplete:"one-time-code"}),m==="password"?a.jsxs(a.Fragment,{children:[a.jsx(Ee,{className:"mt-4",label:"Password",type:S?"text":"password",value:y,onChange:Q=>{N(Q.target.value),A.password&&k(ce=>({...ce,password:void 0}))},error:A.password,hint:`At least ${u} characters. Stored as a scrypt hash on this server.`,autoComplete:"new-password",autoFocus:!h,trailing:a.jsx(Ay,{show:S,onToggle:()=>T(Q=>!Q)})}),a.jsx(Ee,{className:"mt-4",label:"Confirm password",type:S?"text":"password",value:C,onChange:Q=>{B(Q.target.value),A.confirm&&k(ce=>({...ce,confirm:void 0}))},error:A.confirm,autoComplete:"new-password"})]}):a.jsxs(we,{tone:"warning",title:"The dashboard will have no password",className:"mt-4",children:["Anyone who can reach ",s?.bindAddress??"this machine"," can manage nginx, domains and certificates. Keep the dashboard bound to 127.0.0.1. Adding a password later in Settings is recommended if you ever expose it."]}),a.jsxs(ee,{type:"submit",variant:"primary",size:"lg",loading:M,className:"mt-5 w-full",children:[m==="password"?"Save password and sign in":"Start without a password",!M&&a.jsx(Ls,{className:"size-4","aria-hidden":"true"})]})]})]})}function $w(){const{auth:s,retryBoot:o}=Xn(),[c,u]=g.useState(!1),d=async()=>{u(!0),await o(),u(!1)};return a.jsxs("div",{className:"mx-auto w-full max-w-sm",children:[a.jsxs("div",{className:"mb-6",children:[a.jsx("div",{className:"mb-1 text-2xs font-semibold uppercase tracking-[0.14em] text-faint",children:"No password"}),a.jsx("h1",{className:"text-xl font-semibold tracking-tight text-ink",children:"Open the dashboard"}),a.jsxs("p",{className:"mt-1 text-sm text-muted",children:["This dashboard is configured without a password. It only accepts requests from"," ",a.jsx("code",{className:"rounded bg-inset px-1 py-0.5 font-mono text-2xs text-ink",children:s?.bindAddress??"this machine"}),"."]})]}),a.jsxs(ee,{variant:"primary",size:"lg",loading:c,onClick:d,className:"w-full",children:["Continue to dashboard",!c&&a.jsx(Ls,{className:"size-4","aria-hidden":"true"})]})]})}function Gw(){const{auth:s}=Xn();return Vn(s?.needsSetup?"Set up this dashboard":s?.authMode==="none"?"Open the dashboard":"Sign in"),a.jsxs(Hw,{children:[s?.needsSetup?a.jsx(qw,{}):s?.authMode==="none"?a.jsx($w,{}):a.jsx(Bw,{}),a.jsxs("div",{className:"mx-auto mt-6 w-full max-w-sm border-t border-line pt-4 text-2xs text-faint",children:[a.jsxs("div",{className:"flex items-center justify-between gap-3",children:[a.jsxs("span",{className:"inline-flex min-w-0 items-center gap-1.5",children:[a.jsx(cf,{className:"size-3 shrink-0","aria-hidden":"true"}),a.jsxs("span",{className:"truncate",children:["Listening on"," ",a.jsx("code",{className:"rounded bg-inset px-1 py-0.5 font-mono text-2xs text-muted",children:s?.bindAddress??"…"})]})]}),a.jsx("span",{children:"Easy DevOps"})]}),!1]})]})}function Bs(s,o){const{lastChange:c,changeSeq:u}=ra(),d=g.useRef(o);d.current=o,g.useEffect(()=>{if(!c)return;(Array.isArray(s)?s:[s]).includes(c.section)&&d.current()},[u])}function oa({title:s,description:o,actions:c,meta:u,eyebrow:d}){return a.jsxs("div",{className:"mb-5 flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between sm:gap-6",children:[a.jsxs("div",{className:"min-w-0",children:[d&&a.jsx("div",{className:"mb-1 text-2xs font-semibold uppercase tracking-[0.14em] text-faint",children:d}),a.jsxs("div",{className:"flex flex-wrap items-center gap-2.5",children:[a.jsx("h1",{className:"text-xl font-semibold tracking-tight text-ink",children:s}),u]}),o&&a.jsx("p",{className:"mt-1 max-w-2xl text-sm text-muted",children:o})]}),c&&a.jsx("div",{className:"flex shrink-0 flex-wrap items-center gap-2",children:c})]})}function Yw(s){return Promise.all([oe.domains.list(s),oe.ssl.list(s),oe.nginx.status(s)]).then(([o,c,u])=>({domains:o,certs:c,nginx:u}))}const Vw={neutral:"text-muted",accent:"text-accent-text",ok:"text-ok",warn:"text-warn",bad:"text-bad",info:"text-info"};function Co({label:s,value:o,hint:c,icon:u,tone:d="neutral",pulse:h=!1,to:x}){return a.jsx(bt,{to:x,className:"group block rounded-lg",children:a.jsxs(Ze,{className:"h-full px-4 py-3.5 transition-colors duration-[var(--ez-motion-fast)] group-hover:border-line-strong",children:[a.jsxs("div",{className:"flex items-start justify-between gap-3",children:[a.jsxs("div",{className:"min-w-0",children:[a.jsx("div",{className:"text-2xs font-semibold uppercase tracking-[0.12em] text-faint",children:s}),a.jsxs("div",{className:"mt-1.5 flex items-center gap-2",children:[a.jsx("span",{className:ie("text-xl font-semibold tracking-tight",Vw[d]),children:o}),(d==="ok"||d==="bad"||d==="warn")&&a.jsx(Zt,{tone:d,pulse:h})]})]}),a.jsx("div",{className:"flex size-8 shrink-0 items-center justify-center rounded-md bg-inset text-muted transition-colors group-hover:text-ink",children:a.jsx(u,{className:"size-4","aria-hidden":"true"})})]}),a.jsx("div",{className:"mt-2 truncate text-2xs text-muted",children:c})]})})}function Xw(s,o,c,u){const d=[];s&&!s.running&&d.push({id:"nginx-down",tone:"bad",title:"nginx is not running",detail:"No domain is being proxied until nginx is started.",to:"/nginx"});for(const h of c)h.status==="error"?d.push({id:`cert-error-${h.domain}`,tone:"bad",title:`Certificate for ${h.domain} cannot be read`,detail:"The certificate files are missing or unreadable.",to:"/ssl"}):h.status==="expired"||h.daysLeft!==null&&h.daysLeft<0?d.push({id:`cert-expired-${h.domain}`,tone:"bad",title:`Certificate for ${h.domain} has expired`,detail:_s(h.daysLeft),to:"/ssl"}):h.status==="expiring"&&d.push({id:`cert-expiring-${h.domain}`,tone:"warn",title:`Certificate for ${h.domain} expires soon`,detail:_s(h.daysLeft),to:"/ssl"});for(const h of o)u.get(h.name)?.up===!1&&d.push({id:`domain-down-${h.name}`,tone:"bad",title:`${h.name} is not responding`,detail:`The backend ${h.backendHost}:${h.port} did not answer a health check.`,to:"/domains"});return d}function Qw({entry:s}){return s?s.up===null?a.jsx(ve,{tone:"neutral",dot:!0,children:"External"}):s.up?a.jsx(ve,{tone:"ok",dot:!0,children:"Up"}):a.jsx(ve,{tone:"bad",dot:!0,children:"Down"}):a.jsx("span",{className:"text-2xs text-faint",children:"Awaiting check"})}function Zw(s){return s.type==="nginx_down"?{icon:Us,tone:"text-muted"}:s.type==="cert_expiry"?{icon:Ra,tone:"text-warn"}:s.type==="domain_health"?{icon:Oo,tone:"text-info"}:{icon:Oo,tone:"text-muted"}}function Kw(){Vn("Overview");const s=Nt(),o=bn(),{nginxStatus:c,domainHealth:u,notifications:d}=ra(),{service:h}=Ji(),x=Fi(h),m=yt(Yw),[p,b]=g.useState(!1);Hl(m.reload),Bs(["domains","ssl","nginx"],m.reload);const j=m.data,y=c??j?.nginx??null,N=j?.domains??[],C=j?.certs??[],B=new Map((u??[]).map(L=>[L.name,L])),S=N.filter(L=>L.enabled).length,T=C.filter(L=>L.status==="expiring"),A=C.filter(L=>L.status==="expired"||L.status==="error"),k=j?Xw(y,N,C,B):[],X=k.filter(L=>L.tone==="bad").length,R=j!==null&&y?.running===!0&&k.length===0,M=A.length>0?`${_n(A.length,"certificate")} expired or unreadable`:T.length>0?`${T.length} expiring within 30 days`:C.length>0?"All certificates healthy":"No certificates yet",ne=async()=>{if(await o({title:"Reload nginx?",body:"Reloading applies configuration changes. Existing connections are kept open.",confirmLabel:"Reload nginx"})){b(!0);try{const Q=await oe.nginx.reload();Q.success?(s.success("Nginx reloaded",Q.output.trim()||"Configuration reloaded."),m.reload()):s.error("Nginx reload failed",Q.output.trim()||"nginx refused the reload.")}catch(Q){s.error("Nginx reload failed",Q instanceof Be?Q.message:"The dashboard could not complete the reload.")}finally{b(!1)}}};return a.jsxs(a.Fragment,{children:[a.jsx(oa,{title:"Overview",description:"The state of nginx, your domains and their certificates, live.",actions:a.jsx(ee,{variant:"secondary",size:"sm",loading:m.loading,icon:a.jsx(Lt,{className:"size-3.5","aria-hidden":"true"}),onClick:m.reload,children:"Refresh"})}),m.error&&!j?a.jsx(Et,{error:m.error,onRetry:m.reload}):j?a.jsxs("div",{className:"space-y-4",children:[m.error&&a.jsx(we,{tone:"warning",title:"Showing the last known state",action:a.jsx(ee,{variant:"ghost",size:"sm",onClick:m.reload,children:"Try again"}),children:m.error.message}),a.jsxs(Ze,{className:"relative overflow-hidden",children:[a.jsx("div",{className:"status-sheen pointer-events-none absolute inset-x-0 top-0 h-px overflow-hidden","aria-hidden":"true"}),a.jsxs("div",{className:"flex flex-col gap-5 px-5 py-5 sm:flex-row sm:items-center sm:justify-between",children:[a.jsxs("div",{className:"flex items-start gap-4",children:[a.jsxs("div",{className:ie("relative mt-0.5 flex size-11 shrink-0 items-center justify-center rounded-full border",X>0?"border-bad/30 bg-bad-soft text-bad":k.length>0?"border-warn/30 bg-warn-soft text-warn":"border-ok/30 bg-ok-soft text-ok"),children:[X>0||k.length>0?a.jsx(Ds,{className:"size-5","aria-hidden":"true"}):a.jsx(Dl,{className:"size-5","aria-hidden":"true"}),a.jsx("span",{className:ie("absolute -inset-px rounded-full border",X>0?"border-bad/20":k.length>0?"border-warn/20":"border-ok/20"),"aria-hidden":"true"})]}),a.jsxs("div",{"aria-live":"polite",children:[a.jsx("div",{className:"text-2xs font-semibold uppercase tracking-[0.14em] text-faint",children:"System status"}),a.jsx("div",{className:"mt-0.5 text-lg font-semibold tracking-tight text-ink",children:X>0?"Attention needed":k.length>0?"A few things to check":"All systems healthy"}),a.jsxs("div",{className:"mt-0.5 text-xs text-muted",children:[y?.running?"nginx running":"nginx stopped"," · ",_n(N.length,"domain")," · ",_n(C.length,"certificate"),k.length>0&&a.jsxs(a.Fragment,{children:[" · ",a.jsxs("span",{className:X>0?"text-bad":"text-warn",children:[_n(k.length,"item")," need attention"]})]})]})]})]}),a.jsxs("div",{className:"flex items-center gap-3 sm:flex-col sm:items-end",children:[a.jsx(ve,{tone:R?"ok":X>0?"bad":"warn",dot:!0,children:R?"Healthy":X>0?"Degraded":"Check"}),a.jsxs("span",{className:"text-2xs text-faint",children:["Checked ",j.nginx?"live":"—",y?.version?` · ${y.version}`:""]})]})]})]}),a.jsxs("div",{className:"grid gap-3 sm:grid-cols-2 xl:grid-cols-4",children:[a.jsx(Co,{label:"Nginx",value:y?y.running?"Active":"Offline":"Unknown",hint:y?.running?`PID ${y.pid??"—"}${y.version?` · ${y.version}`:""}`:"Traffic is not being proxied.",icon:Us,tone:y?y.running?"ok":"bad":"neutral",pulse:y?.running===!0,to:"/nginx"}),a.jsx(Co,{label:"Domains",value:`${S}/${N.length}`,hint:N.length===0?"No domains configured yet.":S===N.length?"All domains enabled.":`${N.length-S} disabled.`,icon:_l,tone:N.length===0?"neutral":S>0?"accent":"warn",to:"/domains"}),a.jsx(Co,{label:"Certificates",value:String(C.length),hint:M,icon:Ea,tone:A.length>0?"bad":T.length>0?"warn":C.length>0?"ok":"neutral",to:"/ssl"}),a.jsx(Co,{label:"Background service",value:x?x.running?"Running":"Stopped":"Unknown",hint:x?x.running?x.startsAt==="unknown"?x.mechanismDetail:`${x.mechanismLabel} · starts ${x.startsAtLabel.toLowerCase()}`:x.stoppedByUser?x.installed?`You stopped it${x.stoppedAtLabel?` on ${x.stoppedAtLabel}`:""}; it starts again automatically.`:"You stopped it; start it to resume monitoring.":x.installed?"Monitoring runs in this window.":"Not installed; monitoring runs in this window.":"Checking…",icon:fy,tone:x?x.running?"ok":"warn":"neutral",pulse:x?.running===!0,to:"/processes"})]}),a.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[a.jsxs(bt,{to:"/domains?new=1",className:Ta("primary","sm"),children:[a.jsx(sa,{className:"size-3.5","aria-hidden":"true"}),"Add domain"]}),a.jsxs(bt,{to:"/ssl?new=1",className:Ta("secondary","sm"),children:[a.jsx(Ea,{className:"size-3.5","aria-hidden":"true"}),"Issue certificate"]}),a.jsx(ee,{variant:"secondary",size:"sm",loading:p,disabled:!y?.running,icon:a.jsx(Lt,{className:"size-3.5","aria-hidden":"true"}),onClick:ne,children:"Reload nginx"})]}),a.jsxs("div",{className:"grid gap-4 xl:grid-cols-3",children:[a.jsxs(Ze,{className:"xl:col-span-2",children:[a.jsxs("div",{className:"flex items-center justify-between border-b border-line px-4 py-3 sm:px-5",children:[a.jsxs("div",{children:[a.jsx("h2",{className:"text-sm font-semibold text-ink",children:"Domain health"}),a.jsx("p",{className:"mt-0.5 text-xs text-muted",children:"Backends are checked on connect and every 60 seconds."})]}),a.jsx(bt,{to:"/domains",className:"text-2xs font-medium text-muted hover:text-ink",children:"Manage"})]}),N.length===0?a.jsxs("div",{className:"flex flex-col items-center gap-3 px-5 py-10 text-center",children:[a.jsx(_l,{className:"size-5 text-faint","aria-hidden":"true"}),a.jsxs("div",{children:[a.jsx("div",{className:"text-sm font-medium text-ink",children:"No domains yet"}),a.jsx("p",{className:"mt-1 text-xs text-muted",children:"Add a domain to put a backend behind nginx."})]}),a.jsx(bt,{to:"/domains?new=1",className:Ta("primary","sm"),children:"Add your first domain"})]}):a.jsx("div",{className:"overflow-x-auto",children:a.jsxs("table",{className:"w-full text-xs",children:[a.jsx("thead",{children:a.jsxs("tr",{className:"border-b border-line text-left text-2xs uppercase tracking-wider text-faint",children:[a.jsx("th",{className:"px-4 py-2 font-medium sm:px-5",children:"Domain"}),a.jsx("th",{className:"hidden px-3 py-2 font-medium sm:table-cell",children:"Target"}),a.jsx("th",{className:"px-3 py-2 font-medium",children:"Health"}),a.jsx("th",{className:"hidden px-3 py-2 font-medium md:table-cell",children:"Certificate"})]})}),a.jsx("tbody",{children:N.map(L=>{const Q=B.get(L.name);return a.jsxs("tr",{className:"border-b border-line/60 last:border-0 hover:bg-raised/40",children:[a.jsx("td",{className:"px-4 py-2.5 sm:px-5",children:a.jsxs(bt,{to:`/domains?domain=${encodeURIComponent(L.name)}`,className:"flex items-center gap-2 font-medium text-ink hover:text-accent-text",children:[a.jsx("span",{className:"truncate",children:L.name}),!L.enabled&&a.jsx(ve,{tone:"neutral",children:"Disabled"})]})}),a.jsxs("td",{className:"hidden px-3 py-2.5 font-mono text-2xs text-muted sm:table-cell",children:[L.backendHost,":",L.port]}),a.jsx("td",{className:"px-3 py-2.5",children:a.jsx(Qw,{entry:Q})}),a.jsx("td",{className:"hidden px-3 py-2.5 text-2xs md:table-cell",children:L.ssl.enabled?a.jsx("span",{className:ie(L.daysLeft!==null&&L.daysLeft<30?"text-warn":"text-muted"),children:L.daysLeft!==null?_s(L.daysLeft):"Unknown"}):a.jsx("span",{className:"text-faint",children:"Not enabled"})})]},L.name)})})]})}),u===null&&N.length>0&&a.jsx("div",{className:"border-t border-line px-4 py-2 text-2xs text-faint sm:px-5",children:"Waiting for the first health check…"})]}),a.jsxs("div",{className:"space-y-4",children:[a.jsxs(Ze,{children:[a.jsxs("div",{className:"flex items-center justify-between border-b border-line px-4 py-3",children:[a.jsx("h2",{className:"text-sm font-semibold text-ink",children:"Needs attention"}),a.jsx("span",{className:"text-2xs text-faint",children:k.length})]}),k.length===0?a.jsxs("div",{className:"flex items-center gap-2.5 px-4 py-5 text-xs text-muted",children:[a.jsx(Dl,{className:"size-4 text-ok","aria-hidden":"true"}),"Nothing needs attention right now."]}):a.jsx("div",{className:"max-h-[280px] overflow-y-auto",children:k.map(L=>a.jsxs(bt,{to:L.to,className:"group flex items-start gap-2.5 border-b border-line/60 px-4 py-2.5 last:border-0 hover:bg-raised/50",children:[a.jsx(Zt,{tone:L.tone,className:"mt-1"}),a.jsxs("div",{className:"min-w-0 flex-1",children:[a.jsx("div",{className:"text-xs font-medium text-ink",children:L.title}),a.jsx("div",{className:"mt-0.5 text-2xs text-muted",children:L.detail})]}),a.jsx(Wj,{className:"mt-0.5 size-3.5 shrink-0 text-faint transition-transform group-hover:translate-x-0.5","aria-hidden":"true"})]},L.id))})]}),a.jsxs(Ze,{children:[a.jsxs("div",{className:"flex items-center justify-between border-b border-line px-4 py-3",children:[a.jsx("h2",{className:"text-sm font-semibold text-ink",children:"Recent events"}),a.jsx(bt,{to:"/notifications",className:"text-2xs font-medium text-muted hover:text-ink",children:"All events"})]}),d.length===0?a.jsx("div",{className:"px-4 py-5 text-xs text-muted",children:"No events since this tab opened. Alerts from nginx, certificates and domain health appear here live."}):a.jsx("div",{children:d.slice(0,6).map(L=>{const{icon:Q,tone:ce}=Zw(L);return a.jsxs("div",{className:"flex items-start gap-2.5 border-b border-line/60 px-4 py-2.5 last:border-0",children:[a.jsx(Q,{className:ie("mt-0.5 size-3.5 shrink-0",ce),"aria-hidden":"true"}),a.jsxs("div",{className:"min-w-0 flex-1",children:[a.jsx("div",{className:"text-xs leading-snug text-ink",children:L.message}),a.jsx("div",{className:"mt-0.5 text-2xs text-faint",children:Pi(L.timestamp)})]})]},L.id)})})]})]})]})]}):a.jsxs(za,{children:[a.jsx(Fe,{className:"h-28 w-full rounded-lg"}),a.jsx("div",{className:"grid gap-3 sm:grid-cols-2 xl:grid-cols-4",children:[0,1,2,3].map(L=>a.jsx(Fe,{className:"h-[92px] rounded-lg"},L))}),a.jsxs("div",{className:"grid gap-4 xl:grid-cols-3",children:[a.jsx(Fe,{className:"h-64 rounded-lg xl:col-span-2"}),a.jsx(Fe,{className:"h-64 rounded-lg"})]})]})]})}function pf(s){if(!s||!s.trim())return"A domain name is required.";const c=(s.startsWith("*.")?s.slice(2):s).split(".");if(c.length<2)return"Use at least two labels, for example example.com.";const u=/^[a-zA-Z0-9]([a-zA-Z0-9-]*[a-zA-Z0-9])?$/;return c.some(d=>!d||!u.test(d))?"Use letters, digits and hyphens only; each label must start and end with a letter or digit.":null}function Jo(s){const o=Number(s);return!Number.isInteger(o)||o<1||o>65535?"Port must be a whole number between 1 and 65535.":null}function _y(s){return s&&(!s.includes("@")||s.trim()!==s)?"Enter a valid email address.":null}function Jw(s){return s?/^\d+[kmgKMG]?$/.test(s)?null:"Use a size like 10m, 1g or 512k.":null}function Li(s,o){const c=Number(s);return!Number.isInteger(c)||c<1?`${o} must be a positive whole number.`:null}function mg(s,o){return s?s.length<o?`Use at least ${o} characters.`:null:"Enter a password."}const Pw=2048,xg=/^[A-Za-z0-9._~-]{1,200}$/;function Fw(s){if(!s)return"The Hub URL is missing.";if(s!==s.trim())return"The Hub URL must not have spaces around it.";if(s.includes("://")&&!/^https?:\/\//i.test(s))return"The Hub URL must use http or https.";const o=/^https?:\/\//i.test(s)?s:`https://${s}`;let c;try{c=new URL(o)}catch{return"The Hub URL is not valid."}return c.protocol!=="http:"&&c.protocol!=="https:"?"The Hub URL must use http or https.":c.hostname?c.username||c.password?"The Hub URL must not contain credentials.":null:"The Hub URL is missing a host."}function Iw(s){const o=s.trim();if(!o)return"Paste the connection string the Hub gave you.";if(o.length>Pw)return"That connection string is too long.";if(!o.toLowerCase().startsWith("ezops://"))return"The connection string must start with ezops://.";const c=o.slice(8).split("|");if(c.length!==3)return"Expected the form ezops://hubUrl|serverId|secret.";const[u,d,h]=c.map(m=>m.trim()),x=Fw(u);return x||(d?h?xg.test(d)?xg.test(h)?null:"The secret has characters the Hub does not use.":"The server ID has characters the Hub does not use.":"The secret is missing.":"The server ID is missing.")}function Ww(s){const o=document.activeElement,c=document.getSelection(),u=[];if(c)for(let x=0;x<c.rangeCount;x+=1)u.push(c.getRangeAt(x));const d=document.createElement("textarea");d.value=s,d.setAttribute("readonly",""),d.style.position="fixed",d.style.top="0",d.style.left="0",d.style.opacity="0",d.style.pointerEvents="none",document.body.appendChild(d);let h;try{d.select(),d.setSelectionRange(0,s.length),h=document.execCommand("copy")}catch{h=!1}finally{if(d.remove(),c){c.removeAllRanges();for(const x of u)c.addRange(x)}o?.focus({preventScroll:!0})}return h}async function eS(s){if(navigator.clipboard?.writeText)try{return await navigator.clipboard.writeText(s),!0}catch{}return Ww(s)}function jt({value:s,label:o="Copy",withText:c=!1,className:u}){const[d,h]=g.useState("idle"),x=g.useRef(null),m=Nt();g.useEffect(()=>()=>{x.current&&clearTimeout(x.current)},[]);const p=async()=>{const y=await eS(s);h(y?"copied":"failed"),y||m.error("Could not copy","The browser blocked clipboard access. Select the text and copy it manually."),x.current&&clearTimeout(x.current),x.current=setTimeout(()=>h("idle"),1600)},b=d==="copied"?a.jsx(hy,{className:"size-3.5 text-ok","aria-hidden":"true"}):d==="failed"?a.jsx(Ds,{className:"size-3.5 text-bad","aria-hidden":"true"}):a.jsx(r2,{className:"size-3.5","aria-hidden":"true"}),j=d==="copied"?"Copied":d==="failed"?"Copy failed":o;return c?a.jsx(ee,{size:"sm",variant:"secondary",icon:b,onClick:p,className:u,children:a.jsx("span",{"aria-live":"polite",children:j})}):a.jsx(at,{label:j,size:"sm",variant:"ghost",onClick:p,className:ie(d==="copied"&&"text-ok",d==="failed"&&"text-bad",u),children:b})}const tS="text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript",My=[{id:"domain_health",label:"Port / health check",description:"The backend stops answering its health check."},{id:"cert_expiry",label:"SSL / certificate expiry",description:"A certificate is expired or close to expiry."},{id:"nginx_down",label:"nginx stopped",description:"nginx itself is not serving requests."}],Oy=()=>({domain_health:{enabled:!0,channelIds:[]},cert_expiry:{enabled:!0,channelIds:[]},nginx_down:{enabled:!0,channelIds:[]}});function nS(){return{name:"",port:3e3,backendHost:"127.0.0.1",upstreamType:"http",www:!1,wildcard:!1,enabled:!0,ssl:{enabled:!1,certPath:"",keyPath:"",redirect:!0,hsts:!1,hstsMaxAge:31536e3},performance:{maxBodySize:"10m",readTimeout:60,connectTimeout:10,proxyBuffers:!1,gzip:!0,gzipTypes:tS},security:{rateLimit:!1,rateLimitRate:10,rateLimitBurst:20,securityHeaders:!1,custom404:!1,custom50x:!1},advanced:{accessLog:!0,customLocations:""},notifications:Oy()}}function aS(s){const o=Oy();for(const c of My){const u=s.notifications?.[c.id];u&&(o[c.id]={enabled:u.enabled,channelIds:[...u.channelIds??[]]})}return{name:s.name,port:s.port,backendHost:s.backendHost||"127.0.0.1",upstreamType:s.upstreamType||"http",www:s.www,wildcard:s.wildcard,enabled:s.enabled,ssl:{enabled:!!s.ssl?.enabled,certPath:s.ssl?.certPath??"",keyPath:s.ssl?.keyPath??"",redirect:s.ssl?.redirect??!0,hsts:s.ssl?.hsts??!1,hstsMaxAge:s.ssl?.hstsMaxAge||31536e3},performance:{...s.performance},security:{...s.security},advanced:{...s.advanced},notifications:o}}const pg={http:"HTTP",https:"HTTPS",ws:"WebSocket"};function Jd(s){return s.trim().replace(/^\*\./,"")}function lS(s){return"status"in s&&s.status==="waiting_dns"}function sS(s,o){const c={};if(o){const m=pf(Jd(s.name));m&&(c["domain-name"]=m)}if(s.backendHost.trim()||(c["backend-host"]="A backend host or URL is required."),!/^https?:\/\//i.test(s.backendHost.trim())){const m=Jo(s.port);m&&(c["backend-port"]=m)}const d=Jw(s.performance.maxBodySize);d&&(c["max-body"]=d);const h=Li(s.performance.readTimeout,"Read timeout");h&&(c["read-timeout"]=h);const x=Li(s.performance.connectTimeout,"Connect timeout");if(x&&(c["connect-timeout"]=x),s.ssl.enabled&&s.ssl.hsts){const m=Li(s.ssl.hstsMaxAge,"HSTS max-age");m&&(c["hsts-max-age"]=m)}if(s.security.rateLimit){const m=Li(s.security.rateLimitRate,"Rate");m&&(c["rate-limit-rate"]=m);const p=Li(s.security.rateLimitBurst,"Burst");p&&(c["rate-limit-burst"]=p)}return c}function gg(s){if(s instanceof Be){const o=s.payload.error;if(o&&typeof o=="object")return{message:"Certificate creation failed",detail:[o.step?`Step: ${o.step}`:"",o.cause?`Cause: ${o.cause}`:"",o.consequence?`Note: ${o.consequence}`:""].filter(Boolean).join(`
|
|
441
|
+
`)||"The certificate authority did not issue a certificate.",hint:"nginx is left as it was."};const c=s.code==="email_required"?"Set the ACME email in Settings → General, then try again.":typeof s.payload.hint=="string"?s.payload.hint:void 0;return{message:"Certificate creation failed",detail:(typeof s.payload.detail=="string"?s.payload.detail:typeof s.payload.output=="string"?s.payload.output:void 0)??s.message,hint:c}}return{message:"Certificate creation failed",detail:s instanceof Error?s.message:"The request could not be completed."}}function Es({id:s,title:o,description:c,icon:u,open:d,onToggle:h,children:x}){return a.jsxs("section",{className:"border-b border-line last:border-b-0",children:[a.jsx("h3",{children:a.jsxs("button",{type:"button","aria-expanded":d,"aria-controls":`section-${s}`,onClick:h,className:"group flex w-full items-center gap-3 px-5 py-3.5 text-left transition-colors duration-[var(--ez-motion-fast)] hover:bg-raised/50",children:[a.jsx("span",{className:"flex size-7 shrink-0 items-center justify-center rounded-md bg-inset text-muted transition-colors group-hover:text-ink",children:a.jsx(u,{className:"size-3.5","aria-hidden":"true"})}),a.jsxs("span",{className:"min-w-0 flex-1",children:[a.jsx("span",{className:"block text-sm font-medium text-ink",children:o}),a.jsx("span",{className:"mt-0.5 block text-xs text-muted",children:c})]}),a.jsx(Fj,{className:ie("size-4 shrink-0 text-faint transition-transform duration-[var(--ez-motion-fast)]",d&&"rotate-180"),"aria-hidden":"true"})]})}),d&&a.jsx("div",{id:`section-${s}`,className:"px-5 pb-5 pt-1",children:x})]})}function iS({channel:s,checked:o,onChange:c}){return a.jsxs("label",{className:ie("flex cursor-pointer items-center gap-2 rounded-md border px-2.5 py-1.5 text-xs transition-colors duration-[var(--ez-motion-fast)]",o?"border-accent/50 bg-accent-soft/50 text-ink":"border-line text-muted hover:border-line-strong hover:text-ink"),children:[a.jsx("input",{type:"checkbox",checked:o,onChange:u=>c(u.target.checked),className:"size-3.5 shrink-0 accent-[var(--ez-accent)]"}),a.jsx("span",{className:"font-medium",children:s.name}),a.jsx("span",{className:"text-2xs text-faint",children:s.type})]})}const zs=s=>Number.isFinite(s)&&s!==0?s:"";function yg({wildcard:s,certMethod:o,onMethodChange:c,certFailure:u,dnsPending:d,certAction:h,onCreate:x,onConfirmDns:m,onCancelDns:p,disabledReason:b,extraActions:j}){const y=h!==null;return a.jsxs("div",{className:"space-y-3",children:[u&&a.jsxs(we,{tone:"danger",title:u.message,children:[u.hint&&a.jsx("div",{children:u.hint}),u.detail&&a.jsx("pre",{className:"mt-2 max-h-40 overflow-auto whitespace-pre-wrap break-all font-mono text-2xs",children:u.detail})]}),d?a.jsxs("div",{className:"space-y-3",children:[a.jsxs("div",{children:[a.jsx("div",{className:"text-sm font-medium text-ink",children:"Add this DNS TXT record, then continue"}),a.jsx("p",{className:"mt-0.5 text-xs text-muted",children:d.hint??"The certificate authority checks this record before issuing the certificate."})]}),a.jsxs("div",{className:"space-y-2 rounded-md border border-line bg-canvas p-3 font-mono text-2xs",children:[a.jsxs("div",{className:"flex items-center justify-between gap-2",children:[a.jsxs("div",{className:"min-w-0",children:[a.jsx("div",{className:"font-sans text-2xs uppercase tracking-wider text-faint",children:"Name"}),a.jsx("div",{className:"mt-0.5 break-all text-ink",children:d.txtName})]}),a.jsx(jt,{value:d.txtName,label:"Copy record name"})]}),a.jsxs("div",{className:"flex items-center justify-between gap-2 border-t border-line pt-2",children:[a.jsxs("div",{className:"min-w-0",children:[a.jsx("div",{className:"font-sans text-2xs uppercase tracking-wider text-faint",children:"Value"}),a.jsx("div",{className:"mt-0.5 break-all text-ink",children:d.txtValue})]}),a.jsx(jt,{value:d.txtValue,label:"Copy record value"})]})]}),a.jsxs("div",{className:"flex flex-wrap gap-2",children:[a.jsx(ee,{variant:"primary",size:"sm",loading:h==="confirm",onClick:m,children:"I added the record, continue"}),a.jsx(ee,{variant:"secondary",size:"sm",onClick:p,disabled:y,children:"Cancel issuance"})]})]}):a.jsxs("div",{className:"space-y-3",children:[a.jsxs("fieldset",{children:[a.jsx("legend",{className:"mb-2 text-xs font-medium text-muted",children:"Validation method"}),a.jsxs("div",{className:"flex flex-wrap gap-2",children:[a.jsxs("label",{className:ie("flex cursor-pointer items-start gap-2 rounded-md border px-3 py-2 text-xs",o==="http"?"border-accent/50 bg-accent-soft/40":"border-line hover:border-line-strong",s&&"cursor-not-allowed opacity-50"),children:[a.jsx("input",{type:"radio",name:"cert-method",value:"http",checked:o==="http",disabled:s||y,onChange:()=>c("http"),className:"mt-0.5 accent-[var(--ez-accent)]"}),a.jsxs("span",{children:[a.jsx("span",{className:"block font-medium text-ink",children:"HTTP challenge"}),a.jsx("span",{className:"block text-2xs text-faint",children:"DNS already points here"})]})]}),a.jsxs("label",{className:ie("flex cursor-pointer items-start gap-2 rounded-md border px-3 py-2 text-xs",o==="dns"?"border-accent/50 bg-accent-soft/40":"border-line hover:border-line-strong"),children:[a.jsx("input",{type:"radio",name:"cert-method",value:"dns",checked:o==="dns",disabled:y,onChange:()=>c("dns"),className:"mt-0.5 accent-[var(--ez-accent)]"}),a.jsxs("span",{children:[a.jsx("span",{className:"block font-medium text-ink",children:"DNS challenge"}),a.jsx("span",{className:"block text-2xs text-faint",children:"Add a TXT record"})]})]})]}),s&&a.jsx("p",{className:"mt-2 text-2xs text-warn",children:"Wildcard certificates require the DNS challenge."})]}),b&&a.jsx("p",{className:"text-2xs text-warn",children:b}),a.jsxs("div",{className:"flex flex-wrap gap-2",children:[a.jsx(ee,{variant:"primary",size:"sm",loading:h==="issue",onClick:x,disabled:!!b,icon:a.jsx(Ea,{className:"size-3.5","aria-hidden":"true"}),children:"Create certificate"}),j]})]})]})}function rS({editor:s,onClose:o,onSaved:c}){const u=s.mode==="edit"?s.domain:null,d=Nt(),h=bn(),x=Xi(),m=g.useId(),[p,b]=g.useState(()=>u?aS(u):nS()),j=g.useRef(JSON.stringify(p)),y=JSON.stringify(p)!==j.current,[N,C]=g.useState(()=>u?{basic:!0,ssl:!0,performance:!0,security:!0,advanced:!0,notifications:!0}:{basic:!0,ssl:!0,performance:!1,security:!1,advanced:!1,notifications:!1}),[B,S]=g.useState({}),[T,A]=g.useState(null),[k,X]=g.useState(!1),[R,M]=g.useState(null),[ne,L]=g.useState("http"),[Q,ce]=g.useState(null),[P,ae]=g.useState(null),[O,D]=g.useState(null),le=yt(V=>oe.settings.channels.list(V),[],{enabled:!!u}),F=yt(V=>oe.ssl.list(V),[],{enabled:p.ssl.enabled});g.useEffect(()=>{if(!y)return;const V=pe=>{pe.preventDefault(),pe.returnValue=""};return window.addEventListener("beforeunload",V),()=>window.removeEventListener("beforeunload",V)},[y]),g.useEffect(()=>{R&&p.wildcard&&L("dns")},[R,p.wildcard]);const te=/^https?:\/\//i.test(p.backendHost.trim()),de=u?u.name:Jd(p.name),Y=pf(de),re=p.ssl.certPath.trim()===""&&p.ssl.keyPath.trim()==="",Se=F.data?.some(V=>V.domain===de)??!1,ke=p.ssl.enabled&&re&&!F.loading&&!Se&&!R;function Ve(V,pe){b(Ae=>({...Ae,[V]:pe}))}function $e(V,pe){b(Ae=>({...Ae,ssl:{...Ae.ssl,[V]:pe}}))}function E(V,pe){b(Ae=>({...Ae,performance:{...Ae.performance,[V]:pe}}))}function I(V,pe){b(Ae=>({...Ae,security:{...Ae.security,[V]:pe}}))}function K(V,pe){b(Ae=>({...Ae,advanced:{...Ae.advanced,[V]:pe}}))}function W(V,pe){b(Ae=>({...Ae,notifications:{...Ae.notifications,[V]:{...Ae.notifications[V],...pe}}}))}function je(V,pe,Ae){b(Jt=>{const wt=Jt.notifications[V],We=Ae?Array.from(new Set([...wt.channelIds,pe])):wt.channelIds.filter(ol=>ol!==pe);return{...Jt,notifications:{...Jt.notifications,[V]:{...wt,channelIds:We}}}})}const Ce=V=>C(pe=>({...pe,[V]:!0})),De=V=>({...p,...V,ssl:{...p.ssl,...V?.ssl??{}},name:u?u.name:Jd(p.name)}),fe=V=>{const pe=sS(V,!u);if(Object.keys(pe).length===0)return!0;S(pe),A({message:"Check the highlighted fields before saving."}),(pe["domain-name"]||pe["backend-host"]||pe["backend-port"])&&Ce("basic"),(pe["max-body"]||pe["read-timeout"]||pe["connect-timeout"])&&Ce("performance"),(pe["rate-limit-rate"]||pe["rate-limit-burst"])&&Ce("security"),pe["hsts-max-age"]&&Ce("ssl");const Ae=Object.keys(pe)[0];return queueMicrotask(()=>document.getElementById(Ae)?.focus()),!1},ye=async V=>{const pe=De(V);if(!fe(pe))return;const Ae=u?.name??pe.name;S({}),A(null),X(!0);let Jt;try{Jt=u?await oe.domains.update(u.name,pe):await oe.domains.create(pe)}catch(wt){const We=wt instanceof Be?wt:null;if(!We){M(null),ae(null),ce(null),d.warning("The dashboard’s reply could not be read","The domain list was reloaded. Check that the change is there before saving again."),c();return}We.status===422&&We.code==="cert_missing"?(M({certPath:typeof We.payload.certPath=="string"?We.payload.certPath:"",keyPath:typeof We.payload.keyPath=="string"?We.payload.keyPath:"",hint:typeof We.payload.hint=="string"?We.payload.hint:"The SSL certificate files do not exist at the configured paths."}),ce(null),ae(null),A(null),L(p.wildcard?"dns":"http"),Ce("ssl")):We.status===0?(A({message:"The dashboard did not answer.",detail:We.message,hint:"Saving may still have worked: check the domain list before trying again."}),d.error("The dashboard did not answer","The change may already have been saved.")):(A({message:We.message??"The domain could not be saved.",detail:typeof We.payload.detail=="string"?We.payload.detail:typeof We.payload.output=="string"?We.payload.output:void 0,hint:typeof We.payload.hint=="string"?We.payload.hint:void 0}),d.error("Could not save the domain",We.message??void 0));return}finally{X(!1)}M(null),ae(null),ce(null),d.success(u?"Domain saved":"Domain created",u?`${Jt?.name??Ae} was updated and its nginx config regenerated.`:`${Jt?.name??Ae} is configured; nginx will start serving it on the next reload.`),c()},$t=async()=>{if(fe(De({ssl:{...p.ssl,enabled:!0}}))){D("issue"),ce(null);try{const V=await oe.ssl.create({domain:de,www:p.www,validationMethod:p.wildcard?"dns":ne});if(lS(V)){ae(V);return}const pe={...p.ssl,enabled:!0,certPath:V.certPath,keyPath:V.keyPath};b(Ae=>({...Ae,ssl:pe})),M(null),ae(null),await ye({ssl:pe})}catch(V){ce(gg(V))}finally{D(null)}}},Qn=async()=>{if(P){D("confirm"),ce(null);try{const V=await oe.ssl.confirmDns(P.domain),pe={...p.ssl,enabled:!0,certPath:V.certPath,keyPath:V.keyPath};b(Ae=>({...Ae,ssl:pe})),ae(null),M(null),await ye({ssl:pe})}catch(V){ce(gg(V)),ae(null)}finally{D(null)}}},an=async()=>{if(P){D("confirm");try{await oe.ssl.cancelDns(P.domain),d.info("DNS challenge cancelled","No certificate was requested.")}catch{d.warning("Could not cancel the DNS challenge")}finally{ae(null),D(null)}}},Gt=()=>{const V={...p.ssl,enabled:!1};b(pe=>({...pe,ssl:V})),M(null),ce(null),ae(null),ye({ssl:V})},rt=()=>{M(null),ce(null),ae(null)},Le=k||O!==null,Ut=async()=>y?h({title:"Discard changes?",body:"The changes to this domain have not been saved.",confirmLabel:"Discard",cancelLabel:"Keep editing",tone:"danger"}):!0,jn=()=>{P&&oe.ssl.cancelDns(P.domain).catch(()=>{})},Kt=async()=>{Le||await Ut()&&(jn(),o())},ca=g.useRef(Kt);ca.current=Kt;const Zn=g.useCallback(()=>{ca.current()},[]),ln=async()=>{Le||await Ut()&&(jn(),o(),x("/settings"))};return a.jsxs(yn,{open:!0,onClose:Zn,title:u?`Edit ${u.name}`:"New domain",description:"Changes are written to nginx, tested, and rolled back automatically if nginx rejects them.",size:"xl",preventClose:Le,bodyClassName:"px-0 py-0",footer:a.jsxs(a.Fragment,{children:[a.jsx("span",{className:"mr-auto hidden text-2xs text-faint sm:block",children:u?"The domain name cannot change after creation.":"The domain is enabled as soon as it is created."}),a.jsx(ee,{variant:"ghost",onClick:Zn,disabled:Le,children:"Cancel"}),a.jsx(ee,{variant:"primary",type:"submit",form:m,loading:k,disabled:O!==null,children:u?"Save changes":"Create domain"})]}),children:[(T||R)&&a.jsxs("div",{className:"space-y-3 border-b border-line px-5 py-4",children:[T&&!R&&a.jsxs(we,{tone:"danger",title:T.message,children:[T.hint&&a.jsx("div",{children:T.hint}),T.detail&&a.jsx("pre",{className:"mt-2 max-h-40 overflow-auto whitespace-pre-wrap break-all font-mono text-2xs text-muted",children:T.detail})]}),R&&a.jsxs(a.Fragment,{children:[a.jsx(we,{tone:"warning",title:"SSL certificate not found",action:a.jsx(ee,{variant:"ghost",size:"sm",onClick:rt,disabled:Le,children:"Keep editing"}),children:a.jsxs("div",{className:"space-y-1",children:[a.jsx("div",{className:"break-all font-mono text-2xs",children:R.certPath||R.keyPath}),a.jsx("div",{children:R.hint}),a.jsx("div",{children:"Issue a certificate now, disable SSL for this domain, or point the paths at files that already exist."})]})}),a.jsx("div",{className:"rounded-md border border-line bg-raised/40 p-3",children:a.jsx(yg,{wildcard:p.wildcard,certMethod:ne,onMethodChange:L,certFailure:Q,dnsPending:P,certAction:O,onCreate:$t,onConfirmDns:Qn,onCancelDns:an,extraActions:a.jsx(ee,{variant:"dangerGhost",size:"sm",onClick:Gt,disabled:O!==null,children:"Disable SSL and save"})})})]})]}),a.jsxs("form",{id:m,onSubmit:V=>{V.preventDefault(),Le||ye()},children:[a.jsx(Es,{id:"basic",title:"Basic configuration",description:"What nginx serves and where traffic goes.",icon:_l,open:N.basic??!1,onToggle:()=>C(V=>({...V,basic:!V.basic})),children:a.jsxs(ka,{children:[a.jsx(Ee,{id:"domain-name",className:"sm:col-span-2",label:"Domain name",placeholder:"api.example.com",value:p.name,disabled:!!u,onChange:V=>Ve("name",V.target.value),error:B["domain-name"],hint:p.wildcard?"Enter the bare domain — the *. prefix is added automatically.":u?"The domain name cannot be changed after creation.":void 0,autoComplete:"off",spellCheck:!1}),a.jsx(Ee,{id:"backend-host",className:"sm:col-span-2",label:"Backend host or URL",placeholder:"127.0.0.1 or https://app.vercel.app",value:p.backendHost,onChange:V=>Ve("backendHost",V.target.value),error:B["backend-host"],hint:"A host and port, or a full http(s) URL to proxy to.",autoComplete:"off",spellCheck:!1}),a.jsx(Ee,{id:"backend-port",label:"Backend port",type:"number",inputMode:"numeric",min:1,max:65535,value:zs(p.port),disabled:te,onChange:V=>Ve("port",Number(V.target.value)),error:B["backend-port"],hint:te?"Taken from the URL.":void 0}),a.jsx(rl,{label:"Upstream type",value:p.upstreamType,onChange:V=>Ve("upstreamType",V.target.value),children:Object.keys(pg).map(V=>a.jsx("option",{value:V,children:pg[V]},V))}),a.jsxs("div",{className:"sm:col-span-2 space-y-3 rounded-md border border-line bg-raised/30 p-3.5",children:[a.jsx(qt,{checked:p.wildcard,onChange:V=>b(pe=>({...pe,wildcard:V,www:V?!1:pe.www})),label:"Wildcard domain",description:"Serve *.example.com. Requires a DNS-01 certificate."}),!p.wildcard&&a.jsx("div",{className:"border-t border-line pt-3",children:a.jsx(qt,{checked:p.www,onChange:V=>Ve("www",V),label:"Include www subdomain",description:"Adds www.example.com to server_name."})})]})]})}),a.jsx(Es,{id:"ssl",title:"SSL",description:"Serve this domain over HTTPS.",icon:Ea,open:N.ssl??!1,onToggle:()=>C(V=>({...V,ssl:!V.ssl})),children:a.jsxs("div",{className:"space-y-4",children:[p.ssl.enabled?a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:"grid gap-4 sm:grid-cols-2",children:[a.jsx(Ee,{label:"Certificate path",value:p.ssl.certPath,onChange:V=>$e("certPath",V.target.value),placeholder:"fullchain.pem",hint:"Leave blank to use the dashboard's certificate directory.",autoComplete:"off",spellCheck:!1,className:"font-mono"}),a.jsx(Ee,{label:"Private key path",value:p.ssl.keyPath,onChange:V=>$e("keyPath",V.target.value),placeholder:"privkey.pem",hint:"Leave blank to use the dashboard's certificate directory.",autoComplete:"off",spellCheck:!1,className:"font-mono"})]}),ke&&a.jsxs("div",{className:"space-y-3 rounded-md border border-line bg-raised/30 p-3.5",children:[a.jsxs("div",{children:[a.jsx("div",{className:"text-sm font-medium text-ink",children:"No certificate paths set"}),a.jsxs("p",{className:"mt-0.5 text-xs text-muted",children:["Create a certificate for ",de||"this domain"," now. On success, the certificate and key paths are filled in automatically."]})]}),a.jsx(yg,{wildcard:p.wildcard,certMethod:ne,onMethodChange:L,certFailure:Q,dnsPending:P,certAction:O,onCreate:$t,onConfirmDns:Qn,onCancelDns:an,disabledReason:de?Y??null:"Enter the domain name above to create a certificate."})]}),a.jsxs("div",{className:"space-y-3 rounded-md border border-line bg-raised/30 p-3.5",children:[a.jsx(qt,{checked:p.ssl.redirect,onChange:V=>$e("redirect",V),label:"Redirect HTTP to HTTPS",description:"Port 80 requests are sent to the HTTPS address."}),a.jsx("div",{className:"border-t border-line pt-3",children:a.jsx(qt,{checked:p.ssl.hsts,onChange:V=>$e("hsts",V),label:"Enable HSTS",description:"Tells browsers to use HTTPS for this domain only."})}),p.ssl.hsts&&a.jsx("div",{className:"border-t border-line pt-3",children:a.jsx(Ee,{id:"hsts-max-age",label:"HSTS max-age",type:"number",inputMode:"numeric",min:1,value:zs(p.ssl.hstsMaxAge),onChange:V=>$e("hstsMaxAge",Number(V.target.value)),error:B["hsts-max-age"],hint:"Seconds. 31536000 is one year.",className:"max-w-56"})})]})]}):a.jsx(qt,{checked:p.ssl.enabled,onChange:V=>$e("enabled",V),label:"Enable SSL / HTTPS",description:"Adds a 443 server block with the certificate below."}),p.ssl.enabled&&a.jsxs("div",{className:"flex items-start gap-2 text-xs text-muted",children:[a.jsx(Ra,{className:"mt-0.5 size-3.5 shrink-0 text-warn","aria-hidden":"true"}),a.jsx("span",{children:"The certificate files must exist before this domain can be saved. If they are missing, you will be offered to issue one."})]})]})}),a.jsx(Es,{id:"performance",title:"Performance",description:"Request limits, timeouts and compression.",icon:v2,open:N.performance??!1,onToggle:()=>C(V=>({...V,performance:!V.performance})),children:a.jsxs("div",{className:"space-y-4",children:[a.jsxs("div",{className:"grid gap-4 sm:grid-cols-3",children:[a.jsx(Ee,{id:"max-body",label:"Max body size",value:p.performance.maxBodySize,onChange:V=>E("maxBodySize",V.target.value),error:B["max-body"],placeholder:"10m",hint:"For uploads: 10m, 512k or 1g.",autoComplete:"off"}),a.jsx(Ee,{id:"read-timeout",label:"Read timeout",type:"number",inputMode:"numeric",min:1,value:zs(p.performance.readTimeout),onChange:V=>E("readTimeout",Number(V.target.value)),error:B["read-timeout"],hint:"Seconds."}),a.jsx(Ee,{id:"connect-timeout",label:"Connect timeout",type:"number",inputMode:"numeric",min:1,value:zs(p.performance.connectTimeout),onChange:V=>E("connectTimeout",Number(V.target.value)),error:B["connect-timeout"],hint:"Seconds."})]}),a.jsxs("div",{className:"space-y-3 rounded-md border border-line bg-raised/30 p-3.5",children:[a.jsx(qt,{checked:p.performance.proxyBuffers,onChange:V=>E("proxyBuffers",V),label:"Proxy buffering",description:"Buffer upstream responses on disk for slow clients."}),a.jsx("div",{className:"border-t border-line pt-3",children:a.jsx(qt,{checked:p.performance.gzip,onChange:V=>E("gzip",V),label:"Gzip compression",description:"Compress text responses before sending them."})}),p.performance.gzip&&a.jsxs("div",{className:"border-t border-line pt-3",children:[a.jsx(Ho,{label:"Gzip MIME types",value:p.performance.gzipTypes,onChange:V=>E("gzipTypes",V.target.value),rows:3,spellCheck:!1,className:"font-mono"}),a.jsx(Ol,{children:"Space-separated list of content types."})]})]})]})}),a.jsx(Es,{id:"security",title:"Security",description:"Rate limiting and response headers.",icon:cf,open:N.security??!1,onToggle:()=>C(V=>({...V,security:!V.security})),children:a.jsxs("div",{className:"space-y-3 rounded-md border border-line bg-raised/30 p-3.5",children:[a.jsx(qt,{checked:p.security.rateLimit,onChange:V=>I("rateLimit",V),label:"Rate limiting",description:"Limit requests per IP address."}),p.security.rateLimit&&a.jsxs("div",{className:"grid gap-4 border-t border-line pt-3 sm:grid-cols-2",children:[a.jsx(Ee,{id:"rate-limit-rate",label:"Requests per second",type:"number",inputMode:"numeric",min:1,value:zs(p.security.rateLimitRate),onChange:V=>I("rateLimitRate",Number(V.target.value)),error:B["rate-limit-rate"]}),a.jsx(Ee,{id:"rate-limit-burst",label:"Burst",type:"number",inputMode:"numeric",min:1,value:zs(p.security.rateLimitBurst),onChange:V=>I("rateLimitBurst",Number(V.target.value)),error:B["rate-limit-burst"],hint:"Requests allowed to exceed the rate briefly."})]}),a.jsx("div",{className:"border-t border-line pt-3",children:a.jsx(qt,{checked:p.security.securityHeaders,onChange:V=>I("securityHeaders",V),label:"Security headers",description:"Adds X-Frame-Options and X-Content-Type-Options."})}),a.jsxs("div",{className:"grid gap-3 border-t border-line pt-3 sm:grid-cols-2",children:[a.jsx(qt,{checked:p.security.custom404,onChange:V=>I("custom404",V),label:"Custom 404 form",description:"Return the dashboard's 404 page."}),a.jsx(qt,{checked:p.security.custom50x,onChange:V=>I("custom50x",V),label:"Custom 50x page",description:"Return the dashboard's error page when the backend fails."})]})]})}),a.jsx(Es,{id:"advanced",title:"Advanced",description:"Raw nginx additions for this domain.",icon:s2,open:N.advanced??!1,onToggle:()=>C(V=>({...V,advanced:!V.advanced})),children:a.jsxs("div",{className:"space-y-4",children:[a.jsx(qt,{checked:p.advanced.accessLog,onChange:V=>K("accessLog",V),label:"Domain-specific access log",description:"Writes this domain's requests to its own log file."}),a.jsx(Ho,{label:"Custom location blocks",value:p.advanced.customLocations,onChange:V=>K("customLocations",V.target.value),rows:6,spellCheck:!1,placeholder:`location /api/v2 {
|
|
442
|
+
proxy_pass http://localhost:8080;
|
|
443
|
+
}`,className:"font-mono"}),a.jsx(Ol,{children:"Appended verbatim inside the server block. nginx tests the result before it is kept."})]})}),u&&a.jsx(Es,{id:"notifications",title:"Notifications",description:"Which channels hear about this domain.",icon:of,open:N.notifications??!1,onToggle:()=>C(V=>({...V,notifications:!V.notifications})),children:le.loading&&!le.data?a.jsxs("div",{className:"space-y-2",children:[a.jsx(Fe,{className:"h-14 rounded-md"}),a.jsx(Fe,{className:"h-14 rounded-md"}),a.jsx(Fe,{className:"h-14 rounded-md"})]}):le.error&&!le.data?a.jsx(we,{tone:"warning",title:"Could not load notification channels",action:a.jsx(ee,{variant:"ghost",size:"sm",onClick:le.reload,children:"Retry"}),children:le.error.message}):(le.data??[]).length===0?a.jsxs(we,{tone:"info",title:"No notification channels configured",children:["Add a Discord or Telegram channel in Settings first; this domain's alerts are recorded either way.",a.jsx("div",{className:"mt-2",children:a.jsx(ee,{variant:"secondary",size:"sm",icon:a.jsx(ff,{className:"size-3.5","aria-hidden":"true"}),onClick:ln,children:"Open settings"})})]}):a.jsx("div",{className:"space-y-3",children:My.map(V=>{const pe=p.notifications[V.id];return a.jsxs("div",{className:"rounded-md border border-line bg-raised/30 p-3.5",children:[a.jsx(qt,{checked:pe.enabled,onChange:Ae=>W(V.id,{enabled:Ae}),label:V.label,description:V.description}),pe.enabled&&a.jsx("div",{className:"mt-3 flex flex-wrap gap-1.5 border-t border-line pt-3",children:(le.data??[]).map(Ae=>a.jsx(iS,{channel:Ae,checked:pe.channelIds.includes(Ae.id),onChange:Jt=>je(V.id,Ae.id,Jt)},Ae.id))}),pe.enabled&&pe.channelIds.length===0&&a.jsx("p",{className:"mt-2 text-2xs text-faint",children:"No channels selected — the event is recorded but not delivered."})]},V.id)})})})]})]})}function oS(s){return/^https?:\/\//i.test(s.backendHost||"")?s.backendHost:`${s.upstreamType||"http"}://${s.backendHost||"127.0.0.1"}:${s.port}`}function cS({domain:s}){if(!s.ssl?.enabled)return a.jsx(ve,{tone:"neutral",children:"HTTP only"});const o=s.daysLeft;return o==null?a.jsx(ve,{tone:"neutral",children:"SSL"}):o<0?a.jsx(ve,{tone:"bad",children:"SSL expired"}):o<30?a.jsx(ve,{tone:"warn",children:_s(o)}):a.jsx(ve,{tone:"ok",children:_s(o)})}function uS({entry:s}){return s?s.up===null?a.jsx(ve,{tone:"neutral",dot:!0,children:"External"}):s.up?a.jsx(ve,{tone:"ok",dot:!0,children:"Up"}):a.jsx(ve,{tone:"bad",dot:!0,children:"Down"}):null}function dS(){Vn("Domains");const s=Nt(),o=bn(),{domainHealth:c}=ra(),u=yt(Y=>oe.domains.list(Y)),[d,h]=Vo(),[x,m]=g.useState(""),[p,b]=g.useState("all"),[j,y]=g.useState(null),[N,C]=g.useState(null),[B,S]=g.useState(!1),[T,A]=g.useState(!1);Hl(u.reload),Bs("domains",u.reload);const k=u.data,X=g.useMemo(()=>new Map((c??[]).map(Y=>[Y.name,Y])),[c]),R=d.get("new")==="1",M=d.get("domain"),ne=M?(k??[]).find(Y=>Y.name===M):void 0,L=R?{mode:"create"}:ne?{mode:"edit",domain:ne}:null,Q=g.useRef(null);g.useEffect(()=>{if(!k||!M){Q.current=null;return}if(ne){Q.current=null;return}Q.current!==M&&(Q.current=M,s.error("Domain not found",M),h({},{replace:!0}))},[k,M,ne,h,s]);const ce=()=>h({new:"1"}),P=Y=>h({domain:Y}),ae=()=>h({},{replace:!0}),O=g.useMemo(()=>{const Y=k??[];return{all:Y.length,enabled:Y.filter(re=>re.enabled).length,disabled:Y.filter(re=>!re.enabled).length}},[k]),D=g.useMemo(()=>{const Y=x.trim().toLowerCase();return(k??[]).filter(re=>p==="enabled"&&!re.enabled||p==="disabled"&&re.enabled?!1:Y?[re.name,re.backendHost,String(re.port)].join(" ").toLowerCase().includes(Y):!0)},[k,p,x]),le=async Y=>{const re=!Y.enabled;if(await o({title:`${re?"Enable":"Disable"} "${Y.name}"?`,body:re?"nginx resumes serving this domain with its saved configuration.":"nginx stops serving this domain until you enable it again. The config file is kept.",confirmLabel:re?"Enable":"Disable",tone:re?"accent":"danger"})){y({name:Y.name,action:"toggle"});try{const ke=await oe.domains.toggle(Y.name);u.setData(Ve=>Ve&&Ve.map($e=>$e.name===Y.name?{...$e,enabled:ke.enabled}:$e)),s.success(ke.enabled?"Domain enabled":"Domain disabled",ke.enabled?`${Y.name} is being served again.`:`${Y.name} is no longer served by nginx.`)}catch(ke){s.error(`Could not ${re?"enable":"disable"} the domain`,ke instanceof Be?ke.message:void 0)}finally{y(null)}}},F=async Y=>{y({name:Y.name,action:"reload"});try{const re=await oe.domains.reload(Y.name);s.success("nginx reloaded",re.message||`${Y.name} is live with its current configuration.`)}catch(re){s.error("Could not reload nginx",re instanceof Be?re.message:void 0)}finally{y(null)}},te=Y=>{S(!1),C(Y)},de=async()=>{if(N){A(!0);try{const Y=await oe.domains.remove(N.name,N.ssl.enabled&&B);s.success("Domain deleted",Y.certDeleted?`${N.name}, its nginx config and its certificate files were removed.`:`${N.name} and its nginx config were removed. The certificate files were kept.`),C(null),u.reload()}catch(Y){s.error("Could not delete the domain",Y instanceof Be?Y.message:void 0)}finally{A(!1)}}};return a.jsxs(a.Fragment,{children:[a.jsx(oa,{title:"Domains",description:"Reverse-proxy hosts, their backends and their nginx configuration.",meta:k?a.jsxs("span",{className:"text-2xs text-faint",children:[O.all," total · ",O.enabled," enabled"]}):void 0,actions:a.jsxs(a.Fragment,{children:[a.jsx(ee,{variant:"secondary",size:"sm",loading:u.loading,icon:a.jsx(Lt,{className:"size-3.5","aria-hidden":"true"}),onClick:u.reload,children:"Refresh"}),a.jsx(ee,{variant:"primary",size:"sm",icon:a.jsx(sa,{className:"size-3.5","aria-hidden":"true"}),onClick:ce,children:"Add domain"})]})}),u.error&&!k?a.jsx(Et,{error:u.error,onRetry:u.reload}):k?k.length===0?a.jsx(Ze,{children:a.jsx(On,{icon:a.jsx(_l,{className:"size-5","aria-hidden":"true"}),title:"No domains yet",description:"Add a domain and Easy DevOps writes its nginx config, tests it, and reloads nginx.",action:a.jsx(ee,{variant:"primary",size:"sm",icon:a.jsx(sa,{className:"size-3.5","aria-hidden":"true"}),onClick:ce,children:"Add your first domain"})})}):a.jsxs("div",{className:"space-y-3",children:[u.error&&a.jsxs("div",{className:"rounded-md border border-warn/30 bg-warn-soft px-3.5 py-2.5 text-xs text-muted",children:["Showing the last known list. ",u.error.message," ",a.jsx("button",{type:"button",className:"font-medium text-ink underline-offset-2 hover:underline",onClick:u.reload,children:"Try again"})]}),a.jsxs(Ze,{className:"overflow-hidden",children:[a.jsxs("div",{className:"flex flex-col gap-3 border-b border-line p-3 sm:flex-row sm:items-center sm:justify-between",children:[a.jsxs("div",{className:"relative w-full sm:max-w-xs",children:[a.jsx(rN,{className:"pointer-events-none absolute left-2.5 top-1/2 size-3.5 -translate-y-1/2 text-faint","aria-hidden":"true"}),a.jsx("input",{type:"search","aria-label":"Search domains",placeholder:"Search domain or backend…",value:x,onChange:Y=>m(Y.target.value),className:"h-9 w-full rounded-md border border-line bg-canvas pl-8 pr-3 text-sm text-ink placeholder:text-faint transition-colors duration-[var(--ez-motion-fast)] hover:border-line-strong focus:border-accent focus:outline-none focus:ring-2 focus:ring-accent/25"})]}),a.jsx("div",{role:"group","aria-label":"Filter domains",className:"flex flex-wrap gap-1.5",children:[["all","All",O.all],["enabled","Enabled",O.enabled],["disabled","Disabled",O.disabled]].map(([Y,re,Se])=>a.jsxs("button",{type:"button","aria-pressed":p===Y,onClick:()=>b(Y),className:ie("inline-flex items-center gap-1.5 rounded-pill border px-2.5 py-1 text-xs transition-colors duration-[var(--ez-motion-fast)]",p===Y?"border-accent/50 bg-accent-soft text-accent-text":"border-line text-muted hover:border-line-strong hover:text-ink"),children:[re,a.jsx("span",{className:ie("rounded-pill px-1 text-2xs",p===Y?"bg-accent/15":"bg-inset text-faint"),children:Se})]},Y))})]}),D.length===0?a.jsx(On,{title:"No domains match",description:"Try a different search or show all domains.",action:a.jsx(ee,{variant:"secondary",size:"sm",onClick:()=>{m(""),b("all")},children:"Clear filters"})}):a.jsx("ul",{className:"divide-y divide-line",children:D.map(Y=>{const re=X.get(Y.name),Se=re?.up===!1,ke=j?.name===Y.name,Ve=ke?j?.action:null;return a.jsxs("li",{className:ie("group flex flex-col gap-2.5 px-4 py-3 transition-colors duration-[var(--ez-motion-fast)] hover:bg-raised/40 sm:flex-row sm:items-center sm:gap-4",!Y.enabled&&"opacity-60"),children:[a.jsxs("div",{className:"flex min-w-0 flex-1 items-start gap-3",children:[a.jsx(Zt,{tone:Y.enabled?Se?"bad":"ok":"neutral",pulse:Y.enabled&&!Se,className:"mt-1.5"}),a.jsxs("div",{className:"min-w-0",children:[a.jsxs("div",{className:"flex flex-wrap items-center gap-1.5",children:[a.jsx("button",{type:"button",onClick:()=>P(Y.name),className:"max-w-full truncate text-left font-mono text-sm font-semibold text-ink transition-colors hover:text-accent-text",children:Y.name}),Y.wildcard&&a.jsx(ve,{tone:"accent",children:"wildcard"}),Y.www&&a.jsx(ve,{tone:"neutral",children:"www"}),!Y.enabled&&a.jsx(ve,{tone:"neutral",children:"disabled"}),Y.sslPathWarning&&a.jsx("span",{className:"inline-flex",title:"Certificate paths contain backslashes, which nginx on Windows can fail to load. Open and save this domain to regenerate them with forward slashes.",children:a.jsxs(ve,{tone:"warn",children:[a.jsx(Ra,{className:"size-3","aria-hidden":"true"}),"Backslash cert paths"]})})]}),a.jsxs("div",{className:"mt-0.5 flex flex-wrap items-center gap-x-2 gap-y-1 text-2xs text-muted",children:[a.jsx("span",{className:"max-w-full truncate font-mono",children:oS(Y)}),Y.ssl.enabled&&Y.ssl.redirect&&a.jsxs(a.Fragment,{children:[a.jsx("span",{className:"text-faint","aria-hidden":"true",children:"·"}),a.jsx("span",{children:"HTTP redirects to HTTPS"})]})]})]})]}),a.jsxs("div",{className:"flex flex-wrap items-center gap-1.5 pl-7 sm:w-52 sm:shrink-0 sm:pl-0",children:[a.jsx(cS,{domain:Y}),a.jsx(uS,{entry:re})]}),a.jsxs("div",{className:"flex shrink-0 items-center justify-end gap-1 pl-7 sm:pl-0",children:[a.jsx(at,{label:Y.enabled?`Disable ${Y.name}`:`Enable ${Y.name}`,size:"sm",disabled:ke,onClick:()=>le(Y),className:"text-muted hover:text-ink",children:Ve==="toggle"?a.jsx(sl,{className:"spin size-3.5","aria-hidden":"true"}):Y.enabled?a.jsx(P2,{className:"size-3.5","aria-hidden":"true"}):a.jsx(I2,{className:"size-3.5","aria-hidden":"true"})}),a.jsx(at,{label:`Reload nginx for ${Y.name}`,size:"sm",disabled:ke,onClick:()=>F(Y),className:"text-muted hover:text-ink",children:Ve==="reload"?a.jsx(sl,{className:"spin size-3.5","aria-hidden":"true"}):a.jsx(Lt,{className:"size-3.5","aria-hidden":"true"})}),a.jsx(at,{label:`Edit ${Y.name}`,size:"sm",onClick:()=>P(Y.name),className:"text-muted hover:text-accent-text",children:a.jsx(uf,{className:"size-3.5","aria-hidden":"true"})}),a.jsx(at,{label:`Delete ${Y.name}`,size:"sm",onClick:()=>te(Y),className:"text-muted hover:text-bad",children:a.jsx(Ul,{className:"size-3.5","aria-hidden":"true"})})]})]},Y.name)})})]})]}):a.jsxs(za,{children:[a.jsx(Fe,{className:"h-14 rounded-lg"}),a.jsx(Fe,{className:"h-[320px] rounded-lg"})]}),L&&a.jsx(rS,{editor:L,onClose:ae,onSaved:()=>{ae(),u.reload()}},L.mode==="edit"?`edit:${L.domain.name}`:"create"),a.jsx(yn,{open:N!==null,onClose:()=>{T||C(null)},title:N?`Delete "${N.name}"?`:"Delete domain",description:"This also removes the domain's nginx config. It cannot be undone.",size:"sm",preventClose:T,footer:a.jsxs(a.Fragment,{children:[a.jsx(ee,{variant:"ghost",onClick:()=>C(null),disabled:T,children:"Cancel"}),a.jsx(ee,{variant:"danger",loading:T,onClick:de,children:"Delete domain"})]}),children:N&&a.jsxs("div",{className:"space-y-4",children:[a.jsxs("p",{className:"text-sm text-muted",children:["nginx stops serving ",a.jsx("span",{className:"font-mono text-ink",children:N.name})," ","as soon as the config is removed."]}),N.ssl.enabled&&a.jsx("div",{className:"rounded-md border border-line bg-raised/40 p-3",children:a.jsx(il,{checked:B,onChange:S,label:"Also delete the SSL certificate files",hint:`Otherwise ${N.name}'s certificate stays on disk and can be reused.`})})]})})]})}function fS(s,o){if(s instanceof Be){const c=s.payload.error;if(c&&typeof c=="object")return{title:o,step:c.step,cause:c.cause,consequence:c.consequence,nginxRunning:c.nginxRunning};const u=s.code==="email_required"?"Set the ACME email in Settings → General, or provide an email with this request.":typeof s.payload.hint=="string"?s.payload.hint:void 0,d=typeof s.payload.detail=="string"?s.payload.detail:typeof s.payload.output=="string"?s.payload.output:s.message;return{title:o,summary:u,detail:d}}if(s&&typeof s=="object"){const c=s;return{title:c.step==="email configuration"?"ACME email is not configured":o,step:c.step,cause:c.cause,consequence:c.consequence,nginxRunning:c.nginxRunning}}return typeof s=="string"&&s?{title:o,detail:s}:{title:o,summary:"No certificate was issued."}}function Ly(s){return s==null?"unknown":s<1e3?`${Math.round(s)} ms`:s<6e4?`${(s/1e3).toFixed(1)} s`:`${Math.round(s/6e4)} min`}function hS(s){return s?s==="proxy"?"The HTTP-01 challenge was answered through nginx, so nginx stayed running.":s==="standalone"?"The challenge ran in standalone mode.":s==="dns"?"Validated with a DNS TXT record.":`Validation mode: ${s}.`:null}function Pd({value:s,title:o="Certificate issuance failed"}){const c=fS(s,o),u=!!(c.step||c.cause||c.consequence);return a.jsxs(we,{tone:"danger",title:c.title,children:[c.summary&&a.jsx("p",{children:c.summary}),u&&a.jsxs("dl",{className:"mt-2 grid grid-cols-[auto_1fr] gap-x-3 gap-y-1 text-2xs",children:[c.step&&a.jsxs(a.Fragment,{children:[a.jsx("dt",{className:"text-faint",children:"Step"}),a.jsx("dd",{className:"text-muted",children:c.step})]}),c.cause&&a.jsxs(a.Fragment,{children:[a.jsx("dt",{className:"text-faint",children:"Cause"}),a.jsx("dd",{className:"text-muted",children:c.cause})]}),c.consequence&&a.jsxs(a.Fragment,{children:[a.jsx("dt",{className:"text-faint",children:"Note"}),a.jsx("dd",{className:"text-muted",children:c.consequence})]})]}),c.nginxRunning===!1&&a.jsx("p",{className:"mt-2 text-2xs",children:"nginx is not running right now."}),c.detail&&a.jsx("pre",{className:"mt-2 max-h-48 overflow-auto whitespace-pre-wrap break-all font-mono text-2xs text-muted",children:c.detail})]})}function mS({result:s,title:o="Certificate issued"}){const c=hS(s.mode);return a.jsxs("div",{className:"rounded-md border border-ok/30 bg-ok-soft/40 px-3.5 py-3",children:[a.jsxs("div",{className:"flex items-center gap-2 text-sm font-medium text-ink",children:[a.jsx(Dl,{className:"size-4 shrink-0 text-ok","aria-hidden":"true"}),o]}),s.summary&&a.jsx("p",{className:"mt-1 text-xs text-muted",children:s.summary}),s.fellBack&&a.jsxs(we,{tone:"warning",className:"mt-2.5",children:["The HTTP challenge could not be answered through nginx, so the standalone challenge was used. nginx was stopped for ",Ly(s.nginxDownMs),"."]}),s.staging&&a.jsx(we,{tone:"warning",className:"mt-2.5",children:"This is a staging certificate. Browsers will not trust it; issue again against production before relying on it."}),a.jsxs("dl",{className:"mt-2.5 space-y-1.5",children:[a.jsxs("div",{className:"flex items-start gap-2",children:[a.jsx("dt",{className:"w-16 shrink-0 pt-0.5 text-2xs text-faint",children:"Certificate"}),a.jsx("dd",{className:"min-w-0 flex-1 break-all font-mono text-2xs text-muted",children:s.certPath}),a.jsx(jt,{value:s.certPath,label:"Copy certificate path"})]}),a.jsxs("div",{className:"flex items-start gap-2",children:[a.jsx("dt",{className:"w-16 shrink-0 pt-0.5 text-2xs text-faint",children:"Private key"}),a.jsx("dd",{className:"min-w-0 flex-1 break-all font-mono text-2xs text-muted",children:s.keyPath}),a.jsx(jt,{value:s.keyPath,label:"Copy private key path"})]})]}),c&&a.jsx("p",{className:"mt-2 text-2xs text-faint",children:c})]})}const vg="ssl-known-domains";function xS(s){return"status"in s&&s.status==="waiting_dns"}function pS({error:s}){const o=Array.isArray(s.payload.found)?s.payload.found.filter(u=>typeof u=="string"):[],c=typeof s.payload.hint=="string"?s.payload.hint:s.message;return a.jsxs(we,{tone:"warning",title:"The TXT record was not found yet",children:[a.jsx("p",{children:c}),o.length>0&&a.jsxs("p",{className:"mt-1.5 break-all",children:["Records currently visible:"," ",a.jsx("span",{className:"font-mono text-ink",children:o.join(" · ")})]})]})}function gS({domains:s,initialDomain:o="",onClose:c,onIssued:u}){const d=Nt(),h=bn(),x=Xi(),[m,p]=g.useState(o),[b,j]=g.useState(""),[y,N]=g.useState(!1),[C,B]=g.useState("http"),[S,T]=g.useState("form"),[A,k]=g.useState({}),[X,R]=g.useState(null),[M,ne]=g.useState(!1),[L,Q]=g.useState(null),[ce,P]=g.useState(!1),[ae,O]=g.useState(null),[D,le]=g.useState(null),F=m.trim().startsWith("*.");g.useEffect(()=>{F&&(B("dns"),N(!1))},[F]);const te=m.trim()!==o||b.trim()!==""||y||C!=="http",de=async()=>{const W={},je=pf(m.trim());je&&(W.domain=je);const Ce=_y(b.trim());if(Ce&&(W.email=Ce),W.domain||W.email){k(W),queueMicrotask(()=>document.getElementById(W.domain?"ssl-domain":"ssl-email")?.focus());return}k({}),R(null),O(null),ne(!0);const De=m.trim();try{const fe=await oe.ssl.create({domain:De,www:F?!1:y,validationMethod:F?"dns":C,email:b.trim()||void 0});if(xS(fe)){Q(fe),T("dns");return}le({result:fe,domain:De}),T("success"),u(fe,De)}catch(fe){R(fe)}finally{ne(!1)}},Y=async()=>{if(L){O(null),P(!0);try{const W=await oe.ssl.confirmDns(L.domain),je=L.domain;Q(null),le({result:W,domain:je}),T("success"),u(W,je)}catch(W){W instanceof Be&&(W.code==="dns_not_propagated"||W.code==="dns_lookup_failed")?O(W):(Q(null),T("form"),R(W))}finally{P(!1)}}},re=async()=>{if(L){P(!0);try{await oe.ssl.cancelDns(L.domain),d.info("DNS challenge cancelled","No certificate was issued.")}catch{d.warning("Could not cancel the DNS challenge","It will expire on its own after ten minutes.")}finally{Q(null),O(null),T("form"),P(!1)}}},Se=()=>{p(""),j(""),N(!1),B("http"),k({}),R(null),O(null),le(null),T("form")},ke=M||ce,Ve=async()=>{if(!ke){if(S==="dns"&&L){if(!await h({title:"Cancel the pending DNS challenge?",body:`No certificate will be issued for ${L.domain}. The TXT record can be removed afterwards.`,confirmLabel:"Cancel challenge",cancelLabel:"Keep waiting",tone:"danger"}))return;oe.ssl.cancelDns(L.domain).catch(()=>{}),c();return}S==="form"&&te&&!await h({title:"Discard this certificate request?",body:"The form has not been submitted, so nothing has been issued.",confirmLabel:"Discard",cancelLabel:"Keep editing",tone:"danger"})||c()}},$e=g.useRef(Ve);$e.current=Ve;const E=g.useCallback(()=>{$e.current()},[]),I=X instanceof Be&&X.code==="email_required",K=S==="success"?"Certificate issued":S==="dns"?"DNS validation":"New certificate";return a.jsxs(yn,{open:!0,onClose:E,title:K,description:S==="form"?"Let’s Encrypt issues 90-day certificates. nginx keeps running unless the HTTP challenge has to fall back to standalone mode.":void 0,size:"lg",preventClose:ke,footer:S==="form"?a.jsxs(a.Fragment,{children:[a.jsx(ee,{variant:"ghost",onClick:E,disabled:ke,children:"Cancel"}),a.jsx(ee,{variant:"primary",loading:M,icon:a.jsx(Ea,{className:"size-3.5","aria-hidden":"true"}),onClick:de,children:"Issue certificate"})]}):S==="dns"?a.jsxs(a.Fragment,{children:[a.jsx(ee,{variant:"ghost",onClick:re,disabled:ke,children:"Cancel challenge"}),a.jsx(ee,{variant:"primary",loading:ce,onClick:Y,children:"I’ve added the record"})]}):a.jsxs(a.Fragment,{children:[a.jsx(ee,{variant:"ghost",onClick:Se,children:"Issue another"}),a.jsx(ee,{variant:"primary",onClick:E,children:"Done"})]}),children:[S==="form"&&a.jsxs("div",{className:"space-y-4",children:[X!=null&&a.jsxs("div",{className:"space-y-2",children:[a.jsx(Pd,{value:X}),I&&a.jsx(ee,{variant:"secondary",size:"sm",onClick:()=>{c(),x("/settings")},children:"Open settings"})]}),a.jsx(Ee,{id:"ssl-domain",label:"Domain name",placeholder:"example.com",value:m,onChange:W=>p(W.target.value),error:A.domain,hint:"An A or AAAA record for this name must point at this server for an HTTP challenge.",list:vg,autoComplete:"off",spellCheck:!1,disabled:ke}),a.jsx("datalist",{id:vg,children:s.map(W=>a.jsx("option",{value:W.name},W.name))}),a.jsx(Ee,{id:"ssl-email",label:"ACME email",optional:!0,type:"email",placeholder:"admin@example.com",value:b,onChange:W=>j(W.target.value),error:A.email,hint:"Used by Let’s Encrypt for expiry notices. Falls back to the email saved in Settings.",autoComplete:"email",disabled:ke}),F&&a.jsxs(we,{tone:"info",title:"Wildcard certificate",children:["Wildcard names like ",a.jsx("span",{className:"font-mono",children:"*.example.com"})," can only be validated with a DNS TXT record, so the DNS challenge is selected."]}),a.jsxs("fieldset",{className:"rounded-md border border-line p-3.5",disabled:ke,children:[a.jsx("legend",{className:"px-1 text-xs font-medium text-muted",children:"Challenge method"}),a.jsxs("div",{className:"mt-1 space-y-2",children:[a.jsxs("label",{className:ie("flex cursor-pointer items-start gap-3 rounded-md border px-3.5 py-3 transition-colors",C==="http"&&!F?"border-accent/60 bg-accent-soft":"border-line hover:border-line-strong",(F||ke)&&"cursor-not-allowed opacity-60"),children:[a.jsx("input",{type:"radio",name:"ssl-method",value:"http",checked:C==="http"&&!F,disabled:F||ke,onChange:()=>B("http"),className:"mt-0.5 size-4 accent-[var(--ez-accent)]"}),a.jsxs("span",{className:"min-w-0",children:[a.jsx("span",{className:"block text-sm text-ink",children:"HTTP challenge"}),a.jsx("span",{className:"mt-0.5 block text-xs text-muted",children:"nginx answers the ACME challenge on port 80, so it can keep running."})]})]}),a.jsxs("label",{className:ie("flex cursor-pointer items-start gap-3 rounded-md border px-3.5 py-3 transition-colors",C==="dns"?"border-accent/60 bg-accent-soft":"border-line hover:border-line-strong",ke&&"cursor-not-allowed opacity-60"),children:[a.jsx("input",{type:"radio",name:"ssl-method",value:"dns",checked:C==="dns",disabled:ke,onChange:()=>B("dns"),className:"mt-0.5 size-4 accent-[var(--ez-accent)]"}),a.jsxs("span",{className:"min-w-0",children:[a.jsx("span",{className:"block text-sm text-ink",children:"DNS challenge"}),a.jsx("span",{className:"mt-0.5 block text-xs text-muted",children:"You add a TXT record at your DNS provider. Works for names that do not point at this server yet."})]})]})]})]}),a.jsx(il,{checked:y&&!F,onChange:N,disabled:F||ke,label:m.trim()?`Also cover www.${m.trim().replace(/^\*\./,"")}`:"Also cover the www subdomain",hint:F?"A wildcard certificate already covers every subdomain.":"Both names are added to the same certificate."})]}),S==="dns"&&L&&a.jsxs("div",{className:"space-y-4",children:[a.jsx(we,{tone:"warning",title:"Add this DNS TXT record",children:"Create the record at your DNS provider, then confirm. The challenge waits up to ten minutes; nothing is written to nginx while it waits."}),a.jsxs("dl",{className:"space-y-2.5 rounded-md border border-line bg-raised/40 p-3.5",children:[a.jsxs("div",{className:"flex items-start gap-2",children:[a.jsx("dt",{className:"w-16 shrink-0 pt-0.5 text-2xs text-faint",children:"Name"}),a.jsx("dd",{className:"min-w-0 flex-1 break-all font-mono text-xs text-ink",children:L.txtName}),a.jsx(jt,{value:L.txtName,label:"Copy record name"})]}),a.jsxs("div",{className:"flex items-start gap-2 border-t border-line pt-2.5",children:[a.jsx("dt",{className:"w-16 shrink-0 pt-0.5 text-2xs text-faint",children:"Value"}),a.jsx("dd",{className:"min-w-0 flex-1 break-all font-mono text-xs text-ink",children:L.txtValue}),a.jsx(jt,{value:L.txtValue,label:"Copy record value"})]})]}),a.jsx("p",{className:"text-xs text-faint",children:"DNS changes can take a few minutes to propagate. Confirming checks that the value is publicly visible before Let’s Encrypt does."}),ae&&a.jsx(pS,{error:ae})]}),S==="success"&&D&&a.jsxs("div",{className:"space-y-4",children:[a.jsx(mS,{result:D.result,title:`Certificate issued for ${D.domain}`}),a.jsxs("div",{className:"flex items-start gap-2 text-xs text-muted",children:[a.jsx(Ls,{className:"mt-0.5 size-3.5 shrink-0 text-faint","aria-hidden":"true"}),a.jsx("p",{children:"The files are on disk. To serve them, edit a domain, enable SSL and use these paths."})]}),a.jsxs("div",{className:"flex items-center gap-2 rounded-md border border-line bg-raised/40 px-3.5 py-2.5 text-xs text-muted",children:[a.jsx(Zi,{className:"size-3.5 shrink-0 text-faint","aria-hidden":"true"}),"Rename or move these files only after updating the domain config; nginx reads them by path."]})]})]})}const yS={valid:{label:"Valid",tone:"ok"},expiring:{label:"Expiring",tone:"warn"},expired:{label:"Expired",tone:"bad"},error:{label:"Unreadable",tone:"bad"}};function vS(s){return s===null?"text-faint":s<0?"text-bad":s<30?"text-warn":"text-ink"}function bg(s){const o=[];return s.summary&&o.push(s.summary),s.fellBack&&o.push(`nginx was stopped for ${Ly(s.nginxDownMs)} while the challenge ran.`),s.staging&&o.push("This is a staging certificate that browsers will not trust."),o.join(" ")||"The certificate was renewed."}function bS(s){return s.error&&typeof s.error=="object"?s.error:typeof s.error=="string"?{step:s.error,cause:s.detail}:s.detail??"No certificate was issued."}function jS(){Vn("SSL certificates");const s=Nt(),o=bn(),c=Xi(),u=yt(D=>oe.ssl.list(D)),[d,h]=Vo(),x=d.get("new")==="1"||!!d.get("domain"),m=d.get("domain")??"",p=yt(D=>oe.domains.list(D),[],{enabled:x}),[b,j]=g.useState(null),[y,N]=g.useState(null),[C,B]=g.useState(null),[S,T]=g.useState(null),[A,k]=g.useState(null);Hl(u.reload),Bs(["ssl","domains"],u.reload);const X=u.data,R=g.useMemo(()=>{const D=X??[];return{total:D.length,valid:D.filter(le=>le.status==="valid").length,expiring:D.filter(le=>le.status==="expiring"||le.daysLeft!==null&&le.daysLeft>=0&&le.daysLeft<30).length,expired:D.filter(le=>le.status==="expired"||le.daysLeft!==null&&le.daysLeft<0).length,error:D.filter(le=>le.status==="error").length}},[X]),M=g.useMemo(()=>(X??[]).filter(D=>D.daysLeft!==null&&D.daysLeft<30),[X]),ne=R.expiring>0||R.expired>0||R.error>0,L=()=>h({},{replace:!0}),Q=()=>h({new:"1"}),ce=async D=>{if(!(b||y)){j(D.domain);try{const le=await oe.ssl.renew(D.domain);s.success(`${D.domain} renewed`,bg(le)),u.reload()}catch(le){B({domain:D.domain,error:le})}finally{j(null)}}},P=async D=>{if(!(b||y||!await o({title:`Delete the certificate for ${D.domain}?`,body:"Its files are removed from disk and this cannot be undone. The deletion is refused if any nginx configuration still references the certificate.",confirmLabel:"Delete certificate",tone:"danger"}))){N(D.domain);try{const F=await oe.ssl.remove(D.domain);s.success(`${D.domain} deleted`,`Removed ${F.directory}.`),u.reload()}catch(F){if(F instanceof Be&&F.code==="cert_in_use")k({domain:D.domain,directory:typeof F.payload.directory=="string"?F.payload.directory:null,references:Array.isArray(F.payload.references)?F.payload.references:[]});else{const te=F instanceof Be&&typeof F.payload.detail=="string"?F.payload.detail:F instanceof Error?F.message:void 0;s.error(`Could not delete ${D.domain}`,te)}}finally{N(null)}}},ae=async()=>{if(!(b||y||M.length===0||!await o({title:`Renew ${_n(M.length,"certificate")}?`,body:"Every certificate expiring within 30 days is renewed one at a time. nginx keeps running unless a challenge has to fall back to standalone mode, which stops it briefly.",confirmLabel:"Renew now",tone:"accent"}))){j("all");try{const le=await oe.ssl.renewAll();T(le);const F=le.filter(te=>!te.success).length;le.length===0?s.info("Nothing to renew","No certificate expires within 30 days."):F===0?s.success(`${_n(le.length,"certificate")} renewed`,"The new certificates are already on disk."):s.warning("Some certificates were not renewed",`${le.length-F} renewed, ${F} failed.`),u.reload()}catch(le){B({domain:null,error:le})}finally{j(null)}}},O=C?.error instanceof Be&&C.error.code==="email_required";return a.jsxs(a.Fragment,{children:[a.jsx(oa,{title:"SSL certificates",description:"Let’s Encrypt certificates managed by this installation. Renewals keep nginx running where possible.",meta:X?a.jsxs("span",{className:"text-2xs text-faint",children:[_n(R.total,"certificate")," · ",R.valid," valid"]}):void 0,actions:a.jsxs(a.Fragment,{children:[a.jsx(ee,{variant:"secondary",size:"sm",loading:u.loading,icon:a.jsx(Lt,{className:"size-3.5","aria-hidden":"true"}),onClick:u.reload,children:"Refresh"}),a.jsxs(ee,{variant:"secondary",size:"sm",disabled:M.length===0||b!==null||y!==null,loading:b==="all",onClick:ae,children:["Renew expiring",M.length>0?` (${M.length})`:""]}),a.jsx(ee,{variant:"primary",size:"sm",icon:a.jsx(sa,{className:"size-3.5","aria-hidden":"true"}),onClick:Q,children:"New certificate"})]})}),ne&&a.jsxs(we,{tone:R.expired>0||R.error>0?"danger":"warning",title:"Certificates need attention",className:"mb-4",children:[[R.expired>0?`${R.expired} expired`:null,R.expiring>0?`${R.expiring} expiring within 30 days`:null,R.error>0?`${R.error} unreadable`:null].filter(Boolean).join(" · "),". Renewing uses the same domain; an unreadable certificate is replaced by a freshly issued one."]}),u.error&&!X?a.jsx(Et,{error:u.error,onRetry:u.reload}):X?X.length===0?a.jsx(Ze,{children:a.jsx(On,{icon:a.jsx(Ea,{className:"size-5","aria-hidden":"true"}),title:"No certificates yet",description:"Issue a Let’s Encrypt certificate for a domain, then point the domain’s SSL settings at its files.",action:a.jsx(ee,{variant:"primary",size:"sm",icon:a.jsx(sa,{className:"size-3.5","aria-hidden":"true"}),onClick:Q,children:"Issue a certificate"})})}):a.jsxs("div",{className:"space-y-3",children:[u.error&&a.jsxs("div",{className:"rounded-md border border-warn/30 bg-warn-soft px-3.5 py-2.5 text-xs text-muted",children:["Showing the last known list. ",u.error.message," ",a.jsx("button",{type:"button",className:"font-medium text-ink underline-offset-2 hover:underline",onClick:u.reload,children:"Try again"})]}),a.jsx(Ze,{className:"overflow-hidden",children:a.jsx("ul",{className:"divide-y divide-line",children:X.map(D=>{const le=yS[D.status]??{label:D.status,tone:"neutral"},F=b===D.domain;return a.jsxs("li",{className:"flex flex-col gap-2.5 px-4 py-3 transition-colors duration-[var(--ez-motion-fast)] hover:bg-raised/40 sm:flex-row sm:items-center sm:gap-4",children:[a.jsxs("div",{className:"flex min-w-0 flex-1 items-start gap-3",children:[a.jsx(Zt,{tone:le.tone,pulse:D.status==="valid",className:"mt-1.5"}),a.jsxs("div",{className:"min-w-0",children:[a.jsx("div",{className:"truncate font-mono text-sm font-semibold text-ink",children:D.domain}),a.jsx("div",{className:"mt-0.5 flex flex-wrap items-center gap-x-2 gap-y-1 text-2xs text-muted",children:D.status==="error"?a.jsx("span",{children:"Certificate files are missing or unreadable"}):a.jsxs(a.Fragment,{children:[a.jsxs("span",{children:["Expires ",Ey(D.expiry)]}),a.jsx("span",{className:"text-faint","aria-hidden":"true",children:"·"}),a.jsx("span",{className:ie("font-mono font-medium",vS(D.daysLeft)),children:D.daysLeft!==null?D.daysLeft<0?`${Math.abs(D.daysLeft)}d overdue`:`${D.daysLeft}d`:_s(D.daysLeft)}),D.autoRenew&&D.autoRenew!=="off"&&a.jsxs(a.Fragment,{children:[a.jsx("span",{className:"text-faint","aria-hidden":"true",children:"·"}),a.jsx("span",{title:D.autoRenew==="auto"?"The background service renews this certificate on its own.":D.autoRenew==="manual"?"DNS-validated (wildcard) certificates need a TXT record added by hand, so they are not renewed automatically.":"No enabled domain serves this certificate, so it is not renewed automatically.",className:D.autoRenew==="manual"?"text-warn":void 0,children:D.autoRenew==="auto"?`Auto-renews ${D.autoRenewDays??7}d before expiry`:D.autoRenew==="manual"?"Manual renewal (DNS)":"Not in use"})]})]})})]})]}),a.jsx("div",{className:"flex flex-wrap items-center gap-1.5 pl-7 sm:w-28 sm:shrink-0 sm:pl-0",children:a.jsx(ve,{tone:le.tone,dot:!0,children:le.label})}),a.jsxs("div",{className:"flex shrink-0 flex-wrap items-center justify-end gap-1.5 pl-7 sm:pl-0",children:[a.jsx(ee,{variant:"secondary",size:"sm",loading:F,disabled:b!==null||y!==null,onClick:()=>ce(D),children:"Renew"}),D.status==="error"&&a.jsx(ee,{variant:"dangerGhost",size:"sm",icon:a.jsx(Ul,{className:"size-3.5","aria-hidden":"true"}),loading:y===D.domain,disabled:b!==null||y!==null,onClick:()=>P(D),children:"Delete"})]})]},D.domain)})})})]}):a.jsxs(za,{children:[a.jsx(Fe,{className:"h-14 rounded-lg"}),a.jsx(Fe,{className:"h-[280px] rounded-lg"})]}),x&&a.jsx(gS,{domains:p.data??[],initialDomain:m,onClose:L,onIssued:()=>u.reload()},m||"new"),a.jsx(yn,{open:C!==null,onClose:()=>B(null),title:C?.domain?`${C.domain} was not renewed`:"Renewal failed",description:"The certificate already on disk was not replaced.",size:"md",footer:a.jsxs(a.Fragment,{children:[O&&a.jsx(ee,{variant:"secondary",onClick:()=>{B(null),c("/settings")},children:"Open settings"}),a.jsx(ee,{variant:"primary",onClick:()=>B(null),children:"Close"})]}),children:C&&a.jsx(Pd,{value:C.error,title:"The certificate could not be renewed"})}),a.jsx(yn,{open:S!==null,onClose:()=>T(null),title:"Renewal results",description:S?`${S.filter(D=>D.success).length} of ${S.length} certificates renewed.`:void 0,size:"lg",footer:a.jsx(ee,{variant:"secondary",onClick:()=>T(null),children:"Close"}),children:S&&S.length===0?a.jsx(On,{icon:a.jsx(Ea,{className:"size-5","aria-hidden":"true"}),title:"Nothing to renew",description:"No certificate expires within 30 days."}):a.jsx("ul",{className:"space-y-2.5",children:(S??[]).map(D=>a.jsx("li",{className:"rounded-md border border-line bg-raised/30 px-3.5 py-3",children:a.jsxs("div",{className:"flex items-start gap-2.5",children:[D.success?a.jsx(Dl,{className:"mt-0.5 size-4 shrink-0 text-ok","aria-hidden":"true"}):a.jsx(Yd,{className:"mt-0.5 size-4 shrink-0 text-bad","aria-hidden":"true"}),a.jsxs("div",{className:"min-w-0 flex-1",children:[a.jsx("div",{className:"truncate font-mono text-sm font-medium text-ink",children:D.domain}),D.success?a.jsxs(a.Fragment,{children:[a.jsx("p",{className:"mt-0.5 text-xs text-muted",children:bg(D)}),D.configRegenerated&&a.jsx("p",{className:"mt-1 text-2xs text-faint",children:"The nginx config was regenerated so it can answer the ACME challenge."})]}):a.jsx("div",{className:"mt-2",children:a.jsx(Pd,{value:bS(D),title:`${D.domain} was not renewed`})})]})]})},D.domain))})}),a.jsx(yn,{open:A!==null,onClose:()=>k(null),title:A?`${A.domain} is still referenced`:"Certificate is still referenced",description:"Nothing was deleted. At least one nginx configuration file still points at this certificate.",size:"md",footer:a.jsx(ee,{variant:"secondary",onClick:()=>k(null),children:"Close"}),children:A&&a.jsxs("div",{className:"space-y-3",children:[a.jsx("p",{className:"text-xs text-muted",children:"Disable SSL on the domain that uses this certificate — or remove the matching lines — then try deleting it again."}),A.directory&&a.jsx("p",{className:"break-all font-mono text-2xs text-faint",children:A.directory}),A.references.length>0&&a.jsx("ul",{className:"space-y-2",children:A.references.map(D=>a.jsxs("li",{className:"rounded-md border border-line bg-raised/30 px-3 py-2",children:[a.jsxs("div",{className:"break-all font-mono text-2xs font-medium text-ink",children:[D.file,":",D.line]}),a.jsx("pre",{className:"mt-1 whitespace-pre-wrap break-all font-mono text-2xs text-muted",children:D.text})]},`${D.file}:${D.line}`))})]})})]})}function Uy(s,o={}){const{client:c,connected:u}=ra(),d=o.enabled??!0,h=o.limit??500,[x,m]=g.useState([]),[p,b]=g.useState(!1),[j,y]=g.useState(0),N=g.useRef(p);N.current=p,g.useEffect(()=>{if(!c||!d)return;const T=A=>{if(A.logFile===s){if(N.current){y(k=>Math.min(k+1,999));return}m(k=>{const X=[...k,A.line];return X.length>h?X.slice(X.length-h):X})}};return c.on("logs:line",T),()=>c.off("logs:line",T)},[c,d,h,s]),g.useEffect(()=>{m([]),y(0)},[d,s]),g.useEffect(()=>{if(!(!c||!d||!u))return m([]),y(0),c.emit("logs:subscribe",{logFile:s}),()=>c.emit("logs:unsubscribe")},[c,u,d,s]);const C=g.useCallback(()=>{m([]),y(0)},[]),B=g.useCallback(()=>{m([]),y(0),!(!c||!d)&&(c.emit("logs:unsubscribe"),c.emit("logs:subscribe",{logFile:s}))},[c,d,s]),S=g.useCallback(T=>{b(T),T||y(0)},[]);return{lines:x,paused:p,missed:j,connected:u,clear:C,restart:B,setPaused:S}}const Eo={start:"Start nginx",stop:"Stop nginx",restart:"Restart nginx",reload:"Reload nginx",test:"Test configuration"},NS={start:()=>oe.nginx.start(),stop:()=>oe.nginx.stop(),restart:()=>oe.nginx.restart(),reload:()=>oe.nginx.reload(),test:()=>oe.nginx.test()};function jg(s){return s instanceof Be?typeof s.payload.output=="string"&&s.payload.output?s.payload.output:typeof s.payload.error=="string"&&s.payload.error?s.payload.error:s.message:s instanceof Error?s.message:"The action failed."}function wS(s){return/\[(error|crit|emerg|alert)\]/i.test(s)?"text-bad":/\[warn(ing)?\]/i.test(s)?"text-warn":"text-muted"}function SS(){Vn("Nginx");const s=Nt(),o=bn(),{nginxStatus:c,connectionError:u}=ra(),d=yt(K=>oe.nginx.status(K)),h=yt(K=>oe.nginx.configs(K)),[x,m]=g.useState(null),[p,b]=g.useState(null),[j,y]=g.useState(null),[N,C]=g.useState(null),[B,S]=g.useState(""),[T,A]=g.useState(""),[k,X]=g.useState(!1),[R,M]=g.useState(!1),[ne,L]=g.useState(null),[Q,ce]=g.useState(null),P=g.useRef(null),ae=g.useRef(null),O=Uy("error",{limit:300}),D=g.useRef(null),[le,F]=g.useState(!0);g.useEffect(()=>{d.data&&m(d.data)},[d.data]),g.useEffect(()=>{c&&m(c)},[c]),g.useEffect(()=>{const K=D.current;K&&le&&(K.scrollTop=K.scrollHeight)},[O.lines,le]);const te=N!==null&&B!==T;g.useEffect(()=>{if(!te)return;const K=W=>{W.preventDefault(),W.returnValue=""};return window.addEventListener("beforeunload",K),()=>window.removeEventListener("beforeunload",K)},[te]);const de=()=>{d.reload(),h.reload()};Hl(de),Bs("nginx",de);async function Y(K){if(!(!K||K===N||k||R)&&!(te&&!await o({title:"Discard unsaved changes?",body:`${N} has edits that were not saved.`,confirmLabel:"Discard",cancelLabel:"Keep editing",tone:"danger"}))){C(K),X(!0),L(null),ce(null);try{const W=await oe.nginx.getConfig(K);S(W.content),A(W.content)}catch(W){L(W),S(""),A("")}finally{X(!1)}}}g.useEffect(()=>{N||!h.data?.length||Y(h.data[0])},[h.data,N]);const re=async K=>{if(!p&&!((K==="stop"||K==="restart")&&!await o({title:K==="stop"?"Stop nginx?":"Restart nginx?",body:K==="stop"?"Every site nginx serves goes offline until it is started again.":"Open connections are dropped for a moment while nginx restarts.",confirmLabel:K==="stop"?"Stop nginx":"Restart nginx",tone:"danger"}))){b(K),y(null);try{const W=await NS[K]();y({action:K,ok:W.success,output:W.output}),W.success?(s.success(`${Eo[K]} succeeded`,K==="test"?"nginx -t accepted the configuration.":void 0),K!=="test"&&d.reload()):s.error(`${Eo[K]} failed`,W.output||void 0)}catch(W){const je=jg(W);y({action:K,ok:!1,output:je}),s.error(`${Eo[K]} failed`,je)}finally{b(null)}}},Se=async()=>{if(!(!N||R||k||!te)){M(!0),ce(null);try{const K=await oe.nginx.saveConfig(N,B);A(B),ce({ok:!0,output:K.output||"Saved and tested successfully."}),s.success("Configuration saved","nginx -t passed. Reload nginx to apply it.")}catch(K){ce({ok:!1,output:jg(K)}),s.error("Configuration rejected","The previous file was restored.")}finally{M(!1)}}},ke=()=>{S(T),ce(null)},Ve=g.useMemo(()=>{const K=B.split(`
|
|
444
|
+
`).length;return Array.from({length:Math.max(K,1)},(W,je)=>je+1)},[B]),$e=!!x?.running,E=!x&&(d.loading||!!d.error),I=O.lines.join(`
|
|
445
|
+
`);return a.jsxs(a.Fragment,{children:[a.jsx(oa,{title:"Nginx",description:"Service controls, configuration files and the error log, without leaving the dashboard.",actions:a.jsx(ee,{variant:"secondary",size:"sm",loading:d.loading||h.loading,icon:a.jsx(Lt,{className:"size-3.5","aria-hidden":"true"}),onClick:()=>{de(),O.restart()},children:"Refresh"})}),d.error&&!x?a.jsx(Et,{error:d.error,onRetry:d.reload}):E?a.jsxs(za,{children:[a.jsx(Fe,{className:"h-24 rounded-lg"}),a.jsx(Fe,{className:"h-[380px] rounded-lg"})]}):a.jsxs("div",{className:"space-y-5",children:[d.error&&x&&a.jsxs("div",{className:"rounded-md border border-warn/30 bg-warn-soft px-3.5 py-2.5 text-xs text-muted",children:["Showing the last known status. ",d.error.message," ",a.jsx("button",{type:"button",className:"font-medium text-ink underline-offset-2 hover:underline",onClick:d.reload,children:"Try again"})]}),a.jsxs(Ze,{className:"overflow-hidden",children:[a.jsx("div",{className:ie("h-0.5 w-full",$e?"bg-ok/60":"bg-bad/60"),"aria-hidden":"true"}),a.jsxs(Dn,{className:"flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between",children:[a.jsxs("div",{className:"flex items-center gap-3.5",children:[a.jsxs("div",{className:"relative flex size-11 shrink-0 items-center justify-center rounded-lg border border-line bg-raised",children:[a.jsx(Us,{className:"size-5 text-ink","aria-hidden":"true"}),a.jsx(Zt,{tone:$e?"ok":"bad",pulse:$e,className:"absolute -right-0.5 -top-0.5 ring-2 ring-surface"})]}),a.jsxs("div",{className:"min-w-0",children:[a.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[a.jsx("h2",{className:"text-base font-semibold text-ink",children:$e?"nginx is running":"nginx is stopped"}),x?.pid!==null&&x?.pid!==void 0&&$e&&a.jsxs(ve,{tone:"neutral",children:["pid ",x.pid]})]}),a.jsx("p",{className:"mt-0.5 font-mono text-xs text-muted",children:x?.version??"Version unavailable"}),x?.error&&a.jsx("p",{className:"mt-1 text-xs text-bad",children:x.error})]})]}),a.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[$e?a.jsxs(a.Fragment,{children:[a.jsx(ee,{variant:"secondary",size:"sm",loading:p==="reload",disabled:p!==null&&p!=="reload",onClick:()=>re("reload"),children:"Reload"}),a.jsx(ee,{variant:"secondary",size:"sm",loading:p==="restart",disabled:p!==null&&p!=="restart",onClick:()=>re("restart"),children:"Restart"}),a.jsx(ee,{variant:"danger",size:"sm",loading:p==="stop",disabled:p!==null&&p!=="stop",onClick:()=>re("stop"),children:"Stop"})]}):a.jsx(ee,{variant:"primary",size:"sm",loading:p==="start",disabled:p!==null&&p!=="start",onClick:()=>re("start"),children:"Start nginx"}),a.jsx("span",{className:"mx-0.5 hidden h-6 w-px bg-line sm:block","aria-hidden":"true"}),a.jsx(ee,{variant:"secondary",size:"sm",loading:p==="test",disabled:p!==null&&p!=="test",onClick:()=>re("test"),children:"Test config"})]})]}),j&&a.jsx("div",{className:"border-t border-line px-4 py-3 sm:px-5",children:a.jsx(we,{tone:j.ok?"success":"danger",title:`${Eo[j.action]} ${j.ok?"succeeded":"failed"}`,children:j.output&&a.jsx("pre",{className:"mt-1 max-h-48 overflow-auto whitespace-pre-wrap break-all font-mono text-2xs",children:j.output})})})]}),a.jsxs(Ze,{className:"overflow-hidden",children:[a.jsxs("div",{className:"flex flex-col gap-3 border-b border-line px-4 py-3.5 sm:flex-row sm:items-center sm:justify-between sm:px-5",children:[a.jsxs("div",{className:"min-w-0",children:[a.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[a.jsx("h2",{className:"text-sm font-semibold text-ink",children:"Configuration"}),te&&a.jsx(ve,{tone:"warn",children:"Unsaved changes"})]}),a.jsx("p",{className:"mt-0.5 text-xs text-muted",children:"Every save is written, tested with nginx -t, and rolled back if nginx rejects it."})]}),a.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[a.jsxs(rl,{"aria-label":"Configuration file",value:N??"",disabled:R||k||!h.data?.length,onChange:K=>void Y(K.target.value),className:"w-full sm:w-60",children:[a.jsx("option",{value:"",disabled:!0,children:"Select a config file…"}),(h.data??[]).map(K=>a.jsx("option",{value:K,children:K},K))]}),a.jsx(ee,{variant:"ghost",size:"sm",disabled:!te||R,icon:a.jsx(TN,{className:"size-3.5","aria-hidden":"true"}),onClick:ke,children:"Revert"}),a.jsx(ee,{variant:"primary",size:"sm",disabled:!N||!te,loading:R,icon:a.jsx(Xd,{className:"size-3.5","aria-hidden":"true"}),onClick:Se,children:"Save"})]})]}),h.error&&!h.data?a.jsx("div",{className:"p-4 sm:p-5",children:a.jsx(Et,{error:h.error,onRetry:h.reload})}):h.data?h.data.length===0?a.jsx("div",{className:"px-4 py-14 text-center text-sm text-muted sm:px-5",children:"No configuration files were found."}):k?a.jsxs("div",{className:"flex h-[360px] items-center justify-center gap-2 text-sm text-muted",children:[a.jsx(Lt,{className:"spin size-4","aria-hidden":"true"}),"Loading configuration…"]}):ne?a.jsx("div",{className:"p-4 sm:p-5",children:a.jsx(Et,{error:ne,title:"Could not load this configuration",onRetry:()=>N?void Y(N):void 0})}):N?a.jsxs("div",{className:"relative flex h-[min(56vh,520px)] min-h-[280px] overflow-hidden bg-canvas",children:[a.jsx("div",{ref:ae,"aria-hidden":"true",className:"config-editor pointer-events-none w-12 shrink-0 overflow-hidden border-r border-line bg-inset/40 py-3 pr-2 text-right text-faint",children:Ve.map(K=>a.jsx("div",{children:K},K))}),a.jsx("textarea",{ref:P,value:B,onChange:K=>S(K.target.value),onScroll:()=>{ae.current&&P.current&&(ae.current.scrollTop=P.current.scrollTop)},onKeyDown:K=>{(K.metaKey||K.ctrlKey)&&K.key.toLowerCase()==="s"&&(K.preventDefault(),Se())},wrap:"off",spellCheck:!1,"aria-label":N?`${N} contents`:"nginx configuration",className:"config-editor h-full w-full resize-none bg-transparent py-3 pl-4 pr-4 text-ink caret-accent outline-none"})]}):a.jsx("div",{className:"px-4 py-14 text-center text-sm text-muted sm:px-5",children:"Select a configuration file to start editing."}):a.jsxs("div",{className:"space-y-2 p-4 sm:p-5",children:[a.jsx(Fe,{className:"h-5 w-48"}),a.jsx(Fe,{className:"h-[300px]"})]}),Q&&a.jsxs("div",{className:ie("border-t px-4 py-3 sm:px-5",Q.ok?"border-ok/25 bg-ok-soft":"border-bad/25 bg-bad-soft"),children:[a.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[a.jsx("p",{className:ie("text-xs font-medium",Q.ok?"text-ok":"text-bad"),children:Q.ok?"Saved — nginx test passed":"Save rejected — the previous file was restored"}),Q.ok&&a.jsx(ee,{variant:"secondary",size:"sm",loading:p==="reload",disabled:p!==null&&p!=="reload",onClick:()=>re("reload"),children:"Reload nginx"})]}),Q.output&&a.jsx("pre",{className:"mt-1.5 max-h-40 overflow-auto whitespace-pre-wrap break-all font-mono text-2xs text-muted",children:Q.output})]})]}),a.jsxs(Ze,{className:"overflow-hidden",children:[a.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2 border-b border-line px-4 py-3 sm:px-5",children:[a.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[a.jsx("h2",{className:"text-sm font-semibold text-ink",children:"Error log"}),a.jsxs("span",{className:"inline-flex items-center gap-1.5 text-2xs text-faint",children:[a.jsx(Zt,{tone:O.paused?"warn":O.connected?"ok":"neutral",pulse:!O.paused&&O.connected}),O.paused?"Paused":O.connected?"Live":"Connecting…"]}),O.paused&&O.missed>0&&a.jsxs(ve,{tone:"warn",children:[O.missed," new"]})]}),a.jsxs("div",{className:"flex flex-wrap items-center gap-1.5",children:[I&&a.jsx(jt,{value:I,label:"Copy lines",withText:!0}),a.jsx(at,{label:O.paused?"Resume the log stream":"Pause the log stream",size:"sm",onClick:()=>O.setPaused(!O.paused),children:O.paused?a.jsx(Ki,{className:"size-3.5","aria-hidden":"true"}):a.jsx(py,{className:"size-3.5","aria-hidden":"true"})}),a.jsx(at,{label:"Clear the log view",size:"sm",onClick:O.clear,disabled:O.lines.length===0,children:a.jsx(Lt,{className:"size-3.5 rotate-45","aria-hidden":"true"})})]})]}),a.jsx("div",{ref:D,"aria-label":"Recent nginx error log",onScroll:K=>{const W=K.currentTarget;F(W.scrollHeight-W.scrollTop-W.clientHeight<40)},className:"h-64 overflow-y-auto bg-canvas px-4 py-3 font-mono text-2xs leading-relaxed sm:px-5",children:!O.connected&&O.lines.length===0?a.jsx("p",{className:"text-faint",children:"Waiting for the live stream…"}):O.lines.length===0?a.jsx("p",{className:"text-faint",children:"No errors logged."}):O.lines.map((K,W)=>a.jsx("div",{className:ie("whitespace-pre-wrap break-all py-0.5",wS(K)),children:K},W))}),u&&a.jsxs("div",{className:"border-t border-line px-4 py-2 text-2xs text-muted sm:px-5",children:["The live log stream is disconnected. New lines appear once the dashboard socket reconnects."," ",a.jsx("button",{type:"button",className:"font-medium text-ink underline-offset-2 hover:underline",onClick:O.restart,children:"Try again"})]})]})]})]})}const kS=[{value:"discord",label:"Discord",description:"Post alerts to a channel through a webhook URL.",icon:Lo},{value:"telegram",label:"Telegram",description:"Send alerts through a bot to a chat or group.",icon:gy}];function TS(s){return{name:s?.name??"",type:s?.type??"discord",webhookUrl:s?.webhookUrl??"",botToken:s?.botToken??"",chatId:s?.chatId??"",message:s?.message??""}}function CS(s){if(s instanceof Be){const o=typeof s.payload.detail=="string"?s.payload.detail:null;return o||s.message}return s instanceof Error?s.message:"The channel could not be saved."}function ES({channel:s,onClose:o,onSaved:c}){const u=bn(),d=s!==null,h=g.useRef(TS(s)),[x,m]=g.useState(h.current),[p,b]=g.useState({}),[j,y]=g.useState(null),[N,C]=g.useState(!1),B=Object.keys(x).some(k=>x[k]!==h.current[k]),S=(k,X)=>{m(R=>({...R,[k]:X})),b(R=>({...R,[k]:void 0})),y(null)},T=()=>{if(!N){if(!B){o();return}u({title:d?"Discard channel changes?":"Discard this channel?",body:"Nothing has been sent to the server yet.",confirmLabel:"Discard",cancelLabel:"Keep editing",tone:"danger"}).then(k=>{k&&o()})}},A=async()=>{if(N)return;const k={};if(x.name.trim()||(k.name="Give the channel a name."),x.type==="discord"){const R=x.webhookUrl.trim();R?/^https:\/\/\S+$/i.test(R)||(k.webhookUrl="Enter an https:// URL without spaces."):k.webhookUrl="A Discord webhook URL is required."}else x.botToken.trim()||(k.botToken="The bot token is required."),x.chatId.trim()||(k.chatId="The chat ID is required.");if(b(k),Object.keys(k).length>0)return;const X={name:x.name.trim(),type:x.type,...x.type==="discord"?{webhookUrl:x.webhookUrl.trim(),message:x.message.trim()}:{botToken:x.botToken.trim(),chatId:x.chatId.trim()}};C(!0),y(null);try{const R=s?await oe.settings.channels.update(s.id,X):await oe.settings.channels.create(X);c(R,!d)}catch(R){y(CS(R))}finally{C(!1)}};return a.jsx(yn,{open:!0,onClose:T,title:d?`Edit ${s.name}`:"New notification channel",description:d?"Change where this channel delivers, or how its messages look.":"Add a Discord webhook or a Telegram bot. Domains choose their channels per event.",preventClose:N,footer:a.jsxs(a.Fragment,{children:[a.jsx(ee,{variant:"secondary",onClick:T,disabled:N,children:"Cancel"}),a.jsx(ee,{variant:"primary",type:"submit",form:"channel-form",loading:N,children:d?"Save channel":"Create channel"})]}),children:a.jsxs("form",{id:"channel-form",onSubmit:k=>{k.preventDefault(),A()},className:"space-y-4",children:[j&&a.jsx(we,{tone:"danger",title:"Could not save the channel",children:j}),a.jsx(Ee,{label:"Name",value:x.name,onChange:k=>S("name",k.target.value),placeholder:"Production Discord",error:p.name,autoFocus:!0}),a.jsxs("fieldset",{disabled:d||N,children:[a.jsx("legend",{className:"mb-1.5 text-xs font-medium text-muted",children:"Type"}),a.jsx("div",{className:"grid gap-2 sm:grid-cols-2",children:kS.map(k=>{const X=x.type===k.value;return a.jsxs("label",{className:ie("flex cursor-pointer items-start gap-2.5 rounded-md border p-3 transition-colors duration-[var(--ez-motion-fast)]",X?"border-accent bg-accent-soft":"border-line bg-canvas hover:border-line-strong",(d||N)&&"cursor-not-allowed opacity-70"),children:[a.jsx("input",{type:"radio",name:"channel-type",value:k.value,checked:X,onChange:()=>S("type",k.value),className:"mt-0.5 size-3.5 accent-[var(--ez-accent)]"}),a.jsxs("span",{className:"min-w-0",children:[a.jsxs("span",{className:"flex items-center gap-1.5 text-sm font-medium text-ink",children:[a.jsx(k.icon,{className:"size-3.5 text-muted","aria-hidden":"true"}),k.label]}),a.jsx("span",{className:"mt-0.5 block text-2xs text-faint",children:k.description})]})]},k.value)})}),d&&a.jsx(Ol,{children:"The channel type cannot be changed after it is created."})]}),x.type==="discord"?a.jsxs(a.Fragment,{children:[a.jsx(Ee,{label:"Webhook URL",value:x.webhookUrl,onChange:k=>S("webhookUrl",k.target.value),placeholder:"https://discord.com/api/webhooks/…",error:p.webhookUrl,hint:"Create one in Discord under Channel settings → Integrations → Webhooks.",className:"font-mono",spellCheck:!1,autoComplete:"off"}),a.jsxs("div",{children:[a.jsx(Ee,{label:"Message prefix",optional:!0,value:x.message,onChange:k=>S("message",k.target.value),placeholder:"<@&1280907071813976196> or @team",hint:"Prepended to every alert in this channel.",spellCheck:!1}),a.jsxs("div",{className:"mt-2 rounded-md border border-info/25 bg-info-soft px-3 py-2 text-2xs text-muted",children:["Tip: to ping a Discord role, paste its mention as"," ",a.jsx("code",{className:"rounded bg-inset px-1 py-0.5 font-mono text-[10px] text-ink",children:"<@&RoleId>"})," ","— for example"," ",a.jsx("code",{className:"rounded bg-inset px-1 py-0.5 font-mono text-[10px] text-ink",children:"<@&1280907071813976196>"}),". The role is mentioned on every alert."]})]})]}):a.jsxs("div",{className:"grid gap-4 sm:grid-cols-2",children:[a.jsx(Ee,{label:"Bot token",value:x.botToken,onChange:k=>S("botToken",k.target.value),placeholder:"123456:ABC…",error:p.botToken,hint:"From @BotFather.",className:"font-mono",spellCheck:!1,autoComplete:"off"}),a.jsx(Ee,{label:"Chat ID",value:x.chatId,onChange:k=>S("chatId",k.target.value),placeholder:"-1001234567890",error:p.chatId,hint:"Groups start with a minus sign.",className:"font-mono",spellCheck:!1,autoComplete:"off"})]})]})})}const zS={nginx_down:"nginx",cert_expiry:"Certificate",domain_health:"Health check",test:"Test message"};function RS(s){return s.type==="nginx_down"?Us:s.type==="cert_expiry"?Ra:s.type==="domain_health"?Oo:vy}function AS(s){return s==="danger"?"text-bad":s==="warning"?"text-warn":s==="success"?"text-ok":s==="info"?"text-info":"text-muted"}function Ng(s,o){return s instanceof Be?(typeof s.payload.detail=="string"?s.payload.detail:null)??s.message:s instanceof Error?s.message:o}function DS(s){if(!s)return"Webhook URL not set";try{const o=new URL(s),c=o.pathname.split("/").filter(Boolean).pop()??"";return`${o.host}/…${c.slice(-4)}`}catch{return"Webhook URL configured"}}function _S(s){return s.type==="discord"?DS(s.webhookUrl):`Chat ${s.chatId??"—"} · bot token saved`}function MS(){Vn("Notifications");const s=Nt(),o=bn(),{notifications:c,clearNotifications:u,connected:d,connectionError:h}=ra(),x=yt(R=>oe.settings.channels.list(R)),m=yt(R=>oe.domains.list(R)),[p,b]=g.useState(null),[j,y]=g.useState(null),[N,C]=g.useState(null),[,B]=g.useState(0);g.useEffect(()=>{const R=setInterval(()=>B(M=>M+1),3e4);return()=>clearInterval(R)},[]);const S=()=>{x.reload(),m.reload()};Hl(S),Bs(["settings","domains"],S);const T=g.useMemo(()=>{const R=new Map;for(const M of m.data??[]){if(!M.enabled)continue;const ne=new Map;for(const L of Object.values(M.notifications))if(L.enabled)for(const Q of L.channelIds)ne.set(Q,(ne.get(Q)??0)+1);for(const[L,Q]of ne){const ce=R.get(L)??{domains:0,rules:0};ce.domains+=1,ce.rules+=Q,R.set(L,ce)}}return R},[m.data]),A=async R=>{if(!j){y(R.id);try{await oe.settings.channels.test(R.id),s.success(`Test sent to ${R.name}`,"Check the channel to confirm the message arrived.")}catch(M){s.error(`Test failed for ${R.name}`,Ng(M,"The test message could not be delivered."))}finally{y(null)}}},k=async R=>{if(!(N||!await o({title:`Delete ${R.name}?`,body:"Domains routed to this channel stop delivering alerts there. The domains themselves are not changed.",confirmLabel:"Delete channel",tone:"danger"}))){C(R.id);try{await oe.settings.channels.remove(R.id),s.success("Channel deleted",`${R.name} will no longer receive alerts.`),x.reload()}catch(ne){s.error("Could not delete the channel",Ng(ne,"The channel is still configured."))}finally{C(null)}}},X=x.data;return a.jsxs(a.Fragment,{children:[a.jsx(oa,{title:"Notifications",description:"Delivery channels for alerts, and the events received in this session.",actions:a.jsxs(a.Fragment,{children:[a.jsx(ee,{variant:"secondary",size:"sm",loading:x.loading||m.loading,icon:a.jsx(Lt,{className:"size-3.5","aria-hidden":"true"}),onClick:S,children:"Refresh"}),a.jsx(ee,{variant:"primary",size:"sm",icon:a.jsx(sa,{className:"size-3.5","aria-hidden":"true"}),onClick:()=>b({channel:null}),children:"New channel"})]})}),x.error&&!X?a.jsx(Et,{error:x.error,onRetry:x.reload}):X?a.jsxs("div",{className:"grid items-start gap-5 xl:grid-cols-[minmax(0,1fr)_380px]",children:[a.jsx("div",{className:"space-y-5",children:a.jsxs(Ze,{className:"overflow-hidden",children:[a.jsx(nn,{title:"Channels",description:"Named Discord and Telegram destinations. Domains choose which channels receive their events.",actions:X.length>0?a.jsx(ve,{tone:"neutral",children:_n(X.length,"channel")}):void 0}),x.error&&a.jsxs("div",{className:"border-b border-line px-4 py-2 text-2xs text-muted sm:px-5",children:["Showing the last known list. ",x.error.message," ",a.jsx("button",{type:"button",className:"font-medium text-ink underline-offset-2 hover:underline",onClick:x.reload,children:"Try again"})]}),X.length===0?a.jsx(On,{icon:a.jsx(Lo,{className:"size-5","aria-hidden":"true"}),title:"No channels yet",description:"Add a Discord webhook or a Telegram bot, then route domain events to it. Until then, alerts stay in the dashboard only.",action:a.jsx(ee,{variant:"primary",size:"sm",icon:a.jsx(sa,{className:"size-3.5","aria-hidden":"true"}),onClick:()=>b({channel:null}),children:"New channel"})}):a.jsx("ul",{className:"divide-y divide-line/70",children:X.map(R=>{const M=R.type==="discord"?Lo:gy,ne=T.get(R.id),L=N===R.id;return a.jsxs("li",{className:"flex flex-col gap-3 px-4 py-3.5 sm:flex-row sm:items-center sm:justify-between sm:px-5",children:[a.jsxs("div",{className:"flex min-w-0 items-start gap-3",children:[a.jsx("div",{className:ie("flex size-9 shrink-0 items-center justify-center rounded-md border border-line",R.type==="discord"?"bg-info-soft text-info":"bg-accent-soft text-accent-text"),children:a.jsx(M,{className:"size-4","aria-hidden":"true"})}),a.jsxs("div",{className:"min-w-0",children:[a.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[a.jsx("span",{className:"truncate text-sm font-medium text-ink",children:R.name}),a.jsx(ve,{tone:"neutral",children:R.type==="discord"?"Discord":"Telegram"}),m.data&&(ne?a.jsxs(ve,{tone:"ok",dot:!0,className:"cursor-default",children:[ne.domains," ",ne.domains===1?"domain":"domains"]}):a.jsx(ve,{tone:"neutral",children:"Not routed yet"}))]}),a.jsx("p",{className:"mt-0.5 truncate font-mono text-xs text-muted",children:_S(R)}),R.type==="discord"&&R.message&&a.jsxs("p",{className:"mt-0.5 truncate text-2xs text-faint",children:["Prefix: ",R.message]})]})]}),a.jsxs("div",{className:"flex shrink-0 items-center gap-1.5 pl-12 sm:pl-0",children:[a.jsx(ee,{variant:"secondary",size:"sm",loading:j===R.id,disabled:j!==null&&j!==R.id,icon:a.jsx(x2,{className:"size-3.5","aria-hidden":"true"}),onClick:()=>void A(R),children:"Test"}),a.jsx(ee,{variant:"ghost",size:"sm",disabled:L,icon:a.jsx(uf,{className:"size-3.5","aria-hidden":"true"}),onClick:()=>b({channel:R}),children:"Edit"}),a.jsx(at,{label:`Delete ${R.name}`,size:"sm",disabled:L,className:"hover:text-bad",onClick:()=>void k(R),children:a.jsx(Ul,{className:"size-3.5","aria-hidden":"true"})})]})]},R.id)})}),X.length>0&&a.jsx("div",{className:"border-t border-line bg-raised/40 px-4 py-2.5 text-2xs text-faint sm:px-5",children:m.error?"Domain routing could not be loaded, so usage counts are hidden.":"Counts include enabled domains that route at least one event to a channel."})]})}),a.jsxs("div",{className:"space-y-5",children:[a.jsxs(Ze,{className:"overflow-hidden",children:[a.jsx(nn,{icon:a.jsx(sg,{className:"size-4","aria-hidden":"true"}),title:"Recent events",description:"Received live while this page is open.",actions:a.jsxs("span",{className:"inline-flex items-center gap-1.5 text-2xs text-faint",children:[a.jsx(Zt,{tone:d?"ok":"warn",pulse:d}),d?"Live":"Reconnecting…"]})}),h&&a.jsx("div",{className:"border-b border-line px-4 py-2.5 sm:px-5",children:a.jsx(we,{tone:"warning",children:h})}),c.length===0?a.jsx(On,{icon:a.jsx(sg,{className:"size-5","aria-hidden":"true"}),title:"No events yet",description:"Alerts appear here as they happen. The bell in the header keeps the same list between pages.",className:"py-9"}):a.jsxs(a.Fragment,{children:[a.jsx("ul",{className:"max-h-[420px] divide-y divide-line/70 overflow-y-auto",children:c.map(R=>{const M=RS(R);return a.jsxs("li",{className:"flex items-start gap-2.5 px-4 py-2.5 sm:px-5",children:[a.jsx(M,{className:ie("mt-0.5 size-4 shrink-0",AS(R.severity)),"aria-hidden":"true"}),a.jsxs("div",{className:"min-w-0 flex-1",children:[a.jsx("p",{className:"text-xs leading-snug text-ink",children:R.message}),a.jsxs("p",{className:"mt-0.5 flex flex-wrap items-center gap-x-1.5 text-2xs text-faint",children:[a.jsx("span",{children:zS[R.type]??"Notification"}),R.domain&&a.jsxs("span",{children:["· ",R.domain]}),a.jsxs("span",{children:["· ",Pi(R.timestamp)]})]})]})]},R.id)})}),a.jsx("div",{className:"border-t border-line bg-raised/40 px-4 py-2 sm:px-5",children:a.jsx("button",{type:"button",onClick:u,className:"text-2xs font-medium text-muted transition-colors hover:text-ink",children:"Clear all events"})})]})]}),a.jsxs(Ze,{children:[a.jsx(nn,{title:"How routing works",description:"Channels do nothing until a domain sends to them."}),a.jsxs(Dn,{className:"space-y-3",children:[a.jsx("ol",{className:"space-y-2.5",children:["Create a channel here and send it a test message.","Open a domain and pick channels for nginx downtime, certificate expiry and health events.","Toggle each event separately — turning one off keeps the others delivering."].map((R,M)=>a.jsxs("li",{className:"flex gap-2.5 text-xs text-muted",children:[a.jsx("span",{className:"mt-0.5 flex size-4.5 shrink-0 items-center justify-center rounded-full bg-inset text-2xs font-semibold text-muted",children:M+1}),a.jsx("span",{children:R})]},R))}),a.jsxs(bt,{to:"/domains",className:Ta("secondary","sm","w-full"),children:["Open domains",a.jsx(Ls,{className:"size-3.5","aria-hidden":"true"})]})]})]})]})]}):a.jsxs(za,{children:[a.jsx(Fe,{className:"h-40 rounded-lg"}),a.jsx(Fe,{className:"h-64 rounded-lg"})]}),p&&a.jsx(ES,{channel:p.channel,onClose:()=>b(null),onSaved:(R,M)=>{b(null),x.reload(),s.success(M?"Channel created":"Channel updated",M?`${R.name} is ready to receive alerts.`:`${R.name} was saved.`)}},p.channel?.id??"new")]})}function wg(s,o){return s instanceof Be?typeof s.payload.detail=="string"?s.payload.detail:typeof s.payload.message=="string"?s.payload.message:s.message:s instanceof Error?s.message:o}function Bo(s){return s==="online"?"ok":s==="errored"?"bad":s==="stopping"||s==="launching"?"warn":"neutral"}function Hy(s){return s===null||s===0?"—":uw(s)}function By(s){return s===null||s===0?"—":zy(s)}function Sg(s,o){const c=o?.replace(/\\/g,"/").replace(/\/+$/,"").toLowerCase()??null;return[s.execPath,s.cwd].some(u=>{if(!u)return!1;const d=u.replace(/\\/g,"/").toLowerCase();return c&&d.startsWith(`${c}/modules/`)?!0:/(^|\/)(\.pm2|pm2)\/modules\//.test(d)})}function zo({label:s,value:o}){return a.jsxs("div",{children:[a.jsx("div",{className:"text-2xs font-medium uppercase tracking-wider text-faint",children:s}),a.jsx("div",{className:"mt-0.5 text-xs tabular-nums text-muted",children:o})]})}function ll({label:s,value:o,detail:c,tone:u}){return a.jsxs("div",{children:[a.jsx("div",{className:"text-2xs font-medium uppercase tracking-wider text-faint",children:s}),a.jsx("div",{className:ie("mt-0.5 text-sm font-medium",u??"text-ink"),children:o}),c&&a.jsx("div",{className:"mt-0.5 text-2xs text-faint",children:c})]})}function OS({command:s,guidance:o}){return a.jsxs("div",{className:"rounded-md border border-line bg-canvas p-3",children:[a.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[a.jsx("code",{className:"break-all font-mono text-xs text-ink",children:s}),a.jsx(jt,{value:s,label:"Copy command",withText:!0})]}),a.jsx("p",{className:"mt-2 text-2xs leading-relaxed text-muted",children:o})]})}function kg({label:s,version:o,path:c,broken:u=!1,emptyLabel:d="Unknown"}){return a.jsxs("div",{children:[a.jsx("div",{className:"text-2xs text-faint",children:s}),a.jsx("div",{className:ie("text-xs font-medium",u?"text-warn":"text-ink"),children:o??(u?"Missing":d)}),a.jsx("div",{className:"break-all font-mono text-2xs text-faint",children:c??"—"})]})}function LS({runtime:s}){const o=yw(s);return o?a.jsxs("div",{className:"rounded-md border border-line bg-canvas/40 px-3.5 py-3",children:[a.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[a.jsx("div",{className:"text-2xs font-medium uppercase tracking-wider text-faint",children:"Node runtime"}),o.broken?a.jsx(ve,{tone:"warn",children:"service runtime missing"}):o.pinned?o.sameAsSystem?a.jsx(ve,{tone:"neutral",children:"same as system"}):a.jsx(ve,{tone:"info",children:"pinned copy"}):a.jsx(ve,{tone:"warn",children:"not pinned"})]}),a.jsxs("div",{className:"mt-2 grid gap-3 sm:grid-cols-2",children:[a.jsx(kg,{label:"Service Node",version:o.serviceVersion,path:o.servicePath,broken:o.broken,emptyLabel:o.pinned?"Unknown":"Not pinned"}),a.jsx(kg,{label:"System Node",version:o.systemVersion,path:o.systemPath})]}),o.manager&&a.jsxs("p",{className:"mt-2 text-2xs text-faint",children:["The system Node is managed by ",o.manager,". The service uses its own pinned binary so switching versions cannot break it."]}),!o.pinned&&!o.broken&&a.jsxs("p",{className:"mt-2 text-2xs text-faint",children:["No pinned Node was found. The service will start with whatever"," ",a.jsx("code",{className:"font-mono",children:"node"})," its launcher resolves;"," ",a.jsx("code",{className:"font-mono",children:"ezz service repair"})," pins one."]}),o.pinned&&!o.sameAsSystem&&!o.broken&&o.serviceVersion&&a.jsxs("p",{className:"mt-2 text-2xs text-faint",children:["The service is pinned to a different Node than this dashboard. That is normal after an upgrade; ",a.jsx("code",{className:"font-mono",children:"ezz service repair"})," re-pins it."]})]}):null}function US({app:s,onClose:o}){const c=yt(d=>oe.processes.logs(s.name,200,d)),u=(c.data?.lines??[]).join(`
|
|
446
|
+
`);return a.jsx(yn,{open:!0,onClose:o,title:`Logs — ${s.name}`,description:"The last 200 lines PM2 has written for this process.",size:"lg",footer:a.jsxs(a.Fragment,{children:[u.trim()&&a.jsx(jt,{value:u,label:"Copy logs",withText:!0}),a.jsx(ee,{variant:"secondary",onClick:o,children:"Close"})]}),children:c.error&&!c.data?a.jsx(Et,{error:c.error,title:"Could not read the logs",onRetry:c.reload,className:"border-0"}):c.data?a.jsx("pre",{className:"max-h-[55vh] overflow-auto whitespace-pre-wrap break-all rounded-md border border-line bg-canvas p-3.5 font-mono text-2xs leading-relaxed text-muted",children:u.trim()?u:"(no output)"}):a.jsxs("div",{className:"flex items-center justify-center gap-2 py-10 text-sm text-muted",children:[a.jsx(Ms,{}),"Reading logs…"]})})}function Tg({app:s,isModule:o,busy:c,currentUser:u,onAction:d,onLogs:h}){const x=c?.name===s.name,m=!!(s.user&&u&&s.user!==u);return a.jsxs("li",{className:"px-4 py-3.5 sm:px-5",children:[a.jsxs("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between",children:[a.jsxs("div",{className:"min-w-0",children:[a.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[a.jsx(Zt,{tone:Bo(s.status),pulse:s.status==="online"}),a.jsx("span",{className:"truncate text-sm font-medium text-ink",children:s.name}),a.jsx(ve,{tone:Bo(s.status),children:s.status}),o&&a.jsx(ve,{tone:"info",children:"module"}),m&&a.jsx(ve,{tone:"warn",children:s.user})]}),(s.execPath||s.cwd)&&a.jsx("p",{className:"mt-0.5 truncate font-mono text-2xs text-faint",children:s.execPath??s.cwd})]}),a.jsxs("div",{className:"flex shrink-0 flex-wrap items-center gap-1.5",children:[s.status==="online"?a.jsx(ee,{variant:"secondary",size:"sm",loading:x&&c?.action==="stop",disabled:x||m,icon:a.jsx(hf,{className:"size-3","aria-hidden":"true"}),onClick:()=>d(s,"stop",o),children:"Stop"}):a.jsx(ee,{variant:"secondary",size:"sm",loading:x&&c?.action==="start",disabled:x||m,icon:a.jsx(Ki,{className:"size-3","aria-hidden":"true"}),onClick:()=>d(s,"start",o),children:"Start"}),a.jsx(ee,{variant:"ghost",size:"sm",loading:x&&c?.action==="restart",disabled:x||m,icon:a.jsx(df,{className:"size-3.5","aria-hidden":"true"}),onClick:()=>d(s,"restart",o),children:"Restart"}),a.jsx(ee,{variant:"ghost",size:"sm",disabled:x,icon:a.jsx($i,{className:"size-3.5","aria-hidden":"true"}),onClick:()=>h(s),children:"Logs"})]})]}),a.jsxs("div",{className:"mt-3 grid grid-cols-2 gap-3 sm:grid-cols-4",children:[a.jsx(zo,{label:"CPU",value:Hy(s.cpu)}),a.jsx(zo,{label:"Memory",value:By(s.memoryBytes)}),a.jsx(zo,{label:"Uptime",value:Xo(s.uptimeMs)}),a.jsx(zo,{label:"Restarts",value:s.unstableRestarts>0?`${s.restarts} · ${s.unstableRestarts} unstable`:String(s.restarts)})]})]})}const qy="ez.processes.view";function HS(){try{return localStorage.getItem(qy)==="table"?"table":"list"}catch{return"list"}}function BS({view:s,onChange:o}){const c=[{id:"list",label:"List view",icon:O2},{id:"table",label:"Table view",icon:NN}];return a.jsx("div",{role:"group","aria-label":"Process layout",className:"inline-flex items-center gap-0.5 rounded-md border border-line bg-raised p-0.5",children:c.map(({id:u,label:d,icon:h})=>a.jsxs("button",{type:"button","aria-pressed":s===u,title:d,onClick:()=>o(u),className:ie("inline-flex size-7 items-center justify-center rounded-sm transition-colors duration-[var(--ez-motion-fast)]",s===u?"bg-surface text-ink shadow-sm":"text-faint hover:text-ink"),children:[a.jsx(h,{className:"size-3.5","aria-hidden":"true"}),a.jsx("span",{className:"sr-only",children:d})]},u))})}function qS({app:s}){return s.unstableRestarts>0?`${s.restarts} · ${s.unstableRestarts} unstable`:String(s.restarts)}function Cg({apps:s,isModule:o,busy:c,currentUser:u,onAction:d,onLogs:h}){return a.jsx("div",{className:"overflow-x-auto",children:a.jsxs("table",{className:"w-full min-w-[42rem] text-left text-sm",children:[a.jsx("thead",{children:a.jsxs("tr",{className:"border-b border-line text-2xs uppercase tracking-wider text-faint",children:[a.jsx("th",{scope:"col",className:"px-4 py-2 font-medium sm:px-5",children:"Process"}),a.jsx("th",{scope:"col",className:"px-3 py-2 font-medium",children:"Status"}),a.jsx("th",{scope:"col",className:"px-3 py-2 text-right font-medium",children:"CPU"}),a.jsx("th",{scope:"col",className:"px-3 py-2 text-right font-medium",children:"Memory"}),a.jsx("th",{scope:"col",className:"px-3 py-2 font-medium",children:"Uptime"}),a.jsx("th",{scope:"col",className:"px-3 py-2 text-right font-medium",children:"Restarts"}),a.jsx("th",{scope:"col",className:"px-4 py-2 text-right font-medium sm:px-5",children:a.jsx("span",{className:"sr-only",children:"Actions"})})]})}),a.jsx("tbody",{children:s.map(x=>{const m=c?.name===x.name,p=!!(x.user&&u&&x.user!==u);return a.jsxs("tr",{className:"border-b border-line/70 last:border-0",children:[a.jsx("td",{className:"px-4 py-2 sm:px-5",children:a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx(Zt,{tone:Bo(x.status),pulse:x.status==="online"}),a.jsx("span",{className:"truncate text-sm font-medium text-ink",children:x.name}),o&&a.jsx(ve,{tone:"info",children:"module"}),p&&a.jsx(ve,{tone:"warn",children:x.user})]})}),a.jsx("td",{className:"whitespace-nowrap px-3 py-2",children:a.jsx(ve,{tone:Bo(x.status),children:x.status})}),a.jsx("td",{className:"whitespace-nowrap px-3 py-2 text-right tabular-nums text-muted",children:Hy(x.cpu)}),a.jsx("td",{className:"whitespace-nowrap px-3 py-2 text-right tabular-nums text-muted",children:By(x.memoryBytes)}),a.jsx("td",{className:"whitespace-nowrap px-3 py-2 tabular-nums text-muted",children:Xo(x.uptimeMs)}),a.jsx("td",{className:"whitespace-nowrap px-3 py-2 text-right tabular-nums text-muted",children:a.jsx(qS,{app:x})}),a.jsx("td",{className:"px-4 py-2 sm:px-5",children:a.jsxs("div",{className:"flex items-center justify-end gap-1",children:[x.status==="online"?a.jsx(at,{label:`Stop ${x.name}`,size:"sm",disabled:m||p,onClick:()=>d(x,"stop",o),children:m&&c?.action==="stop"?a.jsx(sl,{className:"spin size-3.5","aria-hidden":"true"}):a.jsx(hf,{className:"size-3","aria-hidden":"true"})}):a.jsx(at,{label:`Start ${x.name}`,size:"sm",disabled:m||p,onClick:()=>d(x,"start",o),children:m&&c?.action==="start"?a.jsx(sl,{className:"spin size-3.5","aria-hidden":"true"}):a.jsx(Ki,{className:"size-3","aria-hidden":"true"})}),a.jsx(at,{label:`Restart ${x.name}`,size:"sm",disabled:m||p,onClick:()=>d(x,"restart",o),children:m&&c?.action==="restart"?a.jsx(sl,{className:"spin size-3.5","aria-hidden":"true"}):a.jsx(df,{className:"size-3.5","aria-hidden":"true"})}),a.jsx(at,{label:`View logs for ${x.name}`,size:"sm",disabled:m,onClick:()=>h(x),children:a.jsx($i,{className:"size-3.5","aria-hidden":"true"})})]})})]},`${x.name}-${x.pmId??"x"}`)})})]})})}function $S(){Vn("Processes");const s=Nt(),o=bn(),{service:c,loading:u,error:d,reload:h,applyBackgroundService:x}=Ji(),m=Fi(c),p=yt(O=>oe.processes.list(O)),[b,j]=g.useState(null),[y,N]=g.useState(null),[C,B]=g.useState(null),[S,T]=g.useState(null),[A,k]=g.useState(HS),X=O=>{k(O);try{localStorage.setItem(qy,O)}catch{}},R=()=>{p.reload(),h()};Ml(p.reload,15e3),Ml(()=>{u||h()},15e3),Hl(R);const M=async(O,D,le)=>{if(!b){if(D==="stop"||D==="restart"){const F=le?D==="stop"?O.name.toLowerCase().includes("logrotate")?`${O.name} rotates PM2's logs. Stopping it lets PM2 logs grow without limit until you start it again. It is a PM2 module, not one of your apps.`:`${O.name} is a PM2 module, not one of your apps. Stopping it changes how PM2 itself behaves.`:`${O.name} is a PM2 module. Restarting it briefly stops the behaviour it adds to PM2.`:`${O.name} is one of your own PM2 apps. ${D==="stop"?"Stopping":"Restarting"} it affects whatever else relies on it.`;if(!await o({title:`${D==="stop"?"Stop":"Restart"} ${O.name}?`,body:F,confirmLabel:le&&D==="stop"?"Stop module anyway":`${D==="stop"?"Stop":"Restart"} anyway`,tone:"danger"}))return}j({name:O.name,action:D});try{const F=await oe.processes.action(O.name,D);s.success(`${O.name}: ${D} done`,F.output||void 0),R()}catch(F){s.error(`Could not ${D} ${O.name}`,wg(F,"PM2 refused the action. Check the PM2 log for details."))}finally{j(null)}}},ne=async O=>{if(!m||C)return;const D=m.startsAt==="logon"?"at your next logon":m.startsAt==="boot"?"at the next boot":"when the service starts";if(await o(O==="start"?{title:"Start the background service?",body:m.installed?`Monitoring and notifications keep running after this dashboard closes. From now on it also starts ${D}.`:"The service is not installed; if it cannot start, the exact install command is shown instead.",confirmLabel:"Start service"}:O==="stop"?{title:"Stop the background service?",body:m.installed?`Monitoring and notifications pause while it is down. It returns ${D} or as soon as you start it again.`:"Monitoring and notifications pause while it is down. It will not restart until you start it, because it is not installed.",confirmLabel:"Stop service",tone:"danger"}:{title:"Restart the background service?",body:"Monitoring pauses for a moment while the service restarts. Jobs resume when it is back up.",confirmLabel:"Restart service",tone:"danger"})){B(O),T(null);try{const F=await oe.service[O]();x(F.backgroundService),s.success(O==="start"?"Background service started":O==="stop"?"Background service stopped":"Background service restarted",F.output?.trim()||void 0),h()}catch(F){if(F instanceof Be){if(F.payload.backgroundService&&x(F.payload.backgroundService),F.status===403&&F.code==="elevation_required"){T({kind:"elevation",action:O,command:typeof F.payload.command=="string"?F.payload.command:`ezz service ${O}`,shell:typeof F.payload.shell=="string"?F.payload.shell:null,message:typeof F.payload.message=="string"?F.payload.message:null});return}if(F.status===409&&F.code==="not_installed"){T({kind:"install",action:O,command:typeof F.payload.command=="string"?F.payload.command:c?.install.command??"ezz service install",shell:c?.install.shell??null,message:typeof F.payload.message=="string"?F.payload.message:null});return}if(F.status===409&&F.code==="already_running"){s.info("The background service is already running.",typeof F.payload.message=="string"?F.payload.message:void 0),h();return}s.error(`Could not ${O} the background service`,wg(F,"The service manager refused the action.")),h();return}s.error(`Could not ${O} the background service`,F instanceof Error?F.message:"The dashboard could not complete the action.")}finally{B(null)}}},L=(p.data?.apps??[]).filter(O=>!O.managed),Q=p.data?.currentUser??null,ce=p.data?.pm2Home??null,P=L.filter(O=>Sg(O,ce)),ae=L.filter(O=>!Sg(O,ce));return a.jsxs(a.Fragment,{children:[a.jsx(oa,{title:"Processes",description:"The Easy DevOps background service, plus every PM2 app you run for yourself.",actions:a.jsx(ee,{variant:"secondary",size:"sm",loading:p.loading||u,icon:a.jsx(Lt,{className:"size-3.5","aria-hidden":"true"}),onClick:R,children:"Refresh"})}),p.error&&!p.data?a.jsx(Et,{error:p.error,onRetry:p.reload}):p.data?a.jsxs("div",{className:"space-y-5",children:[a.jsxs(Ze,{className:"overflow-hidden",children:[a.jsx("div",{className:ie("h-0.5 w-full",m?.running?"bg-ok/60":"bg-warn/60"),"aria-hidden":"true"}),a.jsx(nn,{icon:a.jsx(yy,{className:"size-4","aria-hidden":"true"}),title:a.jsxs("span",{className:"inline-flex flex-wrap items-center gap-2",children:["Background service",m&&a.jsx(ve,{tone:m.running?"ok":"warn",dot:!0,children:Uo(m)}),c?.dev&&a.jsx(ve,{tone:"warn",children:"dev data dir"})]}),description:"Runs monitoring and notifications in the background, independent of this dashboard.",actions:m?m.running?a.jsxs(a.Fragment,{children:[a.jsx(ee,{variant:"secondary",size:"sm",loading:C==="stop",disabled:C!==null,icon:a.jsx(hf,{className:"size-3","aria-hidden":"true"}),onClick:()=>void ne("stop"),children:"Stop"}),a.jsx(ee,{variant:"secondary",size:"sm",loading:C==="restart",disabled:C!==null,icon:a.jsx(df,{className:"size-3.5","aria-hidden":"true"}),onClick:()=>void ne("restart"),children:"Restart"})]}):a.jsx(ee,{variant:"primary",size:"sm",loading:C==="start",disabled:C!==null,icon:a.jsx(Ki,{className:"size-3","aria-hidden":"true"}),onClick:()=>void ne("start"),children:"Start"}):void 0}),a.jsxs(Dn,{className:"space-y-4",children:[S&&a.jsxs(we,{tone:"warning",title:S.kind==="install"?"The background service is not installed":`${S.action==="start"?"Starting":S.action==="stop"?"Stopping":"Restarting"} needs ${S.shell??"a terminal with extra rights"}`,action:a.jsx(at,{label:"Dismiss",size:"sm",onClick:()=>T(null),children:a.jsx(Hs,{className:"size-3.5","aria-hidden":"true"})}),children:[S.message&&a.jsx("p",{children:S.message}),a.jsxs("div",{className:"mt-2 rounded-md border border-line bg-canvas p-2.5",children:[a.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[a.jsx("code",{className:"break-all font-mono text-xs text-ink",children:S.command}),a.jsx(jt,{value:S.command,label:"Copy command",withText:!0})]}),S.shell&&a.jsxs("p",{className:"mt-1.5 text-2xs text-faint",children:["Run it in ",S.shell,"."]})]}),a.jsx("p",{className:"mt-2 text-2xs text-faint",children:S.kind==="elevation"?"The dashboard cannot elevate itself or ask for a password. Run the command in a terminal you control.":"The command is run in a terminal, not from this dashboard."})]}),d&&!c?a.jsx(Et,{error:d,title:"Could not read the service state",onRetry:h,className:"border-0"}):m?a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:"grid grid-cols-2 gap-x-4 gap-y-5 sm:grid-cols-4",children:[a.jsx(ll,{label:"Status",value:Uo(m),tone:m.running?"text-ok":"text-warn",detail:m.stoppedByUser&&m.stoppedAtLabel?`Stopped ${m.stoppedAtLabel}`:m.detail??void 0}),a.jsx(ll,{label:"PID",value:m.pid===null?"—":String(m.pid)}),a.jsx(ll,{label:"Uptime",value:Xo(m.uptimeMs)}),a.jsx(ll,{label:"Installed",value:m.installed?"Yes":"No"}),a.jsx(ll,{label:"Mode",value:m.mechanismLabel,detail:m.mechanismDetail}),a.jsx(ll,{label:"Starts",value:m.startsAtLabel}),a.jsx(ll,{label:"Monitoring runs in",value:m.jobsOwnerLabel}),a.jsx(ll,{label:"Live channel",value:m.connected?"Connected":"Not connected"})]}),a.jsxs("div",{className:"flex flex-wrap gap-x-5 gap-y-1 text-2xs text-faint",children:[a.jsxs("span",{className:"min-w-0",children:["Data directory"," ",a.jsx("code",{className:"break-all font-mono text-muted",children:c?.dataDir??"—"})]}),m.version&&a.jsxs("span",{children:["Daemon ",a.jsx("code",{className:"font-mono text-muted",children:m.version})]})]}),m.runtime?a.jsx(LS,{runtime:m.runtime}):a.jsx("p",{className:"text-2xs text-faint",children:"The service and system Node versions are not available for this install."}),m.warnings.map(O=>a.jsx(we,{tone:"warning",children:a.jsx("span",{className:"whitespace-pre-line",children:O})},O)),!m.running&&a.jsx(we,{tone:"warning",title:m.stoppedByUser?"The background service is stopped":m.installed?"The background service is not running":"The background service is not set up",children:m.stoppedByUser?a.jsxs(a.Fragment,{children:["You stopped it",m.stoppedAtLabel?` on ${m.stoppedAtLabel}`:"",". Monitoring and notifications are paused until it starts again"," ",m.startsAt==="logon"?"at your next logon":m.startsAt==="boot"?"at the next boot":"when the service starts",". Use Start above, or run"," ",a.jsx("code",{className:"font-mono",children:"ezz service start"}),"."]}):m.installed?a.jsxs(a.Fragment,{children:["Monitoring and notifications run in this dashboard and stop when it closes. Start the service with ",a.jsx("code",{className:"font-mono",children:"ezz service start"}),", or use Start above."]}):a.jsxs(a.Fragment,{children:["Monitoring and notifications run in this dashboard and stop when it closes. Set up the service with"," ",a.jsx("code",{className:"font-mono",children:m.installCommand}),"."]})}),a.jsxs("details",{className:"rounded-md border border-line bg-canvas/40 px-3.5 py-3",children:[a.jsx("summary",{className:"cursor-pointer select-none text-xs font-medium text-ink",children:"Install or repair the service"}),a.jsxs("div",{className:"mt-3 space-y-2.5",children:[a.jsx(OS,{command:m.installCommand,guidance:m.installGuidance}),a.jsxs("p",{className:"text-2xs text-faint",children:["The command is run in a terminal, not from this dashboard."," ",m.startsAt==="logon"?"It starts the service at logon.":m.startsAt==="boot"?"It starts the service at boot.":"It sets the service up to start automatically."," ","It never asks for an account password."]})]})]})]}):a.jsxs("div",{className:"flex items-center gap-2 py-6 text-sm text-muted",children:[a.jsx(Ms,{}),"Checking the background service…"]})]})]}),a.jsxs(Ze,{className:"overflow-hidden",children:[a.jsx(nn,{title:a.jsxs("span",{className:"inline-flex flex-wrap items-center gap-2",children:["Your PM2 apps",ae.length>0&&a.jsx(ve,{tone:"neutral",children:_n(ae.length,"app")})]}),description:Q?`Apps PM2 is supervising for ${Q}. Easy DevOps itself is not one of them.`:"Apps PM2 is supervising for you. Easy DevOps itself is not one of them.",actions:ae.length>0||P.length>0?a.jsx(BS,{view:A,onChange:X}):void 0}),p.data.pm2.installed&&p.data.hint&&a.jsx("div",{className:"border-b border-line px-4 py-2.5 sm:px-5",children:a.jsx(we,{tone:"warning",children:p.data.hint})}),p.error&&a.jsxs("div",{className:"border-b border-line px-4 py-2 text-2xs text-muted sm:px-5",children:["Showing the last known list. ",p.error.message," ",a.jsx("button",{type:"button",className:"font-medium text-ink underline-offset-2 hover:underline",onClick:p.reload,children:"Try again"})]}),p.data.pm2.installed?ae.length===0?a.jsx(On,{icon:a.jsx($i,{className:"size-5","aria-hidden":"true"}),title:"No PM2 apps of your own",description:"Start an app with PM2 and it will appear here. Easy DevOps does not run itself under PM2."}):a.jsx("div",{className:"panel-enter",children:A==="table"?a.jsx(Cg,{apps:ae,isModule:!1,busy:b,currentUser:Q,onAction:M,onLogs:N}):a.jsx("ul",{className:"divide-y divide-line/70",children:ae.map(O=>a.jsx(Tg,{app:O,isModule:!1,busy:b,currentUser:Q,onAction:M,onLogs:N},`${O.name}-${O.pmId??"x"}`))})},A):a.jsx(On,{icon:a.jsx($i,{className:"size-5","aria-hidden":"true"}),title:"PM2 is not installed",description:"PM2 is optional. It is only for apps you run yourself; Easy DevOps uses its own background service."})]}),P.length>0&&a.jsxs(Ze,{className:"overflow-hidden",children:[a.jsx(nn,{title:a.jsxs("span",{className:"inline-flex flex-wrap items-center gap-2",children:["PM2 modules",a.jsx(ve,{tone:"neutral",children:_n(P.length,"module")})]}),description:"Modules extend PM2 itself and are not your apps. Stopping pm2-logrotate lets PM2 logs grow without limit."}),a.jsx("div",{className:"panel-enter",children:A==="table"?a.jsx(Cg,{apps:P,isModule:!0,busy:b,currentUser:Q,onAction:M,onLogs:N}):a.jsx("ul",{className:"divide-y divide-line/70",children:P.map(O=>a.jsx(Tg,{app:O,isModule:!0,busy:b,currentUser:Q,onAction:M,onLogs:N},`${O.name}-${O.pmId??"x"}`))})},A)]})]}):a.jsxs(za,{children:[a.jsx(Fe,{className:"h-56 rounded-lg"}),a.jsx(Fe,{className:"h-72 rounded-lg"})]}),y&&a.jsx(US,{app:y,onClose:()=>N(null)})]})}function GS(s){return s?!/^[a-z0-9][a-z0-9-]{0,39}$/.test(s)||s.endsWith("-")?"Lower-case letters, digits and dashes, up to 40 characters.":null:"A name is required."}function YS(s){return/^ssh:\/\//.test(s)||/^[A-Za-z0-9._-]+@[A-Za-z0-9.-]+:/.test(s)}function VS(s){const o={},c=s.split(/\r?\n/);for(let u=0;u<c.length;u++){const d=c[u];if(!d.trim()||d.trim().startsWith("#"))continue;const h=d.indexOf("=");if(h===-1)return{env:o,error:`Line ${u+1}: expected NAME=value.`};const x=d.slice(0,h).trim().replace(/^export\s+/,"");if(!/^[A-Za-z_][A-Za-z0-9_]*$/.test(x))return{env:o,error:`Line ${u+1}: "${x}" is not a valid variable name.`};let m=d.slice(h+1).trim();m.length>=2&&(m.startsWith('"')&&m.endsWith('"')||m.startsWith("'")&&m.endsWith("'"))&&(m=m.slice(1,-1)),o[x]=m}return{env:o,error:null}}function XS(s){return Object.keys(s).sort().map(o=>`${o}=${s[o]}`).join(`
|
|
447
|
+
`)}function Eg(s){return s===void 0||s===!1?"":Array.isArray(s)?s.join(" && "):s}function $y(s){return{install:Eg(s.install),build:Eg(s.build),start:s.start??"",port:s.port?String(s.port):"",healthPath:s.healthPath??"",persist:Array.isArray(s.persist)?[...s.persist]:s.persist?[s.persist]:[],skipInstall:s.install===!1||Array.isArray(s.install)&&s.install.length===0,skipBuild:s.build===!1||Array.isArray(s.build)&&s.build.length===0}}function QS(s){const o=s.trim(),c=o.replace(/\\/g,"/").replace(/^\.\/+/,"").replace(/\/+$/,"");if(!c)return{path:null,error:"Enter a folder or file path."};if(c.length>200)return{path:null,error:`"${o}" is longer than 200 characters.`};if(c.startsWith("/")||/^[A-Za-z]:/.test(c))return{path:null,error:`"${o}" must be relative to the project folder.`};const u=c.split("/");return u.some(d=>d===""||d==="."||d==="..")?{path:null,error:`"${o}" must be a relative path without "." or "..".`}:u.includes(".git")?{path:null,error:`"${o}" cannot be ".git".`}:u.includes("node_modules")?{path:null,error:`"${o}" cannot include node_modules.`}:/[<>:"|?*]/.test(c)?{path:null,error:`"${o}" contains characters that are not allowed.`}:{path:c,error:null}}function ZS(s,o){const c=QS(s);if(c.error||!c.path)return c;const u=c.path;if(o.includes(u))return{path:null,error:`"${u}" is already listed.`};if(o.length>=20)return{path:null,error:"Use at most 20 paths."};const d=u.toLowerCase();for(const h of o){const x=h.toLowerCase();if(x.startsWith(`${d}/`))return{path:null,error:`"${u}" contains "${h}" — keep only "${u}".`};if(d.startsWith(`${x}/`))return{path:null,error:`"${u}" is inside "${h}" — keep only "${h}".`}}return{path:u,error:null}}function KS(s){const o={};return s.skipInstall?o.install=!1:s.install.trim()&&(o.install=s.install.trim()),s.skipBuild?o.build=!1:s.build.trim()&&(o.build=s.build.trim()),s.start.trim()&&(o.start=s.start.trim()),s.port.trim()&&(o.port=Number(s.port)),s.healthPath.trim()&&(o.healthPath=s.healthPath.trim()),s.persist.length>0&&(o.persist=[...s.persist]),o}const Gy={running:{label:"Deploying",tone:"info"},success:{label:"Succeeded",tone:"ok"},failed:{label:"Failed",tone:"bad"},rolled_back:{label:"Rolled back",tone:"warn"}},JS={fetch:"Fetching the code",settings:"Reading project settings",pre:"Pre-deploy hook",install:"Installing",build:"Building",start:"Starting",health:"Health check",post:"Post-deploy hook",finish:"Finishing",done:"Done"};function gf(s){return JS[s]??s}const PS={manual:"Dashboard",webhook:"GitHub Actions",hub:"Hub",rollback:"Rollback"};function Gi(s){return s?s.slice(0,7):"—"}function FS(s){const o=s.finishedAt??Date.now(),c=Math.max(0,Math.round((o-s.startedAt)/1e3));return c<60?`${c}s`:`${Math.floor(c/60)}m ${c%60}s`}function IS(s){return s==="online"?"ok":s==="errored"?"bad":s==="stopped"||s==="stopping"?"warn":"neutral"}function WS(s){const o=(x,m)=>x===!1?!1:Array.isArray(x)?x.length===0?!1:x.length===1?x[0]:x:x&&x.trim()?x:m,c={install:o(s.install,"npm ci"),build:o(s.build,"npm run build"),start:s.start?.trim()||"npm start",port:s.port??3e3,health:s.healthPath?.trim()||"/"},u=Array.isArray(s.persist)?s.persist:s.persist?.trim()?[s.persist.trim()]:[];u.length>0&&(c.persist=u);const d=o(s.pre,""),h=o(s.post,"");return(d&&d!==""||h&&h!=="")&&(c.hooks={...d&&d!==""?{pre:d}:{},...h&&h!==""?{post:h}:{}}),`${JSON.stringify(c,null,2)}
|
|
448
|
+
`}const e5=`${JSON.stringify({install:"pip install -r requirements.txt",build:!1,start:"python app.py",port:8e3,health:"/health"},null,2)}
|
|
449
|
+
`,t5=[{name:"install",meaning:"Run first, in a fresh checkout. A command, a list of commands, or false to skip.",without:"npm ci (yarn and pnpm are detected from the lockfile)"},{name:"build",meaning:"Run after install. Same forms.",without:'the "build" script, if package.json has one'},{name:"start",meaning:"The long-running process. One command, any language.",without:'the "start" script, else node <main>'},{name:"port",meaning:"The port the app listens on. Passed to it as PORT and used for the health check.",without:"no HTTP check; the process only has to stay up"},{name:"health",meaning:'A path that must answer before the deployment counts: "/healthz", or { "path": "/healthz", "timeout": 60 }.',without:'"/" with a 60-second limit'},{name:"persist",meaning:"Folders or single files your app writes to and you need to keep: uploads, SQLite data, logs. A folder is usually the right unit — SQLite creates -wal and -shm files next to its database; list a file only when that file is all there is.",without:"nothing is kept; each deployment starts from the repository"},{name:"hooks.pre",meaning:"Run before install — check the environment, fetch something.",without:"nothing"},{name:"hooks.post",meaning:"Run once the new release is live — warm a cache, notify someone. A failure is a warning; the release stays.",without:"nothing"}];function n5({items:s,value:o,onChange:c,ariaLabel:u,className:d}){const h=g.useRef(new Map),x=p=>{const b=s[p];b&&(c(b.id),h.current.get(b.id)?.focus())},m=(p,b)=>{p.key==="ArrowRight"?(p.preventDefault(),x((b+1)%s.length)):p.key==="ArrowLeft"?(p.preventDefault(),x((b-1+s.length)%s.length)):p.key==="Home"?(p.preventDefault(),x(0)):p.key==="End"&&(p.preventDefault(),x(s.length-1))};return a.jsx("div",{role:"tablist","aria-label":u,className:ie("flex gap-1 overflow-x-auto border-b border-line",d),children:s.map((p,b)=>{const j=p.id===o;return a.jsxs("button",{ref:y=>{y?h.current.set(p.id,y):h.current.delete(p.id)},id:`tab-${p.id}`,role:"tab",type:"button","aria-selected":j,"aria-controls":`panel-${p.id}`,tabIndex:j?0:-1,onClick:()=>c(p.id),onKeyDown:y=>m(y,b),className:ie("relative -mb-px flex items-center gap-1.5 whitespace-nowrap border-b-2 px-3 py-2.5 text-sm font-medium transition-colors duration-[var(--ez-motion-fast)]",j?"border-accent text-ink":"border-transparent text-muted hover:border-line-strong hover:text-ink"),children:[p.label,p.count!==void 0&&a.jsx("span",{className:ie("rounded-pill px-1.5 py-0.5 text-2xs",j?"bg-accent-soft text-accent-text":"bg-inset text-faint"),children:p.count})]},p.id)})})}function Ui({id:s,value:o,children:c}){return s!==o?null:a.jsx("div",{role:"tabpanel",id:`panel-${s}`,"aria-labelledby":`tab-${s}`,className:"page-enter",children:c})}function Do(s,o){return s instanceof Be||s instanceof Error?s.message:o}function a5({app:s,onClose:o,onDeleted:c}){const u=Nt(),[d,h]=g.useState(!1),[x,m]=g.useState(!1),[p,b]=g.useState(!1);g.useEffect(()=>{s&&(h(!1),m(!1))},[s]);const j=!!(s&&(s.hasSharedData||(Array.isArray(s.settings.persist)?s.settings.persist.length>0:s.settings.persist))),y=async()=>{if(!(!s||p)){b(!0);try{const N=await oe.deployments.remove(s.id,{deleteDomain:d&&!!s.domain,purgeData:x}),C=N.sharedKept&&N.sharedPath?`Persistent data was kept in ${N.sharedPath}.`:"";N.warning?u.warning(`${s.id} deleted`,`${N.warning} ${C}`.trim()):u.success(`${s.id} deleted`,[N.domainDeleted?`${s.domain} was removed too.`:"",C].filter(Boolean).join(" ")||void 0),c()}catch(N){u.error(`Could not delete ${s.id}`,Do(N,"Nothing was changed."))}finally{b(!1)}}};return a.jsx(yn,{open:s!==null,onClose:o,preventClose:p,size:"sm",title:`Delete ${s?.id??""}?`,footer:a.jsxs(a.Fragment,{children:[a.jsx(ee,{variant:"secondary",onClick:o,disabled:p,children:"Cancel"}),a.jsx(ee,{variant:"danger",onClick:()=>void y(),loading:p,children:"Delete app"})]}),children:a.jsxs("div",{className:"space-y-4 text-sm text-muted",children:[a.jsx("p",{children:"Its process is stopped and removed from PM2, and every release, log and its deploy key are deleted from this server. The repository is not touched."}),s?.dir&&a.jsx("p",{className:"break-all font-mono text-2xs text-faint",children:s.dir}),j&&s&&a.jsxs("div",{className:"space-y-2 rounded-md border border-line bg-inset/40 p-3",children:[a.jsx("div",{className:"text-xs font-medium text-ink",children:"Persistent data"}),a.jsx("p",{className:"text-xs",children:"Folders this app writes to are kept by default, so a later app with the same name can pick up its database and uploads."}),s.sharedDir&&a.jsx("p",{className:"break-all font-mono text-2xs text-faint",children:s.sharedDir}),a.jsx(il,{label:"Also delete the persistent data",hint:"The shared folders are deleted too and cannot be recovered.",checked:x,onChange:m})]}),s?.domain&&a.jsx(il,{label:a.jsxs(a.Fragment,{children:["Also delete the domain ",a.jsx("span",{className:"font-mono text-ink",children:s.domain})]}),hint:"Its nginx config is removed and the site stops answering. Leave this off to keep the domain.",checked:d,onChange:h})]})})}function l5({app:s,meta:o,onChanged:c,onDelete:u}){const d=Nt(),[h,x]=g.useState(""),[m,p]=g.useState(!1),[b,j]=g.useState(!1),[y,N]=g.useState(""),[C,B]=g.useState(!1),S=h.trim().toLowerCase(),T=o.domains.find(M=>M.name===S),A=s.settings.port??null,k=async()=>{if(!(!S||b)){j(!0);try{const M=await oe.deployments.linkDomain(s.id,S,m&&!T?.ssl),ne=M.created?`${M.domain} was created and proxies to port ${M.port}.`:`${M.domain} now proxies to port ${M.port}.`;M.ssl&&!M.ssl.ok?d.warning("Linked, without a certificate",`${ne} ${M.ssl.detail}`):M.nginxReloaded?d.success("Domain linked",M.ssl?.ok?`${ne} ${M.ssl.detail}`:ne):d.warning("Linked, but nginx was not reloaded",`${ne} Reload nginx for it to take effect.`),x(""),p(!1),c()}catch(M){d.error("Could not link the domain",Do(M,"Nothing was changed."))}finally{j(!1)}}},X=async()=>{try{await oe.deployments.unlinkDomain(s.id),d.success("Link removed",`${s.domain} is still configured; only the link is gone.`),c()}catch(M){d.error("Could not remove the link",Do(M,"Nothing was changed."))}},R=async()=>{if(!(!y.trim()||C)){B(!0);try{const M=await oe.deployments.move(s.id,y.trim());M.warning?d.warning("Moved",M.warning):d.success("App moved",`${M.to}${M.restarted?" — and started again.":""}`),N(""),c()}catch(M){d.error("Could not move the app",Do(M,"It is still where it was."))}finally{B(!1)}}};return a.jsxs("div",{className:"space-y-7",children:[a.jsxs("section",{className:"space-y-3",children:[a.jsxs("div",{className:"flex items-start gap-2.5",children:[a.jsx(_l,{className:"mt-0.5 size-4 shrink-0 text-muted","aria-hidden":"true"}),a.jsxs("div",{children:[a.jsx("h4",{className:"text-sm font-semibold text-ink",children:"Domain"}),a.jsx("p",{className:"mt-0.5 text-xs text-muted",children:"Point a domain at this app. nginx proxies it to the app’s port, and a deployment that changes the port takes the domain with it."})]})]}),s.domain?a.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3 rounded-md border border-line bg-inset/40 px-3.5 py-2.5",children:[a.jsxs("div",{className:"min-w-0",children:[a.jsx("div",{className:"truncate font-mono text-sm text-ink",children:s.domain}),a.jsxs("div",{className:"text-2xs text-faint",children:[A?`Proxies to port ${A}.`:"Proxies to the app’s port."," Edit it on the Domains page."]})]}),a.jsx(ee,{size:"sm",icon:a.jsx(A2,{className:"size-3.5","aria-hidden":"true"}),onClick:()=>void X(),children:"Remove link"})]}):null,a.jsxs("div",{className:"space-y-2.5",children:[a.jsxs("div",{children:[a.jsxs("div",{className:"flex flex-wrap items-end gap-2",children:[a.jsx(Ee,{label:s.domain?"Link a different domain":"Domain name",value:h,onChange:M=>x(M.target.value),placeholder:"app.example.com",list:"deploy-domain-options","aria-describedby":"deploy-domain-hint",className:"min-w-56 flex-1 font-mono",spellCheck:!1,autoComplete:"off"}),a.jsx(ee,{variant:"primary",onClick:()=>void k(),loading:b,disabled:!S,children:"Link domain"})]}),a.jsx("p",{id:"deploy-domain-hint",className:"mt-1.5 text-xs text-faint",children:S?T?"This domain exists. It will be re-pointed at this app.":"This domain will be created.":"Type a new name, or pick one of your domains."})]}),a.jsx("datalist",{id:"deploy-domain-options",children:o.domains.map(M=>a.jsx("option",{value:M.name},M.name))}),S&&!T?.ssl&&a.jsx(il,{label:"Request an SSL certificate",hint:"Over HTTP-01, so the domain’s DNS must already point at this server. If it cannot be issued the domain still works over HTTP, and you can issue it later from the SSL page.",checked:m,onChange:p}),!A&&!s.currentRelease&&a.jsxs(we,{tone:"info",children:["The app needs a port first: set one in Edit, or put ",a.jsx("code",{className:"font-mono",children:"port"})," ","in ez.json and deploy once."]})]})]}),a.jsxs("section",{className:"space-y-3 border-t border-line pt-6",children:[a.jsxs("div",{className:"flex items-start gap-2.5",children:[a.jsx(g2,{className:"mt-0.5 size-4 shrink-0 text-muted","aria-hidden":"true"}),a.jsxs("div",{className:"min-w-0",children:[a.jsx("h4",{className:"text-sm font-semibold text-ink",children:"Folder"}),a.jsx("p",{className:"mt-0.5 text-xs text-muted",children:"Where this app’s releases, logs and deploy key live. It stays here even if the deployments folder in Settings changes."}),a.jsx("p",{className:"mt-1.5 break-all font-mono text-2xs text-ink",children:s.dir??"—"})]})]}),a.jsxs("div",{children:[a.jsxs("div",{className:"flex flex-wrap items-end gap-2",children:[a.jsx(Ee,{label:"Move to",value:y,onChange:M=>N(M.target.value),placeholder:o.deployDir??"/srv/ez_deploys","aria-describedby":"deploy-move-hint",className:"min-w-56 flex-1 font-mono",spellCheck:!1,autoComplete:"off"}),a.jsx(ee,{onClick:()=>void R(),loading:C,disabled:!y.trim()||!!s.deploying,children:"Move app"})]}),a.jsx("p",{id:"deploy-move-hint",className:"mt-1.5 text-xs text-faint",children:y.trim()?`The app will be in ${y.trim().replace(/[\\/]+$/,"")}/${s.id}`:"A folder on this server. The app goes into a subfolder named after it."})]}),a.jsx("p",{className:"text-2xs text-faint",children:"The app is stopped, its folder is moved, and it is started again from the new place. To another disk this copies every release, and can take a while."})]}),a.jsxs("section",{className:"flex flex-wrap items-center justify-between gap-3 border-t border-line pt-6",children:[a.jsxs("div",{children:[a.jsx("h4",{className:"text-sm font-semibold text-ink",children:"Delete this app"}),a.jsx("p",{className:"mt-0.5 text-xs text-muted",children:"Stops it and removes its folder. You are asked what to do with its domain."})]}),a.jsx(ee,{variant:"danger",icon:a.jsx(Ul,{className:"size-4","aria-hidden":"true"}),onClick:u,disabled:!!s.deploying,children:"Delete app"})]})]})}function s5(s,o){const c=URL.createObjectURL(new Blob([o],{type:"application/json"})),u=document.createElement("a");u.href=c,u.download=s,document.body.appendChild(u),u.click(),u.remove(),URL.revokeObjectURL(c)}function i5({app:s,locations:o}){const c=WS(s.settings);return a.jsxs("div",{className:"space-y-6",children:[a.jsxs("div",{className:"space-y-2 text-xs text-muted",children:[a.jsxs("p",{children:[a.jsx("code",{className:"font-mono text-ink",children:"ez.json"})," is an optional file in your repository that says how the project is installed, built and started. Keeping it with the code means the commands are reviewed and versioned like everything else, and a new server needs no setup."]}),a.jsxs("p",{children:[a.jsx("strong",{className:"font-medium text-ink",children:"You do not need one for a Node project"})," — without it, the scripts in ",a.jsx("code",{className:"font-mono",children:"package.json"})," are used. You do need one for any other language."]})]}),a.jsxs("ol",{className:"space-y-5",children:[a.jsxs("li",{className:"space-y-2",children:[a.jsx("h4",{className:"text-sm font-medium text-ink",children:"1. Create the file"}),a.jsxs("p",{className:"text-xs text-muted",children:["This is what ",a.jsx("span",{className:"font-mono",children:s.id})," deploys with today. Change the commands to match your project."]}),a.jsx("pre",{className:"overflow-auto rounded-md border border-line bg-canvas p-3.5 font-mono text-2xs leading-relaxed text-ink",children:c}),a.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[a.jsx(jt,{value:c,label:"Copy ez.json",withText:!0}),a.jsx(ee,{size:"sm",icon:a.jsx(Vd,{className:"size-3.5","aria-hidden":"true"}),onClick:()=>s5("ez.json",c),children:"Download ez.json"})]})]}),a.jsxs("li",{className:"space-y-2",children:[a.jsx("h4",{className:"text-sm font-medium text-ink",children:"2. Put it in the repository"}),a.jsxs("p",{className:"text-xs text-muted",children:["At the top of the repository, next to ",a.jsx("code",{className:"font-mono",children:"package.json"}),". It is looked for in this order:"," ",o.map((u,d)=>a.jsxs("span",{children:[a.jsx("code",{className:"font-mono text-ink",children:u}),d<o.length-1?", ":"."]},u))]})]}),a.jsxs("li",{className:"space-y-2",children:[a.jsx("h4",{className:"text-sm font-medium text-ink",children:"3. Commit, push, deploy"}),a.jsxs("p",{className:"text-xs text-muted",children:["The next deployment reads it. Its log shows where each value came from —"," ",a.jsx("code",{className:"font-mono",children:"[ez.json]"}),", ",a.jsx("code",{className:"font-mono",children:"[package.json]"})," ","or ",a.jsx("code",{className:"font-mono",children:"[override]"})," — so you can see that it was picked up."]})]})]}),a.jsxs("div",{children:[a.jsx("h4",{className:"mb-2 text-sm font-medium text-ink",children:"What each field means"}),a.jsx("div",{className:"overflow-x-auto rounded-md border border-line",children:a.jsxs("table",{className:"w-full text-left text-2xs",children:[a.jsx("thead",{className:"border-b border-line bg-inset/50 text-faint",children:a.jsxs("tr",{children:[a.jsx("th",{className:"px-3 py-2 font-semibold uppercase tracking-wider",children:"Field"}),a.jsx("th",{className:"px-3 py-2 font-semibold uppercase tracking-wider",children:"Meaning"}),a.jsx("th",{className:"px-3 py-2 font-semibold uppercase tracking-wider",children:"If you leave it out"})]})}),a.jsx("tbody",{className:"divide-y divide-line",children:t5.map(u=>a.jsxs("tr",{children:[a.jsx("td",{className:"whitespace-nowrap px-3 py-2 align-top font-mono text-ink",children:u.name}),a.jsx("td",{className:"px-3 py-2 align-top text-muted",children:u.meaning}),a.jsx("td",{className:"px-3 py-2 align-top text-muted",children:u.without})]},u.name))})]})})]}),a.jsxs("div",{className:"space-y-2",children:[a.jsx("h4",{className:"text-sm font-medium text-ink",children:"Not a Node project?"}),a.jsx("p",{className:"text-xs text-muted",children:"The commands are run exactly as written, so any language works. A Python app:"}),a.jsx("pre",{className:"overflow-auto rounded-md border border-line bg-canvas p-3.5 font-mono text-2xs leading-relaxed text-ink",children:e5})]}),a.jsxs(we,{tone:"info",title:"Which one wins",children:["A value set on the app (Edit) overrides ",a.jsx("code",{className:"font-mono",children:"ez.json"}),", which overrides ",a.jsx("code",{className:"font-mono",children:"package.json"}),". To let the file decide, leave that field empty in Edit. A mistake in the file stops the deployment before anything that is running is touched."]})]})}function qo(s,o){return s instanceof Be||s instanceof Error?s.message:o}function r5({appId:s,run:o}){const c=yt(p=>oe.deployments.run(s,o.id,p),[s,o.id]),u=(c.data?.status??o.status)==="running";Ml(c.reload,1500,u);const d=g.useRef(null),h=g.useRef(!0),x=c.data?.log??"";g.useEffect(()=>{const p=d.current;p&&h.current&&(p.scrollTop=p.scrollHeight)},[x]);const m=c.data??o;return a.jsxs("div",{className:"space-y-2.5",children:[m.error&&a.jsx(we,{tone:m.status==="rolled_back"?"warning":"danger",title:m.status==="rolled_back"?"The new release was not healthy — the previous one is running again":`Failed while: ${gf(m.step).toLowerCase()}`,children:m.error}),m.warnings?.map(p=>a.jsx(we,{tone:"warning",children:p},p)),c.error&&!c.data?a.jsx(Et,{error:c.error,onRetry:c.reload,title:"Could not load the log"}):a.jsxs("pre",{ref:d,onScroll:p=>{const b=p.currentTarget;h.current=b.scrollHeight-b.scrollTop-b.clientHeight<24},className:"h-[42vh] overflow-auto whitespace-pre-wrap break-all rounded-md border border-line bg-canvas p-3.5 font-mono text-2xs leading-relaxed text-muted","aria-label":"Deployment log","aria-busy":u,children:[c.data?.logTruncated&&`… earlier output is not shown …
|
|
450
|
+
`,x||(c.loading?"Loading…":"No output yet.")]})]})}function o5({app:s,initialRunId:o}){const[c,u]=g.useState(o);if(g.useEffect(()=>{s.activeRunId&&u(s.activeRunId)},[s.activeRunId]),s.runs.length===0)return a.jsx(On,{icon:a.jsx(w2,{className:"size-5","aria-hidden":"true"}),title:"No deployments yet",description:"Press Deploy to build and start this app for the first time."});const d=s.runs.find(h=>h.id===c)??s.runs[0];return a.jsxs("div",{className:"grid gap-4 lg:grid-cols-[17rem_minmax(0,1fr)]",children:[a.jsx("ul",{className:"max-h-[52vh] space-y-1 overflow-y-auto pr-1","aria-label":"Deployments",children:s.runs.map(h=>{const x=Gy[h.status],m=h.id===d.id;return a.jsx("li",{children:a.jsxs("button",{type:"button",onClick:()=>u(h.id),"aria-current":m?"true":void 0,className:ie("w-full rounded-md border px-3 py-2 text-left transition-colors duration-[var(--ez-motion-fast)]",m?"border-accent/40 bg-accent-soft":"border-transparent hover:bg-inset"),children:[a.jsxs("div",{className:"flex items-center justify-between gap-2",children:[a.jsx(ve,{tone:x.tone,dot:!0,children:h.status==="running"?gf(h.step):x.label}),a.jsx("span",{className:"font-mono text-2xs text-faint",children:Gi(h.sha)})]}),a.jsxs("div",{className:"mt-1 flex items-center justify-between gap-2 text-2xs text-muted",children:[a.jsx("span",{children:PS[h.trigger]??h.trigger}),a.jsxs("span",{title:mf(h.startedAt),children:[Pi(h.startedAt)," · ",FS(h)]})]})]})},h.id)})}),a.jsx(r5,{appId:s.id,run:d},d.id)]})}function c5({app:s,onRollback:o,onDelete:c,deleting:u,busy:d}){return s.releases.length===0?a.jsx(On,{title:"No releases on disk",description:"Each successful deployment leaves a release here to roll back to."}):a.jsxs("div",{className:"space-y-3",children:[a.jsxs("p",{className:"text-xs text-muted",children:["A rollback starts an earlier release exactly as it was built — nothing is fetched or rebuilt. The newest ",s.keepReleases," are kept."]}),a.jsx("ul",{className:"divide-y divide-line rounded-md border border-line",children:s.releases.map(h=>a.jsxs("li",{className:"flex flex-wrap items-center gap-3 px-3.5 py-2.5",children:[a.jsxs("div",{className:"min-w-0 flex-1",children:[a.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[a.jsx("span",{className:"font-mono text-xs text-ink",children:h.id}),h.current&&a.jsx(ve,{tone:"ok",children:"Live"}),h.previous&&a.jsx(ve,{tone:"neutral",children:"Previous"})]}),a.jsxs("div",{className:"mt-0.5 font-mono text-2xs text-faint",children:[Gi(h.sha),h.ref?` · ${h.ref}`:""]})]}),!h.current&&a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx(ee,{size:"sm",icon:a.jsx(nN,{className:"size-3.5","aria-hidden":"true"}),onClick:()=>o(h),disabled:d||!h.startable,title:h.startable?void 0:"This release never got as far as starting.",children:"Roll back to this"}),a.jsx(ee,{variant:"dangerGhost",size:"sm",icon:a.jsx(Ul,{className:"size-3.5","aria-hidden":"true"}),onClick:()=>c(h),loading:u===h.id,disabled:d||h.previous,title:h.previous?"An automatic rollback would return to this release. Delete it after the next deployment.":`Delete the files of release ${h.id}`,children:"Delete"})]})]},h.id))})]})}function Hi({n:s,title:o,children:c}){return a.jsxs("li",{className:"flex gap-3",children:[a.jsx("span",{className:"mt-0.5 flex size-5 shrink-0 items-center justify-center rounded-pill bg-inset font-mono text-2xs font-semibold text-muted","aria-hidden":"true",children:s}),a.jsxs("div",{className:"min-w-0 flex-1 space-y-2",children:[a.jsx("h4",{className:"text-sm font-medium text-ink",children:o}),c]})]})}function zg({name:s,value:o,note:c}){return a.jsxs("div",{className:"rounded-md border border-line bg-inset/50 p-2.5",children:[a.jsxs("div",{className:"flex items-center justify-between gap-2",children:[a.jsx("code",{className:"font-mono text-xs font-semibold text-ink",children:s}),a.jsx(jt,{value:s,label:`Copy the name ${s}`})]}),o?a.jsxs("div",{className:"mt-1.5 flex items-center justify-between gap-2",children:[a.jsx("code",{className:"min-w-0 break-all font-mono text-2xs text-muted",children:o}),a.jsx(jt,{value:o,label:`Copy the value of ${s}`,withText:!0})]}):c&&a.jsx("p",{className:"mt-1.5 text-2xs text-faint",children:c})]})}function u5({app:s,hook:o,onConfigureHook:c,onChanged:u}){const d=Nt(),h=bn(),x=yt(D=>oe.deployments.github(s.id,D),[s.id,o.enabled,o.domain,o.bind,o.port,s.branch]),[m,p]=g.useState(null),[b,j]=g.useState(!1),[y,N]=g.useState(null),[C,B]=g.useState(""),[S,T]=g.useState(!1),[A,k]=g.useState(null),X=async()=>{if(!b&&!(s.hook.hasToken&&!await h({title:"Replace the deploy token?",body:"The current token stops working immediately. The repository’s EZ_DEPLOY_TOKEN secret has to be updated before the next push can deploy.",confirmLabel:"Replace token",tone:"danger"}))){j(!0);try{const D=await oe.deployments.issueHookToken(s.id);p(D.token),u()}catch(D){d.error("Could not create the token",qo(D,"Try again."))}finally{j(!1)}}};if(x.error&&!x.data)return a.jsx(Et,{error:x.error,onRetry:x.reload});if(!x.data)return a.jsx(Fe,{className:"h-64 rounded-lg"});const R=x.data,M=s.hook.hasToken||m!==null,ne=R.targets??[{id:"hook",label:"This server’s deploy hook",url:R.hookUrl,secure:R.hookSecure,note:R.hookNote}],L=D=>!!D.url&&(D.id!=="hub"||D.ready!==!1),Q=ne.find(D=>D.id===y)??ne.find(L)??ne[0],ce=L(Q),P=/github\.com[:/]/.test(s.repoUrl),ae=s.authType==="deployKey"?1:0,O=async()=>{if(!S&&!(s.hook.hasToken&&!await h({title:"Set up GitHub automatically?",body:"A new deploy token is created and stored straight into the repository’s secrets; the current one stops working. The workflow file is committed to the branch, which starts a deployment.",confirmLabel:"Set up",tone:"accent"}))){T(!0),k(null);try{const D=await oe.deployments.applyGithub(s.id,{target:Q.id,...C.trim()?{token:C.trim()}:{}});k(D),B(""),p(null),u(),D.ok?d.success("GitHub is set up",`${D.repo} deploys on every push to ${s.branch}.`):d.warning("Partly set up","Some steps need a token with more access. They are listed below.")}catch(D){const le=D instanceof Be?D.payload:null;le&&Array.isArray(le.steps)&&k(le),d.error("Could not set up GitHub",qo(D,"Nothing was changed on GitHub."))}finally{T(!1)}}};return a.jsxs("div",{className:"space-y-5",children:[a.jsxs("div",{className:"rounded-md border border-line bg-inset/40 p-3.5",children:[a.jsx("h4",{className:"text-sm font-medium text-ink",children:"How it works"}),a.jsxs("ol",{className:"mt-2 list-decimal space-y-1 pl-4 text-xs text-muted",children:[a.jsxs("li",{children:["You push to ",a.jsx("code",{className:"font-mono text-ink",children:s.branch}),"."]}),a.jsx("li",{children:"GitHub runs the workflow file in your repository. It makes one request: “deploy this commit”, with the app’s deploy token."}),a.jsx("li",{children:"This server fetches that commit, builds it and starts it — the same steps as the Deploy button, with the log in the Deployments tab."}),a.jsx("li",{children:"The workflow waits for the result. A green check means the new version is live; a red one means it failed, and the previous version is still running."})]}),a.jsx("p",{className:"mt-2 text-xs text-muted",children:"GitHub never gets access to the server: it holds a URL and a token that can start a deployment of this one app, and nothing else."})]}),ne.length>1&&a.jsx(rl,{label:"How GitHub reaches this server",value:Q.id,onChange:D=>N(D.target.value),hint:Q.note,children:ne.map(D=>a.jsxs("option",{value:D.id,children:[D.label,L(D)?"":" — not available yet"]},D.id))}),ce?!Q.secure&&a.jsx(we,{tone:"warning",title:"The deploy token would be sent unencrypted",action:Q.id==="hook"?a.jsx(ee,{size:"sm",onClick:c,children:"Change"}):void 0,children:Q.note}):a.jsx(we,{tone:"warning",title:Q.id==="hub"?"Not available through the Hub yet":"GitHub cannot reach this server yet",action:Q.id==="hook"?a.jsx(ee,{size:"sm",onClick:c,children:"Set up the deploy hook"}):void 0,children:Q.note}),P&&a.jsx("div",{className:"rounded-md border border-line bg-inset/40 p-3.5",children:a.jsxs("div",{className:"flex items-start gap-2.5",children:[a.jsx(DN,{className:"mt-0.5 size-4 shrink-0 text-accent-text","aria-hidden":"true"}),a.jsxs("div",{className:"min-w-0 flex-1 space-y-2.5",children:[a.jsxs("div",{children:[a.jsx("h4",{className:"text-sm font-medium text-ink",children:"Do it for me"}),a.jsxs("p",{className:"mt-0.5 text-xs text-muted",children:["Stores both secrets, commits the workflow file",s.authType==="deployKey"?" and adds the deploy key":"",". Needs a GitHub token that may write this repository’s ",a.jsx("em",{children:"secrets"}),", ",a.jsx("em",{children:"contents"})," and"," ",a.jsx("em",{children:"workflows"}),s.authType==="deployKey"?", and administer it (for the deploy key)":"",". A token typed here is used once and not stored."]})]}),a.jsxs("div",{className:"flex flex-wrap items-end gap-2",children:[a.jsx(Ee,{label:"GitHub token",optional:s.authType==="token"&&s.hasToken,type:"password",value:C,onChange:D=>B(D.target.value),placeholder:s.authType==="token"&&s.hasToken?"leave empty to try the app’s token":"github_pat_…",autoComplete:"off",spellCheck:!1,className:"min-w-56 flex-1"}),a.jsx(ee,{variant:"primary",onClick:()=>void O(),loading:S,disabled:!ce||!C.trim()&&!(s.authType==="token"&&s.hasToken),children:"Set up on GitHub"})]}),A&&a.jsxs("ul",{className:"space-y-1.5","aria-label":"Setup result",children:[A.error&&a.jsxs("li",{className:"flex items-start gap-2 text-xs text-bad",children:[a.jsx(Yd,{className:"mt-0.5 size-3.5 shrink-0","aria-hidden":"true"}),a.jsx("span",{children:A.error})]}),A.steps.map(D=>a.jsxs("li",{className:ie("flex items-start gap-2 text-xs",D.ok?"text-muted":"text-bad"),children:[D.ok?a.jsx(Dl,{className:"mt-0.5 size-3.5 shrink-0 text-ok","aria-hidden":"true"}):a.jsx(Yd,{className:"mt-0.5 size-3.5 shrink-0","aria-hidden":"true"}),a.jsx("span",{children:D.detail})]},D.id))]})]})]})}),a.jsx("h4",{className:"text-xs font-semibold uppercase tracking-[0.14em] text-faint",children:P?"Or by hand":"Steps"}),a.jsxs("ol",{className:"space-y-5",children:[R.deployKey!==null&&a.jsxs(Hi,{n:1,title:"Let this server read the repository",children:[a.jsx("p",{className:"text-xs text-muted",children:"In the repository: Settings → Deploy keys → Add deploy key. Paste this, and leave “Allow write access” off."}),a.jsxs("div",{className:"flex items-start justify-between gap-2 rounded-md border border-line bg-inset/50 p-2.5",children:[a.jsx("code",{className:"min-w-0 break-all font-mono text-2xs text-muted",children:R.deployKey}),a.jsx(jt,{value:R.deployKey,label:"Copy the deploy key",withText:!0})]})]}),s.authType==="deployKey"&&R.deployKey===null&&a.jsx(Hi,{n:1,title:"Let this server read the repository",children:a.jsx(we,{tone:"warning",children:"This app uses a deploy key but none has been generated. Open Edit and press “Generate key”."})}),a.jsxs(Hi,{n:ae+1,title:"Create the deploy token",children:[a.jsx("p",{className:"text-xs text-muted",children:"It can start a deployment of this app and nothing else. Only a hash of it is stored here, so it is shown once."}),m?a.jsx(we,{tone:"success",title:"Copy it now — it will not be shown again",children:a.jsxs("div",{className:"mt-1.5 flex items-center justify-between gap-2",children:[a.jsx("code",{className:"min-w-0 break-all font-mono text-2xs",children:m}),a.jsx(jt,{value:m,label:"Copy the deploy token",withText:!0})]})}):a.jsxs("div",{className:"flex flex-wrap items-center gap-2.5",children:[a.jsx(ee,{size:"sm",icon:a.jsx(Zi,{className:"size-3.5","aria-hidden":"true"}),onClick:()=>void X(),loading:b,children:s.hook.hasToken?"Replace the token":"Create token"}),s.hook.hasToken&&a.jsxs("span",{className:"text-2xs text-faint",children:["One exists, ending in"," ",a.jsx("code",{className:"font-mono",children:s.hook.tokenHint}),s.hook.createdAt?`, created ${mf(s.hook.createdAt)}`:"","."]})]})]}),a.jsxs(Hi,{n:ae+2,title:"Add two repository secrets",children:[a.jsx("p",{className:"text-xs text-muted",children:"In the repository: Settings → Secrets and variables → Actions → New repository secret."}),a.jsxs("div",{className:"space-y-2",children:[a.jsx(zg,{name:"EZ_DEPLOY_URL",value:ce?Q.url:null,note:"Available once GitHub can reach this server (see above)."}),a.jsx(zg,{name:"EZ_DEPLOY_TOKEN",value:m,note:M?"The token from the step above. If you no longer have it, replace it.":"Create the token in the step above first."})]})]}),a.jsxs(Hi,{n:ae+3,title:"Add the workflow file",children:[a.jsxs("p",{className:"text-xs text-muted",children:["Commit this to the repository as"," ",a.jsx("code",{className:"break-all font-mono text-ink",children:R.workflowPath}),". It contains no secrets, and it is the same file whichever way GitHub reaches the server."]}),a.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[a.jsx(jt,{value:R.workflowPath,label:"Copy the file path",withText:!0}),a.jsx(jt,{value:R.workflow,label:"Copy the workflow",withText:!0})]}),a.jsx("pre",{className:"max-h-64 overflow-auto rounded-md border border-line bg-canvas p-3.5 font-mono text-2xs leading-relaxed text-muted",children:R.workflow})]})]}),a.jsxs(we,{tone:"info",title:"Optional: ez.json",children:["To keep the install, build and start commands with the code, add an"," ",a.jsx("code",{className:"font-mono",children:"ez.json"})," to the repository. Without one, a Node project is deployed from its ",a.jsx("code",{className:"font-mono",children:"package.json"})," scripts."]})]})}function d5({appId:s,hook:o,meta:c,initialTab:u="activity",onClose:d,onConfigureHook:h,onChanged:x,onDelete:m}){const p=Nt(),b=bn(),j=s!==null,[y,N]=g.useState(u),[C,B]=g.useState(!1),[S,T]=g.useState(null),A=yt(M=>oe.deployments.get(s??"",M),[s],{enabled:j}),k=A.data&&A.data.id===s?A.data:null;g.useEffect(()=>{j&&N(u)},[j,s,u]),Ml(A.reload,2e3,j&&!!k?.deploying),Ml(A.reload,8e3,j&&!!k&&!k?.deploying);const X=async M=>{if(!(!k||C||!await b({title:`Roll back ${k.id}?`,body:`Release ${M.id} (${Gi(M.sha)}) will be started in place of the live one. The app restarts.`,confirmLabel:"Roll back",tone:"danger"}))){B(!0);try{await oe.deployments.rollback(k.id,M.id),p.info("Rollback started"),N("activity"),A.reload(),x()}catch(L){p.error("Could not roll back",qo(L,"Nothing was changed."))}finally{B(!1)}}},R=async M=>{if(!(!k||C||S||!await b({title:`Delete release ${M.id}?`,body:`Its files (${Gi(M.sha)}) are removed from this server. The deployment log stays. The live release and the one an automatic rollback would return to cannot be deleted.`,confirmLabel:"Delete release",tone:"danger"}))){T(M.id);try{await oe.deployments.removeRelease(k.id,M.id),p.success("Release deleted"),A.reload(),x()}catch(L){p.error("Could not delete the release",qo(L,"Nothing was changed."))}finally{T(null)}}};return a.jsx(yn,{open:j,onClose:d,size:"xl",title:a.jsxs("span",{className:"flex flex-wrap items-center gap-2.5",children:[a.jsx("span",{className:"font-mono",children:s}),k?.deploying&&a.jsx(ve,{tone:"info",dot:!0,children:"Deploying"})]}),description:k?`${k.repoUrl} · ${k.branch}`:void 0,children:A.error&&!k?a.jsx(Et,{error:A.error,onRetry:A.reload}):k?a.jsxs("div",{className:"space-y-4",children:[a.jsx(n5,{ariaLabel:"App sections",value:y,onChange:N,items:[{id:"activity",label:"Deployments",count:k.runs.length},{id:"releases",label:"Releases",count:k.releases.length},{id:"setup",label:"Domain & folder"},{id:"github",label:"GitHub Actions"},{id:"ezjson",label:"ez.json"}]}),a.jsx(Ui,{id:"activity",value:y,children:a.jsx(o5,{app:k,initialRunId:k.activeRunId??null})}),a.jsx(Ui,{id:"releases",value:y,children:a.jsx(c5,{app:k,onRollback:M=>void X(M),onDelete:M=>void R(M),deleting:S,busy:C||!!k.deploying})}),a.jsx(Ui,{id:"setup",value:y,children:a.jsx(l5,{app:k,meta:c,onChanged:()=>{A.reload(),x()},onDelete:()=>m(k)})}),a.jsx(Ui,{id:"ezjson",value:y,children:a.jsx(i5,{app:k,locations:c.ezFileLocations})}),a.jsx(Ui,{id:"github",value:y,children:a.jsx(u5,{app:k,hook:o,onConfigureHook:h,onChanged:()=>{A.reload(),x()}})}),!o.enabled&&y!=="github"&&k.hook.hasToken&&a.jsx(we,{tone:"warning",title:"The deploy hook is switched off",children:a.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[a.jsx(Ra,{className:"size-3.5","aria-hidden":"true"}),"This app has a deploy token, but nothing is listening for it."]})})]}):a.jsxs("div",{className:"flex items-center gap-2.5 py-10 text-sm text-muted",children:[a.jsx(Ms,{})," Loading…"]})})}function Rg(s){return{id:"",repoUrl:"",branch:"main",authType:"none",token:"",settings:$y({}),envText:"",keepReleases:String(s),autoRollback:!0,notifyChannelIds:[]}}function f5(s){return{id:s.id,repoUrl:s.repoUrl,branch:s.branch,authType:s.authType,token:"",settings:$y(s.settings),envText:XS(s.env),keepReleases:String(s.keepReleases),autoRollback:s.autoRollback,notifyChannelIds:s.notifyChannelIds}}function Ag(s,o){return s instanceof Be||s instanceof Error?s.message:o}function h5({open:s,app:o,meta:c,onClose:u,onSaved:d}){const h=Nt(),x=o!==null,[m,p]=g.useState(()=>Rg(c.limits.keepReleasesDefault)),[b,j]=g.useState(!1),[y,N]=g.useState(!1),[C,B]=g.useState(null),[S,T]=g.useState(!1);g.useEffect(()=>{s&&(p(o?f5(o):Rg(c.limits.keepReleasesDefault)),B(o?.deployKey??null),j(!1))},[s,o?.id]);const A=O=>p(D=>({...D,...O})),k=O=>p(D=>({...D,settings:{...D.settings,...O}})),X=m.repoUrl.trim(),R=YS(X),M=VS(m.envText),ne=Number(m.keepReleases),L={id:x?null:GS(m.id.trim()),repoUrl:X?m.authType==="token"&&R?"Token access needs an https:// URL.":m.authType==="deployKey"&&!R?"A deploy key needs an SSH URL, like git@github.com:owner/repo.git.":null:"A repository URL is required.",token:m.authType==="token"&&!m.token.trim()&&!(x&&o?.hasToken)?"A token is required.":null,port:m.settings.port.trim()?Jo(m.settings.port):null,healthPath:m.settings.healthPath.trim()&&!m.settings.healthPath.trim().startsWith("/")?'Must start with "/".':null,env:M.error,keepReleases:!Number.isInteger(ne)||ne<c.limits.keepReleasesMin||ne>c.limits.keepReleasesMax?`A whole number from ${c.limits.keepReleasesMin} to ${c.limits.keepReleasesMax}.`:null},Q=Object.values(L).some(Boolean),ce=async()=>{if(y||(j(!0),Q))return;const O={repoUrl:X,branch:m.branch.trim()||"main",authType:m.authType,settings:KS(m.settings),env:M.env,keepReleases:ne,autoRollback:m.autoRollback,notifyChannelIds:m.notifyChannelIds};m.token.trim()&&(O.token=m.token.trim()),N(!0);try{const D=x?await oe.deployments.update(o.id,O):await oe.deployments.create({...O,id:m.id.trim()});d(D,!x)}catch(D){h.error(x?"Could not save the app":"Could not create the app",Ag(D,"Nothing was changed."))}finally{N(!1)}},P=async()=>{if(!(!o||S)){T(!0);try{const O=await oe.deployments.generateDeployKey(o.id);B(O.publicKey),h.success("Deploy key generated","Add the public key to the repository, read-only.")}catch(O){h.error("Could not generate the key",Ag(O,"Try again."))}finally{T(!1)}}},ae=O=>b?L[O]:null;return a.jsx(yn,{open:s,onClose:u,preventClose:y,size:"lg",title:x?`Edit ${o.id}`:"New app",description:x?"Changes apply to the next deployment. The running release is not touched.":"Where the code lives and how this server may read it. Everything else can be left to the project.",footer:a.jsxs(a.Fragment,{children:[a.jsx(ee,{variant:"secondary",onClick:u,disabled:y,children:"Cancel"}),a.jsx(ee,{variant:"primary",type:"submit",form:"deploy-app-form",loading:y,children:x?"Save app":"Create app"})]}),children:a.jsxs("form",{id:"deploy-app-form",className:"space-y-6",onSubmit:O=>{O.preventDefault(),ce()},noValidate:!0,children:[a.jsxs("section",{className:"space-y-4",children:[a.jsxs(ka,{children:[a.jsx(Ee,{label:"Name",value:m.id,onChange:O=>A({id:O.target.value.toLowerCase()}),disabled:x,error:ae("id"),hint:x?"The name cannot be changed.":"Used for its folder and its PM2 process (ez-<name>).",placeholder:"my-api",className:"font-mono",spellCheck:!1,autoComplete:"off"}),a.jsx(Ee,{label:"Branch",value:m.branch,onChange:O=>A({branch:O.target.value}),hint:"Deployed when no specific commit is named.",placeholder:"main",className:"font-mono",spellCheck:!1})]}),a.jsx(Ee,{label:"Repository URL",value:m.repoUrl,onChange:O=>A({repoUrl:O.target.value}),error:ae("repoUrl"),hint:"https://github.com/owner/repo.git, or git@github.com:owner/repo.git for a deploy key.",placeholder:"https://github.com/owner/repo.git",className:"font-mono",spellCheck:!1,autoComplete:"off"}),a.jsxs(rl,{label:"Repository access",value:m.authType,onChange:O=>A({authType:O.target.value}),hint:m.authType==="none"?"For a public repository.":m.authType==="deployKey"?"An SSH key generated here; you add its public half to the repository. Nothing secret leaves this server.":"A personal access token stored on this server and sent only to the repository host.",children:[a.jsx("option",{value:"none",children:"Public — no credentials"}),a.jsx("option",{value:"deployKey",children:"Private — deploy key (SSH)"}),a.jsx("option",{value:"token",children:"Private — access token (HTTPS)"})]}),m.authType==="token"&&a.jsx(Ee,{label:"Access token",type:"password",value:m.token,onChange:O=>A({token:O.target.value}),error:ae("token"),hint:x&&o.hasToken?"A token is stored. Leave this empty to keep it.":"Read-only access to this one repository is enough.",placeholder:x&&o.hasToken?"••••••••":"github_pat_…",autoComplete:"off",spellCheck:!1}),m.authType==="deployKey"&&(x?a.jsxs("div",{className:"rounded-md border border-line bg-inset/50 p-3.5",children:[a.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[a.jsx("div",{className:"text-xs font-medium text-ink",children:"Deploy key"}),a.jsx(ee,{size:"sm",icon:a.jsx(Zi,{className:"size-3.5","aria-hidden":"true"}),onClick:()=>void P(),loading:S,children:C?"Generate a new key":"Generate key"})]}),C?a.jsxs(a.Fragment,{children:[a.jsx("pre",{className:"mt-2.5 max-h-24 overflow-auto whitespace-pre-wrap break-all rounded border border-line bg-canvas p-2.5 font-mono text-2xs text-muted",children:C}),a.jsxs("div",{className:"mt-2 flex flex-wrap items-center justify-between gap-2",children:[a.jsx("p",{className:"text-2xs text-faint",children:"Add it under the repository’s Settings → Deploy keys. Leave “Allow write access” off."}),a.jsx(jt,{value:C,label:"Copy public key",withText:!0})]})]}):a.jsx("p",{className:"mt-2 text-2xs text-faint",children:"No key yet. The private half stays on this server and is never shown."})]}):a.jsx(we,{tone:"info",children:"Create the app first; the key is generated from its settings afterwards."}))]}),a.jsxs("section",{className:"space-y-4 border-t border-line pt-5",children:[a.jsxs("div",{children:[a.jsx("h3",{className:"text-sm font-semibold text-ink",children:"How it runs"}),a.jsxs("p",{className:"mt-0.5 text-xs text-muted",children:["All optional. An empty field is read from the repository’s"," ",a.jsx("code",{className:"font-mono",children:"ez.json"}),", and failing that from"," ",a.jsx("code",{className:"font-mono",children:"package.json"}),"."]})]}),a.jsxs(ka,{children:[a.jsx(Ee,{label:"Port",optional:!0,type:"number",min:1,max:65535,inputMode:"numeric",value:m.settings.port,onChange:O=>k({port:O.target.value}),error:ae("port"),hint:"The port the app listens on. Passed to it as PORT, and used for the health check.",placeholder:"3000"}),a.jsx(Ee,{label:"Health check path",optional:!0,value:m.settings.healthPath,onChange:O=>k({healthPath:O.target.value}),error:ae("healthPath"),hint:"Must answer before a deployment counts. Defaults to /.",placeholder:"/healthz",className:"font-mono",spellCheck:!1})]}),a.jsx(Ee,{label:"Start command",optional:!0,value:m.settings.start,onChange:O=>k({start:O.target.value}),hint:"The long-running process. Any language: node server.js, python app.py, ./server.",placeholder:"from ez.json, or npm start",className:"font-mono",spellCheck:!1}),a.jsxs(ka,{children:[a.jsxs("div",{className:"space-y-2",children:[a.jsx(Ee,{label:"Install command",optional:!0,value:m.settings.install,onChange:O=>k({install:O.target.value}),disabled:m.settings.skipInstall,placeholder:"from ez.json, or npm ci",className:"font-mono",spellCheck:!1}),a.jsx(il,{label:"Skip the install step",checked:m.settings.skipInstall,onChange:O=>k({skipInstall:O})})]}),a.jsxs("div",{className:"space-y-2",children:[a.jsx(Ee,{label:"Build command",optional:!0,value:m.settings.build,onChange:O=>k({build:O.target.value}),disabled:m.settings.skipBuild,placeholder:"from ez.json, or npm run build",className:"font-mono",spellCheck:!1}),a.jsx(il,{label:"Skip the build step",checked:m.settings.skipBuild,onChange:O=>k({skipBuild:O})})]})]})]}),a.jsxs("section",{className:"space-y-4 border-t border-line pt-5",children:[a.jsxs("div",{children:[a.jsx("h3",{className:"text-sm font-semibold text-ink",children:"Persistent data"}),a.jsx("p",{className:"mt-0.5 text-xs text-muted",children:"Each deployment runs from a fresh copy of your code. Files written to at runtime are lost on the next deploy — and on rollback. Every path listed here, a folder or a single file, lives in a shared location that every deployment and every rollback reuses."})]}),a.jsx(Ow,{label:"Folders and files to keep",optional:!0,value:m.settings.persist,onChange:O=>k({persist:O}),normalize:(O,D)=>{const le=ZS(O,D);return{value:le.path,error:le.error}},max:20,hint:"Add folders your app writes to: uploads, SQLite data, logs — or one file, such as prisma/hub.db. Press Enter after each path.",placeholder:"data, uploads, prisma/hub.db"}),a.jsxs("div",{className:"space-y-1 text-2xs text-faint",children:[a.jsxs("p",{children:["The first deployment copies the current contents into the shared location; after that, the shared copy is what counts — changes to it in the repository are ignored. A folder is usually the safer unit: SQLite creates ",a.jsx("code",{className:"font-mono",children:"-wal"})," and"," ",a.jsx("code",{className:"font-mono",children:"-shm"})," files next to its database. Left empty, the list is read from ",a.jsx("code",{className:"font-mono",children:"ez.json"}),"."]}),x&&o?.sharedDir&&a.jsxs("p",{className:"break-all",children:["Kept in ",a.jsx("span",{className:"font-mono",children:o.sharedDir})]})]})]}),a.jsx("section",{className:"space-y-4 border-t border-line pt-5",children:a.jsx(Ho,{label:"Environment variables",optional:!0,rows:5,value:m.envText,onChange:O=>A({envText:O.target.value}),error:ae("env"),hint:"One NAME=value per line; a pasted .env file works. Stored on this server only, and available to the build and the running app.",placeholder:`DATABASE_URL=postgres://…
|
|
451
|
+
NODE_ENV=production`,className:"font-mono",spellCheck:!1})}),a.jsxs("section",{className:"space-y-4 border-t border-line pt-5",children:[a.jsx(qt,{checked:m.autoRollback,onChange:O=>A({autoRollback:O}),label:"Roll back automatically",description:"If a new release starts but fails its health check, the previous release is started again."}),a.jsx(ka,{children:a.jsx(Ee,{label:"Releases to keep",type:"number",min:c.limits.keepReleasesMin,max:c.limits.keepReleasesMax,inputMode:"numeric",value:m.keepReleases,onChange:O=>A({keepReleases:O.target.value}),error:ae("keepReleases"),hint:"Older ones are deleted. The live release and the one before it are always kept."})}),c.channels.length>0&&a.jsxs("div",{children:[a.jsx("div",{className:"mb-1.5 text-xs font-medium text-ink",children:"Notify on every deployment"}),a.jsx("div",{className:"space-y-1.5",children:c.channels.map(O=>a.jsx(il,{label:`${O.name} (${O.type})`,checked:m.notifyChannelIds.includes(O.id),onChange:D=>A({notifyChannelIds:D?[...m.notifyChannelIds,O.id]:m.notifyChannelIds.filter(le=>le!==O.id)})},O.id))})]})]})]})})}function Dg(s){return s.domain?"domain":s.bind==="0.0.0.0"?"direct":"local"}function m5({open:s,hook:o,domains:c,onClose:u,onSaved:d}){const h=Nt(),[x,m]=g.useState(o.enabled),[p,b]=g.useState(Dg(o)),[j,y]=g.useState(o.domain??""),[N,C]=g.useState(String(o.port)),[B,S]=g.useState(!1),[T,A]=g.useState(!1);g.useEffect(()=>{s&&(m(o.enabled),b(Dg(o)),y(o.domain??""),C(String(o.port)),A(!1))},[s]);const k=c.filter(L=>L.enabled),X=k.find(L=>L.name===j),R=Jo(N),M=x&&p==="domain"&&!X?"Choose a domain.":null,ne=async()=>{if(!B&&(A(!0),!(R||M))){S(!0);try{const L=await oe.deployments.updateHook({enabled:x,port:Number(N),bind:p==="direct"?"0.0.0.0":"127.0.0.1",domain:p==="domain"?j:null});L.nginxReloaded===!1?h.warning("Saved, but nginx was not reloaded","The domain’s config was written. Reload nginx for the deploy hook to be reachable."):h.success("Deploy hook saved",x?`The background service picks it up within ${L.appliesWithinSeconds??10} seconds.`:"Nothing is listening for deployments now."),d(L)}catch(L){const Q=L instanceof Be&&typeof L.payload.detail=="string"?L.payload.detail:null;h.error("Could not save the deploy hook",Q??(L instanceof Error?L.message:"Nothing was changed."))}finally{S(!1)}}};return a.jsx(yn,{open:s,onClose:u,preventClose:B,size:"md",title:"Deploy hook",description:"Lets a GitHub Action tell this server to deploy. Each app has its own token; the hook can do nothing else.",footer:a.jsxs(a.Fragment,{children:[a.jsx(ee,{variant:"secondary",onClick:u,disabled:B,children:"Cancel"}),a.jsx(ee,{variant:"primary",onClick:()=>void ne(),loading:B,children:"Save"})]}),children:a.jsxs("div",{className:"space-y-5",children:[a.jsx(qt,{checked:x,onChange:m,label:"Accept deployments from CI",description:"Off by default. While it is off nothing listens, and apps can only be deployed from this dashboard."}),x&&a.jsxs(a.Fragment,{children:[a.jsxs(rl,{label:"How CI reaches it",value:p,onChange:L=>b(L.target.value),children:[a.jsx("option",{value:"domain",children:"Through one of my domains (recommended)"}),a.jsx("option",{value:"direct",children:"Directly, on its own port"}),a.jsx("option",{value:"local",children:"This machine only"})]}),p==="domain"&&a.jsxs(a.Fragment,{children:[a.jsxs(rl,{label:"Domain",value:j,onChange:L=>y(L.target.value),error:T?M:null,hint:"One path, /.ez-deploy/, is added to this domain’s nginx config. Nothing else becomes reachable.",children:[a.jsx("option",{value:"",children:"Choose a domain…"}),k.map(L=>a.jsxs("option",{value:L.name,children:[L.name,L.ssl?"":" — no SSL"]},L.name))]}),k.length===0&&a.jsx(we,{tone:"warning",children:"There is no enabled domain yet. Add one on the Domains page, or reach the hook directly."}),X&&!X.ssl&&a.jsx(we,{tone:"warning",title:"This domain has no certificate",children:"The deploy token would travel over plain HTTP. Issue a certificate for it on the SSL page first."})]}),p==="direct"&&a.jsx(we,{tone:"warning",title:"Plain HTTP, on every network interface",children:"The deploy token is sent unencrypted, and the port has to be opened in your firewall. Use a domain with SSL unless this server sits on a private network."}),p==="local"&&a.jsx(we,{tone:"info",children:"Only programs on this server can call the hook — useful with your own tunnel or reverse proxy. GitHub cannot reach it."}),a.jsx(ka,{children:a.jsx(Ee,{label:"Listener port",type:"number",min:1,max:65535,inputMode:"numeric",value:N,onChange:L=>C(L.target.value),error:T?R:null,hint:p==="direct"?"The port CI connects to.":"Internal. nginx forwards to it; it is not opened to the network."})})]})]})})}function x5(s,o){return s instanceof Be||s instanceof Error?s.message:o}function p5({data:s,onConfigure:o}){const{hook:c}=s,u=c.enabled&&(c.domain!==null||c.bind==="0.0.0.0"),h=!!(c.domain?s.domains.find(b=>b.name===c.domain):void 0)?.ssl;let x="neutral",m="Off",p="Apps are deployed from this dashboard only. Turn it on to deploy from GitHub Actions.";return c.enabled&&!c.listening?(x="warn",m="Not listening",p="It is switched on, but nothing answers on its port yet. The background service starts it within a few seconds; if it stays like this, check that the service is running."):c.enabled&&!u?(x="neutral",m="This machine only",p="Listening, but only programs on this server can call it. GitHub cannot reach it."):c.enabled&&c.domain?(x=h?"ok":"warn",m=h?"On":"On — no SSL",p=h?`Reached through https://${c.domain}${c.path}`:`Reached through http://${c.domain}${c.path} — the deploy token travels unencrypted. Issue a certificate for that domain.`):c.enabled&&(x="warn",m="On — plain HTTP",p=`Listening on every interface, port ${c.port}. The deploy token travels unencrypted; prefer a domain with SSL.`),a.jsx(Ze,{children:a.jsx(nn,{icon:a.jsx(Lo,{className:"size-4","aria-hidden":"true"}),title:a.jsxs("span",{className:"flex flex-wrap items-center gap-2",children:["Deploy hook",a.jsx(ve,{tone:x,dot:!0,children:m})]}),description:p,actions:a.jsx(ee,{size:"sm",icon:a.jsx(ff,{className:"size-3.5","aria-hidden":"true"}),onClick:o,children:"Configure"})})})}function g5({app:s,canDeploy:o,busy:c,onDeploy:u,onOpen:d,onEdit:h,onDelete:x}){const m=s.lastRun??null,p=s.process??null,b=m?Gy[m.status]:null;return a.jsxs("li",{className:"flex flex-col gap-3 px-4 py-3.5 transition-colors duration-[var(--ez-motion-fast)] hover:bg-raised/40 lg:flex-row lg:items-center lg:gap-4",children:[a.jsxs("button",{type:"button",onClick:()=>d("activity"),className:"flex min-w-0 flex-1 items-start gap-3 rounded text-left focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-accent",children:[a.jsx(Zt,{tone:p?IS(p.status):"neutral",pulse:p?.status==="online",className:"mt-1.5"}),a.jsxs("span",{className:"min-w-0",children:[a.jsx("span",{className:"block truncate font-mono text-sm font-semibold text-ink",children:s.id}),a.jsxs("span",{className:"mt-0.5 flex flex-wrap items-center gap-x-2 gap-y-0.5 text-2xs text-muted",children:[a.jsx("span",{className:"truncate font-mono",title:s.repoUrl,children:dw(s.repoUrl,44)}),a.jsxs("span",{className:"inline-flex items-center gap-1",children:[a.jsx(j2,{className:"size-3","aria-hidden":"true"}),s.branch]}),s.domain&&a.jsxs("span",{className:"inline-flex items-center gap-1 text-accent-text",children:[a.jsx(_l,{className:"size-3","aria-hidden":"true"}),s.domain]})]}),a.jsx("span",{className:"mt-1 flex flex-wrap items-center gap-x-2 gap-y-0.5 text-2xs text-faint",children:p?a.jsxs(a.Fragment,{children:[a.jsxs("span",{children:[p.status,p.status==="online"&&p.uptimeMs!==null?` · up ${Xo(p.uptimeMs)}`:""]}),p.memoryBytes!==null&&a.jsxs("span",{children:["· ",zy(p.memoryBytes)]}),p.restarts>0&&a.jsxs("span",{children:["· ",_n(p.restarts,"restart")]})]}):a.jsx("span",{children:s.currentRelease?"Not running":"Never deployed"})})]})]}),a.jsx("div",{className:"flex flex-wrap items-center gap-2 pl-7 lg:w-56 lg:shrink-0 lg:pl-0",children:s.deploying?a.jsx(ve,{tone:"info",dot:!0,children:m?.status==="running"?gf(m.step):"Deploying"}):b&&m?a.jsxs(a.Fragment,{children:[a.jsx(ve,{tone:b.tone,dot:!0,children:b.label}),a.jsx("span",{className:"font-mono text-2xs text-faint",children:Gi(m.sha)}),a.jsx("span",{className:"text-2xs text-faint",children:Pi(m.finishedAt??m.startedAt)})]}):a.jsx("span",{className:"text-2xs text-faint",children:"No deployments yet"})}),a.jsxs("div",{className:"flex shrink-0 items-center justify-end gap-1.5 pl-7 lg:pl-0",children:[a.jsx(ee,{variant:"primary",size:"sm",icon:a.jsx(qi,{className:"size-3.5","aria-hidden":"true"}),onClick:u,loading:c,disabled:!o||!!s.deploying,children:"Deploy"}),a.jsx(ee,{size:"sm",onClick:()=>d("setup"),children:"Domain"}),a.jsx(ee,{size:"sm",onClick:()=>d("github"),children:"GitHub"}),a.jsx(at,{label:`Edit ${s.id}`,size:"sm",onClick:h,children:a.jsx(uf,{className:"size-4","aria-hidden":"true"})}),a.jsx(at,{label:`Delete ${s.id}`,size:"sm",variant:"dangerGhost",onClick:x,disabled:!!s.deploying,children:a.jsx(Ul,{className:"size-4","aria-hidden":"true"})})]})]})}function y5(){Vn("Deployments");const s=Nt(),o=yt(R=>oe.deployments.list(R),[]),c=o.data,u=!!c?.apps.some(R=>R.deploying);Hl(o.reload),Ml(o.reload,u?2e3:1e4);const[d,h]=g.useState(!1),[x,m]=g.useState(null),[p,b]=g.useState(!1),[j,y]=g.useState(null),[N,C]=g.useState(null),[B,S]=g.useState(null),T=()=>{m(null),h(!0)},A=async R=>{if(!N){C(R.id);try{await oe.deployments.deploy(R.id),y({id:R.id,tab:"activity"}),o.reload()}catch(M){s.error(`Could not deploy ${R.id}`,x5(M,"Nothing was started."))}finally{C(null)}}},k=a.jsx(oa,{title:"Deployments",description:"Put a project from a git repository on this server: fetched, built and started here, with earlier releases kept to roll back to.",actions:a.jsxs(a.Fragment,{children:[a.jsx(at,{label:"Refresh",onClick:o.reload,children:a.jsx(Lt,{className:"size-4","aria-hidden":"true"})}),a.jsx(ee,{variant:"primary",icon:a.jsx(sa,{className:"size-4","aria-hidden":"true"}),onClick:T,disabled:!c,children:"New app"})]})});if(o.error&&!c)return a.jsxs(a.Fragment,{children:[k,a.jsx(Et,{error:o.error,onRetry:o.reload})]});if(!c)return a.jsxs(a.Fragment,{children:[k,a.jsxs(za,{children:[a.jsx(Fe,{className:"h-20 rounded-lg"}),a.jsx(Fe,{className:"h-56 rounded-lg"})]})]});const X=c.requirements.git&&c.requirements.pm2;return a.jsxs(a.Fragment,{children:[k,a.jsxs("div",{className:"space-y-5",children:[!c.requirements.git&&a.jsx(we,{tone:"danger",title:"git is not installed on this server",children:"Deployments fetch the code with git. Install it, and make sure it is on the PATH of the Easy DevOps service."}),!c.requirements.pm2&&a.jsxs(we,{tone:"warning",title:"PM2 is not installed",action:a.jsx(bt,{to:"/processes",className:Ta("secondary","sm"),children:"Open Processes"}),children:["Deployed apps are kept running by PM2. Install it from the Processes page, or with"," ",a.jsx("code",{className:"font-mono",children:"npm install -g pm2"}),"."]}),a.jsx(p5,{data:c,onConfigure:()=>b(!0)}),a.jsxs(Ze,{className:"overflow-hidden",children:[a.jsx(nn,{icon:a.jsx(qi,{className:"size-4","aria-hidden":"true"}),title:"Apps",description:c.apps.length===0?"Nothing is deployed from here yet.":`${_n(c.apps.length,"app")}. Each runs under PM2 as ez-<name>.`}),c.apps.length===0?a.jsx(Dn,{children:a.jsx(On,{icon:a.jsx(qi,{className:"size-5","aria-hidden":"true"}),title:"Deploy your first app",description:a.jsxs(a.Fragment,{children:["Give it a repository. A Node project needs nothing else; for any other language, add an ",a.jsx("code",{className:"font-mono",children:"ez.json"})," with its install, build and start commands."]}),action:a.jsx(ee,{variant:"primary",icon:a.jsx(sa,{className:"size-4","aria-hidden":"true"}),onClick:T,children:"New app"})})}):a.jsx("ul",{className:"divide-y divide-line",children:c.apps.map(R=>a.jsx(g5,{app:R,canDeploy:X,busy:N===R.id,onDeploy:()=>void A(R),onOpen:M=>y({id:R.id,tab:M}),onEdit:()=>{m(R),h(!0)},onDelete:()=>S(R)},R.id))})]})]}),a.jsx(h5,{open:d,app:x,meta:c,onClose:()=>h(!1),onSaved:(R,M)=>{h(!1),o.reload(),M?(s.success(`${R.id} created`,"Press Deploy to build and start it."),R.authType==="deployKey"&&(m(R),h(!0))):s.success(`${R.id} saved`,"It applies to the next deployment.")}}),a.jsx(m5,{open:p,hook:c.hook,domains:c.domains,onClose:()=>b(!1),onSaved:()=>{b(!1),o.reload()}}),a.jsx(d5,{appId:j?.id??null,initialTab:j?.tab,hook:c.hook,meta:c,onClose:()=>y(null),onConfigureHook:()=>b(!0),onChanged:o.reload,onDelete:R=>S(R)}),a.jsx(a5,{app:B,onClose:()=>S(null),onDeleted:()=>{S(null),y(null),o.reload()}})]})}const _g=[{id:"error",label:"Error",fileName:"error.log"},{id:"access",label:"Access",fileName:"access.log"}];function v5(s){return/\[(error|crit|emerg|alert)\]/.test(s)?"text-bad":/\[(warn|warning)\]/.test(s)?"text-warn":/\s(2\d\d|3\d\d)\s/.test(s)?"text-ok":"text-muted"}function b5(){Vn("Logs");const{connectionError:s}=ra(),[o,c]=Vo(),d=o.get("file")==="access"?"access":"error",h=_g.find(C=>C.id===d),x=C=>{const B=new URLSearchParams(o);C==="error"?B.delete("file"):B.set("file",C),c(B,{replace:!0})},m=Uy(d,{limit:500}),p=g.useRef(null),[b,j]=g.useState(!0);g.useEffect(()=>{const C=p.current;C&&b&&(C.scrollTop=C.scrollHeight)},[m.lines,b]);const y=m.paused,N=m.connected&&!y;return a.jsxs(a.Fragment,{children:[a.jsx(oa,{title:"Logs",description:"nginx output as it is written. The stream follows the file; switching tabs does not restart nginx.",meta:a.jsx(ve,{tone:y?"warn":m.connected?"ok":"bad",dot:!0,children:y?"Paused":m.connected?"Live":"Reconnecting"}),actions:a.jsxs(a.Fragment,{children:[a.jsx("div",{className:"flex items-center gap-1 rounded-md border border-line bg-raised/60 p-1",role:"group","aria-label":"Log file",children:_g.map(C=>a.jsx("button",{type:"button","aria-pressed":d===C.id,onClick:()=>x(C.id),className:ie("rounded-sm px-3 py-1 text-xs font-medium transition-colors duration-[var(--ez-motion-fast)]",d===C.id?"bg-surface text-ink shadow-sm":"text-muted hover:text-ink"),children:C.label},C.id))}),a.jsx(ee,{variant:"secondary",size:"sm",icon:y?a.jsx(Ki,{className:"size-3.5","aria-hidden":"true"}):a.jsx(py,{className:"size-3.5","aria-hidden":"true"}),onClick:()=>m.setPaused(!y),children:y?"Resume":"Pause"}),a.jsx(ee,{variant:"ghost",size:"sm",icon:a.jsx(Ul,{className:"size-3.5","aria-hidden":"true"}),onClick:m.clear,disabled:m.lines.length===0,children:"Clear"}),a.jsx(ee,{variant:"ghost",size:"sm",icon:a.jsx(Lt,{className:"size-3.5","aria-hidden":"true"}),onClick:m.restart,disabled:!m.connected,children:"Reload tail"}),a.jsx(jt,{value:m.lines.join(`
|
|
452
|
+
`),label:"Copy logs",withText:!0})]})}),s&&a.jsx(we,{tone:"warning",title:"The live stream is disconnected",className:"mb-4",children:"New lines appear once the dashboard socket reconnects. nginx itself is unaffected."}),a.jsxs(Ze,{className:"overflow-hidden",children:[a.jsxs("div",{className:"flex flex-wrap items-center gap-x-3 gap-y-1.5 border-b border-line bg-raised/40 px-4 py-2 sm:px-5",children:[a.jsxs("span",{className:"inline-flex items-center gap-2 font-mono text-2xs text-muted",children:[a.jsx(Zt,{tone:y?"warn":m.connected?"ok":"bad",pulse:N}),y?"Paused":m.connected?"Live":"Reconnecting"]}),a.jsx("span",{className:"font-mono text-2xs text-faint",children:h.fileName}),a.jsx("span",{className:"font-mono text-2xs text-faint",children:m.lines.length===1?"1 line":`${m.lines.length} lines`}),y&&m.missed>0&&a.jsxs(ve,{tone:"warn",children:[m.missed===999?"999+":m.missed," new while paused"]}),a.jsx("span",{className:"ml-auto text-2xs text-faint",children:b?"Following the tail":"Scrolled back"})]}),a.jsxs("div",{className:"relative",children:[a.jsx("div",{ref:p,role:"log","aria-label":`nginx ${h.label.toLowerCase()} log`,"aria-live":"off",onScroll:()=>{const C=p.current;C&&j(C.scrollHeight-C.scrollTop-C.clientHeight<40)},className:"h-[calc(100dvh-20rem)] min-h-72 overflow-y-auto bg-canvas p-4 font-mono text-xs leading-relaxed",children:m.lines.length===0?a.jsx("p",{className:"italic text-faint",children:m.connected?d==="access"?"No access lines yet. They appear here as nginx writes them.":"No error lines yet.":"Waiting for the live stream…"}):m.lines.map((C,B)=>a.jsx("div",{className:ie("whitespace-pre-wrap break-all py-0.5",v5(C)),children:C},`${B}-${C}`))}),!b&&a.jsxs("button",{type:"button",onClick:()=>{const C=p.current;C&&(C.scrollTop=C.scrollHeight),j(!0)},className:"absolute bottom-3 right-3 inline-flex items-center gap-1.5 rounded-pill border border-line bg-surface px-3 py-1.5 text-2xs font-medium text-ink shadow-pop transition-colors hover:bg-inset",children:[a.jsx(Hj,{className:"size-3","aria-hidden":"true"}),"Jump to latest"]})]})]}),a.jsx("p",{className:"mt-3 text-2xs text-faint",children:"The dashboard keeps the last 500 lines in memory for this tab. Pausing only stops the display — lines keep being written to disk."})]})}const Mg={not_linked:"Not linked",connecting:"Connecting…",connected:"Online",rejected:"Rejected by the Hub",unreachable:"Hub unreachable"},Og={connected:"ok",connecting:"warn",unreachable:"warn",rejected:"bad",not_linked:"neutral"};function Ld(s,o){return s instanceof Be?(typeof s.payload.detail=="string"?s.payload.detail:null)??s.message:s instanceof Error?s.message:o}function j5({checked:s,indeterminate:o,disabled:c,label:u,onChange:d}){const h=g.useRef(null);return g.useEffect(()=>{h.current&&(h.current.indeterminate=o)},[o]),a.jsx("input",{ref:h,type:"checkbox","aria-label":`All ${u} permissions`,checked:s,disabled:c,onChange:x=>d(x.target.checked),className:"mt-0.5 size-4 shrink-0 cursor-pointer rounded border-line accent-[var(--ez-accent)]"})}function Ud(s,o){return!!s.comingSoon||o.includes(s.id)}function N5(){const s=Nt(),o=bn(),c=yt(P=>oe.hub.status(P)),[u,d]=g.useState(""),[h,x]=g.useState(null),[m,p]=g.useState(!1),[b,j]=g.useState(!1),[y,N]=g.useState(!1),C=c.data?.status??"not_linked";g.useEffect(()=>{const P=C==="connecting"?2e3:C==="unreachable"?15e3:0;if(!P)return;const ae=window.setTimeout(c.reload,P);return()=>window.clearTimeout(ae)},[c.data,c.reload,C]);const B=async()=>{if(m)return;const P=Iw(u);if(P){x(P);return}x(null),p(!0);try{const ae=await oe.hub.connect(u.trim());c.setData(ae.status),d(""),s.success("Connection string saved",ae.status.status==="connecting"?"Connecting to the Hub…":"This server is now linked to the Hub.")}catch(ae){x(Ld(ae,"The Hub did not accept that connection string."))}finally{p(!1)}},S=async()=>{if(!(b||!await o({title:"Unlink this server from the Hub?",body:"The Hub stops receiving data from this server. Domains and certificates are not affected.",confirmLabel:"Unlink",tone:"danger"}))){j(!0);try{await oe.hub.unlink(),c.setData(ae=>ae&&{...ae,linked:!1,hubUrl:null,serverId:null,connected:!1,status:"not_linked",permissions:{},lastError:null,attempts:0}),d(""),x(null),s.success("Unlinked from the Hub")}catch(ae){s.error("Could not unlink",Ld(ae,"The link is still in place."))}finally{j(!1)}}},T=c.data?.permissions??{},A=c.data?.tree??[],k=c.data?.comingSoon??[],X=async(P,ae)=>{if(!y){N(!0),c.setData(O=>{if(!O)return O;const D={...O.permissions};for(const le of P)D[le]=ae;return{...O,permissions:D}});try{const O={};for(const le of P)O[le]=ae;const D=await oe.hub.updatePermissions(O);c.setData(le=>le&&{...le,permissions:D.permissions,tree:D.tree,comingSoon:D.comingSoon})}catch(O){s.error("Could not save permissions",Ld(O,"The change was not kept.")),c.reload()}finally{N(!1)}}},R=P=>{const ae=P.children.filter(D=>!Ud(D,k));if(ae.length===0)return"off";const O=ae.filter(D=>T[D.id]===!0).length;return O===0?"off":O===ae.length?"on":"partial"},M=(P,ae)=>{const O=P.children.filter(D=>!Ud(D,k)).map(D=>D.id);O.length!==0&&X(O,ae)},ne=Object.values(T).filter(Boolean).length,L=P=>a.jsxs("div",{className:"w-full max-w-md space-y-3",children:[a.jsx(Ho,{label:"Connection string",value:u,onChange:ae=>{d(ae.target.value),h&&x(null)},placeholder:"ezops://https://hub.example.com|server-id|secret",hint:"Shown only once by the Hub. Treat it like a password.",error:h,className:"font-mono",spellCheck:!1,autoComplete:"off",rows:3}),a.jsx(ee,{variant:"primary",loading:m,disabled:!u.trim(),icon:a.jsx(_2,{className:"size-4","aria-hidden":"true"}),onClick:()=>void B(),children:P})]}),Q=Og[C]??"neutral",ce=(()=>{if(c.error&&!c.data)return a.jsx(Dn,{children:a.jsx(Et,{error:c.error,title:"Could not read the Hub status",onRetry:c.reload,className:"border-0"})});if(!c.data)return a.jsxs(Dn,{className:"space-y-3",children:[a.jsx(Fe,{className:"h-5 w-48"}),a.jsx(Fe,{className:"h-24 rounded-md"}),a.jsx(Fe,{className:"h-40 rounded-md"})]});const P=c.data,ae=Mg[P.status]??"Unknown state",O=Og[P.status]??"neutral";return a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:"flex flex-wrap items-center gap-x-4 gap-y-2 border-b border-line bg-raised/40 px-4 py-3 sm:px-5",children:[a.jsx(Zt,{tone:O,pulse:P.status==="connecting"}),a.jsx("span",{className:"text-sm font-medium text-ink",children:ae}),P.hubUrl&&a.jsx("code",{className:"break-all font-mono text-xs text-muted",children:P.hubUrl}),P.serverId&&a.jsxs("span",{className:"text-2xs text-faint",children:["Server ID ",a.jsx("code",{className:"font-mono text-muted",children:P.serverId})]}),P.status==="unreachable"&&P.attempts>0&&a.jsxs("span",{className:"text-2xs text-faint",children:[P.attempts," reconnect attempt",P.attempts===1?"":"s"]})]}),a.jsxs("div",{className:"flex flex-wrap items-start gap-x-2 gap-y-1 border-b border-line px-4 py-2.5 text-2xs sm:px-5",children:[a.jsx("span",{className:"font-medium uppercase tracking-wider text-faint",children:"Data directory"}),a.jsx("code",{className:"break-all font-mono text-muted",children:P.dataDir}),P.devDataDir&&a.jsx(ve,{tone:"warn",children:"dev override"}),P.devDataDir&&a.jsx("span",{className:"w-full text-faint",children:"This is not the normal data directory. The CLI must run with the same override, or it reads and writes a different domain list."})]}),a.jsxs(Dn,{className:"space-y-5",children:[P.lastError&&a.jsx(we,{tone:P.status==="rejected"?"danger":"warning",title:P.status==="rejected"?"The Hub rejected this server":"The Hub cannot be reached right now",children:P.lastError}),P.linked?a.jsxs(a.Fragment,{children:[P.status==="rejected"&&a.jsxs("div",{className:"space-y-3 border-t border-line pt-4",children:[a.jsx("p",{className:"text-sm text-muted",children:"This link cannot recover by itself. Paste a fresh connection string from the Hub to replace it."}),L("Reconnect")]}),a.jsxs("section",{className:"space-y-3","aria-labelledby":"hub-permissions-heading",children:[a.jsxs("div",{className:"flex flex-wrap items-end justify-between gap-2",children:[a.jsxs("div",{children:[a.jsx("h3",{id:"hub-permissions-heading",className:"text-sm font-semibold text-ink",children:"Allow the Hub to"}),a.jsx("p",{className:"mt-0.5 text-xs text-muted",children:"Monitoring — metrics, nginx status, domains and certificate expiry — is always on. These toggles are enforced on this server; the Hub cannot grant itself anything."})]}),a.jsxs(ve,{tone:ne>0?"accent":"neutral",children:[ne," granted"]})]}),a.jsx("div",{className:"space-y-2.5",children:A.map(D=>{const le=R(D);return a.jsxs("div",{className:"overflow-hidden rounded-md border border-line",children:[a.jsxs("label",{className:"flex cursor-pointer items-start gap-3 bg-raised/60 px-3.5 py-2.5",children:[a.jsx(j5,{checked:le==="on",indeterminate:le==="partial",disabled:y,label:D.label,onChange:F=>M(D,F)}),a.jsxs("span",{className:"min-w-0",children:[a.jsx("span",{className:"block text-sm font-medium text-ink",children:D.label}),a.jsx("span",{className:"mt-0.5 block text-xs text-muted",children:D.description})]})]}),a.jsx("ul",{className:"divide-y divide-line/60",children:D.children.map(F=>{const te=Ud(F,k),de=T[F.id]===!0;return a.jsx("li",{children:a.jsxs("label",{className:ie("flex items-start gap-3 px-3.5 py-2.5 pl-8",te?"cursor-not-allowed opacity-60":"cursor-pointer hover:bg-inset/60"),children:[a.jsx("input",{type:"checkbox",checked:de,disabled:te||y,onChange:()=>void X([F.id],!de),className:"mt-0.5 size-3.5 shrink-0 cursor-pointer rounded border-line accent-[var(--ez-accent)]"}),a.jsxs("span",{className:"min-w-0",children:[a.jsxs("span",{className:"inline-flex flex-wrap items-center gap-2 text-sm text-ink",children:[F.label,te&&a.jsx(ve,{tone:"warn",children:"Coming soon"})]}),a.jsx("span",{className:"mt-0.5 block text-xs text-faint",children:F.description})]})]})},F.id)})})]},D.id)})})]}),a.jsx("div",{className:"border-t border-line pt-4",children:a.jsx(ee,{variant:"dangerGhost",loading:b,icon:a.jsx(EN,{className:"size-4","aria-hidden":"true"}),onClick:()=>void S(),children:"Unlink from Hub"})})]}):a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:"space-y-2",children:[a.jsx("p",{className:"text-sm text-muted",children:"Add this server in the Hub first, then paste the connection string it gives you."}),a.jsxs("ol",{className:"list-decimal space-y-1 pl-5 text-sm text-muted",children:[a.jsxs("li",{children:["Open your Hub dashboard → ",a.jsx("span",{className:"text-ink",children:"Add Server"})]}),a.jsx("li",{children:"Enter a display name and submit"}),a.jsx("li",{children:"Copy the connection string the Hub shows you"}),a.jsx("li",{children:"Paste it below and click Connect"})]})]}),L("Connect")]})]})]})})();return a.jsxs(Ze,{className:"overflow-hidden",children:[a.jsx("div",{className:ie("h-0.5 w-full",Q==="ok"?"bg-ok/60":Q==="bad"?"bg-bad/60":"bg-warn/60"),"aria-hidden":"true"}),a.jsx(nn,{icon:a.jsx(Kj,{className:"size-4","aria-hidden":"true"}),title:a.jsxs("span",{className:"inline-flex flex-wrap items-center gap-2",children:["Easy DevOps Hub",c.data&&a.jsx(ve,{tone:Q,dot:!0,children:Mg[c.data.status]??"Unknown"}),c.data?.devDataDir&&a.jsx(ve,{tone:"warn",children:"dev data dir"})]}),description:"Monitor and control this server from a central dashboard.",actions:a.jsx(ee,{variant:"secondary",size:"sm",loading:c.loading,icon:a.jsx(Lt,{className:"size-3.5","aria-hidden":"true"}),onClick:c.reload,children:"Refresh"})}),ce,c.loading&&c.data&&a.jsxs("div",{className:"flex items-center gap-2 border-t border-line px-4 py-2 text-2xs text-faint sm:px-5",children:[a.jsx(Ms,{}),"Refreshing the Hub state…"]})]})}const Lg=[{id:"general",label:"General"},{id:"access",label:"Access"},{id:"hub",label:"Hub"},{id:"backup",label:"Backup"}],Fd=[{value:"127.0.0.1",label:"This machine only (127.0.0.1)"},{value:"0.0.0.0",label:"All interfaces (0.0.0.0)"}];function w5(s){return s==="::1"?"This machine only (::1)":Fd.find(o=>o.value===s)?.label??s}const _o={days:7,min:1,max:30};function Hd(s){return{port:String(s.dashboardPort),nginxDir:s.nginxDir,sslDir:s.sslDir,acmeEmail:s.acmeEmail,autoRenew:s.sslAutoRenew??!0,autoRenewDays:String(s.sslAutoRenewDays??_o.days),deployDir:s.deployDir??""}}function Bd(s){return{bind:s.dashboardBindAddress,auth:s.dashboardAuth,password:"",confirm:""}}function Bi(s,o){return s instanceof Be?(typeof s.payload.detail=="string"?s.payload.detail:null)??s.message:s instanceof Error?s.message:o}function S5(s){if(s instanceof Be){const o=s.payload.reason;if(o==="no_auth_requires_loopback")return"Running without a password requires the dashboard to listen on this machine only.";if(o==="bind_requires_password")return"Set a password before opening the dashboard to the network.";if(o==="no_auth_requires_local_request")return"Turning the password off is only allowed from this machine itself."}return Bi(s,"The previous access settings are still in force.")}function k5(){Vn("Settings");const s=Nt(),o=bn(),{auth:c}=Xn(),u=c?.minPasswordLength??8,[d,h]=Vo(),x=d.get("tab"),m=Lg.some(be=>be.id===x)?x:"general",p=be=>{const ot=new URLSearchParams(d);be==="general"?ot.delete("tab"):ot.set("tab",be),h(ot,{replace:!0})},b=yt(be=>oe.settings.get(be)),j=yt(be=>oe.settings.permissions(be),[],{enabled:!!b.data&&b.data?.platform!=="win32"}),{service:y,error:N,reload:C}=Ji(),B=Fi(y);Bs("settings",()=>{b.reload(),j.reload()});const[S,T]=g.useState(null),[A,k]=g.useState(null),[X,R]=g.useState(!1),[M,ne]=g.useState(!1),[L,Q]=g.useState(!1),[ce,P]=g.useState(!1),[ae,O]=g.useState(!1),[D,le]=g.useState(null),[F,te]=g.useState(null);g.useEffect(()=>{b.data&&!S&&T(Hd(b.data))},[b.data,S]),g.useEffect(()=>{b.data&&!A&&k(Bd(b.data))},[b.data,A]);const de=S?Jo(S.port):null,Y=S?_y(S.acmeEmail):null,re=S&&!S.nginxDir.trim()?"This directory is required.":null,Se=S&&!S.sslDir.trim()?"This directory is required.":null,ke=b.data?.deployDir!==void 0,Ve=!!S&&ke&&S.deployDir.trim()!==(b.data?.deployDir??""),$e=b.data?.sslAutoRenew!==void 0,E=b.data?.sslAutoRenewDaysMin??_o.min,I=b.data?.sslAutoRenewDaysMax??_o.max,K=S?Number(S.autoRenewDays):NaN,W=S&&$e&&S.autoRenew&&(!/^\d+$/.test(S.autoRenewDays.trim())||K<E||K>I)?`Enter a whole number from ${E} to ${I}.`:null,je=!!(S&&b.data&&(Number(S.port)!==b.data.dashboardPort||S.nginxDir!==b.data.nginxDir||S.sslDir!==b.data.sslDir||S.acmeEmail!==b.data.acmeEmail||ke&&S.deployDir.trim()!==(b.data.deployDir??"")||$e&&(S.autoRenew!==(b.data.sslAutoRenew??!0)||S.autoRenew&&K!==(b.data.sslAutoRenewDays??_o.days)))),Ce=!!(A&&b.data&&(A.bind!==b.data.dashboardBindAddress||A.auth!==b.data.dashboardAuth||A.password!=="")),De=async()=>{if(!(!S||L)&&(R(!0),!(de||Y||re||Se||W))){Q(!0);try{const be=await oe.settings.update({dashboardPort:Number(S.port),nginxDir:S.nginxDir.trim(),sslDir:S.sslDir.trim(),acmeEmail:S.acmeEmail.trim(),...Ve?{deployDir:S.deployDir.trim()}:{},...$e?{sslAutoRenew:S.autoRenew,...S.autoRenew?{sslAutoRenewDays:K}:{}}:{}});O(be.needsRestart),s.success("Settings saved",be.needsRestart?"Restart the dashboard for the new port to take effect.":void 0),b.reload()}catch(be){s.error("Could not save settings",Bi(be,"The previous settings are still in force."))}finally{Q(!1)}}},fe=async()=>{if(!A||!b.data||ce)return;if(ne(!0),le(null),te(null),A.auth==="none"&&A.bind==="0.0.0.0"){le("Running without a password requires the dashboard to listen here only.");return}if(A.password){const ot=mg(A.password,u)??(A.password!==A.confirm?"The two passwords do not match.":null);if(ot){te(ot);return}}else if(A.auth==="password"&&!b.data.hasPassword){te("Set a password before requiring a password to sign in.");return}const be=A.password?"password":A.auth;P(!0);try{const ot={dashboardBindAddress:A.bind,dashboardAuth:be};A.password&&(ot.dashboardPassword=A.password);const Ht=await oe.settings.update(ot);O(Ht.needsRestart),k(ft=>ft&&{...ft,auth:Ht.dashboardAuth,password:"",confirm:""}),s.success("Access settings saved",Ht.needsRestart?"Restart the dashboard for the new listening address to take effect.":void 0),b.reload()}catch(ot){le(S5(ot))}finally{P(!1)}},[ye,$t]=g.useState(""),[Qn,an]=g.useState(null),[Gt,rt]=g.useState(!1),Le=async()=>{if(!(!ye||Gt)){rt(!0),an(null);try{await oe.settings.setupPermissions(ye),$t(""),j.setData({configured:!0}),s.success("Permissions configured","nginx and systemctl no longer prompt for a password.")}catch(be){an(Bi(be,"The sudoers file was not written."))}finally{rt(!1)}}},Ut=g.useRef(null),[jn,Kt]=g.useState(!1),[ca,Zn]=g.useState(!1),[ln,V]=g.useState(null),pe=async()=>{if(!jn){Kt(!0);try{const be=await oe.settings.backup(),ot=new Blob([JSON.stringify(be,null,2)],{type:"application/json"}),Ht=URL.createObjectURL(ot),ft=document.createElement("a");ft.href=Ht,ft.download=`easy-devops-backup-${new Date().toISOString().slice(0,10)}.json`,document.body.appendChild(ft),ft.click(),ft.remove(),window.setTimeout(()=>URL.revokeObjectURL(Ht),1e3),s.success("Backup downloaded")}catch(be){s.error("Could not create the backup",Bi(be,"Nothing was downloaded."))}finally{Kt(!1)}}},Ae=async be=>{const ot=be.target.files?.[0];if(!ot)return;V(null);let Ht;try{Ht=JSON.parse(await ot.text())}catch{V({tone:"danger",title:"That file is not valid JSON",body:"Pick the .json file produced by Export backup."}),be.target.value="";return}const ft=Ht;if(!ft||typeof ft!="object"||typeof ft.config!="object"||ft.config===null){V({tone:"danger",title:"That file is not an Easy DevOps backup",body:"A backup always contains a config section and a domains list."}),be.target.value="";return}const ct=await o({title:"Restore this backup?",body:"This replaces your current configuration and domain list. Passwords and the listen address stored in the file are ignored.",confirmLabel:"Restore",tone:"danger"});if(be.target.value="",!!ct){Zn(!0);try{await oe.settings.restore(Ht);const sn=await oe.settings.get();b.setData(sn),T(Hd(sn)),k(Bd(sn)),R(!1),ne(!1),O(!1),j.reload(),V({tone:"success",title:"Backup restored",body:`Configuration from ${Ey(ft.exportedAt??null)} is now in force. Reload any other open dashboard tabs to pick it up.`}),s.success("Backup restored")}catch(sn){V({tone:"danger",title:"The restore failed",body:Bi(sn,"Nothing was changed.")})}finally{Zn(!1)}}},Jt=()=>{b.reload(),j.reload(),m==="general"&&C()},wt=ae&&a.jsx(we,{tone:"info",title:"Restart needed",children:"The port or listening address changed. It takes effect after the dashboard restarts."}),We=()=>b.error&&!b.data?a.jsx(Et,{error:b.error,title:"Could not read the settings",onRetry:b.reload}):!b.data||!S?a.jsxs(za,{children:[a.jsx(Fe,{className:"h-64 rounded-lg"}),a.jsx(Fe,{className:"h-40 rounded-lg"})]}):a.jsxs("div",{className:"space-y-5",children:[a.jsxs(Ze,{className:"overflow-hidden",children:[a.jsx("div",{className:"h-0.5 w-full bg-accent/50","aria-hidden":"true"}),a.jsx(nn,{icon:a.jsx(ff,{className:"size-4","aria-hidden":"true"}),title:"Application configuration",description:"Where nginx lives, which port the dashboard answers on, and the address Let’s Encrypt knows you by."}),a.jsxs(Dn,{className:"space-y-5",children:[wt,a.jsxs(ka,{children:[a.jsx(Ee,{label:"Dashboard port",type:"number",min:1,max:65535,inputMode:"numeric",value:S.port,onChange:be=>T({...S,port:be.target.value}),error:X?de:null,hint:"Takes effect after the dashboard restarts."}),a.jsx(Ee,{label:"ACME email",type:"email",value:S.acmeEmail,onChange:be=>T({...S,acmeEmail:be.target.value}),error:X?Y:null,hint:"Used when ordering certificates. Usually not shown to anyone.",placeholder:"admin@example.com"}),a.jsx(Ee,{label:"Nginx directory",value:S.nginxDir,onChange:be=>T({...S,nginxDir:be.target.value}),error:X?re:null,hint:"Where nginx.conf is located.",className:"font-mono",spellCheck:!1}),a.jsx(Ee,{label:"SSL settings directory",value:S.sslDir,onChange:be=>T({...S,sslDir:be.target.value}),error:X?Se:null,hint:"Default directory for certificates the dashboard manages.",className:"font-mono",spellCheck:!1}),ke&&a.jsx(Ee,{label:"Deployments folder",value:S.deployDir,onChange:be=>T({...S,deployDir:be.target.value}),hint:a.jsxs(a.Fragment,{children:["Where ",a.jsx("strong",{className:"font-medium",children:"new"})," deployed apps are created. Apps that already exist stay where they are — move one from its “Domain & folder” tab. Leave empty for the default",b.data.deployDirDefault?` (${b.data.deployDirDefault})`:"","."]}),placeholder:b.data.deployDirDefault,className:"font-mono",spellCheck:!1})]}),$e&&a.jsxs("div",{className:"space-y-4 border-t border-line pt-5",children:[a.jsx(qt,{checked:S.autoRenew,onChange:be=>T({...S,autoRenew:be}),label:"Renew certificates automatically",description:a.jsx(a.Fragment,{children:"The background service renews HTTP-validated certificates before they expire, without stopping nginx. Wildcard and other DNS-validated certificates need a TXT record added by hand, so they only get a warning."})}),S.autoRenew&&a.jsx(ka,{children:a.jsx(Ee,{label:"Renew this many days before expiry",type:"number",min:E,max:I,inputMode:"numeric",value:S.autoRenewDays,onChange:be=>T({...S,autoRenewDays:be.target.value}),error:X?W:null,hint:S.acmeEmail.trim()?"A failed attempt is retried on the next check, and you are notified either way.":"Set an ACME email above — renewal cannot run without one."})})]})]}),a.jsxs(Md,{children:[a.jsx("span",{className:"text-2xs text-faint",children:je?"Unsaved changes":"All changes saved"}),a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx(ee,{variant:"ghost",size:"sm",disabled:!je,onClick:()=>{T(Hd(b.data)),R(!1)},children:"Revert"}),a.jsx(ee,{variant:"primary",size:"sm",loading:L,disabled:!je,icon:a.jsx(Xd,{className:"size-3.5","aria-hidden":"true"}),onClick:()=>void De(),children:"Save settings"})]})]})]}),a.jsxs(Ze,{className:"overflow-hidden",children:[a.jsx(nn,{icon:a.jsx(yy,{className:"size-4","aria-hidden":"true"}),title:a.jsxs("span",{className:"inline-flex flex-wrap items-center gap-2",children:["Background service",B&&a.jsx(ve,{tone:B.running?"ok":"warn",dot:!0,children:Uo(B)}),y?.dev&&a.jsx(ve,{tone:"warn",children:"dev data dir"})]}),description:"Runs monitoring and notifications without this dashboard open.",actions:a.jsx(bt,{to:"/processes",className:Ta("secondary","sm"),children:"Open Processes"})}),a.jsx(Dn,{children:N&&!y?a.jsxs(we,{tone:"warning",title:"Could not read the service state",children:[N.message," ",a.jsx("button",{type:"button",className:"font-medium underline underline-offset-2",onClick:C,children:"Try again"})]}):y?B?a.jsxs("div",{className:"grid grid-cols-2 gap-4 sm:grid-cols-4",children:[a.jsxs("div",{children:[a.jsx("div",{className:"text-2xs font-medium uppercase tracking-wider text-faint",children:"Status"}),a.jsx("div",{className:ie("mt-0.5 text-sm font-medium",B.running?"text-ok":"text-warn"),children:Uo(B)}),B.stoppedByUser&&B.stoppedAtLabel&&a.jsxs("div",{className:"mt-0.5 text-2xs text-faint",children:["Stopped ",B.stoppedAtLabel]})]}),a.jsxs("div",{children:[a.jsx("div",{className:"text-2xs font-medium uppercase tracking-wider text-faint",children:"Mode"}),a.jsx("div",{className:"mt-0.5 text-sm font-medium text-ink",title:B.mechanismDetail,children:B.mechanismLabel})]}),a.jsxs("div",{children:[a.jsx("div",{className:"text-2xs font-medium uppercase tracking-wider text-faint",children:"Starts"}),a.jsx("div",{className:"mt-0.5 text-sm font-medium text-ink",children:B.startsAtLabel})]}),a.jsxs("div",{children:[a.jsx("div",{className:"text-2xs font-medium uppercase tracking-wider text-faint",children:"PM2 (your apps)"}),a.jsx("div",{className:"mt-0.5 text-sm font-medium text-ink",children:y.pm2.installed?y.pm2.version??"Installed":"Not installed"})]})]}):null:a.jsxs("div",{className:"flex items-center gap-2 py-4 text-sm text-muted",children:[a.jsx(Ms,{}),"Checking the background service…"]})})]})]}),ol=()=>{if(b.error&&!b.data)return a.jsx(Et,{error:b.error,title:"Could not read the settings",onRetry:b.reload});if(!b.data||!A)return a.jsxs(za,{children:[a.jsx(Fe,{className:"h-72 rounded-lg"}),a.jsx(Fe,{className:"h-40 rounded-lg"})]});const be=A.bind!=="0.0.0.0",ot=b.data.canUseNoPassword||be,Ht=A.password?mg(A.password,u)??(A.confirm&&A.password!==A.confirm?"The two passwords do not match.":null):null,ft=F??(M?Ht:null);return a.jsxs("div",{className:"space-y-5",children:[a.jsxs(Ze,{className:"overflow-hidden",children:[a.jsx("div",{className:"h-0.5 w-full bg-accent/50","aria-hidden":"true"}),a.jsx(nn,{icon:a.jsx(Zi,{className:"size-4","aria-hidden":"true"}),title:"Access and authentication",description:"Who can reach the dashboard, and how they prove who they are."}),a.jsxs(Dn,{className:"space-y-5",children:[wt,D&&a.jsx(we,{tone:"danger",title:"Could not save access settings",children:D}),a.jsxs(ka,{children:[a.jsxs(rl,{label:"Listen on",value:A.bind,onChange:ct=>{const sn=ct.target.value;k({...A,bind:sn,auth:sn==="0.0.0.0"?"password":A.auth})},hint:A.auth==="none"?"Locked to this machine while there is no password.":"Changing this needs a dashboard restart.",children:[Fd.map(ct=>a.jsx("option",{value:ct.value,disabled:ct.value==="0.0.0.0"&&A.auth==="none",children:ct.label},ct.value)),!Fd.some(ct=>ct.value===A.bind)&&a.jsx("option",{value:A.bind,children:w5(A.bind)})]}),a.jsxs(rl,{label:"Authentication",value:A.auth,onChange:ct=>{const sn=ct.target.value;k({...A,auth:sn,bind:sn==="none"?"127.0.0.1":A.bind}),te(null)},hint:A.auth==="none"?"No login — reachable from this machine only.":!b.data.hasPassword&&!A.password?"No password set yet — set one below.":"A password is required to sign in.",children:[a.jsx("option",{value:"password",children:"Password required"}),a.jsx("option",{value:"none",disabled:!ot,children:"No password (this machine only)"})]})]}),A.auth==="none"&&a.jsx(we,{tone:"warning",title:"No login",children:"Anyone who can reach this machine can open the dashboard. Listening is fixed to 127.0.0.1 so that is only this machine, not the network."}),a.jsxs("div",{className:"max-w-md space-y-4 border-t border-line pt-4",children:[a.jsx(Ee,{label:"New password",type:"password",autoComplete:"new-password",value:A.password,onChange:ct=>{k({...A,password:ct.target.value}),te(null)},error:ft,hint:`Leave blank to keep the current password. At least ${u} characters.`}),a.jsx(Ee,{label:"Confirm new password",type:"password",autoComplete:"new-password",value:A.confirm,onChange:ct=>{k({...A,confirm:ct.target.value}),te(null)}})]})]}),a.jsxs(Md,{children:[a.jsx("span",{className:"text-2xs text-faint",children:Ce?"Unsaved changes":"All changes saved"}),a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx(ee,{variant:"ghost",size:"sm",disabled:!Ce,onClick:()=>{k(Bd(b.data)),ne(!1),le(null),te(null)},children:"Revert"}),a.jsx(ee,{variant:"primary",size:"sm",loading:ce,disabled:!Ce,icon:a.jsx(Xd,{className:"size-3.5","aria-hidden":"true"}),onClick:()=>void fe(),children:"Save access"})]})]})]}),b.data.platform!=="win32"&&a.jsxs(Ze,{className:"overflow-hidden",children:[a.jsx("div",{className:ie("h-0.5 w-full",j.data?.configured?"bg-ok/60":"bg-warn/60"),"aria-hidden":"true"}),a.jsx(nn,{icon:a.jsx(Ea,{className:"size-4","aria-hidden":"true"}),title:"Linux permissions",description:"Passwordless sudo for nginx and systemctl.",actions:j.data?a.jsx(ve,{tone:j.data.configured?"ok":"warn",dot:!0,children:j.data.configured?"Configured":"Required"}):void 0}),a.jsx(Dn,{children:j.error&&!j.data?a.jsx(Et,{error:j.error,title:"Could not read the permission state",onRetry:j.reload,className:"border-0"}):j.data?j.data.configured?a.jsx("p",{className:"text-sm text-muted",children:"Passwordless sudo is configured. The dashboard can reload nginx and call systemctl without stopping to ask for a password."}):a.jsxs("div",{className:"max-w-md space-y-4",children:[a.jsx("p",{className:"text-sm text-muted",children:"The dashboard needs passwordless sudo to control nginx and systemctl. Enter your sudo password once and it writes the sudoers entry for you."}),Qn&&a.jsx(we,{tone:"danger",title:"Permissions were not configured",children:Qn}),a.jsx(Ee,{label:"Sudo password",type:"password",autoComplete:"current-password",placeholder:"Enter your sudo password",value:ye,onChange:ct=>{$t(ct.target.value),Qn&&an(null)},onKeyDown:ct=>{ct.key==="Enter"&&Le()}}),a.jsx(ee,{variant:"primary",loading:Gt,disabled:!ye,onClick:()=>void Le(),children:"Set up permissions"})]}):a.jsxs("div",{className:"flex items-center gap-2 py-4 text-sm text-muted",children:[a.jsx(Ms,{}),"Checking sudoers…"]})})]})]})},Po=()=>a.jsxs(Ze,{className:"overflow-hidden",children:[a.jsx("div",{className:"h-0.5 w-full bg-accent/50","aria-hidden":"true"}),a.jsx(nn,{icon:a.jsx(Vd,{className:"size-4","aria-hidden":"true"}),title:"Backup and restore",description:"Export or restore settings and domains as JSON."}),a.jsxs(Dn,{className:"space-y-5",children:[a.jsxs("div",{className:"grid gap-5 sm:grid-cols-2",children:[a.jsxs("div",{className:"space-y-3",children:[a.jsxs("div",{children:[a.jsx("h3",{className:"text-sm font-medium text-ink",children:"Export"}),a.jsx("p",{className:"mt-0.5 text-xs text-muted",children:"Download every setting and domain as one JSON file. Passwords are excluded from the export."})]}),a.jsx(ee,{variant:"secondary",loading:jn,icon:a.jsx(Vd,{className:"size-4","aria-hidden":"true"}),onClick:()=>void pe(),children:"Export backup"})]}),a.jsxs("div",{className:"space-y-3 border-t border-line pt-5 sm:border-l sm:border-t-0 sm:pl-5 sm:pt-0",children:[a.jsxs("div",{children:[a.jsx("h3",{className:"text-sm font-medium text-ink",children:"Restore"}),a.jsx("p",{className:"mt-0.5 text-xs text-muted",children:"Replace the current configuration and domain list with a previously exported file. Passwords and the listen address stored in the file are ignored."})]}),a.jsx("input",{ref:Ut,type:"file",accept:".json,application/json",className:"sr-only",onChange:be=>void Ae(be)}),a.jsx(ee,{variant:"secondary",loading:ca,disabled:jn,icon:a.jsx(RN,{className:"size-4","aria-hidden":"true"}),onClick:()=>Ut.current?.click(),children:"Choose backup file…"})]})]}),ln&&a.jsx(we,{tone:ln.tone,title:ln.title,children:ln.body})]}),a.jsx(Md,{children:a.jsx("span",{className:"text-2xs text-faint",children:"Exported backups never contain the dashboard password."})})]});return a.jsxs(a.Fragment,{children:[a.jsx(oa,{title:"Settings",description:"Configuration, access, Hub pairing and backups for this dashboard.",actions:m!=="hub"?a.jsx(ee,{variant:"secondary",size:"sm",loading:b.loading||j.loading,icon:a.jsx(Lt,{className:"size-3.5","aria-hidden":"true"}),onClick:Jt,children:"Refresh"}):void 0}),a.jsx("div",{role:"tablist","aria-label":"Settings sections",className:"mb-5 flex flex-wrap gap-1 rounded-lg border border-line bg-raised/60 p-1",children:Lg.map(be=>a.jsx("button",{type:"button",role:"tab",id:`settings-tab-${be.id}`,"aria-selected":m===be.id,"aria-controls":`settings-panel-${be.id}`,onClick:()=>p(be.id),className:ie("rounded-sm border px-3 py-1.5 text-xs font-medium transition-colors duration-[var(--ez-motion-fast)]",m===be.id?"border-line bg-surface text-ink shadow-sm":"border-transparent text-muted hover:text-ink"),children:be.label},be.id))}),a.jsxs("div",{role:"tabpanel",id:`settings-panel-${m}`,"aria-labelledby":`settings-tab-${m}`,tabIndex:-1,className:"outline-none",children:[m==="general"&&We(),m==="access"&&ol(),m==="hub"&&a.jsx(N5,{}),m==="backup"&&Po()]})]})}function T5(){return Vn("Page not found"),a.jsxs(a.Fragment,{children:[a.jsx(oa,{title:"Page not found",description:"That address does not match a dashboard section."}),a.jsx(Ze,{children:a.jsx(On,{title:"Nothing here",description:"The link may be old, or the section may have moved.",action:a.jsxs(bt,{to:"/",className:Ta("secondary","sm"),children:[a.jsx(qj,{className:"size-3.5","aria-hidden":"true"}),"Back to Overview"]})})})]})}function C5(){const{phase:s}=Xn();return s==="loading"?a.jsx(Tw,{}):s==="error"?a.jsx(Mw,{}):s==="unauthenticated"?a.jsx(Gw,{}):a.jsx(K1,{children:a.jsxs(An,{element:a.jsx(_w,{}),children:[a.jsx(An,{index:!0,element:a.jsx(Kw,{})}),a.jsx(An,{path:"domains",element:a.jsx(dS,{})}),a.jsx(An,{path:"ssl",element:a.jsx(jS,{})}),a.jsx(An,{path:"nginx",element:a.jsx(SS,{})}),a.jsx(An,{path:"notifications",element:a.jsx(MS,{})}),a.jsx(An,{path:"deployments",element:a.jsx(y5,{})}),a.jsx(An,{path:"processes",element:a.jsx($S,{})}),a.jsx(An,{path:"logs",element:a.jsx(b5,{})}),a.jsx(An,{path:"settings",element:a.jsx(k5,{})}),a.jsx(An,{path:"*",element:a.jsx(T5,{})})]})})}function E5(){return a.jsx(Rj,{children:a.jsx(HN,{children:a.jsx(XN,{children:a.jsx(lw,{children:a.jsx(sw,{children:a.jsx(iw,{children:a.jsx(vj,{children:a.jsx(C5,{})})})})})})})})}const Yy=document.getElementById("root");if(!Yy)throw new Error("Missing #root element");X0.createRoot(Yy).render(a.jsx(g.StrictMode,{children:a.jsx(E5,{})}));
|