apteva 0.2.10 → 0.3.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,218 +0,0 @@
1
- var vM=Object.create;var{getPrototypeOf:kM,defineProperty:bK,getOwnPropertyNames:AM}=Object;var IM=Object.prototype.hasOwnProperty;var J0=(Y,G,B)=>{B=Y!=null?vM(kM(Y)):{};let O=G||!Y||!Y.__esModule?bK(B,"default",{value:Y,enumerable:!0}):B;for(let H of AM(Y))if(!IM.call(O,H))bK(O,H,{get:()=>Y[H],enumerable:!0});return O};var $3=(Y,G)=>()=>(G||Y((G={exports:{}}).exports,G),G.exports);var F1=$3((TM,nX)=>{(function(){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart==="function")__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var Y="18.3.1",G=Symbol.for("react.element"),B=Symbol.for("react.portal"),O=Symbol.for("react.fragment"),H=Symbol.for("react.strict_mode"),W=Symbol.for("react.profiler"),L=Symbol.for("react.provider"),N=Symbol.for("react.context"),T=Symbol.for("react.forward_ref"),M=Symbol.for("react.suspense"),F=Symbol.for("react.suspense_list"),w=Symbol.for("react.memo"),v=Symbol.for("react.lazy"),S=Symbol.for("react.offscreen"),A=Symbol.iterator,h="@@iterator";function y(K){if(K===null||typeof K!=="object")return null;var f=A&&K[A]||K[h];if(typeof f==="function")return f;return null}var k={current:null},E={transition:null},x={current:null,isBatchingLegacy:!1,didScheduleLegacyUpdate:!1},j={current:null},d={},o=null;function c(K){o=K}d.setExtraStackFrame=function(K){o=K},d.getCurrentStack=null,d.getStackAddendum=function(){var K="";if(o)K+=o;var f=d.getCurrentStack;if(f)K+=f()||"";return K};var l=!1,a=!1,Q0=!1,q0=!1,Y0=!1,L0={ReactCurrentDispatcher:k,ReactCurrentBatchConfig:E,ReactCurrentOwner:j};L0.ReactDebugCurrentFrame=d,L0.ReactCurrentActQueue=x;function A0(K){{for(var f=arguments.length,r=Array(f>1?f-1:0),z0=1;z0<f;z0++)r[z0-1]=arguments[z0];s0("warn",K,r)}}function _0(K){{for(var f=arguments.length,r=Array(f>1?f-1:0),z0=1;z0<f;z0++)r[z0-1]=arguments[z0];s0("error",K,r)}}function s0(K,f,r){{var z0=L0.ReactDebugCurrentFrame,W0=z0.getStackAddendum();if(W0!=="")f+="%s",r=r.concat([W0]);var X1=r.map(function(E0){return String(E0)});X1.unshift("Warning: "+f),Function.prototype.apply.call(console[K],console,X1)}}var _1={};function $1(K,f){{var r=K.constructor,z0=r&&(r.displayName||r.name)||"ReactClass",W0=z0+"."+f;if(_1[W0])return;_0("Can't call %s on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign to `this.state` directly or define a `state = {};` class property with the desired state in the %s component.",f,z0),_1[W0]=!0}}var D1={isMounted:function(K){return!1},enqueueForceUpdate:function(K,f,r){$1(K,"forceUpdate")},enqueueReplaceState:function(K,f,r,z0){$1(K,"replaceState")},enqueueSetState:function(K,f,r,z0){$1(K,"setState")}},j0=Object.assign,O1={};Object.freeze(O1);function e(K,f,r){this.props=K,this.context=f,this.refs=O1,this.updater=r||D1}e.prototype.isReactComponent={},e.prototype.setState=function(K,f){if(typeof K!=="object"&&typeof K!=="function"&&K!=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,K,f,"setState")},e.prototype.forceUpdate=function(K){this.updater.enqueueForceUpdate(this,K,"forceUpdate")};{var y0={isMounted:["isMounted","Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks."],replaceState:["replaceState","Refactor your code to use setState instead (see https://github.com/facebook/react/issues/3236)."]},m0=function(K,f){Object.defineProperty(e.prototype,K,{get:function(){A0("%s(...) is deprecated in plain JavaScript React classes. %s",f[0],f[1]);return}})};for(var e0 in y0)if(y0.hasOwnProperty(e0))m0(e0,y0[e0])}function v0(){}v0.prototype=e.prototype;function a0(K,f,r){this.props=K,this.context=f,this.refs=O1,this.updater=r||D1}var z1=a0.prototype=new v0;z1.constructor=a0,j0(z1,e.prototype),z1.isPureReactComponent=!0;function U0(){var K={current:null};return Object.seal(K),K}var t0=Array.isArray;function v1(K){return t0(K)}function $6(K){{var f=typeof Symbol==="function"&&Symbol.toStringTag,r=f&&K[Symbol.toStringTag]||K.constructor.name||"Object";return r}}function T6(K){try{return m1(K),!1}catch(f){return!0}}function m1(K){return""+K}function Y1(K){if(T6(K))return _0("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",$6(K)),m1(K)}function p6(K,f,r){var z0=K.displayName;if(z0)return z0;var W0=f.displayName||f.name||"";return W0!==""?r+"("+W0+")":r}function c6(K){return K.displayName||"Context"}function F6(K){if(K==null)return null;if(typeof K.tag==="number")_0("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue.");if(typeof K==="function")return K.displayName||K.name||null;if(typeof K==="string")return K;switch(K){case O:return"Fragment";case B:return"Portal";case W:return"Profiler";case H:return"StrictMode";case M:return"Suspense";case F:return"SuspenseList"}if(typeof K==="object")switch(K.$$typeof){case N:var f=K;return c6(f)+".Consumer";case L:var r=K;return c6(r._context)+".Provider";case T:return p6(K,K.render,"ForwardRef");case w:var z0=K.displayName||null;if(z0!==null)return z0;return F6(K.type)||"Memo";case v:{var W0=K,X1=W0._payload,E0=W0._init;try{return F6(E0(X1))}catch(H1){return null}}}return null}var f6=Object.prototype.hasOwnProperty,C5={key:!0,ref:!0,__self:!0,__source:!0},q6,_4,B6;B6={};function w4(K){if(f6.call(K,"ref")){var f=Object.getOwnPropertyDescriptor(K,"ref").get;if(f&&f.isReactWarning)return!1}return K.ref!==void 0}function w6(K){if(f6.call(K,"key")){var f=Object.getOwnPropertyDescriptor(K,"key").get;if(f&&f.isReactWarning)return!1}return K.key!==void 0}function M6(K,f){var r=function(){if(!q6)q6=!0,_0("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",f)};r.isReactWarning=!0,Object.defineProperty(K,"key",{get:r,configurable:!0})}function G4(K,f){var r=function(){if(!_4)_4=!0,_0("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",f)};r.isReactWarning=!0,Object.defineProperty(K,"ref",{get:r,configurable:!0})}function h4(K){if(typeof K.ref==="string"&&j.current&&K.__self&&j.current.stateNode!==K.__self){var f=F6(j.current.type);if(!B6[f])_0('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',f,K.ref),B6[f]=!0}}var m6=function(K,f,r,z0,W0,X1,E0){var H1={$$typeof:G,type:K,key:f,ref:r,props:E0,_owner:X1};if(H1._store={},Object.defineProperty(H1._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(H1,"_self",{configurable:!1,enumerable:!1,writable:!1,value:z0}),Object.defineProperty(H1,"_source",{configurable:!1,enumerable:!1,writable:!1,value:W0}),Object.freeze)Object.freeze(H1.props),Object.freeze(H1);return H1};function j6(K,f,r){var z0,W0={},X1=null,E0=null,H1=null,h1=null;if(f!=null){if(w4(f))E0=f.ref,h4(f);if(w6(f))Y1(f.key),X1=""+f.key;H1=f.__self===void 0?null:f.__self,h1=f.__source===void 0?null:f.__source;for(z0 in f)if(f6.call(f,z0)&&!C5.hasOwnProperty(z0))W0[z0]=f[z0]}var e1=arguments.length-2;if(e1===1)W0.children=r;else if(e1>1){var K6=Array(e1);for(var O6=0;O6<e1;O6++)K6[O6]=arguments[O6+2];if(Object.freeze)Object.freeze(K6);W0.children=K6}if(K&&K.defaultProps){var v6=K.defaultProps;for(z0 in v6)if(W0[z0]===void 0)W0[z0]=v6[z0]}if(X1||E0){var u6=typeof K==="function"?K.displayName||K.name||"Unknown":K;if(X1)M6(W0,u6);if(E0)G4(W0,u6)}return m6(K,X1,E0,H1,h1,j.current,W0)}function R0(K,f){var r=m6(K.type,f,K.ref,K._self,K._source,K._owner,K.props);return r}function i0(K,f,r){if(K===null||K===void 0)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+K+".");var z0,W0=j0({},K.props),X1=K.key,E0=K.ref,H1=K._self,h1=K._source,e1=K._owner;if(f!=null){if(w4(f))E0=f.ref,e1=j.current;if(w6(f))Y1(f.key),X1=""+f.key;var K6;if(K.type&&K.type.defaultProps)K6=K.type.defaultProps;for(z0 in f)if(f6.call(f,z0)&&!C5.hasOwnProperty(z0))if(f[z0]===void 0&&K6!==void 0)W0[z0]=K6[z0];else W0[z0]=f[z0]}var O6=arguments.length-2;if(O6===1)W0.children=r;else if(O6>1){var v6=Array(O6);for(var u6=0;u6<O6;u6++)v6[u6]=arguments[u6+2];W0.children=v6}return m6(K.type,X1,E0,H1,h1,e1,W0)}function r0(K){return typeof K==="object"&&K!==null&&K.$$typeof===G}var u1=".",n1=":";function S6(K){var f=/[=:]/g,r={"=":"=0",":":"=2"},z0=K.replace(f,function(W0){return r[W0]});return"$"+z0}var J6=!1,x6=/\/+/g;function L1(K){return K.replace(x6,"$&/")}function B1(K,f){if(typeof K==="object"&&K!==null&&K.key!=null)return Y1(K.key),S6(""+K.key);return f.toString(36)}function l4(K,f,r,z0,W0){var X1=typeof K;if(X1==="undefined"||X1==="boolean")K=null;var E0=!1;if(K===null)E0=!0;else switch(X1){case"string":case"number":E0=!0;break;case"object":switch(K.$$typeof){case G:case B:E0=!0}}if(E0){var H1=K,h1=W0(H1),e1=z0===""?u1+B1(H1,0):z0;if(v1(h1)){var K6="";if(e1!=null)K6=L1(e1)+"/";l4(h1,f,K6,"",function(PZ){return PZ})}else if(h1!=null){if(r0(h1)){if(h1.key&&(!H1||H1.key!==h1.key))Y1(h1.key);h1=R0(h1,r+(h1.key&&(!H1||H1.key!==h1.key)?L1(""+h1.key)+"/":"")+e1)}f.push(h1)}return 1}var O6,v6,u6=0,i1=z0===""?u1:z0+n1;if(v1(K))for(var S7=0;S7<K.length;S7++)O6=K[S7],v6=i1+B1(O6,S7),u6+=l4(O6,f,r,v6,W0);else{var v3=y(K);if(typeof v3==="function"){var j2=K;if(v3===j2.entries){if(!J6)A0("Using Maps as children is not supported. Use an array of keyed ReactElements instead.");J6=!0}var RZ=v3.call(j2),W8,o2=0;while(!(W8=RZ.next()).done)O6=W8.value,v6=i1+B1(O6,o2++),u6+=l4(O6,f,r,v6,W0)}else if(X1==="object"){var a2=String(K);throw Error("Objects are not valid as a React child (found: "+(a2==="[object Object]"?"object with keys {"+Object.keys(K).join(", ")+"}":a2)+"). If you meant to render a collection of children, use an array instead.")}}return u6}function U4(K,f,r){if(K==null)return K;var z0=[],W0=0;return l4(K,z0,"","",function(X1){return f.call(r,X1,W0++)}),z0}function d4(K){var f=0;return U4(K,function(){f++}),f}function n5(K,f,r){U4(K,function(){f.apply(this,arguments)},r)}function h5(K){return U4(K,function(f){return f})||[]}function t5(K){if(!r0(K))throw Error("React.Children.only expected to receive a single React element child.");return K}function N5(K){var f={$$typeof:N,_currentValue:K,_currentValue2:K,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null};f.Provider={$$typeof:L,_context:f};var r=!1,z0=!1,W0=!1;{var X1={$$typeof:N,_context:f};Object.defineProperties(X1,{Provider:{get:function(){if(!z0)z0=!0,_0("Rendering <Context.Consumer.Provider> is not supported and will be removed in a future major release. Did you mean to render <Context.Provider> instead?");return f.Provider},set:function(E0){f.Provider=E0}},_currentValue:{get:function(){return f._currentValue},set:function(E0){f._currentValue=E0}},_currentValue2:{get:function(){return f._currentValue2},set:function(E0){f._currentValue2=E0}},_threadCount:{get:function(){return f._threadCount},set:function(E0){f._threadCount=E0}},Consumer:{get:function(){if(!r)r=!0,_0("Rendering <Context.Consumer.Consumer> is not supported and will be removed in a future major release. Did you mean to render <Context.Consumer> instead?");return f.Consumer}},displayName:{get:function(){return f.displayName},set:function(E0){if(!W0)A0("Setting `displayName` on Context.Consumer has no effect. You should set it directly on the context with Context.displayName = '%s'.",E0),W0=!0}}}),f.Consumer=X1}return f._currentRenderer=null,f._currentRenderer2=null,f}var y4=-1,y5=0,f1=1,t1=2;function H6(K){if(K._status===y4){var f=K._result,r=f();if(r.then(function(X1){if(K._status===y5||K._status===y4){var E0=K;E0._status=f1,E0._result=X1}},function(X1){if(K._status===y5||K._status===y4){var E0=K;E0._status=t1,E0._result=X1}}),K._status===y4){var z0=K;z0._status=y5,z0._result=r}}if(K._status===f1){var W0=K._result;if(W0===void 0)_0(`lazy: Expected the result of a dynamic import() call. Instead received: %s
2
-
3
- Your code should look like:
4
- const MyComponent = lazy(() => import('./MyComponent'))
5
-
6
- Did you accidentally put curly braces around the import?`,W0);if(!("default"in W0))_0(`lazy: Expected the result of a dynamic import() call. Instead received: %s
7
-
8
- Your code should look like:
9
- const MyComponent = lazy(() => import('./MyComponent'))`,W0);return W0.default}else throw K._result}function d1(K){var f={_status:y4,_result:K},r={$$typeof:v,_payload:f,_init:H6};{var z0,W0;Object.defineProperties(r,{defaultProps:{configurable:!0,get:function(){return z0},set:function(X1){_0("React.lazy(...): It is not supported to assign `defaultProps` to a lazy component import. Either specify them where the component is defined, or create a wrapping component around it."),z0=X1,Object.defineProperty(r,"defaultProps",{enumerable:!0})}},propTypes:{configurable:!0,get:function(){return W0},set:function(X1){_0("React.lazy(...): It is not supported to assign `propTypes` to a lazy component import. Either specify them where the component is defined, or create a wrapping component around it."),W0=X1,Object.defineProperty(r,"propTypes",{enumerable:!0})}}})}return r}function I(K){{if(K!=null&&K.$$typeof===w)_0("forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...)).");else if(typeof K!=="function")_0("forwardRef requires a render function but was given %s.",K===null?"null":typeof K);else if(K.length!==0&&K.length!==2)_0("forwardRef render functions accept exactly two parameters: props and ref. %s",K.length===1?"Did you forget to use the ref parameter?":"Any additional parameter will be undefined.");if(K!=null){if(K.defaultProps!=null||K.propTypes!=null)_0("forwardRef render functions do not support propTypes or defaultProps. Did you accidentally pass a React component?")}}var f={$$typeof:T,render:K};{var r;Object.defineProperty(f,"displayName",{enumerable:!1,configurable:!0,get:function(){return r},set:function(z0){if(r=z0,!K.name&&!K.displayName)K.displayName=z0}})}return f}var X0=Symbol.for("react.module.reference");function G0(K){if(typeof K==="string"||typeof K==="function")return!0;if(K===O||K===W||Y0||K===H||K===M||K===F||q0||K===S||l||a||Q0)return!0;if(typeof K==="object"&&K!==null){if(K.$$typeof===v||K.$$typeof===w||K.$$typeof===L||K.$$typeof===N||K.$$typeof===T||K.$$typeof===X0||K.getModuleId!==void 0)return!0}return!1}function P(K,f){if(!G0(K))_0("memo: The first argument must be a component. Instead received: %s",K===null?"null":typeof K);var r={$$typeof:w,type:K,compare:f===void 0?null:f};{var z0;Object.defineProperty(r,"displayName",{enumerable:!1,configurable:!0,get:function(){return z0},set:function(W0){if(z0=W0,!K.name&&!K.displayName)K.displayName=W0}})}return r}function g(){var K=k.current;if(K===null)_0(`Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
10
- 1. You might have mismatching versions of React and the renderer (such as React DOM)
11
- 2. You might be breaking the Rules of Hooks
12
- 3. You might have more than one copy of React in the same app
13
- See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.`);return K}function $0(K){var f=g();if(K._context!==void 0){var r=K._context;if(r.Consumer===K)_0("Calling useContext(Context.Consumer) is not supported, may cause bugs, and will be removed in a future major release. Did you mean to call useContext(Context) instead?");else if(r.Provider===K)_0("Calling useContext(Context.Provider) is not supported. Did you mean to call useContext(Context) instead?")}return f.useContext(K)}function N0(K){var f=g();return f.useState(K)}function F0(K,f,r){var z0=g();return z0.useReducer(K,f,r)}function d0(K){var f=g();return f.useRef(K)}function h0(K,f){var r=g();return r.useEffect(K,f)}function H0(K,f){var r=g();return r.useInsertionEffect(K,f)}function w0(K,f){var r=g();return r.useLayoutEffect(K,f)}function x0(K,f){var r=g();return r.useCallback(K,f)}function S1(K,f){var r=g();return r.useMemo(K,f)}function s1(K,f,r){var z0=g();return z0.useImperativeHandle(K,f,r)}function c4(K,f){{var r=g();return r.useDebugValue(K,f)}}function b5(){var K=g();return K.useTransition()}function R6(K){var f=g();return f.useDeferredValue(K)}function R1(){var K=g();return K.useId()}function L8(K,f,r){var z0=g();return z0.useSyncExternalStore(K,f,r)}var s5=0,V2,D2,m2,u2,g2,E2,l2;function yz(){}yz.__reactDisabledLog=!0;function WZ(){{if(s5===0){V2=console.log,D2=console.info,m2=console.warn,u2=console.error,g2=console.group,E2=console.groupCollapsed,l2=console.groupEnd;var K={configurable:!0,enumerable:!0,value:yz,writable:!0};Object.defineProperties(console,{info:K,log:K,warn:K,error:K,group:K,groupCollapsed:K,groupEnd:K})}s5++}}function d2(){{if(s5--,s5===0){var K={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:j0({},K,{value:V2}),info:j0({},K,{value:D2}),warn:j0({},K,{value:m2}),error:j0({},K,{value:u2}),group:j0({},K,{value:g2}),groupCollapsed:j0({},K,{value:E2}),groupEnd:j0({},K,{value:l2})})}if(s5<0)_0("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var I7=L0.ReactCurrentDispatcher,W5;function i8(K,f,r){{if(W5===void 0)try{throw Error()}catch(W0){var z0=W0.stack.trim().match(/\n( *(at )?)/);W5=z0&&z0[1]||""}return`
14
- `+W5+K}}var p8=!1,w3;{var c2=typeof WeakMap==="function"?WeakMap:Map;w3=new c2}function Vz(K,f){if(!K||p8)return"";{var r=w3.get(K);if(r!==void 0)return r}var z0;p8=!0;var W0=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var X1;X1=I7.current,I7.current=null,WZ();try{if(f){var E0=function(){throw Error()};if(Object.defineProperty(E0.prototype,"props",{set:function(){throw Error()}}),typeof Reflect==="object"&&Reflect.construct){try{Reflect.construct(E0,[])}catch(i1){z0=i1}Reflect.construct(K,[],E0)}else{try{E0.call()}catch(i1){z0=i1}K.call(E0.prototype)}}else{try{throw Error()}catch(i1){z0=i1}K()}}catch(i1){if(i1&&z0&&typeof i1.stack==="string"){var H1=i1.stack.split(`
15
- `),h1=z0.stack.split(`
16
- `),e1=H1.length-1,K6=h1.length-1;while(e1>=1&&K6>=0&&H1[e1]!==h1[K6])K6--;for(;e1>=1&&K6>=0;e1--,K6--)if(H1[e1]!==h1[K6]){if(e1!==1||K6!==1)do if(e1--,K6--,K6<0||H1[e1]!==h1[K6]){var O6=`
17
- `+H1[e1].replace(" at new "," at ");if(K.displayName&&O6.includes("<anonymous>"))O6=O6.replace("<anonymous>",K.displayName);if(typeof K==="function")w3.set(K,O6);return O6}while(e1>=1&&K6>=0);break}}}finally{p8=!1,I7.current=X1,d2(),Error.prepareStackTrace=W0}var v6=K?K.displayName||K.name:"",u6=v6?i8(v6):"";if(typeof K==="function")w3.set(K,u6);return u6}function x2(K,f,r){return Vz(K,!1)}function _Z(K){var f=K.prototype;return!!(f&&f.isReactComponent)}function j8(K,f,r){if(K==null)return"";if(typeof K==="function")return Vz(K,_Z(K));if(typeof K==="string")return i8(K);switch(K){case M:return i8("Suspense");case F:return i8("SuspenseList")}if(typeof K==="object")switch(K.$$typeof){case T:return x2(K.render);case w:return j8(K.type,f,r);case v:{var z0=K,W0=z0._payload,X1=z0._init;try{return j8(X1(W0),f,r)}catch(E0){}}}return""}var Dz={},i2=L0.ReactDebugCurrentFrame;function R3(K){if(K){var f=K._owner,r=j8(K.type,K._source,f?f.type:null);i2.setExtraStackFrame(r)}else i2.setExtraStackFrame(null)}function mz(K,f,r,z0,W0){{var X1=Function.call.bind(f6);for(var E0 in K)if(X1(K,E0)){var H1=void 0;try{if(typeof K[E0]!=="function"){var h1=Error((z0||"React class")+": "+r+" type `"+E0+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof K[E0]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw h1.name="Invariant Violation",h1}H1=K[E0](f,E0,z0,r,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(e1){H1=e1}if(H1&&!(H1 instanceof Error))R3(W0),_0("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",z0||"React class",r,E0,typeof H1),R3(null);if(H1 instanceof Error&&!(H1.message in Dz))Dz[H1.message]=!0,R3(W0),_0("Failed %s type: %s",r,H1.message),R3(null)}}}function l1(K){if(K){var f=K._owner,r=j8(K.type,K._source,f?f.type:null);c(r)}else c(null)}var uz=!1;function p2(){if(j.current){var K=F6(j.current.type);if(K)return`
18
-
19
- Check the render method of \``+K+"`."}return""}function N1(K){if(K!==void 0){var f=K.fileName.replace(/^.*[\\\/]/,""),r=K.lineNumber;return`
20
-
21
- Check your code at `+f+":"+r+"."}return""}function gz(K){if(K!==null&&K!==void 0)return N1(K.__source);return""}var V4={};function T7(K){var f=p2();if(!f){var r=typeof K==="string"?K:K.displayName||K.name;if(r)f=`
22
-
23
- Check the top-level render call using <`+r+">."}return f}function o8(K,f){if(!K._store||K._store.validated||K.key!=null)return;K._store.validated=!0;var r=T7(f);if(V4[r])return;V4[r]=!0;var z0="";if(K&&K._owner&&K._owner!==j.current)z0=" It was passed a child from "+F6(K._owner.type)+".";l1(K),_0('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',r,z0),l1(null)}function Ez(K,f){if(typeof K!=="object")return;if(v1(K))for(var r=0;r<K.length;r++){var z0=K[r];if(r0(z0))o8(z0,f)}else if(r0(K)){if(K._store)K._store.validated=!0}else if(K){var W0=y(K);if(typeof W0==="function"){if(W0!==K.entries){var X1=W0.call(K),E0;while(!(E0=X1.next()).done)if(r0(E0.value))o8(E0.value,f)}}}}function q4(K){{var f=K.type;if(f===null||f===void 0||typeof f==="string")return;var r;if(typeof f==="function")r=f.propTypes;else if(typeof f==="object"&&(f.$$typeof===T||f.$$typeof===w))r=f.propTypes;else return;if(r){var z0=F6(f);mz(r,K.props,"prop",z0,K)}else if(f.PropTypes!==void 0&&!uz){uz=!0;var W0=F6(f);_0("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",W0||"Unknown")}if(typeof f.getDefaultProps==="function"&&!f.getDefaultProps.isReactClassApproved)_0("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function V6(K){{var f=Object.keys(K.props);for(var r=0;r<f.length;r++){var z0=f[r];if(z0!=="children"&&z0!=="key"){l1(K),_0("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",z0),l1(null);break}}if(K.ref!==null)l1(K),_0("Invalid attribute `ref` supplied to `React.Fragment`."),l1(null)}}function lz(K,f,r){var z0=G0(K);if(!z0){var W0="";if(K===void 0||typeof K==="object"&&K!==null&&Object.keys(K).length===0)W0+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.";var X1=gz(f);if(X1)W0+=X1;else W0+=p2();var E0;if(K===null)E0="null";else if(v1(K))E0="array";else if(K!==void 0&&K.$$typeof===G)E0="<"+(F6(K.type)||"Unknown")+" />",W0=" Did you accidentally export a JSX literal instead of a component?";else E0=typeof K;_0("React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",E0,W0)}var H1=j6.apply(this,arguments);if(H1==null)return H1;if(z0)for(var h1=2;h1<arguments.length;h1++)Ez(arguments[h1],K);if(K===O)V6(H1);else q4(H1);return H1}var Y5=!1;function t4(K){var f=lz.bind(null,K);f.type=K;{if(!Y5)Y5=!0,A0("React.createFactory() is deprecated and will be removed in a future major release. Consider using JSX or use React.createElement() directly instead.");Object.defineProperty(f,"type",{enumerable:!1,get:function(){return A0("Factory.type is deprecated. Access the class directly before passing it to createFactory."),Object.defineProperty(this,"type",{value:K}),K}})}return f}function e5(K,f,r){var z0=i0.apply(this,arguments);for(var W0=2;W0<arguments.length;W0++)Ez(arguments[W0],z0.type);return q4(z0),z0}function wZ(K,f){var r=E.transition;E.transition={};var z0=E.transition;E.transition._updatedFibers=new Set;try{K()}finally{if(E.transition=r,r===null&&z0._updatedFibers){var W0=z0._updatedFibers.size;if(W0>10)A0("Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table.");z0._updatedFibers.clear()}}}var P3=!1,f7=null;function dz(K){if(f7===null)try{var f=("require"+Math.random()).slice(0,7),r=nX&&nX[f];f7=r.call(nX,"timers").setImmediate}catch(z0){f7=function(W0){if(P3===!1){if(P3=!0,typeof MessageChannel>"u")_0("This browser does not have a MessageChannel implementation, so enqueuing tasks via await act(async () => ...) will fail. Please file an issue at https://github.com/facebook/react/issues if you encounter this warning.")}var X1=new MessageChannel;X1.port1.onmessage=W0,X1.port2.postMessage(void 0)}}return f7(K)}var a8=0,cz=!1;function xz(K){{var f=a8;if(a8++,x.current===null)x.current=[];var r=x.isBatchingLegacy,z0;try{if(x.isBatchingLegacy=!0,z0=K(),!r&&x.didScheduleLegacyUpdate){var W0=x.current;if(W0!==null)x.didScheduleLegacyUpdate=!1,M3(W0)}}catch(v6){throw N8(f),v6}finally{x.isBatchingLegacy=r}if(z0!==null&&typeof z0==="object"&&typeof z0.then==="function"){var X1=z0,E0=!1,H1={then:function(v6,u6){E0=!0,X1.then(function(i1){if(N8(f),a8===0)F3(i1,v6,u6);else v6(i1)},function(i1){N8(f),u6(i1)})}};if(!cz&&typeof Promise<"u")Promise.resolve().then(function(){}).then(function(){if(!E0)cz=!0,_0("You called act(async () => ...) without await. This could lead to unexpected testing behaviour, interleaving multiple act calls and mixing their scopes. You should - await act(async () => ...);")});return H1}else{var h1=z0;if(N8(f),a8===0){var e1=x.current;if(e1!==null)M3(e1),x.current=null;var K6={then:function(v6,u6){if(x.current===null)x.current=[],F3(h1,v6,u6);else v6(h1)}};return K6}else{var O6={then:function(v6,u6){v6(h1)}};return O6}}}}function N8(K){{if(K!==a8-1)_0("You seem to have overlapping act() calls, this is not supported. Be sure to await previous act() calls before making a new one. ");a8=K}}function F3(K,f,r){{var z0=x.current;if(z0!==null)try{M3(z0),dz(function(){if(z0.length===0)x.current=null,f(K);else F3(K,f,r)})}catch(W0){r(W0)}else f(K)}}var r8=!1;function M3(K){if(!r8){r8=!0;var f=0;try{for(;f<K.length;f++){var r=K[f];do r=r(!0);while(r!==null)}K.length=0}catch(z0){throw K=K.slice(f+1),z0}finally{r8=!1}}}var iz=lz,pz=e5,jz=t4,oz={map:U4,forEach:n5,count:d4,toArray:h5,only:t5};if(TM.Children=oz,TM.Component=e,TM.Fragment=O,TM.Profiler=W,TM.PureComponent=a0,TM.StrictMode=H,TM.Suspense=M,TM.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=L0,TM.act=xz,TM.cloneElement=pz,TM.createContext=N5,TM.createElement=iz,TM.createFactory=jz,TM.createRef=U0,TM.forwardRef=I,TM.isValidElement=r0,TM.lazy=d1,TM.memo=P,TM.startTransition=wZ,TM.unstable_act=xz,TM.useCallback=x0,TM.useContext=$0,TM.useDebugValue=c4,TM.useDeferredValue=R6,TM.useEffect=h0,TM.useId=R1,TM.useImperativeHandle=s1,TM.useInsertionEffect=H0,TM.useLayoutEffect=w0,TM.useMemo=S1,TM.useReducer=F0,TM.useRef=d0,TM.useState=N0,TM.useSyncExternalStore=L8,TM.useTransition=b5,TM.version=Y,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop==="function")__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()});var YK=$3((fM)=>{(function(){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart==="function")__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var Y=!1,G=!1,B=5;function O(R0,i0){var r0=R0.length;R0.push(i0),L(R0,i0,r0)}function H(R0){return R0.length===0?null:R0[0]}function W(R0){if(R0.length===0)return null;var i0=R0[0],r0=R0.pop();if(r0!==i0)R0[0]=r0,N(R0,r0,0);return i0}function L(R0,i0,r0){var u1=r0;while(u1>0){var n1=u1-1>>>1,S6=R0[n1];if(T(S6,i0)>0)R0[n1]=i0,R0[u1]=S6,u1=n1;else return}}function N(R0,i0,r0){var u1=r0,n1=R0.length,S6=n1>>>1;while(u1<S6){var J6=(u1+1)*2-1,x6=R0[J6],L1=J6+1,B1=R0[L1];if(T(x6,i0)<0)if(L1<n1&&T(B1,x6)<0)R0[u1]=B1,R0[L1]=i0,u1=L1;else R0[u1]=x6,R0[J6]=i0,u1=J6;else if(L1<n1&&T(B1,i0)<0)R0[u1]=B1,R0[L1]=i0,u1=L1;else return}}function T(R0,i0){var r0=R0.sortIndex-i0.sortIndex;return r0!==0?r0:R0.id-i0.id}var M=1,F=2,w=3,v=4,S=5;function A(R0,i0){}var h=typeof performance==="object"&&typeof performance.now==="function";if(h){var y=performance;fM.unstable_now=function(){return y.now()}}else{var k=Date,E=k.now();fM.unstable_now=function(){return k.now()-E}}var x=1073741823,j=-1,d=250,o=5000,c=1e4,l=x,a=[],Q0=[],q0=1,Y0=null,L0=w,A0=!1,_0=!1,s0=!1,_1=typeof setTimeout==="function"?setTimeout:null,$1=typeof clearTimeout==="function"?clearTimeout:null,D1=typeof setImmediate<"u"?setImmediate:null,j0=typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0?navigator.scheduling.isInputPending.bind(navigator.scheduling):null;function O1(R0){var i0=H(Q0);while(i0!==null){if(i0.callback===null)W(Q0);else if(i0.startTime<=R0)W(Q0),i0.sortIndex=i0.expirationTime,O(a,i0);else return;i0=H(Q0)}}function e(R0){if(s0=!1,O1(R0),!_0)if(H(a)!==null)_0=!0,M6(y0);else{var i0=H(Q0);if(i0!==null)G4(e,i0.startTime-R0)}}function y0(R0,i0){if(_0=!1,s0)s0=!1,h4();A0=!0;var r0=L0;try{if(G)try{return m0(R0,i0)}catch(n1){if(Y0!==null){var u1=fM.unstable_now();A(Y0,u1),Y0.isQueued=!1}throw n1}else return m0(R0,i0)}finally{Y0=null,L0=r0,A0=!1}}function m0(R0,i0){var r0=i0;O1(r0),Y0=H(a);while(Y0!==null&&!Y){if(Y0.expirationTime>r0&&(!R0||f6()))break;var u1=Y0.callback;if(typeof u1==="function"){Y0.callback=null,L0=Y0.priorityLevel;var n1=Y0.expirationTime<=r0,S6=u1(n1);if(r0=fM.unstable_now(),typeof S6==="function")Y0.callback=S6;else if(Y0===H(a))W(a);O1(r0)}else W(a);Y0=H(a)}if(Y0!==null)return!0;else{var J6=H(Q0);if(J6!==null)G4(e,J6.startTime-r0);return!1}}function e0(R0,i0){switch(R0){case M:case F:case w:case v:case S:break;default:R0=w}var r0=L0;L0=R0;try{return i0()}finally{L0=r0}}function v0(R0){var i0;switch(L0){case M:case F:case w:i0=w;break;default:i0=L0;break}var r0=L0;L0=i0;try{return R0()}finally{L0=r0}}function a0(R0){var i0=L0;return function(){var r0=L0;L0=i0;try{return R0.apply(this,arguments)}finally{L0=r0}}}function z1(R0,i0,r0){var u1=fM.unstable_now(),n1;if(typeof r0==="object"&&r0!==null){var S6=r0.delay;if(typeof S6==="number"&&S6>0)n1=u1+S6;else n1=u1}else n1=u1;var J6;switch(R0){case M:J6=j;break;case F:J6=d;break;case S:J6=l;break;case v:J6=c;break;case w:default:J6=o;break}var x6=n1+J6,L1={id:q0++,callback:i0,priorityLevel:R0,startTime:n1,expirationTime:x6,sortIndex:-1};if(n1>u1){if(L1.sortIndex=n1,O(Q0,L1),H(a)===null&&L1===H(Q0)){if(s0)h4();else s0=!0;G4(e,n1-u1)}}else if(L1.sortIndex=x6,O(a,L1),!_0&&!A0)_0=!0,M6(y0);return L1}function U0(){}function t0(){if(!_0&&!A0)_0=!0,M6(y0)}function v1(){return H(a)}function $6(R0){R0.callback=null}function T6(){return L0}var m1=!1,Y1=null,p6=-1,c6=B,F6=-1;function f6(){var R0=fM.unstable_now()-F6;if(R0<c6)return!1;return!0}function C5(){}function q6(R0){if(R0<0||R0>125){console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported");return}if(R0>0)c6=Math.floor(1000/R0);else c6=B}var _4=function(){if(Y1!==null){var R0=fM.unstable_now();F6=R0;var i0=!0,r0=!0;try{r0=Y1(i0,R0)}finally{if(r0)B6();else m1=!1,Y1=null}}else m1=!1},B6;if(typeof D1==="function")B6=function(){D1(_4)};else if(typeof MessageChannel<"u"){var w4=new MessageChannel,w6=w4.port2;w4.port1.onmessage=_4,B6=function(){w6.postMessage(null)}}else B6=function(){_1(_4,0)};function M6(R0){if(Y1=R0,!m1)m1=!0,B6()}function G4(R0,i0){p6=_1(function(){R0(fM.unstable_now())},i0)}function h4(){$1(p6),p6=-1}var m6=C5,j6=null;if(fM.unstable_IdlePriority=S,fM.unstable_ImmediatePriority=M,fM.unstable_LowPriority=v,fM.unstable_NormalPriority=w,fM.unstable_Profiling=j6,fM.unstable_UserBlockingPriority=F,fM.unstable_cancelCallback=$6,fM.unstable_continueExecution=t0,fM.unstable_forceFrameRate=q6,fM.unstable_getCurrentPriorityLevel=T6,fM.unstable_getFirstCallbackNode=v1,fM.unstable_next=v0,fM.unstable_pauseExecution=U0,fM.unstable_requestPaint=m6,fM.unstable_runWithPriority=e0,fM.unstable_scheduleCallback=z1,fM.unstable_shouldYield=f6,fM.unstable_wrapCallback=a0,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop==="function")__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()});var $K=$3((SM)=>{var vz=J0(F1()),Z6=J0(YK());(function(){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart==="function")__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var Y=vz.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,G=!1;function B(z){G=z}function O(z){if(!G){for(var Q=arguments.length,X=Array(Q>1?Q-1:0),Z=1;Z<Q;Z++)X[Z-1]=arguments[Z];W("warn",z,X)}}function H(z){if(!G){for(var Q=arguments.length,X=Array(Q>1?Q-1:0),Z=1;Z<Q;Z++)X[Z-1]=arguments[Z];W("error",z,X)}}function W(z,Q,X){{var Z=Y.ReactDebugCurrentFrame,J=Z.getStackAddendum();if(J!=="")Q+="%s",X=X.concat([J]);var b=X.map(function($){return String($)});b.unshift("Warning: "+Q),Function.prototype.apply.call(console[z],console,b)}}var L=0,N=1,T=2,M=3,F=4,w=5,v=6,S=7,A=8,h=9,y=10,k=11,E=12,x=13,j=14,d=15,o=16,c=17,l=18,a=19,Q0=21,q0=22,Y0=23,L0=24,A0=25,_0=!0,s0=!1,_1=!1,$1=!1,D1=!1,j0=!0,O1=!1,e=!0,y0=!0,m0=!0,e0=!0,v0=new Set,a0={},z1={};function U0(z,Q){t0(z,Q),t0(z+"Capture",Q)}function t0(z,Q){if(a0[z])H("EventRegistry: More than one plugin attempted to publish the same registration name, `%s`.",z);a0[z]=Q;{var X=z.toLowerCase();if(z1[X]=z,z==="onDoubleClick")z1.ondblclick=z}for(var Z=0;Z<Q.length;Z++)v0.add(Q[Z])}var v1=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",$6=Object.prototype.hasOwnProperty;function T6(z){{var Q=typeof Symbol==="function"&&Symbol.toStringTag,X=Q&&z[Symbol.toStringTag]||z.constructor.name||"Object";return X}}function m1(z){try{return Y1(z),!1}catch(Q){return!0}}function Y1(z){return""+z}function p6(z,Q){if(m1(z))return H("The provided `%s` attribute is an unsupported type %s. This value must be coerced to a string before before using it here.",Q,T6(z)),Y1(z)}function c6(z){if(m1(z))return H("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",T6(z)),Y1(z)}function F6(z,Q){if(m1(z))return H("The provided `%s` prop is an unsupported type %s. This value must be coerced to a string before before using it here.",Q,T6(z)),Y1(z)}function f6(z,Q){if(m1(z))return H("The provided `%s` CSS property is an unsupported type %s. This value must be coerced to a string before before using it here.",Q,T6(z)),Y1(z)}function C5(z){if(m1(z))return H("The provided HTML markup uses a value of unsupported type %s. This value must be coerced to a string before before using it here.",T6(z)),Y1(z)}function q6(z){if(m1(z))return H("Form field values (value, checked, defaultValue, or defaultChecked props) must be strings, not %s. This value must be coerced to a string before before using it here.",T6(z)),Y1(z)}var _4=0,B6=1,w4=2,w6=3,M6=4,G4=5,h4=6,m6=":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",j6=m6+"\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",R0=new RegExp("^["+m6+"]["+j6+"]*$"),i0={},r0={};function u1(z){if($6.call(r0,z))return!0;if($6.call(i0,z))return!1;if(R0.test(z))return r0[z]=!0,!0;return i0[z]=!0,H("Invalid attribute name: `%s`",z),!1}function n1(z,Q,X){if(Q!==null)return Q.type===_4;if(X)return!1;if(z.length>2&&(z[0]==="o"||z[0]==="O")&&(z[1]==="n"||z[1]==="N"))return!0;return!1}function S6(z,Q,X,Z){if(X!==null&&X.type===_4)return!1;switch(typeof Q){case"function":case"symbol":return!0;case"boolean":{if(Z)return!1;if(X!==null)return!X.acceptsBooleans;else{var J=z.toLowerCase().slice(0,5);return J!=="data-"&&J!=="aria-"}}default:return!1}}function J6(z,Q,X,Z){if(Q===null||typeof Q>"u")return!0;if(S6(z,Q,X,Z))return!0;if(Z)return!1;if(X!==null)switch(X.type){case w6:return!Q;case M6:return Q===!1;case G4:return isNaN(Q);case h4:return isNaN(Q)||Q<1}return!1}function x6(z){return B1.hasOwnProperty(z)?B1[z]:null}function L1(z,Q,X,Z,J,b,$){this.acceptsBooleans=Q===w4||Q===w6||Q===M6,this.attributeName=Z,this.attributeNamespace=J,this.mustUseProperty=X,this.propertyName=z,this.type=Q,this.sanitizeURL=b,this.removeEmptyString=$}var B1={},l4=["children","dangerouslySetInnerHTML","defaultValue","defaultChecked","innerHTML","suppressContentEditableWarning","suppressHydrationWarning","style"];l4.forEach(function(z){B1[z]=new L1(z,_4,!1,z,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(z){var Q=z[0],X=z[1];B1[Q]=new L1(Q,B6,!1,X,null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(z){B1[z]=new L1(z,w4,!1,z.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(z){B1[z]=new L1(z,w4,!1,z,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"].forEach(function(z){B1[z]=new L1(z,w6,!1,z.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(z){B1[z]=new L1(z,w6,!0,z,null,!1,!1)}),["capture","download"].forEach(function(z){B1[z]=new L1(z,M6,!1,z,null,!1,!1)}),["cols","rows","size","span"].forEach(function(z){B1[z]=new L1(z,h4,!1,z,null,!1,!1)}),["rowSpan","start"].forEach(function(z){B1[z]=new L1(z,G4,!1,z.toLowerCase(),null,!1,!1)});var U4=/[\-\:]([a-z])/g,d4=function(z){return z[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"].forEach(function(z){var Q=z.replace(U4,d4);B1[Q]=new L1(Q,B6,!1,z,null,!1,!1)}),["xlink:actuate","xlink:arcrole","xlink:role","xlink:show","xlink:title","xlink:type"].forEach(function(z){var Q=z.replace(U4,d4);B1[Q]=new L1(Q,B6,!1,z,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(z){var Q=z.replace(U4,d4);B1[Q]=new L1(Q,B6,!1,z,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(z){B1[z]=new L1(z,B6,!1,z.toLowerCase(),null,!1,!1)});var n5="xlinkHref";B1[n5]=new L1("xlinkHref",B6,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(z){B1[z]=new L1(z,B6,!1,z.toLowerCase(),null,!0,!0)});var h5=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*\:/i,t5=!1;function N5(z){if(!t5&&h5.test(z))t5=!0,H("A future version of React will block javascript: URLs as a security precaution. Use event handlers instead if you can. If you need to generate unsafe HTML try using dangerouslySetInnerHTML instead. React was passed %s.",JSON.stringify(z))}function y4(z,Q,X,Z){if(Z.mustUseProperty){var J=Z.propertyName;return z[J]}else{if(p6(X,Q),Z.sanitizeURL)N5(""+X);var b=Z.attributeName,$=null;if(Z.type===M6){if(z.hasAttribute(b)){var U=z.getAttribute(b);if(U==="")return!0;if(J6(Q,X,Z,!1))return U;if(U===""+X)return X;return U}}else if(z.hasAttribute(b)){if(J6(Q,X,Z,!1))return z.getAttribute(b);if(Z.type===w6)return X;$=z.getAttribute(b)}if(J6(Q,X,Z,!1))return $===null?X:$;else if($===""+X)return X;else return $}}function y5(z,Q,X,Z){{if(!u1(Q))return;if(!z.hasAttribute(Q))return X===void 0?void 0:null;var J=z.getAttribute(Q);if(p6(X,Q),J===""+X)return X;return J}}function f1(z,Q,X,Z){var J=x6(Q);if(n1(Q,J,Z))return;if(J6(Q,X,J,Z))X=null;if(Z||J===null){if(u1(Q)){var b=Q;if(X===null)z.removeAttribute(b);else p6(X,Q),z.setAttribute(b,""+X)}return}var $=J.mustUseProperty;if($){var U=J.propertyName;if(X===null){var q=J.type;z[U]=q===w6?!1:""}else z[U]=X;return}var{attributeName:_,attributeNamespace:R}=J;if(X===null)z.removeAttribute(_);else{var D=J.type,V;if(D===w6||D===M6&&X===!0)V="";else if(p6(X,_),V=""+X,J.sanitizeURL)N5(V.toString());if(R)z.setAttributeNS(R,_,V);else z.setAttribute(_,V)}}var t1=Symbol.for("react.element"),H6=Symbol.for("react.portal"),d1=Symbol.for("react.fragment"),I=Symbol.for("react.strict_mode"),X0=Symbol.for("react.profiler"),G0=Symbol.for("react.provider"),P=Symbol.for("react.context"),g=Symbol.for("react.forward_ref"),$0=Symbol.for("react.suspense"),N0=Symbol.for("react.suspense_list"),F0=Symbol.for("react.memo"),d0=Symbol.for("react.lazy"),h0=Symbol.for("react.scope"),H0=Symbol.for("react.debug_trace_mode"),w0=Symbol.for("react.offscreen"),x0=Symbol.for("react.legacy_hidden"),S1=Symbol.for("react.cache"),s1=Symbol.for("react.tracing_marker"),c4=Symbol.iterator,b5="@@iterator";function R6(z){if(z===null||typeof z!=="object")return null;var Q=c4&&z[c4]||z[b5];if(typeof Q==="function")return Q;return null}var R1=Object.assign,L8=0,s5,V2,D2,m2,u2,g2,E2;function l2(){}l2.__reactDisabledLog=!0;function yz(){{if(L8===0){s5=console.log,V2=console.info,D2=console.warn,m2=console.error,u2=console.group,g2=console.groupCollapsed,E2=console.groupEnd;var z={configurable:!0,enumerable:!0,value:l2,writable:!0};Object.defineProperties(console,{info:z,log:z,warn:z,error:z,group:z,groupCollapsed:z,groupEnd:z})}L8++}}function WZ(){{if(L8--,L8===0){var z={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:R1({},z,{value:s5}),info:R1({},z,{value:V2}),warn:R1({},z,{value:D2}),error:R1({},z,{value:m2}),group:R1({},z,{value:u2}),groupCollapsed:R1({},z,{value:g2}),groupEnd:R1({},z,{value:E2})})}if(L8<0)H("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var d2=Y.ReactCurrentDispatcher,I7;function W5(z,Q,X){{if(I7===void 0)try{throw Error()}catch(J){var Z=J.stack.trim().match(/\n( *(at )?)/);I7=Z&&Z[1]||""}return`
24
- `+I7+z}}var i8=!1,p8;{var w3=typeof WeakMap==="function"?WeakMap:Map;p8=new w3}function c2(z,Q){if(!z||i8)return"";{var X=p8.get(z);if(X!==void 0)return X}var Z;i8=!0;var J=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var b;b=d2.current,d2.current=null,yz();try{if(Q){var $=function(){throw Error()};if(Object.defineProperty($.prototype,"props",{set:function(){throw Error()}}),typeof Reflect==="object"&&Reflect.construct){try{Reflect.construct($,[])}catch(t){Z=t}Reflect.construct(z,[],$)}else{try{$.call()}catch(t){Z=t}z.call($.prototype)}}else{try{throw Error()}catch(t){Z=t}z()}}catch(t){if(t&&Z&&typeof t.stack==="string"){var U=t.stack.split(`
25
- `),q=Z.stack.split(`
26
- `),_=U.length-1,R=q.length-1;while(_>=1&&R>=0&&U[_]!==q[R])R--;for(;_>=1&&R>=0;_--,R--)if(U[_]!==q[R]){if(_!==1||R!==1)do if(_--,R--,R<0||U[_]!==q[R]){var D=`
27
- `+U[_].replace(" at new "," at ");if(z.displayName&&D.includes("<anonymous>"))D=D.replace("<anonymous>",z.displayName);if(typeof z==="function")p8.set(z,D);return D}while(_>=1&&R>=0);break}}}finally{i8=!1,d2.current=b,WZ(),Error.prepareStackTrace=J}var V=z?z.displayName||z.name:"",n=V?W5(V):"";if(typeof z==="function")p8.set(z,n);return n}function Vz(z,Q,X){return c2(z,!0)}function x2(z,Q,X){return c2(z,!1)}function _Z(z){var Q=z.prototype;return!!(Q&&Q.isReactComponent)}function j8(z,Q,X){if(z==null)return"";if(typeof z==="function")return c2(z,_Z(z));if(typeof z==="string")return W5(z);switch(z){case $0:return W5("Suspense");case N0:return W5("SuspenseList")}if(typeof z==="object")switch(z.$$typeof){case g:return x2(z.render);case F0:return j8(z.type,Q,X);case d0:{var Z=z,J=Z._payload,b=Z._init;try{return j8(b(J),Q,X)}catch($){}}}return""}function Dz(z){var Q=z._debugOwner?z._debugOwner.type:null,X=z._debugSource;switch(z.tag){case w:return W5(z.type);case o:return W5("Lazy");case x:return W5("Suspense");case a:return W5("SuspenseList");case L:case T:case d:return x2(z.type);case k:return x2(z.type.render);case N:return Vz(z.type);default:return""}}function i2(z){try{var Q="",X=z;do Q+=Dz(X),X=X.return;while(X);return Q}catch(Z){return`
28
- Error generating stack: `+Z.message+`
29
- `+Z.stack}}function R3(z,Q,X){var Z=z.displayName;if(Z)return Z;var J=Q.displayName||Q.name||"";return J!==""?X+"("+J+")":X}function mz(z){return z.displayName||"Context"}function l1(z){if(z==null)return null;if(typeof z.tag==="number")H("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue.");if(typeof z==="function")return z.displayName||z.name||null;if(typeof z==="string")return z;switch(z){case d1:return"Fragment";case H6:return"Portal";case X0:return"Profiler";case I:return"StrictMode";case $0:return"Suspense";case N0:return"SuspenseList"}if(typeof z==="object")switch(z.$$typeof){case P:var Q=z;return mz(Q)+".Consumer";case G0:var X=z;return mz(X._context)+".Provider";case g:return R3(z,z.render,"ForwardRef");case F0:var Z=z.displayName||null;if(Z!==null)return Z;return l1(z.type)||"Memo";case d0:{var J=z,b=J._payload,$=J._init;try{return l1($(b))}catch(U){return null}}}return null}function uz(z,Q,X){var Z=Q.displayName||Q.name||"";return z.displayName||(Z!==""?X+"("+Z+")":X)}function p2(z){return z.displayName||"Context"}function N1(z){var{tag:Q,type:X}=z;switch(Q){case L0:return"Cache";case h:var Z=X;return p2(Z)+".Consumer";case y:var J=X;return p2(J._context)+".Provider";case l:return"DehydratedFragment";case k:return uz(X,X.render,"ForwardRef");case S:return"Fragment";case w:return X;case F:return"Portal";case M:return"Root";case v:return"Text";case o:return l1(X);case A:if(X===I)return"StrictMode";return"Mode";case q0:return"Offscreen";case E:return"Profiler";case Q0:return"Scope";case x:return"Suspense";case a:return"SuspenseList";case A0:return"TracingMarker";case N:case L:case c:case T:case j:case d:if(typeof X==="function")return X.displayName||X.name||null;if(typeof X==="string")return X;break}return null}var gz=Y.ReactDebugCurrentFrame,V4=null,T7=!1;function o8(){{if(V4===null)return null;var z=V4._debugOwner;if(z!==null&&typeof z<"u")return N1(z)}return null}function Ez(){{if(V4===null)return"";return i2(V4)}}function q4(){gz.getCurrentStack=null,V4=null,T7=!1}function V6(z){gz.getCurrentStack=z===null?null:Ez,V4=z,T7=!1}function lz(){return V4}function Y5(z){T7=z}function t4(z){return""+z}function e5(z){switch(typeof z){case"boolean":case"number":case"string":case"undefined":return z;case"object":return q6(z),z;default:return""}}var wZ={button:!0,checkbox:!0,image:!0,hidden:!0,radio:!0,reset:!0,submit:!0};function P3(z,Q){{if(!(wZ[Q.type]||Q.onChange||Q.onInput||Q.readOnly||Q.disabled||Q.value==null))H("You provided a `value` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultValue`. Otherwise, set either `onChange` or `readOnly`.");if(!(Q.onChange||Q.readOnly||Q.disabled||Q.checked==null))H("You provided a `checked` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultChecked`. Otherwise, set either `onChange` or `readOnly`.")}}function f7(z){var{type:Q,nodeName:X}=z;return X&&X.toLowerCase()==="input"&&(Q==="checkbox"||Q==="radio")}function dz(z){return z._valueTracker}function a8(z){z._valueTracker=null}function cz(z){var Q="";if(!z)return Q;if(f7(z))Q=z.checked?"true":"false";else Q=z.value;return Q}function xz(z){var Q=f7(z)?"checked":"value",X=Object.getOwnPropertyDescriptor(z.constructor.prototype,Q);q6(z[Q]);var Z=""+z[Q];if(z.hasOwnProperty(Q)||typeof X>"u"||typeof X.get!=="function"||typeof X.set!=="function")return;var{get:J,set:b}=X;Object.defineProperty(z,Q,{configurable:!0,get:function(){return J.call(this)},set:function(U){q6(U),Z=""+U,b.call(this,U)}}),Object.defineProperty(z,Q,{enumerable:X.enumerable});var $={getValue:function(){return Z},setValue:function(U){q6(U),Z=""+U},stopTracking:function(){a8(z),delete z[Q]}};return $}function N8(z){if(dz(z))return;z._valueTracker=xz(z)}function F3(z){if(!z)return!1;var Q=dz(z);if(!Q)return!0;var X=Q.getValue(),Z=cz(z);if(Z!==X)return Q.setValue(Z),!0;return!1}function r8(z){if(z=z||(typeof document<"u"?document:void 0),typeof z>"u")return null;try{return z.activeElement||z.body}catch(Q){return z.body}}var M3=!1,iz=!1,pz=!1,jz=!1;function oz(z){var Q=z.type==="checkbox"||z.type==="radio";return Q?z.checked!=null:z.value!=null}function K(z,Q){var X=z,Z=Q.checked,J=R1({},Q,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:Z!=null?Z:X._wrapperState.initialChecked});return J}function f(z,Q){{if(P3("input",Q),Q.checked!==void 0&&Q.defaultChecked!==void 0&&!iz)H("%s contains an input of type %s with both checked and defaultChecked props. Input elements must be either controlled or uncontrolled (specify either the checked prop, or the defaultChecked prop, but not both). Decide between using a controlled or uncontrolled input element and remove one of these props. More info: https://reactjs.org/link/controlled-components",o8()||"A component",Q.type),iz=!0;if(Q.value!==void 0&&Q.defaultValue!==void 0&&!M3)H("%s contains an input of type %s with both value and defaultValue props. Input elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled input element and remove one of these props. More info: https://reactjs.org/link/controlled-components",o8()||"A component",Q.type),M3=!0}var X=z,Z=Q.defaultValue==null?"":Q.defaultValue;X._wrapperState={initialChecked:Q.checked!=null?Q.checked:Q.defaultChecked,initialValue:e5(Q.value!=null?Q.value:Z),controlled:oz(Q)}}function r(z,Q){var X=z,Z=Q.checked;if(Z!=null)f1(X,"checked",Z,!1)}function z0(z,Q){var X=z;{var Z=oz(Q);if(!X._wrapperState.controlled&&Z&&!jz)H("A component is changing an uncontrolled input to be controlled. This is likely caused by the value changing from undefined to a defined value, which should not happen. Decide between using a controlled or uncontrolled input element for the lifetime of the component. More info: https://reactjs.org/link/controlled-components"),jz=!0;if(X._wrapperState.controlled&&!Z&&!pz)H("A component is changing a controlled input to be uncontrolled. This is likely caused by the value changing from a defined to undefined, which should not happen. Decide between using a controlled or uncontrolled input element for the lifetime of the component. More info: https://reactjs.org/link/controlled-components"),pz=!0}r(z,Q);var J=e5(Q.value),b=Q.type;if(J!=null){if(b==="number"){if(J===0&&X.value===""||X.value!=J)X.value=t4(J)}else if(X.value!==t4(J))X.value=t4(J)}else if(b==="submit"||b==="reset"){X.removeAttribute("value");return}if(Q.hasOwnProperty("value"))H1(X,Q.type,J);else if(Q.hasOwnProperty("defaultValue"))H1(X,Q.type,e5(Q.defaultValue));if(Q.checked==null&&Q.defaultChecked!=null)X.defaultChecked=!!Q.defaultChecked}function W0(z,Q,X){var Z=z;if(Q.hasOwnProperty("value")||Q.hasOwnProperty("defaultValue")){var J=Q.type,b=J==="submit"||J==="reset";if(b&&(Q.value===void 0||Q.value===null))return;var $=t4(Z._wrapperState.initialValue);if(!X){if($!==Z.value)Z.value=$}Z.defaultValue=$}var U=Z.name;if(U!=="")Z.name="";if(Z.defaultChecked=!Z.defaultChecked,Z.defaultChecked=!!Z._wrapperState.initialChecked,U!=="")Z.name=U}function X1(z,Q){var X=z;z0(X,Q),E0(X,Q)}function E0(z,Q){var X=Q.name;if(Q.type==="radio"&&X!=null){var Z=z;while(Z.parentNode)Z=Z.parentNode;p6(X,"name");var J=Z.querySelectorAll("input[name="+JSON.stringify(""+X)+'][type="radio"]');for(var b=0;b<J.length;b++){var $=J[b];if($===z||$.form!==z.form)continue;var U=VQ($);if(!U)throw Error("ReactDOMInput: Mixing React and non-React radio inputs with the same `name` is not supported.");F3($),z0($,U)}}}function H1(z,Q,X){if(Q!=="number"||r8(z.ownerDocument)!==z){if(X==null)z.defaultValue=t4(z._wrapperState.initialValue);else if(z.defaultValue!==t4(X))z.defaultValue=t4(X)}}var h1=!1,e1=!1,K6=!1;function O6(z,Q){{if(Q.value==null){if(typeof Q.children==="object"&&Q.children!==null)vz.Children.forEach(Q.children,function(X){if(X==null)return;if(typeof X==="string"||typeof X==="number")return;if(!e1)e1=!0,H("Cannot infer the option value of complex children. Pass a `value` prop or use a plain string as children to <option>.")});else if(Q.dangerouslySetInnerHTML!=null){if(!K6)K6=!0,H("Pass a `value` prop if you set dangerouslyInnerHTML so React knows which value should be selected.")}}if(Q.selected!=null&&!h1)H("Use the `defaultValue` or `value` props on <select> instead of setting `selected` on <option>."),h1=!0}}function v6(z,Q){if(Q.value!=null)z.setAttribute("value",t4(e5(Q.value)))}var u6=Array.isArray;function i1(z){return u6(z)}var S7=!1;function v3(){var z=o8();if(z)return`
30
-
31
- Check the render method of \``+z+"`.";return""}var j2=["value","defaultValue"];function RZ(z){{P3("select",z);for(var Q=0;Q<j2.length;Q++){var X=j2[Q];if(z[X]==null)continue;var Z=i1(z[X]);if(z.multiple&&!Z)H("The `%s` prop supplied to <select> must be an array if `multiple` is true.%s",X,v3());else if(!z.multiple&&Z)H("The `%s` prop supplied to <select> must be a scalar value if `multiple` is false.%s",X,v3())}}}function W8(z,Q,X,Z){var J=z.options;if(Q){var b=X,$={};for(var U=0;U<b.length;U++)$["$"+b[U]]=!0;for(var q=0;q<J.length;q++){var _=$.hasOwnProperty("$"+J[q].value);if(J[q].selected!==_)J[q].selected=_;if(_&&Z)J[q].defaultSelected=!0}}else{var R=t4(e5(X)),D=null;for(var V=0;V<J.length;V++){if(J[V].value===R){if(J[V].selected=!0,Z)J[V].defaultSelected=!0;return}if(D===null&&!J[V].disabled)D=J[V]}if(D!==null)D.selected=!0}}function o2(z,Q){return R1({},Q,{value:void 0})}function a2(z,Q){var X=z;if(RZ(Q),X._wrapperState={wasMultiple:!!Q.multiple},Q.value!==void 0&&Q.defaultValue!==void 0&&!S7)H("Select elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled select element and remove one of these props. More info: https://reactjs.org/link/controlled-components"),S7=!0}function PZ(z,Q){var X=z;X.multiple=!!Q.multiple;var Z=Q.value;if(Z!=null)W8(X,!!Q.multiple,Z,!1);else if(Q.defaultValue!=null)W8(X,!!Q.multiple,Q.defaultValue,!0)}function JO(z,Q){var X=z,Z=X._wrapperState.wasMultiple;X._wrapperState.wasMultiple=!!Q.multiple;var J=Q.value;if(J!=null)W8(X,!!Q.multiple,J,!1);else if(Z!==!!Q.multiple)if(Q.defaultValue!=null)W8(X,!!Q.multiple,Q.defaultValue,!0);else W8(X,!!Q.multiple,Q.multiple?[]:"",!1)}function bO(z,Q){var X=z,Z=Q.value;if(Z!=null)W8(X,!!Q.multiple,Z,!1)}var n$=!1;function FZ(z,Q){var X=z;if(Q.dangerouslySetInnerHTML!=null)throw Error("`dangerouslySetInnerHTML` does not make sense on <textarea>.");var Z=R1({},Q,{value:void 0,defaultValue:void 0,children:t4(X._wrapperState.initialValue)});return Z}function t$(z,Q){var X=z;if(P3("textarea",Q),Q.value!==void 0&&Q.defaultValue!==void 0&&!n$)H("%s contains a textarea with both value and defaultValue props. Textarea elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled textarea and remove one of these props. More info: https://reactjs.org/link/controlled-components",o8()||"A component"),n$=!0;var Z=Q.value;if(Z==null){var{children:J,defaultValue:b}=Q;if(J!=null){H("Use the `defaultValue` or `value` props instead of setting children on <textarea>.");{if(b!=null)throw Error("If you supply `defaultValue` on a <textarea>, do not pass children.");if(i1(J)){if(J.length>1)throw Error("<textarea> can only have at most one child.");J=J[0]}b=J}}if(b==null)b="";Z=b}X._wrapperState={initialValue:e5(Z)}}function s$(z,Q){var X=z,Z=e5(Q.value),J=e5(Q.defaultValue);if(Z!=null){var b=t4(Z);if(b!==X.value)X.value=b;if(Q.defaultValue==null&&X.defaultValue!==b)X.defaultValue=b}if(J!=null)X.defaultValue=t4(J)}function e$(z,Q){var X=z,Z=X.textContent;if(Z===X._wrapperState.initialValue){if(Z!==""&&Z!==null)X.value=Z}}function YO(z,Q){s$(z,Q)}var _8="http://www.w3.org/1999/xhtml",$O="http://www.w3.org/1998/Math/MathML",MZ="http://www.w3.org/2000/svg";function vZ(z){switch(z){case"svg":return MZ;case"math":return $O;default:return _8}}function kZ(z,Q){if(z==null||z===_8)return vZ(Q);if(z===MZ&&Q==="foreignObject")return _8;return z}var HO=function(z){if(typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction)return function(Q,X,Z,J){MSApp.execUnsafeLocalFunction(function(){return z(Q,X,Z,J)})};else return z},az,zH=HO(function(z,Q){if(z.namespaceURI===MZ){if(!("innerHTML"in z)){az=az||document.createElement("div"),az.innerHTML="<svg>"+Q.valueOf().toString()+"</svg>";var X=az.firstChild;while(z.firstChild)z.removeChild(z.firstChild);while(X.firstChild)z.appendChild(X.firstChild);return}}z.innerHTML=Q}),s4=1,w8=3,o6=8,R8=9,AZ=11,rz=function(z,Q){if(Q){var X=z.firstChild;if(X&&X===z.lastChild&&X.nodeType===w8){X.nodeValue=Q;return}}z.textContent=Q},GO={animation:["animationDelay","animationDirection","animationDuration","animationFillMode","animationIterationCount","animationName","animationPlayState","animationTimingFunction"],background:["backgroundAttachment","backgroundClip","backgroundColor","backgroundImage","backgroundOrigin","backgroundPositionX","backgroundPositionY","backgroundRepeat","backgroundSize"],backgroundPosition:["backgroundPositionX","backgroundPositionY"],border:["borderBottomColor","borderBottomStyle","borderBottomWidth","borderImageOutset","borderImageRepeat","borderImageSlice","borderImageSource","borderImageWidth","borderLeftColor","borderLeftStyle","borderLeftWidth","borderRightColor","borderRightStyle","borderRightWidth","borderTopColor","borderTopStyle","borderTopWidth"],borderBlockEnd:["borderBlockEndColor","borderBlockEndStyle","borderBlockEndWidth"],borderBlockStart:["borderBlockStartColor","borderBlockStartStyle","borderBlockStartWidth"],borderBottom:["borderBottomColor","borderBottomStyle","borderBottomWidth"],borderColor:["borderBottomColor","borderLeftColor","borderRightColor","borderTopColor"],borderImage:["borderImageOutset","borderImageRepeat","borderImageSlice","borderImageSource","borderImageWidth"],borderInlineEnd:["borderInlineEndColor","borderInlineEndStyle","borderInlineEndWidth"],borderInlineStart:["borderInlineStartColor","borderInlineStartStyle","borderInlineStartWidth"],borderLeft:["borderLeftColor","borderLeftStyle","borderLeftWidth"],borderRadius:["borderBottomLeftRadius","borderBottomRightRadius","borderTopLeftRadius","borderTopRightRadius"],borderRight:["borderRightColor","borderRightStyle","borderRightWidth"],borderStyle:["borderBottomStyle","borderLeftStyle","borderRightStyle","borderTopStyle"],borderTop:["borderTopColor","borderTopStyle","borderTopWidth"],borderWidth:["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth"],columnRule:["columnRuleColor","columnRuleStyle","columnRuleWidth"],columns:["columnCount","columnWidth"],flex:["flexBasis","flexGrow","flexShrink"],flexFlow:["flexDirection","flexWrap"],font:["fontFamily","fontFeatureSettings","fontKerning","fontLanguageOverride","fontSize","fontSizeAdjust","fontStretch","fontStyle","fontVariant","fontVariantAlternates","fontVariantCaps","fontVariantEastAsian","fontVariantLigatures","fontVariantNumeric","fontVariantPosition","fontWeight","lineHeight"],fontVariant:["fontVariantAlternates","fontVariantCaps","fontVariantEastAsian","fontVariantLigatures","fontVariantNumeric","fontVariantPosition"],gap:["columnGap","rowGap"],grid:["gridAutoColumns","gridAutoFlow","gridAutoRows","gridTemplateAreas","gridTemplateColumns","gridTemplateRows"],gridArea:["gridColumnEnd","gridColumnStart","gridRowEnd","gridRowStart"],gridColumn:["gridColumnEnd","gridColumnStart"],gridColumnGap:["columnGap"],gridGap:["columnGap","rowGap"],gridRow:["gridRowEnd","gridRowStart"],gridRowGap:["rowGap"],gridTemplate:["gridTemplateAreas","gridTemplateColumns","gridTemplateRows"],listStyle:["listStyleImage","listStylePosition","listStyleType"],margin:["marginBottom","marginLeft","marginRight","marginTop"],marker:["markerEnd","markerMid","markerStart"],mask:["maskClip","maskComposite","maskImage","maskMode","maskOrigin","maskPositionX","maskPositionY","maskRepeat","maskSize"],maskPosition:["maskPositionX","maskPositionY"],outline:["outlineColor","outlineStyle","outlineWidth"],overflow:["overflowX","overflowY"],padding:["paddingBottom","paddingLeft","paddingRight","paddingTop"],placeContent:["alignContent","justifyContent"],placeItems:["alignItems","justifyItems"],placeSelf:["alignSelf","justifySelf"],textDecoration:["textDecorationColor","textDecorationLine","textDecorationStyle"],textEmphasis:["textEmphasisColor","textEmphasisStyle"],transition:["transitionDelay","transitionDuration","transitionProperty","transitionTimingFunction"],wordWrap:["overflowWrap"]},r2={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};function UO(z,Q){return z+Q.charAt(0).toUpperCase()+Q.substring(1)}var qO=["Webkit","ms","Moz","O"];Object.keys(r2).forEach(function(z){qO.forEach(function(Q){r2[UO(Q,z)]=r2[z]})});function IZ(z,Q,X){var Z=Q==null||typeof Q==="boolean"||Q==="";if(Z)return"";if(!X&&typeof Q==="number"&&Q!==0&&!(r2.hasOwnProperty(z)&&r2[z]))return Q+"px";return f6(Q,z),(""+Q).trim()}var BO=/([A-Z])/g,KO=/^ms-/;function OO(z){return z.replace(BO,"-$1").toLowerCase().replace(KO,"-ms-")}var QH=function(){};{var LO=/^(?:webkit|moz|o)[A-Z]/,NO=/^-ms-/,WO=/-(.)/g,XH=/;\s*$/,k3={},TZ={},ZH=!1,JH=!1,_O=function(z){return z.replace(WO,function(Q,X){return X.toUpperCase()})},wO=function(z){if(k3.hasOwnProperty(z)&&k3[z])return;k3[z]=!0,H("Unsupported style property %s. Did you mean %s?",z,_O(z.replace(NO,"ms-")))},RO=function(z){if(k3.hasOwnProperty(z)&&k3[z])return;k3[z]=!0,H("Unsupported vendor-prefixed style property %s. Did you mean %s?",z,z.charAt(0).toUpperCase()+z.slice(1))},PO=function(z,Q){if(TZ.hasOwnProperty(Q)&&TZ[Q])return;TZ[Q]=!0,H(`Style property values shouldn't contain a semicolon. Try "%s: %s" instead.`,z,Q.replace(XH,""))},FO=function(z,Q){if(ZH)return;ZH=!0,H("`NaN` is an invalid value for the `%s` css style property.",z)},MO=function(z,Q){if(JH)return;JH=!0,H("`Infinity` is an invalid value for the `%s` css style property.",z)};QH=function(z,Q){if(z.indexOf("-")>-1)wO(z);else if(LO.test(z))RO(z);else if(XH.test(Q))PO(z,Q);if(typeof Q==="number"){if(isNaN(Q))FO(z,Q);else if(!isFinite(Q))MO(z,Q)}}}var vO=QH;function kO(z){{var Q="",X="";for(var Z in z){if(!z.hasOwnProperty(Z))continue;var J=z[Z];if(J!=null){var b=Z.indexOf("--")===0;Q+=X+(b?Z:OO(Z))+":",Q+=IZ(Z,J,b),X=";"}}return Q||null}}function bH(z,Q){var X=z.style;for(var Z in Q){if(!Q.hasOwnProperty(Z))continue;var J=Z.indexOf("--")===0;if(!J)vO(Z,Q[Z]);var b=IZ(Z,Q[Z],J);if(Z==="float")Z="cssFloat";if(J)X.setProperty(Z,b);else X[Z]=b}}function AO(z){return z==null||typeof z==="boolean"||z===""}function YH(z){var Q={};for(var X in z){var Z=GO[X]||[X];for(var J=0;J<Z.length;J++)Q[Z[J]]=X}return Q}function IO(z,Q){{if(!Q)return;var X=YH(z),Z=YH(Q),J={};for(var b in X){var $=X[b],U=Z[b];if(U&&$!==U){var q=$+","+U;if(J[q])continue;J[q]=!0,H("%s a style property during rerender (%s) when a conflicting property is set (%s) can lead to styling bugs. To avoid this, don't mix shorthand and non-shorthand properties for the same value; instead, replace the shorthand with separate values.",AO(z[$])?"Removing":"Updating",$,U)}}}}var TO={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},fO=R1({menuitem:!0},TO),SO="__html";function fZ(z,Q){if(!Q)return;if(fO[z]){if(Q.children!=null||Q.dangerouslySetInnerHTML!=null)throw Error(z+" is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.")}if(Q.dangerouslySetInnerHTML!=null){if(Q.children!=null)throw Error("Can only set one of `children` or `props.dangerouslySetInnerHTML`.");if(typeof Q.dangerouslySetInnerHTML!=="object"||!(SO in Q.dangerouslySetInnerHTML))throw Error("`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://reactjs.org/link/dangerously-set-inner-html for more information.")}if(!Q.suppressContentEditableWarning&&Q.contentEditable&&Q.children!=null)H("A component is `contentEditable` and contains `children` managed by React. It is now your responsibility to guarantee that none of those nodes are unexpectedly modified or duplicated. This is probably not intentional.");if(Q.style!=null&&typeof Q.style!=="object")throw Error("The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + 'em'}} when using JSX.")}function C7(z,Q){if(z.indexOf("-")===-1)return typeof Q.is==="string";switch(z){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 nz={accept:"accept",acceptcharset:"acceptCharset","accept-charset":"acceptCharset",accesskey:"accessKey",action:"action",allowfullscreen:"allowFullScreen",alt:"alt",as:"as",async:"async",autocapitalize:"autoCapitalize",autocomplete:"autoComplete",autocorrect:"autoCorrect",autofocus:"autoFocus",autoplay:"autoPlay",autosave:"autoSave",capture:"capture",cellpadding:"cellPadding",cellspacing:"cellSpacing",challenge:"challenge",charset:"charSet",checked:"checked",children:"children",cite:"cite",class:"className",classid:"classID",classname:"className",cols:"cols",colspan:"colSpan",content:"content",contenteditable:"contentEditable",contextmenu:"contextMenu",controls:"controls",controlslist:"controlsList",coords:"coords",crossorigin:"crossOrigin",dangerouslysetinnerhtml:"dangerouslySetInnerHTML",data:"data",datetime:"dateTime",default:"default",defaultchecked:"defaultChecked",defaultvalue:"defaultValue",defer:"defer",dir:"dir",disabled:"disabled",disablepictureinpicture:"disablePictureInPicture",disableremoteplayback:"disableRemotePlayback",download:"download",draggable:"draggable",enctype:"encType",enterkeyhint:"enterKeyHint",for:"htmlFor",form:"form",formmethod:"formMethod",formaction:"formAction",formenctype:"formEncType",formnovalidate:"formNoValidate",formtarget:"formTarget",frameborder:"frameBorder",headers:"headers",height:"height",hidden:"hidden",high:"high",href:"href",hreflang:"hrefLang",htmlfor:"htmlFor",httpequiv:"httpEquiv","http-equiv":"httpEquiv",icon:"icon",id:"id",imagesizes:"imageSizes",imagesrcset:"imageSrcSet",innerhtml:"innerHTML",inputmode:"inputMode",integrity:"integrity",is:"is",itemid:"itemID",itemprop:"itemProp",itemref:"itemRef",itemscope:"itemScope",itemtype:"itemType",keyparams:"keyParams",keytype:"keyType",kind:"kind",label:"label",lang:"lang",list:"list",loop:"loop",low:"low",manifest:"manifest",marginwidth:"marginWidth",marginheight:"marginHeight",max:"max",maxlength:"maxLength",media:"media",mediagroup:"mediaGroup",method:"method",min:"min",minlength:"minLength",multiple:"multiple",muted:"muted",name:"name",nomodule:"noModule",nonce:"nonce",novalidate:"noValidate",open:"open",optimum:"optimum",pattern:"pattern",placeholder:"placeholder",playsinline:"playsInline",poster:"poster",preload:"preload",profile:"profile",radiogroup:"radioGroup",readonly:"readOnly",referrerpolicy:"referrerPolicy",rel:"rel",required:"required",reversed:"reversed",role:"role",rows:"rows",rowspan:"rowSpan",sandbox:"sandbox",scope:"scope",scoped:"scoped",scrolling:"scrolling",seamless:"seamless",selected:"selected",shape:"shape",size:"size",sizes:"sizes",span:"span",spellcheck:"spellCheck",src:"src",srcdoc:"srcDoc",srclang:"srcLang",srcset:"srcSet",start:"start",step:"step",style:"style",summary:"summary",tabindex:"tabIndex",target:"target",title:"title",type:"type",usemap:"useMap",value:"value",width:"width",wmode:"wmode",wrap:"wrap",about:"about",accentheight:"accentHeight","accent-height":"accentHeight",accumulate:"accumulate",additive:"additive",alignmentbaseline:"alignmentBaseline","alignment-baseline":"alignmentBaseline",allowreorder:"allowReorder",alphabetic:"alphabetic",amplitude:"amplitude",arabicform:"arabicForm","arabic-form":"arabicForm",ascent:"ascent",attributename:"attributeName",attributetype:"attributeType",autoreverse:"autoReverse",azimuth:"azimuth",basefrequency:"baseFrequency",baselineshift:"baselineShift","baseline-shift":"baselineShift",baseprofile:"baseProfile",bbox:"bbox",begin:"begin",bias:"bias",by:"by",calcmode:"calcMode",capheight:"capHeight","cap-height":"capHeight",clip:"clip",clippath:"clipPath","clip-path":"clipPath",clippathunits:"clipPathUnits",cliprule:"clipRule","clip-rule":"clipRule",color:"color",colorinterpolation:"colorInterpolation","color-interpolation":"colorInterpolation",colorinterpolationfilters:"colorInterpolationFilters","color-interpolation-filters":"colorInterpolationFilters",colorprofile:"colorProfile","color-profile":"colorProfile",colorrendering:"colorRendering","color-rendering":"colorRendering",contentscripttype:"contentScriptType",contentstyletype:"contentStyleType",cursor:"cursor",cx:"cx",cy:"cy",d:"d",datatype:"datatype",decelerate:"decelerate",descent:"descent",diffuseconstant:"diffuseConstant",direction:"direction",display:"display",divisor:"divisor",dominantbaseline:"dominantBaseline","dominant-baseline":"dominantBaseline",dur:"dur",dx:"dx",dy:"dy",edgemode:"edgeMode",elevation:"elevation",enablebackground:"enableBackground","enable-background":"enableBackground",end:"end",exponent:"exponent",externalresourcesrequired:"externalResourcesRequired",fill:"fill",fillopacity:"fillOpacity","fill-opacity":"fillOpacity",fillrule:"fillRule","fill-rule":"fillRule",filter:"filter",filterres:"filterRes",filterunits:"filterUnits",floodopacity:"floodOpacity","flood-opacity":"floodOpacity",floodcolor:"floodColor","flood-color":"floodColor",focusable:"focusable",fontfamily:"fontFamily","font-family":"fontFamily",fontsize:"fontSize","font-size":"fontSize",fontsizeadjust:"fontSizeAdjust","font-size-adjust":"fontSizeAdjust",fontstretch:"fontStretch","font-stretch":"fontStretch",fontstyle:"fontStyle","font-style":"fontStyle",fontvariant:"fontVariant","font-variant":"fontVariant",fontweight:"fontWeight","font-weight":"fontWeight",format:"format",from:"from",fx:"fx",fy:"fy",g1:"g1",g2:"g2",glyphname:"glyphName","glyph-name":"glyphName",glyphorientationhorizontal:"glyphOrientationHorizontal","glyph-orientation-horizontal":"glyphOrientationHorizontal",glyphorientationvertical:"glyphOrientationVertical","glyph-orientation-vertical":"glyphOrientationVertical",glyphref:"glyphRef",gradienttransform:"gradientTransform",gradientunits:"gradientUnits",hanging:"hanging",horizadvx:"horizAdvX","horiz-adv-x":"horizAdvX",horizoriginx:"horizOriginX","horiz-origin-x":"horizOriginX",ideographic:"ideographic",imagerendering:"imageRendering","image-rendering":"imageRendering",in2:"in2",in:"in",inlist:"inlist",intercept:"intercept",k1:"k1",k2:"k2",k3:"k3",k4:"k4",k:"k",kernelmatrix:"kernelMatrix",kernelunitlength:"kernelUnitLength",kerning:"kerning",keypoints:"keyPoints",keysplines:"keySplines",keytimes:"keyTimes",lengthadjust:"lengthAdjust",letterspacing:"letterSpacing","letter-spacing":"letterSpacing",lightingcolor:"lightingColor","lighting-color":"lightingColor",limitingconeangle:"limitingConeAngle",local:"local",markerend:"markerEnd","marker-end":"markerEnd",markerheight:"markerHeight",markermid:"markerMid","marker-mid":"markerMid",markerstart:"markerStart","marker-start":"markerStart",markerunits:"markerUnits",markerwidth:"markerWidth",mask:"mask",maskcontentunits:"maskContentUnits",maskunits:"maskUnits",mathematical:"mathematical",mode:"mode",numoctaves:"numOctaves",offset:"offset",opacity:"opacity",operator:"operator",order:"order",orient:"orient",orientation:"orientation",origin:"origin",overflow:"overflow",overlineposition:"overlinePosition","overline-position":"overlinePosition",overlinethickness:"overlineThickness","overline-thickness":"overlineThickness",paintorder:"paintOrder","paint-order":"paintOrder",panose1:"panose1","panose-1":"panose1",pathlength:"pathLength",patterncontentunits:"patternContentUnits",patterntransform:"patternTransform",patternunits:"patternUnits",pointerevents:"pointerEvents","pointer-events":"pointerEvents",points:"points",pointsatx:"pointsAtX",pointsaty:"pointsAtY",pointsatz:"pointsAtZ",prefix:"prefix",preservealpha:"preserveAlpha",preserveaspectratio:"preserveAspectRatio",primitiveunits:"primitiveUnits",property:"property",r:"r",radius:"radius",refx:"refX",refy:"refY",renderingintent:"renderingIntent","rendering-intent":"renderingIntent",repeatcount:"repeatCount",repeatdur:"repeatDur",requiredextensions:"requiredExtensions",requiredfeatures:"requiredFeatures",resource:"resource",restart:"restart",result:"result",results:"results",rotate:"rotate",rx:"rx",ry:"ry",scale:"scale",security:"security",seed:"seed",shaperendering:"shapeRendering","shape-rendering":"shapeRendering",slope:"slope",spacing:"spacing",specularconstant:"specularConstant",specularexponent:"specularExponent",speed:"speed",spreadmethod:"spreadMethod",startoffset:"startOffset",stddeviation:"stdDeviation",stemh:"stemh",stemv:"stemv",stitchtiles:"stitchTiles",stopcolor:"stopColor","stop-color":"stopColor",stopopacity:"stopOpacity","stop-opacity":"stopOpacity",strikethroughposition:"strikethroughPosition","strikethrough-position":"strikethroughPosition",strikethroughthickness:"strikethroughThickness","strikethrough-thickness":"strikethroughThickness",string:"string",stroke:"stroke",strokedasharray:"strokeDasharray","stroke-dasharray":"strokeDasharray",strokedashoffset:"strokeDashoffset","stroke-dashoffset":"strokeDashoffset",strokelinecap:"strokeLinecap","stroke-linecap":"strokeLinecap",strokelinejoin:"strokeLinejoin","stroke-linejoin":"strokeLinejoin",strokemiterlimit:"strokeMiterlimit","stroke-miterlimit":"strokeMiterlimit",strokewidth:"strokeWidth","stroke-width":"strokeWidth",strokeopacity:"strokeOpacity","stroke-opacity":"strokeOpacity",suppresscontenteditablewarning:"suppressContentEditableWarning",suppresshydrationwarning:"suppressHydrationWarning",surfacescale:"surfaceScale",systemlanguage:"systemLanguage",tablevalues:"tableValues",targetx:"targetX",targety:"targetY",textanchor:"textAnchor","text-anchor":"textAnchor",textdecoration:"textDecoration","text-decoration":"textDecoration",textlength:"textLength",textrendering:"textRendering","text-rendering":"textRendering",to:"to",transform:"transform",typeof:"typeof",u1:"u1",u2:"u2",underlineposition:"underlinePosition","underline-position":"underlinePosition",underlinethickness:"underlineThickness","underline-thickness":"underlineThickness",unicode:"unicode",unicodebidi:"unicodeBidi","unicode-bidi":"unicodeBidi",unicoderange:"unicodeRange","unicode-range":"unicodeRange",unitsperem:"unitsPerEm","units-per-em":"unitsPerEm",unselectable:"unselectable",valphabetic:"vAlphabetic","v-alphabetic":"vAlphabetic",values:"values",vectoreffect:"vectorEffect","vector-effect":"vectorEffect",version:"version",vertadvy:"vertAdvY","vert-adv-y":"vertAdvY",vertoriginx:"vertOriginX","vert-origin-x":"vertOriginX",vertoriginy:"vertOriginY","vert-origin-y":"vertOriginY",vhanging:"vHanging","v-hanging":"vHanging",videographic:"vIdeographic","v-ideographic":"vIdeographic",viewbox:"viewBox",viewtarget:"viewTarget",visibility:"visibility",vmathematical:"vMathematical","v-mathematical":"vMathematical",vocab:"vocab",widths:"widths",wordspacing:"wordSpacing","word-spacing":"wordSpacing",writingmode:"writingMode","writing-mode":"writingMode",x1:"x1",x2:"x2",x:"x",xchannelselector:"xChannelSelector",xheight:"xHeight","x-height":"xHeight",xlinkactuate:"xlinkActuate","xlink:actuate":"xlinkActuate",xlinkarcrole:"xlinkArcrole","xlink:arcrole":"xlinkArcrole",xlinkhref:"xlinkHref","xlink:href":"xlinkHref",xlinkrole:"xlinkRole","xlink:role":"xlinkRole",xlinkshow:"xlinkShow","xlink:show":"xlinkShow",xlinktitle:"xlinkTitle","xlink:title":"xlinkTitle",xlinktype:"xlinkType","xlink:type":"xlinkType",xmlbase:"xmlBase","xml:base":"xmlBase",xmllang:"xmlLang","xml:lang":"xmlLang",xmlns:"xmlns","xml:space":"xmlSpace",xmlnsxlink:"xmlnsXlink","xmlns:xlink":"xmlnsXlink",xmlspace:"xmlSpace",y1:"y1",y2:"y2",y:"y",ychannelselector:"yChannelSelector",z:"z",zoomandpan:"zoomAndPan"},$H={"aria-current":0,"aria-description":0,"aria-details":0,"aria-disabled":0,"aria-hidden":0,"aria-invalid":0,"aria-keyshortcuts":0,"aria-label":0,"aria-roledescription":0,"aria-autocomplete":0,"aria-checked":0,"aria-expanded":0,"aria-haspopup":0,"aria-level":0,"aria-modal":0,"aria-multiline":0,"aria-multiselectable":0,"aria-orientation":0,"aria-placeholder":0,"aria-pressed":0,"aria-readonly":0,"aria-required":0,"aria-selected":0,"aria-sort":0,"aria-valuemax":0,"aria-valuemin":0,"aria-valuenow":0,"aria-valuetext":0,"aria-atomic":0,"aria-busy":0,"aria-live":0,"aria-relevant":0,"aria-dropeffect":0,"aria-grabbed":0,"aria-activedescendant":0,"aria-colcount":0,"aria-colindex":0,"aria-colspan":0,"aria-controls":0,"aria-describedby":0,"aria-errormessage":0,"aria-flowto":0,"aria-labelledby":0,"aria-owns":0,"aria-posinset":0,"aria-rowcount":0,"aria-rowindex":0,"aria-rowspan":0,"aria-setsize":0},A3={},CO=new RegExp("^(aria)-["+j6+"]*$"),hO=new RegExp("^(aria)[A-Z]["+j6+"]*$");function yO(z,Q){{if($6.call(A3,Q)&&A3[Q])return!0;if(hO.test(Q)){var X="aria-"+Q.slice(4).toLowerCase(),Z=$H.hasOwnProperty(X)?X:null;if(Z==null)return H("Invalid ARIA attribute `%s`. ARIA attributes follow the pattern aria-* and must be lowercase.",Q),A3[Q]=!0,!0;if(Q!==Z)return H("Invalid ARIA attribute `%s`. Did you mean `%s`?",Q,Z),A3[Q]=!0,!0}if(CO.test(Q)){var J=Q.toLowerCase(),b=$H.hasOwnProperty(J)?J:null;if(b==null)return A3[Q]=!0,!1;if(Q!==b)return H("Unknown ARIA attribute `%s`. Did you mean `%s`?",Q,b),A3[Q]=!0,!0}}return!0}function VO(z,Q){{var X=[];for(var Z in Q){var J=yO(z,Z);if(!J)X.push(Z)}var b=X.map(function($){return"`"+$+"`"}).join(", ");if(X.length===1)H("Invalid aria prop %s on <%s> tag. For details, see https://reactjs.org/link/invalid-aria-props",b,z);else if(X.length>1)H("Invalid aria props %s on <%s> tag. For details, see https://reactjs.org/link/invalid-aria-props",b,z)}}function DO(z,Q){if(C7(z,Q))return;VO(z,Q)}var HH=!1;function mO(z,Q){{if(z!=="input"&&z!=="textarea"&&z!=="select")return;if(Q!=null&&Q.value===null&&!HH)if(HH=!0,z==="select"&&Q.multiple)H("`value` prop on `%s` should not be null. Consider using an empty array when `multiple` is set to `true` to clear the component or `undefined` for uncontrolled components.",z);else H("`value` prop on `%s` should not be null. Consider using an empty string to clear the component or `undefined` for uncontrolled components.",z)}}var GH=function(){};{var x4={},UH=/^on./,uO=/^on[^A-Z]/,gO=new RegExp("^(aria)-["+j6+"]*$"),EO=new RegExp("^(aria)[A-Z]["+j6+"]*$");GH=function(z,Q,X,Z){if($6.call(x4,Q)&&x4[Q])return!0;var J=Q.toLowerCase();if(J==="onfocusin"||J==="onfocusout")return H("React uses onFocus and onBlur instead of onFocusIn and onFocusOut. All React events are normalized to bubble, so onFocusIn and onFocusOut are not needed/supported by React."),x4[Q]=!0,!0;if(Z!=null){var{registrationNameDependencies:b,possibleRegistrationNames:$}=Z;if(b.hasOwnProperty(Q))return!0;var U=$.hasOwnProperty(J)?$[J]:null;if(U!=null)return H("Invalid event handler property `%s`. Did you mean `%s`?",Q,U),x4[Q]=!0,!0;if(UH.test(Q))return H("Unknown event handler property `%s`. It will be ignored.",Q),x4[Q]=!0,!0}else if(UH.test(Q)){if(uO.test(Q))H("Invalid event handler property `%s`. React events use the camelCase naming convention, for example `onClick`.",Q);return x4[Q]=!0,!0}if(gO.test(Q)||EO.test(Q))return!0;if(J==="innerhtml")return H("Directly setting property `innerHTML` is not permitted. For more information, lookup documentation on `dangerouslySetInnerHTML`."),x4[Q]=!0,!0;if(J==="aria")return H("The `aria` attribute is reserved for future use in React. Pass individual `aria-` attributes instead."),x4[Q]=!0,!0;if(J==="is"&&X!==null&&X!==void 0&&typeof X!=="string")return H("Received a `%s` for a string attribute `is`. If this is expected, cast the value to a string.",typeof X),x4[Q]=!0,!0;if(typeof X==="number"&&isNaN(X))return H("Received NaN for the `%s` attribute. If this is expected, cast the value to a string.",Q),x4[Q]=!0,!0;var q=x6(Q),_=q!==null&&q.type===_4;if(nz.hasOwnProperty(J)){var R=nz[J];if(R!==Q)return H("Invalid DOM property `%s`. Did you mean `%s`?",Q,R),x4[Q]=!0,!0}else if(!_&&Q!==J)return H("React does not recognize the `%s` prop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it as lowercase `%s` instead. If you accidentally passed it from a parent component, remove it from the DOM element.",Q,J),x4[Q]=!0,!0;if(typeof X==="boolean"&&S6(Q,X,q,!1)){if(X)H('Received `%s` for a non-boolean attribute `%s`.\n\nIf you want to write it to the DOM, pass a string instead: %s="%s" or %s={value.toString()}.',X,Q,Q,X,Q);else H('Received `%s` for a non-boolean attribute `%s`.\n\nIf you want to write it to the DOM, pass a string instead: %s="%s" or %s={value.toString()}.\n\nIf you used to conditionally omit it with %s={condition && value}, pass %s={condition ? value : undefined} instead.',X,Q,Q,X,Q,Q,Q);return x4[Q]=!0,!0}if(_)return!0;if(S6(Q,X,q,!1))return x4[Q]=!0,!1;if((X==="false"||X==="true")&&q!==null&&q.type===w6)return H("Received the string `%s` for the boolean attribute `%s`. %s Did you mean %s={%s}?",X,Q,X==="false"?"The browser will interpret it as a truthy value.":'Although this works, it will not work as expected if you pass the string "false".',Q,X),x4[Q]=!0,!0;return!0}}var lO=function(z,Q,X){{var Z=[];for(var J in Q){var b=GH(z,J,Q[J],X);if(!b)Z.push(J)}var $=Z.map(function(U){return"`"+U+"`"}).join(", ");if(Z.length===1)H("Invalid value for prop %s on <%s> tag. Either remove it from the element, or pass a string or number value to keep it in the DOM. For details, see https://reactjs.org/link/attribute-behavior ",$,z);else if(Z.length>1)H("Invalid values for props %s on <%s> tag. Either remove them from the element, or pass a string or number value to keep them in the DOM. For details, see https://reactjs.org/link/attribute-behavior ",$,z)}};function dO(z,Q,X){if(C7(z,Q))return;lO(z,Q,X)}var qH=1,SZ=2,n2=4,cO=qH|SZ|n2,t2=null;function xO(z){if(t2!==null)H("Expected currently replaying event to be null. This error is likely caused by a bug in React. Please file an issue.");t2=z}function iO(){if(t2===null)H("Expected currently replaying event to not be null. This error is likely caused by a bug in React. Please file an issue.");t2=null}function pO(z){return z===t2}function CZ(z){var Q=z.target||z.srcElement||window;if(Q.correspondingUseElement)Q=Q.correspondingUseElement;return Q.nodeType===w8?Q.parentNode:Q}var hZ=null,I3=null,T3=null;function BH(z){var Q=Z7(z);if(!Q)return;if(typeof hZ!=="function")throw Error("setRestoreImplementation() needs to be called to handle a target for controlled events. This error is likely caused by a bug in React. Please file an issue.");var X=Q.stateNode;if(X){var Z=VQ(X);hZ(Q.stateNode,Q.type,Z)}}function jO(z){hZ=z}function KH(z){if(I3)if(T3)T3.push(z);else T3=[z];else I3=z}function oO(){return I3!==null||T3!==null}function OH(){if(!I3)return;var z=I3,Q=T3;if(I3=null,T3=null,BH(z),Q)for(var X=0;X<Q.length;X++)BH(Q[X])}var LH=function(z,Q){return z(Q)},NH=function(){},yZ=!1;function aO(){var z=oO();if(z)NH(),OH()}function WH(z,Q,X){if(yZ)return z(Q,X);yZ=!0;try{return LH(z,Q,X)}finally{yZ=!1,aO()}}function rO(z,Q,X){LH=z,NH=X}function nO(z){return z==="button"||z==="input"||z==="select"||z==="textarea"}function tO(z,Q,X){switch(z){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":return!!(X.disabled&&nO(Q));default:return!1}}function s2(z,Q){var X=z.stateNode;if(X===null)return null;var Z=VQ(X);if(Z===null)return null;var J=Z[Q];if(tO(Q,z.type,Z))return null;if(J&&typeof J!=="function")throw Error("Expected `"+Q+"` listener to be a function, instead got a value of `"+typeof J+"` type.");return J}var VZ=!1;if(v1)try{var e2={};Object.defineProperty(e2,"passive",{get:function(){VZ=!0}}),window.addEventListener("test",e2,e2),window.removeEventListener("test",e2,e2)}catch(z){VZ=!1}function _H(z,Q,X,Z,J,b,$,U,q){var _=Array.prototype.slice.call(arguments,3);try{Q.apply(X,_)}catch(R){this.onError(R)}}var wH=_H;if(typeof window<"u"&&typeof window.dispatchEvent==="function"&&typeof document<"u"&&typeof document.createEvent==="function"){var DZ=document.createElement("react");wH=function(Q,X,Z,J,b,$,U,q,_){if(typeof document>"u"||document===null)throw Error("The `document` global was defined when React was initialized, but is not defined anymore. This can happen in a test environment if a component schedules an update from an asynchronous callback, but the test has already finished running. To solve this, you can either unmount the component at the end of your test (and ensure that any asynchronous operations get canceled in `componentWillUnmount`), or you can change the test itself to be asynchronous.");var R=document.createEvent("Event"),D=!1,V=!0,n=window.event,t=Object.getOwnPropertyDescriptor(window,"event");function s(){if(DZ.removeEventListener(Z0,o0,!1),typeof window.event<"u"&&window.hasOwnProperty("event"))window.event=n}var k0=Array.prototype.slice.call(arguments,3);function o0(){D=!0,s(),X.apply(Z,k0),V=!1}var c0,k1=!1,A1=!1;function i(p){if(c0=p.error,k1=!0,c0===null&&p.colno===0&&p.lineno===0)A1=!0;if(p.defaultPrevented){if(c0!=null&&typeof c0==="object")try{c0._suppressLogging=!0}catch(O0){}}}var Z0="react-"+(Q?Q:"invokeguardedcallback");if(window.addEventListener("error",i),DZ.addEventListener(Z0,o0,!1),R.initEvent(Z0,!1,!1),DZ.dispatchEvent(R),t)Object.defineProperty(window,"event",t);if(D&&V){if(!k1)c0=Error(`An error was thrown inside one of your components, but React doesn't know what it was. This is likely due to browser flakiness. React does its best to preserve the "Pause on exceptions" behavior of the DevTools, which requires some DEV-mode only tricks. It's possible that these don't work in your browser. Try triggering the error in production mode, or switching to a modern browser. If you suspect that this is actually an issue with React, please file an issue.`);else if(A1)c0=Error("A cross-origin error was thrown. React doesn't have access to the actual error object in development. See https://reactjs.org/link/crossorigin-error for more information.");this.onError(c0)}if(window.removeEventListener("error",i),!D)return s(),_H.apply(this,arguments)}}var sO=wH,f3=!1,tz=null,sz=!1,mZ=null,eO={onError:function(z){f3=!0,tz=z}};function uZ(z,Q,X,Z,J,b,$,U,q){f3=!1,tz=null,sO.apply(eO,arguments)}function zL(z,Q,X,Z,J,b,$,U,q){if(uZ.apply(this,arguments),f3){var _=gZ();if(!sz)sz=!0,mZ=_}}function QL(){if(sz){var z=mZ;throw sz=!1,mZ=null,z}}function XL(){return f3}function gZ(){if(f3){var z=tz;return f3=!1,tz=null,z}else throw Error("clearCaughtError was called but no error was captured. This error is likely caused by a bug in React. Please file an issue.")}function S3(z){return z._reactInternals}function ZL(z){return z._reactInternals!==void 0}function JL(z,Q){z._reactInternals=Q}var Q1=0,C3=1,a6=2,g1=4,h7=16,z9=32,EZ=64,p1=128,P8=256,n8=512,y7=1024,V5=2048,F8=4096,V7=8192,ez=16384,bL=V5|g1|EZ|n8|y7|ez,YL=32767,Q9=32768,i4=65536,lZ=131072,RH=1048576,dZ=2097152,D7=4194304,cZ=8388608,M8=16777216,zQ=33554432,xZ=g1|y7|0,iZ=a6|g1|h7|z9|n8|F8|V7,X9=g1|EZ|n8|V7,h3=V5|h7,v8=D7|cZ|dZ,$L=Y.ReactCurrentOwner;function m7(z){var Q=z,X=z;if(!z.alternate){var Z=Q;do{if(Q=Z,(Q.flags&(a6|F8))!==Q1)X=Q.return;Z=Q.return}while(Z)}else while(Q.return)Q=Q.return;if(Q.tag===M)return X;return null}function PH(z){if(z.tag===x){var Q=z.memoizedState;if(Q===null){var X=z.alternate;if(X!==null)Q=X.memoizedState}if(Q!==null)return Q.dehydrated}return null}function FH(z){return z.tag===M?z.stateNode.containerInfo:null}function HL(z){return m7(z)===z}function GL(z){{var Q=$L.current;if(Q!==null&&Q.tag===N){var X=Q,Z=X.stateNode;if(!Z._warnedAboutRefsInRender)H("%s is accessing isMounted inside its render() function. render() should be a pure function of props and state. It should never access something that requires stale data from the previous render, such as refs. Move this logic to componentDidMount and componentDidUpdate instead.",N1(X)||"A component");Z._warnedAboutRefsInRender=!0}}var J=S3(z);if(!J)return!1;return m7(J)===J}function MH(z){if(m7(z)!==z)throw Error("Unable to find node on an unmounted component.")}function vH(z){var Q=z.alternate;if(!Q){var X=m7(z);if(X===null)throw Error("Unable to find node on an unmounted component.");if(X!==z)return null;return z}var Z=z,J=Q;while(!0){var b=Z.return;if(b===null)break;var $=b.alternate;if($===null){var U=b.return;if(U!==null){Z=J=U;continue}break}if(b.child===$.child){var q=b.child;while(q){if(q===Z)return MH(b),z;if(q===J)return MH(b),Q;q=q.sibling}throw Error("Unable to find node on an unmounted component.")}if(Z.return!==J.return)Z=b,J=$;else{var _=!1,R=b.child;while(R){if(R===Z){_=!0,Z=b,J=$;break}if(R===J){_=!0,J=b,Z=$;break}R=R.sibling}if(!_){R=$.child;while(R){if(R===Z){_=!0,Z=$,J=b;break}if(R===J){_=!0,J=$,Z=b;break}R=R.sibling}if(!_)throw Error("Child was not found in either parent set. This indicates a bug in React related to the return pointer. Please file an issue.")}}if(Z.alternate!==J)throw Error("Return fibers should always be each others' alternates. This error is likely caused by a bug in React. Please file an issue.")}if(Z.tag!==M)throw Error("Unable to find node on an unmounted component.");if(Z.stateNode.current===Z)return z;return Q}function kH(z){var Q=vH(z);return Q!==null?AH(Q):null}function AH(z){if(z.tag===w||z.tag===v)return z;var Q=z.child;while(Q!==null){var X=AH(Q);if(X!==null)return X;Q=Q.sibling}return null}function UL(z){var Q=vH(z);return Q!==null?IH(Q):null}function IH(z){if(z.tag===w||z.tag===v)return z;var Q=z.child;while(Q!==null){if(Q.tag!==F){var X=IH(Q);if(X!==null)return X}Q=Q.sibling}return null}var TH=Z6.unstable_scheduleCallback,qL=Z6.unstable_cancelCallback,BL=Z6.unstable_shouldYield,KL=Z6.unstable_requestPaint,B4=Z6.unstable_now,OL=Z6.unstable_getCurrentPriorityLevel,QQ=Z6.unstable_ImmediatePriority,pZ=Z6.unstable_UserBlockingPriority,u7=Z6.unstable_NormalPriority,LL=Z6.unstable_LowPriority,jZ=Z6.unstable_IdlePriority,NL=Z6.unstable_yieldValue,WL=Z6.unstable_setDisableYieldValue,g7=null,R4=null,T0=null,z8=!1,D5=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u";function _L(z){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u")return!1;var Q=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(Q.isDisabled)return!0;if(!Q.supportsFiber)return H("The installed version of React DevTools is too old and will not work with the current version of React. Please update React DevTools. https://reactjs.org/link/react-devtools"),!0;try{if(y0)z=R1({},z,{getLaneLabelMap:vL,injectProfilingHooks:ML});g7=Q.inject(z),R4=Q}catch(X){H("React instrumentation encountered an error: %s.",X)}if(Q.checkDCE)return!0;else return!1}function wL(z,Q){if(R4&&typeof R4.onScheduleFiberRoot==="function")try{R4.onScheduleFiberRoot(g7,z,Q)}catch(X){if(!z8)z8=!0,H("React instrumentation encountered an error: %s",X)}}function RL(z,Q){if(R4&&typeof R4.onCommitFiberRoot==="function")try{var X=(z.current.flags&p1)===p1;if(m0){var Z;switch(Q){case G5:Z=QQ;break;case A8:Z=pZ;break;case I8:Z=u7;break;case GQ:Z=jZ;break;default:Z=u7;break}R4.onCommitFiberRoot(g7,z,Z,X)}else R4.onCommitFiberRoot(g7,z,void 0,X)}catch(J){if(!z8)z8=!0,H("React instrumentation encountered an error: %s",J)}}function PL(z){if(R4&&typeof R4.onPostCommitFiberRoot==="function")try{R4.onPostCommitFiberRoot(g7,z)}catch(Q){if(!z8)z8=!0,H("React instrumentation encountered an error: %s",Q)}}function FL(z){if(R4&&typeof R4.onCommitFiberUnmount==="function")try{R4.onCommitFiberUnmount(g7,z)}catch(Q){if(!z8)z8=!0,H("React instrumentation encountered an error: %s",Q)}}function K4(z){{if(typeof NL==="function")WL(z),B(z);if(R4&&typeof R4.setStrictMode==="function")try{R4.setStrictMode(g7,z)}catch(Q){if(!z8)z8=!0,H("React instrumentation encountered an error: %s",Q)}}}function ML(z){T0=z}function vL(){{var z=new Map,Q=1;for(var X=0;X<aZ;X++){var Z=iL(Q);z.set(Q,Z),Q*=2}return z}}function kL(z){if(T0!==null&&typeof T0.markCommitStarted==="function")T0.markCommitStarted(z)}function fH(){if(T0!==null&&typeof T0.markCommitStopped==="function")T0.markCommitStopped()}function Z9(z){if(T0!==null&&typeof T0.markComponentRenderStarted==="function")T0.markComponentRenderStarted(z)}function y3(){if(T0!==null&&typeof T0.markComponentRenderStopped==="function")T0.markComponentRenderStopped()}function AL(z){if(T0!==null&&typeof T0.markComponentPassiveEffectMountStarted==="function")T0.markComponentPassiveEffectMountStarted(z)}function IL(){if(T0!==null&&typeof T0.markComponentPassiveEffectMountStopped==="function")T0.markComponentPassiveEffectMountStopped()}function TL(z){if(T0!==null&&typeof T0.markComponentPassiveEffectUnmountStarted==="function")T0.markComponentPassiveEffectUnmountStarted(z)}function fL(){if(T0!==null&&typeof T0.markComponentPassiveEffectUnmountStopped==="function")T0.markComponentPassiveEffectUnmountStopped()}function SL(z){if(T0!==null&&typeof T0.markComponentLayoutEffectMountStarted==="function")T0.markComponentLayoutEffectMountStarted(z)}function CL(){if(T0!==null&&typeof T0.markComponentLayoutEffectMountStopped==="function")T0.markComponentLayoutEffectMountStopped()}function SH(z){if(T0!==null&&typeof T0.markComponentLayoutEffectUnmountStarted==="function")T0.markComponentLayoutEffectUnmountStarted(z)}function CH(){if(T0!==null&&typeof T0.markComponentLayoutEffectUnmountStopped==="function")T0.markComponentLayoutEffectUnmountStopped()}function hL(z,Q,X){if(T0!==null&&typeof T0.markComponentErrored==="function")T0.markComponentErrored(z,Q,X)}function yL(z,Q,X){if(T0!==null&&typeof T0.markComponentSuspended==="function")T0.markComponentSuspended(z,Q,X)}function VL(z){if(T0!==null&&typeof T0.markLayoutEffectsStarted==="function")T0.markLayoutEffectsStarted(z)}function DL(){if(T0!==null&&typeof T0.markLayoutEffectsStopped==="function")T0.markLayoutEffectsStopped()}function mL(z){if(T0!==null&&typeof T0.markPassiveEffectsStarted==="function")T0.markPassiveEffectsStarted(z)}function uL(){if(T0!==null&&typeof T0.markPassiveEffectsStopped==="function")T0.markPassiveEffectsStopped()}function hH(z){if(T0!==null&&typeof T0.markRenderStarted==="function")T0.markRenderStarted(z)}function gL(){if(T0!==null&&typeof T0.markRenderYielded==="function")T0.markRenderYielded()}function yH(){if(T0!==null&&typeof T0.markRenderStopped==="function")T0.markRenderStopped()}function EL(z){if(T0!==null&&typeof T0.markRenderScheduled==="function")T0.markRenderScheduled(z)}function lL(z,Q){if(T0!==null&&typeof T0.markForceUpdateScheduled==="function")T0.markForceUpdateScheduled(z,Q)}function oZ(z,Q){if(T0!==null&&typeof T0.markStateUpdateScheduled==="function")T0.markStateUpdateScheduled(z,Q)}var n0=0,y1=1,z6=2,g6=8,Q8=16,VH=Math.clz32?Math.clz32:xL,dL=Math.log,cL=Math.LN2;function xL(z){var Q=z>>>0;if(Q===0)return 32;return 31-(dL(Q)/cL|0)|0}var aZ=31,B0=0,O4=0,G1=1,V3=2,k8=4,E7=8,X8=16,J9=32,D3=4194240,b9=64,rZ=128,nZ=256,tZ=512,sZ=1024,eZ=2048,zJ=4096,QJ=8192,XJ=16384,ZJ=32768,JJ=65536,bJ=131072,YJ=262144,$J=524288,HJ=1048576,GJ=2097152,XQ=130023424,m3=4194304,UJ=8388608,qJ=16777216,BJ=33554432,KJ=67108864,DH=m3,Y9=134217728,mH=268435455,$9=268435456,l7=536870912,$5=1073741824;function iL(z){{if(z&G1)return"Sync";if(z&V3)return"InputContinuousHydration";if(z&k8)return"InputContinuous";if(z&E7)return"DefaultHydration";if(z&X8)return"Default";if(z&J9)return"TransitionHydration";if(z&D3)return"Transition";if(z&XQ)return"Retry";if(z&Y9)return"SelectiveHydration";if(z&$9)return"IdleHydration";if(z&l7)return"Idle";if(z&$5)return"Offscreen"}}var P6=-1,ZQ=b9,JQ=m3;function H9(z){switch(d7(z)){case G1:return G1;case V3:return V3;case k8:return k8;case E7:return E7;case X8:return X8;case J9:return J9;case b9:case rZ:case nZ:case tZ:case sZ:case eZ:case zJ:case QJ:case XJ:case ZJ:case JJ:case bJ:case YJ:case $J:case HJ:case GJ:return z&D3;case m3:case UJ:case qJ:case BJ:case KJ:return z&XQ;case Y9:return Y9;case $9:return $9;case l7:return l7;case $5:return $5;default:return H("Should have found matching lanes. This is a bug in React."),z}}function bQ(z,Q){var X=z.pendingLanes;if(X===B0)return B0;var Z=B0,J=z.suspendedLanes,b=z.pingedLanes,$=X&mH;if($!==B0){var U=$&~J;if(U!==B0)Z=H9(U);else{var q=$&b;if(q!==B0)Z=H9(q)}}else{var _=X&~J;if(_!==B0)Z=H9(_);else if(b!==B0)Z=H9(b)}if(Z===B0)return B0;if(Q!==B0&&Q!==Z&&(Q&J)===B0){var R=d7(Z),D=d7(Q);if(R>=D||R===X8&&(D&D3)!==B0)return Q}if((Z&k8)!==B0)Z|=X&X8;var V=z.entangledLanes;if(V!==B0){var n=z.entanglements,t=Z&V;while(t>0){var s=c7(t),k0=1<<s;Z|=n[s],t&=~k0}}return Z}function pL(z,Q){var X=z.eventTimes,Z=P6;while(Q>0){var J=c7(Q),b=1<<J,$=X[J];if($>Z)Z=$;Q&=~b}return Z}function jL(z,Q){switch(z){case G1:case V3:case k8:return Q+250;case E7:case X8:case J9:case b9:case rZ:case nZ:case tZ:case sZ:case eZ:case zJ:case QJ:case XJ:case ZJ:case JJ:case bJ:case YJ:case $J:case HJ:case GJ:return Q+5000;case m3:case UJ:case qJ:case BJ:case KJ:return P6;case Y9:case $9:case l7:case $5:return P6;default:return H("Should have found matching lanes. This is a bug in React."),P6}}function oL(z,Q){var{pendingLanes:X,suspendedLanes:Z,pingedLanes:J,expirationTimes:b}=z,$=X;while($>0){var U=c7($),q=1<<U,_=b[U];if(_===P6){if((q&Z)===B0||(q&J)!==B0)b[U]=jL(q,Q)}else if(_<=Q)z.expiredLanes|=q;$&=~q}}function aL(z){return H9(z.pendingLanes)}function OJ(z){var Q=z.pendingLanes&~$5;if(Q!==B0)return Q;if(Q&$5)return $5;return B0}function rL(z){return(z&G1)!==B0}function LJ(z){return(z&mH)!==B0}function uH(z){return(z&XQ)===z}function nL(z){var Q=G1|k8|X8;return(z&Q)===B0}function tL(z){return(z&D3)===z}function YQ(z,Q){var X=V3|k8|E7|X8;return(Q&X)!==B0}function sL(z,Q){return(Q&z.expiredLanes)!==B0}function gH(z){return(z&D3)!==B0}function EH(){var z=ZQ;if(ZQ<<=1,(ZQ&D3)===B0)ZQ=b9;return z}function eL(){var z=JQ;if(JQ<<=1,(JQ&XQ)===B0)JQ=m3;return z}function d7(z){return z&-z}function G9(z){return d7(z)}function c7(z){return 31-VH(z)}function NJ(z){return c7(z)}function H5(z,Q){return(z&Q)!==B0}function u3(z,Q){return(z&Q)===Q}function w1(z,Q){return z|Q}function $Q(z,Q){return z&~Q}function lH(z,Q){return z&Q}function HQ(z){return z}function zN(z,Q){return z!==O4&&z<Q?z:Q}function WJ(z){var Q=[];for(var X=0;X<aZ;X++)Q.push(z);return Q}function U9(z,Q,X){if(z.pendingLanes|=Q,Q!==l7)z.suspendedLanes=B0,z.pingedLanes=B0;var Z=z.eventTimes,J=NJ(Q);Z[J]=X}function QN(z,Q){z.suspendedLanes|=Q,z.pingedLanes&=~Q;var X=z.expirationTimes,Z=Q;while(Z>0){var J=c7(Z),b=1<<J;X[J]=P6,Z&=~b}}function dH(z,Q,X){z.pingedLanes|=z.suspendedLanes&Q}function XN(z,Q){var X=z.pendingLanes&~Q;z.pendingLanes=Q,z.suspendedLanes=B0,z.pingedLanes=B0,z.expiredLanes&=Q,z.mutableReadLanes&=Q,z.entangledLanes&=Q;var{entanglements:Z,eventTimes:J,expirationTimes:b}=z,$=X;while($>0){var U=c7($),q=1<<U;Z[U]=B0,J[U]=P6,b[U]=P6,$&=~q}}function _J(z,Q){var X=z.entangledLanes|=Q,Z=z.entanglements,J=X;while(J){var b=c7(J),$=1<<b;if($&Q|Z[b]&Q)Z[b]|=Q;J&=~$}}function ZN(z,Q){var X=d7(Q),Z;switch(X){case k8:Z=V3;break;case X8:Z=E7;break;case b9:case rZ:case nZ:case tZ:case sZ:case eZ:case zJ:case QJ:case XJ:case ZJ:case JJ:case bJ:case YJ:case $J:case HJ:case GJ:case m3:case UJ:case qJ:case BJ:case KJ:Z=J9;break;case l7:Z=$9;break;default:Z=O4;break}if((Z&(z.suspendedLanes|Q))!==O4)return O4;return Z}function cH(z,Q,X){if(!D5)return;var Z=z.pendingUpdatersLaneMap;while(X>0){var J=NJ(X),b=1<<J,$=Z[J];$.add(Q),X&=~b}}function xH(z,Q){if(!D5)return;var{pendingUpdatersLaneMap:X,memoizedUpdaters:Z}=z;while(Q>0){var J=NJ(Q),b=1<<J,$=X[J];if($.size>0)$.forEach(function(U){var q=U.alternate;if(q===null||!Z.has(q))Z.add(U)}),$.clear();Q&=~b}}function iH(z,Q){return null}var G5=G1,A8=k8,I8=X8,GQ=l7,q9=O4;function m5(){return q9}function L4(z){q9=z}function JN(z,Q){var X=q9;try{return q9=z,Q()}finally{q9=X}}function bN(z,Q){return z!==0&&z<Q?z:Q}function YN(z,Q){return z===0||z>Q?z:Q}function wJ(z,Q){return z!==0&&z<Q}function pH(z){var Q=d7(z);if(!wJ(G5,Q))return G5;if(!wJ(A8,Q))return A8;if(LJ(Q))return I8;return GQ}function UQ(z){var Q=z.current.memoizedState;return Q.isDehydrated}var jH;function $N(z){jH=z}function HN(z){jH(z)}var RJ;function GN(z){RJ=z}var oH;function UN(z){oH=z}var aH;function qN(z){aH=z}var rH;function BN(z){rH=z}var PJ=!1,qQ=[],t8=null,s8=null,e8=null,B9=new Map,K9=new Map,z7=[],KN=["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"];function ON(z){return KN.indexOf(z)>-1}function LN(z,Q,X,Z,J){return{blockedOn:z,domEventName:Q,eventSystemFlags:X,nativeEvent:J,targetContainers:[Z]}}function nH(z,Q){switch(z){case"focusin":case"focusout":t8=null;break;case"dragenter":case"dragleave":s8=null;break;case"mouseover":case"mouseout":e8=null;break;case"pointerover":case"pointerout":{var X=Q.pointerId;B9.delete(X);break}case"gotpointercapture":case"lostpointercapture":{var Z=Q.pointerId;K9.delete(Z);break}}}function O9(z,Q,X,Z,J,b){if(z===null||z.nativeEvent!==b){var $=LN(Q,X,Z,J,b);if(Q!==null){var U=Z7(Q);if(U!==null)RJ(U)}return $}z.eventSystemFlags|=Z;var q=z.targetContainers;if(J!==null&&q.indexOf(J)===-1)q.push(J);return z}function NN(z,Q,X,Z,J){switch(Q){case"focusin":{var b=J;return t8=O9(t8,z,Q,X,Z,b),!0}case"dragenter":{var $=J;return s8=O9(s8,z,Q,X,Z,$),!0}case"mouseover":{var U=J;return e8=O9(e8,z,Q,X,Z,U),!0}case"pointerover":{var q=J,_=q.pointerId;return B9.set(_,O9(B9.get(_)||null,z,Q,X,Z,q)),!0}case"gotpointercapture":{var R=J,D=R.pointerId;return K9.set(D,O9(K9.get(D)||null,z,Q,X,Z,R)),!0}}return!1}function tH(z){var Q=p7(z.target);if(Q!==null){var X=m7(Q);if(X!==null){var Z=X.tag;if(Z===x){var J=PH(X);if(J!==null){z.blockedOn=J,rH(z.priority,function(){oH(X)});return}}else if(Z===M){var b=X.stateNode;if(UQ(b)){z.blockedOn=FH(X);return}}}}z.blockedOn=null}function WN(z){var Q=aH(),X={blockedOn:null,target:z,priority:Q},Z=0;for(;Z<z7.length;Z++)if(!wJ(Q,z7[Z].priority))break;if(z7.splice(Z,0,X),Z===0)tH(X)}function BQ(z){if(z.blockedOn!==null)return!1;var Q=z.targetContainers;while(Q.length>0){var X=Q[0],Z=vJ(z.domEventName,z.eventSystemFlags,X,z.nativeEvent);if(Z===null){var J=z.nativeEvent,b=new J.constructor(J.type,J);xO(b),J.target.dispatchEvent(b),iO()}else{var $=Z7(Z);if($!==null)RJ($);return z.blockedOn=Z,!1}Q.shift()}return!0}function sH(z,Q,X){if(BQ(z))X.delete(Q)}function _N(){if(PJ=!1,t8!==null&&BQ(t8))t8=null;if(s8!==null&&BQ(s8))s8=null;if(e8!==null&&BQ(e8))e8=null;B9.forEach(sH),K9.forEach(sH)}function L9(z,Q){if(z.blockedOn===Q){if(z.blockedOn=null,!PJ)PJ=!0,Z6.unstable_scheduleCallback(Z6.unstable_NormalPriority,_N)}}function N9(z){if(qQ.length>0){L9(qQ[0],z);for(var Q=1;Q<qQ.length;Q++){var X=qQ[Q];if(X.blockedOn===z)X.blockedOn=null}}if(t8!==null)L9(t8,z);if(s8!==null)L9(s8,z);if(e8!==null)L9(e8,z);var Z=function(U){return L9(U,z)};B9.forEach(Z),K9.forEach(Z);for(var J=0;J<z7.length;J++){var b=z7[J];if(b.blockedOn===z)b.blockedOn=null}while(z7.length>0){var $=z7[0];if($.blockedOn!==null)break;else if(tH($),$.blockedOn===null)z7.shift()}}var g3=Y.ReactCurrentBatchConfig,FJ=!0;function eH(z){FJ=!!z}function wN(){return FJ}function RN(z,Q,X){var Z=zG(Q),J;switch(Z){case G5:J=PN;break;case A8:J=FN;break;case I8:default:J=MJ;break}return J.bind(null,Q,X,z)}function PN(z,Q,X,Z){var J=m5(),b=g3.transition;g3.transition=null;try{L4(G5),MJ(z,Q,X,Z)}finally{L4(J),g3.transition=b}}function FN(z,Q,X,Z){var J=m5(),b=g3.transition;g3.transition=null;try{L4(A8),MJ(z,Q,X,Z)}finally{L4(J),g3.transition=b}}function MJ(z,Q,X,Z){if(!FJ)return;MN(z,Q,X,Z)}function MN(z,Q,X,Z){var J=vJ(z,Q,X,Z);if(J===null){gJ(z,Q,Z,KQ,X),nH(z,Z);return}if(NN(J,z,Q,X,Z)){Z.stopPropagation();return}if(nH(z,Z),Q&n2&&ON(z)){while(J!==null){var b=Z7(J);if(b!==null)HN(b);var $=vJ(z,Q,X,Z);if($===null)gJ(z,Q,Z,KQ,X);if($===J)break;J=$}if(J!==null)Z.stopPropagation();return}gJ(z,Q,Z,null,X)}var KQ=null;function vJ(z,Q,X,Z){KQ=null;var J=CZ(Z),b=p7(J);if(b!==null){var $=m7(b);if($===null)b=null;else{var U=$.tag;if(U===x){var q=PH($);if(q!==null)return q;b=null}else if(U===M){var _=$.stateNode;if(UQ(_))return FH($);b=null}else if($!==b)b=null}}return KQ=b,null}function zG(z){switch(z){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 G5;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 A8;case"message":{var Q=OL();switch(Q){case QQ:return G5;case pZ:return A8;case u7:case LL:return I8;case jZ:return GQ;default:return I8}}default:return I8}}function vN(z,Q,X){return z.addEventListener(Q,X,!1),X}function kN(z,Q,X){return z.addEventListener(Q,X,!0),X}function AN(z,Q,X,Z){return z.addEventListener(Q,X,{capture:!0,passive:Z}),X}function IN(z,Q,X,Z){return z.addEventListener(Q,X,{passive:Z}),X}var W9=null,kJ=null,_9=null;function TN(z){return W9=z,kJ=XG(),!0}function fN(){W9=null,kJ=null,_9=null}function QG(){if(_9)return _9;var z,Q=kJ,X=Q.length,Z,J=XG(),b=J.length;for(z=0;z<X;z++)if(Q[z]!==J[z])break;var $=X-z;for(Z=1;Z<=$;Z++)if(Q[X-Z]!==J[b-Z])break;var U=Z>1?1-Z:void 0;return _9=J.slice(z,U),_9}function XG(){if("value"in W9)return W9.value;return W9.textContent}function OQ(z){var Q,X=z.keyCode;if("charCode"in z){if(Q=z.charCode,Q===0&&X===13)Q=13}else Q=X;if(Q===10)Q=13;if(Q>=32||Q===13)return Q;return 0}function LQ(){return!0}function ZG(){return!1}function U5(z){function Q(X,Z,J,b,$){this._reactName=X,this._targetInst=J,this.type=Z,this.nativeEvent=b,this.target=$,this.currentTarget=null;for(var U in z){if(!z.hasOwnProperty(U))continue;var q=z[U];if(q)this[U]=q(b);else this[U]=b[U]}var _=b.defaultPrevented!=null?b.defaultPrevented:b.returnValue===!1;if(_)this.isDefaultPrevented=LQ;else this.isDefaultPrevented=ZG;return this.isPropagationStopped=ZG,this}return R1(Q.prototype,{preventDefault:function(){this.defaultPrevented=!0;var X=this.nativeEvent;if(!X)return;if(X.preventDefault)X.preventDefault();else if(typeof X.returnValue!=="unknown")X.returnValue=!1;this.isDefaultPrevented=LQ},stopPropagation:function(){var X=this.nativeEvent;if(!X)return;if(X.stopPropagation)X.stopPropagation();else if(typeof X.cancelBubble!=="unknown")X.cancelBubble=!0;this.isPropagationStopped=LQ},persist:function(){},isPersistent:LQ}),Q}var E3={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(z){return z.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},AJ=U5(E3),w9=R1({},E3,{view:0,detail:0}),SN=U5(w9),IJ,TJ,R9;function CN(z){if(z!==R9){if(R9&&z.type==="mousemove")IJ=z.screenX-R9.screenX,TJ=z.screenY-R9.screenY;else IJ=0,TJ=0;R9=z}}var NQ=R1({},w9,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:SJ,button:0,buttons:0,relatedTarget:function(z){if(z.relatedTarget===void 0)return z.fromElement===z.srcElement?z.toElement:z.fromElement;return z.relatedTarget},movementX:function(z){if("movementX"in z)return z.movementX;return CN(z),IJ},movementY:function(z){if("movementY"in z)return z.movementY;return TJ}}),JG=U5(NQ),hN=R1({},NQ,{dataTransfer:0}),yN=U5(hN),VN=R1({},w9,{relatedTarget:0}),fJ=U5(VN),DN=R1({},E3,{animationName:0,elapsedTime:0,pseudoElement:0}),mN=U5(DN),uN=R1({},E3,{clipboardData:function(z){return"clipboardData"in z?z.clipboardData:window.clipboardData}}),gN=U5(uN),EN=R1({},E3,{data:0}),bG=U5(EN),lN=bG,dN={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},cN={"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"};function xN(z){if(z.key){var Q=dN[z.key]||z.key;if(Q!=="Unidentified")return Q}if(z.type==="keypress"){var X=OQ(z);return X===13?"Enter":String.fromCharCode(X)}if(z.type==="keydown"||z.type==="keyup")return cN[z.keyCode]||"Unidentified";return""}var iN={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function pN(z){var Q=this,X=Q.nativeEvent;if(X.getModifierState)return X.getModifierState(z);var Z=iN[z];return Z?!!X[Z]:!1}function SJ(z){return pN}var jN=R1({},w9,{key:xN,code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:SJ,charCode:function(z){if(z.type==="keypress")return OQ(z);return 0},keyCode:function(z){if(z.type==="keydown"||z.type==="keyup")return z.keyCode;return 0},which:function(z){if(z.type==="keypress")return OQ(z);if(z.type==="keydown"||z.type==="keyup")return z.keyCode;return 0}}),oN=U5(jN),aN=R1({},NQ,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),YG=U5(aN),rN=R1({},w9,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:SJ}),nN=U5(rN),tN=R1({},E3,{propertyName:0,elapsedTime:0,pseudoElement:0}),sN=U5(tN),eN=R1({},NQ,{deltaX:function(z){return"deltaX"in z?z.deltaX:("wheelDeltaX"in z)?-z.wheelDeltaX:0},deltaY:function(z){return"deltaY"in z?z.deltaY:("wheelDeltaY"in z)?-z.wheelDeltaY:("wheelDelta"in z)?-z.wheelDelta:0},deltaZ:0,deltaMode:0}),zW=U5(eN),QW=[9,13,27,32],$G=229,CJ=v1&&"CompositionEvent"in window,P9=null;if(v1&&"documentMode"in document)P9=document.documentMode;var XW=v1&&"TextEvent"in window&&!P9,HG=v1&&(!CJ||P9&&P9>8&&P9<=11),GG=32,UG=String.fromCharCode(GG);function ZW(){U0("onBeforeInput",["compositionend","keypress","textInput","paste"]),U0("onCompositionEnd",["compositionend","focusout","keydown","keypress","keyup","mousedown"]),U0("onCompositionStart",["compositionstart","focusout","keydown","keypress","keyup","mousedown"]),U0("onCompositionUpdate",["compositionupdate","focusout","keydown","keypress","keyup","mousedown"])}var qG=!1;function JW(z){return(z.ctrlKey||z.altKey||z.metaKey)&&!(z.ctrlKey&&z.altKey)}function bW(z){switch(z){case"compositionstart":return"onCompositionStart";case"compositionend":return"onCompositionEnd";case"compositionupdate":return"onCompositionUpdate"}}function YW(z,Q){return z==="keydown"&&Q.keyCode===$G}function BG(z,Q){switch(z){case"keyup":return QW.indexOf(Q.keyCode)!==-1;case"keydown":return Q.keyCode!==$G;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function KG(z){var Q=z.detail;if(typeof Q==="object"&&"data"in Q)return Q.data;return null}function OG(z){return z.locale==="ko"}var l3=!1;function $W(z,Q,X,Z,J){var b,$;if(CJ)b=bW(Q);else if(!l3){if(YW(Q,Z))b="onCompositionStart"}else if(BG(Q,Z))b="onCompositionEnd";if(!b)return null;if(HG&&!OG(Z)){if(!l3&&b==="onCompositionStart")l3=TN(J);else if(b==="onCompositionEnd"){if(l3)$=QG()}}var U=PQ(X,b);if(U.length>0){var q=new bG(b,Q,null,Z,J);if(z.push({event:q,listeners:U}),$)q.data=$;else{var _=KG(Z);if(_!==null)q.data=_}}}function HW(z,Q){switch(z){case"compositionend":return KG(Q);case"keypress":var X=Q.which;if(X!==GG)return null;return qG=!0,UG;case"textInput":var Z=Q.data;if(Z===UG&&qG)return null;return Z;default:return null}}function GW(z,Q){if(l3){if(z==="compositionend"||!CJ&&BG(z,Q)){var X=QG();return fN(),l3=!1,X}return null}switch(z){case"paste":return null;case"keypress":if(!JW(Q)){if(Q.char&&Q.char.length>1)return Q.char;else if(Q.which)return String.fromCharCode(Q.which)}return null;case"compositionend":return HG&&!OG(Q)?null:Q.data;default:return null}}function UW(z,Q,X,Z,J){var b;if(XW)b=HW(Q,Z);else b=GW(Q,Z);if(!b)return null;var $=PQ(X,"onBeforeInput");if($.length>0){var U=new lN("onBeforeInput","beforeinput",null,Z,J);z.push({event:U,listeners:$}),U.data=b}}function qW(z,Q,X,Z,J,b,$){$W(z,Q,X,Z,J),UW(z,Q,X,Z,J)}var BW={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 LG(z){var Q=z&&z.nodeName&&z.nodeName.toLowerCase();if(Q==="input")return!!BW[z.type];if(Q==="textarea")return!0;return!1}function KW(z){if(!v1)return!1;var Q="on"+z,X=Q in document;if(!X){var Z=document.createElement("div");Z.setAttribute(Q,"return;"),X=typeof Z[Q]==="function"}return X}function OW(){U0("onChange",["change","click","focusin","focusout","input","keydown","keyup","selectionchange"])}function NG(z,Q,X,Z){KH(Z);var J=PQ(Q,"onChange");if(J.length>0){var b=new AJ("onChange","change",null,X,Z);z.push({event:b,listeners:J})}}var F9=null,M9=null;function LW(z){var Q=z.nodeName&&z.nodeName.toLowerCase();return Q==="select"||Q==="input"&&z.type==="file"}function NW(z){var Q=[];NG(Q,M9,z,CZ(z)),WH(WW,Q)}function WW(z){VG(z,0)}function WQ(z){var Q=j3(z);if(F3(Q))return z}function _W(z,Q){if(z==="change")return Q}var WG=!1;if(v1)WG=KW("input")&&(!document.documentMode||document.documentMode>9);function wW(z,Q){F9=z,M9=Q,F9.attachEvent("onpropertychange",wG)}function _G(){if(!F9)return;F9.detachEvent("onpropertychange",wG),F9=null,M9=null}function wG(z){if(z.propertyName!=="value")return;if(WQ(M9))NW(z)}function RW(z,Q,X){if(z==="focusin")_G(),wW(Q,X);else if(z==="focusout")_G()}function PW(z,Q){if(z==="selectionchange"||z==="keyup"||z==="keydown")return WQ(M9)}function FW(z){var Q=z.nodeName;return Q&&Q.toLowerCase()==="input"&&(z.type==="checkbox"||z.type==="radio")}function MW(z,Q){if(z==="click")return WQ(Q)}function vW(z,Q){if(z==="input"||z==="change")return WQ(Q)}function kW(z){var Q=z._wrapperState;if(!Q||!Q.controlled||z.type!=="number")return;H1(z,"number",z.value)}function AW(z,Q,X,Z,J,b,$){var U=X?j3(X):window,q,_;if(LW(U))q=_W;else if(LG(U))if(WG)q=vW;else q=PW,_=RW;else if(FW(U))q=MW;if(q){var R=q(Q,X);if(R){NG(z,R,Z,J);return}}if(_)_(Q,U,X);if(Q==="focusout")kW(U)}function IW(){t0("onMouseEnter",["mouseout","mouseover"]),t0("onMouseLeave",["mouseout","mouseover"]),t0("onPointerEnter",["pointerout","pointerover"]),t0("onPointerLeave",["pointerout","pointerover"])}function TW(z,Q,X,Z,J,b,$){var U=Q==="mouseover"||Q==="pointerover",q=Q==="mouseout"||Q==="pointerout";if(U&&!pO(Z)){var _=Z.relatedTarget||Z.fromElement;if(_){if(p7(_)||g9(_))return}}if(!q&&!U)return;var R;if(J.window===J)R=J;else{var D=J.ownerDocument;if(D)R=D.defaultView||D.parentWindow;else R=window}var V,n;if(q){var t=Z.relatedTarget||Z.toElement;if(V=X,n=t?p7(t):null,n!==null){var s=m7(n);if(n!==s||n.tag!==w&&n.tag!==v)n=null}}else V=null,n=X;if(V===n)return;var k0=JG,o0="onMouseLeave",c0="onMouseEnter",k1="mouse";if(Q==="pointerout"||Q==="pointerover")k0=YG,o0="onPointerLeave",c0="onPointerEnter",k1="pointer";var A1=V==null?R:j3(V),i=n==null?R:j3(n),Z0=new k0(o0,k1+"leave",V,Z,J);Z0.target=A1,Z0.relatedTarget=i;var p=null,O0=p7(J);if(O0===X){var S0=new k0(c0,k1+"enter",n,Z,J);S0.target=i,S0.relatedTarget=A1,p=S0}sW(z,Z0,p,V,n)}function fW(z,Q){return z===Q&&(z!==0||1/z===1/Q)||z!==z&&Q!==Q}var q5=typeof Object.is==="function"?Object.is:fW;function v9(z,Q){if(q5(z,Q))return!0;if(typeof z!=="object"||z===null||typeof Q!=="object"||Q===null)return!1;var X=Object.keys(z),Z=Object.keys(Q);if(X.length!==Z.length)return!1;for(var J=0;J<X.length;J++){var b=X[J];if(!$6.call(Q,b)||!q5(z[b],Q[b]))return!1}return!0}function RG(z){while(z&&z.firstChild)z=z.firstChild;return z}function SW(z){while(z){if(z.nextSibling)return z.nextSibling;z=z.parentNode}}function PG(z,Q){var X=RG(z),Z=0,J=0;while(X){if(X.nodeType===w8){if(J=Z+X.textContent.length,Z<=Q&&J>=Q)return{node:X,offset:Q-Z};Z=J}X=RG(SW(X))}}function CW(z){var Q=z.ownerDocument,X=Q&&Q.defaultView||window,Z=X.getSelection&&X.getSelection();if(!Z||Z.rangeCount===0)return null;var{anchorNode:J,anchorOffset:b,focusNode:$,focusOffset:U}=Z;try{J.nodeType,$.nodeType}catch(q){return null}return hW(z,J,b,$,U)}function hW(z,Q,X,Z,J){var b=0,$=-1,U=-1,q=0,_=0,R=z,D=null;z:while(!0){var V=null;while(!0){if(R===Q&&(X===0||R.nodeType===w8))$=b+X;if(R===Z&&(J===0||R.nodeType===w8))U=b+J;if(R.nodeType===w8)b+=R.nodeValue.length;if((V=R.firstChild)===null)break;D=R,R=V}while(!0){if(R===z)break z;if(D===Q&&++q===X)$=b;if(D===Z&&++_===J)U=b;if((V=R.nextSibling)!==null)break;R=D,D=R.parentNode}R=V}if($===-1||U===-1)return null;return{start:$,end:U}}function yW(z,Q){var X=z.ownerDocument||document,Z=X&&X.defaultView||window;if(!Z.getSelection)return;var J=Z.getSelection(),b=z.textContent.length,$=Math.min(Q.start,b),U=Q.end===void 0?$:Math.min(Q.end,b);if(!J.extend&&$>U){var q=U;U=$,$=q}var _=PG(z,$),R=PG(z,U);if(_&&R){if(J.rangeCount===1&&J.anchorNode===_.node&&J.anchorOffset===_.offset&&J.focusNode===R.node&&J.focusOffset===R.offset)return;var D=X.createRange();if(D.setStart(_.node,_.offset),J.removeAllRanges(),$>U)J.addRange(D),J.extend(R.node,R.offset);else D.setEnd(R.node,R.offset),J.addRange(D)}}function FG(z){return z&&z.nodeType===w8}function MG(z,Q){if(!z||!Q)return!1;else if(z===Q)return!0;else if(FG(z))return!1;else if(FG(Q))return MG(z,Q.parentNode);else if("contains"in z)return z.contains(Q);else if(z.compareDocumentPosition)return!!(z.compareDocumentPosition(Q)&16);else return!1}function VW(z){return z&&z.ownerDocument&&MG(z.ownerDocument.documentElement,z)}function DW(z){try{return typeof z.contentWindow.location.href==="string"}catch(Q){return!1}}function vG(){var z=window,Q=r8();while(Q instanceof z.HTMLIFrameElement){if(DW(Q))z=Q.contentWindow;else return Q;Q=r8(z.document)}return Q}function hJ(z){var Q=z&&z.nodeName&&z.nodeName.toLowerCase();return Q&&(Q==="input"&&(z.type==="text"||z.type==="search"||z.type==="tel"||z.type==="url"||z.type==="password")||Q==="textarea"||z.contentEditable==="true")}function mW(){var z=vG();return{focusedElem:z,selectionRange:hJ(z)?gW(z):null}}function uW(z){var Q=vG(),X=z.focusedElem,Z=z.selectionRange;if(Q!==X&&VW(X)){if(Z!==null&&hJ(X))EW(X,Z);var J=[],b=X;while(b=b.parentNode)if(b.nodeType===s4)J.push({element:b,left:b.scrollLeft,top:b.scrollTop});if(typeof X.focus==="function")X.focus();for(var $=0;$<J.length;$++){var U=J[$];U.element.scrollLeft=U.left,U.element.scrollTop=U.top}}}function gW(z){var Q;if("selectionStart"in z)Q={start:z.selectionStart,end:z.selectionEnd};else Q=CW(z);return Q||{start:0,end:0}}function EW(z,Q){var{start:X,end:Z}=Q;if(Z===void 0)Z=X;if("selectionStart"in z)z.selectionStart=X,z.selectionEnd=Math.min(Z,z.value.length);else yW(z,Q)}var lW=v1&&"documentMode"in document&&document.documentMode<=11;function dW(){U0("onSelect",["focusout","contextmenu","dragend","focusin","keydown","keyup","mousedown","mouseup","selectionchange"])}var d3=null,yJ=null,k9=null,VJ=!1;function cW(z){if("selectionStart"in z&&hJ(z))return{start:z.selectionStart,end:z.selectionEnd};else{var Q=z.ownerDocument&&z.ownerDocument.defaultView||window,X=Q.getSelection();return{anchorNode:X.anchorNode,anchorOffset:X.anchorOffset,focusNode:X.focusNode,focusOffset:X.focusOffset}}}function xW(z){return z.window===z?z.document:z.nodeType===R8?z:z.ownerDocument}function kG(z,Q,X){var Z=xW(X);if(VJ||d3==null||d3!==r8(Z))return;var J=cW(d3);if(!k9||!v9(k9,J)){k9=J;var b=PQ(yJ,"onSelect");if(b.length>0){var $=new AJ("onSelect","select",null,Q,X);z.push({event:$,listeners:b}),$.target=d3}}}function iW(z,Q,X,Z,J,b,$){var U=X?j3(X):window;switch(Q){case"focusin":if(LG(U)||U.contentEditable==="true")d3=U,yJ=X,k9=null;break;case"focusout":d3=null,yJ=null,k9=null;break;case"mousedown":VJ=!0;break;case"contextmenu":case"mouseup":case"dragend":VJ=!1,kG(z,Z,J);break;case"selectionchange":if(lW)break;case"keydown":case"keyup":kG(z,Z,J)}}function _Q(z,Q){var X={};return X[z.toLowerCase()]=Q.toLowerCase(),X["Webkit"+z]="webkit"+Q,X["Moz"+z]="moz"+Q,X}var c3={animationend:_Q("Animation","AnimationEnd"),animationiteration:_Q("Animation","AnimationIteration"),animationstart:_Q("Animation","AnimationStart"),transitionend:_Q("Transition","TransitionEnd")},DJ={},AG={};if(v1){if(AG=document.createElement("div").style,!("AnimationEvent"in window))delete c3.animationend.animation,delete c3.animationiteration.animation,delete c3.animationstart.animation;if(!("TransitionEvent"in window))delete c3.transitionend.transition}function wQ(z){if(DJ[z])return DJ[z];else if(!c3[z])return z;var Q=c3[z];for(var X in Q)if(Q.hasOwnProperty(X)&&X in AG)return DJ[z]=Q[X];return z}var IG=wQ("animationend"),TG=wQ("animationiteration"),fG=wQ("animationstart"),SG=wQ("transitionend"),CG=new Map,hG=["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"];function Q7(z,Q){CG.set(z,Q),U0(Q,[z])}function pW(){for(var z=0;z<hG.length;z++){var Q=hG[z],X=Q.toLowerCase(),Z=Q[0].toUpperCase()+Q.slice(1);Q7(X,"on"+Z)}Q7(IG,"onAnimationEnd"),Q7(TG,"onAnimationIteration"),Q7(fG,"onAnimationStart"),Q7("dblclick","onDoubleClick"),Q7("focusin","onFocus"),Q7("focusout","onBlur"),Q7(SG,"onTransitionEnd")}function jW(z,Q,X,Z,J,b,$){var U=CG.get(Q);if(U===void 0)return;var q=AJ,_=Q;switch(Q){case"keypress":if(OQ(Z)===0)return;case"keydown":case"keyup":q=oN;break;case"focusin":_="focus",q=fJ;break;case"focusout":_="blur",q=fJ;break;case"beforeblur":case"afterblur":q=fJ;break;case"click":if(Z.button===2)return;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":q=JG;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":q=yN;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":q=nN;break;case IG:case TG:case fG:q=mN;break;case SG:q=sN;break;case"scroll":q=SN;break;case"wheel":q=zW;break;case"copy":case"cut":case"paste":q=gN;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":q=YG;break}var R=(b&n2)!==0;{var D=!R&&Q==="scroll",V=nW(X,U,Z.type,R,D);if(V.length>0){var n=new q(U,_,null,Z,J);z.push({event:n,listeners:V})}}}pW(),IW(),OW(),dW(),ZW();function oW(z,Q,X,Z,J,b,$){jW(z,Q,X,Z,J,b);var U=(b&cO)===0;if(U)TW(z,Q,X,Z,J),AW(z,Q,X,Z,J),iW(z,Q,X,Z,J),qW(z,Q,X,Z,J)}var A9=["abort","canplay","canplaythrough","durationchange","emptied","encrypted","ended","error","loadeddata","loadedmetadata","loadstart","pause","play","playing","progress","ratechange","resize","seeked","seeking","stalled","suspend","timeupdate","volumechange","waiting"],mJ=new Set(["cancel","close","invalid","load","scroll","toggle"].concat(A9));function yG(z,Q,X){var Z=z.type||"unknown-event";z.currentTarget=X,zL(Z,Q,void 0,z),z.currentTarget=null}function aW(z,Q,X){var Z;if(X)for(var J=Q.length-1;J>=0;J--){var b=Q[J],$=b.instance,U=b.currentTarget,q=b.listener;if($!==Z&&z.isPropagationStopped())return;yG(z,q,U),Z=$}else for(var _=0;_<Q.length;_++){var R=Q[_],D=R.instance,V=R.currentTarget,n=R.listener;if(D!==Z&&z.isPropagationStopped())return;yG(z,n,V),Z=D}}function VG(z,Q){var X=(Q&n2)!==0;for(var Z=0;Z<z.length;Z++){var J=z[Z],b=J.event,$=J.listeners;aW(b,$,X)}QL()}function rW(z,Q,X,Z,J){var b=CZ(X),$=[];oW($,z,Z,X,b,Q),VG($,Q)}function k6(z,Q){if(!mJ.has(z))H('Did not expect a listenToNonDelegatedEvent() call for "%s". This is a bug in React. Please file an issue.',z);var X=!1,Z=kw(Q),J=eW(z,X);if(!Z.has(J))DG(Q,z,SZ,X),Z.add(J)}function uJ(z,Q,X){if(mJ.has(z)&&!Q)H('Did not expect a listenToNativeEvent() call for "%s" in the bubble phase. This is a bug in React. Please file an issue.',z);var Z=0;if(Q)Z|=n2;DG(X,z,Z,Q)}var RQ="_reactListening"+Math.random().toString(36).slice(2);function I9(z){if(!z[RQ]){z[RQ]=!0,v0.forEach(function(X){if(X!=="selectionchange"){if(!mJ.has(X))uJ(X,!1,z);uJ(X,!0,z)}});var Q=z.nodeType===R8?z:z.ownerDocument;if(Q!==null){if(!Q[RQ])Q[RQ]=!0,uJ("selectionchange",!1,Q)}}}function DG(z,Q,X,Z,J){var b=RN(z,Q,X),$=void 0;if(VZ){if(Q==="touchstart"||Q==="touchmove"||Q==="wheel")$=!0}z=z;var U;if(Z)if($!==void 0)U=AN(z,Q,b,$);else U=kN(z,Q,b);else if($!==void 0)U=IN(z,Q,b,$);else U=vN(z,Q,b)}function mG(z,Q){return z===Q||z.nodeType===o6&&z.parentNode===Q}function gJ(z,Q,X,Z,J){var b=Z;if((Q&qH)===0&&(Q&SZ)===0){var $=J;if(Z!==null){var U=Z;z:while(!0){if(U===null)return;var q=U.tag;if(q===M||q===F){var _=U.stateNode.containerInfo;if(mG(_,$))break;if(q===F){var R=U.return;while(R!==null){var D=R.tag;if(D===M||D===F){var V=R.stateNode.containerInfo;if(mG(V,$))return}R=R.return}}while(_!==null){var n=p7(_);if(n===null)return;var t=n.tag;if(t===w||t===v){U=b=n;continue z}_=_.parentNode}}U=U.return}}}WH(function(){return rW(z,Q,X,b)})}function T9(z,Q,X){return{instance:z,listener:Q,currentTarget:X}}function nW(z,Q,X,Z,J,b){var $=Q!==null?Q+"Capture":null,U=Z?$:Q,q=[],_=z,R=null;while(_!==null){var D=_,V=D.stateNode,n=D.tag;if(n===w&&V!==null){if(R=V,U!==null){var t=s2(_,U);if(t!=null)q.push(T9(_,t,R))}}if(J)break;_=_.return}return q}function PQ(z,Q){var X=Q+"Capture",Z=[],J=z;while(J!==null){var b=J,$=b.stateNode,U=b.tag;if(U===w&&$!==null){var q=$,_=s2(J,X);if(_!=null)Z.unshift(T9(J,_,q));var R=s2(J,Q);if(R!=null)Z.push(T9(J,R,q))}J=J.return}return Z}function x3(z){if(z===null)return null;do z=z.return;while(z&&z.tag!==w);if(z)return z;return null}function tW(z,Q){var X=z,Z=Q,J=0;for(var b=X;b;b=x3(b))J++;var $=0;for(var U=Z;U;U=x3(U))$++;while(J-$>0)X=x3(X),J--;while($-J>0)Z=x3(Z),$--;var q=J;while(q--){if(X===Z||Z!==null&&X===Z.alternate)return X;X=x3(X),Z=x3(Z)}return null}function uG(z,Q,X,Z,J){var b=Q._reactName,$=[],U=X;while(U!==null){if(U===Z)break;var q=U,_=q.alternate,R=q.stateNode,D=q.tag;if(_!==null&&_===Z)break;if(D===w&&R!==null){var V=R;if(J){var n=s2(U,b);if(n!=null)$.unshift(T9(U,n,V))}else if(!J){var t=s2(U,b);if(t!=null)$.push(T9(U,t,V))}}U=U.return}if($.length!==0)z.push({event:Q,listeners:$})}function sW(z,Q,X,Z,J){var b=Z&&J?tW(Z,J):null;if(Z!==null)uG(z,Q,Z,b,!1);if(J!==null&&X!==null)uG(z,X,J,b,!0)}function eW(z,Q){return z+"__"+(Q?"capture":"bubble")}var e4=!1,f9="dangerouslySetInnerHTML",FQ="suppressContentEditableWarning",X7="suppressHydrationWarning",gG="autoFocus",x7="children",i7="style",MQ="__html",EJ,vQ,S9,EG,kQ,lG,dG;EJ={dialog:!0,webview:!0},vQ=function(z,Q){DO(z,Q),mO(z,Q),dO(z,Q,{registrationNameDependencies:a0,possibleRegistrationNames:z1})},lG=v1&&!document.documentMode,S9=function(z,Q,X){if(e4)return;var Z=AQ(X),J=AQ(Q);if(J===Z)return;e4=!0,H("Prop `%s` did not match. Server: %s Client: %s",z,JSON.stringify(J),JSON.stringify(Z))},EG=function(z){if(e4)return;e4=!0;var Q=[];z.forEach(function(X){Q.push(X)}),H("Extra attributes from the server: %s",Q)},kQ=function(z,Q){if(Q===!1)H("Expected `%s` listener to be a function, instead got `false`.\n\nIf you used to conditionally omit it with %s={condition && value}, pass %s={condition ? value : undefined} instead.",z,z,z);else H("Expected `%s` listener to be a function, instead got a value of `%s` type.",z,typeof Q)},dG=function(z,Q){var X=z.namespaceURI===_8?z.ownerDocument.createElement(z.tagName):z.ownerDocument.createElementNS(z.namespaceURI,z.tagName);return X.innerHTML=Q,X.innerHTML};var z_=/\r\n?/g,Q_=/\u0000|\uFFFD/g;function AQ(z){C5(z);var Q=typeof z==="string"?z:""+z;return Q.replace(z_,`
32
- `).replace(Q_,"")}function IQ(z,Q,X,Z){var J=AQ(Q),b=AQ(z);if(b===J)return;if(Z){if(!e4)e4=!0,H('Text content did not match. Server: "%s" Client: "%s"',b,J)}if(X&&_0)throw Error("Text content does not match server-rendered HTML.")}function cG(z){return z.nodeType===R8?z:z.ownerDocument}function X_(){}function TQ(z){z.onclick=X_}function Z_(z,Q,X,Z,J){for(var b in Z){if(!Z.hasOwnProperty(b))continue;var $=Z[b];if(b===i7){if($)Object.freeze($);bH(Q,$)}else if(b===f9){var U=$?$[MQ]:void 0;if(U!=null)zH(Q,U)}else if(b===x7){if(typeof $==="string"){var q=z!=="textarea"||$!=="";if(q)rz(Q,$)}else if(typeof $==="number")rz(Q,""+$)}else if(b===FQ||b===X7);else if(b===gG);else if(a0.hasOwnProperty(b)){if($!=null){if(typeof $!=="function")kQ(b,$);if(b==="onScroll")k6("scroll",Q)}}else if($!=null)f1(Q,b,$,J)}}function J_(z,Q,X,Z){for(var J=0;J<Q.length;J+=2){var b=Q[J],$=Q[J+1];if(b===i7)bH(z,$);else if(b===f9)zH(z,$);else if(b===x7)rz(z,$);else f1(z,b,$,Z)}}function b_(z,Q,X,Z){var J,b=cG(X),$,U=Z;if(U===_8)U=vZ(z);if(U===_8){if(J=C7(z,Q),!J&&z!==z.toLowerCase())H("<%s /> is using incorrect casing. Use PascalCase for React components, or lowercase for HTML elements.",z);if(z==="script"){var q=b.createElement("div");q.innerHTML="<script></script>";var _=q.firstChild;$=q.removeChild(_)}else if(typeof Q.is==="string")$=b.createElement(z,{is:Q.is});else if($=b.createElement(z),z==="select"){var R=$;if(Q.multiple)R.multiple=!0;else if(Q.size)R.size=Q.size}}else $=b.createElementNS(U,z);if(U===_8){if(!J&&Object.prototype.toString.call($)==="[object HTMLUnknownElement]"&&!$6.call(EJ,z))EJ[z]=!0,H("The tag <%s> is unrecognized in this browser. If you meant to render a React component, start its name with an uppercase letter.",z)}return $}function Y_(z,Q){return cG(Q).createTextNode(z)}function $_(z,Q,X,Z){var J=C7(Q,X);vQ(Q,X);var b;switch(Q){case"dialog":k6("cancel",z),k6("close",z),b=X;break;case"iframe":case"object":case"embed":k6("load",z),b=X;break;case"video":case"audio":for(var $=0;$<A9.length;$++)k6(A9[$],z);b=X;break;case"source":k6("error",z),b=X;break;case"img":case"image":case"link":k6("error",z),k6("load",z),b=X;break;case"details":k6("toggle",z),b=X;break;case"input":f(z,X),b=K(z,X),k6("invalid",z);break;case"option":O6(z,X),b=X;break;case"select":a2(z,X),b=o2(z,X),k6("invalid",z);break;case"textarea":t$(z,X),b=FZ(z,X),k6("invalid",z);break;default:b=X}switch(fZ(Q,b),Z_(Q,z,Z,b,J),Q){case"input":N8(z),W0(z,X,!1);break;case"textarea":N8(z),e$(z);break;case"option":v6(z,X);break;case"select":PZ(z,X);break;default:if(typeof b.onClick==="function")TQ(z);break}}function H_(z,Q,X,Z,J){vQ(Q,Z);var b=null,$,U;switch(Q){case"input":$=K(z,X),U=K(z,Z),b=[];break;case"select":$=o2(z,X),U=o2(z,Z),b=[];break;case"textarea":$=FZ(z,X),U=FZ(z,Z),b=[];break;default:if($=X,U=Z,typeof $.onClick!=="function"&&typeof U.onClick==="function")TQ(z);break}fZ(Q,U);var q,_,R=null;for(q in $){if(U.hasOwnProperty(q)||!$.hasOwnProperty(q)||$[q]==null)continue;if(q===i7){var D=$[q];for(_ in D)if(D.hasOwnProperty(_)){if(!R)R={};R[_]=""}}else if(q===f9||q===x7);else if(q===FQ||q===X7);else if(q===gG);else if(a0.hasOwnProperty(q)){if(!b)b=[]}else(b=b||[]).push(q,null)}for(q in U){var V=U[q],n=$!=null?$[q]:void 0;if(!U.hasOwnProperty(q)||V===n||V==null&&n==null)continue;if(q===i7){if(V)Object.freeze(V);if(n){for(_ in n)if(n.hasOwnProperty(_)&&(!V||!V.hasOwnProperty(_))){if(!R)R={};R[_]=""}for(_ in V)if(V.hasOwnProperty(_)&&n[_]!==V[_]){if(!R)R={};R[_]=V[_]}}else{if(!R){if(!b)b=[];b.push(q,R)}R=V}}else if(q===f9){var t=V?V[MQ]:void 0,s=n?n[MQ]:void 0;if(t!=null){if(s!==t)(b=b||[]).push(q,t)}}else if(q===x7){if(typeof V==="string"||typeof V==="number")(b=b||[]).push(q,""+V)}else if(q===FQ||q===X7);else if(a0.hasOwnProperty(q)){if(V!=null){if(typeof V!=="function")kQ(q,V);if(q==="onScroll")k6("scroll",z)}if(!b&&n!==V)b=[]}else(b=b||[]).push(q,V)}if(R)IO(R,U[i7]),(b=b||[]).push(i7,R);return b}function G_(z,Q,X,Z,J){if(X==="input"&&J.type==="radio"&&J.name!=null)r(z,J);var b=C7(X,Z),$=C7(X,J);switch(J_(z,Q,b,$),X){case"input":z0(z,J);break;case"textarea":s$(z,J);break;case"select":JO(z,J);break}}function U_(z){{var Q=z.toLowerCase();if(!nz.hasOwnProperty(Q))return null;return nz[Q]||null}}function q_(z,Q,X,Z,J,b,$){var U,q;switch(U=C7(Q,X),vQ(Q,X),Q){case"dialog":k6("cancel",z),k6("close",z);break;case"iframe":case"object":case"embed":k6("load",z);break;case"video":case"audio":for(var _=0;_<A9.length;_++)k6(A9[_],z);break;case"source":k6("error",z);break;case"img":case"image":case"link":k6("error",z),k6("load",z);break;case"details":k6("toggle",z);break;case"input":f(z,X),k6("invalid",z);break;case"option":O6(z,X);break;case"select":a2(z,X),k6("invalid",z);break;case"textarea":t$(z,X),k6("invalid",z);break}fZ(Q,X);{q=new Set;var R=z.attributes;for(var D=0;D<R.length;D++){var V=R[D].name.toLowerCase();switch(V){case"value":break;case"checked":break;case"selected":break;default:q.add(R[D].name)}}}var n=null;for(var t in X){if(!X.hasOwnProperty(t))continue;var s=X[t];if(t===x7){if(typeof s==="string"){if(z.textContent!==s){if(X[X7]!==!0)IQ(z.textContent,s,b,$);n=[x7,s]}}else if(typeof s==="number"){if(z.textContent!==""+s){if(X[X7]!==!0)IQ(z.textContent,s,b,$);n=[x7,""+s]}}}else if(a0.hasOwnProperty(t)){if(s!=null){if(typeof s!=="function")kQ(t,s);if(t==="onScroll")k6("scroll",z)}}else if($&&!0&&typeof U==="boolean"){var k0=void 0,o0=U&&O1?null:x6(t);if(X[X7]===!0);else if(t===FQ||t===X7||t==="value"||t==="checked"||t==="selected");else if(t===f9){var c0=z.innerHTML,k1=s?s[MQ]:void 0;if(k1!=null){var A1=dG(z,k1);if(A1!==c0)S9(t,c0,A1)}}else if(t===i7){if(q.delete(t),lG){var i=kO(s);if(k0=z.getAttribute("style"),i!==k0)S9(t,k0,i)}}else if(U&&!O1){if(q.delete(t.toLowerCase()),k0=y5(z,t,s),s!==k0)S9(t,k0,s)}else if(!n1(t,o0,U)&&!J6(t,s,o0,U)){var Z0=!1;if(o0!==null)q.delete(o0.attributeName),k0=y4(z,t,s,o0);else{var p=Z;if(p===_8)p=vZ(Q);if(p===_8)q.delete(t.toLowerCase());else{var O0=U_(t);if(O0!==null&&O0!==t)Z0=!0,q.delete(O0);q.delete(t)}k0=y5(z,t,s)}var S0=O1;if(!S0&&s!==k0&&!Z0)S9(t,k0,s)}}}if($){if(q.size>0&&X[X7]!==!0)EG(q)}switch(Q){case"input":N8(z),W0(z,X,!0);break;case"textarea":N8(z),e$(z);break;case"select":case"option":break;default:if(typeof X.onClick==="function")TQ(z);break}return n}function B_(z,Q,X){var Z=z.nodeValue!==Q;return Z}function lJ(z,Q){{if(e4)return;e4=!0,H("Did not expect server HTML to contain a <%s> in <%s>.",Q.nodeName.toLowerCase(),z.nodeName.toLowerCase())}}function dJ(z,Q){{if(e4)return;e4=!0,H('Did not expect server HTML to contain the text node "%s" in <%s>.',Q.nodeValue,z.nodeName.toLowerCase())}}function cJ(z,Q,X){{if(e4)return;e4=!0,H("Expected server HTML to contain a matching <%s> in <%s>.",Q,z.nodeName.toLowerCase())}}function xJ(z,Q){{if(Q==="")return;if(e4)return;e4=!0,H('Expected server HTML to contain a matching text node for "%s" in <%s>.',Q,z.nodeName.toLowerCase())}}function K_(z,Q,X){switch(Q){case"input":X1(z,X);return;case"textarea":YO(z,X);return;case"select":bO(z,X);return}}var C9=function(){},h9=function(){};{var O_=["address","applet","area","article","aside","base","basefont","bgsound","blockquote","body","br","button","caption","center","col","colgroup","dd","details","dir","div","dl","dt","embed","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","iframe","img","input","isindex","li","link","listing","main","marquee","menu","menuitem","meta","nav","noembed","noframes","noscript","object","ol","p","param","plaintext","pre","script","section","select","source","style","summary","table","tbody","td","template","textarea","tfoot","th","thead","title","tr","track","ul","wbr","xmp"],xG=["applet","caption","html","table","td","th","marquee","object","template","foreignObject","desc","title"],L_=xG.concat(["button"]),N_=["dd","dt","li","option","optgroup","p","rp","rt"],iG={current:null,formTag:null,aTagInScope:null,buttonTagInScope:null,nobrTagInScope:null,pTagInButtonScope:null,listItemTagAutoclosing:null,dlItemTagAutoclosing:null};h9=function(z,Q){var X=R1({},z||iG),Z={tag:Q};if(xG.indexOf(Q)!==-1)X.aTagInScope=null,X.buttonTagInScope=null,X.nobrTagInScope=null;if(L_.indexOf(Q)!==-1)X.pTagInButtonScope=null;if(O_.indexOf(Q)!==-1&&Q!=="address"&&Q!=="div"&&Q!=="p")X.listItemTagAutoclosing=null,X.dlItemTagAutoclosing=null;if(X.current=Z,Q==="form")X.formTag=Z;if(Q==="a")X.aTagInScope=Z;if(Q==="button")X.buttonTagInScope=Z;if(Q==="nobr")X.nobrTagInScope=Z;if(Q==="p")X.pTagInButtonScope=Z;if(Q==="li")X.listItemTagAutoclosing=Z;if(Q==="dd"||Q==="dt")X.dlItemTagAutoclosing=Z;return X};var W_=function(z,Q){switch(Q){case"select":return z==="option"||z==="optgroup"||z==="#text";case"optgroup":return z==="option"||z==="#text";case"option":return z==="#text";case"tr":return z==="th"||z==="td"||z==="style"||z==="script"||z==="template";case"tbody":case"thead":case"tfoot":return z==="tr"||z==="style"||z==="script"||z==="template";case"colgroup":return z==="col"||z==="template";case"table":return z==="caption"||z==="colgroup"||z==="tbody"||z==="tfoot"||z==="thead"||z==="style"||z==="script"||z==="template";case"head":return z==="base"||z==="basefont"||z==="bgsound"||z==="link"||z==="meta"||z==="title"||z==="noscript"||z==="noframes"||z==="style"||z==="script"||z==="template";case"html":return z==="head"||z==="body"||z==="frameset";case"frameset":return z==="frame";case"#document":return z==="html"}switch(z){case"h1":case"h2":case"h3":case"h4":case"h5":case"h6":return Q!=="h1"&&Q!=="h2"&&Q!=="h3"&&Q!=="h4"&&Q!=="h5"&&Q!=="h6";case"rp":case"rt":return N_.indexOf(Q)===-1;case"body":case"caption":case"col":case"colgroup":case"frameset":case"frame":case"head":case"html":case"tbody":case"td":case"tfoot":case"th":case"thead":case"tr":return Q==null}return!0},__=function(z,Q){switch(z){case"address":case"article":case"aside":case"blockquote":case"center":case"details":case"dialog":case"dir":case"div":case"dl":case"fieldset":case"figcaption":case"figure":case"footer":case"header":case"hgroup":case"main":case"menu":case"nav":case"ol":case"p":case"section":case"summary":case"ul":case"pre":case"listing":case"table":case"hr":case"xmp":case"h1":case"h2":case"h3":case"h4":case"h5":case"h6":return Q.pTagInButtonScope;case"form":return Q.formTag||Q.pTagInButtonScope;case"li":return Q.listItemTagAutoclosing;case"dd":case"dt":return Q.dlItemTagAutoclosing;case"button":return Q.buttonTagInScope;case"a":return Q.aTagInScope;case"nobr":return Q.nobrTagInScope}return null},pG={};C9=function(z,Q,X){X=X||iG;var Z=X.current,J=Z&&Z.tag;if(Q!=null){if(z!=null)H("validateDOMNesting: when childText is passed, childTag should be null");z="#text"}var b=W_(z,J)?null:Z,$=b?null:__(z,X),U=b||$;if(!U)return;var q=U.tag,_=!!b+"|"+z+"|"+q;if(pG[_])return;pG[_]=!0;var R=z,D="";if(z==="#text")if(/\S/.test(Q))R="Text nodes";else R="Whitespace text nodes",D=" Make sure you don't have any extra whitespace between tags on each line of your source code.";else R="<"+z+">";if(b){var V="";if(q==="table"&&z==="tr")V+=" Add a <tbody>, <thead> or <tfoot> to your code to match the DOM tree generated by the browser.";H("validateDOMNesting(...): %s cannot appear as a child of <%s>.%s%s",R,q,D,V)}else H("validateDOMNesting(...): %s cannot appear as a descendant of <%s>.",R,q)}}var fQ="suppressHydrationWarning",SQ="$",CQ="/$",y9="$?",V9="$!",w_="style",iJ=null,pJ=null;function R_(z){var Q,X,Z=z.nodeType;switch(Z){case R8:case AZ:{Q=Z===R8?"#document":"#fragment";var J=z.documentElement;X=J?J.namespaceURI:kZ(null,"");break}default:{var b=Z===o6?z.parentNode:z,$=b.namespaceURI||null;Q=b.tagName,X=kZ($,Q);break}}{var U=Q.toLowerCase(),q=h9(null,U);return{namespace:X,ancestorInfo:q}}}function P_(z,Q,X){{var Z=z,J=kZ(Z.namespace,Q),b=h9(Z.ancestorInfo,Q);return{namespace:J,ancestorInfo:b}}}function jJ(z){return z}function F_(z){iJ=wN(),pJ=mW();var Q=null;return eH(!1),Q}function M_(z){uW(pJ),eH(iJ),iJ=null,pJ=null}function v_(z,Q,X,Z,J){var b;{var $=Z;if(C9(z,null,$.ancestorInfo),typeof Q.children==="string"||typeof Q.children==="number"){var U=""+Q.children,q=h9($.ancestorInfo,z);C9(null,U,q)}b=$.namespace}var _=b_(z,Q,X,b);return u9(J,_),zb(_,Q),_}function k_(z,Q){z.appendChild(Q)}function A_(z,Q,X,Z,J){switch($_(z,Q,X,Z),Q){case"button":case"input":case"select":case"textarea":return!!X.autoFocus;case"img":return!0;default:return!1}}function I_(z,Q,X,Z,J,b){{var $=b;if(typeof Z.children!==typeof X.children&&(typeof Z.children==="string"||typeof Z.children==="number")){var U=""+Z.children,q=h9($.ancestorInfo,Q);C9(null,U,q)}}return H_(z,Q,X,Z)}function oJ(z,Q){return z==="textarea"||z==="noscript"||typeof Q.children==="string"||typeof Q.children==="number"||typeof Q.dangerouslySetInnerHTML==="object"&&Q.dangerouslySetInnerHTML!==null&&Q.dangerouslySetInnerHTML.__html!=null}function T_(z,Q,X,Z){{var J=X;C9(null,z,J.ancestorInfo)}var b=Y_(z,Q);return u9(Z,b),b}function f_(){var z=window.event;if(z===void 0)return I8;return zG(z.type)}var aJ=typeof setTimeout==="function"?setTimeout:void 0,S_=typeof clearTimeout==="function"?clearTimeout:void 0,rJ=-1,jG=typeof Promise==="function"?Promise:void 0,C_=typeof queueMicrotask==="function"?queueMicrotask:typeof jG<"u"?function(z){return jG.resolve(null).then(z).catch(h_)}:aJ;function h_(z){setTimeout(function(){throw z})}function y_(z,Q,X,Z){switch(Q){case"button":case"input":case"select":case"textarea":if(X.autoFocus)z.focus();return;case"img":{if(X.src)z.src=X.src;return}}}function V_(z,Q,X,Z,J,b){G_(z,Q,X,Z,J),zb(z,J)}function oG(z){rz(z,"")}function D_(z,Q,X){z.nodeValue=X}function m_(z,Q){z.appendChild(Q)}function u_(z,Q){var X;if(z.nodeType===o6)X=z.parentNode,X.insertBefore(Q,z);else X=z,X.appendChild(Q);var Z=z._reactRootContainer;if((Z===null||Z===void 0)&&X.onclick===null)TQ(X)}function g_(z,Q,X){z.insertBefore(Q,X)}function E_(z,Q,X){if(z.nodeType===o6)z.parentNode.insertBefore(Q,X);else z.insertBefore(Q,X)}function l_(z,Q){z.removeChild(Q)}function d_(z,Q){if(z.nodeType===o6)z.parentNode.removeChild(Q);else z.removeChild(Q)}function nJ(z,Q){var X=Q,Z=0;do{var J=X.nextSibling;if(z.removeChild(X),J&&J.nodeType===o6){var b=J.data;if(b===CQ)if(Z===0){z.removeChild(J),N9(Q);return}else Z--;else if(b===SQ||b===y9||b===V9)Z++}X=J}while(X);N9(Q)}function c_(z,Q){if(z.nodeType===o6)nJ(z.parentNode,Q);else if(z.nodeType===s4)nJ(z,Q);N9(z)}function x_(z){z=z;var Q=z.style;if(typeof Q.setProperty==="function")Q.setProperty("display","none","important");else Q.display="none"}function i_(z){z.nodeValue=""}function p_(z,Q){z=z;var X=Q[w_],Z=X!==void 0&&X!==null&&X.hasOwnProperty("display")?X.display:null;z.style.display=IZ("display",Z)}function j_(z,Q){z.nodeValue=Q}function o_(z){if(z.nodeType===s4)z.textContent="";else if(z.nodeType===R8){if(z.documentElement)z.removeChild(z.documentElement)}}function a_(z,Q,X){if(z.nodeType!==s4||Q.toLowerCase()!==z.nodeName.toLowerCase())return null;return z}function r_(z,Q){if(Q===""||z.nodeType!==w8)return null;return z}function n_(z){if(z.nodeType!==o6)return null;return z}function aG(z){return z.data===y9}function tJ(z){return z.data===V9}function t_(z){var Q=z.nextSibling&&z.nextSibling.dataset,X,Z,J;if(Q)X=Q.dgst,Z=Q.msg,J=Q.stck;return{message:Z,digest:X,stack:J}}function s_(z,Q){z._reactRetry=Q}function hQ(z){for(;z!=null;z=z.nextSibling){var Q=z.nodeType;if(Q===s4||Q===w8)break;if(Q===o6){var X=z.data;if(X===SQ||X===V9||X===y9)break;if(X===CQ)return null}}return z}function D9(z){return hQ(z.nextSibling)}function e_(z){return hQ(z.firstChild)}function zw(z){return hQ(z.firstChild)}function Qw(z){return hQ(z.nextSibling)}function Xw(z,Q,X,Z,J,b,$){u9(b,z),zb(z,X);var U;{var q=J;U=q.namespace}var _=(b.mode&y1)!==n0;return q_(z,Q,X,U,Z,_,$)}function Zw(z,Q,X,Z){u9(X,z);var J=(X.mode&y1)!==n0;return B_(z,Q)}function Jw(z,Q){u9(Q,z)}function bw(z){var Q=z.nextSibling,X=0;while(Q){if(Q.nodeType===o6){var Z=Q.data;if(Z===CQ)if(X===0)return D9(Q);else X--;else if(Z===SQ||Z===V9||Z===y9)X++}Q=Q.nextSibling}return null}function rG(z){var Q=z.previousSibling,X=0;while(Q){if(Q.nodeType===o6){var Z=Q.data;if(Z===SQ||Z===V9||Z===y9)if(X===0)return Q;else X--;else if(Z===CQ)X++}Q=Q.previousSibling}return null}function Yw(z){N9(z)}function $w(z){N9(z)}function Hw(z){return z!=="head"&&z!=="body"}function Gw(z,Q,X,Z){var J=!0;IQ(Q.nodeValue,X,Z,J)}function Uw(z,Q,X,Z,J,b){if(Q[fQ]!==!0){var $=!0;IQ(Z.nodeValue,J,b,$)}}function qw(z,Q){if(Q.nodeType===s4)lJ(z,Q);else if(Q.nodeType===o6);else dJ(z,Q)}function Bw(z,Q){{var X=z.parentNode;if(X!==null)if(Q.nodeType===s4)lJ(X,Q);else if(Q.nodeType===o6);else dJ(X,Q)}}function Kw(z,Q,X,Z,J){if(J||Q[fQ]!==!0)if(Z.nodeType===s4)lJ(X,Z);else if(Z.nodeType===o6);else dJ(X,Z)}function Ow(z,Q,X){cJ(z,Q)}function Lw(z,Q){xJ(z,Q)}function Nw(z,Q,X){{var Z=z.parentNode;if(Z!==null)cJ(Z,Q)}}function Ww(z,Q){{var X=z.parentNode;if(X!==null)xJ(X,Q)}}function _w(z,Q,X,Z,J,b){if(b||Q[fQ]!==!0)cJ(X,Z)}function ww(z,Q,X,Z,J){if(J||Q[fQ]!==!0)xJ(X,Z)}function Rw(z){H("An error occurred during hydration. The server HTML was replaced with client content in <%s>.",z.nodeName.toLowerCase())}function Pw(z){I9(z)}var i3=Math.random().toString(36).slice(2),p3="__reactFiber$"+i3,sJ="__reactProps$"+i3,m9="__reactContainer$"+i3,eJ="__reactEvents$"+i3,Fw="__reactListeners$"+i3,Mw="__reactHandles$"+i3;function vw(z){delete z[p3],delete z[sJ],delete z[eJ],delete z[Fw],delete z[Mw]}function u9(z,Q){Q[p3]=z}function yQ(z,Q){Q[m9]=z}function nG(z){z[m9]=null}function g9(z){return!!z[m9]}function p7(z){var Q=z[p3];if(Q)return Q;var X=z.parentNode;while(X){if(Q=X[m9]||X[p3],Q){var Z=Q.alternate;if(Q.child!==null||Z!==null&&Z.child!==null){var J=rG(z);while(J!==null){var b=J[p3];if(b)return b;J=rG(J)}}return Q}z=X,X=z.parentNode}return null}function Z7(z){var Q=z[p3]||z[m9];if(Q)if(Q.tag===w||Q.tag===v||Q.tag===x||Q.tag===M)return Q;else return null;return null}function j3(z){if(z.tag===w||z.tag===v)return z.stateNode;throw Error("getNodeFromInstance: Invalid argument.")}function VQ(z){return z[sJ]||null}function zb(z,Q){z[sJ]=Q}function kw(z){var Q=z[eJ];if(Q===void 0)Q=z[eJ]=new Set;return Q}var tG={},sG=Y.ReactDebugCurrentFrame;function DQ(z){if(z){var Q=z._owner,X=j8(z.type,z._source,Q?Q.type:null);sG.setExtraStackFrame(X)}else sG.setExtraStackFrame(null)}function u5(z,Q,X,Z,J){{var b=Function.call.bind($6);for(var $ in z)if(b(z,$)){var U=void 0;try{if(typeof z[$]!=="function"){var q=Error((Z||"React class")+": "+X+" type `"+$+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof z[$]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw q.name="Invariant Violation",q}U=z[$](Q,$,Z,X,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(_){U=_}if(U&&!(U instanceof Error))DQ(J),H("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",Z||"React class",X,$,typeof U),DQ(null);if(U instanceof Error&&!(U.message in tG))tG[U.message]=!0,DQ(J),H("Failed %s type: %s",X,U.message),DQ(null)}}}var Qb=[],mQ;mQ=[];var T8=-1;function J7(z){return{current:z}}function D4(z,Q){if(T8<0){H("Unexpected pop.");return}if(Q!==mQ[T8])H("Unexpected Fiber popped.");z.current=Qb[T8],Qb[T8]=null,mQ[T8]=null,T8--}function m4(z,Q,X){T8++,Qb[T8]=z.current,mQ[T8]=X,z.current=Q}var eG={},B5={};Object.freeze(B5);var f8=J7(B5),Z8=J7(!1),Xb=B5;function o3(z,Q,X){{if(X&&J8(Q))return Xb;return f8.current}}function zU(z,Q,X){{var Z=z.stateNode;Z.__reactInternalMemoizedUnmaskedChildContext=Q,Z.__reactInternalMemoizedMaskedChildContext=X}}function a3(z,Q){{var X=z.type,Z=X.contextTypes;if(!Z)return B5;var J=z.stateNode;if(J&&J.__reactInternalMemoizedUnmaskedChildContext===Q)return J.__reactInternalMemoizedMaskedChildContext;var b={};for(var $ in Z)b[$]=Q[$];{var U=N1(z)||"Unknown";u5(Z,b,"context",U)}if(J)zU(z,Q,b);return b}}function uQ(){return Z8.current}function J8(z){{var Q=z.childContextTypes;return Q!==null&&Q!==void 0}}function gQ(z){D4(Z8,z),D4(f8,z)}function Zb(z){D4(Z8,z),D4(f8,z)}function QU(z,Q,X){{if(f8.current!==B5)throw Error("Unexpected context found on stack. This error is likely caused by a bug in React. Please file an issue.");m4(f8,Q,z),m4(Z8,X,z)}}function XU(z,Q,X){{var Z=z.stateNode,J=Q.childContextTypes;if(typeof Z.getChildContext!=="function"){{var b=N1(z)||"Unknown";if(!eG[b])eG[b]=!0,H("%s.childContextTypes is specified but there is no getChildContext() method on the instance. You can either define getChildContext() on %s or remove childContextTypes from it.",b,b)}return X}var $=Z.getChildContext();for(var U in $)if(!(U in J))throw Error((N1(z)||"Unknown")+'.getChildContext(): key "'+U+'" is not defined in childContextTypes.');{var q=N1(z)||"Unknown";u5(J,$,"child context",q)}return R1({},X,$)}}function EQ(z){{var Q=z.stateNode,X=Q&&Q.__reactInternalMemoizedMergedChildContext||B5;return Xb=f8.current,m4(f8,X,z),m4(Z8,Z8.current,z),!0}}function ZU(z,Q,X){{var Z=z.stateNode;if(!Z)throw Error("Expected to have an instance by this point. This error is likely caused by a bug in React. Please file an issue.");if(X){var J=XU(z,Q,Xb);Z.__reactInternalMemoizedMergedChildContext=J,D4(Z8,z),D4(f8,z),m4(f8,J,z),m4(Z8,X,z)}else D4(Z8,z),m4(Z8,X,z)}}function Aw(z){{if(!HL(z)||z.tag!==N)throw Error("Expected subtree parent to be a mounted class component. This error is likely caused by a bug in React. Please file an issue.");var Q=z;do{switch(Q.tag){case M:return Q.stateNode.context;case N:{var X=Q.type;if(J8(X))return Q.stateNode.__reactInternalMemoizedMergedChildContext;break}}Q=Q.return}while(Q!==null);throw Error("Found unexpected detached subtree parent. This error is likely caused by a bug in React. Please file an issue.")}}var b7=0,lQ=1,S8=null,Jb=!1,bb=!1;function JU(z){if(S8===null)S8=[z];else S8.push(z)}function Iw(z){Jb=!0,JU(z)}function bU(){if(Jb)Y7()}function Y7(){if(!bb&&S8!==null){bb=!0;var z=0,Q=m5();try{var X=!0,Z=S8;L4(G5);for(;z<Z.length;z++){var J=Z[z];do J=J(X);while(J!==null)}S8=null,Jb=!1}catch(b){if(S8!==null)S8=S8.slice(z+1);throw TH(QQ,Y7),b}finally{L4(Q),bb=!1}}return null}var r3=[],n3=0,dQ=null,cQ=0,_5=[],w5=0,j7=null,C8=1,h8="";function Tw(z){return a7(),(z.flags&RH)!==Q1}function fw(z){return a7(),cQ}function Sw(){var z=h8,Q=C8,X=Q&~Cw(Q);return X.toString(32)+z}function o7(z,Q){a7(),r3[n3++]=cQ,r3[n3++]=dQ,dQ=z,cQ=Q}function YU(z,Q,X){a7(),_5[w5++]=C8,_5[w5++]=h8,_5[w5++]=j7,j7=z;var Z=C8,J=h8,b=xQ(Z)-1,$=Z&~(1<<b),U=X+1,q=xQ(Q)+b;if(q>30){var _=b-b%5,R=(1<<_)-1,D=($&R).toString(32),V=$>>_,n=b-_,t=xQ(Q)+n,s=U<<n,k0=s|V,o0=D+J;C8=1<<t|k0,h8=o0}else{var c0=U<<b,k1=c0|$,A1=J;C8=1<<q|k1,h8=A1}}function Yb(z){a7();var Q=z.return;if(Q!==null){var X=1,Z=0;o7(z,X),YU(z,X,Z)}}function xQ(z){return 32-VH(z)}function Cw(z){return 1<<xQ(z)-1}function $b(z){while(z===dQ)dQ=r3[--n3],r3[n3]=null,cQ=r3[--n3],r3[n3]=null;while(z===j7)j7=_5[--w5],_5[w5]=null,h8=_5[--w5],_5[w5]=null,C8=_5[--w5],_5[w5]=null}function hw(){if(a7(),j7!==null)return{id:C8,overflow:h8};else return null}function yw(z,Q){a7(),_5[w5++]=C8,_5[w5++]=h8,_5[w5++]=j7,C8=Q.id,h8=Q.overflow,j7=z}function a7(){if(!F4())H("Expected to be hydrating. This is a bug in React. Please file an issue.")}var P4=null,R5=null,g5=!1,r7=!1,$7=null;function Vw(){if(g5)H("We should not be hydrating here. This is a bug in React. Please file a bug.")}function $U(){r7=!0}function Dw(){return r7}function mw(z){var Q=z.stateNode.containerInfo;return R5=zw(Q),P4=z,g5=!0,$7=null,r7=!1,!0}function uw(z,Q,X){if(R5=Qw(Q),P4=z,g5=!0,$7=null,r7=!1,X!==null)yw(z,X);return!0}function HU(z,Q){switch(z.tag){case M:{qw(z.stateNode.containerInfo,Q);break}case w:{var X=(z.mode&y1)!==n0;Kw(z.type,z.memoizedProps,z.stateNode,Q,X);break}case x:{var Z=z.memoizedState;if(Z.dehydrated!==null)Bw(Z.dehydrated,Q);break}}}function GU(z,Q){HU(z,Q);var X=pF();X.stateNode=Q,X.return=z;var Z=z.deletions;if(Z===null)z.deletions=[X],z.flags|=h7;else Z.push(X)}function Hb(z,Q){{if(r7)return;switch(z.tag){case M:{var X=z.stateNode.containerInfo;switch(Q.tag){case w:var{type:Z,pendingProps:J}=Q;Ow(X,Z);break;case v:var b=Q.pendingProps;Lw(X,b);break}break}case w:{var{type:$,memoizedProps:U,stateNode:q}=z;switch(Q.tag){case w:{var{type:_,pendingProps:R}=Q,D=(z.mode&y1)!==n0;_w($,U,q,_,R,D);break}case v:{var V=Q.pendingProps,n=(z.mode&y1)!==n0;ww($,U,q,V,n);break}}break}case x:{var t=z.memoizedState,s=t.dehydrated;if(s!==null)switch(Q.tag){case w:var{type:k0,pendingProps:o0}=Q;Nw(s,k0);break;case v:var c0=Q.pendingProps;Ww(s,c0);break}break}default:return}}}function UU(z,Q){Q.flags=Q.flags&~F8|a6,Hb(z,Q)}function qU(z,Q){switch(z.tag){case w:{var{type:X,pendingProps:Z}=z,J=a_(Q,X);if(J!==null)return z.stateNode=J,P4=z,R5=e_(J),!0;return!1}case v:{var b=z.pendingProps,$=r_(Q,b);if($!==null)return z.stateNode=$,P4=z,R5=null,!0;return!1}case x:{var U=n_(Q);if(U!==null){var q={dehydrated:U,treeContext:hw(),retryLane:$5};z.memoizedState=q;var _=jF(U);return _.return=z,z.child=_,P4=z,R5=null,!0}return!1}default:return!1}}function Gb(z){return(z.mode&y1)!==n0&&(z.flags&p1)===Q1}function Ub(z){throw Error("Hydration failed because the initial UI does not match what was rendered on the server.")}function qb(z){if(!g5)return;var Q=R5;if(!Q){if(Gb(z))Hb(P4,z),Ub();UU(P4,z),g5=!1,P4=z;return}var X=Q;if(!qU(z,Q)){if(Gb(z))Hb(P4,z),Ub();Q=D9(X);var Z=P4;if(!Q||!qU(z,Q)){UU(P4,z),g5=!1,P4=z;return}GU(Z,X)}}function gw(z,Q,X){var Z=z.stateNode,J=!r7,b=Xw(Z,z.type,z.memoizedProps,Q,X,z,J);if(z.updateQueue=b,b!==null)return!0;return!1}function Ew(z){var{stateNode:Q,memoizedProps:X}=z,Z=Zw(Q,X,z);if(Z){var J=P4;if(J!==null)switch(J.tag){case M:{var b=J.stateNode.containerInfo,$=(J.mode&y1)!==n0;Gw(b,Q,X,$);break}case w:{var{type:U,memoizedProps:q,stateNode:_}=J,R=(J.mode&y1)!==n0;Uw(U,q,_,Q,X,R);break}}}return Z}function lw(z){var Q=z.memoizedState,X=Q!==null?Q.dehydrated:null;if(!X)throw Error("Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue.");Jw(X,z)}function dw(z){var Q=z.memoizedState,X=Q!==null?Q.dehydrated:null;if(!X)throw Error("Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue.");return bw(X)}function BU(z){var Q=z.return;while(Q!==null&&Q.tag!==w&&Q.tag!==M&&Q.tag!==x)Q=Q.return;P4=Q}function iQ(z){if(z!==P4)return!1;if(!g5)return BU(z),g5=!0,!1;if(z.tag!==M&&(z.tag!==w||Hw(z.type)&&!oJ(z.type,z.memoizedProps))){var Q=R5;if(Q)if(Gb(z))KU(z),Ub();else while(Q)GU(z,Q),Q=D9(Q)}if(BU(z),z.tag===x)R5=dw(z);else R5=P4?D9(z.stateNode):null;return!0}function cw(){return g5&&R5!==null}function KU(z){var Q=R5;while(Q)HU(z,Q),Q=D9(Q)}function t3(){P4=null,R5=null,g5=!1,r7=!1}function OU(){if($7!==null)HB($7),$7=null}function F4(){return g5}function Bb(z){if($7===null)$7=[z];else $7.push(z)}var xw=Y.ReactCurrentBatchConfig,iw=null;function pw(){return xw.transition}var E5={recordUnsafeLifecycleWarnings:function(z,Q){},flushPendingUnsafeLifecycleWarnings:function(){},recordLegacyContextWarning:function(z,Q){},flushLegacyContextWarning:function(){},discardPendingWarnings:function(){}};{var jw=function(z){var Q=null,X=z;while(X!==null){if(X.mode&g6)Q=X;X=X.return}return Q},n7=function(z){var Q=[];return z.forEach(function(X){Q.push(X)}),Q.sort().join(", ")},E9=[],l9=[],d9=[],c9=[],x9=[],i9=[],t7=new Set;E5.recordUnsafeLifecycleWarnings=function(z,Q){if(t7.has(z.type))return;if(typeof Q.componentWillMount==="function"&&Q.componentWillMount.__suppressDeprecationWarning!==!0)E9.push(z);if(z.mode&g6&&typeof Q.UNSAFE_componentWillMount==="function")l9.push(z);if(typeof Q.componentWillReceiveProps==="function"&&Q.componentWillReceiveProps.__suppressDeprecationWarning!==!0)d9.push(z);if(z.mode&g6&&typeof Q.UNSAFE_componentWillReceiveProps==="function")c9.push(z);if(typeof Q.componentWillUpdate==="function"&&Q.componentWillUpdate.__suppressDeprecationWarning!==!0)x9.push(z);if(z.mode&g6&&typeof Q.UNSAFE_componentWillUpdate==="function")i9.push(z)},E5.flushPendingUnsafeLifecycleWarnings=function(){var z=new Set;if(E9.length>0)E9.forEach(function(V){z.add(N1(V)||"Component"),t7.add(V.type)}),E9=[];var Q=new Set;if(l9.length>0)l9.forEach(function(V){Q.add(N1(V)||"Component"),t7.add(V.type)}),l9=[];var X=new Set;if(d9.length>0)d9.forEach(function(V){X.add(N1(V)||"Component"),t7.add(V.type)}),d9=[];var Z=new Set;if(c9.length>0)c9.forEach(function(V){Z.add(N1(V)||"Component"),t7.add(V.type)}),c9=[];var J=new Set;if(x9.length>0)x9.forEach(function(V){J.add(N1(V)||"Component"),t7.add(V.type)}),x9=[];var b=new Set;if(i9.length>0)i9.forEach(function(V){b.add(N1(V)||"Component"),t7.add(V.type)}),i9=[];if(Q.size>0){var $=n7(Q);H(`Using UNSAFE_componentWillMount in strict mode is not recommended and may indicate bugs in your code. See https://reactjs.org/link/unsafe-component-lifecycles for details.
33
-
34
- * Move code with side effects to componentDidMount, and set initial state in the constructor.
35
-
36
- Please update the following components: %s`,$)}if(Z.size>0){var U=n7(Z);H(`Using UNSAFE_componentWillReceiveProps in strict mode is not recommended and may indicate bugs in your code. See https://reactjs.org/link/unsafe-component-lifecycles for details.
37
-
38
- * Move data fetching code or side effects to componentDidUpdate.
39
- * If you're updating state whenever props change, refactor your code to use memoization techniques or move it to static getDerivedStateFromProps. Learn more at: https://reactjs.org/link/derived-state
40
-
41
- Please update the following components: %s`,U)}if(b.size>0){var q=n7(b);H(`Using UNSAFE_componentWillUpdate in strict mode is not recommended and may indicate bugs in your code. See https://reactjs.org/link/unsafe-component-lifecycles for details.
42
-
43
- * Move data fetching code or side effects to componentDidUpdate.
44
-
45
- Please update the following components: %s`,q)}if(z.size>0){var _=n7(z);O(`componentWillMount has been renamed, and is not recommended for use. See https://reactjs.org/link/unsafe-component-lifecycles for details.
46
-
47
- * Move code with side effects to componentDidMount, and set initial state in the constructor.
48
- * Rename componentWillMount to UNSAFE_componentWillMount to suppress this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run \`npx react-codemod rename-unsafe-lifecycles\` in your project source folder.
49
-
50
- Please update the following components: %s`,_)}if(X.size>0){var R=n7(X);O(`componentWillReceiveProps has been renamed, and is not recommended for use. See https://reactjs.org/link/unsafe-component-lifecycles for details.
51
-
52
- * Move data fetching code or side effects to componentDidUpdate.
53
- * If you're updating state whenever props change, refactor your code to use memoization techniques or move it to static getDerivedStateFromProps. Learn more at: https://reactjs.org/link/derived-state
54
- * Rename componentWillReceiveProps to UNSAFE_componentWillReceiveProps to suppress this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run \`npx react-codemod rename-unsafe-lifecycles\` in your project source folder.
55
-
56
- Please update the following components: %s`,R)}if(J.size>0){var D=n7(J);O(`componentWillUpdate has been renamed, and is not recommended for use. See https://reactjs.org/link/unsafe-component-lifecycles for details.
57
-
58
- * Move data fetching code or side effects to componentDidUpdate.
59
- * Rename componentWillUpdate to UNSAFE_componentWillUpdate to suppress this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run \`npx react-codemod rename-unsafe-lifecycles\` in your project source folder.
60
-
61
- Please update the following components: %s`,D)}};var pQ=new Map,LU=new Set;E5.recordLegacyContextWarning=function(z,Q){var X=jw(z);if(X===null){H("Expected to find a StrictMode component in a strict mode tree. This error is likely caused by a bug in React. Please file an issue.");return}if(LU.has(z.type))return;var Z=pQ.get(X);if(z.type.contextTypes!=null||z.type.childContextTypes!=null||Q!==null&&typeof Q.getChildContext==="function"){if(Z===void 0)Z=[],pQ.set(X,Z);Z.push(z)}},E5.flushLegacyContextWarning=function(){pQ.forEach(function(z,Q){if(z.length===0)return;var X=z[0],Z=new Set;z.forEach(function(b){Z.add(N1(b)||"Component"),LU.add(b.type)});var J=n7(Z);try{V6(X),H(`Legacy context API has been detected within a strict-mode tree.
62
-
63
- The old API will be supported in all 16.x releases, but applications using it should migrate to the new version.
64
-
65
- Please update the following components: %s
66
-
67
- Learn more about this warning here: https://reactjs.org/link/legacy-context`,J)}finally{q4()}})},E5.discardPendingWarnings=function(){E9=[],l9=[],d9=[],c9=[],x9=[],i9=[],pQ=new Map}}var Kb,Ob,Lb,Nb,Wb,NU=function(z,Q){};Kb=!1,Ob=!1,Lb={},Nb={},Wb={},NU=function(z,Q){if(z===null||typeof z!=="object")return;if(!z._store||z._store.validated||z.key!=null)return;if(typeof z._store!=="object")throw Error("React Component in warnForMissingKey should have a _store. This error is likely caused by a bug in React. Please file an issue.");z._store.validated=!0;var X=N1(Q)||"Component";if(Nb[X])return;Nb[X]=!0,H('Each child in a list should have a unique "key" prop. See https://reactjs.org/link/warning-keys for more information.')};function ow(z){return z.prototype&&z.prototype.isReactComponent}function p9(z,Q,X){var Z=X.ref;if(Z!==null&&typeof Z!=="function"&&typeof Z!=="object"){if((z.mode&g6||e)&&!(X._owner&&X._self&&X._owner.stateNode!==X._self)&&!(X._owner&&X._owner.tag!==N)&&!(typeof X.type==="function"&&!ow(X.type))&&X._owner){var J=N1(z)||"Component";if(!Lb[J])H('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. We recommend using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',J,Z),Lb[J]=!0}if(X._owner){var b=X._owner,$;if(b){var U=b;if(U.tag!==N)throw Error("Function components cannot have string refs. We recommend using useRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref");$=U.stateNode}if(!$)throw Error("Missing owner for string ref "+Z+". This error is likely caused by a bug in React. Please file an issue.");var q=$;F6(Z,"ref");var _=""+Z;if(Q!==null&&Q.ref!==null&&typeof Q.ref==="function"&&Q.ref._stringRef===_)return Q.ref;var R=function(D){var V=q.refs;if(D===null)delete V[_];else V[_]=D};return R._stringRef=_,R}else{if(typeof Z!=="string")throw Error("Expected ref to be a function, a string, an object returned by React.createRef(), or null.");if(!X._owner)throw Error("Element ref was specified as a string ("+Z+`) but no owner was set. This could happen for one of the following reasons:
68
- 1. You may be adding a ref to a function component
69
- 2. You may be adding a ref to a component that was not created inside a component's render method
70
- 3. You have multiple copies of React loaded
71
- See https://reactjs.org/link/refs-must-have-owner for more information.`)}}return Z}function jQ(z,Q){var X=Object.prototype.toString.call(Q);throw Error("Objects are not valid as a React child (found: "+(X==="[object Object]"?"object with keys {"+Object.keys(Q).join(", ")+"}":X)+"). If you meant to render a collection of children, use an array instead.")}function oQ(z){{var Q=N1(z)||"Component";if(Wb[Q])return;Wb[Q]=!0,H("Functions are not valid as a React child. This may happen if you return a Component instead of <Component /> from render. Or maybe you meant to call this function rather than return it.")}}function WU(z){var{_payload:Q,_init:X}=z;return X(Q)}function _U(z){function Q(i,Z0){if(!z)return;var p=i.deletions;if(p===null)i.deletions=[Z0],i.flags|=h7;else p.push(Z0)}function X(i,Z0){if(!z)return null;var p=Z0;while(p!==null)Q(i,p),p=p.sibling;return null}function Z(i,Z0){var p=new Map,O0=Z0;while(O0!==null){if(O0.key!==null)p.set(O0.key,O0);else p.set(O0.index,O0);O0=O0.sibling}return p}function J(i,Z0){var p=Y3(i,Z0);return p.index=0,p.sibling=null,p}function b(i,Z0,p){if(i.index=p,!z)return i.flags|=RH,Z0;var O0=i.alternate;if(O0!==null){var S0=O0.index;if(S0<Z0)return i.flags|=a6,Z0;else return S0}else return i.flags|=a6,Z0}function $(i){if(z&&i.alternate===null)i.flags|=a6;return i}function U(i,Z0,p,O0){if(Z0===null||Z0.tag!==v){var S0=O$(p,i.mode,O0);return S0.return=i,S0}else{var I0=J(Z0,p);return I0.return=i,I0}}function q(i,Z0,p,O0){var S0=p.type;if(S0===d1)return R(i,Z0,p.props.children,O0,p.key);if(Z0!==null){if(Z0.elementType===S0||vB(Z0,p)||typeof S0==="object"&&S0!==null&&S0.$$typeof===d0&&WU(S0)===Z0.type){var I0=J(Z0,p.props);return I0.ref=p9(i,Z0,p),I0.return=i,I0._debugSource=p._source,I0._debugOwner=p._owner,I0}}var Z1=K$(p,i.mode,O0);return Z1.ref=p9(i,Z0,p),Z1.return=i,Z1}function _(i,Z0,p,O0){if(Z0===null||Z0.tag!==F||Z0.stateNode.containerInfo!==p.containerInfo||Z0.stateNode.implementation!==p.implementation){var S0=L$(p,i.mode,O0);return S0.return=i,S0}else{var I0=J(Z0,p.children||[]);return I0.return=i,I0}}function R(i,Z0,p,O0,S0){if(Z0===null||Z0.tag!==S){var I0=_7(p,i.mode,O0,S0);return I0.return=i,I0}else{var Z1=J(Z0,p);return Z1.return=i,Z1}}function D(i,Z0,p){if(typeof Z0==="string"&&Z0!==""||typeof Z0==="number"){var O0=O$(""+Z0,i.mode,p);return O0.return=i,O0}if(typeof Z0==="object"&&Z0!==null){switch(Z0.$$typeof){case t1:{var S0=K$(Z0,i.mode,p);return S0.ref=p9(i,null,Z0),S0.return=i,S0}case H6:{var I0=L$(Z0,i.mode,p);return I0.return=i,I0}case d0:{var{_payload:Z1,_init:K1}=Z0;return D(i,K1(Z1),p)}}if(i1(Z0)||R6(Z0)){var X6=_7(Z0,i.mode,p,null);return X6.return=i,X6}jQ(i,Z0)}if(typeof Z0==="function")oQ(i);return null}function V(i,Z0,p,O0){var S0=Z0!==null?Z0.key:null;if(typeof p==="string"&&p!==""||typeof p==="number"){if(S0!==null)return null;return U(i,Z0,""+p,O0)}if(typeof p==="object"&&p!==null){switch(p.$$typeof){case t1:if(p.key===S0)return q(i,Z0,p,O0);else return null;case H6:if(p.key===S0)return _(i,Z0,p,O0);else return null;case d0:{var{_payload:I0,_init:Z1}=p;return V(i,Z0,Z1(I0),O0)}}if(i1(p)||R6(p)){if(S0!==null)return null;return R(i,Z0,p,O0,null)}jQ(i,p)}if(typeof p==="function")oQ(i);return null}function n(i,Z0,p,O0,S0){if(typeof O0==="string"&&O0!==""||typeof O0==="number"){var I0=i.get(p)||null;return U(Z0,I0,""+O0,S0)}if(typeof O0==="object"&&O0!==null){switch(O0.$$typeof){case t1:{var Z1=i.get(O0.key===null?p:O0.key)||null;return q(Z0,Z1,O0,S0)}case H6:{var K1=i.get(O0.key===null?p:O0.key)||null;return _(Z0,K1,O0,S0)}case d0:var{_payload:X6,_init:c1}=O0;return n(i,Z0,p,c1(X6),S0)}if(i1(O0)||R6(O0)){var i6=i.get(p)||null;return R(Z0,i6,O0,S0,null)}jQ(Z0,O0)}if(typeof O0==="function")oQ(Z0);return null}function t(i,Z0,p){{if(typeof i!=="object"||i===null)return Z0;switch(i.$$typeof){case t1:case H6:NU(i,p);var O0=i.key;if(typeof O0!=="string")break;if(Z0===null){Z0=new Set,Z0.add(O0);break}if(!Z0.has(O0)){Z0.add(O0);break}H("Encountered two children with the same key, `%s`. Keys should be unique so that components maintain their identity across updates. Non-unique keys may cause children to be "+"duplicated and/or omitted — the behavior is unsupported and "+"could change in a future version.",O0);break;case d0:var{_payload:S0,_init:I0}=i;t(I0(S0),Z0,p);break}}return Z0}function s(i,Z0,p,O0){{var S0=null;for(var I0=0;I0<p.length;I0++){var Z1=p[I0];S0=t(Z1,S0,i)}}var K1=null,X6=null,c1=Z0,i6=0,x1=0,E6=null;for(;c1!==null&&x1<p.length;x1++){if(c1.index>x1)E6=c1,c1=null;else E6=c1.sibling;var g4=V(i,c1,p[x1],O0);if(g4===null){if(c1===null)c1=E6;break}if(z){if(c1&&g4.alternate===null)Q(i,c1)}if(i6=b(g4,i6,x1),X6===null)K1=g4;else X6.sibling=g4;X6=g4,c1=E6}if(x1===p.length){if(X(i,c1),F4()){var f4=x1;o7(i,f4)}return K1}if(c1===null){for(;x1<p.length;x1++){var O5=D(i,p[x1],O0);if(O5===null)continue;if(i6=b(O5,i6,x1),X6===null)K1=O5;else X6.sibling=O5;X6=O5}if(F4()){var a4=x1;o7(i,a4)}return K1}var r4=Z(i,c1);for(;x1<p.length;x1++){var E4=n(r4,i,x1,p[x1],O0);if(E4!==null){if(z){if(E4.alternate!==null)r4.delete(E4.key===null?x1:E4.key)}if(i6=b(E4,i6,x1),X6===null)K1=E4;else X6.sibling=E4;X6=E4}}if(z)r4.forEach(function(N2){return Q(i,N2)});if(F4()){var E8=x1;o7(i,E8)}return K1}function k0(i,Z0,p,O0){var S0=R6(p);if(typeof S0!=="function")throw Error("An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.");{if(typeof Symbol==="function"&&p[Symbol.toStringTag]==="Generator"){if(!Ob)H("Using Generators as children is unsupported and will likely yield unexpected results because enumerating a generator mutates it. You may convert it to an array with `Array.from()` or the `[...spread]` operator before rendering. Keep in mind you might need to polyfill these features for older browsers.");Ob=!0}if(p.entries===S0){if(!Kb)H("Using Maps as children is not supported. Use an array of keyed ReactElements instead.");Kb=!0}var I0=S0.call(p);if(I0){var Z1=null,K1=I0.next();for(;!K1.done;K1=I0.next()){var X6=K1.value;Z1=t(X6,Z1,i)}}}var c1=S0.call(p);if(c1==null)throw Error("An iterable object provided no iterator.");var i6=null,x1=null,E6=Z0,g4=0,f4=0,O5=null,a4=c1.next();for(;E6!==null&&!a4.done;f4++,a4=c1.next()){if(E6.index>f4)O5=E6,E6=null;else O5=E6.sibling;var r4=V(i,E6,a4.value,O0);if(r4===null){if(E6===null)E6=O5;break}if(z){if(E6&&r4.alternate===null)Q(i,E6)}if(g4=b(r4,g4,f4),x1===null)i6=r4;else x1.sibling=r4;x1=r4,E6=O5}if(a4.done){if(X(i,E6),F4()){var E4=f4;o7(i,E4)}return i6}if(E6===null){for(;!a4.done;f4++,a4=c1.next()){var E8=D(i,a4.value,O0);if(E8===null)continue;if(g4=b(E8,g4,f4),x1===null)i6=E8;else x1.sibling=E8;x1=E8}if(F4()){var N2=f4;o7(i,N2)}return i6}var Mz=Z(i,E6);for(;!a4.done;f4++,a4=c1.next()){var B8=n(Mz,i,f4,a4.value,O0);if(B8!==null){if(z){if(B8.alternate!==null)Mz.delete(B8.key===null?f4:B8.key)}if(g4=b(B8,g4,f4),x1===null)i6=B8;else x1.sibling=B8;x1=B8}}if(z)Mz.forEach(function(MM){return Q(i,MM)});if(F4()){var FM=f4;o7(i,FM)}return i6}function o0(i,Z0,p,O0){if(Z0!==null&&Z0.tag===v){X(i,Z0.sibling);var S0=J(Z0,p);return S0.return=i,S0}X(i,Z0);var I0=O$(p,i.mode,O0);return I0.return=i,I0}function c0(i,Z0,p,O0){var S0=p.key,I0=Z0;while(I0!==null){if(I0.key===S0){var Z1=p.type;if(Z1===d1){if(I0.tag===S){X(i,I0.sibling);var K1=J(I0,p.props.children);return K1.return=i,K1._debugSource=p._source,K1._debugOwner=p._owner,K1}}else if(I0.elementType===Z1||vB(I0,p)||typeof Z1==="object"&&Z1!==null&&Z1.$$typeof===d0&&WU(Z1)===I0.type){X(i,I0.sibling);var X6=J(I0,p.props);return X6.ref=p9(i,I0,p),X6.return=i,X6._debugSource=p._source,X6._debugOwner=p._owner,X6}X(i,I0);break}else Q(i,I0);I0=I0.sibling}if(p.type===d1){var c1=_7(p.props.children,i.mode,O0,p.key);return c1.return=i,c1}else{var i6=K$(p,i.mode,O0);return i6.ref=p9(i,Z0,p),i6.return=i,i6}}function k1(i,Z0,p,O0){var S0=p.key,I0=Z0;while(I0!==null){if(I0.key===S0)if(I0.tag===F&&I0.stateNode.containerInfo===p.containerInfo&&I0.stateNode.implementation===p.implementation){X(i,I0.sibling);var Z1=J(I0,p.children||[]);return Z1.return=i,Z1}else{X(i,I0);break}else Q(i,I0);I0=I0.sibling}var K1=L$(p,i.mode,O0);return K1.return=i,K1}function A1(i,Z0,p,O0){var S0=typeof p==="object"&&p!==null&&p.type===d1&&p.key===null;if(S0)p=p.props.children;if(typeof p==="object"&&p!==null){switch(p.$$typeof){case t1:return $(c0(i,Z0,p,O0));case H6:return $(k1(i,Z0,p,O0));case d0:var{_payload:I0,_init:Z1}=p;return A1(i,Z0,Z1(I0),O0)}if(i1(p))return s(i,Z0,p,O0);if(R6(p))return k0(i,Z0,p,O0);jQ(i,p)}if(typeof p==="string"&&p!==""||typeof p==="number")return $(o0(i,Z0,""+p,O0));if(typeof p==="function")oQ(i);return X(i,Z0)}return A1}var s3=_U(!0),wU=_U(!1);function aw(z,Q){if(z!==null&&Q.child!==z.child)throw Error("Resuming work not yet implemented.");if(Q.child===null)return;var X=Q.child,Z=Y3(X,X.pendingProps);Q.child=Z,Z.return=Q;while(X.sibling!==null)X=X.sibling,Z=Z.sibling=Y3(X,X.pendingProps),Z.return=Q;Z.sibling=null}function rw(z,Q){var X=z.child;while(X!==null)lF(X,Q),X=X.sibling}var _b=J7(null),wb;wb={};var aQ=null,e3=null,Rb=null,rQ=!1;function nQ(){aQ=null,e3=null,Rb=null,rQ=!1}function RU(){rQ=!0}function PU(){rQ=!1}function FU(z,Q,X){{m4(_b,Q._currentValue,z),Q._currentValue=X;{if(Q._currentRenderer!==void 0&&Q._currentRenderer!==null&&Q._currentRenderer!==wb)H("Detected multiple renderers concurrently rendering the same context provider. This is currently unsupported.");Q._currentRenderer=wb}}}function Pb(z,Q){var X=_b.current;D4(_b,Q),z._currentValue=X}function Fb(z,Q,X){var Z=z;while(Z!==null){var J=Z.alternate;if(!u3(Z.childLanes,Q)){if(Z.childLanes=w1(Z.childLanes,Q),J!==null)J.childLanes=w1(J.childLanes,Q)}else if(J!==null&&!u3(J.childLanes,Q))J.childLanes=w1(J.childLanes,Q);if(Z===X)break;Z=Z.return}if(Z!==X)H("Expected to find the propagation root when scheduling context work. This error is likely caused by a bug in React. Please file an issue.")}function nw(z,Q,X){tw(z,Q,X)}function tw(z,Q,X){var Z=z.child;if(Z!==null)Z.return=z;while(Z!==null){var J=void 0,b=Z.dependencies;if(b!==null){J=Z.child;var $=b.firstContext;while($!==null){if($.context===Q){if(Z.tag===N){var U=G9(X),q=y8(P6,U);q.tag=sQ;var _=Z.updateQueue;if(_===null);else{var R=_.shared,D=R.pending;if(D===null)q.next=q;else q.next=D.next,D.next=q;R.pending=q}}Z.lanes=w1(Z.lanes,X);var V=Z.alternate;if(V!==null)V.lanes=w1(V.lanes,X);Fb(Z.return,X,z),b.lanes=w1(b.lanes,X);break}$=$.next}}else if(Z.tag===y)J=Z.type===z.type?null:Z.child;else if(Z.tag===l){var n=Z.return;if(n===null)throw Error("We just came from a parent so we must have had a parent. This is a bug in React.");n.lanes=w1(n.lanes,X);var t=n.alternate;if(t!==null)t.lanes=w1(t.lanes,X);Fb(n,X,z),J=Z.sibling}else J=Z.child;if(J!==null)J.return=Z;else{J=Z;while(J!==null){if(J===z){J=null;break}var s=J.sibling;if(s!==null){s.return=J.return,J=s;break}J=J.return}}Z=J}}function z2(z,Q){aQ=z,e3=null,Rb=null;var X=z.dependencies;if(X!==null){var Z=X.firstContext;if(Z!==null){if(H5(X.lanes,Q))Yz();X.firstContext=null}}}function r6(z){if(rQ)H("Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo().");var Q=z._currentValue;if(Rb===z);else{var X={context:z,memoizedValue:Q,next:null};if(e3===null){if(aQ===null)throw Error("Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo().");e3=X,aQ.dependencies={lanes:B0,firstContext:X}}else e3=e3.next=X}return Q}var s7=null;function Mb(z){if(s7===null)s7=[z];else s7.push(z)}function sw(){if(s7!==null){for(var z=0;z<s7.length;z++){var Q=s7[z],X=Q.interleaved;if(X!==null){Q.interleaved=null;var Z=X.next,J=Q.pending;if(J!==null){var b=J.next;J.next=Z,X.next=b}Q.pending=X}}s7=null}}function MU(z,Q,X,Z){var J=Q.interleaved;if(J===null)X.next=X,Mb(Q);else X.next=J.next,J.next=X;return Q.interleaved=X,tQ(z,Z)}function ew(z,Q,X,Z){var J=Q.interleaved;if(J===null)X.next=X,Mb(Q);else X.next=J.next,J.next=X;Q.interleaved=X}function zR(z,Q,X,Z){var J=Q.interleaved;if(J===null)X.next=X,Mb(Q);else X.next=J.next,J.next=X;return Q.interleaved=X,tQ(z,Z)}function z5(z,Q){return tQ(z,Q)}var QR=tQ;function tQ(z,Q){z.lanes=w1(z.lanes,Q);var X=z.alternate;if(X!==null)X.lanes=w1(X.lanes,Q);if(X===null&&(z.flags&(a6|F8))!==Q1)RB(z);var Z=z,J=z.return;while(J!==null){if(J.childLanes=w1(J.childLanes,Q),X=J.alternate,X!==null)X.childLanes=w1(X.childLanes,Q);else if((J.flags&(a6|F8))!==Q1)RB(z);Z=J,J=J.return}if(Z.tag===M){var b=Z.stateNode;return b}else return null}var vU=0,kU=1,sQ=2,vb=3,eQ=!1,kb,zX;kb=!1,zX=null;function Ab(z){var Q={baseState:z.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:B0},effects:null};z.updateQueue=Q}function AU(z,Q){var X=Q.updateQueue,Z=z.updateQueue;if(X===Z){var J={baseState:Z.baseState,firstBaseUpdate:Z.firstBaseUpdate,lastBaseUpdate:Z.lastBaseUpdate,shared:Z.shared,effects:Z.effects};Q.updateQueue=J}}function y8(z,Q){var X={eventTime:z,lane:Q,tag:vU,payload:null,callback:null,next:null};return X}function H7(z,Q,X){var Z=z.updateQueue;if(Z===null)return null;var J=Z.shared;if(zX===J&&!kb)H("An update (setState, replaceState, or forceUpdate) was scheduled from inside an update function. Update functions should be pure, with zero side-effects. Consider using componentDidUpdate or a callback."),kb=!0;if(ZF()){var b=J.pending;if(b===null)Q.next=Q;else Q.next=b.next,b.next=Q;return J.pending=Q,QR(z,X)}else return zR(z,J,Q,X)}function QX(z,Q,X){var Z=Q.updateQueue;if(Z===null)return;var J=Z.shared;if(gH(X)){var b=J.lanes;b=lH(b,z.pendingLanes);var $=w1(b,X);J.lanes=$,_J(z,$)}}function Ib(z,Q){var{updateQueue:X,alternate:Z}=z;if(Z!==null){var J=Z.updateQueue;if(X===J){var b=null,$=null,U=X.firstBaseUpdate;if(U!==null){var q=U;do{var _={eventTime:q.eventTime,lane:q.lane,tag:q.tag,payload:q.payload,callback:q.callback,next:null};if($===null)b=$=_;else $.next=_,$=_;q=q.next}while(q!==null);if($===null)b=$=Q;else $.next=Q,$=Q}else b=$=Q;X={baseState:J.baseState,firstBaseUpdate:b,lastBaseUpdate:$,shared:J.shared,effects:J.effects},z.updateQueue=X;return}}var R=X.lastBaseUpdate;if(R===null)X.firstBaseUpdate=Q;else R.next=Q;X.lastBaseUpdate=Q}function XR(z,Q,X,Z,J,b){switch(X.tag){case kU:{var $=X.payload;if(typeof $==="function"){RU();var U=$.call(b,Z,J);{if(z.mode&g6){K4(!0);try{$.call(b,Z,J)}finally{K4(!1)}}PU()}return U}return $}case vb:z.flags=z.flags&~i4|p1;case vU:{var q=X.payload,_;if(typeof q==="function"){RU(),_=q.call(b,Z,J);{if(z.mode&g6){K4(!0);try{q.call(b,Z,J)}finally{K4(!1)}}PU()}}else _=q;if(_===null||_===void 0)return Z;return R1({},Z,_)}case sQ:return eQ=!0,Z}return Z}function XX(z,Q,X,Z){var J=z.updateQueue;eQ=!1,zX=J.shared;var{firstBaseUpdate:b,lastBaseUpdate:$}=J,U=J.shared.pending;if(U!==null){J.shared.pending=null;var q=U,_=q.next;if(q.next=null,$===null)b=_;else $.next=_;$=q;var R=z.alternate;if(R!==null){var D=R.updateQueue,V=D.lastBaseUpdate;if(V!==$){if(V===null)D.firstBaseUpdate=_;else V.next=_;D.lastBaseUpdate=q}}}if(b!==null){var n=J.baseState,t=B0,s=null,k0=null,o0=null,c0=b;do{var{lane:k1,eventTime:A1}=c0;if(!u3(Z,k1)){var i={eventTime:A1,lane:k1,tag:c0.tag,payload:c0.payload,callback:c0.callback,next:null};if(o0===null)k0=o0=i,s=n;else o0=o0.next=i;t=w1(t,k1)}else{if(o0!==null){var Z0={eventTime:A1,lane:O4,tag:c0.tag,payload:c0.payload,callback:c0.callback,next:null};o0=o0.next=Z0}n=XR(z,J,c0,n,Q,X);var p=c0.callback;if(p!==null&&c0.lane!==O4){z.flags|=EZ;var O0=J.effects;if(O0===null)J.effects=[c0];else O0.push(c0)}}if(c0=c0.next,c0===null)if(U=J.shared.pending,U===null)break;else{var S0=U,I0=S0.next;S0.next=null,c0=I0,J.lastBaseUpdate=S0,J.shared.pending=null}}while(!0);if(o0===null)s=n;J.baseState=s,J.firstBaseUpdate=k0,J.lastBaseUpdate=o0;var Z1=J.shared.interleaved;if(Z1!==null){var K1=Z1;do t=w1(t,K1.lane),K1=K1.next;while(K1!==Z1)}else if(b===null)J.shared.lanes=B0;_z(t),z.lanes=t,z.memoizedState=n}zX=null}function ZR(z,Q){if(typeof z!=="function")throw Error("Invalid argument passed as callback. Expected a function. Instead "+("received: "+z));z.call(Q)}function IU(){eQ=!1}function ZX(){return eQ}function TU(z,Q,X){var Z=Q.effects;if(Q.effects=null,Z!==null)for(var J=0;J<Z.length;J++){var b=Z[J],$=b.callback;if($!==null)b.callback=null,ZR($,X)}}var j9={},G7=J7(j9),o9=J7(j9),JX=J7(j9);function bX(z){if(z===j9)throw Error("Expected host context to exist. This error is likely caused by a bug in React. Please file an issue.");return z}function fU(){var z=bX(JX.current);return z}function Tb(z,Q){m4(JX,Q,z),m4(o9,z,z),m4(G7,j9,z);var X=R_(Q);D4(G7,z),m4(G7,X,z)}function Q2(z){D4(G7,z),D4(o9,z),D4(JX,z)}function fb(){var z=bX(G7.current);return z}function SU(z){var Q=bX(JX.current),X=bX(G7.current),Z=P_(X,z.type);if(X===Z)return;m4(o9,z,z),m4(G7,Z,z)}function Sb(z){if(o9.current!==z)return;D4(G7,z),D4(o9,z)}var JR=0,CU=1,hU=1,a9=2,l5=J7(JR);function Cb(z,Q){return(z&Q)!==0}function X2(z){return z&CU}function hb(z,Q){return z&CU|Q}function bR(z,Q){return z|Q}function U7(z,Q){m4(l5,Q,z)}function Z2(z){D4(l5,z)}function YR(z,Q){var X=z.memoizedState;if(X!==null){if(X.dehydrated!==null)return!0;return!1}var Z=z.memoizedProps;return!0}function YX(z){var Q=z;while(Q!==null){if(Q.tag===x){var X=Q.memoizedState;if(X!==null){var Z=X.dehydrated;if(Z===null||aG(Z)||tJ(Z))return Q}}else if(Q.tag===a&&Q.memoizedProps.revealOrder!==void 0){var J=(Q.flags&p1)!==Q1;if(J)return Q}else if(Q.child!==null){Q.child.return=Q,Q=Q.child;continue}if(Q===z)return null;while(Q.sibling===null){if(Q.return===null||Q.return===z)return null;Q=Q.return}Q.sibling.return=Q.return,Q=Q.sibling}return null}var Q5=0,s6=1,b8=2,e6=4,M4=8,yb=[];function Vb(){for(var z=0;z<yb.length;z++){var Q=yb[z];Q._workInProgressVersionPrimary=null}yb.length=0}function $R(z,Q){var X=Q._getVersion,Z=X(Q._source);if(z.mutableSourceEagerHydrationData==null)z.mutableSourceEagerHydrationData=[Q,Z];else z.mutableSourceEagerHydrationData.push(Q,Z)}var{ReactCurrentDispatcher:f0,ReactCurrentBatchConfig:r9}=Y,Db,J2;Db=new Set;var e7=B0,Q6=null,z4=null,Q4=null,$X=!1,n9=!1,t9=0,HR=0,GR=25,b0=null,P5=null,q7=-1,mb=!1;function a1(){{var z=b0;if(P5===null)P5=[z];else P5.push(z)}}function M0(){{var z=b0;if(P5!==null){if(q7++,P5[q7]!==z)UR(z)}}}function b2(z){if(z!==void 0&&z!==null&&!i1(z))H("%s received a final argument that is not an array (instead, received `%s`). When specified, the final argument must be an array.",b0,typeof z)}function UR(z){{var Q=N1(Q6);if(!Db.has(Q)){if(Db.add(Q),P5!==null){var X="",Z=30;for(var J=0;J<=q7;J++){var b=P5[J],$=J===q7?z:b,U=J+1+". "+b;while(U.length<Z)U+=" ";U+=$+`
72
- `,X+=U}H(`React has detected a change in the order of Hooks called by %s. This will lead to bugs and errors if not fixed. For more information, read the Rules of Hooks: https://reactjs.org/link/rules-of-hooks
73
-
74
- Previous render Next render
75
- ------------------------------------------------------
76
- %s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
77
- `,Q,X)}}}}function u4(){throw Error(`Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
78
- 1. You might have mismatching versions of React and the renderer (such as React DOM)
79
- 2. You might be breaking the Rules of Hooks
80
- 3. You might have more than one copy of React in the same app
81
- See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.`)}function ub(z,Q){if(mb)return!1;if(Q===null)return H("%s received a final argument during this render, but not during the previous render. Even though the final argument is optional, its type cannot change between renders.",b0),!1;if(z.length!==Q.length)H(`The final argument passed to %s changed size between renders. The order and size of this array must remain constant.
82
-
83
- Previous: %s
84
- Incoming: %s`,b0,"["+Q.join(", ")+"]","["+z.join(", ")+"]");for(var X=0;X<Q.length&&X<z.length;X++){if(q5(z[X],Q[X]))continue;return!1}return!0}function Y2(z,Q,X,Z,J,b){if(e7=b,Q6=Q,P5=z!==null?z._debugHookTypes:null,q7=-1,mb=z!==null&&z.type!==Q.type,Q.memoizedState=null,Q.updateQueue=null,Q.lanes=B0,z!==null&&z.memoizedState!==null)f0.current=zq;else if(P5!==null)f0.current=eU;else f0.current=sU;var $=X(Z,J);if(n9){var U=0;do{if(n9=!1,t9=0,U>=GR)throw Error("Too many re-renders. React limits the number of renders to prevent an infinite loop.");U+=1,mb=!1,z4=null,Q4=null,Q.updateQueue=null,q7=-1,f0.current=Qq,$=X(Z,J)}while(n9)}f0.current=FX,Q._debugHookTypes=P5;var q=z4!==null&&z4.next!==null;if(e7=B0,Q6=null,z4=null,Q4=null,b0=null,P5=null,q7=-1,z!==null&&(z.flags&v8)!==(Q.flags&v8)&&(z.mode&y1)!==n0)H("Internal React error: Expected static flag was missing. Please notify the React team.");if($X=!1,q)throw Error("Rendered fewer hooks than expected. This may be caused by an accidental early return statement.");return $}function $2(){var z=t9!==0;return t9=0,z}function yU(z,Q,X){if(Q.updateQueue=z.updateQueue,(Q.mode&Q8)!==n0)Q.flags&=~(zQ|M8|V5|g1);else Q.flags&=~(V5|g1);z.lanes=$Q(z.lanes,X)}function VU(){if(f0.current=FX,$X){var z=Q6.memoizedState;while(z!==null){var Q=z.queue;if(Q!==null)Q.pending=null;z=z.next}$X=!1}e7=B0,Q6=null,z4=null,Q4=null,P5=null,q7=-1,b0=null,oU=!1,n9=!1,t9=0}function Y8(){var z={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};if(Q4===null)Q6.memoizedState=Q4=z;else Q4=Q4.next=z;return Q4}function F5(){var z;if(z4===null){var Q=Q6.alternate;if(Q!==null)z=Q.memoizedState;else z=null}else z=z4.next;var X;if(Q4===null)X=Q6.memoizedState;else X=Q4.next;if(X!==null)Q4=X,X=Q4.next,z4=z;else{if(z===null)throw Error("Rendered more hooks than during the previous render.");z4=z;var Z={memoizedState:z4.memoizedState,baseState:z4.baseState,baseQueue:z4.baseQueue,queue:z4.queue,next:null};if(Q4===null)Q6.memoizedState=Q4=Z;else Q4=Q4.next=Z}return Q4}function DU(){return{lastEffect:null,stores:null}}function gb(z,Q){return typeof Q==="function"?Q(z):Q}function Eb(z,Q,X){var Z=Y8(),J;if(X!==void 0)J=X(Q);else J=Q;Z.memoizedState=Z.baseState=J;var b={pending:null,interleaved:null,lanes:B0,dispatch:null,lastRenderedReducer:z,lastRenderedState:J};Z.queue=b;var $=b.dispatch=KR.bind(null,Q6,b);return[Z.memoizedState,$]}function lb(z,Q,X){var Z=F5(),J=Z.queue;if(J===null)throw Error("Should have a queue. This is likely a bug in React. Please file an issue.");J.lastRenderedReducer=z;var b=z4,$=b.baseQueue,U=J.pending;if(U!==null){if($!==null){var q=$.next,_=U.next;$.next=_,U.next=q}if(b.baseQueue!==$)H("Internal error: Expected work-in-progress queue to be a clone. This is a bug in React.");b.baseQueue=$=U,J.pending=null}if($!==null){var R=$.next,D=b.baseState,V=null,n=null,t=null,s=R;do{var k0=s.lane;if(!u3(e7,k0)){var o0={lane:k0,action:s.action,hasEagerState:s.hasEagerState,eagerState:s.eagerState,next:null};if(t===null)n=t=o0,V=D;else t=t.next=o0;Q6.lanes=w1(Q6.lanes,k0),_z(k0)}else{if(t!==null){var c0={lane:O4,action:s.action,hasEagerState:s.hasEagerState,eagerState:s.eagerState,next:null};t=t.next=c0}if(s.hasEagerState)D=s.eagerState;else{var k1=s.action;D=z(D,k1)}}s=s.next}while(s!==null&&s!==R);if(t===null)V=D;else t.next=n;if(!q5(D,Z.memoizedState))Yz();Z.memoizedState=D,Z.baseState=V,Z.baseQueue=t,J.lastRenderedState=D}var A1=J.interleaved;if(A1!==null){var i=A1;do{var Z0=i.lane;Q6.lanes=w1(Q6.lanes,Z0),_z(Z0),i=i.next}while(i!==A1)}else if($===null)J.lanes=B0;var p=J.dispatch;return[Z.memoizedState,p]}function db(z,Q,X){var Z=F5(),J=Z.queue;if(J===null)throw Error("Should have a queue. This is likely a bug in React. Please file an issue.");J.lastRenderedReducer=z;var{dispatch:b,pending:$}=J,U=Z.memoizedState;if($!==null){J.pending=null;var q=$.next,_=q;do{var R=_.action;U=z(U,R),_=_.next}while(_!==q);if(!q5(U,Z.memoizedState))Yz();if(Z.memoizedState=U,Z.baseQueue===null)Z.baseState=U;J.lastRenderedState=U}return[U,b]}function cb(z,Q,X){return}function HX(z,Q,X){return}function xb(z,Q,X){var Z=Q6,J=Y8(),b,$=F4();if($){if(X===void 0)throw Error("Missing getServerSnapshot, which is required for server-rendered content. Will revert to client rendering.");if(b=X(),!J2){if(b!==X())H("The result of getServerSnapshot should be cached to avoid an infinite loop"),J2=!0}}else{if(b=Q(),!J2){var U=Q();if(!q5(b,U))H("The result of getSnapshot should be cached to avoid an infinite loop"),J2=!0}var q=dX();if(q===null)throw Error("Expected a work-in-progress root. This is a bug in React. Please file an issue.");if(!YQ(q,e7))mU(Z,Q,b)}J.memoizedState=b;var _={value:b,getSnapshot:Q};return J.queue=_,KX(gU.bind(null,Z,_,z),[z]),Z.flags|=V5,s9(s6|M4,uU.bind(null,Z,_,b,Q),void 0,null),b}function GX(z,Q,X){var Z=Q6,J=F5(),b=Q();if(!J2){var $=Q();if(!q5(b,$))H("The result of getSnapshot should be cached to avoid an infinite loop"),J2=!0}var U=J.memoizedState,q=!q5(U,b);if(q)J.memoizedState=b,Yz();var _=J.queue;if(zz(gU.bind(null,Z,_,z),[z]),_.getSnapshot!==Q||q||Q4!==null&&Q4.memoizedState.tag&s6){Z.flags|=V5,s9(s6|M4,uU.bind(null,Z,_,b,Q),void 0,null);var R=dX();if(R===null)throw Error("Expected a work-in-progress root. This is a bug in React. Please file an issue.");if(!YQ(R,e7))mU(Z,Q,b)}return b}function mU(z,Q,X){z.flags|=ez;var Z={getSnapshot:Q,value:X},J=Q6.updateQueue;if(J===null)J=DU(),Q6.updateQueue=J,J.stores=[Z];else{var b=J.stores;if(b===null)J.stores=[Z];else b.push(Z)}}function uU(z,Q,X,Z){if(Q.value=X,Q.getSnapshot=Z,EU(Q))lU(z)}function gU(z,Q,X){var Z=function(){if(EU(Q))lU(z)};return X(Z)}function EU(z){var{getSnapshot:Q,value:X}=z;try{var Z=Q();return!q5(X,Z)}catch(J){return!0}}function lU(z){var Q=z5(z,G1);if(Q!==null)b4(Q,z,G1,P6)}function UX(z){var Q=Y8();if(typeof z==="function")z=z();Q.memoizedState=Q.baseState=z;var X={pending:null,interleaved:null,lanes:B0,dispatch:null,lastRenderedReducer:gb,lastRenderedState:z};Q.queue=X;var Z=X.dispatch=OR.bind(null,Q6,X);return[Q.memoizedState,Z]}function ib(z){return lb(gb)}function pb(z){return db(gb)}function s9(z,Q,X,Z){var J={tag:z,create:Q,destroy:X,deps:Z,next:null},b=Q6.updateQueue;if(b===null)b=DU(),Q6.updateQueue=b,b.lastEffect=J.next=J;else{var $=b.lastEffect;if($===null)b.lastEffect=J.next=J;else{var U=$.next;$.next=J,J.next=U,b.lastEffect=J}}return J}function jb(z){var Q=Y8();{var X={current:z};return Q.memoizedState=X,X}}function qX(z){var Q=F5();return Q.memoizedState}function e9(z,Q,X,Z){var J=Y8(),b=Z===void 0?null:Z;Q6.flags|=z,J.memoizedState=s9(s6|Q,X,void 0,b)}function BX(z,Q,X,Z){var J=F5(),b=Z===void 0?null:Z,$=void 0;if(z4!==null){var U=z4.memoizedState;if($=U.destroy,b!==null){var q=U.deps;if(ub(b,q)){J.memoizedState=s9(Q,X,$,b);return}}}Q6.flags|=z,J.memoizedState=s9(s6|Q,X,$,b)}function KX(z,Q){if((Q6.mode&Q8)!==n0)return e9(zQ|V5|cZ,M4,z,Q);else return e9(V5|cZ,M4,z,Q)}function zz(z,Q){return BX(V5,M4,z,Q)}function ob(z,Q){return e9(g1,b8,z,Q)}function OX(z,Q){return BX(g1,b8,z,Q)}function ab(z,Q){var X=g1;if(X|=D7,(Q6.mode&Q8)!==n0)X|=M8;return e9(X,e6,z,Q)}function LX(z,Q){return BX(g1,e6,z,Q)}function dU(z,Q){if(typeof Q==="function"){var X=Q,Z=z();return X(Z),function(){X(null)}}else if(Q!==null&&Q!==void 0){var J=Q;if(!J.hasOwnProperty("current"))H("Expected useImperativeHandle() first argument to either be a ref callback or React.createRef() object. Instead received: %s.","an object with keys {"+Object.keys(J).join(", ")+"}");var b=z();return J.current=b,function(){J.current=null}}}function rb(z,Q,X){if(typeof Q!=="function")H("Expected useImperativeHandle() second argument to be a function that creates a handle. Instead received: %s.",Q!==null?typeof Q:"null");var Z=X!==null&&X!==void 0?X.concat([z]):null,J=g1;if(J|=D7,(Q6.mode&Q8)!==n0)J|=M8;return e9(J,e6,dU.bind(null,Q,z),Z)}function NX(z,Q,X){if(typeof Q!=="function")H("Expected useImperativeHandle() second argument to be a function that creates a handle. Instead received: %s.",Q!==null?typeof Q:"null");var Z=X!==null&&X!==void 0?X.concat([z]):null;return BX(g1,e6,dU.bind(null,Q,z),Z)}function WX(z,Q){}var _X=WX;function nb(z,Q){var X=Y8(),Z=Q===void 0?null:Q;return X.memoizedState=[z,Z],z}function wX(z,Q){var X=F5(),Z=Q===void 0?null:Q,J=X.memoizedState;if(J!==null){if(Z!==null){var b=J[1];if(ub(Z,b))return J[0]}}return X.memoizedState=[z,Z],z}function tb(z,Q){var X=Y8(),Z=Q===void 0?null:Q,J=z();return X.memoizedState=[J,Z],J}function RX(z,Q){var X=F5(),Z=Q===void 0?null:Q,J=X.memoizedState;if(J!==null){if(Z!==null){var b=J[1];if(ub(Z,b))return J[0]}}var $=z();return X.memoizedState=[$,Z],$}function sb(z){var Q=Y8();return Q.memoizedState=z,z}function cU(z){var Q=F5(),X=z4,Z=X.memoizedState;return iU(Q,Z,z)}function xU(z){var Q=F5();if(z4===null)return Q.memoizedState=z,z;else{var X=z4.memoizedState;return iU(Q,X,z)}}function iU(z,Q,X){var Z=!nL(e7);if(Z){if(!q5(X,Q)){var J=EH();Q6.lanes=w1(Q6.lanes,J),_z(J),z.baseState=!0}return Q}else{if(z.baseState)z.baseState=!1,Yz();return z.memoizedState=X,X}}function qR(z,Q,X){var Z=m5();L4(bN(Z,A8)),z(!0);var J=r9.transition;r9.transition={};var b=r9.transition;r9.transition._updatedFibers=new Set;try{z(!1),Q()}finally{if(L4(Z),r9.transition=J,J===null&&b._updatedFibers){var $=b._updatedFibers.size;if($>10)O("Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table.");b._updatedFibers.clear()}}}function eb(){var z=UX(!1),Q=z[0],X=z[1],Z=qR.bind(null,X),J=Y8();return J.memoizedState=Z,[Q,Z]}function pU(){var z=ib(),Q=z[0],X=F5(),Z=X.memoizedState;return[Q,Z]}function jU(){var z=pb(),Q=z[0],X=F5(),Z=X.memoizedState;return[Q,Z]}var oU=!1;function BR(){return oU}function zY(){var z=Y8(),Q=dX(),X=Q.identifierPrefix,Z;if(F4()){var J=Sw();Z=":"+X+"R"+J;var b=t9++;if(b>0)Z+="H"+b.toString(32);Z+=":"}else{var $=HR++;Z=":"+X+"r"+$.toString(32)+":"}return z.memoizedState=Z,Z}function PX(){var z=F5(),Q=z.memoizedState;return Q}function KR(z,Q,X){if(typeof arguments[3]==="function")H("State updates from the useState() and useReducer() Hooks don't support the second callback argument. To execute a side effect after rendering, declare it in the component body with useEffect().");var Z=N7(z),J={lane:Z,action:X,hasEagerState:!1,eagerState:null,next:null};if(aU(z))rU(Q,J);else{var b=MU(z,Q,J,Z);if(b!==null){var $=o4();b4(b,z,Z,$),nU(b,Q,Z)}}tU(z,Z)}function OR(z,Q,X){if(typeof arguments[3]==="function")H("State updates from the useState() and useReducer() Hooks don't support the second callback argument. To execute a side effect after rendering, declare it in the component body with useEffect().");var Z=N7(z),J={lane:Z,action:X,hasEagerState:!1,eagerState:null,next:null};if(aU(z))rU(Q,J);else{var b=z.alternate;if(z.lanes===B0&&(b===null||b.lanes===B0)){var $=Q.lastRenderedReducer;if($!==null){var U;U=f0.current,f0.current=d5;try{var q=Q.lastRenderedState,_=$(q,X);if(J.hasEagerState=!0,J.eagerState=_,q5(_,q)){ew(z,Q,J,Z);return}}catch(V){}finally{f0.current=U}}}var R=MU(z,Q,J,Z);if(R!==null){var D=o4();b4(R,z,Z,D),nU(R,Q,Z)}}tU(z,Z)}function aU(z){var Q=z.alternate;return z===Q6||Q!==null&&Q===Q6}function rU(z,Q){n9=$X=!0;var X=z.pending;if(X===null)Q.next=Q;else Q.next=X.next,X.next=Q;z.pending=Q}function nU(z,Q,X){if(gH(X)){var Z=Q.lanes;Z=lH(Z,z.pendingLanes);var J=w1(Z,X);Q.lanes=J,_J(z,J)}}function tU(z,Q,X){oZ(z,Q)}var FX={readContext:r6,useCallback:u4,useContext:u4,useEffect:u4,useImperativeHandle:u4,useInsertionEffect:u4,useLayoutEffect:u4,useMemo:u4,useReducer:u4,useRef:u4,useState:u4,useDebugValue:u4,useDeferredValue:u4,useTransition:u4,useMutableSource:u4,useSyncExternalStore:u4,useId:u4,unstable_isNewReconciler:s0},sU=null,eU=null,zq=null,Qq=null,$8=null,d5=null,MX=null;{var QY=function(){H("Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo().")},U1=function(){H("Do not call Hooks inside useEffect(...), useMemo(...), or other built-in Hooks. You can only call Hooks at the top level of your React function. For more information, see https://reactjs.org/link/rules-of-hooks")};sU={readContext:function(z){return r6(z)},useCallback:function(z,Q){return b0="useCallback",a1(),b2(Q),nb(z,Q)},useContext:function(z){return b0="useContext",a1(),r6(z)},useEffect:function(z,Q){return b0="useEffect",a1(),b2(Q),KX(z,Q)},useImperativeHandle:function(z,Q,X){return b0="useImperativeHandle",a1(),b2(X),rb(z,Q,X)},useInsertionEffect:function(z,Q){return b0="useInsertionEffect",a1(),b2(Q),ob(z,Q)},useLayoutEffect:function(z,Q){return b0="useLayoutEffect",a1(),b2(Q),ab(z,Q)},useMemo:function(z,Q){b0="useMemo",a1(),b2(Q);var X=f0.current;f0.current=$8;try{return tb(z,Q)}finally{f0.current=X}},useReducer:function(z,Q,X){b0="useReducer",a1();var Z=f0.current;f0.current=$8;try{return Eb(z,Q,X)}finally{f0.current=Z}},useRef:function(z){return b0="useRef",a1(),jb(z)},useState:function(z){b0="useState",a1();var Q=f0.current;f0.current=$8;try{return UX(z)}finally{f0.current=Q}},useDebugValue:function(z,Q){return b0="useDebugValue",a1(),WX()},useDeferredValue:function(z){return b0="useDeferredValue",a1(),sb(z)},useTransition:function(){return b0="useTransition",a1(),eb()},useMutableSource:function(z,Q,X){return b0="useMutableSource",a1(),cb()},useSyncExternalStore:function(z,Q,X){return b0="useSyncExternalStore",a1(),xb(z,Q,X)},useId:function(){return b0="useId",a1(),zY()},unstable_isNewReconciler:s0},eU={readContext:function(z){return r6(z)},useCallback:function(z,Q){return b0="useCallback",M0(),nb(z,Q)},useContext:function(z){return b0="useContext",M0(),r6(z)},useEffect:function(z,Q){return b0="useEffect",M0(),KX(z,Q)},useImperativeHandle:function(z,Q,X){return b0="useImperativeHandle",M0(),rb(z,Q,X)},useInsertionEffect:function(z,Q){return b0="useInsertionEffect",M0(),ob(z,Q)},useLayoutEffect:function(z,Q){return b0="useLayoutEffect",M0(),ab(z,Q)},useMemo:function(z,Q){b0="useMemo",M0();var X=f0.current;f0.current=$8;try{return tb(z,Q)}finally{f0.current=X}},useReducer:function(z,Q,X){b0="useReducer",M0();var Z=f0.current;f0.current=$8;try{return Eb(z,Q,X)}finally{f0.current=Z}},useRef:function(z){return b0="useRef",M0(),jb(z)},useState:function(z){b0="useState",M0();var Q=f0.current;f0.current=$8;try{return UX(z)}finally{f0.current=Q}},useDebugValue:function(z,Q){return b0="useDebugValue",M0(),WX()},useDeferredValue:function(z){return b0="useDeferredValue",M0(),sb(z)},useTransition:function(){return b0="useTransition",M0(),eb()},useMutableSource:function(z,Q,X){return b0="useMutableSource",M0(),cb()},useSyncExternalStore:function(z,Q,X){return b0="useSyncExternalStore",M0(),xb(z,Q,X)},useId:function(){return b0="useId",M0(),zY()},unstable_isNewReconciler:s0},zq={readContext:function(z){return r6(z)},useCallback:function(z,Q){return b0="useCallback",M0(),wX(z,Q)},useContext:function(z){return b0="useContext",M0(),r6(z)},useEffect:function(z,Q){return b0="useEffect",M0(),zz(z,Q)},useImperativeHandle:function(z,Q,X){return b0="useImperativeHandle",M0(),NX(z,Q,X)},useInsertionEffect:function(z,Q){return b0="useInsertionEffect",M0(),OX(z,Q)},useLayoutEffect:function(z,Q){return b0="useLayoutEffect",M0(),LX(z,Q)},useMemo:function(z,Q){b0="useMemo",M0();var X=f0.current;f0.current=d5;try{return RX(z,Q)}finally{f0.current=X}},useReducer:function(z,Q,X){b0="useReducer",M0();var Z=f0.current;f0.current=d5;try{return lb(z,Q,X)}finally{f0.current=Z}},useRef:function(z){return b0="useRef",M0(),qX()},useState:function(z){b0="useState",M0();var Q=f0.current;f0.current=d5;try{return ib(z)}finally{f0.current=Q}},useDebugValue:function(z,Q){return b0="useDebugValue",M0(),_X()},useDeferredValue:function(z){return b0="useDeferredValue",M0(),cU(z)},useTransition:function(){return b0="useTransition",M0(),pU()},useMutableSource:function(z,Q,X){return b0="useMutableSource",M0(),HX()},useSyncExternalStore:function(z,Q,X){return b0="useSyncExternalStore",M0(),GX(z,Q)},useId:function(){return b0="useId",M0(),PX()},unstable_isNewReconciler:s0},Qq={readContext:function(z){return r6(z)},useCallback:function(z,Q){return b0="useCallback",M0(),wX(z,Q)},useContext:function(z){return b0="useContext",M0(),r6(z)},useEffect:function(z,Q){return b0="useEffect",M0(),zz(z,Q)},useImperativeHandle:function(z,Q,X){return b0="useImperativeHandle",M0(),NX(z,Q,X)},useInsertionEffect:function(z,Q){return b0="useInsertionEffect",M0(),OX(z,Q)},useLayoutEffect:function(z,Q){return b0="useLayoutEffect",M0(),LX(z,Q)},useMemo:function(z,Q){b0="useMemo",M0();var X=f0.current;f0.current=MX;try{return RX(z,Q)}finally{f0.current=X}},useReducer:function(z,Q,X){b0="useReducer",M0();var Z=f0.current;f0.current=MX;try{return db(z,Q,X)}finally{f0.current=Z}},useRef:function(z){return b0="useRef",M0(),qX()},useState:function(z){b0="useState",M0();var Q=f0.current;f0.current=MX;try{return pb(z)}finally{f0.current=Q}},useDebugValue:function(z,Q){return b0="useDebugValue",M0(),_X()},useDeferredValue:function(z){return b0="useDeferredValue",M0(),xU(z)},useTransition:function(){return b0="useTransition",M0(),jU()},useMutableSource:function(z,Q,X){return b0="useMutableSource",M0(),HX()},useSyncExternalStore:function(z,Q,X){return b0="useSyncExternalStore",M0(),GX(z,Q)},useId:function(){return b0="useId",M0(),PX()},unstable_isNewReconciler:s0},$8={readContext:function(z){return QY(),r6(z)},useCallback:function(z,Q){return b0="useCallback",U1(),a1(),nb(z,Q)},useContext:function(z){return b0="useContext",U1(),a1(),r6(z)},useEffect:function(z,Q){return b0="useEffect",U1(),a1(),KX(z,Q)},useImperativeHandle:function(z,Q,X){return b0="useImperativeHandle",U1(),a1(),rb(z,Q,X)},useInsertionEffect:function(z,Q){return b0="useInsertionEffect",U1(),a1(),ob(z,Q)},useLayoutEffect:function(z,Q){return b0="useLayoutEffect",U1(),a1(),ab(z,Q)},useMemo:function(z,Q){b0="useMemo",U1(),a1();var X=f0.current;f0.current=$8;try{return tb(z,Q)}finally{f0.current=X}},useReducer:function(z,Q,X){b0="useReducer",U1(),a1();var Z=f0.current;f0.current=$8;try{return Eb(z,Q,X)}finally{f0.current=Z}},useRef:function(z){return b0="useRef",U1(),a1(),jb(z)},useState:function(z){b0="useState",U1(),a1();var Q=f0.current;f0.current=$8;try{return UX(z)}finally{f0.current=Q}},useDebugValue:function(z,Q){return b0="useDebugValue",U1(),a1(),WX()},useDeferredValue:function(z){return b0="useDeferredValue",U1(),a1(),sb(z)},useTransition:function(){return b0="useTransition",U1(),a1(),eb()},useMutableSource:function(z,Q,X){return b0="useMutableSource",U1(),a1(),cb()},useSyncExternalStore:function(z,Q,X){return b0="useSyncExternalStore",U1(),a1(),xb(z,Q,X)},useId:function(){return b0="useId",U1(),a1(),zY()},unstable_isNewReconciler:s0},d5={readContext:function(z){return QY(),r6(z)},useCallback:function(z,Q){return b0="useCallback",U1(),M0(),wX(z,Q)},useContext:function(z){return b0="useContext",U1(),M0(),r6(z)},useEffect:function(z,Q){return b0="useEffect",U1(),M0(),zz(z,Q)},useImperativeHandle:function(z,Q,X){return b0="useImperativeHandle",U1(),M0(),NX(z,Q,X)},useInsertionEffect:function(z,Q){return b0="useInsertionEffect",U1(),M0(),OX(z,Q)},useLayoutEffect:function(z,Q){return b0="useLayoutEffect",U1(),M0(),LX(z,Q)},useMemo:function(z,Q){b0="useMemo",U1(),M0();var X=f0.current;f0.current=d5;try{return RX(z,Q)}finally{f0.current=X}},useReducer:function(z,Q,X){b0="useReducer",U1(),M0();var Z=f0.current;f0.current=d5;try{return lb(z,Q,X)}finally{f0.current=Z}},useRef:function(z){return b0="useRef",U1(),M0(),qX()},useState:function(z){b0="useState",U1(),M0();var Q=f0.current;f0.current=d5;try{return ib(z)}finally{f0.current=Q}},useDebugValue:function(z,Q){return b0="useDebugValue",U1(),M0(),_X()},useDeferredValue:function(z){return b0="useDeferredValue",U1(),M0(),cU(z)},useTransition:function(){return b0="useTransition",U1(),M0(),pU()},useMutableSource:function(z,Q,X){return b0="useMutableSource",U1(),M0(),HX()},useSyncExternalStore:function(z,Q,X){return b0="useSyncExternalStore",U1(),M0(),GX(z,Q)},useId:function(){return b0="useId",U1(),M0(),PX()},unstable_isNewReconciler:s0},MX={readContext:function(z){return QY(),r6(z)},useCallback:function(z,Q){return b0="useCallback",U1(),M0(),wX(z,Q)},useContext:function(z){return b0="useContext",U1(),M0(),r6(z)},useEffect:function(z,Q){return b0="useEffect",U1(),M0(),zz(z,Q)},useImperativeHandle:function(z,Q,X){return b0="useImperativeHandle",U1(),M0(),NX(z,Q,X)},useInsertionEffect:function(z,Q){return b0="useInsertionEffect",U1(),M0(),OX(z,Q)},useLayoutEffect:function(z,Q){return b0="useLayoutEffect",U1(),M0(),LX(z,Q)},useMemo:function(z,Q){b0="useMemo",U1(),M0();var X=f0.current;f0.current=d5;try{return RX(z,Q)}finally{f0.current=X}},useReducer:function(z,Q,X){b0="useReducer",U1(),M0();var Z=f0.current;f0.current=d5;try{return db(z,Q,X)}finally{f0.current=Z}},useRef:function(z){return b0="useRef",U1(),M0(),qX()},useState:function(z){b0="useState",U1(),M0();var Q=f0.current;f0.current=d5;try{return pb(z)}finally{f0.current=Q}},useDebugValue:function(z,Q){return b0="useDebugValue",U1(),M0(),_X()},useDeferredValue:function(z){return b0="useDeferredValue",U1(),M0(),xU(z)},useTransition:function(){return b0="useTransition",U1(),M0(),jU()},useMutableSource:function(z,Q,X){return b0="useMutableSource",U1(),M0(),HX()},useSyncExternalStore:function(z,Q,X){return b0="useSyncExternalStore",U1(),M0(),GX(z,Q)},useId:function(){return b0="useId",U1(),M0(),PX()},unstable_isNewReconciler:s0}}var B7=Z6.unstable_now,Xq=0,vX=-1,Qz=-1,kX=-1,XY=!1,AX=!1;function Zq(){return XY}function LR(){AX=!0}function NR(){XY=!1,AX=!1}function WR(){XY=AX,AX=!1}function Jq(){return Xq}function bq(){Xq=B7()}function ZY(z){if(Qz=B7(),z.actualStartTime<0)z.actualStartTime=B7()}function Yq(z){Qz=-1}function IX(z,Q){if(Qz>=0){var X=B7()-Qz;if(z.actualDuration+=X,Q)z.selfBaseDuration=X;Qz=-1}}function H8(z){if(vX>=0){var Q=B7()-vX;vX=-1;var X=z.return;while(X!==null){switch(X.tag){case M:var Z=X.stateNode;Z.effectDuration+=Q;return;case E:var J=X.stateNode;J.effectDuration+=Q;return}X=X.return}}}function JY(z){if(kX>=0){var Q=B7()-kX;kX=-1;var X=z.return;while(X!==null){switch(X.tag){case M:var Z=X.stateNode;if(Z!==null)Z.passiveEffectDuration+=Q;return;case E:var J=X.stateNode;if(J!==null)J.passiveEffectDuration+=Q;return}X=X.return}}}function G8(){vX=B7()}function bY(){kX=B7()}function YY(z){var Q=z.child;while(Q)z.actualDuration+=Q.actualDuration,Q=Q.sibling}function c5(z,Q){if(z&&z.defaultProps){var X=R1({},Q),Z=z.defaultProps;for(var J in Z)if(X[J]===void 0)X[J]=Z[J];return X}return Q}var $Y={},HY,GY,UY,qY,BY,$q,TX,KY,OY,LY,Xz;{HY=new Set,GY=new Set,UY=new Set,qY=new Set,KY=new Set,BY=new Set,OY=new Set,LY=new Set,Xz=new Set;var Hq=new Set;TX=function(z,Q){if(z===null||typeof z==="function")return;var X=Q+"_"+z;if(!Hq.has(X))Hq.add(X),H("%s(...): Expected the last optional `callback` argument to be a function. Instead received: %s.",Q,z)},$q=function(z,Q){if(Q===void 0){var X=l1(z)||"Component";if(!BY.has(X))BY.add(X),H("%s.getDerivedStateFromProps(): A valid state object (or null) must be returned. You have returned undefined.",X)}},Object.defineProperty($Y,"_processChildContext",{enumerable:!1,value:function(){throw Error("_processChildContext is not available in React 16+. This likely means you have multiple copies of React and are attempting to nest a React 15 tree inside a React 16 tree using unstable_renderSubtreeIntoContainer, which isn't supported. Try to make sure you have only one copy of React (and ideally, switch to ReactDOM.createPortal).")}}),Object.freeze($Y)}function NY(z,Q,X,Z){var J=z.memoizedState,b=X(Z,J);{if(z.mode&g6){K4(!0);try{b=X(Z,J)}finally{K4(!1)}}$q(Q,b)}var $=b===null||b===void 0?J:R1({},J,b);if(z.memoizedState=$,z.lanes===B0){var U=z.updateQueue;U.baseState=$}}var WY={isMounted:GL,enqueueSetState:function(z,Q,X){var Z=S3(z),J=o4(),b=N7(Z),$=y8(J,b);if($.payload=Q,X!==void 0&&X!==null)TX(X,"setState"),$.callback=X;var U=H7(Z,$,b);if(U!==null)b4(U,Z,b,J),QX(U,Z,b);oZ(Z,b)},enqueueReplaceState:function(z,Q,X){var Z=S3(z),J=o4(),b=N7(Z),$=y8(J,b);if($.tag=kU,$.payload=Q,X!==void 0&&X!==null)TX(X,"replaceState"),$.callback=X;var U=H7(Z,$,b);if(U!==null)b4(U,Z,b,J),QX(U,Z,b);oZ(Z,b)},enqueueForceUpdate:function(z,Q){var X=S3(z),Z=o4(),J=N7(X),b=y8(Z,J);if(b.tag=sQ,Q!==void 0&&Q!==null)TX(Q,"forceUpdate"),b.callback=Q;var $=H7(X,b,J);if($!==null)b4($,X,J,Z),QX($,X,J);lL(X,J)}};function Gq(z,Q,X,Z,J,b,$){var U=z.stateNode;if(typeof U.shouldComponentUpdate==="function"){var q=U.shouldComponentUpdate(Z,b,$);{if(z.mode&g6){K4(!0);try{q=U.shouldComponentUpdate(Z,b,$)}finally{K4(!1)}}if(q===void 0)H("%s.shouldComponentUpdate(): Returned undefined instead of a boolean value. Make sure to return true or false.",l1(Q)||"Component")}return q}if(Q.prototype&&Q.prototype.isPureReactComponent)return!v9(X,Z)||!v9(J,b);return!0}function _R(z,Q,X){var Z=z.stateNode;{var J=l1(Q)||"Component",b=Z.render;if(!b)if(Q.prototype&&typeof Q.prototype.render==="function")H("%s(...): No `render` method found on the returned component instance: did you accidentally return an object from the constructor?",J);else H("%s(...): No `render` method found on the returned component instance: you may have forgotten to define `render`.",J);if(Z.getInitialState&&!Z.getInitialState.isReactClassApproved&&!Z.state)H("getInitialState was defined on %s, a plain JavaScript class. This is only supported for classes created using React.createClass. Did you mean to define a state property instead?",J);if(Z.getDefaultProps&&!Z.getDefaultProps.isReactClassApproved)H("getDefaultProps was defined on %s, a plain JavaScript class. This is only supported for classes created using React.createClass. Use a static property to define defaultProps instead.",J);if(Z.propTypes)H("propTypes was defined as an instance property on %s. Use a static property to define propTypes instead.",J);if(Z.contextType)H("contextType was defined as an instance property on %s. Use a static property to define contextType instead.",J);{if(Q.childContextTypes&&!Xz.has(Q)&&(z.mode&g6)===n0)Xz.add(Q),H(`%s uses the legacy childContextTypes API which is no longer supported and will be removed in the next major release. Use React.createContext() instead
85
-
86
- .Learn more about this warning here: https://reactjs.org/link/legacy-context`,J);if(Q.contextTypes&&!Xz.has(Q)&&(z.mode&g6)===n0)Xz.add(Q),H(`%s uses the legacy contextTypes API which is no longer supported and will be removed in the next major release. Use React.createContext() with static contextType instead.
87
-
88
- Learn more about this warning here: https://reactjs.org/link/legacy-context`,J);if(Z.contextTypes)H("contextTypes was defined as an instance property on %s. Use a static property to define contextTypes instead.",J);if(Q.contextType&&Q.contextTypes&&!OY.has(Q))OY.add(Q),H("%s declares both contextTypes and contextType static properties. The legacy contextTypes property will be ignored.",J)}if(typeof Z.componentShouldUpdate==="function")H("%s has a method called componentShouldUpdate(). Did you mean shouldComponentUpdate()? The name is phrased as a question because the function is expected to return a value.",J);if(Q.prototype&&Q.prototype.isPureReactComponent&&typeof Z.shouldComponentUpdate<"u")H("%s has a method called shouldComponentUpdate(). shouldComponentUpdate should not be used when extending React.PureComponent. Please extend React.Component if shouldComponentUpdate is used.",l1(Q)||"A pure component");if(typeof Z.componentDidUnmount==="function")H("%s has a method called componentDidUnmount(). But there is no such lifecycle method. Did you mean componentWillUnmount()?",J);if(typeof Z.componentDidReceiveProps==="function")H("%s has a method called componentDidReceiveProps(). But there is no such lifecycle method. If you meant to update the state in response to changing props, use componentWillReceiveProps(). If you meant to fetch data or run side-effects or mutations after React has updated the UI, use componentDidUpdate().",J);if(typeof Z.componentWillRecieveProps==="function")H("%s has a method called componentWillRecieveProps(). Did you mean componentWillReceiveProps()?",J);if(typeof Z.UNSAFE_componentWillRecieveProps==="function")H("%s has a method called UNSAFE_componentWillRecieveProps(). Did you mean UNSAFE_componentWillReceiveProps()?",J);var $=Z.props!==X;if(Z.props!==void 0&&$)H("%s(...): When calling super() in `%s`, make sure to pass up the same props that your component's constructor was passed.",J,J);if(Z.defaultProps)H("Setting defaultProps as an instance property on %s is not supported and will be ignored. Instead, define defaultProps as a static property on %s.",J,J);if(typeof Z.getSnapshotBeforeUpdate==="function"&&typeof Z.componentDidUpdate!=="function"&&!UY.has(Q))UY.add(Q),H("%s: getSnapshotBeforeUpdate() should be used with componentDidUpdate(). This component defines getSnapshotBeforeUpdate() only.",l1(Q));if(typeof Z.getDerivedStateFromProps==="function")H("%s: getDerivedStateFromProps() is defined as an instance method and will be ignored. Instead, declare it as a static method.",J);if(typeof Z.getDerivedStateFromError==="function")H("%s: getDerivedStateFromError() is defined as an instance method and will be ignored. Instead, declare it as a static method.",J);if(typeof Q.getSnapshotBeforeUpdate==="function")H("%s: getSnapshotBeforeUpdate() is defined as a static method and will be ignored. Instead, declare it as an instance method.",J);var U=Z.state;if(U&&(typeof U!=="object"||i1(U)))H("%s.state: must be set to an object or null",J);if(typeof Z.getChildContext==="function"&&typeof Q.childContextTypes!=="object")H("%s.getChildContext(): childContextTypes must be defined in order to use getChildContext().",J)}}function Uq(z,Q){Q.updater=WY,z.stateNode=Q,JL(Q,z),Q._reactInternalInstance=$Y}function qq(z,Q,X){var Z=!1,J=B5,b=B5,$=Q.contextType;if("contextType"in Q){var U=$===null||$!==void 0&&$.$$typeof===P&&$._context===void 0;if(!U&&!LY.has(Q)){LY.add(Q);var q="";if($===void 0)q=" However, it is set to undefined. This can be caused by a typo or by mixing up named and default imports. This can also happen due to a circular dependency, so try moving the createContext() call to a separate file.";else if(typeof $!=="object")q=" However, it is set to a "+typeof $+".";else if($.$$typeof===G0)q=" Did you accidentally pass the Context.Provider instead?";else if($._context!==void 0)q=" Did you accidentally pass the Context.Consumer instead?";else q=" However, it is set to an object with keys {"+Object.keys($).join(", ")+"}.";H("%s defines an invalid contextType. contextType should point to the Context object returned by React.createContext().%s",l1(Q)||"Component",q)}}if(typeof $==="object"&&$!==null)b=r6($);else{J=o3(z,Q,!0);var _=Q.contextTypes;Z=_!==null&&_!==void 0,b=Z?a3(z,J):B5}var R=new Q(X,b);if(z.mode&g6){K4(!0);try{R=new Q(X,b)}finally{K4(!1)}}var D=z.memoizedState=R.state!==null&&R.state!==void 0?R.state:null;Uq(z,R);{if(typeof Q.getDerivedStateFromProps==="function"&&D===null){var V=l1(Q)||"Component";if(!GY.has(V))GY.add(V),H("`%s` uses `getDerivedStateFromProps` but its initial state is %s. This is not recommended. Instead, define the initial state by assigning an object to `this.state` in the constructor of `%s`. This ensures that `getDerivedStateFromProps` arguments have a consistent shape.",V,R.state===null?"null":"undefined",V)}if(typeof Q.getDerivedStateFromProps==="function"||typeof R.getSnapshotBeforeUpdate==="function"){var n=null,t=null,s=null;if(typeof R.componentWillMount==="function"&&R.componentWillMount.__suppressDeprecationWarning!==!0)n="componentWillMount";else if(typeof R.UNSAFE_componentWillMount==="function")n="UNSAFE_componentWillMount";if(typeof R.componentWillReceiveProps==="function"&&R.componentWillReceiveProps.__suppressDeprecationWarning!==!0)t="componentWillReceiveProps";else if(typeof R.UNSAFE_componentWillReceiveProps==="function")t="UNSAFE_componentWillReceiveProps";if(typeof R.componentWillUpdate==="function"&&R.componentWillUpdate.__suppressDeprecationWarning!==!0)s="componentWillUpdate";else if(typeof R.UNSAFE_componentWillUpdate==="function")s="UNSAFE_componentWillUpdate";if(n!==null||t!==null||s!==null){var k0=l1(Q)||"Component",o0=typeof Q.getDerivedStateFromProps==="function"?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";if(!qY.has(k0))qY.add(k0),H(`Unsafe legacy lifecycles will not be called for components using new component APIs.
89
-
90
- %s uses %s but also contains the following legacy lifecycles:%s%s%s
91
-
92
- The above lifecycles should be removed. Learn more about this warning here:
93
- https://reactjs.org/link/unsafe-component-lifecycles`,k0,o0,n!==null?`
94
- `+n:"",t!==null?`
95
- `+t:"",s!==null?`
96
- `+s:"")}}}if(Z)zU(z,J,b);return R}function wR(z,Q){var X=Q.state;if(typeof Q.componentWillMount==="function")Q.componentWillMount();if(typeof Q.UNSAFE_componentWillMount==="function")Q.UNSAFE_componentWillMount();if(X!==Q.state)H("%s.componentWillMount(): Assigning directly to this.state is deprecated (except inside a component's constructor). Use setState instead.",N1(z)||"Component"),WY.enqueueReplaceState(Q,Q.state,null)}function Bq(z,Q,X,Z){var J=Q.state;if(typeof Q.componentWillReceiveProps==="function")Q.componentWillReceiveProps(X,Z);if(typeof Q.UNSAFE_componentWillReceiveProps==="function")Q.UNSAFE_componentWillReceiveProps(X,Z);if(Q.state!==J){{var b=N1(z)||"Component";if(!HY.has(b))HY.add(b),H("%s.componentWillReceiveProps(): Assigning directly to this.state is deprecated (except inside a component's constructor). Use setState instead.",b)}WY.enqueueReplaceState(Q,Q.state,null)}}function _Y(z,Q,X,Z){_R(z,Q,X);var J=z.stateNode;J.props=X,J.state=z.memoizedState,J.refs={},Ab(z);var b=Q.contextType;if(typeof b==="object"&&b!==null)J.context=r6(b);else{var $=o3(z,Q,!0);J.context=a3(z,$)}{if(J.state===X){var U=l1(Q)||"Component";if(!KY.has(U))KY.add(U),H("%s: It is not recommended to assign props directly to state because updates to props won't be reflected in state. In most cases, it is better to use props directly.",U)}if(z.mode&g6)E5.recordLegacyContextWarning(z,J);E5.recordUnsafeLifecycleWarnings(z,J)}J.state=z.memoizedState;var q=Q.getDerivedStateFromProps;if(typeof q==="function")NY(z,Q,q,X),J.state=z.memoizedState;if(typeof Q.getDerivedStateFromProps!=="function"&&typeof J.getSnapshotBeforeUpdate!=="function"&&(typeof J.UNSAFE_componentWillMount==="function"||typeof J.componentWillMount==="function"))wR(z,J),XX(z,X,J,Z),J.state=z.memoizedState;if(typeof J.componentDidMount==="function"){var _=g1;if(_|=D7,(z.mode&Q8)!==n0)_|=M8;z.flags|=_}}function RR(z,Q,X,Z){var{stateNode:J,memoizedProps:b}=z;J.props=b;var $=J.context,U=Q.contextType,q=B5;if(typeof U==="object"&&U!==null)q=r6(U);else{var _=o3(z,Q,!0);q=a3(z,_)}var R=Q.getDerivedStateFromProps,D=typeof R==="function"||typeof J.getSnapshotBeforeUpdate==="function";if(!D&&(typeof J.UNSAFE_componentWillReceiveProps==="function"||typeof J.componentWillReceiveProps==="function")){if(b!==X||$!==q)Bq(z,J,X,q)}IU();var V=z.memoizedState,n=J.state=V;if(XX(z,X,J,Z),n=z.memoizedState,b===X&&V===n&&!uQ()&&!ZX()){if(typeof J.componentDidMount==="function"){var t=g1;if(t|=D7,(z.mode&Q8)!==n0)t|=M8;z.flags|=t}return!1}if(typeof R==="function")NY(z,Q,R,X),n=z.memoizedState;var s=ZX()||Gq(z,Q,b,X,V,n,q);if(s){if(!D&&(typeof J.UNSAFE_componentWillMount==="function"||typeof J.componentWillMount==="function")){if(typeof J.componentWillMount==="function")J.componentWillMount();if(typeof J.UNSAFE_componentWillMount==="function")J.UNSAFE_componentWillMount()}if(typeof J.componentDidMount==="function"){var k0=g1;if(k0|=D7,(z.mode&Q8)!==n0)k0|=M8;z.flags|=k0}}else{if(typeof J.componentDidMount==="function"){var o0=g1;if(o0|=D7,(z.mode&Q8)!==n0)o0|=M8;z.flags|=o0}z.memoizedProps=X,z.memoizedState=n}return J.props=X,J.state=n,J.context=q,s}function PR(z,Q,X,Z,J){var b=Q.stateNode;AU(z,Q);var $=Q.memoizedProps,U=Q.type===Q.elementType?$:c5(Q.type,$);b.props=U;var q=Q.pendingProps,_=b.context,R=X.contextType,D=B5;if(typeof R==="object"&&R!==null)D=r6(R);else{var V=o3(Q,X,!0);D=a3(Q,V)}var n=X.getDerivedStateFromProps,t=typeof n==="function"||typeof b.getSnapshotBeforeUpdate==="function";if(!t&&(typeof b.UNSAFE_componentWillReceiveProps==="function"||typeof b.componentWillReceiveProps==="function")){if($!==q||_!==D)Bq(Q,b,Z,D)}IU();var s=Q.memoizedState,k0=b.state=s;if(XX(Q,Z,b,J),k0=Q.memoizedState,$===q&&s===k0&&!uQ()&&!ZX()&&!_1){if(typeof b.componentDidUpdate==="function"){if($!==z.memoizedProps||s!==z.memoizedState)Q.flags|=g1}if(typeof b.getSnapshotBeforeUpdate==="function"){if($!==z.memoizedProps||s!==z.memoizedState)Q.flags|=y7}return!1}if(typeof n==="function")NY(Q,X,n,Z),k0=Q.memoizedState;var o0=ZX()||Gq(Q,X,U,Z,s,k0,D)||_1;if(o0){if(!t&&(typeof b.UNSAFE_componentWillUpdate==="function"||typeof b.componentWillUpdate==="function")){if(typeof b.componentWillUpdate==="function")b.componentWillUpdate(Z,k0,D);if(typeof b.UNSAFE_componentWillUpdate==="function")b.UNSAFE_componentWillUpdate(Z,k0,D)}if(typeof b.componentDidUpdate==="function")Q.flags|=g1;if(typeof b.getSnapshotBeforeUpdate==="function")Q.flags|=y7}else{if(typeof b.componentDidUpdate==="function"){if($!==z.memoizedProps||s!==z.memoizedState)Q.flags|=g1}if(typeof b.getSnapshotBeforeUpdate==="function"){if($!==z.memoizedProps||s!==z.memoizedState)Q.flags|=y7}Q.memoizedProps=Z,Q.memoizedState=k0}return b.props=Z,b.state=k0,b.context=D,o0}function z3(z,Q){return{value:z,source:Q,stack:i2(Q),digest:null}}function wY(z,Q,X){return{value:z,source:null,stack:X!=null?X:null,digest:Q!=null?Q:null}}function FR(z,Q){return!0}function RY(z,Q){try{var X=FR(z,Q);if(X===!1)return;var{value:Z,source:J,stack:b}=Q,$=b!==null?b:"";if(Z!=null&&Z._suppressLogging){if(z.tag===N)return;console.error(Z)}var U=J?N1(J):null,q=U?"The above error occurred in the <"+U+"> component:":"The above error occurred in one of your React components:",_;if(z.tag===M)_=`Consider adding an error boundary to your tree to customize error handling behavior.
97
- Visit https://reactjs.org/link/error-boundaries to learn more about error boundaries.`;else{var R=N1(z)||"Anonymous";_="React will try to recreate this component tree from scratch "+("using the error boundary you provided, "+R+".")}var D=q+`
98
- `+$+`
99
-
100
- `+(""+_);console.error(D)}catch(V){setTimeout(function(){throw V})}}var MR=typeof WeakMap==="function"?WeakMap:Map;function Kq(z,Q,X){var Z=y8(P6,X);Z.tag=vb,Z.payload={element:null};var J=Q.value;return Z.callback=function(){RF(J),RY(z,Q)},Z}function PY(z,Q,X){var Z=y8(P6,X);Z.tag=vb;var J=z.type.getDerivedStateFromError;if(typeof J==="function"){var b=Q.value;Z.payload=function(){return J(b)},Z.callback=function(){kB(z),RY(z,Q)}}var $=z.stateNode;if($!==null&&typeof $.componentDidCatch==="function")Z.callback=function(){if(kB(z),RY(z,Q),typeof J!=="function")_F(this);var{value:q,stack:_}=Q;if(this.componentDidCatch(q,{componentStack:_!==null?_:""}),typeof J!=="function"){if(!H5(z.lanes,G1))H("%s: Error boundaries should implement getDerivedStateFromError(). In that method, return a state update to display an error message or fallback UI.",N1(z)||"Unknown")}};return Z}function Oq(z,Q,X){var Z=z.pingCache,J;if(Z===null)Z=z.pingCache=new MR,J=new Set,Z.set(Q,J);else if(J=Z.get(Q),J===void 0)J=new Set,Z.set(Q,J);if(!J.has(X)){J.add(X);var b=PF.bind(null,z,Q,X);if(D5)wz(z,X);Q.then(b,b)}}function vR(z,Q,X,Z){var J=z.updateQueue;if(J===null){var b=new Set;b.add(X),z.updateQueue=b}else J.add(X)}function kR(z,Q){var X=z.tag;if((z.mode&y1)===n0&&(X===L||X===k||X===d)){var Z=z.alternate;if(Z)z.updateQueue=Z.updateQueue,z.memoizedState=Z.memoizedState,z.lanes=Z.lanes;else z.updateQueue=null,z.memoizedState=null}}function Lq(z){var Q=z;do{if(Q.tag===x&&YR(Q))return Q;Q=Q.return}while(Q!==null);return null}function Nq(z,Q,X,Z,J){if((z.mode&y1)===n0){if(z===Q)z.flags|=i4;else{if(z.flags|=p1,X.flags|=lZ,X.flags&=~(bL|Q9),X.tag===N){var b=X.alternate;if(b===null)X.tag=c;else{var $=y8(P6,G1);$.tag=sQ,H7(X,$,G1)}}X.lanes=w1(X.lanes,G1)}return z}return z.flags|=i4,z.lanes=J,z}function AR(z,Q,X,Z,J){if(X.flags|=Q9,D5)wz(z,J);if(Z!==null&&typeof Z==="object"&&typeof Z.then==="function"){var b=Z;if(kR(X),F4()&&X.mode&y1)$U();var $=Lq(Q);if($!==null){if($.flags&=~P8,Nq($,Q,X,z,J),$.mode&y1)Oq(z,b,J);vR($,z,b);return}else{if(!rL(J)){Oq(z,b,J),Q$();return}var U=Error("A component suspended while responding to synchronous input. This will cause the UI to be replaced with a loading indicator. To fix, updates that suspend should be wrapped with startTransition.");Z=U}}else if(F4()&&X.mode&y1){$U();var q=Lq(Q);if(q!==null){if((q.flags&i4)===Q1)q.flags|=P8;Nq(q,Q,X,z,J),Bb(z3(Z,X));return}}Z=z3(Z,X),UF(Z);var _=Q;do{switch(_.tag){case M:{var R=Z;_.flags|=i4;var D=G9(J);_.lanes=w1(_.lanes,D);var V=Kq(_,R,D);Ib(_,V);return}case N:var n=Z,t=_.type,s=_.stateNode;if((_.flags&p1)===Q1&&(typeof t.getDerivedStateFromError==="function"||s!==null&&typeof s.componentDidCatch==="function"&&!NB(s))){_.flags|=i4;var k0=G9(J);_.lanes=w1(_.lanes,k0);var o0=PY(_,n,k0);Ib(_,o0);return}break}_=_.return}while(_!==null)}function IR(){return null}var Zz=Y.ReactCurrentOwner,x5=!1,FY,Jz,MY,vY,kY,Q3,AY,fX,bz;FY={},Jz={},MY={},vY={},kY={},Q3=!1,AY={},fX={},bz={};function p4(z,Q,X,Z){if(z===null)Q.child=wU(Q,null,X,Z);else Q.child=s3(Q,z.child,X,Z)}function TR(z,Q,X,Z){Q.child=s3(Q,z.child,null,Z),Q.child=s3(Q,null,X,Z)}function Wq(z,Q,X,Z,J){if(Q.type!==Q.elementType){var b=X.propTypes;if(b)u5(b,Z,"prop",l1(X))}var $=X.render,U=Q.ref,q,_;z2(Q,J),Z9(Q);{if(Zz.current=Q,Y5(!0),q=Y2(z,Q,$,Z,U,J),_=$2(),Q.mode&g6){K4(!0);try{q=Y2(z,Q,$,Z,U,J),_=$2()}finally{K4(!1)}}Y5(!1)}if(y3(),z!==null&&!x5)return yU(z,Q,J),V8(z,Q,J);if(F4()&&_)Yb(Q);return Q.flags|=C3,p4(z,Q,q,J),Q.child}function _q(z,Q,X,Z,J){if(z===null){var b=X.type;if(gF(b)&&X.compare===null&&X.defaultProps===void 0){var $=b;return $=L2(b),Q.tag=d,Q.type=$,fY(Q,b),wq(z,Q,$,Z,J)}{var U=b.propTypes;if(U)u5(U,Z,"prop",l1(b));if(X.defaultProps!==void 0){var q=l1(b)||"Unknown";if(!bz[q])H("%s: Support for defaultProps will be removed from memo components in a future major release. Use JavaScript default parameters instead.",q),bz[q]=!0}}var _=B$(X.type,null,Z,Q,Q.mode,J);return _.ref=Q.ref,_.return=Q,Q.child=_,_}{var R=X.type,D=R.propTypes;if(D)u5(D,Z,"prop",l1(R))}var V=z.child,n=DY(z,J);if(!n){var t=V.memoizedProps,s=X.compare;if(s=s!==null?s:v9,s(t,Z)&&z.ref===Q.ref)return V8(z,Q,J)}Q.flags|=C3;var k0=Y3(V,Z);return k0.ref=Q.ref,k0.return=Q,Q.child=k0,k0}function wq(z,Q,X,Z,J){if(Q.type!==Q.elementType){var b=Q.elementType;if(b.$$typeof===d0){var $=b,U=$._payload,q=$._init;try{b=q(U)}catch(D){b=null}var _=b&&b.propTypes;if(_)u5(_,Z,"prop",l1(b))}}if(z!==null){var R=z.memoizedProps;if(v9(R,Z)&&z.ref===Q.ref&&Q.type===z.type){if(x5=!1,Q.pendingProps=Z=R,!DY(z,J))return Q.lanes=z.lanes,V8(z,Q,J);else if((z.flags&lZ)!==Q1)x5=!0}}return IY(z,Q,X,Z,J)}function Rq(z,Q,X){var Z=Q.pendingProps,J=Z.children,b=z!==null?z.memoizedState:null;if(Z.mode==="hidden"||$1)if((Q.mode&y1)===n0){var $={baseLanes:B0,cachePool:null,transitions:null};Q.memoizedState=$,cX(Q,X)}else if(!H5(X,$5)){var U=null,q;if(b!==null){var _=b.baseLanes;q=w1(_,X)}else q=X;Q.lanes=Q.childLanes=HQ($5);var R={baseLanes:q,cachePool:U,transitions:null};return Q.memoizedState=R,Q.updateQueue=null,cX(Q,q),null}else{var D={baseLanes:B0,cachePool:null,transitions:null};Q.memoizedState=D;var V=b!==null?b.baseLanes:X;cX(Q,V)}else{var n;if(b!==null)n=w1(b.baseLanes,X),Q.memoizedState=null;else n=X;cX(Q,n)}return p4(z,Q,J,X),Q.child}function fR(z,Q,X){var Z=Q.pendingProps;return p4(z,Q,Z,X),Q.child}function SR(z,Q,X){var Z=Q.pendingProps.children;return p4(z,Q,Z,X),Q.child}function CR(z,Q,X){{Q.flags|=g1;{var Z=Q.stateNode;Z.effectDuration=0,Z.passiveEffectDuration=0}}var J=Q.pendingProps,b=J.children;return p4(z,Q,b,X),Q.child}function Pq(z,Q){var X=Q.ref;if(z===null&&X!==null||z!==null&&z.ref!==X)Q.flags|=n8,Q.flags|=dZ}function IY(z,Q,X,Z,J){if(Q.type!==Q.elementType){var b=X.propTypes;if(b)u5(b,Z,"prop",l1(X))}var $;{var U=o3(Q,X,!0);$=a3(Q,U)}var q,_;z2(Q,J),Z9(Q);{if(Zz.current=Q,Y5(!0),q=Y2(z,Q,X,Z,$,J),_=$2(),Q.mode&g6){K4(!0);try{q=Y2(z,Q,X,Z,$,J),_=$2()}finally{K4(!1)}}Y5(!1)}if(y3(),z!==null&&!x5)return yU(z,Q,J),V8(z,Q,J);if(F4()&&_)Yb(Q);return Q.flags|=C3,p4(z,Q,q,J),Q.child}function Fq(z,Q,X,Z,J){{switch(eF(Q)){case!1:{var{stateNode:b,type:$}=Q,U=new $(Q.memoizedProps,b.context),q=U.state;b.updater.enqueueSetState(b,q,null);break}case!0:{Q.flags|=p1,Q.flags|=i4;var _=Error("Simulated error coming from DevTools"),R=G9(J);Q.lanes=w1(Q.lanes,R);var D=PY(Q,z3(_,Q),R);Ib(Q,D);break}}if(Q.type!==Q.elementType){var V=X.propTypes;if(V)u5(V,Z,"prop",l1(X))}}var n;if(J8(X))n=!0,EQ(Q);else n=!1;z2(Q,J);var t=Q.stateNode,s;if(t===null)CX(z,Q),qq(Q,X,Z),_Y(Q,X,Z,J),s=!0;else if(z===null)s=RR(Q,X,Z,J);else s=PR(z,Q,X,Z,J);var k0=TY(z,Q,X,s,n,J);{var o0=Q.stateNode;if(s&&o0.props!==Z){if(!Q3)H("It looks like %s is reassigning its own `this.props` while rendering. This is not supported and can lead to confusing bugs.",N1(Q)||"a component");Q3=!0}}return k0}function TY(z,Q,X,Z,J,b){Pq(z,Q);var $=(Q.flags&p1)!==Q1;if(!Z&&!$){if(J)ZU(Q,X,!1);return V8(z,Q,b)}var U=Q.stateNode;Zz.current=Q;var q;if($&&typeof X.getDerivedStateFromError!=="function")q=null,Yq();else{Z9(Q);{if(Y5(!0),q=U.render(),Q.mode&g6){K4(!0);try{U.render()}finally{K4(!1)}}Y5(!1)}y3()}if(Q.flags|=C3,z!==null&&$)TR(z,Q,q,b);else p4(z,Q,q,b);if(Q.memoizedState=U.state,J)ZU(Q,X,!0);return Q.child}function Mq(z){var Q=z.stateNode;if(Q.pendingContext)QU(z,Q.pendingContext,Q.pendingContext!==Q.context);else if(Q.context)QU(z,Q.context,!1);Tb(z,Q.containerInfo)}function hR(z,Q,X){if(Mq(Q),z===null)throw Error("Should have a current fiber. This is a bug in React.");var{pendingProps:Z,memoizedState:J}=Q,b=J.element;AU(z,Q),XX(Q,Z,null,X);var{memoizedState:$,stateNode:U}=Q,q=$.element;if(J.isDehydrated){var _={element:q,isDehydrated:!1,cache:$.cache,pendingSuspenseBoundaries:$.pendingSuspenseBoundaries,transitions:$.transitions},R=Q.updateQueue;if(R.baseState=_,Q.memoizedState=_,Q.flags&P8){var D=z3(Error("There was an error while hydrating. Because the error happened outside of a Suspense boundary, the entire root will switch to client rendering."),Q);return vq(z,Q,q,X,D)}else if(q!==b){var V=z3(Error("This root received an early update, before anything was able hydrate. Switched the entire root to client rendering."),Q);return vq(z,Q,q,X,V)}else{mw(Q);var n=wU(Q,null,q,X);Q.child=n;var t=n;while(t)t.flags=t.flags&~a6|F8,t=t.sibling}}else{if(t3(),q===b)return V8(z,Q,X);p4(z,Q,q,X)}return Q.child}function vq(z,Q,X,Z,J){return t3(),Bb(J),Q.flags|=P8,p4(z,Q,X,Z),Q.child}function yR(z,Q,X){if(SU(Q),z===null)qb(Q);var{type:Z,pendingProps:J}=Q,b=z!==null?z.memoizedProps:null,$=J.children,U=oJ(Z,J);if(U)$=null;else if(b!==null&&oJ(Z,b))Q.flags|=z9;return Pq(z,Q),p4(z,Q,$,X),Q.child}function VR(z,Q){if(z===null)qb(Q);return null}function DR(z,Q,X,Z){CX(z,Q);var J=Q.pendingProps,b=X,$=b._payload,U=b._init,q=U($);Q.type=q;var _=Q.tag=EF(q),R=c5(q,J),D;switch(_){case L:return fY(Q,q),Q.type=q=L2(q),D=IY(null,Q,q,R,Z),D;case N:return Q.type=q=Y$(q),D=Fq(null,Q,q,R,Z),D;case k:return Q.type=q=$$(q),D=Wq(null,Q,q,R,Z),D;case j:{if(Q.type!==Q.elementType){var V=q.propTypes;if(V)u5(V,R,"prop",l1(q))}return D=_q(null,Q,q,c5(q.type,R),Z),D}}var n="";if(q!==null&&typeof q==="object"&&q.$$typeof===d0)n=" Did you wrap a component in React.lazy() more than once?";throw Error("Element type is invalid. Received a promise that resolves to: "+q+". "+("Lazy element type must resolve to a class or function."+n))}function mR(z,Q,X,Z,J){CX(z,Q),Q.tag=N;var b;if(J8(X))b=!0,EQ(Q);else b=!1;return z2(Q,J),qq(Q,X,Z),_Y(Q,X,Z,J),TY(null,Q,X,!0,b,J)}function uR(z,Q,X,Z){CX(z,Q);var J=Q.pendingProps,b;{var $=o3(Q,X,!1);b=a3(Q,$)}z2(Q,Z);var U,q;Z9(Q);{if(X.prototype&&typeof X.prototype.render==="function"){var _=l1(X)||"Unknown";if(!FY[_])H("The <%s /> component appears to have a render method, but doesn't extend React.Component. This is likely to cause errors. Change %s to extend React.Component instead.",_,_),FY[_]=!0}if(Q.mode&g6)E5.recordLegacyContextWarning(Q,null);Y5(!0),Zz.current=Q,U=Y2(null,Q,X,J,b,Z),q=$2(),Y5(!1)}if(y3(),Q.flags|=C3,typeof U==="object"&&U!==null&&typeof U.render==="function"&&U.$$typeof===void 0){var R=l1(X)||"Unknown";if(!Jz[R])H("The <%s /> component appears to be a function component that returns a class instance. Change %s to a class that extends React.Component instead. If you can't use a class try assigning the prototype on the function as a workaround. `%s.prototype = React.Component.prototype`. Don't use an arrow function since it cannot be called with `new` by React.",R,R,R),Jz[R]=!0}if(typeof U==="object"&&U!==null&&typeof U.render==="function"&&U.$$typeof===void 0){{var D=l1(X)||"Unknown";if(!Jz[D])H("The <%s /> component appears to be a function component that returns a class instance. Change %s to a class that extends React.Component instead. If you can't use a class try assigning the prototype on the function as a workaround. `%s.prototype = React.Component.prototype`. Don't use an arrow function since it cannot be called with `new` by React.",D,D,D),Jz[D]=!0}Q.tag=N,Q.memoizedState=null,Q.updateQueue=null;var V=!1;if(J8(X))V=!0,EQ(Q);else V=!1;return Q.memoizedState=U.state!==null&&U.state!==void 0?U.state:null,Ab(Q),Uq(Q,U),_Y(Q,X,J,Z),TY(null,Q,X,!0,V,Z)}else{if(Q.tag=L,Q.mode&g6){K4(!0);try{U=Y2(null,Q,X,J,b,Z),q=$2()}finally{K4(!1)}}if(F4()&&q)Yb(Q);return p4(null,Q,U,Z),fY(Q,X),Q.child}}function fY(z,Q){{if(Q){if(Q.childContextTypes)H("%s(...): childContextTypes cannot be defined on a function component.",Q.displayName||Q.name||"Component")}if(z.ref!==null){var X="",Z=o8();if(Z)X+=`
101
-
102
- Check the render method of \``+Z+"`.";var J=Z||"",b=z._debugSource;if(b)J=b.fileName+":"+b.lineNumber;if(!kY[J])kY[J]=!0,H("Function components cannot be given refs. Attempts to access this ref will fail. Did you mean to use React.forwardRef()?%s",X)}if(Q.defaultProps!==void 0){var $=l1(Q)||"Unknown";if(!bz[$])H("%s: Support for defaultProps will be removed from function components in a future major release. Use JavaScript default parameters instead.",$),bz[$]=!0}if(typeof Q.getDerivedStateFromProps==="function"){var U=l1(Q)||"Unknown";if(!vY[U])H("%s: Function components do not support getDerivedStateFromProps.",U),vY[U]=!0}if(typeof Q.contextType==="object"&&Q.contextType!==null){var q=l1(Q)||"Unknown";if(!MY[q])H("%s: Function components do not support contextType.",q),MY[q]=!0}}}var SY={dehydrated:null,treeContext:null,retryLane:O4};function CY(z){return{baseLanes:z,cachePool:IR(),transitions:null}}function gR(z,Q){var X=null;return{baseLanes:w1(z.baseLanes,Q),cachePool:X,transitions:z.transitions}}function ER(z,Q,X,Z){if(Q!==null){var J=Q.memoizedState;if(J===null)return!1}return Cb(z,a9)}function lR(z,Q){return $Q(z.childLanes,Q)}function kq(z,Q,X){var Z=Q.pendingProps;if(zM(Q))Q.flags|=p1;var J=l5.current,b=!1,$=(Q.flags&p1)!==Q1;if($||ER(J,z))b=!0,Q.flags&=~p1;else if(z===null||z.memoizedState!==null)J=bR(J,hU);if(J=X2(J),U7(Q,J),z===null){qb(Q);var U=Q.memoizedState;if(U!==null){var q=U.dehydrated;if(q!==null)return pR(Q,q)}var{children:_,fallback:R}=Z;if(b){var D=dR(Q,_,R,X),V=Q.child;return V.memoizedState=CY(X),Q.memoizedState=SY,D}else return hY(Q,_)}else{var n=z.memoizedState;if(n!==null){var t=n.dehydrated;if(t!==null)return jR(z,Q,$,Z,t,n,X)}if(b){var{fallback:s,children:k0}=Z,o0=xR(z,Q,k0,s,X),c0=Q.child,k1=z.child.memoizedState;return c0.memoizedState=k1===null?CY(X):gR(k1,X),c0.childLanes=lR(z,X),Q.memoizedState=SY,o0}else{var A1=Z.children,i=cR(z,Q,A1,X);return Q.memoizedState=null,i}}}function hY(z,Q,X){var Z=z.mode,J={mode:"visible",children:Q},b=yY(J,Z);return b.return=z,z.child=b,b}function dR(z,Q,X,Z){var{mode:J,child:b}=z,$={mode:"hidden",children:Q},U,q;if((J&y1)===n0&&b!==null){if(U=b,U.childLanes=B0,U.pendingProps=$,z.mode&z6)U.actualDuration=0,U.actualStartTime=-1,U.selfBaseDuration=0,U.treeBaseDuration=0;q=_7(X,J,Z,null)}else U=yY($,J),q=_7(X,J,Z,null);return U.return=z,q.return=z,U.sibling=q,z.child=U,q}function yY(z,Q,X){return IB(z,Q,B0,null)}function Aq(z,Q){return Y3(z,Q)}function cR(z,Q,X,Z){var J=z.child,b=J.sibling,$=Aq(J,{mode:"visible",children:X});if((Q.mode&y1)===n0)$.lanes=Z;if($.return=Q,$.sibling=null,b!==null){var U=Q.deletions;if(U===null)Q.deletions=[b],Q.flags|=h7;else U.push(b)}return Q.child=$,$}function xR(z,Q,X,Z,J){var b=Q.mode,$=z.child,U=$.sibling,q={mode:"hidden",children:X},_;if((b&y1)===n0&&Q.child!==$){var R=Q.child;if(_=R,_.childLanes=B0,_.pendingProps=q,Q.mode&z6)_.actualDuration=0,_.actualStartTime=-1,_.selfBaseDuration=$.selfBaseDuration,_.treeBaseDuration=$.treeBaseDuration;Q.deletions=null}else _=Aq($,q),_.subtreeFlags=$.subtreeFlags&v8;var D;if(U!==null)D=Y3(U,Z);else D=_7(Z,b,J,null),D.flags|=a6;return D.return=Q,_.return=Q,_.sibling=D,Q.child=_,D}function SX(z,Q,X,Z){if(Z!==null)Bb(Z);s3(Q,z.child,null,X);var J=Q.pendingProps,b=J.children,$=hY(Q,b);return $.flags|=a6,Q.memoizedState=null,$}function iR(z,Q,X,Z,J){var b=Q.mode,$={mode:"visible",children:X},U=yY($,b),q=_7(Z,b,J,null);if(q.flags|=a6,U.return=Q,q.return=Q,U.sibling=q,Q.child=U,(Q.mode&y1)!==n0)s3(Q,z.child,null,J);return q}function pR(z,Q,X){if((z.mode&y1)===n0)H("Cannot hydrate Suspense in legacy mode. Switch from ReactDOM.hydrate(element, container) to ReactDOMClient.hydrateRoot(container, <App />).render(element) or remove the Suspense components from the server rendered components."),z.lanes=HQ(G1);else if(tJ(Q))z.lanes=HQ(E7);else z.lanes=HQ($5);return null}function jR(z,Q,X,Z,J,b,$){if(!X){if(Vw(),(Q.mode&y1)===n0)return SX(z,Q,$,null);if(tJ(J)){var U,q,_;{var R=t_(J);U=R.digest,q=R.message,_=R.stack}var D;if(q)D=Error(q);else D=Error("The server could not finish this Suspense boundary, likely due to an error during server rendering. Switched to client rendering.");var V=wY(D,U,_);return SX(z,Q,$,V)}var n=H5($,z.childLanes);if(x5||n){var t=dX();if(t!==null){var s=ZN(t,$);if(s!==O4&&s!==b.retryLane){b.retryLane=s;var k0=P6;z5(z,s),b4(t,z,s,k0)}}Q$();var o0=wY(Error("This Suspense boundary received an update before it finished hydrating. This caused the boundary to switch to client rendering. The usual way to fix this is to wrap the original update in startTransition."));return SX(z,Q,$,o0)}else if(aG(J)){Q.flags|=p1,Q.child=z.child;var c0=FF.bind(null,z);return s_(J,c0),null}else{uw(Q,J,b.treeContext);var k1=Z.children,A1=hY(Q,k1);return A1.flags|=F8,A1}}else if(Q.flags&P8){Q.flags&=~P8;var i=wY(Error("There was an error while hydrating this Suspense boundary. Switched to client rendering."));return SX(z,Q,$,i)}else if(Q.memoizedState!==null)return Q.child=z.child,Q.flags|=p1,null;else{var{children:Z0,fallback:p}=Z,O0=iR(z,Q,Z0,p,$),S0=Q.child;return S0.memoizedState=CY($),Q.memoizedState=SY,O0}}function Iq(z,Q,X){z.lanes=w1(z.lanes,Q);var Z=z.alternate;if(Z!==null)Z.lanes=w1(Z.lanes,Q);Fb(z.return,Q,X)}function oR(z,Q,X){var Z=Q;while(Z!==null){if(Z.tag===x){var J=Z.memoizedState;if(J!==null)Iq(Z,X,z)}else if(Z.tag===a)Iq(Z,X,z);else if(Z.child!==null){Z.child.return=Z,Z=Z.child;continue}if(Z===z)return;while(Z.sibling===null){if(Z.return===null||Z.return===z)return;Z=Z.return}Z.sibling.return=Z.return,Z=Z.sibling}}function aR(z){var Q=z,X=null;while(Q!==null){var Z=Q.alternate;if(Z!==null&&YX(Z)===null)X=Q;Q=Q.sibling}return X}function rR(z){if(z!==void 0&&z!=="forwards"&&z!=="backwards"&&z!=="together"&&!AY[z])if(AY[z]=!0,typeof z==="string")switch(z.toLowerCase()){case"together":case"forwards":case"backwards":{H('"%s" is not a valid value for revealOrder on <SuspenseList />. Use lowercase "%s" instead.',z,z.toLowerCase());break}case"forward":case"backward":{H('"%s" is not a valid value for revealOrder on <SuspenseList />. React uses the -s suffix in the spelling. Use "%ss" instead.',z,z.toLowerCase());break}default:H('"%s" is not a supported revealOrder on <SuspenseList />. Did you mean "together", "forwards" or "backwards"?',z);break}else H('%s is not a supported value for revealOrder on <SuspenseList />. Did you mean "together", "forwards" or "backwards"?',z)}function nR(z,Q){if(z!==void 0&&!fX[z]){if(z!=="collapsed"&&z!=="hidden")fX[z]=!0,H('"%s" is not a supported value for tail on <SuspenseList />. Did you mean "collapsed" or "hidden"?',z);else if(Q!=="forwards"&&Q!=="backwards")fX[z]=!0,H('<SuspenseList tail="%s" /> is only valid if revealOrder is "forwards" or "backwards". Did you mean to specify revealOrder="forwards"?',z)}}function Tq(z,Q){{var X=i1(z),Z=!X&&typeof R6(z)==="function";if(X||Z){var J=X?"array":"iterable";return H("A nested %s was passed to row #%s in <SuspenseList />. Wrap it in an additional SuspenseList to configure its revealOrder: <SuspenseList revealOrder=...> ... <SuspenseList revealOrder=...>{%s}</SuspenseList> ... </SuspenseList>",J,Q,J),!1}}return!0}function tR(z,Q){if((Q==="forwards"||Q==="backwards")&&z!==void 0&&z!==null&&z!==!1)if(i1(z)){for(var X=0;X<z.length;X++)if(!Tq(z[X],X))return}else{var Z=R6(z);if(typeof Z==="function"){var J=Z.call(z);if(J){var b=J.next(),$=0;for(;!b.done;b=J.next()){if(!Tq(b.value,$))return;$++}}}else H('A single row was passed to a <SuspenseList revealOrder="%s" />. This is not useful since it needs multiple rows. Did you mean to pass multiple children or an array?',Q)}}function VY(z,Q,X,Z,J){var b=z.memoizedState;if(b===null)z.memoizedState={isBackwards:Q,rendering:null,renderingStartTime:0,last:Z,tail:X,tailMode:J};else b.isBackwards=Q,b.rendering=null,b.renderingStartTime=0,b.last=Z,b.tail=X,b.tailMode=J}function fq(z,Q,X){var Z=Q.pendingProps,J=Z.revealOrder,b=Z.tail,$=Z.children;rR(J),nR(b,J),tR($,J),p4(z,Q,$,X);var U=l5.current,q=Cb(U,a9);if(q)U=hb(U,a9),Q.flags|=p1;else{var _=z!==null&&(z.flags&p1)!==Q1;if(_)oR(Q,Q.child,X);U=X2(U)}if(U7(Q,U),(Q.mode&y1)===n0)Q.memoizedState=null;else switch(J){case"forwards":{var R=aR(Q.child),D;if(R===null)D=Q.child,Q.child=null;else D=R.sibling,R.sibling=null;VY(Q,!1,D,R,b);break}case"backwards":{var V=null,n=Q.child;Q.child=null;while(n!==null){var t=n.alternate;if(t!==null&&YX(t)===null){Q.child=n;break}var s=n.sibling;n.sibling=V,V=n,n=s}VY(Q,!0,V,null,b);break}case"together":{VY(Q,!1,null,null,void 0);break}default:Q.memoizedState=null}return Q.child}function sR(z,Q,X){Tb(Q,Q.stateNode.containerInfo);var Z=Q.pendingProps;if(z===null)Q.child=s3(Q,null,Z,X);else p4(z,Q,Z,X);return Q.child}var Sq=!1;function eR(z,Q,X){var Z=Q.type,J=Z._context,b=Q.pendingProps,$=Q.memoizedProps,U=b.value;{if(!("value"in b)){if(!Sq)Sq=!0,H("The `value` prop is required for the `<Context.Provider>`. Did you misspell it or forget to pass it?")}var q=Q.type.propTypes;if(q)u5(q,b,"prop","Context.Provider")}if(FU(Q,J,U),$!==null){var _=$.value;if(q5(_,U)){if($.children===b.children&&!uQ())return V8(z,Q,X)}else nw(Q,J,X)}var R=b.children;return p4(z,Q,R,X),Q.child}var Cq=!1;function zP(z,Q,X){var Z=Q.type;if(Z._context===void 0){if(Z!==Z.Consumer){if(!Cq)Cq=!0,H("Rendering <Context> directly is not supported and will be removed in a future major release. Did you mean to render <Context.Consumer> instead?")}}else Z=Z._context;var J=Q.pendingProps,b=J.children;if(typeof b!=="function")H("A context consumer was rendered with multiple children, or a child that isn't a function. A context consumer expects a single child that is a function. If you did pass a function, make sure there is no trailing or leading whitespace around it.");z2(Q,X);var $=r6(Z);Z9(Q);var U;return Zz.current=Q,Y5(!0),U=b($),Y5(!1),y3(),Q.flags|=C3,p4(z,Q,U,X),Q.child}function Yz(){x5=!0}function CX(z,Q){if((Q.mode&y1)===n0){if(z!==null)z.alternate=null,Q.alternate=null,Q.flags|=a6}}function V8(z,Q,X){if(z!==null)Q.dependencies=z.dependencies;if(Yq(),_z(Q.lanes),!H5(X,Q.childLanes))return null;return aw(z,Q),Q.child}function QP(z,Q,X){{var Z=Q.return;if(Z===null)throw Error("Cannot swap the root fiber.");if(z.alternate=null,Q.alternate=null,X.index=Q.index,X.sibling=Q.sibling,X.return=Q.return,X.ref=Q.ref,Q===Z.child)Z.child=X;else{var J=Z.child;if(J===null)throw Error("Expected parent to have a child.");while(J.sibling!==Q)if(J=J.sibling,J===null)throw Error("Expected to find the previous sibling.");J.sibling=X}var b=Z.deletions;if(b===null)Z.deletions=[z],Z.flags|=h7;else b.push(z);return X.flags|=a6,X}}function DY(z,Q){var X=z.lanes;if(H5(X,Q))return!0;return!1}function XP(z,Q,X){switch(Q.tag){case M:Mq(Q);var Z=Q.stateNode;t3();break;case w:SU(Q);break;case N:{var J=Q.type;if(J8(J))EQ(Q);break}case F:Tb(Q,Q.stateNode.containerInfo);break;case y:{var b=Q.memoizedProps.value,$=Q.type._context;FU(Q,$,b);break}case E:{var U=H5(X,Q.childLanes);if(U)Q.flags|=g1;{var q=Q.stateNode;q.effectDuration=0,q.passiveEffectDuration=0}}break;case x:{var _=Q.memoizedState;if(_!==null){if(_.dehydrated!==null)return U7(Q,X2(l5.current)),Q.flags|=p1,null;var R=Q.child,D=R.childLanes;if(H5(X,D))return kq(z,Q,X);else{U7(Q,X2(l5.current));var V=V8(z,Q,X);if(V!==null)return V.sibling;else return null}}else U7(Q,X2(l5.current));break}case a:{var n=(z.flags&p1)!==Q1,t=H5(X,Q.childLanes);if(n){if(t)return fq(z,Q,X);Q.flags|=p1}var s=Q.memoizedState;if(s!==null)s.rendering=null,s.tail=null,s.lastEffect=null;if(U7(Q,l5.current),t)break;else return null}case q0:case Y0:return Q.lanes=B0,Rq(z,Q,X)}return V8(z,Q,X)}function hq(z,Q,X){if(Q._debugNeedsRemount&&z!==null)return QP(z,Q,B$(Q.type,Q.key,Q.pendingProps,Q._debugOwner||null,Q.mode,Q.lanes));if(z!==null){var Z=z.memoizedProps,J=Q.pendingProps;if(Z!==J||uQ()||Q.type!==z.type)x5=!0;else{var b=DY(z,X);if(!b&&(Q.flags&p1)===Q1)return x5=!1,XP(z,Q,X);if((z.flags&lZ)!==Q1)x5=!0;else x5=!1}}else if(x5=!1,F4()&&Tw(Q)){var $=Q.index,U=fw();YU(Q,U,$)}switch(Q.lanes=B0,Q.tag){case T:return uR(z,Q,Q.type,X);case o:{var q=Q.elementType;return DR(z,Q,q,X)}case L:{var{type:_,pendingProps:R}=Q,D=Q.elementType===_?R:c5(_,R);return IY(z,Q,_,D,X)}case N:{var{type:V,pendingProps:n}=Q,t=Q.elementType===V?n:c5(V,n);return Fq(z,Q,V,t,X)}case M:return hR(z,Q,X);case w:return yR(z,Q,X);case v:return VR(z,Q);case x:return kq(z,Q,X);case F:return sR(z,Q,X);case k:{var{type:s,pendingProps:k0}=Q,o0=Q.elementType===s?k0:c5(s,k0);return Wq(z,Q,s,o0,X)}case S:return fR(z,Q,X);case A:return SR(z,Q,X);case E:return CR(z,Q,X);case y:return eR(z,Q,X);case h:return zP(z,Q,X);case j:{var{type:c0,pendingProps:k1}=Q,A1=c5(c0,k1);if(Q.type!==Q.elementType){var i=c0.propTypes;if(i)u5(i,A1,"prop",l1(c0))}return A1=c5(c0.type,A1),_q(z,Q,c0,A1,X)}case d:return wq(z,Q,Q.type,Q.pendingProps,X);case c:{var{type:Z0,pendingProps:p}=Q,O0=Q.elementType===Z0?p:c5(Z0,p);return mR(z,Q,Z0,O0,X)}case a:return fq(z,Q,X);case Q0:break;case q0:return Rq(z,Q,X)}throw Error("Unknown unit of work tag ("+Q.tag+"). This error is likely caused by a bug in React. Please file an issue.")}function H2(z){z.flags|=g1}function yq(z){z.flags|=n8,z.flags|=dZ}var Vq,mY,Dq,mq;Vq=function(z,Q,X,Z){var J=Q.child;while(J!==null){if(J.tag===w||J.tag===v)k_(z,J.stateNode);else if(J.tag===F);else if(J.child!==null){J.child.return=J,J=J.child;continue}if(J===Q)return;while(J.sibling===null){if(J.return===null||J.return===Q)return;J=J.return}J.sibling.return=J.return,J=J.sibling}},mY=function(z,Q){},Dq=function(z,Q,X,Z,J){var b=z.memoizedProps;if(b===Z)return;var $=Q.stateNode,U=fb(),q=I_($,X,b,Z,J,U);if(Q.updateQueue=q,q)H2(Q)},mq=function(z,Q,X,Z){if(X!==Z)H2(Q)};function $z(z,Q){if(F4())return;switch(z.tailMode){case"hidden":{var X=z.tail,Z=null;while(X!==null){if(X.alternate!==null)Z=X;X=X.sibling}if(Z===null)z.tail=null;else Z.sibling=null;break}case"collapsed":{var J=z.tail,b=null;while(J!==null){if(J.alternate!==null)b=J;J=J.sibling}if(b===null)if(!Q&&z.tail!==null)z.tail.sibling=null;else z.tail=null;else b.sibling=null;break}}}function v4(z){var Q=z.alternate!==null&&z.alternate.child===z.child,X=B0,Z=Q1;if(!Q){if((z.mode&z6)!==n0){var{actualDuration:J,selfBaseDuration:b,child:$}=z;while($!==null)X=w1(X,w1($.lanes,$.childLanes)),Z|=$.subtreeFlags,Z|=$.flags,J+=$.actualDuration,b+=$.treeBaseDuration,$=$.sibling;z.actualDuration=J,z.treeBaseDuration=b}else{var U=z.child;while(U!==null)X=w1(X,w1(U.lanes,U.childLanes)),Z|=U.subtreeFlags,Z|=U.flags,U.return=z,U=U.sibling}z.subtreeFlags|=Z}else{if((z.mode&z6)!==n0){var{selfBaseDuration:q,child:_}=z;while(_!==null)X=w1(X,w1(_.lanes,_.childLanes)),Z|=_.subtreeFlags&v8,Z|=_.flags&v8,q+=_.treeBaseDuration,_=_.sibling;z.treeBaseDuration=q}else{var R=z.child;while(R!==null)X=w1(X,w1(R.lanes,R.childLanes)),Z|=R.subtreeFlags&v8,Z|=R.flags&v8,R.return=z,R=R.sibling}z.subtreeFlags|=Z}return z.childLanes=X,Q}function ZP(z,Q,X){if(cw()&&(Q.mode&y1)!==n0&&(Q.flags&p1)===Q1)return KU(Q),t3(),Q.flags|=P8|Q9|i4,!1;var Z=iQ(Q);if(X!==null&&X.dehydrated!==null)if(z===null){if(!Z)throw Error("A dehydrated suspense component was completed without a hydrated node. This is probably a bug in React.");if(lw(Q),v4(Q),(Q.mode&z6)!==n0){var J=X!==null;if(J){var b=Q.child;if(b!==null)Q.treeBaseDuration-=b.treeBaseDuration}}return!1}else{if(t3(),(Q.flags&p1)===Q1)Q.memoizedState=null;if(Q.flags|=g1,v4(Q),(Q.mode&z6)!==n0){var $=X!==null;if($){var U=Q.child;if(U!==null)Q.treeBaseDuration-=U.treeBaseDuration}}return!1}else return OU(),!0}function uq(z,Q,X){var Z=Q.pendingProps;switch($b(Q),Q.tag){case T:case o:case d:case L:case k:case S:case A:case E:case h:case j:return v4(Q),null;case N:{var J=Q.type;if(J8(J))gQ(Q);return v4(Q),null}case M:{var b=Q.stateNode;if(Q2(Q),Zb(Q),Vb(),b.pendingContext)b.context=b.pendingContext,b.pendingContext=null;if(z===null||z.child===null){var $=iQ(Q);if($)H2(Q);else if(z!==null){var U=z.memoizedState;if(!U.isDehydrated||(Q.flags&P8)!==Q1)Q.flags|=y7,OU()}}return mY(z,Q),v4(Q),null}case w:{Sb(Q);var q=fU(),_=Q.type;if(z!==null&&Q.stateNode!=null){if(Dq(z,Q,_,Z,q),z.ref!==Q.ref)yq(Q)}else{if(!Z){if(Q.stateNode===null)throw Error("We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue.");return v4(Q),null}var R=fb(),D=iQ(Q);if(D){if(gw(Q,q,R))H2(Q)}else{var V=v_(_,Z,q,R,Q);if(Vq(V,Q,!1,!1),Q.stateNode=V,A_(V,_,Z,q))H2(Q)}if(Q.ref!==null)yq(Q)}return v4(Q),null}case v:{var n=Z;if(z&&Q.stateNode!=null){var t=z.memoizedProps;mq(z,Q,t,n)}else{if(typeof n!=="string"){if(Q.stateNode===null)throw Error("We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue.")}var s=fU(),k0=fb(),o0=iQ(Q);if(o0){if(Ew(Q))H2(Q)}else Q.stateNode=T_(n,s,k0,Q)}return v4(Q),null}case x:{Z2(Q);var c0=Q.memoizedState;if(z===null||z.memoizedState!==null&&z.memoizedState.dehydrated!==null){var k1=ZP(z,Q,c0);if(!k1)if(Q.flags&i4)return Q;else return null}if((Q.flags&p1)!==Q1){if(Q.lanes=X,(Q.mode&z6)!==n0)YY(Q);return Q}var A1=c0!==null,i=z!==null&&z.memoizedState!==null;if(A1!==i){if(A1){var Z0=Q.child;if(Z0.flags|=V7,(Q.mode&y1)!==n0){var p=z===null&&(Q.memoizedProps.unstable_avoidThisFallback!==!0||!D1);if(p||Cb(l5.current,hU))GF();else Q$()}}}var O0=Q.updateQueue;if(O0!==null)Q.flags|=g1;if(v4(Q),(Q.mode&z6)!==n0){if(A1){var S0=Q.child;if(S0!==null)Q.treeBaseDuration-=S0.treeBaseDuration}}return null}case F:if(Q2(Q),mY(z,Q),z===null)Pw(Q.stateNode.containerInfo);return v4(Q),null;case y:var I0=Q.type._context;return Pb(I0,Q),v4(Q),null;case c:{var Z1=Q.type;if(J8(Z1))gQ(Q);return v4(Q),null}case a:{Z2(Q);var K1=Q.memoizedState;if(K1===null)return v4(Q),null;var X6=(Q.flags&p1)!==Q1,c1=K1.rendering;if(c1===null)if(!X6){var i6=qF()&&(z===null||(z.flags&p1)===Q1);if(!i6){var x1=Q.child;while(x1!==null){var E6=YX(x1);if(E6!==null){X6=!0,Q.flags|=p1,$z(K1,!1);var g4=E6.updateQueue;if(g4!==null)Q.updateQueue=g4,Q.flags|=g1;return Q.subtreeFlags=Q1,rw(Q,X),U7(Q,hb(l5.current,a9)),Q.child}x1=x1.sibling}}if(K1.tail!==null&&B4()>bB())Q.flags|=p1,X6=!0,$z(K1,!1),Q.lanes=DH}else $z(K1,!1);else{if(!X6){var f4=YX(c1);if(f4!==null){Q.flags|=p1,X6=!0;var O5=f4.updateQueue;if(O5!==null)Q.updateQueue=O5,Q.flags|=g1;if($z(K1,!0),K1.tail===null&&K1.tailMode==="hidden"&&!c1.alternate&&!F4())return v4(Q),null}else if(B4()*2-K1.renderingStartTime>bB()&&X!==$5)Q.flags|=p1,X6=!0,$z(K1,!1),Q.lanes=DH}if(K1.isBackwards)c1.sibling=Q.child,Q.child=c1;else{var a4=K1.last;if(a4!==null)a4.sibling=c1;else Q.child=c1;K1.last=c1}}if(K1.tail!==null){var r4=K1.tail;K1.rendering=r4,K1.tail=r4.sibling,K1.renderingStartTime=B4(),r4.sibling=null;var E4=l5.current;if(X6)E4=hb(E4,a9);else E4=X2(E4);return U7(Q,E4),r4}return v4(Q),null}case Q0:break;case q0:case Y0:{z$(Q);var E8=Q.memoizedState,N2=E8!==null;if(z!==null){var Mz=z.memoizedState,B8=Mz!==null;if(B8!==N2&&!$1)Q.flags|=V7}if(!N2||(Q.mode&y1)===n0)v4(Q);else if(H5(q8,$5)){if(v4(Q),Q.subtreeFlags&(a6|g1))Q.flags|=V7}return null}case L0:return null;case A0:return null}throw Error("Unknown unit of work tag ("+Q.tag+"). This error is likely caused by a bug in React. Please file an issue.")}function JP(z,Q,X){switch($b(Q),Q.tag){case N:{var Z=Q.type;if(J8(Z))gQ(Q);var J=Q.flags;if(J&i4){if(Q.flags=J&~i4|p1,(Q.mode&z6)!==n0)YY(Q);return Q}return null}case M:{var b=Q.stateNode;Q2(Q),Zb(Q),Vb();var $=Q.flags;if(($&i4)!==Q1&&($&p1)===Q1)return Q.flags=$&~i4|p1,Q;return null}case w:return Sb(Q),null;case x:{Z2(Q);var U=Q.memoizedState;if(U!==null&&U.dehydrated!==null){if(Q.alternate===null)throw Error("Threw in newly mounted dehydrated component. This is likely a bug in React. Please file an issue.");t3()}var q=Q.flags;if(q&i4){if(Q.flags=q&~i4|p1,(Q.mode&z6)!==n0)YY(Q);return Q}return null}case a:return Z2(Q),null;case F:return Q2(Q),null;case y:var _=Q.type._context;return Pb(_,Q),null;case q0:case Y0:return z$(Q),null;case L0:return null;default:return null}}function gq(z,Q,X){switch($b(Q),Q.tag){case N:{var Z=Q.type.childContextTypes;if(Z!==null&&Z!==void 0)gQ(Q);break}case M:{var J=Q.stateNode;Q2(Q),Zb(Q),Vb();break}case w:{Sb(Q);break}case F:Q2(Q);break;case x:Z2(Q);break;case a:Z2(Q);break;case y:var b=Q.type._context;Pb(b,Q);break;case q0:case Y0:z$(Q);break}}var Eq=null;Eq=new Set;var hX=!1,k4=!1,bP=typeof WeakSet==="function"?WeakSet:Set,u0=null,G2=null,U2=null;function YP(z){uZ(null,function(){throw z}),gZ()}var $P=function(z,Q){if(Q.props=z.memoizedProps,Q.state=z.memoizedState,z.mode&z6)try{G8(),Q.componentWillUnmount()}finally{H8(z)}else Q.componentWillUnmount()};function lq(z,Q){try{K7(e6,z)}catch(X){L6(z,Q,X)}}function uY(z,Q,X){try{$P(z,X)}catch(Z){L6(z,Q,Z)}}function HP(z,Q,X){try{X.componentDidMount()}catch(Z){L6(z,Q,Z)}}function dq(z,Q){try{iq(z)}catch(X){L6(z,Q,X)}}function q2(z,Q){var X=z.ref;if(X!==null)if(typeof X==="function"){var Z;try{if(m0&&e0&&z.mode&z6)try{G8(),Z=X(null)}finally{H8(z)}else Z=X(null)}catch(J){L6(z,Q,J)}if(typeof Z==="function")H("Unexpected return value from a callback ref in %s. A callback ref should not return a function.",N1(z))}else X.current=null}function yX(z,Q,X){try{X()}catch(Z){L6(z,Q,Z)}}var cq=null,xq=!1;function GP(z,Q){cq=F_(z.containerInfo),u0=Q,UP();var X=xq;return xq=!1,cq=null,X}function UP(){while(u0!==null){var z=u0,Q=z.child;if((z.subtreeFlags&xZ)!==Q1&&Q!==null)Q.return=z,u0=Q;else qP()}}function qP(){while(u0!==null){var z=u0;V6(z);try{BP(z)}catch(X){L6(z,z.return,X)}q4();var Q=z.sibling;if(Q!==null){Q.return=z.return,u0=Q;return}u0=z.return}}function BP(z){var{alternate:Q,flags:X}=z;if((X&y7)!==Q1){switch(V6(z),z.tag){case L:case k:case d:break;case N:{if(Q!==null){var{memoizedProps:Z,memoizedState:J}=Q,b=z.stateNode;if(z.type===z.elementType&&!Q3){if(b.props!==z.memoizedProps)H("Expected %s props to match memoized props before getSnapshotBeforeUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",N1(z)||"instance");if(b.state!==z.memoizedState)H("Expected %s state to match memoized state before getSnapshotBeforeUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",N1(z)||"instance")}var $=b.getSnapshotBeforeUpdate(z.elementType===z.type?Z:c5(z.type,Z),J);{var U=Eq;if($===void 0&&!U.has(z.type))U.add(z.type),H("%s.getSnapshotBeforeUpdate(): A snapshot value (or null) must be returned. You have returned undefined.",N1(z))}b.__reactInternalSnapshotBeforeUpdate=$}break}case M:{{var q=z.stateNode;o_(q.containerInfo)}break}case w:case v:case F:case c:break;default:throw Error("This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue.")}q4()}}function i5(z,Q,X){var Z=Q.updateQueue,J=Z!==null?Z.lastEffect:null;if(J!==null){var b=J.next,$=b;do{if(($.tag&z)===z){var U=$.destroy;if($.destroy=void 0,U!==void 0){if((z&M4)!==Q5)TL(Q);else if((z&e6)!==Q5)SH(Q);if((z&b8)!==Q5)Rz(!0);if(yX(Q,X,U),(z&b8)!==Q5)Rz(!1);if((z&M4)!==Q5)fL();else if((z&e6)!==Q5)CH()}}$=$.next}while($!==b)}}function K7(z,Q){var X=Q.updateQueue,Z=X!==null?X.lastEffect:null;if(Z!==null){var J=Z.next,b=J;do{if((b.tag&z)===z){if((z&M4)!==Q5)AL(Q);else if((z&e6)!==Q5)SL(Q);var $=b.create;if((z&b8)!==Q5)Rz(!0);if(b.destroy=$(),(z&b8)!==Q5)Rz(!1);if((z&M4)!==Q5)IL();else if((z&e6)!==Q5)CL();{var U=b.destroy;if(U!==void 0&&typeof U!=="function"){var q=void 0;if((b.tag&e6)!==Q1)q="useLayoutEffect";else if((b.tag&b8)!==Q1)q="useInsertionEffect";else q="useEffect";var _=void 0;if(U===null)_=" You returned null. If your effect does not require clean up, return undefined (or nothing).";else if(typeof U.then==="function")_=`
103
-
104
- It looks like you wrote `+q+`(async () => ...) or returned a Promise. Instead, write the async function inside your effect and call it immediately:
105
-
106
- `+q+`(() => {
107
- async function fetchData() {
108
- // You can await here
109
- const response = await MyAPI.getData(someId);
110
- // ...
111
- }
112
- fetchData();
113
- }, [someId]); // Or [] if effect doesn't need props or state
114
-
115
- Learn more about data fetching with Hooks: https://reactjs.org/link/hooks-data-fetching`;else _=" You returned: "+U;H("%s must not return anything besides a function, which is used for clean-up.%s",q,_)}}}b=b.next}while(b!==J)}}function KP(z,Q){if((Q.flags&g1)!==Q1)switch(Q.tag){case E:{var X=Q.stateNode.passiveEffectDuration,Z=Q.memoizedProps,J=Z.id,b=Z.onPostCommit,$=Jq(),U=Q.alternate===null?"mount":"update";if(Zq())U="nested-update";if(typeof b==="function")b(J,U,X,$);var q=Q.return;z:while(q!==null){switch(q.tag){case M:var _=q.stateNode;_.passiveEffectDuration+=X;break z;case E:var R=q.stateNode;R.passiveEffectDuration+=X;break z}q=q.return}break}}}function OP(z,Q,X,Z){if((X.flags&X9)!==Q1)switch(X.tag){case L:case k:case d:{if(!k4)if(X.mode&z6)try{G8(),K7(e6|s6,X)}finally{H8(X)}else K7(e6|s6,X);break}case N:{var J=X.stateNode;if(X.flags&g1){if(!k4)if(Q===null){if(X.type===X.elementType&&!Q3){if(J.props!==X.memoizedProps)H("Expected %s props to match memoized props before componentDidMount. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",N1(X)||"instance");if(J.state!==X.memoizedState)H("Expected %s state to match memoized state before componentDidMount. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",N1(X)||"instance")}if(X.mode&z6)try{G8(),J.componentDidMount()}finally{H8(X)}else J.componentDidMount()}else{var b=X.elementType===X.type?Q.memoizedProps:c5(X.type,Q.memoizedProps),$=Q.memoizedState;if(X.type===X.elementType&&!Q3){if(J.props!==X.memoizedProps)H("Expected %s props to match memoized props before componentDidUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",N1(X)||"instance");if(J.state!==X.memoizedState)H("Expected %s state to match memoized state before componentDidUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",N1(X)||"instance")}if(X.mode&z6)try{G8(),J.componentDidUpdate(b,$,J.__reactInternalSnapshotBeforeUpdate)}finally{H8(X)}else J.componentDidUpdate(b,$,J.__reactInternalSnapshotBeforeUpdate)}}var U=X.updateQueue;if(U!==null){if(X.type===X.elementType&&!Q3){if(J.props!==X.memoizedProps)H("Expected %s props to match memoized props before processing the update queue. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",N1(X)||"instance");if(J.state!==X.memoizedState)H("Expected %s state to match memoized state before processing the update queue. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",N1(X)||"instance")}TU(X,U,J)}break}case M:{var q=X.updateQueue;if(q!==null){var _=null;if(X.child!==null)switch(X.child.tag){case w:_=jJ(X.child.stateNode);break;case N:_=X.child.stateNode;break}TU(X,q,_)}break}case w:{var R=X.stateNode;if(Q===null&&X.flags&g1){var{type:D,memoizedProps:V}=X;y_(R,D,V)}break}case v:break;case F:break;case E:{{var n=X.memoizedProps,t=n.onCommit,s=n.onRender,k0=X.stateNode.effectDuration,o0=Jq(),c0=Q===null?"mount":"update";if(Zq())c0="nested-update";if(typeof s==="function")s(X.memoizedProps.id,c0,X.actualDuration,X.treeBaseDuration,X.actualStartTime,o0);{if(typeof t==="function")t(X.memoizedProps.id,c0,k0,o0);NF(X);var k1=X.return;z:while(k1!==null){switch(k1.tag){case M:var A1=k1.stateNode;A1.effectDuration+=k0;break z;case E:var i=k1.stateNode;i.effectDuration+=k0;break z}k1=k1.return}}}break}case x:{FP(z,X);break}case a:case c:case Q0:case q0:case Y0:case A0:break;default:throw Error("This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue.")}if(!k4){if(X.flags&n8)iq(X)}}function LP(z){switch(z.tag){case L:case k:case d:{if(z.mode&z6)try{G8(),lq(z,z.return)}finally{H8(z)}else lq(z,z.return);break}case N:{var Q=z.stateNode;if(typeof Q.componentDidMount==="function")HP(z,z.return,Q);dq(z,z.return);break}case w:{dq(z,z.return);break}}}function NP(z,Q){var X=null;{var Z=z;while(!0){if(Z.tag===w){if(X===null){X=Z;try{var J=Z.stateNode;if(Q)x_(J);else p_(Z.stateNode,Z.memoizedProps)}catch($){L6(z,z.return,$)}}}else if(Z.tag===v){if(X===null)try{var b=Z.stateNode;if(Q)i_(b);else j_(b,Z.memoizedProps)}catch($){L6(z,z.return,$)}}else if((Z.tag===q0||Z.tag===Y0)&&Z.memoizedState!==null&&Z!==z);else if(Z.child!==null){Z.child.return=Z,Z=Z.child;continue}if(Z===z)return;while(Z.sibling===null){if(Z.return===null||Z.return===z)return;if(X===Z)X=null;Z=Z.return}if(X===Z)X=null;Z.sibling.return=Z.return,Z=Z.sibling}}}function iq(z){var Q=z.ref;if(Q!==null){var X=z.stateNode,Z;switch(z.tag){case w:Z=jJ(X);break;default:Z=X}if(typeof Q==="function"){var J;if(z.mode&z6)try{G8(),J=Q(Z)}finally{H8(z)}else J=Q(Z);if(typeof J==="function")H("Unexpected return value from a callback ref in %s. A callback ref should not return a function.",N1(z))}else{if(!Q.hasOwnProperty("current"))H("Unexpected ref object provided for %s. Use either a ref-setter function or React.createRef().",N1(z));Q.current=Z}}}function WP(z){var Q=z.alternate;if(Q!==null)Q.return=null;z.return=null}function pq(z){var Q=z.alternate;if(Q!==null)z.alternate=null,pq(Q);{if(z.child=null,z.deletions=null,z.sibling=null,z.tag===w){var X=z.stateNode;if(X!==null)vw(X)}z.stateNode=null,z._debugOwner=null,z.return=null,z.dependencies=null,z.memoizedProps=null,z.memoizedState=null,z.pendingProps=null,z.stateNode=null,z.updateQueue=null}}function _P(z){var Q=z.return;while(Q!==null){if(jq(Q))return Q;Q=Q.return}throw Error("Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue.")}function jq(z){return z.tag===w||z.tag===M||z.tag===F}function oq(z){var Q=z;z:while(!0){while(Q.sibling===null){if(Q.return===null||jq(Q.return))return null;Q=Q.return}Q.sibling.return=Q.return,Q=Q.sibling;while(Q.tag!==w&&Q.tag!==v&&Q.tag!==l){if(Q.flags&a6)continue z;if(Q.child===null||Q.tag===F)continue z;else Q.child.return=Q,Q=Q.child}if(!(Q.flags&a6))return Q.stateNode}}function wP(z){var Q=_P(z);switch(Q.tag){case w:{var X=Q.stateNode;if(Q.flags&z9)oG(X),Q.flags&=~z9;var Z=oq(z);EY(z,Z,X);break}case M:case F:{var J=Q.stateNode.containerInfo,b=oq(z);gY(z,b,J);break}default:throw Error("Invalid host parent fiber. This error is likely caused by a bug in React. Please file an issue.")}}function gY(z,Q,X){var Z=z.tag,J=Z===w||Z===v;if(J){var b=z.stateNode;if(Q)E_(X,b,Q);else u_(X,b)}else if(Z===F);else{var $=z.child;if($!==null){gY($,Q,X);var U=$.sibling;while(U!==null)gY(U,Q,X),U=U.sibling}}}function EY(z,Q,X){var Z=z.tag,J=Z===w||Z===v;if(J){var b=z.stateNode;if(Q)g_(X,b,Q);else m_(X,b)}else if(Z===F);else{var $=z.child;if($!==null){EY($,Q,X);var U=$.sibling;while(U!==null)EY(U,Q,X),U=U.sibling}}}var A4=null,p5=!1;function RP(z,Q,X){{var Z=Q;z:while(Z!==null){switch(Z.tag){case w:{A4=Z.stateNode,p5=!1;break z}case M:{A4=Z.stateNode.containerInfo,p5=!0;break z}case F:{A4=Z.stateNode.containerInfo,p5=!0;break z}}Z=Z.return}if(A4===null)throw Error("Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue.");aq(z,Q,X),A4=null,p5=!1}WP(X)}function O7(z,Q,X){var Z=X.child;while(Z!==null)aq(z,Q,Z),Z=Z.sibling}function aq(z,Q,X){switch(FL(X),X.tag){case w:if(!k4)q2(X,Q);case v:{{var Z=A4,J=p5;if(A4=null,O7(z,Q,X),A4=Z,p5=J,A4!==null)if(p5)d_(A4,X.stateNode);else l_(A4,X.stateNode)}return}case l:{if(A4!==null)if(p5)c_(A4,X.stateNode);else nJ(A4,X.stateNode);return}case F:{{var b=A4,$=p5;A4=X.stateNode.containerInfo,p5=!0,O7(z,Q,X),A4=b,p5=$}return}case L:case k:case j:case d:{if(!k4){var U=X.updateQueue;if(U!==null){var q=U.lastEffect;if(q!==null){var _=q.next,R=_;do{var D=R,V=D.destroy,n=D.tag;if(V!==void 0){if((n&b8)!==Q5)yX(X,Q,V);else if((n&e6)!==Q5){if(SH(X),X.mode&z6)G8(),yX(X,Q,V),H8(X);else yX(X,Q,V);CH()}}R=R.next}while(R!==_)}}}O7(z,Q,X);return}case N:{if(!k4){q2(X,Q);var t=X.stateNode;if(typeof t.componentWillUnmount==="function")uY(X,Q,t)}O7(z,Q,X);return}case Q0:{O7(z,Q,X);return}case q0:{if(X.mode&y1){var s=k4;k4=s||X.memoizedState!==null,O7(z,Q,X),k4=s}else O7(z,Q,X);break}default:{O7(z,Q,X);return}}}function PP(z){var Q=z.memoizedState}function FP(z,Q){var X=Q.memoizedState;if(X===null){var Z=Q.alternate;if(Z!==null){var J=Z.memoizedState;if(J!==null){var b=J.dehydrated;if(b!==null)$w(b)}}}}function rq(z){var Q=z.updateQueue;if(Q!==null){z.updateQueue=null;var X=z.stateNode;if(X===null)X=z.stateNode=new bP;Q.forEach(function(Z){var J=MF.bind(null,z,Z);if(!X.has(Z)){if(X.add(Z),D5)if(G2!==null&&U2!==null)wz(U2,G2);else throw Error("Expected finished root and lanes to be set. This is a bug in React.");Z.then(J,J)}})}}function MP(z,Q,X){G2=X,U2=z,V6(Q),nq(Q,z),V6(Q),G2=null,U2=null}function j5(z,Q,X){var Z=Q.deletions;if(Z!==null)for(var J=0;J<Z.length;J++){var b=Z[J];try{RP(z,Q,b)}catch(q){L6(b,Q,q)}}var $=lz();if(Q.subtreeFlags&iZ){var U=Q.child;while(U!==null)V6(U),nq(U,z),U=U.sibling}V6($)}function nq(z,Q,X){var{alternate:Z,flags:J}=z;switch(z.tag){case L:case k:case j:case d:{if(j5(Q,z),U8(z),J&g1){try{i5(b8|s6,z,z.return),K7(b8|s6,z)}catch(Z1){L6(z,z.return,Z1)}if(z.mode&z6){try{G8(),i5(e6|s6,z,z.return)}catch(Z1){L6(z,z.return,Z1)}H8(z)}else try{i5(e6|s6,z,z.return)}catch(Z1){L6(z,z.return,Z1)}}return}case N:{if(j5(Q,z),U8(z),J&n8){if(Z!==null)q2(Z,Z.return)}return}case w:{if(j5(Q,z),U8(z),J&n8){if(Z!==null)q2(Z,Z.return)}{if(z.flags&z9){var b=z.stateNode;try{oG(b)}catch(Z1){L6(z,z.return,Z1)}}if(J&g1){var $=z.stateNode;if($!=null){var U=z.memoizedProps,q=Z!==null?Z.memoizedProps:U,_=z.type,R=z.updateQueue;if(z.updateQueue=null,R!==null)try{V_($,R,_,q,U,z)}catch(Z1){L6(z,z.return,Z1)}}}}return}case v:{if(j5(Q,z),U8(z),J&g1){if(z.stateNode===null)throw Error("This should have a text node initialized. This error is likely caused by a bug in React. Please file an issue.");var{stateNode:D,memoizedProps:V}=z,n=Z!==null?Z.memoizedProps:V;try{D_(D,n,V)}catch(Z1){L6(z,z.return,Z1)}}return}case M:{if(j5(Q,z),U8(z),J&g1){if(Z!==null){var t=Z.memoizedState;if(t.isDehydrated)try{Yw(Q.containerInfo)}catch(Z1){L6(z,z.return,Z1)}}}return}case F:{j5(Q,z),U8(z);return}case x:{j5(Q,z),U8(z);var s=z.child;if(s.flags&V7){var{stateNode:k0,memoizedState:o0}=s,c0=o0!==null;if(k0.isHidden=c0,c0){var k1=s.alternate!==null&&s.alternate.memoizedState!==null;if(!k1)HF()}}if(J&g1){try{PP(z)}catch(Z1){L6(z,z.return,Z1)}rq(z)}return}case q0:{var A1=Z!==null&&Z.memoizedState!==null;if(z.mode&y1){var i=k4;k4=i||A1,j5(Q,z),k4=i}else j5(Q,z);if(U8(z),J&V7){var{stateNode:Z0,memoizedState:p}=z,O0=p!==null,S0=z;if(Z0.isHidden=O0,O0){if(!A1){if((S0.mode&y1)!==n0){u0=S0;var I0=S0.child;while(I0!==null)u0=I0,kP(I0),I0=I0.sibling}}}NP(S0,O0)}return}case a:{if(j5(Q,z),U8(z),J&g1)rq(z);return}case Q0:return;default:{j5(Q,z),U8(z);return}}}function U8(z){var Q=z.flags;if(Q&a6){try{wP(z)}catch(X){L6(z,z.return,X)}z.flags&=~a6}if(Q&F8)z.flags&=~F8}function vP(z,Q,X){G2=X,U2=Q,u0=z,tq(z,Q,X),G2=null,U2=null}function tq(z,Q,X){var Z=(z.mode&y1)!==n0;while(u0!==null){var J=u0,b=J.child;if(J.tag===q0&&Z){var $=J.memoizedState!==null,U=$||hX;if(U){lY(z,Q,X);continue}else{var q=J.alternate,_=q!==null&&q.memoizedState!==null,R=_||k4,D=hX,V=k4;if(hX=U,k4=R,k4&&!V)u0=J,AP(J);var n=b;while(n!==null)u0=n,tq(n,Q,X),n=n.sibling;u0=J,hX=D,k4=V,lY(z,Q,X);continue}}if((J.subtreeFlags&X9)!==Q1&&b!==null)b.return=J,u0=b;else lY(z,Q,X)}}function lY(z,Q,X){while(u0!==null){var Z=u0;if((Z.flags&X9)!==Q1){var J=Z.alternate;V6(Z);try{OP(Q,J,Z,X)}catch($){L6(Z,Z.return,$)}q4()}if(Z===z){u0=null;return}var b=Z.sibling;if(b!==null){b.return=Z.return,u0=b;return}u0=Z.return}}function kP(z){while(u0!==null){var Q=u0,X=Q.child;switch(Q.tag){case L:case k:case j:case d:{if(Q.mode&z6)try{G8(),i5(e6,Q,Q.return)}finally{H8(Q)}else i5(e6,Q,Q.return);break}case N:{q2(Q,Q.return);var Z=Q.stateNode;if(typeof Z.componentWillUnmount==="function")uY(Q,Q.return,Z);break}case w:{q2(Q,Q.return);break}case q0:{var J=Q.memoizedState!==null;if(J){sq(z);continue}break}}if(X!==null)X.return=Q,u0=X;else sq(z)}}function sq(z){while(u0!==null){var Q=u0;if(Q===z){u0=null;return}var X=Q.sibling;if(X!==null){X.return=Q.return,u0=X;return}u0=Q.return}}function AP(z){while(u0!==null){var Q=u0,X=Q.child;if(Q.tag===q0){var Z=Q.memoizedState!==null;if(Z){eq(z);continue}}if(X!==null)X.return=Q,u0=X;else eq(z)}}function eq(z){while(u0!==null){var Q=u0;V6(Q);try{LP(Q)}catch(Z){L6(Q,Q.return,Z)}if(q4(),Q===z){u0=null;return}var X=Q.sibling;if(X!==null){X.return=Q.return,u0=X;return}u0=Q.return}}function IP(z,Q,X,Z){u0=Q,TP(Q,z,X,Z)}function TP(z,Q,X,Z){while(u0!==null){var J=u0,b=J.child;if((J.subtreeFlags&h3)!==Q1&&b!==null)b.return=J,u0=b;else fP(z,Q,X,Z)}}function fP(z,Q,X,Z){while(u0!==null){var J=u0;if((J.flags&V5)!==Q1){V6(J);try{SP(Q,J,X,Z)}catch($){L6(J,J.return,$)}q4()}if(J===z){u0=null;return}var b=J.sibling;if(b!==null){b.return=J.return,u0=b;return}u0=J.return}}function SP(z,Q,X,Z){switch(Q.tag){case L:case k:case d:{if(Q.mode&z6){bY();try{K7(M4|s6,Q)}finally{JY(Q)}}else K7(M4|s6,Q);break}}}function CP(z){u0=z,hP()}function hP(){while(u0!==null){var z=u0,Q=z.child;if((u0.flags&h7)!==Q1){var X=z.deletions;if(X!==null){for(var Z=0;Z<X.length;Z++){var J=X[Z];u0=J,DP(J,z)}{var b=z.alternate;if(b!==null){var $=b.child;if($!==null){b.child=null;do{var U=$.sibling;$.sibling=null,$=U}while($!==null)}}}u0=z}}if((z.subtreeFlags&h3)!==Q1&&Q!==null)Q.return=z,u0=Q;else yP()}}function yP(){while(u0!==null){var z=u0;if((z.flags&V5)!==Q1)V6(z),VP(z),q4();var Q=z.sibling;if(Q!==null){Q.return=z.return,u0=Q;return}u0=z.return}}function VP(z){switch(z.tag){case L:case k:case d:{if(z.mode&z6)bY(),i5(M4|s6,z,z.return),JY(z);else i5(M4|s6,z,z.return);break}}}function DP(z,Q){while(u0!==null){var X=u0;V6(X),uP(X,Q),q4();var Z=X.child;if(Z!==null)Z.return=X,u0=Z;else mP(z)}}function mP(z){while(u0!==null){var Q=u0,X=Q.sibling,Z=Q.return;if(pq(Q),Q===z){u0=null;return}if(X!==null){X.return=Z,u0=X;return}u0=Z}}function uP(z,Q){switch(z.tag){case L:case k:case d:{if(z.mode&z6)bY(),i5(M4,z,Q),JY(z);else i5(M4,z,Q);break}}}function gP(z){switch(z.tag){case L:case k:case d:{try{K7(e6|s6,z)}catch(X){L6(z,z.return,X)}break}case N:{var Q=z.stateNode;try{Q.componentDidMount()}catch(X){L6(z,z.return,X)}break}}}function EP(z){switch(z.tag){case L:case k:case d:{try{K7(M4|s6,z)}catch(Q){L6(z,z.return,Q)}break}}}function lP(z){switch(z.tag){case L:case k:case d:{try{i5(e6|s6,z,z.return)}catch(X){L6(z,z.return,X)}break}case N:{var Q=z.stateNode;if(typeof Q.componentWillUnmount==="function")uY(z,z.return,Q);break}}}function dP(z){switch(z.tag){case L:case k:case d:try{i5(M4|s6,z,z.return)}catch(Q){L6(z,z.return,Q)}}}var cP=0,xP=1,iP=2,pP=3,jP=4;if(typeof Symbol==="function"&&Symbol.for){var Hz=Symbol.for;cP=Hz("selector.component"),xP=Hz("selector.has_pseudo_class"),iP=Hz("selector.role"),pP=Hz("selector.test_id"),jP=Hz("selector.text")}var oP=[];function aP(){oP.forEach(function(z){return z()})}var rP=Y.ReactCurrentActQueue;function nP(z){{var Q=typeof IS_REACT_ACT_ENVIRONMENT<"u"?IS_REACT_ACT_ENVIRONMENT:void 0,X=typeof jest<"u";return X&&Q!==!1}}function zB(){{var z=typeof IS_REACT_ACT_ENVIRONMENT<"u"?IS_REACT_ACT_ENVIRONMENT:void 0;if(!z&&rP.current!==null)H("The current testing environment is not configured to support act(...)");return z}}var tP=Math.ceil,dY=Y.ReactCurrentDispatcher,cY=Y.ReactCurrentOwner,I4=Y.ReactCurrentBatchConfig,o5=Y.ReactCurrentActQueue,X4=0,QB=1,T4=2,M5=4,D8=0,Gz=1,X3=2,VX=3,Uz=4,XB=5,xY=6,V1=X4,j4=null,D6=null,Z4=B0,q8=B0,iY=J7(B0),J4=D8,qz=null,pY=B0,DX=B0,Bz=B0,mX=B0,Kz=null,X5=null,jY=0,ZB=500,JB=1/0,sP=500,m8=null;function Oz(){JB=B4()+sP}function bB(){return JB}var uX=!1,oY=null,B2=null,Z3=!1,L7=null,Lz=B0,aY=[],rY=null,eP=50,Nz=0,nY=null,tY=!1,gX=!1,zF=50,K2=0,EX=null,Wz=P6,lX=B0,YB=!1;function dX(){return j4}function o4(){if((V1&(T4|M5))!==X4)return B4();if(Wz!==P6)return Wz;return Wz=B4(),Wz}function N7(z){var Q=z.mode;if((Q&y1)===n0)return G1;else if((V1&T4)!==X4&&Z4!==B0)return G9(Z4);var X=pw()!==iw;if(X){if(I4.transition!==null){var Z=I4.transition;if(!Z._updatedFibers)Z._updatedFibers=new Set;Z._updatedFibers.add(z)}if(lX===O4)lX=EH();return lX}var J=m5();if(J!==O4)return J;var b=f_();return b}function QF(z){var Q=z.mode;if((Q&y1)===n0)return G1;return eL()}function b4(z,Q,X,Z){if(kF(),YB)H("useInsertionEffect must not schedule updates.");if(tY)gX=!0;if(U9(z,X,Z),(V1&T4)!==B0&&z===j4)TF(Q);else{if(D5)cH(z,Q,X);if(fF(Q),z===j4){if((V1&T4)===X4)Bz=w1(Bz,X);if(J4===Uz)W7(z,Z4)}if(Z5(z,Z),X===G1&&V1===X4&&(Q.mode&y1)===n0&&!o5.isBatchingLegacy)Oz(),bU()}}function XF(z,Q,X){var Z=z.current;Z.lanes=Q,U9(z,Q,X),Z5(z,X)}function ZF(z){return(V1&T4)!==X4}function Z5(z,Q){var X=z.callbackNode;oL(z,Q);var Z=bQ(z,z===j4?Z4:B0);if(Z===B0){if(X!==null)FB(X);z.callbackNode=null,z.callbackPriority=O4;return}var J=d7(Z),b=z.callbackPriority;if(b===J&&!(o5.current!==null&&X!==J$)){if(X==null&&b!==G1)H("Expected scheduled callback to exist. This error is likely caused by a bug in React. Please file an issue.");return}if(X!=null)FB(X);var $;if(J===G1){if(z.tag===b7){if(o5.isBatchingLegacy!==null)o5.didScheduleLegacyUpdate=!0;Iw(GB.bind(null,z))}else JU(GB.bind(null,z));if(o5.current!==null)o5.current.push(Y7);else C_(function(){if((V1&(T4|M5))===X4)Y7()});$=null}else{var U;switch(pH(Z)){case G5:U=QQ;break;case A8:U=pZ;break;case I8:U=u7;break;case GQ:U=jZ;break;default:U=u7;break}$=b$(U,$B.bind(null,z))}z.callbackPriority=J,z.callbackNode=$}function $B(z,Q){if(NR(),Wz=P6,lX=B0,(V1&(T4|M5))!==X4)throw Error("Should not already be working.");var X=z.callbackNode,Z=g8();if(Z){if(z.callbackNode!==X)return null}var J=bQ(z,z===j4?Z4:B0);if(J===B0)return null;var b=!YQ(z,J)&&!sL(z,J)&&!Q,$=b?KF(z,J):xX(z,J);if($!==D8){if($===X3){var U=OJ(z);if(U!==B0)J=U,$=sY(z,U)}if($===Gz){var q=qz;throw J3(z,B0),W7(z,J),Z5(z,B4()),q}if($===xY)W7(z,J);else{var _=!YQ(z,J),R=z.current.alternate;if(_&&!bF(R)){if($=xX(z,J),$===X3){var D=OJ(z);if(D!==B0)J=D,$=sY(z,D)}if($===Gz){var V=qz;throw J3(z,B0),W7(z,J),Z5(z,B4()),V}}z.finishedWork=R,z.finishedLanes=J,JF(z,$,J)}}if(Z5(z,B4()),z.callbackNode===X)return $B.bind(null,z);return null}function sY(z,Q){var X=Kz;if(UQ(z)){var Z=J3(z,Q);Z.flags|=P8,Rw(z.containerInfo)}var J=xX(z,Q);if(J!==X3){var b=X5;if(X5=X,b!==null)HB(b)}return J}function HB(z){if(X5===null)X5=z;else X5.push.apply(X5,z)}function JF(z,Q,X){switch(Q){case D8:case Gz:throw Error("Root did not complete. This is a bug in React.");case X3:{b3(z,X5,m8);break}case VX:{if(W7(z,X),uH(X)&&!MB()){var Z=jY+ZB-B4();if(Z>10){var J=bQ(z,B0);if(J!==B0)break;var b=z.suspendedLanes;if(!u3(b,X)){var $=o4();dH(z,b);break}z.timeoutHandle=aJ(b3.bind(null,z,X5,m8),Z);break}}b3(z,X5,m8);break}case Uz:{if(W7(z,X),tL(X))break;if(!MB()){var U=pL(z,X),q=U,_=B4()-q,R=vF(_)-_;if(R>10){z.timeoutHandle=aJ(b3.bind(null,z,X5,m8),R);break}}b3(z,X5,m8);break}case XB:{b3(z,X5,m8);break}default:throw Error("Unknown root exit status.")}}function bF(z){var Q=z;while(!0){if(Q.flags&ez){var X=Q.updateQueue;if(X!==null){var Z=X.stores;if(Z!==null)for(var J=0;J<Z.length;J++){var b=Z[J],$=b.getSnapshot,U=b.value;try{if(!q5($(),U))return!1}catch(_){return!1}}}}var q=Q.child;if(Q.subtreeFlags&ez&&q!==null){q.return=Q,Q=q;continue}if(Q===z)return!0;while(Q.sibling===null){if(Q.return===null||Q.return===z)return!0;Q=Q.return}Q.sibling.return=Q.return,Q=Q.sibling}return!0}function W7(z,Q){Q=$Q(Q,mX),Q=$Q(Q,Bz),QN(z,Q)}function GB(z){if(WR(),(V1&(T4|M5))!==X4)throw Error("Should not already be working.");g8();var Q=bQ(z,B0);if(!H5(Q,G1))return Z5(z,B4()),null;var X=xX(z,Q);if(z.tag!==b7&&X===X3){var Z=OJ(z);if(Z!==B0)Q=Z,X=sY(z,Z)}if(X===Gz){var J=qz;throw J3(z,B0),W7(z,Q),Z5(z,B4()),J}if(X===xY)throw Error("Root did not complete. This is a bug in React.");var b=z.current.alternate;return z.finishedWork=b,z.finishedLanes=Q,b3(z,X5,m8),Z5(z,B4()),null}function YF(z,Q){if(Q!==B0){if(_J(z,w1(Q,G1)),Z5(z,B4()),(V1&(T4|M5))===X4)Oz(),Y7()}}function eY(z,Q){var X=V1;V1|=QB;try{return z(Q)}finally{if(V1=X,V1===X4&&!o5.isBatchingLegacy)Oz(),bU()}}function $F(z,Q,X,Z,J){var b=m5(),$=I4.transition;try{return I4.transition=null,L4(G5),z(Q,X,Z,J)}finally{if(L4(b),I4.transition=$,V1===X4)Oz()}}function u8(z){if(L7!==null&&L7.tag===b7&&(V1&(T4|M5))===X4)g8();var Q=V1;V1|=QB;var X=I4.transition,Z=m5();try{if(I4.transition=null,L4(G5),z)return z();else return}finally{if(L4(Z),I4.transition=X,V1=Q,(V1&(T4|M5))===X4)Y7()}}function UB(){return(V1&(T4|M5))!==X4}function cX(z,Q){m4(iY,q8,z),q8=w1(q8,Q),pY=w1(pY,Q)}function z$(z){q8=iY.current,D4(iY,z)}function J3(z,Q){z.finishedWork=null,z.finishedLanes=B0;var X=z.timeoutHandle;if(X!==rJ)z.timeoutHandle=rJ,S_(X);if(D6!==null){var Z=D6.return;while(Z!==null){var J=Z.alternate;gq(J,Z),Z=Z.return}}j4=z;var b=Y3(z.current,null);return D6=b,Z4=q8=pY=Q,J4=D8,qz=null,DX=B0,Bz=B0,mX=B0,Kz=null,X5=null,sw(),E5.discardPendingWarnings(),b}function qB(z,Q){do{var X=D6;try{if(nQ(),VU(),q4(),cY.current=null,X===null||X.return===null){J4=Gz,qz=Q,D6=null;return}if(m0&&X.mode&z6)IX(X,!0);if(y0)if(y3(),Q!==null&&typeof Q==="object"&&typeof Q.then==="function"){var Z=Q;yL(X,Z,Z4)}else hL(X,Q,Z4);AR(z,X.return,X,Q,Z4),LB(X)}catch(J){if(Q=J,D6===X&&X!==null)X=X.return,D6=X;else X=D6;continue}return}while(!0)}function BB(){var z=dY.current;if(dY.current=FX,z===null)return FX;else return z}function KB(z){dY.current=z}function HF(){jY=B4()}function _z(z){DX=w1(z,DX)}function GF(){if(J4===D8)J4=VX}function Q$(){if(J4===D8||J4===VX||J4===X3)J4=Uz;if(j4!==null&&(LJ(DX)||LJ(Bz)))W7(j4,Z4)}function UF(z){if(J4!==Uz)J4=X3;if(Kz===null)Kz=[z];else Kz.push(z)}function qF(){return J4===D8}function xX(z,Q){var X=V1;V1|=T4;var Z=BB();if(j4!==z||Z4!==Q){if(D5){var J=z.memoizedUpdaters;if(J.size>0)wz(z,Z4),J.clear();xH(z,Q)}m8=iH(),J3(z,Q)}hH(Q);do try{BF();break}catch(b){qB(z,b)}while(!0);if(nQ(),V1=X,KB(Z),D6!==null)throw Error("Cannot commit an incomplete root. This error is likely caused by a bug in React. Please file an issue.");return yH(),j4=null,Z4=B0,J4}function BF(){while(D6!==null)OB(D6)}function KF(z,Q){var X=V1;V1|=T4;var Z=BB();if(j4!==z||Z4!==Q){if(D5){var J=z.memoizedUpdaters;if(J.size>0)wz(z,Z4),J.clear();xH(z,Q)}m8=iH(),Oz(),J3(z,Q)}hH(Q);do try{OF();break}catch(b){qB(z,b)}while(!0);if(nQ(),KB(Z),V1=X,D6!==null)return gL(),D8;else return yH(),j4=null,Z4=B0,J4}function OF(){while(D6!==null&&!BL())OB(D6)}function OB(z){var Q=z.alternate;V6(z);var X;if((z.mode&z6)!==n0)ZY(z),X=X$(Q,z,q8),IX(z,!0);else X=X$(Q,z,q8);if(q4(),z.memoizedProps=z.pendingProps,X===null)LB(z);else D6=X;cY.current=null}function LB(z){var Q=z;do{var{alternate:X,return:Z}=Q;if((Q.flags&Q9)===Q1){V6(Q);var J=void 0;if((Q.mode&z6)===n0)J=uq(X,Q,q8);else ZY(Q),J=uq(X,Q,q8),IX(Q,!1);if(q4(),J!==null){D6=J;return}}else{var b=JP(X,Q);if(b!==null){b.flags&=YL,D6=b;return}if((Q.mode&z6)!==n0){IX(Q,!1);var{actualDuration:$,child:U}=Q;while(U!==null)$+=U.actualDuration,U=U.sibling;Q.actualDuration=$}if(Z!==null)Z.flags|=Q9,Z.subtreeFlags=Q1,Z.deletions=null;else{J4=xY,D6=null;return}}var q=Q.sibling;if(q!==null){D6=q;return}Q=Z,D6=Q}while(Q!==null);if(J4===D8)J4=XB}function b3(z,Q,X){var Z=m5(),J=I4.transition;try{I4.transition=null,L4(G5),LF(z,Q,X,Z)}finally{I4.transition=J,L4(Z)}return null}function LF(z,Q,X,Z){do g8();while(L7!==null);if(AF(),(V1&(T4|M5))!==X4)throw Error("Should not already be working.");var{finishedWork:J,finishedLanes:b}=z;if(kL(b),J===null)return fH(),null;else if(b===B0)H("root.finishedLanes should not be empty during a commit. This is a bug in React.");if(z.finishedWork=null,z.finishedLanes=B0,J===z.current)throw Error("Cannot commit the same tree as before. This error is likely caused by a bug in React. Please file an issue.");z.callbackNode=null,z.callbackPriority=O4;var $=w1(J.lanes,J.childLanes);if(XN(z,$),z===j4)j4=null,D6=null,Z4=B0;if((J.subtreeFlags&h3)!==Q1||(J.flags&h3)!==Q1){if(!Z3)Z3=!0,rY=X,b$(u7,function(){return g8(),null})}var U=(J.subtreeFlags&(xZ|iZ|X9|h3))!==Q1,q=(J.flags&(xZ|iZ|X9|h3))!==Q1;if(U||q){var _=I4.transition;I4.transition=null;var R=m5();L4(G5);var D=V1;V1|=M5,cY.current=null;var V=GP(z,J);bq(),MP(z,J,b),M_(z.containerInfo),z.current=J,VL(b),vP(J,z,b),DL(),KL(),V1=D,L4(R),I4.transition=_}else z.current=J,bq();var n=Z3;if(Z3)Z3=!1,L7=z,Lz=b;else K2=0,EX=null;if($=z.pendingLanes,$===B0)B2=null;if(!n)wB(z.current,!1);if(RL(J.stateNode,Z),D5)z.memoizedUpdaters.clear();if(aP(),Z5(z,B4()),Q!==null){var t=z.onRecoverableError;for(var s=0;s<Q.length;s++){var k0=Q[s],o0=k0.stack,c0=k0.digest;t(k0.value,{componentStack:o0,digest:c0})}}if(uX){uX=!1;var k1=oY;throw oY=null,k1}if(H5(Lz,G1)&&z.tag!==b7)g8();if($=z.pendingLanes,H5($,G1))if(LR(),z===nY)Nz++;else Nz=0,nY=z;else Nz=0;return Y7(),fH(),null}function g8(){if(L7!==null){var z=pH(Lz),Q=YN(I8,z),X=I4.transition,Z=m5();try{return I4.transition=null,L4(Q),WF()}finally{L4(Z),I4.transition=X}}return!1}function NF(z){if(aY.push(z),!Z3)Z3=!0,b$(u7,function(){return g8(),null})}function WF(){if(L7===null)return!1;var z=rY;rY=null;var Q=L7,X=Lz;if(L7=null,Lz=B0,(V1&(T4|M5))!==X4)throw Error("Cannot flush passive effects while already rendering.");tY=!0,gX=!1,mL(X);var Z=V1;V1|=M5,CP(Q.current),IP(Q,Q.current,X,z);{var J=aY;aY=[];for(var b=0;b<J.length;b++){var $=J[b];KP(Q,$)}}uL(),wB(Q.current,!0),V1=Z,Y7();{if(gX)if(Q===EX)K2++;else K2=0,EX=Q;else K2=0;tY=!1,gX=!1}PL(Q);{var U=Q.current.stateNode;U.effectDuration=0,U.passiveEffectDuration=0}return!0}function NB(z){return B2!==null&&B2.has(z)}function _F(z){if(B2===null)B2=new Set([z]);else B2.add(z)}function wF(z){if(!uX)uX=!0,oY=z}var RF=wF;function WB(z,Q,X){var Z=z3(X,Q),J=Kq(z,Z,G1),b=H7(z,J,G1),$=o4();if(b!==null)U9(b,G1,$),Z5(b,$)}function L6(z,Q,X){if(YP(X),Rz(!1),z.tag===M){WB(z,z,X);return}var Z=null;Z=Q;while(Z!==null){if(Z.tag===M){WB(Z,z,X);return}else if(Z.tag===N){var{type:J,stateNode:b}=Z;if(typeof J.getDerivedStateFromError==="function"||typeof b.componentDidCatch==="function"&&!NB(b)){var $=z3(X,z),U=PY(Z,$,G1),q=H7(Z,U,G1),_=o4();if(q!==null)U9(q,G1,_),Z5(q,_);return}}Z=Z.return}H(`Internal React error: Attempted to capture a commit phase error inside a detached tree. This indicates a bug in React. Likely causes include deleting the same fiber more than once, committing an already-finished tree, or an inconsistent return pointer.
116
-
117
- Error message:
118
-
119
- %s`,X)}function PF(z,Q,X){var Z=z.pingCache;if(Z!==null)Z.delete(Q);var J=o4();if(dH(z,X),SF(z),j4===z&&u3(Z4,X))if(J4===Uz||J4===VX&&uH(Z4)&&B4()-jY<ZB)J3(z,B0);else mX=w1(mX,X);Z5(z,J)}function _B(z,Q){if(Q===O4)Q=QF(z);var X=o4(),Z=z5(z,Q);if(Z!==null)U9(Z,Q,X),Z5(Z,X)}function FF(z){var Q=z.memoizedState,X=O4;if(Q!==null)X=Q.retryLane;_B(z,X)}function MF(z,Q){var X=O4,Z;switch(z.tag){case x:Z=z.stateNode;var J=z.memoizedState;if(J!==null)X=J.retryLane;break;case a:Z=z.stateNode;break;default:throw Error("Pinged unknown suspense boundary type. This is probably a bug in React.")}if(Z!==null)Z.delete(Q);_B(z,X)}function vF(z){return z<120?120:z<480?480:z<1080?1080:z<1920?1920:z<3000?3000:z<4320?4320:tP(z/1960)*1960}function kF(){if(Nz>eP)throw Nz=0,nY=null,Error("Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. React limits the number of nested updates to prevent infinite loops.");if(K2>zF)K2=0,EX=null,H("Maximum update depth exceeded. This can happen when a component calls setState inside useEffect, but useEffect either doesn't have a dependency array, or one of the dependencies changes on every render.")}function AF(){E5.flushLegacyContextWarning(),E5.flushPendingUnsafeLifecycleWarnings()}function wB(z,Q){{if(V6(z),iX(z,M8,lP),Q)iX(z,zQ,dP);if(iX(z,M8,gP),Q)iX(z,zQ,EP);q4()}}function iX(z,Q,X){{var Z=z,J=null;while(Z!==null){var b=Z.subtreeFlags&Q;if(Z!==J&&Z.child!==null&&b!==Q1)Z=Z.child;else{if((Z.flags&Q)!==Q1)X(Z);if(Z.sibling!==null)Z=Z.sibling;else Z=J=Z.return}}}}var pX=null;function RB(z){{if((V1&T4)!==X4)return;if(!(z.mode&y1))return;var Q=z.tag;if(Q!==T&&Q!==M&&Q!==N&&Q!==L&&Q!==k&&Q!==j&&Q!==d)return;var X=N1(z)||"ReactComponent";if(pX!==null){if(pX.has(X))return;pX.add(X)}else pX=new Set([X]);var Z=V4;try{V6(z),H("Can't perform a React state update on a component that hasn't mounted yet. This indicates that you have a side-effect in your render function that asynchronously later calls tries to update the component. Move this work to useEffect instead.")}finally{if(Z)V6(z);else q4()}}}var X$;{var IF=null;X$=function(z,Q,X){var Z=TB(IF,Q);try{return hq(z,Q,X)}catch(b){if(Dw()||b!==null&&typeof b==="object"&&typeof b.then==="function")throw b;if(nQ(),VU(),gq(z,Q),TB(Q,Z),Q.mode&z6)ZY(Q);if(uZ(null,hq,null,z,Q,X),XL()){var J=gZ();if(typeof J==="object"&&J!==null&&J._suppressLogging&&typeof b==="object"&&b!==null&&!b._suppressLogging)b._suppressLogging=!0}throw b}}}var PB=!1,Z$;Z$=new Set;function TF(z){if(T7&&!BR())switch(z.tag){case L:case k:case d:{var Q=D6&&N1(D6)||"Unknown",X=Q;if(!Z$.has(X)){Z$.add(X);var Z=N1(z)||"Unknown";H("Cannot update a component (`%s`) while rendering a different component (`%s`). To locate the bad setState() call inside `%s`, follow the stack trace as described in https://reactjs.org/link/setstate-in-render",Z,Q,Q)}break}case N:{if(!PB)H("Cannot update during an existing state transition (such as within `render`). Render methods should be a pure function of props and state."),PB=!0;break}}}function wz(z,Q){if(D5){var X=z.memoizedUpdaters;X.forEach(function(Z){cH(z,Z,Q)})}}var J$={};function b$(z,Q){{var X=o5.current;if(X!==null)return X.push(Q),J$;else return TH(z,Q)}}function FB(z){if(z===J$)return;return qL(z)}function MB(){return o5.current!==null}function fF(z){{if(z.mode&y1){if(!zB())return}else{if(!nP())return;if(V1!==X4)return;if(z.tag!==L&&z.tag!==k&&z.tag!==d)return}if(o5.current===null){var Q=V4;try{V6(z),H(`An update to %s inside a test was not wrapped in act(...).
120
-
121
- When testing, code that causes React state updates should be wrapped into act(...):
122
-
123
- act(() => {
124
- /* fire events that update state */
125
- });
126
- /* assert on the output */
127
-
128
- This ensures that you're testing the behavior the user would see in the browser. Learn more at https://reactjs.org/link/wrap-tests-with-act`,N1(z))}finally{if(Q)V6(z);else q4()}}}}function SF(z){if(z.tag!==b7&&zB()&&o5.current===null)H(`A suspended resource finished loading inside a test, but the event was not wrapped in act(...).
129
-
130
- When testing, code that resolves suspended data should be wrapped into act(...):
131
-
132
- act(() => {
133
- /* finish loading suspended data */
134
- });
135
- /* assert on the output */
136
-
137
- This ensures that you're testing the behavior the user would see in the browser. Learn more at https://reactjs.org/link/wrap-tests-with-act`)}function Rz(z){YB=z}var v5=null,O2=null,CF=function(z){v5=z};function L2(z){{if(v5===null)return z;var Q=v5(z);if(Q===void 0)return z;return Q.current}}function Y$(z){return L2(z)}function $$(z){{if(v5===null)return z;var Q=v5(z);if(Q===void 0){if(z!==null&&z!==void 0&&typeof z.render==="function"){var X=L2(z.render);if(z.render!==X){var Z={$$typeof:g,render:X};if(z.displayName!==void 0)Z.displayName=z.displayName;return Z}}return z}return Q.current}}function vB(z,Q){{if(v5===null)return!1;var X=z.elementType,Z=Q.type,J=!1,b=typeof Z==="object"&&Z!==null?Z.$$typeof:null;switch(z.tag){case N:{if(typeof Z==="function")J=!0;break}case L:{if(typeof Z==="function")J=!0;else if(b===d0)J=!0;break}case k:{if(b===g)J=!0;else if(b===d0)J=!0;break}case j:case d:{if(b===F0)J=!0;else if(b===d0)J=!0;break}default:return!1}if(J){var $=v5(X);if($!==void 0&&$===v5(Z))return!0}return!1}}function kB(z){{if(v5===null)return;if(typeof WeakSet!=="function")return;if(O2===null)O2=new WeakSet;O2.add(z)}}var hF=function(z,Q){{if(v5===null)return;var{staleFamilies:X,updatedFamilies:Z}=Q;g8(),u8(function(){H$(z.current,Z,X)})}},yF=function(z,Q){{if(z.context!==B5)return;g8(),u8(function(){Pz(Q,z,null,null)})}};function H$(z,Q,X){{var{alternate:Z,child:J,sibling:b,tag:$,type:U}=z,q=null;switch($){case L:case d:case N:q=U;break;case k:q=U.render;break}if(v5===null)throw Error("Expected resolveFamily to be set during hot reload.");var _=!1,R=!1;if(q!==null){var D=v5(q);if(D!==void 0){if(X.has(D))R=!0;else if(Q.has(D))if($===N)R=!0;else _=!0}}if(O2!==null){if(O2.has(z)||Z!==null&&O2.has(Z))R=!0}if(R)z._debugNeedsRemount=!0;if(R||_){var V=z5(z,G1);if(V!==null)b4(V,z,G1,P6)}if(J!==null&&!R)H$(J,Q,X);if(b!==null)H$(b,Q,X)}}var VF=function(z,Q){{var X=new Set,Z=new Set(Q.map(function(J){return J.current}));return G$(z.current,Z,X),X}};function G$(z,Q,X){{var{child:Z,sibling:J,tag:b,type:$}=z,U=null;switch(b){case L:case d:case N:U=$;break;case k:U=$.render;break}var q=!1;if(U!==null){if(Q.has(U))q=!0}if(q)DF(z,X);else if(Z!==null)G$(Z,Q,X);if(J!==null)G$(J,Q,X)}}function DF(z,Q){{var X=mF(z,Q);if(X)return;var Z=z;while(!0){switch(Z.tag){case w:Q.add(Z.stateNode);return;case F:Q.add(Z.stateNode.containerInfo);return;case M:Q.add(Z.stateNode.containerInfo);return}if(Z.return===null)throw Error("Expected to reach root first.");Z=Z.return}}}function mF(z,Q){{var X=z,Z=!1;while(!0){if(X.tag===w)Z=!0,Q.add(X.stateNode);else if(X.child!==null){X.child.return=X,X=X.child;continue}if(X===z)return Z;while(X.sibling===null){if(X.return===null||X.return===z)return Z;X=X.return}X.sibling.return=X.return,X=X.sibling}}return!1}var U$;{U$=!1;try{var AB=Object.preventExtensions({})}catch(z){U$=!0}}function uF(z,Q,X,Z){if(this.tag=z,this.key=X,this.elementType=null,this.type=null,this.stateNode=null,this.return=null,this.child=null,this.sibling=null,this.index=0,this.ref=null,this.pendingProps=Q,this.memoizedProps=null,this.updateQueue=null,this.memoizedState=null,this.dependencies=null,this.mode=Z,this.flags=Q1,this.subtreeFlags=Q1,this.deletions=null,this.lanes=B0,this.childLanes=B0,this.alternate=null,this.actualDuration=Number.NaN,this.actualStartTime=Number.NaN,this.selfBaseDuration=Number.NaN,this.treeBaseDuration=Number.NaN,this.actualDuration=0,this.actualStartTime=-1,this.selfBaseDuration=0,this.treeBaseDuration=0,this._debugSource=null,this._debugOwner=null,this._debugNeedsRemount=!1,this._debugHookTypes=null,!U$&&typeof Object.preventExtensions==="function")Object.preventExtensions(this)}var K5=function(z,Q,X,Z){return new uF(z,Q,X,Z)};function q$(z){var Q=z.prototype;return!!(Q&&Q.isReactComponent)}function gF(z){return typeof z==="function"&&!q$(z)&&z.defaultProps===void 0}function EF(z){if(typeof z==="function")return q$(z)?N:L;else if(z!==void 0&&z!==null){var Q=z.$$typeof;if(Q===g)return k;if(Q===F0)return j}return T}function Y3(z,Q){var X=z.alternate;if(X===null)X=K5(z.tag,Q,z.key,z.mode),X.elementType=z.elementType,X.type=z.type,X.stateNode=z.stateNode,X._debugSource=z._debugSource,X._debugOwner=z._debugOwner,X._debugHookTypes=z._debugHookTypes,X.alternate=z,z.alternate=X;else X.pendingProps=Q,X.type=z.type,X.flags=Q1,X.subtreeFlags=Q1,X.deletions=null,X.actualDuration=0,X.actualStartTime=-1;X.flags=z.flags&v8,X.childLanes=z.childLanes,X.lanes=z.lanes,X.child=z.child,X.memoizedProps=z.memoizedProps,X.memoizedState=z.memoizedState,X.updateQueue=z.updateQueue;var Z=z.dependencies;switch(X.dependencies=Z===null?null:{lanes:Z.lanes,firstContext:Z.firstContext},X.sibling=z.sibling,X.index=z.index,X.ref=z.ref,X.selfBaseDuration=z.selfBaseDuration,X.treeBaseDuration=z.treeBaseDuration,X._debugNeedsRemount=z._debugNeedsRemount,X.tag){case T:case L:case d:X.type=L2(z.type);break;case N:X.type=Y$(z.type);break;case k:X.type=$$(z.type);break}return X}function lF(z,Q){z.flags&=v8|a6;var X=z.alternate;if(X===null)z.childLanes=B0,z.lanes=Q,z.child=null,z.subtreeFlags=Q1,z.memoizedProps=null,z.memoizedState=null,z.updateQueue=null,z.dependencies=null,z.stateNode=null,z.selfBaseDuration=0,z.treeBaseDuration=0;else{z.childLanes=X.childLanes,z.lanes=X.lanes,z.child=X.child,z.subtreeFlags=Q1,z.deletions=null,z.memoizedProps=X.memoizedProps,z.memoizedState=X.memoizedState,z.updateQueue=X.updateQueue,z.type=X.type;var Z=X.dependencies;z.dependencies=Z===null?null:{lanes:Z.lanes,firstContext:Z.firstContext},z.selfBaseDuration=X.selfBaseDuration,z.treeBaseDuration=X.treeBaseDuration}return z}function dF(z,Q,X){var Z;if(z===lQ){if(Z=y1,Q===!0)Z|=g6,Z|=Q8}else Z=n0;if(D5)Z|=z6;return K5(M,null,null,Z)}function B$(z,Q,X,Z,J,b){var $=T,U=z;if(typeof z==="function")if(q$(z))$=N,U=Y$(U);else U=L2(U);else if(typeof z==="string")$=w;else z:switch(z){case d1:return _7(X.children,J,b,Q);case I:if($=A,J|=g6,(J&y1)!==n0)J|=Q8;break;case X0:return cF(X,J,b,Q);case $0:return xF(X,J,b,Q);case N0:return iF(X,J,b,Q);case w0:return IB(X,J,b,Q);case x0:case h0:case S1:case s1:case H0:default:{if(typeof z==="object"&&z!==null)switch(z.$$typeof){case G0:$=y;break z;case P:$=h;break z;case g:$=k,U=$$(U);break z;case F0:$=j;break z;case d0:$=o,U=null;break z}var q="";{if(z===void 0||typeof z==="object"&&z!==null&&Object.keys(z).length===0)q+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.";var _=Z?N1(Z):null;if(_)q+=`
138
-
139
- Check the render method of \``+_+"`."}throw Error("Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) "+("but got: "+(z==null?z:typeof z)+"."+q))}}var R=K5($,X,Q,J);return R.elementType=z,R.type=U,R.lanes=b,R._debugOwner=Z,R}function K$(z,Q,X){var Z=null;Z=z._owner;var{type:J,key:b,props:$}=z,U=B$(J,b,$,Z,Q,X);return U._debugSource=z._source,U._debugOwner=z._owner,U}function _7(z,Q,X,Z){var J=K5(S,z,Z,Q);return J.lanes=X,J}function cF(z,Q,X,Z){if(typeof z.id!=="string")H('Profiler must specify an "id" of type `string` as a prop. Received the type `%s` instead.',typeof z.id);var J=K5(E,z,Z,Q|z6);return J.elementType=X0,J.lanes=X,J.stateNode={effectDuration:0,passiveEffectDuration:0},J}function xF(z,Q,X,Z){var J=K5(x,z,Z,Q);return J.elementType=$0,J.lanes=X,J}function iF(z,Q,X,Z){var J=K5(a,z,Z,Q);return J.elementType=N0,J.lanes=X,J}function IB(z,Q,X,Z){var J=K5(q0,z,Z,Q);J.elementType=w0,J.lanes=X;var b={isHidden:!1};return J.stateNode=b,J}function O$(z,Q,X){var Z=K5(v,z,null,Q);return Z.lanes=X,Z}function pF(){var z=K5(w,null,null,n0);return z.elementType="DELETED",z}function jF(z){var Q=K5(l,null,null,n0);return Q.stateNode=z,Q}function L$(z,Q,X){var Z=z.children!==null?z.children:[],J=K5(F,Z,z.key,Q);return J.lanes=X,J.stateNode={containerInfo:z.containerInfo,pendingChildren:null,implementation:z.implementation},J}function TB(z,Q){if(z===null)z=K5(T,null,null,n0);return z.tag=Q.tag,z.key=Q.key,z.elementType=Q.elementType,z.type=Q.type,z.stateNode=Q.stateNode,z.return=Q.return,z.child=Q.child,z.sibling=Q.sibling,z.index=Q.index,z.ref=Q.ref,z.pendingProps=Q.pendingProps,z.memoizedProps=Q.memoizedProps,z.updateQueue=Q.updateQueue,z.memoizedState=Q.memoizedState,z.dependencies=Q.dependencies,z.mode=Q.mode,z.flags=Q.flags,z.subtreeFlags=Q.subtreeFlags,z.deletions=Q.deletions,z.lanes=Q.lanes,z.childLanes=Q.childLanes,z.alternate=Q.alternate,z.actualDuration=Q.actualDuration,z.actualStartTime=Q.actualStartTime,z.selfBaseDuration=Q.selfBaseDuration,z.treeBaseDuration=Q.treeBaseDuration,z._debugSource=Q._debugSource,z._debugOwner=Q._debugOwner,z._debugNeedsRemount=Q._debugNeedsRemount,z._debugHookTypes=Q._debugHookTypes,z}function oF(z,Q,X,Z,J){this.tag=Q,this.containerInfo=z,this.pendingChildren=null,this.current=null,this.pingCache=null,this.finishedWork=null,this.timeoutHandle=rJ,this.context=null,this.pendingContext=null,this.callbackNode=null,this.callbackPriority=O4,this.eventTimes=WJ(B0),this.expirationTimes=WJ(P6),this.pendingLanes=B0,this.suspendedLanes=B0,this.pingedLanes=B0,this.expiredLanes=B0,this.mutableReadLanes=B0,this.finishedLanes=B0,this.entangledLanes=B0,this.entanglements=WJ(B0),this.identifierPrefix=Z,this.onRecoverableError=J,this.mutableSourceEagerHydrationData=null,this.effectDuration=0,this.passiveEffectDuration=0;{this.memoizedUpdaters=new Set;var b=this.pendingUpdatersLaneMap=[];for(var $=0;$<aZ;$++)b.push(new Set)}switch(Q){case lQ:this._debugRootType=X?"hydrateRoot()":"createRoot()";break;case b7:this._debugRootType=X?"hydrate()":"render()";break}}function fB(z,Q,X,Z,J,b,$,U,q,_){var R=new oF(z,Q,X,U,q),D=dF(Q,b);R.current=D,D.stateNode=R;{var V={element:Z,isDehydrated:X,cache:null,transitions:null,pendingSuspenseBoundaries:null};D.memoizedState=V}return Ab(D),R}var N$="18.3.1";function aF(z,Q,X){var Z=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;return c6(Z),{$$typeof:H6,key:Z==null?null:""+Z,children:z,containerInfo:Q,implementation:X}}var W$,_$;W$=!1,_$={};function SB(z){if(!z)return B5;var Q=S3(z),X=Aw(Q);if(Q.tag===N){var Z=Q.type;if(J8(Z))return XU(Q,Z,X)}return X}function rF(z,Q){{var X=S3(z);if(X===void 0)if(typeof z.render==="function")throw Error("Unable to find node on an unmounted component.");else{var Z=Object.keys(z).join(",");throw Error("Argument appears to not be a ReactComponent. Keys: "+Z)}var J=kH(X);if(J===null)return null;if(J.mode&g6){var b=N1(X)||"Component";if(!_$[b]){_$[b]=!0;var $=V4;try{if(V6(J),X.mode&g6)H("%s is deprecated in StrictMode. %s was passed an instance of %s which is inside StrictMode. Instead, add a ref directly to the element you want to reference. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-find-node",Q,Q,b);else H("%s is deprecated in StrictMode. %s was passed an instance of %s which renders StrictMode children. Instead, add a ref directly to the element you want to reference. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-find-node",Q,Q,b)}finally{if($)V6($);else q4()}}}return J.stateNode}}function CB(z,Q,X,Z,J,b,$,U){var q=!1,_=null;return fB(z,Q,q,_,X,Z,J,b,$)}function hB(z,Q,X,Z,J,b,$,U,q,_){var R=!0,D=fB(X,Z,R,z,J,b,$,U,q);D.context=SB(null);var V=D.current,n=o4(),t=N7(V),s=y8(n,t);return s.callback=Q!==void 0&&Q!==null?Q:null,H7(V,s,t),XF(D,t,n),D}function Pz(z,Q,X,Z){wL(Q,z);var J=Q.current,b=o4(),$=N7(J);EL($);var U=SB(X);if(Q.context===null)Q.context=U;else Q.pendingContext=U;if(T7&&V4!==null&&!W$)W$=!0,H(`Render methods should be a pure function of props and state; triggering nested component updates from render is not allowed. If necessary, trigger nested updates in componentDidUpdate.
140
-
141
- Check the render method of %s.`,N1(V4)||"Unknown");var q=y8(b,$);if(q.payload={element:z},Z=Z===void 0?null:Z,Z!==null){if(typeof Z!=="function")H("render(...): Expected the last optional `callback` argument to be a function. Instead received: %s.",Z);q.callback=Z}var _=H7(J,q,$);if(_!==null)b4(_,J,$,b),QX(_,J,$);return $}function jX(z){var Q=z.current;if(!Q.child)return null;switch(Q.child.tag){case w:return jJ(Q.child.stateNode);default:return Q.child.stateNode}}function nF(z){switch(z.tag){case M:{var Q=z.stateNode;if(UQ(Q)){var X=aL(Q);YF(Q,X)}break}case x:{u8(function(){var J=z5(z,G1);if(J!==null){var b=o4();b4(J,z,G1,b)}});var Z=G1;w$(z,Z);break}}}function yB(z,Q){var X=z.memoizedState;if(X!==null&&X.dehydrated!==null)X.retryLane=zN(X.retryLane,Q)}function w$(z,Q){yB(z,Q);var X=z.alternate;if(X)yB(X,Q)}function tF(z){if(z.tag!==x)return;var Q=Y9,X=z5(z,Q);if(X!==null){var Z=o4();b4(X,z,Q,Z)}w$(z,Q)}function sF(z){if(z.tag!==x)return;var Q=N7(z),X=z5(z,Q);if(X!==null){var Z=o4();b4(X,z,Q,Z)}w$(z,Q)}function VB(z){var Q=UL(z);if(Q===null)return null;return Q.stateNode}var DB=function(z){return null};function eF(z){return DB(z)}var mB=function(z){return!1};function zM(z){return mB(z)}var uB=null,gB=null,EB=null,lB=null,dB=null,cB=null,xB=null,iB=null,pB=null;{var jB=function(z,Q,X){var Z=Q[X],J=i1(z)?z.slice():R1({},z);if(X+1===Q.length){if(i1(J))J.splice(Z,1);else delete J[Z];return J}return J[Z]=jB(z[Z],Q,X+1),J},oB=function(z,Q){return jB(z,Q,0)},aB=function(z,Q,X,Z){var J=Q[Z],b=i1(z)?z.slice():R1({},z);if(Z+1===Q.length){var $=X[Z];if(b[$]=b[J],i1(b))b.splice(J,1);else delete b[J]}else b[J]=aB(z[J],Q,X,Z+1);return b},rB=function(z,Q,X){if(Q.length!==X.length){O("copyWithRename() expects paths of the same length");return}else for(var Z=0;Z<X.length-1;Z++)if(Q[Z]!==X[Z]){O("copyWithRename() expects paths to be the same except for the deepest key");return}return aB(z,Q,X,0)},nB=function(z,Q,X,Z){if(X>=Q.length)return Z;var J=Q[X],b=i1(z)?z.slice():R1({},z);return b[J]=nB(z[J],Q,X+1,Z),b},tB=function(z,Q,X){return nB(z,Q,0,X)},R$=function(z,Q){var X=z.memoizedState;while(X!==null&&Q>0)X=X.next,Q--;return X};uB=function(z,Q,X,Z){var J=R$(z,Q);if(J!==null){var b=tB(J.memoizedState,X,Z);J.memoizedState=b,J.baseState=b,z.memoizedProps=R1({},z.memoizedProps);var $=z5(z,G1);if($!==null)b4($,z,G1,P6)}},gB=function(z,Q,X){var Z=R$(z,Q);if(Z!==null){var J=oB(Z.memoizedState,X);Z.memoizedState=J,Z.baseState=J,z.memoizedProps=R1({},z.memoizedProps);var b=z5(z,G1);if(b!==null)b4(b,z,G1,P6)}},EB=function(z,Q,X,Z){var J=R$(z,Q);if(J!==null){var b=rB(J.memoizedState,X,Z);J.memoizedState=b,J.baseState=b,z.memoizedProps=R1({},z.memoizedProps);var $=z5(z,G1);if($!==null)b4($,z,G1,P6)}},lB=function(z,Q,X){if(z.pendingProps=tB(z.memoizedProps,Q,X),z.alternate)z.alternate.pendingProps=z.pendingProps;var Z=z5(z,G1);if(Z!==null)b4(Z,z,G1,P6)},dB=function(z,Q){if(z.pendingProps=oB(z.memoizedProps,Q),z.alternate)z.alternate.pendingProps=z.pendingProps;var X=z5(z,G1);if(X!==null)b4(X,z,G1,P6)},cB=function(z,Q,X){if(z.pendingProps=rB(z.memoizedProps,Q,X),z.alternate)z.alternate.pendingProps=z.pendingProps;var Z=z5(z,G1);if(Z!==null)b4(Z,z,G1,P6)},xB=function(z){var Q=z5(z,G1);if(Q!==null)b4(Q,z,G1,P6)},iB=function(z){DB=z},pB=function(z){mB=z}}function QM(z){var Q=kH(z);if(Q===null)return null;return Q.stateNode}function XM(z){return null}function ZM(){return V4}function JM(z){var Q=z.findFiberByHostInstance,X=Y.ReactCurrentDispatcher;return _L({bundleType:z.bundleType,version:z.version,rendererPackageName:z.rendererPackageName,rendererConfig:z.rendererConfig,overrideHookState:uB,overrideHookStateDeletePath:gB,overrideHookStateRenamePath:EB,overrideProps:lB,overridePropsDeletePath:dB,overridePropsRenamePath:cB,setErrorHandler:iB,setSuspenseHandler:pB,scheduleUpdate:xB,currentDispatcherRef:X,findHostInstanceByFiber:QM,findFiberByHostInstance:Q||XM,findHostInstancesForRefresh:VF,scheduleRefresh:hF,scheduleRoot:yF,setRefreshHandler:CF,getCurrentFiber:ZM,reconcilerVersion:N$})}var sB=typeof reportError==="function"?reportError:function(z){console.error(z)};function P$(z){this._internalRoot=z}oX.prototype.render=P$.prototype.render=function(z){var Q=this._internalRoot;if(Q===null)throw Error("Cannot update an unmounted root.");{if(typeof arguments[1]==="function")H("render(...): does not support the second callback argument. To execute a side effect after rendering, declare it in a component body with useEffect().");else if(aX(arguments[1]))H("You passed a container to the second argument of root.render(...). You don't need to pass it again since you already passed it to create the root.");else if(typeof arguments[1]<"u")H("You passed a second argument to root.render(...) but it only accepts one argument.");var X=Q.containerInfo;if(X.nodeType!==o6){var Z=VB(Q.current);if(Z){if(Z.parentNode!==X)H("render(...): It looks like the React-rendered content of the root container was removed without using React. This is not supported and will cause errors. Instead, call root.unmount() to empty a root's container.")}}}Pz(z,Q,null,null)},oX.prototype.unmount=P$.prototype.unmount=function(){if(typeof arguments[0]==="function")H("unmount(...): does not support a callback argument. To execute a side effect after rendering, declare it in a component body with useEffect().");var z=this._internalRoot;if(z!==null){this._internalRoot=null;var Q=z.containerInfo;if(UB())H("Attempted to synchronously unmount a root while React was already rendering. React cannot finish unmounting the root until the current render has completed, which may lead to a race condition.");u8(function(){Pz(null,z,null,null)}),nG(Q)}};function bM(z,Q){if(!aX(z))throw Error("createRoot(...): Target container is not a DOM element.");eB(z);var X=!1,Z=!1,J="",b=sB,$=null;if(Q!==null&&Q!==void 0){if(Q.hydrate)O("hydrate through createRoot is deprecated. Use ReactDOMClient.hydrateRoot(container, <App />) instead.");else if(typeof Q==="object"&&Q!==null&&Q.$$typeof===t1)H(`You passed a JSX element to createRoot. You probably meant to call root.render instead. Example usage:
142
-
143
- let root = createRoot(domContainer);
144
- root.render(<App />);`);if(Q.unstable_strictMode===!0)X=!0;if(Q.identifierPrefix!==void 0)J=Q.identifierPrefix;if(Q.onRecoverableError!==void 0)b=Q.onRecoverableError;if(Q.transitionCallbacks!==void 0)$=Q.transitionCallbacks}var U=CB(z,lQ,null,X,Z,J,b);yQ(U.current,z);var q=z.nodeType===o6?z.parentNode:z;return I9(q),new P$(U)}function oX(z){this._internalRoot=z}function YM(z){if(z)WN(z)}oX.prototype.unstable_scheduleHydration=YM;function $M(z,Q,X){if(!aX(z))throw Error("hydrateRoot(...): Target container is not a DOM element.");if(eB(z),Q===void 0)H("Must provide initial children as second argument to hydrateRoot. Example usage: hydrateRoot(domContainer, <App />)");var Z=X!=null?X:null,J=X!=null&&X.hydratedSources||null,b=!1,$=!1,U="",q=sB;if(X!==null&&X!==void 0){if(X.unstable_strictMode===!0)b=!0;if(X.identifierPrefix!==void 0)U=X.identifierPrefix;if(X.onRecoverableError!==void 0)q=X.onRecoverableError}var _=hB(Q,null,z,lQ,Z,b,$,U,q);if(yQ(_.current,z),I9(z),J)for(var R=0;R<J.length;R++){var D=J[R];$R(_,D)}return new oX(_)}function aX(z){return!!(z&&(z.nodeType===s4||z.nodeType===R8||z.nodeType===AZ||!j0))}function Fz(z){return!!(z&&(z.nodeType===s4||z.nodeType===R8||z.nodeType===AZ||z.nodeType===o6&&z.nodeValue===" react-mount-point-unstable "))}function eB(z){{if(z.nodeType===s4&&z.tagName&&z.tagName.toUpperCase()==="BODY")H("createRoot(): Creating roots directly with document.body is discouraged, since its children are often manipulated by third-party scripts and browser extensions. This may lead to subtle reconciliation issues. Try using a container element created for your app.");if(g9(z))if(z._reactRootContainer)H("You are calling ReactDOMClient.createRoot() on a container that was previously passed to ReactDOM.render(). This is not supported.");else H("You are calling ReactDOMClient.createRoot() on a container that has already been passed to createRoot() before. Instead, call root.render() on the existing root instead if you want to update it.")}}var HM=Y.ReactCurrentOwner,zK;zK=function(z){if(z._reactRootContainer&&z.nodeType!==o6){var Q=VB(z._reactRootContainer.current);if(Q){if(Q.parentNode!==z)H("render(...): It looks like the React-rendered content of this container was removed without using React. This is not supported and will cause errors. Instead, call ReactDOM.unmountComponentAtNode to empty a container.")}}var X=!!z._reactRootContainer,Z=F$(z),J=!!(Z&&Z7(Z));if(J&&!X)H("render(...): Replacing React-rendered children with a new root component. If you intended to update the children of this node, you should instead have the existing children update their state and render the new components instead of calling ReactDOM.render.");if(z.nodeType===s4&&z.tagName&&z.tagName.toUpperCase()==="BODY")H("render(): Rendering components directly into document.body is discouraged, since its children are often manipulated by third-party scripts and browser extensions. This may lead to subtle reconciliation issues. Try rendering into a container element created for your app.")};function F$(z){if(!z)return null;if(z.nodeType===R8)return z.documentElement;else return z.firstChild}function QK(){}function GM(z,Q,X,Z,J){if(J){if(typeof Z==="function"){var b=Z;Z=function(){var V=jX($);b.call(V)}}var $=hB(Q,Z,z,b7,null,!1,!1,"",QK);z._reactRootContainer=$,yQ($.current,z);var U=z.nodeType===o6?z.parentNode:z;return I9(U),u8(),$}else{var q;while(q=z.lastChild)z.removeChild(q);if(typeof Z==="function"){var _=Z;Z=function(){var V=jX(R);_.call(V)}}var R=CB(z,b7,null,!1,!1,"",QK);z._reactRootContainer=R,yQ(R.current,z);var D=z.nodeType===o6?z.parentNode:z;return I9(D),u8(function(){Pz(Q,R,X,Z)}),R}}function UM(z,Q){if(z!==null&&typeof z!=="function")H("%s(...): Expected the last optional `callback` argument to be a function. Instead received: %s.",Q,z)}function rX(z,Q,X,Z,J){zK(X),UM(J===void 0?null:J,"render");var b=X._reactRootContainer,$;if(!b)$=GM(X,Q,z,J,Z);else{if($=b,typeof J==="function"){var U=J;J=function(){var q=jX($);U.call(q)}}Pz(Q,$,z,J)}return jX($)}var XK=!1;function qM(z){{if(!XK)XK=!0,H("findDOMNode is deprecated and will be removed in the next major release. Instead, add a ref directly to the element you want to reference. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-find-node");var Q=HM.current;if(Q!==null&&Q.stateNode!==null){var X=Q.stateNode._warnedAboutRefsInRender;if(!X)H("%s is accessing findDOMNode inside its render(). render() should be a pure function of props and state. It should never access something that requires stale data from the previous render, such as refs. Move this logic to componentDidMount and componentDidUpdate instead.",l1(Q.type)||"A component");Q.stateNode._warnedAboutRefsInRender=!0}}if(z==null)return null;if(z.nodeType===s4)return z;return rF(z,"findDOMNode")}function BM(z,Q,X){if(H("ReactDOM.hydrate is no longer supported in React 18. Use hydrateRoot instead. Until you switch to the new API, your app will behave as if it's running React 17. Learn more: https://reactjs.org/link/switch-to-createroot"),!Fz(Q))throw Error("Target container is not a DOM element.");{var Z=g9(Q)&&Q._reactRootContainer===void 0;if(Z)H("You are calling ReactDOM.hydrate() on a container that was previously passed to ReactDOMClient.createRoot(). This is not supported. Did you mean to call hydrateRoot(container, element)?")}return rX(null,z,Q,!0,X)}function KM(z,Q,X){if(H("ReactDOM.render is no longer supported in React 18. Use createRoot instead. Until you switch to the new API, your app will behave as if it's running React 17. Learn more: https://reactjs.org/link/switch-to-createroot"),!Fz(Q))throw Error("Target container is not a DOM element.");{var Z=g9(Q)&&Q._reactRootContainer===void 0;if(Z)H("You are calling ReactDOM.render() on a container that was previously passed to ReactDOMClient.createRoot(). This is not supported. Did you mean to call root.render(element)?")}return rX(null,z,Q,!1,X)}function OM(z,Q,X,Z){if(H("ReactDOM.unstable_renderSubtreeIntoContainer() is no longer supported in React 18. Consider using a portal instead. Until you switch to the createRoot API, your app will behave as if it's running React 17. Learn more: https://reactjs.org/link/switch-to-createroot"),!Fz(X))throw Error("Target container is not a DOM element.");if(z==null||!ZL(z))throw Error("parentComponent must be a valid React Component");return rX(z,Q,X,!1,Z)}var ZK=!1;function LM(z){if(!ZK)ZK=!0,H("unmountComponentAtNode is deprecated and will be removed in the next major release. Switch to the createRoot API. Learn more: https://reactjs.org/link/switch-to-createroot");if(!Fz(z))throw Error("unmountComponentAtNode(...): Target container is not a DOM element.");{var Q=g9(z)&&z._reactRootContainer===void 0;if(Q)H("You are calling ReactDOM.unmountComponentAtNode() on a container that was previously passed to ReactDOMClient.createRoot(). This is not supported. Did you mean to call root.unmount()?")}if(z._reactRootContainer){{var X=F$(z),Z=X&&!Z7(X);if(Z)H("unmountComponentAtNode(): The node you're attempting to unmount was rendered by another copy of React.")}return u8(function(){rX(null,null,z,!1,function(){z._reactRootContainer=null,nG(z)})}),!0}else{{var J=F$(z),b=!!(J&&Z7(J)),$=z.nodeType===s4&&Fz(z.parentNode)&&!!z.parentNode._reactRootContainer;if(b)H("unmountComponentAtNode(): The node you're attempting to unmount was rendered by React and is not a top-level container. %s",$?"You may have accidentally passed in a React root node instead of its container.":"Instead, have the parent component update its state and rerender in order to remove this component.")}return!1}}if($N(nF),GN(tF),UN(sF),qN(m5),BN(JN),typeof Map!=="function"||Map.prototype==null||typeof Map.prototype.forEach!=="function"||typeof Set!=="function"||Set.prototype==null||typeof Set.prototype.clear!=="function"||typeof Set.prototype.forEach!=="function")H("React depends on Map and Set built-in types. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills");jO(K_),rO(eY,$F,u8);function NM(z,Q){var X=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;if(!aX(Q))throw Error("Target container is not a DOM element.");return aF(z,Q,null,X)}function WM(z,Q,X,Z){return OM(z,Q,X,Z)}var M$={usingClientEntryPoint:!1,Events:[Z7,j3,VQ,KH,OH,eY]};function _M(z,Q){if(!M$.usingClientEntryPoint)H('You are importing createRoot from "react-dom" which is not supported. You should instead import it from "react-dom/client".');return bM(z,Q)}function wM(z,Q,X){if(!M$.usingClientEntryPoint)H('You are importing hydrateRoot from "react-dom" which is not supported. You should instead import it from "react-dom/client".');return $M(z,Q,X)}function RM(z){if(UB())H("flushSync was called from inside a lifecycle method. React cannot flush when React is already rendering. Consider moving this call to a scheduler task or micro task.");return u8(z)}var PM=JM({findFiberByHostInstance:p7,bundleType:1,version:N$,rendererPackageName:"react-dom"});if(!PM&&v1&&window.top===window.self){if(navigator.userAgent.indexOf("Chrome")>-1&&navigator.userAgent.indexOf("Edge")===-1||navigator.userAgent.indexOf("Firefox")>-1){var JK=window.location.protocol;if(/^(https?|file):$/.test(JK))console.info("%cDownload the React DevTools for a better development experience: https://reactjs.org/link/react-devtools"+(JK==="file:"?`
145
- You might need to use a local HTTP server (instead of file://): https://reactjs.org/link/react-devtools-faq`:""),"font-weight:bold")}}if(SM.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=M$,SM.createPortal=NM,SM.createRoot=_M,SM.findDOMNode=qM,SM.flushSync=RM,SM.hydrate=BM,SM.hydrateRoot=wM,SM.render=KM,SM.unmountComponentAtNode=LM,SM.unstable_batchedUpdates=eY,SM.unstable_renderSubtreeIntoContainer=WM,SM.version=N$,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop==="function")__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()});var GK=$3((bI,HK)=>{var CM=J0($K());HK.exports=CM});var UK=$3((hM)=>{var _2=J0(GK());W2=_2.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,hM.createRoot=function(Y,G){W2.usingClientEntryPoint=!0;try{return _2.createRoot(Y,G)}finally{W2.usingClientEntryPoint=!1}},hM.hydrateRoot=function(Y,G,B){W2.usingClientEntryPoint=!0;try{return _2.hydrateRoot(Y,G,B)}finally{W2.usingClientEntryPoint=!1}};var W2});var J1=$3((yM)=>{var k$=J0(F1());(function(){var Y=Symbol.for("react.element"),G=Symbol.for("react.portal"),B=Symbol.for("react.fragment"),O=Symbol.for("react.strict_mode"),H=Symbol.for("react.profiler"),W=Symbol.for("react.provider"),L=Symbol.for("react.context"),N=Symbol.for("react.forward_ref"),T=Symbol.for("react.suspense"),M=Symbol.for("react.suspense_list"),F=Symbol.for("react.memo"),w=Symbol.for("react.lazy"),v=Symbol.for("react.offscreen"),S=Symbol.iterator,A="@@iterator";function h(I){if(I===null||typeof I!=="object")return null;var X0=S&&I[S]||I[A];if(typeof X0==="function")return X0;return null}var y=k$.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function k(I){{for(var X0=arguments.length,G0=Array(X0>1?X0-1:0),P=1;P<X0;P++)G0[P-1]=arguments[P];E("error",I,G0)}}function E(I,X0,G0){{var P=y.ReactDebugCurrentFrame,g=P.getStackAddendum();if(g!=="")X0+="%s",G0=G0.concat([g]);var $0=G0.map(function(N0){return String(N0)});$0.unshift("Warning: "+X0),Function.prototype.apply.call(console[I],console,$0)}}var x=!1,j=!1,d=!1,o=!1,c=!1,l;l=Symbol.for("react.module.reference");function a(I){if(typeof I==="string"||typeof I==="function")return!0;if(I===B||I===H||c||I===O||I===T||I===M||o||I===v||x||j||d)return!0;if(typeof I==="object"&&I!==null){if(I.$$typeof===w||I.$$typeof===F||I.$$typeof===W||I.$$typeof===L||I.$$typeof===N||I.$$typeof===l||I.getModuleId!==void 0)return!0}return!1}function Q0(I,X0,G0){var P=I.displayName;if(P)return P;var g=X0.displayName||X0.name||"";return g!==""?G0+"("+g+")":G0}function q0(I){return I.displayName||"Context"}function Y0(I){if(I==null)return null;if(typeof I.tag==="number")k("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue.");if(typeof I==="function")return I.displayName||I.name||null;if(typeof I==="string")return I;switch(I){case B:return"Fragment";case G:return"Portal";case H:return"Profiler";case O:return"StrictMode";case T:return"Suspense";case M:return"SuspenseList"}if(typeof I==="object")switch(I.$$typeof){case L:var X0=I;return q0(X0)+".Consumer";case W:var G0=I;return q0(G0._context)+".Provider";case N:return Q0(I,I.render,"ForwardRef");case F:var P=I.displayName||null;if(P!==null)return P;return Y0(I.type)||"Memo";case w:{var g=I,$0=g._payload,N0=g._init;try{return Y0(N0($0))}catch(F0){return null}}}return null}var L0=Object.assign,A0=0,_0,s0,_1,$1,D1,j0,O1;function e(){}e.__reactDisabledLog=!0;function y0(){{if(A0===0){_0=console.log,s0=console.info,_1=console.warn,$1=console.error,D1=console.group,j0=console.groupCollapsed,O1=console.groupEnd;var I={configurable:!0,enumerable:!0,value:e,writable:!0};Object.defineProperties(console,{info:I,log:I,warn:I,error:I,group:I,groupCollapsed:I,groupEnd:I})}A0++}}function m0(){{if(A0--,A0===0){var I={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:L0({},I,{value:_0}),info:L0({},I,{value:s0}),warn:L0({},I,{value:_1}),error:L0({},I,{value:$1}),group:L0({},I,{value:D1}),groupCollapsed:L0({},I,{value:j0}),groupEnd:L0({},I,{value:O1})})}if(A0<0)k("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var e0=y.ReactCurrentDispatcher,v0;function a0(I,X0,G0){{if(v0===void 0)try{throw Error()}catch(g){var P=g.stack.trim().match(/\n( *(at )?)/);v0=P&&P[1]||""}return`
146
- `+v0+I}}var z1=!1,U0;{var t0=typeof WeakMap==="function"?WeakMap:Map;U0=new t0}function v1(I,X0){if(!I||z1)return"";{var G0=U0.get(I);if(G0!==void 0)return G0}var P;z1=!0;var g=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var $0;$0=e0.current,e0.current=null,y0();try{if(X0){var N0=function(){throw Error()};if(Object.defineProperty(N0.prototype,"props",{set:function(){throw Error()}}),typeof Reflect==="object"&&Reflect.construct){try{Reflect.construct(N0,[])}catch(s1){P=s1}Reflect.construct(I,[],N0)}else{try{N0.call()}catch(s1){P=s1}I.call(N0.prototype)}}else{try{throw Error()}catch(s1){P=s1}I()}}catch(s1){if(s1&&P&&typeof s1.stack==="string"){var F0=s1.stack.split(`
147
- `),d0=P.stack.split(`
148
- `),h0=F0.length-1,H0=d0.length-1;while(h0>=1&&H0>=0&&F0[h0]!==d0[H0])H0--;for(;h0>=1&&H0>=0;h0--,H0--)if(F0[h0]!==d0[H0]){if(h0!==1||H0!==1)do if(h0--,H0--,H0<0||F0[h0]!==d0[H0]){var w0=`
149
- `+F0[h0].replace(" at new "," at ");if(I.displayName&&w0.includes("<anonymous>"))w0=w0.replace("<anonymous>",I.displayName);if(typeof I==="function")U0.set(I,w0);return w0}while(h0>=1&&H0>=0);break}}}finally{z1=!1,e0.current=$0,m0(),Error.prepareStackTrace=g}var x0=I?I.displayName||I.name:"",S1=x0?a0(x0):"";if(typeof I==="function")U0.set(I,S1);return S1}function $6(I,X0,G0){return v1(I,!1)}function T6(I){var X0=I.prototype;return!!(X0&&X0.isReactComponent)}function m1(I,X0,G0){if(I==null)return"";if(typeof I==="function")return v1(I,T6(I));if(typeof I==="string")return a0(I);switch(I){case T:return a0("Suspense");case M:return a0("SuspenseList")}if(typeof I==="object")switch(I.$$typeof){case N:return $6(I.render);case F:return m1(I.type,X0,G0);case w:{var P=I,g=P._payload,$0=P._init;try{return m1($0(g),X0,G0)}catch(N0){}}}return""}var Y1=Object.prototype.hasOwnProperty,p6={},c6=y.ReactDebugCurrentFrame;function F6(I){if(I){var X0=I._owner,G0=m1(I.type,I._source,X0?X0.type:null);c6.setExtraStackFrame(G0)}else c6.setExtraStackFrame(null)}function f6(I,X0,G0,P,g){{var $0=Function.call.bind(Y1);for(var N0 in I)if($0(I,N0)){var F0=void 0;try{if(typeof I[N0]!=="function"){var d0=Error((P||"React class")+": "+G0+" type `"+N0+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof I[N0]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw d0.name="Invariant Violation",d0}F0=I[N0](X0,N0,P,G0,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(h0){F0=h0}if(F0&&!(F0 instanceof Error))F6(g),k("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",P||"React class",G0,N0,typeof F0),F6(null);if(F0 instanceof Error&&!(F0.message in p6))p6[F0.message]=!0,F6(g),k("Failed %s type: %s",G0,F0.message),F6(null)}}}var C5=Array.isArray;function q6(I){return C5(I)}function _4(I){{var X0=typeof Symbol==="function"&&Symbol.toStringTag,G0=X0&&I[Symbol.toStringTag]||I.constructor.name||"Object";return G0}}function B6(I){try{return w4(I),!1}catch(X0){return!0}}function w4(I){return""+I}function w6(I){if(B6(I))return k("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",_4(I)),w4(I)}var M6=y.ReactCurrentOwner,G4={key:!0,ref:!0,__self:!0,__source:!0},h4,m6,j6;j6={};function R0(I){if(Y1.call(I,"ref")){var X0=Object.getOwnPropertyDescriptor(I,"ref").get;if(X0&&X0.isReactWarning)return!1}return I.ref!==void 0}function i0(I){if(Y1.call(I,"key")){var X0=Object.getOwnPropertyDescriptor(I,"key").get;if(X0&&X0.isReactWarning)return!1}return I.key!==void 0}function r0(I,X0){if(typeof I.ref==="string"&&M6.current&&X0&&M6.current.stateNode!==X0){var G0=Y0(M6.current.type);if(!j6[G0])k('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',Y0(M6.current.type),I.ref),j6[G0]=!0}}function u1(I,X0){{var G0=function(){if(!h4)h4=!0,k("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",X0)};G0.isReactWarning=!0,Object.defineProperty(I,"key",{get:G0,configurable:!0})}}function n1(I,X0){{var G0=function(){if(!m6)m6=!0,k("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",X0)};G0.isReactWarning=!0,Object.defineProperty(I,"ref",{get:G0,configurable:!0})}}var S6=function(I,X0,G0,P,g,$0,N0){var F0={$$typeof:Y,type:I,key:X0,ref:G0,props:N0,_owner:$0};if(F0._store={},Object.defineProperty(F0._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(F0,"_self",{configurable:!1,enumerable:!1,writable:!1,value:P}),Object.defineProperty(F0,"_source",{configurable:!1,enumerable:!1,writable:!1,value:g}),Object.freeze)Object.freeze(F0.props),Object.freeze(F0);return F0};function J6(I,X0,G0,P,g){{var $0,N0={},F0=null,d0=null;if(G0!==void 0)w6(G0),F0=""+G0;if(i0(X0))w6(X0.key),F0=""+X0.key;if(R0(X0))d0=X0.ref,r0(X0,g);for($0 in X0)if(Y1.call(X0,$0)&&!G4.hasOwnProperty($0))N0[$0]=X0[$0];if(I&&I.defaultProps){var h0=I.defaultProps;for($0 in h0)if(N0[$0]===void 0)N0[$0]=h0[$0]}if(F0||d0){var H0=typeof I==="function"?I.displayName||I.name||"Unknown":I;if(F0)u1(N0,H0);if(d0)n1(N0,H0)}return S6(I,F0,d0,g,P,M6.current,N0)}}var{ReactCurrentOwner:x6,ReactDebugCurrentFrame:L1}=y;function B1(I){if(I){var X0=I._owner,G0=m1(I.type,I._source,X0?X0.type:null);L1.setExtraStackFrame(G0)}else L1.setExtraStackFrame(null)}var l4=!1;function U4(I){return typeof I==="object"&&I!==null&&I.$$typeof===Y}function d4(){{if(x6.current){var I=Y0(x6.current.type);if(I)return`
150
-
151
- Check the render method of \``+I+"`."}return""}}function n5(I){{if(I!==void 0){var X0=I.fileName.replace(/^.*[\\\/]/,""),G0=I.lineNumber;return`
152
-
153
- Check your code at `+X0+":"+G0+"."}return""}}var h5={};function t5(I){{var X0=d4();if(!X0){var G0=typeof I==="string"?I:I.displayName||I.name;if(G0)X0=`
154
-
155
- Check the top-level render call using <`+G0+">."}return X0}}function N5(I,X0){{if(!I._store||I._store.validated||I.key!=null)return;I._store.validated=!0;var G0=t5(X0);if(h5[G0])return;h5[G0]=!0;var P="";if(I&&I._owner&&I._owner!==x6.current)P=" It was passed a child from "+Y0(I._owner.type)+".";B1(I),k('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',G0,P),B1(null)}}function y4(I,X0){{if(typeof I!=="object")return;if(q6(I))for(var G0=0;G0<I.length;G0++){var P=I[G0];if(U4(P))N5(P,X0)}else if(U4(I)){if(I._store)I._store.validated=!0}else if(I){var g=h(I);if(typeof g==="function"){if(g!==I.entries){var $0=g.call(I),N0;while(!(N0=$0.next()).done)if(U4(N0.value))N5(N0.value,X0)}}}}}function y5(I){{var X0=I.type;if(X0===null||X0===void 0||typeof X0==="string")return;var G0;if(typeof X0==="function")G0=X0.propTypes;else if(typeof X0==="object"&&(X0.$$typeof===N||X0.$$typeof===F))G0=X0.propTypes;else return;if(G0){var P=Y0(X0);f6(G0,I.props,"prop",P,I)}else if(X0.PropTypes!==void 0&&!l4){l4=!0;var g=Y0(X0);k("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",g||"Unknown")}if(typeof X0.getDefaultProps==="function"&&!X0.getDefaultProps.isReactClassApproved)k("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function f1(I){{var X0=Object.keys(I.props);for(var G0=0;G0<X0.length;G0++){var P=X0[G0];if(P!=="children"&&P!=="key"){B1(I),k("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",P),B1(null);break}}if(I.ref!==null)B1(I),k("Invalid attribute `ref` supplied to `React.Fragment`."),B1(null)}}var t1={};function H6(I,X0,G0,P,g,$0){{var N0=a(I);if(!N0){var F0="";if(I===void 0||typeof I==="object"&&I!==null&&Object.keys(I).length===0)F0+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.";var d0=n5(g);if(d0)F0+=d0;else F0+=d4();var h0;if(I===null)h0="null";else if(q6(I))h0="array";else if(I!==void 0&&I.$$typeof===Y)h0="<"+(Y0(I.type)||"Unknown")+" />",F0=" Did you accidentally export a JSX literal instead of a component?";else h0=typeof I;k("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",h0,F0)}var H0=J6(I,X0,G0,g,$0);if(H0==null)return H0;if(N0){var w0=X0.children;if(w0!==void 0)if(P)if(q6(w0)){for(var x0=0;x0<w0.length;x0++)y4(w0[x0],I);if(Object.freeze)Object.freeze(w0)}else k("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else y4(w0,I)}if(Y1.call(X0,"key")){var S1=Y0(I),s1=Object.keys(X0).filter(function(R6){return R6!=="key"}),c4=s1.length>0?"{key: someKey, "+s1.join(": ..., ")+": ...}":"{key: someKey}";if(!t1[S1+c4]){var b5=s1.length>0?"{"+s1.join(": ..., ")+": ...}":"{}";k(`A props object containing a "key" prop is being spread into JSX:
156
- let props = %s;
157
- <%s {...props} />
158
- React keys must be passed directly to JSX without using spread:
159
- let props = %s;
160
- <%s key={someKey} {...props} />`,c4,S1,b5,S1),t1[S1+c4]=!0}}if(I===B)f1(H0);else y5(H0);return H0}}var d1=H6;yM.Fragment=B,yM.jsxDEV=d1})()});var W6=$3((fv)=>{var g$=J0(F1());(function(){var Y=Symbol.for("react.element"),G=Symbol.for("react.portal"),B=Symbol.for("react.fragment"),O=Symbol.for("react.strict_mode"),H=Symbol.for("react.profiler"),W=Symbol.for("react.provider"),L=Symbol.for("react.context"),N=Symbol.for("react.forward_ref"),T=Symbol.for("react.suspense"),M=Symbol.for("react.suspense_list"),F=Symbol.for("react.memo"),w=Symbol.for("react.lazy"),v=Symbol.for("react.offscreen"),S=Symbol.iterator,A="@@iterator";function h(P){if(P===null||typeof P!=="object")return null;var g=S&&P[S]||P[A];if(typeof g==="function")return g;return null}var y=g$.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function k(P){{for(var g=arguments.length,$0=Array(g>1?g-1:0),N0=1;N0<g;N0++)$0[N0-1]=arguments[N0];E("error",P,$0)}}function E(P,g,$0){{var N0=y.ReactDebugCurrentFrame,F0=N0.getStackAddendum();if(F0!=="")g+="%s",$0=$0.concat([F0]);var d0=$0.map(function(h0){return String(h0)});d0.unshift("Warning: "+g),Function.prototype.apply.call(console[P],console,d0)}}var x=!1,j=!1,d=!1,o=!1,c=!1,l;l=Symbol.for("react.module.reference");function a(P){if(typeof P==="string"||typeof P==="function")return!0;if(P===B||P===H||c||P===O||P===T||P===M||o||P===v||x||j||d)return!0;if(typeof P==="object"&&P!==null){if(P.$$typeof===w||P.$$typeof===F||P.$$typeof===W||P.$$typeof===L||P.$$typeof===N||P.$$typeof===l||P.getModuleId!==void 0)return!0}return!1}function Q0(P,g,$0){var N0=P.displayName;if(N0)return N0;var F0=g.displayName||g.name||"";return F0!==""?$0+"("+F0+")":$0}function q0(P){return P.displayName||"Context"}function Y0(P){if(P==null)return null;if(typeof P.tag==="number")k("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue.");if(typeof P==="function")return P.displayName||P.name||null;if(typeof P==="string")return P;switch(P){case B:return"Fragment";case G:return"Portal";case H:return"Profiler";case O:return"StrictMode";case T:return"Suspense";case M:return"SuspenseList"}if(typeof P==="object")switch(P.$$typeof){case L:var g=P;return q0(g)+".Consumer";case W:var $0=P;return q0($0._context)+".Provider";case N:return Q0(P,P.render,"ForwardRef");case F:var N0=P.displayName||null;if(N0!==null)return N0;return Y0(P.type)||"Memo";case w:{var F0=P,d0=F0._payload,h0=F0._init;try{return Y0(h0(d0))}catch(H0){return null}}}return null}var L0=Object.assign,A0=0,_0,s0,_1,$1,D1,j0,O1;function e(){}e.__reactDisabledLog=!0;function y0(){{if(A0===0){_0=console.log,s0=console.info,_1=console.warn,$1=console.error,D1=console.group,j0=console.groupCollapsed,O1=console.groupEnd;var P={configurable:!0,enumerable:!0,value:e,writable:!0};Object.defineProperties(console,{info:P,log:P,warn:P,error:P,group:P,groupCollapsed:P,groupEnd:P})}A0++}}function m0(){{if(A0--,A0===0){var P={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:L0({},P,{value:_0}),info:L0({},P,{value:s0}),warn:L0({},P,{value:_1}),error:L0({},P,{value:$1}),group:L0({},P,{value:D1}),groupCollapsed:L0({},P,{value:j0}),groupEnd:L0({},P,{value:O1})})}if(A0<0)k("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var e0=y.ReactCurrentDispatcher,v0;function a0(P,g,$0){{if(v0===void 0)try{throw Error()}catch(F0){var N0=F0.stack.trim().match(/\n( *(at )?)/);v0=N0&&N0[1]||""}return`
161
- `+v0+P}}var z1=!1,U0;{var t0=typeof WeakMap==="function"?WeakMap:Map;U0=new t0}function v1(P,g){if(!P||z1)return"";{var $0=U0.get(P);if($0!==void 0)return $0}var N0;z1=!0;var F0=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var d0;d0=e0.current,e0.current=null,y0();try{if(g){var h0=function(){throw Error()};if(Object.defineProperty(h0.prototype,"props",{set:function(){throw Error()}}),typeof Reflect==="object"&&Reflect.construct){try{Reflect.construct(h0,[])}catch(R6){N0=R6}Reflect.construct(P,[],h0)}else{try{h0.call()}catch(R6){N0=R6}P.call(h0.prototype)}}else{try{throw Error()}catch(R6){N0=R6}P()}}catch(R6){if(R6&&N0&&typeof R6.stack==="string"){var H0=R6.stack.split(`
162
- `),w0=N0.stack.split(`
163
- `),x0=H0.length-1,S1=w0.length-1;while(x0>=1&&S1>=0&&H0[x0]!==w0[S1])S1--;for(;x0>=1&&S1>=0;x0--,S1--)if(H0[x0]!==w0[S1]){if(x0!==1||S1!==1)do if(x0--,S1--,S1<0||H0[x0]!==w0[S1]){var s1=`
164
- `+H0[x0].replace(" at new "," at ");if(P.displayName&&s1.includes("<anonymous>"))s1=s1.replace("<anonymous>",P.displayName);if(typeof P==="function")U0.set(P,s1);return s1}while(x0>=1&&S1>=0);break}}}finally{z1=!1,e0.current=d0,m0(),Error.prepareStackTrace=F0}var c4=P?P.displayName||P.name:"",b5=c4?a0(c4):"";if(typeof P==="function")U0.set(P,b5);return b5}function $6(P,g,$0){return v1(P,!1)}function T6(P){var g=P.prototype;return!!(g&&g.isReactComponent)}function m1(P,g,$0){if(P==null)return"";if(typeof P==="function")return v1(P,T6(P));if(typeof P==="string")return a0(P);switch(P){case T:return a0("Suspense");case M:return a0("SuspenseList")}if(typeof P==="object")switch(P.$$typeof){case N:return $6(P.render);case F:return m1(P.type,g,$0);case w:{var N0=P,F0=N0._payload,d0=N0._init;try{return m1(d0(F0),g,$0)}catch(h0){}}}return""}var Y1=Object.prototype.hasOwnProperty,p6={},c6=y.ReactDebugCurrentFrame;function F6(P){if(P){var g=P._owner,$0=m1(P.type,P._source,g?g.type:null);c6.setExtraStackFrame($0)}else c6.setExtraStackFrame(null)}function f6(P,g,$0,N0,F0){{var d0=Function.call.bind(Y1);for(var h0 in P)if(d0(P,h0)){var H0=void 0;try{if(typeof P[h0]!=="function"){var w0=Error((N0||"React class")+": "+$0+" type `"+h0+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof P[h0]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw w0.name="Invariant Violation",w0}H0=P[h0](g,h0,N0,$0,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(x0){H0=x0}if(H0&&!(H0 instanceof Error))F6(F0),k("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",N0||"React class",$0,h0,typeof H0),F6(null);if(H0 instanceof Error&&!(H0.message in p6))p6[H0.message]=!0,F6(F0),k("Failed %s type: %s",$0,H0.message),F6(null)}}}var C5=Array.isArray;function q6(P){return C5(P)}function _4(P){{var g=typeof Symbol==="function"&&Symbol.toStringTag,$0=g&&P[Symbol.toStringTag]||P.constructor.name||"Object";return $0}}function B6(P){try{return w4(P),!1}catch(g){return!0}}function w4(P){return""+P}function w6(P){if(B6(P))return k("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",_4(P)),w4(P)}var M6=y.ReactCurrentOwner,G4={key:!0,ref:!0,__self:!0,__source:!0},h4,m6,j6;j6={};function R0(P){if(Y1.call(P,"ref")){var g=Object.getOwnPropertyDescriptor(P,"ref").get;if(g&&g.isReactWarning)return!1}return P.ref!==void 0}function i0(P){if(Y1.call(P,"key")){var g=Object.getOwnPropertyDescriptor(P,"key").get;if(g&&g.isReactWarning)return!1}return P.key!==void 0}function r0(P,g){if(typeof P.ref==="string"&&M6.current&&g&&M6.current.stateNode!==g){var $0=Y0(M6.current.type);if(!j6[$0])k('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',Y0(M6.current.type),P.ref),j6[$0]=!0}}function u1(P,g){{var $0=function(){if(!h4)h4=!0,k("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",g)};$0.isReactWarning=!0,Object.defineProperty(P,"key",{get:$0,configurable:!0})}}function n1(P,g){{var $0=function(){if(!m6)m6=!0,k("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",g)};$0.isReactWarning=!0,Object.defineProperty(P,"ref",{get:$0,configurable:!0})}}var S6=function(P,g,$0,N0,F0,d0,h0){var H0={$$typeof:Y,type:P,key:g,ref:$0,props:h0,_owner:d0};if(H0._store={},Object.defineProperty(H0._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(H0,"_self",{configurable:!1,enumerable:!1,writable:!1,value:N0}),Object.defineProperty(H0,"_source",{configurable:!1,enumerable:!1,writable:!1,value:F0}),Object.freeze)Object.freeze(H0.props),Object.freeze(H0);return H0};function J6(P,g,$0,N0,F0){{var d0,h0={},H0=null,w0=null;if($0!==void 0)w6($0),H0=""+$0;if(i0(g))w6(g.key),H0=""+g.key;if(R0(g))w0=g.ref,r0(g,F0);for(d0 in g)if(Y1.call(g,d0)&&!G4.hasOwnProperty(d0))h0[d0]=g[d0];if(P&&P.defaultProps){var x0=P.defaultProps;for(d0 in x0)if(h0[d0]===void 0)h0[d0]=x0[d0]}if(H0||w0){var S1=typeof P==="function"?P.displayName||P.name||"Unknown":P;if(H0)u1(h0,S1);if(w0)n1(h0,S1)}return S6(P,H0,w0,F0,N0,M6.current,h0)}}var{ReactCurrentOwner:x6,ReactDebugCurrentFrame:L1}=y;function B1(P){if(P){var g=P._owner,$0=m1(P.type,P._source,g?g.type:null);L1.setExtraStackFrame($0)}else L1.setExtraStackFrame(null)}var l4=!1;function U4(P){return typeof P==="object"&&P!==null&&P.$$typeof===Y}function d4(){{if(x6.current){var P=Y0(x6.current.type);if(P)return`
165
-
166
- Check the render method of \``+P+"`."}return""}}function n5(P){{if(P!==void 0){var g=P.fileName.replace(/^.*[\\\/]/,""),$0=P.lineNumber;return`
167
-
168
- Check your code at `+g+":"+$0+"."}return""}}var h5={};function t5(P){{var g=d4();if(!g){var $0=typeof P==="string"?P:P.displayName||P.name;if($0)g=`
169
-
170
- Check the top-level render call using <`+$0+">."}return g}}function N5(P,g){{if(!P._store||P._store.validated||P.key!=null)return;P._store.validated=!0;var $0=t5(g);if(h5[$0])return;h5[$0]=!0;var N0="";if(P&&P._owner&&P._owner!==x6.current)N0=" It was passed a child from "+Y0(P._owner.type)+".";B1(P),k('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',$0,N0),B1(null)}}function y4(P,g){{if(typeof P!=="object")return;if(q6(P))for(var $0=0;$0<P.length;$0++){var N0=P[$0];if(U4(N0))N5(N0,g)}else if(U4(P)){if(P._store)P._store.validated=!0}else if(P){var F0=h(P);if(typeof F0==="function"){if(F0!==P.entries){var d0=F0.call(P),h0;while(!(h0=d0.next()).done)if(U4(h0.value))N5(h0.value,g)}}}}}function y5(P){{var g=P.type;if(g===null||g===void 0||typeof g==="string")return;var $0;if(typeof g==="function")$0=g.propTypes;else if(typeof g==="object"&&(g.$$typeof===N||g.$$typeof===F))$0=g.propTypes;else return;if($0){var N0=Y0(g);f6($0,P.props,"prop",N0,P)}else if(g.PropTypes!==void 0&&!l4){l4=!0;var F0=Y0(g);k("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",F0||"Unknown")}if(typeof g.getDefaultProps==="function"&&!g.getDefaultProps.isReactClassApproved)k("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function f1(P){{var g=Object.keys(P.props);for(var $0=0;$0<g.length;$0++){var N0=g[$0];if(N0!=="children"&&N0!=="key"){B1(P),k("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",N0),B1(null);break}}if(P.ref!==null)B1(P),k("Invalid attribute `ref` supplied to `React.Fragment`."),B1(null)}}var t1={};function H6(P,g,$0,N0,F0,d0){{var h0=a(P);if(!h0){var H0="";if(P===void 0||typeof P==="object"&&P!==null&&Object.keys(P).length===0)H0+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.";var w0=n5(F0);if(w0)H0+=w0;else H0+=d4();var x0;if(P===null)x0="null";else if(q6(P))x0="array";else if(P!==void 0&&P.$$typeof===Y)x0="<"+(Y0(P.type)||"Unknown")+" />",H0=" Did you accidentally export a JSX literal instead of a component?";else x0=typeof P;k("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",x0,H0)}var S1=J6(P,g,$0,F0,d0);if(S1==null)return S1;if(h0){var s1=g.children;if(s1!==void 0)if(N0)if(q6(s1)){for(var c4=0;c4<s1.length;c4++)y4(s1[c4],P);if(Object.freeze)Object.freeze(s1)}else k("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else y4(s1,P)}if(Y1.call(g,"key")){var b5=Y0(P),R6=Object.keys(g).filter(function(s5){return s5!=="key"}),R1=R6.length>0?"{key: someKey, "+R6.join(": ..., ")+": ...}":"{key: someKey}";if(!t1[b5+R1]){var L8=R6.length>0?"{"+R6.join(": ..., ")+": ...}":"{}";k(`A props object containing a "key" prop is being spread into JSX:
171
- let props = %s;
172
- <%s {...props} />
173
- React keys must be passed directly to JSX without using spread:
174
- let props = %s;
175
- <%s key={someKey} {...props} />`,R1,b5,L8,b5),t1[b5+R1]=!0}}if(P===B)f1(S1);else y5(S1);return S1}}function d1(P,g,$0){return H6(P,g,$0,!0)}function I(P,g,$0){return H6(P,g,$0,!1)}var X0=I,G0=d1;fv.Fragment=B,fv.jsx=X0,fv.jsxs=G0})()});var S5=J0(F1(),1),ZO=J0(UK(),1);var v$={memory:!0,tasks:!1,vision:!0,operator:!1,mcp:!1,realtime:!1,files:!1,agents:!1};var Y4=J0(F1(),1),BK=J0(J1(),1),qK=Y4.createContext(null),VM=200;function A$({children:Y}){let[G,B]=Y4.useState(!1),[O,H]=Y4.useState([]),[W,L]=Y4.useState({}),[N,T]=Y4.useState({}),M=Y4.useRef(null),F=Y4.useRef(null);Y4.useEffect(()=>{let S=setInterval(()=>{let A=Date.now();T((h)=>{let y={};for(let[k,E]of Object.entries(h))if(E.expiresAt>A)y[k]=E;return y})},500);return()=>clearInterval(S)},[]);let w=Y4.useCallback(()=>{if(M.current)M.current.close(),M.current=null;try{let S=new EventSource("/api/telemetry/stream");M.current=S,S.onopen=()=>{B(!0)},S.onmessage=(A)=>{if(!A.data||A.data.trim()==="")return;try{let h=JSON.parse(A.data);if(h.connected){B(!0);return}if(Array.isArray(h))H((y)=>{return[...h,...y].slice(0,VM)}),L((y)=>{let k={...y};for(let E of h){let x=k[E.agent_id];if(!x||new Date(E.timestamp)>new Date(x.timestamp))k[E.agent_id]={timestamp:E.timestamp,category:E.category,type:E.type}}return k}),T((y)=>{let k={...y},E=Date.now()+3000;for(let x of h)k[x.agent_id]={type:x.type,expiresAt:E};return k})}catch{}},S.onerror=()=>{if(B(!1),S.close(),M.current=null,F.current)clearTimeout(F.current);F.current=setTimeout(w,2000)}}catch{if(B(!1),F.current)clearTimeout(F.current);F.current=setTimeout(w,2000)}},[]);Y4.useEffect(()=>{return w(),()=>{if(M.current)M.current.close();if(F.current)clearTimeout(F.current)}},[w]);let v=Y4.useCallback(()=>{H([])},[]);return BK.jsxDEV(qK.Provider,{value:{connected:G,events:O,lastActivityByAgent:W,activeAgents:N,clearEvents:v},children:Y},void 0,!1,void 0,this)}function w2(){let Y=Y4.useContext(qK);if(!Y)throw Error("useTelemetryContext must be used within TelemetryProvider");return Y}function kz(Y){let{activeAgents:G}=w2(),B=G[Y];return{isActive:!!B,type:B?.type}}var C6=J0(F1(),1),OK=J0(J1(),1),KK=C6.createContext(null);function C1(){let Y=C6.useContext(KK);if(!Y)throw Error("useAuth must be used within an AuthProvider");return Y}function I$({children:Y}){let[G,B]=C6.useState(null),[O,H]=C6.useState(null),[W,L]=C6.useState(!0),[N,T]=C6.useState(null),M=C6.useRef(null),F=C6.useRef(!1),w=C6.useRef(!1),v=C6.useCallback((j)=>{M.current=j,H(j)},[]),S=C6.useCallback(async()=>{if(F.current)return!1;F.current=!0;try{let j=await fetch("/api/auth/refresh",{method:"POST",credentials:"include"});if(!j.ok)return!1;let d=await j.json();v(d.accessToken);let o=await fetch("/api/auth/me",{headers:{Authorization:`Bearer ${d.accessToken}`}});if(o.ok){let c=await o.json();return B(c.user),!0}return!1}catch(j){return console.error("Token refresh failed:",j),!1}finally{F.current=!1}},[v]),A=C6.useCallback(async()=>{try{let j=M.current,o=await(await fetch("/api/auth/check",{headers:j?{Authorization:`Bearer ${j}`}:{}})).json();if(T(o.hasUsers),o.authenticated&&o.user)B(o.user);else if(B(null),o.hasUsers){if(!await S())v(null)}}catch(j){console.error("Auth check failed:",j),B(null),v(null)}finally{L(!1)}},[S,v]),h=C6.useCallback(async(j,d)=>{try{let o=await fetch("/api/auth/login",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({username:j,password:d})}),c=await o.json();if(!o.ok)return{success:!1,error:c.error||"Login failed"};return v(c.accessToken),B(c.user),T(!0),{success:!0}}catch(o){return console.error("Login failed:",o),{success:!1,error:"Login failed"}}},[v]),y=C6.useCallback(async()=>{try{let j=M.current;await fetch("/api/auth/logout",{method:"POST",credentials:"include",headers:j?{Authorization:`Bearer ${j}`}:{}})}catch(j){console.error("Logout failed:",j)}finally{B(null),v(null)}},[v]),k=C6.useCallback(async(j,d={})=>{let o=new Headers(d.headers),c=M.current;if(c)o.set("Authorization",`Bearer ${c}`);return fetch(j,{...d,headers:o})},[]),E=C6.useCallback(async()=>{return S()},[S]);C6.useEffect(()=>{if(w.current)return;w.current=!0,A()},[A]),C6.useEffect(()=>{if(!O)return;let j=setInterval(()=>{S()},840000);return()=>clearInterval(j)},[O,S]);let x={user:G,isAuthenticated:!!G,isLoading:W,hasUsers:N,accessToken:O,login:h,logout:y,refreshToken:E,checkAuth:A,authFetch:k};return OK.jsxDEV(KK.Provider,{value:x,children:Y},void 0,!1,void 0,this)}var N4=J0(F1(),1);var NK=J0(J1(),1),LK=N4.createContext(null);function W4(){let Y=N4.useContext(LK);if(!Y)throw Error("useProjects must be used within a ProjectProvider");return Y}var T$="apteva_current_project";function f$({children:Y}){let{authFetch:G,isAuthenticated:B,isLoading:O}=C1(),[H,W]=N4.useState([]),[L,N]=N4.useState(()=>{if(typeof window<"u")return localStorage.getItem(T$);return null}),[T,M]=N4.useState(!0),[F,w]=N4.useState(null),[v,S]=N4.useState(0),A=N4.useCallback((d)=>{if(N(d),typeof window<"u")if(d===null)localStorage.removeItem(T$);else localStorage.setItem(T$,d)},[]),h=H.find((d)=>d.id===L)||null,y=N4.useCallback(async()=>{if(!B&&!O){W([]),M(!1);return}try{w(null);let d=await G("/api/projects");if(!d.ok)throw Error("Failed to fetch projects");let o=await d.json();if(W(o.projects||[]),S(o.unassignedCount||0),L&&L!=="unassigned"&&!o.projects.find((c)=>c.id===L))A(null)}catch(d){console.error("Failed to fetch projects:",d),w("Failed to load projects")}finally{M(!1)}},[G,B,O,L,A]),k=N4.useCallback(async(d)=>{try{let o=await G("/api/projects",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(d)});if(!o.ok){let l=await o.json();throw Error(l.error||"Failed to create project")}let c=await o.json();return await y(),c.project}catch(o){return console.error("Failed to create project:",o),null}},[G,y]),E=N4.useCallback(async(d,o)=>{try{let c=await G(`/api/projects/${d}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(o)});if(!c.ok){let a=await c.json();throw Error(a.error||"Failed to update project")}let l=await c.json();return await y(),l.project}catch(c){return console.error("Failed to update project:",c),null}},[G,y]),x=N4.useCallback(async(d)=>{try{let o=await G(`/api/projects/${d}`,{method:"DELETE"});if(!o.ok){let c=await o.json();throw Error(c.error||"Failed to delete project")}if(L===d)A(null);return await y(),!0}catch(o){return console.error("Failed to delete project:",o),!1}},[G,L,A,y]);N4.useEffect(()=>{if(!O)y()},[O,y]);let j={projects:H,currentProjectId:L,currentProject:h,isLoading:T,error:F,unassignedCount:v,setCurrentProjectId:A,createProject:k,updateProject:E,deleteProject:x,refreshProjects:y};return NK.jsxDEV(LK.Provider,{value:j,children:Y},void 0,!1,void 0,this)}var w7=J0(F1(),1);function S$(Y){let{accessToken:G}=C1(),[B,O]=w7.useState([]),[H,W]=w7.useState(!0),L=w7.useCallback(()=>{let S={"Content-Type":"application/json"};if(G)S.Authorization=`Bearer ${G}`;return S},[G]),N=w7.useCallback(async()=>{let A=await(await fetch("/api/agents",{headers:L()})).json();O(A.agents||[]),W(!1)},[L]);w7.useEffect(()=>{if(Y)N()},[Y,N]);let T=async(S)=>{await fetch("/api/agents",{method:"POST",headers:L(),body:JSON.stringify(S)}),await N()},M=async(S)=>{await fetch(`/api/agents/${S}`,{method:"DELETE",headers:L()}),await N()},F=async(S,A)=>{let h=await fetch(`/api/agents/${S}`,{method:"PUT",headers:L(),body:JSON.stringify(A)}),y=await h.json();if(await N(),!h.ok&&y.error)return{error:y.error};return{}},w=async(S)=>{let A=S.status==="running"?"stop":"start",h=await fetch(`/api/agents/${S.id}/${A}`,{method:"POST",headers:L()}),y=await h.json();if(await N(),!h.ok&&y.error)return{error:y.error};return{}},v=B.filter((S)=>S.status==="running").length;return{agents:B,loading:H,runningCount:v,fetchAgents:N,createAgent:T,updateAgent:F,deleteAgent:M,toggleAgent:w}}var G3=J0(F1(),1);function C$(Y){let{accessToken:G}=C1(),[B,O]=G3.useState([]),H=G3.useCallback(()=>{let M={"Content-Type":"application/json"};if(G)M.Authorization=`Bearer ${G}`;return M},[G]),W=G3.useCallback(async()=>{let F=await(await fetch("/api/providers",{headers:H()})).json();O(F.providers||[])},[H]);G3.useEffect(()=>{if(Y)W()},[Y,W]);let L=B.filter((M)=>M.hasKey);return{providers:B,configuredProviders:L,fetchProviders:W,saveKey:async(M,F)=>{let v=await(await fetch(`/api/keys/${M}/test`,{method:"POST",headers:H(),body:JSON.stringify({key:F})})).json();if(!v.valid)return{success:!1,error:v.error||"API key is invalid"};let S=await fetch(`/api/keys/${M}`,{method:"POST",headers:H(),body:JSON.stringify({key:F})});if(!S.ok)return{success:!1,error:(await S.json()).error||"Failed to save key"};return await W(),{success:!0}},deleteKey:async(M)=>{await fetch(`/api/keys/${M}`,{method:"DELETE",headers:H()}),await W()}}}var U3=J0(F1(),1);function h$(){let{accessToken:Y,isAuthenticated:G}=C1(),[B,O]=U3.useState(null),H=U3.useCallback(()=>{let L={};if(Y)L.Authorization=`Bearer ${Y}`;return L},[Y]);U3.useEffect(()=>{if(!G){O(null);return}fetch("/api/onboarding/status",{headers:H()}).then((L)=>L.json()).then((L)=>{O(L.completed||L.has_any_keys)}).catch(()=>O(!0))},[G,H]);let W=U3.useCallback(async()=>{await fetch("/api/onboarding/complete",{method:"POST",headers:H()}),O(!0)},[H]);return{isComplete:B,setIsComplete:O,complete:W}}var R7=J0(J1(),1);function q3({message:Y="Loading...",fullScreen:G=!1}){let B=R7.jsxDEV("div",{className:"flex items-center gap-3 text-[#666]",children:[R7.jsxDEV("svg",{className:"animate-spin h-5 w-5",viewBox:"0 0 24 24",children:[R7.jsxDEV("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4",fill:"none"},void 0,!1,void 0,this),R7.jsxDEV("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),R7.jsxDEV("span",{children:Y},void 0,!1,void 0,this)]},void 0,!0,void 0,this);if(G)return R7.jsxDEV("div",{className:"min-h-screen bg-[#0a0a0a] text-[#e0e0e0] font-mono flex items-center justify-center",children:B},void 0,!1,void 0,this);return R7.jsxDEV("div",{className:"flex items-center justify-center py-20",children:B},void 0,!1,void 0,this)}var l8=J0(F1(),1),$4=J0(J1(),1);function R2({children:Y,onClose:G}){return $4.jsxDEV("div",{className:"fixed inset-0 bg-black/70 flex items-center justify-center z-50 p-4",children:$4.jsxDEV("div",{className:"bg-[#111] rounded p-6 w-full max-w-xl lg:max-w-2xl border border-[#1a1a1a] max-h-[90vh] overflow-y-auto",children:Y},void 0,!1,void 0,this)},void 0,!1,void 0,this)}function DM({title:Y,message:G,confirmText:B="Confirm",cancelText:O="Cancel",confirmVariant:H="danger",onConfirm:W,onCancel:L}){return $4.jsxDEV("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50 p-4",children:$4.jsxDEV("div",{className:"bg-[#111] border border-[#333] rounded-lg p-6 w-full max-w-sm",children:[Y&&$4.jsxDEV("h3",{className:"font-medium mb-2",children:Y},void 0,!1,void 0,this),$4.jsxDEV("p",{className:"text-sm text-[#ccc] mb-4",children:G},void 0,!1,void 0,this),$4.jsxDEV("div",{className:"flex gap-2",children:[$4.jsxDEV("button",{onClick:L,className:"flex-1 text-sm bg-[#1a1a1a] hover:bg-[#222] border border-[#333] px-4 py-2 rounded transition",children:O},void 0,!1,void 0,this),$4.jsxDEV("button",{onClick:W,className:`flex-1 text-sm text-white px-4 py-2 rounded transition ${H==="danger"?"bg-red-500 hover:bg-red-600":"bg-[#f97316] hover:bg-[#ea580c]"}`,children:B},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)}function mM({title:Y,message:G,buttonText:B="OK",variant:O="info",onClose:H}){let W={error:"bg-red-500/20 text-red-400",success:"bg-green-500/20 text-green-400",info:"bg-blue-500/20 text-blue-400"},L={error:"✕",success:"✓",info:"ℹ"};return $4.jsxDEV("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50 p-4",children:$4.jsxDEV("div",{className:"bg-[#111] border border-[#333] rounded-lg p-6 w-full max-w-sm text-center",children:[$4.jsxDEV("div",{className:`w-12 h-12 rounded-full flex items-center justify-center mx-auto mb-3 ${W[O]}`,children:$4.jsxDEV("span",{className:"text-xl",children:L[O]},void 0,!1,void 0,this)},void 0,!1,void 0,this),Y&&$4.jsxDEV("h3",{className:"font-medium mb-2",children:Y},void 0,!1,void 0,this),$4.jsxDEV("p",{className:"text-sm text-[#ccc] mb-4",children:G},void 0,!1,void 0,this),$4.jsxDEV("button",{onClick:H,className:"w-full text-sm bg-[#1a1a1a] hover:bg-[#222] border border-[#333] px-4 py-2 rounded transition",children:B},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)}function K8(){let[Y,G]=l8.useState(null),B=l8.useCallback((L,N={})=>{return new Promise((T)=>{G({message:L,options:N,resolve:T})})},[]),O=l8.useCallback(()=>{Y?.resolve(!0),G(null)},[Y]),H=l8.useCallback(()=>{Y?.resolve(!1),G(null)},[Y]),W=Y?$4.jsxDEV(DM,{title:Y.options.title,message:Y.message,confirmText:Y.options.confirmText,cancelText:Y.options.cancelText,confirmVariant:Y.options.confirmVariant,onConfirm:O,onCancel:H},void 0,!1,void 0,this):null;return{confirm:B,ConfirmDialog:W}}function WK(){let[Y,G]=l8.useState(null),B=l8.useCallback((W,L={})=>{return new Promise((N)=>{G({message:W,options:L,resolve:N})})},[]),O=l8.useCallback(()=>{Y?.resolve(),G(null)},[Y]),H=Y?$4.jsxDEV(mM,{title:Y.options.title,message:Y.message,buttonText:Y.options.buttonText,variant:Y.options.variant,onClose:O},void 0,!1,void 0,this):null;return{alert:B,AlertDialog:H}}var P2=J0(F1(),1),S4=J0(J1(),1);function k5({value:Y,options:G,onChange:B,placeholder:O="Select..."}){let[H,W]=P2.useState(!1),L=P2.useRef(null),N=G.find((T)=>T.value===Y);return P2.useEffect(()=>{function T(M){if(L.current&&!L.current.contains(M.target))W(!1)}return document.addEventListener("mousedown",T),()=>document.removeEventListener("mousedown",T)},[]),S4.jsxDEV("div",{ref:L,className:"relative",children:[S4.jsxDEV("button",{type:"button",onClick:()=>W(!H),className:"w-full bg-[#0a0a0a] border border-[#222] rounded px-3 py-2 text-left flex items-center justify-between focus:outline-none focus:border-[#f97316] text-[#e0e0e0] hover:border-[#333] transition",children:[S4.jsxDEV("span",{className:N?"text-[#e0e0e0]":"text-[#666]",children:N?S4.jsxDEV(S4.Fragment,{children:[N.label,N.recommended&&S4.jsxDEV("span",{className:"text-[#f97316] text-xs ml-2",children:"(Recommended)"},void 0,!1,void 0,this)]},void 0,!0,void 0,this):O},void 0,!1,void 0,this),S4.jsxDEV(uM,{isOpen:H},void 0,!1,void 0,this)]},void 0,!0,void 0,this),H&&S4.jsxDEV("div",{className:"absolute z-50 w-full min-w-max mt-1 bg-[#111] border border-[#222] rounded shadow-lg max-h-60 overflow-y-auto scrollbar-hide",children:G.map((T)=>S4.jsxDEV("button",{type:"button",onClick:()=>{B(T.value),W(!1)},className:`w-full px-3 py-2 text-left flex items-center justify-between hover:bg-[#1a1a1a] transition ${T.value===Y?"bg-[#1a1a1a] text-[#f97316]":"text-[#e0e0e0]"}`,children:[S4.jsxDEV("span",{children:[T.label,T.recommended&&S4.jsxDEV("span",{className:"text-[#f97316] text-xs ml-2",children:"(Recommended)"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),T.value===Y&&S4.jsxDEV("svg",{className:"w-4 h-4 text-[#f97316]",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:S4.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},T.value,!0,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}function uM({isOpen:Y}){return S4.jsxDEV("svg",{className:`w-4 h-4 text-[#666] transition-transform ${Y?"rotate-180":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:S4.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"},void 0,!1,void 0,this)},void 0,!1,void 0,this)}var I1=J0(J1(),1);function A5({className:Y="w-4 h-4"}){return I1.jsxDEV("svg",{className:Y,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:I1.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"},void 0,!1,void 0,this)},void 0,!1,void 0,this)}function P7({className:Y="w-5 h-5"}){return I1.jsxDEV("svg",{className:Y,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:I1.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"},void 0,!1,void 0,this)},void 0,!1,void 0,this)}function tX({className:Y="w-5 h-5"}){return I1.jsxDEV("svg",{className:Y,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:I1.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 5a1 1 0 011-1h14a1 1 0 011 1v2a1 1 0 01-1 1H5a1 1 0 01-1-1V5zM4 13a1 1 0 011-1h6a1 1 0 011 1v6a1 1 0 01-1 1H5a1 1 0 01-1-1v-6zM16 13a1 1 0 011-1h2a1 1 0 011 1v6a1 1 0 01-1 1h-2a1 1 0 01-1-1v-6z"},void 0,!1,void 0,this)},void 0,!1,void 0,this)}function sX({className:Y="w-5 h-5"}){return I1.jsxDEV("svg",{className:Y,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:I1.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9.75 17L9 20l-1 1h8l-1-1-.75-3M3 13h18M5 17h14a2 2 0 002-2V5a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z"},void 0,!1,void 0,this)},void 0,!1,void 0,this)}function eX({className:Y="w-5 h-5"}){return I1.jsxDEV("svg",{className:Y,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:[I1.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z"},void 0,!1,void 0,this),I1.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}function B3({className:Y="w-4 h-4"}){return I1.jsxDEV("svg",{className:Y,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:I1.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9.663 17h4.673M12 3v1m6.364 1.636l-.707.707M21 12h-1M4 12H3m3.343-5.657l-.707-.707m2.828 9.9a5 5 0 117.072 0l-.548.547A3.374 3.374 0 0014 18.469V19a2 2 0 11-4 0v-.531c0-.895-.356-1.754-.988-2.386l-.548-.547z"},void 0,!1,void 0,this)},void 0,!1,void 0,this)}function I5({className:Y="w-4 h-4"}){return I1.jsxDEV("svg",{className:Y,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:I1.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"},void 0,!1,void 0,this)},void 0,!1,void 0,this)}function K3({className:Y="w-4 h-4"}){return I1.jsxDEV("svg",{className:Y,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:[I1.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"},void 0,!1,void 0,this),I1.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}function O3({className:Y="w-4 h-4"}){return I1.jsxDEV("svg",{className:Y,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:I1.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9.75 17L9 20l-1 1h8l-1-1-.75-3M3 13h18M5 17h14a2 2 0 002-2V5a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z"},void 0,!1,void 0,this)},void 0,!1,void 0,this)}function T5({className:Y="w-4 h-4"}){return I1.jsxDEV("svg",{className:Y,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:I1.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"},void 0,!1,void 0,this)},void 0,!1,void 0,this)}function L3({className:Y="w-4 h-4"}){return I1.jsxDEV("svg",{className:Y,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:I1.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 11a7 7 0 01-7 7m0 0a7 7 0 01-7-7m7 7v4m0 0H8m4 0h4m-4-8a3 3 0 01-3-3V5a3 3 0 116 0v6a3 3 0 01-3 3z"},void 0,!1,void 0,this)},void 0,!1,void 0,this)}function y$({className:Y="w-4 h-4"}){return I1.jsxDEV("svg",{className:Y,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:I1.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 19v-6a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2a2 2 0 002-2zm0 0V9a2 2 0 012-2h2a2 2 0 012 2v10m-6 0a2 2 0 002 2h2a2 2 0 002-2m0 0V5a2 2 0 012-2h2a2 2 0 012 2v14a2 2 0 01-2 2h-2a2 2 0 01-2-2z"},void 0,!1,void 0,this)},void 0,!1,void 0,this)}function _K({className:Y="w-4 h-4"}){return I1.jsxDEV("svg",{className:Y,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:I1.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M10 20l4-16m4 4l4 4-4 4M6 16l-4-4 4-4"},void 0,!1,void 0,this)},void 0,!1,void 0,this)}function F2({className:Y="w-4 h-4"}){return I1.jsxDEV("svg",{className:Y,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:I1.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"},void 0,!1,void 0,this)},void 0,!1,void 0,this)}function M2({className:Y="w-4 h-4"}){return I1.jsxDEV("svg",{className:Y,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:I1.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M17 20h5v-2a3 3 0 00-5.356-1.857M17 20H7m10 0v-2c0-.656-.126-1.283-.356-1.857M7 20H2v-2a3 3 0 015.356-1.857M7 20v-2c0-.656.126-1.283.356-1.857m0 0a5.002 5.002 0 019.288 0M15 7a3 3 0 11-6 0 3 3 0 016 0zm6 3a2 2 0 11-4 0 2 2 0 014 0zM7 10a2 2 0 11-4 0 2 2 0 014 0z"},void 0,!1,void 0,this)},void 0,!1,void 0,this)}function wK({className:Y="w-5 h-5"}){return I1.jsxDEV("svg",{className:Y,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:I1.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 6h16M4 12h16M4 18h16"},void 0,!1,void 0,this)},void 0,!1,void 0,this)}function RK({className:Y="w-4 h-4"}){return I1.jsxDEV("svg",{className:Y,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:I1.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"},void 0,!1,void 0,this)},void 0,!1,void 0,this)}function PK({className:Y="w-4 h-4"}){return I1.jsxDEV("svg",{className:Y,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:I1.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 4v16m8-8H4"},void 0,!1,void 0,this)},void 0,!1,void 0,this)}var V$=J0(F1(),1);var T1=J0(J1(),1);function zZ({onMenuClick:Y}){let{connected:G}=w2(),{user:B,logout:O}=C1(),{projects:H,currentProjectId:W,currentProject:L,setCurrentProjectId:N,unassignedCount:T}=W4(),[M,F]=V$.useState(!1),[w,v]=V$.useState(!1),S=async()=>{await O(),F(!1)},A=(k)=>{N(k),v(!1)},h=()=>{if(W===null)return"All Projects";if(W==="unassigned")return"Unassigned";return L?.name||"Select Project"},y=()=>{if(W===null)return"#666";if(W==="unassigned")return"#888";return L?.color||"#6366f1"};return T1.jsxDEV("header",{className:"border-b border-[#1a1a1a] px-4 md:px-6 py-4 flex-shrink-0",children:T1.jsxDEV("div",{className:"flex items-center justify-between",children:[T1.jsxDEV("div",{className:"flex items-center gap-3",children:[T1.jsxDEV("button",{onClick:Y,className:"p-2 -ml-2 text-[#666] hover:text-[#e0e0e0] transition md:hidden",children:T1.jsxDEV(wK,{},void 0,!1,void 0,this)},void 0,!1,void 0,this),T1.jsxDEV("div",{className:"flex items-center gap-2",children:[T1.jsxDEV("span",{className:"text-[#f97316]",children:">_"},void 0,!1,void 0,this),T1.jsxDEV("span",{className:"text-xl tracking-wider",children:"apteva"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),H.length>0&&T1.jsxDEV("div",{className:"relative ml-2 md:ml-4",children:[T1.jsxDEV("button",{onClick:()=>v(!w),className:"flex items-center gap-2 px-3 py-1.5 rounded border border-[#222] bg-[#111] hover:bg-[#1a1a1a] transition text-sm",children:[T1.jsxDEV("span",{className:"w-2.5 h-2.5 rounded-full",style:{backgroundColor:y()}},void 0,!1,void 0,this),T1.jsxDEV("span",{className:"hidden sm:inline max-w-[120px] md:max-w-[180px] truncate",children:h()},void 0,!1,void 0,this),T1.jsxDEV(RK,{},void 0,!1,void 0,this)]},void 0,!0,void 0,this),w&&T1.jsxDEV("div",{className:"absolute left-0 top-full mt-1 w-56 bg-[#111] border border-[#222] rounded-lg shadow-xl z-50",children:T1.jsxDEV("div",{className:"py-1 max-h-64 overflow-y-auto",children:[T1.jsxDEV("button",{onClick:()=>A(null),className:`w-full px-4 py-2 text-left text-sm flex items-center gap-2 hover:bg-[#1a1a1a] transition ${W===null?"bg-[#1a1a1a] text-[#f97316]":""}`,children:[T1.jsxDEV("span",{className:"w-2.5 h-2.5 rounded-full bg-[#666]"},void 0,!1,void 0,this),"All Projects"]},void 0,!0,void 0,this),H.map((k)=>T1.jsxDEV("button",{onClick:()=>A(k.id),className:`w-full px-4 py-2 text-left text-sm flex items-center gap-2 hover:bg-[#1a1a1a] transition ${W===k.id?"bg-[#1a1a1a] text-[#f97316]":""}`,children:[T1.jsxDEV("span",{className:"w-2.5 h-2.5 rounded-full flex-shrink-0",style:{backgroundColor:k.color}},void 0,!1,void 0,this),T1.jsxDEV("span",{className:"truncate",children:k.name},void 0,!1,void 0,this),T1.jsxDEV("span",{className:"ml-auto text-xs text-[#666]",children:k.agentCount},void 0,!1,void 0,this)]},k.id,!0,void 0,this)),T>0&&T1.jsxDEV("button",{onClick:()=>A("unassigned"),className:`w-full px-4 py-2 text-left text-sm flex items-center gap-2 hover:bg-[#1a1a1a] transition ${W==="unassigned"?"bg-[#1a1a1a] text-[#f97316]":""}`,children:[T1.jsxDEV("span",{className:"w-2.5 h-2.5 rounded-full bg-[#888]"},void 0,!1,void 0,this),T1.jsxDEV("span",{className:"truncate",children:"Unassigned"},void 0,!1,void 0,this),T1.jsxDEV("span",{className:"ml-auto text-xs text-[#666]",children:T},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),T1.jsxDEV("div",{className:"flex items-center gap-3 md:gap-4",children:[T1.jsxDEV("div",{className:"flex items-center gap-2",children:[T1.jsxDEV("span",{className:`w-2 h-2 rounded-full ${G?"bg-green-400":"bg-red-400"}`},void 0,!1,void 0,this),T1.jsxDEV("span",{className:"text-xs text-[#666] hidden sm:inline",children:G?"Live":"Offline"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),B&&T1.jsxDEV("div",{className:"relative",children:[T1.jsxDEV("button",{onClick:()=>F(!M),className:"flex items-center gap-2 px-2 md:px-3 py-2 rounded hover:bg-[#1a1a1a] transition",children:[T1.jsxDEV("div",{className:"w-8 h-8 rounded-full bg-[#f97316] flex items-center justify-center text-black font-medium text-sm",children:B.username.charAt(0).toUpperCase()},void 0,!1,void 0,this),T1.jsxDEV("span",{className:"text-sm text-[#888] hidden sm:block",children:B.username},void 0,!1,void 0,this)]},void 0,!0,void 0,this),M&&T1.jsxDEV("div",{className:"absolute right-0 top-full mt-1 w-48 bg-[#111] border border-[#222] rounded-lg shadow-xl z-50",children:[T1.jsxDEV("div",{className:"px-4 py-3 border-b border-[#222]",children:[T1.jsxDEV("p",{className:"text-sm font-medium",children:B.username},void 0,!1,void 0,this),T1.jsxDEV("p",{className:"text-xs text-[#f97316] mt-1",children:B.role},void 0,!1,void 0,this)]},void 0,!0,void 0,this),T1.jsxDEV("button",{onClick:S,className:"w-full px-4 py-2 text-left text-sm text-red-400 hover:bg-[#1a1a1a] transition",children:"Sign out"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)}var b6=J0(J1(),1);function QZ({route:Y,agentCount:G,taskCount:B,onNavigate:O,isOpen:H,onClose:W}){let L=(N)=>{O(N),W?.()};return b6.jsxDEV(b6.Fragment,{children:[H&&b6.jsxDEV("div",{className:"fixed inset-0 bg-black/60 z-40 md:hidden",onClick:W},void 0,!1,void 0,this),b6.jsxDEV("aside",{className:`
176
- fixed inset-y-0 left-0 z-50 w-64 bg-[#0a0a0a] border-r border-[#1a1a1a] p-4 transform transition-transform duration-200 ease-in-out
177
- md:relative md:w-56 md:translate-x-0 md:z-auto
178
- ${H?"translate-x-0":"-translate-x-full"}
179
- `,children:[b6.jsxDEV("div",{className:"flex items-center justify-between mb-4 md:hidden",children:[b6.jsxDEV("div",{className:"flex items-center gap-2",children:[b6.jsxDEV("span",{className:"text-[#f97316]",children:">_"},void 0,!1,void 0,this),b6.jsxDEV("span",{className:"text-lg tracking-wider",children:"apteva"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),b6.jsxDEV("button",{onClick:W,className:"p-2 text-[#666] hover:text-[#e0e0e0] transition",children:b6.jsxDEV(P7,{},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this),b6.jsxDEV("nav",{className:"space-y-1",children:[b6.jsxDEV(N3,{icon:b6.jsxDEV(tX,{},void 0,!1,void 0,this),label:"Dashboard",active:Y==="dashboard",onClick:()=>L("dashboard")},void 0,!1,void 0,this),b6.jsxDEV(N3,{icon:b6.jsxDEV(sX,{},void 0,!1,void 0,this),label:"Agents",active:Y==="agents",onClick:()=>L("agents"),badge:G>0?String(G):void 0},void 0,!1,void 0,this),b6.jsxDEV(N3,{icon:b6.jsxDEV(I5,{},void 0,!1,void 0,this),label:"Tasks",active:Y==="tasks",onClick:()=>L("tasks"),badge:B&&B>0?String(B):void 0},void 0,!1,void 0,this),b6.jsxDEV(N3,{icon:b6.jsxDEV(T5,{},void 0,!1,void 0,this),label:"MCP",active:Y==="mcp",onClick:()=>L("mcp")},void 0,!1,void 0,this),b6.jsxDEV(N3,{icon:b6.jsxDEV(y$,{},void 0,!1,void 0,this),label:"Telemetry",active:Y==="telemetry",onClick:()=>L("telemetry")},void 0,!1,void 0,this),b6.jsxDEV(N3,{icon:b6.jsxDEV(_K,{},void 0,!1,void 0,this),label:"API",active:Y==="api",onClick:()=>L("api")},void 0,!1,void 0,this),b6.jsxDEV(N3,{icon:b6.jsxDEV(eX,{},void 0,!1,void 0,this),label:"Settings",active:Y==="settings",onClick:()=>L("settings")},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}function N3({icon:Y,label:G,active:B,onClick:O,badge:H}){return b6.jsxDEV("button",{onClick:O,className:`w-full flex items-center gap-3 px-3 py-2 rounded font-medium transition ${B?"bg-[#111] text-[#e0e0e0]":"text-[#666] hover:bg-[#111] hover:text-[#888]"}`,children:[Y,G,H&&b6.jsxDEV("span",{className:"ml-auto bg-[#333] text-[#888] text-xs px-2 py-0.5 rounded-full",children:H},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}var Az=J0(J1(),1);function XZ({message:Y,onDismiss:G}){return Az.jsxDEV("div",{className:"bg-red-500/10 border-b border-red-500/30 px-6 py-3 text-red-400 text-sm flex items-center justify-between",children:[Az.jsxDEV("span",{children:Y},void 0,!1,void 0,this),Az.jsxDEV("button",{onClick:G,className:"hover:text-red-300",children:Az.jsxDEV(P7,{className:"w-4 h-4"},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}var Iz=J0(F1(),1);var n6=J0(J1(),1);function ZZ(){let{login:Y}=C1(),[G,B]=Iz.useState(""),[O,H]=Iz.useState(""),[W,L]=Iz.useState(null),[N,T]=Iz.useState(!1);return n6.jsxDEV("div",{className:"min-h-screen bg-[#0a0a0a] text-[#e0e0e0] font-mono flex items-center justify-center p-8",children:n6.jsxDEV("div",{className:"w-full max-w-md",children:[n6.jsxDEV("div",{className:"text-center mb-8",children:[n6.jsxDEV("div",{className:"flex items-center justify-center gap-2 mb-2",children:[n6.jsxDEV("span",{className:"text-[#f97316] text-3xl",children:">_"},void 0,!1,void 0,this),n6.jsxDEV("span",{className:"text-3xl tracking-wider",children:"apteva"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),n6.jsxDEV("p",{className:"text-[#666]",children:"Run AI agents locally"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),n6.jsxDEV("div",{className:"bg-[#111] rounded-lg border border-[#1a1a1a] p-8",children:[n6.jsxDEV("h2",{className:"text-2xl font-semibold mb-2",children:"Welcome back"},void 0,!1,void 0,this),n6.jsxDEV("p",{className:"text-[#666] mb-6",children:"Sign in to continue to apteva"},void 0,!1,void 0,this),n6.jsxDEV("form",{onSubmit:async(F)=>{F.preventDefault(),L(null),T(!0);let w=await Y(G,O);if(!w.success)L(w.error||"Login failed");T(!1)},className:"space-y-4",children:[n6.jsxDEV("div",{children:[n6.jsxDEV("label",{htmlFor:"username",className:"block text-sm text-[#888] mb-1",children:"Username"},void 0,!1,void 0,this),n6.jsxDEV("input",{id:"username",type:"text",value:G,onChange:(F)=>B(F.target.value),placeholder:"Enter your username",autoFocus:!0,required:!0,className:"w-full bg-[#0a0a0a] border border-[#333] rounded px-4 py-3 focus:outline-none focus:border-[#f97316]"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),n6.jsxDEV("div",{children:[n6.jsxDEV("label",{htmlFor:"password",className:"block text-sm text-[#888] mb-1",children:"Password"},void 0,!1,void 0,this),n6.jsxDEV("input",{id:"password",type:"password",value:O,onChange:(F)=>H(F.target.value),placeholder:"Enter your password",required:!0,className:"w-full bg-[#0a0a0a] border border-[#333] rounded px-4 py-3 focus:outline-none focus:border-[#f97316]"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),W&&n6.jsxDEV("div",{className:"p-3 bg-red-500/10 border border-red-500/30 rounded text-red-400 text-sm",children:W},void 0,!1,void 0,this),n6.jsxDEV("button",{type:"submit",disabled:N||!G||!O,className:"w-full bg-[#f97316] hover:bg-[#fb923c] disabled:opacity-50 disabled:cursor-not-allowed text-black px-4 py-3 rounded font-medium transition",children:N?"Signing in...":"Sign In"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)}var F7=J0(F1(),1),N6=J0(J1(),1);function JZ({onComplete:Y}){let[G,B]=F7.useState(""),[O,H]=F7.useState(""),[W,L]=F7.useState(""),[N,T]=F7.useState(""),[M,F]=F7.useState(!1),[w,v]=F7.useState(null),[S,A]=F7.useState(!1);return N6.jsxDEV(N6.Fragment,{children:[N6.jsxDEV("h2",{className:"text-2xl font-semibold mb-2",children:"Create your account"},void 0,!1,void 0,this),N6.jsxDEV("p",{className:"text-[#666] mb-6",children:"Set up your admin account to get started with apteva."},void 0,!1,void 0,this),N6.jsxDEV("form",{onSubmit:async(y)=>{if(y.preventDefault(),v(null),O!==W){v("Passwords do not match");return}A(!0);try{let k=await fetch("/api/onboarding/user",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({username:G,password:O,...N&&{email:N}})}),E=await k.json();if(!k.ok){v(E.error||"Failed to create account"),A(!1);return}let x=await fetch("/api/auth/login",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({username:G,password:O})});if(!x.ok){v("Account created but login failed. Please try logging in."),A(!1);return}let j=await x.json();if(j.accessToken)sessionStorage.setItem("accessToken",j.accessToken);Y({username:G})}catch(k){v("Failed to create account"),A(!1)}},className:"space-y-4",children:[N6.jsxDEV("div",{children:[N6.jsxDEV("label",{htmlFor:"username",className:"block text-sm text-[#888] mb-1",children:"Username"},void 0,!1,void 0,this),N6.jsxDEV("input",{id:"username",type:"text",value:G,onChange:(y)=>B(y.target.value),placeholder:"Choose a username",autoFocus:!0,required:!0,className:"w-full bg-[#0a0a0a] border border-[#333] rounded px-4 py-3 focus:outline-none focus:border-[#f97316]"},void 0,!1,void 0,this),N6.jsxDEV("p",{className:"text-xs text-[#666] mt-1",children:"3-20 characters, letters, numbers, underscore"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),N6.jsxDEV("div",{children:[N6.jsxDEV("label",{htmlFor:"password",className:"block text-sm text-[#888] mb-1",children:"Password"},void 0,!1,void 0,this),N6.jsxDEV("input",{id:"password",type:"password",value:O,onChange:(y)=>H(y.target.value),placeholder:"Enter a password",required:!0,className:"w-full bg-[#0a0a0a] border border-[#333] rounded px-4 py-3 focus:outline-none focus:border-[#f97316]"},void 0,!1,void 0,this),N6.jsxDEV("p",{className:"text-xs text-[#666] mt-1",children:"Min 8 characters, uppercase, lowercase, number"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),N6.jsxDEV("div",{children:[N6.jsxDEV("label",{htmlFor:"confirmPassword",className:"block text-sm text-[#888] mb-1",children:"Confirm Password"},void 0,!1,void 0,this),N6.jsxDEV("input",{id:"confirmPassword",type:"password",value:W,onChange:(y)=>L(y.target.value),placeholder:"Confirm your password",required:!0,className:"w-full bg-[#0a0a0a] border border-[#333] rounded px-4 py-3 focus:outline-none focus:border-[#f97316]"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),!M?N6.jsxDEV("button",{type:"button",onClick:()=>F(!0),className:"text-sm text-[#666] hover:text-[#888] transition",children:"+ Add email for password recovery (optional)"},void 0,!1,void 0,this):N6.jsxDEV("div",{children:[N6.jsxDEV("label",{htmlFor:"email",className:"block text-sm text-[#888] mb-1",children:["Email ",N6.jsxDEV("span",{className:"text-[#666]",children:"(optional)"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),N6.jsxDEV("input",{id:"email",type:"email",value:N,onChange:(y)=>T(y.target.value),placeholder:"For password recovery only",className:"w-full bg-[#0a0a0a] border border-[#333] rounded px-4 py-3 focus:outline-none focus:border-[#f97316]"},void 0,!1,void 0,this),N6.jsxDEV("p",{className:"text-xs text-[#666] mt-1",children:"Only used for password recovery, never shared"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),w&&N6.jsxDEV("div",{className:"p-3 bg-red-500/10 border border-red-500/30 rounded text-red-400 text-sm",children:w},void 0,!1,void 0,this),N6.jsxDEV("button",{type:"submit",disabled:S||!G||!O||!W,className:"w-full bg-[#f97316] hover:bg-[#fb923c] disabled:opacity-50 disabled:cursor-not-allowed text-black px-4 py-3 rounded font-medium transition",children:S?"Creating account...":"Create Account"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),N6.jsxDEV("p",{className:"text-xs text-[#666] mt-4 text-center",children:"This will be your admin account with full access to apteva."},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}var f5=J0(F1(),1);var g0=J0(J1(),1);function Tz({onComplete:Y,needsAccount:G=!1}){let[B,O]=f5.useState(G?0:1),[H,W]=f5.useState([]),[L,N]=f5.useState(null),[T,M]=f5.useState(""),[F,w]=f5.useState(!1),[v,S]=f5.useState(!1),[A,h]=f5.useState(null),[y,k]=f5.useState(null),[E,x]=f5.useState(!1),j=()=>{let q0=sessionStorage.getItem("accessToken");return q0?{Authorization:`Bearer ${q0}`}:{}};f5.useEffect(()=>{if(G&&!E&&B===0)return;fetch("/api/providers",{headers:j()}).then((q0)=>q0.json()).then((q0)=>{let Y0=(q0.providers||[]).filter((L0)=>L0.type==="llm");W(Y0)})},[E,B,G]);let d=H.filter((q0)=>q0.hasKey),o=async()=>{if(!L||!T)return;w(!0),h(null),k(null);try{S(!0);let Y0=await(await fetch(`/api/keys/${L}/test`,{method:"POST",headers:{"Content-Type":"application/json",...j()},body:JSON.stringify({key:T})})).json();if(S(!1),!Y0.valid){h(Y0.error||"API key is invalid"),w(!1);return}let L0=await fetch(`/api/keys/${L}`,{method:"POST",headers:{"Content-Type":"application/json",...j()},body:JSON.stringify({key:T})}),A0=await L0.json();if(!L0.ok)h(A0.error||"Failed to save key");else{k("API key saved successfully!"),M("");let s0=await(await fetch("/api/providers",{headers:j()})).json();W(s0.providers||[]),N(null)}}catch(q0){h("Failed to save key")}w(!1)},c=async()=>{try{let q0=await fetch("/api/projects",{method:"POST",headers:{"Content-Type":"application/json",...j()},body:JSON.stringify({name:"My Project",description:"Default project for organizing agents",color:"#f97316"})});if(q0.ok){let Y0=await q0.json();if(Y0.project?.id)localStorage.setItem("apteva_current_project",Y0.project.id)}}catch(q0){console.error("Failed to create default project:",q0)}await fetch("/api/onboarding/complete",{method:"POST",headers:j()}),Y()},l=()=>{x(!0),O(1)},a=G?3:2,Q0=G?B:B-1;return g0.jsxDEV("div",{className:"min-h-screen bg-[#0a0a0a] text-[#e0e0e0] font-mono flex items-center justify-center p-8",children:g0.jsxDEV("div",{className:"w-full max-w-2xl",children:[g0.jsxDEV("div",{className:"text-center mb-8",children:[g0.jsxDEV("div",{className:"flex items-center justify-center gap-2 mb-2",children:[g0.jsxDEV("span",{className:"text-[#f97316] text-3xl",children:">_"},void 0,!1,void 0,this),g0.jsxDEV("span",{className:"text-3xl tracking-wider",children:"apteva"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),g0.jsxDEV("p",{className:"text-[#666]",children:"Run AI agents locally"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),g0.jsxDEV("div",{className:"flex items-center justify-center gap-2 mb-8",children:[G&&g0.jsxDEV(g0.Fragment,{children:[g0.jsxDEV("div",{className:`w-3 h-3 rounded-full ${B>=0?"bg-[#f97316]":"bg-[#333]"}`},void 0,!1,void 0,this),g0.jsxDEV("div",{className:`w-16 h-0.5 ${B>=1?"bg-[#f97316]":"bg-[#333]"}`},void 0,!1,void 0,this)]},void 0,!0,void 0,this),g0.jsxDEV("div",{className:`w-3 h-3 rounded-full ${B>=1?"bg-[#f97316]":"bg-[#333]"}`},void 0,!1,void 0,this),g0.jsxDEV("div",{className:`w-16 h-0.5 ${B>=2?"bg-[#f97316]":"bg-[#333]"}`},void 0,!1,void 0,this),g0.jsxDEV("div",{className:`w-3 h-3 rounded-full ${B>=2?"bg-[#f97316]":"bg-[#333]"}`},void 0,!1,void 0,this)]},void 0,!0,void 0,this),g0.jsxDEV("div",{className:"bg-[#111] rounded-lg border border-[#1a1a1a] p-8",children:[B===0&&G&&g0.jsxDEV(JZ,{onComplete:l},void 0,!1,void 0,this),B===1&&g0.jsxDEV(gM,{providers:H,configuredProviders:d,selectedProvider:L,apiKey:T,saving:F,testing:v,error:A,success:y,onSelectProvider:N,onApiKeyChange:M,onSaveKey:o,onContinue:()=>O(2)},void 0,!1,void 0,this),B===2&&g0.jsxDEV(lM,{configuredProviders:d,onAddMore:()=>O(1),onComplete:c},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)}function gM({providers:Y,configuredProviders:G,selectedProvider:B,apiKey:O,saving:H,testing:W,error:L,success:N,onSelectProvider:T,onApiKeyChange:M,onSaveKey:F,onContinue:w}){let v=Y.find((S)=>S.id===B);if(B&&v)return g0.jsxDEV(g0.Fragment,{children:[g0.jsxDEV("h2",{className:"text-2xl font-semibold mb-2",children:["Add ",v.name," Key"]},void 0,!0,void 0,this),g0.jsxDEV("p",{className:"text-[#666] mb-6",children:"Enter your API key below. It will be encrypted and stored locally."},void 0,!1,void 0,this),g0.jsxDEV("div",{className:"mb-6",children:[g0.jsxDEV("div",{className:"p-4 rounded border border-[#f97316] bg-[#f97316]/5 mb-4",children:g0.jsxDEV("div",{className:"flex items-center justify-between",children:[g0.jsxDEV("div",{children:[g0.jsxDEV("p",{className:"font-medium",children:v.name},void 0,!1,void 0,this),g0.jsxDEV("p",{className:"text-sm text-[#666]",children:[v.models.length," models available"]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),g0.jsxDEV("a",{href:v.docsUrl,target:"_blank",rel:"noopener noreferrer",className:"text-sm text-[#3b82f6] hover:underline",children:"Get API Key"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this),g0.jsxDEV("div",{className:"space-y-3",children:[g0.jsxDEV("input",{type:"password",value:O,onChange:(S)=>M(S.target.value),placeholder:"Enter your API key...",autoFocus:!0,className:"w-full bg-[#0a0a0a] border border-[#333] rounded px-4 py-3 focus:outline-none focus:border-[#f97316] text-lg"},void 0,!1,void 0,this),L&&g0.jsxDEV("p",{className:"text-red-400 text-sm",children:L},void 0,!1,void 0,this),N&&g0.jsxDEV("p",{className:"text-green-400 text-sm",children:N},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),g0.jsxDEV("div",{className:"flex gap-3",children:[g0.jsxDEV("button",{onClick:()=>{T(null),M("")},className:"flex-1 border border-[#333] hover:border-[#666] px-4 py-3 rounded font-medium transition",children:"Back"},void 0,!1,void 0,this),g0.jsxDEV("button",{onClick:F,disabled:!O||H,className:"flex-1 bg-[#f97316] hover:bg-[#fb923c] disabled:opacity-50 disabled:cursor-not-allowed text-black px-4 py-3 rounded font-medium transition",children:W?"Testing...":H?"Saving...":"Save API Key"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this);return g0.jsxDEV(g0.Fragment,{children:[g0.jsxDEV("h2",{className:"text-2xl font-semibold mb-2",children:"Welcome to apteva"},void 0,!1,void 0,this),g0.jsxDEV("p",{className:"text-[#666] mb-6",children:"To get started, you'll need to add at least one AI provider API key. Your keys are encrypted and stored locally."},void 0,!1,void 0,this),g0.jsxDEV("div",{className:"space-y-3 mb-6",children:Y.map((S)=>g0.jsxDEV(EM,{provider:S,selected:!1,onSelect:()=>!S.hasKey&&T(S.id)},S.id,!1,void 0,this))},void 0,!1,void 0,this),g0.jsxDEV("button",{onClick:w,disabled:G.length===0,className:"w-full bg-[#222] hover:bg-[#333] disabled:opacity-50 disabled:cursor-not-allowed px-4 py-3 rounded font-medium transition",children:G.length===0?"Add at least one API key to continue":`Continue with ${G.length} provider${G.length>1?"s":""}`},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}function EM({provider:Y,selected:G,onSelect:B}){return g0.jsxDEV("div",{onClick:B,className:`p-4 rounded border transition cursor-pointer ${Y.hasKey?"border-green-500/30 bg-green-500/5":G?"border-[#f97316] bg-[#f97316]/5":"border-[#222] hover:border-[#333]"}`,children:g0.jsxDEV("div",{className:"flex items-center justify-between",children:[g0.jsxDEV("div",{children:[g0.jsxDEV("p",{className:"font-medium",children:Y.name},void 0,!1,void 0,this),g0.jsxDEV("p",{className:"text-sm text-[#666]",children:[Y.models.length," models available"]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),Y.hasKey?g0.jsxDEV("span",{className:"text-green-400 text-sm flex items-center gap-1",children:[g0.jsxDEV(A5,{},void 0,!1,void 0,this),"Configured (",Y.keyHint,")"]},void 0,!0,void 0,this):g0.jsxDEV("a",{href:Y.docsUrl,target:"_blank",rel:"noopener noreferrer",onClick:(O)=>O.stopPropagation(),className:"text-sm text-[#3b82f6] hover:underline",children:"Get API Key"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)}function lM({configuredProviders:Y,onAddMore:G,onComplete:B}){return g0.jsxDEV(g0.Fragment,{children:[g0.jsxDEV("h2",{className:"text-2xl font-semibold mb-2",children:"You're all set!"},void 0,!1,void 0,this),g0.jsxDEV("p",{className:"text-[#666] mb-6",children:["You've configured ",Y.length," provider",Y.length>1?"s":"",". You can add more providers later in Settings."]},void 0,!0,void 0,this),g0.jsxDEV("div",{className:"space-y-2 mb-6",children:Y.map((O)=>g0.jsxDEV("div",{className:"flex items-center gap-3 p-3 bg-[#0a0a0a] rounded",children:[g0.jsxDEV(A5,{className:"w-5 h-5 text-green-400"},void 0,!1,void 0,this),g0.jsxDEV("span",{children:O.name},void 0,!1,void 0,this),g0.jsxDEV("span",{className:"text-[#666] text-sm",children:["(",O.keyHint,")"]},void 0,!0,void 0,this)]},O.id,!0,void 0,this))},void 0,!1,void 0,this),g0.jsxDEV("div",{className:"flex gap-3",children:[g0.jsxDEV("button",{onClick:G,className:"flex-1 border border-[#333] hover:border-[#f97316] px-4 py-3 rounded font-medium transition",children:"Add More"},void 0,!1,void 0,this),g0.jsxDEV("button",{onClick:B,className:"flex-1 bg-[#f97316] hover:bg-[#fb923c] text-black px-4 py-3 rounded font-medium transition",children:"Start Using apteva"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}var Y6=J0(F1(),1);var u=J0(J1(),1);function YZ(){let[Y,G]=Y6.useState("providers");return u.jsxDEV("div",{className:"flex-1 flex overflow-hidden",children:[u.jsxDEV("div",{className:"w-48 border-r border-[#1a1a1a] p-4",children:[u.jsxDEV("h2",{className:"text-sm font-medium text-[#666] uppercase tracking-wider mb-3",children:"Settings"},void 0,!1,void 0,this),u.jsxDEV("nav",{className:"space-y-1",children:[u.jsxDEV(bZ,{label:"Providers",active:Y==="providers",onClick:()=>G("providers")},void 0,!1,void 0,this),u.jsxDEV(bZ,{label:"Projects",active:Y==="projects",onClick:()=>G("projects")},void 0,!1,void 0,this),u.jsxDEV(bZ,{label:"Updates",active:Y==="updates",onClick:()=>G("updates")},void 0,!1,void 0,this),u.jsxDEV(bZ,{label:"Data",active:Y==="data",onClick:()=>G("data")},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),u.jsxDEV("div",{className:"flex-1 overflow-auto p-6",children:[Y==="providers"&&u.jsxDEV(dM,{},void 0,!1,void 0,this),Y==="projects"&&u.jsxDEV(cM,{},void 0,!1,void 0,this),Y==="updates"&&u.jsxDEV(iM,{},void 0,!1,void 0,this),Y==="data"&&u.jsxDEV(oM,{},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}function bZ({label:Y,active:G,onClick:B}){return u.jsxDEV("button",{onClick:B,className:`w-full text-left px-3 py-2 rounded text-sm transition ${G?"bg-[#1a1a1a] text-[#e0e0e0]":"text-[#666] hover:bg-[#111] hover:text-[#888]"}`,children:Y},void 0,!1,void 0,this)}function dM(){let{authFetch:Y}=C1(),[G,B]=Y6.useState([]),[O,H]=Y6.useState(null),[W,L]=Y6.useState(""),[N,T]=Y6.useState(!1),[M,F]=Y6.useState(!1),[w,v]=Y6.useState(null),[S,A]=Y6.useState(null),{confirm:h,ConfirmDialog:y}=K8(),k=async()=>{let a=await(await Y("/api/providers")).json();B(a.providers||[])};Y6.useEffect(()=>{k()},[]);let E=async()=>{if(!O||!W)return;T(!0),v(null),A(null);try{F(!0);let a=await(await Y(`/api/keys/${O}/test`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({key:W})})).json();if(F(!1),!a.valid){v(a.error||"API key is invalid"),T(!1);return}let Q0=await Y(`/api/keys/${O}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({key:W})});if(!Q0.ok){let q0=await Q0.json();v(q0.error||"Failed to save key")}else A("API key saved!"),L(""),H(null),k()}catch(l){v("Failed to save key")}T(!1)},x=async(l)=>{if(!await h("Are you sure you want to remove this API key?",{confirmText:"Remove",title:"Remove API Key"}))return;await Y(`/api/keys/${l}`,{method:"DELETE"}),k()},j=G.filter((l)=>l.type==="llm"),d=G.filter((l)=>l.type==="integration"),o=j.filter((l)=>l.hasKey).length,c=d.filter((l)=>l.hasKey).length;return u.jsxDEV(u.Fragment,{children:[y,u.jsxDEV("div",{className:"space-y-10",children:[u.jsxDEV("div",{children:[u.jsxDEV("div",{className:"mb-6",children:[u.jsxDEV("h1",{className:"text-2xl font-semibold mb-1",children:"AI Providers"},void 0,!1,void 0,this),u.jsxDEV("p",{className:"text-[#666]",children:["Manage your API keys for AI providers. ",o," of ",j.length," configured."]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),u.jsxDEV("div",{className:"grid gap-4 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4",children:j.map((l)=>u.jsxDEV(pM,{provider:l,isEditing:O===l.id,apiKey:W,saving:N,testing:M,error:O===l.id?w:null,success:O===l.id?S:null,onStartEdit:()=>{H(l.id),v(null),A(null)},onCancelEdit:()=>{H(null),L(""),v(null)},onApiKeyChange:L,onSave:E,onDelete:()=>x(l.id)},l.id,!1,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this),u.jsxDEV("div",{children:[u.jsxDEV("div",{className:"mb-6",children:[u.jsxDEV("h2",{className:"text-xl font-semibold mb-1",children:"MCP Integrations"},void 0,!1,void 0,this),u.jsxDEV("p",{className:"text-[#666]",children:["Connect to MCP gateways for tool integrations. ",c," of ",d.length," configured."]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),u.jsxDEV("div",{className:"grid gap-4 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4",children:d.map((l)=>u.jsxDEV(jM,{provider:l,isEditing:O===l.id,apiKey:W,saving:N,testing:M,error:O===l.id?w:null,success:O===l.id?S:null,onStartEdit:()=>{H(l.id),v(null),A(null)},onCancelEdit:()=>{H(null),L(""),v(null)},onApiKeyChange:L,onSave:E,onDelete:()=>x(l.id)},l.id,!1,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}var D$=["#f97316","#6366f1","#22c55e","#ef4444","#3b82f6","#a855f7","#14b8a6","#f59e0b"];function cM(){let{projects:Y,createProject:G,updateProject:B,deleteProject:O}=W4(),[H,W]=Y6.useState(!1),[L,N]=Y6.useState(null),{confirm:T,ConfirmDialog:M}=K8(),F=async(A)=>{if(!await T("Are you sure you want to delete this project? Agents in this project will become unassigned.",{confirmText:"Delete",title:"Delete Project"}))return;await O(A)},w=()=>{N(null),W(!0)},v=(A)=>{N(A),W(!0)},S=()=>{W(!1),N(null)};return u.jsxDEV(u.Fragment,{children:[M,u.jsxDEV("div",{className:"max-w-4xl w-full",children:[u.jsxDEV("div",{className:"mb-6 flex items-center justify-between gap-4",children:[u.jsxDEV("div",{children:[u.jsxDEV("h1",{className:"text-2xl font-semibold mb-1",children:"Projects"},void 0,!1,void 0,this),u.jsxDEV("p",{className:"text-[#666]",children:"Organize agents into projects for better management."},void 0,!1,void 0,this)]},void 0,!0,void 0,this),u.jsxDEV("button",{onClick:w,className:"flex items-center gap-2 bg-[#f97316] hover:bg-[#fb923c] text-black px-4 py-2 rounded font-medium transition flex-shrink-0",children:[u.jsxDEV(PK,{className:"w-4 h-4"},void 0,!1,void 0,this),"New Project"]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),Y.length===0?u.jsxDEV("div",{className:"text-center py-12 text-[#666]",children:[u.jsxDEV("p",{className:"text-lg mb-2",children:"No projects yet"},void 0,!1,void 0,this),u.jsxDEV("p",{className:"text-sm",children:"Create a project to organize your agents."},void 0,!1,void 0,this)]},void 0,!0,void 0,this):u.jsxDEV("div",{className:"space-y-3",children:Y.map((A)=>u.jsxDEV("div",{className:"bg-[#111] border border-[#1a1a1a] rounded-lg p-4 flex items-center gap-4",children:[u.jsxDEV("div",{className:"w-4 h-4 rounded-full flex-shrink-0",style:{backgroundColor:A.color}},void 0,!1,void 0,this),u.jsxDEV("div",{className:"flex-1 min-w-0",children:[u.jsxDEV("h3",{className:"font-medium",children:A.name},void 0,!1,void 0,this),A.description&&u.jsxDEV("p",{className:"text-sm text-[#666] truncate",children:A.description},void 0,!1,void 0,this),u.jsxDEV("p",{className:"text-xs text-[#666] mt-1",children:[A.agentCount," agent",A.agentCount!==1?"s":""]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),u.jsxDEV("div",{className:"flex items-center gap-2",children:[u.jsxDEV("button",{onClick:()=>v(A),className:"text-sm text-[#888] hover:text-[#e0e0e0] px-2 py-1",children:"Edit"},void 0,!1,void 0,this),u.jsxDEV("button",{onClick:()=>F(A.id),className:"text-sm text-red-400 hover:text-red-300 px-2 py-1",children:"Delete"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},A.id,!0,void 0,this))},void 0,!1,void 0,this),H&&u.jsxDEV(xM,{project:L,onSave:async(A)=>{if(L){let h=await B(L.id,A);if(h)S();return!!h}else{let h=await G(A);if(h)S();return!!h}},onClose:S},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}function xM({project:Y,onSave:G,onClose:B}){let[O,H]=Y6.useState(Y?.name||""),[W,L]=Y6.useState(Y?.description||""),[N,T]=Y6.useState(Y?.color||D$[Math.floor(Math.random()*D$.length)]),[M,F]=Y6.useState(!1),[w,v]=Y6.useState(null),S=async()=>{if(!O.trim()){v("Name is required");return}F(!0),v(null);let A=await G({name:O,description:W||void 0,color:N});if(F(!1),!A)v(Y?"Failed to update project":"Failed to create project")};return u.jsxDEV(R2,{onClose:B,children:[u.jsxDEV("h2",{className:"text-xl font-semibold mb-6",children:Y?"Edit Project":"Create New Project"},void 0,!1,void 0,this),u.jsxDEV("div",{className:"space-y-4",children:[u.jsxDEV("div",{children:[u.jsxDEV("label",{className:"block text-sm text-[#666] mb-1",children:"Name"},void 0,!1,void 0,this),u.jsxDEV("input",{type:"text",value:O,onChange:(A)=>H(A.target.value),className:"w-full bg-[#0a0a0a] border border-[#222] rounded px-3 py-2 focus:outline-none focus:border-[#f97316]",placeholder:"My Project",autoFocus:!0},void 0,!1,void 0,this)]},void 0,!0,void 0,this),u.jsxDEV("div",{children:[u.jsxDEV("label",{className:"block text-sm text-[#666] mb-1",children:"Description (optional)"},void 0,!1,void 0,this),u.jsxDEV("input",{type:"text",value:W,onChange:(A)=>L(A.target.value),className:"w-full bg-[#0a0a0a] border border-[#222] rounded px-3 py-2 focus:outline-none focus:border-[#f97316]",placeholder:"A short description"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),u.jsxDEV("div",{children:[u.jsxDEV("label",{className:"block text-sm text-[#666] mb-1",children:"Color"},void 0,!1,void 0,this),u.jsxDEV("div",{className:"flex gap-3 flex-wrap",children:D$.map((A)=>u.jsxDEV("button",{type:"button",onClick:()=>T(A),className:`w-10 h-10 rounded-full transition ${N===A?"ring-2 ring-white ring-offset-2 ring-offset-[#111]":"hover:scale-110"}`,style:{backgroundColor:A}},A,!1,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this),w&&u.jsxDEV("p",{className:"text-red-400 text-sm",children:w},void 0,!1,void 0,this)]},void 0,!0,void 0,this),u.jsxDEV("div",{className:"flex gap-3 mt-6",children:[u.jsxDEV("button",{onClick:B,className:"flex-1 border border-[#333] hover:border-[#f97316] hover:text-[#f97316] px-4 py-2 rounded font-medium transition",children:"Cancel"},void 0,!1,void 0,this),u.jsxDEV("button",{onClick:S,disabled:M||!O.trim(),className:"flex-1 bg-[#f97316] hover:bg-[#fb923c] disabled:opacity-50 text-black px-4 py-2 rounded font-medium transition",children:M?"Saving...":Y?"Update":"Create"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}function iM(){let{authFetch:Y}=C1(),[G,B]=Y6.useState(null),[O,H]=Y6.useState(!1),[W,L]=Y6.useState(!1),[N,T]=Y6.useState(null),[M,F]=Y6.useState(null),[w,v]=Y6.useState(null),S=async()=>{H(!0),T(null);try{let k=await Y("/api/version");if(!k.ok)throw Error("Failed to check for updates");let E=await k.json();B(E)}catch(k){T("Failed to check for updates")}H(!1)},A=async()=>{L(!0),T(null),F(null);try{let E=await(await Y("/api/version/update",{method:"POST"})).json();if(!E.success)T(E.error||"Update failed");else{let x=E.restarted?.length||0,j=x>0?` ${x} running agent${x>1?"s":""} restarted.`:"";F(`Agent binary updated to v${E.version}.${j}`),await S()}}catch(k){T("Failed to update agent")}L(!1)};Y6.useEffect(()=>{S()},[]);let h=(k,E)=>{navigator.clipboard.writeText(k),v(E),setTimeout(()=>v(null),2000)},y=G?.apteva.updateAvailable||G?.agent.updateAvailable;return u.jsxDEV("div",{className:"max-w-4xl w-full",children:[u.jsxDEV("div",{className:"mb-6",children:[u.jsxDEV("h1",{className:"text-2xl font-semibold mb-1",children:"Updates"},void 0,!1,void 0,this),u.jsxDEV("p",{className:"text-[#666]",children:"Check for new versions of apteva and the agent binary."},void 0,!1,void 0,this)]},void 0,!0,void 0,this),O&&!G?u.jsxDEV("div",{className:"text-[#666]",children:"Checking version info..."},void 0,!1,void 0,this):N&&!G?u.jsxDEV("div",{className:"text-red-400",children:N},void 0,!1,void 0,this):G?.isDocker?u.jsxDEV("div",{className:"space-y-6",children:[u.jsxDEV("div",{className:"bg-blue-500/10 border border-blue-500/30 rounded-lg p-4",children:[u.jsxDEV("div",{className:"flex items-center gap-2 text-blue-400 mb-2",children:[u.jsxDEV("svg",{className:"w-5 h-5",fill:"currentColor",viewBox:"0 0 24 24",children:u.jsxDEV("path",{d:"M13.983 11.078h2.119a.186.186 0 00.186-.185V9.006a.186.186 0 00-.186-.186h-2.119a.185.185 0 00-.185.185v1.888c0 .102.083.185.185.185m-2.954-5.43h2.118a.186.186 0 00.186-.186V3.574a.186.186 0 00-.186-.185h-2.118a.185.185 0 00-.185.185v1.888c0 .102.082.185.185.185m0 2.716h2.118a.187.187 0 00.186-.186V6.29a.186.186 0 00-.186-.185h-2.118a.185.185 0 00-.185.185v1.887c0 .102.082.186.185.186m-2.93 0h2.12a.186.186 0 00.184-.186V6.29a.185.185 0 00-.185-.185H8.1a.185.185 0 00-.185.185v1.887c0 .102.083.186.185.186m-2.964 0h2.119a.186.186 0 00.185-.186V6.29a.186.186 0 00-.185-.185H5.136a.186.186 0 00-.186.185v1.887c0 .102.084.186.186.186m5.893 2.715h2.118a.186.186 0 00.186-.185V9.006a.186.186 0 00-.186-.186h-2.118a.185.185 0 00-.185.185v1.888c0 .102.082.185.185.185m-2.93 0h2.12a.185.185 0 00.184-.185V9.006a.185.185 0 00-.184-.186h-2.12a.185.185 0 00-.184.185v1.888c0 .102.083.185.185.185m-2.964 0h2.119a.185.185 0 00.185-.185V9.006a.185.185 0 00-.185-.186H5.136a.186.186 0 00-.186.186v1.887c0 .102.084.185.186.185m-2.92 0h2.12a.185.185 0 00.184-.185V9.006a.185.185 0 00-.184-.186h-2.12a.186.186 0 00-.186.186v1.887c0 .102.084.185.186.185M23.763 9.89c-.065-.051-.672-.51-1.954-.51-.338.001-.676.03-1.01.087-.248-1.7-1.653-2.53-1.716-2.566l-.344-.199-.226.327c-.284.438-.49.922-.612 1.43-.23.97-.09 1.882.403 2.661-.595.332-1.55.413-1.744.42H.751a.751.751 0 00-.75.748 11.376 11.376 0 00.692 4.062c.545 1.428 1.355 2.48 2.41 3.124 1.18.723 3.1 1.137 5.275 1.137.983.003 1.963-.086 2.93-.266a12.248 12.248 0 003.823-1.389c.98-.567 1.86-1.288 2.61-2.136 1.252-1.418 1.998-2.997 2.553-4.4h.221c1.372 0 2.215-.549 2.68-1.009.309-.293.55-.65.707-1.046l.098-.288Z"},void 0,!1,void 0,this)},void 0,!1,void 0,this),u.jsxDEV("span",{className:"font-medium",children:"Docker Environment"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),u.jsxDEV("p",{className:"text-sm text-[#888]",children:"Updates are automatic when you pull a new image version."},void 0,!1,void 0,this)]},void 0,!0,void 0,this),u.jsxDEV("div",{className:"bg-[#111] border border-[#1a1a1a] rounded-lg p-5",children:[u.jsxDEV("div",{className:"flex items-center justify-between mb-4",children:[u.jsxDEV("div",{children:[u.jsxDEV("h3",{className:"font-medium text-lg",children:"Current Version"},void 0,!1,void 0,this),u.jsxDEV("p",{className:"text-sm text-[#666]",children:"apteva + agent binary"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),u.jsxDEV("div",{className:"text-right",children:u.jsxDEV("div",{className:"text-xl font-mono",children:["v",G.apteva.installed||"?"]},void 0,!0,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this),y?u.jsxDEV("div",{className:"bg-[#f97316]/10 border border-[#f97316]/30 rounded-lg p-4",children:[u.jsxDEV("p",{className:"text-sm text-[#888] mb-3",children:["A newer version (v",G.apteva.latest,") is available. To update:"]},void 0,!0,void 0,this),u.jsxDEV("div",{className:"space-y-2",children:[u.jsxDEV("code",{className:"block bg-[#0a0a0a] px-3 py-2 rounded font-mono text-sm text-[#888]",children:"docker pull apteva/apteva:latest"},void 0,!1,void 0,this),u.jsxDEV("code",{className:"block bg-[#0a0a0a] px-3 py-2 rounded font-mono text-sm text-[#888]",children:"docker compose up -d"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),u.jsxDEV("button",{onClick:()=>{navigator.clipboard.writeText("docker pull apteva/apteva:latest && docker compose up -d"),v("docker"),setTimeout(()=>v(null),2000)},className:"mt-3 px-3 py-1.5 bg-[#1a1a1a] hover:bg-[#222] rounded text-sm",children:w==="docker"?"Copied!":"Copy commands"},void 0,!1,void 0,this)]},void 0,!0,void 0,this):u.jsxDEV("div",{className:"flex items-center gap-2 text-green-400 text-sm",children:[u.jsxDEV(A5,{className:"w-4 h-4"},void 0,!1,void 0,this),"Up to date"]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),u.jsxDEV("p",{className:"text-xs text-[#555]",children:"Your data is stored in a Docker volume and persists across updates."},void 0,!1,void 0,this)]},void 0,!0,void 0,this):G?u.jsxDEV("div",{className:"space-y-6",children:[M&&u.jsxDEV("div",{className:"bg-green-500/10 border border-green-500/30 rounded-lg p-4 text-green-400",children:M},void 0,!1,void 0,this),N&&u.jsxDEV("div",{className:"bg-red-500/10 border border-red-500/30 rounded-lg p-4 text-red-400",children:N},void 0,!1,void 0,this),u.jsxDEV("div",{className:"bg-[#111] border border-[#1a1a1a] rounded-lg p-5",children:[u.jsxDEV("div",{className:"flex items-center justify-between mb-4",children:[u.jsxDEV("div",{children:[u.jsxDEV("h3",{className:"font-medium text-lg",children:"apteva"},void 0,!1,void 0,this),u.jsxDEV("p",{className:"text-sm text-[#666]",children:"The app you're running"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),u.jsxDEV("div",{className:"text-right",children:[u.jsxDEV("div",{className:"text-xl font-mono",children:["v",G.apteva.installed||"?"]},void 0,!0,void 0,this),G.apteva.updateAvailable&&u.jsxDEV("div",{className:"text-sm text-[#f97316]",children:["→ v",G.apteva.latest]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),G.apteva.updateAvailable?u.jsxDEV("div",{className:"bg-[#f97316]/10 border border-[#f97316]/30 rounded-lg p-4",children:[u.jsxDEV("p",{className:"text-sm text-[#888] mb-3",children:"Update by running:"},void 0,!1,void 0,this),u.jsxDEV("div",{className:"flex items-center gap-2",children:[u.jsxDEV("code",{className:"flex-1 bg-[#0a0a0a] px-3 py-2 rounded font-mono text-sm text-[#888]",children:"npx apteva@latest"},void 0,!1,void 0,this),u.jsxDEV("button",{onClick:()=>h("npx apteva@latest","apteva"),className:"px-3 py-2 bg-[#1a1a1a] hover:bg-[#222] rounded text-sm",children:w==="apteva"?"Copied!":"Copy"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this):u.jsxDEV("div",{className:"flex items-center gap-2 text-green-400 text-sm",children:[u.jsxDEV(A5,{className:"w-4 h-4"},void 0,!1,void 0,this),"Up to date"]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),u.jsxDEV("div",{className:"bg-[#111] border border-[#1a1a1a] rounded-lg p-5",children:[u.jsxDEV("div",{className:"flex items-center justify-between mb-4",children:[u.jsxDEV("div",{children:[u.jsxDEV("h3",{className:"font-medium text-lg",children:"Agent Binary"},void 0,!1,void 0,this),u.jsxDEV("p",{className:"text-sm text-[#666]",children:"The Go binary that runs agents"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),u.jsxDEV("div",{className:"text-right",children:[u.jsxDEV("div",{className:"text-xl font-mono",children:["v",G.agent.installed||"?"]},void 0,!0,void 0,this),G.agent.updateAvailable&&u.jsxDEV("div",{className:"text-sm text-[#f97316]",children:["→ v",G.agent.latest]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),G.agent.updateAvailable?u.jsxDEV("div",{className:"bg-[#f97316]/10 border border-[#f97316]/30 rounded-lg p-4",children:[u.jsxDEV("p",{className:"text-sm text-[#888] mb-3",children:"A new version is available. Stop all agents before updating."},void 0,!1,void 0,this),u.jsxDEV("div",{className:"flex items-center gap-2",children:u.jsxDEV("button",{onClick:A,disabled:W,className:"px-4 py-2 bg-[#f97316] text-black rounded font-medium text-sm disabled:opacity-50",children:W?"Updating...":"Update Agent"},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this):u.jsxDEV("div",{className:"flex items-center gap-2 text-green-400 text-sm",children:[u.jsxDEV(A5,{className:"w-4 h-4"},void 0,!1,void 0,this),"Up to date"]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),!y&&!M&&u.jsxDEV("div",{className:"bg-green-500/10 border border-green-500/30 rounded-lg p-4 flex items-center gap-2 text-green-400",children:[u.jsxDEV(A5,{className:"w-5 h-5"},void 0,!1,void 0,this),"Everything is up to date!"]},void 0,!0,void 0,this),u.jsxDEV("button",{onClick:S,disabled:O,className:"text-sm text-[#666] hover:text-[#888] disabled:opacity-50",children:O?"Checking...":"Check for updates"},void 0,!1,void 0,this)]},void 0,!0,void 0,this):null]},void 0,!0,void 0,this)}function pM({provider:Y,isEditing:G,apiKey:B,saving:O,testing:H,error:W,success:L,onStartEdit:N,onCancelEdit:T,onApiKeyChange:M,onSave:F,onDelete:w}){return u.jsxDEV("div",{className:`bg-[#111] border rounded-lg p-4 ${Y.hasKey?"border-green-500/20":"border-[#1a1a1a]"}`,children:[u.jsxDEV("div",{className:"flex items-start justify-between gap-2 mb-2",children:[u.jsxDEV("div",{className:"min-w-0",children:[u.jsxDEV("h3",{className:"font-medium",children:Y.name},void 0,!1,void 0,this),u.jsxDEV("p",{className:"text-sm text-[#666] truncate",children:Y.type==="integration"?Y.description||"MCP integration":`${Y.models.length} models`},void 0,!1,void 0,this)]},void 0,!0,void 0,this),Y.hasKey?u.jsxDEV("span",{className:"text-green-400 text-xs flex items-center gap-1 bg-green-500/10 px-2 py-1 rounded whitespace-nowrap flex-shrink-0",children:[u.jsxDEV(A5,{className:"w-3 h-3"},void 0,!1,void 0,this),Y.keyHint]},void 0,!0,void 0,this):u.jsxDEV("span",{className:"text-[#666] text-xs bg-[#1a1a1a] px-2 py-1 rounded whitespace-nowrap flex-shrink-0",children:"Not configured"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),Y.hasKey?u.jsxDEV("div",{className:"flex items-center justify-between mt-3 pt-3 border-t border-[#1a1a1a]",children:[u.jsxDEV("a",{href:Y.docsUrl,target:"_blank",rel:"noopener noreferrer",className:"text-sm text-[#3b82f6] hover:underline",children:"View docs"},void 0,!1,void 0,this),u.jsxDEV("button",{onClick:w,className:"text-red-400 hover:text-red-300 text-sm",children:"Remove key"},void 0,!1,void 0,this)]},void 0,!0,void 0,this):u.jsxDEV("div",{className:"mt-3 pt-3 border-t border-[#1a1a1a]",children:G?u.jsxDEV("div",{className:"space-y-3",children:[u.jsxDEV("input",{type:"password",value:B,onChange:(v)=>M(v.target.value),placeholder:"Enter API key...",autoFocus:!0,className:"w-full bg-[#0a0a0a] border border-[#333] rounded px-3 py-2 focus:outline-none focus:border-[#f97316]"},void 0,!1,void 0,this),W&&u.jsxDEV("p",{className:"text-red-400 text-sm",children:W},void 0,!1,void 0,this),L&&u.jsxDEV("p",{className:"text-green-400 text-sm",children:L},void 0,!1,void 0,this),u.jsxDEV("div",{className:"flex gap-2",children:[u.jsxDEV("button",{onClick:T,className:"flex-1 px-3 py-1.5 border border-[#333] rounded text-sm hover:border-[#666]",children:"Cancel"},void 0,!1,void 0,this),u.jsxDEV("button",{onClick:F,disabled:!B||O,className:"flex-1 px-3 py-1.5 bg-[#f97316] text-black rounded text-sm font-medium disabled:opacity-50",children:H?"Validating...":O?"Saving...":"Save"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this):u.jsxDEV("div",{className:"flex items-center justify-between",children:[u.jsxDEV("a",{href:Y.docsUrl,target:"_blank",rel:"noopener noreferrer",className:"text-sm text-[#3b82f6] hover:underline",children:"Get API key"},void 0,!1,void 0,this),u.jsxDEV("button",{onClick:N,className:"text-sm text-[#f97316] hover:text-[#fb923c]",children:"+ Add key"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}function jM({provider:Y,isEditing:G,apiKey:B,saving:O,testing:H,error:W,success:L,onStartEdit:N,onCancelEdit:T,onApiKeyChange:M,onSave:F,onDelete:w}){return u.jsxDEV("div",{className:`bg-[#111] border rounded-lg p-4 ${Y.hasKey?"border-[#f97316]/20":"border-[#1a1a1a]"}`,children:[u.jsxDEV("div",{className:"flex items-center justify-between mb-2",children:[u.jsxDEV("div",{children:[u.jsxDEV("h3",{className:"font-medium",children:Y.name},void 0,!1,void 0,this),u.jsxDEV("p",{className:"text-sm text-[#666]",children:Y.description||"MCP integration"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),Y.hasKey?u.jsxDEV("span",{className:"text-[#f97316] text-xs flex items-center gap-1 bg-[#f97316]/10 px-2 py-1 rounded",children:[u.jsxDEV(A5,{className:"w-3 h-3"},void 0,!1,void 0,this),Y.keyHint]},void 0,!0,void 0,this):u.jsxDEV("span",{className:"text-[#666] text-xs bg-[#1a1a1a] px-2 py-1 rounded",children:"Not configured"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),Y.hasKey?u.jsxDEV("div",{className:"flex items-center justify-between mt-3 pt-3 border-t border-[#1a1a1a]",children:[u.jsxDEV("a",{href:Y.docsUrl,target:"_blank",rel:"noopener noreferrer",className:"text-sm text-[#3b82f6] hover:underline",children:"View docs"},void 0,!1,void 0,this),u.jsxDEV("button",{onClick:w,className:"text-red-400 hover:text-red-300 text-sm",children:"Remove key"},void 0,!1,void 0,this)]},void 0,!0,void 0,this):u.jsxDEV("div",{className:"mt-3 pt-3 border-t border-[#1a1a1a]",children:G?u.jsxDEV("div",{className:"space-y-3",children:[u.jsxDEV("input",{type:"password",value:B,onChange:(v)=>M(v.target.value),placeholder:"Enter API key...",autoFocus:!0,className:"w-full bg-[#0a0a0a] border border-[#333] rounded px-3 py-2 focus:outline-none focus:border-[#f97316]"},void 0,!1,void 0,this),W&&u.jsxDEV("p",{className:"text-red-400 text-sm",children:W},void 0,!1,void 0,this),L&&u.jsxDEV("p",{className:"text-green-400 text-sm",children:L},void 0,!1,void 0,this),u.jsxDEV("div",{className:"flex gap-2",children:[u.jsxDEV("button",{onClick:T,className:"flex-1 px-3 py-1.5 border border-[#333] rounded text-sm hover:border-[#666]",children:"Cancel"},void 0,!1,void 0,this),u.jsxDEV("button",{onClick:F,disabled:!B||O,className:"flex-1 px-3 py-1.5 bg-[#f97316] text-black rounded text-sm font-medium disabled:opacity-50",children:H?"Validating...":O?"Saving...":"Save"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this):u.jsxDEV("div",{className:"flex items-center justify-between",children:[u.jsxDEV("a",{href:Y.docsUrl,target:"_blank",rel:"noopener noreferrer",className:"text-sm text-[#3b82f6] hover:underline",children:"Get API key"},void 0,!1,void 0,this),u.jsxDEV("button",{onClick:N,className:"text-sm text-[#f97316] hover:text-[#fb923c]",children:"+ Add key"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}function oM(){let{authFetch:Y}=C1(),[G,B]=Y6.useState(!1),[O,H]=Y6.useState(null),[W,L]=Y6.useState(null),{confirm:N,ConfirmDialog:T}=K8(),M=async()=>{try{let v=await(await Y("/api/telemetry/stats")).json();L(v.stats?.total_events||0)}catch{L(null)}};Y6.useEffect(()=>{M()},[]);let F=async()=>{if(!await N("Are you sure you want to delete all telemetry data? This cannot be undone.",{confirmText:"Clear All",title:"Clear Telemetry Data"}))return;B(!0),H(null);try{let v=await Y("/api/telemetry/clear",{method:"POST"}),S=await v.json();if(v.ok)H({type:"success",text:`Cleared ${S.deleted||0} telemetry events.`}),L(0);else H({type:"error",text:S.error||"Failed to clear telemetry"})}catch{H({type:"error",text:"Failed to clear telemetry"})}B(!1)};return u.jsxDEV(u.Fragment,{children:[T,u.jsxDEV("div",{className:"max-w-4xl w-full",children:[u.jsxDEV("div",{className:"mb-6",children:[u.jsxDEV("h1",{className:"text-2xl font-semibold mb-1",children:"Data Management"},void 0,!1,void 0,this),u.jsxDEV("p",{className:"text-[#666]",children:"Manage stored data and telemetry."},void 0,!1,void 0,this)]},void 0,!0,void 0,this),u.jsxDEV("div",{className:"bg-[#111] border border-[#1a1a1a] rounded-lg p-4",children:[u.jsxDEV("h3",{className:"font-medium mb-2",children:"Telemetry Data"},void 0,!1,void 0,this),u.jsxDEV("p",{className:"text-sm text-[#666] mb-4",children:W!==null?`${W.toLocaleString()} events stored`:"Loading..."},void 0,!1,void 0,this),O&&u.jsxDEV("div",{className:`mb-4 p-3 rounded text-sm ${O.type==="success"?"bg-green-500/10 text-green-400 border border-green-500/30":"bg-red-500/10 text-red-400 border border-red-500/30"}`,children:O.text},void 0,!1,void 0,this),u.jsxDEV("button",{onClick:F,disabled:G||W===0,className:"px-4 py-2 bg-red-500/20 text-red-400 hover:bg-red-500/30 disabled:opacity-50 disabled:cursor-not-allowed rounded text-sm font-medium transition",children:G?"Clearing...":"Clear All Telemetry"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}var t6=J0(J1(),1),aM=[{key:"memory",icon:B3,label:"Memory"},{key:"tasks",icon:I5,label:"Tasks"},{key:"files",icon:F2,label:"Files"},{key:"vision",icon:K3,label:"Vision"},{key:"operator",icon:O3,label:"Operator"},{key:"mcp",icon:T5,label:"MCP"},{key:"realtime",icon:L3,label:"Realtime"},{key:"agents",icon:M2,label:"Multi-Agent"}];function $Z({agent:Y,selected:G,onSelect:B,onToggle:O,showProject:H}){let W=aM.filter((w)=>Y.features?.[w.key]),L=Y.mcpServerDetails||[],{isActive:N,type:T}=kz(Y.id),{projects:M}=W4(),F=Y.projectId?M.find((w)=>w.id===Y.projectId):null;return t6.jsxDEV("div",{onClick:B,className:`bg-[#111] rounded p-5 border transition cursor-pointer ${G?"border-[#f97316]":"border-[#1a1a1a] hover:border-[#333]"}`,children:[t6.jsxDEV("div",{className:"flex items-start justify-between mb-3",children:[t6.jsxDEV("div",{children:[t6.jsxDEV("h3",{className:"font-semibold text-lg",children:Y.name},void 0,!1,void 0,this),t6.jsxDEV("p",{className:"text-sm text-[#666]",children:[Y.provider," / ",Y.model,Y.port&&t6.jsxDEV("span",{className:"text-[#444]",children:[" · :",Y.port]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),H&&F&&t6.jsxDEV("p",{className:"text-sm text-[#666] flex items-center gap-1.5 mt-1",children:[t6.jsxDEV("span",{className:"w-2 h-2 rounded-full",style:{backgroundColor:F.color}},void 0,!1,void 0,this),F.name]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),t6.jsxDEV(rM,{status:Y.status,isActive:N&&Y.status==="running",activityType:T},void 0,!1,void 0,this)]},void 0,!0,void 0,this),W.length>0&&t6.jsxDEV("div",{className:"flex flex-wrap gap-1.5 mb-3",children:W.map(({key:w,icon:v,label:S})=>t6.jsxDEV("span",{className:"inline-flex items-center gap-1 px-2 py-0.5 rounded bg-[#f97316]/10 text-[#f97316]/70 text-xs",title:S,children:[t6.jsxDEV(v,{className:"w-3 h-3"},void 0,!1,void 0,this),S]},w,!0,void 0,this))},void 0,!1,void 0,this),L.length>0&&t6.jsxDEV("div",{className:"flex flex-wrap gap-1.5 mb-3",children:L.map((w)=>t6.jsxDEV("span",{className:`inline-flex items-center gap-1 px-2 py-0.5 rounded text-xs ${w.status==="running"?"bg-green-500/10 text-green-400":"bg-[#222] text-[#666]"}`,title:`MCP: ${w.name} (${w.status})`,children:[t6.jsxDEV(T5,{className:"w-3 h-3"},void 0,!1,void 0,this),w.name]},w.id,!0,void 0,this))},void 0,!1,void 0,this),t6.jsxDEV("p",{className:"text-sm text-[#666] line-clamp-2 mb-4",children:Y.systemPrompt},void 0,!1,void 0,this),t6.jsxDEV("button",{onClick:O,className:`w-full px-3 py-1.5 rounded text-sm font-medium transition ${Y.status==="running"?"bg-[#f97316]/20 text-[#f97316] hover:bg-[#f97316]/30":"bg-[#3b82f6]/20 text-[#3b82f6] hover:bg-[#3b82f6]/30"}`,children:Y.status==="running"?"Stop":"Start"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}function rM({status:Y,isActive:G,activityType:B}){if(Y==="running"&&G&&B)return t6.jsxDEV("span",{className:"px-2 py-1 rounded text-xs font-medium bg-green-500/20 text-green-400 animate-pulse",children:B},void 0,!1,void 0,this);return t6.jsxDEV("span",{className:`px-2 py-1 rounded text-xs font-medium ${Y==="running"?"bg-[#3b82f6]/20 text-[#3b82f6]":"bg-[#333] text-[#666]"}`,children:Y},void 0,!1,void 0,this)}var FK=J0(F1(),1);var j1=J0(J1(),1),nM=[{key:"memory",label:"Memory",description:"Persistent recall",icon:B3},{key:"tasks",label:"Tasks",description:"Schedule and execute tasks",icon:I5},{key:"files",label:"Files",description:"File storage and management",icon:F2},{key:"vision",label:"Vision",description:"Process images and PDFs",icon:K3},{key:"operator",label:"Operator",description:"Browser automation",icon:O3},{key:"mcp",label:"MCP",description:"External tools/services",icon:T5},{key:"realtime",label:"Realtime",description:"Voice conversations",icon:L3},{key:"agents",label:"Multi-Agent",description:"Communicate with peer agents",icon:M2}];function HZ({form:Y,providers:G,configuredProviders:B,onFormChange:O,onProviderChange:H,onCreate:W,onClose:L,onGoToSettings:N}){let{projects:T,currentProjectId:M}=W4(),F=G.find((h)=>h.id===Y.provider),w=B.map((h)=>({value:h.id,label:h.name})),v=F?.models.map((h)=>({value:h.value,label:h.label,recommended:h.recommended}))||[],S=[{value:"",label:"No Project"},...T.map((h)=>({value:h.id,label:h.name}))];FK.default.useEffect(()=>{if(Y.projectId===void 0&&M&&M!=="unassigned")O({...Y,projectId:M})},[M]);let A=(h)=>{O({...Y,features:{...Y.features,[h]:!Y.features[h]}})};return j1.jsxDEV(R2,{children:[j1.jsxDEV("h2",{className:"text-xl font-semibold mb-4",children:"Create New Agent"},void 0,!1,void 0,this),B.length===0?j1.jsxDEV(tM,{onGoToSettings:N},void 0,!1,void 0,this):j1.jsxDEV(j1.Fragment,{children:[j1.jsxDEV("div",{className:"space-y-4",children:[j1.jsxDEV(v2,{label:"Name",children:j1.jsxDEV("input",{type:"text",value:Y.name,onChange:(h)=>O({...Y,name:h.target.value}),className:"w-full bg-[#0a0a0a] border border-[#222] rounded px-3 py-2 focus:outline-none focus:border-[#f97316] text-[#e0e0e0]",placeholder:"My Agent"},void 0,!1,void 0,this)},void 0,!1,void 0,this),T.length>0&&j1.jsxDEV(v2,{label:"Project",children:j1.jsxDEV(k5,{value:Y.projectId||"",options:S,onChange:(h)=>O({...Y,projectId:h||null}),placeholder:"Select project..."},void 0,!1,void 0,this)},void 0,!1,void 0,this),j1.jsxDEV(v2,{label:"Provider",children:j1.jsxDEV(k5,{value:Y.provider,options:w,onChange:H,placeholder:"Select provider..."},void 0,!1,void 0,this)},void 0,!1,void 0,this),j1.jsxDEV(v2,{label:"Model",children:j1.jsxDEV(k5,{value:Y.model,options:v,onChange:(h)=>O({...Y,model:h}),placeholder:"Select model..."},void 0,!1,void 0,this)},void 0,!1,void 0,this),j1.jsxDEV(v2,{label:"System Prompt",children:j1.jsxDEV("textarea",{value:Y.systemPrompt,onChange:(h)=>O({...Y,systemPrompt:h.target.value}),className:"w-full bg-[#0a0a0a] border border-[#222] rounded px-3 py-2 h-24 resize-none focus:outline-none focus:border-[#f97316] text-[#e0e0e0]"},void 0,!1,void 0,this)},void 0,!1,void 0,this),j1.jsxDEV(v2,{label:"Features",children:j1.jsxDEV("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-2",children:nM.map(({key:h,label:y,description:k,icon:E})=>j1.jsxDEV("button",{type:"button",onClick:()=>A(h),className:`flex items-center gap-3 p-3 rounded border text-left transition ${Y.features[h]?"border-[#f97316] bg-[#f97316]/10":"border-[#222] hover:border-[#333]"}`,children:[j1.jsxDEV(E,{className:`w-5 h-5 flex-shrink-0 ${Y.features[h]?"text-[#f97316]":"text-[#666]"}`},void 0,!1,void 0,this),j1.jsxDEV("div",{className:"flex-1 min-w-0",children:[j1.jsxDEV("div",{className:`text-sm font-medium ${Y.features[h]?"text-[#f97316]":""}`,children:y},void 0,!1,void 0,this),j1.jsxDEV("div",{className:"text-xs text-[#666]",children:k},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},h,!0,void 0,this))},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this),j1.jsxDEV("div",{className:"flex gap-3 mt-6",children:[j1.jsxDEV("button",{onClick:L,className:"flex-1 border border-[#333] hover:border-[#f97316] hover:text-[#f97316] px-4 py-2 rounded font-medium transition",children:"Cancel"},void 0,!1,void 0,this),j1.jsxDEV("button",{onClick:W,disabled:!Y.name,className:"flex-1 bg-[#f97316] hover:bg-[#fb923c] disabled:opacity-50 text-black px-4 py-2 rounded font-medium transition",children:"Create"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}function v2({label:Y,children:G}){return j1.jsxDEV("div",{children:[j1.jsxDEV("label",{className:"block text-sm text-[#666] mb-1",children:Y},void 0,!1,void 0,this),G]},void 0,!0,void 0,this)}function tM({onGoToSettings:Y}){return j1.jsxDEV("div",{className:"text-center py-6",children:[j1.jsxDEV("p",{className:"text-[#666] mb-4",children:"No API keys configured. Add a provider key first."},void 0,!1,void 0,this),j1.jsxDEV("button",{onClick:Y,className:"bg-[#f97316] hover:bg-[#fb923c] text-black px-4 py-2 rounded font-medium transition",children:"Go to Settings"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}var E1=J0(F1(),1);var r1=J0(F1(),1),T2=J0(F1(),1),_3=J0(F1(),1);function MK(Y){var G,B,O="";if(typeof Y=="string"||typeof Y=="number")O+=Y;else if(typeof Y=="object")if(Array.isArray(Y)){var H=Y.length;for(G=0;G<H;G++)Y[G]&&(B=MK(Y[G]))&&(O&&(O+=" "),O+=B)}else for(B in Y)Y[B]&&(O&&(O+=" "),O+=B);return O}function vK(){for(var Y,G,B=0,O="",H=arguments.length;B<H;B++)(Y=arguments[B])&&(G=MK(Y))&&(O&&(O+=" "),O+=G);return O}var sM=(Y)=>{let G=zv(Y),{conflictingClassGroups:B,conflictingClassGroupModifiers:O}=Y;return{getClassGroupId:(L)=>{let N=L.split("-");if(N[0]===""&&N.length!==1)N.shift();return IK(N,G)||eM(L)},getConflictingClassGroupIds:(L,N)=>{let T=B[L]||[];if(N&&O[L])return[...T,...O[L]];return T}}},IK=(Y,G)=>{if(Y.length===0)return G.classGroupId;let B=Y[0],O=G.nextPart.get(B),H=O?IK(Y.slice(1),O):void 0;if(H)return H;if(G.validators.length===0)return;let W=Y.join("-");return G.validators.find(({validator:L})=>L(W))?.classGroupId},kK=/^\[(.+)\]$/,eM=(Y)=>{if(kK.test(Y)){let G=kK.exec(Y)[1],B=G?.substring(0,G.indexOf(":"));if(B)return"arbitrary.."+B}},zv=(Y)=>{let{theme:G,prefix:B}=Y,O={nextPart:new Map,validators:[]};return Xv(Object.entries(Y.classGroups),B).forEach(([W,L])=>{u$(L,O,W,G)}),O},u$=(Y,G,B,O)=>{Y.forEach((H)=>{if(typeof H==="string"){let W=H===""?G:AK(G,H);W.classGroupId=B;return}if(typeof H==="function"){if(Qv(H)){u$(H(O),G,B,O);return}G.validators.push({validator:H,classGroupId:B});return}Object.entries(H).forEach(([W,L])=>{u$(L,AK(G,W),B,O)})})},AK=(Y,G)=>{let B=Y;return G.split("-").forEach((O)=>{if(!B.nextPart.has(O))B.nextPart.set(O,{nextPart:new Map,validators:[]});B=B.nextPart.get(O)}),B},Qv=(Y)=>Y.isThemeGetter,Xv=(Y,G)=>{if(!G)return Y;return Y.map(([B,O])=>{let H=O.map((W)=>{if(typeof W==="string")return G+W;if(typeof W==="object")return Object.fromEntries(Object.entries(W).map(([L,N])=>[G+L,N]));return W});return[B,H]})},Zv=(Y)=>{if(Y<1)return{get:()=>{return},set:()=>{}};let G=0,B=new Map,O=new Map,H=(W,L)=>{if(B.set(W,L),G++,G>Y)G=0,O=B,B=new Map};return{get(W){let L=B.get(W);if(L!==void 0)return L;if((L=O.get(W))!==void 0)return H(W,L),L},set(W,L){if(B.has(W))B.set(W,L);else H(W,L)}}};var Jv=(Y)=>{let{separator:G,experimentalParseClassName:B}=Y,O=G.length===1,H=G[0],W=G.length,L=(N)=>{let T=[],M=0,F=0,w;for(let y=0;y<N.length;y++){let k=N[y];if(M===0){if(k===H&&(O||N.slice(y,y+W)===G)){T.push(N.slice(F,y)),F=y+W;continue}if(k==="/"){w=y;continue}}if(k==="[")M++;else if(k==="]")M--}let v=T.length===0?N:N.substring(F),S=v.startsWith("!"),A=S?v.substring(1):v,h=w&&w>F?w-F:void 0;return{modifiers:T,hasImportantModifier:S,baseClassName:A,maybePostfixModifierPosition:h}};if(B)return(N)=>B({className:N,parseClassName:L});return L},bv=(Y)=>{if(Y.length<=1)return Y;let G=[],B=[];return Y.forEach((O)=>{if(O[0]==="[")G.push(...B.sort(),O),B=[];else B.push(O)}),G.push(...B.sort()),G},Yv=(Y)=>({cache:Zv(Y.cacheSize),parseClassName:Jv(Y),...sM(Y)}),$v=/\s+/,Hv=(Y,G)=>{let{parseClassName:B,getClassGroupId:O,getConflictingClassGroupIds:H}=G,W=[],L=Y.trim().split($v),N="";for(let T=L.length-1;T>=0;T-=1){let M=L[T],{modifiers:F,hasImportantModifier:w,baseClassName:v,maybePostfixModifierPosition:S}=B(M),A=Boolean(S),h=O(A?v.substring(0,S):v);if(!h){if(!A){N=M+(N.length>0?" "+N:N);continue}if(h=O(v),!h){N=M+(N.length>0?" "+N:N);continue}A=!1}let y=bv(F).join(":"),k=w?y+"!":y,E=k+h;if(W.includes(E))continue;W.push(E);let x=H(h,A);for(let j=0;j<x.length;++j){let d=x[j];W.push(k+d)}N=M+(N.length>0?" "+N:N)}return N};function Gv(){let Y=0,G,B,O="";while(Y<arguments.length)if(G=arguments[Y++]){if(B=TK(G))O&&(O+=" "),O+=B}return O}var TK=(Y)=>{if(typeof Y==="string")return Y;let G,B="";for(let O=0;O<Y.length;O++)if(Y[O]){if(G=TK(Y[O]))B&&(B+=" "),B+=G}return B};function Uv(Y,...G){let B,O,H,W=L;function L(T){let M=G.reduce((F,w)=>w(F),Y());return B=Yv(M),O=B.cache.get,H=B.cache.set,W=N,N(T)}function N(T){let M=O(T);if(M)return M;let F=Hv(T,B);return H(T,F),F}return function(){return W(Gv.apply(null,arguments))}}var A6=(Y)=>{let G=(B)=>B[Y]||[];return G.isThemeGetter=!0,G},fK=/^\[(?:([a-z-]+):)?(.+)\]$/i,qv=/^\d+\/\d+$/,Bv=new Set(["px","full","screen"]),Kv=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Ov=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Lv=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Nv=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Wv=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,d8=(Y)=>k2(Y)||Bv.has(Y)||qv.test(Y),M7=(Y)=>A2(Y,"length",kv),k2=(Y)=>Boolean(Y)&&!Number.isNaN(Number(Y)),m$=(Y)=>A2(Y,"number",k2),fz=(Y)=>Boolean(Y)&&Number.isInteger(Number(Y)),_v=(Y)=>Y.endsWith("%")&&k2(Y.slice(0,-1)),M1=(Y)=>fK.test(Y),v7=(Y)=>Kv.test(Y),wv=new Set(["length","size","percentage"]),Rv=(Y)=>A2(Y,wv,SK),Pv=(Y)=>A2(Y,"position",SK),Fv=new Set(["image","url"]),Mv=(Y)=>A2(Y,Fv,Iv),vv=(Y)=>A2(Y,"",Av),Sz=()=>!0,A2=(Y,G,B)=>{let O=fK.exec(Y);if(O){if(O[1])return typeof G==="string"?O[1]===G:G.has(O[1]);return B(O[2])}return!1},kv=(Y)=>Ov.test(Y)&&!Lv.test(Y),SK=()=>!1,Av=(Y)=>Nv.test(Y),Iv=(Y)=>Wv.test(Y);var Tv=()=>{let Y=A6("colors"),G=A6("spacing"),B=A6("blur"),O=A6("brightness"),H=A6("borderColor"),W=A6("borderRadius"),L=A6("borderSpacing"),N=A6("borderWidth"),T=A6("contrast"),M=A6("grayscale"),F=A6("hueRotate"),w=A6("invert"),v=A6("gap"),S=A6("gradientColorStops"),A=A6("gradientColorStopPositions"),h=A6("inset"),y=A6("margin"),k=A6("opacity"),E=A6("padding"),x=A6("saturate"),j=A6("scale"),d=A6("sepia"),o=A6("skew"),c=A6("space"),l=A6("translate"),a=()=>["auto","contain","none"],Q0=()=>["auto","hidden","clip","visible","scroll"],q0=()=>["auto",M1,G],Y0=()=>[M1,G],L0=()=>["",d8,M7],A0=()=>["auto",k2,M1],_0=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],s0=()=>["solid","dashed","dotted","double","none"],_1=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],$1=()=>["start","end","center","between","around","evenly","stretch"],D1=()=>["","0",M1],j0=()=>["auto","avoid","all","avoid-page","page","left","right","column"],O1=()=>[k2,M1];return{cacheSize:500,separator:":",theme:{colors:[Sz],spacing:[d8,M7],blur:["none","",v7,M1],brightness:O1(),borderColor:[Y],borderRadius:["none","","full",v7,M1],borderSpacing:Y0(),borderWidth:L0(),contrast:O1(),grayscale:D1(),hueRotate:O1(),invert:D1(),gap:Y0(),gradientColorStops:[Y],gradientColorStopPositions:[_v,M7],inset:q0(),margin:q0(),opacity:O1(),padding:Y0(),saturate:O1(),scale:O1(),sepia:D1(),skew:O1(),space:Y0(),translate:Y0()},classGroups:{aspect:[{aspect:["auto","square","video",M1]}],container:["container"],columns:[{columns:[v7]}],"break-after":[{"break-after":j0()}],"break-before":[{"break-before":j0()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[..._0(),M1]}],overflow:[{overflow:Q0()}],"overflow-x":[{"overflow-x":Q0()}],"overflow-y":[{"overflow-y":Q0()}],overscroll:[{overscroll:a()}],"overscroll-x":[{"overscroll-x":a()}],"overscroll-y":[{"overscroll-y":a()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[h]}],"inset-x":[{"inset-x":[h]}],"inset-y":[{"inset-y":[h]}],start:[{start:[h]}],end:[{end:[h]}],top:[{top:[h]}],right:[{right:[h]}],bottom:[{bottom:[h]}],left:[{left:[h]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",fz,M1]}],basis:[{basis:q0()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",M1]}],grow:[{grow:D1()}],shrink:[{shrink:D1()}],order:[{order:["first","last","none",fz,M1]}],"grid-cols":[{"grid-cols":[Sz]}],"col-start-end":[{col:["auto",{span:["full",fz,M1]},M1]}],"col-start":[{"col-start":A0()}],"col-end":[{"col-end":A0()}],"grid-rows":[{"grid-rows":[Sz]}],"row-start-end":[{row:["auto",{span:[fz,M1]},M1]}],"row-start":[{"row-start":A0()}],"row-end":[{"row-end":A0()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",M1]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",M1]}],gap:[{gap:[v]}],"gap-x":[{"gap-x":[v]}],"gap-y":[{"gap-y":[v]}],"justify-content":[{justify:["normal",...$1()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...$1(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...$1(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[E]}],px:[{px:[E]}],py:[{py:[E]}],ps:[{ps:[E]}],pe:[{pe:[E]}],pt:[{pt:[E]}],pr:[{pr:[E]}],pb:[{pb:[E]}],pl:[{pl:[E]}],m:[{m:[y]}],mx:[{mx:[y]}],my:[{my:[y]}],ms:[{ms:[y]}],me:[{me:[y]}],mt:[{mt:[y]}],mr:[{mr:[y]}],mb:[{mb:[y]}],ml:[{ml:[y]}],"space-x":[{"space-x":[c]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[c]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",M1,G]}],"min-w":[{"min-w":[M1,G,"min","max","fit"]}],"max-w":[{"max-w":[M1,G,"none","full","min","max","fit","prose",{screen:[v7]},v7]}],h:[{h:[M1,G,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[M1,G,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[M1,G,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[M1,G,"auto","min","max","fit"]}],"font-size":[{text:["base",v7,M7]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",m$]}],"font-family":[{font:[Sz]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",M1]}],"line-clamp":[{"line-clamp":["none",k2,m$]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",d8,M1]}],"list-image":[{"list-image":["none",M1]}],"list-style-type":[{list:["none","disc","decimal",M1]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[Y]}],"placeholder-opacity":[{"placeholder-opacity":[k]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[Y]}],"text-opacity":[{"text-opacity":[k]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...s0(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",d8,M7]}],"underline-offset":[{"underline-offset":["auto",d8,M1]}],"text-decoration-color":[{decoration:[Y]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:Y0()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",M1]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",M1]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[k]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[..._0(),Pv]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Rv]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Mv]}],"bg-color":[{bg:[Y]}],"gradient-from-pos":[{from:[A]}],"gradient-via-pos":[{via:[A]}],"gradient-to-pos":[{to:[A]}],"gradient-from":[{from:[S]}],"gradient-via":[{via:[S]}],"gradient-to":[{to:[S]}],rounded:[{rounded:[W]}],"rounded-s":[{"rounded-s":[W]}],"rounded-e":[{"rounded-e":[W]}],"rounded-t":[{"rounded-t":[W]}],"rounded-r":[{"rounded-r":[W]}],"rounded-b":[{"rounded-b":[W]}],"rounded-l":[{"rounded-l":[W]}],"rounded-ss":[{"rounded-ss":[W]}],"rounded-se":[{"rounded-se":[W]}],"rounded-ee":[{"rounded-ee":[W]}],"rounded-es":[{"rounded-es":[W]}],"rounded-tl":[{"rounded-tl":[W]}],"rounded-tr":[{"rounded-tr":[W]}],"rounded-br":[{"rounded-br":[W]}],"rounded-bl":[{"rounded-bl":[W]}],"border-w":[{border:[N]}],"border-w-x":[{"border-x":[N]}],"border-w-y":[{"border-y":[N]}],"border-w-s":[{"border-s":[N]}],"border-w-e":[{"border-e":[N]}],"border-w-t":[{"border-t":[N]}],"border-w-r":[{"border-r":[N]}],"border-w-b":[{"border-b":[N]}],"border-w-l":[{"border-l":[N]}],"border-opacity":[{"border-opacity":[k]}],"border-style":[{border:[...s0(),"hidden"]}],"divide-x":[{"divide-x":[N]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[N]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[k]}],"divide-style":[{divide:s0()}],"border-color":[{border:[H]}],"border-color-x":[{"border-x":[H]}],"border-color-y":[{"border-y":[H]}],"border-color-s":[{"border-s":[H]}],"border-color-e":[{"border-e":[H]}],"border-color-t":[{"border-t":[H]}],"border-color-r":[{"border-r":[H]}],"border-color-b":[{"border-b":[H]}],"border-color-l":[{"border-l":[H]}],"divide-color":[{divide:[H]}],"outline-style":[{outline:["",...s0()]}],"outline-offset":[{"outline-offset":[d8,M1]}],"outline-w":[{outline:[d8,M7]}],"outline-color":[{outline:[Y]}],"ring-w":[{ring:L0()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[Y]}],"ring-opacity":[{"ring-opacity":[k]}],"ring-offset-w":[{"ring-offset":[d8,M7]}],"ring-offset-color":[{"ring-offset":[Y]}],shadow:[{shadow:["","inner","none",v7,vv]}],"shadow-color":[{shadow:[Sz]}],opacity:[{opacity:[k]}],"mix-blend":[{"mix-blend":[..._1(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":_1()}],filter:[{filter:["","none"]}],blur:[{blur:[B]}],brightness:[{brightness:[O]}],contrast:[{contrast:[T]}],"drop-shadow":[{"drop-shadow":["","none",v7,M1]}],grayscale:[{grayscale:[M]}],"hue-rotate":[{"hue-rotate":[F]}],invert:[{invert:[w]}],saturate:[{saturate:[x]}],sepia:[{sepia:[d]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[B]}],"backdrop-brightness":[{"backdrop-brightness":[O]}],"backdrop-contrast":[{"backdrop-contrast":[T]}],"backdrop-grayscale":[{"backdrop-grayscale":[M]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[F]}],"backdrop-invert":[{"backdrop-invert":[w]}],"backdrop-opacity":[{"backdrop-opacity":[k]}],"backdrop-saturate":[{"backdrop-saturate":[x]}],"backdrop-sepia":[{"backdrop-sepia":[d]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[L]}],"border-spacing-x":[{"border-spacing-x":[L]}],"border-spacing-y":[{"border-spacing-y":[L]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",M1]}],duration:[{duration:O1()}],ease:[{ease:["linear","in","out","in-out",M1]}],delay:[{delay:O1()}],animate:[{animate:["none","spin","ping","pulse","bounce",M1]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[j]}],"scale-x":[{"scale-x":[j]}],"scale-y":[{"scale-y":[j]}],rotate:[{rotate:[fz,M1]}],"translate-x":[{"translate-x":[l]}],"translate-y":[{"translate-y":[l]}],"skew-x":[{"skew-x":[o]}],"skew-y":[{"skew-y":[o]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",M1]}],accent:[{accent:["auto",Y]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",M1]}],"caret-color":[{caret:[Y]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":Y0()}],"scroll-mx":[{"scroll-mx":Y0()}],"scroll-my":[{"scroll-my":Y0()}],"scroll-ms":[{"scroll-ms":Y0()}],"scroll-me":[{"scroll-me":Y0()}],"scroll-mt":[{"scroll-mt":Y0()}],"scroll-mr":[{"scroll-mr":Y0()}],"scroll-mb":[{"scroll-mb":Y0()}],"scroll-ml":[{"scroll-ml":Y0()}],"scroll-p":[{"scroll-p":Y0()}],"scroll-px":[{"scroll-px":Y0()}],"scroll-py":[{"scroll-py":Y0()}],"scroll-ps":[{"scroll-ps":Y0()}],"scroll-pe":[{"scroll-pe":Y0()}],"scroll-pt":[{"scroll-pt":Y0()}],"scroll-pr":[{"scroll-pr":Y0()}],"scroll-pb":[{"scroll-pb":Y0()}],"scroll-pl":[{"scroll-pl":Y0()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",M1]}],fill:[{fill:[Y,"none"]}],"stroke-w":[{stroke:[d8,M7,m$]}],stroke:[{stroke:[Y,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}};var CK=Uv(Tv);var EK=J0(F1(),1),r5=J0(W6(),1),f2=J0(F1(),1),C4=J0(W6(),1),lK=J0(W6(),1),x$=J0(W6(),1),S2=J0(F1(),1),l6=J0(W6(),1),dK=J0(F1(),1),H4=J0(W6(),1),hz=J0(W6(),1),P0=J0(W6(),1),J5=J0(W6(),1),p$=J0(W6(),1),p0=J0(W6(),1),h6=J0(W6(),1),o1=J0(W6(),1),C0=J0(W6(),1),q1=J0(W6(),1),Cz=J0(W6(),1),O8=J0(F1(),1),b1=J0(W6(),1),x8=J0(F1(),1),l0=J0(W6(),1),n4=J0(W6(),1),Wk=J0(F1(),1),xK=J0(W6(),1),j$=J0(F1(),1),o$=J0(W6(),1),_k=J0(F1(),1),iK=J0(W6(),1),pK=J0(F1(),1),jK=J0(W6(),1),wk=J0(F1(),1),oK=J0(W6(),1),aK=J0(W6(),1),rK=J0(W6(),1),Sv=Object.defineProperty,Cv=(Y,G,B)=>(G in Y)?Sv(Y,G,{enumerable:!0,configurable:!0,writable:!0,value:B}):Y[G]=B,hv=(Y,G,B)=>Cv(Y,typeof G!=="symbol"?G+"":G,B);function G6(...Y){return CK(vK(Y))}var jT=[{id:"msg-1",role:"assistant",content:"Hello! I'm your AI assistant. How can I help you today?",timestamp:new Date(Date.now()-3600000)},{id:"msg-2",role:"user",content:"I want to plan a trip to Europe",timestamp:new Date(Date.now()-3500000)},{id:"msg-3",role:"assistant",content:"Great choice! Europe has amazing destinations. What's your budget and how many days do you have?",timestamp:new Date(Date.now()-3400000)},{id:"msg-4",role:"user",content:"Around $2000 for 5 days",timestamp:new Date(Date.now()-3300000)},{id:"msg-5",role:"assistant",content:"Perfect! I found some great destinations that fit your budget:",widgets:[{type:"list",id:"destinations-1",props:{items:[{id:"paris",title:"Paris, France",subtitle:"5 days • $1,850",description:"The City of Light with iconic landmarks",metadata:{city:"Paris",country:"France",lat:48.8566,lng:2.3522,price:1850,days:5}},{id:"rome",title:"Rome, Italy",subtitle:"5 days • $1,650",description:"Ancient history meets modern culture",metadata:{city:"Rome",country:"Italy",lat:41.9028,lng:12.4964,price:1650,days:5}},{id:"barcelona",title:"Barcelona, Spain",subtitle:"5 days • $1,450",description:"Beautiful beaches and Gaudí architecture",metadata:{city:"Barcelona",country:"Spain",lat:41.3851,lng:2.1734,price:1450,days:5}}]},actions:[{type:"select_destination",label:"Select",handler:"client",payload:{}},{type:"view_details",label:"Details",handler:"server",payload:{}}]}],timestamp:new Date(Date.now()-3200000)}],oT=[{id:"thread-1",title:"Trip to Europe",preview:"Planning a 5-day trip...",createdAt:new Date(Date.now()-86400000),updatedAt:new Date(Date.now()-3600000),messageCount:12},{id:"thread-2",title:"Restaurant Recommendations",preview:"Looking for good places...",createdAt:new Date(Date.now()-172800000),updatedAt:new Date(Date.now()-86400000),messageCount:8},{id:"thread-3",title:"Budget Planning",preview:"Help with monthly budget",createdAt:new Date(Date.now()-259200000),updatedAt:new Date(Date.now()-172800000),messageCount:15}];function yv(Y=1000){return new Promise((G)=>{setTimeout(()=>{G({id:`msg-${Date.now()}`,role:"assistant",content:"This is a mock response. In production, this would come from your AI agent API.",timestamp:new Date})},Y)})}function Vv(Y){let G=Y.toLowerCase();if(G.includes("analyze")||G.includes("analysis"))return`Analysis complete for "${Y}". Found 247 records with an average value of $1,234. The data shows a 23% increase compared to last quarter. Key insights: Revenue is up, customer satisfaction improved by 15%, and operational costs decreased by 8%.`;if(G.includes("sales")||G.includes("revenue"))return"Sales data processed: Q4 2024 revenue reached $2.4M, representing 18% growth year-over-year. Top performing products: Enterprise Plan (+45%), Pro Plan (+32%), Basic Plan (+12%). Regional breakdown: North America (52%), Europe (31%), APAC (17%).";if(G.includes("report")||G.includes("summary"))return"Report generated successfully. Executive Summary: Overall performance exceeded targets by 12%. Marketing ROI improved to 3.2x, customer acquisition cost reduced by 18%, and lifetime value increased by 24%. Detailed breakdown available in attached widgets.";if(G.includes("data")||G.includes("metrics"))return"Data metrics retrieved: 1,847 active users, 12,394 sessions this month, 94.2% uptime, average response time 127ms. Performance is within acceptable parameters. No critical issues detected.";if(G.includes("customer")||G.includes("user"))return"Customer analysis complete: 523 new customers this month, 89% retention rate, average satisfaction score 4.6/5. Top feedback themes: excellent support (87%), easy to use (72%), good value (68%). 3 support tickets pending review.";return"This is a mock response showing how your agent would process and respond to commands. The actual response would be generated by your AI agent based on real data and context."}function Dv(Y){let G=Vv(Y),B=Y.toLowerCase(),O=[],H;if(B.includes("sales")||B.includes("revenue")||B.includes("analyze"))O.push({type:"card",id:`widget-${Date.now()}-1`,props:{title:"Q4 2024 Performance",description:"Revenue: $2.4M (+18% YoY)",footer:"Updated: "+new Date().toLocaleDateString()},actions:[{type:"view_details",label:"View Details",handler:"client",payload:{reportId:"q4-2024"}}]});if(B.includes("customer")||B.includes("user"))O.push({type:"list",id:`widget-${Date.now()}-2`,props:{items:[{id:"metric-1",title:"Active Users",subtitle:"1,847 users",description:"+12% from last month"},{id:"metric-2",title:"Retention Rate",subtitle:"89%",description:"Above industry average"},{id:"metric-3",title:"Satisfaction Score",subtitle:"4.6/5",description:"Based on 234 reviews"}]}});if(B.includes("task")||B.includes("todo")||B.includes("work")||B.includes("completed"))O.push({type:"list",id:`widget-${Date.now()}-tasks`,props:{items:[{id:"task-1",title:"Implement user authentication",subtitle:"Created just now",description:"Added OAuth 2.0 support with Google and GitHub providers",backgroundColor:"rgba(59, 130, 246, 0.15)",metadata:{status:"created",priority:"high",tags:["backend","security"]}},{id:"task-2",title:"Update API documentation",subtitle:"Modified 2 minutes ago",description:"Changed endpoint descriptions and added new examples",backgroundColor:"rgba(234, 179, 8, 0.15)",metadata:{status:"modified",priority:"medium",tags:["docs"]}},{id:"task-3",title:"Fix login redirect bug",subtitle:"Completed 5 minutes ago",description:"Users now properly redirected after successful login",backgroundColor:"rgba(34, 197, 94, 0.15)",metadata:{status:"completed",priority:"urgent",tags:["bugfix","auth"]}}]},actions:[{type:"view_task",label:"View",handler:"client",payload:{}},{type:"undo",label:"Undo",handler:"server",payload:{}}]}),H={type:"update_database",payload:{table:"tasks",operation:"mark_as_viewed",taskIds:["task-1","task-2","task-3"],timestamp:new Date().toISOString()}};if(B.includes("analyze")||B.includes("analysis"))H={type:"send_notification",payload:{recipient:"team@company.com",subject:"Analysis Complete",message:"Your requested analysis has been completed and is ready for review."}};return{message:G,widgets:O,action:H}}function mv(Y,G,B,O,H=30){let{message:W,widgets:L}=Dv(Y),N=W.split(" "),T=0,M=setInterval(()=>{try{if(T<N.length)G({type:"token",content:N[T]+" "}),T++;else{clearInterval(M),L.forEach((w)=>{G({type:"widget",widget:w})});let F=`mock_thread_${Date.now()}`;G({type:"complete"}),B(F)}}catch(F){clearInterval(M),O(F instanceof Error?F:Error("Mock streaming error"))}},H)}function uv(Y){return new Promise((G,B)=>{let O=new FileReader;O.onload=()=>{let W=O.result.split(",")[1];G(W)},O.onerror=()=>B(Error("Failed to read file")),O.readAsDataURL(Y)})}function gv(Y){if(Y.startsWith("image/"))return"image";return"document"}function Ev(Y){return["image/jpeg","image/png","image/gif","image/webp","application/pdf","text/plain","application/msword","application/vnd.openxmlformats-officedocument.wordprocessingml.document"].includes(Y.type)}async function lv(Y){let G=await uv(Y);return{type:gv(Y.type),source:{type:"base64",media_type:Y.type,data:G}}}async function dv(Y){let G=Array.from(Y);return await Promise.all(G.map((O)=>lv(O)))}async function hK(Y,G){if(!G||G.length===0)return Y;let B=[];if(Y.trim())B.push({type:"text",text:Y.trim()});let O=await dv(G);return B.push(...O),B}function UZ(Y){if(Y<1024)return`${Y} B`;if(Y<1048576)return`${(Y/1024).toFixed(1)} KB`;return`${(Y/1048576).toFixed(1)} MB`}var yK=10485760;function mK(Y){if(!Ev(Y))return{valid:!1,error:`Unsupported file type: ${Y.type}`};if(Y.size>yK)return{valid:!1,error:`File too large: ${UZ(Y.size)} (max ${UZ(yK)})`};return{valid:!0}}var cv=["list","table"];function xv(Y){let G=[],B=!1,O=Y.match(/"items"\s*:\s*\[/);if(!O)return{items:G,isStreaming:!1};let H=Y.indexOf("[",O.index);if(H===-1)return{items:G,isStreaming:!0};let W=0,L=!1,N=!1,T=-1;for(let w=H+1;w<Y.length;w++){let v=Y[w];if(N){N=!1;continue}if(v==="\\"&&L){N=!0;continue}if(v==='"'){L=!L;continue}if(L)continue;if(v==="{"){if(W===0)T=w;W++}else if(v==="}"){if(W--,W===0&&T!==-1){let S=Y.slice(T,w+1);try{let A=JSON.parse(S);if(!A.id)A.id=`item-${G.length}-${d$(S)}`;G.push(A)}catch(A){}T=-1}}else if(v==="]"&&W===0){B=!1;break}}if(W>0||T!==-1)B=!0;let M=Y.slice(H);if(c$(M,0)===-1)B=!0;return{items:G,isStreaming:B}}function d$(Y){let G=0;for(let B=0;B<Y.length;B++){let O=Y.charCodeAt(B);G=(G<<5)-G+O,G=G&G}return Math.abs(G).toString(36)}function c$(Y,G){let B=0,O=!1,H=!1;for(let W=G;W<Y.length;W++){let L=Y[W];if(H){H=!1;continue}if(L==="\\"&&O){H=!0;continue}if(L==='"'){O=!O;continue}if(O)continue;if(L==="["||L==="{")B++;else if(L==="]"||L==="}"){if(B--,B===0)return W}}return-1}function GZ(Y){let G=[],B=!1,O=!1,H=0,W=null,L=Y,N=Y.lastIndexOf("@ui:");if(N!==-1){let F=Y.slice(N),w=F.match(/^@ui:(\w+)/);if(w){let v=w[1],S=F.indexOf("[");if(S===-1)L=Y.slice(0,N),W=v,O=!0;else{let A=N+S;if(c$(Y,A)===-1)if(cv.includes(v)){let y=Y.slice(A+1),{items:k,isStreaming:E}=xv(y);if(k.length>0){L=Y.slice(0,N);let x=`widget-${v}-streaming-${d$(y)}`,j=L.replace(/[\s:;\-–—\.]+$/g,"").trim();if(j)G.push({type:"text",content:j});G.push({type:"widget",widget:{type:v,id:x,props:v==="table"?{rows:k,columns:[]}:{items:k},isStreaming:E}}),B=!0,O=!1,L=""}else L=Y.slice(0,N),W=v,O=!0}else L=Y.slice(0,N),W=v,O=!0}}}if(O)L=L.replace(/[\s:;\-–—\.]+$/g,"");let T=/@ui:(\w+)\[/g,M;while((M=T.exec(L))!==null){let F=M[1],w=M.index+M[0].length-1,v=c$(L,w);if(v===-1)continue;let S=L.slice(w+1,v);if(M.index>H){let A=L.slice(H,M.index).trim();if(A)G.push({type:"text",content:A})}try{let A=S.trim(),h=JSON.parse(A),y=`widget-${F}-${d$(A)}`,{metadata:k,actions:E,...x}=h;G.push({type:"widget",widget:{type:F,id:y,props:x,...E&&{actions:E},...k&&{metadata:k}}}),B=!0}catch(A){}H=v+1,T.lastIndex=H}if(H<L.length){let F=L.slice(H).trim();if(F)G.push({type:"text",content:F})}if(G.length===0&&L.trim())G.push({type:"text",content:L.trim()});if(W)G.push({type:"widget_pending",pendingType:W});return{segments:G,hasWidgets:B,hasPendingWidget:O}}var uK={card:{schema:"title, description?, image?, footer?, actions?: [{type, label}]",example:'@ui:card[{"title": "Summary", "description": "Details here"}]'},list:{schema:"items: [{id, title, subtitle?, description?, image?, metadata?: {any extra data}}], actions?: [{type, label}] - metadata is sent as action payload when clicked",example:'@ui:list[{"items": [{"id": "1", "title": "Item", "subtitle": "Info", "metadata": {"key": "value"}}]}]'},button_group:{schema:"buttons: [{id, label, variant?}] - Use for standalone buttons only, NOT for form submits",example:'@ui:button_group[{"buttons": [{"id": "ok", "label": "OK"}]}]'},form:{schema:"title?, fields: [{name, type: text|password|number|select|checkbox|textarea|date, label, required?, placeholder?, options?}], actions: [{type, label}] - Button is built-in via actions, do NOT add separate button",example:'@ui:form[{"title": "Settings", "fields": [{"name": "apiKey", "type": "password", "label": "API Key", "required": true}], "actions": [{"type": "save", "label": "Save"}]}]'},table:{schema:"columns: [{key, label}], rows: [...], striped?, compact?",example:'@ui:table[{"columns": [{"key": "name", "label": "Name"}], "rows": [{"name": "A"}]}]'},image:{schema:"src, alt, caption?",example:'@ui:image[{"src": "url", "alt": "desc"}]'},chart:{schema:"chartType: line|bar|pie, data: {labels, datasets}",example:'@ui:chart[{"chartType": "bar", "data": {"labels": ["A"], "datasets": [{"label": "X", "data": [10]}]}}]'},flow:{schema:"title, subtitle?, icon?: research|schedule|analyze|deploy|recurring|automation|data, steps: [{id, label, type?, color?: blue|purple|cyan|amber|emerald|rose|indigo|orange, status?: pending|active|completed|error|skipped}] - Horizontal pipeline. Use @label for agents. Types auto-detected from label.",example:'@ui:flow[{"title": "Deploy Pipeline", "icon": "deploy", "steps": [{"id": "1", "label": "Test", "color": "cyan"}, {"id": "2", "label": "Build", "color": "amber"}, {"id": "3", "label": "Deploy", "color": "rose"}]}]'}},iv=Object.keys(uK),pv=["flow"],gK=iv.filter((Y)=>!pv.includes(Y));function jv(Y){let G=Y||gK,B=`
180
- ## UI Widgets
181
- SYNTAX: @ui:type[{json}] - MUST use SQUARE BRACKETS [] around the JSON object.
182
- CORRECT: @ui:list[{"items": [...]}]
183
- WRONG: @ui:list{"items": [...]} (missing square brackets)
184
-
185
- `;for(let O of G){let H=uK[O];if(!H)continue;B+=`${O}: ${H.schema} | ${H.example}
186
- `}return B+=`
187
- Per-item "metadata" is sent as payload on action click.
188
- `,B}function ov(Y){return`
189
- Widgets: @ui:type[{json}] - MUST use square brackets []. Example: @ui:list[{"items": [...]}]. Types: ${(Y||gK).join(", ")}. Per-item "metadata" is sent as action payload.
190
- `}function av({widget:Y,onAction:G}){let{title:B,description:O,image:H,footer:W}=Y.props;return r5.jsxs("div",{className:"border border-neutral-200 dark:border-neutral-700 rounded-xl bg-white dark:bg-neutral-900 overflow-hidden",children:[H&&r5.jsx("img",{src:H,alt:B,className:"w-full h-48 object-cover"}),r5.jsxs("div",{className:"p-4",children:[r5.jsx("h3",{className:"!text-lg font-semibold !text-neutral-900 dark:!text-white",children:B}),O&&r5.jsx("p",{className:"!text-neutral-600 dark:!text-neutral-400 mt-2",children:O})]}),(W||Y.actions&&Y.actions.length>0)&&r5.jsxs("div",{className:"border-t border-neutral-200 dark:border-neutral-700 p-4 flex justify-between items-center",children:[W&&r5.jsx("span",{className:"!text-sm !text-neutral-600 dark:!text-neutral-400",children:W}),Y.actions&&Y.actions.length>0&&r5.jsx("div",{className:"flex gap-2",children:Y.actions.map((L,N)=>r5.jsx("button",{onClick:()=>G?.({type:L.type,payload:L.payload,widgetId:Y.id,timestamp:new Date}),className:"px-3 py-1.5 !text-sm rounded-lg font-medium transition-colors bg-blue-500 !text-white hover:bg-blue-600",children:L.label},N))})]})]})}function rv({widget:Y,onAction:G}){let{items:B}=Y.props,O=Y.isStreaming??!1,H=f2.useRef(new Set),[W,L]=f2.useState(new Set);return f2.useEffect(()=>{let N=new Set(B.map((M)=>M.id)),T=new Set;if(B.forEach((M)=>{if(!H.current.has(M.id))T.add(M.id)}),B.forEach((M)=>H.current.add(M.id)),T.size>0){L(T);let M=setTimeout(()=>{L(new Set)},500);return()=>clearTimeout(M)}},[B]),C4.jsxs("div",{className:"border border-neutral-200 dark:border-neutral-700 rounded-xl bg-white dark:bg-neutral-900 overflow-hidden",children:[B.map((N,T)=>{let M=W.has(N.id),F=T===B.length-1;return C4.jsxs("div",{className:`apteva-list-item flex items-center p-4 transition-colors ${!F||O?"border-b border-neutral-200 dark:border-neutral-700":""} ${!N.backgroundColor?"hover:bg-neutral-50 dark:hover:bg-neutral-800":""} ${M?"apteva-list-item-new":""}`,style:N.backgroundColor?{backgroundColor:N.backgroundColor}:void 0,children:[N.image&&C4.jsx("img",{src:N.image,alt:N.title,className:"w-16 h-16 rounded object-cover"}),C4.jsxs("div",{className:`flex-1 ${N.image?"ml-4":""}`,children:[C4.jsx("h4",{className:"font-semibold !text-neutral-900 dark:!text-white",children:N.title}),N.subtitle&&C4.jsx("p",{className:"!text-sm !text-neutral-600 dark:!text-neutral-400",children:N.subtitle}),N.description&&C4.jsx("p",{className:"!text-xs !text-neutral-500 dark:!text-neutral-500 mt-1",children:N.description})]}),Y.actions&&Y.actions.length>0&&C4.jsx("div",{className:"flex gap-2",children:Y.actions.map((w,v)=>C4.jsx("button",{onClick:()=>G?.({type:w.type,payload:N.metadata||N,widgetId:Y.id,timestamp:new Date}),className:"px-3 py-1.5 !text-sm rounded-lg font-medium transition-colors bg-blue-500 !text-white hover:bg-blue-600",children:w.label},v))})]},N.id)}),O&&C4.jsxs("div",{className:"apteva-list-streaming flex items-center gap-3 p-4 text-neutral-500 dark:text-neutral-400",children:[C4.jsxs("div",{className:"apteva-streaming-dots flex gap-1",children:[C4.jsx("span",{className:"w-2 h-2 bg-current rounded-full animate-pulse",style:{animationDelay:"0ms"}}),C4.jsx("span",{className:"w-2 h-2 bg-current rounded-full animate-pulse",style:{animationDelay:"150ms"}}),C4.jsx("span",{className:"w-2 h-2 bg-current rounded-full animate-pulse",style:{animationDelay:"300ms"}})]}),C4.jsx("span",{className:"text-sm",children:"Loading more..."})]})]})}function nv({widget:Y,onAction:G}){let{label:B,variant:O="primary",disabled:H=!1}=Y.props;return lK.jsx("button",{onClick:()=>Y.actions?.[0]&&G?.({type:Y.actions[0].type,payload:Y.actions[0].payload,widgetId:Y.id,timestamp:new Date}),disabled:H,className:G6("px-4 py-2 rounded-lg font-medium transition-colors",{primary:"bg-blue-500 !text-white hover:bg-blue-600",secondary:"bg-neutral-500 !text-white hover:bg-neutral-600",outline:"border-2 border-blue-500 !text-blue-500 hover:bg-blue-50 dark:hover:bg-blue-900",ghost:"!text-blue-500 hover:bg-blue-50 dark:hover:bg-blue-900"}[O],{"opacity-50 cursor-not-allowed":H}),children:B})}function tv({widget:Y,onAction:G}){let{layout:B="horizontal",buttons:O}=Y.props,H={primary:"bg-blue-500 !text-white hover:bg-blue-600",secondary:"bg-neutral-200 dark:bg-neutral-700 !text-neutral-800 dark:!text-neutral-200 hover:bg-neutral-300 dark:hover:bg-neutral-600",outline:"border border-neutral-300 dark:border-neutral-600 !text-neutral-700 dark:!text-neutral-300 hover:bg-neutral-100 dark:hover:bg-neutral-800"},W=(L)=>{return Y.actions?.find((N)=>N.payload?.buttonId===L)||Y.actions?.[0]};return x$.jsx("div",{className:G6("flex gap-2",B==="vertical"?"flex-col":"flex-row flex-wrap"),children:O.map((L)=>{let N=W(L.id);return x$.jsx("button",{onClick:()=>{if(N)G?.({type:N.type,payload:{...N.payload,buttonId:L.id},widgetId:Y.id,timestamp:new Date})},className:G6("px-4 py-2 rounded-lg font-medium transition-colors text-sm",H[L.variant||"secondary"]),children:L.label},L.id)})})}function sv({widget:Y,onAction:G}){let{columns:B,rows:O,caption:H,compact:W=!1,striped:L=!1}=Y.props,N=Y.isStreaming??!1,T=S2.useRef(new Set),[M,F]=S2.useState(new Set);S2.useEffect(()=>{let v=new Set;if(O.forEach((S,A)=>{let h=S.id||`row-${A}`;if(!T.current.has(h))v.add(h)}),O.forEach((S,A)=>{let h=S.id||`row-${A}`;T.current.add(h)}),v.size>0){F(v);let S=setTimeout(()=>{F(new Set)},500);return()=>clearTimeout(S)}},[O]);let w=(v)=>{switch(v){case"center":return"text-center";case"right":return"text-right";default:return"text-left"}};return l6.jsx("div",{className:"border border-neutral-200 dark:border-neutral-700 rounded-xl bg-white dark:bg-neutral-900 overflow-hidden",children:l6.jsx("div",{className:"overflow-x-auto",children:l6.jsxs("table",{className:"w-full",children:[H&&l6.jsx("caption",{className:"px-4 py-2 text-sm text-neutral-600 dark:text-neutral-400 text-left bg-neutral-50 dark:bg-neutral-800 border-b border-neutral-200 dark:border-neutral-700",children:H}),l6.jsx("thead",{children:l6.jsx("tr",{className:"bg-neutral-50 dark:bg-neutral-800 border-b border-neutral-200 dark:border-neutral-700",children:B.map((v)=>l6.jsx("th",{className:G6("font-semibold text-neutral-900 dark:text-white",W?"px-3 py-2 text-xs":"px-4 py-3 text-sm",w(v.align)),style:v.width?{width:v.width}:void 0,children:v.label},v.key))})}),l6.jsxs("tbody",{children:[O.map((v,S)=>{let A=v.id||`row-${S}`,h=M.has(A);return l6.jsx("tr",{className:G6("apteva-table-row border-b border-neutral-200 dark:border-neutral-700 last:border-b-0","transition-colors hover:bg-neutral-50 dark:hover:bg-neutral-800",L&&S%2===1&&"bg-neutral-50/50 dark:bg-neutral-800/50",h&&"apteva-table-row-new"),onClick:()=>{if(Y.actions&&Y.actions.length>0)G?.({type:Y.actions[0].type,payload:v,widgetId:Y.id,timestamp:new Date})},style:{cursor:Y.actions?.length?"pointer":"default"},children:B.map((y)=>l6.jsx("td",{className:G6("text-neutral-700 dark:text-neutral-300",W?"px-3 py-2 text-xs":"px-4 py-3 text-sm",w(y.align)),children:v[y.key]??"—"},y.key))},A)}),O.length===0&&!N&&l6.jsx("tr",{children:l6.jsx("td",{colSpan:B.length||1,className:"px-4 py-8 text-center text-sm text-neutral-500 dark:text-neutral-400",children:"No data available"})}),N&&l6.jsx("tr",{className:"apteva-table-streaming",children:l6.jsx("td",{colSpan:B.length||1,className:"px-4 py-3 text-center",children:l6.jsxs("div",{className:"flex items-center justify-center gap-3 text-neutral-500 dark:text-neutral-400",children:[l6.jsxs("div",{className:"flex gap-1",children:[l6.jsx("span",{className:"w-2 h-2 bg-current rounded-full animate-pulse",style:{animationDelay:"0ms"}}),l6.jsx("span",{className:"w-2 h-2 bg-current rounded-full animate-pulse",style:{animationDelay:"150ms"}}),l6.jsx("span",{className:"w-2 h-2 bg-current rounded-full animate-pulse",style:{animationDelay:"300ms"}})]}),l6.jsx("span",{className:"text-sm",children:"Loading more..."})]})})})]})]})})})}function ev({widget:Y,onAction:G}){let{title:B,fields:O}=Y.props,[H,W]=dK.useState(()=>{let F={};return O.forEach((w)=>{F[w.name]=w.defaultValue??(w.type==="checkbox"?!1:"")}),F}),L=(F,w)=>{W((v)=>({...v,[F]:w}))},N=(F)=>{if(F.preventDefault(),Y.actions?.[0]&&G)G({type:Y.actions[0].type,payload:{...Y.actions[0].payload,formData:H},widgetId:Y.id,timestamp:new Date})},T=(F)=>{switch(F.type){case"text":case"password":case"number":case"date":return H4.jsx("input",{type:F.type,name:F.name,value:H[F.name]||"",onChange:(v)=>L(F.name,F.type==="number"?Number(v.target.value):v.target.value),placeholder:F.placeholder,required:F.required,className:"w-full px-3 py-2 rounded-lg border transition-colors border-neutral-200 dark:border-neutral-600 bg-neutral-50 dark:bg-neutral-800 !text-neutral-900 dark:!text-neutral-100 placeholder-neutral-400 dark:placeholder-neutral-500 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent"});case"textarea":return H4.jsx("textarea",{name:F.name,value:H[F.name]||"",onChange:(v)=>L(F.name,v.target.value),placeholder:F.placeholder,required:F.required,rows:3,className:"w-full px-3 py-2 rounded-lg border transition-colors border-neutral-200 dark:border-neutral-600 bg-neutral-50 dark:bg-neutral-800 !text-neutral-900 dark:!text-neutral-100 placeholder-neutral-400 dark:placeholder-neutral-500 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent"});case"select":return H4.jsxs("select",{name:F.name,value:H[F.name]||"",onChange:(v)=>L(F.name,v.target.value),required:F.required,className:"w-full px-3 py-2 rounded-lg border transition-colors border-neutral-200 dark:border-neutral-600 bg-neutral-50 dark:bg-neutral-800 !text-neutral-900 dark:!text-neutral-100 placeholder-neutral-400 dark:placeholder-neutral-500 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent",children:[H4.jsx("option",{value:"",children:F.placeholder||"Select..."}),F.options?.map((v)=>H4.jsx("option",{value:v.value,children:v.label},v.value))]});case"checkbox":return H4.jsxs("label",{className:"flex items-center gap-2 cursor-pointer",children:[H4.jsx("input",{type:"checkbox",name:F.name,checked:H[F.name]||!1,onChange:(v)=>L(F.name,v.target.checked),className:"w-4 h-4 rounded border-neutral-300 dark:border-neutral-600 text-blue-500 focus:ring-blue-500"}),H4.jsx("span",{className:"!text-neutral-700 dark:!text-neutral-300",children:F.label})]});default:return null}},M=Y.actions?.find((F)=>F.type==="submit")||Y.actions?.[0];return H4.jsxs("form",{onSubmit:N,className:"border border-neutral-200 dark:border-neutral-700 rounded-xl bg-white dark:bg-neutral-900 overflow-hidden",children:[H4.jsxs("div",{className:"p-4",children:[B&&H4.jsx("h3",{className:"!text-lg font-semibold !text-neutral-900 dark:!text-white mb-4",children:B}),H4.jsx("div",{className:"space-y-3",children:O.map((F)=>H4.jsxs("div",{className:F.type==="checkbox"?"":"space-y-1",children:[F.type!=="checkbox"&&H4.jsxs("label",{className:"block !text-sm font-medium !text-neutral-600 dark:!text-neutral-400",children:[F.label,F.required&&H4.jsx("span",{className:"text-red-500 ml-1",children:"*"})]}),T(F)]},F.name))})]}),M&&H4.jsx("div",{className:"px-4 pb-4",children:H4.jsx("button",{type:"submit",className:"px-3 py-1.5 !text-sm rounded-lg font-medium transition-colors bg-blue-500 !text-white hover:bg-blue-600",children:M.label||"Submit"})})]})}function zk({widget:Y}){let{src:G,alt:B,caption:O}=Y.props;return hz.jsxs("figure",{className:"overflow-hidden rounded-xl",children:[hz.jsx("img",{src:G,alt:B,className:"w-full h-auto object-contain bg-neutral-100 dark:bg-neutral-800",loading:"lazy"}),O&&hz.jsx("figcaption",{className:"mt-2 text-center text-sm text-neutral-600 dark:text-neutral-400",children:O})]})}function Qk({type:Y,status:G}){if(G==="completed")return P0.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:P0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2.5,d:"M5 13l4 4L19 7"})});if(G==="error")return P0.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:P0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2.5,d:"M6 18L18 6M6 6l12 12"})});if(G==="active")return P0.jsx("div",{className:"w-3.5 h-3.5 rounded-full bg-current animate-pulse"});let B="w-4 h-4";if(Y==="time"||Y==="schedule"||Y==="clock")return P0.jsx("svg",{className:B,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:P0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"})});if(Y==="recurring"||Y==="repeat")return P0.jsx("svg",{className:B,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:P0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"})});if(Y==="agent"||Y?.startsWith("@"))return P0.jsx("svg",{className:B,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:P0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M17 20h5v-2a3 3 0 00-5.356-1.857M17 20H7m10 0v-2c0-.656-.126-1.283-.356-1.857M7 20H2v-2a3 3 0 015.356-1.857M7 20v-2c0-.656.126-1.283.356-1.857m0 0a5.002 5.002 0 019.288 0M15 7a3 3 0 11-6 0 3 3 0 016 0z"})});if(Y==="email"||Y==="mail")return P0.jsx("svg",{className:B,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:P0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 8l7.89 5.26a2 2 0 002.22 0L21 8M5 19h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z"})});if(Y==="slack"||Y==="message"||Y==="chat")return P0.jsx("svg",{className:B,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:P0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8 12h.01M12 12h.01M16 12h.01M21 12c0 4.418-4.03 8-9 8a9.863 9.863 0 01-4.255-.949L3 20l1.395-3.72C3.512 15.042 3 13.574 3 12c0-4.418 4.03-8 9-8s9 3.582 9 8z"})});if(Y==="webhook"||Y==="api")return P0.jsx("svg",{className:B,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:P0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"})});if(Y==="build"||Y==="compile"||Y==="package")return P0.jsx("svg",{className:B,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:P0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M20 7l-8-4-8 4m16 0l-8 4m8-4v10l-8 4m0-10L4 7m8 4v10M4 7v10l8 4"})});if(Y==="test"||Y==="check"||Y==="verify")return P0.jsx("svg",{className:B,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:P0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"})});if(Y==="deploy"||Y==="rocket"||Y==="launch")return P0.jsx("svg",{className:B,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:P0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13 10V3L4 14h7v7l9-11h-7z"})});if(Y==="push"||Y==="upload"||Y==="cloud")return P0.jsx("svg",{className:B,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:P0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M7 16a4 4 0 01-.88-7.903A5 5 0 1115.9 6L16 6a5 5 0 011 9.9M15 13l-3-3m0 0l-3 3m3-3v12"})});if(Y==="generate"||Y==="create"||Y==="document"||Y==="file")return P0.jsx("svg",{className:B,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:P0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"})});if(Y==="review"||Y==="inspect"||Y==="eye")return P0.jsxs("svg",{className:B,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:[P0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"}),P0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z"})]});if(Y==="analyze"||Y==="research"||Y==="chart")return P0.jsx("svg",{className:B,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:P0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 19v-6a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2a2 2 0 002-2zm0 0V9a2 2 0 012-2h2a2 2 0 012 2v10m-6 0a2 2 0 002 2h2a2 2 0 002-2m0 0V5a2 2 0 012-2h2a2 2 0 012 2v14a2 2 0 01-2 2h-2a2 2 0 01-2-2z"})});if(Y==="scrape"||Y==="crawl"||Y==="spider")return P0.jsx("svg",{className:B,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:P0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 12a9 9 0 01-9 9m9-9a9 9 0 00-9-9m9 9H3m9 9a9 9 0 01-9-9m9 9c1.657 0 3-4.03 3-9s-1.343-9-3-9m0 18c-1.657 0-3-4.03-3-9s1.343-9 3-9m-9 9a9 9 0 019-9"})});if(Y==="data"||Y==="database"||Y==="storage")return P0.jsx("svg",{className:B,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:P0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 7v10c0 2.21 3.582 4 8 4s8-1.79 8-4V7M4 7c0 2.21 3.582 4 8 4s8-1.79 8-4M4 7c0-2.21 3.582-4 8-4s8 1.79 8 4m0 5c0 2.21-3.582 4-8 4s-8-1.79-8-4"})});if(Y==="notification"||Y==="bell"||Y==="alert")return P0.jsx("svg",{className:B,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:P0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 17h5l-1.405-1.405A2.032 2.032 0 0118 14.158V11a6.002 6.002 0 00-4-5.659V5a2 2 0 10-4 0v.341C7.67 6.165 6 8.388 6 11v3.159c0 .538-.214 1.055-.595 1.436L4 17h5m6 0v1a3 3 0 11-6 0v-1m6 0H9"})});if(Y==="transform"||Y==="process"||Y==="convert")return P0.jsx("svg",{className:B,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:P0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8 7h12m0 0l-4-4m4 4l-4 4m0 6H4m0 0l4 4m-4-4l4-4"})});return P0.jsx("div",{className:"w-2 h-2 rounded-full bg-current opacity-50"})}function Xk({icon:Y}){if(Y==="research"||Y==="multi-agent"||Y==="agents")return P0.jsx("div",{className:"w-10 h-10 rounded-lg bg-purple-100 dark:bg-purple-500/20 flex items-center justify-center",children:P0.jsx("svg",{className:"w-6 h-6 text-purple-600 dark:text-purple-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:P0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13 10V3L4 14h7v7l9-11h-7z"})})});if(Y==="schedule"||Y==="report"||Y==="calendar")return P0.jsx("div",{className:"w-10 h-10 rounded-lg bg-amber-100 dark:bg-amber-500/20 flex items-center justify-center",children:P0.jsx("svg",{className:"w-6 h-6 text-amber-600 dark:text-amber-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:P0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"})})});if(Y==="recurring"||Y==="repeat"||Y==="sync")return P0.jsx("div",{className:"w-10 h-10 rounded-lg bg-cyan-100 dark:bg-cyan-500/20 flex items-center justify-center",children:P0.jsx("svg",{className:"w-6 h-6 text-cyan-600 dark:text-cyan-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:P0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"})})});if(Y==="analyze"||Y==="analysis"||Y==="chart")return P0.jsx("div",{className:"w-10 h-10 rounded-lg bg-cyan-100 dark:bg-cyan-500/20 flex items-center justify-center",children:P0.jsx("svg",{className:"w-6 h-6 text-cyan-600 dark:text-cyan-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:P0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 19v-6a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2a2 2 0 002-2zm0 0V9a2 2 0 012-2h2a2 2 0 012 2v10m-6 0a2 2 0 002 2h2a2 2 0 002-2m0 0V5a2 2 0 012-2h2a2 2 0 012 2v14a2 2 0 01-2 2h-2a2 2 0 01-2-2z"})})});if(Y==="deploy"||Y==="rocket"||Y==="launch")return P0.jsx("div",{className:"w-10 h-10 rounded-lg bg-blue-100 dark:bg-blue-500/20 flex items-center justify-center",children:P0.jsx("svg",{className:"w-6 h-6 text-blue-600 dark:text-blue-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:P0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13 10V3L4 14h7v7l9-11h-7z"})})});if(Y==="automation"||Y==="workflow"||Y==="process")return P0.jsx("div",{className:"w-10 h-10 rounded-lg bg-indigo-100 dark:bg-indigo-500/20 flex items-center justify-center",children:P0.jsx("svg",{className:"w-6 h-6 text-indigo-600 dark:text-indigo-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:P0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 5a1 1 0 011-1h14a1 1 0 011 1v2a1 1 0 01-1 1H5a1 1 0 01-1-1V5zM4 13a1 1 0 011-1h6a1 1 0 011 1v6a1 1 0 01-1 1H5a1 1 0 01-1-1v-6zM16 13a1 1 0 011-1h2a1 1 0 011 1v6a1 1 0 01-1 1h-2a1 1 0 01-1-1v-6z"})})});if(Y==="data"||Y==="pipeline"||Y==="etl")return P0.jsx("div",{className:"w-10 h-10 rounded-lg bg-emerald-100 dark:bg-emerald-500/20 flex items-center justify-center",children:P0.jsx("svg",{className:"w-6 h-6 text-emerald-600 dark:text-emerald-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:P0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 7v10c0 2.21 3.582 4 8 4s8-1.79 8-4V7M4 7c0 2.21 3.582 4 8 4s8-1.79 8-4M4 7c0-2.21 3.582-4 8-4s8 1.79 8 4"})})});return P0.jsx("div",{className:"w-10 h-10 rounded-lg bg-neutral-100 dark:bg-neutral-700 flex items-center justify-center",children:P0.jsx("svg",{className:"w-6 h-6 text-neutral-600 dark:text-neutral-300",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:P0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"})})})}function Zk(){return P0.jsx("svg",{className:"w-4 h-4 text-neutral-400 dark:text-neutral-500 flex-shrink-0",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:P0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5l7 7-7 7"})})}var a5={blue:"bg-blue-100 dark:bg-blue-900/40 !text-blue-700 dark:!text-blue-300 border-blue-300 dark:border-blue-500",purple:"bg-purple-100 dark:bg-purple-900/40 !text-purple-700 dark:!text-purple-300 border-purple-300 dark:border-purple-500",cyan:"bg-cyan-100 dark:bg-cyan-900/40 !text-cyan-700 dark:!text-cyan-300 border-cyan-300 dark:border-cyan-500",amber:"bg-amber-100 dark:bg-amber-900/40 !text-amber-700 dark:!text-amber-300 border-amber-300 dark:border-amber-500",emerald:"bg-emerald-100 dark:bg-emerald-900/40 !text-emerald-700 dark:!text-emerald-300 border-emerald-300 dark:border-emerald-500",rose:"bg-rose-100 dark:bg-rose-900/40 !text-rose-700 dark:!text-rose-300 border-rose-300 dark:border-rose-500",indigo:"bg-indigo-100 dark:bg-indigo-900/40 !text-indigo-700 dark:!text-indigo-300 border-indigo-300 dark:border-indigo-500",orange:"bg-orange-100 dark:bg-orange-900/40 !text-orange-700 dark:!text-orange-300 border-orange-300 dark:border-orange-500",neutral:"bg-neutral-100 dark:bg-neutral-800 !text-neutral-600 dark:!text-neutral-300 border-neutral-300 dark:border-neutral-600"};function Jk(Y,G){if(Y.color&&a5[Y.color])return a5[Y.color];if(G==="time"||G==="schedule"||G==="clock")return a5.blue;if(G==="agent"||G?.startsWith("@"))return a5.purple;if(G==="email"||G==="slack"||G==="message"||G==="notification")return a5.cyan;if(G==="generate"||G==="document"||G==="create")return a5.amber;if(G==="deploy"||G==="rocket"||G==="launch")return a5.rose;if(G==="build"||G==="compile"||G==="package")return a5.indigo;if(G==="test"||G==="check"||G==="verify")return a5.emerald;if(G==="data"||G==="database"||G==="storage")return a5.orange;return a5.blue}function bk({widget:Y}){let{title:G,subtitle:B,icon:O,steps:H}=Y.props;return P0.jsxs("div",{className:"rounded-xl bg-white dark:bg-neutral-900 border border-neutral-200 dark:border-neutral-700 overflow-hidden",children:[P0.jsxs("div",{className:"px-4 py-4 flex items-center gap-4",children:[P0.jsx(Xk,{icon:O}),P0.jsxs("div",{className:"flex-1 min-w-0",children:[P0.jsx("h3",{className:"font-semibold text-base text-neutral-900 dark:text-white truncate",children:G}),B&&P0.jsx("p",{className:"text-sm text-neutral-500 dark:text-neutral-400 truncate mt-0.5",children:B})]})]}),P0.jsx("div",{className:"px-4 pb-4",children:P0.jsx("div",{className:"flex flex-wrap items-center gap-2",children:H.map((W,L)=>{let N=L===H.length-1,T=W.status==="active",M=W.status==="completed",F=W.status==="error",w=W.status==="skipped",v=W.label,S=W.type;if(!S)if(v.startsWith("@"))S="agent";else if(/^\d+[ap]m$/i.test(v)||/^(mon|tue|wed|thu|fri|sat|sun)/i.test(v))S="time";else{let y=v.toLowerCase();S={test:"test",build:"build",push:"push",deploy:"deploy",email:"email",slack:"slack",generate:"generate",review:"review",analyze:"analyze",scrape:"scrape",transform:"transform",notify:"notification",alert:"notification",webhook:"webhook",api:"api",data:"data",process:"process"}[y]}let A,h="";if(T)A="bg-blue-100 dark:bg-blue-900/40 !text-blue-700 dark:!text-blue-300 border-blue-400 dark:border-blue-400 ring-2 ring-blue-400";else if(M)A="bg-emerald-100 dark:bg-emerald-900/40 !text-emerald-700 dark:!text-emerald-300 border-emerald-400 dark:border-emerald-400";else if(F)A="bg-red-100 dark:bg-red-900/40 !text-red-700 dark:!text-red-300 border-red-400 dark:border-red-400";else if(w)A="bg-neutral-100 dark:bg-neutral-800 !text-neutral-400 dark:!text-neutral-500 border-neutral-300 dark:border-neutral-600",h="line-through";else A=Jk(W,S);return P0.jsxs("div",{className:"flex items-center gap-2",children:[P0.jsxs("span",{className:`inline-flex items-center gap-2 px-4 py-2 rounded-lg text-sm font-medium border transition-colors ${A} ${h}`,children:[P0.jsx(Qk,{type:S,status:W.status}),v]}),!N&&P0.jsx(Zk,{})]},W.id)})})})]})}function i$({widget:Y,onAction:G}){return J5.jsx("div",{className:"apteva-widget",children:(()=>{switch(Y.type){case"card":return J5.jsx(av,{widget:Y,onAction:G});case"list":return J5.jsx(rv,{widget:Y,onAction:G});case"button":return J5.jsx(nv,{widget:Y,onAction:G});case"button_group":return J5.jsx(tv,{widget:Y,onAction:G});case"table":return J5.jsx(sv,{widget:Y,onAction:G});case"form":return J5.jsx(ev,{widget:Y,onAction:G});case"image":return J5.jsx(zk,{widget:Y});case"flow":return J5.jsx(bk,{widget:Y});default:return J5.jsxs("div",{className:"p-4 border border-yellow-300 bg-yellow-50 rounded-lg",children:[J5.jsxs("p",{className:"text-sm text-yellow-800",children:["Unknown widget type: ",Y.type]}),J5.jsx("pre",{className:"text-xs mt-2 overflow-auto",children:JSON.stringify(Y,null,2)})]})}})()})}function E$({widgets:Y,onAction:G,onWidgetMount:B,layout:O="stack",spacing:H="normal",columns:W=3,className:L}){EK.useEffect(()=>{Y.forEach((M)=>{B?.(M.id)})},[Y,B]);let N={stack:"flex flex-col",grid:`grid grid-cols-1 md:grid-cols-${W}`,masonry:"columns-1 md:columns-2 lg:columns-3"},T={tight:"gap-2",normal:"gap-4",loose:"gap-6"};return p$.jsx("div",{className:G6(N[O],T[H],L),children:Y.map((M)=>p$.jsx(i$,{widget:M,onAction:G},M.id))})}function VK({type:Y,className:G}){switch(Y){case"card":return p0.jsx("div",{className:G6("apteva-widget-skeleton animate-pulse rounded-lg border border-neutral-200 dark:border-neutral-800 overflow-hidden",G),children:p0.jsxs("div",{className:"p-4 space-y-3",children:[p0.jsx("div",{className:"h-4 bg-neutral-200 dark:bg-neutral-700 rounded w-3/4"}),p0.jsx("div",{className:"h-3 bg-neutral-200 dark:bg-neutral-700 rounded w-full"}),p0.jsx("div",{className:"h-3 bg-neutral-200 dark:bg-neutral-700 rounded w-5/6"})]})});case"list":return p0.jsx("div",{className:G6("apteva-widget-skeleton animate-pulse space-y-2",G),children:[1,2,3].map((B)=>p0.jsxs("div",{className:"flex items-center gap-3 p-3 rounded-lg border border-neutral-200 dark:border-neutral-800",children:[p0.jsx("div",{className:"w-10 h-10 bg-neutral-200 dark:bg-neutral-700 rounded-full flex-shrink-0"}),p0.jsxs("div",{className:"flex-1 space-y-2",children:[p0.jsx("div",{className:"h-3 bg-neutral-200 dark:bg-neutral-700 rounded w-1/2"}),p0.jsx("div",{className:"h-2 bg-neutral-200 dark:bg-neutral-700 rounded w-3/4"})]})]},B))});case"button_group":return p0.jsxs("div",{className:G6("apteva-widget-skeleton animate-pulse flex gap-2",G),children:[p0.jsx("div",{className:"h-9 bg-neutral-200 dark:bg-neutral-700 rounded-lg w-20"}),p0.jsx("div",{className:"h-9 bg-neutral-200 dark:bg-neutral-700 rounded-lg w-20"}),p0.jsx("div",{className:"h-9 bg-neutral-200 dark:bg-neutral-700 rounded-lg w-20"})]});case"form":return p0.jsxs("div",{className:G6("apteva-widget-skeleton animate-pulse rounded-lg border border-neutral-200 dark:border-neutral-800 p-4 space-y-4",G),children:[p0.jsx("div",{className:"h-4 bg-neutral-200 dark:bg-neutral-700 rounded w-1/3"}),p0.jsxs("div",{className:"space-y-3",children:[p0.jsx("div",{className:"h-10 bg-neutral-200 dark:bg-neutral-700 rounded"}),p0.jsx("div",{className:"h-10 bg-neutral-200 dark:bg-neutral-700 rounded"})]}),p0.jsx("div",{className:"h-9 bg-neutral-200 dark:bg-neutral-700 rounded w-24"})]});case"chart":return p0.jsxs("div",{className:G6("apteva-widget-skeleton animate-pulse rounded-lg border border-neutral-200 dark:border-neutral-800 p-4",G),children:[p0.jsx("div",{className:"h-4 bg-neutral-200 dark:bg-neutral-700 rounded w-1/4 mb-4"}),p0.jsxs("div",{className:"flex items-end gap-2 h-32",children:[p0.jsx("div",{className:"flex-1 bg-neutral-200 dark:bg-neutral-700 rounded-t h-1/2"}),p0.jsx("div",{className:"flex-1 bg-neutral-200 dark:bg-neutral-700 rounded-t h-3/4"}),p0.jsx("div",{className:"flex-1 bg-neutral-200 dark:bg-neutral-700 rounded-t h-1/3"}),p0.jsx("div",{className:"flex-1 bg-neutral-200 dark:bg-neutral-700 rounded-t h-full"}),p0.jsx("div",{className:"flex-1 bg-neutral-200 dark:bg-neutral-700 rounded-t h-2/3"})]})]});case"image":return p0.jsx("div",{className:G6("apteva-widget-skeleton animate-pulse",G),children:p0.jsx("div",{className:"aspect-video bg-neutral-200 dark:bg-neutral-700 rounded-lg"})});case"gallery":return p0.jsx("div",{className:G6("apteva-widget-skeleton animate-pulse grid grid-cols-3 gap-2",G),children:[1,2,3].map((B)=>p0.jsx("div",{className:"aspect-square bg-neutral-200 dark:bg-neutral-700 rounded-lg"},B))});case"map":return p0.jsx("div",{className:G6("apteva-widget-skeleton animate-pulse",G),children:p0.jsx("div",{className:"h-48 bg-neutral-200 dark:bg-neutral-700 rounded-lg flex items-center justify-center",children:p0.jsxs("svg",{className:"w-8 h-8 text-neutral-400 dark:text-neutral-500",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:[p0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M17.657 16.657L13.414 20.9a1.998 1.998 0 01-2.827 0l-4.244-4.243a8 8 0 1111.314 0z"}),p0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M15 11a3 3 0 11-6 0 3 3 0 016 0z"})]})})});case"table":return p0.jsxs("div",{className:G6("apteva-widget-skeleton animate-pulse rounded-lg border border-neutral-200 dark:border-neutral-800 overflow-hidden",G),children:[p0.jsxs("div",{className:"flex bg-neutral-100 dark:bg-neutral-800 border-b border-neutral-200 dark:border-neutral-700",children:[p0.jsx("div",{className:"flex-1 px-4 py-3",children:p0.jsx("div",{className:"h-3 bg-neutral-300 dark:bg-neutral-600 rounded w-16"})}),p0.jsx("div",{className:"flex-1 px-4 py-3",children:p0.jsx("div",{className:"h-3 bg-neutral-300 dark:bg-neutral-600 rounded w-20"})}),p0.jsx("div",{className:"flex-1 px-4 py-3",children:p0.jsx("div",{className:"h-3 bg-neutral-300 dark:bg-neutral-600 rounded w-14"})})]}),[1,2,3].map((B)=>p0.jsxs("div",{className:"flex border-b border-neutral-200 dark:border-neutral-800 last:border-b-0",children:[p0.jsx("div",{className:"flex-1 px-4 py-3",children:p0.jsx("div",{className:"h-3 bg-neutral-200 dark:bg-neutral-700 rounded w-24"})}),p0.jsx("div",{className:"flex-1 px-4 py-3",children:p0.jsx("div",{className:"h-3 bg-neutral-200 dark:bg-neutral-700 rounded w-16"})}),p0.jsx("div",{className:"flex-1 px-4 py-3",children:p0.jsx("div",{className:"h-3 bg-neutral-200 dark:bg-neutral-700 rounded w-20"})})]},B))]});default:return p0.jsxs("div",{className:G6("apteva-widget-skeleton animate-pulse rounded-lg border border-neutral-200 dark:border-neutral-800 p-4",G),children:[p0.jsx("div",{className:"h-4 bg-neutral-200 dark:bg-neutral-700 rounded w-1/2 mb-2"}),p0.jsx("div",{className:"h-3 bg-neutral-200 dark:bg-neutral-700 rounded w-full"})]})}}function Yk(Y){return/\.(jpg|jpeg|png|gif|webp|svg|bmp|ico)(\?.*)?$/i.test(Y)}function W3(Y,G=""){let B=[],O=/!\[([^\]]*)\]\(([^)]+)\)|\[([^\]]+)\]\(([^)]+)\)|(\*\*|__)(.+?)\5|`([^`]+)`/g,H=0,W,L=0;while((W=O.exec(Y))!==null){if(W.index>H)B.push(Y.slice(H,W.index));if(W[1]!==void 0||W[2]!==void 0){let N=W[1]||"",T=W[2];B.push(h6.jsx("img",{src:T,alt:N,className:"apteva-md-img"},`${G}img${L++}`))}else if(W[3]!==void 0||W[4]!==void 0){let N=W[3],T=W[4];if(Yk(T))B.push(h6.jsx("img",{src:T,alt:N,className:"apteva-md-img"},`${G}img${L++}`));else B.push(h6.jsx("a",{href:T,target:"_blank",rel:"noopener noreferrer",className:"apteva-md-link",children:N},`${G}a${L++}`))}else if(W[5]!==void 0)B.push(h6.jsx("strong",{children:W[6]},`${G}b${L++}`));else if(W[7]!==void 0)B.push(h6.jsx("code",{className:"apteva-md-inline-code",children:W[7]},`${G}code${L++}`));H=W.index+W[0].length}if(H<Y.length)B.push(Y.slice(H));return B.length>0?B:[Y]}function $k(Y){let G=Y.split(`
191
- `),B=[],O=0,H=0;while(H<G.length){let W=G[H],L=W.match(/^##\s+(.*)$/);if(L){B.push(h6.jsx("h2",{className:"apteva-md-h2",children:W3(L[1],`${O}`)},`h2${O++}`)),H++;continue}let N=W.match(/^###\s+(.*)$/);if(N){B.push(h6.jsx("h3",{className:"apteva-md-h3",children:W3(N[1],`${O}`)},`h3${O++}`)),H++;continue}let T=W.match(/^(\s*)([-*+])\s+(.*)$/);if(T){let w=[],v=T[1].length;while(H<G.length){let S=G[H].match(/^(\s*)([-*+])\s+(.*)$/);if(S&&S[1].length===v)w.push(h6.jsx("li",{className:"apteva-md-li",children:W3(S[3],`${O}`)},`li${O++}`)),H++;else break}B.push(h6.jsx("ul",{className:"apteva-md-ul",children:w},`ul${O++}`));continue}let M=W.match(/^(\s*)(\d+)\.\s+(.*)$/);if(M){let w=[],v=M[1].length;while(H<G.length){let S=G[H].match(/^(\s*)(\d+)\.\s+(.*)$/);if(S&&S[1].length===v)w.push(h6.jsx("li",{className:"apteva-md-li",children:W3(S[3],`${O}`)},`li${O++}`)),H++;else break}B.push(h6.jsx("ol",{className:"apteva-md-ol",children:w},`ol${O++}`));continue}if(W.match(/^\|(.+)\|$/)&&H+1<G.length){if(G[H+1].match(/^\|([\s:-]+\|)+$/)){let S=W.split("|").filter((h)=>h.trim()!=="").map((h)=>h.trim());H+=2;let A=[];while(H<G.length)if(G[H].match(/^\|(.+)\|$/)){let y=G[H].split("|").filter((k)=>k.trim()!=="").map((k)=>k.trim());A.push(y),H++}else break;B.push(h6.jsx("div",{className:"apteva-md-table-wrapper",children:h6.jsxs("table",{className:"apteva-md-table",children:[h6.jsx("thead",{children:h6.jsx("tr",{children:S.map((h,y)=>h6.jsx("th",{className:"apteva-md-th",children:W3(h,`th${O}${y}`)},`th${y}`))})}),h6.jsx("tbody",{children:A.map((h,y)=>h6.jsx("tr",{children:h.map((k,E)=>h6.jsx("td",{className:"apteva-md-td",children:W3(k,`td${O}${y}${E}`)},`td${E}`))},`tr${y}`))})]})},`table-wrapper${O++}`));continue}}if(W==="")B.push(h6.jsx("br",{},`br${O++}`));else B.push(h6.jsxs("span",{children:[W3(W,`${O}`),H<G.length-1?`
192
- `:""]},`p${O++}`));H++}return B}function c8({content:Y,className:G=""}){return h6.jsx("div",{className:`apteva-md ${G}`,children:$k(Y)})}function Hk({name:Y,status:G,isReceiving:B=!1,inputLength:O=0,streamOutput:H}){if(G==="preparing")return o1.jsxs("div",{className:"apteva-tool-card apteva-tool-card-preparing",children:[o1.jsxs("svg",{className:"apteva-tool-icon apteva-tool-icon-spin",fill:"none",viewBox:"0 0 24 24",children:[o1.jsx("circle",{className:"apteva-tool-spinner-track",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),o1.jsx("path",{className:"apteva-tool-spinner-fill",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"})]}),o1.jsxs("span",{className:"apteva-tool-label",children:[o1.jsx("strong",{children:Y}),o1.jsx("span",{className:"apteva-tool-status-text",children:" preparing..."})]})]});if(G==="running")return o1.jsxs("div",{className:"apteva-tool-card apteva-tool-card-running",children:[o1.jsxs("svg",{className:"apteva-tool-icon apteva-tool-icon-spin",fill:"none",viewBox:"0 0 24 24",children:[o1.jsx("circle",{className:"apteva-tool-spinner-track",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),o1.jsx("path",{className:"apteva-tool-spinner-fill",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"})]}),o1.jsxs("span",{className:"apteva-tool-label",children:[o1.jsx("strong",{children:Y}),H?o1.jsx("span",{className:"apteva-tool-stream-separator",children:" · "}):null,H?o1.jsx("span",{className:"apteva-tool-stream-output",children:H}):o1.jsxs(o1.Fragment,{children:[o1.jsx("span",{className:"apteva-tool-status-text",children:" running"}),o1.jsxs("span",{className:"apteva-tool-dots",children:[o1.jsx("span",{children:"."}),o1.jsx("span",{children:"."}),o1.jsx("span",{children:"."})]})]})]})]});if(G==="completed")return o1.jsxs("div",{className:"apteva-tool-card apteva-tool-card-completed",children:[o1.jsx("svg",{className:"apteva-tool-icon",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:o1.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})}),o1.jsx("span",{className:"apteva-tool-label",children:Y})]});return o1.jsxs("div",{className:"apteva-tool-card apteva-tool-card-error",children:[o1.jsx("svg",{className:"apteva-tool-icon",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:o1.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})}),o1.jsxs("span",{className:"apteva-tool-label",children:[Y," failed"]})]})}function Gk({message:Y,onAction:G,enableWidgets:B,onWidgetRender:O}){let H=Y.role==="user",W=Y.metadata?.content_segments,L=Y.metadata?.isStreaming===!0,N=Y.content||W&&W.length>0,T=_3.useRef(new Set),M=_3.useMemo(()=>{if(!B||H||!Y.content)return[];return GZ(Y.content).segments.filter((j)=>j.type==="widget"&&!!j.widget).map((j)=>j.widget)},[B,H,Y.content]);_3.useEffect(()=>{if(O&&Y.widgets){for(let x of Y.widgets)if(!T.current.has(x.id))T.current.add(x.id),O(x)}},[Y.widgets,O]),_3.useEffect(()=>{if(O&&M.length>0){for(let x of M)if(!T.current.has(x.id))T.current.add(x.id),O(x)}},[M,O]);let F=(x)=>{if(!B||H)return C0.jsx(c8,{content:x});let d=GZ(x).segments.filter((o)=>o.type==="text"&&o.content).map((o)=>o.content).join("");if(!d.trim())return null;return C0.jsx(c8,{content:d})},w=()=>{if(!B||H||!Y.content)return null;let x=GZ(Y.content),j=[],d="";if(x.segments.forEach((o,c)=>{if(o.type==="text"&&o.content)d+=o.content;else if(o.type==="widget"&&o.widget){if(d.trim())j.push(C0.jsx("div",{className:"apteva-message-bubble apteva-message-assistant",children:C0.jsx("div",{className:"apteva-message-content-assistant",children:C0.jsx(c8,{content:d})})},`text-${c}`)),d="";j.push(C0.jsx("div",{className:"apteva-widget-standalone",children:C0.jsx(i$,{widget:o.widget,onAction:G})},`widget-${c}`))}else if(o.type==="widget_pending"&&o.pendingType){if(d.trim())j.push(C0.jsx("div",{className:"apteva-message-bubble apteva-message-assistant",children:C0.jsx("div",{className:"apteva-message-content-assistant",children:C0.jsx(c8,{content:d})})},`text-${c}`)),d="";j.push(C0.jsx("div",{className:"apteva-widget-standalone",children:C0.jsx(VK,{type:o.pendingType})},`pending-${c}`))}}),d.trim())j.push(C0.jsx("div",{className:"apteva-message-bubble apteva-message-assistant",children:C0.jsx("div",{className:"apteva-message-content-assistant",children:C0.jsx(c8,{content:d})})},"text-final"));return j.length>0?j:null},v=Y.metadata?.attachments||[],S=v.length>0,A=()=>{if(!S)return null;return C0.jsx("div",{className:"apteva-message-attachments flex flex-wrap gap-2 mb-2 justify-end",children:v.map((x,j)=>{let d=x.type.startsWith("image/"),o=x.type==="application/pdf";if(d&&x.preview)return C0.jsx("div",{className:"apteva-attachment-image relative rounded-lg overflow-hidden shadow-sm",children:C0.jsx("img",{src:x.preview,alt:x.name,className:"max-w-[150px] max-h-[150px] object-cover"})},j);return C0.jsxs("div",{className:"apteva-attachment-doc flex items-center gap-3 px-4 py-3 bg-neutral-100 dark:bg-neutral-800 border border-neutral-200 dark:border-neutral-700 rounded-xl shadow-sm",children:[C0.jsx("div",{className:"w-10 h-10 flex items-center justify-center bg-red-100 dark:bg-red-900/30 rounded-lg text-red-600 dark:text-red-400",children:o?C0.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:C0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"})}):C0.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:C0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"})})}),C0.jsxs("div",{className:"flex flex-col min-w-0",children:[C0.jsx("span",{className:"text-sm font-medium text-neutral-800 dark:text-neutral-200 truncate max-w-[180px]",children:x.name}),C0.jsxs("span",{className:"text-xs text-neutral-500 dark:text-neutral-400",children:[o?"PDF":"Document"," · ",UZ(x.size)]})]})]},j)})})},h=()=>{if(H)return C0.jsx("div",{className:"apteva-message-text",children:Y.content});if(L&&!N)return C0.jsxs("div",{className:"apteva-typing-indicator",children:[C0.jsx("span",{}),C0.jsx("span",{}),C0.jsx("span",{})]});if(W&&W.length>0)return null;return F(Y.content)},y=(x,j)=>{if(!B)return C0.jsx("div",{className:"apteva-message-bubble apteva-message-assistant",children:C0.jsx("div",{className:"apteva-message-content-assistant",children:C0.jsx(c8,{content:x})})},j);let d=GZ(x),o=[],c="";if(d.segments.forEach((l,a)=>{if(l.type==="text"&&l.content)c+=l.content;else if(l.type==="widget"&&l.widget){if(c.trim())o.push(C0.jsx("div",{className:"apteva-message-bubble apteva-message-assistant",children:C0.jsx("div",{className:"apteva-message-content-assistant",children:C0.jsx(c8,{content:c})})},`${j}-text-${a}`)),c="";o.push(C0.jsx("div",{className:"apteva-widget-standalone",children:C0.jsx(i$,{widget:l.widget,onAction:G})},`${j}-widget-${a}`))}else if(l.type==="widget_pending"&&l.pendingType){if(c.trim())o.push(C0.jsx("div",{className:"apteva-message-bubble apteva-message-assistant",children:C0.jsx("div",{className:"apteva-message-content-assistant",children:C0.jsx(c8,{content:c})})},`${j}-text-${a}`)),c="";o.push(C0.jsx("div",{className:"apteva-widget-standalone",children:C0.jsx(VK,{type:l.pendingType})},`${j}-pending-${a}`))}}),c.trim())o.push(C0.jsx("div",{className:"apteva-message-bubble apteva-message-assistant",children:C0.jsx("div",{className:"apteva-message-content-assistant",children:C0.jsx(c8,{content:c})})},`${j}-text-final`));return o},k=()=>{if(!W||W.length===0)return null;let x=[];return W.forEach((j,d)=>{if(j.type==="text"&&j.content){let o=y(j.content,`seg-${d}`);if(Array.isArray(o))x.push(...o);else x.push(o)}else if(j.type==="tool")x.push(C0.jsx("div",{className:"apteva-tool-call-standalone",children:C0.jsx(Hk,{name:j.name,status:j.status||(j.result!==void 0?"completed":"running"),isReceiving:j.isReceiving,inputLength:j.inputLength,streamOutput:j.streamOutput})},j.id))}),x};if(!H&&(W&&W.length>0))return C0.jsxs("div",{className:"apteva-message-segmented",children:[k(),Y.widgets&&Y.widgets.length>0&&C0.jsx("div",{className:"apteva-widget-standalone",children:C0.jsx(E$,{widgets:Y.widgets,onAction:G,layout:"stack"})}),C0.jsx("div",{className:"apteva-message-timestamp apteva-message-timestamp-assistant",suppressHydrationWarning:!0,children:Y.timestamp.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})})]});let E=w();if(!H&&B&&E)return C0.jsxs("div",{className:"apteva-message-segmented",children:[E,Y.widgets&&Y.widgets.length>0&&C0.jsx("div",{className:"apteva-widget-standalone",children:C0.jsx(E$,{widgets:Y.widgets,onAction:G,layout:"stack"})}),C0.jsx("div",{className:"apteva-message-timestamp apteva-message-timestamp-assistant",suppressHydrationWarning:!0,children:Y.timestamp.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})})]});if(H&&S)return C0.jsxs("div",{className:"apteva-message-segmented apteva-message-user-with-attachments flex flex-col items-end",children:[A(),Y.content&&C0.jsx("div",{className:"apteva-message-bubble apteva-message-user",children:C0.jsx("div",{className:"apteva-message-content-user",children:C0.jsx("div",{className:"apteva-message-text",children:Y.content})})}),C0.jsx("div",{className:"apteva-message-timestamp apteva-message-timestamp-user",suppressHydrationWarning:!0,children:Y.timestamp.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})})]});return C0.jsxs("div",{className:G6("apteva-message-bubble",H?"apteva-message-user":"apteva-message-assistant"),children:[C0.jsx("div",{className:H?"apteva-message-content-user":"apteva-message-content-assistant",children:h()}),Y.widgets&&Y.widgets.length>0&&C0.jsx("div",{className:"apteva-widget-standalone",children:C0.jsx(E$,{widgets:Y.widgets,onAction:G,layout:"stack"})}),C0.jsx("div",{className:G6("apteva-message-timestamp",H?"apteva-message-timestamp-user":"apteva-message-timestamp-assistant"),suppressHydrationWarning:!0,children:Y.timestamp.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})})]})}var DK=()=>q1.jsx("svg",{className:"w-12 h-12 sm:w-16 sm:h-16",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:q1.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M8 12h.01M12 12h.01M16 12h.01M21 12c0 4.418-4.03 8-9 8a9.863 9.863 0 01-4.255-.949L3 20l1.395-3.72C3.512 15.042 3 13.574 3 12c0-4.418 4.03-8 9-8s9 3.582 9 8z"})}),l$=()=>q1.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:q1.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13 7l5 5m0 0l-5 5m5-5H6"})});function Uk({title:Y,subtitle:G,icon:B,prompts:O,variant:H="centered",chatVariant:W="default",onPromptClick:L}){let N=(O||[]).map((F)=>typeof F==="string"?{text:F}:F),T=N.length>0,M=Y||G||B;if(!M&&!T)return q1.jsx("div",{className:"flex items-center justify-center h-full !text-neutral-500 dark:!text-neutral-400",children:q1.jsxs("div",{className:"text-center space-y-2",children:[q1.jsx("div",{className:"flex justify-center",children:q1.jsx(DK,{})}),q1.jsx("p",{className:"text-sm",children:"No messages yet. Start a conversation!"})]})});if(H==="minimal")return q1.jsxs("div",{className:"flex flex-col h-full px-4 py-4",children:[M&&q1.jsxs("div",{className:"mb-4",children:[Y&&q1.jsx("h2",{className:"text-lg font-semibold !text-neutral-900 dark:!text-white",children:Y}),G&&q1.jsx("p",{className:"text-sm !text-neutral-500 dark:!text-neutral-400 mt-1",children:G})]}),T&&q1.jsx("div",{className:"flex-1 space-y-2",children:N.map((F,w)=>q1.jsx("button",{onClick:()=>L(F.text),className:G6("w-full text-left px-4 py-3 rounded-xl","bg-neutral-50 dark:bg-neutral-800/50","border border-neutral-200 dark:border-neutral-700","hover:bg-neutral-100 dark:hover:bg-neutral-800","hover:border-neutral-300 dark:hover:border-neutral-600","transition-all duration-200","group"),children:q1.jsxs("div",{className:"flex items-center gap-3",children:[q1.jsx("div",{className:"flex-shrink-0 !text-neutral-400 dark:!text-neutral-500 group-hover:!text-blue-500 dark:group-hover:!text-blue-400 transition-colors",children:F.icon||q1.jsx(l$,{})}),q1.jsxs("div",{className:"flex-1 min-w-0",children:[q1.jsx("p",{className:"text-sm font-medium !text-neutral-900 dark:!text-white truncate",children:F.text}),F.description&&q1.jsx("p",{className:"text-xs !text-neutral-500 dark:!text-neutral-400 mt-0.5 truncate",children:F.description})]})]})},w))})]});return q1.jsxs("div",{className:"flex flex-col items-center justify-center h-full px-4 py-6 sm:py-8",children:[q1.jsxs("div",{className:"text-center mb-6 sm:mb-8 max-w-md",children:[q1.jsx("div",{className:"mb-4 !text-neutral-400 dark:!text-neutral-500 flex justify-center",children:B||q1.jsx(DK,{})}),Y&&q1.jsx("h1",{className:"text-xl sm:text-2xl font-semibold !text-neutral-900 dark:!text-white mb-2",children:Y}),G&&q1.jsx("p",{className:"text-sm sm:text-base !text-neutral-500 dark:!text-neutral-400",children:G})]}),T&&q1.jsxs("div",{className:"w-full max-w-2xl",children:[q1.jsx("div",{className:"sm:hidden space-y-2",children:N.map((F,w)=>q1.jsx("button",{onClick:()=>L(F.text),className:G6("w-full text-left px-4 py-3 rounded-xl","bg-white dark:bg-neutral-800","border border-neutral-200 dark:border-neutral-700","hover:bg-neutral-50 dark:hover:bg-neutral-700","hover:border-blue-300 dark:hover:border-blue-600","active:scale-[0.98]","transition-all duration-200","shadow-sm hover:shadow","group"),children:q1.jsxs("div",{className:"flex items-center gap-3",children:[q1.jsx("div",{className:"flex-shrink-0 w-8 h-8 rounded-lg bg-neutral-100 dark:bg-neutral-700 flex items-center justify-center !text-neutral-500 dark:!text-neutral-400 group-hover:bg-blue-100 dark:group-hover:bg-blue-900/30 group-hover:!text-blue-600 dark:group-hover:!text-blue-400 transition-colors",children:F.icon||q1.jsx(l$,{})}),q1.jsxs("div",{className:"flex-1 min-w-0",children:[q1.jsx("p",{className:"text-sm font-medium !text-neutral-900 dark:!text-white",children:F.text}),F.description&&q1.jsx("p",{className:"text-xs !text-neutral-500 dark:!text-neutral-400 mt-0.5 line-clamp-1",children:F.description})]}),q1.jsx("svg",{className:"w-4 h-4 !text-neutral-400 group-hover:!text-blue-500 transition-colors flex-shrink-0",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:q1.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5l7 7-7 7"})})]})},w))}),q1.jsx("div",{className:"hidden sm:grid sm:grid-cols-2 gap-3",children:N.map((F,w)=>q1.jsx("button",{onClick:()=>L(F.text),className:G6("text-left p-4 rounded-xl","bg-white dark:bg-neutral-800","border border-neutral-200 dark:border-neutral-700","hover:bg-neutral-50 dark:hover:bg-neutral-700","hover:border-blue-300 dark:hover:border-blue-600","hover:shadow-md","active:scale-[0.98]","transition-all duration-200","group"),children:q1.jsxs("div",{className:"flex items-start gap-3",children:[q1.jsx("div",{className:"flex-shrink-0 w-9 h-9 rounded-lg bg-neutral-100 dark:bg-neutral-700 flex items-center justify-center !text-neutral-500 dark:!text-neutral-400 group-hover:bg-blue-100 dark:group-hover:bg-blue-900/30 group-hover:!text-blue-600 dark:group-hover:!text-blue-400 transition-colors",children:F.icon||q1.jsx(l$,{})}),q1.jsxs("div",{className:"flex-1 min-w-0",children:[q1.jsx("p",{className:"text-sm font-medium !text-neutral-900 dark:!text-white leading-snug",children:F.text}),F.description&&q1.jsx("p",{className:"text-xs !text-neutral-500 dark:!text-neutral-400 mt-1 line-clamp-2",children:F.description})]})]})},w))})]})]})}function qk({messages:Y,onAction:G,welcomeTitle:B,welcomeSubtitle:O,welcomeIcon:H,suggestedPrompts:W,welcomeVariant:L,chatVariant:N,onPromptClick:T,enableWidgets:M,onWidgetRender:F}){let w=T2.useRef(null),v=T2.useRef(!0),S=T2.useRef(0),A=()=>{if(w.current){let{scrollTop:h,scrollHeight:y,clientHeight:k}=w.current;v.current=y-h-k<100}};return T2.useEffect(()=>{if(w.current&&v.current){let h=w.current.scrollHeight;if(h!==S.current)w.current.scrollTop=h,S.current=h}},[Y]),Cz.jsx("div",{ref:w,className:"apteva-message-list apteva-scrollbar-hidden",onScroll:A,children:Y.length===0?Cz.jsx(Uk,{title:B,subtitle:O,icon:H,prompts:W,variant:L,chatVariant:N,onPromptClick:T||(()=>{})}):Y.map((h)=>Cz.jsx("div",{className:h.role==="user"?"apteva-message-row-user":"apteva-message-row-assistant",children:Cz.jsx(Gk,{message:h,onAction:G,enableWidgets:M,onWidgetRender:F})},h.id))})}function Bk({onSendMessage:Y,placeholder:G="Type a message...",disabled:B=!1,isLoading:O=!1,onStop:H,onFileUpload:W,onSwitchMode:L}){let[N,T]=O8.useState(""),[M,F]=O8.useState(!1),[w,v]=O8.useState([]),[S,A]=O8.useState(null),[h,y]=O8.useState(!1),k=O8.useRef(null),E=O8.useRef(null),x=O8.useRef(null),j=(Q0)=>{if(Q0.key==="Enter"&&!Q0.shiftKey)Q0.preventDefault(),d()},d=()=>{let Q0=N.trim(),q0=w.length>0;if((Q0||q0)&&!B){let Y0=w.map((L0)=>L0.file);if(Y(N.trim(),Y0.length>0?Y0:void 0),T(""),v([]),A(null),y(!1),k.current)k.current.style.height="auto"}},o=(Q0)=>{T(Q0.target.value),Q0.target.style.height="auto";let q0=Q0.target.scrollHeight;Q0.target.style.height=`${q0}px`;let Y0=Q0.target.value.includes(`
193
- `),A0=q0>36;if(!h&&(Y0||A0))y(!0);else if(h&&!Y0&&!A0&&Q0.target.value.length<20)y(!1)},c=(Q0)=>{if(Q0.target.files&&Q0.target.files.length>0){let q0=Array.from(Q0.target.files),Y0=[],L0=[];if(q0.forEach((A0)=>{let _0=mK(A0);if(_0.valid){let s0={file:A0};if(A0.type.startsWith("image/"))s0.preview=URL.createObjectURL(A0);Y0.push(s0)}else L0.push(_0.error||"Invalid file")}),Y0.length>0)v((A0)=>[...A0,...Y0]);if(L0.length>0)A(L0.join(", ")),setTimeout(()=>A(null),5000);W?.(Q0.target.files),F(!1),Q0.target.value=""}},l=(Q0)=>{v((q0)=>{let Y0=q0[Q0];if(Y0.preview)URL.revokeObjectURL(Y0.preview);return q0.filter((L0,A0)=>A0!==Q0)})},a=(Q0)=>{if(Q0.startsWith("image/"))return b1.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:b1.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z"})});if(Q0==="application/pdf")return b1.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:b1.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"})});return b1.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:b1.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"})})};return b1.jsxs("div",{className:"px-4 py-3 relative",children:[S&&b1.jsx("div",{className:"absolute bottom-full left-4 right-4 mb-2 p-3 bg-red-50 dark:bg-red-900/30 border border-red-200 dark:border-red-800 rounded-lg z-20",children:b1.jsxs("div",{className:"flex items-center gap-2 !text-red-700 dark:!text-red-300 text-sm",children:[b1.jsx("svg",{className:"w-4 h-4 flex-shrink-0",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:b1.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})}),b1.jsx("span",{children:S})]})}),w.length>0&&b1.jsx("div",{className:"mb-2 flex flex-wrap gap-2",children:w.map((Q0,q0)=>b1.jsxs("div",{className:"relative group flex items-center gap-2 px-3 py-2 bg-neutral-100 dark:bg-neutral-800 border border-neutral-200 dark:border-neutral-700 rounded-lg",children:[Q0.preview?b1.jsx("img",{src:Q0.preview,alt:Q0.file.name,className:"w-8 h-8 object-cover rounded"}):b1.jsx("div",{className:"w-8 h-8 flex items-center justify-center bg-neutral-200 dark:bg-neutral-700 rounded !text-neutral-500 dark:!text-neutral-400",children:a(Q0.file.type)}),b1.jsxs("div",{className:"flex flex-col min-w-0",children:[b1.jsx("span",{className:"text-xs font-medium !text-neutral-700 dark:!text-neutral-300 truncate max-w-[120px]",children:Q0.file.name}),b1.jsx("span",{className:"text-xs !text-neutral-500 dark:!text-neutral-400",children:UZ(Q0.file.size)})]}),b1.jsx("button",{onClick:()=>l(q0),className:"absolute -top-1.5 -right-1.5 w-5 h-5 bg-neutral-500 hover:bg-red-500 text-white rounded-full flex items-center justify-center opacity-0 group-hover:opacity-100 transition-opacity",title:"Remove file",children:b1.jsx("svg",{className:"w-3 h-3",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:b1.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]},q0))}),b1.jsxs("div",{className:"apteva-composer",style:{gridTemplateColumns:"auto 1fr auto",gridTemplateAreas:h?'"textarea textarea textarea" "plus . send"':'"plus textarea send"',alignItems:"end"},children:[b1.jsxs("div",{className:"relative flex-shrink-0 self-end",style:{gridArea:"plus"},children:[b1.jsx("button",{ref:x,onClick:()=>F(!M),className:"apteva-composer-menu-btn w-8 h-8 rounded-lg flex items-center justify-center transition-all !text-neutral-700 dark:!text-neutral-300 hover:bg-neutral-100 dark:hover:bg-neutral-800",title:"More options",children:b1.jsx("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:b1.jsx("path",{d:"M10 5v10M5 10h10",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}),M&&b1.jsxs(b1.Fragment,{children:[b1.jsx("div",{className:"fixed inset-0 z-[9998]",onClick:()=>F(!1)}),b1.jsxs("div",{className:"apteva-composer-menu fixed bg-neutral-800 dark:bg-neutral-800 rounded-xl shadow-lg overflow-hidden z-[9999] min-w-[200px]",style:{left:x.current?.getBoundingClientRect().left??0,bottom:window.innerHeight-(x.current?.getBoundingClientRect().top??0)+8},children:[b1.jsxs("button",{onClick:()=>{E.current?.click(),F(!1)},className:"w-full flex items-center gap-3 px-4 py-3 hover:bg-neutral-700 dark:hover:bg-neutral-700 transition-colors !text-white text-left",children:[b1.jsx("svg",{width:"18",height:"18",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:b1.jsx("path",{d:"M10.5 3.5L5.5 8.5C4.67157 9.32843 4.67157 10.6716 5.5 11.5C6.32843 12.3284 7.67157 12.3284 8.5 11.5L14.5 5.5C15.8807 4.11929 15.8807 1.88071 14.5 0.5C13.1193 -0.880711 10.8807 -0.880711 9.5 0.5L3.5 6.5C1.56846 8.43154 1.56846 11.5685 3.5 13.5C5.43154 15.4315 8.56846 15.4315 10.5 13.5L15.5 8.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",transform:"translate(2, 3)"})}),b1.jsx("span",{className:"!text-sm font-medium",children:"Add photos & files"})]}),L&&b1.jsxs("button",{onClick:()=>{L(),F(!1)},className:"w-full flex items-center gap-3 px-4 py-3 hover:bg-neutral-700 dark:hover:bg-neutral-700 transition-colors !text-white text-left border-t border-neutral-700 dark:border-neutral-700",children:[b1.jsx("svg",{className:"w-4.5 h-4.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:b1.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13 10V3L4 14h7v7l9-11h-7z"})}),b1.jsx("span",{className:"!text-sm font-medium",children:"Switch to command mode"})]})]})]})]}),b1.jsx("textarea",{ref:k,value:N,onChange:o,onKeyDown:j,placeholder:G,disabled:B,className:"apteva-composer-textarea resize-none bg-transparent border-none focus:outline-none !text-neutral-900 dark:!text-neutral-100 placeholder-neutral-400 dark:placeholder-neutral-500 py-1 disabled:opacity-50 disabled:cursor-not-allowed overflow-y-auto max-h-[200px]",style:{gridArea:"textarea"},rows:1}),b1.jsx("div",{className:"self-end",style:{gridArea:"send"},children:O&&H?b1.jsx("button",{onClick:H,className:"apteva-composer-stop-btn",title:"Stop generation",children:b1.jsx("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:b1.jsx("rect",{x:"2",y:"2",width:"10",height:"10",rx:"1",fill:"currentColor"})})}):b1.jsx("button",{onClick:d,disabled:!N.trim()&&w.length===0||B,className:"apteva-composer-send-btn w-8 h-8 rounded-lg flex items-center justify-center font-bold transition-all flex-shrink-0 border border-neutral-300 dark:border-neutral-600 bg-white dark:bg-neutral-800 !text-neutral-700 dark:!text-neutral-300 hover:bg-neutral-50 dark:hover:bg-neutral-700 disabled:opacity-30 disabled:cursor-not-allowed !text-lg",title:"Send message",children:b1.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:b1.jsx("path",{d:"M8 3L8 13M8 3L4 7M8 3L12 7",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})})})]}),b1.jsx("input",{ref:E,type:"file",multiple:!0,onChange:c,className:"hidden",accept:"image/*,application/pdf,.doc,.docx,.txt"})]})}function Kk({onExecute:Y,state:G,response:B,error:O,plan:H,streamedContent:W,toolName:L,onApprove:N,onReject:T,onReset:M,onStop:F,onExpand:w,placeholder:v="Enter your command...",disabled:S=!1}){let[A,h]=x8.useState(""),[y,k]=x8.useState([]),[E,x]=x8.useState(null),[j,d]=x8.useState(!1),o=x8.useRef(null),c=x8.useRef(null),l=x8.useRef(null),a=()=>{let j0=A.trim(),O1=y.length>0;if((j0||O1)&&!S&&G==="idle"){let e=y.map((y0)=>y0.file);Y(A.trim(),e.length>0?e:void 0),h(""),k([])}},Q0=(j0)=>{if(j0.key==="Enter"&&!j0.shiftKey)j0.preventDefault(),a()},q0=()=>{M?.(),o.current?.focus()},Y0=(j0)=>{if(h(j0),o.current)o.current.style.height="auto",o.current.style.height=`${Math.min(o.current.scrollHeight,120)}px`},L0=(j0)=>{if(j0.target.files&&j0.target.files.length>0){let O1=Array.from(j0.target.files),e=[],y0=[];if(O1.forEach((m0)=>{let e0=mK(m0);if(e0.valid){let v0={file:m0};if(m0.type.startsWith("image/"))v0.preview=URL.createObjectURL(m0);e.push(v0)}else y0.push(e0.error||"Invalid file")}),e.length>0)k((m0)=>[...m0,...e]);if(y0.length>0)x(y0.join(", ")),setTimeout(()=>x(null),5000);d(!1),j0.target.value=""}},A0=(j0)=>{k((O1)=>{let e=O1[j0];if(e.preview)URL.revokeObjectURL(e.preview);return O1.filter((y0,m0)=>m0!==j0)})},_0=(j0)=>{if(j0.startsWith("image/"))return l0.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:l0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z"})});if(j0==="application/pdf")return l0.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:l0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"})});return l0.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:l0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"})})},s0=()=>{if(G==="loading"){if(L)return{text:L,isToolCall:!0};if(W)return{text:W,isToolCall:!1};return{text:"Processing...",isToolCall:!1}}if(G==="success"&&B)return{text:B,isToolCall:!1};if(G==="error"&&O)return{text:O,isToolCall:!1};if(G==="plan-pending"&&H)return{text:H,isToolCall:!1};return{text:"",isToolCall:!1}},_1=G!=="idle",{text:$1,isToolCall:D1}=s0();return l0.jsxs("div",{className:"w-full relative",children:[E&&l0.jsx("div",{className:"absolute -top-12 left-0 right-0 mx-3 p-2 bg-red-50 dark:bg-red-900/30 border border-red-200 dark:border-red-800 rounded-lg z-30",children:l0.jsxs("div",{className:"flex items-center gap-2 !text-red-700 dark:!text-red-300 text-xs",children:[l0.jsx("svg",{className:"w-3 h-3 flex-shrink-0",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:l0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})}),l0.jsx("span",{children:E})]})}),l0.jsxs("div",{className:G6("apteva-composer flex items-center gap-2 px-3 py-2 border-2 bg-white dark:bg-neutral-900 transition-all duration-200",G==="idle"&&"border-neutral-200 dark:border-neutral-700",G==="loading"&&"border-blue-400 dark:border-blue-500",G==="plan-pending"&&"border-amber-400 dark:border-amber-500",G==="success"&&"border-green-400 dark:border-green-500",G==="error"&&"border-red-400 dark:border-red-500"),children:[l0.jsxs("div",{className:"w-8 h-8 flex items-center justify-center flex-shrink-0",children:[G==="idle"&&l0.jsxs("div",{className:"relative",children:[l0.jsx("button",{ref:l,onClick:()=>d(!j),className:"apteva-composer-menu-btn w-8 h-8 rounded-lg flex items-center justify-center transition-all !text-neutral-500 dark:!text-neutral-400 hover:!text-neutral-700 dark:hover:!text-neutral-200 hover:bg-neutral-100 dark:hover:bg-neutral-800",title:"More options",children:l0.jsx("svg",{width:"18",height:"18",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:l0.jsx("path",{d:"M10 5v10M5 10h10",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}),j&&l0.jsxs(l0.Fragment,{children:[l0.jsx("div",{className:"fixed inset-0 z-[9998]",onClick:()=>d(!1)}),l0.jsxs("div",{className:"apteva-composer-menu fixed bg-neutral-800 dark:bg-neutral-800 rounded-xl shadow-lg overflow-hidden z-[9999] min-w-[200px]",style:{left:l.current?.getBoundingClientRect().left??0,top:(l.current?.getBoundingClientRect().bottom??0)+8},children:[l0.jsxs("button",{onClick:()=>{c.current?.click(),d(!1)},className:"w-full flex items-center gap-3 px-4 py-3 hover:bg-neutral-700 dark:hover:bg-neutral-700 transition-colors !text-white text-left",children:[l0.jsx("svg",{width:"18",height:"18",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:l0.jsx("path",{d:"M10.5 3.5L5.5 8.5C4.67157 9.32843 4.67157 10.6716 5.5 11.5C6.32843 12.3284 7.67157 12.3284 8.5 11.5L14.5 5.5C15.8807 4.11929 15.8807 1.88071 14.5 0.5C13.1193 -0.880711 10.8807 -0.880711 9.5 0.5L3.5 6.5C1.56846 8.43154 1.56846 11.5685 3.5 13.5C5.43154 15.4315 8.56846 15.4315 10.5 13.5L15.5 8.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",transform:"translate(2, 3)"})}),l0.jsx("span",{className:"!text-sm font-medium",children:"Add photos & files"})]}),w&&l0.jsxs("button",{onClick:()=>{w(),d(!1)},className:"w-full flex items-center gap-3 px-4 py-3 hover:bg-neutral-700 dark:hover:bg-neutral-700 transition-colors !text-white text-left border-t border-neutral-700 dark:border-neutral-700",children:[l0.jsx("svg",{className:"w-4.5 h-4.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:l0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8 12h.01M12 12h.01M16 12h.01M21 12c0 4.418-4.03 8-9 8a9.863 9.863 0 01-4.255-.949L3 20l1.395-3.72C3.512 15.042 3 13.574 3 12c0-4.418 4.03-8 9-8s9 3.582 9 8z"})}),l0.jsx("span",{className:"!text-sm font-medium",children:"Expand to chat"})]})]})]})]}),G==="loading"&&!L&&l0.jsx("div",{className:"w-4 h-4 border-2 border-blue-200 border-t-blue-500 rounded-full animate-spin"}),G==="loading"&&L&&l0.jsx("div",{className:"w-2 h-2 rounded-full bg-blue-500 animate-pulse"})]}),y.length>0&&G==="idle"&&l0.jsx("div",{className:"flex items-center gap-1 flex-shrink-0",children:y.map((j0,O1)=>l0.jsxs("div",{className:"relative group flex items-center justify-center w-6 h-6 bg-neutral-100 dark:bg-neutral-800 rounded overflow-hidden",title:j0.file.name,children:[j0.preview?l0.jsx("img",{src:j0.preview,alt:j0.file.name,className:"w-6 h-6 object-cover"}):l0.jsx("span",{className:"text-xs !text-neutral-500 dark:!text-neutral-400",children:_0(j0.file.type)}),l0.jsx("button",{onClick:()=>A0(O1),className:"absolute inset-0 bg-black/50 opacity-0 group-hover:opacity-100 flex items-center justify-center transition-opacity",title:"Remove",children:l0.jsx("svg",{className:"w-3 h-3 text-white",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:l0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]},O1))}),G==="idle"?l0.jsx("textarea",{ref:o,value:A,onChange:(j0)=>Y0(j0.target.value),onKeyDown:Q0,placeholder:y.length>0?"Add a message...":v,disabled:S,rows:1,className:G6("flex-1 resize-none bg-transparent border-none focus:outline-none","!text-neutral-900 dark:!text-neutral-100 placeholder-neutral-400 dark:placeholder-neutral-500","text-sm leading-relaxed py-1","disabled:opacity-50"),style:{minHeight:"24px",maxHeight:"120px"}}):l0.jsx("div",{className:G6("flex-1 text-sm py-1 truncate flex items-center gap-2",G==="loading"&&!D1&&"!text-neutral-600 dark:!text-neutral-400",G==="loading"&&D1&&"!text-blue-600 dark:!text-blue-400",G==="success"&&"!text-neutral-900 dark:!text-neutral-100",G==="error"&&"!text-red-600 dark:!text-red-400",G==="plan-pending"&&"!text-amber-700 dark:!text-amber-300"),children:D1?l0.jsxs(l0.Fragment,{children:[l0.jsx("span",{className:"font-mono",children:$1}),l0.jsx("span",{className:"text-neutral-400 dark:text-neutral-500",children:"Running..."})]}):$1}),l0.jsx("div",{className:"w-8 h-8 flex items-center justify-center flex-shrink-0",children:G==="plan-pending"?l0.jsxs("div",{className:"flex items-center gap-1",children:[l0.jsx("button",{onClick:N,className:"px-2 py-1 bg-amber-500 text-white rounded-lg hover:bg-amber-600 transition-colors text-xs font-medium",children:"Approve"}),l0.jsx("button",{onClick:T,className:"px-2 py-1 bg-neutral-200 dark:bg-neutral-700 text-neutral-700 dark:text-neutral-300 rounded-lg hover:bg-neutral-300 dark:hover:bg-neutral-600 transition-colors text-xs font-medium",children:"Modify"})]}):l0.jsxs(l0.Fragment,{children:[G==="loading"&&F&&l0.jsx("button",{onClick:F,className:"apteva-composer-stop-btn",title:"Stop generation",children:l0.jsx("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:l0.jsx("rect",{x:"2",y:"2",width:"10",height:"10",rx:"1",fill:"currentColor"})})}),(G==="success"||G==="error")&&l0.jsx("button",{onClick:q0,className:"w-8 h-8 rounded-lg flex items-center justify-center !text-neutral-400 hover:!text-neutral-600 dark:hover:!text-neutral-300 hover:bg-neutral-100 dark:hover:bg-neutral-800 transition-colors",title:"New command",children:l0.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:l0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})}),G==="idle"&&l0.jsx("button",{onClick:a,disabled:!A.trim()&&y.length===0||S,className:G6("apteva-composer-send-btn w-8 h-8 rounded-lg flex items-center justify-center transition-all","border border-neutral-200 dark:border-neutral-700","disabled:opacity-30 disabled:cursor-not-allowed",A.trim()||y.length>0?"bg-neutral-900 dark:bg-white !text-white dark:!text-neutral-900 border-neutral-900 dark:border-white":"bg-white dark:bg-neutral-800 !text-neutral-400"),title:"Execute command",children:l0.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:l0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 12h14M12 5l7 7-7 7"})})})]})})]}),l0.jsx("input",{ref:c,type:"file",multiple:!0,onChange:L0,className:"hidden",accept:"image/*,application/pdf,.doc,.docx,.txt"})]})}var Ok="http://91.99.200.48:3000/agents",Lk="agt_894abd5966bc9f1e9f8f17f2a6f6b5e0",Nk=class{constructor(){hv(this,"config"),this.config={apiUrl:Ok,apiKey:Lk}}configure(Y){if(Y.apiUrl)this.config.apiUrl=Y.apiUrl;if(Y.apiKey)this.config.apiKey=Y.apiKey}getConfig(){return{...this.config}}async chat(Y){try{console.log("[AptevaClient] Chat request:",{agent_id:Y.agent_id,message:typeof Y.message==="string"?Y.message.substring(0,100)+"...":"[multi-part message]",system:Y.system,stream:Y.stream});let G=await fetch(`${this.config.apiUrl}/chat`,{method:"POST",headers:{"Content-Type":"application/json","X-API-Key":this.config.apiKey},body:JSON.stringify(Y)});if(!G.ok){let O=await G.json().catch(()=>({error:"Request failed"}));throw Error(O.error||`Request failed with status ${G.status}`)}let B=await G.json();return{message:B.response||B.message||"",thread_id:B.thread_id,widgets:B.widgets}}catch(G){throw console.error("Chat API error:",G),G}}async chatStream(Y,G,B,O){try{console.log("[AptevaClient] Chat stream request:",{agent_id:Y.agent_id,message:typeof Y.message==="string"?Y.message.substring(0,100)+"...":"[multi-part message]",system:Y.system,stream:Y.stream});let H=await fetch(`${this.config.apiUrl}/chat`,{method:"POST",headers:{"Content-Type":"application/json","X-API-Key":this.config.apiKey,Accept:"text/event-stream"},body:JSON.stringify({...Y,stream:!0})});if(!H.ok){let M=await H.json().catch(()=>({error:"Request failed"}));throw Error(M.error||`Request failed with status ${H.status}`)}let W=H.body?.getReader();if(!W)throw Error("Response body is not readable");let L=new TextDecoder,N="",T="";while(!0){let{done:M,value:F}=await W.read();if(M)break;N+=L.decode(F,{stream:!0});let w=N.split(`
194
- `);N=w.pop()||"";for(let v of w){if(!v.trim()||v.startsWith(":"))continue;if(v.startsWith("data: ")){let S=v.slice(6);if(S==="[DONE]"){B?.(T);return}try{let A=JSON.parse(S);if(A.thread_id)T=A.thread_id;G(A)}catch(A){console.warn("[AptevaClient] Failed to parse SSE data:",S)}}}}B?.(T)}catch(H){let W=H instanceof Error?H:Error("Unknown error");throw O?.(W),W}}async createThread(Y,G){let B=await fetch(`${this.config.apiUrl}/agents/${Y}/threads`,{method:"POST",headers:{"Content-Type":"application/json","X-API-Key":this.config.apiKey},body:JSON.stringify({metadata:G})});if(!B.ok){let H=await B.json().catch(()=>({error:"Request failed"}));throw Error(H.error||`Request failed with status ${B.status}`)}return(await B.json()).thread_id}async getThreadMessages(Y){let G=await fetch(`${this.config.apiUrl}/threads/${Y}/messages`,{method:"GET",headers:{"X-API-Key":this.config.apiKey}});if(!G.ok){let O=await G.json().catch(()=>({error:"Request failed"}));throw Error(O.error||`Request failed with status ${G.status}`)}return(await G.json()).messages}async cancelRequest(Y,G){try{let B=await fetch(`${this.config.apiUrl}/agents/${Y}/requests/${G}/cancel`,{method:"POST",headers:{"Content-Type":"application/json","X-API-Key":this.config.apiKey}});if(!B.ok){let O=await B.json().catch(()=>({error:"Cancel request failed"}));throw Error(O.error||`Cancel request failed with status ${B.status}`)}}catch(B){throw console.error("[AptevaClient] Cancel request error:",B),B}}},I2=new Nk,cK=r1.forwardRef(function({agentId:G,threadId:B,initialMessages:O=[],context:H,apiUrl:W,apiKey:L,useMock:N=!1,initialMode:T="chat",showModeToggle:M=!1,onModeChange:F,commandVariant:w="default",planMode:v=!1,onPlanModeChange:S,enableStreaming:A=!0,showProgress:h=!0,loadingText:y="Processing...",welcomeTitle:k,welcomeSubtitle:E,welcomeIcon:x,suggestedPrompts:j,welcomeVariant:d,onThreadChange:o,onMessageSent:c,onAction:l,onFileUpload:a,onComplete:Q0,onError:q0,onToolCall:Y0,onToolResult:L0,variant:A0="default",placeholder:_0,showHeader:s0=!0,headerTitle:_1="Chat",enableWidgets:$1=!1,availableWidgets:D1,compactWidgetContext:j0=!1,onWidgetRender:O1,className:e},y0){let[m0,e0]=r1.useState(O),[v0,a0]=r1.useState(!1),[z1,U0]=r1.useState(B||null),[t0,v1]=r1.useState(T),[$6,T6]=r1.useState(null),[m1,Y1]=r1.useState("idle"),[p6,c6]=r1.useState(null),[F6,f6]=r1.useState(null),[C5,q6]=r1.useState(0),[_4,B6]=r1.useState(""),[w4,w6]=r1.useState(""),[M6,G4]=r1.useState(null),[h4,m6]=r1.useState(null),[j6,R0]=r1.useState(""),[i0,r0]=r1.useState(""),[u1,n1]=r1.useState(v),[S6,J6]=r1.useState(!1),x6=r1.useRef(null),L1=r1.useRef(null);r1.useImperativeHandle(y0,()=>({sendMessage:async(f1)=>{if(L1.current)await L1.current(f1)},sendSystemMessage:async(f1)=>{if(L1.current)await L1.current(f1,void 0,!0)},getMessages:()=>m0,clearMessages:()=>e0([])}),[m0]);let B1=r1.useMemo(()=>{if(!$1)return H;let f1=j0?ov(D1):jv(D1);return H?`${H}
195
- ${f1}`:f1},[H,$1,D1,j0]);r1.useEffect(()=>{if(W||L)I2.configure({...W&&{apiUrl:W},...L&&{apiKey:L}})},[W,L]),r1.useEffect(()=>{if(B)o?.(B)},[B,o]),r1.useEffect(()=>{n1(v)},[v]),r1.useEffect(()=>{let f1=(t1)=>{let H6=t1.target;if(S6&&!H6.closest(".settings-menu-container"))J6(!1)};return document.addEventListener("mousedown",f1),()=>document.removeEventListener("mousedown",f1)},[S6]);let l4=(f1)=>{if(v1(f1),F?.(f1),f1==="command")Y1("idle"),c6(null),f6(null)},U4=t0==="chat"?"Type a message...":"Enter your command...",d4=async(f1,t1,H6)=>{let d1=t1&&t1.length>0,I=d1?t1.map((X0)=>({name:X0.name,type:X0.type,size:X0.size,preview:X0.type.startsWith("image/")?URL.createObjectURL(X0):void 0})):[];if(!H6){let X0={id:`msg-${Date.now()}`,role:"user",content:f1,timestamp:new Date,metadata:d1?{attachments:I}:void 0};e0((G0)=>[...G0,X0]),c?.(X0)}a0(!0);try{let X0=await hK(f1,t1);if(N){let G0=await yv(1000);e0((P)=>[...P,G0])}else{let G0=[],P="",g=[],$0=z1,N0={},F0={},d0=`msg-${Date.now()}`,h0=()=>{let H0=[...G0];if(P){let w0=H0[H0.length-1];if(w0&&w0.type==="text")w0.content=P;else H0.push({type:"text",content:P})}e0((w0)=>{let x0=w0[w0.length-1];if(x0&&x0.role==="assistant")return[...w0.slice(0,-1),{...x0,content:P,widgets:g.length>0?g:void 0,metadata:{...x0.metadata,content_segments:H0,isStreaming:!0}}];else return[...w0,{id:d0,role:"assistant",content:P,widgets:g.length>0?g:void 0,timestamp:new Date,metadata:{content_segments:H0,isStreaming:!0}}]})};await I2.chatStream({agent_id:G,message:X0,stream:!0,...z1&&{thread_id:z1},...B1&&{system:B1}},(H0)=>{switch(H0.type){case"thread_id":if(H0.thread_id){if($0=H0.thread_id,!z1)U0(H0.thread_id),o?.(H0.thread_id)}break;case"request_id":if(H0.request_id)m6(H0.request_id);break;case"content":case"token":if(H0.content)P+=H0.content,h0();break;case"tool_call":if(H0.tool_id&&H0.tool_name){let w0=H0.tool_display_name||H0.tool_name;if(P)G0.push({type:"text",content:P}),P="";G0.push({type:"tool",id:H0.tool_id,name:w0,status:"preparing"}),N0[H0.tool_id]="",T6(w0),Y0?.(H0.tool_name,H0.tool_id),h0()}break;case"tool_input_delta":if(H0.tool_id&&H0.content){let w0=H0.tool_id;if(N0[w0]===void 0)N0[w0]="";N0[w0]+=H0.content;let x0=G0.find((S1)=>S1.type==="tool"&&S1.id===w0);if(x0){if(x0.isReceiving=!0,x0.inputLength=N0[w0].length,h0(),F0[w0])clearTimeout(F0[w0]);F0[w0]=setTimeout(()=>{if(x0.status==="preparing")x0.isReceiving=!1,h0()},150)}}break;case"tool_use":if(H0.tool_id){let w0=G0.find((x0)=>x0.type==="tool"&&x0.id===H0.tool_id);if(w0&&w0.status==="preparing")w0.status="running",w0.isReceiving=!1,h0()}break;case"tool_stream":if(H0.tool_id){let w0=G0.find((x0)=>x0.type==="tool"&&x0.id===H0.tool_id);if(w0){if(H0.event==="chunk"&&H0.content){if(w0.pendingReset)w0.streamOutput="",w0.pendingReset=!1;w0.streamOutput=(w0.streamOutput||"")+H0.content,h0()}else if(H0.event==="log"||H0.event==="progress")w0.pendingReset=!0}}break;case"tool_result":if(H0.tool_id){let w0=G0.find((x0)=>x0.type==="tool"&&x0.id===H0.tool_id);if(w0)w0.result=H0.content,w0.status="completed",w0.isReceiving=!1,L0?.(w0.name,H0.content);T6(null),h0()}break;case"widget":if(H0.widget)g.push(H0.widget),h0();break;case"error":throw Error(H0.message||"Stream error")}},(H0)=>{if(P){let w0=G0[G0.length-1];if(w0&&w0.type==="text")w0.content=P;else G0.push({type:"text",content:P})}if(e0((w0)=>{let x0=w0[w0.length-1];if(x0&&x0.role==="assistant")return[...w0.slice(0,-1),{...x0,content:P||"Response received",widgets:g.length>0?g:void 0,metadata:{thread_id:H0,content_segments:G0,isStreaming:!1}}];return w0}),H0&&H0!==z1)U0(H0),o?.(H0);a0(!1),m6(null),T6(null)},(H0)=>{let w0={id:`msg-${Date.now()}-error`,role:"assistant",content:`Error: ${H0.message}`,timestamp:new Date,metadata:{error:!0}};e0((x0)=>{let S1=x0[x0.length-1];if(S1&&S1.id.includes("streaming"))return[...x0.slice(0,-1),w0];return[...x0,w0]}),a0(!1),m6(null),T6(null),q0?.(H0)})}}catch(X0){let G0={id:`msg-${Date.now()}-error`,role:"assistant",content:X0 instanceof Error?`Error: ${X0.message}`:"An error occurred",timestamp:new Date,metadata:{error:!0}};e0((P)=>[...P,G0]),q0?.(X0 instanceof Error?X0:Error("Unknown error"))}finally{a0(!1)}};L1.current=d4;let n5=async(f1,t1)=>{let H6=f1||_4;if(!H6.trim()&&(!t1||t1.length===0)){f6(Error("Please enter a command")),Y1("error");return}if(u1&&m1!=="plan-pending"){if(Y1("loading"),f6(null),B6(""),N)setTimeout(()=>{let d1=`1. Analyze the request: "${H6}"
196
- 2. Process the data
197
- 3. Generate response
198
- 4. Return results`;R0(d1),r0(H6),Y1("plan-pending")},800);else try{let I=B1?`${B1}
199
-
200
- CRITICAL PLANNING MODE: You are ONLY creating a plan. Write a numbered list of steps describing what WOULD be done. DO NOT execute anything.`:"CRITICAL PLANNING MODE: You are ONLY creating a plan. Write a numbered list of steps describing what WOULD be done. DO NOT execute anything.",X0=await I2.chat({agent_id:G,message:H6,stream:!1,system:I});R0(X0.message),r0(H6),Y1("plan-pending")}catch(d1){let I=d1 instanceof Error?d1:Error("Failed to generate plan");f6(I),Y1("error"),q0?.(I)}return}Y1("loading"),f6(null),q6(0),w6(""),B6("");try{if(N)if(A){let d1="";mv(H6,(I)=>{if(I.type==="token"&&I.content){d1+=I.content,w6(d1);let X0=Math.min(Math.round(d1.length/10),90);q6(X0)}},(I)=>{let X0={success:!0,data:{summary:d1,thread_id:I},message:d1||"Command executed successfully"};c6(X0),Y1("success"),q6(100),Q0?.(X0)},(I)=>{f6(I),Y1("error"),q0?.(I)})}else{await new Promise((I)=>setTimeout(I,1500));let d1={success:!0,data:{summary:`Executed: ${H6}`},message:"Command executed successfully"};c6(d1),Y1("success"),q6(100),Q0?.(d1)}else{let I=B1?`${B1}
201
-
202
- CRITICAL COMMAND MODE: Maximum 10 words per response. Execute the command immediately. Make reasonable assumptions based on context. Use sensible defaults for missing details. DO NOT ask questions unless something is truly impossible without user input (e.g., missing required password). State what you're doing or the result. Examples: "Analyzing customer data from last quarter..." or "Created 5 new database entries successfully" or "Search complete: found 12 matching results". NO greetings, NO filler words, NO clarification requests. Action/result only.`:`CRITICAL COMMAND MODE: Maximum 10 words per response. Execute the command immediately. Make reasonable assumptions based on context. Use sensible defaults for missing details. DO NOT ask questions unless something is truly impossible without user input (e.g., missing required password). State what you're doing or the result. Examples: "Analyzing customer data from last quarter..." or "Created 5 new database entries successfully" or "Search complete: found 12 matching results". NO greetings, NO filler words, NO clarification requests. Action/result only.`,X0=t1&&t1.length>0?await hK(H6,t1):H6;if(A){let G0="",P="";await I2.chatStream({agent_id:G,message:X0,stream:!0,...z1&&{thread_id:z1},system:I},(g)=>{if((g.type==="token"||g.type==="content")&&g.content){G0+=g.content,w6(G0),G4(null);let $0=Math.min(Math.round(G0.length/10),90);q6($0)}else if(g.type==="tool_call"&&g.tool_name){let $0=g.tool_display_name||g.tool_name;P=g.tool_name,G4($0),Y0?.(g.tool_name,g.tool_id||""),G0="",w6("")}else if(g.type==="tool_result")L0?.(P,g.content),G4(null);else if(g.type==="thread_id"&&g.thread_id){if(!z1)U0(g.thread_id),o?.(g.thread_id)}else if(g.type==="request_id"&&g.request_id)m6(g.request_id)},(g)=>{let $0={success:!0,data:{summary:G0,thread_id:g},message:G0||"Command executed successfully"};c6($0),Y1("success"),q6(100),m6(null),Q0?.($0)},(g)=>{f6(g),Y1("error"),m6(null),q0?.(g)})}else{let G0=await I2.chat({agent_id:G,message:X0,stream:!1,...z1&&{thread_id:z1},system:I}),P={success:!0,data:{summary:G0.message,thread_id:G0.thread_id},widgets:G0.widgets,message:G0.message};c6(P),Y1("success"),q6(100),Q0?.(P)}}}catch(d1){let I=d1 instanceof Error?d1:Error("Unknown error");f6(I),Y1("error"),q0?.(I)}},h5=()=>{Y1("idle"),c6(null),f6(null),q6(0),B6(""),R0(""),r0(""),w6(""),G4(null)},t5=()=>{let f1=j6;R0(""),r0("");let t1=`Execute this plan now:
203
-
204
- ${f1}`;n5(t1)},N5=()=>{B6(i0),R0(""),r0(""),Y1("idle")},y4=async()=>{if(h4&&G)try{await I2.cancelRequest(G,h4)}catch(f1){console.error("Failed to cancel request:",f1)}if(a0(!1),m1==="loading")Y1("idle"),w6(""),G4(null),q6(0);m6(null)},y5=w==="compact";return n4.jsxs("div",{className:G6("apteva-chat flex flex-col h-full",A0!=="default"&&`apteva-chat-${A0}`,e),children:[s0&&t0==="chat"&&n4.jsx("div",{className:"apteva-chat-header px-4 py-3 flex items-center justify-between",children:n4.jsxs("div",{children:[n4.jsx("div",{className:"apteva-chat-title",children:_1}),n4.jsx("div",{className:G6("apteva-chat-status",v0?$6?"apteva-chat-status-tool":"apteva-chat-status-thinking":"apteva-chat-status-ready"),children:v0?$6?`Using ${$6}...`:"Thinking...":"Ready"})]})}),t0==="chat"&&n4.jsxs(n4.Fragment,{children:[n4.jsx(qk,{messages:m0,onAction:l,welcomeTitle:k,welcomeSubtitle:E,welcomeIcon:x,suggestedPrompts:j,welcomeVariant:d,chatVariant:A0,onPromptClick:(f1)=>d4(f1),enableWidgets:$1,onWidgetRender:O1}),n4.jsx(Bk,{onSendMessage:d4,placeholder:_0||U4,disabled:v0,isLoading:v0,onStop:y4,onFileUpload:a,onSwitchMode:M?()=>l4("command"):void 0})]}),t0==="command"&&n4.jsx("div",{className:"w-full",children:n4.jsx(Kk,{onExecute:(f1,t1)=>{B6(f1),n5(f1,t1)},state:m1,response:p6?.data?.summary||p6?.message,error:F6?.message,plan:j6,streamedContent:w4,toolName:M6,onApprove:t5,onReject:N5,onReset:h5,onStop:y4,onExpand:M?()=>l4("chat"):void 0,placeholder:_0||"Enter your command..."})}),n4.jsx("style",{dangerouslySetInnerHTML:{__html:`
205
- @keyframes pulse-border {
206
- 0%, 100% { border-color: rgb(59, 130, 246); }
207
- 50% { border-color: rgb(147, 197, 253); }
208
- }
209
- .animate-pulse-border {
210
- animation: pulse-border 2s ease-in-out infinite;
211
- }
212
- .apteva-composer {
213
- border-radius: var(--apteva-border-radius, 1rem) !important;
214
- }
215
- `}})]})});var m=J0(J1(),1),Rk=[{key:"memory",label:"Memory",description:"Persistent recall",icon:B3},{key:"tasks",label:"Tasks",description:"Schedule and execute tasks",icon:I5},{key:"files",label:"Files",description:"File storage and management",icon:F2},{key:"vision",label:"Vision",description:"Process images and PDFs",icon:K3},{key:"operator",label:"Operator",description:"Browser automation",icon:O3},{key:"mcp",label:"MCP",description:"External tools/services",icon:T5},{key:"realtime",label:"Realtime",description:"Voice conversations",icon:L3},{key:"agents",label:"Multi-Agent",description:"Communicate with peer agents",icon:M2}];function qZ({agent:Y,providers:G,onClose:B,onStartAgent:O,onUpdateAgent:H,onDeleteAgent:W}){let[L,N]=E1.useState("chat");return m.jsxDEV("div",{className:"w-full h-full flex flex-col overflow-hidden bg-[#0a0a0a] border-l border-[#1a1a1a]",children:[m.jsxDEV("div",{className:"border-b border-[#1a1a1a] flex items-center",children:[m.jsxDEV("div",{className:"flex-1 overflow-x-auto scrollbar-hide px-2 md:px-4",children:m.jsxDEV("div",{className:"flex gap-1",children:[m.jsxDEV(C2,{active:L==="chat",onClick:()=>N("chat"),children:"Chat"},void 0,!1,void 0,this),m.jsxDEV(C2,{active:L==="threads",onClick:()=>N("threads"),children:"Threads"},void 0,!1,void 0,this),m.jsxDEV(C2,{active:L==="tasks",onClick:()=>N("tasks"),children:"Tasks"},void 0,!1,void 0,this),m.jsxDEV(C2,{active:L==="memory",onClick:()=>N("memory"),children:"Memory"},void 0,!1,void 0,this),m.jsxDEV(C2,{active:L==="files",onClick:()=>N("files"),children:"Files"},void 0,!1,void 0,this),m.jsxDEV(C2,{active:L==="settings",onClick:()=>N("settings"),children:"Settings"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this),m.jsxDEV("button",{onClick:B,className:"text-[#666] hover:text-[#e0e0e0] transition p-2 flex-shrink-0 mr-2",children:m.jsxDEV(P7,{},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this),m.jsxDEV("div",{className:"flex-1 min-h-0 flex flex-col overflow-hidden",children:[L==="chat"&&m.jsxDEV(Pk,{agent:Y,onStartAgent:O},void 0,!1,void 0,this),L==="threads"&&m.jsxDEV(Fk,{agent:Y},void 0,!1,void 0,this),L==="tasks"&&m.jsxDEV(Mk,{agent:Y},void 0,!1,void 0,this),L==="memory"&&m.jsxDEV(vk,{agent:Y},void 0,!1,void 0,this),L==="files"&&m.jsxDEV(kk,{agent:Y},void 0,!1,void 0,this),L==="settings"&&m.jsxDEV(Ak,{agent:Y,providers:G,onUpdateAgent:H,onDeleteAgent:W},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}function C2({active:Y,onClick:G,children:B}){return m.jsxDEV("button",{onClick:G,className:`px-4 py-3 text-sm font-medium border-b-2 transition ${Y?"border-[#f97316] text-[#e0e0e0]":"border-transparent text-[#666] hover:text-[#888]"}`,children:B},void 0,!1,void 0,this)}function Pk({agent:Y,onStartAgent:G}){if(Y.status==="running"&&Y.port)return m.jsxDEV(cK,{agentId:"default",apiUrl:`/api/agents/${Y.id}`,placeholder:"Message this agent...",context:Y.systemPrompt,variant:"terminal",headerTitle:Y.name},void 0,!1,void 0,this);return m.jsxDEV("div",{className:"flex-1 flex items-center justify-center text-[#666]",children:m.jsxDEV("div",{className:"text-center",children:[m.jsxDEV("p",{className:"text-lg mb-2",children:"Agent is not running"},void 0,!1,void 0,this),m.jsxDEV("button",{onClick:G,className:"bg-[#3b82f6]/20 text-[#3b82f6] hover:bg-[#3b82f6]/30 px-4 py-2 rounded font-medium transition",children:"Start Agent"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)}function Fk({agent:Y}){let[G,B]=E1.useState([]),[O,H]=E1.useState(!0),[W,L]=E1.useState(null),[N,T]=E1.useState(null),[M,F]=E1.useState([]),[w,v]=E1.useState(!1),{confirm:S,ConfirmDialog:A}=K8();E1.useEffect(()=>{B([]),T(null),F([]),L(null),H(!0)},[Y.id]),E1.useEffect(()=>{if(Y.status!=="running"){H(!1);return}(async()=>{try{let E=await fetch(`/api/agents/${Y.id}/threads`);if(!E.ok)throw Error("Failed to fetch threads");let x=await E.json();B(x.threads||[]),L(null)}catch(E){L(E instanceof Error?E.message:"Failed to load threads")}finally{H(!1)}})()},[Y.id,Y.status]);let h=async(k)=>{T(k),v(!0);try{let E=await fetch(`/api/agents/${Y.id}/threads/${k}/messages`);if(!E.ok)throw Error("Failed to fetch messages");let x=await E.json();F(x.messages||[])}catch{F([])}finally{v(!1)}},y=async(k,E)=>{if(E.stopPropagation(),!await S("Delete this thread?",{confirmText:"Delete",title:"Delete Thread"}))return;try{if(await fetch(`/api/agents/${Y.id}/threads/${k}`,{method:"DELETE"}),B((j)=>j.filter((d)=>d.id!==k)),N===k)T(null),F([])}catch{}};if(Y.status!=="running")return m.jsxDEV("div",{className:"flex-1 flex items-center justify-center text-[#666]",children:m.jsxDEV("p",{children:"Start the agent to view threads"},void 0,!1,void 0,this)},void 0,!1,void 0,this);if(O)return m.jsxDEV("div",{className:"flex-1 flex items-center justify-center text-[#666]",children:m.jsxDEV("p",{children:"Loading threads..."},void 0,!1,void 0,this)},void 0,!1,void 0,this);if(W)return m.jsxDEV("div",{className:"flex-1 flex items-center justify-center text-red-400",children:m.jsxDEV("p",{children:W},void 0,!1,void 0,this)},void 0,!1,void 0,this);if(N){let k=G.find((E)=>E.id===N);return m.jsxDEV(m.Fragment,{children:[A,m.jsxDEV("div",{className:"flex-1 flex flex-col overflow-hidden",children:[m.jsxDEV("div",{className:"flex items-center gap-3 px-4 py-3 border-b border-[#1a1a1a]",children:[m.jsxDEV("button",{onClick:()=>{T(null),F([])},className:"text-[#666] hover:text-[#e0e0e0] transition text-lg",children:"←"},void 0,!1,void 0,this),m.jsxDEV("div",{className:"flex-1",children:[m.jsxDEV("p",{className:"text-sm font-medium",children:k?.title||`Thread ${N.slice(0,8)}`},void 0,!1,void 0,this),m.jsxDEV("p",{className:"text-xs text-[#666]",children:k&&new Date(k.updated_at||k.created_at).toLocaleString()},void 0,!1,void 0,this)]},void 0,!0,void 0,this),m.jsxDEV("button",{onClick:(E)=>y(N,E),className:"text-[#666] hover:text-red-400 text-sm px-2 py-1",children:"Delete"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),m.jsxDEV("div",{className:"flex-1 overflow-auto p-4",children:w?m.jsxDEV("p",{className:"text-[#666]",children:"Loading messages..."},void 0,!1,void 0,this):M.length===0?m.jsxDEV("p",{className:"text-[#666]",children:"No messages in this thread"},void 0,!1,void 0,this):m.jsxDEV("div",{className:"space-y-4",children:M.map((E,x)=>m.jsxDEV("div",{className:`${E.role==="user"?"text-right":""}`,children:m.jsxDEV("div",{className:`inline-block max-w-[80%] p-3 rounded ${E.role==="user"?"bg-[#f97316]/20 text-[#f97316]":"bg-[#1a1a1a] text-[#e0e0e0]"}`,children:[m.jsxDEV("div",{className:"text-sm whitespace-pre-wrap",children:typeof E.content==="string"?E.content:Array.isArray(E.content)?E.content.map((j,d)=>m.jsxDEV("div",{children:[j.type==="text"&&j.text,j.type==="tool_use"&&m.jsxDEV("div",{className:"bg-[#222] p-2 rounded mt-1 text-xs text-[#888]",children:["\uD83D\uDD27 Tool: ",j.name]},void 0,!0,void 0,this),j.type==="tool_result"&&m.jsxDEV("div",{className:"bg-[#222] p-2 rounded mt-1 text-xs text-[#888]",children:["\uD83D\uDCCB Result: ",typeof j.content==="string"?j.content.slice(0,200):"..."]},void 0,!0,void 0,this)]},d,!0,void 0,this)):JSON.stringify(E.content)},void 0,!1,void 0,this),m.jsxDEV("p",{className:"text-xs text-[#666] mt-1",children:new Date(E.created_at).toLocaleTimeString()},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},x,!1,void 0,this))},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}return m.jsxDEV(m.Fragment,{children:[A,m.jsxDEV("div",{className:"flex-1 overflow-auto",children:G.length===0?m.jsxDEV("div",{className:"flex items-center justify-center h-full text-[#666]",children:m.jsxDEV("p",{children:"No conversation threads yet"},void 0,!1,void 0,this)},void 0,!1,void 0,this):m.jsxDEV("div",{className:"divide-y divide-[#1a1a1a]",children:G.map((k)=>m.jsxDEV("div",{onClick:()=>h(k.id),className:"p-4 cursor-pointer hover:bg-[#111] transition flex items-center justify-between",children:[m.jsxDEV("div",{className:"flex-1 min-w-0",children:[m.jsxDEV("p",{className:"text-sm font-medium truncate",children:k.title||`Thread ${k.id.slice(0,8)}`},void 0,!1,void 0,this),m.jsxDEV("p",{className:"text-xs text-[#666] mt-1",children:[new Date(k.updated_at||k.created_at).toLocaleString(),k.message_count!==void 0&&` • ${k.message_count} messages`]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),m.jsxDEV("button",{onClick:(E)=>y(k.id,E),className:"text-[#666] hover:text-red-400 text-lg ml-4",children:"×"},void 0,!1,void 0,this)]},k.id,!0,void 0,this))},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}function Mk({agent:Y}){let[G,B]=E1.useState([]),[O,H]=E1.useState(!0),[W,L]=E1.useState(null),[N,T]=E1.useState("all");E1.useEffect(()=>{B([]),L(null),H(!0)},[Y.id]);let M=async()=>{if(Y.status!=="running"){H(!1);return}try{let w=await fetch(`/api/agents/${Y.id}/tasks?status=${N}`);if(!w.ok)throw Error("Failed to fetch tasks");let v=await w.json();B(v.tasks||[]),L(null)}catch(w){L(w instanceof Error?w.message:"Failed to load tasks")}finally{H(!1)}};E1.useEffect(()=>{H(!0),M()},[Y.id,Y.status,N]),E1.useEffect(()=>{if(Y.status!=="running")return;let w=setInterval(M,5000);return()=>clearInterval(w)},[Y.id,Y.status,N]);let F=(w)=>{switch(w){case"pending":return"bg-yellow-500/20 text-yellow-400";case"running":return"bg-blue-500/20 text-blue-400";case"completed":return"bg-green-500/20 text-green-400";case"failed":return"bg-red-500/20 text-red-400";default:return"bg-[#222] text-[#666]"}};if(Y.status!=="running")return m.jsxDEV("div",{className:"flex-1 flex items-center justify-center text-[#666]",children:m.jsxDEV("p",{children:"Start the agent to view tasks"},void 0,!1,void 0,this)},void 0,!1,void 0,this);if(!Y.features?.tasks)return m.jsxDEV("div",{className:"flex-1 flex items-center justify-center text-[#666]",children:m.jsxDEV("div",{className:"text-center",children:[m.jsxDEV("p",{className:"mb-2",children:"Tasks feature is not enabled"},void 0,!1,void 0,this),m.jsxDEV("p",{className:"text-sm",children:"Enable it in Settings to schedule tasks"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this);if(O)return m.jsxDEV("div",{className:"flex-1 flex items-center justify-center text-[#666]",children:m.jsxDEV("p",{children:"Loading tasks..."},void 0,!1,void 0,this)},void 0,!1,void 0,this);if(W)return m.jsxDEV("div",{className:"flex-1 flex items-center justify-center text-red-400",children:m.jsxDEV("p",{children:W},void 0,!1,void 0,this)},void 0,!1,void 0,this);return m.jsxDEV("div",{className:"flex-1 overflow-auto p-4",children:[m.jsxDEV("div",{className:"flex gap-2 mb-4",children:["all","pending","running","completed"].map((w)=>m.jsxDEV("button",{onClick:()=>T(w),className:`px-3 py-1 text-xs rounded transition ${N===w?"bg-[#f97316] text-black":"bg-[#1a1a1a] text-[#666] hover:text-[#888]"}`,children:w.charAt(0).toUpperCase()+w.slice(1)},w,!1,void 0,this))},void 0,!1,void 0,this),G.length===0?m.jsxDEV("div",{className:"text-center py-10 text-[#666]",children:m.jsxDEV("p",{children:["No ",N==="all"?"":N+" ","tasks"]},void 0,!0,void 0,this)},void 0,!1,void 0,this):m.jsxDEV("div",{className:"space-y-3",children:G.map((w)=>m.jsxDEV("div",{className:"bg-[#111] border border-[#1a1a1a] rounded p-3",children:[m.jsxDEV("div",{className:"flex items-start justify-between",children:[m.jsxDEV("div",{className:"flex-1 min-w-0",children:[m.jsxDEV("p",{className:"text-sm font-medium text-[#e0e0e0]",children:w.name},void 0,!1,void 0,this),w.description&&m.jsxDEV("p",{className:"text-xs text-[#666] mt-1 line-clamp-2",children:w.description},void 0,!1,void 0,this)]},void 0,!0,void 0,this),m.jsxDEV("span",{className:`text-xs px-2 py-0.5 rounded ml-2 ${F(w.status)}`,children:w.status},void 0,!1,void 0,this)]},void 0,!0,void 0,this),m.jsxDEV("div",{className:"flex items-center gap-4 mt-2 text-xs text-[#666]",children:[m.jsxDEV("span",{children:["Created: ",new Date(w.created_at).toLocaleString()]},void 0,!0,void 0,this),w.scheduled_at&&m.jsxDEV("span",{children:["Scheduled: ",new Date(w.scheduled_at).toLocaleString()]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),w.status==="completed"&&w.result&&m.jsxDEV("div",{className:"mt-2 p-2 bg-[#0a0a0a] rounded text-xs text-[#888]",children:[m.jsxDEV("p",{className:"text-[#666] mb-1",children:"Result:"},void 0,!1,void 0,this),m.jsxDEV("p",{className:"whitespace-pre-wrap",children:w.result},void 0,!1,void 0,this)]},void 0,!0,void 0,this),w.status==="failed"&&w.error&&m.jsxDEV("div",{className:"mt-2 p-2 bg-red-500/10 rounded text-xs text-red-400",children:[m.jsxDEV("p",{className:"text-red-400/70 mb-1",children:"Error:"},void 0,!1,void 0,this),m.jsxDEV("p",{className:"whitespace-pre-wrap",children:w.error},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},w.id,!0,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}function vk({agent:Y}){let[G,B]=E1.useState([]),[O,H]=E1.useState(!0),[W,L]=E1.useState(null),[N,T]=E1.useState(!1),{confirm:M,ConfirmDialog:F}=K8();E1.useEffect(()=>{B([]),L(null),H(!0)},[Y.id]);let w=async()=>{if(Y.status!=="running"){H(!1);return}try{let A=await fetch(`/api/agents/${Y.id}/memories`);if(!A.ok)throw Error("Failed to fetch memories");let h=await A.json();B(h.memories||[]),T(h.enabled??!1),L(null)}catch(A){L(A instanceof Error?A.message:"Failed to load memories")}finally{H(!1)}};E1.useEffect(()=>{w()},[Y.id,Y.status]);let v=async(A)=>{try{await fetch(`/api/agents/${Y.id}/memories/${A}`,{method:"DELETE"}),B((h)=>h.filter((y)=>y.id!==A))}catch{}},S=async()=>{if(!await M("Clear all memories?",{confirmText:"Clear",title:"Clear Memories"}))return;try{await fetch(`/api/agents/${Y.id}/memories`,{method:"DELETE"}),B([])}catch{}};if(!Y.features?.memory)return m.jsxDEV("div",{className:"flex-1 flex items-center justify-center text-[#666]",children:m.jsxDEV("div",{className:"text-center",children:[m.jsxDEV("p",{className:"mb-2",children:"Memory feature is not enabled"},void 0,!1,void 0,this),m.jsxDEV("p",{className:"text-sm",children:"Enable it in Settings to persist knowledge"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this);if(Y.status!=="running")return m.jsxDEV("div",{className:"flex-1 flex items-center justify-center text-[#666]",children:m.jsxDEV("p",{children:"Start the agent to view memories"},void 0,!1,void 0,this)},void 0,!1,void 0,this);if(O)return m.jsxDEV("div",{className:"flex-1 flex items-center justify-center text-[#666]",children:m.jsxDEV("p",{children:"Loading memories..."},void 0,!1,void 0,this)},void 0,!1,void 0,this);if(W)return m.jsxDEV("div",{className:"flex-1 flex items-center justify-center text-red-400",children:m.jsxDEV("p",{children:W},void 0,!1,void 0,this)},void 0,!1,void 0,this);if(!N)return m.jsxDEV("div",{className:"flex-1 flex items-center justify-center text-[#666]",children:m.jsxDEV("div",{className:"text-center",children:[m.jsxDEV("p",{className:"mb-2",children:"Memory system not initialized"},void 0,!1,void 0,this),m.jsxDEV("p",{className:"text-sm",children:"Check OPENAI_API_KEY for embeddings"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this);return m.jsxDEV(m.Fragment,{children:[F,m.jsxDEV("div",{className:"flex-1 overflow-auto p-4",children:[m.jsxDEV("div",{className:"flex items-center justify-between mb-4",children:[m.jsxDEV("h3",{className:"text-sm font-medium text-[#888]",children:["Stored Memories (",G.length,")"]},void 0,!0,void 0,this),G.length>0&&m.jsxDEV("button",{onClick:S,className:"text-xs text-red-400 hover:text-red-300",children:"Clear All"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),G.length===0?m.jsxDEV("div",{className:"text-center py-10 text-[#666]",children:[m.jsxDEV("p",{children:"No memories stored yet"},void 0,!1,void 0,this),m.jsxDEV("p",{className:"text-sm mt-1",children:"The agent will remember important information from conversations"},void 0,!1,void 0,this)]},void 0,!0,void 0,this):m.jsxDEV("div",{className:"space-y-3",children:G.map((A)=>m.jsxDEV("div",{className:"bg-[#111] border border-[#1a1a1a] rounded p-3",children:[m.jsxDEV("div",{className:"flex items-start justify-between gap-2",children:[m.jsxDEV("p",{className:"text-sm text-[#e0e0e0] flex-1",children:A.content},void 0,!1,void 0,this),m.jsxDEV("button",{onClick:()=>v(A.id),className:"text-[#666] hover:text-red-400 text-sm flex-shrink-0",children:"×"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),m.jsxDEV("div",{className:"flex items-center gap-3 mt-2",children:[m.jsxDEV("span",{className:`text-xs px-2 py-0.5 rounded ${A.type==="preference"?"bg-purple-500/20 text-purple-400":A.type==="fact"?"bg-green-500/20 text-green-400":"bg-blue-500/20 text-blue-400"}`,children:A.type},void 0,!1,void 0,this),m.jsxDEV("span",{className:"text-xs text-[#666]",children:new Date(A.created_at).toLocaleString()},void 0,!1,void 0,this),A.importance&&m.jsxDEV("span",{className:"text-xs text-[#555]",children:["importance: ",A.importance.toFixed(1)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},A.id,!0,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}function kk({agent:Y}){let[G,B]=E1.useState([]),[O,H]=E1.useState(!0),[W,L]=E1.useState(null),{confirm:N,ConfirmDialog:T}=K8();E1.useEffect(()=>{B([]),L(null),H(!0)},[Y.id]);let M=async()=>{if(Y.status!=="running"){H(!1);return}try{let A=await fetch(`/api/agents/${Y.id}/files`);if(!A.ok)throw Error("Failed to fetch files");let h=await A.json();B(h.files||[]),L(null)}catch(A){L(A instanceof Error?A.message:"Failed to load files")}finally{H(!1)}};E1.useEffect(()=>{M()},[Y.id,Y.status]);let F=async(A)=>{if(!await N("Delete this file?",{confirmText:"Delete",title:"Delete File"}))return;try{await fetch(`/api/agents/${Y.id}/files/${A}`,{method:"DELETE"}),B((y)=>y.filter((k)=>k.id!==A))}catch{}},w=(A,h)=>{let y=document.createElement("a");y.href=`/api/agents/${Y.id}/files/${A}/download`,y.download=h,y.click()},v=(A)=>{if(A<1024)return`${A} B`;if(A<1048576)return`${(A/1024).toFixed(1)} KB`;return`${(A/1048576).toFixed(1)} MB`},S=(A)=>{if(A.startsWith("image/"))return"\uD83D\uDDBC";if(A.includes("pdf"))return"\uD83D\uDCD5";if(A.includes("json"))return"{}";if(A.includes("javascript")||A.includes("typescript"))return"⚡";if(A.startsWith("text/"))return"\uD83D\uDCC4";if(A.startsWith("audio/"))return"\uD83C\uDFB5";if(A.startsWith("video/"))return"\uD83C\uDFAC";return"\uD83D\uDCC1"};if(!Y.features?.files)return m.jsxDEV("div",{className:"flex-1 flex items-center justify-center text-[#666]",children:m.jsxDEV("div",{className:"text-center",children:[m.jsxDEV("p",{className:"mb-2",children:"Files feature is not enabled"},void 0,!1,void 0,this),m.jsxDEV("p",{className:"text-sm",children:"Enable it in Settings to manage files"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this);if(Y.status!=="running")return m.jsxDEV("div",{className:"flex-1 flex items-center justify-center text-[#666]",children:m.jsxDEV("p",{children:"Start the agent to view files"},void 0,!1,void 0,this)},void 0,!1,void 0,this);if(O)return m.jsxDEV("div",{className:"flex-1 flex items-center justify-center text-[#666]",children:m.jsxDEV("p",{children:"Loading files..."},void 0,!1,void 0,this)},void 0,!1,void 0,this);if(W)return m.jsxDEV("div",{className:"flex-1 flex items-center justify-center text-red-400",children:m.jsxDEV("p",{children:W},void 0,!1,void 0,this)},void 0,!1,void 0,this);return m.jsxDEV(m.Fragment,{children:[T,m.jsxDEV("div",{className:"flex-1 overflow-auto p-4",children:[m.jsxDEV("div",{className:"flex items-center justify-between mb-4",children:[m.jsxDEV("h3",{className:"text-sm font-medium text-[#888]",children:["Agent Files (",G.length,")"]},void 0,!0,void 0,this),m.jsxDEV("button",{onClick:M,className:"text-xs text-[#666] hover:text-[#888]",children:"Refresh"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),G.length===0?m.jsxDEV("div",{className:"text-center py-10 text-[#666]",children:[m.jsxDEV("p",{children:"No files stored yet"},void 0,!1,void 0,this),m.jsxDEV("p",{className:"text-sm mt-1",children:"Files created or uploaded by the agent will appear here"},void 0,!1,void 0,this)]},void 0,!0,void 0,this):m.jsxDEV("div",{className:"space-y-2",children:G.map((A)=>m.jsxDEV("div",{className:"bg-[#111] border border-[#1a1a1a] rounded p-3 flex items-center gap-3",children:[m.jsxDEV("div",{className:"w-10 h-10 bg-[#1a1a1a] rounded flex items-center justify-center text-[#666]",children:S(A.mime_type)},void 0,!1,void 0,this),m.jsxDEV("div",{className:"flex-1 min-w-0",children:[m.jsxDEV("p",{className:"text-sm text-[#e0e0e0] truncate",children:A.filename},void 0,!1,void 0,this),m.jsxDEV("p",{className:"text-xs text-[#666]",children:[v(A.size_bytes)," • ",new Date(A.created_at).toLocaleString(),A.source&&A.source!=="upload"&&` • ${A.source}`]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),m.jsxDEV("div",{className:"flex items-center gap-2",children:[m.jsxDEV("button",{onClick:()=>w(A.id,A.filename),className:"text-xs text-[#666] hover:text-[#f97316] px-2 py-1",children:"↓"},void 0,!1,void 0,this),m.jsxDEV("button",{onClick:()=>F(A.id),className:"text-[#666] hover:text-red-400 text-sm",children:"×"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},A.id,!0,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}function Ak({agent:Y,providers:G,onUpdateAgent:B,onDeleteAgent:O}){let{authFetch:H}=C1(),[W,L]=E1.useState({name:Y.name,provider:Y.provider,model:Y.model,systemPrompt:Y.systemPrompt,features:{...Y.features},mcpServers:[...Y.mcpServers||[]]}),[N,T]=E1.useState(!1),[M,F]=E1.useState(!1),[w,v]=E1.useState(null),[S,A]=E1.useState([]);E1.useEffect(()=>{(async()=>{try{let a=await(await H("/api/mcp/servers")).json();A(a.servers||[])}catch(l){console.error("Failed to fetch MCP servers:",l)}})()},[H]),E1.useEffect(()=>{L({name:Y.name,provider:Y.provider,model:Y.model,systemPrompt:Y.systemPrompt,features:{...Y.features},mcpServers:[...Y.mcpServers||[]]}),v(null)},[Y.id]);let h=G.find((c)=>c.id===W.provider),y=G.filter((c)=>c.hasKey&&c.type==="llm").map((c)=>({value:c.id,label:c.name})),k=h?.models.map((c)=>({value:c.value,label:c.label,recommended:c.recommended}))||[],E=(c)=>{let l=G.find((Q0)=>Q0.id===c),a=l?.models.find((Q0)=>Q0.recommended)?.value||l?.models[0]?.value||"";L((Q0)=>({...Q0,provider:c,model:a}))},x=(c)=>{L((l)=>({...l,features:{...l.features,[c]:!l.features[c]}}))},j=(c)=>{L((l)=>({...l,mcpServers:l.mcpServers.includes(c)?l.mcpServers.filter((a)=>a!==c):[...l.mcpServers,c]}))},d=async()=>{T(!0),v(null);let c=await B(W);if(T(!1),c.error)v({type:"error",text:c.error});else v({type:"success",text:"Settings saved"}),setTimeout(()=>v(null),2000)},o=W.name!==Y.name||W.provider!==Y.provider||W.model!==Y.model||W.systemPrompt!==Y.systemPrompt||JSON.stringify(W.features)!==JSON.stringify(Y.features)||JSON.stringify(W.mcpServers.sort())!==JSON.stringify((Y.mcpServers||[]).sort());return m.jsxDEV("div",{className:"flex-1 overflow-auto p-4",children:m.jsxDEV("div",{className:"space-y-4",children:[m.jsxDEV(h2,{label:"Name",children:m.jsxDEV("input",{type:"text",value:W.name,onChange:(c)=>L((l)=>({...l,name:c.target.value})),className:"w-full bg-[#0a0a0a] border border-[#222] rounded px-3 py-2 focus:outline-none focus:border-[#f97316] text-[#e0e0e0]"},void 0,!1,void 0,this)},void 0,!1,void 0,this),m.jsxDEV(h2,{label:"Provider",children:m.jsxDEV(k5,{value:W.provider,options:y,onChange:E},void 0,!1,void 0,this)},void 0,!1,void 0,this),m.jsxDEV(h2,{label:"Model",children:m.jsxDEV(k5,{value:W.model,options:k,onChange:(c)=>L((l)=>({...l,model:c}))},void 0,!1,void 0,this)},void 0,!1,void 0,this),m.jsxDEV(h2,{label:"System Prompt",children:m.jsxDEV("textarea",{value:W.systemPrompt,onChange:(c)=>L((l)=>({...l,systemPrompt:c.target.value})),className:"w-full bg-[#0a0a0a] border border-[#222] rounded px-3 py-2 h-24 resize-none focus:outline-none focus:border-[#f97316] text-[#e0e0e0]"},void 0,!1,void 0,this)},void 0,!1,void 0,this),m.jsxDEV(h2,{label:"Features",children:m.jsxDEV("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-2",children:Rk.map(({key:c,label:l,description:a,icon:Q0})=>m.jsxDEV("button",{type:"button",onClick:()=>x(c),className:`flex items-center gap-3 p-3 rounded border text-left transition ${W.features[c]?"border-[#f97316] bg-[#f97316]/10":"border-[#222] hover:border-[#333]"}`,children:[m.jsxDEV(Q0,{className:`w-5 h-5 flex-shrink-0 ${W.features[c]?"text-[#f97316]":"text-[#666]"}`},void 0,!1,void 0,this),m.jsxDEV("div",{className:"flex-1 min-w-0",children:[m.jsxDEV("div",{className:`text-sm font-medium ${W.features[c]?"text-[#f97316]":""}`,children:l},void 0,!1,void 0,this),m.jsxDEV("div",{className:"text-xs text-[#666]",children:a},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},c,!0,void 0,this))},void 0,!1,void 0,this)},void 0,!1,void 0,this),W.features.mcp&&m.jsxDEV(h2,{label:"MCP Servers",children:S.length===0?m.jsxDEV("p",{className:"text-sm text-[#666]",children:"No MCP servers configured. Add servers in the MCP page first."},void 0,!1,void 0,this):m.jsxDEV("div",{className:"space-y-2",children:[S.map((c)=>{let l=c.type==="http"&&c.url,a=l||c.status==="running",Q0=l?`${c.source||"remote"} • http`:`${c.type} • ${c.package||c.command||"custom"}${c.status==="running"&&c.port?` • :${c.port}`:""}`;return m.jsxDEV("button",{type:"button",onClick:()=>j(c.id),className:`w-full flex items-center gap-3 p-3 rounded border text-left transition ${W.mcpServers.includes(c.id)?"border-[#f97316] bg-[#f97316]/10":"border-[#222] hover:border-[#333]"}`,children:[m.jsxDEV("div",{className:`w-2 h-2 rounded-full flex-shrink-0 ${a?"bg-green-400":"bg-[#444]"}`},void 0,!1,void 0,this),m.jsxDEV("div",{className:"flex-1 min-w-0",children:[m.jsxDEV("div",{className:`text-sm font-medium ${W.mcpServers.includes(c.id)?"text-[#f97316]":""}`,children:c.name},void 0,!1,void 0,this),m.jsxDEV("div",{className:"text-xs text-[#666]",children:Q0},void 0,!1,void 0,this)]},void 0,!0,void 0,this),m.jsxDEV("div",{className:`text-xs px-2 py-0.5 rounded ${a?"bg-green-500/20 text-green-400":"bg-[#222] text-[#666]"}`,children:l?"remote":c.status},void 0,!1,void 0,this)]},c.id,!0,void 0,this)}),m.jsxDEV("p",{className:"text-xs text-[#666] mt-2",children:"Remote servers are always available. Local servers must be running."},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this),w&&m.jsxDEV("div",{className:`text-sm px-3 py-2 rounded ${w.type==="success"?"bg-green-500/10 text-green-400":"bg-red-500/10 text-red-400"}`,children:w.text},void 0,!1,void 0,this),m.jsxDEV("button",{onClick:d,disabled:!o||N||!W.name,className:"w-full bg-[#f97316] hover:bg-[#fb923c] disabled:opacity-50 disabled:cursor-not-allowed text-black px-4 py-2 rounded font-medium transition",children:N?"Saving...":"Save Changes"},void 0,!1,void 0,this),Y.status==="running"&&o&&m.jsxDEV("p",{className:"text-xs text-[#666] text-center",children:"Changes will be applied to the running agent"},void 0,!1,void 0,this),m.jsxDEV("div",{className:"mt-8 pt-6 border-t border-[#222]",children:[m.jsxDEV("p",{className:"text-sm text-[#666] mb-3",children:"Danger Zone"},void 0,!1,void 0,this),M?m.jsxDEV("div",{className:"flex gap-2",children:[m.jsxDEV("button",{onClick:()=>F(!1),className:"flex-1 border border-[#333] hover:border-[#444] px-4 py-2 rounded font-medium transition",children:"Cancel"},void 0,!1,void 0,this),m.jsxDEV("button",{onClick:O,className:"flex-1 bg-red-500/20 text-red-400 hover:bg-red-500/30 px-4 py-2 rounded font-medium transition",children:"Confirm Delete"},void 0,!1,void 0,this)]},void 0,!0,void 0,this):m.jsxDEV("button",{onClick:()=>F(!0),className:"w-full border border-red-500/30 text-red-400/70 hover:border-red-500/50 hover:text-red-400 px-4 py-2 rounded font-medium transition",children:"Delete Agent"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)}function h2({label:Y,children:G}){return m.jsxDEV("div",{children:[m.jsxDEV("label",{className:"block text-sm text-[#666] mb-1",children:Y},void 0,!1,void 0,this),G]},void 0,!0,void 0,this)}var nK=J0(F1(),1);var _6=J0(J1(),1);function BZ({agents:Y,loading:G,selectedAgent:B,providers:O,onSelectAgent:H,onCloseAgent:W,onToggleAgent:L,onDeleteAgent:N,onUpdateAgent:T,onNewAgent:M,canCreateAgent:F=!0}){let{currentProjectId:w,currentProject:v}=W4(),S=nK.useMemo(()=>{if(w===null)return Y;if(w==="unassigned")return Y.filter((h)=>!h.projectId);return Y.filter((h)=>h.projectId===w)},[Y,w]),A=w===null?"Agents":w==="unassigned"?"Unassigned Agents":v?.name||"Agents";return _6.jsxDEV("div",{className:"flex-1 flex overflow-hidden relative",children:[_6.jsxDEV("div",{className:"flex-1 overflow-auto p-6",children:[_6.jsxDEV("div",{className:"flex items-center justify-between mb-6",children:[_6.jsxDEV("div",{className:"flex items-center gap-3",children:[v&&_6.jsxDEV("span",{className:"w-3 h-3 rounded-full",style:{backgroundColor:v.color}},void 0,!1,void 0,this),_6.jsxDEV("h1",{className:"text-xl font-semibold",children:A},void 0,!1,void 0,this),w!==null&&_6.jsxDEV("span",{className:"text-sm text-[#666]",children:["(",S.length," agent",S.length!==1?"s":"",")"]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),M&&_6.jsxDEV("button",{onClick:M,disabled:!F,className:"bg-[#f97316] hover:bg-[#fb923c] disabled:opacity-50 disabled:cursor-not-allowed text-black px-4 py-2 rounded font-medium transition",children:"+ New Agent"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),G?_6.jsxDEV(q3,{message:"Loading agents..."},void 0,!1,void 0,this):S.length===0?_6.jsxDEV(Ik,{onNewAgent:M,canCreateAgent:F,hasProjectFilter:w!==null},void 0,!1,void 0,this):_6.jsxDEV("div",{className:"grid gap-4 md:grid-cols-2 xl:grid-cols-3",children:S.map((h)=>_6.jsxDEV($Z,{agent:h,selected:B?.id===h.id,onSelect:()=>H(h),onToggle:(y)=>L(h,y),showProject:w===null},h.id,!1,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this),B&&_6.jsxDEV("div",{className:"absolute inset-0 bg-black/40 backdrop-blur-[2px] z-10",onClick:W},void 0,!1,void 0,this),B&&_6.jsxDEV("div",{className:"absolute right-0 top-0 bottom-0 w-full sm:w-[500px] lg:w-[600px] xl:w-[700px] z-20",children:_6.jsxDEV(qZ,{agent:B,providers:O,onClose:W,onStartAgent:(h)=>L(B,h),onUpdateAgent:(h)=>T(B.id,h),onDeleteAgent:()=>N(B.id)},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}function Ik({onNewAgent:Y,canCreateAgent:G,hasProjectFilter:B}){return _6.jsxDEV("div",{className:"text-center py-20 text-[#666]",children:[B?_6.jsxDEV(_6.Fragment,{children:[_6.jsxDEV("p",{className:"text-lg",children:"No agents in this project"},void 0,!1,void 0,this),_6.jsxDEV("p",{className:"text-sm mt-1",children:"Create an agent or assign existing agents to this project"},void 0,!1,void 0,this)]},void 0,!0,void 0,this):_6.jsxDEV(_6.Fragment,{children:[_6.jsxDEV("p",{className:"text-lg",children:"No agents yet"},void 0,!1,void 0,this),_6.jsxDEV("p",{className:"text-sm mt-1",children:"Create your first agent to get started"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),Y&&_6.jsxDEV("button",{onClick:Y,disabled:!G,className:"mt-4 bg-[#f97316] hover:bg-[#fb923c] disabled:opacity-50 disabled:cursor-not-allowed text-black px-4 py-2 rounded font-medium transition",children:"+ New Agent"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}var L5=J0(F1(),1);var W1=J0(J1(),1);function OZ({agents:Y,loading:G,runningCount:B,configuredProviders:O,onNavigate:H,onSelectAgent:W}){let{authFetch:L}=C1(),{currentProjectId:N}=W4(),[T,M]=L5.useState(null),[F,w]=L5.useState([]),v=L5.useMemo(()=>{if(!N)return Y;if(N==="unassigned")return Y.filter((E)=>!E.projectId);return Y.filter((E)=>E.projectId===N)},[Y,N]),S=L5.useMemo(()=>{return v.filter((E)=>E.status==="running").length},[v]),A=L5.useMemo(()=>{return new Set(v.map((E)=>E.id))},[v]),h=L5.useCallback(async()=>{try{let[E,x]=await Promise.all([L("/api/dashboard"),L("/api/tasks?status=all")]);if(E.ok){let j=await E.json();M(j)}if(x.ok){let j=await x.json();w((j.tasks||[]).slice(0,5))}}catch(E){console.error("Failed to fetch dashboard data:",E)}},[L]);L5.useEffect(()=>{h();let E=setInterval(h,1e4);return()=>clearInterval(E)},[h]);let y=L5.useMemo(()=>{if(!N)return F;return F.filter((E)=>A.has(E.agentId))},[F,N,A]),k=L5.useMemo(()=>{if(!N)return T?.tasks||{total:0,pending:0,running:0,completed:0};let E=y.length,x=y.filter((o)=>o.status==="pending").length,j=y.filter((o)=>o.status==="running").length,d=y.filter((o)=>o.status==="completed").length;return{total:E,pending:x,running:j,completed:d}},[T,N,y]);return W1.jsxDEV("div",{className:"flex-1 overflow-auto p-6",children:[W1.jsxDEV("div",{className:"grid grid-cols-2 sm:grid-cols-4 gap-4 mb-6",children:[W1.jsxDEV(KZ,{label:"Agents",value:v.length,subValue:`${S} running`},void 0,!1,void 0,this),W1.jsxDEV(KZ,{label:"Tasks",value:k.total,subValue:`${k.pending} pending`},void 0,!1,void 0,this),W1.jsxDEV(KZ,{label:"Completed",value:k.completed,color:"text-green-400"},void 0,!1,void 0,this),W1.jsxDEV(KZ,{label:"Providers",value:O.length,color:"text-[#f97316]"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),W1.jsxDEV("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[W1.jsxDEV(tK,{title:"Agents",actionLabel:"View All",onAction:()=>H("agents"),children:G?W1.jsxDEV("div",{className:"p-4 text-center text-[#666]",children:"Loading..."},void 0,!1,void 0,this):v.length===0?W1.jsxDEV("div",{className:"p-4 text-center text-[#666]",children:"No agents yet"},void 0,!1,void 0,this):W1.jsxDEV("div",{className:"divide-y divide-[#1a1a1a]",children:v.slice(0,5).map((E)=>W1.jsxDEV(Tk,{agent:E,onSelect:()=>W(E),showProject:!N},E.id,!1,void 0,this))},void 0,!1,void 0,this)},void 0,!1,void 0,this),W1.jsxDEV(tK,{title:"Recent Tasks",actionLabel:"View All",onAction:()=>H("tasks"),children:y.length===0?W1.jsxDEV("div",{className:"p-4 text-center text-[#666]",children:[W1.jsxDEV("p",{children:"No tasks yet"},void 0,!1,void 0,this),W1.jsxDEV("p",{className:"text-sm text-[#444] mt-1",children:"Tasks will appear when agents create them"},void 0,!1,void 0,this)]},void 0,!0,void 0,this):W1.jsxDEV("div",{className:"divide-y divide-[#1a1a1a]",children:y.map((E)=>W1.jsxDEV("div",{className:"px-4 py-3 flex items-center justify-between",children:[W1.jsxDEV("div",{className:"flex-1 min-w-0",children:[W1.jsxDEV("p",{className:"font-medium truncate",children:E.title},void 0,!1,void 0,this),W1.jsxDEV("p",{className:"text-sm text-[#666]",children:E.agentName},void 0,!1,void 0,this)]},void 0,!0,void 0,this),W1.jsxDEV(fk,{status:E.status},void 0,!1,void 0,this)]},`${E.agentId}-${E.id}`,!0,void 0,this))},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}function KZ({label:Y,value:G,subValue:B,color:O}){return W1.jsxDEV("div",{className:"bg-[#111] rounded p-4 border border-[#1a1a1a]",children:[W1.jsxDEV("p",{className:"text-sm text-[#666] mb-1",children:Y},void 0,!1,void 0,this),W1.jsxDEV("p",{className:`text-2xl font-semibold ${O||""}`,children:G},void 0,!1,void 0,this),B&&W1.jsxDEV("p",{className:"text-xs text-[#555] mt-1",children:B},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}function tK({title:Y,actionLabel:G,onAction:B,children:O}){return W1.jsxDEV("div",{className:"bg-[#111] rounded border border-[#1a1a1a] overflow-hidden",children:[W1.jsxDEV("div",{className:"px-4 py-3 border-b border-[#1a1a1a] flex items-center justify-between",children:[W1.jsxDEV("h3",{className:"font-semibold",children:Y},void 0,!1,void 0,this),W1.jsxDEV("button",{onClick:B,className:"text-sm text-[#3b82f6] hover:text-[#60a5fa]",children:G},void 0,!1,void 0,this)]},void 0,!0,void 0,this),O]},void 0,!0,void 0,this)}function Tk({agent:Y,onSelect:G,showProject:B}){let{isActive:O}=kz(Y.id),{projects:H}=W4(),W=Y.projectId?H.find((L)=>L.id===Y.projectId):null;return W1.jsxDEV("div",{onClick:G,className:"px-4 py-3 hover:bg-[#1a1a1a] cursor-pointer flex items-center justify-between",children:[W1.jsxDEV("div",{className:"flex-1 min-w-0",children:[W1.jsxDEV("p",{className:"font-medium",children:Y.name},void 0,!1,void 0,this),W1.jsxDEV("div",{className:"flex items-center gap-2 text-sm text-[#666]",children:[W1.jsxDEV("span",{children:Y.provider},void 0,!1,void 0,this),B&&W&&W1.jsxDEV(W1.Fragment,{children:[W1.jsxDEV("span",{className:"text-[#444]",children:"·"},void 0,!1,void 0,this),W1.jsxDEV("span",{className:"flex items-center gap-1",children:[W1.jsxDEV("span",{className:"w-2 h-2 rounded-full",style:{backgroundColor:W.color}},void 0,!1,void 0,this),W.name]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),W1.jsxDEV("span",{className:`w-2 h-2 rounded-full flex-shrink-0 ${Y.status==="running"?O?"bg-green-400 animate-pulse":"bg-[#3b82f6]":"bg-[#444]"}`},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}function fk({status:Y}){let G={pending:"bg-yellow-500/20 text-yellow-400",running:"bg-blue-500/20 text-blue-400",completed:"bg-green-500/20 text-green-400",failed:"bg-red-500/20 text-red-400",cancelled:"bg-gray-500/20 text-gray-400"};return W1.jsxDEV("span",{className:`px-2 py-0.5 rounded text-xs font-medium ${G[Y]||G.pending}`,children:Y},void 0,!1,void 0,this)}var k7=J0(F1(),1);var U6=J0(J1(),1);function LZ({onSelectAgent:Y}){let{authFetch:G}=C1(),[B,O]=k7.useState([]),[H,W]=k7.useState(!0),[L,N]=k7.useState("all"),T=k7.useCallback(async()=>{try{let v=await(await G(`/api/tasks?status=${L}`)).json();O(v.tasks||[])}catch(w){console.error("Failed to fetch tasks:",w)}finally{W(!1)}},[G,L]);k7.useEffect(()=>{T();let w=setInterval(T,1e4);return()=>clearInterval(w)},[T]);let M={pending:"bg-yellow-500/20 text-yellow-400",running:"bg-blue-500/20 text-blue-400",completed:"bg-green-500/20 text-green-400",failed:"bg-red-500/20 text-red-400",cancelled:"bg-gray-500/20 text-gray-400"};return U6.jsxDEV("div",{className:"flex-1 p-4 md:p-6 overflow-auto",children:U6.jsxDEV("div",{className:"max-w-4xl",children:[U6.jsxDEV("div",{className:"mb-6",children:[U6.jsxDEV("div",{className:"mb-4",children:[U6.jsxDEV("h1",{className:"text-xl md:text-2xl font-semibold mb-1",children:"Tasks"},void 0,!1,void 0,this),U6.jsxDEV("p",{className:"text-sm text-[#666]",children:"View tasks from all running agents"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),U6.jsxDEV("div",{className:"flex gap-2 overflow-x-auto scrollbar-hide pb-1",children:[{value:"all",label:"All"},{value:"pending",label:"Pending"},{value:"running",label:"Running"},{value:"completed",label:"Completed"},{value:"failed",label:"Failed"}].map((w)=>U6.jsxDEV("button",{onClick:()=>N(w.value),className:`px-3 py-1.5 rounded text-sm transition whitespace-nowrap ${L===w.value?"bg-[#f97316] text-black":"bg-[#1a1a1a] hover:bg-[#222]"}`,children:w.label},w.value,!1,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this),H?U6.jsxDEV("div",{className:"text-center py-12 text-[#666]",children:"Loading tasks..."},void 0,!1,void 0,this):B.length===0?U6.jsxDEV("div",{className:"text-center py-12",children:[U6.jsxDEV(I5,{className:"w-12 h-12 mx-auto mb-4 text-[#333]"},void 0,!1,void 0,this),U6.jsxDEV("p",{className:"text-[#666]",children:"No tasks found"},void 0,!1,void 0,this),U6.jsxDEV("p",{className:"text-sm text-[#444] mt-1",children:"Tasks will appear here when agents create them"},void 0,!1,void 0,this)]},void 0,!0,void 0,this):U6.jsxDEV("div",{className:"space-y-3",children:B.map((w)=>U6.jsxDEV("div",{className:"bg-[#111] border border-[#1a1a1a] rounded-lg p-4 hover:border-[#333] transition",children:[U6.jsxDEV("div",{className:"flex items-start justify-between mb-2",children:[U6.jsxDEV("div",{className:"flex-1",children:[U6.jsxDEV("h3",{className:"font-medium",children:w.title},void 0,!1,void 0,this),U6.jsxDEV("p",{className:"text-sm text-[#666]",children:[w.agentName,w.execute_at&&U6.jsxDEV("span",{className:"ml-2",children:["· Scheduled: ",new Date(w.execute_at).toLocaleString()]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),U6.jsxDEV("span",{className:`px-2 py-1 rounded text-xs font-medium ${M[w.status]||M.pending}`,children:w.status},void 0,!1,void 0,this)]},void 0,!0,void 0,this),w.description&&U6.jsxDEV("p",{className:"text-sm text-[#888] mb-2 line-clamp-2",children:w.description},void 0,!1,void 0,this),U6.jsxDEV("div",{className:"flex flex-wrap items-center gap-x-4 gap-y-1 text-xs text-[#555]",children:[U6.jsxDEV("span",{children:["Type: ",w.type]},void 0,!0,void 0,this),U6.jsxDEV("span",{children:["Priority: ",w.priority]},void 0,!0,void 0,this),w.recurrence&&U6.jsxDEV("span",{children:["Recurrence: ",w.recurrence]},void 0,!0,void 0,this),U6.jsxDEV("span",{children:["Created: ",new Date(w.created_at).toLocaleString()]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},`${w.agentId}-${w.id}`,!0,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)}var P1=J0(F1(),1);var d6=J0(F1(),1);var K0=J0(J1(),1);function a$(Y){return Y.authSchemes.some((G)=>G.toUpperCase()==="API_KEY")}function eK(Y){return Y.authSchemes.some((G)=>G.toUpperCase()==="OAUTH2")}function Sk(Y){return a$(Y)&&eK(Y)}function zO({providerId:Y="composio",onConnectionComplete:G}){let{authFetch:B}=C1(),[O,H]=d6.useState([]),[W,L]=d6.useState([]),[N,T]=d6.useState(!0),[M,F]=d6.useState(""),[w,v]=d6.useState(null),[S,A]=d6.useState(null),[h,y]=d6.useState(null),[k,E]=d6.useState(null),[x,j]=d6.useState(null),[d,o]=d6.useState(""),[c,l]=d6.useState(null),[a,Q0]=d6.useState(""),[q0,Y0]=d6.useState(!1),[L0,A0]=d6.useState(null),[_0,s0]=d6.useState(null),_1=d6.useCallback(async()=>{T(!0),y(null);try{let[U0,t0]=await Promise.all([B(`/api/integrations/${Y}/apps`),B(`/api/integrations/${Y}/connected`)]),v1=await U0.json(),$6=await t0.json();H(v1.apps||[]),L($6.accounts||[])}catch(U0){console.error("Failed to fetch integrations:",U0),y("Failed to load integrations")}T(!1)},[B,Y]);d6.useEffect(()=>{_1()},[_1]),d6.useEffect(()=>{if(new URLSearchParams(window.location.search).get("connected"))window.history.replaceState({},"",window.location.pathname),_1(),G?.()},[_1,G]),d6.useEffect(()=>{if(!S?.connectionId)return;let U0=setInterval(async()=>{try{let v1=await(await B(`/api/integrations/${Y}/connection/${S.connectionId}`)).json();if(v1.connection?.status==="active")A(null),v(null),_1(),G?.();else if(v1.connection?.status==="failed")A(null),v(null),y(`Connection to ${S.appSlug} failed`)}catch(t0){}},2000);return()=>clearInterval(U0)},[S,B,Y,_1,G]);let $1=async(U0,t0,v1)=>{if(Sk(U0)&&!t0&&!v1){E({app:U0});return}if(a$(U0)&&!t0&&!v1){j({app:U0}),o("");return}v(U0.slug),y(null);try{let $6={appSlug:U0.slug};if(t0)$6.credentials={authScheme:"API_KEY",apiKey:t0};let T6=await B(`/api/integrations/${Y}/connect`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify($6)}),m1=await T6.json();if(!T6.ok){y(m1.error||"Failed to initiate connection"),v(null),j(null);return}if(m1.status==="active"||!m1.redirectUrl){v(null),j(null),_1(),G?.();return}if(m1.redirectUrl){A({appSlug:U0.slug,connectionId:m1.connectionId});let Y1=window.open(m1.redirectUrl,`connect-${U0.slug}`,"width=600,height=700,left=200,top=100");if(!Y1||Y1.closed)window.location.href=m1.redirectUrl}}catch($6){y(`Failed to connect: ${$6}`),v(null),j(null)}},D1=(U0)=>{if(U0.preventDefault(),!x||!d.trim())return;$1(x.app,d.trim())},j0=async(U0)=>{try{let t0=await B(`/api/integrations/${Y}/connection/${U0.id}`,{method:"DELETE"});if(t0.ok)_1();else{let v1=await t0.json();y(v1.error||"Failed to disconnect")}}catch(t0){y(`Failed to disconnect: ${t0}`)}},O1=(U0)=>{l({app:U0}),Q0(`${U0.name} MCP`),A0(null)},e=async()=>{if(!c||!a.trim())return;Y0(!0),y(null);try{let U0=await B(`/api/integrations/${Y}/configs`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:a.replace(/[^a-zA-Z0-9\s-]/g,"").substring(0,30),toolkitSlug:c.app.slug})}),t0=await U0.json();if(!U0.ok){y(t0.error||"Failed to create MCP config"),Y0(!1);return}A0(a),G?.()}catch(U0){y(`Failed to create MCP config: ${U0}`)}finally{Y0(!1)}},y0=(U0)=>{s0({message:`Disconnect ${U0.appName}?`,onConfirm:()=>{j0(U0),s0(null)}})},m0=(U0)=>{return W.some((t0)=>t0.appId===U0&&t0.status==="active")},e0=(U0)=>{return W.find((t0)=>t0.appId===U0)},v0=O.filter((U0)=>{if(!M)return!0;let t0=M.toLowerCase();return U0.name.toLowerCase().includes(t0)||U0.slug.toLowerCase().includes(t0)||U0.description?.toLowerCase().includes(t0)||U0.categories.some((v1)=>v1.toLowerCase().includes(t0))}),a0=v0.filter((U0)=>m0(U0.slug)),z1=v0.filter((U0)=>!m0(U0.slug));if(N)return K0.jsxDEV("div",{className:"text-center py-8 text-[#666]",children:"Loading apps..."},void 0,!1,void 0,this);return K0.jsxDEV("div",{className:"space-y-6",children:[k&&K0.jsxDEV("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50",children:K0.jsxDEV("div",{className:"bg-[#111] border border-[#333] rounded-lg p-6 w-full max-w-md mx-4",children:[K0.jsxDEV("div",{className:"flex items-center gap-3 mb-4",children:[k.app.logo&&K0.jsxDEV("img",{src:k.app.logo,alt:k.app.name,className:"w-10 h-10 object-contain"},void 0,!1,void 0,this),K0.jsxDEV("div",{children:[K0.jsxDEV("h3",{className:"font-medium",children:["Connect ",k.app.name]},void 0,!0,void 0,this),K0.jsxDEV("p",{className:"text-xs text-[#666]",children:"Choose how to authenticate"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),K0.jsxDEV("div",{className:"space-y-3",children:[K0.jsxDEV("button",{onClick:()=>{E(null),j({app:k.app}),o("")},className:"w-full text-left p-3 bg-[#0a0a0a] hover:bg-[#1a1a1a] border border-[#333] hover:border-[#f97316] rounded-lg transition",children:[K0.jsxDEV("div",{className:"font-medium text-sm",children:"API Key"},void 0,!1,void 0,this),K0.jsxDEV("div",{className:"text-xs text-[#666] mt-0.5",children:["Enter your ",k.app.name," API key directly"]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),K0.jsxDEV("button",{onClick:()=>{E(null),$1(k.app,void 0,!0)},className:"w-full text-left p-3 bg-[#0a0a0a] hover:bg-[#1a1a1a] border border-[#333] hover:border-[#f97316] rounded-lg transition",children:[K0.jsxDEV("div",{className:"font-medium text-sm",children:"OAuth"},void 0,!1,void 0,this),K0.jsxDEV("div",{className:"text-xs text-[#666] mt-0.5",children:["Sign in with your ",k.app.name," account"]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),K0.jsxDEV("button",{onClick:()=>E(null),className:"w-full text-sm text-[#666] hover:text-white mt-4 py-2 transition",children:"Cancel"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this),x&&K0.jsxDEV("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50",children:K0.jsxDEV("div",{className:"bg-[#111] border border-[#333] rounded-lg p-6 w-full max-w-md mx-4",children:[K0.jsxDEV("div",{className:"flex items-center gap-3 mb-4",children:[x.app.logo&&K0.jsxDEV("img",{src:x.app.logo,alt:x.app.name,className:"w-10 h-10 object-contain"},void 0,!1,void 0,this),K0.jsxDEV("div",{children:[K0.jsxDEV("h3",{className:"font-medium",children:["Connect ",x.app.name]},void 0,!0,void 0,this),K0.jsxDEV("p",{className:"text-xs text-[#666]",children:"Enter your API key to connect"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),K0.jsxDEV("form",{onSubmit:D1,children:[K0.jsxDEV("input",{type:"password",value:d,onChange:(U0)=>o(U0.target.value),placeholder:"Enter API Key...",className:"w-full bg-[#0a0a0a] border border-[#333] rounded-lg px-4 py-2 mb-4 focus:outline-none focus:border-[#f97316]",autoFocus:!0},void 0,!1,void 0,this),K0.jsxDEV("div",{className:"flex gap-2",children:[K0.jsxDEV("button",{type:"button",onClick:()=>j(null),className:"flex-1 text-sm bg-[#1a1a1a] hover:bg-[#222] border border-[#333] px-4 py-2 rounded transition",children:"Cancel"},void 0,!1,void 0,this),K0.jsxDEV("button",{type:"submit",disabled:!d.trim()||w===x.app.slug,className:"flex-1 text-sm bg-[#f97316] hover:bg-[#ea580c] text-white px-4 py-2 rounded transition disabled:opacity-50",children:w===x.app.slug?"Connecting...":"Connect"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this),c&&K0.jsxDEV("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50",children:K0.jsxDEV("div",{className:"bg-[#111] border border-[#333] rounded-lg p-6 w-full max-w-md mx-4",children:L0?K0.jsxDEV(K0.Fragment,{children:[K0.jsxDEV("div",{className:"text-center mb-4",children:[K0.jsxDEV("div",{className:"w-12 h-12 bg-green-500/20 rounded-full flex items-center justify-center mx-auto mb-3",children:K0.jsxDEV("span",{className:"text-green-400 text-2xl",children:"✓"},void 0,!1,void 0,this)},void 0,!1,void 0,this),K0.jsxDEV("h3",{className:"font-medium text-lg",children:"MCP Config Created!"},void 0,!1,void 0,this),K0.jsxDEV("p",{className:"text-sm text-[#888] mt-2",children:['"',L0,'" has been created successfully.']},void 0,!0,void 0,this),K0.jsxDEV("p",{className:"text-xs text-[#666] mt-2",children:"You can now add it to your agents from the MCP Configs tab."},void 0,!1,void 0,this)]},void 0,!0,void 0,this),K0.jsxDEV("button",{onClick:()=>{l(null),A0(null)},className:"w-full text-sm bg-[#f97316] hover:bg-[#ea580c] text-white px-4 py-2 rounded transition",children:"Done"},void 0,!1,void 0,this)]},void 0,!0,void 0,this):K0.jsxDEV(K0.Fragment,{children:[K0.jsxDEV("div",{className:"flex items-center gap-3 mb-4",children:[c.app.logo&&K0.jsxDEV("img",{src:c.app.logo,alt:c.app.name,className:"w-10 h-10 object-contain"},void 0,!1,void 0,this),K0.jsxDEV("div",{children:[K0.jsxDEV("h3",{className:"font-medium",children:"Create MCP Config"},void 0,!1,void 0,this),K0.jsxDEV("p",{className:"text-xs text-[#666]",children:["Create an MCP config for ",c.app.name]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),K0.jsxDEV("form",{onSubmit:(U0)=>{U0.preventDefault(),e()},children:[K0.jsxDEV("label",{className:"block text-xs text-[#888] mb-1",children:"Config Name"},void 0,!1,void 0,this),K0.jsxDEV("input",{type:"text",value:a,onChange:(U0)=>Q0(U0.target.value),placeholder:"Enter config name...",className:"w-full bg-[#0a0a0a] border border-[#333] rounded-lg px-4 py-2 mb-4 focus:outline-none focus:border-[#f97316]",autoFocus:!0,maxLength:30},void 0,!1,void 0,this),K0.jsxDEV("div",{className:"flex gap-2",children:[K0.jsxDEV("button",{type:"button",onClick:()=>l(null),className:"flex-1 text-sm bg-[#1a1a1a] hover:bg-[#222] border border-[#333] px-4 py-2 rounded transition",children:"Cancel"},void 0,!1,void 0,this),K0.jsxDEV("button",{type:"submit",disabled:!a.trim()||q0,className:"flex-1 text-sm bg-[#f97316] hover:bg-[#ea580c] text-white px-4 py-2 rounded transition disabled:opacity-50",children:q0?"Creating...":"Create Config"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)},void 0,!1,void 0,this),_0&&K0.jsxDEV("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50",children:K0.jsxDEV("div",{className:"bg-[#111] border border-[#333] rounded-lg p-6 w-full max-w-sm mx-4",children:[K0.jsxDEV("p",{className:"text-center mb-4",children:_0.message},void 0,!1,void 0,this),K0.jsxDEV("div",{className:"flex gap-2",children:[K0.jsxDEV("button",{onClick:()=>s0(null),className:"flex-1 text-sm bg-[#1a1a1a] hover:bg-[#222] border border-[#333] px-4 py-2 rounded transition",children:"Cancel"},void 0,!1,void 0,this),K0.jsxDEV("button",{onClick:_0.onConfirm,className:"flex-1 text-sm bg-red-500 hover:bg-red-600 text-white px-4 py-2 rounded transition",children:"Confirm"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this),h&&K0.jsxDEV("div",{className:"text-red-400 text-sm p-3 bg-red-500/10 border border-red-500/20 rounded-lg flex items-center justify-between",children:[K0.jsxDEV("span",{children:h},void 0,!1,void 0,this),K0.jsxDEV("button",{onClick:()=>y(null),className:"text-red-400 hover:text-red-300",children:"×"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),S&&K0.jsxDEV("div",{className:"text-yellow-400 text-sm p-3 bg-yellow-500/10 border border-yellow-500/20 rounded-lg flex items-center gap-2",children:[K0.jsxDEV("span",{className:"animate-spin",children:"⟳"},void 0,!1,void 0,this),K0.jsxDEV("span",{children:["Waiting for ",S.appSlug," authorization..."]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),K0.jsxDEV("div",{children:K0.jsxDEV("input",{type:"text",value:M,onChange:(U0)=>F(U0.target.value),placeholder:"Search apps...",className:"w-full bg-[#111] border border-[#333] rounded-lg px-4 py-2 focus:outline-none focus:border-[#f97316]"},void 0,!1,void 0,this)},void 0,!1,void 0,this),a0.length>0&&K0.jsxDEV("div",{children:[K0.jsxDEV("h3",{className:"text-sm font-medium text-[#888] mb-3",children:["Connected (",a0.length,")"]},void 0,!0,void 0,this),K0.jsxDEV("div",{className:"grid gap-3 sm:grid-cols-2 lg:grid-cols-3",children:a0.map((U0)=>K0.jsxDEV(sK,{app:U0,connection:e0(U0.slug),onConnect:()=>$1(U0),onDisconnect:()=>{let t0=e0(U0.slug);if(t0)y0(t0)},onCreateMcpConfig:()=>O1(U0),connecting:w===U0.slug},U0.id,!1,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this),K0.jsxDEV("div",{children:[K0.jsxDEV("h3",{className:"text-sm font-medium text-[#888] mb-3",children:["Available Apps (",z1.length,")"]},void 0,!0,void 0,this),z1.length===0?K0.jsxDEV("p",{className:"text-[#666] text-sm",children:M?"No apps match your search":"No apps available"},void 0,!1,void 0,this):K0.jsxDEV("div",{className:"grid gap-3 sm:grid-cols-2 lg:grid-cols-3",children:z1.slice(0,50).map((U0)=>K0.jsxDEV(sK,{app:U0,onConnect:()=>$1(U0),connecting:w===U0.slug},U0.id,!1,void 0,this))},void 0,!1,void 0,this),z1.length>50&&K0.jsxDEV("p",{className:"text-xs text-[#555] mt-3 text-center",children:["Showing first 50 of ",z1.length," apps. Use search to find more."]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}function sK({app:Y,connection:G,onConnect:B,onDisconnect:O,onCreateMcpConfig:H,connecting:W}){let L=G?.status==="active",N=a$(Y),T=eK(Y),M=N&&T;return K0.jsxDEV("div",{className:`bg-[#111] border rounded-lg p-3 transition ${L?"border-green-500/30":"border-[#1a1a1a] hover:border-[#333]"}`,children:[K0.jsxDEV("div",{className:"flex items-start gap-3",children:[K0.jsxDEV("div",{className:"w-10 h-10 rounded bg-[#1a1a1a] flex items-center justify-center flex-shrink-0 overflow-hidden",children:Y.logo?K0.jsxDEV("img",{src:Y.logo,alt:Y.name,className:"w-8 h-8 object-contain",onError:(F)=>{F.target.style.display="none"}},void 0,!1,void 0,this):K0.jsxDEV("span",{className:"text-lg",children:Y.name[0]?.toUpperCase()},void 0,!1,void 0,this)},void 0,!1,void 0,this),K0.jsxDEV("div",{className:"flex-1 min-w-0",children:[K0.jsxDEV("div",{className:"flex items-center gap-2",children:[K0.jsxDEV("h4",{className:"font-medium text-sm truncate",children:Y.name},void 0,!1,void 0,this),L&&K0.jsxDEV("span",{className:"text-xs text-green-400",children:"✓"},void 0,!1,void 0,this),!L&&N&&!T&&K0.jsxDEV("span",{className:"text-[10px] bg-[#222] text-[#888] px-1.5 py-0.5 rounded",title:"Requires API Key",children:"API Key"},void 0,!1,void 0,this),!L&&M&&K0.jsxDEV("span",{className:"text-[10px] bg-[#1a2a1a] text-[#6a6] px-1.5 py-0.5 rounded",title:"Supports API Key or OAuth",children:"API Key / OAuth"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),Y.description&&K0.jsxDEV("p",{className:"text-xs text-[#666] line-clamp-2 mt-0.5",children:Y.description},void 0,!1,void 0,this),Y.categories.length>0&&K0.jsxDEV("div",{className:"flex flex-wrap gap-1 mt-1",children:Y.categories.slice(0,2).map((F)=>K0.jsxDEV("span",{className:"text-[10px] bg-[#1a1a1a] text-[#555] px-1.5 py-0.5 rounded",children:F},F,!1,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),K0.jsxDEV("div",{className:"mt-3 flex gap-2",children:L?K0.jsxDEV(K0.Fragment,{children:[H&&K0.jsxDEV("button",{onClick:H,className:"flex-1 text-xs bg-[#1a2a1a] hover:bg-[#1a3a1a] border border-green-500/30 hover:border-green-500/50 text-green-400 px-3 py-1.5 rounded transition",children:"Create MCP Config"},void 0,!1,void 0,this),O&&K0.jsxDEV("button",{onClick:O,className:"text-xs text-[#666] hover:text-red-400 transition px-2",title:"Disconnect",children:"×"},void 0,!1,void 0,this)]},void 0,!0,void 0,this):K0.jsxDEV("button",{onClick:B,disabled:W,className:"w-full text-xs bg-[#1a1a1a] hover:bg-[#222] border border-[#333] hover:border-[#f97316] px-3 py-1.5 rounded transition disabled:opacity-50",children:W?"Connecting...":N&&!T?"Enter API Key":"Connect"},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}var C=J0(J1(),1);function NZ(){let{authFetch:Y}=C1(),[G,B]=P1.useState([]),[O,H]=P1.useState(!0),[W,L]=P1.useState(!1),[N,T]=P1.useState(null),[M,F]=P1.useState("servers"),{confirm:w,ConfirmDialog:v}=K8(),S=async()=>{try{let E=await(await Y("/api/mcp/servers")).json();B(E.servers||[])}catch(k){console.error("Failed to fetch MCP servers:",k)}H(!1)};P1.useEffect(()=>{S()},[Y]);let A=async(k)=>{try{await Y(`/api/mcp/servers/${k}/start`,{method:"POST"}),S()}catch(E){console.error("Failed to start server:",E)}},h=async(k)=>{try{await Y(`/api/mcp/servers/${k}/stop`,{method:"POST"}),S()}catch(E){console.error("Failed to stop server:",E)}},y=async(k)=>{if(!await w("Delete this MCP server?",{confirmText:"Delete",title:"Delete Server"}))return;try{if(await Y(`/api/mcp/servers/${k}`,{method:"DELETE"}),N?.id===k)T(null);S()}catch(x){console.error("Failed to delete server:",x)}};return C.jsxDEV(C.Fragment,{children:[v,C.jsxDEV("div",{className:"flex-1 overflow-auto p-6",children:[C.jsxDEV("div",{className:"max-w-6xl",children:[C.jsxDEV("div",{className:"flex items-center justify-between mb-6",children:[C.jsxDEV("div",{children:[C.jsxDEV("h1",{className:"text-2xl font-semibold mb-1",children:"MCP Servers"},void 0,!1,void 0,this),C.jsxDEV("p",{className:"text-[#666]",children:"Manage Model Context Protocol servers for tool integrations."},void 0,!1,void 0,this)]},void 0,!0,void 0,this),M==="servers"&&C.jsxDEV("button",{onClick:()=>L(!0),className:"bg-[#f97316] hover:bg-[#fb923c] text-black px-4 py-2 rounded font-medium transition",children:"+ Add Server"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),C.jsxDEV("div",{className:"flex gap-1 mb-6 bg-[#111] border border-[#1a1a1a] rounded-lg p-1 w-fit",children:[C.jsxDEV("button",{onClick:()=>F("servers"),className:`px-4 py-2 rounded text-sm font-medium transition ${M==="servers"?"bg-[#1a1a1a] text-white":"text-[#666] hover:text-[#888]"}`,children:"My Servers"},void 0,!1,void 0,this),C.jsxDEV("button",{onClick:()=>F("hosted"),className:`px-4 py-2 rounded text-sm font-medium transition ${M==="hosted"?"bg-[#1a1a1a] text-white":"text-[#666] hover:text-[#888]"}`,children:"Hosted Services"},void 0,!1,void 0,this),C.jsxDEV("button",{onClick:()=>F("registry"),className:`px-4 py-2 rounded text-sm font-medium transition ${M==="registry"?"bg-[#1a1a1a] text-white":"text-[#666] hover:text-[#888]"}`,children:"Browse Registry"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),M==="servers"&&C.jsxDEV(C.Fragment,{children:[O&&C.jsxDEV("div",{className:"text-center py-8 text-[#666]",children:"Loading..."},void 0,!1,void 0,this),!O&&G.length===0&&C.jsxDEV("div",{className:"bg-[#111] border border-[#1a1a1a] rounded-lg p-8 text-center",children:[C.jsxDEV(T5,{className:"w-12 h-12 text-[#333] mx-auto mb-4"},void 0,!1,void 0,this),C.jsxDEV("h3",{className:"text-lg font-medium mb-2",children:"No MCP servers configured"},void 0,!1,void 0,this),C.jsxDEV("p",{className:"text-[#666] mb-6 max-w-md mx-auto",children:"MCP servers extend your agents with tools like file access, web browsing, database connections, and more."},void 0,!1,void 0,this),C.jsxDEV("div",{className:"flex gap-3 justify-center",children:[C.jsxDEV("button",{onClick:()=>L(!0),className:"bg-[#f97316] hover:bg-[#fb923c] text-black px-4 py-2 rounded font-medium transition",children:"Add Manually"},void 0,!1,void 0,this),C.jsxDEV("button",{onClick:()=>F("registry"),className:"border border-[#333] hover:border-[#666] px-4 py-2 rounded font-medium transition",children:"Browse Registry"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),!O&&G.length>0&&C.jsxDEV("div",{className:"flex gap-6",children:[C.jsxDEV("div",{className:`space-y-3 ${N?"w-1/2":"w-full"}`,children:G.map((k)=>{let x=k.type==="http"&&k.url||k.status==="running";return C.jsxDEV(Ck,{server:k,selected:N?.id===k.id,onSelect:()=>T(x?k:null),onStart:()=>A(k.id),onStop:()=>h(k.id),onDelete:()=>y(k.id)},k.id,!1,void 0,this)})},void 0,!1,void 0,this),N&&C.jsxDEV("div",{className:"w-1/2",children:C.jsxDEV(hk,{server:N,onClose:()=>T(null)},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),M==="hosted"&&C.jsxDEV(Dk,{onServerAdded:S},void 0,!1,void 0,this),M==="registry"&&C.jsxDEV(Vk,{onInstall:(k)=>{S(),F("servers")}},void 0,!1,void 0,this),M==="servers"&&C.jsxDEV("div",{className:"mt-8 p-4 bg-[#111] border border-[#1a1a1a] rounded-lg",children:[C.jsxDEV("h3",{className:"font-medium mb-2",children:"Quick Start"},void 0,!1,void 0,this),C.jsxDEV("p",{className:"text-sm text-[#666] mb-3",children:"Add an MCP server by providing its npm package name. For example:"},void 0,!1,void 0,this),C.jsxDEV("div",{className:"flex flex-wrap gap-2",children:[{name:"filesystem",pkg:"@modelcontextprotocol/server-filesystem"},{name:"fetch",pkg:"@modelcontextprotocol/server-fetch"},{name:"memory",pkg:"@modelcontextprotocol/server-memory"}].map((k)=>C.jsxDEV("code",{className:"text-xs bg-[#0a0a0a] px-2 py-1 rounded",children:k.pkg},k.name,!1,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),W&&C.jsxDEV(uk,{onClose:()=>L(!1),onAdded:()=>{L(!1),S()}},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}function Ck({server:Y,selected:G,onSelect:B,onStart:O,onStop:H,onDelete:W}){let L=Y.type==="http"&&Y.url,N=L||Y.status==="running",T=()=>{if(L)return`${Y.source||"remote"} • http`;return`${Y.type} • ${Y.package||Y.command||"custom"}${Y.status==="running"&&Y.port?` • :${Y.port}`:""}`};return C.jsxDEV("div",{className:`bg-[#111] border rounded-lg p-4 cursor-pointer transition ${G?"border-[#f97316]":"border-[#1a1a1a] hover:border-[#333]"}`,onClick:N?B:void 0,children:C.jsxDEV("div",{className:"flex items-center justify-between",children:[C.jsxDEV("div",{className:"flex items-center gap-3",children:[C.jsxDEV("div",{className:`w-2 h-2 rounded-full ${N?"bg-green-400":"bg-[#444]"}`},void 0,!1,void 0,this),C.jsxDEV("div",{children:[C.jsxDEV("h3",{className:"font-medium",children:Y.name},void 0,!1,void 0,this),C.jsxDEV("p",{className:"text-sm text-[#666]",children:T()},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),C.jsxDEV("div",{className:"flex items-center gap-2",children:L?C.jsxDEV("button",{onClick:(M)=>{M.stopPropagation(),W()},className:"text-sm text-[#666] hover:text-red-400 px-3 py-1 transition",children:"Remove"},void 0,!1,void 0,this):Y.status==="running"?C.jsxDEV(C.Fragment,{children:[C.jsxDEV("button",{onClick:(M)=>{M.stopPropagation(),B()},className:"text-sm text-[#f97316] hover:text-[#fb923c] px-3 py-1 transition",children:"Tools"},void 0,!1,void 0,this),C.jsxDEV("button",{onClick:(M)=>{M.stopPropagation(),H()},className:"text-sm text-[#666] hover:text-red-400 px-3 py-1 transition",children:"Stop"},void 0,!1,void 0,this),C.jsxDEV("button",{onClick:(M)=>{M.stopPropagation(),W()},className:"text-sm text-[#666] hover:text-red-400 px-3 py-1 transition",children:"Delete"},void 0,!1,void 0,this)]},void 0,!0,void 0,this):C.jsxDEV(C.Fragment,{children:[C.jsxDEV("button",{onClick:(M)=>{M.stopPropagation(),O()},className:"text-sm text-[#666] hover:text-green-400 px-3 py-1 transition",children:"Start"},void 0,!1,void 0,this),C.jsxDEV("button",{onClick:(M)=>{M.stopPropagation(),W()},className:"text-sm text-[#666] hover:text-red-400 px-3 py-1 transition",children:"Delete"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)}function hk({server:Y,onClose:G}){let{authFetch:B}=C1(),[O,H]=P1.useState([]),[W,L]=P1.useState(null),[N,T]=P1.useState(!0),[M,F]=P1.useState(null),[w,v]=P1.useState(null);return P1.useEffect(()=>{(async()=>{T(!0),F(null);try{let A=await B(`/api/mcp/servers/${Y.id}/tools`),h=await A.json();if(!A.ok){F(h.error||"Failed to fetch tools");return}H(h.tools||[]),L(h.serverInfo||null)}catch(A){F(`Failed to fetch tools: ${A}`)}finally{T(!1)}})()},[Y.id,B]),C.jsxDEV("div",{className:"bg-[#111] border border-[#1a1a1a] rounded-lg overflow-hidden",children:[C.jsxDEV("div",{className:"p-4 border-b border-[#1a1a1a] flex items-center justify-between",children:[C.jsxDEV("div",{children:[C.jsxDEV("h3",{className:"font-medium",children:[Y.name," Tools"]},void 0,!0,void 0,this),W&&C.jsxDEV("p",{className:"text-xs text-[#666]",children:[W.name," v",W.version]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),C.jsxDEV("button",{onClick:G,className:"text-[#666] hover:text-[#888] text-xl leading-none",children:"×"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),C.jsxDEV("div",{className:"p-4 max-h-[500px] overflow-auto",children:[N&&C.jsxDEV("p",{className:"text-[#666]",children:"Loading tools..."},void 0,!1,void 0,this),M&&C.jsxDEV("div",{className:"text-red-400 text-sm p-3 bg-red-500/10 rounded",children:M},void 0,!1,void 0,this),!N&&!M&&O.length===0&&C.jsxDEV("p",{className:"text-[#666]",children:"No tools available from this server."},void 0,!1,void 0,this),!N&&!M&&O.length>0&&!w&&C.jsxDEV("div",{className:"space-y-2",children:O.map((S)=>C.jsxDEV("button",{onClick:()=>v(S),className:"w-full text-left p-3 bg-[#0a0a0a] hover:bg-[#1a1a1a] border border-[#222] hover:border-[#333] rounded transition",children:[C.jsxDEV("div",{className:"font-medium text-sm",children:S.name},void 0,!1,void 0,this),S.description&&C.jsxDEV("div",{className:"text-xs text-[#666] mt-1",children:S.description},void 0,!1,void 0,this)]},S.name,!0,void 0,this))},void 0,!1,void 0,this),w&&C.jsxDEV(yk,{serverId:Y.id,tool:w,onBack:()=>v(null)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}function yk({serverId:Y,tool:G,onBack:B}){let{authFetch:O}=C1(),[H,W]=P1.useState("{}"),[L,N]=P1.useState(null),[T,M]=P1.useState(null),[F,w]=P1.useState(!1);P1.useEffect(()=>{let S=G.inputSchema;if(S&&typeof S==="object"&&"properties"in S){let A=S.properties,h={};for(let[y,k]of Object.entries(A))if(k.default!==void 0)h[y]=k.default;else if(k.type==="string")h[y]="";else if(k.type==="number"||k.type==="integer")h[y]=0;else if(k.type==="boolean")h[y]=!1;else if(k.type==="array")h[y]=[];else if(k.type==="object")h[y]={};W(JSON.stringify(h,null,2))}},[G]);let v=async()=>{w(!0),M(null),N(null);try{let S=JSON.parse(H),A=await O(`/api/mcp/servers/${Y}/tools/${encodeURIComponent(G.name)}/call`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({arguments:S})}),h=await A.json();if(!A.ok){M(h.error||"Failed to call tool");return}N(h.result)}catch(S){M(`Error: ${S}`)}finally{w(!1)}};return C.jsxDEV("div",{className:"space-y-4",children:[C.jsxDEV("div",{className:"flex items-center gap-2",children:[C.jsxDEV("button",{onClick:B,className:"text-[#666] hover:text-[#888] text-sm",children:"← Back"},void 0,!1,void 0,this),C.jsxDEV("span",{className:"text-[#444]",children:"/"},void 0,!1,void 0,this),C.jsxDEV("span",{className:"font-medium",children:G.name},void 0,!1,void 0,this)]},void 0,!0,void 0,this),G.description&&C.jsxDEV("p",{className:"text-sm text-[#666]",children:G.description},void 0,!1,void 0,this),G.inputSchema&&C.jsxDEV("div",{className:"text-xs",children:C.jsxDEV("details",{className:"cursor-pointer",children:[C.jsxDEV("summary",{className:"text-[#666] hover:text-[#888]",children:"Input Schema"},void 0,!1,void 0,this),C.jsxDEV("pre",{className:"mt-2 p-2 bg-[#0a0a0a] rounded text-[#888] overflow-auto max-h-32",children:JSON.stringify(G.inputSchema,null,2)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this),C.jsxDEV("div",{children:[C.jsxDEV("label",{className:"block text-sm text-[#666] mb-1",children:"Arguments (JSON)"},void 0,!1,void 0,this),C.jsxDEV("textarea",{value:H,onChange:(S)=>W(S.target.value),className:"w-full bg-[#0a0a0a] border border-[#333] rounded px-3 py-2 h-32 font-mono text-sm focus:outline-none focus:border-[#f97316] resize-none",placeholder:"{}"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),C.jsxDEV("button",{onClick:v,disabled:F,className:"w-full bg-[#f97316] hover:bg-[#fb923c] disabled:opacity-50 text-black px-4 py-2 rounded font-medium transition",children:F?"Calling...":"Call Tool"},void 0,!1,void 0,this),T&&C.jsxDEV("div",{className:"text-red-400 text-sm p-3 bg-red-500/10 rounded",children:T},void 0,!1,void 0,this),L&&C.jsxDEV("div",{className:"space-y-2",children:[C.jsxDEV("div",{className:"text-sm text-[#666]",children:["Result ",L.isError&&C.jsxDEV("span",{className:"text-red-400",children:"(error)"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),C.jsxDEV("div",{className:`p-3 rounded text-sm ${L.isError?"bg-red-500/10":"bg-green-500/10"}`,children:L.content.map((S,A)=>C.jsxDEV("div",{className:"mb-2 last:mb-0",children:[S.type==="text"&&C.jsxDEV("pre",{className:"whitespace-pre-wrap font-mono text-xs",children:S.text},void 0,!1,void 0,this),S.type==="image"&&S.data&&C.jsxDEV("img",{src:`data:${S.mimeType||"image/png"};base64,${S.data}`,alt:"Tool result",className:"max-w-full rounded"},void 0,!1,void 0,this)]},A,!0,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}function Vk({onInstall:Y}){let{authFetch:G}=C1(),[B,O]=P1.useState(""),[H,W]=P1.useState([]),[L,N]=P1.useState(!1),[T,M]=P1.useState(!1),[F,w]=P1.useState(null),[v,S]=P1.useState(null),A=async(k)=>{N(!0),S(null);try{let E=await G(`/api/mcp/registry?search=${encodeURIComponent(k)}&limit=20`),x=await E.json();if(!E.ok)S(x.error||"Failed to search registry"),W([]);else W(x.servers||[])}catch(E){S(`Failed to search: ${E}`),W([])}finally{N(!1),M(!0)}},h=(k)=>{if(k.preventDefault(),B.trim())A(B.trim())};P1.useEffect(()=>{A("")},[]);let y=async(k)=>{if(!k.npmPackage){S("This server does not have an npm package");return}w(k.id),S(null);try{let E=await G("/api/mcp/servers",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:k.name,type:"npm",package:k.npmPackage})});if(!E.ok){let x=await E.json();S(x.error||"Failed to add server");return}Y(k)}catch(E){S(`Failed to add server: ${E}`)}finally{w(null)}};return C.jsxDEV("div",{className:"space-y-6",children:[C.jsxDEV("form",{onSubmit:h,className:"flex gap-2",children:[C.jsxDEV("input",{type:"text",value:B,onChange:(k)=>O(k.target.value),placeholder:"Search MCP servers (e.g., filesystem, github, slack...)",className:"flex-1 bg-[#111] border border-[#333] rounded-lg px-4 py-3 focus:outline-none focus:border-[#f97316]"},void 0,!1,void 0,this),C.jsxDEV("button",{type:"submit",disabled:L,className:"bg-[#f97316] hover:bg-[#fb923c] disabled:opacity-50 text-black px-6 py-3 rounded-lg font-medium transition",children:L?"...":"Search"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),v&&C.jsxDEV("div",{className:"text-red-400 text-sm p-3 bg-red-500/10 border border-red-500/20 rounded-lg",children:v},void 0,!1,void 0,this),!L&&T&&H.length===0&&C.jsxDEV("div",{className:"text-center py-8 text-[#666]",children:"No servers found. Try a different search term."},void 0,!1,void 0,this),H.length>0&&C.jsxDEV("div",{className:"grid gap-4 md:grid-cols-2",children:H.map((k)=>C.jsxDEV("div",{className:"bg-[#111] border border-[#1a1a1a] rounded-lg p-4 hover:border-[#333] transition",children:C.jsxDEV("div",{className:"flex items-start justify-between gap-3",children:[C.jsxDEV("div",{className:"flex-1 min-w-0",children:[C.jsxDEV("h3",{className:"font-medium truncate",children:k.name},void 0,!1,void 0,this),C.jsxDEV("p",{className:"text-sm text-[#666] mt-1 line-clamp-2",children:k.description||"No description"},void 0,!1,void 0,this),C.jsxDEV("div",{className:"flex items-center gap-2 mt-2 text-xs text-[#555]",children:[k.version&&C.jsxDEV("span",{children:["v",k.version]},void 0,!0,void 0,this),C.jsxDEV("span",{className:`px-1.5 py-0.5 rounded ${k.npmPackage?"bg-green-500/10 text-green-400":"bg-blue-500/10 text-blue-400"}`,children:k.npmPackage?"npm":"remote"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),C.jsxDEV("code",{className:"text-xs text-[#555] bg-[#0a0a0a] px-2 py-0.5 rounded mt-2 inline-block truncate max-w-full",children:k.npmPackage||k.fullName},void 0,!1,void 0,this)]},void 0,!0,void 0,this),C.jsxDEV("div",{className:"flex-shrink-0",children:k.npmPackage?C.jsxDEV("button",{onClick:()=>y(k),disabled:F===k.id,className:"text-sm bg-[#1a1a1a] hover:bg-[#222] border border-[#333] hover:border-[#f97316] px-3 py-1.5 rounded transition disabled:opacity-50",children:F===k.id?"Adding...":"Add"},void 0,!1,void 0,this):k.repository?C.jsxDEV("a",{href:k.repository,target:"_blank",rel:"noopener noreferrer",className:"text-sm text-[#666] hover:text-[#f97316] transition",children:"View →"},void 0,!1,void 0,this):null},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},k.id,!1,void 0,this))},void 0,!1,void 0,this),L&&C.jsxDEV("div",{className:"text-center py-8 text-[#666]",children:"Searching registry..."},void 0,!1,void 0,this),C.jsxDEV("div",{className:"p-4 bg-[#111] border border-[#1a1a1a] rounded-lg text-sm text-[#666]",children:C.jsxDEV("p",{children:["Servers are sourced from the"," ",C.jsxDEV("a",{href:"https://github.com/modelcontextprotocol/servers",target:"_blank",rel:"noopener noreferrer",className:"text-[#f97316] hover:underline",children:"official MCP registry"},void 0,!1,void 0,this),". Not all servers have npm packages - some require manual setup."]},void 0,!0,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}function Dk({onServerAdded:Y}){let{authFetch:G}=C1(),[B,O]=P1.useState("configs"),[H,W]=P1.useState(!1),[L,N]=P1.useState(!1),[T,M]=P1.useState([]),[F,w]=P1.useState(new Set),[v,S]=P1.useState(!0),[A,h]=P1.useState(!1),[y,k]=P1.useState(null),{alert:E,AlertDialog:x}=WK(),j=async()=>{try{let[a,Q0]=await Promise.all([G("/api/providers"),G("/api/mcp/servers")]),q0=await a.json(),Y0=await Q0.json(),L0=q0.providers||[],A0=Y0.servers||[],_0=new Set(A0.filter(($1)=>$1.source==="composio"&&$1.url).map(($1)=>{let D1=$1.url.match(/\/v3\/mcp\/([^/]+)/);return D1?D1[1]:null}).filter(Boolean));w(_0);let s0=L0.find(($1)=>$1.id==="composio"),_1=L0.find(($1)=>$1.id==="smithery");if(W(s0?.hasKey||!1),N(_1?.hasKey||!1),s0?.hasKey)d()}catch(a){console.error("Failed to fetch providers:",a)}S(!1)},d=async()=>{h(!0);try{let Q0=await(await G("/api/integrations/composio/configs")).json();M(Q0.configs||[])}catch(a){console.error("Failed to fetch Composio configs:",a)}h(!1)},o=async(a)=>{k(a);try{let Q0=await G(`/api/integrations/composio/configs/${a}/add`,{method:"POST"});if(Q0.ok)w((q0)=>new Set([...q0,a])),Y?.();else{let q0=await Q0.json();await E(q0.error||"Failed to add config",{title:"Error",variant:"error"})}}catch(Q0){console.error("Failed to add config:",Q0)}k(null)},c=(a)=>{return F.has(a)};if(P1.useEffect(()=>{j()},[G]),v)return C.jsxDEV("div",{className:"text-center py-8 text-[#666]",children:"Loading..."},void 0,!1,void 0,this);if(!(H||L))return C.jsxDEV("div",{className:"bg-[#111] border border-[#1a1a1a] rounded-lg p-8 text-center",children:[C.jsxDEV("p",{className:"text-[#888] mb-2",children:"No hosted MCP services connected"},void 0,!1,void 0,this),C.jsxDEV("p",{className:"text-sm text-[#666] mb-4",children:"Connect Composio or Smithery in Settings to access cloud-based MCP servers."},void 0,!1,void 0,this),C.jsxDEV("a",{href:"/settings",className:"inline-block bg-[#1a1a1a] hover:bg-[#222] border border-[#333] hover:border-[#f97316] px-4 py-2 rounded text-sm font-medium transition",children:"Go to Settings →"},void 0,!1,void 0,this)]},void 0,!0,void 0,this);return C.jsxDEV(C.Fragment,{children:[x,C.jsxDEV("div",{className:"space-y-6",children:[H&&C.jsxDEV("div",{className:"flex gap-1 bg-[#0a0a0a] border border-[#222] rounded-lg p-1 w-fit",children:[C.jsxDEV("button",{onClick:()=>O("configs"),className:`px-4 py-2 rounded text-sm font-medium transition ${B==="configs"?"bg-[#1a1a1a] text-white":"text-[#666] hover:text-[#888]"}`,children:"MCP Configs"},void 0,!1,void 0,this),C.jsxDEV("button",{onClick:()=>O("connect"),className:`px-4 py-2 rounded text-sm font-medium transition ${B==="connect"?"bg-[#1a1a1a] text-white":"text-[#666] hover:text-[#888]"}`,children:"Connect Apps"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),H&&B==="connect"&&C.jsxDEV("div",{children:[C.jsxDEV("div",{className:"flex items-center justify-between mb-4",children:C.jsxDEV("div",{children:[C.jsxDEV("h2",{className:"font-medium",children:"Connect Apps via Composio"},void 0,!1,void 0,this),C.jsxDEV("p",{className:"text-sm text-[#666] mt-1",children:"Connect your accounts to enable tools in MCP configs"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this),C.jsxDEV(zO,{providerId:"composio",onConnectionComplete:()=>{d()}},void 0,!1,void 0,this)]},void 0,!0,void 0,this),H&&B==="configs"&&C.jsxDEV("div",{children:[C.jsxDEV("div",{className:"flex items-center justify-between mb-3",children:[C.jsxDEV("div",{className:"flex items-center gap-2",children:[C.jsxDEV("h2",{className:"font-medium",children:"Composio MCP Configs"},void 0,!1,void 0,this),C.jsxDEV("span",{className:"text-xs text-green-400",children:"Connected"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),C.jsxDEV("div",{className:"flex items-center gap-3",children:[C.jsxDEV("button",{onClick:d,disabled:A,className:"text-xs text-[#666] hover:text-[#888] transition",children:A?"Loading...":"Refresh"},void 0,!1,void 0,this),C.jsxDEV("a",{href:"https://app.composio.dev/mcp_configs",target:"_blank",rel:"noopener noreferrer",className:"text-xs text-[#666] hover:text-[#f97316] transition",children:"Create Config →"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),A?C.jsxDEV("div",{className:"text-center py-6 text-[#666]",children:"Loading configs..."},void 0,!1,void 0,this):T.length===0?C.jsxDEV("div",{className:"bg-[#111] border border-[#1a1a1a] rounded-lg p-4 text-center",children:[C.jsxDEV("p",{className:"text-sm text-[#666]",children:"No MCP configs found"},void 0,!1,void 0,this),C.jsxDEV("p",{className:"text-xs text-[#555] mt-2",children:["First ",C.jsxDEV("button",{onClick:()=>O("connect"),className:"text-[#f97316] hover:text-[#fb923c]",children:"connect some apps"},void 0,!1,void 0,this),", then create a config."]},void 0,!0,void 0,this),C.jsxDEV("a",{href:"https://app.composio.dev/mcp_configs",target:"_blank",rel:"noopener noreferrer",className:"text-xs text-[#f97316] hover:text-[#fb923c] mt-2 inline-block",children:"Create in Composio →"},void 0,!1,void 0,this)]},void 0,!0,void 0,this):C.jsxDEV("div",{className:"space-y-2",children:T.map((a)=>{let Q0=c(a.id),q0=y===a.id;return C.jsxDEV("div",{className:`bg-[#111] border rounded-lg p-3 transition flex items-center justify-between ${Q0?"border-green-500/30":"border-[#1a1a1a] hover:border-[#333]"}`,children:[C.jsxDEV("div",{className:"flex-1 min-w-0",children:[C.jsxDEV("div",{className:"flex items-center gap-2",children:[C.jsxDEV("span",{className:"font-medium text-sm",children:a.name},void 0,!1,void 0,this),C.jsxDEV("span",{className:"text-xs text-[#555]",children:[a.toolsCount," tools"]},void 0,!0,void 0,this),Q0&&C.jsxDEV("span",{className:"text-xs text-green-400",children:"Added"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),a.toolkits.length>0&&C.jsxDEV("div",{className:"flex flex-wrap gap-1 mt-1",children:[a.toolkits.slice(0,4).map((Y0)=>C.jsxDEV("span",{className:"text-xs bg-[#1a1a1a] text-[#666] px-1.5 py-0.5 rounded",children:Y0},Y0,!1,void 0,this)),a.toolkits.length>4&&C.jsxDEV("span",{className:"text-xs text-[#555]",children:["+",a.toolkits.length-4]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),C.jsxDEV("div",{className:"flex items-center gap-2 ml-3",children:[Q0?C.jsxDEV("span",{className:"text-xs text-[#555] px-2 py-1",children:"In Servers"},void 0,!1,void 0,this):C.jsxDEV("button",{onClick:()=>o(a.id),disabled:q0,className:"text-xs bg-[#f97316] hover:bg-[#fb923c] text-black px-3 py-1 rounded font-medium transition disabled:opacity-50",children:q0?"Adding...":"Add"},void 0,!1,void 0,this),C.jsxDEV("a",{href:`https://app.composio.dev/mcp_configs/${a.id}`,target:"_blank",rel:"noopener noreferrer",className:"text-xs text-[#666] hover:text-[#888] transition",children:"Edit"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},a.id,!0,void 0,this)})},void 0,!1,void 0,this)]},void 0,!0,void 0,this),L&&C.jsxDEV("div",{children:[C.jsxDEV("div",{className:"flex items-center justify-between mb-3",children:[C.jsxDEV("div",{className:"flex items-center gap-2",children:[C.jsxDEV("h2",{className:"font-medium",children:"Smithery"},void 0,!1,void 0,this),C.jsxDEV("span",{className:"text-xs text-green-400",children:"Connected"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),C.jsxDEV("a",{href:"https://smithery.ai/servers",target:"_blank",rel:"noopener noreferrer",className:"text-xs text-[#666] hover:text-[#f97316] transition",children:"View Servers →"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),C.jsxDEV("div",{className:"bg-[#111] border border-[#1a1a1a] rounded-lg p-4 text-center",children:C.jsxDEV("p",{className:"text-sm text-[#666]",children:"Smithery servers can be added from the Registry tab."},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this),C.jsxDEV("div",{className:"p-3 bg-[#0a0a0a] border border-[#222] rounded text-xs text-[#666]",children:[C.jsxDEV("strong",{className:"text-[#888]",children:"Tip:"},void 0,!1,void 0,this)," Connect apps first, then add MCP configs to make tools available to your agents."," · ",C.jsxDEV("a",{href:"/settings",className:"text-[#f97316] hover:text-[#fb923c]",children:"Add more providers in Settings"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}function mk(Y){let G=[],B=Y,O=null,H=Y.match(/(?:npx\s+-y\s+)?(@?[\w-]+\/)?(@?[\w-]+)(?:@[\w.-]+)?/);if(H){let N=H[2]||H[1];if(N)O=N.replace(/^@/,"").replace(/-mcp$/,"").replace(/-server$/,"").replace(/^server-/,"").replace(/^mcp-/,"")}let W=/--(\w+[-\w]*)\s+(YOUR_\w+|<[\w_]+>|\{[\w_]+\}|\$[\w_]+|[\w_]*(?:TOKEN|KEY|SECRET|PASSWORD|USER|ID|APIKEY)[\w_]*)/gi,L;while((L=W.exec(Y))!==null){let N=L[1],T=L[2],M=N.toUpperCase().replace(/-/g,"_"),F=O?`${O.toUpperCase().replace(/-/g,"_")}_${M}`:M;G.push({key:F,flag:N}),B=B.replace(new RegExp(`(--${N}\\s+)${T.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}`,"i"),`--${N} $${F}`)}return{cleanCommand:B,credentials:G,serverName:O}}function uk({onClose:Y,onAdded:G}){let{authFetch:B}=C1(),[O,H]=P1.useState("npm"),[W,L]=P1.useState(""),[N,T]=P1.useState(""),[M,F]=P1.useState(""),[w,v]=P1.useState([]),[S,A]=P1.useState(!1),[h,y]=P1.useState(null),k=()=>{v([...w,{key:"",value:""}])},E=(l,a,Q0)=>{let q0=[...w];q0[l][a]=Q0,v(q0)},x=(l)=>{v(w.filter((a,Q0)=>Q0!==l))},j=(l)=>{if(F(l),l.includes("YOUR_")||l.includes("<")||l.includes("{")||/TOKEN|KEY|SECRET|PASSWORD/i.test(l)){let{cleanCommand:a,credentials:Q0,serverName:q0}=mk(l);if(!W&&q0)L(q0);if(Q0.length>0){let Y0=new Set(w.map((A0)=>A0.key)),L0=Q0.filter((A0)=>!Y0.has(A0.key)).map((A0)=>({key:A0.key,value:""}));if(L0.length>0)v([...w,...L0]),F(a)}}},d=(l)=>{if(l.startsWith("npx ")||l.includes(" --")||l.includes("YOUR_")||l.includes("<")||/\s+(TOKEN|KEY|SECRET|PASSWORD)/i.test(l))H("command"),j(l);else if(T(l),!W&&l){let Q0=l.replace(/^@[\w-]+\//,"").replace(/@[\w.-]+$/,"").replace(/^server-/,"").replace(/-server$/,"").replace(/^mcp-/,"").replace(/-mcp$/,"");if(Q0&&Q0!==l)L(Q0)}},o=async()=>{if(!W){y("Name is required");return}if(O==="npm"&&!N){y("npm package is required");return}if(O==="command"&&!M){y("Command is required");return}A(!0),y(null);let l={};for(let{key:a,value:Q0}of w)if(a.trim())l[a.trim()]=Q0;try{let a={name:W};if(O==="npm")a.type="npm",a.package=N;else{let q0=M.trim().split(/\s+/);a.type="custom",a.command=q0[0],a.args=q0.slice(1).join(" ")}if(Object.keys(l).length>0)a.env=l;let Q0=await B("/api/mcp/servers",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)});if(!Q0.ok){let q0=await Q0.json();y(q0.error||"Failed to add server"),A(!1);return}G()}catch(a){y("Failed to add server"),A(!1)}},c=(l,a)=>{H("npm"),L(l),T(a)};return C.jsxDEV("div",{className:"fixed inset-0 bg-black/50 backdrop-blur-[2px] z-50 flex items-center justify-center p-4",children:C.jsxDEV("div",{className:"bg-[#111] border border-[#1a1a1a] rounded-lg w-full max-w-lg max-h-[90vh] overflow-y-auto",children:[C.jsxDEV("div",{className:"p-4 border-b border-[#1a1a1a] flex items-center justify-between sticky top-0 bg-[#111]",children:[C.jsxDEV("h2",{className:"text-lg font-semibold",children:"Add MCP Server"},void 0,!1,void 0,this),C.jsxDEV("button",{onClick:Y,className:"text-[#666] hover:text-[#888]",children:"✕"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),C.jsxDEV("div",{className:"p-4 space-y-4",children:[C.jsxDEV("div",{children:[C.jsxDEV("p",{className:"text-sm text-[#666] mb-2",children:"Quick add:"},void 0,!1,void 0,this),C.jsxDEV("div",{className:"flex flex-wrap gap-2",children:[{name:"filesystem",pkg:"@modelcontextprotocol/server-filesystem"},{name:"fetch",pkg:"@modelcontextprotocol/server-fetch"},{name:"memory",pkg:"@modelcontextprotocol/server-memory"},{name:"github",pkg:"@modelcontextprotocol/server-github"}].map((l)=>C.jsxDEV("button",{onClick:()=>c(l.name,l.pkg),className:"text-sm bg-[#1a1a1a] hover:bg-[#222] px-3 py-1 rounded transition",children:l.name},l.name,!1,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this),C.jsxDEV("div",{className:"flex gap-1 bg-[#0a0a0a] border border-[#222] rounded p-1",children:[C.jsxDEV("button",{onClick:()=>H("npm"),className:`flex-1 px-3 py-1.5 rounded text-sm transition ${O==="npm"?"bg-[#1a1a1a] text-white":"text-[#666] hover:text-[#888]"}`,children:"npm Package"},void 0,!1,void 0,this),C.jsxDEV("button",{onClick:()=>H("command"),className:`flex-1 px-3 py-1.5 rounded text-sm transition ${O==="command"?"bg-[#1a1a1a] text-white":"text-[#666] hover:text-[#888]"}`,children:"Custom Command"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),C.jsxDEV("div",{children:[C.jsxDEV("label",{className:"block text-sm text-[#666] mb-1",children:"Name"},void 0,!1,void 0,this),C.jsxDEV("input",{type:"text",value:W,onChange:(l)=>L(l.target.value),placeholder:"e.g., pushover",className:"w-full bg-[#0a0a0a] border border-[#333] rounded px-3 py-2 focus:outline-none focus:border-[#f97316]"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),O==="npm"&&C.jsxDEV("div",{children:[C.jsxDEV("label",{className:"block text-sm text-[#666] mb-1",children:"npm Package"},void 0,!1,void 0,this),C.jsxDEV("input",{type:"text",value:N,onChange:(l)=>d(l.target.value),placeholder:"e.g., @modelcontextprotocol/server-filesystem or paste full command",className:"w-full bg-[#0a0a0a] border border-[#333] rounded px-3 py-2 focus:outline-none focus:border-[#f97316]"},void 0,!1,void 0,this),C.jsxDEV("p",{className:"text-xs text-[#555] mt-1",children:"Package name or paste a full npx command with credentials"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),O==="command"&&C.jsxDEV("div",{children:[C.jsxDEV("label",{className:"block text-sm text-[#666] mb-1",children:"Command"},void 0,!1,void 0,this),C.jsxDEV("input",{type:"text",value:M,onChange:(l)=>j(l.target.value),placeholder:"e.g., npx -y pushover-mcp@latest start --token YOUR_TOKEN",className:"w-full bg-[#0a0a0a] border border-[#333] rounded px-3 py-2 font-mono text-sm focus:outline-none focus:border-[#f97316]"},void 0,!1,void 0,this),C.jsxDEV("p",{className:"text-xs text-[#555] mt-1",children:"Paste the full command - credentials like YOUR_TOKEN will be auto-extracted"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),C.jsxDEV("div",{children:[C.jsxDEV("div",{className:"flex items-center justify-between mb-2",children:[C.jsxDEV("label",{className:"text-sm text-[#666]",children:"Environment Variables / Credentials"},void 0,!1,void 0,this),C.jsxDEV("button",{onClick:k,className:"text-xs text-[#f97316] hover:text-[#fb923c] transition",children:"+ Add Variable"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),w.length===0&&C.jsxDEV("p",{className:"text-xs text-[#555] bg-[#0a0a0a] border border-[#222] rounded p-3",children:"Add environment variables for API tokens and credentials. These are stored encrypted and passed to the server at startup."},void 0,!1,void 0,this),w.length>0&&C.jsxDEV("div",{className:"space-y-2",children:w.map((l,a)=>C.jsxDEV("div",{className:"flex gap-2",children:[C.jsxDEV("input",{type:"text",value:l.key,onChange:(Q0)=>E(a,"key",Q0.target.value),placeholder:"KEY",className:"w-1/3 bg-[#0a0a0a] border border-[#333] rounded px-2 py-1.5 text-sm font-mono focus:outline-none focus:border-[#f97316]"},void 0,!1,void 0,this),C.jsxDEV("input",{type:"password",value:l.value,onChange:(Q0)=>E(a,"value",Q0.target.value),placeholder:"value",className:"flex-1 bg-[#0a0a0a] border border-[#333] rounded px-2 py-1.5 text-sm font-mono focus:outline-none focus:border-[#f97316]"},void 0,!1,void 0,this),C.jsxDEV("button",{onClick:()=>x(a),className:"text-[#666] hover:text-red-400 px-2 transition",children:"✕"},void 0,!1,void 0,this)]},a,!0,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this),h&&C.jsxDEV("p",{className:"text-red-400 text-sm",children:h},void 0,!1,void 0,this)]},void 0,!0,void 0,this),C.jsxDEV("div",{className:"p-4 border-t border-[#1a1a1a] flex justify-end gap-2 sticky bottom-0 bg-[#111]",children:[C.jsxDEV("button",{onClick:Y,className:"px-4 py-2 border border-[#333] hover:border-[#666] rounded transition",children:"Cancel"},void 0,!1,void 0,this),C.jsxDEV("button",{onClick:o,disabled:S||!W||(O==="npm"?!N:!M),className:"px-4 py-2 bg-[#f97316] hover:bg-[#fb923c] text-black rounded font-medium transition disabled:opacity-50",children:S?"Adding...":"Add Server"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)}var y6=J0(F1(),1);var V0=J0(J1(),1);function QO(Y){let G=Y.category==="LLM",B=Y.category==="TOOL",O=Y.level==="error",H=Y.data?.input_tokens||0,W=Y.data?.output_tokens||0;return{llm_calls:G?1:0,tool_calls:B?1:0,errors:O?1:0,input_tokens:H,output_tokens:W}}function r$(){let{events:Y}=w2(),{currentProjectId:G,currentProject:B}=W4(),{authFetch:O}=C1(),[H,W]=y6.useState(null),[L,N]=y6.useState([]),[T,M]=y6.useState([]),[F,w]=y6.useState(!0),[v,S]=y6.useState({level:"",agent_id:""}),[A,h]=y6.useState(new Set(["DATABASE"])),[y,k]=y6.useState([]),[E,x]=y6.useState(null),j=y6.useRef(new Set),[d,o]=y6.useState(new Set),c=y6.useRef(new Set);y6.useEffect(()=>{(async()=>{try{let m0=await(await O("/api/agents")).json();k(m0.agents||[])}catch(y0){console.error("Failed to fetch agents:",y0)}})()},[O]);let l=y6.useMemo(()=>{if(G===null)return y;if(G==="unassigned")return y.filter((e)=>!e.projectId);return y.filter((e)=>e.projectId===G)},[y,G]),a=y6.useMemo(()=>new Set(l.map((e)=>e.id)),[l]),Q0=async()=>{w(!0);try{let e=G==="unassigned"?"null":G||"",y0=new URLSearchParams;if(e)y0.set("project_id",e);let e0=await(await O(`/api/telemetry/stats${y0.toString()?`?${y0}`:""}`)).json();W(e0.stats);let v0=new URLSearchParams;if(v.level)v0.set("level",v.level);if(v.agent_id)v0.set("agent_id",v.agent_id);if(e)v0.set("project_id",e);v0.set("limit","100");let U0=(await(await O(`/api/telemetry/events?${v0}`)).json()).events||[];N(U0),j.current=new Set(U0.map((T6)=>T6.id));let t0=new URLSearchParams;if(t0.set("group_by","agent"),e)t0.set("project_id",e);let $6=await(await O(`/api/telemetry/usage?${t0}`)).json();M($6.usage||[])}catch(e){console.error("Failed to fetch telemetry:",e)}w(!1)};y6.useEffect(()=>{Q0();let e=setInterval(Q0,60000);return()=>clearInterval(e)},[v,G,O]);let q0=y6.useMemo(()=>{if(!H)return null;let e=0,y0=0,m0=0,e0=0,v0=0,a0=0;for(let z1 of Y)if(!j.current.has(z1.id)){e++;let U0=QO(z1);y0+=U0.llm_calls,m0+=U0.tool_calls,e0+=U0.errors,v0+=U0.input_tokens,a0+=U0.output_tokens}return{total_events:H.total_events+e,total_llm_calls:H.total_llm_calls+y0,total_tool_calls:H.total_tool_calls+m0,total_errors:H.total_errors+e0,total_input_tokens:H.total_input_tokens+v0,total_output_tokens:H.total_output_tokens+a0}},[H,Y]),Y0=y6.useMemo(()=>{let e=new Map;for(let y0 of T)e.set(y0.agent_id,{...y0});for(let y0 of Y)if(!j.current.has(y0.id)){let m0=QO(y0),e0=e.get(y0.agent_id);if(e0)e0.llm_calls+=m0.llm_calls,e0.tool_calls+=m0.tool_calls,e0.errors+=m0.errors,e0.input_tokens+=m0.input_tokens,e0.output_tokens+=m0.output_tokens;else e.set(y0.agent_id,{agent_id:y0.agent_id,llm_calls:m0.llm_calls,tool_calls:m0.tool_calls,errors:m0.errors,input_tokens:m0.input_tokens,output_tokens:m0.output_tokens})}return Array.from(e.values())},[T,Y]),L0=y6.default.useMemo(()=>{let e=Y;if(G!==null)e=e.filter((v0)=>a.has(v0.agent_id));if(v.agent_id)e=e.filter((v0)=>v0.agent_id===v.agent_id);if(A.size>0)e=e.filter((v0)=>!A.has(v0.category));if(v.level)e=e.filter((v0)=>v0.level===v.level);let y0=L;if(A.size>0)y0=y0.filter((v0)=>!A.has(v0.category));let m0=new Set(e.map((v0)=>v0.id)),e0=[...e];for(let v0 of y0)if(!m0.has(v0.id))e0.push(v0),m0.add(v0.id);return e0.sort((v0,a0)=>new Date(a0.timestamp).getTime()-new Date(v0.timestamp).getTime()),e0.slice(0,100)},[Y,L,v,A,G,a]);y6.useEffect(()=>{let e=[];for(let y0 of Y)if(!c.current.has(y0.id))c.current.add(y0.id),e.push(y0.id);if(e.length>0)o((y0)=>{let m0=new Set(y0);return e.forEach((e0)=>m0.add(e0)),m0}),setTimeout(()=>{o((y0)=>{let m0=new Set(y0);return e.forEach((e0)=>m0.delete(e0)),m0})},5000)},[Y]);let A0=(e)=>{return y.find((m0)=>m0.id===e)?.name||e},_0=(e)=>{if(e>=1e6)return(e/1e6).toFixed(1)+"M";if(e>=1000)return(e/1000).toFixed(1)+"K";return e.toString()},s0={debug:"text-[#555]",info:"text-blue-400",warn:"text-yellow-400",error:"text-red-400"},_1={LLM:"bg-purple-500/20 text-purple-400 border-purple-500/30",TOOL:"bg-blue-500/20 text-blue-400 border-blue-500/30",CHAT:"bg-green-500/20 text-green-400 border-green-500/30",ERROR:"bg-red-500/20 text-red-400 border-red-500/30",SYSTEM:"bg-gray-500/20 text-gray-400 border-gray-500/30",TASK:"bg-yellow-500/20 text-yellow-400 border-yellow-500/30",MEMORY:"bg-cyan-500/20 text-cyan-400 border-cyan-500/30",MCP:"bg-orange-500/20 text-orange-400 border-orange-500/30",DATABASE:"bg-pink-500/20 text-pink-400 border-pink-500/30"},$1=["LLM","TOOL","CHAT","TASK","MEMORY","MCP","SYSTEM","DATABASE","ERROR"],D1=(e)=>{h((y0)=>{let m0=new Set(y0);if(m0.has(e))m0.delete(e);else m0.add(e);return m0})},j0=[{value:"",label:"All Agents"},...l.map((e)=>({value:e.id,label:e.name}))],O1=[{value:"",label:"All Levels"},{value:"debug",label:"Debug"},{value:"info",label:"Info"},{value:"warn",label:"Warn"},{value:"error",label:"Error"}];return V0.jsxDEV("div",{className:"flex-1 overflow-auto p-6",children:V0.jsxDEV("div",{children:[V0.jsxDEV("div",{className:"mb-6",children:[V0.jsxDEV("div",{className:"flex items-center gap-3 mb-1",children:[B&&V0.jsxDEV("span",{className:"w-3 h-3 rounded-full",style:{backgroundColor:B.color}},void 0,!1,void 0,this),V0.jsxDEV("h1",{className:"text-2xl font-semibold",children:G===null?"Telemetry":G==="unassigned"?"Telemetry - Unassigned":`Telemetry - ${B?.name||""}`},void 0,!1,void 0,this)]},void 0,!0,void 0,this),V0.jsxDEV("p",{className:"text-[#666]",children:"Monitor agent activity, token usage, and errors."},void 0,!1,void 0,this)]},void 0,!0,void 0,this),q0&&V0.jsxDEV("div",{className:"grid grid-cols-2 md:grid-cols-3 lg:grid-cols-6 gap-4 mb-6",children:[V0.jsxDEV(y2,{label:"Events",value:_0(q0.total_events)},void 0,!1,void 0,this),V0.jsxDEV(y2,{label:"LLM Calls",value:_0(q0.total_llm_calls)},void 0,!1,void 0,this),V0.jsxDEV(y2,{label:"Tool Calls",value:_0(q0.total_tool_calls)},void 0,!1,void 0,this),V0.jsxDEV(y2,{label:"Errors",value:_0(q0.total_errors),color:"red"},void 0,!1,void 0,this),V0.jsxDEV(y2,{label:"Input Tokens",value:_0(q0.total_input_tokens)},void 0,!1,void 0,this),V0.jsxDEV(y2,{label:"Output Tokens",value:_0(q0.total_output_tokens)},void 0,!1,void 0,this)]},void 0,!0,void 0,this),Y0.length>0&&V0.jsxDEV("div",{className:"mb-6",children:[V0.jsxDEV("h2",{className:"text-lg font-medium mb-3",children:"Usage by Agent"},void 0,!1,void 0,this),V0.jsxDEV("div",{className:"bg-[#111] border border-[#1a1a1a] rounded-lg overflow-hidden",children:V0.jsxDEV("table",{className:"w-full text-sm",children:[V0.jsxDEV("thead",{children:V0.jsxDEV("tr",{className:"border-b border-[#1a1a1a] text-[#666]",children:[V0.jsxDEV("th",{className:"text-left p-3",children:"Agent"},void 0,!1,void 0,this),V0.jsxDEV("th",{className:"text-right p-3",children:"LLM Calls"},void 0,!1,void 0,this),V0.jsxDEV("th",{className:"text-right p-3",children:"Tool Calls"},void 0,!1,void 0,this),V0.jsxDEV("th",{className:"text-right p-3",children:"Input Tokens"},void 0,!1,void 0,this),V0.jsxDEV("th",{className:"text-right p-3",children:"Output Tokens"},void 0,!1,void 0,this),V0.jsxDEV("th",{className:"text-right p-3",children:"Errors"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this),V0.jsxDEV("tbody",{children:Y0.map((e)=>V0.jsxDEV("tr",{className:"border-b border-[#1a1a1a] last:border-0",children:[V0.jsxDEV("td",{className:"p-3 font-medium",children:A0(e.agent_id)},void 0,!1,void 0,this),V0.jsxDEV("td",{className:"p-3 text-right text-[#888]",children:_0(e.llm_calls)},void 0,!1,void 0,this),V0.jsxDEV("td",{className:"p-3 text-right text-[#888]",children:_0(e.tool_calls)},void 0,!1,void 0,this),V0.jsxDEV("td",{className:"p-3 text-right text-[#888]",children:_0(e.input_tokens)},void 0,!1,void 0,this),V0.jsxDEV("td",{className:"p-3 text-right text-[#888]",children:_0(e.output_tokens)},void 0,!1,void 0,this),V0.jsxDEV("td",{className:"p-3 text-right",children:e.errors>0?V0.jsxDEV("span",{className:"text-red-400",children:e.errors},void 0,!1,void 0,this):V0.jsxDEV("span",{className:"text-[#444]",children:"0"},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},e.agent_id,!0,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this),V0.jsxDEV("div",{className:"flex flex-wrap items-center gap-3 mb-4",children:[V0.jsxDEV("div",{className:"w-44",children:V0.jsxDEV(k5,{value:v.agent_id,options:j0,onChange:(e)=>S({...v,agent_id:e}),placeholder:"All Agents"},void 0,!1,void 0,this)},void 0,!1,void 0,this),V0.jsxDEV("div",{className:"flex flex-wrap items-center gap-1.5 flex-1",children:$1.map((e)=>{let y0=A.has(e),m0=_1[e]||"bg-[#222] text-[#888] border-[#333]";return V0.jsxDEV("button",{onClick:()=>D1(e),className:`px-2 py-0.5 rounded text-xs border transition-all ${y0?"bg-[#1a1a1a] text-[#555] border-[#333] opacity-50":m0}`,children:e},e,!1,void 0,this)})},void 0,!1,void 0,this),V0.jsxDEV("div",{className:"flex items-center gap-2",children:[V0.jsxDEV("div",{className:"w-36",children:V0.jsxDEV(k5,{value:v.level,options:O1,onChange:(e)=>S({...v,level:e}),placeholder:"All Levels"},void 0,!1,void 0,this)},void 0,!1,void 0,this),V0.jsxDEV("button",{onClick:Q0,className:"px-3 py-2 bg-[#1a1a1a] hover:bg-[#222] border border-[#333] rounded text-sm transition",children:"Refresh"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),V0.jsxDEV("div",{className:"bg-[#111] border border-[#1a1a1a] rounded-lg",children:[V0.jsxDEV("div",{className:"p-3 border-b border-[#1a1a1a] flex items-center justify-between",children:[V0.jsxDEV("h2",{className:"font-medium",children:"Recent Events"},void 0,!1,void 0,this),Y.length>0&&V0.jsxDEV("span",{className:"text-xs text-[#666]",children:[Y.length," new"]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),F&&L0.length===0?V0.jsxDEV("div",{className:"p-8 text-center text-[#666]",children:"Loading..."},void 0,!1,void 0,this):L0.length===0?V0.jsxDEV("div",{className:"p-8 text-center text-[#666]",children:"No telemetry events yet. Events will appear here in real-time once agents start sending data."},void 0,!1,void 0,this):V0.jsxDEV("div",{className:"divide-y divide-[#1a1a1a]",children:L0.map((e)=>{let y0=d.has(e.id);return V0.jsxDEV("div",{className:`p-3 hover:bg-[#0a0a0a] cursor-pointer transition-all duration-500 ${y0?"bg-green-500/5":""}`,style:{animation:y0?"slideIn 0.3s ease-out":void 0},onClick:()=>x(E===e.id?null:e.id),children:V0.jsxDEV("div",{className:"flex items-start gap-3",children:[V0.jsxDEV("span",{className:`px-2 py-0.5 rounded text-xs border transition-colors duration-300 ${_1[e.category]||"bg-[#222] text-[#888] border-[#333]"}`,children:e.category},void 0,!1,void 0,this),V0.jsxDEV("div",{className:"flex-1 min-w-0",children:[V0.jsxDEV("div",{className:"flex items-center gap-2",children:[V0.jsxDEV("span",{className:"font-medium text-sm",children:e.type},void 0,!1,void 0,this),V0.jsxDEV("span",{className:`text-xs ${s0[e.level]||"text-[#666]"}`,children:e.level},void 0,!1,void 0,this),e.duration_ms&&V0.jsxDEV("span",{className:"text-xs text-[#555]",children:[e.duration_ms,"ms"]},void 0,!0,void 0,this),V0.jsxDEV("span",{className:`w-1.5 h-1.5 rounded-full bg-green-400 transition-opacity duration-1000 ${y0?"opacity-100":"opacity-0"}`},void 0,!1,void 0,this)]},void 0,!0,void 0,this),V0.jsxDEV("div",{className:"text-xs text-[#555] mt-1",children:[A0(e.agent_id)," · ",new Date(e.timestamp).toLocaleString()]},void 0,!0,void 0,this),e.error&&V0.jsxDEV("div",{className:"text-xs text-red-400 mt-1 font-mono",children:e.error},void 0,!1,void 0,this),E===e.id&&e.data&&Object.keys(e.data).length>0&&V0.jsxDEV("pre",{className:"text-xs text-[#666] mt-2 p-2 bg-[#0a0a0a] rounded overflow-x-auto",children:JSON.stringify(e.data,null,2)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)},e.id,!1,void 0,this)})},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)}function y2({label:Y,value:G,color:B}){return V0.jsxDEV("div",{className:"bg-[#111] border border-[#1a1a1a] rounded-lg p-4",children:[V0.jsxDEV("div",{className:"text-[#666] text-xs mb-1",children:Y},void 0,!1,void 0,this),V0.jsxDEV("div",{className:`text-2xl font-semibold ${B==="red"?"text-red-400":""}`,children:G},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}var A7=J0(F1(),1);var D0=J0(J1(),1),gk={get:"#61affe",post:"#49cc90",put:"#fca130",delete:"#f93e3e",patch:"#50e3c2"};function XO(){let{authFetch:Y}=C1(),[G,B]=A7.useState(null),[O,H]=A7.useState(!0),[W,L]=A7.useState(new Set),[N,T]=A7.useState(null),[M,F]=A7.useState(!1);A7.useEffect(()=>{S()},[]);async function w(){if(!G)return;try{await navigator.clipboard.writeText(JSON.stringify(G,null,2)),F(!0),setTimeout(()=>F(!1),2000)}catch(d){console.error("Failed to copy:",d)}}function v(){if(!G)return;let d=new Blob([JSON.stringify(G,null,2)],{type:"application/json"}),o=URL.createObjectURL(d),c=document.createElement("a");c.href=o,c.download="apteva-openapi.json",c.click(),URL.revokeObjectURL(o)}async function S(){try{let d=await Y("/api/openapi");if(d.ok){let o=await d.json();B(o)}}catch(d){console.error("Failed to load OpenAPI spec:",d)}finally{H(!1)}}function A(d){L((o)=>{let c=new Set(o);if(c.has(d))c.delete(d);else c.add(d);return c})}function h(d,o=0){if(!d)return"{}";if(o>2)return"...";if(d.$ref)return d.$ref.split("/").pop()||"Object";if(d.type==="array")return`${h(d.items,o+1)}[]`;if(d.type==="object"&&d.properties){let c=Object.entries(d.properties).slice(0,3).map(([a,Q0])=>`${a}: ${Q0.type||"any"}`).join(", "),l=Object.keys(d.properties).length>3?", ...":"";return`{ ${c}${l} }`}return d.type||"any"}if(O)return D0.jsxDEV("div",{style:{padding:24},children:D0.jsxDEV("p",{style:{color:"#888"},children:"Loading API documentation..."},void 0,!1,void 0,this)},void 0,!1,void 0,this);if(!G)return D0.jsxDEV("div",{style:{padding:24},children:D0.jsxDEV("p",{style:{color:"#f66"},children:"Failed to load API documentation"},void 0,!1,void 0,this)},void 0,!1,void 0,this);let y=G.tags||[],k=Object.entries(G.paths);function E(d){let o=new Set;function c(l){if(!l)return;if(typeof l==="object"){if(l.$ref){let a=l.$ref.split("/").pop();if(a)o.add(a)}for(let a of Object.values(l))c(a)}}return c(d.requestBody),c(d.responses),o}function x(){if(!N||!G.components?.schemas)return Object.keys(G.components?.schemas||{});let d=new Set;for(let[o,c]of j)for(let[l,a]of Object.entries(c)){if(!["get","post","put","delete","patch"].includes(l))continue;if(a.tags?.includes(N))E(a).forEach((q0)=>d.add(q0))}return Array.from(d)}let j=N?k.filter(([d,o])=>Object.values(o).some((c)=>c.tags?.includes(N))):k;return D0.jsxDEV("div",{style:{padding:24,maxWidth:1000,height:"100%",overflowY:"auto"},children:[D0.jsxDEV("div",{style:{marginBottom:24},children:[D0.jsxDEV("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"flex-start",marginBottom:8},children:[D0.jsxDEV("h1",{style:{fontSize:24,fontWeight:600},children:G.info.title},void 0,!1,void 0,this),D0.jsxDEV("div",{style:{display:"flex",gap:8},children:[D0.jsxDEV("button",{onClick:w,style:{padding:"8px 16px",borderRadius:4,border:"1px solid #333",background:M?"#49cc90":"#1a1a2e",color:M?"#000":"#fff",cursor:"pointer",fontSize:12,fontFamily:"inherit"},children:M?"Copied!":"Copy JSON"},void 0,!1,void 0,this),D0.jsxDEV("button",{onClick:v,style:{padding:"8px 16px",borderRadius:4,border:"1px solid #333",background:"#1a1a2e",color:"#fff",cursor:"pointer",fontSize:12,fontFamily:"inherit"},children:"Download"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),D0.jsxDEV("p",{style:{color:"#888",marginBottom:8},children:G.info.description.split(`
216
- `)[0]},void 0,!1,void 0,this),D0.jsxDEV("p",{style:{color:"#666",fontSize:12},children:["Version: ",G.info.version]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),D0.jsxDEV("div",{style:{background:"#1a1a2e",padding:12,borderRadius:6,marginBottom:24,fontFamily:"monospace"},children:[D0.jsxDEV("span",{style:{color:"#888"},children:"Base URL: "},void 0,!1,void 0,this),D0.jsxDEV("span",{style:{color:"#61affe"},children:[window.location.origin,"/api"]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),D0.jsxDEV("div",{style:{marginBottom:24,display:"flex",flexWrap:"wrap",gap:8},children:[D0.jsxDEV("button",{onClick:()=>T(null),style:{padding:"6px 12px",borderRadius:4,border:"1px solid #333",background:N===null?"#333":"transparent",color:N===null?"#fff":"#888",cursor:"pointer",fontSize:12},children:"All"},void 0,!1,void 0,this),y.map((d)=>D0.jsxDEV("button",{onClick:()=>T(d.name),style:{padding:"6px 12px",borderRadius:4,border:"1px solid #333",background:N===d.name?"#333":"transparent",color:N===d.name?"#fff":"#888",cursor:"pointer",fontSize:12},title:d.description,children:d.name},d.name,!1,void 0,this))]},void 0,!0,void 0,this),D0.jsxDEV("div",{style:{display:"flex",flexDirection:"column",gap:8},children:j.map(([d,o])=>Object.entries(o).filter(([c])=>["get","post","put","delete","patch"].includes(c)).map(([c,l])=>{let a=`${c}:${d}`,Q0=W.has(a),q0=c.toUpperCase(),Y0=gk[c]||"#888";return D0.jsxDEV("div",{style:{border:"1px solid #333",borderRadius:6,overflow:"hidden"},children:[D0.jsxDEV("div",{onClick:()=>A(a),style:{display:"flex",alignItems:"center",gap:12,padding:"12px 16px",background:Q0?"#1a1a2e":"transparent",cursor:"pointer"},children:[D0.jsxDEV("span",{style:{background:Y0,color:"#000",padding:"4px 8px",borderRadius:4,fontSize:11,fontWeight:600,minWidth:60,textAlign:"center"},children:q0},void 0,!1,void 0,this),D0.jsxDEV("span",{style:{fontFamily:"monospace",color:"#fff"},children:d},void 0,!1,void 0,this),D0.jsxDEV("span",{style:{color:"#888",flex:1,fontSize:13},children:l.summary},void 0,!1,void 0,this),D0.jsxDEV("span",{style:{color:"#666",fontSize:12},children:Q0?"[-]":"[+]"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),Q0&&D0.jsxDEV("div",{style:{padding:16,background:"#0d0d1a",borderTop:"1px solid #333"},children:[l.description&&D0.jsxDEV("p",{style:{color:"#888",marginBottom:16,fontSize:13},children:l.description},void 0,!1,void 0,this),l.parameters&&l.parameters.length>0&&D0.jsxDEV("div",{style:{marginBottom:16},children:[D0.jsxDEV("h4",{style:{fontSize:13,color:"#888",marginBottom:8},children:"Parameters"},void 0,!1,void 0,this),D0.jsxDEV("div",{style:{background:"#1a1a2e",borderRadius:4,padding:12},children:l.parameters.map((L0)=>D0.jsxDEV("div",{style:{display:"flex",gap:12,marginBottom:8,fontSize:12},children:[D0.jsxDEV("span",{style:{color:"#61affe",minWidth:100},children:[L0.name,L0.required&&D0.jsxDEV("span",{style:{color:"#f66"},children:"*"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),D0.jsxDEV("span",{style:{color:"#666"},children:["(",L0.in,")"]},void 0,!0,void 0,this),D0.jsxDEV("span",{style:{color:"#888"},children:L0.schema?.type||"string"},void 0,!1,void 0,this),L0.description&&D0.jsxDEV("span",{style:{color:"#666"},children:["- ",L0.description]},void 0,!0,void 0,this)]},L0.name,!0,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this),l.requestBody&&D0.jsxDEV("div",{style:{marginBottom:16},children:[D0.jsxDEV("h4",{style:{fontSize:13,color:"#888",marginBottom:8},children:["Request Body",l.requestBody.required&&D0.jsxDEV("span",{style:{color:"#f66"},children:" (required)"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),D0.jsxDEV("div",{style:{background:"#1a1a2e",borderRadius:4,padding:12,fontFamily:"monospace",fontSize:12,color:"#49cc90"},children:Object.entries(l.requestBody.content||{}).map(([L0,A0])=>D0.jsxDEV("div",{children:[D0.jsxDEV("span",{style:{color:"#666"},children:[L0,": "]},void 0,!0,void 0,this),h(A0.schema)]},L0,!0,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this),l.responses&&D0.jsxDEV("div",{children:[D0.jsxDEV("h4",{style:{fontSize:13,color:"#888",marginBottom:8},children:"Responses"},void 0,!1,void 0,this),D0.jsxDEV("div",{style:{background:"#1a1a2e",borderRadius:4,padding:12},children:Object.entries(l.responses).map(([L0,A0])=>{let _0=A0.content?.["application/json"]?.schema,s0=_0?.$ref?.split("/").pop(),_1=_0?.type,$1=_0?.items?.$ref?.split("/").pop();return D0.jsxDEV("div",{style:{marginBottom:12,fontSize:12},children:[D0.jsxDEV("div",{style:{display:"flex",gap:12,marginBottom:4},children:[D0.jsxDEV("span",{style:{color:L0.startsWith("2")?"#49cc90":"#f66",minWidth:40},children:L0},void 0,!1,void 0,this),D0.jsxDEV("span",{style:{color:"#888"},children:A0.description},void 0,!1,void 0,this)]},void 0,!0,void 0,this),_0&&D0.jsxDEV("div",{style:{marginLeft:52,padding:"8px 12px",background:"#0d0d1a",borderRadius:4,fontFamily:"monospace"},children:s0?D0.jsxDEV("span",{style:{color:"#61affe"},children:s0},void 0,!1,void 0,this):_1==="array"&&$1?D0.jsxDEV("span",{style:{color:"#61affe"},children:[$1,"[]"]},void 0,!0,void 0,this):_1==="array"?D0.jsxDEV("span",{style:{color:"#888"},children:"array"},void 0,!1,void 0,this):D0.jsxDEV("span",{style:{color:"#888"},children:h(_0)},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},L0,!0,void 0,this)})},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},a,!0,void 0,this)}))},void 0,!1,void 0,this),G.components?.schemas&&x().length>0&&D0.jsxDEV("div",{style:{marginTop:32},children:[D0.jsxDEV("h2",{style:{fontSize:18,fontWeight:600,marginBottom:16},children:["Schemas ",N&&D0.jsxDEV("span",{style:{color:"#666",fontSize:14},children:["(",N,")"]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),D0.jsxDEV("div",{style:{display:"flex",flexDirection:"column",gap:8},children:x().map((d)=>{let o=G.components.schemas[d];if(!o)return null;return D0.jsxDEV("div",{style:{border:"1px solid #333",borderRadius:6,padding:12},children:[D0.jsxDEV("h3",{style:{fontSize:14,color:"#61affe",marginBottom:8},children:d},void 0,!1,void 0,this),o.properties&&D0.jsxDEV("div",{style:{fontSize:12},children:Object.entries(o.properties).map(([c,l])=>D0.jsxDEV("div",{style:{display:"flex",gap:8,marginBottom:4,fontFamily:"monospace"},children:[D0.jsxDEV("span",{style:{color:"#fff",minWidth:120},children:c},void 0,!1,void 0,this),D0.jsxDEV("span",{style:{color:"#888"},children:[l.type||(l.$ref?l.$ref.split("/").pop():"any"),l.nullable&&" | null"]},void 0,!0,void 0,this),l.enum&&D0.jsxDEV("span",{style:{color:"#666"},children:["[",l.enum.join(" | "),"]"]},void 0,!0,void 0,this)]},c,!0,void 0,this))},void 0,!1,void 0,this)]},d,!0,void 0,this)})},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}var I6=J0(J1(),1);function Ek(){let{isAuthenticated:Y,isLoading:G,hasUsers:B,accessToken:O,checkAuth:H}=C1(),{refreshProjects:W}=W4(),{isComplete:L,setIsComplete:N}=h$(),T=()=>{return O?{Authorization:`Bearer ${O}`}:{}},M=Y&&L===!0,{agents:F,loading:w,runningCount:v,fetchAgents:S,createAgent:A,updateAgent:h,deleteAgent:y,toggleAgent:k}=S$(M),{providers:E,configuredProviders:x,fetchProviders:j}=C$(M),[d,o]=S5.useState(!1),[c,l]=S5.useState(null),[a,Q0]=S5.useState("dashboard"),[q0,Y0]=S5.useState(null),[L0,A0]=S5.useState(0),[_0,s0]=S5.useState(!1);S5.useEffect(()=>{if(!M)return;let v0=async()=>{try{let z1=await fetch("/api/tasks?status=pending",{headers:T()});if(z1.ok){let U0=await z1.json();A0(U0.count||0)}}catch{}};v0();let a0=setInterval(v0,15000);return()=>clearInterval(a0)},[M,O]);let[_1,$1]=S5.useState({name:"",model:"",provider:"",systemPrompt:"You are a helpful assistant.",features:{...v$}});S5.useEffect(()=>{if(x.length>0&&!_1.provider){let v0=x[0],a0=v0.models.find((z1)=>z1.recommended)?.value||v0.models[0]?.value||"";$1((z1)=>({...z1,provider:v0.id,model:a0}))}},[x,_1.provider]),S5.useEffect(()=>{if(c){let v0=F.find((a0)=>a0.id===c.id);if(v0)l(v0);else l(null)}},[F,c]);let D1=(v0)=>{let a0=E.find((U0)=>U0.id===v0),z1=a0?.models.find((U0)=>U0.recommended)?.value||a0?.models[0]?.value||"";$1((U0)=>({...U0,provider:v0,model:z1}))},j0=async()=>{if(!_1.name)return;await A(_1),await W();let v0=x[0],a0=v0?.models.find((z1)=>z1.recommended)?.value||v0?.models[0]?.value||"";$1({name:"",model:a0,provider:v0?.id||"",systemPrompt:"You are a helpful assistant.",features:{...v$}}),o(!1)},O1=async(v0,a0)=>{a0?.stopPropagation(),Y0(null);let z1=await k(v0);if(z1.error)Y0(z1.error)},e=async(v0,a0)=>{if(a0?.stopPropagation(),c?.id===v0)l(null);await y(v0),await W()},y0=(v0)=>{l(v0),Y0(null),Q0("agents")},m0=(v0)=>{Q0(v0),l(null)},e0=()=>{N(!0),j(),H()};if(G||B===null)return I6.jsxDEV(q3,{fullScreen:!0},void 0,!1,void 0,this);if(!B)return I6.jsxDEV(Tz,{onComplete:e0,needsAccount:!0},void 0,!1,void 0,this);if(!Y)return I6.jsxDEV(ZZ,{},void 0,!1,void 0,this);if(L===null)return I6.jsxDEV(q3,{fullScreen:!0},void 0,!1,void 0,this);if(!L)return I6.jsxDEV(Tz,{onComplete:e0,needsAccount:!1},void 0,!1,void 0,this);return I6.jsxDEV("div",{className:"h-screen bg-[#0a0a0a] text-[#e0e0e0] font-mono flex flex-col overflow-hidden",children:[I6.jsxDEV(zZ,{onMenuClick:()=>s0(!0)},void 0,!1,void 0,this),q0&&I6.jsxDEV(XZ,{message:q0,onDismiss:()=>Y0(null)},void 0,!1,void 0,this),I6.jsxDEV("div",{className:"flex flex-1 overflow-hidden",children:[I6.jsxDEV(QZ,{route:a,agentCount:F.length,taskCount:L0,onNavigate:m0,isOpen:_0,onClose:()=>s0(!1)},void 0,!1,void 0,this),I6.jsxDEV("main",{className:"flex-1 overflow-hidden flex",children:[a==="settings"&&I6.jsxDEV(YZ,{},void 0,!1,void 0,this),a==="agents"&&I6.jsxDEV(BZ,{agents:F,loading:w,selectedAgent:c,providers:E,onSelectAgent:y0,onCloseAgent:()=>l(null),onToggleAgent:O1,onDeleteAgent:e,onUpdateAgent:h,onNewAgent:()=>o(!0),canCreateAgent:x.length>0},void 0,!1,void 0,this),a==="dashboard"&&I6.jsxDEV(OZ,{agents:F,loading:w,runningCount:v,configuredProviders:x,onNavigate:m0,onSelectAgent:y0},void 0,!1,void 0,this),a==="tasks"&&I6.jsxDEV(LZ,{},void 0,!1,void 0,this),a==="mcp"&&I6.jsxDEV(NZ,{},void 0,!1,void 0,this),a==="telemetry"&&I6.jsxDEV(r$,{},void 0,!1,void 0,this),a==="api"&&I6.jsxDEV(XO,{},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),d&&I6.jsxDEV(HZ,{form:_1,providers:E,configuredProviders:x,onFormChange:$1,onProviderChange:D1,onCreate:j0,onClose:()=>o(!1),onGoToSettings:()=>{o(!1),Q0("settings")}},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}function lk(){return I6.jsxDEV(I$,{children:I6.jsxDEV(f$,{children:I6.jsxDEV(A$,{children:I6.jsxDEV(Ek,{},void 0,!1,void 0,this)},void 0,!1,void 0,this)},void 0,!1,void 0,this)},void 0,!1,void 0,this)}var dk=ZO.createRoot(document.getElementById("root"));dk.render(I6.jsxDEV(lk,{},void 0,!1,void 0,this));
217
-
218
- //# debugId=F75C338DB0185F8664756E2164756E21