@lydia-agent/cli 0.1.2 → 0.1.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.
@@ -1,250 +0,0 @@
1
- var eu=e=>{throw TypeError(e)};var ui=(e,t,n)=>t.has(e)||eu("Cannot "+n);var h=(e,t,n)=>(ui(e,t,"read from private field"),n?n.call(e):t.get(e)),D=(e,t,n)=>t.has(e)?eu("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),O=(e,t,n,r)=>(ui(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),U=(e,t,n)=>(ui(e,t,"access private method"),n);var $s=(e,t,n,r)=>({set _(s){O(e,t,s,n)},get _(){return h(e,t,r)}});(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))r(s);new MutationObserver(s=>{for(const l of s)if(l.type==="childList")for(const a of l.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&r(a)}).observe(document,{childList:!0,subtree:!0});function n(s){const l={};return s.integrity&&(l.integrity=s.integrity),s.referrerPolicy&&(l.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?l.credentials="include":s.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function r(s){if(s.ep)return;s.ep=!0;const l=n(s);fetch(s.href,l)}})();function mh(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Oc={exports:{}},Vl={},zc={exports:{}},H={};/**
2
- * @license React
3
- * react.production.min.js
4
- *
5
- * Copyright (c) Facebook, Inc. and its 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 Fs=Symbol.for("react.element"),yh=Symbol.for("react.portal"),xh=Symbol.for("react.fragment"),vh=Symbol.for("react.strict_mode"),gh=Symbol.for("react.profiler"),wh=Symbol.for("react.provider"),kh=Symbol.for("react.context"),jh=Symbol.for("react.forward_ref"),Sh=Symbol.for("react.suspense"),Nh=Symbol.for("react.memo"),Ch=Symbol.for("react.lazy"),tu=Symbol.iterator;function Eh(e){return e===null||typeof e!="object"?null:(e=tu&&e[tu]||e["@@iterator"],typeof e=="function"?e:null)}var Fc={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Lc=Object.assign,Ic={};function _r(e,t,n){this.props=e,this.context=t,this.refs=Ic,this.updater=n||Fc}_r.prototype.isReactComponent={};_r.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};_r.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Dc(){}Dc.prototype=_r.prototype;function Xa(e,t,n){this.props=e,this.context=t,this.refs=Ic,this.updater=n||Fc}var Ya=Xa.prototype=new Dc;Ya.constructor=Xa;Lc(Ya,_r.prototype);Ya.isPureReactComponent=!0;var nu=Array.isArray,Ac=Object.prototype.hasOwnProperty,Ja={current:null},$c={key:!0,ref:!0,__self:!0,__source:!0};function Uc(e,t,n){var r,s={},l=null,a=null;if(t!=null)for(r in t.ref!==void 0&&(a=t.ref),t.key!==void 0&&(l=""+t.key),t)Ac.call(t,r)&&!$c.hasOwnProperty(r)&&(s[r]=t[r]);var o=arguments.length-2;if(o===1)s.children=n;else if(1<o){for(var u=Array(o),d=0;d<o;d++)u[d]=arguments[d+2];s.children=u}if(e&&e.defaultProps)for(r in o=e.defaultProps,o)s[r]===void 0&&(s[r]=o[r]);return{$$typeof:Fs,type:e,key:l,ref:a,props:s,_owner:Ja.current}}function Ph(e,t){return{$$typeof:Fs,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function Za(e){return typeof e=="object"&&e!==null&&e.$$typeof===Fs}function bh(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var ru=/\/+/g;function ci(e,t){return typeof e=="object"&&e!==null&&e.key!=null?bh(""+e.key):t.toString(36)}function ll(e,t,n,r,s){var l=typeof e;(l==="undefined"||l==="boolean")&&(e=null);var a=!1;if(e===null)a=!0;else switch(l){case"string":case"number":a=!0;break;case"object":switch(e.$$typeof){case Fs:case yh:a=!0}}if(a)return a=e,s=s(a),e=r===""?"."+ci(a,0):r,nu(s)?(n="",e!=null&&(n=e.replace(ru,"$&/")+"/"),ll(s,t,n,"",function(d){return d})):s!=null&&(Za(s)&&(s=Ph(s,n+(!s.key||a&&a.key===s.key?"":(""+s.key).replace(ru,"$&/")+"/")+e)),t.push(s)),1;if(a=0,r=r===""?".":r+":",nu(e))for(var o=0;o<e.length;o++){l=e[o];var u=r+ci(l,o);a+=ll(l,t,n,u,s)}else if(u=Eh(e),typeof u=="function")for(e=u.call(e),o=0;!(l=e.next()).done;)l=l.value,u=r+ci(l,o++),a+=ll(l,t,n,u,s);else if(l==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return a}function Us(e,t,n){if(e==null)return e;var r=[],s=0;return ll(e,r,"","",function(l){return t.call(n,l,s++)}),r}function _h(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var Le={current:null},il={transition:null},Th={ReactCurrentDispatcher:Le,ReactCurrentBatchConfig:il,ReactCurrentOwner:Ja};function Qc(){throw Error("act(...) is not supported in production builds of React.")}H.Children={map:Us,forEach:function(e,t,n){Us(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return Us(e,function(){t++}),t},toArray:function(e){return Us(e,function(t){return t})||[]},only:function(e){if(!Za(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};H.Component=_r;H.Fragment=xh;H.Profiler=gh;H.PureComponent=Xa;H.StrictMode=vh;H.Suspense=Sh;H.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Th;H.act=Qc;H.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=Lc({},e.props),s=e.key,l=e.ref,a=e._owner;if(t!=null){if(t.ref!==void 0&&(l=t.ref,a=Ja.current),t.key!==void 0&&(s=""+t.key),e.type&&e.type.defaultProps)var o=e.type.defaultProps;for(u in t)Ac.call(t,u)&&!$c.hasOwnProperty(u)&&(r[u]=t[u]===void 0&&o!==void 0?o[u]:t[u])}var u=arguments.length-2;if(u===1)r.children=n;else if(1<u){o=Array(u);for(var d=0;d<u;d++)o[d]=arguments[d+2];r.children=o}return{$$typeof:Fs,type:e.type,key:s,ref:l,props:r,_owner:a}};H.createContext=function(e){return e={$$typeof:kh,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:wh,_context:e},e.Consumer=e};H.createElement=Uc;H.createFactory=function(e){var t=Uc.bind(null,e);return t.type=e,t};H.createRef=function(){return{current:null}};H.forwardRef=function(e){return{$$typeof:jh,render:e}};H.isValidElement=Za;H.lazy=function(e){return{$$typeof:Ch,_payload:{_status:-1,_result:e},_init:_h}};H.memo=function(e,t){return{$$typeof:Nh,type:e,compare:t===void 0?null:t}};H.startTransition=function(e){var t=il.transition;il.transition={};try{e()}finally{il.transition=t}};H.unstable_act=Qc;H.useCallback=function(e,t){return Le.current.useCallback(e,t)};H.useContext=function(e){return Le.current.useContext(e)};H.useDebugValue=function(){};H.useDeferredValue=function(e){return Le.current.useDeferredValue(e)};H.useEffect=function(e,t){return Le.current.useEffect(e,t)};H.useId=function(){return Le.current.useId()};H.useImperativeHandle=function(e,t,n){return Le.current.useImperativeHandle(e,t,n)};H.useInsertionEffect=function(e,t){return Le.current.useInsertionEffect(e,t)};H.useLayoutEffect=function(e,t){return Le.current.useLayoutEffect(e,t)};H.useMemo=function(e,t){return Le.current.useMemo(e,t)};H.useReducer=function(e,t,n){return Le.current.useReducer(e,t,n)};H.useRef=function(e){return Le.current.useRef(e)};H.useState=function(e){return Le.current.useState(e)};H.useSyncExternalStore=function(e,t,n){return Le.current.useSyncExternalStore(e,t,n)};H.useTransition=function(){return Le.current.useTransition()};H.version="18.3.1";zc.exports=H;var S=zc.exports;const Mh=mh(S);/**
10
- * @license React
11
- * react-jsx-runtime.production.min.js
12
- *
13
- * Copyright (c) Facebook, Inc. and its 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 Rh=S,Oh=Symbol.for("react.element"),zh=Symbol.for("react.fragment"),Fh=Object.prototype.hasOwnProperty,Lh=Rh.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,Ih={key:!0,ref:!0,__self:!0,__source:!0};function Bc(e,t,n){var r,s={},l=null,a=null;n!==void 0&&(l=""+n),t.key!==void 0&&(l=""+t.key),t.ref!==void 0&&(a=t.ref);for(r in t)Fh.call(t,r)&&!Ih.hasOwnProperty(r)&&(s[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)s[r]===void 0&&(s[r]=t[r]);return{$$typeof:Oh,type:e,key:l,ref:a,props:s,_owner:Lh.current}}Vl.Fragment=zh;Vl.jsx=Bc;Vl.jsxs=Bc;Oc.exports=Vl;var i=Oc.exports,Di={},Hc={exports:{}},Xe={},Kc={exports:{}},Vc={};/**
18
- * @license React
19
- * scheduler.production.min.js
20
- *
21
- * Copyright (c) Facebook, Inc. and its 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
- */(function(e){function t(T,L){var I=T.length;T.push(L);e:for(;0<I;){var B=I-1>>>1,P=T[B];if(0<s(P,L))T[B]=L,T[I]=P,I=B;else break e}}function n(T){return T.length===0?null:T[0]}function r(T){if(T.length===0)return null;var L=T[0],I=T.pop();if(I!==L){T[0]=I;e:for(var B=0,P=T.length,$=P>>>1;B<$;){var te=2*(B+1)-1,A=T[te],ye=te+1,Ke=T[ye];if(0>s(A,I))ye<P&&0>s(Ke,A)?(T[B]=Ke,T[ye]=I,B=ye):(T[B]=A,T[te]=I,B=te);else if(ye<P&&0>s(Ke,I))T[B]=Ke,T[ye]=I,B=ye;else break e}}return L}function s(T,L){var I=T.sortIndex-L.sortIndex;return I!==0?I:T.id-L.id}if(typeof performance=="object"&&typeof performance.now=="function"){var l=performance;e.unstable_now=function(){return l.now()}}else{var a=Date,o=a.now();e.unstable_now=function(){return a.now()-o}}var u=[],d=[],y=1,m=null,x=3,g=!1,w=!1,j=!1,_=typeof setTimeout=="function"?setTimeout:null,c=typeof clearTimeout=="function"?clearTimeout:null,f=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function p(T){for(var L=n(d);L!==null;){if(L.callback===null)r(d);else if(L.startTime<=T)r(d),L.sortIndex=L.expirationTime,t(u,L);else break;L=n(d)}}function v(T){if(j=!1,p(T),!w)if(n(u)!==null)w=!0,M(E);else{var L=n(d);L!==null&&Q(v,L.startTime-T)}}function E(T,L){w=!1,j&&(j=!1,c(N),N=-1),g=!0;var I=x;try{for(p(L),m=n(u);m!==null&&(!(m.expirationTime>L)||T&&!K());){var B=m.callback;if(typeof B=="function"){m.callback=null,x=m.priorityLevel;var P=B(m.expirationTime<=L);L=e.unstable_now(),typeof P=="function"?m.callback=P:m===n(u)&&r(u),p(L)}else r(u);m=n(u)}if(m!==null)var $=!0;else{var te=n(d);te!==null&&Q(v,te.startTime-L),$=!1}return $}finally{m=null,x=I,g=!1}}var k=!1,C=null,N=-1,z=5,R=-1;function K(){return!(e.unstable_now()-R<z)}function Y(){if(C!==null){var T=e.unstable_now();R=T;var L=!0;try{L=C(!0,T)}finally{L?ne():(k=!1,C=null)}}else k=!1}var ne;if(typeof f=="function")ne=function(){f(Y)};else if(typeof MessageChannel<"u"){var V=new MessageChannel,G=V.port2;V.port1.onmessage=Y,ne=function(){G.postMessage(null)}}else ne=function(){_(Y,0)};function M(T){C=T,k||(k=!0,ne())}function Q(T,L){N=_(function(){T(e.unstable_now())},L)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(T){T.callback=null},e.unstable_continueExecution=function(){w||g||(w=!0,M(E))},e.unstable_forceFrameRate=function(T){0>T||125<T?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):z=0<T?Math.floor(1e3/T):5},e.unstable_getCurrentPriorityLevel=function(){return x},e.unstable_getFirstCallbackNode=function(){return n(u)},e.unstable_next=function(T){switch(x){case 1:case 2:case 3:var L=3;break;default:L=x}var I=x;x=L;try{return T()}finally{x=I}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(T,L){switch(T){case 1:case 2:case 3:case 4:case 5:break;default:T=3}var I=x;x=T;try{return L()}finally{x=I}},e.unstable_scheduleCallback=function(T,L,I){var B=e.unstable_now();switch(typeof I=="object"&&I!==null?(I=I.delay,I=typeof I=="number"&&0<I?B+I:B):I=B,T){case 1:var P=-1;break;case 2:P=250;break;case 5:P=1073741823;break;case 4:P=1e4;break;default:P=5e3}return P=I+P,T={id:y++,callback:L,priorityLevel:T,startTime:I,expirationTime:P,sortIndex:-1},I>B?(T.sortIndex=I,t(d,T),n(u)===null&&T===n(d)&&(j?(c(N),N=-1):j=!0,Q(v,I-B))):(T.sortIndex=P,t(u,T),w||g||(w=!0,M(E))),T},e.unstable_shouldYield=K,e.unstable_wrapCallback=function(T){var L=x;return function(){var I=x;x=L;try{return T.apply(this,arguments)}finally{x=I}}}})(Vc);Kc.exports=Vc;var Dh=Kc.exports;/**
26
- * @license React
27
- * react-dom.production.min.js
28
- *
29
- * Copyright (c) Facebook, Inc. and its 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 Ah=S,Ge=Dh;function b(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;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."}var Wc=new Set,ds={};function Bn(e,t){jr(e,t),jr(e+"Capture",t)}function jr(e,t){for(ds[e]=t,e=0;e<t.length;e++)Wc.add(t[e])}var Ft=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Ai=Object.prototype.hasOwnProperty,$h=/^[: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]*$/,su={},lu={};function Uh(e){return Ai.call(lu,e)?!0:Ai.call(su,e)?!1:$h.test(e)?lu[e]=!0:(su[e]=!0,!1)}function Qh(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function Bh(e,t,n,r){if(t===null||typeof t>"u"||Qh(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Ie(e,t,n,r,s,l,a){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=s,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=l,this.removeEmptyString=a}var Ee={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Ee[e]=new Ie(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Ee[t]=new Ie(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Ee[e]=new Ie(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Ee[e]=new Ie(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){Ee[e]=new Ie(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Ee[e]=new Ie(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Ee[e]=new Ie(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Ee[e]=new Ie(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Ee[e]=new Ie(e,5,!1,e.toLowerCase(),null,!1,!1)});var eo=/[\-:]([a-z])/g;function to(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(eo,to);Ee[t]=new Ie(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(eo,to);Ee[t]=new Ie(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(eo,to);Ee[t]=new Ie(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Ee[e]=new Ie(e,1,!1,e.toLowerCase(),null,!1,!1)});Ee.xlinkHref=new Ie("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Ee[e]=new Ie(e,1,!1,e.toLowerCase(),null,!0,!0)});function no(e,t,n,r){var s=Ee.hasOwnProperty(t)?Ee[t]:null;(s!==null?s.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(Bh(t,n,s,r)&&(n=null),r||s===null?Uh(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):s.mustUseProperty?e[s.propertyName]=n===null?s.type===3?!1:"":n:(t=s.attributeName,r=s.attributeNamespace,n===null?e.removeAttribute(t):(s=s.type,n=s===3||s===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var At=Ah.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Qs=Symbol.for("react.element"),Vn=Symbol.for("react.portal"),Wn=Symbol.for("react.fragment"),ro=Symbol.for("react.strict_mode"),$i=Symbol.for("react.profiler"),qc=Symbol.for("react.provider"),Gc=Symbol.for("react.context"),so=Symbol.for("react.forward_ref"),Ui=Symbol.for("react.suspense"),Qi=Symbol.for("react.suspense_list"),lo=Symbol.for("react.memo"),Qt=Symbol.for("react.lazy"),Xc=Symbol.for("react.offscreen"),iu=Symbol.iterator;function Br(e){return e===null||typeof e!="object"?null:(e=iu&&e[iu]||e["@@iterator"],typeof e=="function"?e:null)}var ce=Object.assign,di;function Yr(e){if(di===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);di=t&&t[1]||""}return`
34
- `+di+e}var fi=!1;function hi(e,t){if(!e||fi)return"";fi=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(d){var r=d}Reflect.construct(e,[],t)}else{try{t.call()}catch(d){r=d}e.call(t.prototype)}else{try{throw Error()}catch(d){r=d}e()}}catch(d){if(d&&r&&typeof d.stack=="string"){for(var s=d.stack.split(`
35
- `),l=r.stack.split(`
36
- `),a=s.length-1,o=l.length-1;1<=a&&0<=o&&s[a]!==l[o];)o--;for(;1<=a&&0<=o;a--,o--)if(s[a]!==l[o]){if(a!==1||o!==1)do if(a--,o--,0>o||s[a]!==l[o]){var u=`
37
- `+s[a].replace(" at new "," at ");return e.displayName&&u.includes("<anonymous>")&&(u=u.replace("<anonymous>",e.displayName)),u}while(1<=a&&0<=o);break}}}finally{fi=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Yr(e):""}function Hh(e){switch(e.tag){case 5:return Yr(e.type);case 16:return Yr("Lazy");case 13:return Yr("Suspense");case 19:return Yr("SuspenseList");case 0:case 2:case 15:return e=hi(e.type,!1),e;case 11:return e=hi(e.type.render,!1),e;case 1:return e=hi(e.type,!0),e;default:return""}}function Bi(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Wn:return"Fragment";case Vn:return"Portal";case $i:return"Profiler";case ro:return"StrictMode";case Ui:return"Suspense";case Qi:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Gc:return(e.displayName||"Context")+".Consumer";case qc:return(e._context.displayName||"Context")+".Provider";case so:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case lo:return t=e.displayName||null,t!==null?t:Bi(e.type)||"Memo";case Qt:t=e._payload,e=e._init;try{return Bi(e(t))}catch{}}return null}function Kh(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Bi(t);case 8:return t===ro?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function hn(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Yc(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Vh(e){var t=Yc(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var s=n.get,l=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return s.call(this)},set:function(a){r=""+a,l.call(this,a)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(a){r=""+a},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Bs(e){e._valueTracker||(e._valueTracker=Vh(e))}function Jc(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Yc(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function gl(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 Hi(e,t){var n=t.checked;return ce({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function au(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=hn(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Zc(e,t){t=t.checked,t!=null&&no(e,"checked",t,!1)}function Ki(e,t){Zc(e,t);var n=hn(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Vi(e,t.type,n):t.hasOwnProperty("defaultValue")&&Vi(e,t.type,hn(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function ou(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function Vi(e,t,n){(t!=="number"||gl(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Jr=Array.isArray;function sr(e,t,n,r){if(e=e.options,t){t={};for(var s=0;s<n.length;s++)t["$"+n[s]]=!0;for(n=0;n<e.length;n++)s=t.hasOwnProperty("$"+e[n].value),e[n].selected!==s&&(e[n].selected=s),s&&r&&(e[n].defaultSelected=!0)}else{for(n=""+hn(n),t=null,s=0;s<e.length;s++){if(e[s].value===n){e[s].selected=!0,r&&(e[s].defaultSelected=!0);return}t!==null||e[s].disabled||(t=e[s])}t!==null&&(t.selected=!0)}}function Wi(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(b(91));return ce({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function uu(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(b(92));if(Jr(n)){if(1<n.length)throw Error(b(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:hn(n)}}function ed(e,t){var n=hn(t.value),r=hn(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=""+r)}function cu(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function td(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function qi(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?td(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Hs,nd=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,s){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,s)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(Hs=Hs||document.createElement("div"),Hs.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Hs.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function fs(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var ns={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Wh=["Webkit","ms","Moz","O"];Object.keys(ns).forEach(function(e){Wh.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),ns[t]=ns[e]})});function rd(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||ns.hasOwnProperty(e)&&ns[e]?(""+t).trim():t+"px"}function sd(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,s=rd(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,s):e[n]=s}}var qh=ce({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Gi(e,t){if(t){if(qh[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(b(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(b(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(b(61))}if(t.style!=null&&typeof t.style!="object")throw Error(b(62))}}function Xi(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";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 Yi=null;function io(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Ji=null,lr=null,ir=null;function du(e){if(e=Ds(e)){if(typeof Ji!="function")throw Error(b(280));var t=e.stateNode;t&&(t=Yl(t),Ji(e.stateNode,e.type,t))}}function ld(e){lr?ir?ir.push(e):ir=[e]:lr=e}function id(){if(lr){var e=lr,t=ir;if(ir=lr=null,du(e),t)for(e=0;e<t.length;e++)du(t[e])}}function ad(e,t){return e(t)}function od(){}var pi=!1;function ud(e,t,n){if(pi)return e(t,n);pi=!0;try{return ad(e,t,n)}finally{pi=!1,(lr!==null||ir!==null)&&(od(),id())}}function hs(e,t){var n=e.stateNode;if(n===null)return null;var r=Yl(n);if(r===null)return null;n=r[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":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(b(231,t,typeof n));return n}var Zi=!1;if(Ft)try{var Hr={};Object.defineProperty(Hr,"passive",{get:function(){Zi=!0}}),window.addEventListener("test",Hr,Hr),window.removeEventListener("test",Hr,Hr)}catch{Zi=!1}function Gh(e,t,n,r,s,l,a,o,u){var d=Array.prototype.slice.call(arguments,3);try{t.apply(n,d)}catch(y){this.onError(y)}}var rs=!1,wl=null,kl=!1,ea=null,Xh={onError:function(e){rs=!0,wl=e}};function Yh(e,t,n,r,s,l,a,o,u){rs=!1,wl=null,Gh.apply(Xh,arguments)}function Jh(e,t,n,r,s,l,a,o,u){if(Yh.apply(this,arguments),rs){if(rs){var d=wl;rs=!1,wl=null}else throw Error(b(198));kl||(kl=!0,ea=d)}}function Hn(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function cd(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 fu(e){if(Hn(e)!==e)throw Error(b(188))}function Zh(e){var t=e.alternate;if(!t){if(t=Hn(e),t===null)throw Error(b(188));return t!==e?null:e}for(var n=e,r=t;;){var s=n.return;if(s===null)break;var l=s.alternate;if(l===null){if(r=s.return,r!==null){n=r;continue}break}if(s.child===l.child){for(l=s.child;l;){if(l===n)return fu(s),e;if(l===r)return fu(s),t;l=l.sibling}throw Error(b(188))}if(n.return!==r.return)n=s,r=l;else{for(var a=!1,o=s.child;o;){if(o===n){a=!0,n=s,r=l;break}if(o===r){a=!0,r=s,n=l;break}o=o.sibling}if(!a){for(o=l.child;o;){if(o===n){a=!0,n=l,r=s;break}if(o===r){a=!0,r=l,n=s;break}o=o.sibling}if(!a)throw Error(b(189))}}if(n.alternate!==r)throw Error(b(190))}if(n.tag!==3)throw Error(b(188));return n.stateNode.current===n?e:t}function dd(e){return e=Zh(e),e!==null?fd(e):null}function fd(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=fd(e);if(t!==null)return t;e=e.sibling}return null}var hd=Ge.unstable_scheduleCallback,hu=Ge.unstable_cancelCallback,ep=Ge.unstable_shouldYield,tp=Ge.unstable_requestPaint,he=Ge.unstable_now,np=Ge.unstable_getCurrentPriorityLevel,ao=Ge.unstable_ImmediatePriority,pd=Ge.unstable_UserBlockingPriority,jl=Ge.unstable_NormalPriority,rp=Ge.unstable_LowPriority,md=Ge.unstable_IdlePriority,Wl=null,jt=null;function sp(e){if(jt&&typeof jt.onCommitFiberRoot=="function")try{jt.onCommitFiberRoot(Wl,e,void 0,(e.current.flags&128)===128)}catch{}}var ht=Math.clz32?Math.clz32:ap,lp=Math.log,ip=Math.LN2;function ap(e){return e>>>=0,e===0?32:31-(lp(e)/ip|0)|0}var Ks=64,Vs=4194304;function Zr(e){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: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 e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Sl(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,s=e.suspendedLanes,l=e.pingedLanes,a=n&268435455;if(a!==0){var o=a&~s;o!==0?r=Zr(o):(l&=a,l!==0&&(r=Zr(l)))}else a=n&~s,a!==0?r=Zr(a):l!==0&&(r=Zr(l));if(r===0)return 0;if(t!==0&&t!==r&&!(t&s)&&(s=r&-r,l=t&-t,s>=l||s===16&&(l&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-ht(t),s=1<<n,r|=e[n],t&=~s;return r}function op(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64: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:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function up(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,s=e.expirationTimes,l=e.pendingLanes;0<l;){var a=31-ht(l),o=1<<a,u=s[a];u===-1?(!(o&n)||o&r)&&(s[a]=op(o,t)):u<=t&&(e.expiredLanes|=o),l&=~o}}function ta(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function yd(){var e=Ks;return Ks<<=1,!(Ks&4194240)&&(Ks=64),e}function mi(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Ls(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-ht(t),e[t]=n}function cp(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var s=31-ht(n),l=1<<s;t[s]=0,r[s]=-1,e[s]=-1,n&=~l}}function oo(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-ht(n),s=1<<r;s&t|e[r]&t&&(e[r]|=t),n&=~s}}var ee=0;function xd(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var vd,uo,gd,wd,kd,na=!1,Ws=[],rn=null,sn=null,ln=null,ps=new Map,ms=new Map,Ht=[],dp="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 submit".split(" ");function pu(e,t){switch(e){case"focusin":case"focusout":rn=null;break;case"dragenter":case"dragleave":sn=null;break;case"mouseover":case"mouseout":ln=null;break;case"pointerover":case"pointerout":ps.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":ms.delete(t.pointerId)}}function Kr(e,t,n,r,s,l){return e===null||e.nativeEvent!==l?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:l,targetContainers:[s]},t!==null&&(t=Ds(t),t!==null&&uo(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,s!==null&&t.indexOf(s)===-1&&t.push(s),e)}function fp(e,t,n,r,s){switch(t){case"focusin":return rn=Kr(rn,e,t,n,r,s),!0;case"dragenter":return sn=Kr(sn,e,t,n,r,s),!0;case"mouseover":return ln=Kr(ln,e,t,n,r,s),!0;case"pointerover":var l=s.pointerId;return ps.set(l,Kr(ps.get(l)||null,e,t,n,r,s)),!0;case"gotpointercapture":return l=s.pointerId,ms.set(l,Kr(ms.get(l)||null,e,t,n,r,s)),!0}return!1}function jd(e){var t=wn(e.target);if(t!==null){var n=Hn(t);if(n!==null){if(t=n.tag,t===13){if(t=cd(n),t!==null){e.blockedOn=t,kd(e.priority,function(){gd(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 al(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=ra(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Yi=r,n.target.dispatchEvent(r),Yi=null}else return t=Ds(n),t!==null&&uo(t),e.blockedOn=n,!1;t.shift()}return!0}function mu(e,t,n){al(e)&&n.delete(t)}function hp(){na=!1,rn!==null&&al(rn)&&(rn=null),sn!==null&&al(sn)&&(sn=null),ln!==null&&al(ln)&&(ln=null),ps.forEach(mu),ms.forEach(mu)}function Vr(e,t){e.blockedOn===t&&(e.blockedOn=null,na||(na=!0,Ge.unstable_scheduleCallback(Ge.unstable_NormalPriority,hp)))}function ys(e){function t(s){return Vr(s,e)}if(0<Ws.length){Vr(Ws[0],e);for(var n=1;n<Ws.length;n++){var r=Ws[n];r.blockedOn===e&&(r.blockedOn=null)}}for(rn!==null&&Vr(rn,e),sn!==null&&Vr(sn,e),ln!==null&&Vr(ln,e),ps.forEach(t),ms.forEach(t),n=0;n<Ht.length;n++)r=Ht[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<Ht.length&&(n=Ht[0],n.blockedOn===null);)jd(n),n.blockedOn===null&&Ht.shift()}var ar=At.ReactCurrentBatchConfig,Nl=!0;function pp(e,t,n,r){var s=ee,l=ar.transition;ar.transition=null;try{ee=1,co(e,t,n,r)}finally{ee=s,ar.transition=l}}function mp(e,t,n,r){var s=ee,l=ar.transition;ar.transition=null;try{ee=4,co(e,t,n,r)}finally{ee=s,ar.transition=l}}function co(e,t,n,r){if(Nl){var s=ra(e,t,n,r);if(s===null)Ci(e,t,r,Cl,n),pu(e,r);else if(fp(s,e,t,n,r))r.stopPropagation();else if(pu(e,r),t&4&&-1<dp.indexOf(e)){for(;s!==null;){var l=Ds(s);if(l!==null&&vd(l),l=ra(e,t,n,r),l===null&&Ci(e,t,r,Cl,n),l===s)break;s=l}s!==null&&r.stopPropagation()}else Ci(e,t,r,null,n)}}var Cl=null;function ra(e,t,n,r){if(Cl=null,e=io(r),e=wn(e),e!==null)if(t=Hn(e),t===null)e=null;else if(n=t.tag,n===13){if(e=cd(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 Cl=e,null}function Sd(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(np()){case ao:return 1;case pd:return 4;case jl:case rp:return 16;case md:return 536870912;default:return 16}default:return 16}}var tn=null,fo=null,ol=null;function Nd(){if(ol)return ol;var e,t=fo,n=t.length,r,s="value"in tn?tn.value:tn.textContent,l=s.length;for(e=0;e<n&&t[e]===s[e];e++);var a=n-e;for(r=1;r<=a&&t[n-r]===s[l-r];r++);return ol=s.slice(e,1<r?1-r:void 0)}function ul(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 qs(){return!0}function yu(){return!1}function Ye(e){function t(n,r,s,l,a){this._reactName=n,this._targetInst=s,this.type=r,this.nativeEvent=l,this.target=a,this.currentTarget=null;for(var o in e)e.hasOwnProperty(o)&&(n=e[o],this[o]=n?n(l):l[o]);return this.isDefaultPrevented=(l.defaultPrevented!=null?l.defaultPrevented:l.returnValue===!1)?qs:yu,this.isPropagationStopped=yu,this}return ce(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=qs)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=qs)},persist:function(){},isPersistent:qs}),t}var Tr={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},ho=Ye(Tr),Is=ce({},Tr,{view:0,detail:0}),yp=Ye(Is),yi,xi,Wr,ql=ce({},Is,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:po,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!==Wr&&(Wr&&e.type==="mousemove"?(yi=e.screenX-Wr.screenX,xi=e.screenY-Wr.screenY):xi=yi=0,Wr=e),yi)},movementY:function(e){return"movementY"in e?e.movementY:xi}}),xu=Ye(ql),xp=ce({},ql,{dataTransfer:0}),vp=Ye(xp),gp=ce({},Is,{relatedTarget:0}),vi=Ye(gp),wp=ce({},Tr,{animationName:0,elapsedTime:0,pseudoElement:0}),kp=Ye(wp),jp=ce({},Tr,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Sp=Ye(jp),Np=ce({},Tr,{data:0}),vu=Ye(Np),Cp={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Ep={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"},Pp={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function bp(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Pp[e])?!!t[e]:!1}function po(){return bp}var _p=ce({},Is,{key:function(e){if(e.key){var t=Cp[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=ul(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Ep[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:po,charCode:function(e){return e.type==="keypress"?ul(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?ul(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Tp=Ye(_p),Mp=ce({},ql,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),gu=Ye(Mp),Rp=ce({},Is,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:po}),Op=Ye(Rp),zp=ce({},Tr,{propertyName:0,elapsedTime:0,pseudoElement:0}),Fp=Ye(zp),Lp=ce({},ql,{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}),Ip=Ye(Lp),Dp=[9,13,27,32],mo=Ft&&"CompositionEvent"in window,ss=null;Ft&&"documentMode"in document&&(ss=document.documentMode);var Ap=Ft&&"TextEvent"in window&&!ss,Cd=Ft&&(!mo||ss&&8<ss&&11>=ss),wu=" ",ku=!1;function Ed(e,t){switch(e){case"keyup":return Dp.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Pd(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var qn=!1;function $p(e,t){switch(e){case"compositionend":return Pd(t);case"keypress":return t.which!==32?null:(ku=!0,wu);case"textInput":return e=t.data,e===wu&&ku?null:e;default:return null}}function Up(e,t){if(qn)return e==="compositionend"||!mo&&Ed(e,t)?(e=Nd(),ol=fo=tn=null,qn=!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 Cd&&t.locale!=="ko"?null:t.data;default:return null}}var Qp={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 ju(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Qp[e.type]:t==="textarea"}function bd(e,t,n,r){ld(r),t=El(t,"onChange"),0<t.length&&(n=new ho("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var ls=null,xs=null;function Bp(e){Ad(e,0)}function Gl(e){var t=Yn(e);if(Jc(t))return e}function Hp(e,t){if(e==="change")return t}var _d=!1;if(Ft){var gi;if(Ft){var wi="oninput"in document;if(!wi){var Su=document.createElement("div");Su.setAttribute("oninput","return;"),wi=typeof Su.oninput=="function"}gi=wi}else gi=!1;_d=gi&&(!document.documentMode||9<document.documentMode)}function Nu(){ls&&(ls.detachEvent("onpropertychange",Td),xs=ls=null)}function Td(e){if(e.propertyName==="value"&&Gl(xs)){var t=[];bd(t,xs,e,io(e)),ud(Bp,t)}}function Kp(e,t,n){e==="focusin"?(Nu(),ls=t,xs=n,ls.attachEvent("onpropertychange",Td)):e==="focusout"&&Nu()}function Vp(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Gl(xs)}function Wp(e,t){if(e==="click")return Gl(t)}function qp(e,t){if(e==="input"||e==="change")return Gl(t)}function Gp(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var mt=typeof Object.is=="function"?Object.is:Gp;function vs(e,t){if(mt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var s=n[r];if(!Ai.call(t,s)||!mt(e[s],t[s]))return!1}return!0}function Cu(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Eu(e,t){var n=Cu(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Cu(n)}}function Md(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Md(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Rd(){for(var e=window,t=gl();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=gl(e.document)}return t}function yo(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")}function Xp(e){var t=Rd(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Md(n.ownerDocument.documentElement,n)){if(r!==null&&yo(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var s=n.textContent.length,l=Math.min(r.start,s);r=r.end===void 0?l:Math.min(r.end,s),!e.extend&&l>r&&(s=r,r=l,l=s),s=Eu(n,l);var a=Eu(n,r);s&&a&&(e.rangeCount!==1||e.anchorNode!==s.node||e.anchorOffset!==s.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&(t=t.createRange(),t.setStart(s.node,s.offset),e.removeAllRanges(),l>r?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var Yp=Ft&&"documentMode"in document&&11>=document.documentMode,Gn=null,sa=null,is=null,la=!1;function Pu(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;la||Gn==null||Gn!==gl(r)||(r=Gn,"selectionStart"in r&&yo(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),is&&vs(is,r)||(is=r,r=El(sa,"onSelect"),0<r.length&&(t=new ho("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=Gn)))}function Gs(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Xn={animationend:Gs("Animation","AnimationEnd"),animationiteration:Gs("Animation","AnimationIteration"),animationstart:Gs("Animation","AnimationStart"),transitionend:Gs("Transition","TransitionEnd")},ki={},Od={};Ft&&(Od=document.createElement("div").style,"AnimationEvent"in window||(delete Xn.animationend.animation,delete Xn.animationiteration.animation,delete Xn.animationstart.animation),"TransitionEvent"in window||delete Xn.transitionend.transition);function Xl(e){if(ki[e])return ki[e];if(!Xn[e])return e;var t=Xn[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Od)return ki[e]=t[n];return e}var zd=Xl("animationend"),Fd=Xl("animationiteration"),Ld=Xl("animationstart"),Id=Xl("transitionend"),Dd=new Map,bu="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function mn(e,t){Dd.set(e,t),Bn(t,[e])}for(var ji=0;ji<bu.length;ji++){var Si=bu[ji],Jp=Si.toLowerCase(),Zp=Si[0].toUpperCase()+Si.slice(1);mn(Jp,"on"+Zp)}mn(zd,"onAnimationEnd");mn(Fd,"onAnimationIteration");mn(Ld,"onAnimationStart");mn("dblclick","onDoubleClick");mn("focusin","onFocus");mn("focusout","onBlur");mn(Id,"onTransitionEnd");jr("onMouseEnter",["mouseout","mouseover"]);jr("onMouseLeave",["mouseout","mouseover"]);jr("onPointerEnter",["pointerout","pointerover"]);jr("onPointerLeave",["pointerout","pointerover"]);Bn("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Bn("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Bn("onBeforeInput",["compositionend","keypress","textInput","paste"]);Bn("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Bn("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Bn("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var es="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(" "),em=new Set("cancel close invalid load scroll toggle".split(" ").concat(es));function _u(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,Jh(r,t,void 0,e),e.currentTarget=null}function Ad(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],s=r.event;r=r.listeners;e:{var l=void 0;if(t)for(var a=r.length-1;0<=a;a--){var o=r[a],u=o.instance,d=o.currentTarget;if(o=o.listener,u!==l&&s.isPropagationStopped())break e;_u(s,o,d),l=u}else for(a=0;a<r.length;a++){if(o=r[a],u=o.instance,d=o.currentTarget,o=o.listener,u!==l&&s.isPropagationStopped())break e;_u(s,o,d),l=u}}}if(kl)throw e=ea,kl=!1,ea=null,e}function le(e,t){var n=t[ca];n===void 0&&(n=t[ca]=new Set);var r=e+"__bubble";n.has(r)||($d(t,e,2,!1),n.add(r))}function Ni(e,t,n){var r=0;t&&(r|=4),$d(n,e,r,t)}var Xs="_reactListening"+Math.random().toString(36).slice(2);function gs(e){if(!e[Xs]){e[Xs]=!0,Wc.forEach(function(n){n!=="selectionchange"&&(em.has(n)||Ni(n,!1,e),Ni(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Xs]||(t[Xs]=!0,Ni("selectionchange",!1,t))}}function $d(e,t,n,r){switch(Sd(t)){case 1:var s=pp;break;case 4:s=mp;break;default:s=co}n=s.bind(null,t,n,e),s=void 0,!Zi||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(s=!0),r?s!==void 0?e.addEventListener(t,n,{capture:!0,passive:s}):e.addEventListener(t,n,!0):s!==void 0?e.addEventListener(t,n,{passive:s}):e.addEventListener(t,n,!1)}function Ci(e,t,n,r,s){var l=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var a=r.tag;if(a===3||a===4){var o=r.stateNode.containerInfo;if(o===s||o.nodeType===8&&o.parentNode===s)break;if(a===4)for(a=r.return;a!==null;){var u=a.tag;if((u===3||u===4)&&(u=a.stateNode.containerInfo,u===s||u.nodeType===8&&u.parentNode===s))return;a=a.return}for(;o!==null;){if(a=wn(o),a===null)return;if(u=a.tag,u===5||u===6){r=l=a;continue e}o=o.parentNode}}r=r.return}ud(function(){var d=l,y=io(n),m=[];e:{var x=Dd.get(e);if(x!==void 0){var g=ho,w=e;switch(e){case"keypress":if(ul(n)===0)break e;case"keydown":case"keyup":g=Tp;break;case"focusin":w="focus",g=vi;break;case"focusout":w="blur",g=vi;break;case"beforeblur":case"afterblur":g=vi;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":g=xu;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":g=vp;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":g=Op;break;case zd:case Fd:case Ld:g=kp;break;case Id:g=Fp;break;case"scroll":g=yp;break;case"wheel":g=Ip;break;case"copy":case"cut":case"paste":g=Sp;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":g=gu}var j=(t&4)!==0,_=!j&&e==="scroll",c=j?x!==null?x+"Capture":null:x;j=[];for(var f=d,p;f!==null;){p=f;var v=p.stateNode;if(p.tag===5&&v!==null&&(p=v,c!==null&&(v=hs(f,c),v!=null&&j.push(ws(f,v,p)))),_)break;f=f.return}0<j.length&&(x=new g(x,w,null,n,y),m.push({event:x,listeners:j}))}}if(!(t&7)){e:{if(x=e==="mouseover"||e==="pointerover",g=e==="mouseout"||e==="pointerout",x&&n!==Yi&&(w=n.relatedTarget||n.fromElement)&&(wn(w)||w[Lt]))break e;if((g||x)&&(x=y.window===y?y:(x=y.ownerDocument)?x.defaultView||x.parentWindow:window,g?(w=n.relatedTarget||n.toElement,g=d,w=w?wn(w):null,w!==null&&(_=Hn(w),w!==_||w.tag!==5&&w.tag!==6)&&(w=null)):(g=null,w=d),g!==w)){if(j=xu,v="onMouseLeave",c="onMouseEnter",f="mouse",(e==="pointerout"||e==="pointerover")&&(j=gu,v="onPointerLeave",c="onPointerEnter",f="pointer"),_=g==null?x:Yn(g),p=w==null?x:Yn(w),x=new j(v,f+"leave",g,n,y),x.target=_,x.relatedTarget=p,v=null,wn(y)===d&&(j=new j(c,f+"enter",w,n,y),j.target=p,j.relatedTarget=_,v=j),_=v,g&&w)t:{for(j=g,c=w,f=0,p=j;p;p=Kn(p))f++;for(p=0,v=c;v;v=Kn(v))p++;for(;0<f-p;)j=Kn(j),f--;for(;0<p-f;)c=Kn(c),p--;for(;f--;){if(j===c||c!==null&&j===c.alternate)break t;j=Kn(j),c=Kn(c)}j=null}else j=null;g!==null&&Tu(m,x,g,j,!1),w!==null&&_!==null&&Tu(m,_,w,j,!0)}}e:{if(x=d?Yn(d):window,g=x.nodeName&&x.nodeName.toLowerCase(),g==="select"||g==="input"&&x.type==="file")var E=Hp;else if(ju(x))if(_d)E=qp;else{E=Vp;var k=Kp}else(g=x.nodeName)&&g.toLowerCase()==="input"&&(x.type==="checkbox"||x.type==="radio")&&(E=Wp);if(E&&(E=E(e,d))){bd(m,E,n,y);break e}k&&k(e,x,d),e==="focusout"&&(k=x._wrapperState)&&k.controlled&&x.type==="number"&&Vi(x,"number",x.value)}switch(k=d?Yn(d):window,e){case"focusin":(ju(k)||k.contentEditable==="true")&&(Gn=k,sa=d,is=null);break;case"focusout":is=sa=Gn=null;break;case"mousedown":la=!0;break;case"contextmenu":case"mouseup":case"dragend":la=!1,Pu(m,n,y);break;case"selectionchange":if(Yp)break;case"keydown":case"keyup":Pu(m,n,y)}var C;if(mo)e:{switch(e){case"compositionstart":var N="onCompositionStart";break e;case"compositionend":N="onCompositionEnd";break e;case"compositionupdate":N="onCompositionUpdate";break e}N=void 0}else qn?Ed(e,n)&&(N="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(N="onCompositionStart");N&&(Cd&&n.locale!=="ko"&&(qn||N!=="onCompositionStart"?N==="onCompositionEnd"&&qn&&(C=Nd()):(tn=y,fo="value"in tn?tn.value:tn.textContent,qn=!0)),k=El(d,N),0<k.length&&(N=new vu(N,e,null,n,y),m.push({event:N,listeners:k}),C?N.data=C:(C=Pd(n),C!==null&&(N.data=C)))),(C=Ap?$p(e,n):Up(e,n))&&(d=El(d,"onBeforeInput"),0<d.length&&(y=new vu("onBeforeInput","beforeinput",null,n,y),m.push({event:y,listeners:d}),y.data=C))}Ad(m,t)})}function ws(e,t,n){return{instance:e,listener:t,currentTarget:n}}function El(e,t){for(var n=t+"Capture",r=[];e!==null;){var s=e,l=s.stateNode;s.tag===5&&l!==null&&(s=l,l=hs(e,n),l!=null&&r.unshift(ws(e,l,s)),l=hs(e,t),l!=null&&r.push(ws(e,l,s))),e=e.return}return r}function Kn(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function Tu(e,t,n,r,s){for(var l=t._reactName,a=[];n!==null&&n!==r;){var o=n,u=o.alternate,d=o.stateNode;if(u!==null&&u===r)break;o.tag===5&&d!==null&&(o=d,s?(u=hs(n,l),u!=null&&a.unshift(ws(n,u,o))):s||(u=hs(n,l),u!=null&&a.push(ws(n,u,o)))),n=n.return}a.length!==0&&e.push({event:t,listeners:a})}var tm=/\r\n?/g,nm=/\u0000|\uFFFD/g;function Mu(e){return(typeof e=="string"?e:""+e).replace(tm,`
38
- `).replace(nm,"")}function Ys(e,t,n){if(t=Mu(t),Mu(e)!==t&&n)throw Error(b(425))}function Pl(){}var ia=null,aa=null;function oa(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var ua=typeof setTimeout=="function"?setTimeout:void 0,rm=typeof clearTimeout=="function"?clearTimeout:void 0,Ru=typeof Promise=="function"?Promise:void 0,sm=typeof queueMicrotask=="function"?queueMicrotask:typeof Ru<"u"?function(e){return Ru.resolve(null).then(e).catch(lm)}:ua;function lm(e){setTimeout(function(){throw e})}function Ei(e,t){var n=t,r=0;do{var s=n.nextSibling;if(e.removeChild(n),s&&s.nodeType===8)if(n=s.data,n==="/$"){if(r===0){e.removeChild(s),ys(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=s}while(n);ys(t)}function an(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==="$?")break;if(t==="/$")return null}}return e}function Ou(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var Mr=Math.random().toString(36).slice(2),kt="__reactFiber$"+Mr,ks="__reactProps$"+Mr,Lt="__reactContainer$"+Mr,ca="__reactEvents$"+Mr,im="__reactListeners$"+Mr,am="__reactHandles$"+Mr;function wn(e){var t=e[kt];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Lt]||n[kt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Ou(e);e!==null;){if(n=e[kt])return n;e=Ou(e)}return t}e=n,n=e.parentNode}return null}function Ds(e){return e=e[kt]||e[Lt],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Yn(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(b(33))}function Yl(e){return e[ks]||null}var da=[],Jn=-1;function yn(e){return{current:e}}function ie(e){0>Jn||(e.current=da[Jn],da[Jn]=null,Jn--)}function re(e,t){Jn++,da[Jn]=e.current,e.current=t}var pn={},Me=yn(pn),Qe=yn(!1),Fn=pn;function Sr(e,t){var n=e.type.contextTypes;if(!n)return pn;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var s={},l;for(l in n)s[l]=t[l];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=s),s}function Be(e){return e=e.childContextTypes,e!=null}function bl(){ie(Qe),ie(Me)}function zu(e,t,n){if(Me.current!==pn)throw Error(b(168));re(Me,t),re(Qe,n)}function Ud(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var s in r)if(!(s in t))throw Error(b(108,Kh(e)||"Unknown",s));return ce({},n,r)}function _l(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||pn,Fn=Me.current,re(Me,e),re(Qe,Qe.current),!0}function Fu(e,t,n){var r=e.stateNode;if(!r)throw Error(b(169));n?(e=Ud(e,t,Fn),r.__reactInternalMemoizedMergedChildContext=e,ie(Qe),ie(Me),re(Me,e)):ie(Qe),re(Qe,n)}var Et=null,Jl=!1,Pi=!1;function Qd(e){Et===null?Et=[e]:Et.push(e)}function om(e){Jl=!0,Qd(e)}function xn(){if(!Pi&&Et!==null){Pi=!0;var e=0,t=ee;try{var n=Et;for(ee=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}Et=null,Jl=!1}catch(s){throw Et!==null&&(Et=Et.slice(e+1)),hd(ao,xn),s}finally{ee=t,Pi=!1}}return null}var Zn=[],er=0,Tl=null,Ml=0,et=[],tt=0,Ln=null,Mt=1,Rt="";function vn(e,t){Zn[er++]=Ml,Zn[er++]=Tl,Tl=e,Ml=t}function Bd(e,t,n){et[tt++]=Mt,et[tt++]=Rt,et[tt++]=Ln,Ln=e;var r=Mt;e=Rt;var s=32-ht(r)-1;r&=~(1<<s),n+=1;var l=32-ht(t)+s;if(30<l){var a=s-s%5;l=(r&(1<<a)-1).toString(32),r>>=a,s-=a,Mt=1<<32-ht(t)+s|n<<s|r,Rt=l+e}else Mt=1<<l|n<<s|r,Rt=e}function xo(e){e.return!==null&&(vn(e,1),Bd(e,1,0))}function vo(e){for(;e===Tl;)Tl=Zn[--er],Zn[er]=null,Ml=Zn[--er],Zn[er]=null;for(;e===Ln;)Ln=et[--tt],et[tt]=null,Rt=et[--tt],et[tt]=null,Mt=et[--tt],et[tt]=null}var qe=null,We=null,ae=!1,dt=null;function Hd(e,t){var n=nt(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function Lu(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,qe=e,We=an(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,qe=e,We=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=Ln!==null?{id:Mt,overflow:Rt}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=nt(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,qe=e,We=null,!0):!1;default:return!1}}function fa(e){return(e.mode&1)!==0&&(e.flags&128)===0}function ha(e){if(ae){var t=We;if(t){var n=t;if(!Lu(e,t)){if(fa(e))throw Error(b(418));t=an(n.nextSibling);var r=qe;t&&Lu(e,t)?Hd(r,n):(e.flags=e.flags&-4097|2,ae=!1,qe=e)}}else{if(fa(e))throw Error(b(418));e.flags=e.flags&-4097|2,ae=!1,qe=e}}}function Iu(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;qe=e}function Js(e){if(e!==qe)return!1;if(!ae)return Iu(e),ae=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!oa(e.type,e.memoizedProps)),t&&(t=We)){if(fa(e))throw Kd(),Error(b(418));for(;t;)Hd(e,t),t=an(t.nextSibling)}if(Iu(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(b(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){We=an(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}We=null}}else We=qe?an(e.stateNode.nextSibling):null;return!0}function Kd(){for(var e=We;e;)e=an(e.nextSibling)}function Nr(){We=qe=null,ae=!1}function go(e){dt===null?dt=[e]:dt.push(e)}var um=At.ReactCurrentBatchConfig;function qr(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(b(309));var r=n.stateNode}if(!r)throw Error(b(147,e));var s=r,l=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===l?t.ref:(t=function(a){var o=s.refs;a===null?delete o[l]:o[l]=a},t._stringRef=l,t)}if(typeof e!="string")throw Error(b(284));if(!n._owner)throw Error(b(290,e))}return e}function Zs(e,t){throw e=Object.prototype.toString.call(t),Error(b(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Du(e){var t=e._init;return t(e._payload)}function Vd(e){function t(c,f){if(e){var p=c.deletions;p===null?(c.deletions=[f],c.flags|=16):p.push(f)}}function n(c,f){if(!e)return null;for(;f!==null;)t(c,f),f=f.sibling;return null}function r(c,f){for(c=new Map;f!==null;)f.key!==null?c.set(f.key,f):c.set(f.index,f),f=f.sibling;return c}function s(c,f){return c=dn(c,f),c.index=0,c.sibling=null,c}function l(c,f,p){return c.index=p,e?(p=c.alternate,p!==null?(p=p.index,p<f?(c.flags|=2,f):p):(c.flags|=2,f)):(c.flags|=1048576,f)}function a(c){return e&&c.alternate===null&&(c.flags|=2),c}function o(c,f,p,v){return f===null||f.tag!==6?(f=zi(p,c.mode,v),f.return=c,f):(f=s(f,p),f.return=c,f)}function u(c,f,p,v){var E=p.type;return E===Wn?y(c,f,p.props.children,v,p.key):f!==null&&(f.elementType===E||typeof E=="object"&&E!==null&&E.$$typeof===Qt&&Du(E)===f.type)?(v=s(f,p.props),v.ref=qr(c,f,p),v.return=c,v):(v=yl(p.type,p.key,p.props,null,c.mode,v),v.ref=qr(c,f,p),v.return=c,v)}function d(c,f,p,v){return f===null||f.tag!==4||f.stateNode.containerInfo!==p.containerInfo||f.stateNode.implementation!==p.implementation?(f=Fi(p,c.mode,v),f.return=c,f):(f=s(f,p.children||[]),f.return=c,f)}function y(c,f,p,v,E){return f===null||f.tag!==7?(f=zn(p,c.mode,v,E),f.return=c,f):(f=s(f,p),f.return=c,f)}function m(c,f,p){if(typeof f=="string"&&f!==""||typeof f=="number")return f=zi(""+f,c.mode,p),f.return=c,f;if(typeof f=="object"&&f!==null){switch(f.$$typeof){case Qs:return p=yl(f.type,f.key,f.props,null,c.mode,p),p.ref=qr(c,null,f),p.return=c,p;case Vn:return f=Fi(f,c.mode,p),f.return=c,f;case Qt:var v=f._init;return m(c,v(f._payload),p)}if(Jr(f)||Br(f))return f=zn(f,c.mode,p,null),f.return=c,f;Zs(c,f)}return null}function x(c,f,p,v){var E=f!==null?f.key:null;if(typeof p=="string"&&p!==""||typeof p=="number")return E!==null?null:o(c,f,""+p,v);if(typeof p=="object"&&p!==null){switch(p.$$typeof){case Qs:return p.key===E?u(c,f,p,v):null;case Vn:return p.key===E?d(c,f,p,v):null;case Qt:return E=p._init,x(c,f,E(p._payload),v)}if(Jr(p)||Br(p))return E!==null?null:y(c,f,p,v,null);Zs(c,p)}return null}function g(c,f,p,v,E){if(typeof v=="string"&&v!==""||typeof v=="number")return c=c.get(p)||null,o(f,c,""+v,E);if(typeof v=="object"&&v!==null){switch(v.$$typeof){case Qs:return c=c.get(v.key===null?p:v.key)||null,u(f,c,v,E);case Vn:return c=c.get(v.key===null?p:v.key)||null,d(f,c,v,E);case Qt:var k=v._init;return g(c,f,p,k(v._payload),E)}if(Jr(v)||Br(v))return c=c.get(p)||null,y(f,c,v,E,null);Zs(f,v)}return null}function w(c,f,p,v){for(var E=null,k=null,C=f,N=f=0,z=null;C!==null&&N<p.length;N++){C.index>N?(z=C,C=null):z=C.sibling;var R=x(c,C,p[N],v);if(R===null){C===null&&(C=z);break}e&&C&&R.alternate===null&&t(c,C),f=l(R,f,N),k===null?E=R:k.sibling=R,k=R,C=z}if(N===p.length)return n(c,C),ae&&vn(c,N),E;if(C===null){for(;N<p.length;N++)C=m(c,p[N],v),C!==null&&(f=l(C,f,N),k===null?E=C:k.sibling=C,k=C);return ae&&vn(c,N),E}for(C=r(c,C);N<p.length;N++)z=g(C,c,N,p[N],v),z!==null&&(e&&z.alternate!==null&&C.delete(z.key===null?N:z.key),f=l(z,f,N),k===null?E=z:k.sibling=z,k=z);return e&&C.forEach(function(K){return t(c,K)}),ae&&vn(c,N),E}function j(c,f,p,v){var E=Br(p);if(typeof E!="function")throw Error(b(150));if(p=E.call(p),p==null)throw Error(b(151));for(var k=E=null,C=f,N=f=0,z=null,R=p.next();C!==null&&!R.done;N++,R=p.next()){C.index>N?(z=C,C=null):z=C.sibling;var K=x(c,C,R.value,v);if(K===null){C===null&&(C=z);break}e&&C&&K.alternate===null&&t(c,C),f=l(K,f,N),k===null?E=K:k.sibling=K,k=K,C=z}if(R.done)return n(c,C),ae&&vn(c,N),E;if(C===null){for(;!R.done;N++,R=p.next())R=m(c,R.value,v),R!==null&&(f=l(R,f,N),k===null?E=R:k.sibling=R,k=R);return ae&&vn(c,N),E}for(C=r(c,C);!R.done;N++,R=p.next())R=g(C,c,N,R.value,v),R!==null&&(e&&R.alternate!==null&&C.delete(R.key===null?N:R.key),f=l(R,f,N),k===null?E=R:k.sibling=R,k=R);return e&&C.forEach(function(Y){return t(c,Y)}),ae&&vn(c,N),E}function _(c,f,p,v){if(typeof p=="object"&&p!==null&&p.type===Wn&&p.key===null&&(p=p.props.children),typeof p=="object"&&p!==null){switch(p.$$typeof){case Qs:e:{for(var E=p.key,k=f;k!==null;){if(k.key===E){if(E=p.type,E===Wn){if(k.tag===7){n(c,k.sibling),f=s(k,p.props.children),f.return=c,c=f;break e}}else if(k.elementType===E||typeof E=="object"&&E!==null&&E.$$typeof===Qt&&Du(E)===k.type){n(c,k.sibling),f=s(k,p.props),f.ref=qr(c,k,p),f.return=c,c=f;break e}n(c,k);break}else t(c,k);k=k.sibling}p.type===Wn?(f=zn(p.props.children,c.mode,v,p.key),f.return=c,c=f):(v=yl(p.type,p.key,p.props,null,c.mode,v),v.ref=qr(c,f,p),v.return=c,c=v)}return a(c);case Vn:e:{for(k=p.key;f!==null;){if(f.key===k)if(f.tag===4&&f.stateNode.containerInfo===p.containerInfo&&f.stateNode.implementation===p.implementation){n(c,f.sibling),f=s(f,p.children||[]),f.return=c,c=f;break e}else{n(c,f);break}else t(c,f);f=f.sibling}f=Fi(p,c.mode,v),f.return=c,c=f}return a(c);case Qt:return k=p._init,_(c,f,k(p._payload),v)}if(Jr(p))return w(c,f,p,v);if(Br(p))return j(c,f,p,v);Zs(c,p)}return typeof p=="string"&&p!==""||typeof p=="number"?(p=""+p,f!==null&&f.tag===6?(n(c,f.sibling),f=s(f,p),f.return=c,c=f):(n(c,f),f=zi(p,c.mode,v),f.return=c,c=f),a(c)):n(c,f)}return _}var Cr=Vd(!0),Wd=Vd(!1),Rl=yn(null),Ol=null,tr=null,wo=null;function ko(){wo=tr=Ol=null}function jo(e){var t=Rl.current;ie(Rl),e._currentValue=t}function pa(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function or(e,t){Ol=e,wo=tr=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Ue=!0),e.firstContext=null)}function st(e){var t=e._currentValue;if(wo!==e)if(e={context:e,memoizedValue:t,next:null},tr===null){if(Ol===null)throw Error(b(308));tr=e,Ol.dependencies={lanes:0,firstContext:e}}else tr=tr.next=e;return t}var kn=null;function So(e){kn===null?kn=[e]:kn.push(e)}function qd(e,t,n,r){var s=t.interleaved;return s===null?(n.next=n,So(t)):(n.next=s.next,s.next=n),t.interleaved=n,It(e,r)}function It(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var Bt=!1;function No(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Gd(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Ot(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function on(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,X&2){var s=r.pending;return s===null?t.next=t:(t.next=s.next,s.next=t),r.pending=t,It(e,n)}return s=r.interleaved,s===null?(t.next=t,So(r)):(t.next=s.next,s.next=t),r.interleaved=t,It(e,n)}function cl(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,oo(e,n)}}function Au(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var s=null,l=null;if(n=n.firstBaseUpdate,n!==null){do{var a={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};l===null?s=l=a:l=l.next=a,n=n.next}while(n!==null);l===null?s=l=t:l=l.next=t}else s=l=t;n={baseState:r.baseState,firstBaseUpdate:s,lastBaseUpdate:l,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function zl(e,t,n,r){var s=e.updateQueue;Bt=!1;var l=s.firstBaseUpdate,a=s.lastBaseUpdate,o=s.shared.pending;if(o!==null){s.shared.pending=null;var u=o,d=u.next;u.next=null,a===null?l=d:a.next=d,a=u;var y=e.alternate;y!==null&&(y=y.updateQueue,o=y.lastBaseUpdate,o!==a&&(o===null?y.firstBaseUpdate=d:o.next=d,y.lastBaseUpdate=u))}if(l!==null){var m=s.baseState;a=0,y=d=u=null,o=l;do{var x=o.lane,g=o.eventTime;if((r&x)===x){y!==null&&(y=y.next={eventTime:g,lane:0,tag:o.tag,payload:o.payload,callback:o.callback,next:null});e:{var w=e,j=o;switch(x=t,g=n,j.tag){case 1:if(w=j.payload,typeof w=="function"){m=w.call(g,m,x);break e}m=w;break e;case 3:w.flags=w.flags&-65537|128;case 0:if(w=j.payload,x=typeof w=="function"?w.call(g,m,x):w,x==null)break e;m=ce({},m,x);break e;case 2:Bt=!0}}o.callback!==null&&o.lane!==0&&(e.flags|=64,x=s.effects,x===null?s.effects=[o]:x.push(o))}else g={eventTime:g,lane:x,tag:o.tag,payload:o.payload,callback:o.callback,next:null},y===null?(d=y=g,u=m):y=y.next=g,a|=x;if(o=o.next,o===null){if(o=s.shared.pending,o===null)break;x=o,o=x.next,x.next=null,s.lastBaseUpdate=x,s.shared.pending=null}}while(!0);if(y===null&&(u=m),s.baseState=u,s.firstBaseUpdate=d,s.lastBaseUpdate=y,t=s.shared.interleaved,t!==null){s=t;do a|=s.lane,s=s.next;while(s!==t)}else l===null&&(s.shared.lanes=0);Dn|=a,e.lanes=a,e.memoizedState=m}}function $u(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],s=r.callback;if(s!==null){if(r.callback=null,r=n,typeof s!="function")throw Error(b(191,s));s.call(r)}}}var As={},St=yn(As),js=yn(As),Ss=yn(As);function jn(e){if(e===As)throw Error(b(174));return e}function Co(e,t){switch(re(Ss,t),re(js,e),re(St,As),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:qi(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=qi(t,e)}ie(St),re(St,t)}function Er(){ie(St),ie(js),ie(Ss)}function Xd(e){jn(Ss.current);var t=jn(St.current),n=qi(t,e.type);t!==n&&(re(js,e),re(St,n))}function Eo(e){js.current===e&&(ie(St),ie(js))}var oe=yn(0);function Fl(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)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 bi=[];function Po(){for(var e=0;e<bi.length;e++)bi[e]._workInProgressVersionPrimary=null;bi.length=0}var dl=At.ReactCurrentDispatcher,_i=At.ReactCurrentBatchConfig,In=0,ue=null,xe=null,ke=null,Ll=!1,as=!1,Ns=0,cm=0;function Pe(){throw Error(b(321))}function bo(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!mt(e[n],t[n]))return!1;return!0}function _o(e,t,n,r,s,l){if(In=l,ue=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,dl.current=e===null||e.memoizedState===null?pm:mm,e=n(r,s),as){l=0;do{if(as=!1,Ns=0,25<=l)throw Error(b(301));l+=1,ke=xe=null,t.updateQueue=null,dl.current=ym,e=n(r,s)}while(as)}if(dl.current=Il,t=xe!==null&&xe.next!==null,In=0,ke=xe=ue=null,Ll=!1,t)throw Error(b(300));return e}function To(){var e=Ns!==0;return Ns=0,e}function xt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ke===null?ue.memoizedState=ke=e:ke=ke.next=e,ke}function lt(){if(xe===null){var e=ue.alternate;e=e!==null?e.memoizedState:null}else e=xe.next;var t=ke===null?ue.memoizedState:ke.next;if(t!==null)ke=t,xe=e;else{if(e===null)throw Error(b(310));xe=e,e={memoizedState:xe.memoizedState,baseState:xe.baseState,baseQueue:xe.baseQueue,queue:xe.queue,next:null},ke===null?ue.memoizedState=ke=e:ke=ke.next=e}return ke}function Cs(e,t){return typeof t=="function"?t(e):t}function Ti(e){var t=lt(),n=t.queue;if(n===null)throw Error(b(311));n.lastRenderedReducer=e;var r=xe,s=r.baseQueue,l=n.pending;if(l!==null){if(s!==null){var a=s.next;s.next=l.next,l.next=a}r.baseQueue=s=l,n.pending=null}if(s!==null){l=s.next,r=r.baseState;var o=a=null,u=null,d=l;do{var y=d.lane;if((In&y)===y)u!==null&&(u=u.next={lane:0,action:d.action,hasEagerState:d.hasEagerState,eagerState:d.eagerState,next:null}),r=d.hasEagerState?d.eagerState:e(r,d.action);else{var m={lane:y,action:d.action,hasEagerState:d.hasEagerState,eagerState:d.eagerState,next:null};u===null?(o=u=m,a=r):u=u.next=m,ue.lanes|=y,Dn|=y}d=d.next}while(d!==null&&d!==l);u===null?a=r:u.next=o,mt(r,t.memoizedState)||(Ue=!0),t.memoizedState=r,t.baseState=a,t.baseQueue=u,n.lastRenderedState=r}if(e=n.interleaved,e!==null){s=e;do l=s.lane,ue.lanes|=l,Dn|=l,s=s.next;while(s!==e)}else s===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Mi(e){var t=lt(),n=t.queue;if(n===null)throw Error(b(311));n.lastRenderedReducer=e;var r=n.dispatch,s=n.pending,l=t.memoizedState;if(s!==null){n.pending=null;var a=s=s.next;do l=e(l,a.action),a=a.next;while(a!==s);mt(l,t.memoizedState)||(Ue=!0),t.memoizedState=l,t.baseQueue===null&&(t.baseState=l),n.lastRenderedState=l}return[l,r]}function Yd(){}function Jd(e,t){var n=ue,r=lt(),s=t(),l=!mt(r.memoizedState,s);if(l&&(r.memoizedState=s,Ue=!0),r=r.queue,Mo(tf.bind(null,n,r,e),[e]),r.getSnapshot!==t||l||ke!==null&&ke.memoizedState.tag&1){if(n.flags|=2048,Es(9,ef.bind(null,n,r,s,t),void 0,null),je===null)throw Error(b(349));In&30||Zd(n,t,s)}return s}function Zd(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=ue.updateQueue,t===null?(t={lastEffect:null,stores:null},ue.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function ef(e,t,n,r){t.value=n,t.getSnapshot=r,nf(t)&&rf(e)}function tf(e,t,n){return n(function(){nf(t)&&rf(e)})}function nf(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!mt(e,n)}catch{return!0}}function rf(e){var t=It(e,1);t!==null&&pt(t,e,1,-1)}function Uu(e){var t=xt();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Cs,lastRenderedState:e},t.queue=e,e=e.dispatch=hm.bind(null,ue,e),[t.memoizedState,e]}function Es(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=ue.updateQueue,t===null?(t={lastEffect:null,stores:null},ue.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function sf(){return lt().memoizedState}function fl(e,t,n,r){var s=xt();ue.flags|=e,s.memoizedState=Es(1|t,n,void 0,r===void 0?null:r)}function Zl(e,t,n,r){var s=lt();r=r===void 0?null:r;var l=void 0;if(xe!==null){var a=xe.memoizedState;if(l=a.destroy,r!==null&&bo(r,a.deps)){s.memoizedState=Es(t,n,l,r);return}}ue.flags|=e,s.memoizedState=Es(1|t,n,l,r)}function Qu(e,t){return fl(8390656,8,e,t)}function Mo(e,t){return Zl(2048,8,e,t)}function lf(e,t){return Zl(4,2,e,t)}function af(e,t){return Zl(4,4,e,t)}function of(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function uf(e,t,n){return n=n!=null?n.concat([e]):null,Zl(4,4,of.bind(null,t,e),n)}function Ro(){}function cf(e,t){var n=lt();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&bo(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function df(e,t){var n=lt();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&bo(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function ff(e,t,n){return In&21?(mt(n,t)||(n=yd(),ue.lanes|=n,Dn|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,Ue=!0),e.memoizedState=n)}function dm(e,t){var n=ee;ee=n!==0&&4>n?n:4,e(!0);var r=_i.transition;_i.transition={};try{e(!1),t()}finally{ee=n,_i.transition=r}}function hf(){return lt().memoizedState}function fm(e,t,n){var r=cn(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},pf(e))mf(t,n);else if(n=qd(e,t,n,r),n!==null){var s=Fe();pt(n,e,r,s),yf(n,t,r)}}function hm(e,t,n){var r=cn(e),s={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(pf(e))mf(t,s);else{var l=e.alternate;if(e.lanes===0&&(l===null||l.lanes===0)&&(l=t.lastRenderedReducer,l!==null))try{var a=t.lastRenderedState,o=l(a,n);if(s.hasEagerState=!0,s.eagerState=o,mt(o,a)){var u=t.interleaved;u===null?(s.next=s,So(t)):(s.next=u.next,u.next=s),t.interleaved=s;return}}catch{}finally{}n=qd(e,t,s,r),n!==null&&(s=Fe(),pt(n,e,r,s),yf(n,t,r))}}function pf(e){var t=e.alternate;return e===ue||t!==null&&t===ue}function mf(e,t){as=Ll=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function yf(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,oo(e,n)}}var Il={readContext:st,useCallback:Pe,useContext:Pe,useEffect:Pe,useImperativeHandle:Pe,useInsertionEffect:Pe,useLayoutEffect:Pe,useMemo:Pe,useReducer:Pe,useRef:Pe,useState:Pe,useDebugValue:Pe,useDeferredValue:Pe,useTransition:Pe,useMutableSource:Pe,useSyncExternalStore:Pe,useId:Pe,unstable_isNewReconciler:!1},pm={readContext:st,useCallback:function(e,t){return xt().memoizedState=[e,t===void 0?null:t],e},useContext:st,useEffect:Qu,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,fl(4194308,4,of.bind(null,t,e),n)},useLayoutEffect:function(e,t){return fl(4194308,4,e,t)},useInsertionEffect:function(e,t){return fl(4,2,e,t)},useMemo:function(e,t){var n=xt();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=xt();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=fm.bind(null,ue,e),[r.memoizedState,e]},useRef:function(e){var t=xt();return e={current:e},t.memoizedState=e},useState:Uu,useDebugValue:Ro,useDeferredValue:function(e){return xt().memoizedState=e},useTransition:function(){var e=Uu(!1),t=e[0];return e=dm.bind(null,e[1]),xt().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=ue,s=xt();if(ae){if(n===void 0)throw Error(b(407));n=n()}else{if(n=t(),je===null)throw Error(b(349));In&30||Zd(r,t,n)}s.memoizedState=n;var l={value:n,getSnapshot:t};return s.queue=l,Qu(tf.bind(null,r,l,e),[e]),r.flags|=2048,Es(9,ef.bind(null,r,l,n,t),void 0,null),n},useId:function(){var e=xt(),t=je.identifierPrefix;if(ae){var n=Rt,r=Mt;n=(r&~(1<<32-ht(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Ns++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=cm++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},mm={readContext:st,useCallback:cf,useContext:st,useEffect:Mo,useImperativeHandle:uf,useInsertionEffect:lf,useLayoutEffect:af,useMemo:df,useReducer:Ti,useRef:sf,useState:function(){return Ti(Cs)},useDebugValue:Ro,useDeferredValue:function(e){var t=lt();return ff(t,xe.memoizedState,e)},useTransition:function(){var e=Ti(Cs)[0],t=lt().memoizedState;return[e,t]},useMutableSource:Yd,useSyncExternalStore:Jd,useId:hf,unstable_isNewReconciler:!1},ym={readContext:st,useCallback:cf,useContext:st,useEffect:Mo,useImperativeHandle:uf,useInsertionEffect:lf,useLayoutEffect:af,useMemo:df,useReducer:Mi,useRef:sf,useState:function(){return Mi(Cs)},useDebugValue:Ro,useDeferredValue:function(e){var t=lt();return xe===null?t.memoizedState=e:ff(t,xe.memoizedState,e)},useTransition:function(){var e=Mi(Cs)[0],t=lt().memoizedState;return[e,t]},useMutableSource:Yd,useSyncExternalStore:Jd,useId:hf,unstable_isNewReconciler:!1};function at(e,t){if(e&&e.defaultProps){t=ce({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function ma(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:ce({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var ei={isMounted:function(e){return(e=e._reactInternals)?Hn(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Fe(),s=cn(e),l=Ot(r,s);l.payload=t,n!=null&&(l.callback=n),t=on(e,l,s),t!==null&&(pt(t,e,s,r),cl(t,e,s))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Fe(),s=cn(e),l=Ot(r,s);l.tag=1,l.payload=t,n!=null&&(l.callback=n),t=on(e,l,s),t!==null&&(pt(t,e,s,r),cl(t,e,s))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Fe(),r=cn(e),s=Ot(n,r);s.tag=2,t!=null&&(s.callback=t),t=on(e,s,r),t!==null&&(pt(t,e,r,n),cl(t,e,r))}};function Bu(e,t,n,r,s,l,a){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,l,a):t.prototype&&t.prototype.isPureReactComponent?!vs(n,r)||!vs(s,l):!0}function xf(e,t,n){var r=!1,s=pn,l=t.contextType;return typeof l=="object"&&l!==null?l=st(l):(s=Be(t)?Fn:Me.current,r=t.contextTypes,l=(r=r!=null)?Sr(e,s):pn),t=new t(n,l),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=ei,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=s,e.__reactInternalMemoizedMaskedChildContext=l),t}function Hu(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&ei.enqueueReplaceState(t,t.state,null)}function ya(e,t,n,r){var s=e.stateNode;s.props=n,s.state=e.memoizedState,s.refs={},No(e);var l=t.contextType;typeof l=="object"&&l!==null?s.context=st(l):(l=Be(t)?Fn:Me.current,s.context=Sr(e,l)),s.state=e.memoizedState,l=t.getDerivedStateFromProps,typeof l=="function"&&(ma(e,t,l,n),s.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof s.getSnapshotBeforeUpdate=="function"||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(t=s.state,typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount(),t!==s.state&&ei.enqueueReplaceState(s,s.state,null),zl(e,n,s,r),s.state=e.memoizedState),typeof s.componentDidMount=="function"&&(e.flags|=4194308)}function Pr(e,t){try{var n="",r=t;do n+=Hh(r),r=r.return;while(r);var s=n}catch(l){s=`
39
- Error generating stack: `+l.message+`
40
- `+l.stack}return{value:e,source:t,stack:s,digest:null}}function Ri(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function xa(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var xm=typeof WeakMap=="function"?WeakMap:Map;function vf(e,t,n){n=Ot(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Al||(Al=!0,Pa=r),xa(e,t)},n}function gf(e,t,n){n=Ot(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var s=t.value;n.payload=function(){return r(s)},n.callback=function(){xa(e,t)}}var l=e.stateNode;return l!==null&&typeof l.componentDidCatch=="function"&&(n.callback=function(){xa(e,t),typeof r!="function"&&(un===null?un=new Set([this]):un.add(this));var a=t.stack;this.componentDidCatch(t.value,{componentStack:a!==null?a:""})}),n}function Ku(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new xm;var s=new Set;r.set(t,s)}else s=r.get(t),s===void 0&&(s=new Set,r.set(t,s));s.has(n)||(s.add(n),e=Mm.bind(null,e,t,n),t.then(e,e))}function Vu(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function Wu(e,t,n,r,s){return e.mode&1?(e.flags|=65536,e.lanes=s,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=Ot(-1,1),t.tag=2,on(n,t,1))),n.lanes|=1),e)}var vm=At.ReactCurrentOwner,Ue=!1;function Oe(e,t,n,r){t.child=e===null?Wd(t,null,n,r):Cr(t,e.child,n,r)}function qu(e,t,n,r,s){n=n.render;var l=t.ref;return or(t,s),r=_o(e,t,n,r,l,s),n=To(),e!==null&&!Ue?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,Dt(e,t,s)):(ae&&n&&xo(t),t.flags|=1,Oe(e,t,r,s),t.child)}function Gu(e,t,n,r,s){if(e===null){var l=n.type;return typeof l=="function"&&!$o(l)&&l.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=l,wf(e,t,l,r,s)):(e=yl(n.type,null,r,t,t.mode,s),e.ref=t.ref,e.return=t,t.child=e)}if(l=e.child,!(e.lanes&s)){var a=l.memoizedProps;if(n=n.compare,n=n!==null?n:vs,n(a,r)&&e.ref===t.ref)return Dt(e,t,s)}return t.flags|=1,e=dn(l,r),e.ref=t.ref,e.return=t,t.child=e}function wf(e,t,n,r,s){if(e!==null){var l=e.memoizedProps;if(vs(l,r)&&e.ref===t.ref)if(Ue=!1,t.pendingProps=r=l,(e.lanes&s)!==0)e.flags&131072&&(Ue=!0);else return t.lanes=e.lanes,Dt(e,t,s)}return va(e,t,n,r,s)}function kf(e,t,n){var r=t.pendingProps,s=r.children,l=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},re(rr,Ve),Ve|=n;else{if(!(n&1073741824))return e=l!==null?l.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,re(rr,Ve),Ve|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=l!==null?l.baseLanes:n,re(rr,Ve),Ve|=r}else l!==null?(r=l.baseLanes|n,t.memoizedState=null):r=n,re(rr,Ve),Ve|=r;return Oe(e,t,s,n),t.child}function jf(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function va(e,t,n,r,s){var l=Be(n)?Fn:Me.current;return l=Sr(t,l),or(t,s),n=_o(e,t,n,r,l,s),r=To(),e!==null&&!Ue?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,Dt(e,t,s)):(ae&&r&&xo(t),t.flags|=1,Oe(e,t,n,s),t.child)}function Xu(e,t,n,r,s){if(Be(n)){var l=!0;_l(t)}else l=!1;if(or(t,s),t.stateNode===null)hl(e,t),xf(t,n,r),ya(t,n,r,s),r=!0;else if(e===null){var a=t.stateNode,o=t.memoizedProps;a.props=o;var u=a.context,d=n.contextType;typeof d=="object"&&d!==null?d=st(d):(d=Be(n)?Fn:Me.current,d=Sr(t,d));var y=n.getDerivedStateFromProps,m=typeof y=="function"||typeof a.getSnapshotBeforeUpdate=="function";m||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(o!==r||u!==d)&&Hu(t,a,r,d),Bt=!1;var x=t.memoizedState;a.state=x,zl(t,r,a,s),u=t.memoizedState,o!==r||x!==u||Qe.current||Bt?(typeof y=="function"&&(ma(t,n,y,r),u=t.memoizedState),(o=Bt||Bu(t,n,o,r,x,u,d))?(m||typeof a.UNSAFE_componentWillMount!="function"&&typeof a.componentWillMount!="function"||(typeof a.componentWillMount=="function"&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount=="function"&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount=="function"&&(t.flags|=4194308)):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=u),a.props=r,a.state=u,a.context=d,r=o):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,Gd(e,t),o=t.memoizedProps,d=t.type===t.elementType?o:at(t.type,o),a.props=d,m=t.pendingProps,x=a.context,u=n.contextType,typeof u=="object"&&u!==null?u=st(u):(u=Be(n)?Fn:Me.current,u=Sr(t,u));var g=n.getDerivedStateFromProps;(y=typeof g=="function"||typeof a.getSnapshotBeforeUpdate=="function")||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(o!==m||x!==u)&&Hu(t,a,r,u),Bt=!1,x=t.memoizedState,a.state=x,zl(t,r,a,s);var w=t.memoizedState;o!==m||x!==w||Qe.current||Bt?(typeof g=="function"&&(ma(t,n,g,r),w=t.memoizedState),(d=Bt||Bu(t,n,d,r,x,w,u)||!1)?(y||typeof a.UNSAFE_componentWillUpdate!="function"&&typeof a.componentWillUpdate!="function"||(typeof a.componentWillUpdate=="function"&&a.componentWillUpdate(r,w,u),typeof a.UNSAFE_componentWillUpdate=="function"&&a.UNSAFE_componentWillUpdate(r,w,u)),typeof a.componentDidUpdate=="function"&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof a.componentDidUpdate!="function"||o===e.memoizedProps&&x===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||o===e.memoizedProps&&x===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=w),a.props=r,a.state=w,a.context=u,r=d):(typeof a.componentDidUpdate!="function"||o===e.memoizedProps&&x===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||o===e.memoizedProps&&x===e.memoizedState||(t.flags|=1024),r=!1)}return ga(e,t,n,r,l,s)}function ga(e,t,n,r,s,l){jf(e,t);var a=(t.flags&128)!==0;if(!r&&!a)return s&&Fu(t,n,!1),Dt(e,t,l);r=t.stateNode,vm.current=t;var o=a&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&a?(t.child=Cr(t,e.child,null,l),t.child=Cr(t,null,o,l)):Oe(e,t,o,l),t.memoizedState=r.state,s&&Fu(t,n,!0),t.child}function Sf(e){var t=e.stateNode;t.pendingContext?zu(e,t.pendingContext,t.pendingContext!==t.context):t.context&&zu(e,t.context,!1),Co(e,t.containerInfo)}function Yu(e,t,n,r,s){return Nr(),go(s),t.flags|=256,Oe(e,t,n,r),t.child}var wa={dehydrated:null,treeContext:null,retryLane:0};function ka(e){return{baseLanes:e,cachePool:null,transitions:null}}function Nf(e,t,n){var r=t.pendingProps,s=oe.current,l=!1,a=(t.flags&128)!==0,o;if((o=a)||(o=e!==null&&e.memoizedState===null?!1:(s&2)!==0),o?(l=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(s|=1),re(oe,s&1),e===null)return ha(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(a=r.children,e=r.fallback,l?(r=t.mode,l=t.child,a={mode:"hidden",children:a},!(r&1)&&l!==null?(l.childLanes=0,l.pendingProps=a):l=ri(a,r,0,null),e=zn(e,r,n,null),l.return=t,e.return=t,l.sibling=e,t.child=l,t.child.memoizedState=ka(n),t.memoizedState=wa,e):Oo(t,a));if(s=e.memoizedState,s!==null&&(o=s.dehydrated,o!==null))return gm(e,t,a,r,o,s,n);if(l){l=r.fallback,a=t.mode,s=e.child,o=s.sibling;var u={mode:"hidden",children:r.children};return!(a&1)&&t.child!==s?(r=t.child,r.childLanes=0,r.pendingProps=u,t.deletions=null):(r=dn(s,u),r.subtreeFlags=s.subtreeFlags&14680064),o!==null?l=dn(o,l):(l=zn(l,a,n,null),l.flags|=2),l.return=t,r.return=t,r.sibling=l,t.child=r,r=l,l=t.child,a=e.child.memoizedState,a=a===null?ka(n):{baseLanes:a.baseLanes|n,cachePool:null,transitions:a.transitions},l.memoizedState=a,l.childLanes=e.childLanes&~n,t.memoizedState=wa,r}return l=e.child,e=l.sibling,r=dn(l,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function Oo(e,t){return t=ri({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function el(e,t,n,r){return r!==null&&go(r),Cr(t,e.child,null,n),e=Oo(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function gm(e,t,n,r,s,l,a){if(n)return t.flags&256?(t.flags&=-257,r=Ri(Error(b(422))),el(e,t,a,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(l=r.fallback,s=t.mode,r=ri({mode:"visible",children:r.children},s,0,null),l=zn(l,s,a,null),l.flags|=2,r.return=t,l.return=t,r.sibling=l,t.child=r,t.mode&1&&Cr(t,e.child,null,a),t.child.memoizedState=ka(a),t.memoizedState=wa,l);if(!(t.mode&1))return el(e,t,a,null);if(s.data==="$!"){if(r=s.nextSibling&&s.nextSibling.dataset,r)var o=r.dgst;return r=o,l=Error(b(419)),r=Ri(l,r,void 0),el(e,t,a,r)}if(o=(a&e.childLanes)!==0,Ue||o){if(r=je,r!==null){switch(a&-a){case 4:s=2;break;case 16:s=8;break;case 64: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:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:s=32;break;case 536870912:s=268435456;break;default:s=0}s=s&(r.suspendedLanes|a)?0:s,s!==0&&s!==l.retryLane&&(l.retryLane=s,It(e,s),pt(r,e,s,-1))}return Ao(),r=Ri(Error(b(421))),el(e,t,a,r)}return s.data==="$?"?(t.flags|=128,t.child=e.child,t=Rm.bind(null,e),s._reactRetry=t,null):(e=l.treeContext,We=an(s.nextSibling),qe=t,ae=!0,dt=null,e!==null&&(et[tt++]=Mt,et[tt++]=Rt,et[tt++]=Ln,Mt=e.id,Rt=e.overflow,Ln=t),t=Oo(t,r.children),t.flags|=4096,t)}function Ju(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),pa(e.return,t,n)}function Oi(e,t,n,r,s){var l=e.memoizedState;l===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:s}:(l.isBackwards=t,l.rendering=null,l.renderingStartTime=0,l.last=r,l.tail=n,l.tailMode=s)}function Cf(e,t,n){var r=t.pendingProps,s=r.revealOrder,l=r.tail;if(Oe(e,t,r.children,n),r=oe.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Ju(e,n,t);else if(e.tag===19)Ju(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}r&=1}if(re(oe,r),!(t.mode&1))t.memoizedState=null;else switch(s){case"forwards":for(n=t.child,s=null;n!==null;)e=n.alternate,e!==null&&Fl(e)===null&&(s=n),n=n.sibling;n=s,n===null?(s=t.child,t.child=null):(s=n.sibling,n.sibling=null),Oi(t,!1,s,n,l);break;case"backwards":for(n=null,s=t.child,t.child=null;s!==null;){if(e=s.alternate,e!==null&&Fl(e)===null){t.child=s;break}e=s.sibling,s.sibling=n,n=s,s=e}Oi(t,!0,n,null,l);break;case"together":Oi(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function hl(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Dt(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Dn|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(b(153));if(t.child!==null){for(e=t.child,n=dn(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=dn(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function wm(e,t,n){switch(t.tag){case 3:Sf(t),Nr();break;case 5:Xd(t);break;case 1:Be(t.type)&&_l(t);break;case 4:Co(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,s=t.memoizedProps.value;re(Rl,r._currentValue),r._currentValue=s;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(re(oe,oe.current&1),t.flags|=128,null):n&t.child.childLanes?Nf(e,t,n):(re(oe,oe.current&1),e=Dt(e,t,n),e!==null?e.sibling:null);re(oe,oe.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return Cf(e,t,n);t.flags|=128}if(s=t.memoizedState,s!==null&&(s.rendering=null,s.tail=null,s.lastEffect=null),re(oe,oe.current),r)break;return null;case 22:case 23:return t.lanes=0,kf(e,t,n)}return Dt(e,t,n)}var Ef,ja,Pf,bf;Ef=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};ja=function(){};Pf=function(e,t,n,r){var s=e.memoizedProps;if(s!==r){e=t.stateNode,jn(St.current);var l=null;switch(n){case"input":s=Hi(e,s),r=Hi(e,r),l=[];break;case"select":s=ce({},s,{value:void 0}),r=ce({},r,{value:void 0}),l=[];break;case"textarea":s=Wi(e,s),r=Wi(e,r),l=[];break;default:typeof s.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=Pl)}Gi(n,r);var a;n=null;for(d in s)if(!r.hasOwnProperty(d)&&s.hasOwnProperty(d)&&s[d]!=null)if(d==="style"){var o=s[d];for(a in o)o.hasOwnProperty(a)&&(n||(n={}),n[a]="")}else d!=="dangerouslySetInnerHTML"&&d!=="children"&&d!=="suppressContentEditableWarning"&&d!=="suppressHydrationWarning"&&d!=="autoFocus"&&(ds.hasOwnProperty(d)?l||(l=[]):(l=l||[]).push(d,null));for(d in r){var u=r[d];if(o=s!=null?s[d]:void 0,r.hasOwnProperty(d)&&u!==o&&(u!=null||o!=null))if(d==="style")if(o){for(a in o)!o.hasOwnProperty(a)||u&&u.hasOwnProperty(a)||(n||(n={}),n[a]="");for(a in u)u.hasOwnProperty(a)&&o[a]!==u[a]&&(n||(n={}),n[a]=u[a])}else n||(l||(l=[]),l.push(d,n)),n=u;else d==="dangerouslySetInnerHTML"?(u=u?u.__html:void 0,o=o?o.__html:void 0,u!=null&&o!==u&&(l=l||[]).push(d,u)):d==="children"?typeof u!="string"&&typeof u!="number"||(l=l||[]).push(d,""+u):d!=="suppressContentEditableWarning"&&d!=="suppressHydrationWarning"&&(ds.hasOwnProperty(d)?(u!=null&&d==="onScroll"&&le("scroll",e),l||o===u||(l=[])):(l=l||[]).push(d,u))}n&&(l=l||[]).push("style",n);var d=l;(t.updateQueue=d)&&(t.flags|=4)}};bf=function(e,t,n,r){n!==r&&(t.flags|=4)};function Gr(e,t){if(!ae)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function be(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var s=e.child;s!==null;)n|=s.lanes|s.childLanes,r|=s.subtreeFlags&14680064,r|=s.flags&14680064,s.return=e,s=s.sibling;else for(s=e.child;s!==null;)n|=s.lanes|s.childLanes,r|=s.subtreeFlags,r|=s.flags,s.return=e,s=s.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function km(e,t,n){var r=t.pendingProps;switch(vo(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return be(t),null;case 1:return Be(t.type)&&bl(),be(t),null;case 3:return r=t.stateNode,Er(),ie(Qe),ie(Me),Po(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(Js(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,dt!==null&&(Ta(dt),dt=null))),ja(e,t),be(t),null;case 5:Eo(t);var s=jn(Ss.current);if(n=t.type,e!==null&&t.stateNode!=null)Pf(e,t,n,r,s),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(b(166));return be(t),null}if(e=jn(St.current),Js(t)){r=t.stateNode,n=t.type;var l=t.memoizedProps;switch(r[kt]=t,r[ks]=l,e=(t.mode&1)!==0,n){case"dialog":le("cancel",r),le("close",r);break;case"iframe":case"object":case"embed":le("load",r);break;case"video":case"audio":for(s=0;s<es.length;s++)le(es[s],r);break;case"source":le("error",r);break;case"img":case"image":case"link":le("error",r),le("load",r);break;case"details":le("toggle",r);break;case"input":au(r,l),le("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!l.multiple},le("invalid",r);break;case"textarea":uu(r,l),le("invalid",r)}Gi(n,l),s=null;for(var a in l)if(l.hasOwnProperty(a)){var o=l[a];a==="children"?typeof o=="string"?r.textContent!==o&&(l.suppressHydrationWarning!==!0&&Ys(r.textContent,o,e),s=["children",o]):typeof o=="number"&&r.textContent!==""+o&&(l.suppressHydrationWarning!==!0&&Ys(r.textContent,o,e),s=["children",""+o]):ds.hasOwnProperty(a)&&o!=null&&a==="onScroll"&&le("scroll",r)}switch(n){case"input":Bs(r),ou(r,l,!0);break;case"textarea":Bs(r),cu(r);break;case"select":case"option":break;default:typeof l.onClick=="function"&&(r.onclick=Pl)}r=s,t.updateQueue=r,r!==null&&(t.flags|=4)}else{a=s.nodeType===9?s:s.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=td(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=a.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=a.createElement(n,{is:r.is}):(e=a.createElement(n),n==="select"&&(a=e,r.multiple?a.multiple=!0:r.size&&(a.size=r.size))):e=a.createElementNS(e,n),e[kt]=t,e[ks]=r,Ef(e,t,!1,!1),t.stateNode=e;e:{switch(a=Xi(n,r),n){case"dialog":le("cancel",e),le("close",e),s=r;break;case"iframe":case"object":case"embed":le("load",e),s=r;break;case"video":case"audio":for(s=0;s<es.length;s++)le(es[s],e);s=r;break;case"source":le("error",e),s=r;break;case"img":case"image":case"link":le("error",e),le("load",e),s=r;break;case"details":le("toggle",e),s=r;break;case"input":au(e,r),s=Hi(e,r),le("invalid",e);break;case"option":s=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},s=ce({},r,{value:void 0}),le("invalid",e);break;case"textarea":uu(e,r),s=Wi(e,r),le("invalid",e);break;default:s=r}Gi(n,s),o=s;for(l in o)if(o.hasOwnProperty(l)){var u=o[l];l==="style"?sd(e,u):l==="dangerouslySetInnerHTML"?(u=u?u.__html:void 0,u!=null&&nd(e,u)):l==="children"?typeof u=="string"?(n!=="textarea"||u!=="")&&fs(e,u):typeof u=="number"&&fs(e,""+u):l!=="suppressContentEditableWarning"&&l!=="suppressHydrationWarning"&&l!=="autoFocus"&&(ds.hasOwnProperty(l)?u!=null&&l==="onScroll"&&le("scroll",e):u!=null&&no(e,l,u,a))}switch(n){case"input":Bs(e),ou(e,r,!1);break;case"textarea":Bs(e),cu(e);break;case"option":r.value!=null&&e.setAttribute("value",""+hn(r.value));break;case"select":e.multiple=!!r.multiple,l=r.value,l!=null?sr(e,!!r.multiple,l,!1):r.defaultValue!=null&&sr(e,!!r.multiple,r.defaultValue,!0);break;default:typeof s.onClick=="function"&&(e.onclick=Pl)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return be(t),null;case 6:if(e&&t.stateNode!=null)bf(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(b(166));if(n=jn(Ss.current),jn(St.current),Js(t)){if(r=t.stateNode,n=t.memoizedProps,r[kt]=t,(l=r.nodeValue!==n)&&(e=qe,e!==null))switch(e.tag){case 3:Ys(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Ys(r.nodeValue,n,(e.mode&1)!==0)}l&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[kt]=t,t.stateNode=r}return be(t),null;case 13:if(ie(oe),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(ae&&We!==null&&t.mode&1&&!(t.flags&128))Kd(),Nr(),t.flags|=98560,l=!1;else if(l=Js(t),r!==null&&r.dehydrated!==null){if(e===null){if(!l)throw Error(b(318));if(l=t.memoizedState,l=l!==null?l.dehydrated:null,!l)throw Error(b(317));l[kt]=t}else Nr(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;be(t),l=!1}else dt!==null&&(Ta(dt),dt=null),l=!0;if(!l)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||oe.current&1?ge===0&&(ge=3):Ao())),t.updateQueue!==null&&(t.flags|=4),be(t),null);case 4:return Er(),ja(e,t),e===null&&gs(t.stateNode.containerInfo),be(t),null;case 10:return jo(t.type._context),be(t),null;case 17:return Be(t.type)&&bl(),be(t),null;case 19:if(ie(oe),l=t.memoizedState,l===null)return be(t),null;if(r=(t.flags&128)!==0,a=l.rendering,a===null)if(r)Gr(l,!1);else{if(ge!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(a=Fl(e),a!==null){for(t.flags|=128,Gr(l,!1),r=a.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)l=n,e=r,l.flags&=14680066,a=l.alternate,a===null?(l.childLanes=0,l.lanes=e,l.child=null,l.subtreeFlags=0,l.memoizedProps=null,l.memoizedState=null,l.updateQueue=null,l.dependencies=null,l.stateNode=null):(l.childLanes=a.childLanes,l.lanes=a.lanes,l.child=a.child,l.subtreeFlags=0,l.deletions=null,l.memoizedProps=a.memoizedProps,l.memoizedState=a.memoizedState,l.updateQueue=a.updateQueue,l.type=a.type,e=a.dependencies,l.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return re(oe,oe.current&1|2),t.child}e=e.sibling}l.tail!==null&&he()>br&&(t.flags|=128,r=!0,Gr(l,!1),t.lanes=4194304)}else{if(!r)if(e=Fl(a),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Gr(l,!0),l.tail===null&&l.tailMode==="hidden"&&!a.alternate&&!ae)return be(t),null}else 2*he()-l.renderingStartTime>br&&n!==1073741824&&(t.flags|=128,r=!0,Gr(l,!1),t.lanes=4194304);l.isBackwards?(a.sibling=t.child,t.child=a):(n=l.last,n!==null?n.sibling=a:t.child=a,l.last=a)}return l.tail!==null?(t=l.tail,l.rendering=t,l.tail=t.sibling,l.renderingStartTime=he(),t.sibling=null,n=oe.current,re(oe,r?n&1|2:n&1),t):(be(t),null);case 22:case 23:return Do(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Ve&1073741824&&(be(t),t.subtreeFlags&6&&(t.flags|=8192)):be(t),null;case 24:return null;case 25:return null}throw Error(b(156,t.tag))}function jm(e,t){switch(vo(t),t.tag){case 1:return Be(t.type)&&bl(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Er(),ie(Qe),ie(Me),Po(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Eo(t),null;case 13:if(ie(oe),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(b(340));Nr()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ie(oe),null;case 4:return Er(),null;case 10:return jo(t.type._context),null;case 22:case 23:return Do(),null;case 24:return null;default:return null}}var tl=!1,Te=!1,Sm=typeof WeakSet=="function"?WeakSet:Set,F=null;function nr(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){fe(e,t,r)}else n.current=null}function Sa(e,t,n){try{n()}catch(r){fe(e,t,r)}}var Zu=!1;function Nm(e,t){if(ia=Nl,e=Rd(),yo(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var s=r.anchorOffset,l=r.focusNode;r=r.focusOffset;try{n.nodeType,l.nodeType}catch{n=null;break e}var a=0,o=-1,u=-1,d=0,y=0,m=e,x=null;t:for(;;){for(var g;m!==n||s!==0&&m.nodeType!==3||(o=a+s),m!==l||r!==0&&m.nodeType!==3||(u=a+r),m.nodeType===3&&(a+=m.nodeValue.length),(g=m.firstChild)!==null;)x=m,m=g;for(;;){if(m===e)break t;if(x===n&&++d===s&&(o=a),x===l&&++y===r&&(u=a),(g=m.nextSibling)!==null)break;m=x,x=m.parentNode}m=g}n=o===-1||u===-1?null:{start:o,end:u}}else n=null}n=n||{start:0,end:0}}else n=null;for(aa={focusedElem:e,selectionRange:n},Nl=!1,F=t;F!==null;)if(t=F,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,F=e;else for(;F!==null;){t=F;try{var w=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(w!==null){var j=w.memoizedProps,_=w.memoizedState,c=t.stateNode,f=c.getSnapshotBeforeUpdate(t.elementType===t.type?j:at(t.type,j),_);c.__reactInternalSnapshotBeforeUpdate=f}break;case 3:var p=t.stateNode.containerInfo;p.nodeType===1?p.textContent="":p.nodeType===9&&p.documentElement&&p.removeChild(p.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(b(163))}}catch(v){fe(t,t.return,v)}if(e=t.sibling,e!==null){e.return=t.return,F=e;break}F=t.return}return w=Zu,Zu=!1,w}function os(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var s=r=r.next;do{if((s.tag&e)===e){var l=s.destroy;s.destroy=void 0,l!==void 0&&Sa(t,n,l)}s=s.next}while(s!==r)}}function ti(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function Na(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function _f(e){var t=e.alternate;t!==null&&(e.alternate=null,_f(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[kt],delete t[ks],delete t[ca],delete t[im],delete t[am])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Tf(e){return e.tag===5||e.tag===3||e.tag===4}function ec(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Tf(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.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 Ca(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Pl));else if(r!==4&&(e=e.child,e!==null))for(Ca(e,t,n),e=e.sibling;e!==null;)Ca(e,t,n),e=e.sibling}function Ea(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(Ea(e,t,n),e=e.sibling;e!==null;)Ea(e,t,n),e=e.sibling}var Ne=null,ct=!1;function $t(e,t,n){for(n=n.child;n!==null;)Mf(e,t,n),n=n.sibling}function Mf(e,t,n){if(jt&&typeof jt.onCommitFiberUnmount=="function")try{jt.onCommitFiberUnmount(Wl,n)}catch{}switch(n.tag){case 5:Te||nr(n,t);case 6:var r=Ne,s=ct;Ne=null,$t(e,t,n),Ne=r,ct=s,Ne!==null&&(ct?(e=Ne,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Ne.removeChild(n.stateNode));break;case 18:Ne!==null&&(ct?(e=Ne,n=n.stateNode,e.nodeType===8?Ei(e.parentNode,n):e.nodeType===1&&Ei(e,n),ys(e)):Ei(Ne,n.stateNode));break;case 4:r=Ne,s=ct,Ne=n.stateNode.containerInfo,ct=!0,$t(e,t,n),Ne=r,ct=s;break;case 0:case 11:case 14:case 15:if(!Te&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){s=r=r.next;do{var l=s,a=l.destroy;l=l.tag,a!==void 0&&(l&2||l&4)&&Sa(n,t,a),s=s.next}while(s!==r)}$t(e,t,n);break;case 1:if(!Te&&(nr(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(o){fe(n,t,o)}$t(e,t,n);break;case 21:$t(e,t,n);break;case 22:n.mode&1?(Te=(r=Te)||n.memoizedState!==null,$t(e,t,n),Te=r):$t(e,t,n);break;default:$t(e,t,n)}}function tc(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new Sm),t.forEach(function(r){var s=Om.bind(null,e,r);n.has(r)||(n.add(r),r.then(s,s))})}}function it(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var s=n[r];try{var l=e,a=t,o=a;e:for(;o!==null;){switch(o.tag){case 5:Ne=o.stateNode,ct=!1;break e;case 3:Ne=o.stateNode.containerInfo,ct=!0;break e;case 4:Ne=o.stateNode.containerInfo,ct=!0;break e}o=o.return}if(Ne===null)throw Error(b(160));Mf(l,a,s),Ne=null,ct=!1;var u=s.alternate;u!==null&&(u.return=null),s.return=null}catch(d){fe(s,t,d)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Rf(t,e),t=t.sibling}function Rf(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(it(t,e),yt(e),r&4){try{os(3,e,e.return),ti(3,e)}catch(j){fe(e,e.return,j)}try{os(5,e,e.return)}catch(j){fe(e,e.return,j)}}break;case 1:it(t,e),yt(e),r&512&&n!==null&&nr(n,n.return);break;case 5:if(it(t,e),yt(e),r&512&&n!==null&&nr(n,n.return),e.flags&32){var s=e.stateNode;try{fs(s,"")}catch(j){fe(e,e.return,j)}}if(r&4&&(s=e.stateNode,s!=null)){var l=e.memoizedProps,a=n!==null?n.memoizedProps:l,o=e.type,u=e.updateQueue;if(e.updateQueue=null,u!==null)try{o==="input"&&l.type==="radio"&&l.name!=null&&Zc(s,l),Xi(o,a);var d=Xi(o,l);for(a=0;a<u.length;a+=2){var y=u[a],m=u[a+1];y==="style"?sd(s,m):y==="dangerouslySetInnerHTML"?nd(s,m):y==="children"?fs(s,m):no(s,y,m,d)}switch(o){case"input":Ki(s,l);break;case"textarea":ed(s,l);break;case"select":var x=s._wrapperState.wasMultiple;s._wrapperState.wasMultiple=!!l.multiple;var g=l.value;g!=null?sr(s,!!l.multiple,g,!1):x!==!!l.multiple&&(l.defaultValue!=null?sr(s,!!l.multiple,l.defaultValue,!0):sr(s,!!l.multiple,l.multiple?[]:"",!1))}s[ks]=l}catch(j){fe(e,e.return,j)}}break;case 6:if(it(t,e),yt(e),r&4){if(e.stateNode===null)throw Error(b(162));s=e.stateNode,l=e.memoizedProps;try{s.nodeValue=l}catch(j){fe(e,e.return,j)}}break;case 3:if(it(t,e),yt(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{ys(t.containerInfo)}catch(j){fe(e,e.return,j)}break;case 4:it(t,e),yt(e);break;case 13:it(t,e),yt(e),s=e.child,s.flags&8192&&(l=s.memoizedState!==null,s.stateNode.isHidden=l,!l||s.alternate!==null&&s.alternate.memoizedState!==null||(Lo=he())),r&4&&tc(e);break;case 22:if(y=n!==null&&n.memoizedState!==null,e.mode&1?(Te=(d=Te)||y,it(t,e),Te=d):it(t,e),yt(e),r&8192){if(d=e.memoizedState!==null,(e.stateNode.isHidden=d)&&!y&&e.mode&1)for(F=e,y=e.child;y!==null;){for(m=F=y;F!==null;){switch(x=F,g=x.child,x.tag){case 0:case 11:case 14:case 15:os(4,x,x.return);break;case 1:nr(x,x.return);var w=x.stateNode;if(typeof w.componentWillUnmount=="function"){r=x,n=x.return;try{t=r,w.props=t.memoizedProps,w.state=t.memoizedState,w.componentWillUnmount()}catch(j){fe(r,n,j)}}break;case 5:nr(x,x.return);break;case 22:if(x.memoizedState!==null){rc(m);continue}}g!==null?(g.return=x,F=g):rc(m)}y=y.sibling}e:for(y=null,m=e;;){if(m.tag===5){if(y===null){y=m;try{s=m.stateNode,d?(l=s.style,typeof l.setProperty=="function"?l.setProperty("display","none","important"):l.display="none"):(o=m.stateNode,u=m.memoizedProps.style,a=u!=null&&u.hasOwnProperty("display")?u.display:null,o.style.display=rd("display",a))}catch(j){fe(e,e.return,j)}}}else if(m.tag===6){if(y===null)try{m.stateNode.nodeValue=d?"":m.memoizedProps}catch(j){fe(e,e.return,j)}}else if((m.tag!==22&&m.tag!==23||m.memoizedState===null||m===e)&&m.child!==null){m.child.return=m,m=m.child;continue}if(m===e)break e;for(;m.sibling===null;){if(m.return===null||m.return===e)break e;y===m&&(y=null),m=m.return}y===m&&(y=null),m.sibling.return=m.return,m=m.sibling}}break;case 19:it(t,e),yt(e),r&4&&tc(e);break;case 21:break;default:it(t,e),yt(e)}}function yt(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(Tf(n)){var r=n;break e}n=n.return}throw Error(b(160))}switch(r.tag){case 5:var s=r.stateNode;r.flags&32&&(fs(s,""),r.flags&=-33);var l=ec(e);Ea(e,l,s);break;case 3:case 4:var a=r.stateNode.containerInfo,o=ec(e);Ca(e,o,a);break;default:throw Error(b(161))}}catch(u){fe(e,e.return,u)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Cm(e,t,n){F=e,Of(e)}function Of(e,t,n){for(var r=(e.mode&1)!==0;F!==null;){var s=F,l=s.child;if(s.tag===22&&r){var a=s.memoizedState!==null||tl;if(!a){var o=s.alternate,u=o!==null&&o.memoizedState!==null||Te;o=tl;var d=Te;if(tl=a,(Te=u)&&!d)for(F=s;F!==null;)a=F,u=a.child,a.tag===22&&a.memoizedState!==null?sc(s):u!==null?(u.return=a,F=u):sc(s);for(;l!==null;)F=l,Of(l),l=l.sibling;F=s,tl=o,Te=d}nc(e)}else s.subtreeFlags&8772&&l!==null?(l.return=s,F=l):nc(e)}}function nc(e){for(;F!==null;){var t=F;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:Te||ti(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!Te)if(n===null)r.componentDidMount();else{var s=t.elementType===t.type?n.memoizedProps:at(t.type,n.memoizedProps);r.componentDidUpdate(s,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var l=t.updateQueue;l!==null&&$u(t,l,r);break;case 3:var a=t.updateQueue;if(a!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}$u(t,a,n)}break;case 5:var o=t.stateNode;if(n===null&&t.flags&4){n=o;var u=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":u.autoFocus&&n.focus();break;case"img":u.src&&(n.src=u.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var d=t.alternate;if(d!==null){var y=d.memoizedState;if(y!==null){var m=y.dehydrated;m!==null&&ys(m)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(b(163))}Te||t.flags&512&&Na(t)}catch(x){fe(t,t.return,x)}}if(t===e){F=null;break}if(n=t.sibling,n!==null){n.return=t.return,F=n;break}F=t.return}}function rc(e){for(;F!==null;){var t=F;if(t===e){F=null;break}var n=t.sibling;if(n!==null){n.return=t.return,F=n;break}F=t.return}}function sc(e){for(;F!==null;){var t=F;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{ti(4,t)}catch(u){fe(t,n,u)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var s=t.return;try{r.componentDidMount()}catch(u){fe(t,s,u)}}var l=t.return;try{Na(t)}catch(u){fe(t,l,u)}break;case 5:var a=t.return;try{Na(t)}catch(u){fe(t,a,u)}}}catch(u){fe(t,t.return,u)}if(t===e){F=null;break}var o=t.sibling;if(o!==null){o.return=t.return,F=o;break}F=t.return}}var Em=Math.ceil,Dl=At.ReactCurrentDispatcher,zo=At.ReactCurrentOwner,rt=At.ReactCurrentBatchConfig,X=0,je=null,me=null,Ce=0,Ve=0,rr=yn(0),ge=0,Ps=null,Dn=0,ni=0,Fo=0,us=null,$e=null,Lo=0,br=1/0,Ct=null,Al=!1,Pa=null,un=null,nl=!1,nn=null,$l=0,cs=0,ba=null,pl=-1,ml=0;function Fe(){return X&6?he():pl!==-1?pl:pl=he()}function cn(e){return e.mode&1?X&2&&Ce!==0?Ce&-Ce:um.transition!==null?(ml===0&&(ml=yd()),ml):(e=ee,e!==0||(e=window.event,e=e===void 0?16:Sd(e.type)),e):1}function pt(e,t,n,r){if(50<cs)throw cs=0,ba=null,Error(b(185));Ls(e,n,r),(!(X&2)||e!==je)&&(e===je&&(!(X&2)&&(ni|=n),ge===4&&Kt(e,Ce)),He(e,r),n===1&&X===0&&!(t.mode&1)&&(br=he()+500,Jl&&xn()))}function He(e,t){var n=e.callbackNode;up(e,t);var r=Sl(e,e===je?Ce:0);if(r===0)n!==null&&hu(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&hu(n),t===1)e.tag===0?om(lc.bind(null,e)):Qd(lc.bind(null,e)),sm(function(){!(X&6)&&xn()}),n=null;else{switch(xd(r)){case 1:n=ao;break;case 4:n=pd;break;case 16:n=jl;break;case 536870912:n=md;break;default:n=jl}n=Uf(n,zf.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function zf(e,t){if(pl=-1,ml=0,X&6)throw Error(b(327));var n=e.callbackNode;if(ur()&&e.callbackNode!==n)return null;var r=Sl(e,e===je?Ce:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=Ul(e,r);else{t=r;var s=X;X|=2;var l=Lf();(je!==e||Ce!==t)&&(Ct=null,br=he()+500,On(e,t));do try{_m();break}catch(o){Ff(e,o)}while(!0);ko(),Dl.current=l,X=s,me!==null?t=0:(je=null,Ce=0,t=ge)}if(t!==0){if(t===2&&(s=ta(e),s!==0&&(r=s,t=_a(e,s))),t===1)throw n=Ps,On(e,0),Kt(e,r),He(e,he()),n;if(t===6)Kt(e,r);else{if(s=e.current.alternate,!(r&30)&&!Pm(s)&&(t=Ul(e,r),t===2&&(l=ta(e),l!==0&&(r=l,t=_a(e,l))),t===1))throw n=Ps,On(e,0),Kt(e,r),He(e,he()),n;switch(e.finishedWork=s,e.finishedLanes=r,t){case 0:case 1:throw Error(b(345));case 2:gn(e,$e,Ct);break;case 3:if(Kt(e,r),(r&130023424)===r&&(t=Lo+500-he(),10<t)){if(Sl(e,0)!==0)break;if(s=e.suspendedLanes,(s&r)!==r){Fe(),e.pingedLanes|=e.suspendedLanes&s;break}e.timeoutHandle=ua(gn.bind(null,e,$e,Ct),t);break}gn(e,$e,Ct);break;case 4:if(Kt(e,r),(r&4194240)===r)break;for(t=e.eventTimes,s=-1;0<r;){var a=31-ht(r);l=1<<a,a=t[a],a>s&&(s=a),r&=~l}if(r=s,r=he()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Em(r/1960))-r,10<r){e.timeoutHandle=ua(gn.bind(null,e,$e,Ct),r);break}gn(e,$e,Ct);break;case 5:gn(e,$e,Ct);break;default:throw Error(b(329))}}}return He(e,he()),e.callbackNode===n?zf.bind(null,e):null}function _a(e,t){var n=us;return e.current.memoizedState.isDehydrated&&(On(e,t).flags|=256),e=Ul(e,t),e!==2&&(t=$e,$e=n,t!==null&&Ta(t)),e}function Ta(e){$e===null?$e=e:$e.push.apply($e,e)}function Pm(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var s=n[r],l=s.getSnapshot;s=s.value;try{if(!mt(l(),s))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 Kt(e,t){for(t&=~Fo,t&=~ni,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-ht(t),r=1<<n;e[n]=-1,t&=~r}}function lc(e){if(X&6)throw Error(b(327));ur();var t=Sl(e,0);if(!(t&1))return He(e,he()),null;var n=Ul(e,t);if(e.tag!==0&&n===2){var r=ta(e);r!==0&&(t=r,n=_a(e,r))}if(n===1)throw n=Ps,On(e,0),Kt(e,t),He(e,he()),n;if(n===6)throw Error(b(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,gn(e,$e,Ct),He(e,he()),null}function Io(e,t){var n=X;X|=1;try{return e(t)}finally{X=n,X===0&&(br=he()+500,Jl&&xn())}}function An(e){nn!==null&&nn.tag===0&&!(X&6)&&ur();var t=X;X|=1;var n=rt.transition,r=ee;try{if(rt.transition=null,ee=1,e)return e()}finally{ee=r,rt.transition=n,X=t,!(X&6)&&xn()}}function Do(){Ve=rr.current,ie(rr)}function On(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,rm(n)),me!==null)for(n=me.return;n!==null;){var r=n;switch(vo(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&bl();break;case 3:Er(),ie(Qe),ie(Me),Po();break;case 5:Eo(r);break;case 4:Er();break;case 13:ie(oe);break;case 19:ie(oe);break;case 10:jo(r.type._context);break;case 22:case 23:Do()}n=n.return}if(je=e,me=e=dn(e.current,null),Ce=Ve=t,ge=0,Ps=null,Fo=ni=Dn=0,$e=us=null,kn!==null){for(t=0;t<kn.length;t++)if(n=kn[t],r=n.interleaved,r!==null){n.interleaved=null;var s=r.next,l=n.pending;if(l!==null){var a=l.next;l.next=s,r.next=a}n.pending=r}kn=null}return e}function Ff(e,t){do{var n=me;try{if(ko(),dl.current=Il,Ll){for(var r=ue.memoizedState;r!==null;){var s=r.queue;s!==null&&(s.pending=null),r=r.next}Ll=!1}if(In=0,ke=xe=ue=null,as=!1,Ns=0,zo.current=null,n===null||n.return===null){ge=1,Ps=t,me=null;break}e:{var l=e,a=n.return,o=n,u=t;if(t=Ce,o.flags|=32768,u!==null&&typeof u=="object"&&typeof u.then=="function"){var d=u,y=o,m=y.tag;if(!(y.mode&1)&&(m===0||m===11||m===15)){var x=y.alternate;x?(y.updateQueue=x.updateQueue,y.memoizedState=x.memoizedState,y.lanes=x.lanes):(y.updateQueue=null,y.memoizedState=null)}var g=Vu(a);if(g!==null){g.flags&=-257,Wu(g,a,o,l,t),g.mode&1&&Ku(l,d,t),t=g,u=d;var w=t.updateQueue;if(w===null){var j=new Set;j.add(u),t.updateQueue=j}else w.add(u);break e}else{if(!(t&1)){Ku(l,d,t),Ao();break e}u=Error(b(426))}}else if(ae&&o.mode&1){var _=Vu(a);if(_!==null){!(_.flags&65536)&&(_.flags|=256),Wu(_,a,o,l,t),go(Pr(u,o));break e}}l=u=Pr(u,o),ge!==4&&(ge=2),us===null?us=[l]:us.push(l),l=a;do{switch(l.tag){case 3:l.flags|=65536,t&=-t,l.lanes|=t;var c=vf(l,u,t);Au(l,c);break e;case 1:o=u;var f=l.type,p=l.stateNode;if(!(l.flags&128)&&(typeof f.getDerivedStateFromError=="function"||p!==null&&typeof p.componentDidCatch=="function"&&(un===null||!un.has(p)))){l.flags|=65536,t&=-t,l.lanes|=t;var v=gf(l,o,t);Au(l,v);break e}}l=l.return}while(l!==null)}Df(n)}catch(E){t=E,me===n&&n!==null&&(me=n=n.return);continue}break}while(!0)}function Lf(){var e=Dl.current;return Dl.current=Il,e===null?Il:e}function Ao(){(ge===0||ge===3||ge===2)&&(ge=4),je===null||!(Dn&268435455)&&!(ni&268435455)||Kt(je,Ce)}function Ul(e,t){var n=X;X|=2;var r=Lf();(je!==e||Ce!==t)&&(Ct=null,On(e,t));do try{bm();break}catch(s){Ff(e,s)}while(!0);if(ko(),X=n,Dl.current=r,me!==null)throw Error(b(261));return je=null,Ce=0,ge}function bm(){for(;me!==null;)If(me)}function _m(){for(;me!==null&&!ep();)If(me)}function If(e){var t=$f(e.alternate,e,Ve);e.memoizedProps=e.pendingProps,t===null?Df(e):me=t,zo.current=null}function Df(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=jm(n,t),n!==null){n.flags&=32767,me=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{ge=6,me=null;return}}else if(n=km(n,t,Ve),n!==null){me=n;return}if(t=t.sibling,t!==null){me=t;return}me=t=e}while(t!==null);ge===0&&(ge=5)}function gn(e,t,n){var r=ee,s=rt.transition;try{rt.transition=null,ee=1,Tm(e,t,n,r)}finally{rt.transition=s,ee=r}return null}function Tm(e,t,n,r){do ur();while(nn!==null);if(X&6)throw Error(b(327));n=e.finishedWork;var s=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(b(177));e.callbackNode=null,e.callbackPriority=0;var l=n.lanes|n.childLanes;if(cp(e,l),e===je&&(me=je=null,Ce=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||nl||(nl=!0,Uf(jl,function(){return ur(),null})),l=(n.flags&15990)!==0,n.subtreeFlags&15990||l){l=rt.transition,rt.transition=null;var a=ee;ee=1;var o=X;X|=4,zo.current=null,Nm(e,n),Rf(n,e),Xp(aa),Nl=!!ia,aa=ia=null,e.current=n,Cm(n),tp(),X=o,ee=a,rt.transition=l}else e.current=n;if(nl&&(nl=!1,nn=e,$l=s),l=e.pendingLanes,l===0&&(un=null),sp(n.stateNode),He(e,he()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)s=t[n],r(s.value,{componentStack:s.stack,digest:s.digest});if(Al)throw Al=!1,e=Pa,Pa=null,e;return $l&1&&e.tag!==0&&ur(),l=e.pendingLanes,l&1?e===ba?cs++:(cs=0,ba=e):cs=0,xn(),null}function ur(){if(nn!==null){var e=xd($l),t=rt.transition,n=ee;try{if(rt.transition=null,ee=16>e?16:e,nn===null)var r=!1;else{if(e=nn,nn=null,$l=0,X&6)throw Error(b(331));var s=X;for(X|=4,F=e.current;F!==null;){var l=F,a=l.child;if(F.flags&16){var o=l.deletions;if(o!==null){for(var u=0;u<o.length;u++){var d=o[u];for(F=d;F!==null;){var y=F;switch(y.tag){case 0:case 11:case 15:os(8,y,l)}var m=y.child;if(m!==null)m.return=y,F=m;else for(;F!==null;){y=F;var x=y.sibling,g=y.return;if(_f(y),y===d){F=null;break}if(x!==null){x.return=g,F=x;break}F=g}}}var w=l.alternate;if(w!==null){var j=w.child;if(j!==null){w.child=null;do{var _=j.sibling;j.sibling=null,j=_}while(j!==null)}}F=l}}if(l.subtreeFlags&2064&&a!==null)a.return=l,F=a;else e:for(;F!==null;){if(l=F,l.flags&2048)switch(l.tag){case 0:case 11:case 15:os(9,l,l.return)}var c=l.sibling;if(c!==null){c.return=l.return,F=c;break e}F=l.return}}var f=e.current;for(F=f;F!==null;){a=F;var p=a.child;if(a.subtreeFlags&2064&&p!==null)p.return=a,F=p;else e:for(a=f;F!==null;){if(o=F,o.flags&2048)try{switch(o.tag){case 0:case 11:case 15:ti(9,o)}}catch(E){fe(o,o.return,E)}if(o===a){F=null;break e}var v=o.sibling;if(v!==null){v.return=o.return,F=v;break e}F=o.return}}if(X=s,xn(),jt&&typeof jt.onPostCommitFiberRoot=="function")try{jt.onPostCommitFiberRoot(Wl,e)}catch{}r=!0}return r}finally{ee=n,rt.transition=t}}return!1}function ic(e,t,n){t=Pr(n,t),t=vf(e,t,1),e=on(e,t,1),t=Fe(),e!==null&&(Ls(e,1,t),He(e,t))}function fe(e,t,n){if(e.tag===3)ic(e,e,n);else for(;t!==null;){if(t.tag===3){ic(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(un===null||!un.has(r))){e=Pr(n,e),e=gf(t,e,1),t=on(t,e,1),e=Fe(),t!==null&&(Ls(t,1,e),He(t,e));break}}t=t.return}}function Mm(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=Fe(),e.pingedLanes|=e.suspendedLanes&n,je===e&&(Ce&n)===n&&(ge===4||ge===3&&(Ce&130023424)===Ce&&500>he()-Lo?On(e,0):Fo|=n),He(e,t)}function Af(e,t){t===0&&(e.mode&1?(t=Vs,Vs<<=1,!(Vs&130023424)&&(Vs=4194304)):t=1);var n=Fe();e=It(e,t),e!==null&&(Ls(e,t,n),He(e,n))}function Rm(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Af(e,n)}function Om(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,s=e.memoizedState;s!==null&&(n=s.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(b(314))}r!==null&&r.delete(t),Af(e,n)}var $f;$f=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Qe.current)Ue=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Ue=!1,wm(e,t,n);Ue=!!(e.flags&131072)}else Ue=!1,ae&&t.flags&1048576&&Bd(t,Ml,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;hl(e,t),e=t.pendingProps;var s=Sr(t,Me.current);or(t,n),s=_o(null,t,r,e,s,n);var l=To();return t.flags|=1,typeof s=="object"&&s!==null&&typeof s.render=="function"&&s.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Be(r)?(l=!0,_l(t)):l=!1,t.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,No(t),s.updater=ei,t.stateNode=s,s._reactInternals=t,ya(t,r,e,n),t=ga(null,t,r,!0,l,n)):(t.tag=0,ae&&l&&xo(t),Oe(null,t,s,n),t=t.child),t;case 16:r=t.elementType;e:{switch(hl(e,t),e=t.pendingProps,s=r._init,r=s(r._payload),t.type=r,s=t.tag=Fm(r),e=at(r,e),s){case 0:t=va(null,t,r,e,n);break e;case 1:t=Xu(null,t,r,e,n);break e;case 11:t=qu(null,t,r,e,n);break e;case 14:t=Gu(null,t,r,at(r.type,e),n);break e}throw Error(b(306,r,""))}return t;case 0:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:at(r,s),va(e,t,r,s,n);case 1:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:at(r,s),Xu(e,t,r,s,n);case 3:e:{if(Sf(t),e===null)throw Error(b(387));r=t.pendingProps,l=t.memoizedState,s=l.element,Gd(e,t),zl(t,r,null,n);var a=t.memoizedState;if(r=a.element,l.isDehydrated)if(l={element:r,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},t.updateQueue.baseState=l,t.memoizedState=l,t.flags&256){s=Pr(Error(b(423)),t),t=Yu(e,t,r,n,s);break e}else if(r!==s){s=Pr(Error(b(424)),t),t=Yu(e,t,r,n,s);break e}else for(We=an(t.stateNode.containerInfo.firstChild),qe=t,ae=!0,dt=null,n=Wd(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Nr(),r===s){t=Dt(e,t,n);break e}Oe(e,t,r,n)}t=t.child}return t;case 5:return Xd(t),e===null&&ha(t),r=t.type,s=t.pendingProps,l=e!==null?e.memoizedProps:null,a=s.children,oa(r,s)?a=null:l!==null&&oa(r,l)&&(t.flags|=32),jf(e,t),Oe(e,t,a,n),t.child;case 6:return e===null&&ha(t),null;case 13:return Nf(e,t,n);case 4:return Co(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Cr(t,null,r,n):Oe(e,t,r,n),t.child;case 11:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:at(r,s),qu(e,t,r,s,n);case 7:return Oe(e,t,t.pendingProps,n),t.child;case 8:return Oe(e,t,t.pendingProps.children,n),t.child;case 12:return Oe(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,s=t.pendingProps,l=t.memoizedProps,a=s.value,re(Rl,r._currentValue),r._currentValue=a,l!==null)if(mt(l.value,a)){if(l.children===s.children&&!Qe.current){t=Dt(e,t,n);break e}}else for(l=t.child,l!==null&&(l.return=t);l!==null;){var o=l.dependencies;if(o!==null){a=l.child;for(var u=o.firstContext;u!==null;){if(u.context===r){if(l.tag===1){u=Ot(-1,n&-n),u.tag=2;var d=l.updateQueue;if(d!==null){d=d.shared;var y=d.pending;y===null?u.next=u:(u.next=y.next,y.next=u),d.pending=u}}l.lanes|=n,u=l.alternate,u!==null&&(u.lanes|=n),pa(l.return,n,t),o.lanes|=n;break}u=u.next}}else if(l.tag===10)a=l.type===t.type?null:l.child;else if(l.tag===18){if(a=l.return,a===null)throw Error(b(341));a.lanes|=n,o=a.alternate,o!==null&&(o.lanes|=n),pa(a,n,t),a=l.sibling}else a=l.child;if(a!==null)a.return=l;else for(a=l;a!==null;){if(a===t){a=null;break}if(l=a.sibling,l!==null){l.return=a.return,a=l;break}a=a.return}l=a}Oe(e,t,s.children,n),t=t.child}return t;case 9:return s=t.type,r=t.pendingProps.children,or(t,n),s=st(s),r=r(s),t.flags|=1,Oe(e,t,r,n),t.child;case 14:return r=t.type,s=at(r,t.pendingProps),s=at(r.type,s),Gu(e,t,r,s,n);case 15:return wf(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:at(r,s),hl(e,t),t.tag=1,Be(r)?(e=!0,_l(t)):e=!1,or(t,n),xf(t,r,s),ya(t,r,s,n),ga(null,t,r,!0,e,n);case 19:return Cf(e,t,n);case 22:return kf(e,t,n)}throw Error(b(156,t.tag))};function Uf(e,t){return hd(e,t)}function zm(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function nt(e,t,n,r){return new zm(e,t,n,r)}function $o(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Fm(e){if(typeof e=="function")return $o(e)?1:0;if(e!=null){if(e=e.$$typeof,e===so)return 11;if(e===lo)return 14}return 2}function dn(e,t){var n=e.alternate;return n===null?(n=nt(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&14680064,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}function yl(e,t,n,r,s,l){var a=2;if(r=e,typeof e=="function")$o(e)&&(a=1);else if(typeof e=="string")a=5;else e:switch(e){case Wn:return zn(n.children,s,l,t);case ro:a=8,s|=8;break;case $i:return e=nt(12,n,t,s|2),e.elementType=$i,e.lanes=l,e;case Ui:return e=nt(13,n,t,s),e.elementType=Ui,e.lanes=l,e;case Qi:return e=nt(19,n,t,s),e.elementType=Qi,e.lanes=l,e;case Xc:return ri(n,s,l,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case qc:a=10;break e;case Gc:a=9;break e;case so:a=11;break e;case lo:a=14;break e;case Qt:a=16,r=null;break e}throw Error(b(130,e==null?e:typeof e,""))}return t=nt(a,n,t,s),t.elementType=e,t.type=r,t.lanes=l,t}function zn(e,t,n,r){return e=nt(7,e,r,t),e.lanes=n,e}function ri(e,t,n,r){return e=nt(22,e,r,t),e.elementType=Xc,e.lanes=n,e.stateNode={isHidden:!1},e}function zi(e,t,n){return e=nt(6,e,null,t),e.lanes=n,e}function Fi(e,t,n){return t=nt(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Lm(e,t,n,r,s){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=mi(0),this.expirationTimes=mi(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=mi(0),this.identifierPrefix=r,this.onRecoverableError=s,this.mutableSourceEagerHydrationData=null}function Uo(e,t,n,r,s,l,a,o,u){return e=new Lm(e,t,n,o,u),t===1?(t=1,l===!0&&(t|=8)):t=0,l=nt(3,null,null,t),e.current=l,l.stateNode=e,l.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},No(l),e}function Im(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Vn,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function Qf(e){if(!e)return pn;e=e._reactInternals;e:{if(Hn(e)!==e||e.tag!==1)throw Error(b(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Be(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(b(171))}if(e.tag===1){var n=e.type;if(Be(n))return Ud(e,n,t)}return t}function Bf(e,t,n,r,s,l,a,o,u){return e=Uo(n,r,!0,e,s,l,a,o,u),e.context=Qf(null),n=e.current,r=Fe(),s=cn(n),l=Ot(r,s),l.callback=t??null,on(n,l,s),e.current.lanes=s,Ls(e,s,r),He(e,r),e}function si(e,t,n,r){var s=t.current,l=Fe(),a=cn(s);return n=Qf(n),t.context===null?t.context=n:t.pendingContext=n,t=Ot(l,a),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=on(s,t,a),e!==null&&(pt(e,s,a,l),cl(e,s,a)),a}function Ql(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function ac(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Qo(e,t){ac(e,t),(e=e.alternate)&&ac(e,t)}function Dm(){return null}var Hf=typeof reportError=="function"?reportError:function(e){console.error(e)};function Bo(e){this._internalRoot=e}li.prototype.render=Bo.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(b(409));si(e,t,null,null)};li.prototype.unmount=Bo.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;An(function(){si(null,e,null,null)}),t[Lt]=null}};function li(e){this._internalRoot=e}li.prototype.unstable_scheduleHydration=function(e){if(e){var t=wd();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Ht.length&&t!==0&&t<Ht[n].priority;n++);Ht.splice(n,0,e),n===0&&jd(e)}};function Ho(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function ii(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function oc(){}function Am(e,t,n,r,s){if(s){if(typeof r=="function"){var l=r;r=function(){var d=Ql(a);l.call(d)}}var a=Bf(t,r,e,0,null,!1,!1,"",oc);return e._reactRootContainer=a,e[Lt]=a.current,gs(e.nodeType===8?e.parentNode:e),An(),a}for(;s=e.lastChild;)e.removeChild(s);if(typeof r=="function"){var o=r;r=function(){var d=Ql(u);o.call(d)}}var u=Uo(e,0,!1,null,null,!1,!1,"",oc);return e._reactRootContainer=u,e[Lt]=u.current,gs(e.nodeType===8?e.parentNode:e),An(function(){si(t,u,n,r)}),u}function ai(e,t,n,r,s){var l=n._reactRootContainer;if(l){var a=l;if(typeof s=="function"){var o=s;s=function(){var u=Ql(a);o.call(u)}}si(t,a,e,s)}else a=Am(n,t,e,s,r);return Ql(a)}vd=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=Zr(t.pendingLanes);n!==0&&(oo(t,n|1),He(t,he()),!(X&6)&&(br=he()+500,xn()))}break;case 13:An(function(){var r=It(e,1);if(r!==null){var s=Fe();pt(r,e,1,s)}}),Qo(e,1)}};uo=function(e){if(e.tag===13){var t=It(e,134217728);if(t!==null){var n=Fe();pt(t,e,134217728,n)}Qo(e,134217728)}};gd=function(e){if(e.tag===13){var t=cn(e),n=It(e,t);if(n!==null){var r=Fe();pt(n,e,t,r)}Qo(e,t)}};wd=function(){return ee};kd=function(e,t){var n=ee;try{return ee=e,t()}finally{ee=n}};Ji=function(e,t,n){switch(t){case"input":if(Ki(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var s=Yl(r);if(!s)throw Error(b(90));Jc(r),Ki(r,s)}}}break;case"textarea":ed(e,n);break;case"select":t=n.value,t!=null&&sr(e,!!n.multiple,t,!1)}};ad=Io;od=An;var $m={usingClientEntryPoint:!1,Events:[Ds,Yn,Yl,ld,id,Io]},Xr={findFiberByHostInstance:wn,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},Um={bundleType:Xr.bundleType,version:Xr.version,rendererPackageName:Xr.rendererPackageName,rendererConfig:Xr.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:At.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=dd(e),e===null?null:e.stateNode},findFiberByHostInstance:Xr.findFiberByHostInstance||Dm,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var rl=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!rl.isDisabled&&rl.supportsFiber)try{Wl=rl.inject(Um),jt=rl}catch{}}Xe.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=$m;Xe.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Ho(t))throw Error(b(200));return Im(e,t,null,n)};Xe.createRoot=function(e,t){if(!Ho(e))throw Error(b(299));var n=!1,r="",s=Hf;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(s=t.onRecoverableError)),t=Uo(e,1,!1,null,null,n,!1,r,s),e[Lt]=t.current,gs(e.nodeType===8?e.parentNode:e),new Bo(t)};Xe.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(b(188)):(e=Object.keys(e).join(","),Error(b(268,e)));return e=dd(t),e=e===null?null:e.stateNode,e};Xe.flushSync=function(e){return An(e)};Xe.hydrate=function(e,t,n){if(!ii(t))throw Error(b(200));return ai(null,e,t,!0,n)};Xe.hydrateRoot=function(e,t,n){if(!Ho(e))throw Error(b(405));var r=n!=null&&n.hydratedSources||null,s=!1,l="",a=Hf;if(n!=null&&(n.unstable_strictMode===!0&&(s=!0),n.identifierPrefix!==void 0&&(l=n.identifierPrefix),n.onRecoverableError!==void 0&&(a=n.onRecoverableError)),t=Bf(t,null,e,1,n??null,s,!1,l,a),e[Lt]=t.current,gs(e),r)for(e=0;e<r.length;e++)n=r[e],s=n._getVersion,s=s(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,s]:t.mutableSourceEagerHydrationData.push(n,s);return new li(t)};Xe.render=function(e,t,n){if(!ii(t))throw Error(b(200));return ai(null,e,t,!1,n)};Xe.unmountComponentAtNode=function(e){if(!ii(e))throw Error(b(40));return e._reactRootContainer?(An(function(){ai(null,null,e,!1,function(){e._reactRootContainer=null,e[Lt]=null})}),!0):!1};Xe.unstable_batchedUpdates=Io;Xe.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!ii(n))throw Error(b(200));if(e==null||e._reactInternals===void 0)throw Error(b(38));return ai(e,t,n,!1,r)};Xe.version="18.3.1-next-f1338f8080-20240426";function Kf(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Kf)}catch(e){console.error(e)}}Kf(),Hc.exports=Xe;var Qm=Hc.exports,uc=Qm;Di.createRoot=uc.createRoot,Di.hydrateRoot=uc.hydrateRoot;var Rr=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Bm={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},Vt,Ga,jc,Hm=(jc=class{constructor(){D(this,Vt,Bm);D(this,Ga,!1)}setTimeoutProvider(e){O(this,Vt,e)}setTimeout(e,t){return h(this,Vt).setTimeout(e,t)}clearTimeout(e){h(this,Vt).clearTimeout(e)}setInterval(e,t){return h(this,Vt).setInterval(e,t)}clearInterval(e){h(this,Vt).clearInterval(e)}},Vt=new WeakMap,Ga=new WeakMap,jc),Sn=new Hm;function Km(e){setTimeout(e,0)}var $n=typeof window>"u"||"Deno"in globalThis;function ze(){}function Vm(e,t){return typeof e=="function"?e(t):e}function Ma(e){return typeof e=="number"&&e>=0&&e!==1/0}function Vf(e,t){return Math.max(e+(t||0)-Date.now(),0)}function fn(e,t){return typeof e=="function"?e(t):e}function Ze(e,t){return typeof e=="function"?e(t):e}function cc(e,t){const{type:n="all",exact:r,fetchStatus:s,predicate:l,queryKey:a,stale:o}=e;if(a){if(r){if(t.queryHash!==Ko(a,t.options))return!1}else if(!bs(t.queryKey,a))return!1}if(n!=="all"){const u=t.isActive();if(n==="active"&&!u||n==="inactive"&&u)return!1}return!(typeof o=="boolean"&&t.isStale()!==o||s&&s!==t.state.fetchStatus||l&&!l(t))}function dc(e,t){const{exact:n,status:r,predicate:s,mutationKey:l}=e;if(l){if(!t.options.mutationKey)return!1;if(n){if(Un(t.options.mutationKey)!==Un(l))return!1}else if(!bs(t.options.mutationKey,l))return!1}return!(r&&t.state.status!==r||s&&!s(t))}function Ko(e,t){return((t==null?void 0:t.queryKeyHashFn)||Un)(e)}function Un(e){return JSON.stringify(e,(t,n)=>Ra(n)?Object.keys(n).sort().reduce((r,s)=>(r[s]=n[s],r),{}):n)}function bs(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>bs(e[n],t[n])):!1}var Wm=Object.prototype.hasOwnProperty;function Wf(e,t,n=0){if(e===t)return e;if(n>500)return t;const r=fc(e)&&fc(t);if(!r&&!(Ra(e)&&Ra(t)))return t;const l=(r?e:Object.keys(e)).length,a=r?t:Object.keys(t),o=a.length,u=r?new Array(o):{};let d=0;for(let y=0;y<o;y++){const m=r?y:a[y],x=e[m],g=t[m];if(x===g){u[m]=x,(r?y<l:Wm.call(e,m))&&d++;continue}if(x===null||g===null||typeof x!="object"||typeof g!="object"){u[m]=g;continue}const w=Wf(x,g,n+1);u[m]=w,w===x&&d++}return l===o&&d===l?e:u}function Bl(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function fc(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Ra(e){if(!hc(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!hc(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function hc(e){return Object.prototype.toString.call(e)==="[object Object]"}function qm(e){return new Promise(t=>{Sn.setTimeout(t,e)})}function Oa(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?Wf(e,t):t}function Gm(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function Xm(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var Vo=Symbol();function qf(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===Vo?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function Wo(e,t){return typeof e=="function"?e(...t):!!e}function Ym(e,t,n){let r=!1,s;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(s??(s=t()),r||(r=!0,s.aborted?n():s.addEventListener("abort",n,{once:!0})),s)}),e}var Nn,Wt,cr,Sc,Jm=(Sc=class extends Rr{constructor(){super();D(this,Nn);D(this,Wt);D(this,cr);O(this,cr,t=>{if(!$n&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){h(this,Wt)||this.setEventListener(h(this,cr))}onUnsubscribe(){var t;this.hasListeners()||((t=h(this,Wt))==null||t.call(this),O(this,Wt,void 0))}setEventListener(t){var n;O(this,cr,t),(n=h(this,Wt))==null||n.call(this),O(this,Wt,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){h(this,Nn)!==t&&(O(this,Nn,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof h(this,Nn)=="boolean"?h(this,Nn):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Nn=new WeakMap,Wt=new WeakMap,cr=new WeakMap,Sc),qo=new Jm;function za(){let e,t;const n=new Promise((s,l)=>{e=s,t=l});n.status="pending",n.catch(()=>{});function r(s){Object.assign(n,s),delete n.resolve,delete n.reject}return n.resolve=s=>{r({status:"fulfilled",value:s}),e(s)},n.reject=s=>{r({status:"rejected",reason:s}),t(s)},n}var Zm=Km;function ey(){let e=[],t=0,n=o=>{o()},r=o=>{o()},s=Zm;const l=o=>{t?e.push(o):s(()=>{n(o)})},a=()=>{const o=e;e=[],o.length&&s(()=>{r(()=>{o.forEach(u=>{n(u)})})})};return{batch:o=>{let u;t++;try{u=o()}finally{t--,t||a()}return u},batchCalls:o=>(...u)=>{l(()=>{o(...u)})},schedule:l,setNotifyFunction:o=>{n=o},setBatchNotifyFunction:o=>{r=o},setScheduler:o=>{s=o}}}var ve=ey(),dr,qt,fr,Nc,ty=(Nc=class extends Rr{constructor(){super();D(this,dr,!0);D(this,qt);D(this,fr);O(this,fr,t=>{if(!$n&&window.addEventListener){const n=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){h(this,qt)||this.setEventListener(h(this,fr))}onUnsubscribe(){var t;this.hasListeners()||((t=h(this,qt))==null||t.call(this),O(this,qt,void 0))}setEventListener(t){var n;O(this,fr,t),(n=h(this,qt))==null||n.call(this),O(this,qt,t(this.setOnline.bind(this)))}setOnline(t){h(this,dr)!==t&&(O(this,dr,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return h(this,dr)}},dr=new WeakMap,qt=new WeakMap,fr=new WeakMap,Nc),Hl=new ty;function ny(e){return Math.min(1e3*2**e,3e4)}function Gf(e){return(e??"online")==="online"?Hl.isOnline():!0}var Fa=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function Xf(e){let t=!1,n=0,r;const s=za(),l=()=>s.status!=="pending",a=j=>{var _;if(!l()){const c=new Fa(j);x(c),(_=e.onCancel)==null||_.call(e,c)}},o=()=>{t=!0},u=()=>{t=!1},d=()=>qo.isFocused()&&(e.networkMode==="always"||Hl.isOnline())&&e.canRun(),y=()=>Gf(e.networkMode)&&e.canRun(),m=j=>{l()||(r==null||r(),s.resolve(j))},x=j=>{l()||(r==null||r(),s.reject(j))},g=()=>new Promise(j=>{var _;r=c=>{(l()||d())&&j(c)},(_=e.onPause)==null||_.call(e)}).then(()=>{var j;r=void 0,l()||(j=e.onContinue)==null||j.call(e)}),w=()=>{if(l())return;let j;const _=n===0?e.initialPromise:void 0;try{j=_??e.fn()}catch(c){j=Promise.reject(c)}Promise.resolve(j).then(m).catch(c=>{var k;if(l())return;const f=e.retry??($n?0:3),p=e.retryDelay??ny,v=typeof p=="function"?p(n,c):p,E=f===!0||typeof f=="number"&&n<f||typeof f=="function"&&f(n,c);if(t||!E){x(c);return}n++,(k=e.onFail)==null||k.call(e,n,c),qm(v).then(()=>d()?void 0:g()).then(()=>{t?x(c):w()})})};return{promise:s,status:()=>s.status,cancel:a,continue:()=>(r==null||r(),s),cancelRetry:o,continueRetry:u,canStart:y,start:()=>(y()?w():g().then(w),s)}}var Cn,Cc,Yf=(Cc=class{constructor(){D(this,Cn)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Ma(this.gcTime)&&O(this,Cn,Sn.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??($n?1/0:5*60*1e3))}clearGcTimeout(){h(this,Cn)&&(Sn.clearTimeout(h(this,Cn)),O(this,Cn,void 0))}},Cn=new WeakMap,Cc),En,hr,Je,Pn,we,Ts,bn,ot,Nt,Ec,ry=(Ec=class extends Yf{constructor(t){super();D(this,ot);D(this,En);D(this,hr);D(this,Je);D(this,Pn);D(this,we);D(this,Ts);D(this,bn);O(this,bn,!1),O(this,Ts,t.defaultOptions),this.setOptions(t.options),this.observers=[],O(this,Pn,t.client),O(this,Je,h(this,Pn).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,O(this,En,mc(this.options)),this.state=t.state??h(this,En),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=h(this,we))==null?void 0:t.promise}setOptions(t){if(this.options={...h(this,Ts),...t},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const n=mc(this.options);n.data!==void 0&&(this.setState(pc(n.data,n.dataUpdatedAt)),O(this,En,n))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&h(this,Je).remove(this)}setData(t,n){const r=Oa(this.state.data,t,this.options);return U(this,ot,Nt).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){U(this,ot,Nt).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r,s;const n=(r=h(this,we))==null?void 0:r.promise;return(s=h(this,we))==null||s.cancel(t),n?n.then(ze).catch(ze):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(h(this,En))}isActive(){return this.observers.some(t=>Ze(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Vo||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>fn(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!Vf(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=h(this,we))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=h(this,we))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),h(this,Je).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(h(this,we)&&(h(this,bn)?h(this,we).cancel({revert:!0}):h(this,we).cancelRetry()),this.scheduleGc()),h(this,Je).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||U(this,ot,Nt).call(this,{type:"invalidate"})}async fetch(t,n){var u,d,y,m,x,g,w,j,_,c,f,p;if(this.state.fetchStatus!=="idle"&&((u=h(this,we))==null?void 0:u.status())!=="rejected"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(h(this,we))return h(this,we).continueRetry(),h(this,we).promise}if(t&&this.setOptions(t),!this.options.queryFn){const v=this.observers.find(E=>E.options.queryFn);v&&this.setOptions(v.options)}const r=new AbortController,s=v=>{Object.defineProperty(v,"signal",{enumerable:!0,get:()=>(O(this,bn,!0),r.signal)})},l=()=>{const v=qf(this.options,n),k=(()=>{const C={client:h(this,Pn),queryKey:this.queryKey,meta:this.meta};return s(C),C})();return O(this,bn,!1),this.options.persister?this.options.persister(v,k,this):v(k)},o=(()=>{const v={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:h(this,Pn),state:this.state,fetchFn:l};return s(v),v})();(d=this.options.behavior)==null||d.onFetch(o,this),O(this,hr,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((y=o.fetchOptions)==null?void 0:y.meta))&&U(this,ot,Nt).call(this,{type:"fetch",meta:(m=o.fetchOptions)==null?void 0:m.meta}),O(this,we,Xf({initialPromise:n==null?void 0:n.initialPromise,fn:o.fetchFn,onCancel:v=>{v instanceof Fa&&v.revert&&this.setState({...h(this,hr),fetchStatus:"idle"}),r.abort()},onFail:(v,E)=>{U(this,ot,Nt).call(this,{type:"failed",failureCount:v,error:E})},onPause:()=>{U(this,ot,Nt).call(this,{type:"pause"})},onContinue:()=>{U(this,ot,Nt).call(this,{type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0}));try{const v=await h(this,we).start();if(v===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(v),(g=(x=h(this,Je).config).onSuccess)==null||g.call(x,v,this),(j=(w=h(this,Je).config).onSettled)==null||j.call(w,v,this.state.error,this),v}catch(v){if(v instanceof Fa){if(v.silent)return h(this,we).promise;if(v.revert){if(this.state.data===void 0)throw v;return this.state.data}}throw U(this,ot,Nt).call(this,{type:"error",error:v}),(c=(_=h(this,Je).config).onError)==null||c.call(_,v,this),(p=(f=h(this,Je).config).onSettled)==null||p.call(f,this.state.data,v,this),v}finally{this.scheduleGc()}}},En=new WeakMap,hr=new WeakMap,Je=new WeakMap,Pn=new WeakMap,we=new WeakMap,Ts=new WeakMap,bn=new WeakMap,ot=new WeakSet,Nt=function(t){const n=r=>{switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...Jf(r.data,this.options),fetchMeta:t.meta??null};case"success":const s={...r,...pc(t.data,t.dataUpdatedAt),dataUpdateCount:r.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return O(this,hr,t.manual?s:void 0),s;case"error":const l=t.error;return{...r,error:l,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:l,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),ve.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),h(this,Je).notify({query:this,type:"updated",action:t})})},Ec);function Jf(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Gf(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function pc(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function mc(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var De,W,Ms,Re,_n,pr,Pt,Gt,Rs,mr,yr,Tn,Mn,Xt,xr,J,ts,La,Ia,Da,Aa,$a,Ua,Qa,Zf,Pc,sy=(Pc=class extends Rr{constructor(t,n){super();D(this,J);D(this,De);D(this,W);D(this,Ms);D(this,Re);D(this,_n);D(this,pr);D(this,Pt);D(this,Gt);D(this,Rs);D(this,mr);D(this,yr);D(this,Tn);D(this,Mn);D(this,Xt);D(this,xr,new Set);this.options=n,O(this,De,t),O(this,Gt,null),O(this,Pt,za()),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(h(this,W).addObserver(this),yc(h(this,W),this.options)?U(this,J,ts).call(this):this.updateResult(),U(this,J,Aa).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Ba(h(this,W),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Ba(h(this,W),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,U(this,J,$a).call(this),U(this,J,Ua).call(this),h(this,W).removeObserver(this)}setOptions(t){const n=this.options,r=h(this,W);if(this.options=h(this,De).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Ze(this.options.enabled,h(this,W))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");U(this,J,Qa).call(this),h(this,W).setOptions(this.options),n._defaulted&&!Bl(this.options,n)&&h(this,De).getQueryCache().notify({type:"observerOptionsUpdated",query:h(this,W),observer:this});const s=this.hasListeners();s&&xc(h(this,W),r,this.options,n)&&U(this,J,ts).call(this),this.updateResult(),s&&(h(this,W)!==r||Ze(this.options.enabled,h(this,W))!==Ze(n.enabled,h(this,W))||fn(this.options.staleTime,h(this,W))!==fn(n.staleTime,h(this,W)))&&U(this,J,La).call(this);const l=U(this,J,Ia).call(this);s&&(h(this,W)!==r||Ze(this.options.enabled,h(this,W))!==Ze(n.enabled,h(this,W))||l!==h(this,Xt))&&U(this,J,Da).call(this,l)}getOptimisticResult(t){const n=h(this,De).getQueryCache().build(h(this,De),t),r=this.createResult(n,t);return iy(this,r)&&(O(this,Re,r),O(this,pr,this.options),O(this,_n,h(this,W).state)),r}getCurrentResult(){return h(this,Re)}trackResult(t,n){return new Proxy(t,{get:(r,s)=>(this.trackProp(s),n==null||n(s),s==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&h(this,Pt).status==="pending"&&h(this,Pt).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(r,s))})}trackProp(t){h(this,xr).add(t)}getCurrentQuery(){return h(this,W)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=h(this,De).defaultQueryOptions(t),r=h(this,De).getQueryCache().build(h(this,De),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(t){return U(this,J,ts).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),h(this,Re)))}createResult(t,n){var z;const r=h(this,W),s=this.options,l=h(this,Re),a=h(this,_n),o=h(this,pr),d=t!==r?t.state:h(this,Ms),{state:y}=t;let m={...y},x=!1,g;if(n._optimisticResults){const R=this.hasListeners(),K=!R&&yc(t,n),Y=R&&xc(t,r,n,s);(K||Y)&&(m={...m,...Jf(y.data,t.options)}),n._optimisticResults==="isRestoring"&&(m.fetchStatus="idle")}let{error:w,errorUpdatedAt:j,status:_}=m;g=m.data;let c=!1;if(n.placeholderData!==void 0&&g===void 0&&_==="pending"){let R;l!=null&&l.isPlaceholderData&&n.placeholderData===(o==null?void 0:o.placeholderData)?(R=l.data,c=!0):R=typeof n.placeholderData=="function"?n.placeholderData((z=h(this,yr))==null?void 0:z.state.data,h(this,yr)):n.placeholderData,R!==void 0&&(_="success",g=Oa(l==null?void 0:l.data,R,n),x=!0)}if(n.select&&g!==void 0&&!c)if(l&&g===(a==null?void 0:a.data)&&n.select===h(this,Rs))g=h(this,mr);else try{O(this,Rs,n.select),g=n.select(g),g=Oa(l==null?void 0:l.data,g,n),O(this,mr,g),O(this,Gt,null)}catch(R){O(this,Gt,R)}h(this,Gt)&&(w=h(this,Gt),g=h(this,mr),j=Date.now(),_="error");const f=m.fetchStatus==="fetching",p=_==="pending",v=_==="error",E=p&&f,k=g!==void 0,N={status:_,fetchStatus:m.fetchStatus,isPending:p,isSuccess:_==="success",isError:v,isInitialLoading:E,isLoading:E,data:g,dataUpdatedAt:m.dataUpdatedAt,error:w,errorUpdatedAt:j,failureCount:m.fetchFailureCount,failureReason:m.fetchFailureReason,errorUpdateCount:m.errorUpdateCount,isFetched:m.dataUpdateCount>0||m.errorUpdateCount>0,isFetchedAfterMount:m.dataUpdateCount>d.dataUpdateCount||m.errorUpdateCount>d.errorUpdateCount,isFetching:f,isRefetching:f&&!p,isLoadingError:v&&!k,isPaused:m.fetchStatus==="paused",isPlaceholderData:x,isRefetchError:v&&k,isStale:Go(t,n),refetch:this.refetch,promise:h(this,Pt),isEnabled:Ze(n.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const R=N.data!==void 0,K=N.status==="error"&&!R,Y=G=>{K?G.reject(N.error):R&&G.resolve(N.data)},ne=()=>{const G=O(this,Pt,N.promise=za());Y(G)},V=h(this,Pt);switch(V.status){case"pending":t.queryHash===r.queryHash&&Y(V);break;case"fulfilled":(K||N.data!==V.value)&&ne();break;case"rejected":(!K||N.error!==V.reason)&&ne();break}}return N}updateResult(){const t=h(this,Re),n=this.createResult(h(this,W),this.options);if(O(this,_n,h(this,W).state),O(this,pr,this.options),h(this,_n).data!==void 0&&O(this,yr,h(this,W)),Bl(n,t))return;O(this,Re,n);const r=()=>{if(!t)return!0;const{notifyOnChangeProps:s}=this.options,l=typeof s=="function"?s():s;if(l==="all"||!l&&!h(this,xr).size)return!0;const a=new Set(l??h(this,xr));return this.options.throwOnError&&a.add("error"),Object.keys(h(this,Re)).some(o=>{const u=o;return h(this,Re)[u]!==t[u]&&a.has(u)})};U(this,J,Zf).call(this,{listeners:r()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&U(this,J,Aa).call(this)}},De=new WeakMap,W=new WeakMap,Ms=new WeakMap,Re=new WeakMap,_n=new WeakMap,pr=new WeakMap,Pt=new WeakMap,Gt=new WeakMap,Rs=new WeakMap,mr=new WeakMap,yr=new WeakMap,Tn=new WeakMap,Mn=new WeakMap,Xt=new WeakMap,xr=new WeakMap,J=new WeakSet,ts=function(t){U(this,J,Qa).call(this);let n=h(this,W).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(ze)),n},La=function(){U(this,J,$a).call(this);const t=fn(this.options.staleTime,h(this,W));if($n||h(this,Re).isStale||!Ma(t))return;const r=Vf(h(this,Re).dataUpdatedAt,t)+1;O(this,Tn,Sn.setTimeout(()=>{h(this,Re).isStale||this.updateResult()},r))},Ia=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(h(this,W)):this.options.refetchInterval)??!1},Da=function(t){U(this,J,Ua).call(this),O(this,Xt,t),!($n||Ze(this.options.enabled,h(this,W))===!1||!Ma(h(this,Xt))||h(this,Xt)===0)&&O(this,Mn,Sn.setInterval(()=>{(this.options.refetchIntervalInBackground||qo.isFocused())&&U(this,J,ts).call(this)},h(this,Xt)))},Aa=function(){U(this,J,La).call(this),U(this,J,Da).call(this,U(this,J,Ia).call(this))},$a=function(){h(this,Tn)&&(Sn.clearTimeout(h(this,Tn)),O(this,Tn,void 0))},Ua=function(){h(this,Mn)&&(Sn.clearInterval(h(this,Mn)),O(this,Mn,void 0))},Qa=function(){const t=h(this,De).getQueryCache().build(h(this,De),this.options);if(t===h(this,W))return;const n=h(this,W);O(this,W,t),O(this,Ms,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},Zf=function(t){ve.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(h(this,Re))}),h(this,De).getQueryCache().notify({query:h(this,W),type:"observerResultsUpdated"})})},Pc);function ly(e,t){return Ze(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function yc(e,t){return ly(e,t)||e.state.data!==void 0&&Ba(e,t,t.refetchOnMount)}function Ba(e,t,n){if(Ze(t.enabled,e)!==!1&&fn(t.staleTime,e)!=="static"){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&Go(e,t)}return!1}function xc(e,t,n,r){return(e!==t||Ze(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&Go(e,n)}function Go(e,t){return Ze(t.enabled,e)!==!1&&e.isStaleByTime(fn(t.staleTime,e))}function iy(e,t){return!Bl(e.getCurrentResult(),t)}function vc(e){return{onFetch:(t,n)=>{var y,m,x,g,w;const r=t.options,s=(x=(m=(y=t.fetchOptions)==null?void 0:y.meta)==null?void 0:m.fetchMore)==null?void 0:x.direction,l=((g=t.state.data)==null?void 0:g.pages)||[],a=((w=t.state.data)==null?void 0:w.pageParams)||[];let o={pages:[],pageParams:[]},u=0;const d=async()=>{let j=!1;const _=p=>{Ym(p,()=>t.signal,()=>j=!0)},c=qf(t.options,t.fetchOptions),f=async(p,v,E)=>{if(j)return Promise.reject();if(v==null&&p.pages.length)return Promise.resolve(p);const C=(()=>{const K={client:t.client,queryKey:t.queryKey,pageParam:v,direction:E?"backward":"forward",meta:t.options.meta};return _(K),K})(),N=await c(C),{maxPages:z}=t.options,R=E?Xm:Gm;return{pages:R(p.pages,N,z),pageParams:R(p.pageParams,v,z)}};if(s&&l.length){const p=s==="backward",v=p?ay:gc,E={pages:l,pageParams:a},k=v(r,E);o=await f(E,k,p)}else{const p=e??l.length;do{const v=u===0?a[0]??r.initialPageParam:gc(r,o);if(u>0&&v==null)break;o=await f(o,v),u++}while(u<p)}return o};t.options.persister?t.fetchFn=()=>{var j,_;return(_=(j=t.options).persister)==null?void 0:_.call(j,d,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=d}}}function gc(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function ay(e,{pages:t,pageParams:n}){var r;return t.length>0?(r=e.getPreviousPageParam)==null?void 0:r.call(e,t[0],t,n[0],n):void 0}var Os,vt,_e,Rn,gt,Ut,bc,oy=(bc=class extends Yf{constructor(t){super();D(this,gt);D(this,Os);D(this,vt);D(this,_e);D(this,Rn);O(this,Os,t.client),this.mutationId=t.mutationId,O(this,_e,t.mutationCache),O(this,vt,[]),this.state=t.state||eh(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){h(this,vt).includes(t)||(h(this,vt).push(t),this.clearGcTimeout(),h(this,_e).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){O(this,vt,h(this,vt).filter(n=>n!==t)),this.scheduleGc(),h(this,_e).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){h(this,vt).length||(this.state.status==="pending"?this.scheduleGc():h(this,_e).remove(this))}continue(){var t;return((t=h(this,Rn))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var a,o,u,d,y,m,x,g,w,j,_,c,f,p,v,E,k,C;const n=()=>{U(this,gt,Ut).call(this,{type:"continue"})},r={client:h(this,Os),meta:this.options.meta,mutationKey:this.options.mutationKey};O(this,Rn,Xf({fn:()=>this.options.mutationFn?this.options.mutationFn(t,r):Promise.reject(new Error("No mutationFn found")),onFail:(N,z)=>{U(this,gt,Ut).call(this,{type:"failed",failureCount:N,error:z})},onPause:()=>{U(this,gt,Ut).call(this,{type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>h(this,_e).canRun(this)}));const s=this.state.status==="pending",l=!h(this,Rn).canStart();try{if(s)n();else{U(this,gt,Ut).call(this,{type:"pending",variables:t,isPaused:l}),h(this,_e).config.onMutate&&await h(this,_e).config.onMutate(t,this,r);const z=await((o=(a=this.options).onMutate)==null?void 0:o.call(a,t,r));z!==this.state.context&&U(this,gt,Ut).call(this,{type:"pending",context:z,variables:t,isPaused:l})}const N=await h(this,Rn).start();return await((d=(u=h(this,_e).config).onSuccess)==null?void 0:d.call(u,N,t,this.state.context,this,r)),await((m=(y=this.options).onSuccess)==null?void 0:m.call(y,N,t,this.state.context,r)),await((g=(x=h(this,_e).config).onSettled)==null?void 0:g.call(x,N,null,this.state.variables,this.state.context,this,r)),await((j=(w=this.options).onSettled)==null?void 0:j.call(w,N,null,t,this.state.context,r)),U(this,gt,Ut).call(this,{type:"success",data:N}),N}catch(N){try{await((c=(_=h(this,_e).config).onError)==null?void 0:c.call(_,N,t,this.state.context,this,r))}catch(z){Promise.reject(z)}try{await((p=(f=this.options).onError)==null?void 0:p.call(f,N,t,this.state.context,r))}catch(z){Promise.reject(z)}try{await((E=(v=h(this,_e).config).onSettled)==null?void 0:E.call(v,void 0,N,this.state.variables,this.state.context,this,r))}catch(z){Promise.reject(z)}try{await((C=(k=this.options).onSettled)==null?void 0:C.call(k,void 0,N,t,this.state.context,r))}catch(z){Promise.reject(z)}throw U(this,gt,Ut).call(this,{type:"error",error:N}),N}finally{h(this,_e).runNext(this)}}},Os=new WeakMap,vt=new WeakMap,_e=new WeakMap,Rn=new WeakMap,gt=new WeakSet,Ut=function(t){const n=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),ve.batch(()=>{h(this,vt).forEach(r=>{r.onMutationUpdate(t)}),h(this,_e).notify({mutation:this,type:"updated",action:t})})},bc);function eh(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var bt,ut,zs,_c,uy=(_c=class extends Rr{constructor(t={}){super();D(this,bt);D(this,ut);D(this,zs);this.config=t,O(this,bt,new Set),O(this,ut,new Map),O(this,zs,0)}build(t,n,r){const s=new oy({client:t,mutationCache:this,mutationId:++$s(this,zs)._,options:t.defaultMutationOptions(n),state:r});return this.add(s),s}add(t){h(this,bt).add(t);const n=sl(t);if(typeof n=="string"){const r=h(this,ut).get(n);r?r.push(t):h(this,ut).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(h(this,bt).delete(t)){const n=sl(t);if(typeof n=="string"){const r=h(this,ut).get(n);if(r)if(r.length>1){const s=r.indexOf(t);s!==-1&&r.splice(s,1)}else r[0]===t&&h(this,ut).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=sl(t);if(typeof n=="string"){const r=h(this,ut).get(n),s=r==null?void 0:r.find(l=>l.state.status==="pending");return!s||s===t}else return!0}runNext(t){var r;const n=sl(t);if(typeof n=="string"){const s=(r=h(this,ut).get(n))==null?void 0:r.find(l=>l!==t&&l.state.isPaused);return(s==null?void 0:s.continue())??Promise.resolve()}else return Promise.resolve()}clear(){ve.batch(()=>{h(this,bt).forEach(t=>{this.notify({type:"removed",mutation:t})}),h(this,bt).clear(),h(this,ut).clear()})}getAll(){return Array.from(h(this,bt))}find(t){const n={exact:!0,...t};return this.getAll().find(r=>dc(n,r))}findAll(t={}){return this.getAll().filter(n=>dc(t,n))}notify(t){ve.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return ve.batch(()=>Promise.all(t.map(n=>n.continue().catch(ze))))}},bt=new WeakMap,ut=new WeakMap,zs=new WeakMap,_c);function sl(e){var t;return(t=e.options.scope)==null?void 0:t.id}var _t,Yt,Ae,Tt,zt,xl,Ha,Tc,cy=(Tc=class extends Rr{constructor(n,r){super();D(this,zt);D(this,_t);D(this,Yt);D(this,Ae);D(this,Tt);O(this,_t,n),this.setOptions(r),this.bindMethods(),U(this,zt,xl).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(n){var s;const r=this.options;this.options=h(this,_t).defaultMutationOptions(n),Bl(this.options,r)||h(this,_t).getMutationCache().notify({type:"observerOptionsUpdated",mutation:h(this,Ae),observer:this}),r!=null&&r.mutationKey&&this.options.mutationKey&&Un(r.mutationKey)!==Un(this.options.mutationKey)?this.reset():((s=h(this,Ae))==null?void 0:s.state.status)==="pending"&&h(this,Ae).setOptions(this.options)}onUnsubscribe(){var n;this.hasListeners()||(n=h(this,Ae))==null||n.removeObserver(this)}onMutationUpdate(n){U(this,zt,xl).call(this),U(this,zt,Ha).call(this,n)}getCurrentResult(){return h(this,Yt)}reset(){var n;(n=h(this,Ae))==null||n.removeObserver(this),O(this,Ae,void 0),U(this,zt,xl).call(this),U(this,zt,Ha).call(this)}mutate(n,r){var s;return O(this,Tt,r),(s=h(this,Ae))==null||s.removeObserver(this),O(this,Ae,h(this,_t).getMutationCache().build(h(this,_t),this.options)),h(this,Ae).addObserver(this),h(this,Ae).execute(n)}},_t=new WeakMap,Yt=new WeakMap,Ae=new WeakMap,Tt=new WeakMap,zt=new WeakSet,xl=function(){var r;const n=((r=h(this,Ae))==null?void 0:r.state)??eh();O(this,Yt,{...n,isPending:n.status==="pending",isSuccess:n.status==="success",isError:n.status==="error",isIdle:n.status==="idle",mutate:this.mutate,reset:this.reset})},Ha=function(n){ve.batch(()=>{var r,s,l,a,o,u,d,y;if(h(this,Tt)&&this.hasListeners()){const m=h(this,Yt).variables,x=h(this,Yt).context,g={client:h(this,_t),meta:this.options.meta,mutationKey:this.options.mutationKey};if((n==null?void 0:n.type)==="success"){try{(s=(r=h(this,Tt)).onSuccess)==null||s.call(r,n.data,m,x,g)}catch(w){Promise.reject(w)}try{(a=(l=h(this,Tt)).onSettled)==null||a.call(l,n.data,null,m,x,g)}catch(w){Promise.reject(w)}}else if((n==null?void 0:n.type)==="error"){try{(u=(o=h(this,Tt)).onError)==null||u.call(o,n.error,m,x,g)}catch(w){Promise.reject(w)}try{(y=(d=h(this,Tt)).onSettled)==null||y.call(d,void 0,n.error,m,x,g)}catch(w){Promise.reject(w)}}}this.listeners.forEach(m=>{m(h(this,Yt))})})},Tc),wt,Mc,dy=(Mc=class extends Rr{constructor(t={}){super();D(this,wt);this.config=t,O(this,wt,new Map)}build(t,n,r){const s=n.queryKey,l=n.queryHash??Ko(s,n);let a=this.get(l);return a||(a=new ry({client:t,queryKey:s,queryHash:l,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(s)}),this.add(a)),a}add(t){h(this,wt).has(t.queryHash)||(h(this,wt).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=h(this,wt).get(t.queryHash);n&&(t.destroy(),n===t&&h(this,wt).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){ve.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return h(this,wt).get(t)}getAll(){return[...h(this,wt).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>cc(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>cc(t,r)):n}notify(t){ve.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){ve.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){ve.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},wt=new WeakMap,Mc),de,Jt,Zt,vr,gr,en,wr,kr,Rc,fy=(Rc=class{constructor(e={}){D(this,de);D(this,Jt);D(this,Zt);D(this,vr);D(this,gr);D(this,en);D(this,wr);D(this,kr);O(this,de,e.queryCache||new dy),O(this,Jt,e.mutationCache||new uy),O(this,Zt,e.defaultOptions||{}),O(this,vr,new Map),O(this,gr,new Map),O(this,en,0)}mount(){$s(this,en)._++,h(this,en)===1&&(O(this,wr,qo.subscribe(async e=>{e&&(await this.resumePausedMutations(),h(this,de).onFocus())})),O(this,kr,Hl.subscribe(async e=>{e&&(await this.resumePausedMutations(),h(this,de).onOnline())})))}unmount(){var e,t;$s(this,en)._--,h(this,en)===0&&((e=h(this,wr))==null||e.call(this),O(this,wr,void 0),(t=h(this,kr))==null||t.call(this),O(this,kr,void 0))}isFetching(e){return h(this,de).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return h(this,Jt).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=h(this,de).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=h(this,de).build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(fn(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return h(this,de).findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),s=h(this,de).get(r.queryHash),l=s==null?void 0:s.state.data,a=Vm(t,l);if(a!==void 0)return h(this,de).build(this,r).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return ve.batch(()=>h(this,de).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=h(this,de).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=h(this,de);ve.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=h(this,de);return ve.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=ve.batch(()=>h(this,de).findAll(e).map(s=>s.cancel(n)));return Promise.all(r).then(ze).catch(ze)}invalidateQueries(e,t={}){return ve.batch(()=>(h(this,de).findAll(e).forEach(n=>{n.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},r=ve.batch(()=>h(this,de).findAll(e).filter(s=>!s.isDisabled()&&!s.isStatic()).map(s=>{let l=s.fetch(void 0,n);return n.throwOnError||(l=l.catch(ze)),s.state.fetchStatus==="paused"?Promise.resolve():l}));return Promise.all(r).then(ze)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=h(this,de).build(this,t);return n.isStaleByTime(fn(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(ze).catch(ze)}fetchInfiniteQuery(e){return e.behavior=vc(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(ze).catch(ze)}ensureInfiniteQueryData(e){return e.behavior=vc(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Hl.isOnline()?h(this,Jt).resumePausedMutations():Promise.resolve()}getQueryCache(){return h(this,de)}getMutationCache(){return h(this,Jt)}getDefaultOptions(){return h(this,Zt)}setDefaultOptions(e){O(this,Zt,e)}setQueryDefaults(e,t){h(this,vr).set(Un(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...h(this,vr).values()],n={};return t.forEach(r=>{bs(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){h(this,gr).set(Un(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...h(this,gr).values()],n={};return t.forEach(r=>{bs(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...h(this,Zt).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Ko(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===Vo&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...h(this,Zt).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){h(this,de).clear(),h(this,Jt).clear()}},de=new WeakMap,Jt=new WeakMap,Zt=new WeakMap,vr=new WeakMap,gr=new WeakMap,en=new WeakMap,wr=new WeakMap,kr=new WeakMap,Rc),th=S.createContext(void 0),oi=e=>{const t=S.useContext(th);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},hy=({client:e,children:t})=>(S.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),i.jsx(th.Provider,{value:e,children:t})),nh=S.createContext(!1),py=()=>S.useContext(nh);nh.Provider;function my(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var yy=S.createContext(my()),xy=()=>S.useContext(yy),vy=(e,t,n)=>{const r=n!=null&&n.state.error&&typeof e.throwOnError=="function"?Wo(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||r)&&(t.isReset()||(e.retryOnMount=!1))},gy=e=>{S.useEffect(()=>{e.clearReset()},[e])},wy=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:s})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(s&&e.data===void 0||Wo(n,[e.error,r])),ky=e=>{if(e.suspense){const n=s=>s==="static"?s:Math.max(s??1e3,1e3),r=e.staleTime;e.staleTime=typeof r=="function"?(...s)=>n(r(...s)):n(r),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},jy=(e,t)=>e.isLoading&&e.isFetching&&!t,Sy=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,wc=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function Ny(e,t,n){var x,g,w,j;const r=py(),s=xy(),l=oi(),a=l.defaultQueryOptions(e);(g=(x=l.getDefaultOptions().queries)==null?void 0:x._experimental_beforeQuery)==null||g.call(x,a);const o=l.getQueryCache().get(a.queryHash);a._optimisticResults=r?"isRestoring":"optimistic",ky(a),vy(a,s,o),gy(s);const u=!l.getQueryCache().get(a.queryHash),[d]=S.useState(()=>new t(l,a)),y=d.getOptimisticResult(a),m=!r&&e.subscribed!==!1;if(S.useSyncExternalStore(S.useCallback(_=>{const c=m?d.subscribe(ve.batchCalls(_)):ze;return d.updateResult(),c},[d,m]),()=>d.getCurrentResult(),()=>d.getCurrentResult()),S.useEffect(()=>{d.setOptions(a)},[a,d]),Sy(a,y))throw wc(a,d,s);if(wy({result:y,errorResetBoundary:s,throwOnError:a.throwOnError,query:o,suspense:a.suspense}))throw y.error;if((j=(w=l.getDefaultOptions().queries)==null?void 0:w._experimental_afterQuery)==null||j.call(w,a,y),a.experimental_prefetchInRender&&!$n&&jy(y,r)){const _=u?wc(a,d,s):o==null?void 0:o.promise;_==null||_.catch(ze).finally(()=>{d.updateResult()})}return a.notifyOnChangeProps?y:d.trackResult(y)}function Se(e,t){return Ny(e,sy)}function Li(e,t){const n=oi(),[r]=S.useState(()=>new cy(n,e));S.useEffect(()=>{r.setOptions(e)},[r,e]);const s=S.useSyncExternalStore(S.useCallback(a=>r.subscribe(ve.batchCalls(a)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),l=S.useCallback((a,o)=>{r.mutate(a,o).catch(ze)},[r]);if(s.error&&Wo(r.options.throwOnError,[s.error]))throw s.error;return{...s,mutate:l,mutateAsync:s.mutate}}/**
41
- * @license lucide-react v0.344.0 - ISC
42
- *
43
- * This source code is licensed under the ISC license.
44
- * See the LICENSE file in the root directory of this source tree.
45
- */var Cy={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"};/**
46
- * @license lucide-react v0.344.0 - ISC
47
- *
48
- * This source code is licensed under the ISC license.
49
- * See the LICENSE file in the root directory of this source tree.
50
- */const Ey=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase().trim(),q=(e,t)=>{const n=S.forwardRef(({color:r="currentColor",size:s=24,strokeWidth:l=2,absoluteStrokeWidth:a,className:o="",children:u,...d},y)=>S.createElement("svg",{ref:y,...Cy,width:s,height:s,stroke:r,strokeWidth:a?Number(l)*24/Number(s):l,className:["lucide",`lucide-${Ey(e)}`,o].join(" "),...d},[...t.map(([m,x])=>S.createElement(m,x)),...Array.isArray(u)?u:[u]]));return n.displayName=`${e}`,n};/**
51
- * @license lucide-react v0.344.0 - ISC
52
- *
53
- * This source code is licensed under the ISC license.
54
- * See the LICENSE file in the root directory of this source tree.
55
- */const Ka=q("AlertCircle",[["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"}]]);/**
56
- * @license lucide-react v0.344.0 - ISC
57
- *
58
- * This source code is licensed under the ISC license.
59
- * See the LICENSE file in the root directory of this source tree.
60
- */const rh=q("AlertTriangle",[["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-3Z",key:"c3ski4"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/**
61
- * @license lucide-react v0.344.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 Py=q("Bot",[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]]);/**
66
- * @license lucide-react v0.344.0 - ISC
67
- *
68
- * This source code is licensed under the ISC license.
69
- * See the LICENSE file in the root directory of this source tree.
70
- */const by=q("Brain",[["path",{d:"M12 5a3 3 0 1 0-5.997.125 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18Z",key:"l5xja"}],["path",{d:"M12 5a3 3 0 1 1 5.997.125 4 4 0 0 1 2.526 5.77 4 4 0 0 1-.556 6.588A4 4 0 1 1 12 18Z",key:"ep3f8r"}],["path",{d:"M15 13a4.5 4.5 0 0 1-3-4 4.5 4.5 0 0 1-3 4",key:"1p4c4q"}],["path",{d:"M17.599 6.5a3 3 0 0 0 .399-1.375",key:"tmeiqw"}],["path",{d:"M6.003 5.125A3 3 0 0 0 6.401 6.5",key:"105sqy"}],["path",{d:"M3.477 10.896a4 4 0 0 1 .585-.396",key:"ql3yin"}],["path",{d:"M19.938 10.5a4 4 0 0 1 .585.396",key:"1qfode"}],["path",{d:"M6 18a4 4 0 0 1-1.967-.516",key:"2e4loj"}],["path",{d:"M19.967 17.484A4 4 0 0 1 18 18",key:"159ez6"}]]);/**
71
- * @license lucide-react v0.344.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 _y=q("Briefcase",[["rect",{width:"20",height:"14",x:"2",y:"7",rx:"2",ry:"2",key:"eto64e"}],["path",{d:"M16 21V5a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v16",key:"zwj3tp"}]]);/**
76
- * @license lucide-react v0.344.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 _s=q("CheckCircle2",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
81
- * @license lucide-react v0.344.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 sh=q("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
86
- * @license lucide-react v0.344.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 lh=q("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
91
- * @license lucide-react v0.344.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 Ty=q("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
96
- * @license lucide-react v0.344.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 My=q("CircleDot",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}]]);/**
101
- * @license lucide-react v0.344.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 Xo=q("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/**
106
- * @license lucide-react v0.344.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 Ry=q("Copy",[["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"}]]);/**
111
- * @license lucide-react v0.344.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 Yo=q("Database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]]);/**
116
- * @license lucide-react v0.344.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 Va=q("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);/**
121
- * @license lucide-react v0.344.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 Oy=q("Gauge",[["path",{d:"m12 14 4-4",key:"9kzdfg"}],["path",{d:"M3.34 19a10 10 0 1 1 17.32 0",key:"19p75a"}]]);/**
126
- * @license lucide-react v0.344.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 zy=q("GitBranch",[["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"}]]);/**
131
- * @license lucide-react v0.344.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 ih=q("History",[["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"}]]);/**
136
- * @license lucide-react v0.344.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 Fy=q("KeyRound",[["path",{d:"M2 18v3c0 .6.4 1 1 1h4v-3h3v-3h2l1.4-1.4a6.5 6.5 0 1 0-4-4Z",key:"167ctg"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]]);/**
141
- * @license lucide-react v0.344.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 Jo=q("Loader2",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/**
146
- * @license lucide-react v0.344.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 Ly=q("Menu",[["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}],["line",{x1:"4",x2:"20",y1:"6",y2:"6",key:"1owob3"}],["line",{x1:"4",x2:"20",y1:"18",y2:"18",key:"yk5zj1"}]]);/**
151
- * @license lucide-react v0.344.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 ah=q("MessageSquare",[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]]);/**
156
- * @license lucide-react v0.344.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 Iy=q("Plug",[["path",{d:"M12 22v-5",key:"1ega77"}],["path",{d:"M9 8V2",key:"14iosj"}],["path",{d:"M15 8V2",key:"18g5xt"}],["path",{d:"M18 8v5a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V8Z",key:"osxo6l"}]]);/**
161
- * @license lucide-react v0.344.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 oh=q("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
166
- * @license lucide-react v0.344.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 Dy=q("Rocket",[["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"}]]);/**
171
- * @license lucide-react v0.344.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 Wa=q("RotateCcw",[["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"}]]);/**
176
- * @license lucide-react v0.344.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 Ay=q("SearchX",[["path",{d:"m13.5 8.5-5 5",key:"1cs55j"}],["path",{d:"m8.5 8.5 5 5",key:"a8mexj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
181
- * @license lucide-react v0.344.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 $y=q("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
186
- * @license lucide-react v0.344.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 Uy=q("Send",[["path",{d:"m22 2-7 20-4-9-9-4Z",key:"1q3vgg"}],["path",{d:"M22 2 11 13",key:"nzbqef"}]]);/**
191
- * @license lucide-react v0.344.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 Qy=q("Server",[["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"}]]);/**
196
- * @license lucide-react v0.344.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 uh=q("Settings2",[["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"}]]);/**
201
- * @license lucide-react v0.344.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 kc=q("ShieldCheck",[["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"}]]);/**
206
- * @license lucide-react v0.344.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 ch=q("Sparkles",[["path",{d:"m12 3-1.912 5.813a2 2 0 0 1-1.275 1.275L3 12l5.813 1.912a2 2 0 0 1 1.275 1.275L12 21l1.912-5.813a2 2 0 0 1 1.275-1.275L21 12l-5.813-1.912a2 2 0 0 1-1.275-1.275L12 3Z",key:"17u4zn"}],["path",{d:"M5 3v4",key:"bklmnn"}],["path",{d:"M19 17v4",key:"iiml17"}],["path",{d:"M3 5h4",key:"nem4j1"}],["path",{d:"M17 19h4",key:"lbex7p"}]]);/**
211
- * @license lucide-react v0.344.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 Zo=q("Wrench",[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z",key:"cbrjhi"}]]);/**
216
- * @license lucide-react v0.344.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 Kl=q("XCircle",[["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"}]]);/**
221
- * @license lucide-react v0.344.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 dh=q("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),se="",Z={async getSoul(){const e=await fetch(`${se}/api/soul`);if(!e.ok)throw new Error("Failed to fetch soul profile");return e.json()},async getSetupStatus(){const e=await fetch(`${se}/api/setup`);if(!e.ok)throw new Error("Failed to fetch setup status");return e.json()},async initializeSetup(){const e=await fetch(`${se}/api/setup/init`,{method:"POST"});if(!e.ok){const t=await e.json().catch(()=>({}));throw new Error(t.error||"Failed to initialize setup")}return e.json()},async getSetupConfig(){const e=await fetch(`${se}/api/setup/config`);if(!e.ok)throw new Error("Failed to fetch setup config");return e.json()},async updateSetupConfig(e){const t=await fetch(`${se}/api/setup/config`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(!t.ok){const n=await t.json().catch(()=>({}));throw new Error(n.error||"Failed to update setup config")}return t.json()},async testLLM(e=!1,t){const n=await fetch(`${se}/api/setup/test-llm`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({probe:e,...t||{}})}),r=await n.json().catch(()=>({}));if(!n.ok||(r==null?void 0:r.ok)===!1)throw new Error(r.error||"LLM test failed");return r},async getTaskHistory(e){const t=new URLSearchParams;e!=null&&e.limit&&t.set("limit",String(e.limit)),e!=null&&e.offset&&t.set("offset",String(e.offset)),e!=null&&e.status&&t.set("status",e.status),e!=null&&e.search&&t.set("search",e.search);const n=t.toString(),r=await fetch(`${se}/api/tasks${n?`?${n}`:""}`);if(!r.ok)throw new Error("Failed to fetch task history");return r.json()},async getTaskDetail(e){const t=await fetch(`${se}/api/tasks/${encodeURIComponent(e)}/detail`);if(!t.ok){const n=await t.json().catch(()=>({}));throw new Error(n.error||"Failed to fetch task detail")}return t.json()},async getTaskStatus(e){const t=await fetch(`${se}/api/tasks/${e}/status`);if(!t.ok){const n=await t.json().catch(()=>({}));throw new Error(n.error||"Failed to fetch task status")}return t.json()},async runTask(e){const t=await fetch(`${se}/api/tasks/run`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({input:e})});if(!t.ok){const n=await t.json().catch(()=>({}));throw new Error(n.error||"Failed to run task")}return t.json()},async respondToTask(e,t){const n=await fetch(`${se}/api/tasks/${e}/respond`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({response:t})});if(!n.ok){const r=await n.json().catch(()=>({}));throw new Error(r.error||"Failed to send response")}},async getResumableTasks(){const e=await fetch(`${se}/api/tasks/resumable`);if(!e.ok)throw new Error("Failed to fetch resumable tasks");return e.json()},async resumeTask(e){const t=await fetch(`${se}/api/tasks/${encodeURIComponent(e)}/resume`,{method:"POST"});if(!t.ok){const n=await t.json().catch(()=>({}));throw new Error(n.error||"Failed to resume task")}return t.json()},async getTaskReports(e=50){const t=await fetch(`${se}/api/reports?limit=${e}`);if(!t.ok)throw new Error("Failed to fetch task reports");return t.json()},async getFacts(e=100){const t=await fetch(`${se}/api/memory/facts?limit=${e}`);if(!t.ok)throw new Error("Failed to fetch memory facts");return t.json()},async getEpisodes(e=50){const t=await fetch(`${se}/api/replay?limit=${e}`);if(!t.ok)throw new Error("Failed to fetch replay episodes");return t.json()},async getProposals(e=50){const t=await fetch(`${se}/api/strategy/proposals?limit=${e}`);if(!t.ok)throw new Error("Failed to fetch proposals");return t.json()},async approveProposal(e){const t=await fetch(`${se}/api/strategy/proposals/${e}/approve`,{method:"POST"});if(!t.ok){const n=await t.json();throw new Error(n.error||"Failed to approve")}},async rejectProposal(e,t){const n=await fetch(`${se}/api/strategy/proposals/${e}/reject`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({reason:t})});if(!n.ok){const r=await n.json();throw new Error(r.error||"Failed to reject")}},async getStrategyContent(e){const t=await fetch(`${se}/api/strategy/content?path=${encodeURIComponent(e)}`);if(!t.ok)throw new Error("Failed to fetch strategy content");return(await t.json()).content},async getActiveStrategy(){const e=await fetch(`${se}/api/strategy/active`);if(!e.ok){const t=await e.json();throw new Error(t.error||"Failed to fetch active strategy")}return e.json()},async getStatus(){return(await fetch(`${se}/api/status`)).json()},async getMcpHealth(e){const t=new URLSearchParams;e!=null&&e.server&&t.set("server",e.server),(e==null?void 0:e.timeoutMs)!==void 0&&t.set("timeoutMs",String(e.timeoutMs)),(e==null?void 0:e.retries)!==void 0&&t.set("retries",String(e.retries));const n=t.toString(),r=await fetch(`${se}/api/mcp/check${n?`?${n}`:""}`);if(!r.ok){const s=await r.json().catch(()=>({}));throw new Error(s.error||"Failed to check MCP health")}return r.json()},async startChatSession(){const e=await fetch(`${se}/api/chat/start`,{method:"POST"});if(!e.ok)throw new Error("Failed to start chat session");return e.json()},async sendChatMessage(e,t){const n=await fetch(`${se}/api/chat/${encodeURIComponent(e)}/message`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({message:t})});if(!n.ok){const r=await n.json().catch(()=>({}));throw new Error(r.error||"Failed to send chat message")}return n.json()}};function fh(e={}){const{autoReconnect:t=!0,reconnectDelay:n=2e3,maxReconnectAttempts:r=10,onMessage:s}=e,[l,a]=S.useState("disconnected"),[o,u]=S.useState(null),d=S.useRef(null),y=S.useRef(0),m=S.useRef(null),x=S.useRef(s);x.current=s;const g=S.useCallback(()=>e.url?e.url:`${window.location.protocol==="https:"?"wss:":"ws:"}//${window.location.host}/ws`,[e.url]),w=S.useCallback(()=>{var f;if(((f=d.current)==null?void 0:f.readyState)===WebSocket.OPEN)return;const c=g();a("connecting");try{const p=new WebSocket(c);d.current=p,p.onopen=()=>{a("connected"),y.current=0},p.onmessage=v=>{var E;try{const k=JSON.parse(v.data);u(k),(E=x.current)==null||E.call(x,k)}catch{}},p.onclose=()=>{if(a("disconnected"),d.current=null,t&&y.current<r){y.current++;const v=n*Math.min(y.current,5);m.current=setTimeout(w,v)}},p.onerror=()=>{a("error")}}catch{a("error")}},[g,t,n,r]),j=S.useCallback(()=>{var c;m.current&&(clearTimeout(m.current),m.current=null),y.current=r,(c=d.current)==null||c.close(),d.current=null,a("disconnected")},[r]),_=S.useCallback(c=>{var f;((f=d.current)==null?void 0:f.readyState)===WebSocket.OPEN&&d.current.send(JSON.stringify(c))},[]);return S.useEffect(()=>(w(),()=>{var c;m.current&&clearTimeout(m.current),(c=d.current)==null||c.close()}),[w]),{status:l,lastMessage:o,connect:w,disconnect:j,send:_}}function Qn({type:e,title:t,message:n}){const r=e==="loading"?i.jsx(Jo,{size:18,className:"animate-spin text-[color:var(--accent)]"}):e==="error"?i.jsx(rh,{size:18,className:"text-[color:var(--danger)]"}):i.jsx(Ay,{size:18,className:"text-[color:var(--text-muted)]"});return i.jsxs("div",{className:"rounded-xl border border-dashed border-[color:var(--line)] px-4 py-6 text-center bg-[color:var(--surface-subtle)]",children:[i.jsx("div",{className:"flex justify-center mb-2",children:r}),i.jsx("div",{className:"text-sm font-medium text-[color:var(--text-strong)]",children:t}),n&&i.jsx("p",{className:"text-xs text-[color:var(--text-muted)] mt-1",children:n})]})}const By={running:"bg-[color:var(--info-soft)] text-[color:var(--info)]",success:"bg-[color:var(--success-soft)] text-[color:var(--success)]",danger:"bg-[color:var(--danger-soft)] text-[color:var(--danger)]",warning:"bg-[color:var(--warning-soft)] text-[color:var(--warning)]",neutral:"bg-[color:var(--surface-subtle)] text-[color:var(--text-muted)]"};function Hy({tone:e,label:t}){return i.jsx("span",{className:`inline-flex items-center rounded-full px-2 py-0.5 text-[11px] font-semibold ${By[e]}`,children:t})}function Ky({selectedId:e,onSelect:t,activeRunId:n}){const[r,s]=S.useState(""),[l,a]=S.useState(""),{data:o,isLoading:u}=Se({queryKey:["task-history",r,l],queryFn:()=>Z.getTaskHistory({limit:50,search:r||void 0,status:l||void 0}),placeholderData:m=>m,refetchInterval:!1,refetchOnWindowFocus:!1,refetchOnReconnect:!1}),d=(o==null?void 0:o.items)??[],y=(o==null?void 0:o.activeRunId)??n;return i.jsxs("div",{className:"flex flex-col h-full",children:[i.jsxs("button",{onClick:()=>t(null),className:`flex items-center gap-2 w-full px-3 py-2.5 mb-3 rounded-lg text-sm font-medium transition-colors ${e===null?"bg-blue-600 text-white shadow-sm":"bg-gray-50 text-gray-700 hover:bg-gray-100 border border-gray-200"}`,children:[i.jsx(oh,{size:16}),"New Task"]}),i.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[i.jsxs("div",{className:"relative flex-1",children:[i.jsx($y,{size:14,className:"absolute left-2.5 top-1/2 -translate-y-1/2 text-gray-400"}),i.jsx("input",{value:r,onChange:m=>s(m.target.value),className:"w-full pl-8 pr-3 py-1.5 text-xs border border-gray-200 rounded-md bg-white focus:outline-none focus:ring-2 focus:ring-blue-200",placeholder:"Search tasks..."})]}),i.jsxs("select",{value:l,onChange:m=>a(m.target.value),className:"text-xs border border-gray-200 rounded-md px-2 py-1.5 bg-white text-gray-600 focus:outline-none focus:ring-2 focus:ring-blue-200",children:[i.jsx("option",{value:"",children:"All"}),i.jsx("option",{value:"running",children:"Running"}),i.jsx("option",{value:"completed",children:"Completed"}),i.jsx("option",{value:"failed",children:"Failed"})]})]}),i.jsxs("div",{className:"flex-1 overflow-y-auto -mx-1 px-1 space-y-1",style:{scrollbarGutter:"stable"},children:[u&&d.length===0&&i.jsx(Qn,{type:"loading",title:"Loading tasks..."}),!u&&d.length===0&&i.jsx(Qn,{type:"empty",title:"No tasks yet",message:"Create a new task to get started."}),d.map(m=>i.jsx(Vy,{item:m,isSelected:e===m.id,isActive:m.id===y,onClick:()=>t(m.id)},m.id))]})]})}function Vy({item:e,isSelected:t,isActive:n,onClick:r}){return i.jsx("button",{onClick:r,className:`w-full text-left rounded-lg p-2.5 transition-colors ${t?"bg-blue-50 border border-blue-200":"hover:bg-gray-50 border border-transparent"}`,children:i.jsxs("div",{className:"flex items-start gap-2",children:[i.jsx(Wy,{status:e.status,isActive:n}),i.jsxs("div",{className:"flex-1 min-w-0",children:[i.jsx("div",{className:"text-sm font-medium text-gray-800 truncate leading-tight",children:e.input||e.summary||"Untitled Task"}),e.summary&&e.summary!==e.input&&i.jsx("div",{className:"text-xs text-gray-500 truncate mt-0.5",children:e.summary}),i.jsxs("div",{className:"flex items-center gap-2 mt-1",children:[i.jsx(Hy,{tone:e.status==="running"||n?"running":e.status==="completed"?"success":"danger",label:e.status==="running"||n?"running":e.status}),i.jsx("span",{className:"text-[10px] text-gray-400",children:qy(e.createdAt)}),e.duration!=null&&i.jsxs("span",{className:"flex items-center gap-0.5 text-[10px] text-gray-400",children:[i.jsx(Xo,{size:10}),Gy(e.duration)]})]})]})]})})}function Wy({status:e,isActive:t}){return e==="running"||t?i.jsx("div",{className:"mt-0.5 shrink-0",children:i.jsx(Jo,{size:14,className:"text-blue-500 animate-spin"})}):e==="completed"?i.jsx("div",{className:"mt-0.5 shrink-0",children:i.jsx(_s,{size:14,className:"text-green-500"})}):i.jsx("div",{className:"mt-0.5 shrink-0",children:i.jsx(Kl,{size:14,className:"text-red-400"})})}function qy(e){const n=Date.now()-e;return n<6e4?"just now":n<36e5?`${Math.floor(n/6e4)}m ago`:n<864e5?`${Math.floor(n/36e5)}h ago`:n<6048e5?`${Math.floor(n/864e5)}d ago`:new Date(e).toLocaleDateString()}function Gy(e){if(e<1e3)return"<1s";const t=Math.floor(e/1e3);return t<60?`${t}s`:`${Math.floor(t/60)}m`}function Xy({onSubmit:e,isRunning:t}){const[n,r]=S.useState(""),[s,l]=S.useState(!1),[a,o]=S.useState(""),[u,d]=S.useState(""),[y,m]=S.useState(""),x=S.useMemo(()=>[{label:"Summarize Repo",text:"Summarize the current repository structure and key files."},{label:"Run Tests",text:"Run the test suite and report any failures."},{label:"Explain Changes",text:"Explain the recent changes in this repo."},{label:"Plan Tasks",text:"Create a step-by-step plan to complete this task."}],[]),g=()=>{const c=[];a.trim()&&c.push(`Goal: ${a.trim()}`);const f=u.split(/\n|;/).map(v=>v.trim()).filter(Boolean);f.length>0&&c.push(`Constraints:
226
- - ${f.join(`
227
- - `)}`);const p=y.split(/\n|;/).map(v=>v.trim()).filter(Boolean);return p.length>0&&c.push(`Success Criteria:
228
- - ${p.join(`
229
- - `)}`),c.join(`
230
- `)},w=()=>{const c=g();c&&(r(f=>{if(!f.trim())return c;const v=f.endsWith(`
231
- `)?`
232
- `:`
233
-
234
- `;return`${f}${v}${c}`}),l(!1))},j=()=>{const c=n.trim();!c||t||(e(c),r(""),o(""),d(""),m(""))},_=c=>{c.key==="Enter"&&(c.metaKey||c.ctrlKey)&&(c.preventDefault(),j())};return i.jsxs("div",{className:"flex flex-col h-full",children:[i.jsxs("div",{className:"flex items-center justify-between mb-4",children:[i.jsxs("div",{children:[i.jsx("h2",{className:"text-lg font-semibold text-gray-900",children:"New Task"}),i.jsx("p",{className:"text-xs text-gray-500 mt-0.5",children:"Use Tasks for tracked execution. Use Chat for exploratory discussion."})]}),i.jsxs("button",{onClick:()=>l(!s),className:"flex items-center gap-1.5 px-3 py-1.5 text-xs rounded-md border border-gray-200 text-gray-600 hover:bg-gray-50 transition-colors",children:[i.jsx(ch,{size:14}),"Structured Prompt"]})]}),i.jsx("div",{className:"flex flex-wrap gap-2 mb-3",children:x.map(c=>i.jsx("button",{onClick:()=>r(c.text),className:"px-3 py-1 rounded-full text-xs border border-gray-200 bg-gray-50 hover:bg-gray-100 text-gray-600 transition-colors",children:c.label},c.label))}),s&&i.jsxs("div",{className:"bg-gray-50 rounded-lg border border-gray-200 p-4 mb-3",children:[i.jsxs("div",{className:"flex items-center justify-between mb-3",children:[i.jsx("span",{className:"text-sm font-medium text-gray-700",children:"Structured Prompt"}),i.jsx("button",{onClick:()=>l(!1),className:"text-gray-400 hover:text-gray-600",children:i.jsx(dh,{size:14})})]}),i.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-3",children:[i.jsxs("div",{children:[i.jsx("label",{className:"text-xs text-gray-500 mb-1 block",children:"Goal"}),i.jsx("input",{value:a,onChange:c=>o(c.target.value),className:"w-full border border-gray-200 rounded-md p-2 text-sm bg-white focus:outline-none focus:ring-2 focus:ring-blue-200",placeholder:"What should be achieved?"})]}),i.jsxs("div",{children:[i.jsx("label",{className:"text-xs text-gray-500 mb-1 block",children:"Constraints"}),i.jsx("textarea",{value:u,onChange:c=>d(c.target.value),rows:2,className:"w-full border border-gray-200 rounded-md p-2 text-sm bg-white focus:outline-none focus:ring-2 focus:ring-blue-200",placeholder:"One per line or semicolons"})]}),i.jsxs("div",{children:[i.jsx("label",{className:"text-xs text-gray-500 mb-1 block",children:"Success Criteria"}),i.jsx("textarea",{value:y,onChange:c=>m(c.target.value),rows:2,className:"w-full border border-gray-200 rounded-md p-2 text-sm bg-white focus:outline-none focus:ring-2 focus:ring-blue-200",placeholder:"What does success look like?"})]})]}),i.jsx("button",{onClick:w,className:"mt-3 px-3 py-1.5 rounded text-xs text-white bg-blue-600 hover:bg-blue-700 transition-colors",children:"Apply to Input"})]}),i.jsxs("div",{className:"flex-1 flex flex-col",children:[i.jsx("textarea",{value:n,onChange:c=>r(c.target.value),onKeyDown:_,rows:6,className:"flex-1 min-h-[120px] w-full border border-gray-200 rounded-lg p-3 text-sm focus:outline-none focus:ring-2 focus:ring-blue-200 resize-none",placeholder:"Describe what you want Lydia to do..."}),i.jsxs("div",{className:"flex items-center justify-between mt-3",children:[i.jsxs("span",{className:"text-xs text-gray-400",children:[navigator.platform.includes("Mac")?"Cmd":"Ctrl","+Enter to submit"]}),i.jsxs("button",{onClick:j,disabled:t||!n.trim(),className:`flex items-center gap-2 px-4 py-2 rounded-lg text-white text-sm font-medium transition-colors ${t||!n.trim()?"bg-gray-300 cursor-not-allowed":"bg-blue-600 hover:bg-blue-700 shadow-sm"}`,children:[i.jsx(oh,{size:16}),t?"Running...":"Run Task"]})]})]})]})}function Yy({runId:e,input:t,startedAt:n,streamText:r,agentEvents:s,activeTools:l,isRunning:a,wsStatus:o,pendingPrompt:u,promptResponse:d,onPromptResponseChange:y,onPromptSubmit:m,lastResult:x,error:g,onContinueInChat:w}){const j=S.useRef(null),_=Zy(n,a);return S.useEffect(()=>{j.current&&(j.current.scrollTop=j.current.scrollHeight)},[r,s.length]),i.jsxs("div",{className:"flex flex-col h-full",children:[i.jsxs("div",{className:"flex items-center justify-between pb-3 mb-3 border-b border-gray-100",children:[i.jsxs("div",{className:"flex-1 min-w-0",children:[i.jsx("h2",{className:"text-sm font-semibold text-gray-900 truncate",children:t}),i.jsxs("div",{className:"flex items-center gap-3 mt-1",children:[i.jsx("span",{className:`inline-flex items-center gap-1.5 text-xs font-medium ${a?"text-blue-600":g?"text-red-600":"text-green-600"}`,children:a?i.jsxs(i.Fragment,{children:[i.jsx(Jo,{size:12,className:"animate-spin"}),u?"Waiting for input":"Running"]}):g?i.jsxs(i.Fragment,{children:[i.jsx(Ka,{size:12}),"Failed"]}):"Completed"}),i.jsxs("span",{className:"flex items-center gap-1 text-xs text-gray-400",children:[i.jsx(Xo,{size:12}),Jy(_)]}),l.length>0&&i.jsxs("span",{className:"flex items-center gap-1 text-xs text-blue-500",children:[i.jsx(Zo,{size:12}),l[0]]})]})]}),i.jsxs("div",{className:"flex items-center gap-2",children:[o==="connected"&&i.jsxs("span",{className:"flex items-center gap-1 text-xs text-green-500",children:[i.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-green-500 animate-pulse"}),"Live"]}),w&&i.jsx("button",{onClick:()=>w(`Continue helping with task "${t}". Current status: ${a?"running":g?"failed":"completed"}.${r?` Latest output:
235
- ${r.slice(-1200)}`:""}${g?`
236
- Error: ${g}`:""}`),className:"px-2 py-1 rounded-md border border-gray-200 text-xs text-gray-600 hover:bg-gray-50",children:"Continue In Chat"})]})]}),(r||x)&&i.jsxs("div",{ref:j,className:"flex-1 min-h-0 bg-gray-50 rounded-lg p-3 mb-3 text-sm whitespace-pre-wrap font-mono overflow-y-auto leading-relaxed",children:[r||x,a&&!u&&i.jsx("span",{className:"animate-pulse text-blue-500",children:"..."})]}),g&&i.jsxs("div",{className:"bg-red-50 border border-red-200 rounded-lg p-3 mb-3 text-sm text-red-700",children:[i.jsxs("div",{className:"flex items-center gap-2 font-medium mb-1",children:[i.jsx(Ka,{size:14}),"Task Failed"]}),g]}),u&&i.jsxs("div",{className:"bg-amber-50 border border-amber-200 rounded-lg p-4 mb-3",children:[i.jsxs("div",{className:"flex items-center gap-2 text-sm font-medium text-amber-800 mb-2",children:[i.jsx(ah,{size:14}),"Confirmation Required"]}),i.jsx("p",{className:"text-sm text-amber-700 whitespace-pre-wrap mb-3",children:u.prompt}),i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("input",{value:d,onChange:c=>y(c.target.value),onKeyDown:c=>{c.key==="Enter"&&(c.preventDefault(),m())},className:"flex-1 border border-amber-200 rounded-md p-2 text-sm bg-white focus:outline-none focus:ring-2 focus:ring-amber-300",placeholder:"Type your response (yes/no/always)...",autoFocus:!0}),i.jsx("button",{onClick:m,className:"px-4 py-2 rounded-md text-white text-sm bg-amber-600 hover:bg-amber-700 transition-colors",children:"Send"})]})]}),s.length>0&&i.jsxs("div",{className:"border-t border-gray-100 pt-3",children:[i.jsx("div",{className:"text-xs font-medium text-gray-500 mb-2",children:"Event Log"}),i.jsx("div",{className:"space-y-0.5 max-h-40 overflow-y-auto",children:s.slice(-30).map((c,f)=>{var p,v,E,k,C,N,z,R,K,Y,ne,V,G,M,Q,T,L,I,B,P,$,te,A,ye,Ke,Or,zr,Fr,Lr,Ir,Dr,Ar,$r,Ur,pe;return i.jsxs("div",{className:"flex items-start gap-2 text-xs text-gray-500 py-0.5",children:[i.jsx("span",{className:"text-gray-300 shrink-0 tabular-nums",children:new Date(c.timestamp).toLocaleTimeString()}),c.type==="tool:start"&&i.jsxs("span",{className:"text-blue-600",children:["⚙ ",(p=c.data)==null?void 0:p.name]}),c.type==="tool:complete"&&i.jsxs("span",{className:"text-green-600",children:["✓ ",(v=c.data)==null?void 0:v.name," (",(E=c.data)==null?void 0:E.duration,"ms)"]}),c.type==="tool:error"&&i.jsxs("span",{className:"text-red-600",children:["✗ ",(k=c.data)==null?void 0:k.name,": ",(C=c.data)==null?void 0:C.error]}),c.type==="message"&&i.jsx("span",{className:"text-gray-600 truncate",children:(z=(N=c.data)==null?void 0:N.text)==null?void 0:z.substring(0,80)}),c.type==="thinking"&&i.jsx("span",{className:"text-gray-400 italic",children:"thinking..."}),c.type==="retry"&&i.jsxs("span",{className:"text-yellow-600",children:["↻ Retry ",(R=c.data)==null?void 0:R.attempt,"/",(K=c.data)==null?void 0:K.maxRetries]}),c.type==="task:error"&&i.jsxs("span",{className:"text-red-600",children:["task failed: ",((Y=c.data)==null?void 0:Y.error)||"unknown error"]}),c.type==="task:resume"&&i.jsxs("span",{className:"text-blue-600",children:["resumed from iteration ",((ne=c.data)==null?void 0:ne.fromIteration)??"?"]}),c.type==="checkpoint:saved"&&i.jsxs("span",{className:"text-gray-600",children:["checkpoint saved (iteration ",((V=c.data)==null?void 0:V.iteration)??"?",")"]}),c.type==="checkpoint:error"&&i.jsxs("span",{className:"text-red-600",children:["checkpoint error: ",((G=c.data)==null?void 0:G.error)||"unknown error"]}),c.type==="phase:start"&&i.jsxs("span",{className:"text-sky-600",children:["phase started: ",((M=c.data)==null?void 0:M.phase)||"unknown"]}),c.type==="phase:end"&&i.jsxs("span",{className:"text-sky-600",children:["phase ended: ",((Q=c.data)==null?void 0:Q.phase)||"unknown"]}),c.type==="intent"&&i.jsxs("span",{className:"text-cyan-700",children:["intent: ",((L=(T=c.data)==null?void 0:T.intent)==null?void 0:L.summary)||((B=(I=c.data)==null?void 0:I.intent)==null?void 0:B.goal)||"analyzed"]}),c.type==="plan"&&i.jsxs("span",{className:"text-cyan-700",children:["plan generated (",Array.isArray((P=c.data)==null?void 0:P.steps)?c.data.steps.length:0," step(s))"]}),c.type==="plan:error"&&i.jsxs("span",{className:"text-red-600",children:["plan error: ",(($=c.data)==null?void 0:$.error)||"unknown error"]}),c.type==="max_iterations"&&i.jsxs("span",{className:"text-orange-600",children:["max iterations reached (",((te=c.data)==null?void 0:te.iterations)??"?",")"]}),c.type==="skill:error"&&i.jsxs("span",{className:"text-red-600",children:["skill error: ",((A=c.data)==null?void 0:A.error)||"unknown error"]}),c.type==="computer-use:session.start"&&i.jsxs("span",{className:"text-indigo-600",children:["computer-use session started (",(ye=c.data)==null?void 0:ye.sessionId,")"]}),c.type==="computer-use:action.dispatch"&&i.jsxs("span",{className:"text-indigo-600",children:["action ",(Ke=c.data)==null?void 0:Ke.actionId,": ",(Or=c.data)==null?void 0:Or.canonicalAction," [",(zr=c.data)==null?void 0:zr.riskLevel,"]"]}),c.type==="computer-use:observation.collect"&&i.jsxs("span",{className:"text-indigo-600",children:["frame ",(Fr=c.data)==null?void 0:Fr.frameId," collected (",(Lr=c.data)==null?void 0:Lr.blocks," block(s))"]}),c.type==="computer-use:checkpoint.save"&&i.jsxs("span",{className:"text-indigo-600",children:["checkpoint saved (failures: ",((Ir=c.data)==null?void 0:Ir.verificationFailures)??0,")"]}),c.type==="computer-use:verification"&&i.jsxs("span",{className:(Dr=c.data)!=null&&Dr.ok?"text-green-600":"text-red-600",children:["verification: ",(Ar=c.data)!=null&&Ar.ok?"ok":"failed",($r=c.data)!=null&&$r.code?` (${c.data.code})`:""]}),c.type==="computer-use:session.end"&&i.jsxs("span",{className:"text-indigo-600",children:["session ended (",(Ur=c.data)==null?void 0:Ur.sessionId,") with ",((pe=c.data)==null?void 0:pe.verificationFailures)??0," verification failure(s)"]})]},f)})})]})]})}function Jy(e){if(e<1e3)return`${e}ms`;const t=Math.floor(e/1e3);if(t<60)return`${t}s`;const n=Math.floor(t/60),r=t%60;return`${n}m ${r}s`}function Zy(e,t){const[n,r]=S.useState(Date.now()-e);return S.useEffect(()=>{if(!t){r(Date.now()-e);return}const s=setInterval(()=>{r(Date.now()-e)},1e3);return()=>clearInterval(s)},[e,t]),n}const ex={default:"bg-white border border-[color:var(--line)] shadow-[var(--shadow-soft)]",subtle:"bg-[color:var(--surface-subtle)] border border-[color:var(--line)]",accent:"bg-[color:var(--surface-accent)] border border-[color:var(--line-strong)] shadow-[var(--shadow-soft)]"};function ft({title:e,subtitle:t,actions:n,children:r,tone:s="default",className:l="",contentClassName:a=""}){return i.jsxs("section",{className:`rounded-2xl ${ex[s]} ${l}`,children:[(e||t||n)&&i.jsxs("header",{className:"flex items-start justify-between gap-4 p-4 border-b border-[color:var(--line)]",children:[i.jsxs("div",{children:[e&&i.jsx("h3",{className:"text-sm font-semibold text-[color:var(--text-strong)]",children:e}),t&&i.jsx("p",{className:"text-xs text-[color:var(--text-muted)] mt-1",children:t})]}),n&&i.jsx("div",{children:n})]}),i.jsx("div",{className:`p-4 ${a}`.trim(),children:r})]})}function tx({taskId:e,onResumeTask:t,onContinueInChat:n}){var m,x;const{data:r,isLoading:s,error:l}=Se({queryKey:["task-detail",e],queryFn:()=>Z.getTaskDetail(e),retry:1}),{data:a}=Se({queryKey:["resumable-tasks"],queryFn:()=>Z.getResumableTasks(),staleTime:5e3}),o=(m=a==null?void 0:a.items)==null?void 0:m.some(g=>g.taskId===e),u=(x=a==null?void 0:a.items)==null?void 0:x.find(g=>g.taskId===e);if(s)return i.jsx("div",{className:"max-w-3xl",children:i.jsx(Qn,{type:"loading",title:"Loading task details..."})});if(l||!r)return o&&u?i.jsxs("div",{className:"space-y-4",children:[i.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[i.jsx(Ka,{size:20,className:"text-amber-500"}),i.jsx("h2",{className:"text-lg font-semibold text-gray-800",children:"Interrupted Task"})]}),i.jsxs("div",{className:"bg-amber-50 border border-amber-200 rounded-lg p-4",children:[i.jsx("p",{className:"text-sm text-amber-800 font-medium mb-1",children:"This task was interrupted and can be resumed."}),i.jsxs("p",{className:"text-xs text-amber-600",children:["Stopped at iteration ",u.iteration," · Last checkpoint: ",new Date(u.updatedAt).toLocaleString()]}),i.jsx("p",{className:"text-sm text-gray-700 mt-2",children:u.input})]}),t&&i.jsxs("button",{onClick:()=>t(e),className:"flex items-center gap-2 px-4 py-2 bg-blue-600 text-white rounded-lg text-sm font-medium hover:bg-blue-700 transition-colors",children:[i.jsx(Wa,{size:14}),"Resume Task"]})]}):i.jsx("div",{className:"max-w-3xl",children:i.jsx(Qn,{type:"error",title:"Task detail unavailable",message:l?String(l.message||l):"Task not found"})});const d=r.status==="completed",y=r.report;return i.jsxs("div",{className:"space-y-5 max-w-3xl",children:[i.jsxs("div",{className:"flex items-start justify-between gap-3",children:[i.jsxs("div",{className:"flex items-start gap-3",children:[d?i.jsx(_s,{size:20,className:"text-green-500 mt-0.5 shrink-0"}):i.jsx(Kl,{size:20,className:"text-red-400 mt-0.5 shrink-0"}),i.jsxs("div",{children:[i.jsx("h2",{className:"text-lg font-semibold text-gray-800 leading-tight",children:(y==null?void 0:y.intentSummary)||r.input||"Task"}),i.jsxs("div",{className:"flex items-center gap-3 mt-1 text-xs text-gray-400",children:[i.jsx("span",{className:d?"text-green-600":"text-red-500",children:d?"Completed":"Failed"}),i.jsx("span",{children:"·"}),i.jsx("span",{children:new Date(r.createdAt).toLocaleString()}),r.duration!=null&&i.jsxs(i.Fragment,{children:[i.jsx("span",{children:"·"}),i.jsxs("span",{className:"flex items-center gap-1",children:[i.jsx(Xo,{size:10}),lx(r.duration)]})]})]})]})]}),i.jsxs("div",{className:"flex items-center gap-2 shrink-0",children:[n&&i.jsx("button",{onClick:()=>{var g;return n(`Continue helping with task "${(y==null?void 0:y.intentSummary)||r.input}".
237
- Status: ${r.status}.${y!=null&&y.summary?`
238
- Summary: ${y.summary}`:""}${(g=y==null?void 0:y.followUps)!=null&&g.length?`
239
- Follow-ups:
240
- - ${y.followUps.join(`
241
- - `)}`:""}`)},className:"flex items-center gap-1.5 px-3 py-1.5 border border-gray-200 text-gray-600 rounded-md text-xs font-medium hover:bg-gray-50 transition-colors",children:"Continue In Chat"}),o&&t&&i.jsxs("button",{onClick:()=>t(e),className:"flex items-center gap-1.5 px-3 py-1.5 bg-blue-600 text-white rounded-md text-xs font-medium hover:bg-blue-700 transition-colors",children:[i.jsx(Wa,{size:12}),"Resume"]})]})]}),(y==null?void 0:y.summary)&&i.jsx(ft,{tone:"subtle",children:i.jsx("p",{className:"text-sm text-gray-700",children:y.summary})}),(y==null?void 0:y.outputs)&&y.outputs.length>0&&i.jsxs("div",{children:[i.jsx("h3",{className:"text-xs font-semibold text-gray-500 uppercase tracking-wider mb-2",children:"Outputs"}),i.jsx("ul",{className:"space-y-1.5",children:y.outputs.map((g,w)=>i.jsxs("li",{className:"flex items-start gap-2 text-sm text-gray-700",children:[i.jsx("span",{className:"text-gray-400 mt-0.5",children:"→"}),i.jsx("span",{children:g})]},w))})]}),(y==null?void 0:y.steps)&&y.steps.length>0&&i.jsxs("div",{children:[i.jsx("h3",{className:"text-xs font-semibold text-gray-500 uppercase tracking-wider mb-2",children:"Steps"}),i.jsx("div",{className:"space-y-1",children:y.steps.map((g,w)=>i.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[g.status==="completed"?i.jsx(_s,{size:12,className:"text-green-500 shrink-0"}):i.jsx(Kl,{size:12,className:"text-red-400 shrink-0"}),i.jsx("span",{className:"text-gray-700",children:g.stepId}),i.jsxs("span",{className:"text-gray-400 text-xs",children:["(",g.status,")"]})]},w))})]}),(y==null?void 0:y.followUps)&&y.followUps.length>0&&i.jsxs("div",{children:[i.jsx("h3",{className:"text-xs font-semibold text-gray-500 uppercase tracking-wider mb-2",children:"Follow-ups"}),i.jsx("ul",{className:"space-y-1",children:y.followUps.map((g,w)=>i.jsxs("li",{className:"flex items-start gap-2 text-sm text-gray-600",children:[i.jsx("span",{className:"text-gray-400",children:"•"}),i.jsx("span",{children:g})]},w))})]}),r.traces&&r.traces.length>0&&i.jsxs("div",{children:[i.jsxs("h3",{className:"text-xs font-semibold text-gray-500 uppercase tracking-wider mb-2",children:["Tool Traces (",r.traces.length,")"]}),i.jsx("div",{className:"space-y-1",children:r.traces.map((g,w)=>i.jsx(nx,{trace:g},w))})]}),r.evidence&&r.evidence.length>0&&i.jsxs("div",{children:[i.jsxs("h3",{className:"text-xs font-semibold text-gray-500 uppercase tracking-wider mb-2",children:["Evidence Timeline (",r.evidence.length,")"]}),i.jsx("div",{className:"space-y-1",children:r.evidence.slice(0,30).map((g,w)=>{const j=Array.isArray(g.blocks)?g.blocks.map(_=>_.type).join(", "):"unknown";return i.jsxs("div",{className:"text-xs border border-gray-100 rounded-md px-3 py-2 bg-gray-50/60 space-y-1",children:[i.jsxs("div",{className:"flex items-center justify-between gap-2",children:[i.jsx("span",{className:"font-medium text-gray-700",children:g.actionId}),i.jsx("span",{className:"text-gray-400",children:new Date(g.createdAt).toLocaleTimeString()})]}),i.jsxs("div",{className:"text-gray-500",children:[g.frameId," | session: ",g.sessionId," | ",j]}),i.jsx("div",{className:"space-y-1",children:(Array.isArray(g.blocks)?g.blocks:[]).map((_,c)=>i.jsx("div",{className:"rounded bg-white border border-gray-100 px-2 py-1 text-gray-600",children:sx(_)},c))})]},w)})})]})]})}function nx({trace:e}){const[t,n]=S.useState(!1),r=e.status==="success";return i.jsxs("div",{className:"border border-gray-100 rounded-md",children:[i.jsxs("button",{onClick:()=>n(!t),className:"flex items-center gap-2 w-full px-3 py-1.5 text-left text-sm hover:bg-gray-50 transition-colors",children:[t?i.jsx(lh,{size:12}):i.jsx(Ty,{size:12}),r?i.jsx(_s,{size:12,className:"text-green-500"}):i.jsx(Kl,{size:12,className:"text-red-400"}),i.jsx("span",{className:"font-medium text-gray-700",children:e.tool_name}),i.jsxs("span",{className:"text-xs text-gray-400 ml-auto",children:[e.duration,"ms"]})]}),t&&i.jsxs("div",{className:"px-3 pb-2 space-y-1",children:[e.tool_args&&i.jsxs("div",{children:[i.jsx("span",{className:"text-[10px] font-semibold text-gray-400 uppercase",children:"Args"}),i.jsx("pre",{className:"text-xs text-gray-600 bg-gray-50 rounded p-2 overflow-x-auto max-h-32",children:rx(e.tool_args)})]}),e.tool_output&&i.jsxs("div",{children:[i.jsx("span",{className:"text-[10px] font-semibold text-gray-400 uppercase",children:"Output"}),i.jsx("pre",{className:"text-xs text-gray-600 bg-gray-50 rounded p-2 overflow-x-auto max-h-40",children:vl(typeof e.tool_output=="string"?e.tool_output:JSON.stringify(e.tool_output,null,2),2e3)})]})]})]})}function rx(e){try{return JSON.stringify(JSON.parse(e),null,2)}catch{return e}}function vl(e,t){return e.length<=t?e:e.substring(0,t)+`
242
- ... (${e.length-t} more chars)`}function sx(e){if(!e||typeof e!="object")return"unknown block";if(e.type==="text")return`text: ${vl(String(e.text||""),220)}`;if(e.type==="image"){const t=String(e.dataRef||"");return t.startsWith("data:image/")?i.jsxs("div",{className:"space-y-1",children:[i.jsx("div",{children:`image: ${e.mediaType||"unknown"} (inline preview)`}),i.jsx("img",{src:t,alt:"evidence preview",className:"max-h-40 rounded border border-gray-200"})]}):`image: ${e.mediaType||"unknown"} (${t||"no-ref"})`}if(e.type==="artifact_ref")return`artifact (${e.kind||"unknown"}): ${e.path||"unknown path"}`;if(e.type==="structured_json"){const t=e.payload&&typeof e.payload=="object"?JSON.stringify(e.payload):String(e.payload||"");return`json: ${vl(t,220)}`}return`${e.type}: ${vl(JSON.stringify(e),220)}`}function lx(e){if(e<1e3)return`${e}ms`;const t=Math.floor(e/1e3);if(t<60)return`${t}s`;const n=Math.floor(t/60),r=t%60;return`${n}m ${r}s`}function ix({selectedId:e,isRunning:t,onSubmitTask:n,onResumeTask:r,onContinueInChat:s,activeRunId:l,activeInput:a,activeStartedAt:o,streamText:u,agentEvents:d,activeTools:y,wsStatus:m,pendingPrompt:x,promptResponse:g,onPromptResponseChange:w,onPromptSubmit:j,lastResult:_,liveError:c}){return e===null?i.jsx("div",{className:"h-full",children:i.jsx(Xy,{onSubmit:n,isRunning:!!l})}):e===l&&l?i.jsx("div",{className:"h-full",children:i.jsx(Yy,{runId:l,input:a,startedAt:o,streamText:u,agentEvents:d,activeTools:y,isRunning:t,wsStatus:m,pendingPrompt:x,promptResponse:g,onPromptResponseChange:w,onPromptSubmit:j,lastResult:_,error:c,onContinueInChat:s})}):i.jsx("div",{className:"h-full overflow-auto",children:i.jsx(tx,{taskId:e,onResumeTask:r,onContinueInChat:s})})}function ax({onContinueInChat:e}){const[t,n]=S.useState(null),r=oi(),[s,l]=S.useState(null),[a,o]=S.useState(""),[u,d]=S.useState(0),[y,m]=S.useState(!1),[x,g]=S.useState(null),[w,j]=S.useState(null),[_,c]=S.useState(null),[f,p]=S.useState(""),[v,E]=S.useState(""),[k,C]=S.useState([]),[N,z]=S.useState({}),R=S.useRef(""),K=S.useMemo(()=>Object.entries(N).filter(([,P])=>P>0).map(([P])=>P),[N]),Y=S.useCallback((P,$)=>{z(te=>{const A={...te},ye=A[P]||0,Ke=Math.max(0,ye+$);return Ke===0?delete A[P]:A[P]=Ke,A})},[]),ne=S.useCallback(()=>{r.invalidateQueries({queryKey:["task-history"]}),r.invalidateQueries({queryKey:["task-detail"]}),r.invalidateQueries({queryKey:["resumable-tasks"]}),r.invalidateQueries({queryKey:["memory-reports-summary"]})},[r]),V=S.useCallback(P=>{const $=(P==null?void 0:P.trim())||"Task failed.",te=R.current.trim();return te?`${te}
243
-
244
- Execution failed.
245
- Reason: ${$}`:`Execution failed.
246
- Reason: ${$}`},[]),G=S.useCallback(P=>{var $,te,A,ye,Ke,Or,zr,Fr,Lr,Ir,Dr,Ar,$r,Ur;switch(P.type){case"connected":l((($=P.data)==null?void 0:$.activeRunId)||null),m(!!((te=P.data)!=null&&te.activeRunId));break;case"task:start":l(((A=P.data)==null?void 0:A.runId)||null),o(((ye=P.data)==null?void 0:ye.description)||a),m(!0);break;case"task:resume":l(((Ke=P.data)==null?void 0:Ke.runId)||null),m(!0),C(pe=>[...pe,{type:"task:resume",data:P.data,timestamp:P.timestamp}]);break;case"stream:text":R.current+=((Or=P.data)==null?void 0:Or.text)||"",E(R.current);break;case"stream:thinking":case"thinking":C(pe=>[...pe,{type:"thinking",data:P.data,timestamp:P.timestamp}]);break;case"message":C(pe=>[...pe,{type:"message",data:P.data,timestamp:P.timestamp}]);break;case"tool:start":{const pe=((zr=P.data)==null?void 0:zr.name)||"unknown";Y(pe,1),C(Qr=>[...Qr,{type:"tool:start",data:P.data,timestamp:P.timestamp}]);break}case"tool:complete":{const pe=((Fr=P.data)==null?void 0:Fr.name)||"unknown";Y(pe,-1),C(Qr=>[...Qr,{type:"tool:complete",data:P.data,timestamp:P.timestamp}]);break}case"tool:error":{const pe=((Lr=P.data)==null?void 0:Lr.name)||"unknown";Y(pe,-1),C(Qr=>[...Qr,{type:"tool:error",data:P.data,timestamp:P.timestamp}]);break}case"task:complete":j(((Ir=P.data)==null?void 0:Ir.result)||"Task completed."),l(null),m(!1),ne();break;case"task:error":g(((Dr=P.data)==null?void 0:Dr.error)||"Task failed."),j(V(((Ar=P.data)==null?void 0:Ar.error)||"Task failed.")),C(pe=>[...pe,{type:"task:error",data:P.data,timestamp:P.timestamp}]),l(null),m(!1),ne();break;case"interaction_request":c({id:($r=P.data)==null?void 0:$r.id,prompt:(Ur=P.data)==null?void 0:Ur.prompt});break;case"retry":C(pe=>[...pe,{type:"retry",data:P.data,timestamp:P.timestamp}]);break;case"checkpoint:saved":case"checkpoint:error":case"phase:start":case"phase:end":case"intent":case"plan":case"plan:error":case"max_iterations":case"skill:error":case"computer-use:session.start":case"computer-use:action.dispatch":case"computer-use:observation.collect":case"computer-use:checkpoint.save":case"computer-use:verification":case"computer-use:session.end":C(pe=>[...pe,{type:P.type,data:P.data,timestamp:P.timestamp}]);break}},[a,Y,ne]),{status:M}=fh({onMessage:G}),Q=S.useCallback(()=>{g(null),j(null),E(""),R.current="",C([]),z({}),c(null),p("")},[]),T=S.useCallback(async P=>{Q(),o(P),d(Date.now());try{const $=await Z.runTask(P);l($.runId),m(!0),n($.runId)}catch($){const te=$.message||"Failed to run task.";g(te),j(V(te)),m(!1)}},[V,Q]),L=S.useCallback(async P=>{Q(),o("(resumed)"),d(Date.now());try{const $=await Z.resumeTask(P);l($.runId),m(!0),n($.runId),o(`Resumed from iteration ${$.fromIteration}`)}catch($){const te=$.message||"Failed to resume task.";g(te),j(V(te)),m(!1)}},[V,Q]),I=S.useCallback(async()=>{if(!(!s||!_))try{await Z.respondToTask(s,f||"yes"),c(null),p("")}catch(P){g(P.message||"Failed to send response.")}},[s,_,f]),B=S.useCallback(P=>{n(P)},[]);return i.jsx("div",{className:"h-full p-6",children:i.jsxs("div",{className:"h-full grid grid-cols-12 gap-4",children:[i.jsx("div",{className:"col-span-12 lg:col-span-4 xl:col-span-3 min-h-0",children:i.jsx(ft,{title:"Task Queue",subtitle:"Create, run, and inspect tracked tasks.",className:"h-full flex flex-col",children:i.jsx("div",{className:"h-[calc(100vh-210px)]",children:i.jsx(Ky,{selectedId:t,onSelect:B,activeRunId:s})})})}),i.jsx("div",{className:"col-span-12 lg:col-span-8 xl:col-span-9 min-h-0",children:i.jsx(ft,{title:t?"Task Detail":"Task Composer",subtitle:t?"Structured execution, report, and resume flow.":"Define what Lydia should execute.",className:"h-full flex flex-col",children:i.jsx("div",{className:"h-[calc(100vh-210px)]",children:i.jsx(ix,{selectedId:t,isRunning:y&&t===s,onSubmitTask:T,onResumeTask:L,onContinueInChat:e,activeRunId:s,activeInput:a,activeStartedAt:u,streamText:v,agentEvents:k,activeTools:K,wsStatus:M,pendingPrompt:_,promptResponse:f,onPromptResponseChange:p,onPromptSubmit:I,lastResult:w,liveError:x})})})})]})})}const hh="lydia.dashboard.chat.workspace";function qa(e){return`${e}-${Date.now()}-${Math.random().toString(36).slice(2,8)}`}function ox(e){return e instanceof Error&&e.message.trim().toLowerCase()==="session not found"}function ux(e){return/[\u3400-\u9fff]/.test(e)}function cx(e){const t=new Date(e);return Number.isNaN(t.getTime())?"":new Intl.DateTimeFormat("zh-CN",{hour:"2-digit",minute:"2-digit"}).format(t)}function dx(e,t){const n=e.trim(),r=t.trim();return n?n.includes(r)?n:`${n}
247
-
248
- 执行失败:${r}`:`执行失败:${r}`}function fx(){if(typeof window>"u")return{sessionId:null,input:"",messages:[]};try{const e=window.localStorage.getItem(hh);if(!e)return{sessionId:null,input:"",messages:[]};const t=JSON.parse(e);return{sessionId:typeof t.sessionId=="string"?t.sessionId:null,input:typeof t.input=="string"?t.input:"",messages:Array.isArray(t.messages)?t.messages.map(n=>({id:typeof(n==null?void 0:n.id)=="string"?n.id:qa("msg"),role:(n==null?void 0:n.role)==="assistant"?"assistant":"user",content:typeof(n==null?void 0:n.content)=="string"?n.content:"",createdAt:typeof(n==null?void 0:n.createdAt)=="string"&&n.createdAt?n.createdAt:new Date().toISOString(),thinking:typeof(n==null?void 0:n.thinking)=="string"?n.thinking:void 0,thinkingCollapsed:typeof(n==null?void 0:n.thinkingCollapsed)=="boolean"?n.thinkingCollapsed:!0,status:(n==null?void 0:n.status)==="streaming"||(n==null?void 0:n.status)==="error"?n.status:"complete"})):[]}}catch{return{sessionId:null,input:"",messages:[]}}}function hx({seedMessage:e,seedToken:t}){const n=S.useMemo(()=>fx(),[]),[r,s]=S.useState(n.sessionId),[l,a]=S.useState(n.input),[o,u]=S.useState(n.messages),[d,y]=S.useState(!1),[m,x]=S.useState(null),[g,w]=S.useState(null),[j,_]=S.useState(null),[c,f]=S.useState(null),p=S.useRef(null),v=S.useRef(null),E=S.useRef(n.sessionId);S.useEffect(()=>{v.current=g},[g]),S.useEffect(()=>{E.current=r},[r]),S.useEffect(()=>{typeof window>"u"||window.localStorage.setItem(hh,JSON.stringify({sessionId:r,input:l,messages:o}))},[l,o,r]),S.useEffect(()=>{!e||!t||a(e)},[e,t]),S.useEffect(()=>{Z.getSoul().then(_).catch(()=>{})},[]),S.useEffect(()=>{p.current&&(p.current.scrollTop=p.current.scrollHeight)},[o,d]),S.useEffect(()=>{if(!c)return;const M=window.setTimeout(()=>f(null),1800);return()=>window.clearTimeout(M)},[c]);const k=S.useCallback((M,Q)=>{u(T=>T.map(L=>L.id===M?Q(L):L))},[]),C=S.useCallback(async()=>{if(r)return r;const M=await Z.startChatSession();return E.current=M.sessionId,s(M.sessionId),M.sessionId},[r]),N=S.useCallback(()=>{E.current=null,s(null)},[]),z=S.useCallback(M=>{var L,I,B;const Q=(L=M.data)==null?void 0:L.sessionId,T=v.current;if(!(!T||!Q||Q!==E.current)){if(M.type==="chat:stream:text"){k(T,P=>{var $;return{...P,content:`${P.content}${(($=M.data)==null?void 0:$.text)||""}`,status:"streaming"}});return}if(M.type==="chat:stream:thinking"||M.type==="chat:thinking"){const P=typeof((I=M.data)==null?void 0:I.thinking)=="string"?M.data.thinking:"";if(!P)return;k(T,$=>({...$,thinking:`${$.thinking||""}${P}`,thinkingCollapsed:$.thinkingCollapsed??!0,status:$.status??"streaming"}));return}if(M.type==="chat:message"){const P=typeof((B=M.data)==null?void 0:B.text)=="string"?M.data.text:"";if(!P)return;k(T,$=>({...$,content:$.content||P,status:"streaming"}))}}},[k]),{status:R}=fh({onMessage:z}),K=S.useCallback(M=>{k(M,Q=>({...Q,thinkingCollapsed:!(Q.thinkingCollapsed??!0)}))},[k]),Y=S.useCallback(async M=>{const Q=M.content.trim();if(Q)try{await navigator.clipboard.writeText(Q),f(M.id)}catch{f(null)}},[]),ne=S.useCallback(()=>{N(),u([]),x(null),a("")},[N]),V=S.useCallback(async()=>{const M=l.trim();if(!M||d)return;const Q=new Date().toISOString(),T={id:qa("user"),role:"user",content:M,createdAt:Q,status:"complete"},L={id:qa("assistant"),role:"assistant",content:"",createdAt:Q,thinking:"",thinkingCollapsed:!0,status:"streaming"};x(null),y(!0),a(""),w(L.id),u(I=>[...I,T,L]);try{let I=await C(),B;try{B=await Z.sendChatMessage(I,M)}catch(P){if(!ox(P))throw P;N(),I=await Z.startChatSession().then($=>(E.current=$.sessionId,s($.sessionId),$.sessionId)),B=await Z.sendChatMessage(I,M)}k(L.id,P=>({...P,content:P.content||B.response||"",status:"complete"}))}catch(I){const B=I instanceof Error?I.message:"Failed to send chat message";x(B),k(L.id,P=>({...P,content:dx(P.content,B),status:"error"}))}finally{Z.getSoul().then(_).catch(()=>{}),y(!1),w(null)}},[C,l,d,N,k]),G=S.useCallback(M=>M.role==="assistant"?(j==null?void 0:j.assistantDisplayName)||"Lydia":(j==null?void 0:j.userDisplayName)||(ux(M.content)?"老板":"Boss"),[j]);return i.jsx("div",{className:"h-full px-7 py-5 overflow-hidden",children:i.jsxs(ft,{title:"聊天",subtitle:"用于快速干预的直接对话窗口。名字、会话和思考过程会在这里持续保留。",className:"h-full flex flex-col",contentClassName:"flex-1 flex flex-col min-h-0",actions:i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("div",{className:"rounded-2xl border border-[color:var(--line)] bg-white px-3 py-2 text-xs text-[color:var(--text-strong)]",children:"Main Session"}),i.jsx("button",{type:"button",onClick:ne,className:"h-10 w-10 rounded-xl border border-[color:var(--line)] bg-white text-[color:var(--text-muted)] grid place-items-center hover:border-[color:var(--line-strong)]",title:"Start fresh",children:i.jsx(Wa,{size:15})}),i.jsx("div",{className:"rounded-2xl border border-[color:var(--line)] bg-white px-3 py-2 text-xs text-[color:var(--text-muted)]",children:R==="connected"?"Live":"Offline"})]}),children:[i.jsx("div",{ref:p,className:"flex-1 min-h-0 overflow-y-auto pr-2",style:{scrollbarGutter:"stable"},children:o.length===0?i.jsx("div",{className:"mx-auto max-w-5xl py-8",children:i.jsx(Qn,{type:"empty",title:"No messages yet",message:"Start with a short request. Lydia will create a new live session automatically."})}):i.jsx("div",{className:"mx-auto max-w-5xl space-y-5 pb-6",children:o.map(M=>{const Q=M.content.trim().length>0,T=c===M.id;return i.jsx("div",{className:`flex ${M.role==="user"?"justify-end":"justify-start"}`,children:i.jsxs("div",{tabIndex:0,className:`group relative w-full max-w-[78%] rounded-[28px] border px-5 py-4 text-sm leading-relaxed shadow-[0_10px_30px_rgba(15,23,42,0.04)] focus:outline-none focus:ring-2 focus:ring-[color:var(--ring)] ${M.role==="user"?"bg-[#f4f7ff] border-[#cfdcff]":"bg-white border-[color:var(--line)]"}`,children:[i.jsxs("button",{type:"button",onClick:()=>void Y(M),disabled:!Q,className:`absolute top-4 ${M.role==="user"?"left-4":"right-4"} inline-flex h-8 items-center gap-1 rounded-full border border-[color:var(--line)] bg-white/95 px-2.5 text-[11px] font-medium text-[color:var(--text-muted)] shadow-sm transition-opacity hover:border-[color:var(--line-strong)] hover:text-[color:var(--text-strong)] focus:opacity-100 focus:outline-none focus:ring-2 focus:ring-[color:var(--ring)] disabled:cursor-not-allowed disabled:opacity-0 ${Q?"opacity-0 group-hover:opacity-100 group-focus-within:opacity-100":"opacity-0"}`,title:"Copy message",children:[T?i.jsx(sh,{size:13}):i.jsx(Ry,{size:13}),i.jsx("span",{children:T?"Copied":"Copy"})]}),i.jsxs("div",{className:`mb-3 flex items-center gap-3 text-[11px] text-[color:var(--text-muted)] ${M.role==="user"?"justify-end pr-14":"justify-between pr-14"}`,children:[i.jsx("span",{className:"font-semibold uppercase tracking-[0.14em]",children:G(M)}),i.jsx("span",{children:cx(M.createdAt)})]}),M.thinking&&i.jsxs("div",{className:"mb-3 rounded-2xl border border-[color:var(--line)] bg-[color:var(--surface-subtle)]",children:[i.jsxs("button",{type:"button",onClick:()=>K(M.id),className:"w-full px-4 py-3 flex items-center justify-between text-left text-xs text-[color:var(--text-muted)]",children:[i.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[i.jsx(by,{size:12}),"Thought Process"]}),i.jsx(lh,{size:14,className:`transition-transform ${M.thinkingCollapsed?"":"rotate-180"}`})]}),!M.thinkingCollapsed&&i.jsx("div",{className:"px-4 pb-4 text-xs leading-6 text-[color:var(--text-muted)] whitespace-pre-wrap border-t border-[color:var(--line)]",children:M.thinking})]}),i.jsxs("div",{className:"text-[color:var(--text-strong)] whitespace-pre-wrap min-h-[1.25rem]",children:[M.content,M.status==="streaming"&&i.jsx("span",{className:"animate-pulse text-[color:var(--accent)]",children:"..."})]}),M.status==="error"&&i.jsx("div",{className:"mt-3 text-xs font-medium text-red-600",children:"Failed"})]})},M.id)})})}),m&&i.jsx("div",{className:"mt-4 mx-auto w-full max-w-5xl",children:i.jsx(Qn,{type:"error",title:"Chat request failed",message:m})}),i.jsx("div",{className:"pt-5 mt-5 border-t border-[color:var(--line)] shrink-0",children:i.jsxs("div",{className:"mx-auto max-w-5xl flex items-end gap-3",children:[i.jsxs("div",{className:"relative flex-1",children:[i.jsx(ah,{size:14,className:"absolute left-4 top-4 text-[color:var(--text-muted)]"}),i.jsx("textarea",{value:l,onChange:M=>a(M.target.value),rows:3,onKeyDown:M=>{M.key==="Enter"&&!M.shiftKey&&(M.preventDefault(),V())},className:"w-full rounded-[26px] border border-[color:var(--line)] bg-white pl-10 pr-4 py-4 text-sm focus:outline-none focus:ring-2 focus:ring-[color:var(--ring)] resize-none shadow-[0_16px_40px_rgba(15,23,42,0.06)]",placeholder:"Message Lydia here..."}),i.jsx("div",{className:"mt-2 pl-1 text-[11px] text-[color:var(--text-muted)]",children:"Enter to send, Shift+Enter for line breaks"})]}),i.jsx("button",{onClick:V,disabled:d||!l.trim(),className:"h-12 px-6 rounded-2xl bg-[#df3b31] text-white text-sm font-semibold hover:brightness-95 disabled:opacity-50 disabled:cursor-not-allowed shadow-[0_16px_30px_rgba(223,59,49,0.24)]",children:i.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[i.jsx(Uy,{size:14}),"Send"]})})]})})]})})}function px(){const[e,t]=S.useState([]),[n,r]=S.useState(null),[s,l]=S.useState(null),[a,o]=S.useState(null),[u,d]=S.useState(null),[y,m]=S.useState(!1),[x,g]=S.useState(null),w=(k,C)=>{const N=k.split(`
249
- `),z=C.split(`
250
- `),R=N.length+1,K=z.length+1,Y=Array.from({length:R},()=>Array(K).fill(0));for(let M=R-2;M>=0;M--)for(let Q=K-2;Q>=0;Q--)N[M]===z[Q]?Y[M][Q]=Y[M+1][Q+1]+1:Y[M][Q]=Math.max(Y[M+1][Q],Y[M][Q+1]);const ne=[];let V=0,G=0;for(;V<N.length&&G<z.length;)N[V]===z[G]?(ne.push({type:"same",text:N[V]}),V+=1,G+=1):Y[V+1][G]>=Y[V][G+1]?(ne.push({type:"del",text:N[V]}),V+=1):(ne.push({type:"add",text:z[G]}),G+=1);for(;V<N.length;)ne.push({type:"del",text:N[V]}),V+=1;for(;G<z.length;)ne.push({type:"add",text:z[G]}),G+=1;return ne},j=k=>{if(!k)return null;try{return JSON.parse(k)}catch{return null}};S.useEffect(()=>{_()},[]),S.useEffect(()=>{n?(c(n),f()):(l(null),o(null),d(null))},[n]);const _=async()=>{try{m(!0);const k=await Z.getProposals();t(k)}catch(k){g(k.message)}finally{m(!1)}},c=async k=>{const C=e.find(N=>N.id===k);if(C)try{const N=await Z.getStrategyContent(C.strategy_path);l(N)}catch(N){console.error(N),l("Failed to load content: "+N.message)}},f=async()=>{try{const k=await Z.getActiveStrategy();o(k.content),d(k.path)}catch(k){console.error(k),o(null),d(null)}},p=S.useMemo(()=>!a||!s?null:w(a,s),[a,s]),v=async k=>{if(confirm("Are you sure you want to approve this strategy?"))try{await Z.approveProposal(k),_(),r(null)}catch(C){alert("Error: "+C.message)}},E=async k=>{const C=prompt("Enter rejection reason:");if(C!==null)try{await Z.rejectProposal(k,C),_(),r(null)}catch(N){alert("Error: "+N.message)}};return i.jsxs("div",{className:"flex h-full",children:[i.jsxs("div",{className:"w-1/3 border-r border-gray-200 p-4 overflow-y-auto",children:[i.jsx("h2",{className:"text-lg font-bold mb-4",children:"Strategy Proposals"}),y&&i.jsx("div",{children:"Loading..."}),x&&i.jsx("div",{className:"text-red-500",children:x}),e.length===0&&!y&&i.jsx("div",{className:"text-gray-500",children:"No proposals found."}),i.jsx("div",{className:"space-y-2",children:e.map(k=>i.jsxs("div",{onClick:()=>r(k.id),className:`p-3 rounded cursor-pointer border ${n===k.id?"bg-blue-50 border-blue-500":"bg-white border-gray-200 hover:bg-gray-50"}`,children:[i.jsxs("div",{className:"flex justify-between items-start",children:[i.jsxs("span",{className:"font-semibold",children:["#",k.id]}),i.jsx("span",{className:`text-xs px-2 py-1 rounded ${k.status==="pending_human"?"bg-yellow-100 text-yellow-800":k.status==="approved"?"bg-green-100 text-green-800":"bg-red-100 text-red-800"}`,children:k.status})]}),i.jsx("div",{className:"text-xs text-gray-500 mt-1 truncate",title:k.strategy_path,children:k.strategy_path.split(/[\\/]/).pop()}),i.jsx("div",{className:"text-xs text-gray-400 mt-1",children:new Date(k.created_at).toLocaleString()})]},k.id))})]}),i.jsx("div",{className:"w-2/3 p-4 overflow-y-auto bg-gray-50",children:n?i.jsx("div",{children:(()=>{var N;const k=e.find(z=>z.id===n),C=j(k==null?void 0:k.evaluation_json);return i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:"flex justify-between items-center mb-4",children:[i.jsx("h2",{className:"text-lg font-bold",children:"Proposal Details"}),i.jsxs("div",{className:"space-x-2",children:[i.jsxs("button",{onClick:()=>v(n),className:"px-4 py-2 bg-green-600 text-white rounded hover:bg-green-700 flex items-center gap-2",children:[i.jsx(sh,{size:16})," Approve"]}),i.jsxs("button",{onClick:()=>E(n),className:"px-4 py-2 bg-red-600 text-white rounded hover:bg-red-700 flex items-center gap-2",children:[i.jsx(dh,{size:16})," Reject"]})]})]}),i.jsxs("div",{className:"bg-white p-4 rounded shadow",children:[i.jsxs("h3",{className:"font-semibold mb-2 flex items-center gap-2",children:[i.jsx(Va,{size:16})," Strategy Content"]}),i.jsx("pre",{className:"bg-gray-900 text-gray-100 p-4 rounded overflow-x-auto text-sm font-mono",children:s||"Loading content..."})]}),i.jsxs("div",{className:"mt-4 bg-white p-4 rounded shadow",children:[i.jsxs("h3",{className:"font-semibold mb-2 flex items-center gap-2",children:[i.jsx(Va,{size:16})," Diff (Active vs Proposal)"]}),u&&i.jsxs("div",{className:"text-xs text-gray-500 mb-2",children:["Active: ",u.split(/[\\/]/).pop()]}),!p&&i.jsx("p",{className:"text-gray-500",children:"Select a proposal to compare with the active strategy."}),p&&i.jsx("pre",{className:"bg-gray-900 text-gray-100 p-4 rounded overflow-x-auto text-xs font-mono space-y-1",children:p.map((z,R)=>i.jsxs("div",{className:z.type==="add"?"text-green-400":z.type==="del"?"text-red-400":"text-gray-300",children:[z.type==="add"?"+ ":z.type==="del"?"- ":" ",z.text]},`${z.type}-${R}`))})]}),i.jsxs("div",{className:"mt-4 bg-white p-4 rounded shadow",children:[i.jsxs("h3",{className:"font-semibold mb-2 flex items-center gap-2",children:[i.jsx(rh,{size:16})," Evaluation Metrics"]}),!k&&i.jsx("p",{className:"text-gray-500",children:"No proposal selected."}),k&&!C&&i.jsx("p",{className:"text-gray-500",children:"No evaluation data available."}),k&&C&&i.jsxs("div",{className:"text-sm text-gray-700 space-y-2",children:[C.validation&&i.jsxs("div",{children:[i.jsx("div",{className:"font-semibold",children:"Validation"}),i.jsxs("div",{children:["Status: ",C.validation.status]}),C.validation.reason&&i.jsxs("div",{children:["Reason: ",C.validation.reason]})]}),C.analysis&&i.jsxs("div",{children:[i.jsx("div",{className:"font-semibold",children:"Analysis"}),i.jsx("div",{children:C.analysis})]}),C.description&&i.jsxs("div",{children:[i.jsx("div",{className:"font-semibold",children:"Change"}),i.jsx("div",{children:C.description})]}),((N=C.review)==null?void 0:N.findings)&&i.jsxs("div",{children:[i.jsx("div",{className:"font-semibold",children:"Review Findings"}),i.jsxs("div",{children:["Findings: ",C.review.findings.length]}),i.jsxs("div",{children:["Suggested confirmations: ",(C.review.suggestedConfirmations||[]).join(", ")||"None"]})]}),C.replay&&i.jsxs("div",{children:[i.jsx("div",{className:"font-semibold",children:"Replay"}),i.jsxs("div",{children:["Episodes: ",C.replay.episodes]}),i.jsxs("div",{children:["Drift episodes: ",C.replay.drift_episodes]}),i.jsxs("div",{children:["Drift steps: ",C.replay.drift_steps]})]}),C.delta&&i.jsxs("div",{children:[i.jsx("div",{className:"font-semibold",children:"Delta"}),i.jsxs("div",{children:["Success rate: ",C.delta.success_rate]}),i.jsxs("div",{children:["Confirm required: ",C.delta.confirm_required]}),i.jsxs("div",{children:["Avg duration ms: ",C.delta.avg_duration_ms]})]})]})]})]})})()}):i.jsx("div",{className:"flex items-center justify-center h-full text-gray-400",children:"Select a proposal to view details"})})]})}const mx={pending_human:"bg-yellow-100 text-yellow-800",approved:"bg-green-100 text-green-800",rejected:"bg-red-100 text-red-800",invalid:"bg-gray-100 text-gray-600"};function yx(){const{data:e,isLoading:t,error:n}=Se({queryKey:["strategy-proposals"],queryFn:()=>Z.getProposals(200)}),r=l=>{if(!l)return null;try{return JSON.parse(l)}catch{return null}},s=(e||[]).slice().sort((l,a)=>a.created_at-l.created_at);return i.jsxs("div",{className:"max-w-5xl mx-auto",children:[i.jsx("h2",{className:"text-2xl font-bold mb-6",children:"Evolution History"}),t&&i.jsx("div",{className:"text-gray-500",children:"Loading..."}),n&&i.jsx("div",{className:"text-red-500",children:"Failed to load history."}),!t&&s.length===0&&i.jsx("div",{className:"text-gray-500",children:"No strategy proposals yet."}),i.jsx("div",{className:"space-y-4",children:s.map(l=>{const a=r(l.evaluation_json),o=l.strategy_path.split(/[\\/]/).pop(),u=mx[l.status]||"bg-gray-100 text-gray-600";return i.jsxs("div",{className:"bg-white border border-gray-200 rounded-lg p-4 shadow-sm",children:[i.jsxs("div",{className:"flex items-start justify-between",children:[i.jsxs("div",{children:[i.jsxs("div",{className:"text-sm text-gray-500",children:["Proposal #",l.id]}),i.jsx("div",{className:"text-lg font-semibold",children:o})]}),i.jsx("span",{className:`text-xs px-2 py-1 rounded ${u}`,children:l.status})]}),i.jsxs("div",{className:"mt-2 text-xs text-gray-500",children:["Created: ",new Date(l.created_at).toLocaleString(),l.decided_at&&i.jsxs("span",{children:[" | Decided: ",new Date(l.decided_at).toLocaleString()]})]}),(a==null?void 0:a.description)&&i.jsxs("div",{className:"mt-3 text-sm",children:[i.jsx("span",{className:"font-semibold",children:"Change:"})," ",a.description]}),(a==null?void 0:a.analysis)&&i.jsxs("div",{className:"mt-2 text-sm text-gray-700",children:[i.jsx("span",{className:"font-semibold",children:"Analysis:"})," ",a.analysis]}),(a==null?void 0:a.validation)&&i.jsxs("div",{className:"mt-2 text-sm text-gray-600",children:["Validation: ",a.validation.status,a.validation.reason?` — ${a.validation.reason}`:""]})]},l.id)})})]})}function ph({mode:e="all"}){const t=e==="memory"?"memory":"system",[n,r]=S.useState(t),l=[{key:"system",label:"System",icon:i.jsx(uh,{size:16})},{key:"memory",label:"Memory Bank",icon:i.jsx(Yo,{size:16})},{key:"strategy",label:"Strategy",icon:i.jsx(kc,{size:16})},{key:"evolution",label:"Evolution",icon:i.jsx(zy,{size:16})},{key:"replay",label:"Replay Studio",icon:i.jsx(ih,{size:16})},{key:"approvals",label:"Approvals",icon:i.jsx(kc,{size:16})},{key:"mcp",label:"MCP Health",icon:i.jsx(Iy,{size:16})}].filter(a=>e==="memory"?a.key==="memory"||a.key==="replay":e==="control"?a.key!=="memory"&&a.key!=="replay":!0);return i.jsxs("div",{className:"flex h-full",children:[i.jsxs("div",{className:"w-56 shrink-0 border-r border-gray-200 p-3",children:[i.jsx("div",{className:"text-xs font-medium text-gray-400 uppercase tracking-wide px-3 py-2",children:"Settings & Extensions"}),i.jsx("nav",{className:"space-y-0.5",children:l.map(a=>i.jsxs("button",{onClick:()=>r(a.key),className:`w-full flex items-center gap-2.5 px-3 py-2 rounded-md text-sm transition-colors ${n===a.key?"bg-gray-100 text-gray-900 font-medium":"text-gray-600 hover:bg-gray-50 hover:text-gray-800"}`,children:[a.icon,a.label]},a.key))})]}),i.jsxs("div",{className:"flex-1 overflow-auto p-6",children:[n==="system"&&i.jsx(xx,{}),n==="memory"&&i.jsx(vx,{}),n==="strategy"&&i.jsx(px,{}),n==="evolution"&&i.jsx(yx,{}),n==="replay"&&i.jsx(gx,{}),n==="approvals"&&i.jsx(wx,{}),n==="mcp"&&i.jsx(kx,{})]})]})}function xx(){const{data:e}=Se({queryKey:["status"],queryFn:()=>fetch("/api/status").then(n=>n.json())}),{data:t}=Se({queryKey:["setup"],queryFn:()=>fetch("/api/setup").then(n=>n.json())});return i.jsxs("div",{className:"max-w-3xl",children:[i.jsx("h2",{className:"text-xl font-bold mb-6",children:"System Overview"}),t&&!t.ready&&i.jsxs("div",{className:"mb-6 text-sm text-yellow-700 bg-yellow-50 border border-yellow-200 rounded-lg px-4 py-3",children:["Setup incomplete: run ",i.jsx("code",{className:"bg-yellow-100 px-1 rounded",children:"lydia init"})]}),i.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4 mb-6",children:[i.jsxs("div",{className:"bg-white p-4 rounded-lg border border-gray-200",children:[i.jsx("div",{className:"text-xs text-gray-500 mb-1",children:"Memory DB"}),i.jsx("div",{className:"text-lg font-bold text-gray-900",children:"Connected"})]}),i.jsxs("div",{className:"bg-white p-4 rounded-lg border border-gray-200",children:[i.jsx("div",{className:"text-xs text-gray-500 mb-1",children:"Agent Status"}),i.jsx("div",{className:"text-lg font-bold text-gray-900",children:"Idle"})]}),i.jsxs("div",{className:"bg-white p-4 rounded-lg border border-gray-200",children:[i.jsx("div",{className:"text-xs text-gray-500 mb-1",children:"Version"}),i.jsxs("div",{className:"text-lg font-bold text-gray-900",children:["v",(e==null?void 0:e.version)||"0.0.0"]})]})]}),i.jsxs("div",{className:"bg-white rounded-lg border border-gray-200 p-4",children:[i.jsx("h3",{className:"text-sm font-semibold mb-3",children:"Configuration"}),i.jsx("pre",{className:"bg-gray-50 p-3 rounded text-xs overflow-x-auto",children:JSON.stringify(e,null,2)})]})]})}function vx(){const{data:e}=Se({queryKey:["facts"],queryFn:()=>fetch("/api/memory/facts").then(t=>t.json())});return i.jsxs("div",{className:"max-w-3xl",children:[i.jsx("h2",{className:"text-xl font-bold mb-6",children:"Memory Bank"}),i.jsx("div",{className:"bg-white rounded-lg border border-gray-200 overflow-hidden",children:i.jsxs("table",{className:"w-full text-left",children:[i.jsx("thead",{className:"bg-gray-50 border-b border-gray-200 text-xs uppercase text-gray-500 font-medium",children:i.jsxs("tr",{children:[i.jsx("th",{className:"px-4 py-3",children:"Content"}),i.jsx("th",{className:"px-4 py-3 w-32",children:"Tags"}),i.jsx("th",{className:"px-4 py-3 w-36",children:"Created"})]})}),i.jsxs("tbody",{className:"divide-y divide-gray-100",children:[e==null?void 0:e.map(t=>{var n;return i.jsxs("tr",{className:"hover:bg-gray-50",children:[i.jsx("td",{className:"px-4 py-3 text-sm",children:t.content}),i.jsx("td",{className:"px-4 py-3",children:i.jsx("div",{className:"flex gap-1 flex-wrap",children:(n=t.tags)==null?void 0:n.map(r=>i.jsx("span",{className:"px-1.5 py-0.5 bg-blue-100 text-blue-700 rounded-full text-[10px]",children:r},r))})}),i.jsx("td",{className:"px-4 py-3 text-xs text-gray-500",children:new Date(t.created_at).toLocaleDateString()})]},t.id)}),!(e!=null&&e.length)&&i.jsx("tr",{children:i.jsx("td",{colSpan:3,className:"px-4 py-8 text-center text-gray-400 text-sm",children:"No memories found yet."})})]})]})})]})}function gx(){const[e,t]=S.useState(null),[n,r]=S.useState(null),{data:s}=Se({queryKey:["episodes"],queryFn:()=>fetch("/api/replay?limit=50").then(o=>o.json())}),{data:l}=Se({queryKey:["episode",e],queryFn:()=>fetch(`/api/replay/${e}`).then(o=>o.json()),enabled:e!==null}),a=o=>{if(!o)return"—";try{return JSON.stringify(o,null,2)}catch{return String(o)}};return i.jsxs("div",{className:"max-w-4xl",children:[i.jsx("h2",{className:"text-xl font-bold mb-6",children:"Replay Studio"}),i.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[i.jsxs("div",{className:"bg-white rounded-lg border border-gray-200 overflow-hidden",children:[i.jsx("div",{className:"px-4 py-3 border-b border-gray-100 font-semibold text-sm",children:"Episodes"}),i.jsxs("ul",{className:"divide-y divide-gray-100 max-h-96 overflow-y-auto",children:[s==null?void 0:s.map(o=>i.jsx("li",{children:i.jsxs("button",{onClick:()=>t(o.id),className:`w-full text-left px-4 py-3 hover:bg-gray-50 ${e===o.id?"bg-blue-50":""}`,children:[i.jsx("div",{className:"text-sm font-medium truncate",children:o.input}),i.jsxs("div",{className:"text-xs text-gray-500",children:["#",o.id," · ",new Date(o.created_at).toLocaleString()]})]})},o.id)),!(s!=null&&s.length)&&i.jsx("li",{className:"px-4 py-6 text-center text-gray-400 text-sm",children:"No episodes yet."})]})]}),i.jsxs("div",{className:"bg-white rounded-lg border border-gray-200 p-4",children:[i.jsx("div",{className:"font-semibold text-sm mb-3",children:"Details"}),!l&&i.jsx("div",{className:"text-gray-400 text-sm",children:"Select an episode to view traces."}),(l==null?void 0:l.episode)&&i.jsxs("div",{className:"space-y-3",children:[i.jsxs("div",{children:[i.jsx("div",{className:"text-xs text-gray-500",children:"Input"}),i.jsx("div",{className:"text-sm font-medium",children:l.episode.input})]}),i.jsxs("div",{children:[i.jsx("div",{className:"text-xs text-gray-500",children:"Result"}),i.jsx("div",{className:"text-sm",children:l.episode.result||"—"})]}),l.summary&&i.jsxs("div",{className:"flex gap-2 text-xs",children:[i.jsxs("span",{className:"px-2 py-1 rounded bg-green-100 text-green-700",children:["success: ",l.summary.success]}),i.jsxs("span",{className:"px-2 py-1 rounded bg-red-100 text-red-700",children:["failed: ",l.summary.failed]})]}),i.jsx("div",{className:"space-y-2",children:(l.traces||[]).map((o,u)=>i.jsxs("div",{className:"border border-gray-100 rounded p-2 text-xs",children:[i.jsxs("div",{className:"flex items-center justify-between",children:[i.jsxs("div",{className:"font-semibold",children:["Step ",o.step_index+1]}),i.jsx("span",{className:`px-1.5 py-0.5 rounded text-[10px] ${o.status==="success"?"bg-green-100 text-green-700":"bg-red-100 text-red-700"}`,children:o.status})]}),i.jsxs("div",{className:"mt-1 text-gray-500",children:["Tool: ",i.jsx("span",{className:"font-mono",children:o.tool_name})]}),i.jsx("button",{onClick:()=>r(n===u?null:u),className:"mt-1 text-blue-500 hover:underline",children:n===u?"Hide":"Show details"}),n===u&&i.jsxs("div",{className:"mt-2 space-y-1",children:[i.jsx("div",{className:"text-gray-400",children:"Args"}),i.jsx("pre",{className:"bg-gray-50 p-2 rounded overflow-auto max-h-24",children:a(o.args)}),i.jsx("div",{className:"text-gray-400",children:"Output"}),i.jsx("pre",{className:"bg-gray-50 p-2 rounded overflow-auto max-h-24",children:a(o.output)})]})]},o.id||u))})]})]})]})]})}function wx(){const{data:e}=Se({queryKey:["approvals"],queryFn:()=>fetch("/api/memory/approvals?limit=100").then(n=>n.json())}),t=n=>{const r={};return(n||[]).forEach(s=>{const l=s.split(":");l.length>=2&&(r[l[0]]=l.slice(1).join(":"))}),r};return i.jsxs("div",{className:"max-w-3xl",children:[i.jsx("h2",{className:"text-xl font-bold mb-6",children:"Risk Approvals"}),i.jsx("div",{className:"bg-white rounded-lg border border-gray-200 overflow-hidden",children:i.jsxs("table",{className:"w-full text-left",children:[i.jsx("thead",{className:"bg-gray-50 border-b border-gray-200 text-xs uppercase text-gray-500 font-medium",children:i.jsxs("tr",{children:[i.jsx("th",{className:"px-4 py-3",children:"Content"}),i.jsx("th",{className:"px-4 py-3 w-32",children:"Scope"}),i.jsx("th",{className:"px-4 py-3 w-36",children:"Created"})]})}),i.jsxs("tbody",{className:"divide-y divide-gray-100",children:[e==null?void 0:e.map(n=>i.jsxs("tr",{className:"hover:bg-gray-50",children:[i.jsxs("td",{className:"px-4 py-3",children:[i.jsx("div",{className:"text-sm font-medium",children:n.content}),i.jsx("div",{className:"text-xs text-gray-400 mt-0.5",children:(()=>{const r=t(n.tags);return[r.tool&&`tool: ${r.tool}`,r.reason&&`reason: ${r.reason}`].filter(Boolean).join(" · ")})()})]}),i.jsx("td",{className:"px-4 py-3 text-xs text-gray-500",children:t(n.tags).scope||"unknown"}),i.jsx("td",{className:"px-4 py-3 text-xs text-gray-500",children:new Date(n.created_at).toLocaleDateString()})]},n.id)),!(e!=null&&e.length)&&i.jsx("tr",{children:i.jsx("td",{colSpan:3,className:"px-4 py-8 text-center text-gray-400 text-sm",children:"No approvals recorded yet."})})]})]})})]})}function kx(){var l;const{data:e,isLoading:t,error:n,refetch:r,isFetching:s}=Se({queryKey:["mcp-health"],queryFn:()=>Z.getMcpHealth({timeoutMs:15e3,retries:0})});return i.jsxs("div",{className:"max-w-4xl",children:[i.jsxs("div",{className:"flex items-center justify-between mb-6",children:[i.jsx("h2",{className:"text-xl font-bold",children:"MCP Health"}),i.jsx("button",{onClick:()=>r(),disabled:s,className:"px-3 py-1.5 text-sm rounded-md border border-gray-300 bg-white hover:bg-gray-50 disabled:opacity-50",children:s?"Checking...":"Re-check"})]}),t&&i.jsx("div",{className:"text-sm text-gray-500",children:"Checking MCP servers..."}),n&&i.jsx("div",{className:"text-sm text-red-700 bg-red-50 border border-red-200 rounded px-3 py-2",children:n.message}),!t&&!n&&i.jsxs("div",{className:"space-y-3",children:[i.jsx("div",{className:`text-sm px-3 py-2 rounded border ${e!=null&&e.ok?"text-green-700 bg-green-50 border-green-200":"text-red-700 bg-red-50 border-red-200"}`,children:e!=null&&e.ok?"All configured MCP servers are reachable.":"Some MCP servers failed health check."}),i.jsx("div",{className:"bg-white rounded-lg border border-gray-200 overflow-hidden",children:i.jsxs("table",{className:"w-full text-left",children:[i.jsx("thead",{className:"bg-gray-50 border-b border-gray-200 text-xs uppercase text-gray-500 font-medium",children:i.jsxs("tr",{children:[i.jsx("th",{className:"px-4 py-3",children:"Server"}),i.jsx("th",{className:"px-4 py-3 w-24",children:"Status"}),i.jsx("th",{className:"px-4 py-3 w-28",children:"Attempts"}),i.jsx("th",{className:"px-4 py-3 w-28",children:"Duration"}),i.jsx("th",{className:"px-4 py-3",children:"Tools / Error"})]})}),i.jsxs("tbody",{className:"divide-y divide-gray-100",children:[((e==null?void 0:e.results)||[]).map(a=>{var o;return i.jsxs("tr",{children:[i.jsx("td",{className:"px-4 py-3 text-sm font-mono",children:a.id}),i.jsx("td",{className:"px-4 py-3 text-xs",children:i.jsx("span",{className:`px-2 py-0.5 rounded ${a.ok?"bg-green-100 text-green-700":"bg-red-100 text-red-700"}`,children:a.ok?"ok":"failed"})}),i.jsx("td",{className:"px-4 py-3 text-xs text-gray-600",children:a.attempts}),i.jsxs("td",{className:"px-4 py-3 text-xs text-gray-600",children:[a.durationMs,"ms"]}),i.jsx("td",{className:"px-4 py-3 text-xs text-gray-600",children:a.ok?(o=a.tools)!=null&&o.length?a.tools.join(", "):"(no tools)":a.error||"unknown error"})]},a.id)}),!((l=e==null?void 0:e.results)!=null&&l.length)&&i.jsx("tr",{children:i.jsx("td",{colSpan:5,className:"px-4 py-8 text-center text-gray-400 text-sm",children:"No configured external MCP servers."})})]})]})})]})]})}function jx(){const{data:e}=Se({queryKey:["memory-facts-summary"],queryFn:()=>Z.getFacts(200)}),{data:t}=Se({queryKey:["memory-episodes-summary"],queryFn:()=>Z.getEpisodes(200)}),{data:n}=Se({queryKey:["memory-reports-summary"],queryFn:()=>Z.getTaskReports(200)});return i.jsxs("div",{className:"h-full p-6 space-y-4 overflow-auto",children:[i.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-3",children:[i.jsx(Ii,{title:"Facts",value:(e==null?void 0:e.length)??0,icon:i.jsx(Yo,{size:14})}),i.jsx(Ii,{title:"Episodes",value:(t==null?void 0:t.length)??0,icon:i.jsx(ih,{size:14})}),i.jsx(Ii,{title:"Reports",value:(n==null?void 0:n.length)??0,icon:i.jsx(Va,{size:14})})]}),i.jsx(ft,{title:"Memory Explorer",subtitle:"Inspect facts and replay history in one place.",children:i.jsx("div",{className:"h-[calc(100vh-240px)]",children:i.jsx(ph,{mode:"memory"})})})]})}function Ii({title:e,value:t,icon:n}){return i.jsxs("div",{className:"rounded-2xl border border-[color:var(--line)] bg-white px-4 py-3 shadow-[var(--shadow-soft)]",children:[i.jsxs("div",{className:"flex items-center justify-between text-[11px] uppercase tracking-wide text-[color:var(--text-muted)]",children:[i.jsx("span",{children:e}),n]}),i.jsx("div",{className:"mt-2 text-xl font-bold text-[color:var(--text-strong)] tabular-nums",children:t})]})}function Sx(){return i.jsx("div",{className:"h-full p-6",children:i.jsx(ft,{title:"Control Center",subtitle:"Strategy governance, approvals, MCP health, and system configuration.",className:"h-full flex flex-col",children:i.jsx("div",{className:"h-[calc(100vh-220px)]",children:i.jsx(ph,{mode:"control"})})})})}function Nx({onSetupCompleted:e}){var B,P,$,te;const t=oi(),[n,r]=S.useState("auto"),[s,l]=S.useState(""),[a,o]=S.useState(["ollama","openai","anthropic"]),[u,d]=S.useState(""),[y,m]=S.useState(""),[x,g]=S.useState(""),[w,j]=S.useState(""),[_,c]=S.useState(""),[f,p]=S.useState(!1),{data:v,isLoading:E}=Se({queryKey:["setup"],queryFn:()=>Z.getSetupStatus()}),{data:k,isLoading:C}=Se({queryKey:["setup-config"],queryFn:()=>Z.getSetupConfig()});S.useEffect(()=>{if(!k||f)return;const A=k.llm||{};r(A.provider||"auto"),l(A.defaultModel||""),o(Array.isArray(A.fallbackOrder)&&A.fallbackOrder.length>0?A.fallbackOrder:["ollama","openai","anthropic"]),g(A.openaiBaseUrl||""),j(A.anthropicBaseUrl||""),c(A.ollamaBaseUrl||""),p(!0)},[k,f]);const N=Li({mutationFn:()=>Z.initializeSetup(),onSuccess:async()=>{await t.invalidateQueries({queryKey:["setup"]}),await t.invalidateQueries({queryKey:["setup-config"]})}}),z=Li({mutationFn:async()=>{const A={llm:{provider:n,defaultModel:s,fallbackOrder:a,openaiBaseUrl:x,anthropicBaseUrl:w,ollamaBaseUrl:_}};return u.trim()&&(A.llm.openaiApiKey=u.trim()),y.trim()&&(A.llm.anthropicApiKey=y.trim()),Z.updateSetupConfig(A)},onSuccess:async()=>{d(""),m(""),await t.invalidateQueries({queryKey:["setup"]}),await t.invalidateQueries({queryKey:["setup-config"]})}}),R=Li({mutationFn:()=>Z.testLLM(!0,{llm:{provider:n,defaultModel:s,fallbackOrder:a,openaiApiKey:u.trim(),anthropicApiKey:y.trim(),openaiBaseUrl:x,anthropicBaseUrl:w,ollamaBaseUrl:_}})}),K=!!(v!=null&&v.ready),Y=!!(v!=null&&v.llmConfigured),ne=((B=k==null?void 0:k.llm)==null?void 0:B.provider)||(v==null?void 0:v.provider)||"auto",V=K&&Y,G=n==="auto",M=n==="openai",Q=n==="anthropic",T=n==="ollama",L=n==="mock",I=S.useMemo(()=>[{id:"workspace",title:"Initialize Workspace",done:K},{id:"provider",title:"Configure LLM Provider",done:Y},{id:"ready",title:"Ready To Run Tasks",done:V}],[K,Y,V]);return E||C?i.jsx("div",{className:"h-full p-6",children:i.jsx(Qn,{type:"loading",title:"Loading setup status..."})}):i.jsxs("div",{className:"h-full p-6 overflow-auto space-y-4",children:[i.jsx(ft,{title:"Setup Wizard",subtitle:"Complete setup once, then run Lydia fully from the dashboard.",tone:"accent",children:i.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-3",children:I.map((A,ye)=>i.jsxs("div",{className:"rounded-xl border border-[color:var(--line)] bg-white p-3",children:[i.jsxs("div",{className:"flex items-center gap-2 text-sm font-semibold",children:[A.done?i.jsx(_s,{size:14,className:"text-[color:var(--success)]"}):i.jsx(My,{size:14,className:"text-[color:var(--text-muted)]"}),i.jsxs("span",{children:["Step ",ye+1]})]}),i.jsx("div",{className:"mt-1 text-sm text-[color:var(--text-strong)]",children:A.title})]},A.id))})}),i.jsxs("div",{className:"grid grid-cols-1 xl:grid-cols-3 gap-4",children:[i.jsx(ft,{title:"Step 1: Workspace",subtitle:"Create local config, strategy, and skill folders.",actions:i.jsx("button",{onClick:()=>N.mutate(),disabled:N.isPending,className:"px-3 py-1.5 rounded-md text-xs text-white bg-[color:var(--accent)] disabled:opacity-60",children:K?"Re-check":N.isPending?"Initializing...":"Initialize"}),children:i.jsxs("div",{className:"text-sm text-[color:var(--text-muted)] space-y-1",children:[i.jsxs("div",{children:[i.jsx("strong",{children:"Status:"})," ",K?"Ready":"Not initialized"]}),i.jsxs("div",{children:[i.jsx("strong",{children:"Config:"})," ",i.jsx("span",{className:"font-mono",children:v==null?void 0:v.configPath})]}),i.jsxs("div",{children:[i.jsx("strong",{children:"Strategy:"})," ",i.jsx("span",{className:"font-mono",children:v==null?void 0:v.strategyPath})]}),N.isError&&i.jsx("div",{className:"text-[color:var(--danger)] text-xs",children:N.error.message})]})}),i.jsx(ft,{title:"Step 2: LLM Provider",subtitle:"Configure provider, model, API keys, and endpoints.",className:"xl:col-span-2",children:i.jsxs("div",{className:"space-y-3",children:[i.jsx("div",{className:"grid grid-cols-2 md:grid-cols-5 gap-2",children:["auto","openai","anthropic","ollama","mock"].map(A=>i.jsx("button",{onClick:()=>r(A),className:`px-2 py-2 rounded-md border text-xs ${n===A?"border-[color:var(--line-strong)] bg-[color:var(--surface-accent)] text-[color:var(--accent)]":"border-[color:var(--line)] bg-white text-[color:var(--text-muted)]"}`,children:A},A))}),i.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-2",children:[i.jsxs("label",{className:"text-xs text-[color:var(--text-muted)]",children:["Default Model",i.jsx("input",{value:s,onChange:A=>l(A.target.value),placeholder:"Optional model override",className:"mt-1 w-full border border-[color:var(--line)] rounded-md px-2 py-1.5 text-sm"})]}),i.jsxs("label",{className:"text-xs text-[color:var(--text-muted)]",children:[G?"Fallback Order (auto mode)":"Selected Provider",i.jsx("input",{value:G?a.join(","):n,onChange:A=>{G&&o(A.target.value.split(",").map(ye=>ye.trim()).filter(Boolean))},readOnly:!G,placeholder:G?"ollama,openai,anthropic":n,className:"mt-1 w-full border border-[color:var(--line)] rounded-md px-2 py-1.5 text-sm"})]})]}),i.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-2",children:[(G||M)&&i.jsxs(i.Fragment,{children:[i.jsxs("label",{className:"text-xs text-[color:var(--text-muted)]",children:["OpenAI API Key",i.jsx("input",{type:"password",value:u,onChange:A=>d(A.target.value),placeholder:(P=k==null?void 0:k.llm)!=null&&P.openaiApiKeyMasked?`Saved: ${k.llm.openaiApiKeyMasked}`:"sk-...",className:"mt-1 w-full border border-[color:var(--line)] rounded-md px-2 py-1.5 text-sm"})]}),i.jsxs("label",{className:"text-xs text-[color:var(--text-muted)]",children:["OpenAI Base URL",i.jsx("input",{value:x,onChange:A=>g(A.target.value),placeholder:"Optional",className:"mt-1 w-full border border-[color:var(--line)] rounded-md px-2 py-1.5 text-sm"})]})]}),(G||Q)&&i.jsxs(i.Fragment,{children:[i.jsxs("label",{className:"text-xs text-[color:var(--text-muted)]",children:["Anthropic API Key",i.jsx("input",{type:"password",value:y,onChange:A=>m(A.target.value),placeholder:($=k==null?void 0:k.llm)!=null&&$.anthropicApiKeyMasked?`Saved: ${k.llm.anthropicApiKeyMasked}`:"sk-ant-...",className:"mt-1 w-full border border-[color:var(--line)] rounded-md px-2 py-1.5 text-sm"})]}),i.jsxs("label",{className:"text-xs text-[color:var(--text-muted)]",children:["Anthropic Base URL",i.jsx("input",{value:w,onChange:A=>j(A.target.value),placeholder:"Optional",className:"mt-1 w-full border border-[color:var(--line)] rounded-md px-2 py-1.5 text-sm"})]})]}),(G||T)&&i.jsxs("label",{className:"text-xs text-[color:var(--text-muted)] md:col-span-2",children:["Ollama Base URL",i.jsx("input",{value:_,onChange:A=>c(A.target.value),placeholder:"http://localhost:11434/api",className:"mt-1 w-full border border-[color:var(--line)] rounded-md px-2 py-1.5 text-sm"})]}),L&&i.jsx("div",{className:"md:col-span-2 text-xs text-[color:var(--text-muted)] rounded-md border border-[color:var(--line)] bg-[color:var(--surface-subtle)] px-3 py-2",children:"Mock provider does not require API keys or base URLs."})]}),i.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[i.jsx("button",{onClick:()=>z.mutate(),disabled:z.isPending,className:"px-3 py-1.5 rounded-md text-xs text-white bg-[color:var(--accent)] disabled:opacity-60",children:z.isPending?"Saving...":"Save Provider Config"}),i.jsx("button",{onClick:()=>R.mutate(),disabled:R.isPending,className:"px-3 py-1.5 rounded-md text-xs text-white bg-[color:var(--info)] disabled:opacity-60",children:R.isPending?"Testing...":"Test LLM Connection"}),V&&i.jsx("button",{onClick:e,className:"px-3 py-1.5 rounded-md text-xs border border-[color:var(--line)] text-[color:var(--text-strong)]",children:"Continue To Tasks"})]}),z.isSuccess&&i.jsx("div",{className:"text-xs text-[color:var(--success)]",children:"Configuration saved."}),z.isError&&i.jsx("div",{className:"text-xs text-[color:var(--danger)]",children:z.error.message}),R.isSuccess&&i.jsxs("div",{className:"text-xs text-[color:var(--success)]",children:["LLM check passed with provider ",i.jsx("strong",{children:(te=R.data)==null?void 0:te.provider}),"."]}),R.isError&&i.jsx("div",{className:"text-xs text-[color:var(--danger)]",children:R.error.message}),i.jsxs("div",{className:"text-xs text-[color:var(--text-muted)]",children:["Draft provider: ",i.jsx("strong",{children:n})," �� Saved provider: ",i.jsx("strong",{children:ne})]})]})})]}),i.jsx(ft,{title:"Workspace Responsibilities",subtitle:"Defines the boundary between Tasks, Chat, and system panels.",children:i.jsx("div",{className:"overflow-auto",children:i.jsxs("table",{className:"w-full text-left border-collapse",children:[i.jsx("thead",{children:i.jsxs("tr",{className:"text-xs text-[color:var(--text-muted)]",children:[i.jsx("th",{className:"py-2 border-b border-[color:var(--line)]",children:"Workspace"}),i.jsx("th",{className:"py-2 border-b border-[color:var(--line)]",children:"Primary Job"}),i.jsx("th",{className:"py-2 border-b border-[color:var(--line)]",children:"Key Actions"})]})}),i.jsxs("tbody",{className:"text-sm",children:[i.jsxs("tr",{children:[i.jsx("td",{className:"py-2 border-b border-[color:var(--line)]",children:i.jsxs("span",{className:"inline-flex items-center gap-1",children:[i.jsx(Dy,{size:12})," Tasks"]})}),i.jsx("td",{className:"py-2 border-b border-[color:var(--line)]",children:"Execute tracked tasks end-to-end."}),i.jsx("td",{className:"py-2 border-b border-[color:var(--line)]",children:"Run, monitor, resume, inspect reports."})]}),i.jsxs("tr",{children:[i.jsx("td",{className:"py-2 border-b border-[color:var(--line)]",children:i.jsxs("span",{className:"inline-flex items-center gap-1",children:[i.jsx(Qy,{size:12})," Chat"]})}),i.jsx("td",{className:"py-2 border-b border-[color:var(--line)]",children:"Explore and iterate conversationally."}),i.jsx("td",{className:"py-2 border-b border-[color:var(--line)]",children:"Multi-turn Q&A, follow-up guidance."})]}),i.jsxs("tr",{children:[i.jsx("td",{className:"py-2 border-b border-[color:var(--line)]",children:i.jsxs("span",{className:"inline-flex items-center gap-1",children:[i.jsx(Fy,{size:12})," Setup"]})}),i.jsx("td",{className:"py-2 border-b border-[color:var(--line)]",children:"Bootstrap and configure runtime."}),i.jsx("td",{className:"py-2 border-b border-[color:var(--line)]",children:"Initialize workspace, set provider and API keys."})]}),i.jsxs("tr",{children:[i.jsx("td",{className:"py-2",children:i.jsxs("span",{className:"inline-flex items-center gap-1",children:[i.jsx(Zo,{size:12})," Control"]})}),i.jsx("td",{className:"py-2",children:"Govern strategy and platform health."}),i.jsx("td",{className:"py-2",children:"Review proposals, approvals, MCP status."})]})]})]})})}),i.jsx(ft,{title:"Advanced CLI Paths",subtitle:"Dashboard now covers first-run and daily operation. Use CLI for automation-heavy workflows.",children:i.jsxs("ul",{className:"text-sm text-[color:var(--text-muted)] space-y-2",children:[i.jsxs("li",{children:[i.jsx("span",{className:"font-mono",children:'lydia run "..."'})," for scripted terminal execution."]}),i.jsxs("li",{children:[i.jsx("span",{className:"font-mono",children:"lydia tasks list/show/resume"})," for batch-friendly task operations."]}),i.jsxs("li",{children:[i.jsx("span",{className:"font-mono",children:"lydia skills install/remove"})," for GitHub/local skill packaging flows."]}),i.jsxs("li",{children:[i.jsx("span",{className:"font-mono",children:"lydia mcp check"})," for diagnostic checks in CI pipelines."]})]})})]})}function Cx(){const[e,t]=S.useState("chat"),[n,r]=S.useState(null),[s,l]=S.useState(!1),{data:a}=Se({queryKey:["status"],queryFn:()=>Z.getStatus(),staleTime:6e4,refetchOnWindowFocus:!1,refetchOnReconnect:!1}),{data:o}=Se({queryKey:["setup"],queryFn:()=>Z.getSetupStatus(),staleTime:6e4,refetchOnWindowFocus:!1,refetchOnReconnect:!1}),u=!!(o!=null&&o.ready),d=[{key:"chat",label:"Chat",icon:i.jsx(Py,{size:16}),group:"chat"},{key:"tasks",label:"Tasks",icon:i.jsx(_y,{size:16}),group:"workspace",disabledWhenUnready:!0},{key:"memory",label:"Memory",icon:i.jsx(Yo,{size:16}),group:"workspace"},{key:"control",label:"Control",icon:i.jsx(uh,{size:16}),group:"system"},{key:"setup",label:"Setup",icon:i.jsx(Zo,{size:16}),group:"system"}],y=S.useMemo(()=>[{id:"chat",title:"Chat",items:d.filter(w=>w.group==="chat")},{id:"workspace",title:"Workspace",items:d.filter(w=>w.group==="workspace")},{id:"system",title:"System",items:d.filter(w=>w.group==="system")}],[d]),m=S.useMemo(()=>e==="tasks"?"Tracked execution, history, and resuming.":e==="chat"?"Fast conversational control with persistent context.":e==="memory"?"Inspect facts, episodes, and reports.":e==="control"?"Govern strategy, health, and runtime behavior.":"Bootstrap runtime, providers, and local workspace.",[e]),x=w=>{r({text:w,token:Date.now()}),t("chat")},g=()=>e==="tasks"?i.jsx(ax,{onContinueInChat:x}):e==="memory"?i.jsx(jx,{}):e==="control"?i.jsx(Sx,{}):e==="setup"?i.jsx(Nx,{onSetupCompleted:()=>t("chat")}):i.jsx(hx,{seedMessage:n==null?void 0:n.text,seedToken:n==null?void 0:n.token});return i.jsxs("div",{className:"app-shell",children:[i.jsxs("aside",{className:`${s?"w-[76px]":"w-[232px]"} border-r border-[color:var(--line)] bg-white/96 flex flex-col shrink-0 transition-[width] duration-200`,children:[i.jsxs("div",{className:`h-14 border-b border-[color:var(--line)] flex items-center gap-3 ${s?"px-3 justify-center":"px-5"}`,children:[i.jsx("button",{type:"button",onClick:()=>l(w=>!w),className:"h-8 w-8 rounded-lg border border-[color:var(--line)] text-[color:var(--text-muted)] grid place-items-center",children:i.jsx(Ly,{size:15})}),!s&&i.jsxs("div",{className:"min-w-0",children:[i.jsx("div",{className:"text-[17px] font-extrabold tracking-tight text-[color:var(--text-strong)]",children:"Lydia"}),i.jsx("div",{className:"text-[10px] uppercase tracking-[0.22em] text-[color:var(--text-muted)]",children:"Gateway Dashboard"})]})]}),i.jsxs("div",{className:`${s?"px-3 py-4":"px-5 py-4"} border-b border-[color:var(--line)]`,children:[i.jsxs("div",{className:`flex items-center gap-2 text-sm text-[color:var(--success)] ${s?"justify-center":""}`,children:[i.jsx("span",{className:"h-2 w-2 rounded-full bg-[color:var(--success)]"}),!s&&i.jsx("span",{children:(a==null?void 0:a.status)==="ok"?"System Online":"Connecting..."})]}),!s&&!u&&i.jsx("div",{className:"mt-3 rounded-2xl border border-[color:var(--warning-soft)] bg-[color:var(--warning-soft)] px-3 py-2 text-[11px] leading-5 text-[color:var(--warning)]",children:"Setup is incomplete. Chat is available now; tasks remain gated until the workspace is initialized."})]}),i.jsx("nav",{className:`flex-1 overflow-y-auto py-5 space-y-6 ${s?"px-2":"px-4"}`,children:y.map(w=>i.jsxs("div",{children:[!s&&i.jsx("div",{className:"mb-2 px-2 text-[11px] uppercase tracking-[0.18em] text-[color:var(--text-muted)]",children:w.title}),i.jsx("div",{className:"space-y-1.5",children:w.items.map(j=>{const _=!!(j.disabledWhenUnready&&!u),c=j.key===e;return i.jsxs("button",{onClick:()=>!_&&t(j.key),disabled:_,className:`w-full rounded-2xl py-3 text-sm flex items-center transition-colors ${c?"bg-[#fff1f1] text-[#b3261e] border border-[#f5caca] shadow-[0_8px_20px_rgba(179,38,30,0.08)]":_?"text-gray-300 cursor-not-allowed":"text-[color:var(--text-muted)] hover:bg-[color:var(--surface-subtle)]"} ${s?"justify-center px-0":"gap-3 px-3"}`,title:_?"Complete setup first":void 0,children:[i.jsx("span",{className:"shrink-0",children:j.icon}),!s&&i.jsx("span",{className:"flex-1 text-left",children:j.label})]},j.key)})})]},w.id))}),i.jsx("div",{className:`${s?"px-2":"px-4"} py-4 border-t border-[color:var(--line)]`,children:i.jsxs("div",{className:`rounded-2xl border border-[color:var(--line)] bg-[color:var(--surface-subtle)] py-3 ${s?"px-0":"px-3"}`,children:[i.jsxs("div",{className:`flex items-center gap-2 text-[11px] uppercase tracking-[0.18em] text-[color:var(--text-muted)] ${s?"justify-center":""}`,children:[i.jsx(ch,{size:12}),!s&&"Runtime"]}),!s&&i.jsxs("div",{className:"mt-2 text-sm text-[color:var(--text-strong)]",children:["v",(a==null?void 0:a.version)||"0.0.0"]})]})})]}),i.jsxs("main",{className:"flex-1 min-w-0 overflow-hidden bg-[linear-gradient(180deg,#ffffff_0%,#fbfcff_100%)]",children:[i.jsxs("header",{className:"h-14 px-7 border-b border-[color:var(--line)] bg-white/92 flex items-center justify-between shrink-0",children:[i.jsxs("div",{children:[i.jsx("div",{className:"text-[11px] uppercase tracking-[0.22em] text-[color:var(--text-muted)]",children:e}),i.jsx("div",{className:"text-sm text-[color:var(--text-strong)] mt-0.5",children:m})]}),i.jsxs("div",{className:"flex items-center gap-3 text-xs",children:[i.jsxs("div",{className:"inline-flex items-center gap-2 rounded-full border border-[color:var(--line)] bg-white px-3 py-2 text-[color:var(--text-muted)]",children:[i.jsx(Oy,{size:12}),i.jsxs("span",{children:["Version ",(a==null?void 0:a.version)||"0.0.0"]})]}),i.jsxs("div",{className:"inline-flex items-center gap-2 rounded-full border border-[color:var(--line)] bg-white px-3 py-2 text-[color:var(--success)]",children:[i.jsx("span",{className:"h-2 w-2 rounded-full bg-[color:var(--success)]"}),i.jsx("span",{children:(a==null?void 0:a.status)==="ok"?"Health OK":"Health Pending"})]})]})]}),i.jsx("section",{className:"h-[calc(100vh-56px)] overflow-hidden",children:g()})]})]})}const Ex=new fy({defaultOptions:{queries:{refetchOnWindowFocus:!1,refetchOnReconnect:!1,retry:1}}});Di.createRoot(document.getElementById("root")).render(i.jsx(Mh.StrictMode,{children:i.jsx(hy,{client:Ex,children:i.jsx(Cx,{})})}));