apteva 0.4.1 → 0.4.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/App.mbp9atpm.js +227 -0
- package/dist/index.html +1 -1
- package/dist/styles.css +1 -1
- package/package.json +1 -1
- package/src/web/components/mcp/McpPage.tsx +93 -3
- package/src/web/components/tasks/TasksPage.tsx +294 -69
- package/src/web/types.ts +10 -0
- package/dist/App.e10kd3t7.js +0 -227
package/dist/App.e10kd3t7.js
DELETED
|
@@ -1,227 +0,0 @@
|
|
|
1
|
-
var EP=Object.create;var{getPrototypeOf:mP,defineProperty:OW,getOwnPropertyNames:uP}=Object;var gP=Object.prototype.hasOwnProperty;var q0=(Y,G,U)=>{U=Y!=null?EP(mP(Y)):{};let O=G||!Y||!Y.__esModule?OW(U,"default",{value:Y,enumerable:!0}):U;for(let q of uP(Y))if(!gP.call(O,q))OW(O,q,{get:()=>Y[q],enumerable:!0});return O};var Oz=(Y,G)=>()=>(G||Y((G={exports:{}}).exports,G),G.exports);var k1=Oz((xP,Z3)=>{(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"),U=Symbol.for("react.portal"),O=Symbol.for("react.fragment"),q=Symbol.for("react.strict_mode"),R=Symbol.for("react.profiler"),L=Symbol.for("react.provider"),_=Symbol.for("react.context"),T=Symbol.for("react.forward_ref"),I=Symbol.for("react.suspense"),F=Symbol.for("react.suspense_list"),N=Symbol.for("react.memo"),w=Symbol.for("react.lazy"),k=Symbol.for("react.offscreen"),v=Symbol.iterator,E="@@iterator";function D(W){if(W===null||typeof W!=="object")return null;var y=v&&W[v]||W[E];if(typeof y==="function")return y;return null}var C={current:null},V={transition:null},m={current:null,isBatchingLegacy:!1,didScheduleLegacyUpdate:!1},a={current:null},c={},u=null;function Q0(W){u=W}c.setExtraStackFrame=function(W){u=W},c.getCurrentStack=null,c.getStackAddendum=function(){var W="";if(u)W+=u;var y=c.getCurrentStack;if(y)W+=y()||"";return W};var o=!1,t=!1,l=!1,p=!1,i=!1,Z0={ReactCurrentDispatcher:C,ReactCurrentBatchConfig:V,ReactCurrentOwner:a};Z0.ReactDebugCurrentFrame=c,Z0.ReactCurrentActQueue=m;function I0(W){{for(var y=arguments.length,s=Array(y>1?y-1:0),$0=1;$0<y;$0++)s[$0-1]=arguments[$0];Q1("warn",W,s)}}function F0(W){{for(var y=arguments.length,s=Array(y>1?y-1:0),$0=1;$0<y;$0++)s[$0-1]=arguments[$0];Q1("error",W,s)}}function Q1(W,y,s){{var $0=Z0.ReactDebugCurrentFrame,A0=$0.getStackAddendum();if(A0!=="")y+="%s",s=s.concat([A0]);var q1=s.map(function(d0){return String(d0)});q1.unshift("Warning: "+y),Function.prototype.apply.call(console[W],console,q1)}}var W1={};function X0(W,y){{var s=W.constructor,$0=s&&(s.displayName||s.name)||"ReactClass",A0=$0+"."+y;if(W1[A0])return;F0("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.",y,$0),W1[A0]=!0}}var U0={isMounted:function(W){return!1},enqueueForceUpdate:function(W,y,s){X0(W,"forceUpdate")},enqueueReplaceState:function(W,y,s,$0){X0(W,"replaceState")},enqueueSetState:function(W,y,s,$0){X0(W,"setState")}},_0=Object.assign,J0={};Object.freeze(J0);function d(W,y,s){this.props=W,this.context=y,this.refs=J0,this.updater=s||U0}d.prototype.isReactComponent={},d.prototype.setState=function(W,y){if(typeof W!=="object"&&typeof W!=="function"&&W!=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,W,y,"setState")},d.prototype.forceUpdate=function(W){this.updater.enqueueForceUpdate(this,W,"forceUpdate")};{var P0={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)."]},v0=function(W,y){Object.defineProperty(d.prototype,W,{get:function(){I0("%s(...) is deprecated in plain JavaScript React classes. %s",y[0],y[1]);return}})};for(var X1 in P0)if(P0.hasOwnProperty(X1))v0(X1,P0[X1])}function r0(){}r0.prototype=d.prototype;function V0(W,y,s){this.props=W,this.context=y,this.refs=J0,this.updater=s||U0}var H1=V0.prototype=new r0;H1.constructor=V0,_0(H1,d.prototype),H1.isPureReactComponent=!0;function L0(){var W={current:null};return Object.seal(W),W}var a0=Array.isArray;function f1(W){return a0(W)}function q4(W){{var y=typeof Symbol==="function"&&Symbol.toStringTag,s=y&&W[Symbol.toStringTag]||W.constructor.name||"Object";return s}}function h4(W){try{return x1(W),!1}catch(y){return!0}}function x1(W){return""+W}function K1(W){if(h4(W))return F0("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",q4(W)),x1(W)}function r4(W,y,s){var $0=W.displayName;if($0)return $0;var A0=y.displayName||y.name||"";return A0!==""?s+"("+A0+")":s}function o4(W){return W.displayName||"Context"}function k4(W){if(W==null)return null;if(typeof W.tag==="number")F0("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue.");if(typeof W==="function")return W.displayName||W.name||null;if(typeof W==="string")return W;switch(W){case O:return"Fragment";case U:return"Portal";case R:return"Profiler";case q:return"StrictMode";case I:return"Suspense";case F:return"SuspenseList"}if(typeof W==="object")switch(W.$$typeof){case _:var y=W;return o4(y)+".Consumer";case L:var s=W;return o4(s._context)+".Provider";case T:return r4(W,W.render,"ForwardRef");case N:var $0=W.displayName||null;if($0!==null)return $0;return k4(W.type)||"Memo";case w:{var A0=W,q1=A0._payload,d0=A0._init;try{return k4(d0(q1))}catch(O1){return null}}}return null}var y4=Object.prototype.hasOwnProperty,D6={key:!0,ref:!0,__self:!0,__source:!0},O4,F5,L4;L4={};function M5(W){if(y4.call(W,"ref")){var y=Object.getOwnPropertyDescriptor(W,"ref").get;if(y&&y.isReactWarning)return!1}return W.ref!==void 0}function M4(W){if(y4.call(W,"key")){var y=Object.getOwnPropertyDescriptor(W,"key").get;if(y&&y.isReactWarning)return!1}return W.key!==void 0}function T4(W,y){var s=function(){if(!O4)O4=!0,F0("%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)",y)};s.isReactWarning=!0,Object.defineProperty(W,"key",{get:s,configurable:!0})}function O5(W,y){var s=function(){if(!F5)F5=!0,F0("%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)",y)};s.isReactWarning=!0,Object.defineProperty(W,"ref",{get:s,configurable:!0})}function E5(W){if(typeof W.ref==="string"&&a.current&&W.__self&&a.current.stateNode!==W.__self){var y=k4(a.current.type);if(!L4[y])F0('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',y,W.ref),L4[y]=!0}}var j4=function(W,y,s,$0,A0,q1,d0){var O1={$$typeof:G,type:W,key:y,ref:s,props:d0,_owner:q1};if(O1._store={},Object.defineProperty(O1._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(O1,"_self",{configurable:!1,enumerable:!1,writable:!1,value:$0}),Object.defineProperty(O1,"_source",{configurable:!1,enumerable:!1,writable:!1,value:A0}),Object.freeze)Object.freeze(O1.props),Object.freeze(O1);return O1};function t4(W,y,s){var $0,A0={},q1=null,d0=null,O1=null,m1=null;if(y!=null){if(M5(y))d0=y.ref,E5(y);if(M4(y))K1(y.key),q1=""+y.key;O1=y.__self===void 0?null:y.__self,m1=y.__source===void 0?null:y.__source;for($0 in y)if(y4.call(y,$0)&&!D6.hasOwnProperty($0))A0[$0]=y[$0]}var X4=arguments.length-2;if(X4===1)A0.children=s;else if(X4>1){var _4=Array(X4);for(var R4=0;R4<X4;R4++)_4[R4]=arguments[R4+2];if(Object.freeze)Object.freeze(_4);A0.children=_4}if(W&&W.defaultProps){var C4=W.defaultProps;for($0 in C4)if(A0[$0]===void 0)A0[$0]=C4[$0]}if(q1||d0){var p4=typeof W==="function"?W.displayName||W.name||"Unknown":W;if(q1)T4(A0,p4);if(d0)O5(A0,p4)}return j4(W,q1,d0,O1,m1,a.current,A0)}function T0(W,y){var s=j4(W.type,y,W.ref,W._self,W._source,W._owner,W.props);return s}function t0(W,y,s){if(W===null||W===void 0)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+W+".");var $0,A0=_0({},W.props),q1=W.key,d0=W.ref,O1=W._self,m1=W._source,X4=W._owner;if(y!=null){if(M5(y))d0=y.ref,X4=a.current;if(M4(y))K1(y.key),q1=""+y.key;var _4;if(W.type&&W.type.defaultProps)_4=W.type.defaultProps;for($0 in y)if(y4.call(y,$0)&&!D6.hasOwnProperty($0))if(y[$0]===void 0&&_4!==void 0)A0[$0]=_4[$0];else A0[$0]=y[$0]}var R4=arguments.length-2;if(R4===1)A0.children=s;else if(R4>1){var C4=Array(R4);for(var p4=0;p4<R4;p4++)C4[p4]=arguments[p4+2];A0.children=C4}return j4(W.type,q1,d0,O1,m1,X4,A0)}function Y1(W){return typeof W==="object"&&W!==null&&W.$$typeof===G}var j1=".",s1=":";function V4(W){var y=/[=:]/g,s={"=":"=0",":":"=2"},$0=W.replace(y,function(A0){return s[A0]});return"$"+$0}var H4=!1,a4=/\/+/g;function F1(W){return W.replace(a4,"$&/")}function N1(W,y){if(typeof W==="object"&&W!==null&&W.key!=null)return K1(W.key),V4(""+W.key);return y.toString(36)}function d5(W,y,s,$0,A0){var q1=typeof W;if(q1==="undefined"||q1==="boolean")W=null;var d0=!1;if(W===null)d0=!0;else switch(q1){case"string":case"number":d0=!0;break;case"object":switch(W.$$typeof){case G:case U:d0=!0}}if(d0){var O1=W,m1=A0(O1),X4=$0===""?j1+N1(O1,0):$0;if(f1(m1)){var _4="";if(X4!=null)_4=F1(X4)+"/";d5(m1,y,_4,"",function(v3){return v3})}else if(m1!=null){if(Y1(m1)){if(m1.key&&(!O1||O1.key!==m1.key))K1(m1.key);m1=T0(m1,s+(m1.key&&(!O1||O1.key!==m1.key)?F1(""+m1.key)+"/":"")+X4)}y.push(m1)}return 1}var R4,C4,p4=0,o1=$0===""?j1:$0+s1;if(f1(W))for(var m8=0;m8<W.length;m8++)R4=W[m8],C4=o1+N1(R4,m8),p4+=d5(R4,y,s,C4,A0);else{var fz=D(W);if(typeof fz==="function"){var tQ=W;if(fz===tQ.entries){if(!H4)I0("Using Maps as children is not supported. Use an array of keyed ReactElements instead.");H4=!0}var C3=fz.call(tQ),M7,sQ=0;while(!(M7=C3.next()).done)R4=M7.value,C4=o1+N1(R4,sQ++),p4+=d5(R4,y,s,C4,A0)}else if(q1==="object"){var eQ=String(W);throw Error("Objects are not valid as a React child (found: "+(eQ==="[object Object]"?"object with keys {"+Object.keys(W).join(", ")+"}":eQ)+"). If you meant to render a collection of children, use an array instead.")}}return p4}function L5(W,y,s){if(W==null)return W;var $0=[],A0=0;return d5(W,$0,"","",function(q1){return y.call(s,q1,A0++)}),$0}function l5(W){var y=0;return L5(W,function(){y++}),y}function Q7(W,y,s){L5(W,function(){y.apply(this,arguments)},s)}function E6(W){return L5(W,function(y){return y})||[]}function X7(W){if(!Y1(W))throw Error("React.Children.only expected to receive a single React element child.");return W}function F6(W){var y={$$typeof:_,_currentValue:W,_currentValue2:W,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null};y.Provider={$$typeof:L,_context:y};var s=!1,$0=!1,A0=!1;{var q1={$$typeof:_,_context:y};Object.defineProperties(q1,{Provider:{get:function(){if(!$0)$0=!0,F0("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 y.Provider},set:function(d0){y.Provider=d0}},_currentValue:{get:function(){return y._currentValue},set:function(d0){y._currentValue=d0}},_currentValue2:{get:function(){return y._currentValue2},set:function(d0){y._currentValue2=d0}},_threadCount:{get:function(){return y._threadCount},set:function(d0){y._threadCount=d0}},Consumer:{get:function(){if(!s)s=!0,F0("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 y.Consumer}},displayName:{get:function(){return y.displayName},set:function(d0){if(!A0)I0("Setting `displayName` on Context.Consumer has no effect. You should set it directly on the context with Context.displayName = '%s'.",d0),A0=!0}}}),y.Consumer=q1}return y._currentRenderer=null,y._currentRenderer2=null,y}var m5=-1,m6=0,V1=1,e1=2;function B4(W){if(W._status===m5){var y=W._result,s=y();if(s.then(function(q1){if(W._status===m6||W._status===m5){var d0=W;d0._status=V1,d0._result=q1}},function(q1){if(W._status===m6||W._status===m5){var d0=W;d0._status=e1,d0._result=q1}}),W._status===m5){var $0=W;$0._status=m6,$0._result=s}}if(W._status===V1){var A0=W._result;if(A0===void 0)F0(`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?`,A0);if(!("default"in A0))F0(`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'))`,A0);return A0.default}else throw W._result}function d1(W){var y={_status:m5,_result:W},s={$$typeof:w,_payload:y,_init:B4};{var $0,A0;Object.defineProperties(s,{defaultProps:{configurable:!0,get:function(){return $0},set:function(q1){F0("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."),$0=q1,Object.defineProperty(s,"defaultProps",{enumerable:!0})}},propTypes:{configurable:!0,get:function(){return A0},set:function(q1){F0("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."),A0=q1,Object.defineProperty(s,"propTypes",{enumerable:!0})}}})}return s}function f(W){{if(W!=null&&W.$$typeof===N)F0("forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...)).");else if(typeof W!=="function")F0("forwardRef requires a render function but was given %s.",W===null?"null":typeof W);else if(W.length!==0&&W.length!==2)F0("forwardRef render functions accept exactly two parameters: props and ref. %s",W.length===1?"Did you forget to use the ref parameter?":"Any additional parameter will be undefined.");if(W!=null){if(W.defaultProps!=null||W.propTypes!=null)F0("forwardRef render functions do not support propTypes or defaultProps. Did you accidentally pass a React component?")}}var y={$$typeof:T,render:W};{var s;Object.defineProperty(y,"displayName",{enumerable:!1,configurable:!0,get:function(){return s},set:function($0){if(s=$0,!W.name&&!W.displayName)W.displayName=$0}})}return y}var H0=Symbol.for("react.module.reference");function R0(W){if(typeof W==="string"||typeof W==="function")return!0;if(W===O||W===R||i||W===q||W===I||W===F||p||W===k||o||t||l)return!0;if(typeof W==="object"&&W!==null){if(W.$$typeof===w||W.$$typeof===N||W.$$typeof===L||W.$$typeof===_||W.$$typeof===T||W.$$typeof===H0||W.getModuleId!==void 0)return!0}return!1}function A(W,y){if(!R0(W))F0("memo: The first argument must be a component. Instead received: %s",W===null?"null":typeof W);var s={$$typeof:N,type:W,compare:y===void 0?null:y};{var $0;Object.defineProperty(s,"displayName",{enumerable:!1,configurable:!0,get:function(){return $0},set:function(A0){if($0=A0,!W.name&&!W.displayName)W.displayName=A0}})}return s}function j(){var W=C.current;if(W===null)F0(`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 W}function W0(W){var y=j();if(W._context!==void 0){var s=W._context;if(s.Consumer===W)F0("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(s.Provider===W)F0("Calling useContext(Context.Provider) is not supported. Did you mean to call useContext(Context) instead?")}return y.useContext(W)}function M0(W){var y=j();return y.useState(W)}function S0(W,y,s){var $0=j();return $0.useReducer(W,y,s)}function i0(W){var y=j();return y.useRef(W)}function g0(W,y){var s=j();return s.useEffect(W,y)}function O0(W,y){var s=j();return s.useInsertionEffect(W,y)}function k0(W,y){var s=j();return s.useLayoutEffect(W,y)}function n0(W,y){var s=j();return s.useCallback(W,y)}function D1(W,y){var s=j();return s.useMemo(W,y)}function z4(W,y,s){var $0=j();return $0.useImperativeHandle(W,y,s)}function i5(W,y){{var s=j();return s.useDebugValue(W,y)}}function B6(){var W=j();return W.useTransition()}function P4(W){var y=j();return y.useDeferredValue(W)}function T1(){var W=j();return W.useId()}function w7(W,y,s){var $0=j();return $0.useSyncExternalStore(W,y,s)}var Z7=0,gQ,xQ,jQ,pQ,cQ,dQ,lQ;function xZ(){}xZ.__reactDisabledLog=!0;function I3(){{if(Z7===0){gQ=console.log,xQ=console.info,jQ=console.warn,pQ=console.error,cQ=console.group,dQ=console.groupCollapsed,lQ=console.groupEnd;var W={configurable:!0,enumerable:!0,value:xZ,writable:!0};Object.defineProperties(console,{info:W,log:W,warn:W,error:W,group:W,groupCollapsed:W,groupEnd:W})}Z7++}}function iQ(){{if(Z7--,Z7===0){var W={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:_0({},W,{value:gQ}),info:_0({},W,{value:xQ}),warn:_0({},W,{value:jQ}),error:_0({},W,{value:pQ}),group:_0({},W,{value:cQ}),groupCollapsed:_0({},W,{value:dQ}),groupEnd:_0({},W,{value:lQ})})}if(Z7<0)F0("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var V8=Z0.ReactCurrentDispatcher,M6;function r7(W,y,s){{if(M6===void 0)try{throw Error()}catch(A0){var $0=A0.stack.trim().match(/\n( *(at )?)/);M6=$0&&$0[1]||""}return`
|
|
14
|
-
`+M6+W}}var t7=!1,kz;{var oQ=typeof WeakMap==="function"?WeakMap:Map;kz=new oQ}function jZ(W,y){if(!W||t7)return"";{var s=kz.get(W);if(s!==void 0)return s}var $0;t7=!0;var A0=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var q1;q1=V8.current,V8.current=null,I3();try{if(y){var d0=function(){throw Error()};if(Object.defineProperty(d0.prototype,"props",{set:function(){throw Error()}}),typeof Reflect==="object"&&Reflect.construct){try{Reflect.construct(d0,[])}catch(o1){$0=o1}Reflect.construct(W,[],d0)}else{try{d0.call()}catch(o1){$0=o1}W.call(d0.prototype)}}else{try{throw Error()}catch(o1){$0=o1}W()}}catch(o1){if(o1&&$0&&typeof o1.stack==="string"){var O1=o1.stack.split(`
|
|
15
|
-
`),m1=$0.stack.split(`
|
|
16
|
-
`),X4=O1.length-1,_4=m1.length-1;while(X4>=1&&_4>=0&&O1[X4]!==m1[_4])_4--;for(;X4>=1&&_4>=0;X4--,_4--)if(O1[X4]!==m1[_4]){if(X4!==1||_4!==1)do if(X4--,_4--,_4<0||O1[X4]!==m1[_4]){var R4=`
|
|
17
|
-
`+O1[X4].replace(" at new "," at ");if(W.displayName&&R4.includes("<anonymous>"))R4=R4.replace("<anonymous>",W.displayName);if(typeof W==="function")kz.set(W,R4);return R4}while(X4>=1&&_4>=0);break}}}finally{t7=!1,V8.current=q1,iQ(),Error.prepareStackTrace=A0}var C4=W?W.displayName||W.name:"",p4=C4?r7(C4):"";if(typeof W==="function")kz.set(W,p4);return p4}function aQ(W,y,s){return jZ(W,!1)}function k3(W){var y=W.prototype;return!!(y&&y.isReactComponent)}function s7(W,y,s){if(W==null)return"";if(typeof W==="function")return jZ(W,k3(W));if(typeof W==="string")return r7(W);switch(W){case I:return r7("Suspense");case F:return r7("SuspenseList")}if(typeof W==="object")switch(W.$$typeof){case T:return aQ(W.render);case N:return s7(W.type,y,s);case w:{var $0=W,A0=$0._payload,q1=$0._init;try{return s7(q1(A0),y,s)}catch(d0){}}}return""}var pZ={},nQ=Z0.ReactDebugCurrentFrame;function Tz(W){if(W){var y=W._owner,s=s7(W.type,W._source,y?y.type:null);nQ.setExtraStackFrame(s)}else nQ.setExtraStackFrame(null)}function cZ(W,y,s,$0,A0){{var q1=Function.call.bind(y4);for(var d0 in W)if(q1(W,d0)){var O1=void 0;try{if(typeof W[d0]!=="function"){var m1=Error(($0||"React class")+": "+s+" type `"+d0+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof W[d0]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw m1.name="Invariant Violation",m1}O1=W[d0](y,d0,$0,s,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(X4){O1=X4}if(O1&&!(O1 instanceof Error))Tz(A0),F0("%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).",$0||"React class",s,d0,typeof O1),Tz(null);if(O1 instanceof Error&&!(O1.message in pZ))pZ[O1.message]=!0,Tz(A0),F0("Failed %s type: %s",s,O1.message),Tz(null)}}}function c1(W){if(W){var y=W._owner,s=s7(W.type,W._source,y?y.type:null);Q0(s)}else Q0(null)}var dZ=!1;function rQ(){if(a.current){var W=k4(a.current.type);if(W)return`
|
|
18
|
-
|
|
19
|
-
Check the render method of \``+W+"`."}return""}function M1(W){if(W!==void 0){var y=W.fileName.replace(/^.*[\\\/]/,""),s=W.lineNumber;return`
|
|
20
|
-
|
|
21
|
-
Check your code at `+y+":"+s+"."}return""}function lZ(W){if(W!==null&&W!==void 0)return M1(W.__source);return""}var u5={};function D8(W){var y=rQ();if(!y){var s=typeof W==="string"?W:W.displayName||W.name;if(s)y=`
|
|
22
|
-
|
|
23
|
-
Check the top-level render call using <`+s+">."}return y}function e7(W,y){if(!W._store||W._store.validated||W.key!=null)return;W._store.validated=!0;var s=D8(y);if(u5[s])return;u5[s]=!0;var $0="";if(W&&W._owner&&W._owner!==a.current)$0=" It was passed a child from "+k4(W._owner.type)+".";c1(W),F0('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',s,$0),c1(null)}function iZ(W,y){if(typeof W!=="object")return;if(f1(W))for(var s=0;s<W.length;s++){var $0=W[s];if(Y1($0))e7($0,y)}else if(Y1(W)){if(W._store)W._store.validated=!0}else if(W){var A0=D(W);if(typeof A0==="function"){if(A0!==W.entries){var q1=A0.call(W),d0;while(!(d0=q1.next()).done)if(Y1(d0.value))e7(d0.value,y)}}}}function _5(W){{var y=W.type;if(y===null||y===void 0||typeof y==="string")return;var s;if(typeof y==="function")s=y.propTypes;else if(typeof y==="object"&&(y.$$typeof===T||y.$$typeof===N))s=y.propTypes;else return;if(s){var $0=k4(y);cZ(s,W.props,"prop",$0,W)}else if(y.PropTypes!==void 0&&!dZ){dZ=!0;var A0=k4(y);F0("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",A0||"Unknown")}if(typeof y.getDefaultProps==="function"&&!y.getDefaultProps.isReactClassApproved)F0("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function m4(W){{var y=Object.keys(W.props);for(var s=0;s<y.length;s++){var $0=y[s];if($0!=="children"&&$0!=="key"){c1(W),F0("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",$0),c1(null);break}}if(W.ref!==null)c1(W),F0("Invalid attribute `ref` supplied to `React.Fragment`."),c1(null)}}function oZ(W,y,s){var $0=R0(W);if(!$0){var A0="";if(W===void 0||typeof W==="object"&&W!==null&&Object.keys(W).length===0)A0+=" 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 q1=lZ(y);if(q1)A0+=q1;else A0+=rQ();var d0;if(W===null)d0="null";else if(f1(W))d0="array";else if(W!==void 0&&W.$$typeof===G)d0="<"+(k4(W.type)||"Unknown")+" />",A0=" Did you accidentally export a JSX literal instead of a component?";else d0=typeof W;F0("React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",d0,A0)}var O1=t4.apply(this,arguments);if(O1==null)return O1;if($0)for(var m1=2;m1<arguments.length;m1++)iZ(arguments[m1],W);if(W===O)m4(O1);else _5(O1);return O1}var U6=!1;function Q6(W){var y=oZ.bind(null,W);y.type=W;{if(!U6)U6=!0,I0("React.createFactory() is deprecated and will be removed in a future major release. Consider using JSX or use React.createElement() directly instead.");Object.defineProperty(y,"type",{enumerable:!1,get:function(){return I0("Factory.type is deprecated. Access the class directly before passing it to createFactory."),Object.defineProperty(this,"type",{value:W}),W}})}return y}function J7(W,y,s){var $0=t0.apply(this,arguments);for(var A0=2;A0<arguments.length;A0++)iZ(arguments[A0],$0.type);return _5($0),$0}function T3(W,y){var s=V.transition;V.transition={};var $0=V.transition;V.transition._updatedFibers=new Set;try{W()}finally{if(V.transition=s,s===null&&$0._updatedFibers){var A0=$0._updatedFibers.size;if(A0>10)I0("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.");$0._updatedFibers.clear()}}}var Cz=!1,E8=null;function aZ(W){if(E8===null)try{var y=("require"+Math.random()).slice(0,7),s=Z3&&Z3[y];E8=s.call(Z3,"timers").setImmediate}catch($0){E8=function(A0){if(Cz===!1){if(Cz=!0,typeof MessageChannel>"u")F0("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 q1=new MessageChannel;q1.port1.onmessage=A0,q1.port2.postMessage(void 0)}}return E8(W)}var z8=0,nZ=!1;function rZ(W){{var y=z8;if(z8++,m.current===null)m.current=[];var s=m.isBatchingLegacy,$0;try{if(m.isBatchingLegacy=!0,$0=W(),!s&&m.didScheduleLegacyUpdate){var A0=m.current;if(A0!==null)m.didScheduleLegacyUpdate=!1,Sz(A0)}}catch(C4){throw F7(y),C4}finally{m.isBatchingLegacy=s}if($0!==null&&typeof $0==="object"&&typeof $0.then==="function"){var q1=$0,d0=!1,O1={then:function(C4,p4){d0=!0,q1.then(function(o1){if(F7(y),z8===0)vz(o1,C4,p4);else C4(o1)},function(o1){F7(y),p4(o1)})}};if(!nZ&&typeof Promise<"u")Promise.resolve().then(function(){}).then(function(){if(!d0)nZ=!0,F0("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 O1}else{var m1=$0;if(F7(y),z8===0){var X4=m.current;if(X4!==null)Sz(X4),m.current=null;var _4={then:function(C4,p4){if(m.current===null)m.current=[],vz(m1,C4,p4);else C4(m1)}};return _4}else{var R4={then:function(C4,p4){C4(m1)}};return R4}}}}function F7(W){{if(W!==z8-1)F0("You seem to have overlapping act() calls, this is not supported. Be sure to await previous act() calls before making a new one. ");z8=W}}function vz(W,y,s){{var $0=m.current;if($0!==null)try{Sz($0),aZ(function(){if($0.length===0)m.current=null,y(W);else vz(W,y,s)})}catch(A0){s(A0)}else y(W)}}var Q8=!1;function Sz(W){if(!Q8){Q8=!0;var y=0;try{for(;y<W.length;y++){var s=W[y];do s=s(!0);while(s!==null)}W.length=0}catch($0){throw W=W.slice(y+1),$0}finally{Q8=!1}}}var tZ=oZ,sZ=J7,eZ=Q6,zJ={map:L5,forEach:Q7,count:l5,toArray:E6,only:X7};if(xP.Children=zJ,xP.Component=d,xP.Fragment=O,xP.Profiler=R,xP.PureComponent=V0,xP.StrictMode=q,xP.Suspense=I,xP.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Z0,xP.act=rZ,xP.cloneElement=sZ,xP.createContext=F6,xP.createElement=tZ,xP.createFactory=eZ,xP.createRef=L0,xP.forwardRef=f,xP.isValidElement=Y1,xP.lazy=d1,xP.memo=A,xP.startTransition=T3,xP.unstable_act=rZ,xP.useCallback=n0,xP.useContext=W0,xP.useDebugValue=i5,xP.useDeferredValue=P4,xP.useEffect=g0,xP.useId=T1,xP.useImperativeHandle=z4,xP.useInsertionEffect=O0,xP.useLayoutEffect=k0,xP.useMemo=D1,xP.useReducer=S0,xP.useRef=i0,xP.useState=M0,xP.useSyncExternalStore=w7,xP.useTransition=B6,xP.version=Y,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop==="function")__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()});var LW=Oz((jP)=>{(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,U=5;function O(T0,t0){var Y1=T0.length;T0.push(t0),L(T0,t0,Y1)}function q(T0){return T0.length===0?null:T0[0]}function R(T0){if(T0.length===0)return null;var t0=T0[0],Y1=T0.pop();if(Y1!==t0)T0[0]=Y1,_(T0,Y1,0);return t0}function L(T0,t0,Y1){var j1=Y1;while(j1>0){var s1=j1-1>>>1,V4=T0[s1];if(T(V4,t0)>0)T0[s1]=t0,T0[j1]=V4,j1=s1;else return}}function _(T0,t0,Y1){var j1=Y1,s1=T0.length,V4=s1>>>1;while(j1<V4){var H4=(j1+1)*2-1,a4=T0[H4],F1=H4+1,N1=T0[F1];if(T(a4,t0)<0)if(F1<s1&&T(N1,a4)<0)T0[j1]=N1,T0[F1]=t0,j1=F1;else T0[j1]=a4,T0[H4]=t0,j1=H4;else if(F1<s1&&T(N1,t0)<0)T0[j1]=N1,T0[F1]=t0,j1=F1;else return}}function T(T0,t0){var Y1=T0.sortIndex-t0.sortIndex;return Y1!==0?Y1:T0.id-t0.id}var I=1,F=2,N=3,w=4,k=5;function v(T0,t0){}var E=typeof performance==="object"&&typeof performance.now==="function";if(E){var D=performance;jP.unstable_now=function(){return D.now()}}else{var C=Date,V=C.now();jP.unstable_now=function(){return C.now()-V}}var m=1073741823,a=-1,c=250,u=5000,Q0=1e4,o=m,t=[],l=[],p=1,i=null,Z0=N,I0=!1,F0=!1,Q1=!1,W1=typeof setTimeout==="function"?setTimeout:null,X0=typeof clearTimeout==="function"?clearTimeout:null,U0=typeof setImmediate<"u"?setImmediate:null,_0=typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0?navigator.scheduling.isInputPending.bind(navigator.scheduling):null;function J0(T0){var t0=q(l);while(t0!==null){if(t0.callback===null)R(l);else if(t0.startTime<=T0)R(l),t0.sortIndex=t0.expirationTime,O(t,t0);else return;t0=q(l)}}function d(T0){if(Q1=!1,J0(T0),!F0)if(q(t)!==null)F0=!0,T4(P0);else{var t0=q(l);if(t0!==null)O5(d,t0.startTime-T0)}}function P0(T0,t0){if(F0=!1,Q1)Q1=!1,E5();I0=!0;var Y1=Z0;try{if(G)try{return v0(T0,t0)}catch(s1){if(i!==null){var j1=jP.unstable_now();v(i,j1),i.isQueued=!1}throw s1}else return v0(T0,t0)}finally{i=null,Z0=Y1,I0=!1}}function v0(T0,t0){var Y1=t0;J0(Y1),i=q(t);while(i!==null&&!Y){if(i.expirationTime>Y1&&(!T0||y4()))break;var j1=i.callback;if(typeof j1==="function"){i.callback=null,Z0=i.priorityLevel;var s1=i.expirationTime<=Y1,V4=j1(s1);if(Y1=jP.unstable_now(),typeof V4==="function")i.callback=V4;else if(i===q(t))R(t);J0(Y1)}else R(t);i=q(t)}if(i!==null)return!0;else{var H4=q(l);if(H4!==null)O5(d,H4.startTime-Y1);return!1}}function X1(T0,t0){switch(T0){case I:case F:case N:case w:case k:break;default:T0=N}var Y1=Z0;Z0=T0;try{return t0()}finally{Z0=Y1}}function r0(T0){var t0;switch(Z0){case I:case F:case N:t0=N;break;default:t0=Z0;break}var Y1=Z0;Z0=t0;try{return T0()}finally{Z0=Y1}}function V0(T0){var t0=Z0;return function(){var Y1=Z0;Z0=t0;try{return T0.apply(this,arguments)}finally{Z0=Y1}}}function H1(T0,t0,Y1){var j1=jP.unstable_now(),s1;if(typeof Y1==="object"&&Y1!==null){var V4=Y1.delay;if(typeof V4==="number"&&V4>0)s1=j1+V4;else s1=j1}else s1=j1;var H4;switch(T0){case I:H4=a;break;case F:H4=c;break;case k:H4=o;break;case w:H4=Q0;break;case N:default:H4=u;break}var a4=s1+H4,F1={id:p++,callback:t0,priorityLevel:T0,startTime:s1,expirationTime:a4,sortIndex:-1};if(s1>j1){if(F1.sortIndex=s1,O(l,F1),q(t)===null&&F1===q(l)){if(Q1)E5();else Q1=!0;O5(d,s1-j1)}}else if(F1.sortIndex=a4,O(t,F1),!F0&&!I0)F0=!0,T4(P0);return F1}function L0(){}function a0(){if(!F0&&!I0)F0=!0,T4(P0)}function f1(){return q(t)}function q4(T0){T0.callback=null}function h4(){return Z0}var x1=!1,K1=null,r4=-1,o4=U,k4=-1;function y4(){var T0=jP.unstable_now()-k4;if(T0<o4)return!1;return!0}function D6(){}function O4(T0){if(T0<0||T0>125){console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported");return}if(T0>0)o4=Math.floor(1000/T0);else o4=U}var F5=function(){if(K1!==null){var T0=jP.unstable_now();k4=T0;var t0=!0,Y1=!0;try{Y1=K1(t0,T0)}finally{if(Y1)L4();else x1=!1,K1=null}}else x1=!1},L4;if(typeof U0==="function")L4=function(){U0(F5)};else if(typeof MessageChannel<"u"){var M5=new MessageChannel,M4=M5.port2;M5.port1.onmessage=F5,L4=function(){M4.postMessage(null)}}else L4=function(){W1(F5,0)};function T4(T0){if(K1=T0,!x1)x1=!0,L4()}function O5(T0,t0){r4=W1(function(){T0(jP.unstable_now())},t0)}function E5(){X0(r4),r4=-1}var j4=D6,t4=null;if(jP.unstable_IdlePriority=k,jP.unstable_ImmediatePriority=I,jP.unstable_LowPriority=w,jP.unstable_NormalPriority=N,jP.unstable_Profiling=t4,jP.unstable_UserBlockingPriority=F,jP.unstable_cancelCallback=q4,jP.unstable_continueExecution=a0,jP.unstable_forceFrameRate=O4,jP.unstable_getCurrentPriorityLevel=h4,jP.unstable_getFirstCallbackNode=f1,jP.unstable_next=r0,jP.unstable_pauseExecution=L0,jP.unstable_requestPaint=j4,jP.unstable_runWithPriority=X1,jP.unstable_scheduleCallback=H1,jP.unstable_shouldYield=y4,jP.unstable_wrapCallback=V0,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop==="function")__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()});var _W=Oz((pP)=>{var vZ=q0(k1()),$4=q0(LW());(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 U(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];R("warn",z,X)}}function q(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];R("error",z,X)}}function R(z,Q,X){{var Z=Y.ReactDebugCurrentFrame,J=Z.getStackAddendum();if(J!=="")Q+="%s",X=X.concat([J]);var $=X.map(function(H){return String(H)});$.unshift("Warning: "+Q),Function.prototype.apply.call(console[z],console,$)}}var L=0,_=1,T=2,I=3,F=4,N=5,w=6,k=7,v=8,E=9,D=10,C=11,V=12,m=13,a=14,c=15,u=16,Q0=17,o=18,t=19,l=21,p=22,i=23,Z0=24,I0=25,F0=!0,Q1=!1,W1=!1,X0=!1,U0=!1,_0=!0,J0=!1,d=!0,P0=!0,v0=!0,X1=!0,r0=new Set,V0={},H1={};function L0(z,Q){a0(z,Q),a0(z+"Capture",Q)}function a0(z,Q){if(V0[z])q("EventRegistry: More than one plugin attempted to publish the same registration name, `%s`.",z);V0[z]=Q;{var X=z.toLowerCase();if(H1[X]=z,z==="onDoubleClick")H1.ondblclick=z}for(var Z=0;Z<Q.length;Z++)r0.add(Q[Z])}var f1=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",q4=Object.prototype.hasOwnProperty;function h4(z){{var Q=typeof Symbol==="function"&&Symbol.toStringTag,X=Q&&z[Symbol.toStringTag]||z.constructor.name||"Object";return X}}function x1(z){try{return K1(z),!1}catch(Q){return!0}}function K1(z){return""+z}function r4(z,Q){if(x1(z))return q("The provided `%s` attribute is an unsupported type %s. This value must be coerced to a string before before using it here.",Q,h4(z)),K1(z)}function o4(z){if(x1(z))return q("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",h4(z)),K1(z)}function k4(z,Q){if(x1(z))return q("The provided `%s` prop is an unsupported type %s. This value must be coerced to a string before before using it here.",Q,h4(z)),K1(z)}function y4(z,Q){if(x1(z))return q("The provided `%s` CSS property is an unsupported type %s. This value must be coerced to a string before before using it here.",Q,h4(z)),K1(z)}function D6(z){if(x1(z))return q("The provided HTML markup uses a value of unsupported type %s. This value must be coerced to a string before before using it here.",h4(z)),K1(z)}function O4(z){if(x1(z))return q("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.",h4(z)),K1(z)}var F5=0,L4=1,M5=2,M4=3,T4=4,O5=5,E5=6,j4=":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",t4=j4+"\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",T0=new RegExp("^["+j4+"]["+t4+"]*$"),t0={},Y1={};function j1(z){if(q4.call(Y1,z))return!0;if(q4.call(t0,z))return!1;if(T0.test(z))return Y1[z]=!0,!0;return t0[z]=!0,q("Invalid attribute name: `%s`",z),!1}function s1(z,Q,X){if(Q!==null)return Q.type===F5;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 V4(z,Q,X,Z){if(X!==null&&X.type===F5)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 H4(z,Q,X,Z){if(Q===null||typeof Q>"u")return!0;if(V4(z,Q,X,Z))return!0;if(Z)return!1;if(X!==null)switch(X.type){case M4:return!Q;case T4:return Q===!1;case O5:return isNaN(Q);case E5:return isNaN(Q)||Q<1}return!1}function a4(z){return N1.hasOwnProperty(z)?N1[z]:null}function F1(z,Q,X,Z,J,$,H){this.acceptsBooleans=Q===M5||Q===M4||Q===T4,this.attributeName=Z,this.attributeNamespace=J,this.mustUseProperty=X,this.propertyName=z,this.type=Q,this.sanitizeURL=$,this.removeEmptyString=H}var N1={},d5=["children","dangerouslySetInnerHTML","defaultValue","defaultChecked","innerHTML","suppressContentEditableWarning","suppressHydrationWarning","style"];d5.forEach(function(z){N1[z]=new F1(z,F5,!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];N1[Q]=new F1(Q,L4,!1,X,null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(z){N1[z]=new F1(z,M5,!1,z.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(z){N1[z]=new F1(z,M5,!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){N1[z]=new F1(z,M4,!1,z.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(z){N1[z]=new F1(z,M4,!0,z,null,!1,!1)}),["capture","download"].forEach(function(z){N1[z]=new F1(z,T4,!1,z,null,!1,!1)}),["cols","rows","size","span"].forEach(function(z){N1[z]=new F1(z,E5,!1,z,null,!1,!1)}),["rowSpan","start"].forEach(function(z){N1[z]=new F1(z,O5,!1,z.toLowerCase(),null,!1,!1)});var L5=/[\-\:]([a-z])/g,l5=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(L5,l5);N1[Q]=new F1(Q,L4,!1,z,null,!1,!1)}),["xlink:actuate","xlink:arcrole","xlink:role","xlink:show","xlink:title","xlink:type"].forEach(function(z){var Q=z.replace(L5,l5);N1[Q]=new F1(Q,L4,!1,z,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(z){var Q=z.replace(L5,l5);N1[Q]=new F1(Q,L4,!1,z,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(z){N1[z]=new F1(z,L4,!1,z.toLowerCase(),null,!1,!1)});var Q7="xlinkHref";N1[Q7]=new F1("xlinkHref",L4,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(z){N1[z]=new F1(z,L4,!1,z.toLowerCase(),null,!0,!0)});var E6=/^[\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,X7=!1;function F6(z){if(!X7&&E6.test(z))X7=!0,q("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 m5(z,Q,X,Z){if(Z.mustUseProperty){var J=Z.propertyName;return z[J]}else{if(r4(X,Q),Z.sanitizeURL)F6(""+X);var $=Z.attributeName,H=null;if(Z.type===T4){if(z.hasAttribute($)){var B=z.getAttribute($);if(B==="")return!0;if(H4(Q,X,Z,!1))return B;if(B===""+X)return X;return B}}else if(z.hasAttribute($)){if(H4(Q,X,Z,!1))return z.getAttribute($);if(Z.type===M4)return X;H=z.getAttribute($)}if(H4(Q,X,Z,!1))return H===null?X:H;else if(H===""+X)return X;else return H}}function m6(z,Q,X,Z){{if(!j1(Q))return;if(!z.hasAttribute(Q))return X===void 0?void 0:null;var J=z.getAttribute(Q);if(r4(X,Q),J===""+X)return X;return J}}function V1(z,Q,X,Z){var J=a4(Q);if(s1(Q,J,Z))return;if(H4(Q,X,J,Z))X=null;if(Z||J===null){if(j1(Q)){var $=Q;if(X===null)z.removeAttribute($);else r4(X,Q),z.setAttribute($,""+X)}return}var H=J.mustUseProperty;if(H){var B=J.propertyName;if(X===null){var K=J.type;z[B]=K===M4?!1:""}else z[B]=X;return}var{attributeName:b,attributeNamespace:P}=J;if(X===null)z.removeAttribute(b);else{var x=J.type,g;if(x===M4||x===T4&&X===!0)g="";else if(r4(X,b),g=""+X,J.sanitizeURL)F6(g.toString());if(P)z.setAttributeNS(P,b,g);else z.setAttribute(b,g)}}var e1=Symbol.for("react.element"),B4=Symbol.for("react.portal"),d1=Symbol.for("react.fragment"),f=Symbol.for("react.strict_mode"),H0=Symbol.for("react.profiler"),R0=Symbol.for("react.provider"),A=Symbol.for("react.context"),j=Symbol.for("react.forward_ref"),W0=Symbol.for("react.suspense"),M0=Symbol.for("react.suspense_list"),S0=Symbol.for("react.memo"),i0=Symbol.for("react.lazy"),g0=Symbol.for("react.scope"),O0=Symbol.for("react.debug_trace_mode"),k0=Symbol.for("react.offscreen"),n0=Symbol.for("react.legacy_hidden"),D1=Symbol.for("react.cache"),z4=Symbol.for("react.tracing_marker"),i5=Symbol.iterator,B6="@@iterator";function P4(z){if(z===null||typeof z!=="object")return null;var Q=i5&&z[i5]||z[B6];if(typeof Q==="function")return Q;return null}var T1=Object.assign,w7=0,Z7,gQ,xQ,jQ,pQ,cQ,dQ;function lQ(){}lQ.__reactDisabledLog=!0;function xZ(){{if(w7===0){Z7=console.log,gQ=console.info,xQ=console.warn,jQ=console.error,pQ=console.group,cQ=console.groupCollapsed,dQ=console.groupEnd;var z={configurable:!0,enumerable:!0,value:lQ,writable:!0};Object.defineProperties(console,{info:z,log:z,warn:z,error:z,group:z,groupCollapsed:z,groupEnd:z})}w7++}}function I3(){{if(w7--,w7===0){var z={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:T1({},z,{value:Z7}),info:T1({},z,{value:gQ}),warn:T1({},z,{value:xQ}),error:T1({},z,{value:jQ}),group:T1({},z,{value:pQ}),groupCollapsed:T1({},z,{value:cQ}),groupEnd:T1({},z,{value:dQ})})}if(w7<0)q("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var iQ=Y.ReactCurrentDispatcher,V8;function M6(z,Q,X){{if(V8===void 0)try{throw Error()}catch(J){var Z=J.stack.trim().match(/\n( *(at )?)/);V8=Z&&Z[1]||""}return`
|
|
24
|
-
`+V8+z}}var r7=!1,t7;{var kz=typeof WeakMap==="function"?WeakMap:Map;t7=new kz}function oQ(z,Q){if(!z||r7)return"";{var X=t7.get(z);if(X!==void 0)return X}var Z;r7=!0;var J=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var $;$=iQ.current,iQ.current=null,xZ();try{if(Q){var H=function(){throw Error()};if(Object.defineProperty(H.prototype,"props",{set:function(){throw Error()}}),typeof Reflect==="object"&&Reflect.construct){try{Reflect.construct(H,[])}catch(z0){Z=z0}Reflect.construct(z,[],H)}else{try{H.call()}catch(z0){Z=z0}z.call(H.prototype)}}else{try{throw Error()}catch(z0){Z=z0}z()}}catch(z0){if(z0&&Z&&typeof z0.stack==="string"){var B=z0.stack.split(`
|
|
25
|
-
`),K=Z.stack.split(`
|
|
26
|
-
`),b=B.length-1,P=K.length-1;while(b>=1&&P>=0&&B[b]!==K[P])P--;for(;b>=1&&P>=0;b--,P--)if(B[b]!==K[P]){if(b!==1||P!==1)do if(b--,P--,P<0||B[b]!==K[P]){var x=`
|
|
27
|
-
`+B[b].replace(" at new "," at ");if(z.displayName&&x.includes("<anonymous>"))x=x.replace("<anonymous>",z.displayName);if(typeof z==="function")t7.set(z,x);return x}while(b>=1&&P>=0);break}}}finally{r7=!1,iQ.current=$,I3(),Error.prepareStackTrace=J}var g=z?z.displayName||z.name:"",e=g?M6(g):"";if(typeof z==="function")t7.set(z,e);return e}function jZ(z,Q,X){return oQ(z,!0)}function aQ(z,Q,X){return oQ(z,!1)}function k3(z){var Q=z.prototype;return!!(Q&&Q.isReactComponent)}function s7(z,Q,X){if(z==null)return"";if(typeof z==="function")return oQ(z,k3(z));if(typeof z==="string")return M6(z);switch(z){case W0:return M6("Suspense");case M0:return M6("SuspenseList")}if(typeof z==="object")switch(z.$$typeof){case j:return aQ(z.render);case S0:return s7(z.type,Q,X);case i0:{var Z=z,J=Z._payload,$=Z._init;try{return s7($(J),Q,X)}catch(H){}}}return""}function pZ(z){var Q=z._debugOwner?z._debugOwner.type:null,X=z._debugSource;switch(z.tag){case N:return M6(z.type);case u:return M6("Lazy");case m:return M6("Suspense");case t:return M6("SuspenseList");case L:case T:case c:return aQ(z.type);case C:return aQ(z.type.render);case _:return jZ(z.type);default:return""}}function nQ(z){try{var Q="",X=z;do Q+=pZ(X),X=X.return;while(X);return Q}catch(Z){return`
|
|
28
|
-
Error generating stack: `+Z.message+`
|
|
29
|
-
`+Z.stack}}function Tz(z,Q,X){var Z=z.displayName;if(Z)return Z;var J=Q.displayName||Q.name||"";return J!==""?X+"("+J+")":X}function cZ(z){return z.displayName||"Context"}function c1(z){if(z==null)return null;if(typeof z.tag==="number")q("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 B4:return"Portal";case H0:return"Profiler";case f:return"StrictMode";case W0:return"Suspense";case M0:return"SuspenseList"}if(typeof z==="object")switch(z.$$typeof){case A:var Q=z;return cZ(Q)+".Consumer";case R0:var X=z;return cZ(X._context)+".Provider";case j:return Tz(z,z.render,"ForwardRef");case S0:var Z=z.displayName||null;if(Z!==null)return Z;return c1(z.type)||"Memo";case i0:{var J=z,$=J._payload,H=J._init;try{return c1(H($))}catch(B){return null}}}return null}function dZ(z,Q,X){var Z=Q.displayName||Q.name||"";return z.displayName||(Z!==""?X+"("+Z+")":X)}function rQ(z){return z.displayName||"Context"}function M1(z){var{tag:Q,type:X}=z;switch(Q){case Z0:return"Cache";case E:var Z=X;return rQ(Z)+".Consumer";case D:var J=X;return rQ(J._context)+".Provider";case o:return"DehydratedFragment";case C:return dZ(X,X.render,"ForwardRef");case k:return"Fragment";case N:return X;case F:return"Portal";case I:return"Root";case w:return"Text";case u:return c1(X);case v:if(X===f)return"StrictMode";return"Mode";case p:return"Offscreen";case V:return"Profiler";case l:return"Scope";case m:return"Suspense";case t:return"SuspenseList";case I0:return"TracingMarker";case _:case L:case Q0:case T:case a:case c:if(typeof X==="function")return X.displayName||X.name||null;if(typeof X==="string")return X;break}return null}var lZ=Y.ReactDebugCurrentFrame,u5=null,D8=!1;function e7(){{if(u5===null)return null;var z=u5._debugOwner;if(z!==null&&typeof z<"u")return M1(z)}return null}function iZ(){{if(u5===null)return"";return nQ(u5)}}function _5(){lZ.getCurrentStack=null,u5=null,D8=!1}function m4(z){lZ.getCurrentStack=z===null?null:iZ,u5=z,D8=!1}function oZ(){return u5}function U6(z){D8=z}function Q6(z){return""+z}function J7(z){switch(typeof z){case"boolean":case"number":case"string":case"undefined":return z;case"object":return O4(z),z;default:return""}}var T3={button:!0,checkbox:!0,image:!0,hidden:!0,radio:!0,reset:!0,submit:!0};function Cz(z,Q){{if(!(T3[Q.type]||Q.onChange||Q.onInput||Q.readOnly||Q.disabled||Q.value==null))q("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))q("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 E8(z){var{type:Q,nodeName:X}=z;return X&&X.toLowerCase()==="input"&&(Q==="checkbox"||Q==="radio")}function aZ(z){return z._valueTracker}function z8(z){z._valueTracker=null}function nZ(z){var Q="";if(!z)return Q;if(E8(z))Q=z.checked?"true":"false";else Q=z.value;return Q}function rZ(z){var Q=E8(z)?"checked":"value",X=Object.getOwnPropertyDescriptor(z.constructor.prototype,Q);O4(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:$}=X;Object.defineProperty(z,Q,{configurable:!0,get:function(){return J.call(this)},set:function(B){O4(B),Z=""+B,$.call(this,B)}}),Object.defineProperty(z,Q,{enumerable:X.enumerable});var H={getValue:function(){return Z},setValue:function(B){O4(B),Z=""+B},stopTracking:function(){z8(z),delete z[Q]}};return H}function F7(z){if(aZ(z))return;z._valueTracker=rZ(z)}function vz(z){if(!z)return!1;var Q=aZ(z);if(!Q)return!0;var X=Q.getValue(),Z=nZ(z);if(Z!==X)return Q.setValue(Z),!0;return!1}function Q8(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 Sz=!1,tZ=!1,sZ=!1,eZ=!1;function zJ(z){var Q=z.type==="checkbox"||z.type==="radio";return Q?z.checked!=null:z.value!=null}function W(z,Q){var X=z,Z=Q.checked,J=T1({},Q,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:Z!=null?Z:X._wrapperState.initialChecked});return J}function y(z,Q){{if(Cz("input",Q),Q.checked!==void 0&&Q.defaultChecked!==void 0&&!tZ)q("%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",e7()||"A component",Q.type),tZ=!0;if(Q.value!==void 0&&Q.defaultValue!==void 0&&!Sz)q("%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",e7()||"A component",Q.type),Sz=!0}var X=z,Z=Q.defaultValue==null?"":Q.defaultValue;X._wrapperState={initialChecked:Q.checked!=null?Q.checked:Q.defaultChecked,initialValue:J7(Q.value!=null?Q.value:Z),controlled:zJ(Q)}}function s(z,Q){var X=z,Z=Q.checked;if(Z!=null)V1(X,"checked",Z,!1)}function $0(z,Q){var X=z;{var Z=zJ(Q);if(!X._wrapperState.controlled&&Z&&!eZ)q("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"),eZ=!0;if(X._wrapperState.controlled&&!Z&&!sZ)q("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"),sZ=!0}s(z,Q);var J=J7(Q.value),$=Q.type;if(J!=null){if($==="number"){if(J===0&&X.value===""||X.value!=J)X.value=Q6(J)}else if(X.value!==Q6(J))X.value=Q6(J)}else if($==="submit"||$==="reset"){X.removeAttribute("value");return}if(Q.hasOwnProperty("value"))O1(X,Q.type,J);else if(Q.hasOwnProperty("defaultValue"))O1(X,Q.type,J7(Q.defaultValue));if(Q.checked==null&&Q.defaultChecked!=null)X.defaultChecked=!!Q.defaultChecked}function A0(z,Q,X){var Z=z;if(Q.hasOwnProperty("value")||Q.hasOwnProperty("defaultValue")){var J=Q.type,$=J==="submit"||J==="reset";if($&&(Q.value===void 0||Q.value===null))return;var H=Q6(Z._wrapperState.initialValue);if(!X){if(H!==Z.value)Z.value=H}Z.defaultValue=H}var B=Z.name;if(B!=="")Z.name="";if(Z.defaultChecked=!Z.defaultChecked,Z.defaultChecked=!!Z._wrapperState.initialChecked,B!=="")Z.name=B}function q1(z,Q){var X=z;$0(X,Q),d0(X,Q)}function d0(z,Q){var X=Q.name;if(Q.type==="radio"&&X!=null){var Z=z;while(Z.parentNode)Z=Z.parentNode;r4(X,"name");var J=Z.querySelectorAll("input[name="+JSON.stringify(""+X)+'][type="radio"]');for(var $=0;$<J.length;$++){var H=J[$];if(H===z||H.form!==z.form)continue;var B=jJ(H);if(!B)throw Error("ReactDOMInput: Mixing React and non-React radio inputs with the same `name` is not supported.");vz(H),$0(H,B)}}}function O1(z,Q,X){if(Q!=="number"||Q8(z.ownerDocument)!==z){if(X==null)z.defaultValue=Q6(z._wrapperState.initialValue);else if(z.defaultValue!==Q6(X))z.defaultValue=Q6(X)}}var m1=!1,X4=!1,_4=!1;function R4(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(!X4)X4=!0,q("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(!_4)_4=!0,q("Pass a `value` prop if you set dangerouslyInnerHTML so React knows which value should be selected.")}}if(Q.selected!=null&&!m1)q("Use the `defaultValue` or `value` props on <select> instead of setting `selected` on <option>."),m1=!0}}function C4(z,Q){if(Q.value!=null)z.setAttribute("value",Q6(J7(Q.value)))}var p4=Array.isArray;function o1(z){return p4(z)}var m8=!1;function fz(){var z=e7();if(z)return`
|
|
30
|
-
|
|
31
|
-
Check the render method of \``+z+"`.";return""}var tQ=["value","defaultValue"];function C3(z){{Cz("select",z);for(var Q=0;Q<tQ.length;Q++){var X=tQ[Q];if(z[X]==null)continue;var Z=o1(z[X]);if(z.multiple&&!Z)q("The `%s` prop supplied to <select> must be an array if `multiple` is true.%s",X,fz());else if(!z.multiple&&Z)q("The `%s` prop supplied to <select> must be a scalar value if `multiple` is false.%s",X,fz())}}}function M7(z,Q,X,Z){var J=z.options;if(Q){var $=X,H={};for(var B=0;B<$.length;B++)H["$"+$[B]]=!0;for(var K=0;K<J.length;K++){var b=H.hasOwnProperty("$"+J[K].value);if(J[K].selected!==b)J[K].selected=b;if(b&&Z)J[K].defaultSelected=!0}}else{var P=Q6(J7(X)),x=null;for(var g=0;g<J.length;g++){if(J[g].value===P){if(J[g].selected=!0,Z)J[g].defaultSelected=!0;return}if(x===null&&!J[g].disabled)x=J[g]}if(x!==null)x.selected=!0}}function sQ(z,Q){return T1({},Q,{value:void 0})}function eQ(z,Q){var X=z;if(C3(Q),X._wrapperState={wasMultiple:!!Q.multiple},Q.value!==void 0&&Q.defaultValue!==void 0&&!m8)q("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"),m8=!0}function v3(z,Q){var X=z;X.multiple=!!Q.multiple;var Z=Q.value;if(Z!=null)M7(X,!!Q.multiple,Z,!1);else if(Q.defaultValue!=null)M7(X,!!Q.multiple,Q.defaultValue,!0)}function _O(z,Q){var X=z,Z=X._wrapperState.wasMultiple;X._wrapperState.wasMultiple=!!Q.multiple;var J=Q.value;if(J!=null)M7(X,!!Q.multiple,J,!1);else if(Z!==!!Q.multiple)if(Q.defaultValue!=null)M7(X,!!Q.multiple,Q.defaultValue,!0);else M7(X,!!Q.multiple,Q.multiple?[]:"",!1)}function RO(z,Q){var X=z,Z=Q.value;if(Z!=null)M7(X,!!Q.multiple,Z,!1)}var Y2=!1;function S3(z,Q){var X=z;if(Q.dangerouslySetInnerHTML!=null)throw Error("`dangerouslySetInnerHTML` does not make sense on <textarea>.");var Z=T1({},Q,{value:void 0,defaultValue:void 0,children:Q6(X._wrapperState.initialValue)});return Z}function $2(z,Q){var X=z;if(Cz("textarea",Q),Q.value!==void 0&&Q.defaultValue!==void 0&&!Y2)q("%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",e7()||"A component"),Y2=!0;var Z=Q.value;if(Z==null){var{children:J,defaultValue:$}=Q;if(J!=null){q("Use the `defaultValue` or `value` props instead of setting children on <textarea>.");{if($!=null)throw Error("If you supply `defaultValue` on a <textarea>, do not pass children.");if(o1(J)){if(J.length>1)throw Error("<textarea> can only have at most one child.");J=J[0]}$=J}}if($==null)$="";Z=$}X._wrapperState={initialValue:J7(Z)}}function H2(z,Q){var X=z,Z=J7(Q.value),J=J7(Q.defaultValue);if(Z!=null){var $=Q6(Z);if($!==X.value)X.value=$;if(Q.defaultValue==null&&X.defaultValue!==$)X.defaultValue=$}if(J!=null)X.defaultValue=Q6(J)}function G2(z,Q){var X=z,Z=X.textContent;if(Z===X._wrapperState.initialValue){if(Z!==""&&Z!==null)X.value=Z}}function NO(z,Q){H2(z,Q)}var P7="http://www.w3.org/1999/xhtml",bO="http://www.w3.org/1998/Math/MathML",f3="http://www.w3.org/2000/svg";function h3(z){switch(z){case"svg":return f3;case"math":return bO;default:return P7}}function y3(z,Q){if(z==null||z===P7)return h3(Q);if(z===f3&&Q==="foreignObject")return P7;return z}var wO=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},QJ,q2=wO(function(z,Q){if(z.namespaceURI===f3){if(!("innerHTML"in z)){QJ=QJ||document.createElement("div"),QJ.innerHTML="<svg>"+Q.valueOf().toString()+"</svg>";var X=QJ.firstChild;while(z.firstChild)z.removeChild(z.firstChild);while(X.firstChild)z.appendChild(X.firstChild);return}}z.innerHTML=Q}),X6=1,A7=3,s4=8,I7=9,V3=11,XJ=function(z,Q){if(Q){var X=z.firstChild;if(X&&X===z.lastChild&&X.nodeType===A7){X.nodeValue=Q;return}}z.textContent=Q},FO={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"]},zX={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 MO(z,Q){return z+Q.charAt(0).toUpperCase()+Q.substring(1)}var PO=["Webkit","ms","Moz","O"];Object.keys(zX).forEach(function(z){PO.forEach(function(Q){zX[MO(Q,z)]=zX[z]})});function D3(z,Q,X){var Z=Q==null||typeof Q==="boolean"||Q==="";if(Z)return"";if(!X&&typeof Q==="number"&&Q!==0&&!(zX.hasOwnProperty(z)&&zX[z]))return Q+"px";return y4(Q,z),(""+Q).trim()}var AO=/([A-Z])/g,IO=/^ms-/;function kO(z){return z.replace(AO,"-$1").toLowerCase().replace(IO,"-ms-")}var B2=function(){};{var TO=/^(?:webkit|moz|o)[A-Z]/,CO=/^-ms-/,vO=/-(.)/g,U2=/;\s*$/,hz={},E3={},K2=!1,W2=!1,SO=function(z){return z.replace(vO,function(Q,X){return X.toUpperCase()})},fO=function(z){if(hz.hasOwnProperty(z)&&hz[z])return;hz[z]=!0,q("Unsupported style property %s. Did you mean %s?",z,SO(z.replace(CO,"ms-")))},hO=function(z){if(hz.hasOwnProperty(z)&&hz[z])return;hz[z]=!0,q("Unsupported vendor-prefixed style property %s. Did you mean %s?",z,z.charAt(0).toUpperCase()+z.slice(1))},yO=function(z,Q){if(E3.hasOwnProperty(Q)&&E3[Q])return;E3[Q]=!0,q(`Style property values shouldn't contain a semicolon. Try "%s: %s" instead.`,z,Q.replace(U2,""))},VO=function(z,Q){if(K2)return;K2=!0,q("`NaN` is an invalid value for the `%s` css style property.",z)},DO=function(z,Q){if(W2)return;W2=!0,q("`Infinity` is an invalid value for the `%s` css style property.",z)};B2=function(z,Q){if(z.indexOf("-")>-1)fO(z);else if(TO.test(z))hO(z);else if(U2.test(Q))yO(z,Q);if(typeof Q==="number"){if(isNaN(Q))VO(z,Q);else if(!isFinite(Q))DO(z,Q)}}}var EO=B2;function mO(z){{var Q="",X="";for(var Z in z){if(!z.hasOwnProperty(Z))continue;var J=z[Z];if(J!=null){var $=Z.indexOf("--")===0;Q+=X+($?Z:kO(Z))+":",Q+=D3(Z,J,$),X=";"}}return Q||null}}function O2(z,Q){var X=z.style;for(var Z in Q){if(!Q.hasOwnProperty(Z))continue;var J=Z.indexOf("--")===0;if(!J)EO(Z,Q[Z]);var $=D3(Z,Q[Z],J);if(Z==="float")Z="cssFloat";if(J)X.setProperty(Z,$);else X[Z]=$}}function uO(z){return z==null||typeof z==="boolean"||z===""}function L2(z){var Q={};for(var X in z){var Z=FO[X]||[X];for(var J=0;J<Z.length;J++)Q[Z[J]]=X}return Q}function gO(z,Q){{if(!Q)return;var X=L2(z),Z=L2(Q),J={};for(var $ in X){var H=X[$],B=Z[$];if(B&&H!==B){var K=H+","+B;if(J[K])continue;J[K]=!0,q("%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.",uO(z[H])?"Removing":"Updating",H,B)}}}}var xO={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},jO=T1({menuitem:!0},xO),pO="__html";function m3(z,Q){if(!Q)return;if(jO[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"||!(pO 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)q("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 u8(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 ZJ={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"},_2={"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},yz={},cO=new RegExp("^(aria)-["+t4+"]*$"),dO=new RegExp("^(aria)[A-Z]["+t4+"]*$");function lO(z,Q){{if(q4.call(yz,Q)&&yz[Q])return!0;if(dO.test(Q)){var X="aria-"+Q.slice(4).toLowerCase(),Z=_2.hasOwnProperty(X)?X:null;if(Z==null)return q("Invalid ARIA attribute `%s`. ARIA attributes follow the pattern aria-* and must be lowercase.",Q),yz[Q]=!0,!0;if(Q!==Z)return q("Invalid ARIA attribute `%s`. Did you mean `%s`?",Q,Z),yz[Q]=!0,!0}if(cO.test(Q)){var J=Q.toLowerCase(),$=_2.hasOwnProperty(J)?J:null;if($==null)return yz[Q]=!0,!1;if(Q!==$)return q("Unknown ARIA attribute `%s`. Did you mean `%s`?",Q,$),yz[Q]=!0,!0}}return!0}function iO(z,Q){{var X=[];for(var Z in Q){var J=lO(z,Z);if(!J)X.push(Z)}var $=X.map(function(H){return"`"+H+"`"}).join(", ");if(X.length===1)q("Invalid aria prop %s on <%s> tag. For details, see https://reactjs.org/link/invalid-aria-props",$,z);else if(X.length>1)q("Invalid aria props %s on <%s> tag. For details, see https://reactjs.org/link/invalid-aria-props",$,z)}}function oO(z,Q){if(u8(z,Q))return;iO(z,Q)}var R2=!1;function aO(z,Q){{if(z!=="input"&&z!=="textarea"&&z!=="select")return;if(Q!=null&&Q.value===null&&!R2)if(R2=!0,z==="select"&&Q.multiple)q("`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 q("`value` prop on `%s` should not be null. Consider using an empty string to clear the component or `undefined` for uncontrolled components.",z)}}var N2=function(){};{var o5={},b2=/^on./,nO=/^on[^A-Z]/,rO=new RegExp("^(aria)-["+t4+"]*$"),tO=new RegExp("^(aria)[A-Z]["+t4+"]*$");N2=function(z,Q,X,Z){if(q4.call(o5,Q)&&o5[Q])return!0;var J=Q.toLowerCase();if(J==="onfocusin"||J==="onfocusout")return q("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."),o5[Q]=!0,!0;if(Z!=null){var{registrationNameDependencies:$,possibleRegistrationNames:H}=Z;if($.hasOwnProperty(Q))return!0;var B=H.hasOwnProperty(J)?H[J]:null;if(B!=null)return q("Invalid event handler property `%s`. Did you mean `%s`?",Q,B),o5[Q]=!0,!0;if(b2.test(Q))return q("Unknown event handler property `%s`. It will be ignored.",Q),o5[Q]=!0,!0}else if(b2.test(Q)){if(nO.test(Q))q("Invalid event handler property `%s`. React events use the camelCase naming convention, for example `onClick`.",Q);return o5[Q]=!0,!0}if(rO.test(Q)||tO.test(Q))return!0;if(J==="innerhtml")return q("Directly setting property `innerHTML` is not permitted. For more information, lookup documentation on `dangerouslySetInnerHTML`."),o5[Q]=!0,!0;if(J==="aria")return q("The `aria` attribute is reserved for future use in React. Pass individual `aria-` attributes instead."),o5[Q]=!0,!0;if(J==="is"&&X!==null&&X!==void 0&&typeof X!=="string")return q("Received a `%s` for a string attribute `is`. If this is expected, cast the value to a string.",typeof X),o5[Q]=!0,!0;if(typeof X==="number"&&isNaN(X))return q("Received NaN for the `%s` attribute. If this is expected, cast the value to a string.",Q),o5[Q]=!0,!0;var K=a4(Q),b=K!==null&&K.type===F5;if(ZJ.hasOwnProperty(J)){var P=ZJ[J];if(P!==Q)return q("Invalid DOM property `%s`. Did you mean `%s`?",Q,P),o5[Q]=!0,!0}else if(!b&&Q!==J)return q("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),o5[Q]=!0,!0;if(typeof X==="boolean"&&V4(Q,X,K,!1)){if(X)q('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 q('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 o5[Q]=!0,!0}if(b)return!0;if(V4(Q,X,K,!1))return o5[Q]=!0,!1;if((X==="false"||X==="true")&&K!==null&&K.type===M4)return q("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),o5[Q]=!0,!0;return!0}}var sO=function(z,Q,X){{var Z=[];for(var J in Q){var $=N2(z,J,Q[J],X);if(!$)Z.push(J)}var H=Z.map(function(B){return"`"+B+"`"}).join(", ");if(Z.length===1)q("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 ",H,z);else if(Z.length>1)q("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 ",H,z)}};function eO(z,Q,X){if(u8(z,Q))return;sO(z,Q,X)}var w2=1,u3=2,QX=4,zL=w2|u3|QX,XX=null;function QL(z){if(XX!==null)q("Expected currently replaying event to be null. This error is likely caused by a bug in React. Please file an issue.");XX=z}function XL(){if(XX===null)q("Expected currently replaying event to not be null. This error is likely caused by a bug in React. Please file an issue.");XX=null}function ZL(z){return z===XX}function g3(z){var Q=z.target||z.srcElement||window;if(Q.correspondingUseElement)Q=Q.correspondingUseElement;return Q.nodeType===A7?Q.parentNode:Q}var x3=null,Vz=null,Dz=null;function F2(z){var Q=q8(z);if(!Q)return;if(typeof x3!=="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=jJ(X);x3(Q.stateNode,Q.type,Z)}}function JL(z){x3=z}function M2(z){if(Vz)if(Dz)Dz.push(z);else Dz=[z];else Vz=z}function YL(){return Vz!==null||Dz!==null}function P2(){if(!Vz)return;var z=Vz,Q=Dz;if(Vz=null,Dz=null,F2(z),Q)for(var X=0;X<Q.length;X++)F2(Q[X])}var A2=function(z,Q){return z(Q)},I2=function(){},j3=!1;function $L(){var z=YL();if(z)I2(),P2()}function k2(z,Q,X){if(j3)return z(Q,X);j3=!0;try{return A2(z,Q,X)}finally{j3=!1,$L()}}function HL(z,Q,X){A2=z,I2=X}function GL(z){return z==="button"||z==="input"||z==="select"||z==="textarea"}function qL(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&&GL(Q));default:return!1}}function ZX(z,Q){var X=z.stateNode;if(X===null)return null;var Z=jJ(X);if(Z===null)return null;var J=Z[Q];if(qL(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 p3=!1;if(f1)try{var JX={};Object.defineProperty(JX,"passive",{get:function(){p3=!0}}),window.addEventListener("test",JX,JX),window.removeEventListener("test",JX,JX)}catch(z){p3=!1}function T2(z,Q,X,Z,J,$,H,B,K){var b=Array.prototype.slice.call(arguments,3);try{Q.apply(X,b)}catch(P){this.onError(P)}}var C2=T2;if(typeof window<"u"&&typeof window.dispatchEvent==="function"&&typeof document<"u"&&typeof document.createEvent==="function"){var c3=document.createElement("react");C2=function(Q,X,Z,J,$,H,B,K,b){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 P=document.createEvent("Event"),x=!1,g=!0,e=window.event,z0=Object.getOwnPropertyDescriptor(window,"event");function Y0(){if(c3.removeEventListener(G0,e0,!1),typeof window.event<"u"&&window.hasOwnProperty("event"))window.event=e}var h0=Array.prototype.slice.call(arguments,3);function e0(){x=!0,Y0(),X.apply(Z,h0),g=!1}var o0,h1=!1,y1=!1;function n(r){if(o0=r.error,h1=!0,o0===null&&r.colno===0&&r.lineno===0)y1=!0;if(r.defaultPrevented){if(o0!=null&&typeof o0==="object")try{o0._suppressLogging=!0}catch(w0){}}}var G0="react-"+(Q?Q:"invokeguardedcallback");if(window.addEventListener("error",n),c3.addEventListener(G0,e0,!1),P.initEvent(G0,!1,!1),c3.dispatchEvent(P),z0)Object.defineProperty(window,"event",z0);if(x&&g){if(!h1)o0=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(y1)o0=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(o0)}if(window.removeEventListener("error",n),!x)return Y0(),T2.apply(this,arguments)}}var BL=C2,Ez=!1,JJ=null,YJ=!1,d3=null,UL={onError:function(z){Ez=!0,JJ=z}};function l3(z,Q,X,Z,J,$,H,B,K){Ez=!1,JJ=null,BL.apply(UL,arguments)}function KL(z,Q,X,Z,J,$,H,B,K){if(l3.apply(this,arguments),Ez){var b=i3();if(!YJ)YJ=!0,d3=b}}function WL(){if(YJ){var z=d3;throw YJ=!1,d3=null,z}}function OL(){return Ez}function i3(){if(Ez){var z=JJ;return Ez=!1,JJ=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 mz(z){return z._reactInternals}function LL(z){return z._reactInternals!==void 0}function _L(z,Q){z._reactInternals=Q}var G1=0,uz=1,e4=2,p1=4,g8=16,YX=32,o3=64,a1=128,k7=256,X8=512,x8=1024,u6=2048,T7=4096,j8=8192,$J=16384,RL=u6|p1|o3|X8|x8|$J,NL=32767,$X=32768,a5=65536,a3=131072,v2=1048576,n3=2097152,p8=4194304,r3=8388608,C7=16777216,HJ=33554432,t3=p1|x8|0,s3=e4|p1|g8|YX|X8|T7|j8,HX=p1|o3|X8|j8,gz=u6|g8,v7=p8|r3|n3,bL=Y.ReactCurrentOwner;function c8(z){var Q=z,X=z;if(!z.alternate){var Z=Q;do{if(Q=Z,(Q.flags&(e4|T7))!==G1)X=Q.return;Z=Q.return}while(Z)}else while(Q.return)Q=Q.return;if(Q.tag===I)return X;return null}function S2(z){if(z.tag===m){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 f2(z){return z.tag===I?z.stateNode.containerInfo:null}function wL(z){return c8(z)===z}function FL(z){{var Q=bL.current;if(Q!==null&&Q.tag===_){var X=Q,Z=X.stateNode;if(!Z._warnedAboutRefsInRender)q("%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.",M1(X)||"A component");Z._warnedAboutRefsInRender=!0}}var J=mz(z);if(!J)return!1;return c8(J)===J}function h2(z){if(c8(z)!==z)throw Error("Unable to find node on an unmounted component.")}function y2(z){var Q=z.alternate;if(!Q){var X=c8(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 $=Z.return;if($===null)break;var H=$.alternate;if(H===null){var B=$.return;if(B!==null){Z=J=B;continue}break}if($.child===H.child){var K=$.child;while(K){if(K===Z)return h2($),z;if(K===J)return h2($),Q;K=K.sibling}throw Error("Unable to find node on an unmounted component.")}if(Z.return!==J.return)Z=$,J=H;else{var b=!1,P=$.child;while(P){if(P===Z){b=!0,Z=$,J=H;break}if(P===J){b=!0,J=$,Z=H;break}P=P.sibling}if(!b){P=H.child;while(P){if(P===Z){b=!0,Z=H,J=$;break}if(P===J){b=!0,J=H,Z=$;break}P=P.sibling}if(!b)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!==I)throw Error("Unable to find node on an unmounted component.");if(Z.stateNode.current===Z)return z;return Q}function V2(z){var Q=y2(z);return Q!==null?D2(Q):null}function D2(z){if(z.tag===N||z.tag===w)return z;var Q=z.child;while(Q!==null){var X=D2(Q);if(X!==null)return X;Q=Q.sibling}return null}function ML(z){var Q=y2(z);return Q!==null?E2(Q):null}function E2(z){if(z.tag===N||z.tag===w)return z;var Q=z.child;while(Q!==null){if(Q.tag!==F){var X=E2(Q);if(X!==null)return X}Q=Q.sibling}return null}var m2=$4.unstable_scheduleCallback,PL=$4.unstable_cancelCallback,AL=$4.unstable_shouldYield,IL=$4.unstable_requestPaint,R5=$4.unstable_now,kL=$4.unstable_getCurrentPriorityLevel,GJ=$4.unstable_ImmediatePriority,e3=$4.unstable_UserBlockingPriority,d8=$4.unstable_NormalPriority,TL=$4.unstable_LowPriority,z$=$4.unstable_IdlePriority,CL=$4.unstable_yieldValue,vL=$4.unstable_setDisableYieldValue,l8=null,P5=null,D0=null,Y7=!1,g6=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u";function SL(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 q("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(P0)z=T1({},z,{getLaneLabelMap:EL,injectProfilingHooks:DL});l8=Q.inject(z),P5=Q}catch(X){q("React instrumentation encountered an error: %s.",X)}if(Q.checkDCE)return!0;else return!1}function fL(z,Q){if(P5&&typeof P5.onScheduleFiberRoot==="function")try{P5.onScheduleFiberRoot(l8,z,Q)}catch(X){if(!Y7)Y7=!0,q("React instrumentation encountered an error: %s",X)}}function hL(z,Q){if(P5&&typeof P5.onCommitFiberRoot==="function")try{var X=(z.current.flags&a1)===a1;if(v0){var Z;switch(Q){case O6:Z=GJ;break;case f7:Z=e3;break;case h7:Z=d8;break;case _J:Z=z$;break;default:Z=d8;break}P5.onCommitFiberRoot(l8,z,Z,X)}else P5.onCommitFiberRoot(l8,z,void 0,X)}catch(J){if(!Y7)Y7=!0,q("React instrumentation encountered an error: %s",J)}}function yL(z){if(P5&&typeof P5.onPostCommitFiberRoot==="function")try{P5.onPostCommitFiberRoot(l8,z)}catch(Q){if(!Y7)Y7=!0,q("React instrumentation encountered an error: %s",Q)}}function VL(z){if(P5&&typeof P5.onCommitFiberUnmount==="function")try{P5.onCommitFiberUnmount(l8,z)}catch(Q){if(!Y7)Y7=!0,q("React instrumentation encountered an error: %s",Q)}}function N5(z){{if(typeof CL==="function")vL(z),U(z);if(P5&&typeof P5.setStrictMode==="function")try{P5.setStrictMode(l8,z)}catch(Q){if(!Y7)Y7=!0,q("React instrumentation encountered an error: %s",Q)}}}function DL(z){D0=z}function EL(){{var z=new Map,Q=1;for(var X=0;X<X$;X++){var Z=X_(Q);z.set(Q,Z),Q*=2}return z}}function mL(z){if(D0!==null&&typeof D0.markCommitStarted==="function")D0.markCommitStarted(z)}function u2(){if(D0!==null&&typeof D0.markCommitStopped==="function")D0.markCommitStopped()}function GX(z){if(D0!==null&&typeof D0.markComponentRenderStarted==="function")D0.markComponentRenderStarted(z)}function xz(){if(D0!==null&&typeof D0.markComponentRenderStopped==="function")D0.markComponentRenderStopped()}function uL(z){if(D0!==null&&typeof D0.markComponentPassiveEffectMountStarted==="function")D0.markComponentPassiveEffectMountStarted(z)}function gL(){if(D0!==null&&typeof D0.markComponentPassiveEffectMountStopped==="function")D0.markComponentPassiveEffectMountStopped()}function xL(z){if(D0!==null&&typeof D0.markComponentPassiveEffectUnmountStarted==="function")D0.markComponentPassiveEffectUnmountStarted(z)}function jL(){if(D0!==null&&typeof D0.markComponentPassiveEffectUnmountStopped==="function")D0.markComponentPassiveEffectUnmountStopped()}function pL(z){if(D0!==null&&typeof D0.markComponentLayoutEffectMountStarted==="function")D0.markComponentLayoutEffectMountStarted(z)}function cL(){if(D0!==null&&typeof D0.markComponentLayoutEffectMountStopped==="function")D0.markComponentLayoutEffectMountStopped()}function g2(z){if(D0!==null&&typeof D0.markComponentLayoutEffectUnmountStarted==="function")D0.markComponentLayoutEffectUnmountStarted(z)}function x2(){if(D0!==null&&typeof D0.markComponentLayoutEffectUnmountStopped==="function")D0.markComponentLayoutEffectUnmountStopped()}function dL(z,Q,X){if(D0!==null&&typeof D0.markComponentErrored==="function")D0.markComponentErrored(z,Q,X)}function lL(z,Q,X){if(D0!==null&&typeof D0.markComponentSuspended==="function")D0.markComponentSuspended(z,Q,X)}function iL(z){if(D0!==null&&typeof D0.markLayoutEffectsStarted==="function")D0.markLayoutEffectsStarted(z)}function oL(){if(D0!==null&&typeof D0.markLayoutEffectsStopped==="function")D0.markLayoutEffectsStopped()}function aL(z){if(D0!==null&&typeof D0.markPassiveEffectsStarted==="function")D0.markPassiveEffectsStarted(z)}function nL(){if(D0!==null&&typeof D0.markPassiveEffectsStopped==="function")D0.markPassiveEffectsStopped()}function j2(z){if(D0!==null&&typeof D0.markRenderStarted==="function")D0.markRenderStarted(z)}function rL(){if(D0!==null&&typeof D0.markRenderYielded==="function")D0.markRenderYielded()}function p2(){if(D0!==null&&typeof D0.markRenderStopped==="function")D0.markRenderStopped()}function tL(z){if(D0!==null&&typeof D0.markRenderScheduled==="function")D0.markRenderScheduled(z)}function sL(z,Q){if(D0!==null&&typeof D0.markForceUpdateScheduled==="function")D0.markForceUpdateScheduled(z,Q)}function Q$(z,Q){if(D0!==null&&typeof D0.markStateUpdateScheduled==="function")D0.markStateUpdateScheduled(z,Q)}var $1=0,u1=1,Z4=2,c4=8,$7=16,c2=Math.clz32?Math.clz32:Q_,eL=Math.log,z_=Math.LN2;function Q_(z){var Q=z>>>0;if(Q===0)return 32;return 31-(eL(Q)/z_|0)|0}var X$=31,N0=0,b5=0,L1=1,jz=2,S7=4,i8=8,H7=16,qX=32,pz=4194240,BX=64,Z$=128,J$=256,Y$=512,$$=1024,H$=2048,G$=4096,q$=8192,B$=16384,U$=32768,K$=65536,W$=131072,O$=262144,L$=524288,_$=1048576,R$=2097152,qJ=130023424,cz=4194304,N$=8388608,b$=16777216,w$=33554432,F$=67108864,d2=cz,UX=134217728,l2=268435455,KX=268435456,o8=536870912,K6=1073741824;function X_(z){{if(z&L1)return"Sync";if(z&jz)return"InputContinuousHydration";if(z&S7)return"InputContinuous";if(z&i8)return"DefaultHydration";if(z&H7)return"Default";if(z&qX)return"TransitionHydration";if(z&pz)return"Transition";if(z&qJ)return"Retry";if(z&UX)return"SelectiveHydration";if(z&KX)return"IdleHydration";if(z&o8)return"Idle";if(z&K6)return"Offscreen"}}var A4=-1,BJ=BX,UJ=cz;function WX(z){switch(a8(z)){case L1:return L1;case jz:return jz;case S7:return S7;case i8:return i8;case H7:return H7;case qX:return qX;case BX:case Z$:case J$:case Y$:case $$:case H$:case G$:case q$:case B$:case U$:case K$:case W$:case O$:case L$:case _$:case R$:return z&pz;case cz:case N$:case b$:case w$:case F$:return z&qJ;case UX:return UX;case KX:return KX;case o8:return o8;case K6:return K6;default:return q("Should have found matching lanes. This is a bug in React."),z}}function KJ(z,Q){var X=z.pendingLanes;if(X===N0)return N0;var Z=N0,J=z.suspendedLanes,$=z.pingedLanes,H=X&l2;if(H!==N0){var B=H&~J;if(B!==N0)Z=WX(B);else{var K=H&$;if(K!==N0)Z=WX(K)}}else{var b=X&~J;if(b!==N0)Z=WX(b);else if($!==N0)Z=WX($)}if(Z===N0)return N0;if(Q!==N0&&Q!==Z&&(Q&J)===N0){var P=a8(Z),x=a8(Q);if(P>=x||P===H7&&(x&pz)!==N0)return Q}if((Z&S7)!==N0)Z|=X&H7;var g=z.entangledLanes;if(g!==N0){var e=z.entanglements,z0=Z&g;while(z0>0){var Y0=n8(z0),h0=1<<Y0;Z|=e[Y0],z0&=~h0}}return Z}function Z_(z,Q){var X=z.eventTimes,Z=A4;while(Q>0){var J=n8(Q),$=1<<J,H=X[J];if(H>Z)Z=H;Q&=~$}return Z}function J_(z,Q){switch(z){case L1:case jz:case S7:return Q+250;case i8:case H7:case qX:case BX:case Z$:case J$:case Y$:case $$:case H$:case G$:case q$:case B$:case U$:case K$:case W$:case O$:case L$:case _$:case R$:return Q+5000;case cz:case N$:case b$:case w$:case F$:return A4;case UX:case KX:case o8:case K6:return A4;default:return q("Should have found matching lanes. This is a bug in React."),A4}}function Y_(z,Q){var{pendingLanes:X,suspendedLanes:Z,pingedLanes:J,expirationTimes:$}=z,H=X;while(H>0){var B=n8(H),K=1<<B,b=$[B];if(b===A4){if((K&Z)===N0||(K&J)!==N0)$[B]=J_(K,Q)}else if(b<=Q)z.expiredLanes|=K;H&=~K}}function $_(z){return WX(z.pendingLanes)}function M$(z){var Q=z.pendingLanes&~K6;if(Q!==N0)return Q;if(Q&K6)return K6;return N0}function H_(z){return(z&L1)!==N0}function P$(z){return(z&l2)!==N0}function i2(z){return(z&qJ)===z}function G_(z){var Q=L1|S7|H7;return(z&Q)===N0}function q_(z){return(z&pz)===z}function WJ(z,Q){var X=jz|S7|i8|H7;return(Q&X)!==N0}function B_(z,Q){return(Q&z.expiredLanes)!==N0}function o2(z){return(z&pz)!==N0}function a2(){var z=BJ;if(BJ<<=1,(BJ&pz)===N0)BJ=BX;return z}function U_(){var z=UJ;if(UJ<<=1,(UJ&qJ)===N0)UJ=cz;return z}function a8(z){return z&-z}function OX(z){return a8(z)}function n8(z){return 31-c2(z)}function A$(z){return n8(z)}function W6(z,Q){return(z&Q)!==N0}function dz(z,Q){return(z&Q)===Q}function I1(z,Q){return z|Q}function OJ(z,Q){return z&~Q}function n2(z,Q){return z&Q}function LJ(z){return z}function K_(z,Q){return z!==b5&&z<Q?z:Q}function I$(z){var Q=[];for(var X=0;X<X$;X++)Q.push(z);return Q}function LX(z,Q,X){if(z.pendingLanes|=Q,Q!==o8)z.suspendedLanes=N0,z.pingedLanes=N0;var Z=z.eventTimes,J=A$(Q);Z[J]=X}function W_(z,Q){z.suspendedLanes|=Q,z.pingedLanes&=~Q;var X=z.expirationTimes,Z=Q;while(Z>0){var J=n8(Z),$=1<<J;X[J]=A4,Z&=~$}}function r2(z,Q,X){z.pingedLanes|=z.suspendedLanes&Q}function O_(z,Q){var X=z.pendingLanes&~Q;z.pendingLanes=Q,z.suspendedLanes=N0,z.pingedLanes=N0,z.expiredLanes&=Q,z.mutableReadLanes&=Q,z.entangledLanes&=Q;var{entanglements:Z,eventTimes:J,expirationTimes:$}=z,H=X;while(H>0){var B=n8(H),K=1<<B;Z[B]=N0,J[B]=A4,$[B]=A4,H&=~K}}function k$(z,Q){var X=z.entangledLanes|=Q,Z=z.entanglements,J=X;while(J){var $=n8(J),H=1<<$;if(H&Q|Z[$]&Q)Z[$]|=Q;J&=~H}}function L_(z,Q){var X=a8(Q),Z;switch(X){case S7:Z=jz;break;case H7:Z=i8;break;case BX:case Z$:case J$:case Y$:case $$:case H$:case G$:case q$:case B$:case U$:case K$:case W$:case O$:case L$:case _$:case R$:case cz:case N$:case b$:case w$:case F$:Z=qX;break;case o8:Z=KX;break;default:Z=b5;break}if((Z&(z.suspendedLanes|Q))!==b5)return b5;return Z}function t2(z,Q,X){if(!g6)return;var Z=z.pendingUpdatersLaneMap;while(X>0){var J=A$(X),$=1<<J,H=Z[J];H.add(Q),X&=~$}}function s2(z,Q){if(!g6)return;var{pendingUpdatersLaneMap:X,memoizedUpdaters:Z}=z;while(Q>0){var J=A$(Q),$=1<<J,H=X[J];if(H.size>0)H.forEach(function(B){var K=B.alternate;if(K===null||!Z.has(K))Z.add(B)}),H.clear();Q&=~$}}function e2(z,Q){return null}var O6=L1,f7=S7,h7=H7,_J=o8,_X=b5;function x6(){return _X}function w5(z){_X=z}function __(z,Q){var X=_X;try{return _X=z,Q()}finally{_X=X}}function R_(z,Q){return z!==0&&z<Q?z:Q}function N_(z,Q){return z===0||z>Q?z:Q}function T$(z,Q){return z!==0&&z<Q}function zq(z){var Q=a8(z);if(!T$(O6,Q))return O6;if(!T$(f7,Q))return f7;if(P$(Q))return h7;return _J}function RJ(z){var Q=z.current.memoizedState;return Q.isDehydrated}var Qq;function b_(z){Qq=z}function w_(z){Qq(z)}var C$;function F_(z){C$=z}var Xq;function M_(z){Xq=z}var Zq;function P_(z){Zq=z}var Jq;function A_(z){Jq=z}var v$=!1,NJ=[],Z8=null,J8=null,Y8=null,RX=new Map,NX=new Map,$8=[],I_=["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 k_(z){return I_.indexOf(z)>-1}function T_(z,Q,X,Z,J){return{blockedOn:z,domEventName:Q,eventSystemFlags:X,nativeEvent:J,targetContainers:[Z]}}function Yq(z,Q){switch(z){case"focusin":case"focusout":Z8=null;break;case"dragenter":case"dragleave":J8=null;break;case"mouseover":case"mouseout":Y8=null;break;case"pointerover":case"pointerout":{var X=Q.pointerId;RX.delete(X);break}case"gotpointercapture":case"lostpointercapture":{var Z=Q.pointerId;NX.delete(Z);break}}}function bX(z,Q,X,Z,J,$){if(z===null||z.nativeEvent!==$){var H=T_(Q,X,Z,J,$);if(Q!==null){var B=q8(Q);if(B!==null)C$(B)}return H}z.eventSystemFlags|=Z;var K=z.targetContainers;if(J!==null&&K.indexOf(J)===-1)K.push(J);return z}function C_(z,Q,X,Z,J){switch(Q){case"focusin":{var $=J;return Z8=bX(Z8,z,Q,X,Z,$),!0}case"dragenter":{var H=J;return J8=bX(J8,z,Q,X,Z,H),!0}case"mouseover":{var B=J;return Y8=bX(Y8,z,Q,X,Z,B),!0}case"pointerover":{var K=J,b=K.pointerId;return RX.set(b,bX(RX.get(b)||null,z,Q,X,Z,K)),!0}case"gotpointercapture":{var P=J,x=P.pointerId;return NX.set(x,bX(NX.get(x)||null,z,Q,X,Z,P)),!0}}return!1}function $q(z){var Q=s8(z.target);if(Q!==null){var X=c8(Q);if(X!==null){var Z=X.tag;if(Z===m){var J=S2(X);if(J!==null){z.blockedOn=J,Jq(z.priority,function(){Xq(X)});return}}else if(Z===I){var $=X.stateNode;if(RJ($)){z.blockedOn=f2(X);return}}}}z.blockedOn=null}function v_(z){var Q=Zq(),X={blockedOn:null,target:z,priority:Q},Z=0;for(;Z<$8.length;Z++)if(!T$(Q,$8[Z].priority))break;if($8.splice(Z,0,X),Z===0)$q(X)}function bJ(z){if(z.blockedOn!==null)return!1;var Q=z.targetContainers;while(Q.length>0){var X=Q[0],Z=h$(z.domEventName,z.eventSystemFlags,X,z.nativeEvent);if(Z===null){var J=z.nativeEvent,$=new J.constructor(J.type,J);QL($),J.target.dispatchEvent($),XL()}else{var H=q8(Z);if(H!==null)C$(H);return z.blockedOn=Z,!1}Q.shift()}return!0}function Hq(z,Q,X){if(bJ(z))X.delete(Q)}function S_(){if(v$=!1,Z8!==null&&bJ(Z8))Z8=null;if(J8!==null&&bJ(J8))J8=null;if(Y8!==null&&bJ(Y8))Y8=null;RX.forEach(Hq),NX.forEach(Hq)}function wX(z,Q){if(z.blockedOn===Q){if(z.blockedOn=null,!v$)v$=!0,$4.unstable_scheduleCallback($4.unstable_NormalPriority,S_)}}function FX(z){if(NJ.length>0){wX(NJ[0],z);for(var Q=1;Q<NJ.length;Q++){var X=NJ[Q];if(X.blockedOn===z)X.blockedOn=null}}if(Z8!==null)wX(Z8,z);if(J8!==null)wX(J8,z);if(Y8!==null)wX(Y8,z);var Z=function(B){return wX(B,z)};RX.forEach(Z),NX.forEach(Z);for(var J=0;J<$8.length;J++){var $=$8[J];if($.blockedOn===z)$.blockedOn=null}while($8.length>0){var H=$8[0];if(H.blockedOn!==null)break;else if($q(H),H.blockedOn===null)$8.shift()}}var lz=Y.ReactCurrentBatchConfig,S$=!0;function Gq(z){S$=!!z}function f_(){return S$}function h_(z,Q,X){var Z=qq(Q),J;switch(Z){case O6:J=y_;break;case f7:J=V_;break;case h7:default:J=f$;break}return J.bind(null,Q,X,z)}function y_(z,Q,X,Z){var J=x6(),$=lz.transition;lz.transition=null;try{w5(O6),f$(z,Q,X,Z)}finally{w5(J),lz.transition=$}}function V_(z,Q,X,Z){var J=x6(),$=lz.transition;lz.transition=null;try{w5(f7),f$(z,Q,X,Z)}finally{w5(J),lz.transition=$}}function f$(z,Q,X,Z){if(!S$)return;D_(z,Q,X,Z)}function D_(z,Q,X,Z){var J=h$(z,Q,X,Z);if(J===null){i$(z,Q,Z,wJ,X),Yq(z,Z);return}if(C_(J,z,Q,X,Z)){Z.stopPropagation();return}if(Yq(z,Z),Q&QX&&k_(z)){while(J!==null){var $=q8(J);if($!==null)w_($);var H=h$(z,Q,X,Z);if(H===null)i$(z,Q,Z,wJ,X);if(H===J)break;J=H}if(J!==null)Z.stopPropagation();return}i$(z,Q,Z,null,X)}var wJ=null;function h$(z,Q,X,Z){wJ=null;var J=g3(Z),$=s8(J);if($!==null){var H=c8($);if(H===null)$=null;else{var B=H.tag;if(B===m){var K=S2(H);if(K!==null)return K;$=null}else if(B===I){var b=H.stateNode;if(RJ(b))return f2(H);$=null}else if(H!==$)$=null}}return wJ=$,null}function qq(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 O6;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 f7;case"message":{var Q=kL();switch(Q){case GJ:return O6;case e3:return f7;case d8:case TL:return h7;case z$:return _J;default:return h7}}default:return h7}}function E_(z,Q,X){return z.addEventListener(Q,X,!1),X}function m_(z,Q,X){return z.addEventListener(Q,X,!0),X}function u_(z,Q,X,Z){return z.addEventListener(Q,X,{capture:!0,passive:Z}),X}function g_(z,Q,X,Z){return z.addEventListener(Q,X,{passive:Z}),X}var MX=null,y$=null,PX=null;function x_(z){return MX=z,y$=Uq(),!0}function j_(){MX=null,y$=null,PX=null}function Bq(){if(PX)return PX;var z,Q=y$,X=Q.length,Z,J=Uq(),$=J.length;for(z=0;z<X;z++)if(Q[z]!==J[z])break;var H=X-z;for(Z=1;Z<=H;Z++)if(Q[X-Z]!==J[$-Z])break;var B=Z>1?1-Z:void 0;return PX=J.slice(z,B),PX}function Uq(){if("value"in MX)return MX.value;return MX.textContent}function FJ(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 MJ(){return!0}function Kq(){return!1}function L6(z){function Q(X,Z,J,$,H){this._reactName=X,this._targetInst=J,this.type=Z,this.nativeEvent=$,this.target=H,this.currentTarget=null;for(var B in z){if(!z.hasOwnProperty(B))continue;var K=z[B];if(K)this[B]=K($);else this[B]=$[B]}var b=$.defaultPrevented!=null?$.defaultPrevented:$.returnValue===!1;if(b)this.isDefaultPrevented=MJ;else this.isDefaultPrevented=Kq;return this.isPropagationStopped=Kq,this}return T1(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=MJ},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=MJ},persist:function(){},isPersistent:MJ}),Q}var iz={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(z){return z.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},V$=L6(iz),AX=T1({},iz,{view:0,detail:0}),p_=L6(AX),D$,E$,IX;function c_(z){if(z!==IX){if(IX&&z.type==="mousemove")D$=z.screenX-IX.screenX,E$=z.screenY-IX.screenY;else D$=0,E$=0;IX=z}}var PJ=T1({},AX,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:u$,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 c_(z),D$},movementY:function(z){if("movementY"in z)return z.movementY;return E$}}),Wq=L6(PJ),d_=T1({},PJ,{dataTransfer:0}),l_=L6(d_),i_=T1({},AX,{relatedTarget:0}),m$=L6(i_),o_=T1({},iz,{animationName:0,elapsedTime:0,pseudoElement:0}),a_=L6(o_),n_=T1({},iz,{clipboardData:function(z){return"clipboardData"in z?z.clipboardData:window.clipboardData}}),r_=L6(n_),t_=T1({},iz,{data:0}),Oq=L6(t_),s_=Oq,e_={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},zR={"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 QR(z){if(z.key){var Q=e_[z.key]||z.key;if(Q!=="Unidentified")return Q}if(z.type==="keypress"){var X=FJ(z);return X===13?"Enter":String.fromCharCode(X)}if(z.type==="keydown"||z.type==="keyup")return zR[z.keyCode]||"Unidentified";return""}var XR={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function ZR(z){var Q=this,X=Q.nativeEvent;if(X.getModifierState)return X.getModifierState(z);var Z=XR[z];return Z?!!X[Z]:!1}function u$(z){return ZR}var JR=T1({},AX,{key:QR,code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:u$,charCode:function(z){if(z.type==="keypress")return FJ(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 FJ(z);if(z.type==="keydown"||z.type==="keyup")return z.keyCode;return 0}}),YR=L6(JR),$R=T1({},PJ,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Lq=L6($R),HR=T1({},AX,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:u$}),GR=L6(HR),qR=T1({},iz,{propertyName:0,elapsedTime:0,pseudoElement:0}),BR=L6(qR),UR=T1({},PJ,{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}),KR=L6(UR),WR=[9,13,27,32],_q=229,g$=f1&&"CompositionEvent"in window,kX=null;if(f1&&"documentMode"in document)kX=document.documentMode;var OR=f1&&"TextEvent"in window&&!kX,Rq=f1&&(!g$||kX&&kX>8&&kX<=11),Nq=32,bq=String.fromCharCode(Nq);function LR(){L0("onBeforeInput",["compositionend","keypress","textInput","paste"]),L0("onCompositionEnd",["compositionend","focusout","keydown","keypress","keyup","mousedown"]),L0("onCompositionStart",["compositionstart","focusout","keydown","keypress","keyup","mousedown"]),L0("onCompositionUpdate",["compositionupdate","focusout","keydown","keypress","keyup","mousedown"])}var wq=!1;function _R(z){return(z.ctrlKey||z.altKey||z.metaKey)&&!(z.ctrlKey&&z.altKey)}function RR(z){switch(z){case"compositionstart":return"onCompositionStart";case"compositionend":return"onCompositionEnd";case"compositionupdate":return"onCompositionUpdate"}}function NR(z,Q){return z==="keydown"&&Q.keyCode===_q}function Fq(z,Q){switch(z){case"keyup":return WR.indexOf(Q.keyCode)!==-1;case"keydown":return Q.keyCode!==_q;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Mq(z){var Q=z.detail;if(typeof Q==="object"&&"data"in Q)return Q.data;return null}function Pq(z){return z.locale==="ko"}var oz=!1;function bR(z,Q,X,Z,J){var $,H;if(g$)$=RR(Q);else if(!oz){if(NR(Q,Z))$="onCompositionStart"}else if(Fq(Q,Z))$="onCompositionEnd";if(!$)return null;if(Rq&&!Pq(Z)){if(!oz&&$==="onCompositionStart")oz=x_(J);else if($==="onCompositionEnd"){if(oz)H=Bq()}}var B=CJ(X,$);if(B.length>0){var K=new Oq($,Q,null,Z,J);if(z.push({event:K,listeners:B}),H)K.data=H;else{var b=Mq(Z);if(b!==null)K.data=b}}}function wR(z,Q){switch(z){case"compositionend":return Mq(Q);case"keypress":var X=Q.which;if(X!==Nq)return null;return wq=!0,bq;case"textInput":var Z=Q.data;if(Z===bq&&wq)return null;return Z;default:return null}}function FR(z,Q){if(oz){if(z==="compositionend"||!g$&&Fq(z,Q)){var X=Bq();return j_(),oz=!1,X}return null}switch(z){case"paste":return null;case"keypress":if(!_R(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 Rq&&!Pq(Q)?null:Q.data;default:return null}}function MR(z,Q,X,Z,J){var $;if(OR)$=wR(Q,Z);else $=FR(Q,Z);if(!$)return null;var H=CJ(X,"onBeforeInput");if(H.length>0){var B=new s_("onBeforeInput","beforeinput",null,Z,J);z.push({event:B,listeners:H}),B.data=$}}function PR(z,Q,X,Z,J,$,H){bR(z,Q,X,Z,J),MR(z,Q,X,Z,J)}var AR={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 Aq(z){var Q=z&&z.nodeName&&z.nodeName.toLowerCase();if(Q==="input")return!!AR[z.type];if(Q==="textarea")return!0;return!1}function IR(z){if(!f1)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 kR(){L0("onChange",["change","click","focusin","focusout","input","keydown","keyup","selectionchange"])}function Iq(z,Q,X,Z){M2(Z);var J=CJ(Q,"onChange");if(J.length>0){var $=new V$("onChange","change",null,X,Z);z.push({event:$,listeners:J})}}var TX=null,CX=null;function TR(z){var Q=z.nodeName&&z.nodeName.toLowerCase();return Q==="select"||Q==="input"&&z.type==="file"}function CR(z){var Q=[];Iq(Q,CX,z,g3(z)),k2(vR,Q)}function vR(z){cq(z,0)}function AJ(z){var Q=ez(z);if(vz(Q))return z}function SR(z,Q){if(z==="change")return Q}var kq=!1;if(f1)kq=IR("input")&&(!document.documentMode||document.documentMode>9);function fR(z,Q){TX=z,CX=Q,TX.attachEvent("onpropertychange",Cq)}function Tq(){if(!TX)return;TX.detachEvent("onpropertychange",Cq),TX=null,CX=null}function Cq(z){if(z.propertyName!=="value")return;if(AJ(CX))CR(z)}function hR(z,Q,X){if(z==="focusin")Tq(),fR(Q,X);else if(z==="focusout")Tq()}function yR(z,Q){if(z==="selectionchange"||z==="keyup"||z==="keydown")return AJ(CX)}function VR(z){var Q=z.nodeName;return Q&&Q.toLowerCase()==="input"&&(z.type==="checkbox"||z.type==="radio")}function DR(z,Q){if(z==="click")return AJ(Q)}function ER(z,Q){if(z==="input"||z==="change")return AJ(Q)}function mR(z){var Q=z._wrapperState;if(!Q||!Q.controlled||z.type!=="number")return;O1(z,"number",z.value)}function uR(z,Q,X,Z,J,$,H){var B=X?ez(X):window,K,b;if(TR(B))K=SR;else if(Aq(B))if(kq)K=ER;else K=yR,b=hR;else if(VR(B))K=DR;if(K){var P=K(Q,X);if(P){Iq(z,P,Z,J);return}}if(b)b(Q,B,X);if(Q==="focusout")mR(B)}function gR(){a0("onMouseEnter",["mouseout","mouseover"]),a0("onMouseLeave",["mouseout","mouseover"]),a0("onPointerEnter",["pointerout","pointerover"]),a0("onPointerLeave",["pointerout","pointerover"])}function xR(z,Q,X,Z,J,$,H){var B=Q==="mouseover"||Q==="pointerover",K=Q==="mouseout"||Q==="pointerout";if(B&&!ZL(Z)){var b=Z.relatedTarget||Z.fromElement;if(b){if(s8(b)||cX(b))return}}if(!K&&!B)return;var P;if(J.window===J)P=J;else{var x=J.ownerDocument;if(x)P=x.defaultView||x.parentWindow;else P=window}var g,e;if(K){var z0=Z.relatedTarget||Z.toElement;if(g=X,e=z0?s8(z0):null,e!==null){var Y0=c8(e);if(e!==Y0||e.tag!==N&&e.tag!==w)e=null}}else g=null,e=X;if(g===e)return;var h0=Wq,e0="onMouseLeave",o0="onMouseEnter",h1="mouse";if(Q==="pointerout"||Q==="pointerover")h0=Lq,e0="onPointerLeave",o0="onPointerEnter",h1="pointer";var y1=g==null?P:ez(g),n=e==null?P:ez(e),G0=new h0(e0,h1+"leave",g,Z,J);G0.target=y1,G0.relatedTarget=n;var r=null,w0=s8(J);if(w0===X){var m0=new h0(o0,h1+"enter",e,Z,J);m0.target=n,m0.relatedTarget=y1,r=m0}BN(z,G0,r,g,e)}function jR(z,Q){return z===Q&&(z!==0||1/z===1/Q)||z!==z&&Q!==Q}var _6=typeof Object.is==="function"?Object.is:jR;function vX(z,Q){if(_6(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 $=X[J];if(!q4.call(Q,$)||!_6(z[$],Q[$]))return!1}return!0}function vq(z){while(z&&z.firstChild)z=z.firstChild;return z}function pR(z){while(z){if(z.nextSibling)return z.nextSibling;z=z.parentNode}}function Sq(z,Q){var X=vq(z),Z=0,J=0;while(X){if(X.nodeType===A7){if(J=Z+X.textContent.length,Z<=Q&&J>=Q)return{node:X,offset:Q-Z};Z=J}X=vq(pR(X))}}function cR(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:$,focusNode:H,focusOffset:B}=Z;try{J.nodeType,H.nodeType}catch(K){return null}return dR(z,J,$,H,B)}function dR(z,Q,X,Z,J){var $=0,H=-1,B=-1,K=0,b=0,P=z,x=null;z:while(!0){var g=null;while(!0){if(P===Q&&(X===0||P.nodeType===A7))H=$+X;if(P===Z&&(J===0||P.nodeType===A7))B=$+J;if(P.nodeType===A7)$+=P.nodeValue.length;if((g=P.firstChild)===null)break;x=P,P=g}while(!0){if(P===z)break z;if(x===Q&&++K===X)H=$;if(x===Z&&++b===J)B=$;if((g=P.nextSibling)!==null)break;P=x,x=P.parentNode}P=g}if(H===-1||B===-1)return null;return{start:H,end:B}}function lR(z,Q){var X=z.ownerDocument||document,Z=X&&X.defaultView||window;if(!Z.getSelection)return;var J=Z.getSelection(),$=z.textContent.length,H=Math.min(Q.start,$),B=Q.end===void 0?H:Math.min(Q.end,$);if(!J.extend&&H>B){var K=B;B=H,H=K}var b=Sq(z,H),P=Sq(z,B);if(b&&P){if(J.rangeCount===1&&J.anchorNode===b.node&&J.anchorOffset===b.offset&&J.focusNode===P.node&&J.focusOffset===P.offset)return;var x=X.createRange();if(x.setStart(b.node,b.offset),J.removeAllRanges(),H>B)J.addRange(x),J.extend(P.node,P.offset);else x.setEnd(P.node,P.offset),J.addRange(x)}}function fq(z){return z&&z.nodeType===A7}function hq(z,Q){if(!z||!Q)return!1;else if(z===Q)return!0;else if(fq(z))return!1;else if(fq(Q))return hq(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 iR(z){return z&&z.ownerDocument&&hq(z.ownerDocument.documentElement,z)}function oR(z){try{return typeof z.contentWindow.location.href==="string"}catch(Q){return!1}}function yq(){var z=window,Q=Q8();while(Q instanceof z.HTMLIFrameElement){if(oR(Q))z=Q.contentWindow;else return Q;Q=Q8(z.document)}return Q}function x$(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 aR(){var z=yq();return{focusedElem:z,selectionRange:x$(z)?rR(z):null}}function nR(z){var Q=yq(),X=z.focusedElem,Z=z.selectionRange;if(Q!==X&&iR(X)){if(Z!==null&&x$(X))tR(X,Z);var J=[],$=X;while($=$.parentNode)if($.nodeType===X6)J.push({element:$,left:$.scrollLeft,top:$.scrollTop});if(typeof X.focus==="function")X.focus();for(var H=0;H<J.length;H++){var B=J[H];B.element.scrollLeft=B.left,B.element.scrollTop=B.top}}}function rR(z){var Q;if("selectionStart"in z)Q={start:z.selectionStart,end:z.selectionEnd};else Q=cR(z);return Q||{start:0,end:0}}function tR(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 lR(z,Q)}var sR=f1&&"documentMode"in document&&document.documentMode<=11;function eR(){L0("onSelect",["focusout","contextmenu","dragend","focusin","keydown","keyup","mousedown","mouseup","selectionchange"])}var az=null,j$=null,SX=null,p$=!1;function zN(z){if("selectionStart"in z&&x$(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 QN(z){return z.window===z?z.document:z.nodeType===I7?z:z.ownerDocument}function Vq(z,Q,X){var Z=QN(X);if(p$||az==null||az!==Q8(Z))return;var J=zN(az);if(!SX||!vX(SX,J)){SX=J;var $=CJ(j$,"onSelect");if($.length>0){var H=new V$("onSelect","select",null,Q,X);z.push({event:H,listeners:$}),H.target=az}}}function XN(z,Q,X,Z,J,$,H){var B=X?ez(X):window;switch(Q){case"focusin":if(Aq(B)||B.contentEditable==="true")az=B,j$=X,SX=null;break;case"focusout":az=null,j$=null,SX=null;break;case"mousedown":p$=!0;break;case"contextmenu":case"mouseup":case"dragend":p$=!1,Vq(z,Z,J);break;case"selectionchange":if(sR)break;case"keydown":case"keyup":Vq(z,Z,J)}}function IJ(z,Q){var X={};return X[z.toLowerCase()]=Q.toLowerCase(),X["Webkit"+z]="webkit"+Q,X["Moz"+z]="moz"+Q,X}var nz={animationend:IJ("Animation","AnimationEnd"),animationiteration:IJ("Animation","AnimationIteration"),animationstart:IJ("Animation","AnimationStart"),transitionend:IJ("Transition","TransitionEnd")},c$={},Dq={};if(f1){if(Dq=document.createElement("div").style,!("AnimationEvent"in window))delete nz.animationend.animation,delete nz.animationiteration.animation,delete nz.animationstart.animation;if(!("TransitionEvent"in window))delete nz.transitionend.transition}function kJ(z){if(c$[z])return c$[z];else if(!nz[z])return z;var Q=nz[z];for(var X in Q)if(Q.hasOwnProperty(X)&&X in Dq)return c$[z]=Q[X];return z}var Eq=kJ("animationend"),mq=kJ("animationiteration"),uq=kJ("animationstart"),gq=kJ("transitionend"),xq=new Map,jq=["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 H8(z,Q){xq.set(z,Q),L0(Q,[z])}function ZN(){for(var z=0;z<jq.length;z++){var Q=jq[z],X=Q.toLowerCase(),Z=Q[0].toUpperCase()+Q.slice(1);H8(X,"on"+Z)}H8(Eq,"onAnimationEnd"),H8(mq,"onAnimationIteration"),H8(uq,"onAnimationStart"),H8("dblclick","onDoubleClick"),H8("focusin","onFocus"),H8("focusout","onBlur"),H8(gq,"onTransitionEnd")}function JN(z,Q,X,Z,J,$,H){var B=xq.get(Q);if(B===void 0)return;var K=V$,b=Q;switch(Q){case"keypress":if(FJ(Z)===0)return;case"keydown":case"keyup":K=YR;break;case"focusin":b="focus",K=m$;break;case"focusout":b="blur",K=m$;break;case"beforeblur":case"afterblur":K=m$;break;case"click":if(Z.button===2)return;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":K=Wq;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":K=l_;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":K=GR;break;case Eq:case mq:case uq:K=a_;break;case gq:K=BR;break;case"scroll":K=p_;break;case"wheel":K=KR;break;case"copy":case"cut":case"paste":K=r_;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":K=Lq;break}var P=($&QX)!==0;{var x=!P&&Q==="scroll",g=GN(X,B,Z.type,P,x);if(g.length>0){var e=new K(B,b,null,Z,J);z.push({event:e,listeners:g})}}}ZN(),gR(),kR(),eR(),LR();function YN(z,Q,X,Z,J,$,H){JN(z,Q,X,Z,J,$);var B=($&zL)===0;if(B)xR(z,Q,X,Z,J),uR(z,Q,X,Z,J),XN(z,Q,X,Z,J),PR(z,Q,X,Z,J)}var fX=["abort","canplay","canplaythrough","durationchange","emptied","encrypted","ended","error","loadeddata","loadedmetadata","loadstart","pause","play","playing","progress","ratechange","resize","seeked","seeking","stalled","suspend","timeupdate","volumechange","waiting"],d$=new Set(["cancel","close","invalid","load","scroll","toggle"].concat(fX));function pq(z,Q,X){var Z=z.type||"unknown-event";z.currentTarget=X,KL(Z,Q,void 0,z),z.currentTarget=null}function $N(z,Q,X){var Z;if(X)for(var J=Q.length-1;J>=0;J--){var $=Q[J],H=$.instance,B=$.currentTarget,K=$.listener;if(H!==Z&&z.isPropagationStopped())return;pq(z,K,B),Z=H}else for(var b=0;b<Q.length;b++){var P=Q[b],x=P.instance,g=P.currentTarget,e=P.listener;if(x!==Z&&z.isPropagationStopped())return;pq(z,e,g),Z=x}}function cq(z,Q){var X=(Q&QX)!==0;for(var Z=0;Z<z.length;Z++){var J=z[Z],$=J.event,H=J.listeners;$N($,H,X)}WL()}function HN(z,Q,X,Z,J){var $=g3(X),H=[];YN(H,z,Z,X,$,Q),cq(H,Q)}function v4(z,Q){if(!d$.has(z))q('Did not expect a listenToNonDelegatedEvent() call for "%s". This is a bug in React. Please file an issue.',z);var X=!1,Z=mb(Q),J=UN(z,X);if(!Z.has(J))dq(Q,z,u3,X),Z.add(J)}function l$(z,Q,X){if(d$.has(z)&&!Q)q('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|=QX;dq(X,z,Z,Q)}var TJ="_reactListening"+Math.random().toString(36).slice(2);function hX(z){if(!z[TJ]){z[TJ]=!0,r0.forEach(function(X){if(X!=="selectionchange"){if(!d$.has(X))l$(X,!1,z);l$(X,!0,z)}});var Q=z.nodeType===I7?z:z.ownerDocument;if(Q!==null){if(!Q[TJ])Q[TJ]=!0,l$("selectionchange",!1,Q)}}}function dq(z,Q,X,Z,J){var $=h_(z,Q,X),H=void 0;if(p3){if(Q==="touchstart"||Q==="touchmove"||Q==="wheel")H=!0}z=z;var B;if(Z)if(H!==void 0)B=u_(z,Q,$,H);else B=m_(z,Q,$);else if(H!==void 0)B=g_(z,Q,$,H);else B=E_(z,Q,$)}function lq(z,Q){return z===Q||z.nodeType===s4&&z.parentNode===Q}function i$(z,Q,X,Z,J){var $=Z;if((Q&w2)===0&&(Q&u3)===0){var H=J;if(Z!==null){var B=Z;z:while(!0){if(B===null)return;var K=B.tag;if(K===I||K===F){var b=B.stateNode.containerInfo;if(lq(b,H))break;if(K===F){var P=B.return;while(P!==null){var x=P.tag;if(x===I||x===F){var g=P.stateNode.containerInfo;if(lq(g,H))return}P=P.return}}while(b!==null){var e=s8(b);if(e===null)return;var z0=e.tag;if(z0===N||z0===w){B=$=e;continue z}b=b.parentNode}}B=B.return}}}k2(function(){return HN(z,Q,X,$)})}function yX(z,Q,X){return{instance:z,listener:Q,currentTarget:X}}function GN(z,Q,X,Z,J,$){var H=Q!==null?Q+"Capture":null,B=Z?H:Q,K=[],b=z,P=null;while(b!==null){var x=b,g=x.stateNode,e=x.tag;if(e===N&&g!==null){if(P=g,B!==null){var z0=ZX(b,B);if(z0!=null)K.push(yX(b,z0,P))}}if(J)break;b=b.return}return K}function CJ(z,Q){var X=Q+"Capture",Z=[],J=z;while(J!==null){var $=J,H=$.stateNode,B=$.tag;if(B===N&&H!==null){var K=H,b=ZX(J,X);if(b!=null)Z.unshift(yX(J,b,K));var P=ZX(J,Q);if(P!=null)Z.push(yX(J,P,K))}J=J.return}return Z}function rz(z){if(z===null)return null;do z=z.return;while(z&&z.tag!==N);if(z)return z;return null}function qN(z,Q){var X=z,Z=Q,J=0;for(var $=X;$;$=rz($))J++;var H=0;for(var B=Z;B;B=rz(B))H++;while(J-H>0)X=rz(X),J--;while(H-J>0)Z=rz(Z),H--;var K=J;while(K--){if(X===Z||Z!==null&&X===Z.alternate)return X;X=rz(X),Z=rz(Z)}return null}function iq(z,Q,X,Z,J){var $=Q._reactName,H=[],B=X;while(B!==null){if(B===Z)break;var K=B,b=K.alternate,P=K.stateNode,x=K.tag;if(b!==null&&b===Z)break;if(x===N&&P!==null){var g=P;if(J){var e=ZX(B,$);if(e!=null)H.unshift(yX(B,e,g))}else if(!J){var z0=ZX(B,$);if(z0!=null)H.push(yX(B,z0,g))}}B=B.return}if(H.length!==0)z.push({event:Q,listeners:H})}function BN(z,Q,X,Z,J){var $=Z&&J?qN(Z,J):null;if(Z!==null)iq(z,Q,Z,$,!1);if(J!==null&&X!==null)iq(z,X,J,$,!0)}function UN(z,Q){return z+"__"+(Q?"capture":"bubble")}var Z6=!1,VX="dangerouslySetInnerHTML",vJ="suppressContentEditableWarning",G8="suppressHydrationWarning",oq="autoFocus",r8="children",t8="style",SJ="__html",o$,fJ,DX,aq,hJ,nq,rq;o$={dialog:!0,webview:!0},fJ=function(z,Q){oO(z,Q),aO(z,Q),eO(z,Q,{registrationNameDependencies:V0,possibleRegistrationNames:H1})},nq=f1&&!document.documentMode,DX=function(z,Q,X){if(Z6)return;var Z=yJ(X),J=yJ(Q);if(J===Z)return;Z6=!0,q("Prop `%s` did not match. Server: %s Client: %s",z,JSON.stringify(J),JSON.stringify(Z))},aq=function(z){if(Z6)return;Z6=!0;var Q=[];z.forEach(function(X){Q.push(X)}),q("Extra attributes from the server: %s",Q)},hJ=function(z,Q){if(Q===!1)q("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 q("Expected `%s` listener to be a function, instead got a value of `%s` type.",z,typeof Q)},rq=function(z,Q){var X=z.namespaceURI===P7?z.ownerDocument.createElement(z.tagName):z.ownerDocument.createElementNS(z.namespaceURI,z.tagName);return X.innerHTML=Q,X.innerHTML};var KN=/\r\n?/g,WN=/\u0000|\uFFFD/g;function yJ(z){D6(z);var Q=typeof z==="string"?z:""+z;return Q.replace(KN,`
|
|
32
|
-
`).replace(WN,"")}function VJ(z,Q,X,Z){var J=yJ(Q),$=yJ(z);if($===J)return;if(Z){if(!Z6)Z6=!0,q('Text content did not match. Server: "%s" Client: "%s"',$,J)}if(X&&F0)throw Error("Text content does not match server-rendered HTML.")}function tq(z){return z.nodeType===I7?z:z.ownerDocument}function ON(){}function DJ(z){z.onclick=ON}function LN(z,Q,X,Z,J){for(var $ in Z){if(!Z.hasOwnProperty($))continue;var H=Z[$];if($===t8){if(H)Object.freeze(H);O2(Q,H)}else if($===VX){var B=H?H[SJ]:void 0;if(B!=null)q2(Q,B)}else if($===r8){if(typeof H==="string"){var K=z!=="textarea"||H!=="";if(K)XJ(Q,H)}else if(typeof H==="number")XJ(Q,""+H)}else if($===vJ||$===G8);else if($===oq);else if(V0.hasOwnProperty($)){if(H!=null){if(typeof H!=="function")hJ($,H);if($==="onScroll")v4("scroll",Q)}}else if(H!=null)V1(Q,$,H,J)}}function _N(z,Q,X,Z){for(var J=0;J<Q.length;J+=2){var $=Q[J],H=Q[J+1];if($===t8)O2(z,H);else if($===VX)q2(z,H);else if($===r8)XJ(z,H);else V1(z,$,H,Z)}}function RN(z,Q,X,Z){var J,$=tq(X),H,B=Z;if(B===P7)B=h3(z);if(B===P7){if(J=u8(z,Q),!J&&z!==z.toLowerCase())q("<%s /> is using incorrect casing. Use PascalCase for React components, or lowercase for HTML elements.",z);if(z==="script"){var K=$.createElement("div");K.innerHTML="<script></script>";var b=K.firstChild;H=K.removeChild(b)}else if(typeof Q.is==="string")H=$.createElement(z,{is:Q.is});else if(H=$.createElement(z),z==="select"){var P=H;if(Q.multiple)P.multiple=!0;else if(Q.size)P.size=Q.size}}else H=$.createElementNS(B,z);if(B===P7){if(!J&&Object.prototype.toString.call(H)==="[object HTMLUnknownElement]"&&!q4.call(o$,z))o$[z]=!0,q("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 H}function NN(z,Q){return tq(Q).createTextNode(z)}function bN(z,Q,X,Z){var J=u8(Q,X);fJ(Q,X);var $;switch(Q){case"dialog":v4("cancel",z),v4("close",z),$=X;break;case"iframe":case"object":case"embed":v4("load",z),$=X;break;case"video":case"audio":for(var H=0;H<fX.length;H++)v4(fX[H],z);$=X;break;case"source":v4("error",z),$=X;break;case"img":case"image":case"link":v4("error",z),v4("load",z),$=X;break;case"details":v4("toggle",z),$=X;break;case"input":y(z,X),$=W(z,X),v4("invalid",z);break;case"option":R4(z,X),$=X;break;case"select":eQ(z,X),$=sQ(z,X),v4("invalid",z);break;case"textarea":$2(z,X),$=S3(z,X),v4("invalid",z);break;default:$=X}switch(m3(Q,$),LN(Q,z,Z,$,J),Q){case"input":F7(z),A0(z,X,!1);break;case"textarea":F7(z),G2(z);break;case"option":C4(z,X);break;case"select":v3(z,X);break;default:if(typeof $.onClick==="function")DJ(z);break}}function wN(z,Q,X,Z,J){fJ(Q,Z);var $=null,H,B;switch(Q){case"input":H=W(z,X),B=W(z,Z),$=[];break;case"select":H=sQ(z,X),B=sQ(z,Z),$=[];break;case"textarea":H=S3(z,X),B=S3(z,Z),$=[];break;default:if(H=X,B=Z,typeof H.onClick!=="function"&&typeof B.onClick==="function")DJ(z);break}m3(Q,B);var K,b,P=null;for(K in H){if(B.hasOwnProperty(K)||!H.hasOwnProperty(K)||H[K]==null)continue;if(K===t8){var x=H[K];for(b in x)if(x.hasOwnProperty(b)){if(!P)P={};P[b]=""}}else if(K===VX||K===r8);else if(K===vJ||K===G8);else if(K===oq);else if(V0.hasOwnProperty(K)){if(!$)$=[]}else($=$||[]).push(K,null)}for(K in B){var g=B[K],e=H!=null?H[K]:void 0;if(!B.hasOwnProperty(K)||g===e||g==null&&e==null)continue;if(K===t8){if(g)Object.freeze(g);if(e){for(b in e)if(e.hasOwnProperty(b)&&(!g||!g.hasOwnProperty(b))){if(!P)P={};P[b]=""}for(b in g)if(g.hasOwnProperty(b)&&e[b]!==g[b]){if(!P)P={};P[b]=g[b]}}else{if(!P){if(!$)$=[];$.push(K,P)}P=g}}else if(K===VX){var z0=g?g[SJ]:void 0,Y0=e?e[SJ]:void 0;if(z0!=null){if(Y0!==z0)($=$||[]).push(K,z0)}}else if(K===r8){if(typeof g==="string"||typeof g==="number")($=$||[]).push(K,""+g)}else if(K===vJ||K===G8);else if(V0.hasOwnProperty(K)){if(g!=null){if(typeof g!=="function")hJ(K,g);if(K==="onScroll")v4("scroll",z)}if(!$&&e!==g)$=[]}else($=$||[]).push(K,g)}if(P)gO(P,B[t8]),($=$||[]).push(t8,P);return $}function FN(z,Q,X,Z,J){if(X==="input"&&J.type==="radio"&&J.name!=null)s(z,J);var $=u8(X,Z),H=u8(X,J);switch(_N(z,Q,$,H),X){case"input":$0(z,J);break;case"textarea":H2(z,J);break;case"select":_O(z,J);break}}function MN(z){{var Q=z.toLowerCase();if(!ZJ.hasOwnProperty(Q))return null;return ZJ[Q]||null}}function PN(z,Q,X,Z,J,$,H){var B,K;switch(B=u8(Q,X),fJ(Q,X),Q){case"dialog":v4("cancel",z),v4("close",z);break;case"iframe":case"object":case"embed":v4("load",z);break;case"video":case"audio":for(var b=0;b<fX.length;b++)v4(fX[b],z);break;case"source":v4("error",z);break;case"img":case"image":case"link":v4("error",z),v4("load",z);break;case"details":v4("toggle",z);break;case"input":y(z,X),v4("invalid",z);break;case"option":R4(z,X);break;case"select":eQ(z,X),v4("invalid",z);break;case"textarea":$2(z,X),v4("invalid",z);break}m3(Q,X);{K=new Set;var P=z.attributes;for(var x=0;x<P.length;x++){var g=P[x].name.toLowerCase();switch(g){case"value":break;case"checked":break;case"selected":break;default:K.add(P[x].name)}}}var e=null;for(var z0 in X){if(!X.hasOwnProperty(z0))continue;var Y0=X[z0];if(z0===r8){if(typeof Y0==="string"){if(z.textContent!==Y0){if(X[G8]!==!0)VJ(z.textContent,Y0,$,H);e=[r8,Y0]}}else if(typeof Y0==="number"){if(z.textContent!==""+Y0){if(X[G8]!==!0)VJ(z.textContent,Y0,$,H);e=[r8,""+Y0]}}}else if(V0.hasOwnProperty(z0)){if(Y0!=null){if(typeof Y0!=="function")hJ(z0,Y0);if(z0==="onScroll")v4("scroll",z)}}else if(H&&!0&&typeof B==="boolean"){var h0=void 0,e0=B&&J0?null:a4(z0);if(X[G8]===!0);else if(z0===vJ||z0===G8||z0==="value"||z0==="checked"||z0==="selected");else if(z0===VX){var o0=z.innerHTML,h1=Y0?Y0[SJ]:void 0;if(h1!=null){var y1=rq(z,h1);if(y1!==o0)DX(z0,o0,y1)}}else if(z0===t8){if(K.delete(z0),nq){var n=mO(Y0);if(h0=z.getAttribute("style"),n!==h0)DX(z0,h0,n)}}else if(B&&!J0){if(K.delete(z0.toLowerCase()),h0=m6(z,z0,Y0),Y0!==h0)DX(z0,h0,Y0)}else if(!s1(z0,e0,B)&&!H4(z0,Y0,e0,B)){var G0=!1;if(e0!==null)K.delete(e0.attributeName),h0=m5(z,z0,Y0,e0);else{var r=Z;if(r===P7)r=h3(Q);if(r===P7)K.delete(z0.toLowerCase());else{var w0=MN(z0);if(w0!==null&&w0!==z0)G0=!0,K.delete(w0);K.delete(z0)}h0=m6(z,z0,Y0)}var m0=J0;if(!m0&&Y0!==h0&&!G0)DX(z0,h0,Y0)}}}if(H){if(K.size>0&&X[G8]!==!0)aq(K)}switch(Q){case"input":F7(z),A0(z,X,!0);break;case"textarea":F7(z),G2(z);break;case"select":case"option":break;default:if(typeof X.onClick==="function")DJ(z);break}return e}function AN(z,Q,X){var Z=z.nodeValue!==Q;return Z}function a$(z,Q){{if(Z6)return;Z6=!0,q("Did not expect server HTML to contain a <%s> in <%s>.",Q.nodeName.toLowerCase(),z.nodeName.toLowerCase())}}function n$(z,Q){{if(Z6)return;Z6=!0,q('Did not expect server HTML to contain the text node "%s" in <%s>.',Q.nodeValue,z.nodeName.toLowerCase())}}function r$(z,Q,X){{if(Z6)return;Z6=!0,q("Expected server HTML to contain a matching <%s> in <%s>.",Q,z.nodeName.toLowerCase())}}function t$(z,Q){{if(Q==="")return;if(Z6)return;Z6=!0,q('Expected server HTML to contain a matching text node for "%s" in <%s>.',Q,z.nodeName.toLowerCase())}}function IN(z,Q,X){switch(Q){case"input":q1(z,X);return;case"textarea":NO(z,X);return;case"select":RO(z,X);return}}var EX=function(){},mX=function(){};{var kN=["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"],sq=["applet","caption","html","table","td","th","marquee","object","template","foreignObject","desc","title"],TN=sq.concat(["button"]),CN=["dd","dt","li","option","optgroup","p","rp","rt"],eq={current:null,formTag:null,aTagInScope:null,buttonTagInScope:null,nobrTagInScope:null,pTagInButtonScope:null,listItemTagAutoclosing:null,dlItemTagAutoclosing:null};mX=function(z,Q){var X=T1({},z||eq),Z={tag:Q};if(sq.indexOf(Q)!==-1)X.aTagInScope=null,X.buttonTagInScope=null,X.nobrTagInScope=null;if(TN.indexOf(Q)!==-1)X.pTagInButtonScope=null;if(kN.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 vN=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 CN.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},SN=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},zB={};EX=function(z,Q,X){X=X||eq;var Z=X.current,J=Z&&Z.tag;if(Q!=null){if(z!=null)q("validateDOMNesting: when childText is passed, childTag should be null");z="#text"}var $=vN(z,J)?null:Z,H=$?null:SN(z,X),B=$||H;if(!B)return;var K=B.tag,b=!!$+"|"+z+"|"+K;if(zB[b])return;zB[b]=!0;var P=z,x="";if(z==="#text")if(/\S/.test(Q))P="Text nodes";else P="Whitespace text nodes",x=" Make sure you don't have any extra whitespace between tags on each line of your source code.";else P="<"+z+">";if($){var g="";if(K==="table"&&z==="tr")g+=" Add a <tbody>, <thead> or <tfoot> to your code to match the DOM tree generated by the browser.";q("validateDOMNesting(...): %s cannot appear as a child of <%s>.%s%s",P,K,x,g)}else q("validateDOMNesting(...): %s cannot appear as a descendant of <%s>.",P,K)}}var EJ="suppressHydrationWarning",mJ="$",uJ="/$",uX="$?",gX="$!",fN="style",s$=null,e$=null;function hN(z){var Q,X,Z=z.nodeType;switch(Z){case I7:case V3:{Q=Z===I7?"#document":"#fragment";var J=z.documentElement;X=J?J.namespaceURI:y3(null,"");break}default:{var $=Z===s4?z.parentNode:z,H=$.namespaceURI||null;Q=$.tagName,X=y3(H,Q);break}}{var B=Q.toLowerCase(),K=mX(null,B);return{namespace:X,ancestorInfo:K}}}function yN(z,Q,X){{var Z=z,J=y3(Z.namespace,Q),$=mX(Z.ancestorInfo,Q);return{namespace:J,ancestorInfo:$}}}function zH(z){return z}function VN(z){s$=f_(),e$=aR();var Q=null;return Gq(!1),Q}function DN(z){nR(e$),Gq(s$),s$=null,e$=null}function EN(z,Q,X,Z,J){var $;{var H=Z;if(EX(z,null,H.ancestorInfo),typeof Q.children==="string"||typeof Q.children==="number"){var B=""+Q.children,K=mX(H.ancestorInfo,z);EX(null,B,K)}$=H.namespace}var b=RN(z,Q,X,$);return pX(J,b),GH(b,Q),b}function mN(z,Q){z.appendChild(Q)}function uN(z,Q,X,Z,J){switch(bN(z,Q,X,Z),Q){case"button":case"input":case"select":case"textarea":return!!X.autoFocus;case"img":return!0;default:return!1}}function gN(z,Q,X,Z,J,$){{var H=$;if(typeof Z.children!==typeof X.children&&(typeof Z.children==="string"||typeof Z.children==="number")){var B=""+Z.children,K=mX(H.ancestorInfo,Q);EX(null,B,K)}}return wN(z,Q,X,Z)}function QH(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 xN(z,Q,X,Z){{var J=X;EX(null,z,J.ancestorInfo)}var $=NN(z,Q);return pX(Z,$),$}function jN(){var z=window.event;if(z===void 0)return h7;return qq(z.type)}var XH=typeof setTimeout==="function"?setTimeout:void 0,pN=typeof clearTimeout==="function"?clearTimeout:void 0,ZH=-1,QB=typeof Promise==="function"?Promise:void 0,cN=typeof queueMicrotask==="function"?queueMicrotask:typeof QB<"u"?function(z){return QB.resolve(null).then(z).catch(dN)}:XH;function dN(z){setTimeout(function(){throw z})}function lN(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 iN(z,Q,X,Z,J,$){FN(z,Q,X,Z,J),GH(z,J)}function XB(z){XJ(z,"")}function oN(z,Q,X){z.nodeValue=X}function aN(z,Q){z.appendChild(Q)}function nN(z,Q){var X;if(z.nodeType===s4)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)DJ(X)}function rN(z,Q,X){z.insertBefore(Q,X)}function tN(z,Q,X){if(z.nodeType===s4)z.parentNode.insertBefore(Q,X);else z.insertBefore(Q,X)}function sN(z,Q){z.removeChild(Q)}function eN(z,Q){if(z.nodeType===s4)z.parentNode.removeChild(Q);else z.removeChild(Q)}function JH(z,Q){var X=Q,Z=0;do{var J=X.nextSibling;if(z.removeChild(X),J&&J.nodeType===s4){var $=J.data;if($===uJ)if(Z===0){z.removeChild(J),FX(Q);return}else Z--;else if($===mJ||$===uX||$===gX)Z++}X=J}while(X);FX(Q)}function zb(z,Q){if(z.nodeType===s4)JH(z.parentNode,Q);else if(z.nodeType===X6)JH(z,Q);FX(z)}function Qb(z){z=z;var Q=z.style;if(typeof Q.setProperty==="function")Q.setProperty("display","none","important");else Q.display="none"}function Xb(z){z.nodeValue=""}function Zb(z,Q){z=z;var X=Q[fN],Z=X!==void 0&&X!==null&&X.hasOwnProperty("display")?X.display:null;z.style.display=D3("display",Z)}function Jb(z,Q){z.nodeValue=Q}function Yb(z){if(z.nodeType===X6)z.textContent="";else if(z.nodeType===I7){if(z.documentElement)z.removeChild(z.documentElement)}}function $b(z,Q,X){if(z.nodeType!==X6||Q.toLowerCase()!==z.nodeName.toLowerCase())return null;return z}function Hb(z,Q){if(Q===""||z.nodeType!==A7)return null;return z}function Gb(z){if(z.nodeType!==s4)return null;return z}function ZB(z){return z.data===uX}function YH(z){return z.data===gX}function qb(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 Bb(z,Q){z._reactRetry=Q}function gJ(z){for(;z!=null;z=z.nextSibling){var Q=z.nodeType;if(Q===X6||Q===A7)break;if(Q===s4){var X=z.data;if(X===mJ||X===gX||X===uX)break;if(X===uJ)return null}}return z}function xX(z){return gJ(z.nextSibling)}function Ub(z){return gJ(z.firstChild)}function Kb(z){return gJ(z.firstChild)}function Wb(z){return gJ(z.nextSibling)}function Ob(z,Q,X,Z,J,$,H){pX($,z),GH(z,X);var B;{var K=J;B=K.namespace}var b=($.mode&u1)!==$1;return PN(z,Q,X,B,Z,b,H)}function Lb(z,Q,X,Z){pX(X,z);var J=(X.mode&u1)!==$1;return AN(z,Q)}function _b(z,Q){pX(Q,z)}function Rb(z){var Q=z.nextSibling,X=0;while(Q){if(Q.nodeType===s4){var Z=Q.data;if(Z===uJ)if(X===0)return xX(Q);else X--;else if(Z===mJ||Z===gX||Z===uX)X++}Q=Q.nextSibling}return null}function JB(z){var Q=z.previousSibling,X=0;while(Q){if(Q.nodeType===s4){var Z=Q.data;if(Z===mJ||Z===gX||Z===uX)if(X===0)return Q;else X--;else if(Z===uJ)X++}Q=Q.previousSibling}return null}function Nb(z){FX(z)}function bb(z){FX(z)}function wb(z){return z!=="head"&&z!=="body"}function Fb(z,Q,X,Z){var J=!0;VJ(Q.nodeValue,X,Z,J)}function Mb(z,Q,X,Z,J,$){if(Q[EJ]!==!0){var H=!0;VJ(Z.nodeValue,J,$,H)}}function Pb(z,Q){if(Q.nodeType===X6)a$(z,Q);else if(Q.nodeType===s4);else n$(z,Q)}function Ab(z,Q){{var X=z.parentNode;if(X!==null)if(Q.nodeType===X6)a$(X,Q);else if(Q.nodeType===s4);else n$(X,Q)}}function Ib(z,Q,X,Z,J){if(J||Q[EJ]!==!0)if(Z.nodeType===X6)a$(X,Z);else if(Z.nodeType===s4);else n$(X,Z)}function kb(z,Q,X){r$(z,Q)}function Tb(z,Q){t$(z,Q)}function Cb(z,Q,X){{var Z=z.parentNode;if(Z!==null)r$(Z,Q)}}function vb(z,Q){{var X=z.parentNode;if(X!==null)t$(X,Q)}}function Sb(z,Q,X,Z,J,$){if($||Q[EJ]!==!0)r$(X,Z)}function fb(z,Q,X,Z,J){if(J||Q[EJ]!==!0)t$(X,Z)}function hb(z){q("An error occurred during hydration. The server HTML was replaced with client content in <%s>.",z.nodeName.toLowerCase())}function yb(z){hX(z)}var tz=Math.random().toString(36).slice(2),sz="__reactFiber$"+tz,$H="__reactProps$"+tz,jX="__reactContainer$"+tz,HH="__reactEvents$"+tz,Vb="__reactListeners$"+tz,Db="__reactHandles$"+tz;function Eb(z){delete z[sz],delete z[$H],delete z[HH],delete z[Vb],delete z[Db]}function pX(z,Q){Q[sz]=z}function xJ(z,Q){Q[jX]=z}function YB(z){z[jX]=null}function cX(z){return!!z[jX]}function s8(z){var Q=z[sz];if(Q)return Q;var X=z.parentNode;while(X){if(Q=X[jX]||X[sz],Q){var Z=Q.alternate;if(Q.child!==null||Z!==null&&Z.child!==null){var J=JB(z);while(J!==null){var $=J[sz];if($)return $;J=JB(J)}}return Q}z=X,X=z.parentNode}return null}function q8(z){var Q=z[sz]||z[jX];if(Q)if(Q.tag===N||Q.tag===w||Q.tag===m||Q.tag===I)return Q;else return null;return null}function ez(z){if(z.tag===N||z.tag===w)return z.stateNode;throw Error("getNodeFromInstance: Invalid argument.")}function jJ(z){return z[$H]||null}function GH(z,Q){z[$H]=Q}function mb(z){var Q=z[HH];if(Q===void 0)Q=z[HH]=new Set;return Q}var $B={},HB=Y.ReactDebugCurrentFrame;function pJ(z){if(z){var Q=z._owner,X=s7(z.type,z._source,Q?Q.type:null);HB.setExtraStackFrame(X)}else HB.setExtraStackFrame(null)}function j6(z,Q,X,Z,J){{var $=Function.call.bind(q4);for(var H in z)if($(z,H)){var B=void 0;try{if(typeof z[H]!=="function"){var K=Error((Z||"React class")+": "+X+" type `"+H+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof z[H]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw K.name="Invariant Violation",K}B=z[H](Q,H,Z,X,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(b){B=b}if(B&&!(B instanceof Error))pJ(J),q("%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,H,typeof B),pJ(null);if(B instanceof Error&&!(B.message in $B))$B[B.message]=!0,pJ(J),q("Failed %s type: %s",X,B.message),pJ(null)}}}var qH=[],cJ;cJ=[];var y7=-1;function B8(z){return{current:z}}function g5(z,Q){if(y7<0){q("Unexpected pop.");return}if(Q!==cJ[y7])q("Unexpected Fiber popped.");z.current=qH[y7],qH[y7]=null,cJ[y7]=null,y7--}function x5(z,Q,X){y7++,qH[y7]=z.current,cJ[y7]=X,z.current=Q}var GB={},R6={};Object.freeze(R6);var V7=B8(R6),G7=B8(!1),BH=R6;function zQ(z,Q,X){{if(X&&q7(Q))return BH;return V7.current}}function qB(z,Q,X){{var Z=z.stateNode;Z.__reactInternalMemoizedUnmaskedChildContext=Q,Z.__reactInternalMemoizedMaskedChildContext=X}}function QQ(z,Q){{var X=z.type,Z=X.contextTypes;if(!Z)return R6;var J=z.stateNode;if(J&&J.__reactInternalMemoizedUnmaskedChildContext===Q)return J.__reactInternalMemoizedMaskedChildContext;var $={};for(var H in Z)$[H]=Q[H];{var B=M1(z)||"Unknown";j6(Z,$,"context",B)}if(J)qB(z,Q,$);return $}}function dJ(){return G7.current}function q7(z){{var Q=z.childContextTypes;return Q!==null&&Q!==void 0}}function lJ(z){g5(G7,z),g5(V7,z)}function UH(z){g5(G7,z),g5(V7,z)}function BB(z,Q,X){{if(V7.current!==R6)throw Error("Unexpected context found on stack. This error is likely caused by a bug in React. Please file an issue.");x5(V7,Q,z),x5(G7,X,z)}}function UB(z,Q,X){{var Z=z.stateNode,J=Q.childContextTypes;if(typeof Z.getChildContext!=="function"){{var $=M1(z)||"Unknown";if(!GB[$])GB[$]=!0,q("%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.",$,$)}return X}var H=Z.getChildContext();for(var B in H)if(!(B in J))throw Error((M1(z)||"Unknown")+'.getChildContext(): key "'+B+'" is not defined in childContextTypes.');{var K=M1(z)||"Unknown";j6(J,H,"child context",K)}return T1({},X,H)}}function iJ(z){{var Q=z.stateNode,X=Q&&Q.__reactInternalMemoizedMergedChildContext||R6;return BH=V7.current,x5(V7,X,z),x5(G7,G7.current,z),!0}}function KB(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=UB(z,Q,BH);Z.__reactInternalMemoizedMergedChildContext=J,g5(G7,z),g5(V7,z),x5(V7,J,z),x5(G7,X,z)}else g5(G7,z),x5(G7,X,z)}}function ub(z){{if(!wL(z)||z.tag!==_)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 I:return Q.stateNode.context;case _:{var X=Q.type;if(q7(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 U8=0,oJ=1,D7=null,KH=!1,WH=!1;function WB(z){if(D7===null)D7=[z];else D7.push(z)}function gb(z){KH=!0,WB(z)}function OB(){if(KH)K8()}function K8(){if(!WH&&D7!==null){WH=!0;var z=0,Q=x6();try{var X=!0,Z=D7;w5(O6);for(;z<Z.length;z++){var J=Z[z];do J=J(X);while(J!==null)}D7=null,KH=!1}catch($){if(D7!==null)D7=D7.slice(z+1);throw m2(GJ,K8),$}finally{w5(Q),WH=!1}}return null}var XQ=[],ZQ=0,aJ=null,nJ=0,P6=[],A6=0,e8=null,E7=1,m7="";function xb(z){return Qz(),(z.flags&v2)!==G1}function jb(z){return Qz(),nJ}function pb(){var z=m7,Q=E7,X=Q&~cb(Q);return X.toString(32)+z}function zz(z,Q){Qz(),XQ[ZQ++]=nJ,XQ[ZQ++]=aJ,aJ=z,nJ=Q}function LB(z,Q,X){Qz(),P6[A6++]=E7,P6[A6++]=m7,P6[A6++]=e8,e8=z;var Z=E7,J=m7,$=rJ(Z)-1,H=Z&~(1<<$),B=X+1,K=rJ(Q)+$;if(K>30){var b=$-$%5,P=(1<<b)-1,x=(H&P).toString(32),g=H>>b,e=$-b,z0=rJ(Q)+e,Y0=B<<e,h0=Y0|g,e0=x+J;E7=1<<z0|h0,m7=e0}else{var o0=B<<$,h1=o0|H,y1=J;E7=1<<K|h1,m7=y1}}function OH(z){Qz();var Q=z.return;if(Q!==null){var X=1,Z=0;zz(z,X),LB(z,X,Z)}}function rJ(z){return 32-c2(z)}function cb(z){return 1<<rJ(z)-1}function LH(z){while(z===aJ)aJ=XQ[--ZQ],XQ[ZQ]=null,nJ=XQ[--ZQ],XQ[ZQ]=null;while(z===e8)e8=P6[--A6],P6[A6]=null,m7=P6[--A6],P6[A6]=null,E7=P6[--A6],P6[A6]=null}function db(){if(Qz(),e8!==null)return{id:E7,overflow:m7};else return null}function lb(z,Q){Qz(),P6[A6++]=E7,P6[A6++]=m7,P6[A6++]=e8,E7=Q.id,m7=Q.overflow,e8=z}function Qz(){if(!I5())q("Expected to be hydrating. This is a bug in React. Please file an issue.")}var A5=null,I6=null,p6=!1,Xz=!1,W8=null;function ib(){if(p6)q("We should not be hydrating here. This is a bug in React. Please file a bug.")}function _B(){Xz=!0}function ob(){return Xz}function ab(z){var Q=z.stateNode.containerInfo;return I6=Kb(Q),A5=z,p6=!0,W8=null,Xz=!1,!0}function nb(z,Q,X){if(I6=Wb(Q),A5=z,p6=!0,W8=null,Xz=!1,X!==null)lb(z,X);return!0}function RB(z,Q){switch(z.tag){case I:{Pb(z.stateNode.containerInfo,Q);break}case N:{var X=(z.mode&u1)!==$1;Ib(z.type,z.memoizedProps,z.stateNode,Q,X);break}case m:{var Z=z.memoizedState;if(Z.dehydrated!==null)Ab(Z.dehydrated,Q);break}}}function NB(z,Q){RB(z,Q);var X=ZP();X.stateNode=Q,X.return=z;var Z=z.deletions;if(Z===null)z.deletions=[X],z.flags|=g8;else Z.push(X)}function _H(z,Q){{if(Xz)return;switch(z.tag){case I:{var X=z.stateNode.containerInfo;switch(Q.tag){case N:var{type:Z,pendingProps:J}=Q;kb(X,Z);break;case w:var $=Q.pendingProps;Tb(X,$);break}break}case N:{var{type:H,memoizedProps:B,stateNode:K}=z;switch(Q.tag){case N:{var{type:b,pendingProps:P}=Q,x=(z.mode&u1)!==$1;Sb(H,B,K,b,P,x);break}case w:{var g=Q.pendingProps,e=(z.mode&u1)!==$1;fb(H,B,K,g,e);break}}break}case m:{var z0=z.memoizedState,Y0=z0.dehydrated;if(Y0!==null)switch(Q.tag){case N:var{type:h0,pendingProps:e0}=Q;Cb(Y0,h0);break;case w:var o0=Q.pendingProps;vb(Y0,o0);break}break}default:return}}}function bB(z,Q){Q.flags=Q.flags&~T7|e4,_H(z,Q)}function wB(z,Q){switch(z.tag){case N:{var{type:X,pendingProps:Z}=z,J=$b(Q,X);if(J!==null)return z.stateNode=J,A5=z,I6=Ub(J),!0;return!1}case w:{var $=z.pendingProps,H=Hb(Q,$);if(H!==null)return z.stateNode=H,A5=z,I6=null,!0;return!1}case m:{var B=Gb(Q);if(B!==null){var K={dehydrated:B,treeContext:db(),retryLane:K6};z.memoizedState=K;var b=JP(B);return b.return=z,z.child=b,A5=z,I6=null,!0}return!1}default:return!1}}function RH(z){return(z.mode&u1)!==$1&&(z.flags&a1)===G1}function NH(z){throw Error("Hydration failed because the initial UI does not match what was rendered on the server.")}function bH(z){if(!p6)return;var Q=I6;if(!Q){if(RH(z))_H(A5,z),NH();bB(A5,z),p6=!1,A5=z;return}var X=Q;if(!wB(z,Q)){if(RH(z))_H(A5,z),NH();Q=xX(X);var Z=A5;if(!Q||!wB(z,Q)){bB(A5,z),p6=!1,A5=z;return}NB(Z,X)}}function rb(z,Q,X){var Z=z.stateNode,J=!Xz,$=Ob(Z,z.type,z.memoizedProps,Q,X,z,J);if(z.updateQueue=$,$!==null)return!0;return!1}function tb(z){var{stateNode:Q,memoizedProps:X}=z,Z=Lb(Q,X,z);if(Z){var J=A5;if(J!==null)switch(J.tag){case I:{var $=J.stateNode.containerInfo,H=(J.mode&u1)!==$1;Fb($,Q,X,H);break}case N:{var{type:B,memoizedProps:K,stateNode:b}=J,P=(J.mode&u1)!==$1;Mb(B,K,b,Q,X,P);break}}}return Z}function sb(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.");_b(X,z)}function eb(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 Rb(X)}function FB(z){var Q=z.return;while(Q!==null&&Q.tag!==N&&Q.tag!==I&&Q.tag!==m)Q=Q.return;A5=Q}function tJ(z){if(z!==A5)return!1;if(!p6)return FB(z),p6=!0,!1;if(z.tag!==I&&(z.tag!==N||wb(z.type)&&!QH(z.type,z.memoizedProps))){var Q=I6;if(Q)if(RH(z))MB(z),NH();else while(Q)NB(z,Q),Q=xX(Q)}if(FB(z),z.tag===m)I6=eb(z);else I6=A5?xX(z.stateNode):null;return!0}function zw(){return p6&&I6!==null}function MB(z){var Q=I6;while(Q)RB(z,Q),Q=xX(Q)}function JQ(){A5=null,I6=null,p6=!1,Xz=!1}function PB(){if(W8!==null)RK(W8),W8=null}function I5(){return p6}function wH(z){if(W8===null)W8=[z];else W8.push(z)}var Qw=Y.ReactCurrentBatchConfig,Xw=null;function Zw(){return Qw.transition}var c6={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&c4)Q=X;X=X.return}return Q},Zz=function(z){var Q=[];return z.forEach(function(X){Q.push(X)}),Q.sort().join(", ")},dX=[],lX=[],iX=[],oX=[],aX=[],nX=[],Jz=new Set;c6.recordUnsafeLifecycleWarnings=function(z,Q){if(Jz.has(z.type))return;if(typeof Q.componentWillMount==="function"&&Q.componentWillMount.__suppressDeprecationWarning!==!0)dX.push(z);if(z.mode&c4&&typeof Q.UNSAFE_componentWillMount==="function")lX.push(z);if(typeof Q.componentWillReceiveProps==="function"&&Q.componentWillReceiveProps.__suppressDeprecationWarning!==!0)iX.push(z);if(z.mode&c4&&typeof Q.UNSAFE_componentWillReceiveProps==="function")oX.push(z);if(typeof Q.componentWillUpdate==="function"&&Q.componentWillUpdate.__suppressDeprecationWarning!==!0)aX.push(z);if(z.mode&c4&&typeof Q.UNSAFE_componentWillUpdate==="function")nX.push(z)},c6.flushPendingUnsafeLifecycleWarnings=function(){var z=new Set;if(dX.length>0)dX.forEach(function(g){z.add(M1(g)||"Component"),Jz.add(g.type)}),dX=[];var Q=new Set;if(lX.length>0)lX.forEach(function(g){Q.add(M1(g)||"Component"),Jz.add(g.type)}),lX=[];var X=new Set;if(iX.length>0)iX.forEach(function(g){X.add(M1(g)||"Component"),Jz.add(g.type)}),iX=[];var Z=new Set;if(oX.length>0)oX.forEach(function(g){Z.add(M1(g)||"Component"),Jz.add(g.type)}),oX=[];var J=new Set;if(aX.length>0)aX.forEach(function(g){J.add(M1(g)||"Component"),Jz.add(g.type)}),aX=[];var $=new Set;if(nX.length>0)nX.forEach(function(g){$.add(M1(g)||"Component"),Jz.add(g.type)}),nX=[];if(Q.size>0){var H=Zz(Q);q(`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`,H)}if(Z.size>0){var B=Zz(Z);q(`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`,B)}if($.size>0){var K=Zz($);q(`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`,K)}if(z.size>0){var b=Zz(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`,b)}if(X.size>0){var P=Zz(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`,P)}if(J.size>0){var x=Zz(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`,x)}};var sJ=new Map,AB=new Set;c6.recordLegacyContextWarning=function(z,Q){var X=Jw(z);if(X===null){q("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(AB.has(z.type))return;var Z=sJ.get(X);if(z.type.contextTypes!=null||z.type.childContextTypes!=null||Q!==null&&typeof Q.getChildContext==="function"){if(Z===void 0)Z=[],sJ.set(X,Z);Z.push(z)}},c6.flushLegacyContextWarning=function(){sJ.forEach(function(z,Q){if(z.length===0)return;var X=z[0],Z=new Set;z.forEach(function($){Z.add(M1($)||"Component"),AB.add($.type)});var J=Zz(Z);try{m4(X),q(`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{_5()}})},c6.discardPendingWarnings=function(){dX=[],lX=[],iX=[],oX=[],aX=[],nX=[],sJ=new Map}}var FH,MH,PH,AH,IH,IB=function(z,Q){};FH=!1,MH=!1,PH={},AH={},IH={},IB=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=M1(Q)||"Component";if(AH[X])return;AH[X]=!0,q('Each child in a list should have a unique "key" prop. See https://reactjs.org/link/warning-keys for more information.')};function Yw(z){return z.prototype&&z.prototype.isReactComponent}function rX(z,Q,X){var Z=X.ref;if(Z!==null&&typeof Z!=="function"&&typeof Z!=="object"){if((z.mode&c4||d)&&!(X._owner&&X._self&&X._owner.stateNode!==X._self)&&!(X._owner&&X._owner.tag!==_)&&!(typeof X.type==="function"&&!Yw(X.type))&&X._owner){var J=M1(z)||"Component";if(!PH[J])q('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),PH[J]=!0}if(X._owner){var $=X._owner,H;if($){var B=$;if(B.tag!==_)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");H=B.stateNode}if(!H)throw Error("Missing owner for string ref "+Z+". This error is likely caused by a bug in React. Please file an issue.");var K=H;k4(Z,"ref");var b=""+Z;if(Q!==null&&Q.ref!==null&&typeof Q.ref==="function"&&Q.ref._stringRef===b)return Q.ref;var P=function(x){var g=K.refs;if(x===null)delete g[b];else g[b]=x};return P._stringRef=b,P}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 eJ(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 zY(z){{var Q=M1(z)||"Component";if(IH[Q])return;IH[Q]=!0,q("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 kB(z){var{_payload:Q,_init:X}=z;return X(Q)}function TB(z){function Q(n,G0){if(!z)return;var r=n.deletions;if(r===null)n.deletions=[G0],n.flags|=g8;else r.push(G0)}function X(n,G0){if(!z)return null;var r=G0;while(r!==null)Q(n,r),r=r.sibling;return null}function Z(n,G0){var r=new Map,w0=G0;while(w0!==null){if(w0.key!==null)r.set(w0.key,w0);else r.set(w0.index,w0);w0=w0.sibling}return r}function J(n,G0){var r=Wz(n,G0);return r.index=0,r.sibling=null,r}function $(n,G0,r){if(n.index=r,!z)return n.flags|=v2,G0;var w0=n.alternate;if(w0!==null){var m0=w0.index;if(m0<G0)return n.flags|=e4,G0;else return m0}else return n.flags|=e4,G0}function H(n){if(z&&n.alternate===null)n.flags|=e4;return n}function B(n,G0,r,w0){if(G0===null||G0.tag!==w){var m0=M9(r,n.mode,w0);return m0.return=n,m0}else{var y0=J(G0,r);return y0.return=n,y0}}function K(n,G0,r,w0){var m0=r.type;if(m0===d1)return P(n,G0,r.props.children,w0,r.key);if(G0!==null){if(G0.elementType===m0||yK(G0,r)||typeof m0==="object"&&m0!==null&&m0.$$typeof===i0&&kB(m0)===G0.type){var y0=J(G0,r.props);return y0.ref=rX(n,G0,r),y0.return=n,y0._debugSource=r._source,y0._debugOwner=r._owner,y0}}var B1=F9(r,n.mode,w0);return B1.ref=rX(n,G0,r),B1.return=n,B1}function b(n,G0,r,w0){if(G0===null||G0.tag!==F||G0.stateNode.containerInfo!==r.containerInfo||G0.stateNode.implementation!==r.implementation){var m0=P9(r,n.mode,w0);return m0.return=n,m0}else{var y0=J(G0,r.children||[]);return y0.return=n,y0}}function P(n,G0,r,w0,m0){if(G0===null||G0.tag!==k){var y0=A8(r,n.mode,w0,m0);return y0.return=n,y0}else{var B1=J(G0,r);return B1.return=n,B1}}function x(n,G0,r){if(typeof G0==="string"&&G0!==""||typeof G0==="number"){var w0=M9(""+G0,n.mode,r);return w0.return=n,w0}if(typeof G0==="object"&&G0!==null){switch(G0.$$typeof){case e1:{var m0=F9(G0,n.mode,r);return m0.ref=rX(n,null,G0),m0.return=n,m0}case B4:{var y0=P9(G0,n.mode,r);return y0.return=n,y0}case i0:{var{_payload:B1,_init:b1}=G0;return x(n,b1(B1),r)}}if(o1(G0)||P4(G0)){var Y4=A8(G0,n.mode,r,null);return Y4.return=n,Y4}eJ(n,G0)}if(typeof G0==="function")zY(n);return null}function g(n,G0,r,w0){var m0=G0!==null?G0.key:null;if(typeof r==="string"&&r!==""||typeof r==="number"){if(m0!==null)return null;return B(n,G0,""+r,w0)}if(typeof r==="object"&&r!==null){switch(r.$$typeof){case e1:if(r.key===m0)return K(n,G0,r,w0);else return null;case B4:if(r.key===m0)return b(n,G0,r,w0);else return null;case i0:{var{_payload:y0,_init:B1}=r;return g(n,G0,B1(y0),w0)}}if(o1(r)||P4(r)){if(m0!==null)return null;return P(n,G0,r,w0,null)}eJ(n,r)}if(typeof r==="function")zY(n);return null}function e(n,G0,r,w0,m0){if(typeof w0==="string"&&w0!==""||typeof w0==="number"){var y0=n.get(r)||null;return B(G0,y0,""+w0,m0)}if(typeof w0==="object"&&w0!==null){switch(w0.$$typeof){case e1:{var B1=n.get(w0.key===null?r:w0.key)||null;return K(G0,B1,w0,m0)}case B4:{var b1=n.get(w0.key===null?r:w0.key)||null;return b(G0,b1,w0,m0)}case i0:var{_payload:Y4,_init:l1}=w0;return e(n,G0,r,l1(Y4),m0)}if(o1(w0)||P4(w0)){var n4=n.get(r)||null;return P(G0,n4,w0,m0,null)}eJ(G0,w0)}if(typeof w0==="function")zY(G0);return null}function z0(n,G0,r){{if(typeof n!=="object"||n===null)return G0;switch(n.$$typeof){case e1:case B4:IB(n,r);var w0=n.key;if(typeof w0!=="string")break;if(G0===null){G0=new Set,G0.add(w0);break}if(!G0.has(w0)){G0.add(w0);break}q("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.",w0);break;case i0:var{_payload:m0,_init:y0}=n;z0(y0(m0),G0,r);break}}return G0}function Y0(n,G0,r,w0){{var m0=null;for(var y0=0;y0<r.length;y0++){var B1=r[y0];m0=z0(B1,m0,n)}}var b1=null,Y4=null,l1=G0,n4=0,i1=0,d4=null;for(;l1!==null&&i1<r.length;i1++){if(l1.index>i1)d4=l1,l1=null;else d4=l1.sibling;var p5=g(n,l1,r[i1],w0);if(p5===null){if(l1===null)l1=d4;break}if(z){if(l1&&p5.alternate===null)Q(n,l1)}if(n4=$(p5,n4,i1),Y4===null)b1=p5;else Y4.sibling=p5;Y4=p5,l1=d4}if(i1===r.length){if(X(n,l1),I5()){var h5=i1;zz(n,h5)}return b1}if(l1===null){for(;i1<r.length;i1++){var b6=x(n,r[i1],w0);if(b6===null)continue;if(n4=$(b6,n4,i1),Y4===null)b1=b6;else Y4.sibling=b6;Y4=b6}if(I5()){var s5=i1;zz(n,s5)}return b1}var e5=Z(n,l1);for(;i1<r.length;i1++){var c5=e(e5,n,i1,r[i1],w0);if(c5!==null){if(z){if(c5.alternate!==null)e5.delete(c5.key===null?i1:c5.key)}if(n4=$(c5,n4,i1),Y4===null)b1=c5;else Y4.sibling=c5;Y4=c5}}if(z)e5.forEach(function(PQ){return Q(n,PQ)});if(I5()){var d7=i1;zz(n,d7)}return b1}function h0(n,G0,r,w0){var m0=P4(r);if(typeof m0!=="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"&&r[Symbol.toStringTag]==="Generator"){if(!MH)q("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.");MH=!0}if(r.entries===m0){if(!FH)q("Using Maps as children is not supported. Use an array of keyed ReactElements instead.");FH=!0}var y0=m0.call(r);if(y0){var B1=null,b1=y0.next();for(;!b1.done;b1=y0.next()){var Y4=b1.value;B1=z0(Y4,B1,n)}}}var l1=m0.call(r);if(l1==null)throw Error("An iterable object provided no iterator.");var n4=null,i1=null,d4=G0,p5=0,h5=0,b6=null,s5=l1.next();for(;d4!==null&&!s5.done;h5++,s5=l1.next()){if(d4.index>h5)b6=d4,d4=null;else b6=d4.sibling;var e5=g(n,d4,s5.value,w0);if(e5===null){if(d4===null)d4=b6;break}if(z){if(d4&&e5.alternate===null)Q(n,d4)}if(p5=$(e5,p5,h5),i1===null)n4=e5;else i1.sibling=e5;i1=e5,d4=b6}if(s5.done){if(X(n,d4),I5()){var c5=h5;zz(n,c5)}return n4}if(d4===null){for(;!s5.done;h5++,s5=l1.next()){var d7=x(n,s5.value,w0);if(d7===null)continue;if(p5=$(d7,p5,h5),i1===null)n4=d7;else i1.sibling=d7;i1=d7}if(I5()){var PQ=h5;zz(n,PQ)}return n4}var CZ=Z(n,d4);for(;!s5.done;h5++,s5=l1.next()){var R7=e(CZ,n,h5,s5.value,w0);if(R7!==null){if(z){if(R7.alternate!==null)CZ.delete(R7.key===null?h5:R7.key)}if(p5=$(R7,p5,h5),i1===null)n4=R7;else i1.sibling=R7;i1=R7}}if(z)CZ.forEach(function(DP){return Q(n,DP)});if(I5()){var VP=h5;zz(n,VP)}return n4}function e0(n,G0,r,w0){if(G0!==null&&G0.tag===w){X(n,G0.sibling);var m0=J(G0,r);return m0.return=n,m0}X(n,G0);var y0=M9(r,n.mode,w0);return y0.return=n,y0}function o0(n,G0,r,w0){var m0=r.key,y0=G0;while(y0!==null){if(y0.key===m0){var B1=r.type;if(B1===d1){if(y0.tag===k){X(n,y0.sibling);var b1=J(y0,r.props.children);return b1.return=n,b1._debugSource=r._source,b1._debugOwner=r._owner,b1}}else if(y0.elementType===B1||yK(y0,r)||typeof B1==="object"&&B1!==null&&B1.$$typeof===i0&&kB(B1)===y0.type){X(n,y0.sibling);var Y4=J(y0,r.props);return Y4.ref=rX(n,y0,r),Y4.return=n,Y4._debugSource=r._source,Y4._debugOwner=r._owner,Y4}X(n,y0);break}else Q(n,y0);y0=y0.sibling}if(r.type===d1){var l1=A8(r.props.children,n.mode,w0,r.key);return l1.return=n,l1}else{var n4=F9(r,n.mode,w0);return n4.ref=rX(n,G0,r),n4.return=n,n4}}function h1(n,G0,r,w0){var m0=r.key,y0=G0;while(y0!==null){if(y0.key===m0)if(y0.tag===F&&y0.stateNode.containerInfo===r.containerInfo&&y0.stateNode.implementation===r.implementation){X(n,y0.sibling);var B1=J(y0,r.children||[]);return B1.return=n,B1}else{X(n,y0);break}else Q(n,y0);y0=y0.sibling}var b1=P9(r,n.mode,w0);return b1.return=n,b1}function y1(n,G0,r,w0){var m0=typeof r==="object"&&r!==null&&r.type===d1&&r.key===null;if(m0)r=r.props.children;if(typeof r==="object"&&r!==null){switch(r.$$typeof){case e1:return H(o0(n,G0,r,w0));case B4:return H(h1(n,G0,r,w0));case i0:var{_payload:y0,_init:B1}=r;return y1(n,G0,B1(y0),w0)}if(o1(r))return Y0(n,G0,r,w0);if(P4(r))return h0(n,G0,r,w0);eJ(n,r)}if(typeof r==="string"&&r!==""||typeof r==="number")return H(e0(n,G0,""+r,w0));if(typeof r==="function")zY(n);return X(n,G0)}return y1}var YQ=TB(!0),CB=TB(!1);function $w(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=Wz(X,X.pendingProps);Q.child=Z,Z.return=Q;while(X.sibling!==null)X=X.sibling,Z=Z.sibling=Wz(X,X.pendingProps),Z.return=Q;Z.sibling=null}function Hw(z,Q){var X=z.child;while(X!==null)sM(X,Q),X=X.sibling}var kH=B8(null),TH;TH={};var QY=null,$Q=null,CH=null,XY=!1;function ZY(){QY=null,$Q=null,CH=null,XY=!1}function vB(){XY=!0}function SB(){XY=!1}function fB(z,Q,X){{x5(kH,Q._currentValue,z),Q._currentValue=X;{if(Q._currentRenderer!==void 0&&Q._currentRenderer!==null&&Q._currentRenderer!==TH)q("Detected multiple renderers concurrently rendering the same context provider. This is currently unsupported.");Q._currentRenderer=TH}}}function vH(z,Q){var X=kH.current;g5(kH,Q),z._currentValue=X}function SH(z,Q,X){var Z=z;while(Z!==null){var J=Z.alternate;if(!dz(Z.childLanes,Q)){if(Z.childLanes=I1(Z.childLanes,Q),J!==null)J.childLanes=I1(J.childLanes,Q)}else if(J!==null&&!dz(J.childLanes,Q))J.childLanes=I1(J.childLanes,Q);if(Z===X)break;Z=Z.return}if(Z!==X)q("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 Gw(z,Q,X){qw(z,Q,X)}function qw(z,Q,X){var Z=z.child;if(Z!==null)Z.return=z;while(Z!==null){var J=void 0,$=Z.dependencies;if($!==null){J=Z.child;var H=$.firstContext;while(H!==null){if(H.context===Q){if(Z.tag===_){var B=OX(X),K=u7(A4,B);K.tag=YY;var b=Z.updateQueue;if(b===null);else{var P=b.shared,x=P.pending;if(x===null)K.next=K;else K.next=x.next,x.next=K;P.pending=K}}Z.lanes=I1(Z.lanes,X);var g=Z.alternate;if(g!==null)g.lanes=I1(g.lanes,X);SH(Z.return,X,z),$.lanes=I1($.lanes,X);break}H=H.next}}else if(Z.tag===D)J=Z.type===z.type?null:Z.child;else if(Z.tag===o){var e=Z.return;if(e===null)throw Error("We just came from a parent so we must have had a parent. This is a bug in React.");e.lanes=I1(e.lanes,X);var z0=e.alternate;if(z0!==null)z0.lanes=I1(z0.lanes,X);SH(e,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 Y0=J.sibling;if(Y0!==null){Y0.return=J.return,J=Y0;break}J=J.return}}Z=J}}function HQ(z,Q){QY=z,$Q=null,CH=null;var X=z.dependencies;if(X!==null){var Z=X.firstContext;if(Z!==null){if(W6(X.lanes,Q))UZ();X.firstContext=null}}}function z5(z){if(XY)q("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(CH===z);else{var X={context:z,memoizedValue:Q,next:null};if($Q===null){if(QY===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().");$Q=X,QY.dependencies={lanes:N0,firstContext:X}}else $Q=$Q.next=X}return Q}var Yz=null;function fH(z){if(Yz===null)Yz=[z];else Yz.push(z)}function Bw(){if(Yz!==null){for(var z=0;z<Yz.length;z++){var Q=Yz[z],X=Q.interleaved;if(X!==null){Q.interleaved=null;var Z=X.next,J=Q.pending;if(J!==null){var $=J.next;J.next=Z,X.next=$}Q.pending=X}}Yz=null}}function hB(z,Q,X,Z){var J=Q.interleaved;if(J===null)X.next=X,fH(Q);else X.next=J.next,J.next=X;return Q.interleaved=X,JY(z,Z)}function Uw(z,Q,X,Z){var J=Q.interleaved;if(J===null)X.next=X,fH(Q);else X.next=J.next,J.next=X;Q.interleaved=X}function Kw(z,Q,X,Z){var J=Q.interleaved;if(J===null)X.next=X,fH(Q);else X.next=J.next,J.next=X;return Q.interleaved=X,JY(z,Z)}function J6(z,Q){return JY(z,Q)}var Ww=JY;function JY(z,Q){z.lanes=I1(z.lanes,Q);var X=z.alternate;if(X!==null)X.lanes=I1(X.lanes,Q);if(X===null&&(z.flags&(e4|T7))!==G1)vK(z);var Z=z,J=z.return;while(J!==null){if(J.childLanes=I1(J.childLanes,Q),X=J.alternate,X!==null)X.childLanes=I1(X.childLanes,Q);else if((J.flags&(e4|T7))!==G1)vK(z);Z=J,J=J.return}if(Z.tag===I){var $=Z.stateNode;return $}else return null}var yB=0,VB=1,YY=2,hH=3,$Y=!1,yH,HY;yH=!1,HY=null;function VH(z){var Q={baseState:z.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:N0},effects:null};z.updateQueue=Q}function DB(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 u7(z,Q){var X={eventTime:z,lane:Q,tag:yB,payload:null,callback:null,next:null};return X}function O8(z,Q,X){var Z=z.updateQueue;if(Z===null)return null;var J=Z.shared;if(HY===J&&!yH)q("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."),yH=!0;if(LM()){var $=J.pending;if($===null)Q.next=Q;else Q.next=$.next,$.next=Q;return J.pending=Q,Ww(z,X)}else return Kw(z,J,Q,X)}function GY(z,Q,X){var Z=Q.updateQueue;if(Z===null)return;var J=Z.shared;if(o2(X)){var $=J.lanes;$=n2($,z.pendingLanes);var H=I1($,X);J.lanes=H,k$(z,H)}}function DH(z,Q){var{updateQueue:X,alternate:Z}=z;if(Z!==null){var J=Z.updateQueue;if(X===J){var $=null,H=null,B=X.firstBaseUpdate;if(B!==null){var K=B;do{var b={eventTime:K.eventTime,lane:K.lane,tag:K.tag,payload:K.payload,callback:K.callback,next:null};if(H===null)$=H=b;else H.next=b,H=b;K=K.next}while(K!==null);if(H===null)$=H=Q;else H.next=Q,H=Q}else $=H=Q;X={baseState:J.baseState,firstBaseUpdate:$,lastBaseUpdate:H,shared:J.shared,effects:J.effects},z.updateQueue=X;return}}var P=X.lastBaseUpdate;if(P===null)X.firstBaseUpdate=Q;else P.next=Q;X.lastBaseUpdate=Q}function Ow(z,Q,X,Z,J,$){switch(X.tag){case VB:{var H=X.payload;if(typeof H==="function"){vB();var B=H.call($,Z,J);{if(z.mode&c4){N5(!0);try{H.call($,Z,J)}finally{N5(!1)}}SB()}return B}return H}case hH:z.flags=z.flags&~a5|a1;case yB:{var K=X.payload,b;if(typeof K==="function"){vB(),b=K.call($,Z,J);{if(z.mode&c4){N5(!0);try{K.call($,Z,J)}finally{N5(!1)}}SB()}}else b=K;if(b===null||b===void 0)return Z;return T1({},Z,b)}case YY:return $Y=!0,Z}return Z}function qY(z,Q,X,Z){var J=z.updateQueue;$Y=!1,HY=J.shared;var{firstBaseUpdate:$,lastBaseUpdate:H}=J,B=J.shared.pending;if(B!==null){J.shared.pending=null;var K=B,b=K.next;if(K.next=null,H===null)$=b;else H.next=b;H=K;var P=z.alternate;if(P!==null){var x=P.updateQueue,g=x.lastBaseUpdate;if(g!==H){if(g===null)x.firstBaseUpdate=b;else g.next=b;x.lastBaseUpdate=K}}}if($!==null){var e=J.baseState,z0=N0,Y0=null,h0=null,e0=null,o0=$;do{var{lane:h1,eventTime:y1}=o0;if(!dz(Z,h1)){var n={eventTime:y1,lane:h1,tag:o0.tag,payload:o0.payload,callback:o0.callback,next:null};if(e0===null)h0=e0=n,Y0=e;else e0=e0.next=n;z0=I1(z0,h1)}else{if(e0!==null){var G0={eventTime:y1,lane:b5,tag:o0.tag,payload:o0.payload,callback:o0.callback,next:null};e0=e0.next=G0}e=Ow(z,J,o0,e,Q,X);var r=o0.callback;if(r!==null&&o0.lane!==b5){z.flags|=o3;var w0=J.effects;if(w0===null)J.effects=[o0];else w0.push(o0)}}if(o0=o0.next,o0===null)if(B=J.shared.pending,B===null)break;else{var m0=B,y0=m0.next;m0.next=null,o0=y0,J.lastBaseUpdate=m0,J.shared.pending=null}}while(!0);if(e0===null)Y0=e;J.baseState=Y0,J.firstBaseUpdate=h0,J.lastBaseUpdate=e0;var B1=J.shared.interleaved;if(B1!==null){var b1=B1;do z0=I1(z0,b1.lane),b1=b1.next;while(b1!==B1)}else if($===null)J.shared.lanes=N0;PZ(z0),z.lanes=z0,z.memoizedState=e}HY=null}function Lw(z,Q){if(typeof z!=="function")throw Error("Invalid argument passed as callback. Expected a function. Instead "+("received: "+z));z.call(Q)}function EB(){$Y=!1}function BY(){return $Y}function mB(z,Q,X){var Z=Q.effects;if(Q.effects=null,Z!==null)for(var J=0;J<Z.length;J++){var $=Z[J],H=$.callback;if(H!==null)$.callback=null,Lw(H,X)}}var tX={},L8=B8(tX),sX=B8(tX),UY=B8(tX);function KY(z){if(z===tX)throw Error("Expected host context to exist. This error is likely caused by a bug in React. Please file an issue.");return z}function uB(){var z=KY(UY.current);return z}function EH(z,Q){x5(UY,Q,z),x5(sX,z,z),x5(L8,tX,z);var X=hN(Q);g5(L8,z),x5(L8,X,z)}function GQ(z){g5(L8,z),g5(sX,z),g5(UY,z)}function mH(){var z=KY(L8.current);return z}function gB(z){var Q=KY(UY.current),X=KY(L8.current),Z=yN(X,z.type);if(X===Z)return;x5(sX,z,z),x5(L8,Z,z)}function uH(z){if(sX.current!==z)return;g5(L8,z),g5(sX,z)}var _w=0,xB=1,jB=1,eX=2,d6=B8(_w);function gH(z,Q){return(z&Q)!==0}function qQ(z){return z&xB}function xH(z,Q){return z&xB|Q}function Rw(z,Q){return z|Q}function _8(z,Q){x5(d6,Q,z)}function BQ(z){g5(d6,z)}function Nw(z,Q){var X=z.memoizedState;if(X!==null){if(X.dehydrated!==null)return!0;return!1}var Z=z.memoizedProps;return!0}function WY(z){var Q=z;while(Q!==null){if(Q.tag===m){var X=Q.memoizedState;if(X!==null){var Z=X.dehydrated;if(Z===null||ZB(Z)||YH(Z))return Q}}else if(Q.tag===t&&Q.memoizedProps.revealOrder!==void 0){var J=(Q.flags&a1)!==G1;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 Y6=0,Z5=1,B7=2,J5=4,k5=8,jH=[];function pH(){for(var z=0;z<jH.length;z++){var Q=jH[z];Q._workInProgressVersionPrimary=null}jH.length=0}function bw(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:E0,ReactCurrentBatchConfig:zZ}=Y,cH,UQ;cH=new Set;var $z=N0,J4=null,Y5=null,$5=null,OY=!1,QZ=!1,XZ=0,ww=0,Fw=25,K0=null,k6=null,R8=-1,dH=!1;function r1(){{var z=K0;if(k6===null)k6=[z];else k6.push(z)}}function f0(){{var z=K0;if(k6!==null){if(R8++,k6[R8]!==z)Mw(z)}}}function KQ(z){if(z!==void 0&&z!==null&&!o1(z))q("%s received a final argument that is not an array (instead, received `%s`). When specified, the final argument must be an array.",K0,typeof z)}function Mw(z){{var Q=M1(J4);if(!cH.has(Q)){if(cH.add(Q),k6!==null){var X="",Z=30;for(var J=0;J<=R8;J++){var $=k6[J],H=J===R8?z:$,B=J+1+". "+$;while(B.length<Z)B+=" ";B+=H+`
|
|
72
|
-
`,X+=B}q(`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 j5(){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 lH(z,Q){if(dH)return!1;if(Q===null)return q("%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.",K0),!1;if(z.length!==Q.length)q(`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`,K0,"["+Q.join(", ")+"]","["+z.join(", ")+"]");for(var X=0;X<Q.length&&X<z.length;X++){if(_6(z[X],Q[X]))continue;return!1}return!0}function WQ(z,Q,X,Z,J,$){if($z=$,J4=Q,k6=z!==null?z._debugHookTypes:null,R8=-1,dH=z!==null&&z.type!==Q.type,Q.memoizedState=null,Q.updateQueue=null,Q.lanes=N0,z!==null&&z.memoizedState!==null)E0.current=qU;else if(k6!==null)E0.current=GU;else E0.current=HU;var H=X(Z,J);if(QZ){var B=0;do{if(QZ=!1,XZ=0,B>=Fw)throw Error("Too many re-renders. React limits the number of renders to prevent an infinite loop.");B+=1,dH=!1,Y5=null,$5=null,Q.updateQueue=null,R8=-1,E0.current=BU,H=X(Z,J)}while(QZ)}E0.current=vY,Q._debugHookTypes=k6;var K=Y5!==null&&Y5.next!==null;if($z=N0,J4=null,Y5=null,$5=null,K0=null,k6=null,R8=-1,z!==null&&(z.flags&v7)!==(Q.flags&v7)&&(z.mode&u1)!==$1)q("Internal React error: Expected static flag was missing. Please notify the React team.");if(OY=!1,K)throw Error("Rendered fewer hooks than expected. This may be caused by an accidental early return statement.");return H}function OQ(){var z=XZ!==0;return XZ=0,z}function pB(z,Q,X){if(Q.updateQueue=z.updateQueue,(Q.mode&$7)!==$1)Q.flags&=~(HJ|C7|u6|p1);else Q.flags&=~(u6|p1);z.lanes=OJ(z.lanes,X)}function cB(){if(E0.current=vY,OY){var z=J4.memoizedState;while(z!==null){var Q=z.queue;if(Q!==null)Q.pending=null;z=z.next}OY=!1}$z=N0,J4=null,Y5=null,$5=null,k6=null,R8=-1,K0=null,XU=!1,QZ=!1,XZ=0}function U7(){var z={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};if($5===null)J4.memoizedState=$5=z;else $5=$5.next=z;return $5}function T6(){var z;if(Y5===null){var Q=J4.alternate;if(Q!==null)z=Q.memoizedState;else z=null}else z=Y5.next;var X;if($5===null)X=J4.memoizedState;else X=$5.next;if(X!==null)$5=X,X=$5.next,Y5=z;else{if(z===null)throw Error("Rendered more hooks than during the previous render.");Y5=z;var Z={memoizedState:Y5.memoizedState,baseState:Y5.baseState,baseQueue:Y5.baseQueue,queue:Y5.queue,next:null};if($5===null)J4.memoizedState=$5=Z;else $5=$5.next=Z}return $5}function dB(){return{lastEffect:null,stores:null}}function iH(z,Q){return typeof Q==="function"?Q(z):Q}function oH(z,Q,X){var Z=U7(),J;if(X!==void 0)J=X(Q);else J=Q;Z.memoizedState=Z.baseState=J;var $={pending:null,interleaved:null,lanes:N0,dispatch:null,lastRenderedReducer:z,lastRenderedState:J};Z.queue=$;var H=$.dispatch=Iw.bind(null,J4,$);return[Z.memoizedState,H]}function aH(z,Q,X){var Z=T6(),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 $=Y5,H=$.baseQueue,B=J.pending;if(B!==null){if(H!==null){var K=H.next,b=B.next;H.next=b,B.next=K}if($.baseQueue!==H)q("Internal error: Expected work-in-progress queue to be a clone. This is a bug in React.");$.baseQueue=H=B,J.pending=null}if(H!==null){var P=H.next,x=$.baseState,g=null,e=null,z0=null,Y0=P;do{var h0=Y0.lane;if(!dz($z,h0)){var e0={lane:h0,action:Y0.action,hasEagerState:Y0.hasEagerState,eagerState:Y0.eagerState,next:null};if(z0===null)e=z0=e0,g=x;else z0=z0.next=e0;J4.lanes=I1(J4.lanes,h0),PZ(h0)}else{if(z0!==null){var o0={lane:b5,action:Y0.action,hasEagerState:Y0.hasEagerState,eagerState:Y0.eagerState,next:null};z0=z0.next=o0}if(Y0.hasEagerState)x=Y0.eagerState;else{var h1=Y0.action;x=z(x,h1)}}Y0=Y0.next}while(Y0!==null&&Y0!==P);if(z0===null)g=x;else z0.next=e;if(!_6(x,Z.memoizedState))UZ();Z.memoizedState=x,Z.baseState=g,Z.baseQueue=z0,J.lastRenderedState=x}var y1=J.interleaved;if(y1!==null){var n=y1;do{var G0=n.lane;J4.lanes=I1(J4.lanes,G0),PZ(G0),n=n.next}while(n!==y1)}else if(H===null)J.lanes=N0;var r=J.dispatch;return[Z.memoizedState,r]}function nH(z,Q,X){var Z=T6(),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:$,pending:H}=J,B=Z.memoizedState;if(H!==null){J.pending=null;var K=H.next,b=K;do{var P=b.action;B=z(B,P),b=b.next}while(b!==K);if(!_6(B,Z.memoizedState))UZ();if(Z.memoizedState=B,Z.baseQueue===null)Z.baseState=B;J.lastRenderedState=B}return[B,$]}function rH(z,Q,X){return}function LY(z,Q,X){return}function tH(z,Q,X){var Z=J4,J=U7(),$,H=I5();if(H){if(X===void 0)throw Error("Missing getServerSnapshot, which is required for server-rendered content. Will revert to client rendering.");if($=X(),!UQ){if($!==X())q("The result of getServerSnapshot should be cached to avoid an infinite loop"),UQ=!0}}else{if($=Q(),!UQ){var B=Q();if(!_6($,B))q("The result of getSnapshot should be cached to avoid an infinite loop"),UQ=!0}var K=aY();if(K===null)throw Error("Expected a work-in-progress root. This is a bug in React. Please file an issue.");if(!WJ(K,$z))lB(Z,Q,$)}J.memoizedState=$;var b={value:$,getSnapshot:Q};return J.queue=b,wY(oB.bind(null,Z,b,z),[z]),Z.flags|=u6,ZZ(Z5|k5,iB.bind(null,Z,b,$,Q),void 0,null),$}function _Y(z,Q,X){var Z=J4,J=T6(),$=Q();if(!UQ){var H=Q();if(!_6($,H))q("The result of getSnapshot should be cached to avoid an infinite loop"),UQ=!0}var B=J.memoizedState,K=!_6(B,$);if(K)J.memoizedState=$,UZ();var b=J.queue;if(YZ(oB.bind(null,Z,b,z),[z]),b.getSnapshot!==Q||K||$5!==null&&$5.memoizedState.tag&Z5){Z.flags|=u6,ZZ(Z5|k5,iB.bind(null,Z,b,$,Q),void 0,null);var P=aY();if(P===null)throw Error("Expected a work-in-progress root. This is a bug in React. Please file an issue.");if(!WJ(P,$z))lB(Z,Q,$)}return $}function lB(z,Q,X){z.flags|=$J;var Z={getSnapshot:Q,value:X},J=J4.updateQueue;if(J===null)J=dB(),J4.updateQueue=J,J.stores=[Z];else{var $=J.stores;if($===null)J.stores=[Z];else $.push(Z)}}function iB(z,Q,X,Z){if(Q.value=X,Q.getSnapshot=Z,aB(Q))nB(z)}function oB(z,Q,X){var Z=function(){if(aB(Q))nB(z)};return X(Z)}function aB(z){var{getSnapshot:Q,value:X}=z;try{var Z=Q();return!_6(X,Z)}catch(J){return!0}}function nB(z){var Q=J6(z,L1);if(Q!==null)B5(Q,z,L1,A4)}function RY(z){var Q=U7();if(typeof z==="function")z=z();Q.memoizedState=Q.baseState=z;var X={pending:null,interleaved:null,lanes:N0,dispatch:null,lastRenderedReducer:iH,lastRenderedState:z};Q.queue=X;var Z=X.dispatch=kw.bind(null,J4,X);return[Q.memoizedState,Z]}function sH(z){return aH(iH)}function eH(z){return nH(iH)}function ZZ(z,Q,X,Z){var J={tag:z,create:Q,destroy:X,deps:Z,next:null},$=J4.updateQueue;if($===null)$=dB(),J4.updateQueue=$,$.lastEffect=J.next=J;else{var H=$.lastEffect;if(H===null)$.lastEffect=J.next=J;else{var B=H.next;H.next=J,J.next=B,$.lastEffect=J}}return J}function zG(z){var Q=U7();{var X={current:z};return Q.memoizedState=X,X}}function NY(z){var Q=T6();return Q.memoizedState}function JZ(z,Q,X,Z){var J=U7(),$=Z===void 0?null:Z;J4.flags|=z,J.memoizedState=ZZ(Z5|Q,X,void 0,$)}function bY(z,Q,X,Z){var J=T6(),$=Z===void 0?null:Z,H=void 0;if(Y5!==null){var B=Y5.memoizedState;if(H=B.destroy,$!==null){var K=B.deps;if(lH($,K)){J.memoizedState=ZZ(Q,X,H,$);return}}}J4.flags|=z,J.memoizedState=ZZ(Z5|Q,X,H,$)}function wY(z,Q){if((J4.mode&$7)!==$1)return JZ(HJ|u6|r3,k5,z,Q);else return JZ(u6|r3,k5,z,Q)}function YZ(z,Q){return bY(u6,k5,z,Q)}function QG(z,Q){return JZ(p1,B7,z,Q)}function FY(z,Q){return bY(p1,B7,z,Q)}function XG(z,Q){var X=p1;if(X|=p8,(J4.mode&$7)!==$1)X|=C7;return JZ(X,J5,z,Q)}function MY(z,Q){return bY(p1,J5,z,Q)}function rB(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"))q("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 $=z();return J.current=$,function(){J.current=null}}}function ZG(z,Q,X){if(typeof Q!=="function")q("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=p1;if(J|=p8,(J4.mode&$7)!==$1)J|=C7;return JZ(J,J5,rB.bind(null,Q,z),Z)}function PY(z,Q,X){if(typeof Q!=="function")q("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 bY(p1,J5,rB.bind(null,Q,z),Z)}function AY(z,Q){}var IY=AY;function JG(z,Q){var X=U7(),Z=Q===void 0?null:Q;return X.memoizedState=[z,Z],z}function kY(z,Q){var X=T6(),Z=Q===void 0?null:Q,J=X.memoizedState;if(J!==null){if(Z!==null){var $=J[1];if(lH(Z,$))return J[0]}}return X.memoizedState=[z,Z],z}function YG(z,Q){var X=U7(),Z=Q===void 0?null:Q,J=z();return X.memoizedState=[J,Z],J}function TY(z,Q){var X=T6(),Z=Q===void 0?null:Q,J=X.memoizedState;if(J!==null){if(Z!==null){var $=J[1];if(lH(Z,$))return J[0]}}var H=z();return X.memoizedState=[H,Z],H}function $G(z){var Q=U7();return Q.memoizedState=z,z}function tB(z){var Q=T6(),X=Y5,Z=X.memoizedState;return eB(Q,Z,z)}function sB(z){var Q=T6();if(Y5===null)return Q.memoizedState=z,z;else{var X=Y5.memoizedState;return eB(Q,X,z)}}function eB(z,Q,X){var Z=!G_($z);if(Z){if(!_6(X,Q)){var J=a2();J4.lanes=I1(J4.lanes,J),PZ(J),z.baseState=!0}return Q}else{if(z.baseState)z.baseState=!1,UZ();return z.memoizedState=X,X}}function Pw(z,Q,X){var Z=x6();w5(R_(Z,f7)),z(!0);var J=zZ.transition;zZ.transition={};var $=zZ.transition;zZ.transition._updatedFibers=new Set;try{z(!1),Q()}finally{if(w5(Z),zZ.transition=J,J===null&&$._updatedFibers){var H=$._updatedFibers.size;if(H>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.");$._updatedFibers.clear()}}}function HG(){var z=RY(!1),Q=z[0],X=z[1],Z=Pw.bind(null,X),J=U7();return J.memoizedState=Z,[Q,Z]}function zU(){var z=sH(),Q=z[0],X=T6(),Z=X.memoizedState;return[Q,Z]}function QU(){var z=eH(),Q=z[0],X=T6(),Z=X.memoizedState;return[Q,Z]}var XU=!1;function Aw(){return XU}function GG(){var z=U7(),Q=aY(),X=Q.identifierPrefix,Z;if(I5()){var J=pb();Z=":"+X+"R"+J;var $=XZ++;if($>0)Z+="H"+$.toString(32);Z+=":"}else{var H=ww++;Z=":"+X+"r"+H.toString(32)+":"}return z.memoizedState=Z,Z}function CY(){var z=T6(),Q=z.memoizedState;return Q}function Iw(z,Q,X){if(typeof arguments[3]==="function")q("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=M8(z),J={lane:Z,action:X,hasEagerState:!1,eagerState:null,next:null};if(ZU(z))JU(Q,J);else{var $=hB(z,Q,J,Z);if($!==null){var H=t5();B5($,z,Z,H),YU($,Q,Z)}}$U(z,Z)}function kw(z,Q,X){if(typeof arguments[3]==="function")q("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=M8(z),J={lane:Z,action:X,hasEagerState:!1,eagerState:null,next:null};if(ZU(z))JU(Q,J);else{var $=z.alternate;if(z.lanes===N0&&($===null||$.lanes===N0)){var H=Q.lastRenderedReducer;if(H!==null){var B;B=E0.current,E0.current=l6;try{var K=Q.lastRenderedState,b=H(K,X);if(J.hasEagerState=!0,J.eagerState=b,_6(b,K)){Uw(z,Q,J,Z);return}}catch(g){}finally{E0.current=B}}}var P=hB(z,Q,J,Z);if(P!==null){var x=t5();B5(P,z,Z,x),YU(P,Q,Z)}}$U(z,Z)}function ZU(z){var Q=z.alternate;return z===J4||Q!==null&&Q===J4}function JU(z,Q){QZ=OY=!0;var X=z.pending;if(X===null)Q.next=Q;else Q.next=X.next,X.next=Q;z.pending=Q}function YU(z,Q,X){if(o2(X)){var Z=Q.lanes;Z=n2(Z,z.pendingLanes);var J=I1(Z,X);Q.lanes=J,k$(z,J)}}function $U(z,Q,X){Q$(z,Q)}var vY={readContext:z5,useCallback:j5,useContext:j5,useEffect:j5,useImperativeHandle:j5,useInsertionEffect:j5,useLayoutEffect:j5,useMemo:j5,useReducer:j5,useRef:j5,useState:j5,useDebugValue:j5,useDeferredValue:j5,useTransition:j5,useMutableSource:j5,useSyncExternalStore:j5,useId:j5,unstable_isNewReconciler:Q1},HU=null,GU=null,qU=null,BU=null,K7=null,l6=null,SY=null;{var qG=function(){q("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().")},_1=function(){q("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")};HU={readContext:function(z){return z5(z)},useCallback:function(z,Q){return K0="useCallback",r1(),KQ(Q),JG(z,Q)},useContext:function(z){return K0="useContext",r1(),z5(z)},useEffect:function(z,Q){return K0="useEffect",r1(),KQ(Q),wY(z,Q)},useImperativeHandle:function(z,Q,X){return K0="useImperativeHandle",r1(),KQ(X),ZG(z,Q,X)},useInsertionEffect:function(z,Q){return K0="useInsertionEffect",r1(),KQ(Q),QG(z,Q)},useLayoutEffect:function(z,Q){return K0="useLayoutEffect",r1(),KQ(Q),XG(z,Q)},useMemo:function(z,Q){K0="useMemo",r1(),KQ(Q);var X=E0.current;E0.current=K7;try{return YG(z,Q)}finally{E0.current=X}},useReducer:function(z,Q,X){K0="useReducer",r1();var Z=E0.current;E0.current=K7;try{return oH(z,Q,X)}finally{E0.current=Z}},useRef:function(z){return K0="useRef",r1(),zG(z)},useState:function(z){K0="useState",r1();var Q=E0.current;E0.current=K7;try{return RY(z)}finally{E0.current=Q}},useDebugValue:function(z,Q){return K0="useDebugValue",r1(),AY()},useDeferredValue:function(z){return K0="useDeferredValue",r1(),$G(z)},useTransition:function(){return K0="useTransition",r1(),HG()},useMutableSource:function(z,Q,X){return K0="useMutableSource",r1(),rH()},useSyncExternalStore:function(z,Q,X){return K0="useSyncExternalStore",r1(),tH(z,Q,X)},useId:function(){return K0="useId",r1(),GG()},unstable_isNewReconciler:Q1},GU={readContext:function(z){return z5(z)},useCallback:function(z,Q){return K0="useCallback",f0(),JG(z,Q)},useContext:function(z){return K0="useContext",f0(),z5(z)},useEffect:function(z,Q){return K0="useEffect",f0(),wY(z,Q)},useImperativeHandle:function(z,Q,X){return K0="useImperativeHandle",f0(),ZG(z,Q,X)},useInsertionEffect:function(z,Q){return K0="useInsertionEffect",f0(),QG(z,Q)},useLayoutEffect:function(z,Q){return K0="useLayoutEffect",f0(),XG(z,Q)},useMemo:function(z,Q){K0="useMemo",f0();var X=E0.current;E0.current=K7;try{return YG(z,Q)}finally{E0.current=X}},useReducer:function(z,Q,X){K0="useReducer",f0();var Z=E0.current;E0.current=K7;try{return oH(z,Q,X)}finally{E0.current=Z}},useRef:function(z){return K0="useRef",f0(),zG(z)},useState:function(z){K0="useState",f0();var Q=E0.current;E0.current=K7;try{return RY(z)}finally{E0.current=Q}},useDebugValue:function(z,Q){return K0="useDebugValue",f0(),AY()},useDeferredValue:function(z){return K0="useDeferredValue",f0(),$G(z)},useTransition:function(){return K0="useTransition",f0(),HG()},useMutableSource:function(z,Q,X){return K0="useMutableSource",f0(),rH()},useSyncExternalStore:function(z,Q,X){return K0="useSyncExternalStore",f0(),tH(z,Q,X)},useId:function(){return K0="useId",f0(),GG()},unstable_isNewReconciler:Q1},qU={readContext:function(z){return z5(z)},useCallback:function(z,Q){return K0="useCallback",f0(),kY(z,Q)},useContext:function(z){return K0="useContext",f0(),z5(z)},useEffect:function(z,Q){return K0="useEffect",f0(),YZ(z,Q)},useImperativeHandle:function(z,Q,X){return K0="useImperativeHandle",f0(),PY(z,Q,X)},useInsertionEffect:function(z,Q){return K0="useInsertionEffect",f0(),FY(z,Q)},useLayoutEffect:function(z,Q){return K0="useLayoutEffect",f0(),MY(z,Q)},useMemo:function(z,Q){K0="useMemo",f0();var X=E0.current;E0.current=l6;try{return TY(z,Q)}finally{E0.current=X}},useReducer:function(z,Q,X){K0="useReducer",f0();var Z=E0.current;E0.current=l6;try{return aH(z,Q,X)}finally{E0.current=Z}},useRef:function(z){return K0="useRef",f0(),NY()},useState:function(z){K0="useState",f0();var Q=E0.current;E0.current=l6;try{return sH(z)}finally{E0.current=Q}},useDebugValue:function(z,Q){return K0="useDebugValue",f0(),IY()},useDeferredValue:function(z){return K0="useDeferredValue",f0(),tB(z)},useTransition:function(){return K0="useTransition",f0(),zU()},useMutableSource:function(z,Q,X){return K0="useMutableSource",f0(),LY()},useSyncExternalStore:function(z,Q,X){return K0="useSyncExternalStore",f0(),_Y(z,Q)},useId:function(){return K0="useId",f0(),CY()},unstable_isNewReconciler:Q1},BU={readContext:function(z){return z5(z)},useCallback:function(z,Q){return K0="useCallback",f0(),kY(z,Q)},useContext:function(z){return K0="useContext",f0(),z5(z)},useEffect:function(z,Q){return K0="useEffect",f0(),YZ(z,Q)},useImperativeHandle:function(z,Q,X){return K0="useImperativeHandle",f0(),PY(z,Q,X)},useInsertionEffect:function(z,Q){return K0="useInsertionEffect",f0(),FY(z,Q)},useLayoutEffect:function(z,Q){return K0="useLayoutEffect",f0(),MY(z,Q)},useMemo:function(z,Q){K0="useMemo",f0();var X=E0.current;E0.current=SY;try{return TY(z,Q)}finally{E0.current=X}},useReducer:function(z,Q,X){K0="useReducer",f0();var Z=E0.current;E0.current=SY;try{return nH(z,Q,X)}finally{E0.current=Z}},useRef:function(z){return K0="useRef",f0(),NY()},useState:function(z){K0="useState",f0();var Q=E0.current;E0.current=SY;try{return eH(z)}finally{E0.current=Q}},useDebugValue:function(z,Q){return K0="useDebugValue",f0(),IY()},useDeferredValue:function(z){return K0="useDeferredValue",f0(),sB(z)},useTransition:function(){return K0="useTransition",f0(),QU()},useMutableSource:function(z,Q,X){return K0="useMutableSource",f0(),LY()},useSyncExternalStore:function(z,Q,X){return K0="useSyncExternalStore",f0(),_Y(z,Q)},useId:function(){return K0="useId",f0(),CY()},unstable_isNewReconciler:Q1},K7={readContext:function(z){return qG(),z5(z)},useCallback:function(z,Q){return K0="useCallback",_1(),r1(),JG(z,Q)},useContext:function(z){return K0="useContext",_1(),r1(),z5(z)},useEffect:function(z,Q){return K0="useEffect",_1(),r1(),wY(z,Q)},useImperativeHandle:function(z,Q,X){return K0="useImperativeHandle",_1(),r1(),ZG(z,Q,X)},useInsertionEffect:function(z,Q){return K0="useInsertionEffect",_1(),r1(),QG(z,Q)},useLayoutEffect:function(z,Q){return K0="useLayoutEffect",_1(),r1(),XG(z,Q)},useMemo:function(z,Q){K0="useMemo",_1(),r1();var X=E0.current;E0.current=K7;try{return YG(z,Q)}finally{E0.current=X}},useReducer:function(z,Q,X){K0="useReducer",_1(),r1();var Z=E0.current;E0.current=K7;try{return oH(z,Q,X)}finally{E0.current=Z}},useRef:function(z){return K0="useRef",_1(),r1(),zG(z)},useState:function(z){K0="useState",_1(),r1();var Q=E0.current;E0.current=K7;try{return RY(z)}finally{E0.current=Q}},useDebugValue:function(z,Q){return K0="useDebugValue",_1(),r1(),AY()},useDeferredValue:function(z){return K0="useDeferredValue",_1(),r1(),$G(z)},useTransition:function(){return K0="useTransition",_1(),r1(),HG()},useMutableSource:function(z,Q,X){return K0="useMutableSource",_1(),r1(),rH()},useSyncExternalStore:function(z,Q,X){return K0="useSyncExternalStore",_1(),r1(),tH(z,Q,X)},useId:function(){return K0="useId",_1(),r1(),GG()},unstable_isNewReconciler:Q1},l6={readContext:function(z){return qG(),z5(z)},useCallback:function(z,Q){return K0="useCallback",_1(),f0(),kY(z,Q)},useContext:function(z){return K0="useContext",_1(),f0(),z5(z)},useEffect:function(z,Q){return K0="useEffect",_1(),f0(),YZ(z,Q)},useImperativeHandle:function(z,Q,X){return K0="useImperativeHandle",_1(),f0(),PY(z,Q,X)},useInsertionEffect:function(z,Q){return K0="useInsertionEffect",_1(),f0(),FY(z,Q)},useLayoutEffect:function(z,Q){return K0="useLayoutEffect",_1(),f0(),MY(z,Q)},useMemo:function(z,Q){K0="useMemo",_1(),f0();var X=E0.current;E0.current=l6;try{return TY(z,Q)}finally{E0.current=X}},useReducer:function(z,Q,X){K0="useReducer",_1(),f0();var Z=E0.current;E0.current=l6;try{return aH(z,Q,X)}finally{E0.current=Z}},useRef:function(z){return K0="useRef",_1(),f0(),NY()},useState:function(z){K0="useState",_1(),f0();var Q=E0.current;E0.current=l6;try{return sH(z)}finally{E0.current=Q}},useDebugValue:function(z,Q){return K0="useDebugValue",_1(),f0(),IY()},useDeferredValue:function(z){return K0="useDeferredValue",_1(),f0(),tB(z)},useTransition:function(){return K0="useTransition",_1(),f0(),zU()},useMutableSource:function(z,Q,X){return K0="useMutableSource",_1(),f0(),LY()},useSyncExternalStore:function(z,Q,X){return K0="useSyncExternalStore",_1(),f0(),_Y(z,Q)},useId:function(){return K0="useId",_1(),f0(),CY()},unstable_isNewReconciler:Q1},SY={readContext:function(z){return qG(),z5(z)},useCallback:function(z,Q){return K0="useCallback",_1(),f0(),kY(z,Q)},useContext:function(z){return K0="useContext",_1(),f0(),z5(z)},useEffect:function(z,Q){return K0="useEffect",_1(),f0(),YZ(z,Q)},useImperativeHandle:function(z,Q,X){return K0="useImperativeHandle",_1(),f0(),PY(z,Q,X)},useInsertionEffect:function(z,Q){return K0="useInsertionEffect",_1(),f0(),FY(z,Q)},useLayoutEffect:function(z,Q){return K0="useLayoutEffect",_1(),f0(),MY(z,Q)},useMemo:function(z,Q){K0="useMemo",_1(),f0();var X=E0.current;E0.current=l6;try{return TY(z,Q)}finally{E0.current=X}},useReducer:function(z,Q,X){K0="useReducer",_1(),f0();var Z=E0.current;E0.current=l6;try{return nH(z,Q,X)}finally{E0.current=Z}},useRef:function(z){return K0="useRef",_1(),f0(),NY()},useState:function(z){K0="useState",_1(),f0();var Q=E0.current;E0.current=l6;try{return eH(z)}finally{E0.current=Q}},useDebugValue:function(z,Q){return K0="useDebugValue",_1(),f0(),IY()},useDeferredValue:function(z){return K0="useDeferredValue",_1(),f0(),sB(z)},useTransition:function(){return K0="useTransition",_1(),f0(),QU()},useMutableSource:function(z,Q,X){return K0="useMutableSource",_1(),f0(),LY()},useSyncExternalStore:function(z,Q,X){return K0="useSyncExternalStore",_1(),f0(),_Y(z,Q)},useId:function(){return K0="useId",_1(),f0(),CY()},unstable_isNewReconciler:Q1}}var N8=$4.unstable_now,UU=0,fY=-1,$Z=-1,hY=-1,BG=!1,yY=!1;function KU(){return BG}function Tw(){yY=!0}function Cw(){BG=!1,yY=!1}function vw(){BG=yY,yY=!1}function WU(){return UU}function OU(){UU=N8()}function UG(z){if($Z=N8(),z.actualStartTime<0)z.actualStartTime=N8()}function LU(z){$Z=-1}function VY(z,Q){if($Z>=0){var X=N8()-$Z;if(z.actualDuration+=X,Q)z.selfBaseDuration=X;$Z=-1}}function W7(z){if(fY>=0){var Q=N8()-fY;fY=-1;var X=z.return;while(X!==null){switch(X.tag){case I:var Z=X.stateNode;Z.effectDuration+=Q;return;case V:var J=X.stateNode;J.effectDuration+=Q;return}X=X.return}}}function KG(z){if(hY>=0){var Q=N8()-hY;hY=-1;var X=z.return;while(X!==null){switch(X.tag){case I:var Z=X.stateNode;if(Z!==null)Z.passiveEffectDuration+=Q;return;case V:var J=X.stateNode;if(J!==null)J.passiveEffectDuration+=Q;return}X=X.return}}}function O7(){fY=N8()}function WG(){hY=N8()}function OG(z){var Q=z.child;while(Q)z.actualDuration+=Q.actualDuration,Q=Q.sibling}function i6(z,Q){if(z&&z.defaultProps){var X=T1({},Q),Z=z.defaultProps;for(var J in Z)if(X[J]===void 0)X[J]=Z[J];return X}return Q}var LG={},_G,RG,NG,bG,wG,_U,DY,FG,MG,PG,HZ;{_G=new Set,RG=new Set,NG=new Set,bG=new Set,FG=new Set,wG=new Set,MG=new Set,PG=new Set,HZ=new Set;var RU=new Set;DY=function(z,Q){if(z===null||typeof z==="function")return;var X=Q+"_"+z;if(!RU.has(X))RU.add(X),q("%s(...): Expected the last optional `callback` argument to be a function. Instead received: %s.",Q,z)},_U=function(z,Q){if(Q===void 0){var X=c1(z)||"Component";if(!wG.has(X))wG.add(X),q("%s.getDerivedStateFromProps(): A valid state object (or null) must be returned. You have returned undefined.",X)}},Object.defineProperty(LG,"_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(LG)}function AG(z,Q,X,Z){var J=z.memoizedState,$=X(Z,J);{if(z.mode&c4){N5(!0);try{$=X(Z,J)}finally{N5(!1)}}_U(Q,$)}var H=$===null||$===void 0?J:T1({},J,$);if(z.memoizedState=H,z.lanes===N0){var B=z.updateQueue;B.baseState=H}}var IG={isMounted:FL,enqueueSetState:function(z,Q,X){var Z=mz(z),J=t5(),$=M8(Z),H=u7(J,$);if(H.payload=Q,X!==void 0&&X!==null)DY(X,"setState"),H.callback=X;var B=O8(Z,H,$);if(B!==null)B5(B,Z,$,J),GY(B,Z,$);Q$(Z,$)},enqueueReplaceState:function(z,Q,X){var Z=mz(z),J=t5(),$=M8(Z),H=u7(J,$);if(H.tag=VB,H.payload=Q,X!==void 0&&X!==null)DY(X,"replaceState"),H.callback=X;var B=O8(Z,H,$);if(B!==null)B5(B,Z,$,J),GY(B,Z,$);Q$(Z,$)},enqueueForceUpdate:function(z,Q){var X=mz(z),Z=t5(),J=M8(X),$=u7(Z,J);if($.tag=YY,Q!==void 0&&Q!==null)DY(Q,"forceUpdate"),$.callback=Q;var H=O8(X,$,J);if(H!==null)B5(H,X,J,Z),GY(H,X,J);sL(X,J)}};function NU(z,Q,X,Z,J,$,H){var B=z.stateNode;if(typeof B.shouldComponentUpdate==="function"){var K=B.shouldComponentUpdate(Z,$,H);{if(z.mode&c4){N5(!0);try{K=B.shouldComponentUpdate(Z,$,H)}finally{N5(!1)}}if(K===void 0)q("%s.shouldComponentUpdate(): Returned undefined instead of a boolean value. Make sure to return true or false.",c1(Q)||"Component")}return K}if(Q.prototype&&Q.prototype.isPureReactComponent)return!vX(X,Z)||!vX(J,$);return!0}function Sw(z,Q,X){var Z=z.stateNode;{var J=c1(Q)||"Component",$=Z.render;if(!$)if(Q.prototype&&typeof Q.prototype.render==="function")q("%s(...): No `render` method found on the returned component instance: did you accidentally return an object from the constructor?",J);else q("%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)q("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)q("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)q("propTypes was defined as an instance property on %s. Use a static property to define propTypes instead.",J);if(Z.contextType)q("contextType was defined as an instance property on %s. Use a static property to define contextType instead.",J);{if(Q.childContextTypes&&!HZ.has(Q)&&(z.mode&c4)===$1)HZ.add(Q),q(`%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&&!HZ.has(Q)&&(z.mode&c4)===$1)HZ.add(Q),q(`%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)q("contextTypes was defined as an instance property on %s. Use a static property to define contextTypes instead.",J);if(Q.contextType&&Q.contextTypes&&!MG.has(Q))MG.add(Q),q("%s declares both contextTypes and contextType static properties. The legacy contextTypes property will be ignored.",J)}if(typeof Z.componentShouldUpdate==="function")q("%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")q("%s has a method called shouldComponentUpdate(). shouldComponentUpdate should not be used when extending React.PureComponent. Please extend React.Component if shouldComponentUpdate is used.",c1(Q)||"A pure component");if(typeof Z.componentDidUnmount==="function")q("%s has a method called componentDidUnmount(). But there is no such lifecycle method. Did you mean componentWillUnmount()?",J);if(typeof Z.componentDidReceiveProps==="function")q("%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")q("%s has a method called componentWillRecieveProps(). Did you mean componentWillReceiveProps()?",J);if(typeof Z.UNSAFE_componentWillRecieveProps==="function")q("%s has a method called UNSAFE_componentWillRecieveProps(). Did you mean UNSAFE_componentWillReceiveProps()?",J);var H=Z.props!==X;if(Z.props!==void 0&&H)q("%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)q("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"&&!NG.has(Q))NG.add(Q),q("%s: getSnapshotBeforeUpdate() should be used with componentDidUpdate(). This component defines getSnapshotBeforeUpdate() only.",c1(Q));if(typeof Z.getDerivedStateFromProps==="function")q("%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")q("%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")q("%s: getSnapshotBeforeUpdate() is defined as a static method and will be ignored. Instead, declare it as an instance method.",J);var B=Z.state;if(B&&(typeof B!=="object"||o1(B)))q("%s.state: must be set to an object or null",J);if(typeof Z.getChildContext==="function"&&typeof Q.childContextTypes!=="object")q("%s.getChildContext(): childContextTypes must be defined in order to use getChildContext().",J)}}function bU(z,Q){Q.updater=IG,z.stateNode=Q,_L(Q,z),Q._reactInternalInstance=LG}function wU(z,Q,X){var Z=!1,J=R6,$=R6,H=Q.contextType;if("contextType"in Q){var B=H===null||H!==void 0&&H.$$typeof===A&&H._context===void 0;if(!B&&!PG.has(Q)){PG.add(Q);var K="";if(H===void 0)K=" 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 H!=="object")K=" However, it is set to a "+typeof H+".";else if(H.$$typeof===R0)K=" Did you accidentally pass the Context.Provider instead?";else if(H._context!==void 0)K=" Did you accidentally pass the Context.Consumer instead?";else K=" However, it is set to an object with keys {"+Object.keys(H).join(", ")+"}.";q("%s defines an invalid contextType. contextType should point to the Context object returned by React.createContext().%s",c1(Q)||"Component",K)}}if(typeof H==="object"&&H!==null)$=z5(H);else{J=zQ(z,Q,!0);var b=Q.contextTypes;Z=b!==null&&b!==void 0,$=Z?QQ(z,J):R6}var P=new Q(X,$);if(z.mode&c4){N5(!0);try{P=new Q(X,$)}finally{N5(!1)}}var x=z.memoizedState=P.state!==null&&P.state!==void 0?P.state:null;bU(z,P);{if(typeof Q.getDerivedStateFromProps==="function"&&x===null){var g=c1(Q)||"Component";if(!RG.has(g))RG.add(g),q("`%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.",g,P.state===null?"null":"undefined",g)}if(typeof Q.getDerivedStateFromProps==="function"||typeof P.getSnapshotBeforeUpdate==="function"){var e=null,z0=null,Y0=null;if(typeof P.componentWillMount==="function"&&P.componentWillMount.__suppressDeprecationWarning!==!0)e="componentWillMount";else if(typeof P.UNSAFE_componentWillMount==="function")e="UNSAFE_componentWillMount";if(typeof P.componentWillReceiveProps==="function"&&P.componentWillReceiveProps.__suppressDeprecationWarning!==!0)z0="componentWillReceiveProps";else if(typeof P.UNSAFE_componentWillReceiveProps==="function")z0="UNSAFE_componentWillReceiveProps";if(typeof P.componentWillUpdate==="function"&&P.componentWillUpdate.__suppressDeprecationWarning!==!0)Y0="componentWillUpdate";else if(typeof P.UNSAFE_componentWillUpdate==="function")Y0="UNSAFE_componentWillUpdate";if(e!==null||z0!==null||Y0!==null){var h0=c1(Q)||"Component",e0=typeof Q.getDerivedStateFromProps==="function"?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";if(!bG.has(h0))bG.add(h0),q(`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`,h0,e0,e!==null?`
|
|
94
|
-
`+e:"",z0!==null?`
|
|
95
|
-
`+z0:"",Y0!==null?`
|
|
96
|
-
`+Y0:"")}}}if(Z)qB(z,J,$);return P}function fw(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)q("%s.componentWillMount(): Assigning directly to this.state is deprecated (except inside a component's constructor). Use setState instead.",M1(z)||"Component"),IG.enqueueReplaceState(Q,Q.state,null)}function FU(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 $=M1(z)||"Component";if(!_G.has($))_G.add($),q("%s.componentWillReceiveProps(): Assigning directly to this.state is deprecated (except inside a component's constructor). Use setState instead.",$)}IG.enqueueReplaceState(Q,Q.state,null)}}function kG(z,Q,X,Z){Sw(z,Q,X);var J=z.stateNode;J.props=X,J.state=z.memoizedState,J.refs={},VH(z);var $=Q.contextType;if(typeof $==="object"&&$!==null)J.context=z5($);else{var H=zQ(z,Q,!0);J.context=QQ(z,H)}{if(J.state===X){var B=c1(Q)||"Component";if(!FG.has(B))FG.add(B),q("%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.",B)}if(z.mode&c4)c6.recordLegacyContextWarning(z,J);c6.recordUnsafeLifecycleWarnings(z,J)}J.state=z.memoizedState;var K=Q.getDerivedStateFromProps;if(typeof K==="function")AG(z,Q,K,X),J.state=z.memoizedState;if(typeof Q.getDerivedStateFromProps!=="function"&&typeof J.getSnapshotBeforeUpdate!=="function"&&(typeof J.UNSAFE_componentWillMount==="function"||typeof J.componentWillMount==="function"))fw(z,J),qY(z,X,J,Z),J.state=z.memoizedState;if(typeof J.componentDidMount==="function"){var b=p1;if(b|=p8,(z.mode&$7)!==$1)b|=C7;z.flags|=b}}function hw(z,Q,X,Z){var{stateNode:J,memoizedProps:$}=z;J.props=$;var H=J.context,B=Q.contextType,K=R6;if(typeof B==="object"&&B!==null)K=z5(B);else{var b=zQ(z,Q,!0);K=QQ(z,b)}var P=Q.getDerivedStateFromProps,x=typeof P==="function"||typeof J.getSnapshotBeforeUpdate==="function";if(!x&&(typeof J.UNSAFE_componentWillReceiveProps==="function"||typeof J.componentWillReceiveProps==="function")){if($!==X||H!==K)FU(z,J,X,K)}EB();var g=z.memoizedState,e=J.state=g;if(qY(z,X,J,Z),e=z.memoizedState,$===X&&g===e&&!dJ()&&!BY()){if(typeof J.componentDidMount==="function"){var z0=p1;if(z0|=p8,(z.mode&$7)!==$1)z0|=C7;z.flags|=z0}return!1}if(typeof P==="function")AG(z,Q,P,X),e=z.memoizedState;var Y0=BY()||NU(z,Q,$,X,g,e,K);if(Y0){if(!x&&(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 h0=p1;if(h0|=p8,(z.mode&$7)!==$1)h0|=C7;z.flags|=h0}}else{if(typeof J.componentDidMount==="function"){var e0=p1;if(e0|=p8,(z.mode&$7)!==$1)e0|=C7;z.flags|=e0}z.memoizedProps=X,z.memoizedState=e}return J.props=X,J.state=e,J.context=K,Y0}function yw(z,Q,X,Z,J){var $=Q.stateNode;DB(z,Q);var H=Q.memoizedProps,B=Q.type===Q.elementType?H:i6(Q.type,H);$.props=B;var K=Q.pendingProps,b=$.context,P=X.contextType,x=R6;if(typeof P==="object"&&P!==null)x=z5(P);else{var g=zQ(Q,X,!0);x=QQ(Q,g)}var e=X.getDerivedStateFromProps,z0=typeof e==="function"||typeof $.getSnapshotBeforeUpdate==="function";if(!z0&&(typeof $.UNSAFE_componentWillReceiveProps==="function"||typeof $.componentWillReceiveProps==="function")){if(H!==K||b!==x)FU(Q,$,Z,x)}EB();var Y0=Q.memoizedState,h0=$.state=Y0;if(qY(Q,Z,$,J),h0=Q.memoizedState,H===K&&Y0===h0&&!dJ()&&!BY()&&!W1){if(typeof $.componentDidUpdate==="function"){if(H!==z.memoizedProps||Y0!==z.memoizedState)Q.flags|=p1}if(typeof $.getSnapshotBeforeUpdate==="function"){if(H!==z.memoizedProps||Y0!==z.memoizedState)Q.flags|=x8}return!1}if(typeof e==="function")AG(Q,X,e,Z),h0=Q.memoizedState;var e0=BY()||NU(Q,X,B,Z,Y0,h0,x)||W1;if(e0){if(!z0&&(typeof $.UNSAFE_componentWillUpdate==="function"||typeof $.componentWillUpdate==="function")){if(typeof $.componentWillUpdate==="function")$.componentWillUpdate(Z,h0,x);if(typeof $.UNSAFE_componentWillUpdate==="function")$.UNSAFE_componentWillUpdate(Z,h0,x)}if(typeof $.componentDidUpdate==="function")Q.flags|=p1;if(typeof $.getSnapshotBeforeUpdate==="function")Q.flags|=x8}else{if(typeof $.componentDidUpdate==="function"){if(H!==z.memoizedProps||Y0!==z.memoizedState)Q.flags|=p1}if(typeof $.getSnapshotBeforeUpdate==="function"){if(H!==z.memoizedProps||Y0!==z.memoizedState)Q.flags|=x8}Q.memoizedProps=Z,Q.memoizedState=h0}return $.props=Z,$.state=h0,$.context=x,e0}function Hz(z,Q){return{value:z,source:Q,stack:nQ(Q),digest:null}}function TG(z,Q,X){return{value:z,source:null,stack:X!=null?X:null,digest:Q!=null?Q:null}}function Vw(z,Q){return!0}function CG(z,Q){try{var X=Vw(z,Q);if(X===!1)return;var{value:Z,source:J,stack:$}=Q,H=$!==null?$:"";if(Z!=null&&Z._suppressLogging){if(z.tag===_)return;console.error(Z)}var B=J?M1(J):null,K=B?"The above error occurred in the <"+B+"> component:":"The above error occurred in one of your React components:",b;if(z.tag===I)b=`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 P=M1(z)||"Anonymous";b="React will try to recreate this component tree from scratch "+("using the error boundary you provided, "+P+".")}var x=K+`
|
|
98
|
-
`+H+`
|
|
99
|
-
|
|
100
|
-
`+(""+b);console.error(x)}catch(g){setTimeout(function(){throw g})}}var Dw=typeof WeakMap==="function"?WeakMap:Map;function MU(z,Q,X){var Z=u7(A4,X);Z.tag=hH,Z.payload={element:null};var J=Q.value;return Z.callback=function(){hM(J),CG(z,Q)},Z}function vG(z,Q,X){var Z=u7(A4,X);Z.tag=hH;var J=z.type.getDerivedStateFromError;if(typeof J==="function"){var $=Q.value;Z.payload=function(){return J($)},Z.callback=function(){VK(z),CG(z,Q)}}var H=z.stateNode;if(H!==null&&typeof H.componentDidCatch==="function")Z.callback=function(){if(VK(z),CG(z,Q),typeof J!=="function")SM(this);var{value:K,stack:b}=Q;if(this.componentDidCatch(K,{componentStack:b!==null?b:""}),typeof J!=="function"){if(!W6(z.lanes,L1))q("%s: Error boundaries should implement getDerivedStateFromError(). In that method, return a state update to display an error message or fallback UI.",M1(z)||"Unknown")}};return Z}function PU(z,Q,X){var Z=z.pingCache,J;if(Z===null)Z=z.pingCache=new Dw,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 $=yM.bind(null,z,Q,X);if(g6)AZ(z,X);Q.then($,$)}}function Ew(z,Q,X,Z){var J=z.updateQueue;if(J===null){var $=new Set;$.add(X),z.updateQueue=$}else J.add(X)}function mw(z,Q){var X=z.tag;if((z.mode&u1)===$1&&(X===L||X===C||X===c)){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 AU(z){var Q=z;do{if(Q.tag===m&&Nw(Q))return Q;Q=Q.return}while(Q!==null);return null}function IU(z,Q,X,Z,J){if((z.mode&u1)===$1){if(z===Q)z.flags|=a5;else{if(z.flags|=a1,X.flags|=a3,X.flags&=~(RL|$X),X.tag===_){var $=X.alternate;if($===null)X.tag=Q0;else{var H=u7(A4,L1);H.tag=YY,O8(X,H,L1)}}X.lanes=I1(X.lanes,L1)}return z}return z.flags|=a5,z.lanes=J,z}function uw(z,Q,X,Z,J){if(X.flags|=$X,g6)AZ(z,J);if(Z!==null&&typeof Z==="object"&&typeof Z.then==="function"){var $=Z;if(mw(X),I5()&&X.mode&u1)_B();var H=AU(Q);if(H!==null){if(H.flags&=~k7,IU(H,Q,X,z,J),H.mode&u1)PU(z,$,J);Ew(H,z,$);return}else{if(!H_(J)){PU(z,$,J),q9();return}var B=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=B}}else if(I5()&&X.mode&u1){_B();var K=AU(Q);if(K!==null){if((K.flags&a5)===G1)K.flags|=k7;IU(K,Q,X,z,J),wH(Hz(Z,X));return}}Z=Hz(Z,X),MM(Z);var b=Q;do{switch(b.tag){case I:{var P=Z;b.flags|=a5;var x=OX(J);b.lanes=I1(b.lanes,x);var g=MU(b,P,x);DH(b,g);return}case _:var e=Z,z0=b.type,Y0=b.stateNode;if((b.flags&a1)===G1&&(typeof z0.getDerivedStateFromError==="function"||Y0!==null&&typeof Y0.componentDidCatch==="function"&&!IK(Y0))){b.flags|=a5;var h0=OX(J);b.lanes=I1(b.lanes,h0);var e0=vG(b,e,h0);DH(b,e0);return}break}b=b.return}while(b!==null)}function gw(){return null}var GZ=Y.ReactCurrentOwner,o6=!1,SG,qZ,fG,hG,yG,Gz,VG,EY,BZ;SG={},qZ={},fG={},hG={},yG={},Gz=!1,VG={},EY={},BZ={};function n5(z,Q,X,Z){if(z===null)Q.child=CB(Q,null,X,Z);else Q.child=YQ(Q,z.child,X,Z)}function xw(z,Q,X,Z){Q.child=YQ(Q,z.child,null,Z),Q.child=YQ(Q,null,X,Z)}function kU(z,Q,X,Z,J){if(Q.type!==Q.elementType){var $=X.propTypes;if($)j6($,Z,"prop",c1(X))}var H=X.render,B=Q.ref,K,b;HQ(Q,J),GX(Q);{if(GZ.current=Q,U6(!0),K=WQ(z,Q,H,Z,B,J),b=OQ(),Q.mode&c4){N5(!0);try{K=WQ(z,Q,H,Z,B,J),b=OQ()}finally{N5(!1)}}U6(!1)}if(xz(),z!==null&&!o6)return pB(z,Q,J),g7(z,Q,J);if(I5()&&b)OH(Q);return Q.flags|=uz,n5(z,Q,K,J),Q.child}function TU(z,Q,X,Z,J){if(z===null){var $=X.type;if(rM($)&&X.compare===null&&X.defaultProps===void 0){var H=$;return H=MQ($),Q.tag=c,Q.type=H,mG(Q,$),CU(z,Q,H,Z,J)}{var B=$.propTypes;if(B)j6(B,Z,"prop",c1($));if(X.defaultProps!==void 0){var K=c1($)||"Unknown";if(!BZ[K])q("%s: Support for defaultProps will be removed from memo components in a future major release. Use JavaScript default parameters instead.",K),BZ[K]=!0}}var b=w9(X.type,null,Z,Q,Q.mode,J);return b.ref=Q.ref,b.return=Q,Q.child=b,b}{var P=X.type,x=P.propTypes;if(x)j6(x,Z,"prop",c1(P))}var g=z.child,e=cG(z,J);if(!e){var z0=g.memoizedProps,Y0=X.compare;if(Y0=Y0!==null?Y0:vX,Y0(z0,Z)&&z.ref===Q.ref)return g7(z,Q,J)}Q.flags|=uz;var h0=Wz(g,Z);return h0.ref=Q.ref,h0.return=Q,Q.child=h0,h0}function CU(z,Q,X,Z,J){if(Q.type!==Q.elementType){var $=Q.elementType;if($.$$typeof===i0){var H=$,B=H._payload,K=H._init;try{$=K(B)}catch(x){$=null}var b=$&&$.propTypes;if(b)j6(b,Z,"prop",c1($))}}if(z!==null){var P=z.memoizedProps;if(vX(P,Z)&&z.ref===Q.ref&&Q.type===z.type){if(o6=!1,Q.pendingProps=Z=P,!cG(z,J))return Q.lanes=z.lanes,g7(z,Q,J);else if((z.flags&a3)!==G1)o6=!0}}return DG(z,Q,X,Z,J)}function vU(z,Q,X){var Z=Q.pendingProps,J=Z.children,$=z!==null?z.memoizedState:null;if(Z.mode==="hidden"||X0)if((Q.mode&u1)===$1){var H={baseLanes:N0,cachePool:null,transitions:null};Q.memoizedState=H,nY(Q,X)}else if(!W6(X,K6)){var B=null,K;if($!==null){var b=$.baseLanes;K=I1(b,X)}else K=X;Q.lanes=Q.childLanes=LJ(K6);var P={baseLanes:K,cachePool:B,transitions:null};return Q.memoizedState=P,Q.updateQueue=null,nY(Q,K),null}else{var x={baseLanes:N0,cachePool:null,transitions:null};Q.memoizedState=x;var g=$!==null?$.baseLanes:X;nY(Q,g)}else{var e;if($!==null)e=I1($.baseLanes,X),Q.memoizedState=null;else e=X;nY(Q,e)}return n5(z,Q,J,X),Q.child}function jw(z,Q,X){var Z=Q.pendingProps;return n5(z,Q,Z,X),Q.child}function pw(z,Q,X){var Z=Q.pendingProps.children;return n5(z,Q,Z,X),Q.child}function cw(z,Q,X){{Q.flags|=p1;{var Z=Q.stateNode;Z.effectDuration=0,Z.passiveEffectDuration=0}}var J=Q.pendingProps,$=J.children;return n5(z,Q,$,X),Q.child}function SU(z,Q){var X=Q.ref;if(z===null&&X!==null||z!==null&&z.ref!==X)Q.flags|=X8,Q.flags|=n3}function DG(z,Q,X,Z,J){if(Q.type!==Q.elementType){var $=X.propTypes;if($)j6($,Z,"prop",c1(X))}var H;{var B=zQ(Q,X,!0);H=QQ(Q,B)}var K,b;HQ(Q,J),GX(Q);{if(GZ.current=Q,U6(!0),K=WQ(z,Q,X,Z,H,J),b=OQ(),Q.mode&c4){N5(!0);try{K=WQ(z,Q,X,Z,H,J),b=OQ()}finally{N5(!1)}}U6(!1)}if(xz(),z!==null&&!o6)return pB(z,Q,J),g7(z,Q,J);if(I5()&&b)OH(Q);return Q.flags|=uz,n5(z,Q,K,J),Q.child}function fU(z,Q,X,Z,J){{switch(UP(Q)){case!1:{var{stateNode:$,type:H}=Q,B=new H(Q.memoizedProps,$.context),K=B.state;$.updater.enqueueSetState($,K,null);break}case!0:{Q.flags|=a1,Q.flags|=a5;var b=Error("Simulated error coming from DevTools"),P=OX(J);Q.lanes=I1(Q.lanes,P);var x=vG(Q,Hz(b,Q),P);DH(Q,x);break}}if(Q.type!==Q.elementType){var g=X.propTypes;if(g)j6(g,Z,"prop",c1(X))}}var e;if(q7(X))e=!0,iJ(Q);else e=!1;HQ(Q,J);var z0=Q.stateNode,Y0;if(z0===null)uY(z,Q),wU(Q,X,Z),kG(Q,X,Z,J),Y0=!0;else if(z===null)Y0=hw(Q,X,Z,J);else Y0=yw(z,Q,X,Z,J);var h0=EG(z,Q,X,Y0,e,J);{var e0=Q.stateNode;if(Y0&&e0.props!==Z){if(!Gz)q("It looks like %s is reassigning its own `this.props` while rendering. This is not supported and can lead to confusing bugs.",M1(Q)||"a component");Gz=!0}}return h0}function EG(z,Q,X,Z,J,$){SU(z,Q);var H=(Q.flags&a1)!==G1;if(!Z&&!H){if(J)KB(Q,X,!1);return g7(z,Q,$)}var B=Q.stateNode;GZ.current=Q;var K;if(H&&typeof X.getDerivedStateFromError!=="function")K=null,LU();else{GX(Q);{if(U6(!0),K=B.render(),Q.mode&c4){N5(!0);try{B.render()}finally{N5(!1)}}U6(!1)}xz()}if(Q.flags|=uz,z!==null&&H)xw(z,Q,K,$);else n5(z,Q,K,$);if(Q.memoizedState=B.state,J)KB(Q,X,!0);return Q.child}function hU(z){var Q=z.stateNode;if(Q.pendingContext)BB(z,Q.pendingContext,Q.pendingContext!==Q.context);else if(Q.context)BB(z,Q.context,!1);EH(z,Q.containerInfo)}function dw(z,Q,X){if(hU(Q),z===null)throw Error("Should have a current fiber. This is a bug in React.");var{pendingProps:Z,memoizedState:J}=Q,$=J.element;DB(z,Q),qY(Q,Z,null,X);var{memoizedState:H,stateNode:B}=Q,K=H.element;if(J.isDehydrated){var b={element:K,isDehydrated:!1,cache:H.cache,pendingSuspenseBoundaries:H.pendingSuspenseBoundaries,transitions:H.transitions},P=Q.updateQueue;if(P.baseState=b,Q.memoizedState=b,Q.flags&k7){var x=Hz(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 yU(z,Q,K,X,x)}else if(K!==$){var g=Hz(Error("This root received an early update, before anything was able hydrate. Switched the entire root to client rendering."),Q);return yU(z,Q,K,X,g)}else{ab(Q);var e=CB(Q,null,K,X);Q.child=e;var z0=e;while(z0)z0.flags=z0.flags&~e4|T7,z0=z0.sibling}}else{if(JQ(),K===$)return g7(z,Q,X);n5(z,Q,K,X)}return Q.child}function yU(z,Q,X,Z,J){return JQ(),wH(J),Q.flags|=k7,n5(z,Q,X,Z),Q.child}function lw(z,Q,X){if(gB(Q),z===null)bH(Q);var{type:Z,pendingProps:J}=Q,$=z!==null?z.memoizedProps:null,H=J.children,B=QH(Z,J);if(B)H=null;else if($!==null&&QH(Z,$))Q.flags|=YX;return SU(z,Q),n5(z,Q,H,X),Q.child}function iw(z,Q){if(z===null)bH(Q);return null}function ow(z,Q,X,Z){uY(z,Q);var J=Q.pendingProps,$=X,H=$._payload,B=$._init,K=B(H);Q.type=K;var b=Q.tag=tM(K),P=i6(K,J),x;switch(b){case L:return mG(Q,K),Q.type=K=MQ(K),x=DG(null,Q,K,P,Z),x;case _:return Q.type=K=O9(K),x=fU(null,Q,K,P,Z),x;case C:return Q.type=K=L9(K),x=kU(null,Q,K,P,Z),x;case a:{if(Q.type!==Q.elementType){var g=K.propTypes;if(g)j6(g,P,"prop",c1(K))}return x=TU(null,Q,K,i6(K.type,P),Z),x}}var e="";if(K!==null&&typeof K==="object"&&K.$$typeof===i0)e=" Did you wrap a component in React.lazy() more than once?";throw Error("Element type is invalid. Received a promise that resolves to: "+K+". "+("Lazy element type must resolve to a class or function."+e))}function aw(z,Q,X,Z,J){uY(z,Q),Q.tag=_;var $;if(q7(X))$=!0,iJ(Q);else $=!1;return HQ(Q,J),wU(Q,X,Z),kG(Q,X,Z,J),EG(null,Q,X,!0,$,J)}function nw(z,Q,X,Z){uY(z,Q);var J=Q.pendingProps,$;{var H=zQ(Q,X,!1);$=QQ(Q,H)}HQ(Q,Z);var B,K;GX(Q);{if(X.prototype&&typeof X.prototype.render==="function"){var b=c1(X)||"Unknown";if(!SG[b])q("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.",b,b),SG[b]=!0}if(Q.mode&c4)c6.recordLegacyContextWarning(Q,null);U6(!0),GZ.current=Q,B=WQ(null,Q,X,J,$,Z),K=OQ(),U6(!1)}if(xz(),Q.flags|=uz,typeof B==="object"&&B!==null&&typeof B.render==="function"&&B.$$typeof===void 0){var P=c1(X)||"Unknown";if(!qZ[P])q("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.",P,P,P),qZ[P]=!0}if(typeof B==="object"&&B!==null&&typeof B.render==="function"&&B.$$typeof===void 0){{var x=c1(X)||"Unknown";if(!qZ[x])q("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.",x,x,x),qZ[x]=!0}Q.tag=_,Q.memoizedState=null,Q.updateQueue=null;var g=!1;if(q7(X))g=!0,iJ(Q);else g=!1;return Q.memoizedState=B.state!==null&&B.state!==void 0?B.state:null,VH(Q),bU(Q,B),kG(Q,X,J,Z),EG(null,Q,X,!0,g,Z)}else{if(Q.tag=L,Q.mode&c4){N5(!0);try{B=WQ(null,Q,X,J,$,Z),K=OQ()}finally{N5(!1)}}if(I5()&&K)OH(Q);return n5(null,Q,B,Z),mG(Q,X),Q.child}}function mG(z,Q){{if(Q){if(Q.childContextTypes)q("%s(...): childContextTypes cannot be defined on a function component.",Q.displayName||Q.name||"Component")}if(z.ref!==null){var X="",Z=e7();if(Z)X+=`
|
|
101
|
-
|
|
102
|
-
Check the render method of \``+Z+"`.";var J=Z||"",$=z._debugSource;if($)J=$.fileName+":"+$.lineNumber;if(!yG[J])yG[J]=!0,q("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 H=c1(Q)||"Unknown";if(!BZ[H])q("%s: Support for defaultProps will be removed from function components in a future major release. Use JavaScript default parameters instead.",H),BZ[H]=!0}if(typeof Q.getDerivedStateFromProps==="function"){var B=c1(Q)||"Unknown";if(!hG[B])q("%s: Function components do not support getDerivedStateFromProps.",B),hG[B]=!0}if(typeof Q.contextType==="object"&&Q.contextType!==null){var K=c1(Q)||"Unknown";if(!fG[K])q("%s: Function components do not support contextType.",K),fG[K]=!0}}}var uG={dehydrated:null,treeContext:null,retryLane:b5};function gG(z){return{baseLanes:z,cachePool:gw(),transitions:null}}function rw(z,Q){var X=null;return{baseLanes:I1(z.baseLanes,Q),cachePool:X,transitions:z.transitions}}function tw(z,Q,X,Z){if(Q!==null){var J=Q.memoizedState;if(J===null)return!1}return gH(z,eX)}function sw(z,Q){return OJ(z.childLanes,Q)}function VU(z,Q,X){var Z=Q.pendingProps;if(KP(Q))Q.flags|=a1;var J=d6.current,$=!1,H=(Q.flags&a1)!==G1;if(H||tw(J,z))$=!0,Q.flags&=~a1;else if(z===null||z.memoizedState!==null)J=Rw(J,jB);if(J=qQ(J),_8(Q,J),z===null){bH(Q);var B=Q.memoizedState;if(B!==null){var K=B.dehydrated;if(K!==null)return ZF(Q,K)}var{children:b,fallback:P}=Z;if($){var x=ew(Q,b,P,X),g=Q.child;return g.memoizedState=gG(X),Q.memoizedState=uG,x}else return xG(Q,b)}else{var e=z.memoizedState;if(e!==null){var z0=e.dehydrated;if(z0!==null)return JF(z,Q,H,Z,z0,e,X)}if($){var{fallback:Y0,children:h0}=Z,e0=QF(z,Q,h0,Y0,X),o0=Q.child,h1=z.child.memoizedState;return o0.memoizedState=h1===null?gG(X):rw(h1,X),o0.childLanes=sw(z,X),Q.memoizedState=uG,e0}else{var y1=Z.children,n=zF(z,Q,y1,X);return Q.memoizedState=null,n}}}function xG(z,Q,X){var Z=z.mode,J={mode:"visible",children:Q},$=jG(J,Z);return $.return=z,z.child=$,$}function ew(z,Q,X,Z){var{mode:J,child:$}=z,H={mode:"hidden",children:Q},B,K;if((J&u1)===$1&&$!==null){if(B=$,B.childLanes=N0,B.pendingProps=H,z.mode&Z4)B.actualDuration=0,B.actualStartTime=-1,B.selfBaseDuration=0,B.treeBaseDuration=0;K=A8(X,J,Z,null)}else B=jG(H,J),K=A8(X,J,Z,null);return B.return=z,K.return=z,B.sibling=K,z.child=B,K}function jG(z,Q,X){return EK(z,Q,N0,null)}function DU(z,Q){return Wz(z,Q)}function zF(z,Q,X,Z){var J=z.child,$=J.sibling,H=DU(J,{mode:"visible",children:X});if((Q.mode&u1)===$1)H.lanes=Z;if(H.return=Q,H.sibling=null,$!==null){var B=Q.deletions;if(B===null)Q.deletions=[$],Q.flags|=g8;else B.push($)}return Q.child=H,H}function QF(z,Q,X,Z,J){var $=Q.mode,H=z.child,B=H.sibling,K={mode:"hidden",children:X},b;if(($&u1)===$1&&Q.child!==H){var P=Q.child;if(b=P,b.childLanes=N0,b.pendingProps=K,Q.mode&Z4)b.actualDuration=0,b.actualStartTime=-1,b.selfBaseDuration=H.selfBaseDuration,b.treeBaseDuration=H.treeBaseDuration;Q.deletions=null}else b=DU(H,K),b.subtreeFlags=H.subtreeFlags&v7;var x;if(B!==null)x=Wz(B,Z);else x=A8(Z,$,J,null),x.flags|=e4;return x.return=Q,b.return=Q,b.sibling=x,Q.child=b,x}function mY(z,Q,X,Z){if(Z!==null)wH(Z);YQ(Q,z.child,null,X);var J=Q.pendingProps,$=J.children,H=xG(Q,$);return H.flags|=e4,Q.memoizedState=null,H}function XF(z,Q,X,Z,J){var $=Q.mode,H={mode:"visible",children:X},B=jG(H,$),K=A8(Z,$,J,null);if(K.flags|=e4,B.return=Q,K.return=Q,B.sibling=K,Q.child=B,(Q.mode&u1)!==$1)YQ(Q,z.child,null,J);return K}function ZF(z,Q,X){if((z.mode&u1)===$1)q("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=LJ(L1);else if(YH(Q))z.lanes=LJ(i8);else z.lanes=LJ(K6);return null}function JF(z,Q,X,Z,J,$,H){if(!X){if(ib(),(Q.mode&u1)===$1)return mY(z,Q,H,null);if(YH(J)){var B,K,b;{var P=qb(J);B=P.digest,K=P.message,b=P.stack}var x;if(K)x=Error(K);else x=Error("The server could not finish this Suspense boundary, likely due to an error during server rendering. Switched to client rendering.");var g=TG(x,B,b);return mY(z,Q,H,g)}var e=W6(H,z.childLanes);if(o6||e){var z0=aY();if(z0!==null){var Y0=L_(z0,H);if(Y0!==b5&&Y0!==$.retryLane){$.retryLane=Y0;var h0=A4;J6(z,Y0),B5(z0,z,Y0,h0)}}q9();var e0=TG(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 mY(z,Q,H,e0)}else if(ZB(J)){Q.flags|=a1,Q.child=z.child;var o0=VM.bind(null,z);return Bb(J,o0),null}else{nb(Q,J,$.treeContext);var h1=Z.children,y1=xG(Q,h1);return y1.flags|=T7,y1}}else if(Q.flags&k7){Q.flags&=~k7;var n=TG(Error("There was an error while hydrating this Suspense boundary. Switched to client rendering."));return mY(z,Q,H,n)}else if(Q.memoizedState!==null)return Q.child=z.child,Q.flags|=a1,null;else{var{children:G0,fallback:r}=Z,w0=XF(z,Q,G0,r,H),m0=Q.child;return m0.memoizedState=gG(H),Q.memoizedState=uG,w0}}function EU(z,Q,X){z.lanes=I1(z.lanes,Q);var Z=z.alternate;if(Z!==null)Z.lanes=I1(Z.lanes,Q);SH(z.return,Q,X)}function YF(z,Q,X){var Z=Q;while(Z!==null){if(Z.tag===m){var J=Z.memoizedState;if(J!==null)EU(Z,X,z)}else if(Z.tag===t)EU(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 $F(z){var Q=z,X=null;while(Q!==null){var Z=Q.alternate;if(Z!==null&&WY(Z)===null)X=Q;Q=Q.sibling}return X}function HF(z){if(z!==void 0&&z!=="forwards"&&z!=="backwards"&&z!=="together"&&!VG[z])if(VG[z]=!0,typeof z==="string")switch(z.toLowerCase()){case"together":case"forwards":case"backwards":{q('"%s" is not a valid value for revealOrder on <SuspenseList />. Use lowercase "%s" instead.',z,z.toLowerCase());break}case"forward":case"backward":{q('"%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:q('"%s" is not a supported revealOrder on <SuspenseList />. Did you mean "together", "forwards" or "backwards"?',z);break}else q('%s is not a supported value for revealOrder on <SuspenseList />. Did you mean "together", "forwards" or "backwards"?',z)}function GF(z,Q){if(z!==void 0&&!EY[z]){if(z!=="collapsed"&&z!=="hidden")EY[z]=!0,q('"%s" is not a supported value for tail on <SuspenseList />. Did you mean "collapsed" or "hidden"?',z);else if(Q!=="forwards"&&Q!=="backwards")EY[z]=!0,q('<SuspenseList tail="%s" /> is only valid if revealOrder is "forwards" or "backwards". Did you mean to specify revealOrder="forwards"?',z)}}function mU(z,Q){{var X=o1(z),Z=!X&&typeof P4(z)==="function";if(X||Z){var J=X?"array":"iterable";return q("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 qF(z,Q){if((Q==="forwards"||Q==="backwards")&&z!==void 0&&z!==null&&z!==!1)if(o1(z)){for(var X=0;X<z.length;X++)if(!mU(z[X],X))return}else{var Z=P4(z);if(typeof Z==="function"){var J=Z.call(z);if(J){var $=J.next(),H=0;for(;!$.done;$=J.next()){if(!mU($.value,H))return;H++}}}else q('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 pG(z,Q,X,Z,J){var $=z.memoizedState;if($===null)z.memoizedState={isBackwards:Q,rendering:null,renderingStartTime:0,last:Z,tail:X,tailMode:J};else $.isBackwards=Q,$.rendering=null,$.renderingStartTime=0,$.last=Z,$.tail=X,$.tailMode=J}function uU(z,Q,X){var Z=Q.pendingProps,J=Z.revealOrder,$=Z.tail,H=Z.children;HF(J),GF($,J),qF(H,J),n5(z,Q,H,X);var B=d6.current,K=gH(B,eX);if(K)B=xH(B,eX),Q.flags|=a1;else{var b=z!==null&&(z.flags&a1)!==G1;if(b)YF(Q,Q.child,X);B=qQ(B)}if(_8(Q,B),(Q.mode&u1)===$1)Q.memoizedState=null;else switch(J){case"forwards":{var P=$F(Q.child),x;if(P===null)x=Q.child,Q.child=null;else x=P.sibling,P.sibling=null;pG(Q,!1,x,P,$);break}case"backwards":{var g=null,e=Q.child;Q.child=null;while(e!==null){var z0=e.alternate;if(z0!==null&&WY(z0)===null){Q.child=e;break}var Y0=e.sibling;e.sibling=g,g=e,e=Y0}pG(Q,!0,g,null,$);break}case"together":{pG(Q,!1,null,null,void 0);break}default:Q.memoizedState=null}return Q.child}function BF(z,Q,X){EH(Q,Q.stateNode.containerInfo);var Z=Q.pendingProps;if(z===null)Q.child=YQ(Q,null,Z,X);else n5(z,Q,Z,X);return Q.child}var gU=!1;function UF(z,Q,X){var Z=Q.type,J=Z._context,$=Q.pendingProps,H=Q.memoizedProps,B=$.value;{if(!("value"in $)){if(!gU)gU=!0,q("The `value` prop is required for the `<Context.Provider>`. Did you misspell it or forget to pass it?")}var K=Q.type.propTypes;if(K)j6(K,$,"prop","Context.Provider")}if(fB(Q,J,B),H!==null){var b=H.value;if(_6(b,B)){if(H.children===$.children&&!dJ())return g7(z,Q,X)}else Gw(Q,J,X)}var P=$.children;return n5(z,Q,P,X),Q.child}var xU=!1;function KF(z,Q,X){var Z=Q.type;if(Z._context===void 0){if(Z!==Z.Consumer){if(!xU)xU=!0,q("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,$=J.children;if(typeof $!=="function")q("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.");HQ(Q,X);var H=z5(Z);GX(Q);var B;return GZ.current=Q,U6(!0),B=$(H),U6(!1),xz(),Q.flags|=uz,n5(z,Q,B,X),Q.child}function UZ(){o6=!0}function uY(z,Q){if((Q.mode&u1)===$1){if(z!==null)z.alternate=null,Q.alternate=null,Q.flags|=e4}}function g7(z,Q,X){if(z!==null)Q.dependencies=z.dependencies;if(LU(),PZ(Q.lanes),!W6(X,Q.childLanes))return null;return $w(z,Q),Q.child}function WF(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 $=Z.deletions;if($===null)Z.deletions=[z],Z.flags|=g8;else $.push(z);return X.flags|=e4,X}}function cG(z,Q){var X=z.lanes;if(W6(X,Q))return!0;return!1}function OF(z,Q,X){switch(Q.tag){case I:hU(Q);var Z=Q.stateNode;JQ();break;case N:gB(Q);break;case _:{var J=Q.type;if(q7(J))iJ(Q);break}case F:EH(Q,Q.stateNode.containerInfo);break;case D:{var $=Q.memoizedProps.value,H=Q.type._context;fB(Q,H,$);break}case V:{var B=W6(X,Q.childLanes);if(B)Q.flags|=p1;{var K=Q.stateNode;K.effectDuration=0,K.passiveEffectDuration=0}}break;case m:{var b=Q.memoizedState;if(b!==null){if(b.dehydrated!==null)return _8(Q,qQ(d6.current)),Q.flags|=a1,null;var P=Q.child,x=P.childLanes;if(W6(X,x))return VU(z,Q,X);else{_8(Q,qQ(d6.current));var g=g7(z,Q,X);if(g!==null)return g.sibling;else return null}}else _8(Q,qQ(d6.current));break}case t:{var e=(z.flags&a1)!==G1,z0=W6(X,Q.childLanes);if(e){if(z0)return uU(z,Q,X);Q.flags|=a1}var Y0=Q.memoizedState;if(Y0!==null)Y0.rendering=null,Y0.tail=null,Y0.lastEffect=null;if(_8(Q,d6.current),z0)break;else return null}case p:case i:return Q.lanes=N0,vU(z,Q,X)}return g7(z,Q,X)}function jU(z,Q,X){if(Q._debugNeedsRemount&&z!==null)return WF(z,Q,w9(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||dJ()||Q.type!==z.type)o6=!0;else{var $=cG(z,X);if(!$&&(Q.flags&a1)===G1)return o6=!1,OF(z,Q,X);if((z.flags&a3)!==G1)o6=!0;else o6=!1}}else if(o6=!1,I5()&&xb(Q)){var H=Q.index,B=jb();LB(Q,B,H)}switch(Q.lanes=N0,Q.tag){case T:return nw(z,Q,Q.type,X);case u:{var K=Q.elementType;return ow(z,Q,K,X)}case L:{var{type:b,pendingProps:P}=Q,x=Q.elementType===b?P:i6(b,P);return DG(z,Q,b,x,X)}case _:{var{type:g,pendingProps:e}=Q,z0=Q.elementType===g?e:i6(g,e);return fU(z,Q,g,z0,X)}case I:return dw(z,Q,X);case N:return lw(z,Q,X);case w:return iw(z,Q);case m:return VU(z,Q,X);case F:return BF(z,Q,X);case C:{var{type:Y0,pendingProps:h0}=Q,e0=Q.elementType===Y0?h0:i6(Y0,h0);return kU(z,Q,Y0,e0,X)}case k:return jw(z,Q,X);case v:return pw(z,Q,X);case V:return cw(z,Q,X);case D:return UF(z,Q,X);case E:return KF(z,Q,X);case a:{var{type:o0,pendingProps:h1}=Q,y1=i6(o0,h1);if(Q.type!==Q.elementType){var n=o0.propTypes;if(n)j6(n,y1,"prop",c1(o0))}return y1=i6(o0.type,y1),TU(z,Q,o0,y1,X)}case c:return CU(z,Q,Q.type,Q.pendingProps,X);case Q0:{var{type:G0,pendingProps:r}=Q,w0=Q.elementType===G0?r:i6(G0,r);return aw(z,Q,G0,w0,X)}case t:return uU(z,Q,X);case l:break;case p:return vU(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 LQ(z){z.flags|=p1}function pU(z){z.flags|=X8,z.flags|=n3}var cU,dG,dU,lU;cU=function(z,Q,X,Z){var J=Q.child;while(J!==null){if(J.tag===N||J.tag===w)mN(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}},dG=function(z,Q){},dU=function(z,Q,X,Z,J){var $=z.memoizedProps;if($===Z)return;var H=Q.stateNode,B=mH(),K=gN(H,X,$,Z,J,B);if(Q.updateQueue=K,K)LQ(Q)},lU=function(z,Q,X,Z){if(X!==Z)LQ(Q)};function KZ(z,Q){if(I5())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,$=null;while(J!==null){if(J.alternate!==null)$=J;J=J.sibling}if($===null)if(!Q&&z.tail!==null)z.tail.sibling=null;else z.tail=null;else $.sibling=null;break}}}function T5(z){var Q=z.alternate!==null&&z.alternate.child===z.child,X=N0,Z=G1;if(!Q){if((z.mode&Z4)!==$1){var{actualDuration:J,selfBaseDuration:$,child:H}=z;while(H!==null)X=I1(X,I1(H.lanes,H.childLanes)),Z|=H.subtreeFlags,Z|=H.flags,J+=H.actualDuration,$+=H.treeBaseDuration,H=H.sibling;z.actualDuration=J,z.treeBaseDuration=$}else{var B=z.child;while(B!==null)X=I1(X,I1(B.lanes,B.childLanes)),Z|=B.subtreeFlags,Z|=B.flags,B.return=z,B=B.sibling}z.subtreeFlags|=Z}else{if((z.mode&Z4)!==$1){var{selfBaseDuration:K,child:b}=z;while(b!==null)X=I1(X,I1(b.lanes,b.childLanes)),Z|=b.subtreeFlags&v7,Z|=b.flags&v7,K+=b.treeBaseDuration,b=b.sibling;z.treeBaseDuration=K}else{var P=z.child;while(P!==null)X=I1(X,I1(P.lanes,P.childLanes)),Z|=P.subtreeFlags&v7,Z|=P.flags&v7,P.return=z,P=P.sibling}z.subtreeFlags|=Z}return z.childLanes=X,Q}function LF(z,Q,X){if(zw()&&(Q.mode&u1)!==$1&&(Q.flags&a1)===G1)return MB(Q),JQ(),Q.flags|=k7|$X|a5,!1;var Z=tJ(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(sb(Q),T5(Q),(Q.mode&Z4)!==$1){var J=X!==null;if(J){var $=Q.child;if($!==null)Q.treeBaseDuration-=$.treeBaseDuration}}return!1}else{if(JQ(),(Q.flags&a1)===G1)Q.memoizedState=null;if(Q.flags|=p1,T5(Q),(Q.mode&Z4)!==$1){var H=X!==null;if(H){var B=Q.child;if(B!==null)Q.treeBaseDuration-=B.treeBaseDuration}}return!1}else return PB(),!0}function iU(z,Q,X){var Z=Q.pendingProps;switch(LH(Q),Q.tag){case T:case u:case c:case L:case C:case k:case v:case V:case E:case a:return T5(Q),null;case _:{var J=Q.type;if(q7(J))lJ(Q);return T5(Q),null}case I:{var $=Q.stateNode;if(GQ(Q),UH(Q),pH(),$.pendingContext)$.context=$.pendingContext,$.pendingContext=null;if(z===null||z.child===null){var H=tJ(Q);if(H)LQ(Q);else if(z!==null){var B=z.memoizedState;if(!B.isDehydrated||(Q.flags&k7)!==G1)Q.flags|=x8,PB()}}return dG(z,Q),T5(Q),null}case N:{uH(Q);var K=uB(),b=Q.type;if(z!==null&&Q.stateNode!=null){if(dU(z,Q,b,Z,K),z.ref!==Q.ref)pU(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 T5(Q),null}var P=mH(),x=tJ(Q);if(x){if(rb(Q,K,P))LQ(Q)}else{var g=EN(b,Z,K,P,Q);if(cU(g,Q,!1,!1),Q.stateNode=g,uN(g,b,Z,K))LQ(Q)}if(Q.ref!==null)pU(Q)}return T5(Q),null}case w:{var e=Z;if(z&&Q.stateNode!=null){var z0=z.memoizedProps;lU(z,Q,z0,e)}else{if(typeof e!=="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 Y0=uB(),h0=mH(),e0=tJ(Q);if(e0){if(tb(Q))LQ(Q)}else Q.stateNode=xN(e,Y0,h0,Q)}return T5(Q),null}case m:{BQ(Q);var o0=Q.memoizedState;if(z===null||z.memoizedState!==null&&z.memoizedState.dehydrated!==null){var h1=LF(z,Q,o0);if(!h1)if(Q.flags&a5)return Q;else return null}if((Q.flags&a1)!==G1){if(Q.lanes=X,(Q.mode&Z4)!==$1)OG(Q);return Q}var y1=o0!==null,n=z!==null&&z.memoizedState!==null;if(y1!==n){if(y1){var G0=Q.child;if(G0.flags|=j8,(Q.mode&u1)!==$1){var r=z===null&&(Q.memoizedProps.unstable_avoidThisFallback!==!0||!U0);if(r||gH(d6.current,jB))FM();else q9()}}}var w0=Q.updateQueue;if(w0!==null)Q.flags|=p1;if(T5(Q),(Q.mode&Z4)!==$1){if(y1){var m0=Q.child;if(m0!==null)Q.treeBaseDuration-=m0.treeBaseDuration}}return null}case F:if(GQ(Q),dG(z,Q),z===null)yb(Q.stateNode.containerInfo);return T5(Q),null;case D:var y0=Q.type._context;return vH(y0,Q),T5(Q),null;case Q0:{var B1=Q.type;if(q7(B1))lJ(Q);return T5(Q),null}case t:{BQ(Q);var b1=Q.memoizedState;if(b1===null)return T5(Q),null;var Y4=(Q.flags&a1)!==G1,l1=b1.rendering;if(l1===null)if(!Y4){var n4=PM()&&(z===null||(z.flags&a1)===G1);if(!n4){var i1=Q.child;while(i1!==null){var d4=WY(i1);if(d4!==null){Y4=!0,Q.flags|=a1,KZ(b1,!1);var p5=d4.updateQueue;if(p5!==null)Q.updateQueue=p5,Q.flags|=p1;return Q.subtreeFlags=G1,Hw(Q,X),_8(Q,xH(d6.current,eX)),Q.child}i1=i1.sibling}}if(b1.tail!==null&&R5()>OK())Q.flags|=a1,Y4=!0,KZ(b1,!1),Q.lanes=d2}else KZ(b1,!1);else{if(!Y4){var h5=WY(l1);if(h5!==null){Q.flags|=a1,Y4=!0;var b6=h5.updateQueue;if(b6!==null)Q.updateQueue=b6,Q.flags|=p1;if(KZ(b1,!0),b1.tail===null&&b1.tailMode==="hidden"&&!l1.alternate&&!I5())return T5(Q),null}else if(R5()*2-b1.renderingStartTime>OK()&&X!==K6)Q.flags|=a1,Y4=!0,KZ(b1,!1),Q.lanes=d2}if(b1.isBackwards)l1.sibling=Q.child,Q.child=l1;else{var s5=b1.last;if(s5!==null)s5.sibling=l1;else Q.child=l1;b1.last=l1}}if(b1.tail!==null){var e5=b1.tail;b1.rendering=e5,b1.tail=e5.sibling,b1.renderingStartTime=R5(),e5.sibling=null;var c5=d6.current;if(Y4)c5=xH(c5,eX);else c5=qQ(c5);return _8(Q,c5),e5}return T5(Q),null}case l:break;case p:case i:{G9(Q);var d7=Q.memoizedState,PQ=d7!==null;if(z!==null){var CZ=z.memoizedState,R7=CZ!==null;if(R7!==PQ&&!X0)Q.flags|=j8}if(!PQ||(Q.mode&u1)===$1)T5(Q);else if(W6(_7,K6)){if(T5(Q),Q.subtreeFlags&(e4|p1))Q.flags|=j8}return null}case Z0:return null;case I0: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 _F(z,Q,X){switch(LH(Q),Q.tag){case _:{var Z=Q.type;if(q7(Z))lJ(Q);var J=Q.flags;if(J&a5){if(Q.flags=J&~a5|a1,(Q.mode&Z4)!==$1)OG(Q);return Q}return null}case I:{var $=Q.stateNode;GQ(Q),UH(Q),pH();var H=Q.flags;if((H&a5)!==G1&&(H&a1)===G1)return Q.flags=H&~a5|a1,Q;return null}case N:return uH(Q),null;case m:{BQ(Q);var B=Q.memoizedState;if(B!==null&&B.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.");JQ()}var K=Q.flags;if(K&a5){if(Q.flags=K&~a5|a1,(Q.mode&Z4)!==$1)OG(Q);return Q}return null}case t:return BQ(Q),null;case F:return GQ(Q),null;case D:var b=Q.type._context;return vH(b,Q),null;case p:case i:return G9(Q),null;case Z0:return null;default:return null}}function oU(z,Q,X){switch(LH(Q),Q.tag){case _:{var Z=Q.type.childContextTypes;if(Z!==null&&Z!==void 0)lJ(Q);break}case I:{var J=Q.stateNode;GQ(Q),UH(Q),pH();break}case N:{uH(Q);break}case F:GQ(Q);break;case m:BQ(Q);break;case t:BQ(Q);break;case D:var $=Q.type._context;vH($,Q);break;case p:case i:G9(Q);break}}var aU=null;aU=new Set;var gY=!1,C5=!1,RF=typeof WeakSet==="function"?WeakSet:Set,p0=null,_Q=null,RQ=null;function NF(z){l3(null,function(){throw z}),i3()}var bF=function(z,Q){if(Q.props=z.memoizedProps,Q.state=z.memoizedState,z.mode&Z4)try{O7(),Q.componentWillUnmount()}finally{W7(z)}else Q.componentWillUnmount()};function nU(z,Q){try{b8(J5,z)}catch(X){N4(z,Q,X)}}function lG(z,Q,X){try{bF(z,X)}catch(Z){N4(z,Q,Z)}}function wF(z,Q,X){try{X.componentDidMount()}catch(Z){N4(z,Q,Z)}}function rU(z,Q){try{eU(z)}catch(X){N4(z,Q,X)}}function NQ(z,Q){var X=z.ref;if(X!==null)if(typeof X==="function"){var Z;try{if(v0&&X1&&z.mode&Z4)try{O7(),Z=X(null)}finally{W7(z)}else Z=X(null)}catch(J){N4(z,Q,J)}if(typeof Z==="function")q("Unexpected return value from a callback ref in %s. A callback ref should not return a function.",M1(z))}else X.current=null}function xY(z,Q,X){try{X()}catch(Z){N4(z,Q,Z)}}var tU=null,sU=!1;function FF(z,Q){tU=VN(z.containerInfo),p0=Q,MF();var X=sU;return sU=!1,tU=null,X}function MF(){while(p0!==null){var z=p0,Q=z.child;if((z.subtreeFlags&t3)!==G1&&Q!==null)Q.return=z,p0=Q;else PF()}}function PF(){while(p0!==null){var z=p0;m4(z);try{AF(z)}catch(X){N4(z,z.return,X)}_5();var Q=z.sibling;if(Q!==null){Q.return=z.return,p0=Q;return}p0=z.return}}function AF(z){var{alternate:Q,flags:X}=z;if((X&x8)!==G1){switch(m4(z),z.tag){case L:case C:case c:break;case _:{if(Q!==null){var{memoizedProps:Z,memoizedState:J}=Q,$=z.stateNode;if(z.type===z.elementType&&!Gz){if($.props!==z.memoizedProps)q("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.",M1(z)||"instance");if($.state!==z.memoizedState)q("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.",M1(z)||"instance")}var H=$.getSnapshotBeforeUpdate(z.elementType===z.type?Z:i6(z.type,Z),J);{var B=aU;if(H===void 0&&!B.has(z.type))B.add(z.type),q("%s.getSnapshotBeforeUpdate(): A snapshot value (or null) must be returned. You have returned undefined.",M1(z))}$.__reactInternalSnapshotBeforeUpdate=H}break}case I:{{var K=z.stateNode;Yb(K.containerInfo)}break}case N:case w:case F:case Q0: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.")}_5()}}function a6(z,Q,X){var Z=Q.updateQueue,J=Z!==null?Z.lastEffect:null;if(J!==null){var $=J.next,H=$;do{if((H.tag&z)===z){var B=H.destroy;if(H.destroy=void 0,B!==void 0){if((z&k5)!==Y6)xL(Q);else if((z&J5)!==Y6)g2(Q);if((z&B7)!==Y6)IZ(!0);if(xY(Q,X,B),(z&B7)!==Y6)IZ(!1);if((z&k5)!==Y6)jL();else if((z&J5)!==Y6)x2()}}H=H.next}while(H!==$)}}function b8(z,Q){var X=Q.updateQueue,Z=X!==null?X.lastEffect:null;if(Z!==null){var J=Z.next,$=J;do{if(($.tag&z)===z){if((z&k5)!==Y6)uL(Q);else if((z&J5)!==Y6)pL(Q);var H=$.create;if((z&B7)!==Y6)IZ(!0);if($.destroy=H(),(z&B7)!==Y6)IZ(!1);if((z&k5)!==Y6)gL();else if((z&J5)!==Y6)cL();{var B=$.destroy;if(B!==void 0&&typeof B!=="function"){var K=void 0;if(($.tag&J5)!==G1)K="useLayoutEffect";else if(($.tag&B7)!==G1)K="useInsertionEffect";else K="useEffect";var b=void 0;if(B===null)b=" You returned null. If your effect does not require clean up, return undefined (or nothing).";else if(typeof B.then==="function")b=`
|
|
103
|
-
|
|
104
|
-
It looks like you wrote `+K+`(async () => ...) or returned a Promise. Instead, write the async function inside your effect and call it immediately:
|
|
105
|
-
|
|
106
|
-
`+K+`(() => {
|
|
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 b=" You returned: "+B;q("%s must not return anything besides a function, which is used for clean-up.%s",K,b)}}}$=$.next}while($!==J)}}function IF(z,Q){if((Q.flags&p1)!==G1)switch(Q.tag){case V:{var X=Q.stateNode.passiveEffectDuration,Z=Q.memoizedProps,J=Z.id,$=Z.onPostCommit,H=WU(),B=Q.alternate===null?"mount":"update";if(KU())B="nested-update";if(typeof $==="function")$(J,B,X,H);var K=Q.return;z:while(K!==null){switch(K.tag){case I:var b=K.stateNode;b.passiveEffectDuration+=X;break z;case V:var P=K.stateNode;P.passiveEffectDuration+=X;break z}K=K.return}break}}}function kF(z,Q,X,Z){if((X.flags&HX)!==G1)switch(X.tag){case L:case C:case c:{if(!C5)if(X.mode&Z4)try{O7(),b8(J5|Z5,X)}finally{W7(X)}else b8(J5|Z5,X);break}case _:{var J=X.stateNode;if(X.flags&p1){if(!C5)if(Q===null){if(X.type===X.elementType&&!Gz){if(J.props!==X.memoizedProps)q("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.",M1(X)||"instance");if(J.state!==X.memoizedState)q("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.",M1(X)||"instance")}if(X.mode&Z4)try{O7(),J.componentDidMount()}finally{W7(X)}else J.componentDidMount()}else{var $=X.elementType===X.type?Q.memoizedProps:i6(X.type,Q.memoizedProps),H=Q.memoizedState;if(X.type===X.elementType&&!Gz){if(J.props!==X.memoizedProps)q("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.",M1(X)||"instance");if(J.state!==X.memoizedState)q("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.",M1(X)||"instance")}if(X.mode&Z4)try{O7(),J.componentDidUpdate($,H,J.__reactInternalSnapshotBeforeUpdate)}finally{W7(X)}else J.componentDidUpdate($,H,J.__reactInternalSnapshotBeforeUpdate)}}var B=X.updateQueue;if(B!==null){if(X.type===X.elementType&&!Gz){if(J.props!==X.memoizedProps)q("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.",M1(X)||"instance");if(J.state!==X.memoizedState)q("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.",M1(X)||"instance")}mB(X,B,J)}break}case I:{var K=X.updateQueue;if(K!==null){var b=null;if(X.child!==null)switch(X.child.tag){case N:b=zH(X.child.stateNode);break;case _:b=X.child.stateNode;break}mB(X,K,b)}break}case N:{var P=X.stateNode;if(Q===null&&X.flags&p1){var{type:x,memoizedProps:g}=X;lN(P,x,g)}break}case w:break;case F:break;case V:{{var e=X.memoizedProps,z0=e.onCommit,Y0=e.onRender,h0=X.stateNode.effectDuration,e0=WU(),o0=Q===null?"mount":"update";if(KU())o0="nested-update";if(typeof Y0==="function")Y0(X.memoizedProps.id,o0,X.actualDuration,X.treeBaseDuration,X.actualStartTime,e0);{if(typeof z0==="function")z0(X.memoizedProps.id,o0,h0,e0);CM(X);var h1=X.return;z:while(h1!==null){switch(h1.tag){case I:var y1=h1.stateNode;y1.effectDuration+=h0;break z;case V:var n=h1.stateNode;n.effectDuration+=h0;break z}h1=h1.return}}}break}case m:{VF(z,X);break}case t:case Q0:case l:case p:case i:case I0: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(!C5){if(X.flags&X8)eU(X)}}function TF(z){switch(z.tag){case L:case C:case c:{if(z.mode&Z4)try{O7(),nU(z,z.return)}finally{W7(z)}else nU(z,z.return);break}case _:{var Q=z.stateNode;if(typeof Q.componentDidMount==="function")wF(z,z.return,Q);rU(z,z.return);break}case N:{rU(z,z.return);break}}}function CF(z,Q){var X=null;{var Z=z;while(!0){if(Z.tag===N){if(X===null){X=Z;try{var J=Z.stateNode;if(Q)Qb(J);else Zb(Z.stateNode,Z.memoizedProps)}catch(H){N4(z,z.return,H)}}}else if(Z.tag===w){if(X===null)try{var $=Z.stateNode;if(Q)Xb($);else Jb($,Z.memoizedProps)}catch(H){N4(z,z.return,H)}}else if((Z.tag===p||Z.tag===i)&&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 eU(z){var Q=z.ref;if(Q!==null){var X=z.stateNode,Z;switch(z.tag){case N:Z=zH(X);break;default:Z=X}if(typeof Q==="function"){var J;if(z.mode&Z4)try{O7(),J=Q(Z)}finally{W7(z)}else J=Q(Z);if(typeof J==="function")q("Unexpected return value from a callback ref in %s. A callback ref should not return a function.",M1(z))}else{if(!Q.hasOwnProperty("current"))q("Unexpected ref object provided for %s. Use either a ref-setter function or React.createRef().",M1(z));Q.current=Z}}}function vF(z){var Q=z.alternate;if(Q!==null)Q.return=null;z.return=null}function zK(z){var Q=z.alternate;if(Q!==null)z.alternate=null,zK(Q);{if(z.child=null,z.deletions=null,z.sibling=null,z.tag===N){var X=z.stateNode;if(X!==null)Eb(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 SF(z){var Q=z.return;while(Q!==null){if(QK(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 QK(z){return z.tag===N||z.tag===I||z.tag===F}function XK(z){var Q=z;z:while(!0){while(Q.sibling===null){if(Q.return===null||QK(Q.return))return null;Q=Q.return}Q.sibling.return=Q.return,Q=Q.sibling;while(Q.tag!==N&&Q.tag!==w&&Q.tag!==o){if(Q.flags&e4)continue z;if(Q.child===null||Q.tag===F)continue z;else Q.child.return=Q,Q=Q.child}if(!(Q.flags&e4))return Q.stateNode}}function fF(z){var Q=SF(z);switch(Q.tag){case N:{var X=Q.stateNode;if(Q.flags&YX)XB(X),Q.flags&=~YX;var Z=XK(z);oG(z,Z,X);break}case I:case F:{var J=Q.stateNode.containerInfo,$=XK(z);iG(z,$,J);break}default:throw Error("Invalid host parent fiber. This error is likely caused by a bug in React. Please file an issue.")}}function iG(z,Q,X){var Z=z.tag,J=Z===N||Z===w;if(J){var $=z.stateNode;if(Q)tN(X,$,Q);else nN(X,$)}else if(Z===F);else{var H=z.child;if(H!==null){iG(H,Q,X);var B=H.sibling;while(B!==null)iG(B,Q,X),B=B.sibling}}}function oG(z,Q,X){var Z=z.tag,J=Z===N||Z===w;if(J){var $=z.stateNode;if(Q)rN(X,$,Q);else aN(X,$)}else if(Z===F);else{var H=z.child;if(H!==null){oG(H,Q,X);var B=H.sibling;while(B!==null)oG(B,Q,X),B=B.sibling}}}var v5=null,n6=!1;function hF(z,Q,X){{var Z=Q;z:while(Z!==null){switch(Z.tag){case N:{v5=Z.stateNode,n6=!1;break z}case I:{v5=Z.stateNode.containerInfo,n6=!0;break z}case F:{v5=Z.stateNode.containerInfo,n6=!0;break z}}Z=Z.return}if(v5===null)throw Error("Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue.");ZK(z,Q,X),v5=null,n6=!1}vF(X)}function w8(z,Q,X){var Z=X.child;while(Z!==null)ZK(z,Q,Z),Z=Z.sibling}function ZK(z,Q,X){switch(VL(X),X.tag){case N:if(!C5)NQ(X,Q);case w:{{var Z=v5,J=n6;if(v5=null,w8(z,Q,X),v5=Z,n6=J,v5!==null)if(n6)eN(v5,X.stateNode);else sN(v5,X.stateNode)}return}case o:{if(v5!==null)if(n6)zb(v5,X.stateNode);else JH(v5,X.stateNode);return}case F:{{var $=v5,H=n6;v5=X.stateNode.containerInfo,n6=!0,w8(z,Q,X),v5=$,n6=H}return}case L:case C:case a:case c:{if(!C5){var B=X.updateQueue;if(B!==null){var K=B.lastEffect;if(K!==null){var b=K.next,P=b;do{var x=P,g=x.destroy,e=x.tag;if(g!==void 0){if((e&B7)!==Y6)xY(X,Q,g);else if((e&J5)!==Y6){if(g2(X),X.mode&Z4)O7(),xY(X,Q,g),W7(X);else xY(X,Q,g);x2()}}P=P.next}while(P!==b)}}}w8(z,Q,X);return}case _:{if(!C5){NQ(X,Q);var z0=X.stateNode;if(typeof z0.componentWillUnmount==="function")lG(X,Q,z0)}w8(z,Q,X);return}case l:{w8(z,Q,X);return}case p:{if(X.mode&u1){var Y0=C5;C5=Y0||X.memoizedState!==null,w8(z,Q,X),C5=Y0}else w8(z,Q,X);break}default:{w8(z,Q,X);return}}}function yF(z){var Q=z.memoizedState}function VF(z,Q){var X=Q.memoizedState;if(X===null){var Z=Q.alternate;if(Z!==null){var J=Z.memoizedState;if(J!==null){var $=J.dehydrated;if($!==null)bb($)}}}}function JK(z){var Q=z.updateQueue;if(Q!==null){z.updateQueue=null;var X=z.stateNode;if(X===null)X=z.stateNode=new RF;Q.forEach(function(Z){var J=DM.bind(null,z,Z);if(!X.has(Z)){if(X.add(Z),g6)if(_Q!==null&&RQ!==null)AZ(RQ,_Q);else throw Error("Expected finished root and lanes to be set. This is a bug in React.");Z.then(J,J)}})}}function DF(z,Q,X){_Q=X,RQ=z,m4(Q),YK(Q,z),m4(Q),_Q=null,RQ=null}function r6(z,Q,X){var Z=Q.deletions;if(Z!==null)for(var J=0;J<Z.length;J++){var $=Z[J];try{hF(z,Q,$)}catch(K){N4($,Q,K)}}var H=oZ();if(Q.subtreeFlags&s3){var B=Q.child;while(B!==null)m4(B),YK(B,z),B=B.sibling}m4(H)}function YK(z,Q,X){var{alternate:Z,flags:J}=z;switch(z.tag){case L:case C:case a:case c:{if(r6(Q,z),L7(z),J&p1){try{a6(B7|Z5,z,z.return),b8(B7|Z5,z)}catch(B1){N4(z,z.return,B1)}if(z.mode&Z4){try{O7(),a6(J5|Z5,z,z.return)}catch(B1){N4(z,z.return,B1)}W7(z)}else try{a6(J5|Z5,z,z.return)}catch(B1){N4(z,z.return,B1)}}return}case _:{if(r6(Q,z),L7(z),J&X8){if(Z!==null)NQ(Z,Z.return)}return}case N:{if(r6(Q,z),L7(z),J&X8){if(Z!==null)NQ(Z,Z.return)}{if(z.flags&YX){var $=z.stateNode;try{XB($)}catch(B1){N4(z,z.return,B1)}}if(J&p1){var H=z.stateNode;if(H!=null){var B=z.memoizedProps,K=Z!==null?Z.memoizedProps:B,b=z.type,P=z.updateQueue;if(z.updateQueue=null,P!==null)try{iN(H,P,b,K,B,z)}catch(B1){N4(z,z.return,B1)}}}}return}case w:{if(r6(Q,z),L7(z),J&p1){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:x,memoizedProps:g}=z,e=Z!==null?Z.memoizedProps:g;try{oN(x,e,g)}catch(B1){N4(z,z.return,B1)}}return}case I:{if(r6(Q,z),L7(z),J&p1){if(Z!==null){var z0=Z.memoizedState;if(z0.isDehydrated)try{Nb(Q.containerInfo)}catch(B1){N4(z,z.return,B1)}}}return}case F:{r6(Q,z),L7(z);return}case m:{r6(Q,z),L7(z);var Y0=z.child;if(Y0.flags&j8){var{stateNode:h0,memoizedState:e0}=Y0,o0=e0!==null;if(h0.isHidden=o0,o0){var h1=Y0.alternate!==null&&Y0.alternate.memoizedState!==null;if(!h1)wM()}}if(J&p1){try{yF(z)}catch(B1){N4(z,z.return,B1)}JK(z)}return}case p:{var y1=Z!==null&&Z.memoizedState!==null;if(z.mode&u1){var n=C5;C5=n||y1,r6(Q,z),C5=n}else r6(Q,z);if(L7(z),J&j8){var{stateNode:G0,memoizedState:r}=z,w0=r!==null,m0=z;if(G0.isHidden=w0,w0){if(!y1){if((m0.mode&u1)!==$1){p0=m0;var y0=m0.child;while(y0!==null)p0=y0,mF(y0),y0=y0.sibling}}}CF(m0,w0)}return}case t:{if(r6(Q,z),L7(z),J&p1)JK(z);return}case l:return;default:{r6(Q,z),L7(z);return}}}function L7(z){var Q=z.flags;if(Q&e4){try{fF(z)}catch(X){N4(z,z.return,X)}z.flags&=~e4}if(Q&T7)z.flags&=~T7}function EF(z,Q,X){_Q=X,RQ=Q,p0=z,$K(z,Q,X),_Q=null,RQ=null}function $K(z,Q,X){var Z=(z.mode&u1)!==$1;while(p0!==null){var J=p0,$=J.child;if(J.tag===p&&Z){var H=J.memoizedState!==null,B=H||gY;if(B){aG(z,Q,X);continue}else{var K=J.alternate,b=K!==null&&K.memoizedState!==null,P=b||C5,x=gY,g=C5;if(gY=B,C5=P,C5&&!g)p0=J,uF(J);var e=$;while(e!==null)p0=e,$K(e,Q,X),e=e.sibling;p0=J,gY=x,C5=g,aG(z,Q,X);continue}}if((J.subtreeFlags&HX)!==G1&&$!==null)$.return=J,p0=$;else aG(z,Q,X)}}function aG(z,Q,X){while(p0!==null){var Z=p0;if((Z.flags&HX)!==G1){var J=Z.alternate;m4(Z);try{kF(Q,J,Z,X)}catch(H){N4(Z,Z.return,H)}_5()}if(Z===z){p0=null;return}var $=Z.sibling;if($!==null){$.return=Z.return,p0=$;return}p0=Z.return}}function mF(z){while(p0!==null){var Q=p0,X=Q.child;switch(Q.tag){case L:case C:case a:case c:{if(Q.mode&Z4)try{O7(),a6(J5,Q,Q.return)}finally{W7(Q)}else a6(J5,Q,Q.return);break}case _:{NQ(Q,Q.return);var Z=Q.stateNode;if(typeof Z.componentWillUnmount==="function")lG(Q,Q.return,Z);break}case N:{NQ(Q,Q.return);break}case p:{var J=Q.memoizedState!==null;if(J){HK(z);continue}break}}if(X!==null)X.return=Q,p0=X;else HK(z)}}function HK(z){while(p0!==null){var Q=p0;if(Q===z){p0=null;return}var X=Q.sibling;if(X!==null){X.return=Q.return,p0=X;return}p0=Q.return}}function uF(z){while(p0!==null){var Q=p0,X=Q.child;if(Q.tag===p){var Z=Q.memoizedState!==null;if(Z){GK(z);continue}}if(X!==null)X.return=Q,p0=X;else GK(z)}}function GK(z){while(p0!==null){var Q=p0;m4(Q);try{TF(Q)}catch(Z){N4(Q,Q.return,Z)}if(_5(),Q===z){p0=null;return}var X=Q.sibling;if(X!==null){X.return=Q.return,p0=X;return}p0=Q.return}}function gF(z,Q,X,Z){p0=Q,xF(Q,z,X,Z)}function xF(z,Q,X,Z){while(p0!==null){var J=p0,$=J.child;if((J.subtreeFlags&gz)!==G1&&$!==null)$.return=J,p0=$;else jF(z,Q,X,Z)}}function jF(z,Q,X,Z){while(p0!==null){var J=p0;if((J.flags&u6)!==G1){m4(J);try{pF(Q,J,X,Z)}catch(H){N4(J,J.return,H)}_5()}if(J===z){p0=null;return}var $=J.sibling;if($!==null){$.return=J.return,p0=$;return}p0=J.return}}function pF(z,Q,X,Z){switch(Q.tag){case L:case C:case c:{if(Q.mode&Z4){WG();try{b8(k5|Z5,Q)}finally{KG(Q)}}else b8(k5|Z5,Q);break}}}function cF(z){p0=z,dF()}function dF(){while(p0!==null){var z=p0,Q=z.child;if((p0.flags&g8)!==G1){var X=z.deletions;if(X!==null){for(var Z=0;Z<X.length;Z++){var J=X[Z];p0=J,oF(J,z)}{var $=z.alternate;if($!==null){var H=$.child;if(H!==null){$.child=null;do{var B=H.sibling;H.sibling=null,H=B}while(H!==null)}}}p0=z}}if((z.subtreeFlags&gz)!==G1&&Q!==null)Q.return=z,p0=Q;else lF()}}function lF(){while(p0!==null){var z=p0;if((z.flags&u6)!==G1)m4(z),iF(z),_5();var Q=z.sibling;if(Q!==null){Q.return=z.return,p0=Q;return}p0=z.return}}function iF(z){switch(z.tag){case L:case C:case c:{if(z.mode&Z4)WG(),a6(k5|Z5,z,z.return),KG(z);else a6(k5|Z5,z,z.return);break}}}function oF(z,Q){while(p0!==null){var X=p0;m4(X),nF(X,Q),_5();var Z=X.child;if(Z!==null)Z.return=X,p0=Z;else aF(z)}}function aF(z){while(p0!==null){var Q=p0,X=Q.sibling,Z=Q.return;if(zK(Q),Q===z){p0=null;return}if(X!==null){X.return=Z,p0=X;return}p0=Z}}function nF(z,Q){switch(z.tag){case L:case C:case c:{if(z.mode&Z4)WG(),a6(k5,z,Q),KG(z);else a6(k5,z,Q);break}}}function rF(z){switch(z.tag){case L:case C:case c:{try{b8(J5|Z5,z)}catch(X){N4(z,z.return,X)}break}case _:{var Q=z.stateNode;try{Q.componentDidMount()}catch(X){N4(z,z.return,X)}break}}}function tF(z){switch(z.tag){case L:case C:case c:{try{b8(k5|Z5,z)}catch(Q){N4(z,z.return,Q)}break}}}function sF(z){switch(z.tag){case L:case C:case c:{try{a6(J5|Z5,z,z.return)}catch(X){N4(z,z.return,X)}break}case _:{var Q=z.stateNode;if(typeof Q.componentWillUnmount==="function")lG(z,z.return,Q);break}}}function eF(z){switch(z.tag){case L:case C:case c:try{a6(k5|Z5,z,z.return)}catch(Q){N4(z,z.return,Q)}}}var zM=0,QM=1,XM=2,ZM=3,JM=4;if(typeof Symbol==="function"&&Symbol.for){var WZ=Symbol.for;zM=WZ("selector.component"),QM=WZ("selector.has_pseudo_class"),XM=WZ("selector.role"),ZM=WZ("selector.test_id"),JM=WZ("selector.text")}var YM=[];function $M(){YM.forEach(function(z){return z()})}var HM=Y.ReactCurrentActQueue;function GM(z){{var Q=typeof IS_REACT_ACT_ENVIRONMENT<"u"?IS_REACT_ACT_ENVIRONMENT:void 0,X=typeof jest<"u";return X&&Q!==!1}}function qK(){{var z=typeof IS_REACT_ACT_ENVIRONMENT<"u"?IS_REACT_ACT_ENVIRONMENT:void 0;if(!z&&HM.current!==null)q("The current testing environment is not configured to support act(...)");return z}}var qM=Math.ceil,nG=Y.ReactCurrentDispatcher,rG=Y.ReactCurrentOwner,S5=Y.ReactCurrentBatchConfig,t6=Y.ReactCurrentActQueue,H5=0,BK=1,f5=2,C6=4,x7=0,OZ=1,qz=2,jY=3,LZ=4,UK=5,tG=6,g1=H5,r5=null,u4=null,G5=N0,_7=N0,sG=B8(N0),q5=x7,_Z=null,eG=N0,pY=N0,RZ=N0,cY=N0,NZ=null,$6=null,z9=0,KK=500,WK=1/0,BM=500,j7=null;function bZ(){WK=R5()+BM}function OK(){return WK}var dY=!1,Q9=null,bQ=null,Bz=!1,F8=null,wZ=N0,X9=[],Z9=null,UM=50,FZ=0,J9=null,Y9=!1,lY=!1,KM=50,wQ=0,iY=null,MZ=A4,oY=N0,LK=!1;function aY(){return r5}function t5(){if((g1&(f5|C6))!==H5)return R5();if(MZ!==A4)return MZ;return MZ=R5(),MZ}function M8(z){var Q=z.mode;if((Q&u1)===$1)return L1;else if((g1&f5)!==H5&&G5!==N0)return OX(G5);var X=Zw()!==Xw;if(X){if(S5.transition!==null){var Z=S5.transition;if(!Z._updatedFibers)Z._updatedFibers=new Set;Z._updatedFibers.add(z)}if(oY===b5)oY=a2();return oY}var J=x6();if(J!==b5)return J;var $=jN();return $}function WM(z){var Q=z.mode;if((Q&u1)===$1)return L1;return U_()}function B5(z,Q,X,Z){if(mM(),LK)q("useInsertionEffect must not schedule updates.");if(Y9)lY=!0;if(LX(z,X,Z),(g1&f5)!==N0&&z===r5)xM(Q);else{if(g6)t2(z,Q,X);if(jM(Q),z===r5){if((g1&f5)===H5)RZ=I1(RZ,X);if(q5===LZ)P8(z,G5)}if(H6(z,Z),X===L1&&g1===H5&&(Q.mode&u1)===$1&&!t6.isBatchingLegacy)bZ(),OB()}}function OM(z,Q,X){var Z=z.current;Z.lanes=Q,LX(z,Q,X),H6(z,X)}function LM(z){return(g1&f5)!==H5}function H6(z,Q){var X=z.callbackNode;Y_(z,Q);var Z=KJ(z,z===r5?G5:N0);if(Z===N0){if(X!==null)fK(X);z.callbackNode=null,z.callbackPriority=b5;return}var J=a8(Z),$=z.callbackPriority;if($===J&&!(t6.current!==null&&X!==K9)){if(X==null&&$!==L1)q("Expected scheduled callback to exist. This error is likely caused by a bug in React. Please file an issue.");return}if(X!=null)fK(X);var H;if(J===L1){if(z.tag===U8){if(t6.isBatchingLegacy!==null)t6.didScheduleLegacyUpdate=!0;gb(NK.bind(null,z))}else WB(NK.bind(null,z));if(t6.current!==null)t6.current.push(K8);else cN(function(){if((g1&(f5|C6))===H5)K8()});H=null}else{var B;switch(zq(Z)){case O6:B=GJ;break;case f7:B=e3;break;case h7:B=d8;break;case _J:B=z$;break;default:B=d8;break}H=W9(B,_K.bind(null,z))}z.callbackPriority=J,z.callbackNode=H}function _K(z,Q){if(Cw(),MZ=A4,oY=N0,(g1&(f5|C6))!==H5)throw Error("Should not already be working.");var X=z.callbackNode,Z=c7();if(Z){if(z.callbackNode!==X)return null}var J=KJ(z,z===r5?G5:N0);if(J===N0)return null;var $=!WJ(z,J)&&!B_(z,J)&&!Q,H=$?IM(z,J):rY(z,J);if(H!==x7){if(H===qz){var B=M$(z);if(B!==N0)J=B,H=$9(z,B)}if(H===OZ){var K=_Z;throw Uz(z,N0),P8(z,J),H6(z,R5()),K}if(H===tG)P8(z,J);else{var b=!WJ(z,J),P=z.current.alternate;if(b&&!RM(P)){if(H=rY(z,J),H===qz){var x=M$(z);if(x!==N0)J=x,H=$9(z,x)}if(H===OZ){var g=_Z;throw Uz(z,N0),P8(z,J),H6(z,R5()),g}}z.finishedWork=P,z.finishedLanes=J,_M(z,H,J)}}if(H6(z,R5()),z.callbackNode===X)return _K.bind(null,z);return null}function $9(z,Q){var X=NZ;if(RJ(z)){var Z=Uz(z,Q);Z.flags|=k7,hb(z.containerInfo)}var J=rY(z,Q);if(J!==qz){var $=$6;if($6=X,$!==null)RK($)}return J}function RK(z){if($6===null)$6=z;else $6.push.apply($6,z)}function _M(z,Q,X){switch(Q){case x7:case OZ:throw Error("Root did not complete. This is a bug in React.");case qz:{Kz(z,$6,j7);break}case jY:{if(P8(z,X),i2(X)&&!hK()){var Z=z9+KK-R5();if(Z>10){var J=KJ(z,N0);if(J!==N0)break;var $=z.suspendedLanes;if(!dz($,X)){var H=t5();r2(z,$);break}z.timeoutHandle=XH(Kz.bind(null,z,$6,j7),Z);break}}Kz(z,$6,j7);break}case LZ:{if(P8(z,X),q_(X))break;if(!hK()){var B=Z_(z,X),K=B,b=R5()-K,P=EM(b)-b;if(P>10){z.timeoutHandle=XH(Kz.bind(null,z,$6,j7),P);break}}Kz(z,$6,j7);break}case UK:{Kz(z,$6,j7);break}default:throw Error("Unknown root exit status.")}}function RM(z){var Q=z;while(!0){if(Q.flags&$J){var X=Q.updateQueue;if(X!==null){var Z=X.stores;if(Z!==null)for(var J=0;J<Z.length;J++){var $=Z[J],H=$.getSnapshot,B=$.value;try{if(!_6(H(),B))return!1}catch(b){return!1}}}}var K=Q.child;if(Q.subtreeFlags&$J&&K!==null){K.return=Q,Q=K;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 P8(z,Q){Q=OJ(Q,cY),Q=OJ(Q,RZ),W_(z,Q)}function NK(z){if(vw(),(g1&(f5|C6))!==H5)throw Error("Should not already be working.");c7();var Q=KJ(z,N0);if(!W6(Q,L1))return H6(z,R5()),null;var X=rY(z,Q);if(z.tag!==U8&&X===qz){var Z=M$(z);if(Z!==N0)Q=Z,X=$9(z,Z)}if(X===OZ){var J=_Z;throw Uz(z,N0),P8(z,Q),H6(z,R5()),J}if(X===tG)throw Error("Root did not complete. This is a bug in React.");var $=z.current.alternate;return z.finishedWork=$,z.finishedLanes=Q,Kz(z,$6,j7),H6(z,R5()),null}function NM(z,Q){if(Q!==N0){if(k$(z,I1(Q,L1)),H6(z,R5()),(g1&(f5|C6))===H5)bZ(),K8()}}function H9(z,Q){var X=g1;g1|=BK;try{return z(Q)}finally{if(g1=X,g1===H5&&!t6.isBatchingLegacy)bZ(),OB()}}function bM(z,Q,X,Z,J){var $=x6(),H=S5.transition;try{return S5.transition=null,w5(O6),z(Q,X,Z,J)}finally{if(w5($),S5.transition=H,g1===H5)bZ()}}function p7(z){if(F8!==null&&F8.tag===U8&&(g1&(f5|C6))===H5)c7();var Q=g1;g1|=BK;var X=S5.transition,Z=x6();try{if(S5.transition=null,w5(O6),z)return z();else return}finally{if(w5(Z),S5.transition=X,g1=Q,(g1&(f5|C6))===H5)K8()}}function bK(){return(g1&(f5|C6))!==H5}function nY(z,Q){x5(sG,_7,z),_7=I1(_7,Q),eG=I1(eG,Q)}function G9(z){_7=sG.current,g5(sG,z)}function Uz(z,Q){z.finishedWork=null,z.finishedLanes=N0;var X=z.timeoutHandle;if(X!==ZH)z.timeoutHandle=ZH,pN(X);if(u4!==null){var Z=u4.return;while(Z!==null){var J=Z.alternate;oU(J,Z),Z=Z.return}}r5=z;var $=Wz(z.current,null);return u4=$,G5=_7=eG=Q,q5=x7,_Z=null,pY=N0,RZ=N0,cY=N0,NZ=null,$6=null,Bw(),c6.discardPendingWarnings(),$}function wK(z,Q){do{var X=u4;try{if(ZY(),cB(),_5(),rG.current=null,X===null||X.return===null){q5=OZ,_Z=Q,u4=null;return}if(v0&&X.mode&Z4)VY(X,!0);if(P0)if(xz(),Q!==null&&typeof Q==="object"&&typeof Q.then==="function"){var Z=Q;lL(X,Z,G5)}else dL(X,Q,G5);uw(z,X.return,X,Q,G5),AK(X)}catch(J){if(Q=J,u4===X&&X!==null)X=X.return,u4=X;else X=u4;continue}return}while(!0)}function FK(){var z=nG.current;if(nG.current=vY,z===null)return vY;else return z}function MK(z){nG.current=z}function wM(){z9=R5()}function PZ(z){pY=I1(z,pY)}function FM(){if(q5===x7)q5=jY}function q9(){if(q5===x7||q5===jY||q5===qz)q5=LZ;if(r5!==null&&(P$(pY)||P$(RZ)))P8(r5,G5)}function MM(z){if(q5!==LZ)q5=qz;if(NZ===null)NZ=[z];else NZ.push(z)}function PM(){return q5===x7}function rY(z,Q){var X=g1;g1|=f5;var Z=FK();if(r5!==z||G5!==Q){if(g6){var J=z.memoizedUpdaters;if(J.size>0)AZ(z,G5),J.clear();s2(z,Q)}j7=e2(),Uz(z,Q)}j2(Q);do try{AM();break}catch($){wK(z,$)}while(!0);if(ZY(),g1=X,MK(Z),u4!==null)throw Error("Cannot commit an incomplete root. This error is likely caused by a bug in React. Please file an issue.");return p2(),r5=null,G5=N0,q5}function AM(){while(u4!==null)PK(u4)}function IM(z,Q){var X=g1;g1|=f5;var Z=FK();if(r5!==z||G5!==Q){if(g6){var J=z.memoizedUpdaters;if(J.size>0)AZ(z,G5),J.clear();s2(z,Q)}j7=e2(),bZ(),Uz(z,Q)}j2(Q);do try{kM();break}catch($){wK(z,$)}while(!0);if(ZY(),MK(Z),g1=X,u4!==null)return rL(),x7;else return p2(),r5=null,G5=N0,q5}function kM(){while(u4!==null&&!AL())PK(u4)}function PK(z){var Q=z.alternate;m4(z);var X;if((z.mode&Z4)!==$1)UG(z),X=B9(Q,z,_7),VY(z,!0);else X=B9(Q,z,_7);if(_5(),z.memoizedProps=z.pendingProps,X===null)AK(z);else u4=X;rG.current=null}function AK(z){var Q=z;do{var{alternate:X,return:Z}=Q;if((Q.flags&$X)===G1){m4(Q);var J=void 0;if((Q.mode&Z4)===$1)J=iU(X,Q,_7);else UG(Q),J=iU(X,Q,_7),VY(Q,!1);if(_5(),J!==null){u4=J;return}}else{var $=_F(X,Q);if($!==null){$.flags&=NL,u4=$;return}if((Q.mode&Z4)!==$1){VY(Q,!1);var{actualDuration:H,child:B}=Q;while(B!==null)H+=B.actualDuration,B=B.sibling;Q.actualDuration=H}if(Z!==null)Z.flags|=$X,Z.subtreeFlags=G1,Z.deletions=null;else{q5=tG,u4=null;return}}var K=Q.sibling;if(K!==null){u4=K;return}Q=Z,u4=Q}while(Q!==null);if(q5===x7)q5=UK}function Kz(z,Q,X){var Z=x6(),J=S5.transition;try{S5.transition=null,w5(O6),TM(z,Q,X,Z)}finally{S5.transition=J,w5(Z)}return null}function TM(z,Q,X,Z){do c7();while(F8!==null);if(uM(),(g1&(f5|C6))!==H5)throw Error("Should not already be working.");var{finishedWork:J,finishedLanes:$}=z;if(mL($),J===null)return u2(),null;else if($===N0)q("root.finishedLanes should not be empty during a commit. This is a bug in React.");if(z.finishedWork=null,z.finishedLanes=N0,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=b5;var H=I1(J.lanes,J.childLanes);if(O_(z,H),z===r5)r5=null,u4=null,G5=N0;if((J.subtreeFlags&gz)!==G1||(J.flags&gz)!==G1){if(!Bz)Bz=!0,Z9=X,W9(d8,function(){return c7(),null})}var B=(J.subtreeFlags&(t3|s3|HX|gz))!==G1,K=(J.flags&(t3|s3|HX|gz))!==G1;if(B||K){var b=S5.transition;S5.transition=null;var P=x6();w5(O6);var x=g1;g1|=C6,rG.current=null;var g=FF(z,J);OU(),DF(z,J,$),DN(z.containerInfo),z.current=J,iL($),EF(J,z,$),oL(),IL(),g1=x,w5(P),S5.transition=b}else z.current=J,OU();var e=Bz;if(Bz)Bz=!1,F8=z,wZ=$;else wQ=0,iY=null;if(H=z.pendingLanes,H===N0)bQ=null;if(!e)CK(z.current,!1);if(hL(J.stateNode,Z),g6)z.memoizedUpdaters.clear();if($M(),H6(z,R5()),Q!==null){var z0=z.onRecoverableError;for(var Y0=0;Y0<Q.length;Y0++){var h0=Q[Y0],e0=h0.stack,o0=h0.digest;z0(h0.value,{componentStack:e0,digest:o0})}}if(dY){dY=!1;var h1=Q9;throw Q9=null,h1}if(W6(wZ,L1)&&z.tag!==U8)c7();if(H=z.pendingLanes,W6(H,L1))if(Tw(),z===J9)FZ++;else FZ=0,J9=z;else FZ=0;return K8(),u2(),null}function c7(){if(F8!==null){var z=zq(wZ),Q=N_(h7,z),X=S5.transition,Z=x6();try{return S5.transition=null,w5(Q),vM()}finally{w5(Z),S5.transition=X}}return!1}function CM(z){if(X9.push(z),!Bz)Bz=!0,W9(d8,function(){return c7(),null})}function vM(){if(F8===null)return!1;var z=Z9;Z9=null;var Q=F8,X=wZ;if(F8=null,wZ=N0,(g1&(f5|C6))!==H5)throw Error("Cannot flush passive effects while already rendering.");Y9=!0,lY=!1,aL(X);var Z=g1;g1|=C6,cF(Q.current),gF(Q,Q.current,X,z);{var J=X9;X9=[];for(var $=0;$<J.length;$++){var H=J[$];IF(Q,H)}}nL(),CK(Q.current,!0),g1=Z,K8();{if(lY)if(Q===iY)wQ++;else wQ=0,iY=Q;else wQ=0;Y9=!1,lY=!1}yL(Q);{var B=Q.current.stateNode;B.effectDuration=0,B.passiveEffectDuration=0}return!0}function IK(z){return bQ!==null&&bQ.has(z)}function SM(z){if(bQ===null)bQ=new Set([z]);else bQ.add(z)}function fM(z){if(!dY)dY=!0,Q9=z}var hM=fM;function kK(z,Q,X){var Z=Hz(X,Q),J=MU(z,Z,L1),$=O8(z,J,L1),H=t5();if($!==null)LX($,L1,H),H6($,H)}function N4(z,Q,X){if(NF(X),IZ(!1),z.tag===I){kK(z,z,X);return}var Z=null;Z=Q;while(Z!==null){if(Z.tag===I){kK(Z,z,X);return}else if(Z.tag===_){var{type:J,stateNode:$}=Z;if(typeof J.getDerivedStateFromError==="function"||typeof $.componentDidCatch==="function"&&!IK($)){var H=Hz(X,z),B=vG(Z,H,L1),K=O8(Z,B,L1),b=t5();if(K!==null)LX(K,L1,b),H6(K,b);return}}Z=Z.return}q(`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 yM(z,Q,X){var Z=z.pingCache;if(Z!==null)Z.delete(Q);var J=t5();if(r2(z,X),pM(z),r5===z&&dz(G5,X))if(q5===LZ||q5===jY&&i2(G5)&&R5()-z9<KK)Uz(z,N0);else cY=I1(cY,X);H6(z,J)}function TK(z,Q){if(Q===b5)Q=WM(z);var X=t5(),Z=J6(z,Q);if(Z!==null)LX(Z,Q,X),H6(Z,X)}function VM(z){var Q=z.memoizedState,X=b5;if(Q!==null)X=Q.retryLane;TK(z,X)}function DM(z,Q){var X=b5,Z;switch(z.tag){case m:Z=z.stateNode;var J=z.memoizedState;if(J!==null)X=J.retryLane;break;case t: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);TK(z,X)}function EM(z){return z<120?120:z<480?480:z<1080?1080:z<1920?1920:z<3000?3000:z<4320?4320:qM(z/1960)*1960}function mM(){if(FZ>UM)throw FZ=0,J9=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(wQ>KM)wQ=0,iY=null,q("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 uM(){c6.flushLegacyContextWarning(),c6.flushPendingUnsafeLifecycleWarnings()}function CK(z,Q){{if(m4(z),tY(z,C7,sF),Q)tY(z,HJ,eF);if(tY(z,C7,rF),Q)tY(z,HJ,tF);_5()}}function tY(z,Q,X){{var Z=z,J=null;while(Z!==null){var $=Z.subtreeFlags&Q;if(Z!==J&&Z.child!==null&&$!==G1)Z=Z.child;else{if((Z.flags&Q)!==G1)X(Z);if(Z.sibling!==null)Z=Z.sibling;else Z=J=Z.return}}}}var sY=null;function vK(z){{if((g1&f5)!==H5)return;if(!(z.mode&u1))return;var Q=z.tag;if(Q!==T&&Q!==I&&Q!==_&&Q!==L&&Q!==C&&Q!==a&&Q!==c)return;var X=M1(z)||"ReactComponent";if(sY!==null){if(sY.has(X))return;sY.add(X)}else sY=new Set([X]);var Z=u5;try{m4(z),q("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)m4(z);else _5()}}}var B9;{var gM=null;B9=function(z,Q,X){var Z=mK(gM,Q);try{return jU(z,Q,X)}catch($){if(ob()||$!==null&&typeof $==="object"&&typeof $.then==="function")throw $;if(ZY(),cB(),oU(z,Q),mK(Q,Z),Q.mode&Z4)UG(Q);if(l3(null,jU,null,z,Q,X),OL()){var J=i3();if(typeof J==="object"&&J!==null&&J._suppressLogging&&typeof $==="object"&&$!==null&&!$._suppressLogging)$._suppressLogging=!0}throw $}}}var SK=!1,U9;U9=new Set;function xM(z){if(D8&&!Aw())switch(z.tag){case L:case C:case c:{var Q=u4&&M1(u4)||"Unknown",X=Q;if(!U9.has(X)){U9.add(X);var Z=M1(z)||"Unknown";q("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 _:{if(!SK)q("Cannot update during an existing state transition (such as within `render`). Render methods should be a pure function of props and state."),SK=!0;break}}}function AZ(z,Q){if(g6){var X=z.memoizedUpdaters;X.forEach(function(Z){t2(z,Z,Q)})}}var K9={};function W9(z,Q){{var X=t6.current;if(X!==null)return X.push(Q),K9;else return m2(z,Q)}}function fK(z){if(z===K9)return;return PL(z)}function hK(){return t6.current!==null}function jM(z){{if(z.mode&u1){if(!qK())return}else{if(!GM())return;if(g1!==H5)return;if(z.tag!==L&&z.tag!==C&&z.tag!==c)return}if(t6.current===null){var Q=u5;try{m4(z),q(`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`,M1(z))}finally{if(Q)m4(z);else _5()}}}}function pM(z){if(z.tag!==U8&&qK()&&t6.current===null)q(`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 IZ(z){LK=z}var v6=null,FQ=null,cM=function(z){v6=z};function MQ(z){{if(v6===null)return z;var Q=v6(z);if(Q===void 0)return z;return Q.current}}function O9(z){return MQ(z)}function L9(z){{if(v6===null)return z;var Q=v6(z);if(Q===void 0){if(z!==null&&z!==void 0&&typeof z.render==="function"){var X=MQ(z.render);if(z.render!==X){var Z={$$typeof:j,render:X};if(z.displayName!==void 0)Z.displayName=z.displayName;return Z}}return z}return Q.current}}function yK(z,Q){{if(v6===null)return!1;var X=z.elementType,Z=Q.type,J=!1,$=typeof Z==="object"&&Z!==null?Z.$$typeof:null;switch(z.tag){case _:{if(typeof Z==="function")J=!0;break}case L:{if(typeof Z==="function")J=!0;else if($===i0)J=!0;break}case C:{if($===j)J=!0;else if($===i0)J=!0;break}case a:case c:{if($===S0)J=!0;else if($===i0)J=!0;break}default:return!1}if(J){var H=v6(X);if(H!==void 0&&H===v6(Z))return!0}return!1}}function VK(z){{if(v6===null)return;if(typeof WeakSet!=="function")return;if(FQ===null)FQ=new WeakSet;FQ.add(z)}}var dM=function(z,Q){{if(v6===null)return;var{staleFamilies:X,updatedFamilies:Z}=Q;c7(),p7(function(){_9(z.current,Z,X)})}},lM=function(z,Q){{if(z.context!==R6)return;c7(),p7(function(){kZ(Q,z,null,null)})}};function _9(z,Q,X){{var{alternate:Z,child:J,sibling:$,tag:H,type:B}=z,K=null;switch(H){case L:case c:case _:K=B;break;case C:K=B.render;break}if(v6===null)throw Error("Expected resolveFamily to be set during hot reload.");var b=!1,P=!1;if(K!==null){var x=v6(K);if(x!==void 0){if(X.has(x))P=!0;else if(Q.has(x))if(H===_)P=!0;else b=!0}}if(FQ!==null){if(FQ.has(z)||Z!==null&&FQ.has(Z))P=!0}if(P)z._debugNeedsRemount=!0;if(P||b){var g=J6(z,L1);if(g!==null)B5(g,z,L1,A4)}if(J!==null&&!P)_9(J,Q,X);if($!==null)_9($,Q,X)}}var iM=function(z,Q){{var X=new Set,Z=new Set(Q.map(function(J){return J.current}));return R9(z.current,Z,X),X}};function R9(z,Q,X){{var{child:Z,sibling:J,tag:$,type:H}=z,B=null;switch($){case L:case c:case _:B=H;break;case C:B=H.render;break}var K=!1;if(B!==null){if(Q.has(B))K=!0}if(K)oM(z,X);else if(Z!==null)R9(Z,Q,X);if(J!==null)R9(J,Q,X)}}function oM(z,Q){{var X=aM(z,Q);if(X)return;var Z=z;while(!0){switch(Z.tag){case N:Q.add(Z.stateNode);return;case F:Q.add(Z.stateNode.containerInfo);return;case I:Q.add(Z.stateNode.containerInfo);return}if(Z.return===null)throw Error("Expected to reach root first.");Z=Z.return}}}function aM(z,Q){{var X=z,Z=!1;while(!0){if(X.tag===N)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 N9;{N9=!1;try{var DK=Object.preventExtensions({})}catch(z){N9=!0}}function nM(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=G1,this.subtreeFlags=G1,this.deletions=null,this.lanes=N0,this.childLanes=N0,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,!N9&&typeof Object.preventExtensions==="function")Object.preventExtensions(this)}var N6=function(z,Q,X,Z){return new nM(z,Q,X,Z)};function b9(z){var Q=z.prototype;return!!(Q&&Q.isReactComponent)}function rM(z){return typeof z==="function"&&!b9(z)&&z.defaultProps===void 0}function tM(z){if(typeof z==="function")return b9(z)?_:L;else if(z!==void 0&&z!==null){var Q=z.$$typeof;if(Q===j)return C;if(Q===S0)return a}return T}function Wz(z,Q){var X=z.alternate;if(X===null)X=N6(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=G1,X.subtreeFlags=G1,X.deletions=null,X.actualDuration=0,X.actualStartTime=-1;X.flags=z.flags&v7,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 c:X.type=MQ(z.type);break;case _:X.type=O9(z.type);break;case C:X.type=L9(z.type);break}return X}function sM(z,Q){z.flags&=v7|e4;var X=z.alternate;if(X===null)z.childLanes=N0,z.lanes=Q,z.child=null,z.subtreeFlags=G1,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=G1,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 eM(z,Q,X){var Z;if(z===oJ){if(Z=u1,Q===!0)Z|=c4,Z|=$7}else Z=$1;if(g6)Z|=Z4;return N6(I,null,null,Z)}function w9(z,Q,X,Z,J,$){var H=T,B=z;if(typeof z==="function")if(b9(z))H=_,B=O9(B);else B=MQ(B);else if(typeof z==="string")H=N;else z:switch(z){case d1:return A8(X.children,J,$,Q);case f:if(H=v,J|=c4,(J&u1)!==$1)J|=$7;break;case H0:return zP(X,J,$,Q);case W0:return QP(X,J,$,Q);case M0:return XP(X,J,$,Q);case k0:return EK(X,J,$,Q);case n0:case g0:case D1:case z4:case O0:default:{if(typeof z==="object"&&z!==null)switch(z.$$typeof){case R0:H=D;break z;case A:H=E;break z;case j:H=C,B=L9(B);break z;case S0:H=a;break z;case i0:H=u,B=null;break z}var K="";{if(z===void 0||typeof z==="object"&&z!==null&&Object.keys(z).length===0)K+=" 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 b=Z?M1(Z):null;if(b)K+=`
|
|
138
|
-
|
|
139
|
-
Check the render method of \``+b+"`."}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)+"."+K))}}var P=N6(H,X,Q,J);return P.elementType=z,P.type=B,P.lanes=$,P._debugOwner=Z,P}function F9(z,Q,X){var Z=null;Z=z._owner;var{type:J,key:$,props:H}=z,B=w9(J,$,H,Z,Q,X);return B._debugSource=z._source,B._debugOwner=z._owner,B}function A8(z,Q,X,Z){var J=N6(k,z,Z,Q);return J.lanes=X,J}function zP(z,Q,X,Z){if(typeof z.id!=="string")q('Profiler must specify an "id" of type `string` as a prop. Received the type `%s` instead.',typeof z.id);var J=N6(V,z,Z,Q|Z4);return J.elementType=H0,J.lanes=X,J.stateNode={effectDuration:0,passiveEffectDuration:0},J}function QP(z,Q,X,Z){var J=N6(m,z,Z,Q);return J.elementType=W0,J.lanes=X,J}function XP(z,Q,X,Z){var J=N6(t,z,Z,Q);return J.elementType=M0,J.lanes=X,J}function EK(z,Q,X,Z){var J=N6(p,z,Z,Q);J.elementType=k0,J.lanes=X;var $={isHidden:!1};return J.stateNode=$,J}function M9(z,Q,X){var Z=N6(w,z,null,Q);return Z.lanes=X,Z}function ZP(){var z=N6(N,null,null,$1);return z.elementType="DELETED",z}function JP(z){var Q=N6(o,null,null,$1);return Q.stateNode=z,Q}function P9(z,Q,X){var Z=z.children!==null?z.children:[],J=N6(F,Z,z.key,Q);return J.lanes=X,J.stateNode={containerInfo:z.containerInfo,pendingChildren:null,implementation:z.implementation},J}function mK(z,Q){if(z===null)z=N6(T,null,null,$1);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 YP(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=ZH,this.context=null,this.pendingContext=null,this.callbackNode=null,this.callbackPriority=b5,this.eventTimes=I$(N0),this.expirationTimes=I$(A4),this.pendingLanes=N0,this.suspendedLanes=N0,this.pingedLanes=N0,this.expiredLanes=N0,this.mutableReadLanes=N0,this.finishedLanes=N0,this.entangledLanes=N0,this.entanglements=I$(N0),this.identifierPrefix=Z,this.onRecoverableError=J,this.mutableSourceEagerHydrationData=null,this.effectDuration=0,this.passiveEffectDuration=0;{this.memoizedUpdaters=new Set;var $=this.pendingUpdatersLaneMap=[];for(var H=0;H<X$;H++)$.push(new Set)}switch(Q){case oJ:this._debugRootType=X?"hydrateRoot()":"createRoot()";break;case U8:this._debugRootType=X?"hydrate()":"render()";break}}function uK(z,Q,X,Z,J,$,H,B,K,b){var P=new YP(z,Q,X,B,K),x=eM(Q,$);P.current=x,x.stateNode=P;{var g={element:Z,isDehydrated:X,cache:null,transitions:null,pendingSuspenseBoundaries:null};x.memoizedState=g}return VH(x),P}var A9="18.3.1";function $P(z,Q,X){var Z=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;return o4(Z),{$$typeof:B4,key:Z==null?null:""+Z,children:z,containerInfo:Q,implementation:X}}var I9,k9;I9=!1,k9={};function gK(z){if(!z)return R6;var Q=mz(z),X=ub(Q);if(Q.tag===_){var Z=Q.type;if(q7(Z))return UB(Q,Z,X)}return X}function HP(z,Q){{var X=mz(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=V2(X);if(J===null)return null;if(J.mode&c4){var $=M1(X)||"Component";if(!k9[$]){k9[$]=!0;var H=u5;try{if(m4(J),X.mode&c4)q("%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,$);else q("%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,$)}finally{if(H)m4(H);else _5()}}}return J.stateNode}}function xK(z,Q,X,Z,J,$,H,B){var K=!1,b=null;return uK(z,Q,K,b,X,Z,J,$,H)}function jK(z,Q,X,Z,J,$,H,B,K,b){var P=!0,x=uK(X,Z,P,z,J,$,H,B,K);x.context=gK(null);var g=x.current,e=t5(),z0=M8(g),Y0=u7(e,z0);return Y0.callback=Q!==void 0&&Q!==null?Q:null,O8(g,Y0,z0),OM(x,z0,e),x}function kZ(z,Q,X,Z){fL(Q,z);var J=Q.current,$=t5(),H=M8(J);tL(H);var B=gK(X);if(Q.context===null)Q.context=B;else Q.pendingContext=B;if(D8&&u5!==null&&!I9)I9=!0,q(`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.`,M1(u5)||"Unknown");var K=u7($,H);if(K.payload={element:z},Z=Z===void 0?null:Z,Z!==null){if(typeof Z!=="function")q("render(...): Expected the last optional `callback` argument to be a function. Instead received: %s.",Z);K.callback=Z}var b=O8(J,K,H);if(b!==null)B5(b,J,H,$),GY(b,J,H);return H}function eY(z){var Q=z.current;if(!Q.child)return null;switch(Q.child.tag){case N:return zH(Q.child.stateNode);default:return Q.child.stateNode}}function GP(z){switch(z.tag){case I:{var Q=z.stateNode;if(RJ(Q)){var X=$_(Q);NM(Q,X)}break}case m:{p7(function(){var J=J6(z,L1);if(J!==null){var $=t5();B5(J,z,L1,$)}});var Z=L1;T9(z,Z);break}}}function pK(z,Q){var X=z.memoizedState;if(X!==null&&X.dehydrated!==null)X.retryLane=K_(X.retryLane,Q)}function T9(z,Q){pK(z,Q);var X=z.alternate;if(X)pK(X,Q)}function qP(z){if(z.tag!==m)return;var Q=UX,X=J6(z,Q);if(X!==null){var Z=t5();B5(X,z,Q,Z)}T9(z,Q)}function BP(z){if(z.tag!==m)return;var Q=M8(z),X=J6(z,Q);if(X!==null){var Z=t5();B5(X,z,Q,Z)}T9(z,Q)}function cK(z){var Q=ML(z);if(Q===null)return null;return Q.stateNode}var dK=function(z){return null};function UP(z){return dK(z)}var lK=function(z){return!1};function KP(z){return lK(z)}var iK=null,oK=null,aK=null,nK=null,rK=null,tK=null,sK=null,eK=null,zW=null;{var QW=function(z,Q,X){var Z=Q[X],J=o1(z)?z.slice():T1({},z);if(X+1===Q.length){if(o1(J))J.splice(Z,1);else delete J[Z];return J}return J[Z]=QW(z[Z],Q,X+1),J},XW=function(z,Q){return QW(z,Q,0)},ZW=function(z,Q,X,Z){var J=Q[Z],$=o1(z)?z.slice():T1({},z);if(Z+1===Q.length){var H=X[Z];if($[H]=$[J],o1($))$.splice(J,1);else delete $[J]}else $[J]=ZW(z[J],Q,X,Z+1);return $},JW=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 ZW(z,Q,X,0)},YW=function(z,Q,X,Z){if(X>=Q.length)return Z;var J=Q[X],$=o1(z)?z.slice():T1({},z);return $[J]=YW(z[J],Q,X+1,Z),$},$W=function(z,Q,X){return YW(z,Q,0,X)},C9=function(z,Q){var X=z.memoizedState;while(X!==null&&Q>0)X=X.next,Q--;return X};iK=function(z,Q,X,Z){var J=C9(z,Q);if(J!==null){var $=$W(J.memoizedState,X,Z);J.memoizedState=$,J.baseState=$,z.memoizedProps=T1({},z.memoizedProps);var H=J6(z,L1);if(H!==null)B5(H,z,L1,A4)}},oK=function(z,Q,X){var Z=C9(z,Q);if(Z!==null){var J=XW(Z.memoizedState,X);Z.memoizedState=J,Z.baseState=J,z.memoizedProps=T1({},z.memoizedProps);var $=J6(z,L1);if($!==null)B5($,z,L1,A4)}},aK=function(z,Q,X,Z){var J=C9(z,Q);if(J!==null){var $=JW(J.memoizedState,X,Z);J.memoizedState=$,J.baseState=$,z.memoizedProps=T1({},z.memoizedProps);var H=J6(z,L1);if(H!==null)B5(H,z,L1,A4)}},nK=function(z,Q,X){if(z.pendingProps=$W(z.memoizedProps,Q,X),z.alternate)z.alternate.pendingProps=z.pendingProps;var Z=J6(z,L1);if(Z!==null)B5(Z,z,L1,A4)},rK=function(z,Q){if(z.pendingProps=XW(z.memoizedProps,Q),z.alternate)z.alternate.pendingProps=z.pendingProps;var X=J6(z,L1);if(X!==null)B5(X,z,L1,A4)},tK=function(z,Q,X){if(z.pendingProps=JW(z.memoizedProps,Q,X),z.alternate)z.alternate.pendingProps=z.pendingProps;var Z=J6(z,L1);if(Z!==null)B5(Z,z,L1,A4)},sK=function(z){var Q=J6(z,L1);if(Q!==null)B5(Q,z,L1,A4)},eK=function(z){dK=z},zW=function(z){lK=z}}function WP(z){var Q=V2(z);if(Q===null)return null;return Q.stateNode}function OP(z){return null}function LP(){return u5}function _P(z){var Q=z.findFiberByHostInstance,X=Y.ReactCurrentDispatcher;return SL({bundleType:z.bundleType,version:z.version,rendererPackageName:z.rendererPackageName,rendererConfig:z.rendererConfig,overrideHookState:iK,overrideHookStateDeletePath:oK,overrideHookStateRenamePath:aK,overrideProps:nK,overridePropsDeletePath:rK,overridePropsRenamePath:tK,setErrorHandler:eK,setSuspenseHandler:zW,scheduleUpdate:sK,currentDispatcherRef:X,findHostInstanceByFiber:WP,findFiberByHostInstance:Q||OP,findHostInstancesForRefresh:iM,scheduleRefresh:dM,scheduleRoot:lM,setRefreshHandler:cM,getCurrentFiber:LP,reconcilerVersion:A9})}var HW=typeof reportError==="function"?reportError:function(z){console.error(z)};function v9(z){this._internalRoot=z}z3.prototype.render=v9.prototype.render=function(z){var Q=this._internalRoot;if(Q===null)throw Error("Cannot update an unmounted root.");{if(typeof arguments[1]==="function")q("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(Q3(arguments[1]))q("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")q("You passed a second argument to root.render(...) but it only accepts one argument.");var X=Q.containerInfo;if(X.nodeType!==s4){var Z=cK(Q.current);if(Z){if(Z.parentNode!==X)q("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.")}}}kZ(z,Q,null,null)},z3.prototype.unmount=v9.prototype.unmount=function(){if(typeof arguments[0]==="function")q("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(bK())q("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.");p7(function(){kZ(null,z,null,null)}),YB(Q)}};function RP(z,Q){if(!Q3(z))throw Error("createRoot(...): Target container is not a DOM element.");GW(z);var X=!1,Z=!1,J="",$=HW,H=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===e1)q(`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)$=Q.onRecoverableError;if(Q.transitionCallbacks!==void 0)H=Q.transitionCallbacks}var B=xK(z,oJ,null,X,Z,J,$);xJ(B.current,z);var K=z.nodeType===s4?z.parentNode:z;return hX(K),new v9(B)}function z3(z){this._internalRoot=z}function NP(z){if(z)v_(z)}z3.prototype.unstable_scheduleHydration=NP;function bP(z,Q,X){if(!Q3(z))throw Error("hydrateRoot(...): Target container is not a DOM element.");if(GW(z),Q===void 0)q("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,$=!1,H=!1,B="",K=HW;if(X!==null&&X!==void 0){if(X.unstable_strictMode===!0)$=!0;if(X.identifierPrefix!==void 0)B=X.identifierPrefix;if(X.onRecoverableError!==void 0)K=X.onRecoverableError}var b=jK(Q,null,z,oJ,Z,$,H,B,K);if(xJ(b.current,z),hX(z),J)for(var P=0;P<J.length;P++){var x=J[P];bw(b,x)}return new z3(b)}function Q3(z){return!!(z&&(z.nodeType===X6||z.nodeType===I7||z.nodeType===V3||!_0))}function TZ(z){return!!(z&&(z.nodeType===X6||z.nodeType===I7||z.nodeType===V3||z.nodeType===s4&&z.nodeValue===" react-mount-point-unstable "))}function GW(z){{if(z.nodeType===X6&&z.tagName&&z.tagName.toUpperCase()==="BODY")q("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(cX(z))if(z._reactRootContainer)q("You are calling ReactDOMClient.createRoot() on a container that was previously passed to ReactDOM.render(). This is not supported.");else q("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 wP=Y.ReactCurrentOwner,qW;qW=function(z){if(z._reactRootContainer&&z.nodeType!==s4){var Q=cK(z._reactRootContainer.current);if(Q){if(Q.parentNode!==z)q("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=S9(z),J=!!(Z&&q8(Z));if(J&&!X)q("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===X6&&z.tagName&&z.tagName.toUpperCase()==="BODY")q("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 S9(z){if(!z)return null;if(z.nodeType===I7)return z.documentElement;else return z.firstChild}function BW(){}function FP(z,Q,X,Z,J){if(J){if(typeof Z==="function"){var $=Z;Z=function(){var g=eY(H);$.call(g)}}var H=jK(Q,Z,z,U8,null,!1,!1,"",BW);z._reactRootContainer=H,xJ(H.current,z);var B=z.nodeType===s4?z.parentNode:z;return hX(B),p7(),H}else{var K;while(K=z.lastChild)z.removeChild(K);if(typeof Z==="function"){var b=Z;Z=function(){var g=eY(P);b.call(g)}}var P=xK(z,U8,null,!1,!1,"",BW);z._reactRootContainer=P,xJ(P.current,z);var x=z.nodeType===s4?z.parentNode:z;return hX(x),p7(function(){kZ(Q,P,X,Z)}),P}}function MP(z,Q){if(z!==null&&typeof z!=="function")q("%s(...): Expected the last optional `callback` argument to be a function. Instead received: %s.",Q,z)}function X3(z,Q,X,Z,J){qW(X),MP(J===void 0?null:J,"render");var $=X._reactRootContainer,H;if(!$)H=FP(X,Q,z,J,Z);else{if(H=$,typeof J==="function"){var B=J;J=function(){var K=eY(H);B.call(K)}}kZ(Q,H,z,J)}return eY(H)}var UW=!1;function PP(z){{if(!UW)UW=!0,q("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=wP.current;if(Q!==null&&Q.stateNode!==null){var X=Q.stateNode._warnedAboutRefsInRender;if(!X)q("%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.",c1(Q.type)||"A component");Q.stateNode._warnedAboutRefsInRender=!0}}if(z==null)return null;if(z.nodeType===X6)return z;return HP(z,"findDOMNode")}function AP(z,Q,X){if(q("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"),!TZ(Q))throw Error("Target container is not a DOM element.");{var Z=cX(Q)&&Q._reactRootContainer===void 0;if(Z)q("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 X3(null,z,Q,!0,X)}function IP(z,Q,X){if(q("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"),!TZ(Q))throw Error("Target container is not a DOM element.");{var Z=cX(Q)&&Q._reactRootContainer===void 0;if(Z)q("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 X3(null,z,Q,!1,X)}function kP(z,Q,X,Z){if(q("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"),!TZ(X))throw Error("Target container is not a DOM element.");if(z==null||!LL(z))throw Error("parentComponent must be a valid React Component");return X3(z,Q,X,!1,Z)}var KW=!1;function TP(z){if(!KW)KW=!0,q("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(!TZ(z))throw Error("unmountComponentAtNode(...): Target container is not a DOM element.");{var Q=cX(z)&&z._reactRootContainer===void 0;if(Q)q("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=S9(z),Z=X&&!q8(X);if(Z)q("unmountComponentAtNode(): The node you're attempting to unmount was rendered by another copy of React.")}return p7(function(){X3(null,null,z,!1,function(){z._reactRootContainer=null,YB(z)})}),!0}else{{var J=S9(z),$=!!(J&&q8(J)),H=z.nodeType===X6&&TZ(z.parentNode)&&!!z.parentNode._reactRootContainer;if($)q("unmountComponentAtNode(): The node you're attempting to unmount was rendered by React and is not a top-level container. %s",H?"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(b_(GP),F_(qP),M_(BP),P_(x6),A_(__),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")q("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");JL(IN),HL(H9,bM,p7);function CP(z,Q){var X=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;if(!Q3(Q))throw Error("Target container is not a DOM element.");return $P(z,Q,null,X)}function vP(z,Q,X,Z){return kP(z,Q,X,Z)}var f9={usingClientEntryPoint:!1,Events:[q8,ez,jJ,M2,P2,H9]};function SP(z,Q){if(!f9.usingClientEntryPoint)q('You are importing createRoot from "react-dom" which is not supported. You should instead import it from "react-dom/client".');return RP(z,Q)}function fP(z,Q,X){if(!f9.usingClientEntryPoint)q('You are importing hydrateRoot from "react-dom" which is not supported. You should instead import it from "react-dom/client".');return bP(z,Q,X)}function hP(z){if(bK())q("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 p7(z)}var yP=_P({findFiberByHostInstance:s8,bundleType:1,version:A9,rendererPackageName:"react-dom"});if(!yP&&f1&&window.top===window.self){if(navigator.userAgent.indexOf("Chrome")>-1&&navigator.userAgent.indexOf("Edge")===-1||navigator.userAgent.indexOf("Firefox")>-1){var WW=window.location.protocol;if(/^(https?|file):$/.test(WW))console.info("%cDownload the React DevTools for a better development experience: https://reactjs.org/link/react-devtools"+(WW==="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(pP.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=f9,pP.createPortal=CP,pP.createRoot=SP,pP.findDOMNode=PP,pP.flushSync=hP,pP.hydrate=AP,pP.hydrateRoot=fP,pP.render=IP,pP.unmountComponentAtNode=TP,pP.unstable_batchedUpdates=H9,pP.unstable_renderSubtreeIntoContainer=vP,pP.version=A9,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop==="function")__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()});var NW=Oz((kT,RW)=>{var cP=q0(_W());RW.exports=cP});var bW=Oz((dP)=>{var IQ=q0(NW());AQ=IQ.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,dP.createRoot=function(Y,G){AQ.usingClientEntryPoint=!0;try{return IQ.createRoot(Y,G)}finally{AQ.usingClientEntryPoint=!1}},dP.hydrateRoot=function(Y,G,U){AQ.usingClientEntryPoint=!0;try{return IQ.hydrateRoot(Y,G,U)}finally{AQ.usingClientEntryPoint=!1}};var AQ});var J1=Oz((lP)=>{var y9=q0(k1());(function(){var Y=Symbol.for("react.element"),G=Symbol.for("react.portal"),U=Symbol.for("react.fragment"),O=Symbol.for("react.strict_mode"),q=Symbol.for("react.profiler"),R=Symbol.for("react.provider"),L=Symbol.for("react.context"),_=Symbol.for("react.forward_ref"),T=Symbol.for("react.suspense"),I=Symbol.for("react.suspense_list"),F=Symbol.for("react.memo"),N=Symbol.for("react.lazy"),w=Symbol.for("react.offscreen"),k=Symbol.iterator,v="@@iterator";function E(f){if(f===null||typeof f!=="object")return null;var H0=k&&f[k]||f[v];if(typeof H0==="function")return H0;return null}var D=y9.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function C(f){{for(var H0=arguments.length,R0=Array(H0>1?H0-1:0),A=1;A<H0;A++)R0[A-1]=arguments[A];V("error",f,R0)}}function V(f,H0,R0){{var A=D.ReactDebugCurrentFrame,j=A.getStackAddendum();if(j!=="")H0+="%s",R0=R0.concat([j]);var W0=R0.map(function(M0){return String(M0)});W0.unshift("Warning: "+H0),Function.prototype.apply.call(console[f],console,W0)}}var m=!1,a=!1,c=!1,u=!1,Q0=!1,o;o=Symbol.for("react.module.reference");function t(f){if(typeof f==="string"||typeof f==="function")return!0;if(f===U||f===q||Q0||f===O||f===T||f===I||u||f===w||m||a||c)return!0;if(typeof f==="object"&&f!==null){if(f.$$typeof===N||f.$$typeof===F||f.$$typeof===R||f.$$typeof===L||f.$$typeof===_||f.$$typeof===o||f.getModuleId!==void 0)return!0}return!1}function l(f,H0,R0){var A=f.displayName;if(A)return A;var j=H0.displayName||H0.name||"";return j!==""?R0+"("+j+")":R0}function p(f){return f.displayName||"Context"}function i(f){if(f==null)return null;if(typeof f.tag==="number")C("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue.");if(typeof f==="function")return f.displayName||f.name||null;if(typeof f==="string")return f;switch(f){case U:return"Fragment";case G:return"Portal";case q:return"Profiler";case O:return"StrictMode";case T:return"Suspense";case I:return"SuspenseList"}if(typeof f==="object")switch(f.$$typeof){case L:var H0=f;return p(H0)+".Consumer";case R:var R0=f;return p(R0._context)+".Provider";case _:return l(f,f.render,"ForwardRef");case F:var A=f.displayName||null;if(A!==null)return A;return i(f.type)||"Memo";case N:{var j=f,W0=j._payload,M0=j._init;try{return i(M0(W0))}catch(S0){return null}}}return null}var Z0=Object.assign,I0=0,F0,Q1,W1,X0,U0,_0,J0;function d(){}d.__reactDisabledLog=!0;function P0(){{if(I0===0){F0=console.log,Q1=console.info,W1=console.warn,X0=console.error,U0=console.group,_0=console.groupCollapsed,J0=console.groupEnd;var f={configurable:!0,enumerable:!0,value:d,writable:!0};Object.defineProperties(console,{info:f,log:f,warn:f,error:f,group:f,groupCollapsed:f,groupEnd:f})}I0++}}function v0(){{if(I0--,I0===0){var f={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:Z0({},f,{value:F0}),info:Z0({},f,{value:Q1}),warn:Z0({},f,{value:W1}),error:Z0({},f,{value:X0}),group:Z0({},f,{value:U0}),groupCollapsed:Z0({},f,{value:_0}),groupEnd:Z0({},f,{value:J0})})}if(I0<0)C("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var X1=D.ReactCurrentDispatcher,r0;function V0(f,H0,R0){{if(r0===void 0)try{throw Error()}catch(j){var A=j.stack.trim().match(/\n( *(at )?)/);r0=A&&A[1]||""}return`
|
|
146
|
-
`+r0+f}}var H1=!1,L0;{var a0=typeof WeakMap==="function"?WeakMap:Map;L0=new a0}function f1(f,H0){if(!f||H1)return"";{var R0=L0.get(f);if(R0!==void 0)return R0}var A;H1=!0;var j=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var W0;W0=X1.current,X1.current=null,P0();try{if(H0){var M0=function(){throw Error()};if(Object.defineProperty(M0.prototype,"props",{set:function(){throw Error()}}),typeof Reflect==="object"&&Reflect.construct){try{Reflect.construct(M0,[])}catch(z4){A=z4}Reflect.construct(f,[],M0)}else{try{M0.call()}catch(z4){A=z4}f.call(M0.prototype)}}else{try{throw Error()}catch(z4){A=z4}f()}}catch(z4){if(z4&&A&&typeof z4.stack==="string"){var S0=z4.stack.split(`
|
|
147
|
-
`),i0=A.stack.split(`
|
|
148
|
-
`),g0=S0.length-1,O0=i0.length-1;while(g0>=1&&O0>=0&&S0[g0]!==i0[O0])O0--;for(;g0>=1&&O0>=0;g0--,O0--)if(S0[g0]!==i0[O0]){if(g0!==1||O0!==1)do if(g0--,O0--,O0<0||S0[g0]!==i0[O0]){var k0=`
|
|
149
|
-
`+S0[g0].replace(" at new "," at ");if(f.displayName&&k0.includes("<anonymous>"))k0=k0.replace("<anonymous>",f.displayName);if(typeof f==="function")L0.set(f,k0);return k0}while(g0>=1&&O0>=0);break}}}finally{H1=!1,X1.current=W0,v0(),Error.prepareStackTrace=j}var n0=f?f.displayName||f.name:"",D1=n0?V0(n0):"";if(typeof f==="function")L0.set(f,D1);return D1}function q4(f,H0,R0){return f1(f,!1)}function h4(f){var H0=f.prototype;return!!(H0&&H0.isReactComponent)}function x1(f,H0,R0){if(f==null)return"";if(typeof f==="function")return f1(f,h4(f));if(typeof f==="string")return V0(f);switch(f){case T:return V0("Suspense");case I:return V0("SuspenseList")}if(typeof f==="object")switch(f.$$typeof){case _:return q4(f.render);case F:return x1(f.type,H0,R0);case N:{var A=f,j=A._payload,W0=A._init;try{return x1(W0(j),H0,R0)}catch(M0){}}}return""}var K1=Object.prototype.hasOwnProperty,r4={},o4=D.ReactDebugCurrentFrame;function k4(f){if(f){var H0=f._owner,R0=x1(f.type,f._source,H0?H0.type:null);o4.setExtraStackFrame(R0)}else o4.setExtraStackFrame(null)}function y4(f,H0,R0,A,j){{var W0=Function.call.bind(K1);for(var M0 in f)if(W0(f,M0)){var S0=void 0;try{if(typeof f[M0]!=="function"){var i0=Error((A||"React class")+": "+R0+" type `"+M0+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof f[M0]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw i0.name="Invariant Violation",i0}S0=f[M0](H0,M0,A,R0,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(g0){S0=g0}if(S0&&!(S0 instanceof Error))k4(j),C("%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).",A||"React class",R0,M0,typeof S0),k4(null);if(S0 instanceof Error&&!(S0.message in r4))r4[S0.message]=!0,k4(j),C("Failed %s type: %s",R0,S0.message),k4(null)}}}var D6=Array.isArray;function O4(f){return D6(f)}function F5(f){{var H0=typeof Symbol==="function"&&Symbol.toStringTag,R0=H0&&f[Symbol.toStringTag]||f.constructor.name||"Object";return R0}}function L4(f){try{return M5(f),!1}catch(H0){return!0}}function M5(f){return""+f}function M4(f){if(L4(f))return C("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",F5(f)),M5(f)}var T4=D.ReactCurrentOwner,O5={key:!0,ref:!0,__self:!0,__source:!0},E5,j4,t4;t4={};function T0(f){if(K1.call(f,"ref")){var H0=Object.getOwnPropertyDescriptor(f,"ref").get;if(H0&&H0.isReactWarning)return!1}return f.ref!==void 0}function t0(f){if(K1.call(f,"key")){var H0=Object.getOwnPropertyDescriptor(f,"key").get;if(H0&&H0.isReactWarning)return!1}return f.key!==void 0}function Y1(f,H0){if(typeof f.ref==="string"&&T4.current&&H0&&T4.current.stateNode!==H0){var R0=i(T4.current.type);if(!t4[R0])C('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',i(T4.current.type),f.ref),t4[R0]=!0}}function j1(f,H0){{var R0=function(){if(!E5)E5=!0,C("%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)",H0)};R0.isReactWarning=!0,Object.defineProperty(f,"key",{get:R0,configurable:!0})}}function s1(f,H0){{var R0=function(){if(!j4)j4=!0,C("%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)",H0)};R0.isReactWarning=!0,Object.defineProperty(f,"ref",{get:R0,configurable:!0})}}var V4=function(f,H0,R0,A,j,W0,M0){var S0={$$typeof:Y,type:f,key:H0,ref:R0,props:M0,_owner:W0};if(S0._store={},Object.defineProperty(S0._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(S0,"_self",{configurable:!1,enumerable:!1,writable:!1,value:A}),Object.defineProperty(S0,"_source",{configurable:!1,enumerable:!1,writable:!1,value:j}),Object.freeze)Object.freeze(S0.props),Object.freeze(S0);return S0};function H4(f,H0,R0,A,j){{var W0,M0={},S0=null,i0=null;if(R0!==void 0)M4(R0),S0=""+R0;if(t0(H0))M4(H0.key),S0=""+H0.key;if(T0(H0))i0=H0.ref,Y1(H0,j);for(W0 in H0)if(K1.call(H0,W0)&&!O5.hasOwnProperty(W0))M0[W0]=H0[W0];if(f&&f.defaultProps){var g0=f.defaultProps;for(W0 in g0)if(M0[W0]===void 0)M0[W0]=g0[W0]}if(S0||i0){var O0=typeof f==="function"?f.displayName||f.name||"Unknown":f;if(S0)j1(M0,O0);if(i0)s1(M0,O0)}return V4(f,S0,i0,j,A,T4.current,M0)}}var{ReactCurrentOwner:a4,ReactDebugCurrentFrame:F1}=D;function N1(f){if(f){var H0=f._owner,R0=x1(f.type,f._source,H0?H0.type:null);F1.setExtraStackFrame(R0)}else F1.setExtraStackFrame(null)}var d5=!1;function L5(f){return typeof f==="object"&&f!==null&&f.$$typeof===Y}function l5(){{if(a4.current){var f=i(a4.current.type);if(f)return`
|
|
150
|
-
|
|
151
|
-
Check the render method of \``+f+"`."}return""}}function Q7(f){{if(f!==void 0){var H0=f.fileName.replace(/^.*[\\\/]/,""),R0=f.lineNumber;return`
|
|
152
|
-
|
|
153
|
-
Check your code at `+H0+":"+R0+"."}return""}}var E6={};function X7(f){{var H0=l5();if(!H0){var R0=typeof f==="string"?f:f.displayName||f.name;if(R0)H0=`
|
|
154
|
-
|
|
155
|
-
Check the top-level render call using <`+R0+">."}return H0}}function F6(f,H0){{if(!f._store||f._store.validated||f.key!=null)return;f._store.validated=!0;var R0=X7(H0);if(E6[R0])return;E6[R0]=!0;var A="";if(f&&f._owner&&f._owner!==a4.current)A=" It was passed a child from "+i(f._owner.type)+".";N1(f),C('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',R0,A),N1(null)}}function m5(f,H0){{if(typeof f!=="object")return;if(O4(f))for(var R0=0;R0<f.length;R0++){var A=f[R0];if(L5(A))F6(A,H0)}else if(L5(f)){if(f._store)f._store.validated=!0}else if(f){var j=E(f);if(typeof j==="function"){if(j!==f.entries){var W0=j.call(f),M0;while(!(M0=W0.next()).done)if(L5(M0.value))F6(M0.value,H0)}}}}}function m6(f){{var H0=f.type;if(H0===null||H0===void 0||typeof H0==="string")return;var R0;if(typeof H0==="function")R0=H0.propTypes;else if(typeof H0==="object"&&(H0.$$typeof===_||H0.$$typeof===F))R0=H0.propTypes;else return;if(R0){var A=i(H0);y4(R0,f.props,"prop",A,f)}else if(H0.PropTypes!==void 0&&!d5){d5=!0;var j=i(H0);C("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",j||"Unknown")}if(typeof H0.getDefaultProps==="function"&&!H0.getDefaultProps.isReactClassApproved)C("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function V1(f){{var H0=Object.keys(f.props);for(var R0=0;R0<H0.length;R0++){var A=H0[R0];if(A!=="children"&&A!=="key"){N1(f),C("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",A),N1(null);break}}if(f.ref!==null)N1(f),C("Invalid attribute `ref` supplied to `React.Fragment`."),N1(null)}}var e1={};function B4(f,H0,R0,A,j,W0){{var M0=t(f);if(!M0){var S0="";if(f===void 0||typeof f==="object"&&f!==null&&Object.keys(f).length===0)S0+=" 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 i0=Q7(j);if(i0)S0+=i0;else S0+=l5();var g0;if(f===null)g0="null";else if(O4(f))g0="array";else if(f!==void 0&&f.$$typeof===Y)g0="<"+(i(f.type)||"Unknown")+" />",S0=" Did you accidentally export a JSX literal instead of a component?";else g0=typeof f;C("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",g0,S0)}var O0=H4(f,H0,R0,j,W0);if(O0==null)return O0;if(M0){var k0=H0.children;if(k0!==void 0)if(A)if(O4(k0)){for(var n0=0;n0<k0.length;n0++)m5(k0[n0],f);if(Object.freeze)Object.freeze(k0)}else C("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 m5(k0,f)}if(K1.call(H0,"key")){var D1=i(f),z4=Object.keys(H0).filter(function(P4){return P4!=="key"}),i5=z4.length>0?"{key: someKey, "+z4.join(": ..., ")+": ...}":"{key: someKey}";if(!e1[D1+i5]){var B6=z4.length>0?"{"+z4.join(": ..., ")+": ...}":"{}";C(`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} />`,i5,D1,B6,D1),e1[D1+i5]=!0}}if(f===U)V1(O0);else m6(O0);return O0}}var d1=B4;lP.Fragment=U,lP.jsxDEV=d1})()});var b4=Oz((TA)=>{var d9=q0(k1());(function(){var Y=Symbol.for("react.element"),G=Symbol.for("react.portal"),U=Symbol.for("react.fragment"),O=Symbol.for("react.strict_mode"),q=Symbol.for("react.profiler"),R=Symbol.for("react.provider"),L=Symbol.for("react.context"),_=Symbol.for("react.forward_ref"),T=Symbol.for("react.suspense"),I=Symbol.for("react.suspense_list"),F=Symbol.for("react.memo"),N=Symbol.for("react.lazy"),w=Symbol.for("react.offscreen"),k=Symbol.iterator,v="@@iterator";function E(A){if(A===null||typeof A!=="object")return null;var j=k&&A[k]||A[v];if(typeof j==="function")return j;return null}var D=d9.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function C(A){{for(var j=arguments.length,W0=Array(j>1?j-1:0),M0=1;M0<j;M0++)W0[M0-1]=arguments[M0];V("error",A,W0)}}function V(A,j,W0){{var M0=D.ReactDebugCurrentFrame,S0=M0.getStackAddendum();if(S0!=="")j+="%s",W0=W0.concat([S0]);var i0=W0.map(function(g0){return String(g0)});i0.unshift("Warning: "+j),Function.prototype.apply.call(console[A],console,i0)}}var m=!1,a=!1,c=!1,u=!1,Q0=!1,o;o=Symbol.for("react.module.reference");function t(A){if(typeof A==="string"||typeof A==="function")return!0;if(A===U||A===q||Q0||A===O||A===T||A===I||u||A===w||m||a||c)return!0;if(typeof A==="object"&&A!==null){if(A.$$typeof===N||A.$$typeof===F||A.$$typeof===R||A.$$typeof===L||A.$$typeof===_||A.$$typeof===o||A.getModuleId!==void 0)return!0}return!1}function l(A,j,W0){var M0=A.displayName;if(M0)return M0;var S0=j.displayName||j.name||"";return S0!==""?W0+"("+S0+")":W0}function p(A){return A.displayName||"Context"}function i(A){if(A==null)return null;if(typeof A.tag==="number")C("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue.");if(typeof A==="function")return A.displayName||A.name||null;if(typeof A==="string")return A;switch(A){case U:return"Fragment";case G:return"Portal";case q:return"Profiler";case O:return"StrictMode";case T:return"Suspense";case I:return"SuspenseList"}if(typeof A==="object")switch(A.$$typeof){case L:var j=A;return p(j)+".Consumer";case R:var W0=A;return p(W0._context)+".Provider";case _:return l(A,A.render,"ForwardRef");case F:var M0=A.displayName||null;if(M0!==null)return M0;return i(A.type)||"Memo";case N:{var S0=A,i0=S0._payload,g0=S0._init;try{return i(g0(i0))}catch(O0){return null}}}return null}var Z0=Object.assign,I0=0,F0,Q1,W1,X0,U0,_0,J0;function d(){}d.__reactDisabledLog=!0;function P0(){{if(I0===0){F0=console.log,Q1=console.info,W1=console.warn,X0=console.error,U0=console.group,_0=console.groupCollapsed,J0=console.groupEnd;var A={configurable:!0,enumerable:!0,value:d,writable:!0};Object.defineProperties(console,{info:A,log:A,warn:A,error:A,group:A,groupCollapsed:A,groupEnd:A})}I0++}}function v0(){{if(I0--,I0===0){var A={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:Z0({},A,{value:F0}),info:Z0({},A,{value:Q1}),warn:Z0({},A,{value:W1}),error:Z0({},A,{value:X0}),group:Z0({},A,{value:U0}),groupCollapsed:Z0({},A,{value:_0}),groupEnd:Z0({},A,{value:J0})})}if(I0<0)C("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var X1=D.ReactCurrentDispatcher,r0;function V0(A,j,W0){{if(r0===void 0)try{throw Error()}catch(S0){var M0=S0.stack.trim().match(/\n( *(at )?)/);r0=M0&&M0[1]||""}return`
|
|
161
|
-
`+r0+A}}var H1=!1,L0;{var a0=typeof WeakMap==="function"?WeakMap:Map;L0=new a0}function f1(A,j){if(!A||H1)return"";{var W0=L0.get(A);if(W0!==void 0)return W0}var M0;H1=!0;var S0=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var i0;i0=X1.current,X1.current=null,P0();try{if(j){var g0=function(){throw Error()};if(Object.defineProperty(g0.prototype,"props",{set:function(){throw Error()}}),typeof Reflect==="object"&&Reflect.construct){try{Reflect.construct(g0,[])}catch(P4){M0=P4}Reflect.construct(A,[],g0)}else{try{g0.call()}catch(P4){M0=P4}A.call(g0.prototype)}}else{try{throw Error()}catch(P4){M0=P4}A()}}catch(P4){if(P4&&M0&&typeof P4.stack==="string"){var O0=P4.stack.split(`
|
|
162
|
-
`),k0=M0.stack.split(`
|
|
163
|
-
`),n0=O0.length-1,D1=k0.length-1;while(n0>=1&&D1>=0&&O0[n0]!==k0[D1])D1--;for(;n0>=1&&D1>=0;n0--,D1--)if(O0[n0]!==k0[D1]){if(n0!==1||D1!==1)do if(n0--,D1--,D1<0||O0[n0]!==k0[D1]){var z4=`
|
|
164
|
-
`+O0[n0].replace(" at new "," at ");if(A.displayName&&z4.includes("<anonymous>"))z4=z4.replace("<anonymous>",A.displayName);if(typeof A==="function")L0.set(A,z4);return z4}while(n0>=1&&D1>=0);break}}}finally{H1=!1,X1.current=i0,v0(),Error.prepareStackTrace=S0}var i5=A?A.displayName||A.name:"",B6=i5?V0(i5):"";if(typeof A==="function")L0.set(A,B6);return B6}function q4(A,j,W0){return f1(A,!1)}function h4(A){var j=A.prototype;return!!(j&&j.isReactComponent)}function x1(A,j,W0){if(A==null)return"";if(typeof A==="function")return f1(A,h4(A));if(typeof A==="string")return V0(A);switch(A){case T:return V0("Suspense");case I:return V0("SuspenseList")}if(typeof A==="object")switch(A.$$typeof){case _:return q4(A.render);case F:return x1(A.type,j,W0);case N:{var M0=A,S0=M0._payload,i0=M0._init;try{return x1(i0(S0),j,W0)}catch(g0){}}}return""}var K1=Object.prototype.hasOwnProperty,r4={},o4=D.ReactDebugCurrentFrame;function k4(A){if(A){var j=A._owner,W0=x1(A.type,A._source,j?j.type:null);o4.setExtraStackFrame(W0)}else o4.setExtraStackFrame(null)}function y4(A,j,W0,M0,S0){{var i0=Function.call.bind(K1);for(var g0 in A)if(i0(A,g0)){var O0=void 0;try{if(typeof A[g0]!=="function"){var k0=Error((M0||"React class")+": "+W0+" type `"+g0+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof A[g0]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw k0.name="Invariant Violation",k0}O0=A[g0](j,g0,M0,W0,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(n0){O0=n0}if(O0&&!(O0 instanceof Error))k4(S0),C("%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).",M0||"React class",W0,g0,typeof O0),k4(null);if(O0 instanceof Error&&!(O0.message in r4))r4[O0.message]=!0,k4(S0),C("Failed %s type: %s",W0,O0.message),k4(null)}}}var D6=Array.isArray;function O4(A){return D6(A)}function F5(A){{var j=typeof Symbol==="function"&&Symbol.toStringTag,W0=j&&A[Symbol.toStringTag]||A.constructor.name||"Object";return W0}}function L4(A){try{return M5(A),!1}catch(j){return!0}}function M5(A){return""+A}function M4(A){if(L4(A))return C("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",F5(A)),M5(A)}var T4=D.ReactCurrentOwner,O5={key:!0,ref:!0,__self:!0,__source:!0},E5,j4,t4;t4={};function T0(A){if(K1.call(A,"ref")){var j=Object.getOwnPropertyDescriptor(A,"ref").get;if(j&&j.isReactWarning)return!1}return A.ref!==void 0}function t0(A){if(K1.call(A,"key")){var j=Object.getOwnPropertyDescriptor(A,"key").get;if(j&&j.isReactWarning)return!1}return A.key!==void 0}function Y1(A,j){if(typeof A.ref==="string"&&T4.current&&j&&T4.current.stateNode!==j){var W0=i(T4.current.type);if(!t4[W0])C('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',i(T4.current.type),A.ref),t4[W0]=!0}}function j1(A,j){{var W0=function(){if(!E5)E5=!0,C("%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)",j)};W0.isReactWarning=!0,Object.defineProperty(A,"key",{get:W0,configurable:!0})}}function s1(A,j){{var W0=function(){if(!j4)j4=!0,C("%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)",j)};W0.isReactWarning=!0,Object.defineProperty(A,"ref",{get:W0,configurable:!0})}}var V4=function(A,j,W0,M0,S0,i0,g0){var O0={$$typeof:Y,type:A,key:j,ref:W0,props:g0,_owner:i0};if(O0._store={},Object.defineProperty(O0._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(O0,"_self",{configurable:!1,enumerable:!1,writable:!1,value:M0}),Object.defineProperty(O0,"_source",{configurable:!1,enumerable:!1,writable:!1,value:S0}),Object.freeze)Object.freeze(O0.props),Object.freeze(O0);return O0};function H4(A,j,W0,M0,S0){{var i0,g0={},O0=null,k0=null;if(W0!==void 0)M4(W0),O0=""+W0;if(t0(j))M4(j.key),O0=""+j.key;if(T0(j))k0=j.ref,Y1(j,S0);for(i0 in j)if(K1.call(j,i0)&&!O5.hasOwnProperty(i0))g0[i0]=j[i0];if(A&&A.defaultProps){var n0=A.defaultProps;for(i0 in n0)if(g0[i0]===void 0)g0[i0]=n0[i0]}if(O0||k0){var D1=typeof A==="function"?A.displayName||A.name||"Unknown":A;if(O0)j1(g0,D1);if(k0)s1(g0,D1)}return V4(A,O0,k0,S0,M0,T4.current,g0)}}var{ReactCurrentOwner:a4,ReactDebugCurrentFrame:F1}=D;function N1(A){if(A){var j=A._owner,W0=x1(A.type,A._source,j?j.type:null);F1.setExtraStackFrame(W0)}else F1.setExtraStackFrame(null)}var d5=!1;function L5(A){return typeof A==="object"&&A!==null&&A.$$typeof===Y}function l5(){{if(a4.current){var A=i(a4.current.type);if(A)return`
|
|
165
|
-
|
|
166
|
-
Check the render method of \``+A+"`."}return""}}function Q7(A){{if(A!==void 0){var j=A.fileName.replace(/^.*[\\\/]/,""),W0=A.lineNumber;return`
|
|
167
|
-
|
|
168
|
-
Check your code at `+j+":"+W0+"."}return""}}var E6={};function X7(A){{var j=l5();if(!j){var W0=typeof A==="string"?A:A.displayName||A.name;if(W0)j=`
|
|
169
|
-
|
|
170
|
-
Check the top-level render call using <`+W0+">."}return j}}function F6(A,j){{if(!A._store||A._store.validated||A.key!=null)return;A._store.validated=!0;var W0=X7(j);if(E6[W0])return;E6[W0]=!0;var M0="";if(A&&A._owner&&A._owner!==a4.current)M0=" It was passed a child from "+i(A._owner.type)+".";N1(A),C('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',W0,M0),N1(null)}}function m5(A,j){{if(typeof A!=="object")return;if(O4(A))for(var W0=0;W0<A.length;W0++){var M0=A[W0];if(L5(M0))F6(M0,j)}else if(L5(A)){if(A._store)A._store.validated=!0}else if(A){var S0=E(A);if(typeof S0==="function"){if(S0!==A.entries){var i0=S0.call(A),g0;while(!(g0=i0.next()).done)if(L5(g0.value))F6(g0.value,j)}}}}}function m6(A){{var j=A.type;if(j===null||j===void 0||typeof j==="string")return;var W0;if(typeof j==="function")W0=j.propTypes;else if(typeof j==="object"&&(j.$$typeof===_||j.$$typeof===F))W0=j.propTypes;else return;if(W0){var M0=i(j);y4(W0,A.props,"prop",M0,A)}else if(j.PropTypes!==void 0&&!d5){d5=!0;var S0=i(j);C("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",S0||"Unknown")}if(typeof j.getDefaultProps==="function"&&!j.getDefaultProps.isReactClassApproved)C("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function V1(A){{var j=Object.keys(A.props);for(var W0=0;W0<j.length;W0++){var M0=j[W0];if(M0!=="children"&&M0!=="key"){N1(A),C("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",M0),N1(null);break}}if(A.ref!==null)N1(A),C("Invalid attribute `ref` supplied to `React.Fragment`."),N1(null)}}var e1={};function B4(A,j,W0,M0,S0,i0){{var g0=t(A);if(!g0){var O0="";if(A===void 0||typeof A==="object"&&A!==null&&Object.keys(A).length===0)O0+=" 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 k0=Q7(S0);if(k0)O0+=k0;else O0+=l5();var n0;if(A===null)n0="null";else if(O4(A))n0="array";else if(A!==void 0&&A.$$typeof===Y)n0="<"+(i(A.type)||"Unknown")+" />",O0=" Did you accidentally export a JSX literal instead of a component?";else n0=typeof A;C("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",n0,O0)}var D1=H4(A,j,W0,S0,i0);if(D1==null)return D1;if(g0){var z4=j.children;if(z4!==void 0)if(M0)if(O4(z4)){for(var i5=0;i5<z4.length;i5++)m5(z4[i5],A);if(Object.freeze)Object.freeze(z4)}else C("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 m5(z4,A)}if(K1.call(j,"key")){var B6=i(A),P4=Object.keys(j).filter(function(Z7){return Z7!=="key"}),T1=P4.length>0?"{key: someKey, "+P4.join(": ..., ")+": ...}":"{key: someKey}";if(!e1[B6+T1]){var w7=P4.length>0?"{"+P4.join(": ..., ")+": ...}":"{}";C(`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} />`,T1,B6,w7,B6),e1[B6+T1]=!0}}if(A===U)V1(D1);else m6(D1);return D1}}function d1(A,j,W0){return B4(A,j,W0,!0)}function f(A,j,W0){return B4(A,j,W0,!1)}var H0=f,R0=d1;TA.Fragment=U,TA.jsx=H0,TA.jsxs=R0})()});var V6=q0(k1(),1),LO=q0(bW(),1);var h9={memory:!0,tasks:!1,vision:!0,operator:!1,mcp:!1,realtime:!1,files:!1,agents:!1,builtinTools:{webSearch:!1,webFetch:!1}};function _z(Y,G){let U=Y.agents;if(typeof U==="boolean")return{enabled:U,mode:"worker",group:G||void 0};return{...U,group:U.group||G||void 0}}var U5=q0(k1(),1),FW=q0(J1(),1),wW=U5.createContext(null),iP=200;function V9({children:Y}){let[G,U]=U5.useState(!1),[O,q]=U5.useState([]),[R,L]=U5.useState({}),[_,T]=U5.useState({}),I=U5.useRef(null),F=U5.useRef(null);U5.useEffect(()=>{let k=setInterval(()=>{let v=Date.now();T((E)=>{let D={};for(let[C,V]of Object.entries(E))if(V.expiresAt>v)D[C]=V;return D})},500);return()=>clearInterval(k)},[]);let N=U5.useCallback(()=>{if(I.current)I.current.close(),I.current=null;try{let k=new EventSource("/api/telemetry/stream");I.current=k,k.onopen=()=>{U(!0)},k.onmessage=(v)=>{if(!v.data||v.data.trim()==="")return;try{let E=JSON.parse(v.data);if(E.connected){U(!0);return}if(Array.isArray(E))q((D)=>{return[...E,...D].slice(0,iP)}),L((D)=>{let C={...D};for(let V of E){let m=C[V.agent_id];if(!m||new Date(V.timestamp)>new Date(m.timestamp))C[V.agent_id]={timestamp:V.timestamp,category:V.category,type:V.type}}return C}),T((D)=>{let C={...D},V=Date.now()+3000;for(let m of E)C[m.agent_id]={type:m.type,expiresAt:V};return C})}catch{}},k.onerror=()=>{if(U(!1),k.close(),I.current=null,F.current)clearTimeout(F.current);F.current=setTimeout(N,2000)}}catch{if(U(!1),F.current)clearTimeout(F.current);F.current=setTimeout(N,2000)}},[]);U5.useEffect(()=>{return N(),()=>{if(I.current)I.current.close();if(F.current)clearTimeout(F.current)}},[N]);let w=U5.useCallback(()=>{q([])},[]);return FW.jsxDEV(wW.Provider,{value:{connected:G,events:O,lastActivityByAgent:R,activeAgents:_,clearEvents:w},children:Y},void 0,!1,void 0,this)}function kQ(){let Y=U5.useContext(wW);if(!Y)throw Error("useTelemetryContext must be used within TelemetryProvider");return Y}function SZ(Y){let{activeAgents:G}=kQ(),U=G[Y];return{isActive:!!U,type:U?.type}}var S4=q0(k1(),1),PW=q0(J1(),1),MW=S4.createContext(null);function P1(){let Y=S4.useContext(MW);if(!Y)throw Error("useAuth must be used within an AuthProvider");return Y}function D9({children:Y}){let[G,U]=S4.useState(null),[O,q]=S4.useState(null),[R,L]=S4.useState(!0),[_,T]=S4.useState(null),[I,F]=S4.useState(!1),N=S4.useRef(null),w=S4.useRef(!1),k=S4.useRef(!1),v=S4.useCallback((u)=>{N.current=u,q(u)},[]),E=S4.useCallback(async()=>{if(w.current)return!1;w.current=!0;try{let u=await fetch("/api/auth/refresh",{method:"POST",credentials:"include"});if(!u.ok)return!1;let Q0=await u.json();v(Q0.accessToken);let o=await fetch("/api/auth/me",{headers:{Authorization:`Bearer ${Q0.accessToken}`}});if(o.ok){let t=await o.json();return U(t.user),!0}return!1}catch(u){return console.error("Token refresh failed:",u),!1}finally{w.current=!1}},[v]),D=S4.useCallback(async()=>{try{let u=N.current,o=await(await fetch("/api/auth/check",{headers:u?{Authorization:`Bearer ${u}`}:{}})).json();if(T(o.hasUsers),F(o.isDev??!1),o.authenticated&&o.user)U(o.user);else if(U(null),o.hasUsers){if(!await E())v(null)}}catch(u){console.error("Auth check failed:",u),U(null),v(null)}finally{L(!1)}},[E,v]),C=S4.useCallback(async(u,Q0)=>{try{let o=await fetch("/api/auth/login",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({username:u,password:Q0})}),t=await o.json();if(!o.ok)return{success:!1,error:t.error||"Login failed"};return v(t.accessToken),U(t.user),T(!0),{success:!0}}catch(o){return console.error("Login failed:",o),{success:!1,error:"Login failed"}}},[v]),V=S4.useCallback(async()=>{try{let u=N.current;await fetch("/api/auth/logout",{method:"POST",credentials:"include",headers:u?{Authorization:`Bearer ${u}`}:{}})}catch(u){console.error("Logout failed:",u)}finally{U(null),v(null)}},[v]),m=S4.useCallback(async(u,Q0={})=>{let o=new Headers(Q0.headers),t=N.current;if(t)o.set("Authorization",`Bearer ${t}`);return fetch(u,{...Q0,headers:o})},[]),a=S4.useCallback(async()=>{return E()},[E]);S4.useEffect(()=>{if(k.current)return;k.current=!0,D()},[D]),S4.useEffect(()=>{if(!O)return;let u=setInterval(()=>{E()},840000);return()=>clearInterval(u)},[O,E]);let c={user:G,isAuthenticated:!!G,isLoading:R,hasUsers:_,isDev:I,accessToken:O,login:C,logout:V,refreshToken:a,checkAuth:D,authFetch:m};return PW.jsxDEV(MW.Provider,{value:c,children:Y},void 0,!1,void 0,this)}var Q5=q0(k1(),1);var IW=q0(J1(),1),AW=Q5.createContext(null);function g4(){let Y=Q5.useContext(AW);if(!Y)throw Error("useProjects must be used within a ProjectProvider");return Y}var E9="apteva_current_project";function m9({children:Y}){let{authFetch:G,isAuthenticated:U,isLoading:O}=P1(),[q,R]=Q5.useState([]),[L,_]=Q5.useState(()=>{if(typeof window<"u")return localStorage.getItem(E9);return null}),[T,I]=Q5.useState(!0),[F,N]=Q5.useState(null),[w,k]=Q5.useState(0),[v,E]=Q5.useState(!1);Q5.useEffect(()=>{fetch("/api/features").then((Q0)=>Q0.json()).then((Q0)=>{E(Q0.projects===!0)}).catch(()=>{E(!1)})},[]);let D=Q5.useCallback((Q0)=>{if(_(Q0),typeof window<"u")if(Q0===null)localStorage.removeItem(E9);else localStorage.setItem(E9,Q0)},[]),C=q.find((Q0)=>Q0.id===L)||null,V=Q5.useCallback(async()=>{if(!v){R([]),I(!1);return}if(!U&&!O){R([]),I(!1);return}try{N(null);let Q0=await G("/api/projects");if(!Q0.ok)throw Error("Failed to fetch projects");let o=await Q0.json();if(R(o.projects||[]),k(o.unassignedCount||0),L&&L!=="unassigned"&&!o.projects.find((t)=>t.id===L))D(null)}catch(Q0){console.error("Failed to fetch projects:",Q0),N("Failed to load projects")}finally{I(!1)}},[G,U,O,L,D,v]),m=Q5.useCallback(async(Q0)=>{try{let o=await G("/api/projects",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(Q0)});if(!o.ok){let l=await o.json();throw Error(l.error||"Failed to create project")}let t=await o.json();return await V(),t.project}catch(o){return console.error("Failed to create project:",o),null}},[G,V]),a=Q5.useCallback(async(Q0,o)=>{try{let t=await G(`/api/projects/${Q0}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(o)});if(!t.ok){let p=await t.json();throw Error(p.error||"Failed to update project")}let l=await t.json();return await V(),l.project}catch(t){return console.error("Failed to update project:",t),null}},[G,V]),c=Q5.useCallback(async(Q0)=>{try{let o=await G(`/api/projects/${Q0}`,{method:"DELETE"});if(!o.ok){let t=await o.json();throw Error(t.error||"Failed to delete project")}if(L===Q0)D(null);return await V(),!0}catch(o){return console.error("Failed to delete project:",o),!1}},[G,L,D,V]);Q5.useEffect(()=>{if(!O&&v)V()},[O,v,V]);let u={projects:q,currentProjectId:L,currentProject:C,isLoading:T,error:F,unassignedCount:w,projectsEnabled:v,setCurrentProjectId:D,createProject:m,updateProject:a,deleteProject:c,refreshProjects:V};return IW.jsxDEV(AW.Provider,{value:u,children:Y},void 0,!1,void 0,this)}var I8=q0(k1(),1);function u9(Y){let{accessToken:G}=P1(),[U,O]=I8.useState([]),[q,R]=I8.useState(!0),L=I8.useCallback(()=>{let k={"Content-Type":"application/json"};if(G)k.Authorization=`Bearer ${G}`;return k},[G]),_=I8.useCallback(async()=>{let v=await(await fetch("/api/agents",{headers:L()})).json();O(v.agents||[]),R(!1)},[L]);I8.useEffect(()=>{if(Y)_()},[Y,_]);let T=async(k)=>{await fetch("/api/agents",{method:"POST",headers:L(),body:JSON.stringify(k)}),await _()},I=async(k)=>{await fetch(`/api/agents/${k}`,{method:"DELETE",headers:L()}),await _()},F=async(k,v)=>{let E=await fetch(`/api/agents/${k}`,{method:"PUT",headers:L(),body:JSON.stringify(v)}),D=await E.json();if(await _(),!E.ok&&D.error)return{error:D.error};return{}},N=async(k)=>{let v=k.status==="running"?"stop":"start",E=await fetch(`/api/agents/${k.id}/${v}`,{method:"POST",headers:L()}),D=await E.json();if(await _(),!E.ok&&D.error)return{error:D.error};return{}},w=U.filter((k)=>k.status==="running").length;return{agents:U,loading:q,runningCount:w,fetchAgents:_,createAgent:T,updateAgent:F,deleteAgent:I,toggleAgent:N}}var Rz=q0(k1(),1);function g9(Y){let{accessToken:G}=P1(),[U,O]=Rz.useState([]),q=Rz.useCallback(()=>{let I={"Content-Type":"application/json"};if(G)I.Authorization=`Bearer ${G}`;return I},[G]),R=Rz.useCallback(async()=>{let F=await(await fetch("/api/providers",{headers:q()})).json();O(F.providers||[])},[q]);Rz.useEffect(()=>{if(Y)R()},[Y,R]);let L=U.filter((I)=>I.hasKey);return{providers:U,configuredProviders:L,fetchProviders:R,saveKey:async(I,F)=>{let w=await(await fetch(`/api/keys/${I}/test`,{method:"POST",headers:q(),body:JSON.stringify({key:F})})).json();if(!w.valid)return{success:!1,error:w.error||"API key is invalid"};let k=await fetch(`/api/keys/${I}`,{method:"POST",headers:q(),body:JSON.stringify({key:F})});if(!k.ok)return{success:!1,error:(await k.json()).error||"Failed to save key"};return await R(),{success:!0}},deleteKey:async(I)=>{await fetch(`/api/keys/${I}`,{method:"DELETE",headers:q()}),await R()}}}var Nz=q0(k1(),1);function x9(){let{accessToken:Y,isAuthenticated:G}=P1(),[U,O]=Nz.useState(null),q=Nz.useCallback(()=>{let L={};if(Y)L.Authorization=`Bearer ${Y}`;return L},[Y]);Nz.useEffect(()=>{if(!G){O(null);return}fetch("/api/onboarding/status",{headers:q()}).then((L)=>L.json()).then((L)=>{O(L.completed||L.has_any_keys)}).catch(()=>O(!0))},[G,q]);let R=Nz.useCallback(async()=>{await fetch("/api/onboarding/complete",{method:"POST",headers:q()}),O(!0)},[q]);return{isComplete:U,setIsComplete:O,complete:R}}var k8=q0(J1(),1);function bz({message:Y="Loading...",fullScreen:G=!1}){let U=k8.jsxDEV("div",{className:"flex items-center gap-3 text-[#666]",children:[k8.jsxDEV("svg",{className:"animate-spin h-5 w-5",viewBox:"0 0 24 24",children:[k8.jsxDEV("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4",fill:"none"},void 0,!1,void 0,this),k8.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),k8.jsxDEV("span",{children:Y},void 0,!1,void 0,this)]},void 0,!0,void 0,this);if(G)return k8.jsxDEV("div",{className:"min-h-screen bg-[#0a0a0a] text-[#e0e0e0] font-mono flex items-center justify-center",children:U},void 0,!1,void 0,this);return k8.jsxDEV("div",{className:"flex items-center justify-center py-20",children:U},void 0,!1,void 0,this)}var l7=q0(k1(),1),K5=q0(J1(),1);function TQ({children:Y,onClose:G}){return K5.jsxDEV("div",{className:"fixed inset-0 bg-black/70 flex items-center justify-center z-50 p-4",children:K5.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 oP({title:Y,message:G,confirmText:U="Confirm",cancelText:O="Cancel",confirmVariant:q="danger",onConfirm:R,onCancel:L}){return K5.jsxDEV("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50 p-4",children:K5.jsxDEV("div",{className:"bg-[#111] border border-[#333] rounded-lg p-6 w-full max-w-sm",children:[Y&&K5.jsxDEV("h3",{className:"font-medium mb-2",children:Y},void 0,!1,void 0,this),K5.jsxDEV("p",{className:"text-sm text-[#ccc] mb-4",children:G},void 0,!1,void 0,this),K5.jsxDEV("div",{className:"flex gap-2",children:[K5.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),K5.jsxDEV("button",{onClick:R,className:`flex-1 text-sm text-white px-4 py-2 rounded transition ${q==="danger"?"bg-red-500 hover:bg-red-600":"bg-[#f97316] hover:bg-[#ea580c]"}`,children:U},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 aP({title:Y,message:G,buttonText:U="OK",variant:O="info",onClose:q}){let R={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 K5.jsxDEV("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50 p-4",children:K5.jsxDEV("div",{className:"bg-[#111] border border-[#333] rounded-lg p-6 w-full max-w-sm text-center",children:[K5.jsxDEV("div",{className:`w-12 h-12 rounded-full flex items-center justify-center mx-auto mb-3 ${R[O]}`,children:K5.jsxDEV("span",{className:"text-xl",children:L[O]},void 0,!1,void 0,this)},void 0,!1,void 0,this),Y&&K5.jsxDEV("h3",{className:"font-medium mb-2",children:Y},void 0,!1,void 0,this),K5.jsxDEV("p",{className:"text-sm text-[#ccc] mb-4",children:G},void 0,!1,void 0,this),K5.jsxDEV("button",{onClick:q,className:"w-full text-sm bg-[#1a1a1a] hover:bg-[#222] border border-[#333] px-4 py-2 rounded transition",children:U},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)}function S6(){let[Y,G]=l7.useState(null),U=l7.useCallback((L,_={})=>{return new Promise((T)=>{G({message:L,options:_,resolve:T})})},[]),O=l7.useCallback(()=>{Y?.resolve(!0),G(null)},[Y]),q=l7.useCallback(()=>{Y?.resolve(!1),G(null)},[Y]),R=Y?K5.jsxDEV(oP,{title:Y.options.title,message:Y.message,confirmText:Y.options.confirmText,cancelText:Y.options.cancelText,confirmVariant:Y.options.confirmVariant,onConfirm:O,onCancel:q},void 0,!1,void 0,this):null;return{confirm:U,ConfirmDialog:R}}function J3(){let[Y,G]=l7.useState(null),U=l7.useCallback((R,L={})=>{return new Promise((_)=>{G({message:R,options:L,resolve:_})})},[]),O=l7.useCallback(()=>{Y?.resolve(),G(null)},[Y]),q=Y?K5.jsxDEV(aP,{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:U,AlertDialog:q}}var CQ=q0(k1(),1),y5=q0(J1(),1);function V5({value:Y,options:G,onChange:U,placeholder:O="Select..."}){let[q,R]=CQ.useState(!1),L=CQ.useRef(null),_=G.find((T)=>T.value===Y);return CQ.useEffect(()=>{function T(I){if(L.current&&!L.current.contains(I.target))R(!1)}return document.addEventListener("mousedown",T),()=>document.removeEventListener("mousedown",T)},[]),y5.jsxDEV("div",{ref:L,className:"relative",children:[y5.jsxDEV("button",{type:"button",onClick:()=>R(!q),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:[y5.jsxDEV("span",{className:_?"text-[#e0e0e0]":"text-[#666]",children:_?y5.jsxDEV(y5.Fragment,{children:[_.label,_.recommended&&y5.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),y5.jsxDEV(nP,{isOpen:q},void 0,!1,void 0,this)]},void 0,!0,void 0,this),q&&y5.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)=>y5.jsxDEV("button",{type:"button",onClick:()=>{U(T.value),R(!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:[y5.jsxDEV("span",{children:[T.label,T.recommended&&y5.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&&y5.jsxDEV("svg",{className:"w-4 h-4 text-[#f97316]",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:y5.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 nP({isOpen:Y}){return y5.jsxDEV("svg",{className:`w-4 h-4 text-[#666] transition-transform ${Y?"rotate-180":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:y5.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 C1=q0(J1(),1);function G6({className:Y="w-4 h-4"}){return C1.jsxDEV("svg",{className:Y,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:C1.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 N7({className:Y="w-5 h-5"}){return C1.jsxDEV("svg",{className:Y,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:C1.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 Y3({className:Y="w-5 h-5"}){return C1.jsxDEV("svg",{className:Y,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:C1.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 $3({className:Y="w-5 h-5"}){return C1.jsxDEV("svg",{className:Y,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:C1.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 H3({className:Y="w-5 h-5"}){return C1.jsxDEV("svg",{className:Y,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:[C1.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),C1.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 wz({className:Y="w-4 h-4"}){return C1.jsxDEV("svg",{className:Y,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:C1.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 f6({className:Y="w-4 h-4"}){return C1.jsxDEV("svg",{className:Y,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:C1.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 Fz({className:Y="w-4 h-4"}){return C1.jsxDEV("svg",{className:Y,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:[C1.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),C1.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 Mz({className:Y="w-4 h-4"}){return C1.jsxDEV("svg",{className:Y,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:C1.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 h6({className:Y="w-4 h-4"}){return C1.jsxDEV("svg",{className:Y,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:C1.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 fZ({className:Y="w-4 h-4"}){return C1.jsxDEV("svg",{className:Y,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:C1.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 Pz({className:Y="w-4 h-4"}){return C1.jsxDEV("svg",{className:Y,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:C1.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 j9({className:Y="w-4 h-4"}){return C1.jsxDEV("svg",{className:Y,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:C1.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 kW({className:Y="w-4 h-4"}){return C1.jsxDEV("svg",{className:Y,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:C1.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 vQ({className:Y="w-4 h-4"}){return C1.jsxDEV("svg",{className:Y,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:C1.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 SQ({className:Y="w-4 h-4"}){return C1.jsxDEV("svg",{className:Y,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:C1.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 TW({className:Y="w-5 h-5"}){return C1.jsxDEV("svg",{className:Y,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:C1.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 CW({className:Y="w-4 h-4"}){return C1.jsxDEV("svg",{className:Y,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:C1.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 vW({className:Y="w-4 h-4"}){return C1.jsxDEV("svg",{className:Y,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:C1.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 z2=q0(k1(),1);var z7=q0(k1(),1);var t1=q0(k1(),1),VQ=q0(k1(),1),Iz=q0(k1(),1);function SW(Y){var G,U,O="";if(typeof Y=="string"||typeof Y=="number")O+=Y;else if(typeof Y=="object")if(Array.isArray(Y)){var q=Y.length;for(G=0;G<q;G++)Y[G]&&(U=SW(Y[G]))&&(O&&(O+=" "),O+=U)}else for(U in Y)Y[U]&&(O&&(O+=" "),O+=U);return O}function fW(){for(var Y,G,U=0,O="",q=arguments.length;U<q;U++)(Y=arguments[U])&&(G=SW(Y))&&(O&&(O+=" "),O+=G);return O}var rP=(Y)=>{let G=sP(Y),{conflictingClassGroups:U,conflictingClassGroupModifiers:O}=Y;return{getClassGroupId:(L)=>{let _=L.split("-");if(_[0]===""&&_.length!==1)_.shift();return VW(_,G)||tP(L)},getConflictingClassGroupIds:(L,_)=>{let T=U[L]||[];if(_&&O[L])return[...T,...O[L]];return T}}},VW=(Y,G)=>{if(Y.length===0)return G.classGroupId;let U=Y[0],O=G.nextPart.get(U),q=O?VW(Y.slice(1),O):void 0;if(q)return q;if(G.validators.length===0)return;let R=Y.join("-");return G.validators.find(({validator:L})=>L(R))?.classGroupId},hW=/^\[(.+)\]$/,tP=(Y)=>{if(hW.test(Y)){let G=hW.exec(Y)[1],U=G?.substring(0,G.indexOf(":"));if(U)return"arbitrary.."+U}},sP=(Y)=>{let{theme:G,prefix:U}=Y,O={nextPart:new Map,validators:[]};return zA(Object.entries(Y.classGroups),U).forEach(([R,L])=>{c9(L,O,R,G)}),O},c9=(Y,G,U,O)=>{Y.forEach((q)=>{if(typeof q==="string"){let R=q===""?G:yW(G,q);R.classGroupId=U;return}if(typeof q==="function"){if(eP(q)){c9(q(O),G,U,O);return}G.validators.push({validator:q,classGroupId:U});return}Object.entries(q).forEach(([R,L])=>{c9(L,yW(G,R),U,O)})})},yW=(Y,G)=>{let U=Y;return G.split("-").forEach((O)=>{if(!U.nextPart.has(O))U.nextPart.set(O,{nextPart:new Map,validators:[]});U=U.nextPart.get(O)}),U},eP=(Y)=>Y.isThemeGetter,zA=(Y,G)=>{if(!G)return Y;return Y.map(([U,O])=>{let q=O.map((R)=>{if(typeof R==="string")return G+R;if(typeof R==="object")return Object.fromEntries(Object.entries(R).map(([L,_])=>[G+L,_]));return R});return[U,q]})},QA=(Y)=>{if(Y<1)return{get:()=>{return},set:()=>{}};let G=0,U=new Map,O=new Map,q=(R,L)=>{if(U.set(R,L),G++,G>Y)G=0,O=U,U=new Map};return{get(R){let L=U.get(R);if(L!==void 0)return L;if((L=O.get(R))!==void 0)return q(R,L),L},set(R,L){if(U.has(R))U.set(R,L);else q(R,L)}}};var XA=(Y)=>{let{separator:G,experimentalParseClassName:U}=Y,O=G.length===1,q=G[0],R=G.length,L=(_)=>{let T=[],I=0,F=0,N;for(let D=0;D<_.length;D++){let C=_[D];if(I===0){if(C===q&&(O||_.slice(D,D+R)===G)){T.push(_.slice(F,D)),F=D+R;continue}if(C==="/"){N=D;continue}}if(C==="[")I++;else if(C==="]")I--}let w=T.length===0?_:_.substring(F),k=w.startsWith("!"),v=k?w.substring(1):w,E=N&&N>F?N-F:void 0;return{modifiers:T,hasImportantModifier:k,baseClassName:v,maybePostfixModifierPosition:E}};if(U)return(_)=>U({className:_,parseClassName:L});return L},ZA=(Y)=>{if(Y.length<=1)return Y;let G=[],U=[];return Y.forEach((O)=>{if(O[0]==="[")G.push(...U.sort(),O),U=[];else U.push(O)}),G.push(...U.sort()),G},JA=(Y)=>({cache:QA(Y.cacheSize),parseClassName:XA(Y),...rP(Y)}),YA=/\s+/,$A=(Y,G)=>{let{parseClassName:U,getClassGroupId:O,getConflictingClassGroupIds:q}=G,R=[],L=Y.trim().split(YA),_="";for(let T=L.length-1;T>=0;T-=1){let I=L[T],{modifiers:F,hasImportantModifier:N,baseClassName:w,maybePostfixModifierPosition:k}=U(I),v=Boolean(k),E=O(v?w.substring(0,k):w);if(!E){if(!v){_=I+(_.length>0?" "+_:_);continue}if(E=O(w),!E){_=I+(_.length>0?" "+_:_);continue}v=!1}let D=ZA(F).join(":"),C=N?D+"!":D,V=C+E;if(R.includes(V))continue;R.push(V);let m=q(E,v);for(let a=0;a<m.length;++a){let c=m[a];R.push(C+c)}_=I+(_.length>0?" "+_:_)}return _};function HA(){let Y=0,G,U,O="";while(Y<arguments.length)if(G=arguments[Y++]){if(U=DW(G))O&&(O+=" "),O+=U}return O}var DW=(Y)=>{if(typeof Y==="string")return Y;let G,U="";for(let O=0;O<Y.length;O++)if(Y[O]){if(G=DW(Y[O]))U&&(U+=" "),U+=G}return U};function GA(Y,...G){let U,O,q,R=L;function L(T){let I=G.reduce((F,N)=>N(F),Y());return U=JA(I),O=U.cache.get,q=U.cache.set,R=_,_(T)}function _(T){let I=O(T);if(I)return I;let F=$A(T,U);return q(T,F),F}return function(){return R(HA.apply(null,arguments))}}var f4=(Y)=>{let G=(U)=>U[Y]||[];return G.isThemeGetter=!0,G},EW=/^\[(?:([a-z-]+):)?(.+)\]$/i,qA=/^\d+\/\d+$/,BA=new Set(["px","full","screen"]),UA=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,KA=/\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$/,WA=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,OA=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,LA=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,i7=(Y)=>fQ(Y)||BA.has(Y)||qA.test(Y),T8=(Y)=>hQ(Y,"length",PA),fQ=(Y)=>Boolean(Y)&&!Number.isNaN(Number(Y)),p9=(Y)=>hQ(Y,"number",fQ),hZ=(Y)=>Boolean(Y)&&Number.isInteger(Number(Y)),_A=(Y)=>Y.endsWith("%")&&fQ(Y.slice(0,-1)),v1=(Y)=>EW.test(Y),C8=(Y)=>UA.test(Y),RA=new Set(["length","size","percentage"]),NA=(Y)=>hQ(Y,RA,mW),bA=(Y)=>hQ(Y,"position",mW),wA=new Set(["image","url"]),FA=(Y)=>hQ(Y,wA,IA),MA=(Y)=>hQ(Y,"",AA),yZ=()=>!0,hQ=(Y,G,U)=>{let O=EW.exec(Y);if(O){if(O[1])return typeof G==="string"?O[1]===G:G.has(O[1]);return U(O[2])}return!1},PA=(Y)=>KA.test(Y)&&!WA.test(Y),mW=()=>!1,AA=(Y)=>OA.test(Y),IA=(Y)=>LA.test(Y);var kA=()=>{let Y=f4("colors"),G=f4("spacing"),U=f4("blur"),O=f4("brightness"),q=f4("borderColor"),R=f4("borderRadius"),L=f4("borderSpacing"),_=f4("borderWidth"),T=f4("contrast"),I=f4("grayscale"),F=f4("hueRotate"),N=f4("invert"),w=f4("gap"),k=f4("gradientColorStops"),v=f4("gradientColorStopPositions"),E=f4("inset"),D=f4("margin"),C=f4("opacity"),V=f4("padding"),m=f4("saturate"),a=f4("scale"),c=f4("sepia"),u=f4("skew"),Q0=f4("space"),o=f4("translate"),t=()=>["auto","contain","none"],l=()=>["auto","hidden","clip","visible","scroll"],p=()=>["auto",v1,G],i=()=>[v1,G],Z0=()=>["",i7,T8],I0=()=>["auto",fQ,v1],F0=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],Q1=()=>["solid","dashed","dotted","double","none"],W1=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],X0=()=>["start","end","center","between","around","evenly","stretch"],U0=()=>["","0",v1],_0=()=>["auto","avoid","all","avoid-page","page","left","right","column"],J0=()=>[fQ,v1];return{cacheSize:500,separator:":",theme:{colors:[yZ],spacing:[i7,T8],blur:["none","",C8,v1],brightness:J0(),borderColor:[Y],borderRadius:["none","","full",C8,v1],borderSpacing:i(),borderWidth:Z0(),contrast:J0(),grayscale:U0(),hueRotate:J0(),invert:U0(),gap:i(),gradientColorStops:[Y],gradientColorStopPositions:[_A,T8],inset:p(),margin:p(),opacity:J0(),padding:i(),saturate:J0(),scale:J0(),sepia:U0(),skew:J0(),space:i(),translate:i()},classGroups:{aspect:[{aspect:["auto","square","video",v1]}],container:["container"],columns:[{columns:[C8]}],"break-after":[{"break-after":_0()}],"break-before":[{"break-before":_0()}],"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:[...F0(),v1]}],overflow:[{overflow:l()}],"overflow-x":[{"overflow-x":l()}],"overflow-y":[{"overflow-y":l()}],overscroll:[{overscroll:t()}],"overscroll-x":[{"overscroll-x":t()}],"overscroll-y":[{"overscroll-y":t()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[E]}],"inset-x":[{"inset-x":[E]}],"inset-y":[{"inset-y":[E]}],start:[{start:[E]}],end:[{end:[E]}],top:[{top:[E]}],right:[{right:[E]}],bottom:[{bottom:[E]}],left:[{left:[E]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",hZ,v1]}],basis:[{basis:p()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",v1]}],grow:[{grow:U0()}],shrink:[{shrink:U0()}],order:[{order:["first","last","none",hZ,v1]}],"grid-cols":[{"grid-cols":[yZ]}],"col-start-end":[{col:["auto",{span:["full",hZ,v1]},v1]}],"col-start":[{"col-start":I0()}],"col-end":[{"col-end":I0()}],"grid-rows":[{"grid-rows":[yZ]}],"row-start-end":[{row:["auto",{span:[hZ,v1]},v1]}],"row-start":[{"row-start":I0()}],"row-end":[{"row-end":I0()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",v1]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",v1]}],gap:[{gap:[w]}],"gap-x":[{"gap-x":[w]}],"gap-y":[{"gap-y":[w]}],"justify-content":[{justify:["normal",...X0()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...X0(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...X0(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[V]}],px:[{px:[V]}],py:[{py:[V]}],ps:[{ps:[V]}],pe:[{pe:[V]}],pt:[{pt:[V]}],pr:[{pr:[V]}],pb:[{pb:[V]}],pl:[{pl:[V]}],m:[{m:[D]}],mx:[{mx:[D]}],my:[{my:[D]}],ms:[{ms:[D]}],me:[{me:[D]}],mt:[{mt:[D]}],mr:[{mr:[D]}],mb:[{mb:[D]}],ml:[{ml:[D]}],"space-x":[{"space-x":[Q0]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[Q0]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",v1,G]}],"min-w":[{"min-w":[v1,G,"min","max","fit"]}],"max-w":[{"max-w":[v1,G,"none","full","min","max","fit","prose",{screen:[C8]},C8]}],h:[{h:[v1,G,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[v1,G,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[v1,G,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[v1,G,"auto","min","max","fit"]}],"font-size":[{text:["base",C8,T8]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",p9]}],"font-family":[{font:[yZ]}],"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",v1]}],"line-clamp":[{"line-clamp":["none",fQ,p9]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",i7,v1]}],"list-image":[{"list-image":["none",v1]}],"list-style-type":[{list:["none","disc","decimal",v1]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[Y]}],"placeholder-opacity":[{"placeholder-opacity":[C]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[Y]}],"text-opacity":[{"text-opacity":[C]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Q1(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",i7,T8]}],"underline-offset":[{"underline-offset":["auto",i7,v1]}],"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:i()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",v1]}],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",v1]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[C]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...F0(),bA]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",NA]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},FA]}],"bg-color":[{bg:[Y]}],"gradient-from-pos":[{from:[v]}],"gradient-via-pos":[{via:[v]}],"gradient-to-pos":[{to:[v]}],"gradient-from":[{from:[k]}],"gradient-via":[{via:[k]}],"gradient-to":[{to:[k]}],rounded:[{rounded:[R]}],"rounded-s":[{"rounded-s":[R]}],"rounded-e":[{"rounded-e":[R]}],"rounded-t":[{"rounded-t":[R]}],"rounded-r":[{"rounded-r":[R]}],"rounded-b":[{"rounded-b":[R]}],"rounded-l":[{"rounded-l":[R]}],"rounded-ss":[{"rounded-ss":[R]}],"rounded-se":[{"rounded-se":[R]}],"rounded-ee":[{"rounded-ee":[R]}],"rounded-es":[{"rounded-es":[R]}],"rounded-tl":[{"rounded-tl":[R]}],"rounded-tr":[{"rounded-tr":[R]}],"rounded-br":[{"rounded-br":[R]}],"rounded-bl":[{"rounded-bl":[R]}],"border-w":[{border:[_]}],"border-w-x":[{"border-x":[_]}],"border-w-y":[{"border-y":[_]}],"border-w-s":[{"border-s":[_]}],"border-w-e":[{"border-e":[_]}],"border-w-t":[{"border-t":[_]}],"border-w-r":[{"border-r":[_]}],"border-w-b":[{"border-b":[_]}],"border-w-l":[{"border-l":[_]}],"border-opacity":[{"border-opacity":[C]}],"border-style":[{border:[...Q1(),"hidden"]}],"divide-x":[{"divide-x":[_]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[_]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[C]}],"divide-style":[{divide:Q1()}],"border-color":[{border:[q]}],"border-color-x":[{"border-x":[q]}],"border-color-y":[{"border-y":[q]}],"border-color-s":[{"border-s":[q]}],"border-color-e":[{"border-e":[q]}],"border-color-t":[{"border-t":[q]}],"border-color-r":[{"border-r":[q]}],"border-color-b":[{"border-b":[q]}],"border-color-l":[{"border-l":[q]}],"divide-color":[{divide:[q]}],"outline-style":[{outline:["",...Q1()]}],"outline-offset":[{"outline-offset":[i7,v1]}],"outline-w":[{outline:[i7,T8]}],"outline-color":[{outline:[Y]}],"ring-w":[{ring:Z0()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[Y]}],"ring-opacity":[{"ring-opacity":[C]}],"ring-offset-w":[{"ring-offset":[i7,T8]}],"ring-offset-color":[{"ring-offset":[Y]}],shadow:[{shadow:["","inner","none",C8,MA]}],"shadow-color":[{shadow:[yZ]}],opacity:[{opacity:[C]}],"mix-blend":[{"mix-blend":[...W1(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":W1()}],filter:[{filter:["","none"]}],blur:[{blur:[U]}],brightness:[{brightness:[O]}],contrast:[{contrast:[T]}],"drop-shadow":[{"drop-shadow":["","none",C8,v1]}],grayscale:[{grayscale:[I]}],"hue-rotate":[{"hue-rotate":[F]}],invert:[{invert:[N]}],saturate:[{saturate:[m]}],sepia:[{sepia:[c]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[U]}],"backdrop-brightness":[{"backdrop-brightness":[O]}],"backdrop-contrast":[{"backdrop-contrast":[T]}],"backdrop-grayscale":[{"backdrop-grayscale":[I]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[F]}],"backdrop-invert":[{"backdrop-invert":[N]}],"backdrop-opacity":[{"backdrop-opacity":[C]}],"backdrop-saturate":[{"backdrop-saturate":[m]}],"backdrop-sepia":[{"backdrop-sepia":[c]}],"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",v1]}],duration:[{duration:J0()}],ease:[{ease:["linear","in","out","in-out",v1]}],delay:[{delay:J0()}],animate:[{animate:["none","spin","ping","pulse","bounce",v1]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[a]}],"scale-x":[{"scale-x":[a]}],"scale-y":[{"scale-y":[a]}],rotate:[{rotate:[hZ,v1]}],"translate-x":[{"translate-x":[o]}],"translate-y":[{"translate-y":[o]}],"skew-x":[{"skew-x":[u]}],"skew-y":[{"skew-y":[u]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",v1]}],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",v1]}],"caret-color":[{caret:[Y]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":i()}],"scroll-mx":[{"scroll-mx":i()}],"scroll-my":[{"scroll-my":i()}],"scroll-ms":[{"scroll-ms":i()}],"scroll-me":[{"scroll-me":i()}],"scroll-mt":[{"scroll-mt":i()}],"scroll-mr":[{"scroll-mr":i()}],"scroll-mb":[{"scroll-mb":i()}],"scroll-ml":[{"scroll-ml":i()}],"scroll-p":[{"scroll-p":i()}],"scroll-px":[{"scroll-px":i()}],"scroll-py":[{"scroll-py":i()}],"scroll-ps":[{"scroll-ps":i()}],"scroll-pe":[{"scroll-pe":i()}],"scroll-pt":[{"scroll-pt":i()}],"scroll-pr":[{"scroll-pr":i()}],"scroll-pb":[{"scroll-pb":i()}],"scroll-pl":[{"scroll-pl":i()}],"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",v1]}],fill:[{fill:[Y,"none"]}],"stroke-w":[{stroke:[i7,T8,p9]}],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 uW=GA(kA);var iW=q0(k1(),1),e6=q0(b4(),1),DQ=q0(k1(),1),D5=q0(b4(),1),oW=q0(b4(),1),n9=q0(b4(),1),EQ=q0(k1(),1),l4=q0(b4(),1),aW=q0(k1(),1),W5=q0(b4(),1),DZ=q0(b4(),1),C0=q0(b4(),1),q6=q0(b4(),1),t9=q0(b4(),1),s0=q0(b4(),1),D4=q0(b4(),1),n1=q0(b4(),1),u0=q0(b4(),1),R1=q0(b4(),1),VZ=q0(b4(),1),b7=q0(k1(),1),U1=q0(b4(),1),a7=q0(k1(),1),l0=q0(b4(),1),z6=q0(b4(),1),LI=q0(k1(),1),nW=q0(b4(),1),s9=q0(k1(),1),e9=q0(b4(),1),_I=q0(k1(),1),rW=q0(b4(),1),tW=q0(k1(),1),sW=q0(b4(),1),RI=q0(k1(),1),eW=q0(b4(),1),zO=q0(b4(),1),QO=q0(b4(),1),CA=Object.defineProperty,vA=(Y,G,U)=>(G in Y)?CA(Y,G,{enumerable:!0,configurable:!0,writable:!0,value:U}):Y[G]=U,SA=(Y,G,U)=>vA(Y,typeof G!=="symbol"?G+"":G,U);function U4(...Y){return uW(fW(Y))}var IC=[{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)}],kC=[{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 fA(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 hA(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 yA(Y){let G=hA(Y),U=Y.toLowerCase(),O=[],q;if(U.includes("sales")||U.includes("revenue")||U.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(U.includes("customer")||U.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(U.includes("task")||U.includes("todo")||U.includes("work")||U.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:{}}]}),q={type:"update_database",payload:{table:"tasks",operation:"mark_as_viewed",taskIds:["task-1","task-2","task-3"],timestamp:new Date().toISOString()}};if(U.includes("analyze")||U.includes("analysis"))q={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:q}}function VA(Y,G,U,O,q=30){let{message:R,widgets:L}=yA(Y),_=R.split(" "),T=0,I=setInterval(()=>{try{if(T<_.length)G({type:"token",content:_[T]+" "}),T++;else{clearInterval(I),L.forEach((N)=>{G({type:"widget",widget:N})});let F=`mock_thread_${Date.now()}`;G({type:"complete"}),U(F)}}catch(F){clearInterval(I),O(F instanceof Error?F:Error("Mock streaming error"))}},q)}function DA(Y){return new Promise((G,U)=>{let O=new FileReader;O.onload=()=>{let R=O.result.split(",")[1];G(R)},O.onerror=()=>U(Error("Failed to read file")),O.readAsDataURL(Y)})}function EA(Y){if(Y.startsWith("image/"))return"image";return"document"}function mA(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 uA(Y){let G=await DA(Y);return{type:EA(Y.type),source:{type:"base64",media_type:Y.type,data:G}}}async function gA(Y){let G=Array.from(Y);return await Promise.all(G.map((O)=>uA(O)))}async function gW(Y,G){if(!G||G.length===0)return Y;let U=[];if(Y.trim())U.push({type:"text",text:Y.trim()});let O=await gA(G);return U.push(...O),U}function q3(Y){if(Y<1024)return`${Y} B`;if(Y<1048576)return`${(Y/1024).toFixed(1)} KB`;return`${(Y/1048576).toFixed(1)} MB`}var xW=10485760;function cW(Y){if(!mA(Y))return{valid:!1,error:`Unsupported file type: ${Y.type}`};if(Y.size>xW)return{valid:!1,error:`File too large: ${q3(Y.size)} (max ${q3(xW)})`};return{valid:!0}}var xA=["list","table"];function jA(Y){let G=[],U=!1,O=Y.match(/"items"\s*:\s*\[/);if(!O)return{items:G,isStreaming:!1};let q=Y.indexOf("[",O.index);if(q===-1)return{items:G,isStreaming:!0};let R=0,L=!1,_=!1,T=-1;for(let N=q+1;N<Y.length;N++){let w=Y[N];if(_){_=!1;continue}if(w==="\\"&&L){_=!0;continue}if(w==='"'){L=!L;continue}if(L)continue;if(w==="{"){if(R===0)T=N;R++}else if(w==="}"){if(R--,R===0&&T!==-1){let k=Y.slice(T,N+1);try{let v=JSON.parse(k);if(!v.id)v.id=`item-${G.length}-${o9(k)}`;G.push(v)}catch(v){}T=-1}}else if(w==="]"&&R===0){U=!1;break}}if(R>0||T!==-1)U=!0;let I=Y.slice(q);if(a9(I,0)===-1)U=!0;return{items:G,isStreaming:U}}function o9(Y){let G=0;for(let U=0;U<Y.length;U++){let O=Y.charCodeAt(U);G=(G<<5)-G+O,G=G&G}return Math.abs(G).toString(36)}function a9(Y,G){let U=0,O=!1,q=!1;for(let R=G;R<Y.length;R++){let L=Y[R];if(q){q=!1;continue}if(L==="\\"&&O){q=!0;continue}if(L==='"'){O=!O;continue}if(O)continue;if(L==="["||L==="{")U++;else if(L==="]"||L==="}"){if(U--,U===0)return R}}return-1}function G3(Y){let G=[],U=!1,O=!1,q=0,R=null,L=Y,_=Y.lastIndexOf("@ui:");if(_!==-1){let F=Y.slice(_),N=F.match(/^@ui:(\w+)/);if(N){let w=N[1],k=F.indexOf("[");if(k===-1)L=Y.slice(0,_),R=w,O=!0;else{let v=_+k;if(a9(Y,v)===-1)if(xA.includes(w)){let D=Y.slice(v+1),{items:C,isStreaming:V}=jA(D);if(C.length>0){L=Y.slice(0,_);let m=`widget-${w}-streaming-${o9(D)}`,a=L.replace(/[\s:;\-–—\.]+$/g,"").trim();if(a)G.push({type:"text",content:a});G.push({type:"widget",widget:{type:w,id:m,props:w==="table"?{rows:C,columns:[]}:{items:C},isStreaming:V}}),U=!0,O=!1,L=""}else L=Y.slice(0,_),R=w,O=!0}else L=Y.slice(0,_),R=w,O=!0}}}if(O)L=L.replace(/[\s:;\-–—\.]+$/g,"");let T=/@ui:(\w+)\[/g,I;while((I=T.exec(L))!==null){let F=I[1],N=I.index+I[0].length-1,w=a9(L,N);if(w===-1)continue;let k=L.slice(N+1,w);if(I.index>q){let v=L.slice(q,I.index).trim();if(v)G.push({type:"text",content:v})}try{let v=k.trim(),E=JSON.parse(v),D=`widget-${F}-${o9(v)}`,{metadata:C,actions:V,...m}=E;G.push({type:"widget",widget:{type:F,id:D,props:m,...V&&{actions:V},...C&&{metadata:C}}}),U=!0}catch(v){}q=w+1,T.lastIndex=q}if(q<L.length){let F=L.slice(q).trim();if(F)G.push({type:"text",content:F})}if(G.length===0&&L.trim())G.push({type:"text",content:L.trim()});if(R)G.push({type:"widget_pending",pendingType:R});return{segments:G,hasWidgets:U,hasPendingWidget:O}}var dW={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"}]}]'}},pA=Object.keys(dW),cA=["flow"],lW=pA.filter((Y)=>!cA.includes(Y));function dA(Y){let G=Y||lW,U=`
|
|
176
|
-
## UI Widgets
|
|
177
|
-
SYNTAX: @ui:type[{json}] - MUST use SQUARE BRACKETS [] around the JSON object.
|
|
178
|
-
CORRECT: @ui:list[{"items": [...]}]
|
|
179
|
-
WRONG: @ui:list{"items": [...]} (missing square brackets)
|
|
180
|
-
|
|
181
|
-
`;for(let O of G){let q=dW[O];if(!q)continue;U+=`${O}: ${q.schema} | ${q.example}
|
|
182
|
-
`}return U+=`
|
|
183
|
-
Per-item "metadata" is sent as payload on action click.
|
|
184
|
-
`,U}function lA(Y){return`
|
|
185
|
-
Widgets: @ui:type[{json}] - MUST use square brackets []. Example: @ui:list[{"items": [...]}]. Types: ${(Y||lW).join(", ")}. Per-item "metadata" is sent as action payload.
|
|
186
|
-
`}function iA({widget:Y,onAction:G}){let{title:U,description:O,image:q,footer:R}=Y.props;return e6.jsxs("div",{className:"border border-neutral-200 dark:border-neutral-700 rounded-xl bg-white dark:bg-neutral-900 overflow-hidden",children:[q&&e6.jsx("img",{src:q,alt:U,className:"w-full h-48 object-cover"}),e6.jsxs("div",{className:"p-4",children:[e6.jsx("h3",{className:"!text-lg font-semibold !text-neutral-900 dark:!text-white",children:U}),O&&e6.jsx("p",{className:"!text-neutral-600 dark:!text-neutral-400 mt-2",children:O})]}),(R||Y.actions&&Y.actions.length>0)&&e6.jsxs("div",{className:"border-t border-neutral-200 dark:border-neutral-700 p-4 flex justify-between items-center",children:[R&&e6.jsx("span",{className:"!text-sm !text-neutral-600 dark:!text-neutral-400",children:R}),Y.actions&&Y.actions.length>0&&e6.jsx("div",{className:"flex gap-2",children:Y.actions.map((L,_)=>e6.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},_))})]})]})}function oA({widget:Y,onAction:G}){let{items:U}=Y.props,O=Y.isStreaming??!1,q=DQ.useRef(new Set),[R,L]=DQ.useState(new Set);return DQ.useEffect(()=>{let _=new Set(U.map((I)=>I.id)),T=new Set;if(U.forEach((I)=>{if(!q.current.has(I.id))T.add(I.id)}),U.forEach((I)=>q.current.add(I.id)),T.size>0){L(T);let I=setTimeout(()=>{L(new Set)},500);return()=>clearTimeout(I)}},[U]),D5.jsxs("div",{className:"border border-neutral-200 dark:border-neutral-700 rounded-xl bg-white dark:bg-neutral-900 overflow-hidden",children:[U.map((_,T)=>{let I=R.has(_.id),F=T===U.length-1;return D5.jsxs("div",{className:`apteva-list-item flex items-center p-4 transition-colors ${!F||O?"border-b border-neutral-200 dark:border-neutral-700":""} ${!_.backgroundColor?"hover:bg-neutral-50 dark:hover:bg-neutral-800":""} ${I?"apteva-list-item-new":""}`,style:_.backgroundColor?{backgroundColor:_.backgroundColor}:void 0,children:[_.image&&D5.jsx("img",{src:_.image,alt:_.title,className:"w-16 h-16 rounded object-cover"}),D5.jsxs("div",{className:`flex-1 ${_.image?"ml-4":""}`,children:[D5.jsx("h4",{className:"font-semibold !text-neutral-900 dark:!text-white",children:_.title}),_.subtitle&&D5.jsx("p",{className:"!text-sm !text-neutral-600 dark:!text-neutral-400",children:_.subtitle}),_.description&&D5.jsx("p",{className:"!text-xs !text-neutral-500 dark:!text-neutral-500 mt-1",children:_.description})]}),Y.actions&&Y.actions.length>0&&D5.jsx("div",{className:"flex gap-2",children:Y.actions.map((N,w)=>D5.jsx("button",{onClick:()=>G?.({type:N.type,payload:_.metadata||_,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:N.label},w))})]},_.id)}),O&&D5.jsxs("div",{className:"apteva-list-streaming flex items-center gap-3 p-4 text-neutral-500 dark:text-neutral-400",children:[D5.jsxs("div",{className:"apteva-streaming-dots flex gap-1",children:[D5.jsx("span",{className:"w-2 h-2 bg-current rounded-full animate-pulse",style:{animationDelay:"0ms"}}),D5.jsx("span",{className:"w-2 h-2 bg-current rounded-full animate-pulse",style:{animationDelay:"150ms"}}),D5.jsx("span",{className:"w-2 h-2 bg-current rounded-full animate-pulse",style:{animationDelay:"300ms"}})]}),D5.jsx("span",{className:"text-sm",children:"Loading more..."})]})]})}function aA({widget:Y,onAction:G}){let{label:U,variant:O="primary",disabled:q=!1}=Y.props;return oW.jsx("button",{onClick:()=>Y.actions?.[0]&&G?.({type:Y.actions[0].type,payload:Y.actions[0].payload,widgetId:Y.id,timestamp:new Date}),disabled:q,className:U4("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":q}),children:U})}function nA({widget:Y,onAction:G}){let{layout:U="horizontal",buttons:O}=Y.props,q={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"},R=(L)=>{return Y.actions?.find((_)=>_.payload?.buttonId===L)||Y.actions?.[0]};return n9.jsx("div",{className:U4("flex gap-2",U==="vertical"?"flex-col":"flex-row flex-wrap"),children:O.map((L)=>{let _=R(L.id);return n9.jsx("button",{onClick:()=>{if(_)G?.({type:_.type,payload:{..._.payload,buttonId:L.id},widgetId:Y.id,timestamp:new Date})},className:U4("px-4 py-2 rounded-lg font-medium transition-colors text-sm",q[L.variant||"secondary"]),children:L.label},L.id)})})}function rA({widget:Y,onAction:G}){let{columns:U,rows:O,caption:q,compact:R=!1,striped:L=!1}=Y.props,_=Y.isStreaming??!1,T=EQ.useRef(new Set),[I,F]=EQ.useState(new Set);EQ.useEffect(()=>{let w=new Set;if(O.forEach((k,v)=>{let E=k.id||`row-${v}`;if(!T.current.has(E))w.add(E)}),O.forEach((k,v)=>{let E=k.id||`row-${v}`;T.current.add(E)}),w.size>0){F(w);let k=setTimeout(()=>{F(new Set)},500);return()=>clearTimeout(k)}},[O]);let N=(w)=>{switch(w){case"center":return"text-center";case"right":return"text-right";default:return"text-left"}};return l4.jsx("div",{className:"border border-neutral-200 dark:border-neutral-700 rounded-xl bg-white dark:bg-neutral-900 overflow-hidden",children:l4.jsx("div",{className:"overflow-x-auto",children:l4.jsxs("table",{className:"w-full",children:[q&&l4.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:q}),l4.jsx("thead",{children:l4.jsx("tr",{className:"bg-neutral-50 dark:bg-neutral-800 border-b border-neutral-200 dark:border-neutral-700",children:U.map((w)=>l4.jsx("th",{className:U4("font-semibold text-neutral-900 dark:text-white",R?"px-3 py-2 text-xs":"px-4 py-3 text-sm",N(w.align)),style:w.width?{width:w.width}:void 0,children:w.label},w.key))})}),l4.jsxs("tbody",{children:[O.map((w,k)=>{let v=w.id||`row-${k}`,E=I.has(v);return l4.jsx("tr",{className:U4("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&&k%2===1&&"bg-neutral-50/50 dark:bg-neutral-800/50",E&&"apteva-table-row-new"),onClick:()=>{if(Y.actions&&Y.actions.length>0)G?.({type:Y.actions[0].type,payload:w,widgetId:Y.id,timestamp:new Date})},style:{cursor:Y.actions?.length?"pointer":"default"},children:U.map((D)=>l4.jsx("td",{className:U4("text-neutral-700 dark:text-neutral-300",R?"px-3 py-2 text-xs":"px-4 py-3 text-sm",N(D.align)),children:w[D.key]??"—"},D.key))},v)}),O.length===0&&!_&&l4.jsx("tr",{children:l4.jsx("td",{colSpan:U.length||1,className:"px-4 py-8 text-center text-sm text-neutral-500 dark:text-neutral-400",children:"No data available"})}),_&&l4.jsx("tr",{className:"apteva-table-streaming",children:l4.jsx("td",{colSpan:U.length||1,className:"px-4 py-3 text-center",children:l4.jsxs("div",{className:"flex items-center justify-center gap-3 text-neutral-500 dark:text-neutral-400",children:[l4.jsxs("div",{className:"flex gap-1",children:[l4.jsx("span",{className:"w-2 h-2 bg-current rounded-full animate-pulse",style:{animationDelay:"0ms"}}),l4.jsx("span",{className:"w-2 h-2 bg-current rounded-full animate-pulse",style:{animationDelay:"150ms"}}),l4.jsx("span",{className:"w-2 h-2 bg-current rounded-full animate-pulse",style:{animationDelay:"300ms"}})]}),l4.jsx("span",{className:"text-sm",children:"Loading more..."})]})})})]})]})})})}function tA({widget:Y,onAction:G}){let{title:U,fields:O}=Y.props,[q,R]=aW.useState(()=>{let F={};return O.forEach((N)=>{F[N.name]=N.defaultValue??(N.type==="checkbox"?!1:"")}),F}),L=(F,N)=>{R((w)=>({...w,[F]:N}))},_=(F)=>{if(F.preventDefault(),Y.actions?.[0]&&G)G({type:Y.actions[0].type,payload:{...Y.actions[0].payload,formData:q},widgetId:Y.id,timestamp:new Date})},T=(F)=>{switch(F.type){case"text":case"password":case"number":case"date":return W5.jsx("input",{type:F.type,name:F.name,value:q[F.name]||"",onChange:(w)=>L(F.name,F.type==="number"?Number(w.target.value):w.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 W5.jsx("textarea",{name:F.name,value:q[F.name]||"",onChange:(w)=>L(F.name,w.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 W5.jsxs("select",{name:F.name,value:q[F.name]||"",onChange:(w)=>L(F.name,w.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:[W5.jsx("option",{value:"",children:F.placeholder||"Select..."}),F.options?.map((w)=>W5.jsx("option",{value:w.value,children:w.label},w.value))]});case"checkbox":return W5.jsxs("label",{className:"flex items-center gap-2 cursor-pointer",children:[W5.jsx("input",{type:"checkbox",name:F.name,checked:q[F.name]||!1,onChange:(w)=>L(F.name,w.target.checked),className:"w-4 h-4 rounded border-neutral-300 dark:border-neutral-600 text-blue-500 focus:ring-blue-500"}),W5.jsx("span",{className:"!text-neutral-700 dark:!text-neutral-300",children:F.label})]});default:return null}},I=Y.actions?.find((F)=>F.type==="submit")||Y.actions?.[0];return W5.jsxs("form",{onSubmit:_,className:"border border-neutral-200 dark:border-neutral-700 rounded-xl bg-white dark:bg-neutral-900 overflow-hidden",children:[W5.jsxs("div",{className:"p-4",children:[U&&W5.jsx("h3",{className:"!text-lg font-semibold !text-neutral-900 dark:!text-white mb-4",children:U}),W5.jsx("div",{className:"space-y-3",children:O.map((F)=>W5.jsxs("div",{className:F.type==="checkbox"?"":"space-y-1",children:[F.type!=="checkbox"&&W5.jsxs("label",{className:"block !text-sm font-medium !text-neutral-600 dark:!text-neutral-400",children:[F.label,F.required&&W5.jsx("span",{className:"text-red-500 ml-1",children:"*"})]}),T(F)]},F.name))})]}),I&&W5.jsx("div",{className:"px-4 pb-4",children:W5.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:I.label||"Submit"})})]})}function sA({widget:Y}){let{src:G,alt:U,caption:O}=Y.props;return DZ.jsxs("figure",{className:"overflow-hidden rounded-xl",children:[DZ.jsx("img",{src:G,alt:U,className:"w-full h-auto object-contain bg-neutral-100 dark:bg-neutral-800",loading:"lazy"}),O&&DZ.jsx("figcaption",{className:"mt-2 text-center text-sm text-neutral-600 dark:text-neutral-400",children:O})]})}function eA({type:Y,status:G}){if(G==="completed")return C0.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:C0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2.5,d:"M5 13l4 4L19 7"})});if(G==="error")return C0.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:C0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2.5,d:"M6 18L18 6M6 6l12 12"})});if(G==="active")return C0.jsx("div",{className:"w-3.5 h-3.5 rounded-full bg-current animate-pulse"});let U="w-4 h-4";if(Y==="time"||Y==="schedule"||Y==="clock")return C0.jsx("svg",{className:U,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:C0.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 C0.jsx("svg",{className:U,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:C0.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 C0.jsx("svg",{className:U,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:C0.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 C0.jsx("svg",{className:U,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:C0.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 C0.jsx("svg",{className:U,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:C0.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 C0.jsx("svg",{className:U,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:C0.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 C0.jsx("svg",{className:U,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:C0.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 C0.jsx("svg",{className:U,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:C0.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 C0.jsx("svg",{className:U,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:C0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13 10V3L4 14h7v7l9-11h-7z"})});if(Y==="push"||Y==="upload"||Y==="cloud")return C0.jsx("svg",{className:U,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:C0.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 C0.jsx("svg",{className:U,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"})});if(Y==="review"||Y==="inspect"||Y==="eye")return C0.jsxs("svg",{className:U,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:[C0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"}),C0.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 C0.jsx("svg",{className:U,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:C0.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 C0.jsx("svg",{className:U,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:C0.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 C0.jsx("svg",{className:U,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:C0.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 C0.jsx("svg",{className:U,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:C0.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 C0.jsx("svg",{className:U,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:C0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8 7h12m0 0l-4-4m4 4l-4 4m0 6H4m0 0l4 4m-4-4l4-4"})});return C0.jsx("div",{className:"w-2 h-2 rounded-full bg-current opacity-50"})}function zI({icon:Y}){if(Y==="research"||Y==="multi-agent"||Y==="agents")return C0.jsx("div",{className:"w-10 h-10 rounded-lg bg-purple-100 dark:bg-purple-500/20 flex items-center justify-center",children:C0.jsx("svg",{className:"w-6 h-6 text-purple-600 dark:text-purple-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:C0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13 10V3L4 14h7v7l9-11h-7z"})})});if(Y==="schedule"||Y==="report"||Y==="calendar")return C0.jsx("div",{className:"w-10 h-10 rounded-lg bg-amber-100 dark:bg-amber-500/20 flex items-center justify-center",children:C0.jsx("svg",{className:"w-6 h-6 text-amber-600 dark:text-amber-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:C0.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 C0.jsx("div",{className:"w-10 h-10 rounded-lg bg-cyan-100 dark:bg-cyan-500/20 flex items-center justify-center",children:C0.jsx("svg",{className:"w-6 h-6 text-cyan-600 dark:text-cyan-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:C0.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 C0.jsx("div",{className:"w-10 h-10 rounded-lg bg-cyan-100 dark:bg-cyan-500/20 flex items-center justify-center",children:C0.jsx("svg",{className:"w-6 h-6 text-cyan-600 dark:text-cyan-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:C0.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 C0.jsx("div",{className:"w-10 h-10 rounded-lg bg-blue-100 dark:bg-blue-500/20 flex items-center justify-center",children:C0.jsx("svg",{className:"w-6 h-6 text-blue-600 dark:text-blue-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:C0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13 10V3L4 14h7v7l9-11h-7z"})})});if(Y==="automation"||Y==="workflow"||Y==="process")return C0.jsx("div",{className:"w-10 h-10 rounded-lg bg-indigo-100 dark:bg-indigo-500/20 flex items-center justify-center",children:C0.jsx("svg",{className:"w-6 h-6 text-indigo-600 dark:text-indigo-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:C0.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 C0.jsx("div",{className:"w-10 h-10 rounded-lg bg-emerald-100 dark:bg-emerald-500/20 flex items-center justify-center",children:C0.jsx("svg",{className:"w-6 h-6 text-emerald-600 dark:text-emerald-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:C0.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 C0.jsx("div",{className:"w-10 h-10 rounded-lg bg-neutral-100 dark:bg-neutral-700 flex items-center justify-center",children:C0.jsx("svg",{className:"w-6 h-6 text-neutral-600 dark:text-neutral-300",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:C0.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 QI(){return C0.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:C0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5l7 7-7 7"})})}var s6={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 XI(Y,G){if(Y.color&&s6[Y.color])return s6[Y.color];if(G==="time"||G==="schedule"||G==="clock")return s6.blue;if(G==="agent"||G?.startsWith("@"))return s6.purple;if(G==="email"||G==="slack"||G==="message"||G==="notification")return s6.cyan;if(G==="generate"||G==="document"||G==="create")return s6.amber;if(G==="deploy"||G==="rocket"||G==="launch")return s6.rose;if(G==="build"||G==="compile"||G==="package")return s6.indigo;if(G==="test"||G==="check"||G==="verify")return s6.emerald;if(G==="data"||G==="database"||G==="storage")return s6.orange;return s6.blue}function ZI({widget:Y}){let{title:G,subtitle:U,icon:O,steps:q}=Y.props;return C0.jsxs("div",{className:"rounded-xl bg-white dark:bg-neutral-900 border border-neutral-200 dark:border-neutral-700 overflow-hidden",children:[C0.jsxs("div",{className:"px-4 py-4 flex items-center gap-4",children:[C0.jsx(zI,{icon:O}),C0.jsxs("div",{className:"flex-1 min-w-0",children:[C0.jsx("h3",{className:"font-semibold text-base text-neutral-900 dark:text-white truncate",children:G}),U&&C0.jsx("p",{className:"text-sm text-neutral-500 dark:text-neutral-400 truncate mt-0.5",children:U})]})]}),C0.jsx("div",{className:"px-4 pb-4",children:C0.jsx("div",{className:"flex flex-wrap items-center gap-2",children:q.map((R,L)=>{let _=L===q.length-1,T=R.status==="active",I=R.status==="completed",F=R.status==="error",N=R.status==="skipped",w=R.label,k=R.type;if(!k)if(w.startsWith("@"))k="agent";else if(/^\d+[ap]m$/i.test(w)||/^(mon|tue|wed|thu|fri|sat|sun)/i.test(w))k="time";else{let D=w.toLowerCase();k={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"}[D]}let v,E="";if(T)v="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(I)v="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)v="bg-red-100 dark:bg-red-900/40 !text-red-700 dark:!text-red-300 border-red-400 dark:border-red-400";else if(N)v="bg-neutral-100 dark:bg-neutral-800 !text-neutral-400 dark:!text-neutral-500 border-neutral-300 dark:border-neutral-600",E="line-through";else v=XI(R,k);return C0.jsxs("div",{className:"flex items-center gap-2",children:[C0.jsxs("span",{className:`inline-flex items-center gap-2 px-4 py-2 rounded-lg text-sm font-medium border transition-colors ${v} ${E}`,children:[C0.jsx(eA,{type:k,status:R.status}),w]}),!_&&C0.jsx(QI,{})]},R.id)})})})]})}function r9({widget:Y,onAction:G}){return q6.jsx("div",{className:"apteva-widget",children:(()=>{switch(Y.type){case"card":return q6.jsx(iA,{widget:Y,onAction:G});case"list":return q6.jsx(oA,{widget:Y,onAction:G});case"button":return q6.jsx(aA,{widget:Y,onAction:G});case"button_group":return q6.jsx(nA,{widget:Y,onAction:G});case"table":return q6.jsx(rA,{widget:Y,onAction:G});case"form":return q6.jsx(tA,{widget:Y,onAction:G});case"image":return q6.jsx(sA,{widget:Y});case"flow":return q6.jsx(ZI,{widget:Y});default:return q6.jsxs("div",{className:"p-4 border border-yellow-300 bg-yellow-50 rounded-lg",children:[q6.jsxs("p",{className:"text-sm text-yellow-800",children:["Unknown widget type: ",Y.type]}),q6.jsx("pre",{className:"text-xs mt-2 overflow-auto",children:JSON.stringify(Y,null,2)})]})}})()})}function l9({widgets:Y,onAction:G,onWidgetMount:U,layout:O="stack",spacing:q="normal",columns:R=3,className:L}){iW.useEffect(()=>{Y.forEach((I)=>{U?.(I.id)})},[Y,U]);let _={stack:"flex flex-col",grid:`grid grid-cols-1 md:grid-cols-${R}`,masonry:"columns-1 md:columns-2 lg:columns-3"},T={tight:"gap-2",normal:"gap-4",loose:"gap-6"};return t9.jsx("div",{className:U4(_[O],T[q],L),children:Y.map((I)=>t9.jsx(r9,{widget:I,onAction:G},I.id))})}function jW({type:Y,className:G}){switch(Y){case"card":return s0.jsx("div",{className:U4("apteva-widget-skeleton animate-pulse rounded-lg border border-neutral-200 dark:border-neutral-800 overflow-hidden",G),children:s0.jsxs("div",{className:"p-4 space-y-3",children:[s0.jsx("div",{className:"h-4 bg-neutral-200 dark:bg-neutral-700 rounded w-3/4"}),s0.jsx("div",{className:"h-3 bg-neutral-200 dark:bg-neutral-700 rounded w-full"}),s0.jsx("div",{className:"h-3 bg-neutral-200 dark:bg-neutral-700 rounded w-5/6"})]})});case"list":return s0.jsx("div",{className:U4("apteva-widget-skeleton animate-pulse space-y-2",G),children:[1,2,3].map((U)=>s0.jsxs("div",{className:"flex items-center gap-3 p-3 rounded-lg border border-neutral-200 dark:border-neutral-800",children:[s0.jsx("div",{className:"w-10 h-10 bg-neutral-200 dark:bg-neutral-700 rounded-full flex-shrink-0"}),s0.jsxs("div",{className:"flex-1 space-y-2",children:[s0.jsx("div",{className:"h-3 bg-neutral-200 dark:bg-neutral-700 rounded w-1/2"}),s0.jsx("div",{className:"h-2 bg-neutral-200 dark:bg-neutral-700 rounded w-3/4"})]})]},U))});case"button_group":return s0.jsxs("div",{className:U4("apteva-widget-skeleton animate-pulse flex gap-2",G),children:[s0.jsx("div",{className:"h-9 bg-neutral-200 dark:bg-neutral-700 rounded-lg w-20"}),s0.jsx("div",{className:"h-9 bg-neutral-200 dark:bg-neutral-700 rounded-lg w-20"}),s0.jsx("div",{className:"h-9 bg-neutral-200 dark:bg-neutral-700 rounded-lg w-20"})]});case"form":return s0.jsxs("div",{className:U4("apteva-widget-skeleton animate-pulse rounded-lg border border-neutral-200 dark:border-neutral-800 p-4 space-y-4",G),children:[s0.jsx("div",{className:"h-4 bg-neutral-200 dark:bg-neutral-700 rounded w-1/3"}),s0.jsxs("div",{className:"space-y-3",children:[s0.jsx("div",{className:"h-10 bg-neutral-200 dark:bg-neutral-700 rounded"}),s0.jsx("div",{className:"h-10 bg-neutral-200 dark:bg-neutral-700 rounded"})]}),s0.jsx("div",{className:"h-9 bg-neutral-200 dark:bg-neutral-700 rounded w-24"})]});case"chart":return s0.jsxs("div",{className:U4("apteva-widget-skeleton animate-pulse rounded-lg border border-neutral-200 dark:border-neutral-800 p-4",G),children:[s0.jsx("div",{className:"h-4 bg-neutral-200 dark:bg-neutral-700 rounded w-1/4 mb-4"}),s0.jsxs("div",{className:"flex items-end gap-2 h-32",children:[s0.jsx("div",{className:"flex-1 bg-neutral-200 dark:bg-neutral-700 rounded-t h-1/2"}),s0.jsx("div",{className:"flex-1 bg-neutral-200 dark:bg-neutral-700 rounded-t h-3/4"}),s0.jsx("div",{className:"flex-1 bg-neutral-200 dark:bg-neutral-700 rounded-t h-1/3"}),s0.jsx("div",{className:"flex-1 bg-neutral-200 dark:bg-neutral-700 rounded-t h-full"}),s0.jsx("div",{className:"flex-1 bg-neutral-200 dark:bg-neutral-700 rounded-t h-2/3"})]})]});case"image":return s0.jsx("div",{className:U4("apteva-widget-skeleton animate-pulse",G),children:s0.jsx("div",{className:"aspect-video bg-neutral-200 dark:bg-neutral-700 rounded-lg"})});case"gallery":return s0.jsx("div",{className:U4("apteva-widget-skeleton animate-pulse grid grid-cols-3 gap-2",G),children:[1,2,3].map((U)=>s0.jsx("div",{className:"aspect-square bg-neutral-200 dark:bg-neutral-700 rounded-lg"},U))});case"map":return s0.jsx("div",{className:U4("apteva-widget-skeleton animate-pulse",G),children:s0.jsx("div",{className:"h-48 bg-neutral-200 dark:bg-neutral-700 rounded-lg flex items-center justify-center",children:s0.jsxs("svg",{className:"w-8 h-8 text-neutral-400 dark:text-neutral-500",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:[s0.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"}),s0.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 s0.jsxs("div",{className:U4("apteva-widget-skeleton animate-pulse rounded-lg border border-neutral-200 dark:border-neutral-800 overflow-hidden",G),children:[s0.jsxs("div",{className:"flex bg-neutral-100 dark:bg-neutral-800 border-b border-neutral-200 dark:border-neutral-700",children:[s0.jsx("div",{className:"flex-1 px-4 py-3",children:s0.jsx("div",{className:"h-3 bg-neutral-300 dark:bg-neutral-600 rounded w-16"})}),s0.jsx("div",{className:"flex-1 px-4 py-3",children:s0.jsx("div",{className:"h-3 bg-neutral-300 dark:bg-neutral-600 rounded w-20"})}),s0.jsx("div",{className:"flex-1 px-4 py-3",children:s0.jsx("div",{className:"h-3 bg-neutral-300 dark:bg-neutral-600 rounded w-14"})})]}),[1,2,3].map((U)=>s0.jsxs("div",{className:"flex border-b border-neutral-200 dark:border-neutral-800 last:border-b-0",children:[s0.jsx("div",{className:"flex-1 px-4 py-3",children:s0.jsx("div",{className:"h-3 bg-neutral-200 dark:bg-neutral-700 rounded w-24"})}),s0.jsx("div",{className:"flex-1 px-4 py-3",children:s0.jsx("div",{className:"h-3 bg-neutral-200 dark:bg-neutral-700 rounded w-16"})}),s0.jsx("div",{className:"flex-1 px-4 py-3",children:s0.jsx("div",{className:"h-3 bg-neutral-200 dark:bg-neutral-700 rounded w-20"})})]},U))]});default:return s0.jsxs("div",{className:U4("apteva-widget-skeleton animate-pulse rounded-lg border border-neutral-200 dark:border-neutral-800 p-4",G),children:[s0.jsx("div",{className:"h-4 bg-neutral-200 dark:bg-neutral-700 rounded w-1/2 mb-2"}),s0.jsx("div",{className:"h-3 bg-neutral-200 dark:bg-neutral-700 rounded w-full"})]})}}function JI(Y){return/\.(jpg|jpeg|png|gif|webp|svg|bmp|ico)(\?.*)?$/i.test(Y)}function Az(Y,G=""){let U=[],O=/!\[([^\]]*)\]\(([^)]+)\)|\[([^\]]+)\]\(([^)]+)\)|(\*\*|__)(.+?)\5|`([^`]+)`/g,q=0,R,L=0;while((R=O.exec(Y))!==null){if(R.index>q)U.push(Y.slice(q,R.index));if(R[1]!==void 0||R[2]!==void 0){let _=R[1]||"",T=R[2];U.push(D4.jsx("img",{src:T,alt:_,className:"apteva-md-img"},`${G}img${L++}`))}else if(R[3]!==void 0||R[4]!==void 0){let _=R[3],T=R[4];if(JI(T))U.push(D4.jsx("img",{src:T,alt:_,className:"apteva-md-img"},`${G}img${L++}`));else U.push(D4.jsx("a",{href:T,target:"_blank",rel:"noopener noreferrer",className:"apteva-md-link",children:_},`${G}a${L++}`))}else if(R[5]!==void 0)U.push(D4.jsx("strong",{children:R[6]},`${G}b${L++}`));else if(R[7]!==void 0)U.push(D4.jsx("code",{className:"apteva-md-inline-code",children:R[7]},`${G}code${L++}`));q=R.index+R[0].length}if(q<Y.length)U.push(Y.slice(q));return U.length>0?U:[Y]}function YI(Y){let G=Y.split(`
|
|
187
|
-
`),U=[],O=0,q=0;while(q<G.length){let R=G[q],L=R.match(/^##\s+(.*)$/);if(L){U.push(D4.jsx("h2",{className:"apteva-md-h2",children:Az(L[1],`${O}`)},`h2${O++}`)),q++;continue}let _=R.match(/^###\s+(.*)$/);if(_){U.push(D4.jsx("h3",{className:"apteva-md-h3",children:Az(_[1],`${O}`)},`h3${O++}`)),q++;continue}let T=R.match(/^(\s*)([-*+])\s+(.*)$/);if(T){let N=[],w=T[1].length;while(q<G.length){let k=G[q].match(/^(\s*)([-*+])\s+(.*)$/);if(k&&k[1].length===w)N.push(D4.jsx("li",{className:"apteva-md-li",children:Az(k[3],`${O}`)},`li${O++}`)),q++;else break}U.push(D4.jsx("ul",{className:"apteva-md-ul",children:N},`ul${O++}`));continue}let I=R.match(/^(\s*)(\d+)\.\s+(.*)$/);if(I){let N=[],w=I[1].length;while(q<G.length){let k=G[q].match(/^(\s*)(\d+)\.\s+(.*)$/);if(k&&k[1].length===w)N.push(D4.jsx("li",{className:"apteva-md-li",children:Az(k[3],`${O}`)},`li${O++}`)),q++;else break}U.push(D4.jsx("ol",{className:"apteva-md-ol",children:N},`ol${O++}`));continue}if(R.match(/^\|(.+)\|$/)&&q+1<G.length){if(G[q+1].match(/^\|([\s:-]+\|)+$/)){let k=R.split("|").filter((E)=>E.trim()!=="").map((E)=>E.trim());q+=2;let v=[];while(q<G.length)if(G[q].match(/^\|(.+)\|$/)){let D=G[q].split("|").filter((C)=>C.trim()!=="").map((C)=>C.trim());v.push(D),q++}else break;U.push(D4.jsx("div",{className:"apteva-md-table-wrapper",children:D4.jsxs("table",{className:"apteva-md-table",children:[D4.jsx("thead",{children:D4.jsx("tr",{children:k.map((E,D)=>D4.jsx("th",{className:"apteva-md-th",children:Az(E,`th${O}${D}`)},`th${D}`))})}),D4.jsx("tbody",{children:v.map((E,D)=>D4.jsx("tr",{children:E.map((C,V)=>D4.jsx("td",{className:"apteva-md-td",children:Az(C,`td${O}${D}${V}`)},`td${V}`))},`tr${D}`))})]})},`table-wrapper${O++}`));continue}}if(R==="")U.push(D4.jsx("br",{},`br${O++}`));else U.push(D4.jsxs("span",{children:[Az(R,`${O}`),q<G.length-1?`
|
|
188
|
-
`:""]},`p${O++}`));q++}return U}function o7({content:Y,className:G=""}){return D4.jsx("div",{className:`apteva-md ${G}`,children:YI(Y)})}function $I({name:Y,status:G,isReceiving:U=!1,inputLength:O=0,streamOutput:q}){if(G==="preparing")return n1.jsxs("div",{className:"apteva-tool-card apteva-tool-card-preparing",children:[n1.jsxs("svg",{className:"apteva-tool-icon apteva-tool-icon-spin",fill:"none",viewBox:"0 0 24 24",children:[n1.jsx("circle",{className:"apteva-tool-spinner-track",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),n1.jsx("path",{className:"apteva-tool-spinner-fill",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"})]}),n1.jsxs("span",{className:"apteva-tool-label",children:[n1.jsx("strong",{children:Y}),n1.jsx("span",{className:"apteva-tool-status-text",children:" preparing..."})]})]});if(G==="running")return n1.jsxs("div",{className:"apteva-tool-card apteva-tool-card-running",children:[n1.jsxs("svg",{className:"apteva-tool-icon apteva-tool-icon-spin",fill:"none",viewBox:"0 0 24 24",children:[n1.jsx("circle",{className:"apteva-tool-spinner-track",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),n1.jsx("path",{className:"apteva-tool-spinner-fill",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"})]}),n1.jsxs("span",{className:"apteva-tool-label",children:[n1.jsx("strong",{children:Y}),q?n1.jsx("span",{className:"apteva-tool-stream-separator",children:" · "}):null,q?n1.jsx("span",{className:"apteva-tool-stream-output",children:q}):n1.jsxs(n1.Fragment,{children:[n1.jsx("span",{className:"apteva-tool-status-text",children:" running"}),n1.jsxs("span",{className:"apteva-tool-dots",children:[n1.jsx("span",{children:"."}),n1.jsx("span",{children:"."}),n1.jsx("span",{children:"."})]})]})]})]});if(G==="completed")return n1.jsxs("div",{className:"apteva-tool-card apteva-tool-card-completed",children:[n1.jsx("svg",{className:"apteva-tool-icon",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:n1.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})}),n1.jsx("span",{className:"apteva-tool-label",children:Y})]});return n1.jsxs("div",{className:"apteva-tool-card apteva-tool-card-error",children:[n1.jsx("svg",{className:"apteva-tool-icon",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:n1.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})}),n1.jsxs("span",{className:"apteva-tool-label",children:[Y," failed"]})]})}function HI({message:Y,onAction:G,enableWidgets:U,onWidgetRender:O}){let q=Y.role==="user",R=Y.metadata?.content_segments,L=Y.metadata?.isStreaming===!0,_=Y.content||R&&R.length>0,T=Iz.useRef(new Set),I=Iz.useMemo(()=>{if(!U||q||!Y.content)return[];return G3(Y.content).segments.filter((a)=>a.type==="widget"&&!!a.widget).map((a)=>a.widget)},[U,q,Y.content]);Iz.useEffect(()=>{if(O&&Y.widgets){for(let m of Y.widgets)if(!T.current.has(m.id))T.current.add(m.id),O(m)}},[Y.widgets,O]),Iz.useEffect(()=>{if(O&&I.length>0){for(let m of I)if(!T.current.has(m.id))T.current.add(m.id),O(m)}},[I,O]);let F=(m)=>{if(!U||q)return u0.jsx(o7,{content:m});let c=G3(m).segments.filter((u)=>u.type==="text"&&u.content).map((u)=>u.content).join("");if(!c.trim())return null;return u0.jsx(o7,{content:c})},N=()=>{if(!U||q||!Y.content)return null;let m=G3(Y.content),a=[],c="";if(m.segments.forEach((u,Q0)=>{if(u.type==="text"&&u.content)c+=u.content;else if(u.type==="widget"&&u.widget){if(c.trim())a.push(u0.jsx("div",{className:"apteva-message-bubble apteva-message-assistant",children:u0.jsx("div",{className:"apteva-message-content-assistant",children:u0.jsx(o7,{content:c})})},`text-${Q0}`)),c="";a.push(u0.jsx("div",{className:"apteva-widget-standalone",children:u0.jsx(r9,{widget:u.widget,onAction:G})},`widget-${Q0}`))}else if(u.type==="widget_pending"&&u.pendingType){if(c.trim())a.push(u0.jsx("div",{className:"apteva-message-bubble apteva-message-assistant",children:u0.jsx("div",{className:"apteva-message-content-assistant",children:u0.jsx(o7,{content:c})})},`text-${Q0}`)),c="";a.push(u0.jsx("div",{className:"apteva-widget-standalone",children:u0.jsx(jW,{type:u.pendingType})},`pending-${Q0}`))}}),c.trim())a.push(u0.jsx("div",{className:"apteva-message-bubble apteva-message-assistant",children:u0.jsx("div",{className:"apteva-message-content-assistant",children:u0.jsx(o7,{content:c})})},"text-final"));return a.length>0?a:null},w=Y.metadata?.attachments||[],k=w.length>0,v=()=>{if(!k)return null;return u0.jsx("div",{className:"apteva-message-attachments flex flex-wrap gap-2 mb-2 justify-end",children:w.map((m,a)=>{let c=m.type.startsWith("image/"),u=m.type==="application/pdf";if(c&&m.preview)return u0.jsx("div",{className:"apteva-attachment-image relative rounded-lg overflow-hidden shadow-sm",children:u0.jsx("img",{src:m.preview,alt:m.name,className:"max-w-[150px] max-h-[150px] object-cover"})},a);return u0.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:[u0.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:u?u0.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:u0.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"})}):u0.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:u0.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"})})}),u0.jsxs("div",{className:"flex flex-col min-w-0",children:[u0.jsx("span",{className:"text-sm font-medium text-neutral-800 dark:text-neutral-200 truncate max-w-[180px]",children:m.name}),u0.jsxs("span",{className:"text-xs text-neutral-500 dark:text-neutral-400",children:[u?"PDF":"Document"," · ",q3(m.size)]})]})]},a)})})},E=()=>{if(q)return u0.jsx("div",{className:"apteva-message-text",children:Y.content});if(L&&!_)return u0.jsxs("div",{className:"apteva-typing-indicator",children:[u0.jsx("span",{}),u0.jsx("span",{}),u0.jsx("span",{})]});if(R&&R.length>0)return null;return F(Y.content)},D=(m,a)=>{if(!U)return u0.jsx("div",{className:"apteva-message-bubble apteva-message-assistant",children:u0.jsx("div",{className:"apteva-message-content-assistant",children:u0.jsx(o7,{content:m})})},a);let c=G3(m),u=[],Q0="";if(c.segments.forEach((o,t)=>{if(o.type==="text"&&o.content)Q0+=o.content;else if(o.type==="widget"&&o.widget){if(Q0.trim())u.push(u0.jsx("div",{className:"apteva-message-bubble apteva-message-assistant",children:u0.jsx("div",{className:"apteva-message-content-assistant",children:u0.jsx(o7,{content:Q0})})},`${a}-text-${t}`)),Q0="";u.push(u0.jsx("div",{className:"apteva-widget-standalone",children:u0.jsx(r9,{widget:o.widget,onAction:G})},`${a}-widget-${t}`))}else if(o.type==="widget_pending"&&o.pendingType){if(Q0.trim())u.push(u0.jsx("div",{className:"apteva-message-bubble apteva-message-assistant",children:u0.jsx("div",{className:"apteva-message-content-assistant",children:u0.jsx(o7,{content:Q0})})},`${a}-text-${t}`)),Q0="";u.push(u0.jsx("div",{className:"apteva-widget-standalone",children:u0.jsx(jW,{type:o.pendingType})},`${a}-pending-${t}`))}}),Q0.trim())u.push(u0.jsx("div",{className:"apteva-message-bubble apteva-message-assistant",children:u0.jsx("div",{className:"apteva-message-content-assistant",children:u0.jsx(o7,{content:Q0})})},`${a}-text-final`));return u},C=()=>{if(!R||R.length===0)return null;let m=[];return R.forEach((a,c)=>{if(a.type==="text"&&a.content){let u=D(a.content,`seg-${c}`);if(Array.isArray(u))m.push(...u);else m.push(u)}else if(a.type==="tool")m.push(u0.jsx("div",{className:"apteva-tool-call-standalone",children:u0.jsx($I,{name:a.name,status:a.status||(a.result!==void 0?"completed":"running"),isReceiving:a.isReceiving,inputLength:a.inputLength,streamOutput:a.streamOutput})},a.id))}),m};if(!q&&(R&&R.length>0))return u0.jsxs("div",{className:"apteva-message-segmented",children:[C(),Y.widgets&&Y.widgets.length>0&&u0.jsx("div",{className:"apteva-widget-standalone",children:u0.jsx(l9,{widgets:Y.widgets,onAction:G,layout:"stack"})}),u0.jsx("div",{className:"apteva-message-timestamp apteva-message-timestamp-assistant",suppressHydrationWarning:!0,children:Y.timestamp.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})})]});let V=N();if(!q&&U&&V)return u0.jsxs("div",{className:"apteva-message-segmented",children:[V,Y.widgets&&Y.widgets.length>0&&u0.jsx("div",{className:"apteva-widget-standalone",children:u0.jsx(l9,{widgets:Y.widgets,onAction:G,layout:"stack"})}),u0.jsx("div",{className:"apteva-message-timestamp apteva-message-timestamp-assistant",suppressHydrationWarning:!0,children:Y.timestamp.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})})]});if(q&&k)return u0.jsxs("div",{className:"apteva-message-segmented apteva-message-user-with-attachments flex flex-col items-end",children:[v(),Y.content&&u0.jsx("div",{className:"apteva-message-bubble apteva-message-user",children:u0.jsx("div",{className:"apteva-message-content-user",children:u0.jsx("div",{className:"apteva-message-text",children:Y.content})})}),u0.jsx("div",{className:"apteva-message-timestamp apteva-message-timestamp-user",suppressHydrationWarning:!0,children:Y.timestamp.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})})]});return u0.jsxs("div",{className:U4("apteva-message-bubble",q?"apteva-message-user":"apteva-message-assistant"),children:[u0.jsx("div",{className:q?"apteva-message-content-user":"apteva-message-content-assistant",children:E()}),Y.widgets&&Y.widgets.length>0&&u0.jsx("div",{className:"apteva-widget-standalone",children:u0.jsx(l9,{widgets:Y.widgets,onAction:G,layout:"stack"})}),u0.jsx("div",{className:U4("apteva-message-timestamp",q?"apteva-message-timestamp-user":"apteva-message-timestamp-assistant"),suppressHydrationWarning:!0,children:Y.timestamp.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})})]})}var pW=()=>R1.jsx("svg",{className:"w-12 h-12 sm:w-16 sm:h-16",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:R1.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"})}),i9=()=>R1.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:R1.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13 7l5 5m0 0l-5 5m5-5H6"})});function GI({title:Y,subtitle:G,icon:U,prompts:O,variant:q="centered",chatVariant:R="default",onPromptClick:L}){let _=(O||[]).map((F)=>typeof F==="string"?{text:F}:F),T=_.length>0,I=Y||G||U;if(!I&&!T)return R1.jsx("div",{className:"flex items-center justify-center h-full !text-neutral-500 dark:!text-neutral-400",children:R1.jsxs("div",{className:"text-center space-y-2",children:[R1.jsx("div",{className:"flex justify-center",children:R1.jsx(pW,{})}),R1.jsx("p",{className:"text-sm",children:"No messages yet. Start a conversation!"})]})});if(q==="minimal")return R1.jsxs("div",{className:"flex flex-col h-full px-4 py-4",children:[I&&R1.jsxs("div",{className:"mb-4",children:[Y&&R1.jsx("h2",{className:"text-lg font-semibold !text-neutral-900 dark:!text-white",children:Y}),G&&R1.jsx("p",{className:"text-sm !text-neutral-500 dark:!text-neutral-400 mt-1",children:G})]}),T&&R1.jsx("div",{className:"flex-1 space-y-2",children:_.map((F,N)=>R1.jsx("button",{onClick:()=>L(F.text),className:U4("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:R1.jsxs("div",{className:"flex items-center gap-3",children:[R1.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||R1.jsx(i9,{})}),R1.jsxs("div",{className:"flex-1 min-w-0",children:[R1.jsx("p",{className:"text-sm font-medium !text-neutral-900 dark:!text-white truncate",children:F.text}),F.description&&R1.jsx("p",{className:"text-xs !text-neutral-500 dark:!text-neutral-400 mt-0.5 truncate",children:F.description})]})]})},N))})]});return R1.jsxs("div",{className:"flex flex-col items-center justify-center h-full px-4 py-6 sm:py-8",children:[R1.jsxs("div",{className:"text-center mb-6 sm:mb-8 max-w-md",children:[R1.jsx("div",{className:"mb-4 !text-neutral-400 dark:!text-neutral-500 flex justify-center",children:U||R1.jsx(pW,{})}),Y&&R1.jsx("h1",{className:"text-xl sm:text-2xl font-semibold !text-neutral-900 dark:!text-white mb-2",children:Y}),G&&R1.jsx("p",{className:"text-sm sm:text-base !text-neutral-500 dark:!text-neutral-400",children:G})]}),T&&R1.jsxs("div",{className:"w-full max-w-2xl",children:[R1.jsx("div",{className:"sm:hidden space-y-2",children:_.map((F,N)=>R1.jsx("button",{onClick:()=>L(F.text),className:U4("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:R1.jsxs("div",{className:"flex items-center gap-3",children:[R1.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||R1.jsx(i9,{})}),R1.jsxs("div",{className:"flex-1 min-w-0",children:[R1.jsx("p",{className:"text-sm font-medium !text-neutral-900 dark:!text-white",children:F.text}),F.description&&R1.jsx("p",{className:"text-xs !text-neutral-500 dark:!text-neutral-400 mt-0.5 line-clamp-1",children:F.description})]}),R1.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:R1.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5l7 7-7 7"})})]})},N))}),R1.jsx("div",{className:"hidden sm:grid sm:grid-cols-2 gap-3",children:_.map((F,N)=>R1.jsx("button",{onClick:()=>L(F.text),className:U4("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:R1.jsxs("div",{className:"flex items-start gap-3",children:[R1.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||R1.jsx(i9,{})}),R1.jsxs("div",{className:"flex-1 min-w-0",children:[R1.jsx("p",{className:"text-sm font-medium !text-neutral-900 dark:!text-white leading-snug",children:F.text}),F.description&&R1.jsx("p",{className:"text-xs !text-neutral-500 dark:!text-neutral-400 mt-1 line-clamp-2",children:F.description})]})]})},N))})]})]})}function qI({messages:Y,onAction:G,welcomeTitle:U,welcomeSubtitle:O,welcomeIcon:q,suggestedPrompts:R,welcomeVariant:L,chatVariant:_,onPromptClick:T,enableWidgets:I,onWidgetRender:F}){let N=VQ.useRef(null),w=VQ.useRef(!0),k=VQ.useRef(0),v=()=>{if(N.current){let{scrollTop:E,scrollHeight:D,clientHeight:C}=N.current;w.current=D-E-C<100}};return VQ.useEffect(()=>{if(N.current&&w.current){let E=N.current.scrollHeight;if(E!==k.current)N.current.scrollTop=E,k.current=E}},[Y]),VZ.jsx("div",{ref:N,className:"apteva-message-list apteva-scrollbar-hidden",onScroll:v,children:Y.length===0?VZ.jsx(GI,{title:U,subtitle:O,icon:q,prompts:R,variant:L,chatVariant:_,onPromptClick:T||(()=>{})}):Y.map((E)=>VZ.jsx("div",{className:E.role==="user"?"apteva-message-row-user":"apteva-message-row-assistant",children:VZ.jsx(HI,{message:E,onAction:G,enableWidgets:I,onWidgetRender:F})},E.id))})}function BI({onSendMessage:Y,placeholder:G="Type a message...",disabled:U=!1,isLoading:O=!1,onStop:q,onFileUpload:R,onSwitchMode:L}){let[_,T]=b7.useState(""),[I,F]=b7.useState(!1),[N,w]=b7.useState([]),[k,v]=b7.useState(null),[E,D]=b7.useState(!1),C=b7.useRef(null),V=b7.useRef(null),m=b7.useRef(null),a=(l)=>{if(l.key==="Enter"&&!l.shiftKey)l.preventDefault(),c()},c=()=>{let l=_.trim(),p=N.length>0;if((l||p)&&!U){let i=N.map((Z0)=>Z0.file);if(Y(_.trim(),i.length>0?i:void 0),T(""),w([]),v(null),D(!1),C.current)C.current.style.height="auto"}},u=(l)=>{T(l.target.value),l.target.style.height="auto";let p=l.target.scrollHeight;l.target.style.height=`${p}px`;let i=l.target.value.includes(`
|
|
189
|
-
`),I0=p>36;if(!E&&(i||I0))D(!0);else if(E&&!i&&!I0&&l.target.value.length<20)D(!1)},Q0=(l)=>{if(l.target.files&&l.target.files.length>0){let p=Array.from(l.target.files),i=[],Z0=[];if(p.forEach((I0)=>{let F0=cW(I0);if(F0.valid){let Q1={file:I0};if(I0.type.startsWith("image/"))Q1.preview=URL.createObjectURL(I0);i.push(Q1)}else Z0.push(F0.error||"Invalid file")}),i.length>0)w((I0)=>[...I0,...i]);if(Z0.length>0)v(Z0.join(", ")),setTimeout(()=>v(null),5000);R?.(l.target.files),F(!1),l.target.value=""}},o=(l)=>{w((p)=>{let i=p[l];if(i.preview)URL.revokeObjectURL(i.preview);return p.filter((Z0,I0)=>I0!==l)})},t=(l)=>{if(l.startsWith("image/"))return U1.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:U1.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(l==="application/pdf")return U1.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:U1.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 U1.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:U1.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 U1.jsxs("div",{className:"px-4 py-3 relative",children:[k&&U1.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:U1.jsxs("div",{className:"flex items-center gap-2 !text-red-700 dark:!text-red-300 text-sm",children:[U1.jsx("svg",{className:"w-4 h-4 flex-shrink-0",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:U1.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})}),U1.jsx("span",{children:k})]})}),N.length>0&&U1.jsx("div",{className:"mb-2 flex flex-wrap gap-2",children:N.map((l,p)=>U1.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:[l.preview?U1.jsx("img",{src:l.preview,alt:l.file.name,className:"w-8 h-8 object-cover rounded"}):U1.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:t(l.file.type)}),U1.jsxs("div",{className:"flex flex-col min-w-0",children:[U1.jsx("span",{className:"text-xs font-medium !text-neutral-700 dark:!text-neutral-300 truncate max-w-[120px]",children:l.file.name}),U1.jsx("span",{className:"text-xs !text-neutral-500 dark:!text-neutral-400",children:q3(l.file.size)})]}),U1.jsx("button",{onClick:()=>o(p),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:U1.jsx("svg",{className:"w-3 h-3",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:U1.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]},p))}),U1.jsxs("div",{className:"apteva-composer",style:{gridTemplateColumns:"auto 1fr auto",gridTemplateAreas:E?'"textarea textarea textarea" "plus . send"':'"plus textarea send"',alignItems:"end"},children:[U1.jsxs("div",{className:"relative flex-shrink-0 self-end",style:{gridArea:"plus"},children:[U1.jsx("button",{ref:m,onClick:()=>F(!I),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:U1.jsx("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:U1.jsx("path",{d:"M10 5v10M5 10h10",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}),I&&U1.jsxs(U1.Fragment,{children:[U1.jsx("div",{className:"fixed inset-0 z-[9998]",onClick:()=>F(!1)}),U1.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:m.current?.getBoundingClientRect().left??0,bottom:window.innerHeight-(m.current?.getBoundingClientRect().top??0)+8},children:[U1.jsxs("button",{onClick:()=>{V.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:[U1.jsx("svg",{width:"18",height:"18",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:U1.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)"})}),U1.jsx("span",{className:"!text-sm font-medium",children:"Add photos & files"})]}),L&&U1.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:[U1.jsx("svg",{className:"w-4.5 h-4.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:U1.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13 10V3L4 14h7v7l9-11h-7z"})}),U1.jsx("span",{className:"!text-sm font-medium",children:"Switch to command mode"})]})]})]})]}),U1.jsx("textarea",{ref:C,value:_,onChange:u,onKeyDown:a,placeholder:G,disabled:U,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}),U1.jsx("div",{className:"self-end",style:{gridArea:"send"},children:O&&q?U1.jsx("button",{onClick:q,className:"apteva-composer-stop-btn",title:"Stop generation",children:U1.jsx("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:U1.jsx("rect",{x:"2",y:"2",width:"10",height:"10",rx:"1",fill:"currentColor"})})}):U1.jsx("button",{onClick:c,disabled:!_.trim()&&N.length===0||U,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:U1.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:U1.jsx("path",{d:"M8 3L8 13M8 3L4 7M8 3L12 7",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})})})]}),U1.jsx("input",{ref:V,type:"file",multiple:!0,onChange:Q0,className:"hidden",accept:"image/*,application/pdf,.doc,.docx,.txt"})]})}function UI({onExecute:Y,state:G,response:U,error:O,plan:q,streamedContent:R,toolName:L,onApprove:_,onReject:T,onReset:I,onStop:F,onExpand:N,placeholder:w="Enter your command...",disabled:k=!1}){let[v,E]=a7.useState(""),[D,C]=a7.useState([]),[V,m]=a7.useState(null),[a,c]=a7.useState(!1),u=a7.useRef(null),Q0=a7.useRef(null),o=a7.useRef(null),t=()=>{let _0=v.trim(),J0=D.length>0;if((_0||J0)&&!k&&G==="idle"){let d=D.map((P0)=>P0.file);Y(v.trim(),d.length>0?d:void 0),E(""),C([])}},l=(_0)=>{if(_0.key==="Enter"&&!_0.shiftKey)_0.preventDefault(),t()},p=()=>{I?.(),u.current?.focus()},i=(_0)=>{if(E(_0),u.current)u.current.style.height="auto",u.current.style.height=`${Math.min(u.current.scrollHeight,120)}px`},Z0=(_0)=>{if(_0.target.files&&_0.target.files.length>0){let J0=Array.from(_0.target.files),d=[],P0=[];if(J0.forEach((v0)=>{let X1=cW(v0);if(X1.valid){let r0={file:v0};if(v0.type.startsWith("image/"))r0.preview=URL.createObjectURL(v0);d.push(r0)}else P0.push(X1.error||"Invalid file")}),d.length>0)C((v0)=>[...v0,...d]);if(P0.length>0)m(P0.join(", ")),setTimeout(()=>m(null),5000);c(!1),_0.target.value=""}},I0=(_0)=>{C((J0)=>{let d=J0[_0];if(d.preview)URL.revokeObjectURL(d.preview);return J0.filter((P0,v0)=>v0!==_0)})},F0=(_0)=>{if(_0.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(_0==="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"})})},Q1=()=>{if(G==="loading"){if(L)return{text:L,isToolCall:!0};if(R)return{text:R,isToolCall:!1};return{text:"Processing...",isToolCall:!1}}if(G==="success"&&U)return{text:U,isToolCall:!1};if(G==="error"&&O)return{text:O,isToolCall:!1};if(G==="plan-pending"&&q)return{text:q,isToolCall:!1};return{text:"",isToolCall:!1}},W1=G!=="idle",{text:X0,isToolCall:U0}=Q1();return l0.jsxs("div",{className:"w-full relative",children:[V&&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:V})]})}),l0.jsxs("div",{className:U4("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:o,onClick:()=>c(!a),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"})})}),a&&l0.jsxs(l0.Fragment,{children:[l0.jsx("div",{className:"fixed inset-0 z-[9998]",onClick:()=>c(!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:o.current?.getBoundingClientRect().left??0,top:(o.current?.getBoundingClientRect().bottom??0)+8},children:[l0.jsxs("button",{onClick:()=>{Q0.current?.click(),c(!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"})]}),N&&l0.jsxs("button",{onClick:()=>{N(),c(!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"})]}),D.length>0&&G==="idle"&&l0.jsx("div",{className:"flex items-center gap-1 flex-shrink-0",children:D.map((_0,J0)=>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:_0.file.name,children:[_0.preview?l0.jsx("img",{src:_0.preview,alt:_0.file.name,className:"w-6 h-6 object-cover"}):l0.jsx("span",{className:"text-xs !text-neutral-500 dark:!text-neutral-400",children:F0(_0.file.type)}),l0.jsx("button",{onClick:()=>I0(J0),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"})})})]},J0))}),G==="idle"?l0.jsx("textarea",{ref:u,value:v,onChange:(_0)=>i(_0.target.value),onKeyDown:l,placeholder:D.length>0?"Add a message...":w,disabled:k,rows:1,className:U4("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:U4("flex-1 text-sm py-1 truncate flex items-center gap-2",G==="loading"&&!U0&&"!text-neutral-600 dark:!text-neutral-400",G==="loading"&&U0&&"!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:U0?l0.jsxs(l0.Fragment,{children:[l0.jsx("span",{className:"font-mono",children:X0}),l0.jsx("span",{className:"text-neutral-400 dark:text-neutral-500",children:"Running..."})]}):X0}),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:_,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:p,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:t,disabled:!v.trim()&&D.length===0||k,className:U4("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",v.trim()||D.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:Q0,type:"file",multiple:!0,onChange:Z0,className:"hidden",accept:"image/*,application/pdf,.doc,.docx,.txt"})]})}var KI="http://91.99.200.48:3000/agents",WI="agt_894abd5966bc9f1e9f8f17f2a6f6b5e0",OI=class{constructor(){SA(this,"config"),this.config={apiUrl:KI,apiKey:WI}}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 U=await G.json();return{message:U.response||U.message||"",thread_id:U.thread_id,widgets:U.widgets}}catch(G){throw console.error("Chat API error:",G),G}}async chatStream(Y,G,U,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 q=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(!q.ok){let I=await q.json().catch(()=>({error:"Request failed"}));throw Error(I.error||`Request failed with status ${q.status}`)}let R=q.body?.getReader();if(!R)throw Error("Response body is not readable");let L=new TextDecoder,_="",T="";while(!0){let{done:I,value:F}=await R.read();if(I)break;_+=L.decode(F,{stream:!0});let N=_.split(`
|
|
190
|
-
`);_=N.pop()||"";for(let w of N){if(!w.trim()||w.startsWith(":"))continue;if(w.startsWith("data: ")){let k=w.slice(6);if(k==="[DONE]"){U?.(T);return}try{let v=JSON.parse(k);if(v.thread_id)T=v.thread_id;G(v)}catch(v){console.warn("[AptevaClient] Failed to parse SSE data:",k)}}}}U?.(T)}catch(q){let R=q instanceof Error?q:Error("Unknown error");throw O?.(R),R}}async createThread(Y,G){let U=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(!U.ok){let q=await U.json().catch(()=>({error:"Request failed"}));throw Error(q.error||`Request failed with status ${U.status}`)}return(await U.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 U=await fetch(`${this.config.apiUrl}/agents/${Y}/requests/${G}/cancel`,{method:"POST",headers:{"Content-Type":"application/json","X-API-Key":this.config.apiKey}});if(!U.ok){let O=await U.json().catch(()=>({error:"Cancel request failed"}));throw Error(O.error||`Cancel request failed with status ${U.status}`)}}catch(U){throw console.error("[AptevaClient] Cancel request error:",U),U}}},yQ=new OI,B3=t1.forwardRef(function({agentId:G,threadId:U,initialMessages:O=[],context:q,apiUrl:R,apiKey:L,useMock:_=!1,initialMode:T="chat",showModeToggle:I=!1,onModeChange:F,commandVariant:N="default",planMode:w=!1,onPlanModeChange:k,enableStreaming:v=!0,showProgress:E=!0,loadingText:D="Processing...",welcomeTitle:C,welcomeSubtitle:V,welcomeIcon:m,suggestedPrompts:a,welcomeVariant:c,onThreadChange:u,onMessageSent:Q0,onAction:o,onFileUpload:t,onComplete:l,onError:p,onToolCall:i,onToolResult:Z0,variant:I0="default",placeholder:F0,showHeader:Q1=!0,headerTitle:W1="Chat",enableWidgets:X0=!1,availableWidgets:U0,compactWidgetContext:_0=!1,onWidgetRender:J0,className:d},P0){let[v0,X1]=t1.useState(O),[r0,V0]=t1.useState(!1),[H1,L0]=t1.useState(U||null),[a0,f1]=t1.useState(T),[q4,h4]=t1.useState(null),[x1,K1]=t1.useState("idle"),[r4,o4]=t1.useState(null),[k4,y4]=t1.useState(null),[D6,O4]=t1.useState(0),[F5,L4]=t1.useState(""),[M5,M4]=t1.useState(""),[T4,O5]=t1.useState(null),[E5,j4]=t1.useState(null),[t4,T0]=t1.useState(""),[t0,Y1]=t1.useState(""),[j1,s1]=t1.useState(w),[V4,H4]=t1.useState(!1),a4=t1.useRef(null),F1=t1.useRef(null);t1.useImperativeHandle(P0,()=>({sendMessage:async(V1)=>{if(F1.current)await F1.current(V1)},sendSystemMessage:async(V1)=>{if(F1.current)await F1.current(V1,void 0,!0)},getMessages:()=>v0,clearMessages:()=>X1([])}),[v0]);let N1=t1.useMemo(()=>{if(!X0)return q;let V1=_0?lA(U0):dA(U0);return q?`${q}
|
|
191
|
-
${V1}`:V1},[q,X0,U0,_0]);t1.useEffect(()=>{if(R||L)yQ.configure({...R&&{apiUrl:R},...L&&{apiKey:L}})},[R,L]),t1.useEffect(()=>{if(U)u?.(U)},[U,u]),t1.useEffect(()=>{s1(w)},[w]),t1.useEffect(()=>{let V1=(e1)=>{let B4=e1.target;if(V4&&!B4.closest(".settings-menu-container"))H4(!1)};return document.addEventListener("mousedown",V1),()=>document.removeEventListener("mousedown",V1)},[V4]);let d5=(V1)=>{if(f1(V1),F?.(V1),V1==="command")K1("idle"),o4(null),y4(null)},L5=a0==="chat"?"Type a message...":"Enter your command...",l5=async(V1,e1,B4)=>{let d1=e1&&e1.length>0,f=d1?e1.map((H0)=>({name:H0.name,type:H0.type,size:H0.size,preview:H0.type.startsWith("image/")?URL.createObjectURL(H0):void 0})):[];if(!B4){let H0={id:`msg-${Date.now()}`,role:"user",content:V1,timestamp:new Date,metadata:d1?{attachments:f}:void 0};X1((R0)=>[...R0,H0]),Q0?.(H0)}V0(!0);try{let H0=await gW(V1,e1);if(_){let R0=await fA(1000);X1((A)=>[...A,R0])}else{let R0=[],A="",j=[],W0=H1,M0={},S0={},i0=`msg-${Date.now()}`,g0=()=>{let O0=[...R0];if(A){let k0=O0[O0.length-1];if(k0&&k0.type==="text")k0.content=A;else O0.push({type:"text",content:A})}X1((k0)=>{let n0=k0[k0.length-1];if(n0&&n0.role==="assistant")return[...k0.slice(0,-1),{...n0,content:A,widgets:j.length>0?j:void 0,metadata:{...n0.metadata,content_segments:O0,isStreaming:!0}}];else return[...k0,{id:i0,role:"assistant",content:A,widgets:j.length>0?j:void 0,timestamp:new Date,metadata:{content_segments:O0,isStreaming:!0}}]})};await yQ.chatStream({agent_id:G,message:H0,stream:!0,...H1&&{thread_id:H1},...N1&&{system:N1}},(O0)=>{switch(O0.type){case"thread_id":if(O0.thread_id){if(W0=O0.thread_id,!H1)L0(O0.thread_id),u?.(O0.thread_id)}break;case"request_id":if(O0.request_id)j4(O0.request_id);break;case"content":case"token":if(O0.content)A+=O0.content,g0();break;case"tool_call":if(O0.tool_id&&O0.tool_name){let k0=O0.tool_display_name||O0.tool_name;if(A)R0.push({type:"text",content:A}),A="";R0.push({type:"tool",id:O0.tool_id,name:k0,status:"preparing"}),M0[O0.tool_id]="",h4(k0),i?.(O0.tool_name,O0.tool_id),g0()}break;case"tool_input_delta":if(O0.tool_id&&O0.content){let k0=O0.tool_id;if(M0[k0]===void 0)M0[k0]="";M0[k0]+=O0.content;let n0=R0.find((D1)=>D1.type==="tool"&&D1.id===k0);if(n0){if(n0.isReceiving=!0,n0.inputLength=M0[k0].length,g0(),S0[k0])clearTimeout(S0[k0]);S0[k0]=setTimeout(()=>{if(n0.status==="preparing")n0.isReceiving=!1,g0()},150)}}break;case"tool_use":if(O0.tool_id){let k0=R0.find((n0)=>n0.type==="tool"&&n0.id===O0.tool_id);if(k0&&k0.status==="preparing")k0.status="running",k0.isReceiving=!1,g0()}break;case"tool_stream":if(O0.tool_id){let k0=R0.find((n0)=>n0.type==="tool"&&n0.id===O0.tool_id);if(k0){if(O0.event==="chunk"&&O0.content){if(k0.pendingReset)k0.streamOutput="",k0.pendingReset=!1;k0.streamOutput=(k0.streamOutput||"")+O0.content,g0()}else if(O0.event==="log"||O0.event==="progress")k0.pendingReset=!0}}break;case"tool_result":if(O0.tool_id){let k0=R0.find((n0)=>n0.type==="tool"&&n0.id===O0.tool_id);if(k0)k0.result=O0.content,k0.status="completed",k0.isReceiving=!1,Z0?.(k0.name,O0.content);h4(null),g0()}break;case"widget":if(O0.widget)j.push(O0.widget),g0();break;case"error":throw Error(O0.message||"Stream error")}},(O0)=>{if(A){let k0=R0[R0.length-1];if(k0&&k0.type==="text")k0.content=A;else R0.push({type:"text",content:A})}if(X1((k0)=>{let n0=k0[k0.length-1];if(n0&&n0.role==="assistant")return[...k0.slice(0,-1),{...n0,content:A||"Response received",widgets:j.length>0?j:void 0,metadata:{thread_id:O0,content_segments:R0,isStreaming:!1}}];return k0}),O0&&O0!==H1)L0(O0),u?.(O0);V0(!1),j4(null),h4(null)},(O0)=>{let k0={id:`msg-${Date.now()}-error`,role:"assistant",content:`Error: ${O0.message}`,timestamp:new Date,metadata:{error:!0}};X1((n0)=>{let D1=n0[n0.length-1];if(D1&&D1.id.includes("streaming"))return[...n0.slice(0,-1),k0];return[...n0,k0]}),V0(!1),j4(null),h4(null),p?.(O0)})}}catch(H0){let R0={id:`msg-${Date.now()}-error`,role:"assistant",content:H0 instanceof Error?`Error: ${H0.message}`:"An error occurred",timestamp:new Date,metadata:{error:!0}};X1((A)=>[...A,R0]),p?.(H0 instanceof Error?H0:Error("Unknown error"))}finally{V0(!1)}};F1.current=l5;let Q7=async(V1,e1)=>{let B4=V1||F5;if(!B4.trim()&&(!e1||e1.length===0)){y4(Error("Please enter a command")),K1("error");return}if(j1&&x1!=="plan-pending"){if(K1("loading"),y4(null),L4(""),_)setTimeout(()=>{let d1=`1. Analyze the request: "${B4}"
|
|
192
|
-
2. Process the data
|
|
193
|
-
3. Generate response
|
|
194
|
-
4. Return results`;T0(d1),Y1(B4),K1("plan-pending")},800);else try{let f=N1?`${N1}
|
|
195
|
-
|
|
196
|
-
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.",H0=await yQ.chat({agent_id:G,message:B4,stream:!1,system:f});T0(H0.message),Y1(B4),K1("plan-pending")}catch(d1){let f=d1 instanceof Error?d1:Error("Failed to generate plan");y4(f),K1("error"),p?.(f)}return}K1("loading"),y4(null),O4(0),M4(""),L4("");try{if(_)if(v){let d1="";VA(B4,(f)=>{if(f.type==="token"&&f.content){d1+=f.content,M4(d1);let H0=Math.min(Math.round(d1.length/10),90);O4(H0)}},(f)=>{let H0={success:!0,data:{summary:d1,thread_id:f},message:d1||"Command executed successfully"};o4(H0),K1("success"),O4(100),l?.(H0)},(f)=>{y4(f),K1("error"),p?.(f)})}else{await new Promise((f)=>setTimeout(f,1500));let d1={success:!0,data:{summary:`Executed: ${B4}`},message:"Command executed successfully"};o4(d1),K1("success"),O4(100),l?.(d1)}else{let f=N1?`${N1}
|
|
197
|
-
|
|
198
|
-
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.`,H0=e1&&e1.length>0?await gW(B4,e1):B4;if(v){let R0="",A="";await yQ.chatStream({agent_id:G,message:H0,stream:!0,...H1&&{thread_id:H1},system:f},(j)=>{if((j.type==="token"||j.type==="content")&&j.content){R0+=j.content,M4(R0),O5(null);let W0=Math.min(Math.round(R0.length/10),90);O4(W0)}else if(j.type==="tool_call"&&j.tool_name){let W0=j.tool_display_name||j.tool_name;A=j.tool_name,O5(W0),i?.(j.tool_name,j.tool_id||""),R0="",M4("")}else if(j.type==="tool_result")Z0?.(A,j.content),O5(null);else if(j.type==="thread_id"&&j.thread_id){if(!H1)L0(j.thread_id),u?.(j.thread_id)}else if(j.type==="request_id"&&j.request_id)j4(j.request_id)},(j)=>{let W0={success:!0,data:{summary:R0,thread_id:j},message:R0||"Command executed successfully"};o4(W0),K1("success"),O4(100),j4(null),l?.(W0)},(j)=>{y4(j),K1("error"),j4(null),p?.(j)})}else{let R0=await yQ.chat({agent_id:G,message:H0,stream:!1,...H1&&{thread_id:H1},system:f}),A={success:!0,data:{summary:R0.message,thread_id:R0.thread_id},widgets:R0.widgets,message:R0.message};o4(A),K1("success"),O4(100),l?.(A)}}}catch(d1){let f=d1 instanceof Error?d1:Error("Unknown error");y4(f),K1("error"),p?.(f)}},E6=()=>{K1("idle"),o4(null),y4(null),O4(0),L4(""),T0(""),Y1(""),M4(""),O5(null)},X7=()=>{let V1=t4;T0(""),Y1("");let e1=`Execute this plan now:
|
|
199
|
-
|
|
200
|
-
${V1}`;Q7(e1)},F6=()=>{L4(t0),T0(""),Y1(""),K1("idle")},m5=async()=>{if(E5&&G)try{await yQ.cancelRequest(G,E5)}catch(V1){console.error("Failed to cancel request:",V1)}if(V0(!1),x1==="loading")K1("idle"),M4(""),O5(null),O4(0);j4(null)},m6=N==="compact";return z6.jsxs("div",{className:U4("apteva-chat flex flex-col h-full",I0!=="default"&&`apteva-chat-${I0}`,d),children:[Q1&&a0==="chat"&&z6.jsx("div",{className:"apteva-chat-header px-4 py-3 flex items-center justify-between",children:z6.jsxs("div",{children:[z6.jsx("div",{className:"apteva-chat-title",children:W1}),z6.jsx("div",{className:U4("apteva-chat-status",r0?q4?"apteva-chat-status-tool":"apteva-chat-status-thinking":"apteva-chat-status-ready"),children:r0?q4?`Using ${q4}...`:"Thinking...":"Ready"})]})}),a0==="chat"&&z6.jsxs(z6.Fragment,{children:[z6.jsx(qI,{messages:v0,onAction:o,welcomeTitle:C,welcomeSubtitle:V,welcomeIcon:m,suggestedPrompts:a,welcomeVariant:c,chatVariant:I0,onPromptClick:(V1)=>l5(V1),enableWidgets:X0,onWidgetRender:J0}),z6.jsx(BI,{onSendMessage:l5,placeholder:F0||L5,disabled:r0,isLoading:r0,onStop:m5,onFileUpload:t,onSwitchMode:I?()=>d5("command"):void 0})]}),a0==="command"&&z6.jsx("div",{className:"w-full",children:z6.jsx(UI,{onExecute:(V1,e1)=>{L4(V1),Q7(V1,e1)},state:x1,response:r4?.data?.summary||r4?.message,error:k4?.message,plan:t4,streamedContent:M5,toolName:T4,onApprove:X7,onReject:F6,onReset:E6,onStop:m5,onExpand:I?()=>d5("chat"):void 0,placeholder:F0||"Enter your command..."})}),z6.jsx("style",{dangerouslySetInnerHTML:{__html:`
|
|
201
|
-
@keyframes pulse-border {
|
|
202
|
-
0%, 100% { border-color: rgb(59, 130, 246); }
|
|
203
|
-
50% { border-color: rgb(147, 197, 253); }
|
|
204
|
-
}
|
|
205
|
-
.animate-pulse-border {
|
|
206
|
-
animation: pulse-border 2s ease-in-out infinite;
|
|
207
|
-
}
|
|
208
|
-
.apteva-composer {
|
|
209
|
-
border-radius: var(--apteva-border-radius, 1rem) !important;
|
|
210
|
-
}
|
|
211
|
-
`}})]})});var G4=q0(J1(),1),XO=z7.createContext(null);function ZO(){return z7.useContext(XO)}function JO({children:Y}){let{authFetch:G,isAuthenticated:U,isLoading:O}=P1(),[q,R]=z7.useState(null),[L,_]=z7.useState(!1),[T,I]=z7.useState(!1),[F,N]=z7.useState(null),w=async()=>{try{let m=await(await G("/api/meta-agent/status")).json();R(m)}catch(V){console.error("[MetaAgent] Failed to fetch status:",V)}};z7.useEffect(()=>{if(!O&&U)w()},[G,U,O]);let k=async()=>{I(!0),N(null);try{let V=await G("/api/meta-agent/start",{method:"POST"}),m=await V.json();if(!V.ok)N(m.error||"Failed to start assistant");else await w()}catch(V){N("Failed to start assistant")}I(!1)},v=!!(q?.enabled&&q?.available),E=q?.agent,D=!!(E?.status==="running"&&E?.port),C={status:q,isOpen:L,isStarting:T,error:F,isAvailable:v,isRunning:D,agent:E,toggle:()=>_(!L),close:()=>_(!1),startAgent:k};return G4.jsxDEV(XO.Provider,{value:C,children:Y},void 0,!1,void 0,this)}function YO(){let Y=ZO();if(!Y?.isAvailable)return null;return G4.jsxDEV("button",{onClick:Y.toggle,className:`hidden md:flex items-center gap-2 px-3 py-2 rounded transition ${Y.isOpen?"bg-[#f97316] text-white":"bg-[#151515] hover:bg-[#1a1a1a] text-[#888] hover:text-white"}`,title:"Apteva Assistant",children:[G4.jsxDEV(HO,{className:"w-5 h-5"},void 0,!1,void 0,this),G4.jsxDEV("span",{className:"text-sm",children:"Assistant"},void 0,!1,void 0,this),Y.isRunning&&G4.jsxDEV("span",{className:"w-2 h-2 rounded-full bg-green-400"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}function $O(){let Y=ZO();if(!Y?.isAvailable||!Y.isOpen)return null;let{agent:G,isRunning:U,error:O,isStarting:q,startAgent:R,close:L}=Y;return G4.jsxDEV(G4.Fragment,{children:[G4.jsxDEV("div",{className:"hidden md:block fixed inset-0 bg-black/20 z-40",onClick:L},void 0,!1,void 0,this),G4.jsxDEV("div",{className:"hidden md:flex fixed top-0 right-0 h-full w-[480px] lg:w-[540px] bg-[#0a0a0a] border-l border-[#1a1a1a] shadow-2xl z-50 flex-col",children:[G4.jsxDEV("div",{className:"flex items-center justify-between px-4 py-3 border-b border-[#1a1a1a] bg-[#111]",children:[G4.jsxDEV("div",{className:"flex items-center gap-2",children:[G4.jsxDEV("div",{className:`w-2 h-2 rounded-full ${U?"bg-green-400":"bg-[#444]"}`},void 0,!1,void 0,this),G4.jsxDEV("span",{className:"font-medium text-sm",children:"Apteva Assistant"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),G4.jsxDEV("button",{onClick:L,className:"text-[#666] hover:text-[#888] transition",children:G4.jsxDEV(NI,{},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this),G4.jsxDEV("div",{className:"flex-1 min-h-0 flex flex-col",children:U?G4.jsxDEV(B3,{agentId:"default",apiUrl:`/api/agents/${G.id}`,placeholder:"Ask me anything about Apteva...",variant:"terminal",showHeader:!1},void 0,!1,void 0,this):G4.jsxDEV("div",{className:"flex-1 flex flex-col items-center justify-center p-6 text-center",children:[G4.jsxDEV(HO,{className:"w-12 h-12 text-[#333] mb-4"},void 0,!1,void 0,this),G4.jsxDEV("h3",{className:"font-medium mb-2",children:"Apteva Assistant"},void 0,!1,void 0,this),G4.jsxDEV("p",{className:"text-sm text-[#666] mb-6",children:"I can help you navigate Apteva, create agents, set up MCP servers, and more."},void 0,!1,void 0,this),O&&G4.jsxDEV("p",{className:"text-sm text-red-400 mb-4",children:O},void 0,!1,void 0,this),G4.jsxDEV("button",{onClick:R,disabled:q,className:"bg-[#f97316] hover:bg-[#fb923c] disabled:opacity-50 text-white px-6 py-2 rounded font-medium transition",children:q?"Starting...":"Start Assistant"},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,!0,void 0,this)}function HO({className:Y="w-6 h-6"}){return G4.jsxDEV("svg",{className:Y,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:G4.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8 10h.01M12 10h.01M16 10h.01M9 16H5a2 2 0 01-2-2V6a2 2 0 012-2h14a2 2 0 012 2v8a2 2 0 01-2 2h-5l-5 5v-5z"},void 0,!1,void 0,this)},void 0,!1,void 0,this)}function NI(){return G4.jsxDEV("svg",{className:"w-6 h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:G4.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)}var S1=q0(J1(),1);function U3({onMenuClick:Y}){let{connected:G}=kQ(),{user:U,logout:O}=P1(),{projects:q,currentProjectId:R,currentProject:L,setCurrentProjectId:_,unassignedCount:T,projectsEnabled:I}=g4(),[F,N]=z2.useState(!1),[w,k]=z2.useState(!1),v=async()=>{await O(),N(!1)},E=(V)=>{_(V),k(!1)},D=()=>{if(R===null)return"All Projects";if(R==="unassigned")return"Unassigned";return L?.name||"Select Project"},C=()=>{if(R===null)return"#666";if(R==="unassigned")return"#888";return L?.color||"#6366f1"};return S1.jsxDEV("header",{className:"border-b border-[#1a1a1a] px-4 md:px-6 py-4 flex-shrink-0",children:S1.jsxDEV("div",{className:"flex items-center justify-between",children:[S1.jsxDEV("div",{className:"flex items-center gap-3",children:[S1.jsxDEV("button",{onClick:Y,className:"p-2 -ml-2 text-[#666] hover:text-[#e0e0e0] transition md:hidden",children:S1.jsxDEV(TW,{},void 0,!1,void 0,this)},void 0,!1,void 0,this),S1.jsxDEV("div",{className:"flex items-center gap-2",children:[S1.jsxDEV("span",{className:"text-[#f97316]",children:">_"},void 0,!1,void 0,this),S1.jsxDEV("span",{className:"text-xl tracking-wider",children:"apteva"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),I&&q.length>0&&S1.jsxDEV("div",{className:"relative ml-2 md:ml-4",children:[S1.jsxDEV("button",{onClick:()=>k(!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:[S1.jsxDEV("span",{className:"w-2.5 h-2.5 rounded-full",style:{backgroundColor:C()}},void 0,!1,void 0,this),S1.jsxDEV("span",{className:"hidden sm:inline max-w-[120px] md:max-w-[180px] truncate",children:D()},void 0,!1,void 0,this),S1.jsxDEV(CW,{},void 0,!1,void 0,this)]},void 0,!0,void 0,this),w&&S1.jsxDEV("div",{className:"absolute left-0 top-full mt-1 w-56 bg-[#111] border border-[#222] rounded-lg shadow-xl z-50",children:S1.jsxDEV("div",{className:"py-1 max-h-64 overflow-y-auto",children:[S1.jsxDEV("button",{onClick:()=>E(null),className:`w-full px-4 py-2 text-left text-sm flex items-center gap-2 hover:bg-[#1a1a1a] transition ${R===null?"bg-[#1a1a1a] text-[#f97316]":""}`,children:[S1.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),q.map((V)=>S1.jsxDEV("button",{onClick:()=>E(V.id),className:`w-full px-4 py-2 text-left text-sm flex items-center gap-2 hover:bg-[#1a1a1a] transition ${R===V.id?"bg-[#1a1a1a] text-[#f97316]":""}`,children:[S1.jsxDEV("span",{className:"w-2.5 h-2.5 rounded-full flex-shrink-0",style:{backgroundColor:V.color}},void 0,!1,void 0,this),S1.jsxDEV("span",{className:"truncate",children:V.name},void 0,!1,void 0,this),S1.jsxDEV("span",{className:"ml-auto text-xs text-[#666]",children:V.agentCount},void 0,!1,void 0,this)]},V.id,!0,void 0,this)),T>0&&S1.jsxDEV("button",{onClick:()=>E("unassigned"),className:`w-full px-4 py-2 text-left text-sm flex items-center gap-2 hover:bg-[#1a1a1a] transition ${R==="unassigned"?"bg-[#1a1a1a] text-[#f97316]":""}`,children:[S1.jsxDEV("span",{className:"w-2.5 h-2.5 rounded-full bg-[#888]"},void 0,!1,void 0,this),S1.jsxDEV("span",{className:"truncate",children:"Unassigned"},void 0,!1,void 0,this),S1.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),S1.jsxDEV("div",{className:"flex items-center gap-3 md:gap-4",children:[S1.jsxDEV("div",{className:"flex items-center gap-2",children:[S1.jsxDEV("span",{className:`w-2 h-2 rounded-full ${G?"bg-green-400":"bg-red-400"}`},void 0,!1,void 0,this),S1.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),S1.jsxDEV(YO,{},void 0,!1,void 0,this),U&&S1.jsxDEV("div",{className:"relative",children:[S1.jsxDEV("button",{onClick:()=>N(!F),className:"flex items-center gap-2 px-2 md:px-3 py-2 rounded hover:bg-[#1a1a1a] transition",children:[S1.jsxDEV("div",{className:"w-8 h-8 rounded-full bg-[#f97316] flex items-center justify-center text-black font-medium text-sm",children:U.username.charAt(0).toUpperCase()},void 0,!1,void 0,this),S1.jsxDEV("span",{className:"text-sm text-[#888] hidden sm:block",children:U.username},void 0,!1,void 0,this)]},void 0,!0,void 0,this),F&&S1.jsxDEV("div",{className:"absolute right-0 top-full mt-1 w-48 bg-[#111] border border-[#222] rounded-lg shadow-xl z-50",children:[S1.jsxDEV("div",{className:"px-4 py-3 border-b border-[#222]",children:[S1.jsxDEV("p",{className:"text-sm font-medium",children:U.username},void 0,!1,void 0,this),S1.jsxDEV("p",{className:"text-xs text-[#f97316] mt-1",children:U.role},void 0,!1,void 0,this)]},void 0,!0,void 0,this),S1.jsxDEV("button",{onClick:v,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 Q4=q0(J1(),1);function K3({route:Y,agentCount:G,taskCount:U,onNavigate:O,isOpen:q,onClose:R}){let L=(_)=>{O(_),R?.()};return Q4.jsxDEV(Q4.Fragment,{children:[q&&Q4.jsxDEV("div",{className:"fixed inset-0 bg-black/60 z-40 md:hidden",onClick:R},void 0,!1,void 0,this),Q4.jsxDEV("aside",{className:`
|
|
212
|
-
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
|
|
213
|
-
md:relative md:w-56 md:translate-x-0 md:z-auto
|
|
214
|
-
${q?"translate-x-0":"-translate-x-full"}
|
|
215
|
-
`,children:[Q4.jsxDEV("div",{className:"flex items-center justify-between mb-4 md:hidden",children:[Q4.jsxDEV("div",{className:"flex items-center gap-2",children:[Q4.jsxDEV("span",{className:"text-[#f97316]",children:">_"},void 0,!1,void 0,this),Q4.jsxDEV("span",{className:"text-lg tracking-wider",children:"apteva"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),Q4.jsxDEV("button",{onClick:R,className:"p-2 text-[#666] hover:text-[#e0e0e0] transition",children:Q4.jsxDEV(N7,{},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this),Q4.jsxDEV("nav",{className:"space-y-1",children:[Q4.jsxDEV(v8,{icon:Q4.jsxDEV(Y3,{},void 0,!1,void 0,this),label:"Dashboard",active:Y==="dashboard",onClick:()=>L("dashboard")},void 0,!1,void 0,this),Q4.jsxDEV(v8,{icon:Q4.jsxDEV($3,{},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),Q4.jsxDEV(v8,{icon:Q4.jsxDEV(f6,{},void 0,!1,void 0,this),label:"Tasks",active:Y==="tasks",onClick:()=>L("tasks"),badge:U&&U>0?String(U):void 0},void 0,!1,void 0,this),Q4.jsxDEV(v8,{icon:Q4.jsxDEV(h6,{},void 0,!1,void 0,this),label:"MCP",active:Y==="mcp",onClick:()=>L("mcp")},void 0,!1,void 0,this),Q4.jsxDEV(v8,{icon:Q4.jsxDEV(fZ,{},void 0,!1,void 0,this),label:"Skills",active:Y==="skills",onClick:()=>L("skills")},void 0,!1,void 0,this),Q4.jsxDEV(v8,{icon:Q4.jsxDEV(j9,{},void 0,!1,void 0,this),label:"Telemetry",active:Y==="telemetry",onClick:()=>L("telemetry")},void 0,!1,void 0,this),Q4.jsxDEV(v8,{icon:Q4.jsxDEV(kW,{},void 0,!1,void 0,this),label:"API",active:Y==="api",onClick:()=>L("api")},void 0,!1,void 0,this),Q4.jsxDEV(v8,{icon:Q4.jsxDEV(H3,{},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 v8({icon:Y,label:G,active:U,onClick:O,badge:q}){return Q4.jsxDEV("button",{onClick:O,className:`w-full flex items-center gap-3 px-3 py-2 rounded font-medium transition ${U?"bg-[#111] text-[#e0e0e0]":"text-[#666] hover:bg-[#111] hover:text-[#888]"}`,children:[Y,G,q&&Q4.jsxDEV("span",{className:"ml-auto bg-[#333] text-[#888] text-xs px-2 py-0.5 rounded-full",children:q},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}var EZ=q0(J1(),1);function W3({message:Y,onDismiss:G}){return EZ.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:[EZ.jsxDEV("span",{children:Y},void 0,!1,void 0,this),EZ.jsxDEV("button",{onClick:G,className:"hover:text-red-300",children:EZ.jsxDEV(N7,{className:"w-4 h-4"},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}var mZ=q0(k1(),1);var X5=q0(J1(),1);function O3(){let{login:Y}=P1(),[G,U]=mZ.useState(""),[O,q]=mZ.useState(""),[R,L]=mZ.useState(null),[_,T]=mZ.useState(!1);return X5.jsxDEV("div",{className:"min-h-screen bg-[#0a0a0a] text-[#e0e0e0] font-mono flex items-center justify-center p-8",children:X5.jsxDEV("div",{className:"w-full max-w-md",children:[X5.jsxDEV("div",{className:"text-center mb-8",children:[X5.jsxDEV("div",{className:"flex items-center justify-center gap-2 mb-2",children:[X5.jsxDEV("span",{className:"text-[#f97316] text-3xl",children:">_"},void 0,!1,void 0,this),X5.jsxDEV("span",{className:"text-3xl tracking-wider",children:"apteva"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),X5.jsxDEV("p",{className:"text-[#666]",children:"Run AI agents locally"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),X5.jsxDEV("div",{className:"bg-[#111] rounded-lg border border-[#1a1a1a] p-8",children:[X5.jsxDEV("h2",{className:"text-2xl font-semibold mb-2",children:"Welcome back"},void 0,!1,void 0,this),X5.jsxDEV("p",{className:"text-[#666] mb-6",children:"Sign in to continue to apteva"},void 0,!1,void 0,this),X5.jsxDEV("form",{onSubmit:async(F)=>{F.preventDefault(),L(null),T(!0);let N=await Y(G,O);if(!N.success)L(N.error||"Login failed");T(!1)},className:"space-y-4",children:[X5.jsxDEV("div",{children:[X5.jsxDEV("label",{htmlFor:"username",className:"block text-sm text-[#888] mb-1",children:"Username"},void 0,!1,void 0,this),X5.jsxDEV("input",{id:"username",type:"text",value:G,onChange:(F)=>U(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),X5.jsxDEV("div",{children:[X5.jsxDEV("label",{htmlFor:"password",className:"block text-sm text-[#888] mb-1",children:"Password"},void 0,!1,void 0,this),X5.jsxDEV("input",{id:"password",type:"password",value:O,onChange:(F)=>q(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),R&&X5.jsxDEV("div",{className:"p-3 bg-red-500/10 border border-red-500/30 rounded text-red-400 text-sm",children:R},void 0,!1,void 0,this),X5.jsxDEV("button",{type:"submit",disabled:_||!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:_?"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 S8=q0(k1(),1),w4=q0(J1(),1);function L3({onComplete:Y}){let[G,U]=S8.useState(""),[O,q]=S8.useState(""),[R,L]=S8.useState(""),[_,T]=S8.useState(""),[I,F]=S8.useState(!1),[N,w]=S8.useState(null),[k,v]=S8.useState(!1);return w4.jsxDEV(w4.Fragment,{children:[w4.jsxDEV("h2",{className:"text-2xl font-semibold mb-2",children:"Create your account"},void 0,!1,void 0,this),w4.jsxDEV("p",{className:"text-[#666] mb-6",children:"Set up your admin account to get started with apteva."},void 0,!1,void 0,this),w4.jsxDEV("form",{onSubmit:async(D)=>{if(D.preventDefault(),w(null),O!==R){w("Passwords do not match");return}v(!0);try{let C=await fetch("/api/onboarding/user",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({username:G,password:O,..._&&{email:_}})}),V=await C.json();if(!C.ok){w(V.error||"Failed to create account"),v(!1);return}let m=await fetch("/api/auth/login",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({username:G,password:O})});if(!m.ok){w("Account created but login failed. Please try logging in."),v(!1);return}let a=await m.json();if(a.accessToken)sessionStorage.setItem("accessToken",a.accessToken);Y({username:G})}catch(C){w("Failed to create account"),v(!1)}},className:"space-y-4",children:[w4.jsxDEV("div",{children:[w4.jsxDEV("label",{htmlFor:"username",className:"block text-sm text-[#888] mb-1",children:"Username"},void 0,!1,void 0,this),w4.jsxDEV("input",{id:"username",type:"text",value:G,onChange:(D)=>U(D.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),w4.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),w4.jsxDEV("div",{children:[w4.jsxDEV("label",{htmlFor:"password",className:"block text-sm text-[#888] mb-1",children:"Password"},void 0,!1,void 0,this),w4.jsxDEV("input",{id:"password",type:"password",value:O,onChange:(D)=>q(D.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),w4.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),w4.jsxDEV("div",{children:[w4.jsxDEV("label",{htmlFor:"confirmPassword",className:"block text-sm text-[#888] mb-1",children:"Confirm Password"},void 0,!1,void 0,this),w4.jsxDEV("input",{id:"confirmPassword",type:"password",value:R,onChange:(D)=>L(D.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),!I?w4.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):w4.jsxDEV("div",{children:[w4.jsxDEV("label",{htmlFor:"email",className:"block text-sm text-[#888] mb-1",children:["Email ",w4.jsxDEV("span",{className:"text-[#666]",children:"(optional)"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),w4.jsxDEV("input",{id:"email",type:"email",value:_,onChange:(D)=>T(D.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),w4.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),N&&w4.jsxDEV("div",{className:"p-3 bg-red-500/10 border border-red-500/30 rounded text-red-400 text-sm",children:N},void 0,!1,void 0,this),w4.jsxDEV("button",{type:"submit",disabled:k||!G||!O||!R,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:k?"Creating account...":"Create Account"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),w4.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 y6=q0(k1(),1);var c0=q0(J1(),1);function uZ({onComplete:Y,needsAccount:G=!1}){let[U,O]=y6.useState(G?0:1),[q,R]=y6.useState([]),[L,_]=y6.useState(null),[T,I]=y6.useState(""),[F,N]=y6.useState(!1),[w,k]=y6.useState(!1),[v,E]=y6.useState(null),[D,C]=y6.useState(null),[V,m]=y6.useState(!1),a=()=>{let p=sessionStorage.getItem("accessToken");return p?{Authorization:`Bearer ${p}`}:{}};y6.useEffect(()=>{if(G&&!V&&U===0)return;fetch("/api/providers",{headers:a()}).then((p)=>p.json()).then((p)=>{let i=(p.providers||[]).filter((Z0)=>Z0.type==="llm");R(i)})},[V,U,G]);let c=q.filter((p)=>p.hasKey),u=async()=>{if(!L||!T)return;N(!0),E(null),C(null);try{k(!0);let i=await(await fetch(`/api/keys/${L}/test`,{method:"POST",headers:{"Content-Type":"application/json",...a()},body:JSON.stringify({key:T})})).json();if(k(!1),!i.valid){E(i.error||"API key is invalid"),N(!1);return}let Z0=await fetch(`/api/keys/${L}`,{method:"POST",headers:{"Content-Type":"application/json",...a()},body:JSON.stringify({key:T})}),I0=await Z0.json();if(!Z0.ok)E(I0.error||"Failed to save key");else{C("API key saved successfully!"),I("");let Q1=await(await fetch("/api/providers",{headers:a()})).json();R(Q1.providers||[]),_(null)}}catch(p){E("Failed to save key")}N(!1)},Q0=async()=>{try{let p=await fetch("/api/projects",{method:"POST",headers:{"Content-Type":"application/json",...a()},body:JSON.stringify({name:"My Project",description:"Default project for organizing agents",color:"#f97316"})});if(p.ok){let i=await p.json();if(i.project?.id)localStorage.setItem("apteva_current_project",i.project.id)}}catch(p){console.error("Failed to create default project:",p)}await fetch("/api/onboarding/complete",{method:"POST",headers:a()}),Y()},o=()=>{m(!0),O(1)},t=G?3:2,l=G?U:U-1;return c0.jsxDEV("div",{className:"min-h-screen bg-[#0a0a0a] text-[#e0e0e0] font-mono flex items-center justify-center p-8",children:c0.jsxDEV("div",{className:"w-full max-w-2xl",children:[c0.jsxDEV("div",{className:"text-center mb-8",children:[c0.jsxDEV("div",{className:"flex items-center justify-center gap-2 mb-2",children:[c0.jsxDEV("span",{className:"text-[#f97316] text-3xl",children:">_"},void 0,!1,void 0,this),c0.jsxDEV("span",{className:"text-3xl tracking-wider",children:"apteva"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),c0.jsxDEV("p",{className:"text-[#666]",children:"Run AI agents locally"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),c0.jsxDEV("div",{className:"flex items-center justify-center gap-2 mb-8",children:[G&&c0.jsxDEV(c0.Fragment,{children:[c0.jsxDEV("div",{className:`w-3 h-3 rounded-full ${U>=0?"bg-[#f97316]":"bg-[#333]"}`},void 0,!1,void 0,this),c0.jsxDEV("div",{className:`w-16 h-0.5 ${U>=1?"bg-[#f97316]":"bg-[#333]"}`},void 0,!1,void 0,this)]},void 0,!0,void 0,this),c0.jsxDEV("div",{className:`w-3 h-3 rounded-full ${U>=1?"bg-[#f97316]":"bg-[#333]"}`},void 0,!1,void 0,this),c0.jsxDEV("div",{className:`w-16 h-0.5 ${U>=2?"bg-[#f97316]":"bg-[#333]"}`},void 0,!1,void 0,this),c0.jsxDEV("div",{className:`w-3 h-3 rounded-full ${U>=2?"bg-[#f97316]":"bg-[#333]"}`},void 0,!1,void 0,this)]},void 0,!0,void 0,this),c0.jsxDEV("div",{className:"bg-[#111] rounded-lg border border-[#1a1a1a] p-8",children:[U===0&&G&&c0.jsxDEV(L3,{onComplete:o},void 0,!1,void 0,this),U===1&&c0.jsxDEV(bI,{providers:q,configuredProviders:c,selectedProvider:L,apiKey:T,saving:F,testing:w,error:v,success:D,onSelectProvider:_,onApiKeyChange:I,onSaveKey:u,onContinue:()=>O(2)},void 0,!1,void 0,this),U===2&&c0.jsxDEV(FI,{configuredProviders:c,onAddMore:()=>O(1),onComplete:Q0},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 bI({providers:Y,configuredProviders:G,selectedProvider:U,apiKey:O,saving:q,testing:R,error:L,success:_,onSelectProvider:T,onApiKeyChange:I,onSaveKey:F,onContinue:N}){let w=Y.find((k)=>k.id===U);if(U&&w)return c0.jsxDEV(c0.Fragment,{children:[c0.jsxDEV("h2",{className:"text-2xl font-semibold mb-2",children:["Add ",w.name," Key"]},void 0,!0,void 0,this),c0.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),c0.jsxDEV("div",{className:"mb-6",children:[c0.jsxDEV("div",{className:"p-4 rounded border border-[#f97316] bg-[#f97316]/5 mb-4",children:c0.jsxDEV("div",{className:"flex items-center justify-between",children:[c0.jsxDEV("div",{children:[c0.jsxDEV("p",{className:"font-medium",children:w.name},void 0,!1,void 0,this),c0.jsxDEV("p",{className:"text-sm text-[#666]",children:[w.models.length," models available"]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),c0.jsxDEV("a",{href:w.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),c0.jsxDEV("div",{className:"space-y-3",children:[c0.jsxDEV("input",{type:"password",value:O,onChange:(k)=>I(k.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&&c0.jsxDEV("p",{className:"text-red-400 text-sm",children:L},void 0,!1,void 0,this),_&&c0.jsxDEV("p",{className:"text-green-400 text-sm",children:_},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),c0.jsxDEV("div",{className:"flex gap-3",children:[c0.jsxDEV("button",{onClick:()=>{T(null),I("")},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),c0.jsxDEV("button",{onClick:F,disabled:!O||q,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:R?"Testing...":q?"Saving...":"Save API Key"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this);return c0.jsxDEV(c0.Fragment,{children:[c0.jsxDEV("h2",{className:"text-2xl font-semibold mb-2",children:"Welcome to apteva"},void 0,!1,void 0,this),c0.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),c0.jsxDEV("div",{className:"space-y-3 mb-6",children:Y.map((k)=>c0.jsxDEV(wI,{provider:k,selected:!1,onSelect:()=>!k.hasKey&&T(k.id)},k.id,!1,void 0,this))},void 0,!1,void 0,this),c0.jsxDEV("button",{onClick:N,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 wI({provider:Y,selected:G,onSelect:U}){return c0.jsxDEV("div",{onClick:U,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:c0.jsxDEV("div",{className:"flex items-center justify-between",children:[c0.jsxDEV("div",{children:[c0.jsxDEV("p",{className:"font-medium",children:Y.name},void 0,!1,void 0,this),c0.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?c0.jsxDEV("span",{className:"text-green-400 text-sm flex items-center gap-1",children:[c0.jsxDEV(G6,{},void 0,!1,void 0,this),"Configured (",Y.keyHint,")"]},void 0,!0,void 0,this):c0.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 FI({configuredProviders:Y,onAddMore:G,onComplete:U}){return c0.jsxDEV(c0.Fragment,{children:[c0.jsxDEV("h2",{className:"text-2xl font-semibold mb-2",children:"You're all set!"},void 0,!1,void 0,this),c0.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),c0.jsxDEV("div",{className:"space-y-2 mb-6",children:Y.map((O)=>c0.jsxDEV("div",{className:"flex items-center gap-3 p-3 bg-[#0a0a0a] rounded",children:[c0.jsxDEV(G6,{className:"w-5 h-5 text-green-400"},void 0,!1,void 0,this),c0.jsxDEV("span",{children:O.name},void 0,!1,void 0,this),c0.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),c0.jsxDEV("div",{className:"flex gap-3",children:[c0.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),c0.jsxDEV("button",{onClick:U,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 E1=q0(k1(),1);var h=q0(J1(),1);function _3(){let{projectsEnabled:Y}=g4(),[G,U]=E1.useState("providers"),O=[{key:"providers",label:"Providers"},...Y?[{key:"projects",label:"Projects"}]:[],{key:"account",label:"Account"},{key:"updates",label:"Updates"},{key:"data",label:"Data"}];return h.jsxDEV("div",{className:"flex-1 flex flex-col md:flex-row overflow-hidden",children:[h.jsxDEV("div",{className:"md:hidden border-b border-[#1a1a1a] bg-[#0a0a0a]",children:h.jsxDEV("div",{className:"flex overflow-x-auto",style:{scrollbarWidth:"none",msOverflowStyle:"none"},children:O.map((q)=>h.jsxDEV("button",{onClick:()=>U(q.key),className:`flex-shrink-0 px-4 py-3 text-sm font-medium border-b-2 transition ${G===q.key?"border-[#f97316] text-[#f97316]":"border-transparent text-[#666] hover:text-[#888]"}`,children:q.label},q.key,!1,void 0,this))},void 0,!1,void 0,this)},void 0,!1,void 0,this),h.jsxDEV("div",{className:"hidden md:block w-48 border-r border-[#1a1a1a] p-4 flex-shrink-0",children:[h.jsxDEV("h2",{className:"text-sm font-medium text-[#666] uppercase tracking-wider mb-3",children:"Settings"},void 0,!1,void 0,this),h.jsxDEV("nav",{className:"space-y-1",children:O.map((q)=>h.jsxDEV(MI,{label:q.label,active:G===q.key,onClick:()=>U(q.key)},q.key,!1,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this),h.jsxDEV("div",{className:"flex-1 overflow-auto p-4 md:p-6",children:[G==="providers"&&h.jsxDEV(PI,{},void 0,!1,void 0,this),G==="projects"&&Y&&h.jsxDEV(AI,{},void 0,!1,void 0,this),G==="account"&&h.jsxDEV(vI,{},void 0,!1,void 0,this),G==="updates"&&h.jsxDEV(kI,{},void 0,!1,void 0,this),G==="data"&&h.jsxDEV(SI,{},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}function MI({label:Y,active:G,onClick:U}){return h.jsxDEV("button",{onClick:U,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 PI(){let{authFetch:Y}=P1(),[G,U]=E1.useState([]),[O,q]=E1.useState(null),[R,L]=E1.useState(""),[_,T]=E1.useState(!1),[I,F]=E1.useState(!1),[N,w]=E1.useState(null),[k,v]=E1.useState(null),{confirm:E,ConfirmDialog:D}=S6(),C=async()=>{let t=await(await Y("/api/providers")).json();U(t.providers||[])};E1.useEffect(()=>{C()},[]);let V=async()=>{if(!O||!R)return;T(!0),w(null),v(null);try{F(!0);let t=await(await Y(`/api/keys/${O}/test`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({key:R})})).json();if(F(!1),!t.valid){w(t.error||"API key is invalid"),T(!1);return}let l=await Y(`/api/keys/${O}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({key:R})}),p=await l.json();if(!l.ok)w(p.error||"Failed to save key");else{let i="API key saved!";if(p.restartedAgents&&p.restartedAgents.length>0){let Z0=p.restartedAgents.filter((F0)=>F0.success).length;if(p.restartedAgents.length-Z0===0)i+=` Restarted ${Z0} agent${Z0>1?"s":""} with new key.`;else i+=` Restarted ${Z0}/${p.restartedAgents.length} agents.`}v(i),L(""),q(null),C()}}catch(o){w("Failed to save key")}T(!1)},m=async(o)=>{if(!await E("Are you sure you want to remove this API key?",{confirmText:"Remove",title:"Remove API Key"}))return;await Y(`/api/keys/${o}`,{method:"DELETE"}),C()},a=G.filter((o)=>o.type==="llm"),c=G.filter((o)=>o.type==="integration"),u=a.filter((o)=>o.hasKey).length,Q0=c.filter((o)=>o.hasKey).length;return E1.useEffect(()=>{if(k&&!O){let o=setTimeout(()=>v(null),5000);return()=>clearTimeout(o)}},[k,O]),h.jsxDEV(h.Fragment,{children:[D,h.jsxDEV("div",{className:"space-y-10",children:[k&&!O&&h.jsxDEV("div",{className:"bg-green-500/10 border border-green-500/30 rounded-lg p-4 flex items-center justify-between",children:[h.jsxDEV("div",{className:"flex items-center gap-2 text-green-400",children:[h.jsxDEV(G6,{className:"w-5 h-5"},void 0,!1,void 0,this),h.jsxDEV("span",{children:k},void 0,!1,void 0,this)]},void 0,!0,void 0,this),h.jsxDEV("button",{onClick:()=>v(null),className:"text-green-400 hover:text-green-300",children:h.jsxDEV(N7,{className:"w-4 h-4"},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this),h.jsxDEV("div",{children:[h.jsxDEV("div",{className:"mb-6",children:[h.jsxDEV("h1",{className:"text-2xl font-semibold mb-1",children:"AI Providers"},void 0,!1,void 0,this),h.jsxDEV("p",{className:"text-[#666]",children:["Manage your API keys for AI providers. ",u," of ",a.length," configured."]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),h.jsxDEV("div",{className:"grid gap-4 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4",children:a.map((o)=>h.jsxDEV(TI,{provider:o,isEditing:O===o.id,apiKey:R,saving:_,testing:I,error:O===o.id?N:null,success:O===o.id?k:null,onStartEdit:()=>{q(o.id),w(null),v(null)},onCancelEdit:()=>{q(null),L(""),w(null)},onApiKeyChange:L,onSave:V,onDelete:()=>m(o.id)},o.id,!1,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this),h.jsxDEV("div",{children:[h.jsxDEV("div",{className:"mb-6",children:[h.jsxDEV("h2",{className:"text-xl font-semibold mb-1",children:"MCP Integrations"},void 0,!1,void 0,this),h.jsxDEV("p",{className:"text-[#666]",children:["Connect to MCP gateways for tool integrations. ",Q0," of ",c.length," configured."]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),h.jsxDEV("div",{className:"grid gap-4 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4",children:c.map((o)=>h.jsxDEV(CI,{provider:o,isEditing:O===o.id,apiKey:R,saving:_,testing:I,error:O===o.id?N:null,success:O===o.id?k:null,onStartEdit:()=>{q(o.id),w(null),v(null)},onCancelEdit:()=>{q(null),L(""),w(null)},onApiKeyChange:L,onSave:V,onDelete:()=>m(o.id)},o.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 Q2=["#f97316","#6366f1","#22c55e","#ef4444","#3b82f6","#a855f7","#14b8a6","#f59e0b"];function AI(){let{projects:Y,createProject:G,updateProject:U,deleteProject:O}=g4(),[q,R]=E1.useState(!1),[L,_]=E1.useState(null),{confirm:T,ConfirmDialog:I}=S6(),F=async(v)=>{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(v)},N=()=>{_(null),R(!0)},w=(v)=>{_(v),R(!0)},k=()=>{R(!1),_(null)};return h.jsxDEV(h.Fragment,{children:[I,h.jsxDEV("div",{className:"max-w-4xl w-full",children:[h.jsxDEV("div",{className:"mb-6 flex items-center justify-between gap-4",children:[h.jsxDEV("div",{children:[h.jsxDEV("h1",{className:"text-2xl font-semibold mb-1",children:"Projects"},void 0,!1,void 0,this),h.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),h.jsxDEV("button",{onClick:N,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:[h.jsxDEV(vW,{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?h.jsxDEV("div",{className:"text-center py-12 text-[#666]",children:[h.jsxDEV("p",{className:"text-lg mb-2",children:"No projects yet"},void 0,!1,void 0,this),h.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):h.jsxDEV("div",{className:"space-y-3",children:Y.map((v)=>h.jsxDEV("div",{className:"bg-[#111] border border-[#1a1a1a] rounded-lg p-4 flex items-center gap-4",children:[h.jsxDEV("div",{className:"w-4 h-4 rounded-full flex-shrink-0",style:{backgroundColor:v.color}},void 0,!1,void 0,this),h.jsxDEV("div",{className:"flex-1 min-w-0",children:[h.jsxDEV("h3",{className:"font-medium",children:v.name},void 0,!1,void 0,this),v.description&&h.jsxDEV("p",{className:"text-sm text-[#666] truncate",children:v.description},void 0,!1,void 0,this),h.jsxDEV("p",{className:"text-xs text-[#666] mt-1",children:[v.agentCount," agent",v.agentCount!==1?"s":""]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),h.jsxDEV("div",{className:"flex items-center gap-2",children:[h.jsxDEV("button",{onClick:()=>w(v),className:"text-sm text-[#888] hover:text-[#e0e0e0] px-2 py-1",children:"Edit"},void 0,!1,void 0,this),h.jsxDEV("button",{onClick:()=>F(v.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)]},v.id,!0,void 0,this))},void 0,!1,void 0,this),q&&h.jsxDEV(II,{project:L,onSave:async(v)=>{if(L){let E=await U(L.id,v);if(E)k();return!!E}else{let E=await G(v);if(E)k();return!!E}},onClose:k},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}function II({project:Y,onSave:G,onClose:U}){let[O,q]=E1.useState(Y?.name||""),[R,L]=E1.useState(Y?.description||""),[_,T]=E1.useState(Y?.color||Q2[Math.floor(Math.random()*Q2.length)]),[I,F]=E1.useState(!1),[N,w]=E1.useState(null),k=async()=>{if(!O.trim()){w("Name is required");return}F(!0),w(null);let v=await G({name:O,description:R||void 0,color:_});if(F(!1),!v)w(Y?"Failed to update project":"Failed to create project")};return h.jsxDEV(TQ,{onClose:U,children:[h.jsxDEV("h2",{className:"text-xl font-semibold mb-6",children:Y?"Edit Project":"Create New Project"},void 0,!1,void 0,this),h.jsxDEV("div",{className:"space-y-4",children:[h.jsxDEV("div",{children:[h.jsxDEV("label",{className:"block text-sm text-[#666] mb-1",children:"Name"},void 0,!1,void 0,this),h.jsxDEV("input",{type:"text",value:O,onChange:(v)=>q(v.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),h.jsxDEV("div",{children:[h.jsxDEV("label",{className:"block text-sm text-[#666] mb-1",children:"Description (optional)"},void 0,!1,void 0,this),h.jsxDEV("input",{type:"text",value:R,onChange:(v)=>L(v.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),h.jsxDEV("div",{children:[h.jsxDEV("label",{className:"block text-sm text-[#666] mb-1",children:"Color"},void 0,!1,void 0,this),h.jsxDEV("div",{className:"flex gap-3 flex-wrap",children:Q2.map((v)=>h.jsxDEV("button",{type:"button",onClick:()=>T(v),className:`w-10 h-10 rounded-full transition ${_===v?"ring-2 ring-white ring-offset-2 ring-offset-[#111]":"hover:scale-110"}`,style:{backgroundColor:v}},v,!1,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this),N&&h.jsxDEV("p",{className:"text-red-400 text-sm",children:N},void 0,!1,void 0,this)]},void 0,!0,void 0,this),h.jsxDEV("div",{className:"flex gap-3 mt-6",children:[h.jsxDEV("button",{onClick:U,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),h.jsxDEV("button",{onClick:k,disabled:I||!O.trim(),className:"flex-1 bg-[#f97316] hover:bg-[#fb923c] disabled:opacity-50 text-black px-4 py-2 rounded font-medium transition",children:I?"Saving...":Y?"Update":"Create"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}function kI(){let{authFetch:Y}=P1(),[G,U]=E1.useState(null),[O,q]=E1.useState(!1),[R,L]=E1.useState(!1),[_,T]=E1.useState(null),[I,F]=E1.useState(null),[N,w]=E1.useState(null),k=async()=>{q(!0),T(null);try{let C=await Y("/api/version");if(!C.ok)throw Error("Failed to check for updates");let V=await C.json();U(V)}catch(C){T("Failed to check for updates")}q(!1)},v=async()=>{L(!0),T(null),F(null);try{let V=await(await Y("/api/version/update",{method:"POST"})).json();if(!V.success)T(V.error||"Update failed");else{let m=V.restarted?.length||0,a=m>0?` ${m} running agent${m>1?"s":""} restarted.`:"";F(`Agent binary updated to v${V.version}.${a}`),await k()}}catch(C){T("Failed to update agent")}L(!1)};E1.useEffect(()=>{k()},[]);let E=(C,V)=>{navigator.clipboard.writeText(C),w(V),setTimeout(()=>w(null),2000)},D=G?.apteva.updateAvailable||G?.agent.updateAvailable;return h.jsxDEV("div",{className:"max-w-4xl w-full",children:[h.jsxDEV("div",{className:"mb-6",children:[h.jsxDEV("h1",{className:"text-2xl font-semibold mb-1",children:"Updates"},void 0,!1,void 0,this),h.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?h.jsxDEV("div",{className:"text-[#666]",children:"Checking version info..."},void 0,!1,void 0,this):_&&!G?h.jsxDEV("div",{className:"text-red-400",children:_},void 0,!1,void 0,this):G?.isDocker?h.jsxDEV("div",{className:"space-y-6",children:[h.jsxDEV("div",{className:"bg-blue-500/10 border border-blue-500/30 rounded-lg p-4",children:[h.jsxDEV("div",{className:"flex items-center gap-2 text-blue-400 mb-2",children:[h.jsxDEV("svg",{className:"w-5 h-5",fill:"currentColor",viewBox:"0 0 24 24",children:h.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),h.jsxDEV("span",{className:"font-medium",children:"Docker Environment"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),h.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),h.jsxDEV("div",{className:"bg-[#111] border border-[#1a1a1a] rounded-lg p-5",children:[h.jsxDEV("div",{className:"flex items-center justify-between mb-4",children:[h.jsxDEV("div",{children:[h.jsxDEV("h3",{className:"font-medium text-lg",children:"Current Version"},void 0,!1,void 0,this),h.jsxDEV("p",{className:"text-sm text-[#666]",children:"apteva + agent binary"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),h.jsxDEV("div",{className:"text-right",children:h.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),D?h.jsxDEV("div",{className:"bg-[#f97316]/10 border border-[#f97316]/30 rounded-lg p-4",children:[h.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),h.jsxDEV("div",{className:"space-y-2",children:[h.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),h.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),h.jsxDEV("button",{onClick:()=>{navigator.clipboard.writeText("docker pull apteva/apteva:latest && docker compose up -d"),w("docker"),setTimeout(()=>w(null),2000)},className:"mt-3 px-3 py-1.5 bg-[#1a1a1a] hover:bg-[#222] rounded text-sm",children:N==="docker"?"Copied!":"Copy commands"},void 0,!1,void 0,this)]},void 0,!0,void 0,this):h.jsxDEV("div",{className:"flex items-center gap-2 text-green-400 text-sm",children:[h.jsxDEV(G6,{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),h.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?h.jsxDEV("div",{className:"space-y-6",children:[I&&h.jsxDEV("div",{className:"bg-green-500/10 border border-green-500/30 rounded-lg p-4 text-green-400",children:I},void 0,!1,void 0,this),_&&h.jsxDEV("div",{className:"bg-red-500/10 border border-red-500/30 rounded-lg p-4 text-red-400",children:_},void 0,!1,void 0,this),h.jsxDEV("div",{className:"bg-[#111] border border-[#1a1a1a] rounded-lg p-5",children:[h.jsxDEV("div",{className:"flex items-center justify-between mb-4",children:[h.jsxDEV("div",{children:[h.jsxDEV("h3",{className:"font-medium text-lg",children:"apteva"},void 0,!1,void 0,this),h.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),h.jsxDEV("div",{className:"text-right",children:[h.jsxDEV("div",{className:"text-xl font-mono",children:["v",G.apteva.installed||"?"]},void 0,!0,void 0,this),G.apteva.updateAvailable&&h.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?h.jsxDEV("div",{className:"bg-[#f97316]/10 border border-[#f97316]/30 rounded-lg p-4",children:[h.jsxDEV("p",{className:"text-sm text-[#888] mb-3",children:"Update by running:"},void 0,!1,void 0,this),h.jsxDEV("div",{className:"flex items-center gap-2",children:[h.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),h.jsxDEV("button",{onClick:()=>E("npx apteva@latest","apteva"),className:"px-3 py-2 bg-[#1a1a1a] hover:bg-[#222] rounded text-sm",children:N==="apteva"?"Copied!":"Copy"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this):h.jsxDEV("div",{className:"flex items-center gap-2 text-green-400 text-sm",children:[h.jsxDEV(G6,{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),h.jsxDEV("div",{className:"bg-[#111] border border-[#1a1a1a] rounded-lg p-5",children:[h.jsxDEV("div",{className:"flex items-center justify-between mb-4",children:[h.jsxDEV("div",{children:[h.jsxDEV("h3",{className:"font-medium text-lg",children:"Agent Binary"},void 0,!1,void 0,this),h.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),h.jsxDEV("div",{className:"text-right",children:[h.jsxDEV("div",{className:"text-xl font-mono",children:["v",G.agent.installed||"?"]},void 0,!0,void 0,this),G.agent.updateAvailable&&h.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?h.jsxDEV("div",{className:"bg-[#f97316]/10 border border-[#f97316]/30 rounded-lg p-4",children:[h.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),h.jsxDEV("div",{className:"flex items-center gap-2",children:h.jsxDEV("button",{onClick:v,disabled:R,className:"px-4 py-2 bg-[#f97316] text-black rounded font-medium text-sm disabled:opacity-50",children:R?"Updating...":"Update Agent"},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this):h.jsxDEV("div",{className:"flex items-center gap-2 text-green-400 text-sm",children:[h.jsxDEV(G6,{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),!D&&!I&&h.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:[h.jsxDEV(G6,{className:"w-5 h-5"},void 0,!1,void 0,this),"Everything is up to date!"]},void 0,!0,void 0,this),h.jsxDEV("button",{onClick:k,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 TI({provider:Y,isEditing:G,apiKey:U,saving:O,testing:q,error:R,success:L,onStartEdit:_,onCancelEdit:T,onApiKeyChange:I,onSave:F,onDelete:N}){let w=Y.id==="ollama",[k,v]=E1.default.useState(null);return E1.default.useEffect(()=>{if(w&&Y.hasKey)fetch("/api/providers/ollama/status").then((E)=>E.json()).then((E)=>v({connected:E.connected,modelCount:E.modelCount})).catch(()=>v({connected:!1}))},[w,Y.hasKey]),h.jsxDEV("div",{className:`bg-[#111] border rounded-lg p-4 ${Y.hasKey?"border-green-500/20":"border-[#1a1a1a]"}`,children:[h.jsxDEV("div",{className:"flex items-start justify-between gap-2 mb-2",children:[h.jsxDEV("div",{className:"min-w-0",children:[h.jsxDEV("h3",{className:"font-medium",children:Y.name},void 0,!1,void 0,this),h.jsxDEV("p",{className:"text-sm text-[#666] truncate",children:Y.type==="integration"?Y.description||"MCP integration":w?"Run models locally":`${Y.models.length} models`},void 0,!1,void 0,this)]},void 0,!0,void 0,this),Y.hasKey?h.jsxDEV("span",{className:`text-xs flex items-center gap-1 px-2 py-1 rounded whitespace-nowrap flex-shrink-0 ${w&&k?k.connected?"text-green-400 bg-green-500/10":"text-yellow-400 bg-yellow-500/10":"text-green-400 bg-green-500/10"}`,children:w&&k?k.connected?h.jsxDEV(h.Fragment,{children:[h.jsxDEV(G6,{className:"w-3 h-3"},void 0,!1,void 0,this),k.modelCount," models"]},void 0,!0,void 0,this):h.jsxDEV(h.Fragment,{children:"Not running"},void 0,!1,void 0,this):h.jsxDEV(h.Fragment,{children:[h.jsxDEV(G6,{className:"w-3 h-3"},void 0,!1,void 0,this),Y.keyHint]},void 0,!0,void 0,this)},void 0,!1,void 0,this):h.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),h.jsxDEV("div",{className:"mt-3 pt-3 border-t border-[#1a1a1a]",children:G?h.jsxDEV("div",{className:"space-y-3",children:[h.jsxDEV("input",{type:w?"text":"password",value:U,onChange:(E)=>I(E.target.value),placeholder:w?"http://localhost:11434":Y.hasKey?"Enter new API key...":"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&&h.jsxDEV("p",{className:"text-xs text-[#666]",children:"Enter your Ollama server URL. Default is http://localhost:11434"},void 0,!1,void 0,this),R&&h.jsxDEV("p",{className:"text-red-400 text-sm",children:R},void 0,!1,void 0,this),L&&h.jsxDEV("p",{className:"text-green-400 text-sm",children:L},void 0,!1,void 0,this),h.jsxDEV("div",{className:"flex gap-2",children:[h.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),h.jsxDEV("button",{onClick:F,disabled:!U||O,className:"flex-1 px-3 py-1.5 bg-[#f97316] text-black rounded text-sm font-medium disabled:opacity-50",children:q?"Validating...":O?"Saving...":w?"Connect":"Save"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this):Y.hasKey?h.jsxDEV("div",{className:"flex items-center justify-between",children:[h.jsxDEV("a",{href:Y.docsUrl,target:"_blank",rel:"noopener noreferrer",className:"text-sm text-[#3b82f6] hover:underline",children:w?"Download Ollama":"View docs"},void 0,!1,void 0,this),h.jsxDEV("div",{className:"flex items-center gap-3",children:[h.jsxDEV("button",{onClick:_,className:"text-sm text-[#888] hover:text-[#e0e0e0]",children:w?"Change URL":"Update key"},void 0,!1,void 0,this),h.jsxDEV("button",{onClick:N,className:"text-red-400 hover:text-red-300 text-sm",children:"Remove"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this):h.jsxDEV("div",{className:"flex items-center justify-between",children:[h.jsxDEV("a",{href:Y.docsUrl,target:"_blank",rel:"noopener noreferrer",className:"text-sm text-[#3b82f6] hover:underline",children:w?"Download Ollama":"Get API key"},void 0,!1,void 0,this),h.jsxDEV("button",{onClick:_,className:"text-sm text-[#f97316] hover:text-[#fb923c]",children:w?"Configure":"+ 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 CI({provider:Y,isEditing:G,apiKey:U,saving:O,testing:q,error:R,success:L,onStartEdit:_,onCancelEdit:T,onApiKeyChange:I,onSave:F,onDelete:N}){return h.jsxDEV("div",{className:`bg-[#111] border rounded-lg p-4 ${Y.hasKey?"border-[#f97316]/20":"border-[#1a1a1a]"}`,children:[h.jsxDEV("div",{className:"flex items-center justify-between mb-2",children:[h.jsxDEV("div",{children:[h.jsxDEV("h3",{className:"font-medium",children:Y.name},void 0,!1,void 0,this),h.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?h.jsxDEV("span",{className:"text-[#f97316] text-xs flex items-center gap-1 bg-[#f97316]/10 px-2 py-1 rounded",children:[h.jsxDEV(G6,{className:"w-3 h-3"},void 0,!1,void 0,this),Y.keyHint]},void 0,!0,void 0,this):h.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),h.jsxDEV("div",{className:"mt-3 pt-3 border-t border-[#1a1a1a]",children:G?h.jsxDEV("div",{className:"space-y-3",children:[h.jsxDEV("input",{type:"password",value:U,onChange:(w)=>I(w.target.value),placeholder:Y.hasKey?"Enter new API key...":"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),R&&h.jsxDEV("p",{className:"text-red-400 text-sm",children:R},void 0,!1,void 0,this),L&&h.jsxDEV("p",{className:"text-green-400 text-sm",children:L},void 0,!1,void 0,this),h.jsxDEV("div",{className:"flex gap-2",children:[h.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),h.jsxDEV("button",{onClick:F,disabled:!U||O,className:"flex-1 px-3 py-1.5 bg-[#f97316] text-black rounded text-sm font-medium disabled:opacity-50",children:q?"Validating...":O?"Saving...":"Save"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this):Y.hasKey?h.jsxDEV("div",{className:"flex items-center justify-between",children:[h.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),h.jsxDEV("div",{className:"flex items-center gap-3",children:[h.jsxDEV("button",{onClick:_,className:"text-sm text-[#888] hover:text-[#e0e0e0]",children:"Update key"},void 0,!1,void 0,this),h.jsxDEV("button",{onClick:N,className:"text-red-400 hover:text-red-300 text-sm",children:"Remove"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this):h.jsxDEV("div",{className:"flex items-center justify-between",children:[h.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),h.jsxDEV("button",{onClick:_,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 vI(){let{authFetch:Y,user:G}=P1(),[U,O]=E1.useState(""),[q,R]=E1.useState(""),[L,_]=E1.useState(""),[T,I]=E1.useState(!1),[F,N]=E1.useState(null),w=async()=>{if(!U||!q||!L){N({type:"error",text:"All fields are required"});return}if(q!==L){N({type:"error",text:"New passwords do not match"});return}if(q.length<8){N({type:"error",text:"Password must be at least 8 characters"});return}I(!0),N(null);try{let k=await Y("/api/auth/password",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({currentPassword:U,newPassword:q})}),v=await k.json();if(k.ok)N({type:"success",text:"Password updated successfully"}),O(""),R(""),_("");else N({type:"error",text:v.error||"Failed to update password"})}catch{N({type:"error",text:"Failed to update password"})}I(!1)};return h.jsxDEV("div",{className:"max-w-4xl w-full",children:[h.jsxDEV("div",{className:"mb-6",children:[h.jsxDEV("h1",{className:"text-2xl font-semibold mb-1",children:"Account Settings"},void 0,!1,void 0,this),h.jsxDEV("p",{className:"text-[#666]",children:"Manage your account and security."},void 0,!1,void 0,this)]},void 0,!0,void 0,this),G&&h.jsxDEV("div",{className:"bg-[#111] border border-[#1a1a1a] rounded-lg p-4 mb-6",children:[h.jsxDEV("h3",{className:"font-medium mb-3",children:"Profile"},void 0,!1,void 0,this),h.jsxDEV("div",{className:"space-y-2 text-sm",children:[h.jsxDEV("div",{className:"flex justify-between",children:[h.jsxDEV("span",{className:"text-[#666]",children:"Username"},void 0,!1,void 0,this),h.jsxDEV("span",{children:G.username},void 0,!1,void 0,this)]},void 0,!0,void 0,this),G.email&&h.jsxDEV("div",{className:"flex justify-between",children:[h.jsxDEV("span",{className:"text-[#666]",children:"Email"},void 0,!1,void 0,this),h.jsxDEV("span",{children:G.email},void 0,!1,void 0,this)]},void 0,!0,void 0,this),h.jsxDEV("div",{className:"flex justify-between",children:[h.jsxDEV("span",{className:"text-[#666]",children:"Role"},void 0,!1,void 0,this),h.jsxDEV("span",{className:"capitalize",children:G.role},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),h.jsxDEV("div",{className:"bg-[#111] border border-[#1a1a1a] rounded-lg p-4",children:[h.jsxDEV("h3",{className:"font-medium mb-4",children:"Change Password"},void 0,!1,void 0,this),h.jsxDEV("div",{className:"space-y-4 max-w-md",children:[h.jsxDEV("div",{children:[h.jsxDEV("label",{className:"block text-sm text-[#666] mb-1",children:"Current Password"},void 0,!1,void 0,this),h.jsxDEV("input",{type:"password",value:U,onChange:(k)=>O(k.target.value),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),h.jsxDEV("div",{children:[h.jsxDEV("label",{className:"block text-sm text-[#666] mb-1",children:"New Password"},void 0,!1,void 0,this),h.jsxDEV("input",{type:"password",value:q,onChange:(k)=>R(k.target.value),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),h.jsxDEV("div",{children:[h.jsxDEV("label",{className:"block text-sm text-[#666] mb-1",children:"Confirm New Password"},void 0,!1,void 0,this),h.jsxDEV("input",{type:"password",value:L,onChange:(k)=>_(k.target.value),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),F&&h.jsxDEV("div",{className:`p-3 rounded text-sm ${F.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:F.text},void 0,!1,void 0,this),h.jsxDEV("button",{onClick:w,disabled:T||!U||!q||!L,className:"px-4 py-2 bg-[#f97316] hover:bg-[#fb923c] disabled:opacity-50 disabled:cursor-not-allowed text-black rounded text-sm font-medium transition",children:T?"Updating...":"Update Password"},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 SI(){let{authFetch:Y}=P1(),[G,U]=E1.useState(!1),[O,q]=E1.useState(null),[R,L]=E1.useState(null),{confirm:_,ConfirmDialog:T}=S6(),I=async()=>{try{let w=await(await Y("/api/telemetry/stats")).json();L(w.stats?.total_events||0)}catch{L(null)}};E1.useEffect(()=>{I()},[]);let F=async()=>{if(!await _("Are you sure you want to delete all telemetry data? This cannot be undone.",{confirmText:"Clear All",title:"Clear Telemetry Data"}))return;U(!0),q(null);try{let w=await Y("/api/telemetry/clear",{method:"POST"}),k=await w.json();if(w.ok)q({type:"success",text:`Cleared ${k.deleted||0} telemetry events.`}),L(0);else q({type:"error",text:k.error||"Failed to clear telemetry"})}catch{q({type:"error",text:"Failed to clear telemetry"})}U(!1)};return h.jsxDEV(h.Fragment,{children:[T,h.jsxDEV("div",{className:"max-w-4xl w-full",children:[h.jsxDEV("div",{className:"mb-6",children:[h.jsxDEV("h1",{className:"text-2xl font-semibold mb-1",children:"Data Management"},void 0,!1,void 0,this),h.jsxDEV("p",{className:"text-[#666]",children:"Manage stored data and telemetry."},void 0,!1,void 0,this)]},void 0,!0,void 0,this),h.jsxDEV("div",{className:"bg-[#111] border border-[#1a1a1a] rounded-lg p-4",children:[h.jsxDEV("h3",{className:"font-medium mb-2",children:"Telemetry Data"},void 0,!1,void 0,this),h.jsxDEV("p",{className:"text-sm text-[#666] mb-4",children:R!==null?`${R.toLocaleString()} events stored`:"Loading..."},void 0,!1,void 0,this),O&&h.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),h.jsxDEV("button",{onClick:F,disabled:G||R===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 x4=q0(J1(),1),fI=[{key:"memory",icon:wz,label:"Memory"},{key:"tasks",icon:f6,label:"Tasks"},{key:"files",icon:vQ,label:"Files"},{key:"vision",icon:Fz,label:"Vision"},{key:"operator",icon:Mz,label:"Operator"},{key:"mcp",icon:h6,label:"MCP"},{key:"realtime",icon:Pz,label:"Realtime"},{key:"agents",icon:SQ,label:"Multi-Agent"}];function R3({agent:Y,selected:G,onSelect:U,onToggle:O,showProject:q}){let R=fI.filter((w)=>Y.features?.[w.key]),L=Y.mcpServerDetails||[],_=Y.skillDetails||[],{isActive:T,type:I}=SZ(Y.id),{projects:F}=g4(),N=Y.projectId?F.find((w)=>w.id===Y.projectId):null;return x4.jsxDEV("div",{onClick:U,className:`bg-[#111] rounded p-5 border transition cursor-pointer flex flex-col h-full ${G?"border-[#f97316]":"border-[#1a1a1a] hover:border-[#333]"}`,children:[x4.jsxDEV("div",{className:"flex items-start justify-between mb-3",children:[x4.jsxDEV("div",{children:[x4.jsxDEV("h3",{className:"font-semibold text-lg",children:Y.name},void 0,!1,void 0,this),x4.jsxDEV("p",{className:"text-sm text-[#666]",children:[Y.provider," / ",Y.model,Y.port&&x4.jsxDEV("span",{className:"text-[#444]",children:[" · :",Y.port]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),q&&N&&x4.jsxDEV("p",{className:"text-sm text-[#666] flex items-center gap-1.5 mt-1",children:[x4.jsxDEV("span",{className:"w-2 h-2 rounded-full",style:{backgroundColor:N.color}},void 0,!1,void 0,this),N.name]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),x4.jsxDEV(hI,{status:Y.status,isActive:T&&Y.status==="running",activityType:I},void 0,!1,void 0,this)]},void 0,!0,void 0,this),R.length>0&&x4.jsxDEV("div",{className:"flex flex-wrap gap-1.5 mb-3",children:R.map(({key:w,icon:k,label:v})=>x4.jsxDEV("span",{className:"inline-flex items-center gap-1 px-2 py-0.5 rounded bg-[#f97316]/10 text-[#f97316]/70 text-xs",title:v,children:[x4.jsxDEV(k,{className:"w-3 h-3"},void 0,!1,void 0,this),v]},w,!0,void 0,this))},void 0,!1,void 0,this),L.length>0&&x4.jsxDEV("div",{className:"flex flex-wrap gap-1.5 mb-3",children:L.map((w)=>{let k=w.type==="http"&&w.url||w.status==="running";return x4.jsxDEV("span",{className:`inline-flex items-center gap-1 px-2 py-0.5 rounded text-xs ${k?"bg-green-500/10 text-green-400":"bg-[#222] text-[#666]"}`,title:`MCP: ${w.name} (${k?"available":w.status})`,children:[x4.jsxDEV(h6,{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),_.length>0&&x4.jsxDEV("div",{className:"flex flex-wrap gap-1.5 mb-3",children:_.map((w)=>x4.jsxDEV("span",{className:`inline-flex items-center gap-1 px-2 py-0.5 rounded text-xs ${w.enabled?"bg-purple-500/10 text-purple-400":"bg-[#222] text-[#666]"}`,title:`Skill: ${w.name} v${w.version}`,children:[x4.jsxDEV(fZ,{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),x4.jsxDEV("p",{className:"text-sm text-[#666] line-clamp-2 mb-4 flex-1",children:Y.systemPrompt},void 0,!1,void 0,this),x4.jsxDEV("button",{onClick:O,className:`w-full px-3 py-1.5 rounded text-sm font-medium transition mt-auto ${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 hI({status:Y,isActive:G,activityType:U}){if(Y==="running"&&G&&U)return x4.jsxDEV("span",{className:"px-2 py-1 rounded text-xs font-medium bg-green-500/20 text-green-400 animate-pulse",children:U},void 0,!1,void 0,this);return x4.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 gZ=q0(k1(),1);var Z1=q0(J1(),1),yI=[{key:"memory",label:"Memory",description:"Persistent recall",icon:wz},{key:"tasks",label:"Tasks",description:"Schedule and execute tasks",icon:f6},{key:"files",label:"Files",description:"File storage and management",icon:vQ},{key:"vision",label:"Vision",description:"Process images and PDFs",icon:Fz},{key:"operator",label:"Operator",description:"Browser automation",icon:Mz},{key:"mcp",label:"MCP",description:"External tools/services",icon:h6},{key:"realtime",label:"Realtime",description:"Voice conversations",icon:Pz},{key:"agents",label:"Multi-Agent",description:"Communicate with peer agents",icon:SQ}];function N3({form:Y,providers:G,configuredProviders:U,onFormChange:O,onProviderChange:q,onCreate:R,onClose:L,onGoToSettings:_}){let{projects:T,currentProjectId:I}=g4(),F=G.find((u)=>u.id===Y.provider),[N,w]=gZ.default.useState([]),[k,v]=gZ.default.useState(!1);gZ.default.useEffect(()=>{if(Y.provider==="ollama")v(!0),fetch("/api/providers/ollama/models").then((u)=>u.json()).then((u)=>{if(u.models&&u.models.length>0){if(w(u.models.map((Q0)=>({value:Q0.value,label:Q0.label||Q0.value}))),!Y.model&&u.models.length>0)O({...Y,model:u.models[0].value})}}).catch(()=>w([])).finally(()=>v(!1))},[Y.provider]);let E=U.filter((u)=>u.type==="llm").map((u)=>({value:u.id,label:u.name})),D=Y.provider==="ollama"&&N.length>0?N:F?.models.map((u)=>({value:u.value,label:u.label,recommended:u.recommended}))||[],C=T.map((u)=>({value:u.id,label:u.name}));gZ.default.useEffect(()=>{if(Y.projectId===void 0&&I&&I!=="unassigned")O({...Y,projectId:I})},[I]);let V=(u)=>{if(u==="agents")if(typeof Y.features.agents==="boolean"?Y.features.agents:Y.features.agents?.enabled??!1)O({...Y,features:{...Y.features,agents:!1}});else O({...Y,features:{...Y.features,agents:{enabled:!0,mode:"worker",group:Y.projectId||void 0}}});else O({...Y,features:{...Y.features,[u]:!Y.features[u]}})},m=()=>{let u=Y.features.agents;if(typeof u==="boolean")return u;return u?.enabled??!1},a=()=>{return _z(Y.features,Y.projectId).mode||"worker"},c=(u)=>{let Q0=_z(Y.features,Y.projectId);O({...Y,features:{...Y.features,agents:{...Q0,enabled:!0,mode:u}}})};return Z1.jsxDEV(TQ,{children:[Z1.jsxDEV("h2",{className:"text-xl font-semibold mb-4",children:"Create New Agent"},void 0,!1,void 0,this),E.length===0?Z1.jsxDEV(VI,{onGoToSettings:_},void 0,!1,void 0,this):Z1.jsxDEV(Z1.Fragment,{children:[Z1.jsxDEV("div",{className:"space-y-4",children:[Z1.jsxDEV(f8,{label:"Name",children:Z1.jsxDEV("input",{type:"text",value:Y.name,onChange:(u)=>O({...Y,name:u.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&&Z1.jsxDEV(f8,{label:"Project",children:Z1.jsxDEV(V5,{value:Y.projectId||"",options:C,onChange:(u)=>O({...Y,projectId:u||null}),placeholder:"Select project..."},void 0,!1,void 0,this)},void 0,!1,void 0,this),Z1.jsxDEV(f8,{label:"Provider",children:Z1.jsxDEV(V5,{value:Y.provider,options:E,onChange:q,placeholder:"Select provider..."},void 0,!1,void 0,this)},void 0,!1,void 0,this),Z1.jsxDEV(f8,{label:"Model",children:k?Z1.jsxDEV("div",{className:"text-sm text-[#666] py-2",children:"Loading Ollama models..."},void 0,!1,void 0,this):Y.provider==="ollama"&&D.length===0?Z1.jsxDEV("div",{className:"text-sm text-yellow-400/80 py-2",children:["No models found. Run ",Z1.jsxDEV("code",{className:"bg-[#1a1a1a] px-1 rounded",children:"ollama pull llama3.3"},void 0,!1,void 0,this)," to download a model."]},void 0,!0,void 0,this):Z1.jsxDEV(V5,{value:Y.model,options:D,onChange:(u)=>O({...Y,model:u}),placeholder:"Select model..."},void 0,!1,void 0,this)},void 0,!1,void 0,this),Z1.jsxDEV(f8,{label:"System Prompt",children:Z1.jsxDEV("textarea",{value:Y.systemPrompt,onChange:(u)=>O({...Y,systemPrompt:u.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),Z1.jsxDEV(f8,{label:"Features",children:Z1.jsxDEV("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-2",children:yI.map(({key:u,label:Q0,description:o,icon:t})=>{let l=u==="agents"?m():!!Y.features[u];return Z1.jsxDEV("button",{type:"button",onClick:()=>V(u),className:`flex items-center gap-3 p-3 rounded border text-left transition ${l?"border-[#f97316] bg-[#f97316]/10":"border-[#222] hover:border-[#333]"}`,children:[Z1.jsxDEV(t,{className:`w-5 h-5 flex-shrink-0 ${l?"text-[#f97316]":"text-[#666]"}`},void 0,!1,void 0,this),Z1.jsxDEV("div",{className:"flex-1 min-w-0",children:[Z1.jsxDEV("div",{className:`text-sm font-medium ${l?"text-[#f97316]":""}`,children:Q0},void 0,!1,void 0,this),Z1.jsxDEV("div",{className:"text-xs text-[#666]",children:o},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},u,!0,void 0,this)})},void 0,!1,void 0,this)},void 0,!1,void 0,this),m()&&Z1.jsxDEV(f8,{label:"Multi-Agent Mode",children:[Z1.jsxDEV("div",{className:"flex gap-2",children:[Z1.jsxDEV("button",{type:"button",onClick:()=>c("coordinator"),className:`flex-1 p-3 rounded border text-left transition ${a()==="coordinator"?"border-[#f97316] bg-[#f97316]/10":"border-[#222] hover:border-[#333]"}`,children:[Z1.jsxDEV("div",{className:`text-sm font-medium ${a()==="coordinator"?"text-[#f97316]":""}`,children:"Coordinator"},void 0,!1,void 0,this),Z1.jsxDEV("div",{className:"text-xs text-[#666]",children:"Orchestrates and delegates"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),Z1.jsxDEV("button",{type:"button",onClick:()=>c("worker"),className:`flex-1 p-3 rounded border text-left transition ${a()==="worker"?"border-[#f97316] bg-[#f97316]/10":"border-[#222] hover:border-[#333]"}`,children:[Z1.jsxDEV("div",{className:`text-sm font-medium ${a()==="worker"?"text-[#f97316]":""}`,children:"Worker"},void 0,!1,void 0,this),Z1.jsxDEV("div",{className:"text-xs text-[#666]",children:"Receives delegated tasks"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),Y.projectId&&Z1.jsxDEV("p",{className:"text-xs text-[#555] mt-2",children:"Group: Using project as agent group"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),Y.provider==="anthropic"&&Z1.jsxDEV(f8,{label:"Agent Built-in Tools",children:[Z1.jsxDEV("div",{className:"flex flex-wrap gap-2",children:[Z1.jsxDEV("button",{type:"button",onClick:()=>O({...Y,features:{...Y.features,builtinTools:{...Y.features.builtinTools,webSearch:!Y.features.builtinTools?.webSearch}}}),className:`flex items-center gap-2 px-3 py-2 rounded border transition ${Y.features.builtinTools?.webSearch?"border-[#f97316] bg-[#f97316]/10 text-[#f97316]":"border-[#222] hover:border-[#333] text-[#888]"}`,children:[Z1.jsxDEV("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:Z1.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"},void 0,!1,void 0,this)},void 0,!1,void 0,this),Z1.jsxDEV("span",{className:"text-sm",children:"Web Search"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),Z1.jsxDEV("button",{type:"button",onClick:()=>O({...Y,features:{...Y.features,builtinTools:{...Y.features.builtinTools,webFetch:!Y.features.builtinTools?.webFetch}}}),className:`flex items-center gap-2 px-3 py-2 rounded border transition ${Y.features.builtinTools?.webFetch?"border-[#f97316] bg-[#f97316]/10 text-[#f97316]":"border-[#222] hover:border-[#333] text-[#888]"}`,children:[Z1.jsxDEV("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:Z1.jsxDEV("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"},void 0,!1,void 0,this)},void 0,!1,void 0,this),Z1.jsxDEV("span",{className:"text-sm",children:"Web Fetch"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),Z1.jsxDEV("p",{className:"text-xs text-[#555] mt-2",children:"Provider-native tools for real-time web access"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),Z1.jsxDEV("div",{className:"flex gap-3 mt-6",children:[Z1.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),Z1.jsxDEV("button",{onClick:R,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 f8({label:Y,children:G}){return Z1.jsxDEV("div",{children:[Z1.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 VI({onGoToSettings:Y}){return Z1.jsxDEV("div",{className:"text-center py-6",children:[Z1.jsxDEV("p",{className:"text-[#666] mb-4",children:"No API keys configured. Add a provider key first."},void 0,!1,void 0,this),Z1.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 w1=q0(k1(),1);var S=q0(J1(),1),DI=[{key:"memory",label:"Memory",description:"Persistent recall",icon:wz},{key:"tasks",label:"Tasks",description:"Schedule and execute tasks",icon:f6},{key:"files",label:"Files",description:"File storage and management",icon:vQ},{key:"vision",label:"Vision",description:"Process images and PDFs",icon:Fz},{key:"operator",label:"Operator",description:"Browser automation",icon:Mz},{key:"mcp",label:"MCP",description:"External tools/services",icon:h6},{key:"realtime",label:"Realtime",description:"Voice conversations",icon:Pz},{key:"agents",label:"Multi-Agent",description:"Communicate with peer agents",icon:SQ}];function b3({agent:Y,providers:G,onClose:U,onStartAgent:O,onUpdateAgent:q,onDeleteAgent:R}){let[L,_]=w1.useState("chat");return S.jsxDEV("div",{className:"w-full h-full flex flex-col overflow-hidden bg-[#0a0a0a] border-l border-[#1a1a1a]",children:[S.jsxDEV("div",{className:"border-b border-[#1a1a1a] flex items-center",children:[S.jsxDEV("div",{className:"flex-1 overflow-x-auto scrollbar-hide px-2 md:px-4",children:S.jsxDEV("div",{className:"flex gap-1",children:[S.jsxDEV(mQ,{active:L==="chat",onClick:()=>_("chat"),children:"Chat"},void 0,!1,void 0,this),S.jsxDEV(mQ,{active:L==="threads",onClick:()=>_("threads"),children:"Threads"},void 0,!1,void 0,this),S.jsxDEV(mQ,{active:L==="tasks",onClick:()=>_("tasks"),children:"Tasks"},void 0,!1,void 0,this),S.jsxDEV(mQ,{active:L==="memory",onClick:()=>_("memory"),children:"Memory"},void 0,!1,void 0,this),S.jsxDEV(mQ,{active:L==="files",onClick:()=>_("files"),children:"Files"},void 0,!1,void 0,this),S.jsxDEV(mQ,{active:L==="settings",onClick:()=>_("settings"),children:"Settings"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this),S.jsxDEV("button",{onClick:U,className:"text-[#666] hover:text-[#e0e0e0] transition p-2 flex-shrink-0 mr-2",children:S.jsxDEV(N7,{},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this),S.jsxDEV("div",{className:"flex-1 min-h-0 flex flex-col overflow-hidden",children:[L==="chat"&&S.jsxDEV(EI,{agent:Y,onStartAgent:O},void 0,!1,void 0,this),L==="threads"&&S.jsxDEV(mI,{agent:Y},void 0,!1,void 0,this),L==="tasks"&&S.jsxDEV(uI,{agent:Y},void 0,!1,void 0,this),L==="memory"&&S.jsxDEV(gI,{agent:Y},void 0,!1,void 0,this),L==="files"&&S.jsxDEV(xI,{agent:Y},void 0,!1,void 0,this),L==="settings"&&S.jsxDEV(jI,{agent:Y,providers:G,onUpdateAgent:q,onDeleteAgent:R},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}function mQ({active:Y,onClick:G,children:U}){return S.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:U},void 0,!1,void 0,this)}function EI({agent:Y,onStartAgent:G}){if(Y.status==="running"&&Y.port)return S.jsxDEV(B3,{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 S.jsxDEV("div",{className:"flex-1 flex items-center justify-center text-[#666]",children:S.jsxDEV("div",{className:"text-center",children:[S.jsxDEV("p",{className:"text-lg mb-2",children:"Agent is not running"},void 0,!1,void 0,this),S.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 mI({agent:Y}){let[G,U]=w1.useState([]),[O,q]=w1.useState(!0),[R,L]=w1.useState(null),[_,T]=w1.useState(null),[I,F]=w1.useState([]),[N,w]=w1.useState(!1),{confirm:k,ConfirmDialog:v}=S6();w1.useEffect(()=>{U([]),T(null),F([]),L(null),q(!0)},[Y.id]),w1.useEffect(()=>{if(Y.status!=="running"){q(!1);return}(async()=>{try{let V=await fetch(`/api/agents/${Y.id}/threads`);if(!V.ok)throw Error("Failed to fetch threads");let m=await V.json();U(m.threads||[]),L(null)}catch(V){L(V instanceof Error?V.message:"Failed to load threads")}finally{q(!1)}})()},[Y.id,Y.status]);let E=async(C)=>{T(C),w(!0);try{let V=await fetch(`/api/agents/${Y.id}/threads/${C}/messages`);if(!V.ok)throw Error("Failed to fetch messages");let m=await V.json();F(m.messages||[])}catch{F([])}finally{w(!1)}},D=async(C,V)=>{if(V.stopPropagation(),!await k("Delete this thread?",{confirmText:"Delete",title:"Delete Thread"}))return;try{if(await fetch(`/api/agents/${Y.id}/threads/${C}`,{method:"DELETE"}),U((a)=>a.filter((c)=>c.id!==C)),_===C)T(null),F([])}catch{}};if(Y.status!=="running")return S.jsxDEV("div",{className:"flex-1 flex items-center justify-center text-[#666]",children:S.jsxDEV("p",{children:"Start the agent to view threads"},void 0,!1,void 0,this)},void 0,!1,void 0,this);if(O)return S.jsxDEV("div",{className:"flex-1 flex items-center justify-center text-[#666]",children:S.jsxDEV("p",{children:"Loading threads..."},void 0,!1,void 0,this)},void 0,!1,void 0,this);if(R)return S.jsxDEV("div",{className:"flex-1 flex items-center justify-center text-red-400",children:S.jsxDEV("p",{children:R},void 0,!1,void 0,this)},void 0,!1,void 0,this);if(_){let C=G.find((V)=>V.id===_);return S.jsxDEV(S.Fragment,{children:[v,S.jsxDEV("div",{className:"flex-1 flex flex-col overflow-hidden",children:[S.jsxDEV("div",{className:"flex items-center gap-3 px-4 py-3 border-b border-[#1a1a1a]",children:[S.jsxDEV("button",{onClick:()=>{T(null),F([])},className:"text-[#666] hover:text-[#e0e0e0] transition text-lg",children:"←"},void 0,!1,void 0,this),S.jsxDEV("div",{className:"flex-1",children:[S.jsxDEV("p",{className:"text-sm font-medium",children:C?.title||`Thread ${_.slice(0,8)}`},void 0,!1,void 0,this),S.jsxDEV("p",{className:"text-xs text-[#666]",children:C&&new Date(C.updated_at||C.created_at).toLocaleString()},void 0,!1,void 0,this)]},void 0,!0,void 0,this),S.jsxDEV("button",{onClick:(V)=>D(_,V),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),S.jsxDEV("div",{className:"flex-1 overflow-auto p-4",children:N?S.jsxDEV("p",{className:"text-[#666]",children:"Loading messages..."},void 0,!1,void 0,this):I.length===0?S.jsxDEV("p",{className:"text-[#666]",children:"No messages in this thread"},void 0,!1,void 0,this):S.jsxDEV("div",{className:"space-y-4",children:I.map((V,m)=>S.jsxDEV("div",{className:`${V.role==="user"?"text-right":""}`,children:S.jsxDEV("div",{className:`inline-block max-w-[80%] p-3 rounded ${V.role==="user"?"bg-[#f97316]/20 text-[#f97316]":"bg-[#1a1a1a] text-[#e0e0e0]"}`,children:[S.jsxDEV("div",{className:"text-sm whitespace-pre-wrap",children:typeof V.content==="string"?V.content:Array.isArray(V.content)?V.content.map((a,c)=>S.jsxDEV("div",{children:[a.type==="text"&&a.text,a.type==="tool_use"&&S.jsxDEV("div",{className:"bg-[#222] p-2 rounded mt-1 text-xs text-[#888]",children:["\uD83D\uDD27 Tool: ",a.name]},void 0,!0,void 0,this),a.type==="tool_result"&&S.jsxDEV("div",{className:"bg-[#222] p-2 rounded mt-1 text-xs text-[#888]",children:["\uD83D\uDCCB Result: ",typeof a.content==="string"?a.content.slice(0,200):"..."]},void 0,!0,void 0,this)]},c,!0,void 0,this)):JSON.stringify(V.content)},void 0,!1,void 0,this),S.jsxDEV("p",{className:"text-xs text-[#666] mt-1",children:new Date(V.created_at).toLocaleTimeString()},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},m,!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 S.jsxDEV(S.Fragment,{children:[v,S.jsxDEV("div",{className:"flex-1 overflow-auto",children:G.length===0?S.jsxDEV("div",{className:"flex items-center justify-center h-full text-[#666]",children:S.jsxDEV("p",{children:"No conversation threads yet"},void 0,!1,void 0,this)},void 0,!1,void 0,this):S.jsxDEV("div",{className:"divide-y divide-[#1a1a1a]",children:G.map((C)=>S.jsxDEV("div",{onClick:()=>E(C.id),className:"p-4 cursor-pointer hover:bg-[#111] transition flex items-center justify-between",children:[S.jsxDEV("div",{className:"flex-1 min-w-0",children:[S.jsxDEV("p",{className:"text-sm font-medium truncate",children:C.title||`Thread ${C.id.slice(0,8)}`},void 0,!1,void 0,this),S.jsxDEV("p",{className:"text-xs text-[#666] mt-1",children:[new Date(C.updated_at||C.created_at).toLocaleString(),C.message_count!==void 0&&` • ${C.message_count} messages`]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),S.jsxDEV("button",{onClick:(V)=>D(C.id,V),className:"text-[#666] hover:text-red-400 text-lg ml-4",children:"×"},void 0,!1,void 0,this)]},C.id,!0,void 0,this))},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}function uI({agent:Y}){let[G,U]=w1.useState([]),[O,q]=w1.useState(!0),[R,L]=w1.useState(null),[_,T]=w1.useState("all");w1.useEffect(()=>{U([]),L(null),q(!0)},[Y.id]);let I=async()=>{if(Y.status!=="running"){q(!1);return}try{let N=await fetch(`/api/agents/${Y.id}/tasks?status=${_}`);if(!N.ok)throw Error("Failed to fetch tasks");let w=await N.json();U(w.tasks||[]),L(null)}catch(N){L(N instanceof Error?N.message:"Failed to load tasks")}finally{q(!1)}};w1.useEffect(()=>{q(!0),I()},[Y.id,Y.status,_]),w1.useEffect(()=>{if(Y.status!=="running")return;let N=setInterval(I,5000);return()=>clearInterval(N)},[Y.id,Y.status,_]);let F=(N)=>{switch(N){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 S.jsxDEV("div",{className:"flex-1 flex items-center justify-center text-[#666]",children:S.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 S.jsxDEV("div",{className:"flex-1 flex items-center justify-center text-[#666]",children:S.jsxDEV("div",{className:"text-center",children:[S.jsxDEV("p",{className:"mb-2",children:"Tasks feature is not enabled"},void 0,!1,void 0,this),S.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 S.jsxDEV("div",{className:"flex-1 flex items-center justify-center text-[#666]",children:S.jsxDEV("p",{children:"Loading tasks..."},void 0,!1,void 0,this)},void 0,!1,void 0,this);if(R)return S.jsxDEV("div",{className:"flex-1 flex items-center justify-center text-red-400",children:S.jsxDEV("p",{children:R},void 0,!1,void 0,this)},void 0,!1,void 0,this);return S.jsxDEV("div",{className:"flex-1 overflow-auto p-4",children:[S.jsxDEV("div",{className:"flex gap-2 mb-4",children:["all","pending","running","completed"].map((N)=>S.jsxDEV("button",{onClick:()=>T(N),className:`px-3 py-1 text-xs rounded transition ${_===N?"bg-[#f97316] text-black":"bg-[#1a1a1a] text-[#666] hover:text-[#888]"}`,children:N.charAt(0).toUpperCase()+N.slice(1)},N,!1,void 0,this))},void 0,!1,void 0,this),G.length===0?S.jsxDEV("div",{className:"text-center py-10 text-[#666]",children:S.jsxDEV("p",{children:["No ",_==="all"?"":_+" ","tasks"]},void 0,!0,void 0,this)},void 0,!1,void 0,this):S.jsxDEV("div",{className:"space-y-3",children:G.map((N)=>S.jsxDEV("div",{className:"bg-[#111] border border-[#1a1a1a] rounded p-3",children:[S.jsxDEV("div",{className:"flex items-start justify-between",children:[S.jsxDEV("div",{className:"flex-1 min-w-0",children:[S.jsxDEV("p",{className:"text-sm font-medium text-[#e0e0e0]",children:N.name},void 0,!1,void 0,this),N.description&&S.jsxDEV("p",{className:"text-xs text-[#666] mt-1 line-clamp-2",children:N.description},void 0,!1,void 0,this)]},void 0,!0,void 0,this),S.jsxDEV("span",{className:`text-xs px-2 py-0.5 rounded ml-2 ${F(N.status)}`,children:N.status},void 0,!1,void 0,this)]},void 0,!0,void 0,this),S.jsxDEV("div",{className:"flex items-center gap-4 mt-2 text-xs text-[#666]",children:[S.jsxDEV("span",{children:["Created: ",new Date(N.created_at).toLocaleString()]},void 0,!0,void 0,this),N.scheduled_at&&S.jsxDEV("span",{children:["Scheduled: ",new Date(N.scheduled_at).toLocaleString()]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),N.status==="completed"&&N.result&&S.jsxDEV("div",{className:"mt-2 p-2 bg-[#0a0a0a] rounded text-xs text-[#888]",children:[S.jsxDEV("p",{className:"text-[#666] mb-1",children:"Result:"},void 0,!1,void 0,this),S.jsxDEV("p",{className:"whitespace-pre-wrap",children:N.result},void 0,!1,void 0,this)]},void 0,!0,void 0,this),N.status==="failed"&&N.error&&S.jsxDEV("div",{className:"mt-2 p-2 bg-red-500/10 rounded text-xs text-red-400",children:[S.jsxDEV("p",{className:"text-red-400/70 mb-1",children:"Error:"},void 0,!1,void 0,this),S.jsxDEV("p",{className:"whitespace-pre-wrap",children:N.error},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},N.id,!0,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}function gI({agent:Y}){let[G,U]=w1.useState([]),[O,q]=w1.useState(!0),[R,L]=w1.useState(null),[_,T]=w1.useState(!1),{confirm:I,ConfirmDialog:F}=S6();w1.useEffect(()=>{U([]),L(null),q(!0)},[Y.id]);let N=async()=>{if(Y.status!=="running"){q(!1);return}try{let v=await fetch(`/api/agents/${Y.id}/memories`);if(!v.ok)throw Error("Failed to fetch memories");let E=await v.json();U(E.memories||[]),T(E.enabled??!1),L(null)}catch(v){L(v instanceof Error?v.message:"Failed to load memories")}finally{q(!1)}};w1.useEffect(()=>{N()},[Y.id,Y.status]);let w=async(v)=>{try{await fetch(`/api/agents/${Y.id}/memories/${v}`,{method:"DELETE"}),U((E)=>E.filter((D)=>D.id!==v))}catch{}},k=async()=>{if(!await I("Clear all memories?",{confirmText:"Clear",title:"Clear Memories"}))return;try{await fetch(`/api/agents/${Y.id}/memories`,{method:"DELETE"}),U([])}catch{}};if(!Y.features?.memory)return S.jsxDEV("div",{className:"flex-1 flex items-center justify-center text-[#666]",children:S.jsxDEV("div",{className:"text-center",children:[S.jsxDEV("p",{className:"mb-2",children:"Memory feature is not enabled"},void 0,!1,void 0,this),S.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 S.jsxDEV("div",{className:"flex-1 flex items-center justify-center text-[#666]",children:S.jsxDEV("p",{children:"Start the agent to view memories"},void 0,!1,void 0,this)},void 0,!1,void 0,this);if(O)return S.jsxDEV("div",{className:"flex-1 flex items-center justify-center text-[#666]",children:S.jsxDEV("p",{children:"Loading memories..."},void 0,!1,void 0,this)},void 0,!1,void 0,this);if(R)return S.jsxDEV("div",{className:"flex-1 flex items-center justify-center text-red-400",children:S.jsxDEV("p",{children:R},void 0,!1,void 0,this)},void 0,!1,void 0,this);if(!_)return S.jsxDEV("div",{className:"flex-1 flex items-center justify-center text-[#666]",children:S.jsxDEV("div",{className:"text-center",children:[S.jsxDEV("p",{className:"mb-2",children:"Memory system not initialized"},void 0,!1,void 0,this),S.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 S.jsxDEV(S.Fragment,{children:[F,S.jsxDEV("div",{className:"flex-1 overflow-auto p-4",children:[S.jsxDEV("div",{className:"flex items-center justify-between mb-4",children:[S.jsxDEV("h3",{className:"text-sm font-medium text-[#888]",children:["Stored Memories (",G.length,")"]},void 0,!0,void 0,this),G.length>0&&S.jsxDEV("button",{onClick:k,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?S.jsxDEV("div",{className:"text-center py-10 text-[#666]",children:[S.jsxDEV("p",{children:"No memories stored yet"},void 0,!1,void 0,this),S.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):S.jsxDEV("div",{className:"space-y-3",children:G.map((v)=>S.jsxDEV("div",{className:"bg-[#111] border border-[#1a1a1a] rounded p-3",children:[S.jsxDEV("div",{className:"flex items-start justify-between gap-2",children:[S.jsxDEV("p",{className:"text-sm text-[#e0e0e0] flex-1",children:v.content},void 0,!1,void 0,this),S.jsxDEV("button",{onClick:()=>w(v.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),S.jsxDEV("div",{className:"flex items-center gap-3 mt-2",children:[S.jsxDEV("span",{className:`text-xs px-2 py-0.5 rounded ${v.type==="preference"?"bg-purple-500/20 text-purple-400":v.type==="fact"?"bg-green-500/20 text-green-400":"bg-blue-500/20 text-blue-400"}`,children:v.type},void 0,!1,void 0,this),S.jsxDEV("span",{className:"text-xs text-[#666]",children:new Date(v.created_at).toLocaleString()},void 0,!1,void 0,this),v.importance&&S.jsxDEV("span",{className:"text-xs text-[#555]",children:["importance: ",v.importance.toFixed(1)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},v.id,!0,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}function xI({agent:Y}){let[G,U]=w1.useState([]),[O,q]=w1.useState(!0),[R,L]=w1.useState(null),[_,T]=w1.useState(!1),[I,F]=w1.useState(null),[N,w]=w1.useState(!1),k=w1.default.useRef(null),{confirm:v,ConfirmDialog:E}=S6();w1.useEffect(()=>{U([]),L(null),q(!0)},[Y.id]);let D=async()=>{if(Y.status!=="running"){q(!1);return}try{let l=await fetch(`/api/agents/${Y.id}/files`);if(!l.ok)throw Error("Failed to fetch files");let p=await l.json();U(p.files||[]),L(null)}catch(l){L(l instanceof Error?l.message:"Failed to load files")}finally{q(!1)}};w1.useEffect(()=>{D()},[Y.id,Y.status]);let C=async(l)=>{if(!await v("Delete this file?",{confirmText:"Delete",title:"Delete File"}))return;try{await fetch(`/api/agents/${Y.id}/files/${l}`,{method:"DELETE"}),U((i)=>i.filter((Z0)=>Z0.id!==l))}catch{}},V=(l,p)=>{let i=document.createElement("a");i.href=`/api/agents/${Y.id}/files/${l}/download`,i.download=p,i.click()},m=(l)=>{if(l<1024)return`${l} B`;if(l<1048576)return`${(l/1024).toFixed(1)} KB`;return`${(l/1048576).toFixed(1)} MB`},a=async(l)=>{T(!0),F(null);try{let p=new FormData;p.append("file",l);let i=await fetch(`/api/agents/${Y.id}/files`,{method:"POST",body:p});if(!i.ok){let Z0=await i.json();throw Error(Z0.error||"Upload failed")}await D()}catch(p){F(p instanceof Error?p.message:"Upload failed")}finally{T(!1)}},c=(l)=>{let p=l.target.files?.[0];if(p)a(p);l.target.value=""},u=(l)=>{l.preventDefault(),w(!1);let p=l.dataTransfer.files?.[0];if(p)a(p)},Q0=(l)=>{l.preventDefault(),w(!0)},o=(l)=>{l.preventDefault(),w(!1)},t=(l)=>{if(l.startsWith("image/"))return"\uD83D\uDDBC";if(l.includes("pdf"))return"\uD83D\uDCD5";if(l.includes("json"))return"{}";if(l.includes("javascript")||l.includes("typescript"))return"⚡";if(l.startsWith("text/"))return"\uD83D\uDCC4";if(l.startsWith("audio/"))return"\uD83C\uDFB5";if(l.startsWith("video/"))return"\uD83C\uDFAC";return"\uD83D\uDCC1"};if(!Y.features?.files)return S.jsxDEV("div",{className:"flex-1 flex items-center justify-center text-[#666]",children:S.jsxDEV("div",{className:"text-center",children:[S.jsxDEV("p",{className:"mb-2",children:"Files feature is not enabled"},void 0,!1,void 0,this),S.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 S.jsxDEV("div",{className:"flex-1 flex items-center justify-center text-[#666]",children:S.jsxDEV("p",{children:"Start the agent to view files"},void 0,!1,void 0,this)},void 0,!1,void 0,this);if(O)return S.jsxDEV("div",{className:"flex-1 flex items-center justify-center text-[#666]",children:S.jsxDEV("p",{children:"Loading files..."},void 0,!1,void 0,this)},void 0,!1,void 0,this);if(R)return S.jsxDEV("div",{className:"flex-1 flex items-center justify-center text-red-400",children:S.jsxDEV("p",{children:R},void 0,!1,void 0,this)},void 0,!1,void 0,this);return S.jsxDEV(S.Fragment,{children:[E,S.jsxDEV("div",{className:`flex-1 overflow-auto p-4 transition ${N?"bg-[#f97316]/5":""}`,onDrop:u,onDragOver:Q0,onDragLeave:o,children:[S.jsxDEV("input",{ref:k,type:"file",className:"hidden",onChange:c},void 0,!1,void 0,this),S.jsxDEV("div",{className:"flex items-center justify-between mb-4",children:[S.jsxDEV("h3",{className:"text-sm font-medium text-[#888]",children:["Agent Files (",G.length,")"]},void 0,!0,void 0,this),S.jsxDEV("div",{className:"flex items-center gap-2",children:[S.jsxDEV("button",{onClick:()=>k.current?.click(),disabled:_,className:"text-xs bg-[#f97316] hover:bg-[#fb923c] disabled:opacity-50 text-black px-3 py-1 rounded font-medium transition",children:_?"Uploading...":"Upload"},void 0,!1,void 0,this),S.jsxDEV("button",{onClick:D,className:"text-xs text-[#666] hover:text-[#888]",children:"Refresh"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),I&&S.jsxDEV("div",{className:"mb-4 text-sm bg-red-500/10 text-red-400 px-3 py-2 rounded",children:I},void 0,!1,void 0,this),N&&S.jsxDEV("div",{className:"mb-4 border-2 border-dashed border-[#f97316] rounded-lg p-8 text-center",children:S.jsxDEV("p",{className:"text-[#f97316]",children:"Drop file to upload"},void 0,!1,void 0,this)},void 0,!1,void 0,this),G.length===0&&!N&&S.jsxDEV("div",{className:"text-center py-10 text-[#666]",children:[S.jsxDEV("p",{children:"No files stored yet"},void 0,!1,void 0,this),S.jsxDEV("p",{className:"text-sm mt-1",children:"Drop files here, click Upload, or attach files in Chat"},void 0,!1,void 0,this),Y.features?.memory&&S.jsxDEV("p",{className:"text-xs mt-2 text-[#555]",children:"Files will be auto-ingested into memory"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),G.length>0&&S.jsxDEV("div",{className:"space-y-2",children:G.map((l)=>S.jsxDEV("div",{className:"bg-[#111] border border-[#1a1a1a] rounded p-3 flex items-center gap-3",children:[S.jsxDEV("div",{className:"w-10 h-10 bg-[#1a1a1a] rounded flex items-center justify-center text-[#666]",children:t(l.mime_type)},void 0,!1,void 0,this),S.jsxDEV("div",{className:"flex-1 min-w-0",children:[S.jsxDEV("p",{className:"text-sm text-[#e0e0e0] truncate",children:l.filename},void 0,!1,void 0,this),S.jsxDEV("p",{className:"text-xs text-[#666]",children:[m(l.size_bytes)," • ",new Date(l.created_at).toLocaleString(),l.source&&l.source!=="upload"&&` • ${l.source}`]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),S.jsxDEV("div",{className:"flex items-center gap-2",children:[S.jsxDEV("button",{onClick:()=>V(l.id,l.filename),className:"text-xs text-[#666] hover:text-[#f97316] px-2 py-1",children:"↓"},void 0,!1,void 0,this),S.jsxDEV("button",{onClick:()=>C(l.id),className:"text-[#666] hover:text-red-400 text-sm",children:"×"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},l.id,!0,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}function jI({agent:Y,providers:G,onUpdateAgent:U,onDeleteAgent:O}){let{authFetch:q,isDev:R}=P1(),[L,_]=w1.useState({name:Y.name,provider:Y.provider,model:Y.model,systemPrompt:Y.systemPrompt,features:{...Y.features,builtinTools:Y.features.builtinTools||{webSearch:!1,webFetch:!1}},mcpServers:[...Y.mcpServers||[]],skills:[...Y.skills||[]]}),[T,I]=w1.useState(!1),[F,N]=w1.useState(!1),[w,k]=w1.useState(null),[v,E]=w1.useState([]),[D,C]=w1.useState([]),[V,m]=w1.useState(null),[a,c]=w1.useState(!1);w1.useEffect(()=>{(async()=>{try{let _0=await(await q("/api/mcp/servers")).json();E(_0.servers||[])}catch(U0){console.error("Failed to fetch MCP servers:",U0)}})()},[q]),w1.useEffect(()=>{if(!R)return;(async()=>{try{let U0=await q(`/api/agents/${Y.id}/api-key`);if(U0.ok){let _0=await U0.json();m(_0.apiKey)}}catch(U0){}})()},[Y.id,R,q]),w1.useEffect(()=>{(async()=>{try{let _0=await(await q("/api/skills")).json();C(_0.skills||[])}catch(U0){console.error("Failed to fetch skills:",U0)}})()},[q]),w1.useEffect(()=>{_({name:Y.name,provider:Y.provider,model:Y.model,systemPrompt:Y.systemPrompt,features:{...Y.features,builtinTools:Y.features.builtinTools||{webSearch:!1,webFetch:!1}},mcpServers:[...Y.mcpServers||[]],skills:[...Y.skills||[]]}),k(null)},[Y.id]);let u=G.find((X0)=>X0.id===L.provider),Q0=G.filter((X0)=>X0.hasKey&&X0.type==="llm").map((X0)=>({value:X0.id,label:X0.name})),o=u?.models.map((X0)=>({value:X0.value,label:X0.label,recommended:X0.recommended}))||[],t=(X0)=>{let U0=G.find((J0)=>J0.id===X0),_0=U0?.models.find((J0)=>J0.recommended)?.value||U0?.models[0]?.value||"";_((J0)=>({...J0,provider:X0,model:_0}))},l=(X0)=>{if(X0==="agents"){let U0=(_0)=>{return _z(_0.features,Y.projectId).enabled};_((_0)=>{if(typeof _0.features.agents==="boolean"?_0.features.agents:_0.features.agents?.enabled??!1)return{..._0,features:{..._0.features,agents:!1}};else return{..._0,features:{..._0.features,agents:{enabled:!0,mode:"worker",group:Y.projectId||void 0}}}})}else _((U0)=>({...U0,features:{...U0.features,[X0]:!U0.features[X0]}}))},p=(X0)=>{_((U0)=>{let _0=_z(U0.features,Y.projectId);return{...U0,features:{...U0.features,agents:{..._0,enabled:!0,mode:X0}}}})},i=()=>{let X0=L.features.agents;if(typeof X0==="boolean")return X0;return X0?.enabled??!1},Z0=()=>{return _z(L.features,Y.projectId).mode||"worker"},I0=(X0)=>{_((U0)=>({...U0,mcpServers:U0.mcpServers.includes(X0)?U0.mcpServers.filter((_0)=>_0!==X0):[...U0.mcpServers,X0]}))},F0=(X0)=>{_((U0)=>({...U0,skills:U0.skills.includes(X0)?U0.skills.filter((_0)=>_0!==X0):[...U0.skills,X0]}))},Q1=async()=>{I(!0),k(null);let X0=await U(L);if(I(!1),X0.error)k({type:"error",text:X0.error});else k({type:"success",text:"Settings saved"}),setTimeout(()=>k(null),2000)},W1=L.name!==Y.name||L.provider!==Y.provider||L.model!==Y.model||L.systemPrompt!==Y.systemPrompt||JSON.stringify(L.features)!==JSON.stringify(Y.features)||JSON.stringify(L.mcpServers.sort())!==JSON.stringify((Y.mcpServers||[]).sort())||JSON.stringify(L.skills.sort())!==JSON.stringify((Y.skills||[]).sort());return S.jsxDEV("div",{className:"flex-1 overflow-auto p-4",children:S.jsxDEV("div",{className:"space-y-4",children:[S.jsxDEV(n7,{label:"Name",children:S.jsxDEV("input",{type:"text",value:L.name,onChange:(X0)=>_((U0)=>({...U0,name:X0.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),S.jsxDEV(n7,{label:"Provider",children:S.jsxDEV(V5,{value:L.provider,options:Q0,onChange:t},void 0,!1,void 0,this)},void 0,!1,void 0,this),S.jsxDEV(n7,{label:"Model",children:S.jsxDEV(V5,{value:L.model,options:o,onChange:(X0)=>_((U0)=>({...U0,model:X0}))},void 0,!1,void 0,this)},void 0,!1,void 0,this),S.jsxDEV(n7,{label:"System Prompt",children:S.jsxDEV("textarea",{value:L.systemPrompt,onChange:(X0)=>_((U0)=>({...U0,systemPrompt:X0.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),S.jsxDEV(n7,{label:"Features",children:S.jsxDEV("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-2",children:DI.map(({key:X0,label:U0,description:_0,icon:J0})=>{let d=X0==="agents"?i():!!L.features[X0];return S.jsxDEV("button",{type:"button",onClick:()=>l(X0),className:`flex items-center gap-3 p-3 rounded border text-left transition ${d?"border-[#f97316] bg-[#f97316]/10":"border-[#222] hover:border-[#333]"}`,children:[S.jsxDEV(J0,{className:`w-5 h-5 flex-shrink-0 ${d?"text-[#f97316]":"text-[#666]"}`},void 0,!1,void 0,this),S.jsxDEV("div",{className:"flex-1 min-w-0",children:[S.jsxDEV("div",{className:`text-sm font-medium ${d?"text-[#f97316]":""}`,children:U0},void 0,!1,void 0,this),S.jsxDEV("div",{className:"text-xs text-[#666]",children:_0},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},X0,!0,void 0,this)})},void 0,!1,void 0,this)},void 0,!1,void 0,this),i()&&S.jsxDEV(n7,{label:"Multi-Agent Mode",children:[S.jsxDEV("div",{className:"flex gap-2",children:[S.jsxDEV("button",{type:"button",onClick:()=>p("coordinator"),className:`flex-1 p-3 rounded border text-left transition ${Z0()==="coordinator"?"border-[#f97316] bg-[#f97316]/10":"border-[#222] hover:border-[#333]"}`,children:[S.jsxDEV("div",{className:`text-sm font-medium ${Z0()==="coordinator"?"text-[#f97316]":""}`,children:"Coordinator"},void 0,!1,void 0,this),S.jsxDEV("div",{className:"text-xs text-[#666]",children:"Orchestrates and delegates to other agents"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),S.jsxDEV("button",{type:"button",onClick:()=>p("worker"),className:`flex-1 p-3 rounded border text-left transition ${Z0()==="worker"?"border-[#f97316] bg-[#f97316]/10":"border-[#222] hover:border-[#333]"}`,children:[S.jsxDEV("div",{className:`text-sm font-medium ${Z0()==="worker"?"text-[#f97316]":""}`,children:"Worker"},void 0,!1,void 0,this),S.jsxDEV("div",{className:"text-xs text-[#666]",children:"Receives tasks from coordinators"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),Y.projectId&&S.jsxDEV("p",{className:"text-xs text-[#555] mt-2",children:"Group: Using project as agent group"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),L.provider==="anthropic"&&S.jsxDEV(n7,{label:"Agent Built-in Tools",children:[S.jsxDEV("div",{className:"flex flex-wrap gap-2",children:[S.jsxDEV("button",{type:"button",onClick:()=>_((X0)=>({...X0,features:{...X0.features,builtinTools:{...X0.features.builtinTools,webSearch:!X0.features.builtinTools?.webSearch}}})),className:`flex items-center gap-2 px-3 py-2 rounded border transition ${L.features.builtinTools?.webSearch?"border-[#f97316] bg-[#f97316]/10 text-[#f97316]":"border-[#222] hover:border-[#333] text-[#888]"}`,children:[S.jsxDEV("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:S.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"},void 0,!1,void 0,this)},void 0,!1,void 0,this),S.jsxDEV("span",{className:"text-sm",children:"Web Search"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),S.jsxDEV("button",{type:"button",onClick:()=>_((X0)=>({...X0,features:{...X0.features,builtinTools:{...X0.features.builtinTools,webFetch:!X0.features.builtinTools?.webFetch}}})),className:`flex items-center gap-2 px-3 py-2 rounded border transition ${L.features.builtinTools?.webFetch?"border-[#f97316] bg-[#f97316]/10 text-[#f97316]":"border-[#222] hover:border-[#333] text-[#888]"}`,children:[S.jsxDEV("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:S.jsxDEV("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"},void 0,!1,void 0,this)},void 0,!1,void 0,this),S.jsxDEV("span",{className:"text-sm",children:"Web Fetch"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),S.jsxDEV("p",{className:"text-xs text-[#555] mt-2",children:"Provider-native tools for real-time web access"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),L.features.mcp&&S.jsxDEV(n7,{label:"MCP Servers",children:v.length===0?S.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):S.jsxDEV("div",{className:"space-y-2",children:[v.filter((X0)=>X0.project_id===null||X0.project_id===Y.projectId).map((X0)=>{let U0=X0.type==="http"&&X0.url,_0=U0||X0.status==="running",J0=U0?`${X0.source||"remote"} • http`:`${X0.type} • ${X0.package||X0.command||"custom"}${X0.status==="running"&&X0.port?` • :${X0.port}`:""}`;return S.jsxDEV("button",{type:"button",onClick:()=>I0(X0.id),className:`w-full flex items-center gap-3 p-3 rounded border text-left transition ${L.mcpServers.includes(X0.id)?"border-[#f97316] bg-[#f97316]/10":"border-[#222] hover:border-[#333]"}`,children:[S.jsxDEV("div",{className:`w-2 h-2 rounded-full flex-shrink-0 ${_0?"bg-green-400":"bg-[#444]"}`},void 0,!1,void 0,this),S.jsxDEV("div",{className:"flex-1 min-w-0",children:[S.jsxDEV("div",{className:"flex items-center gap-2",children:[S.jsxDEV("span",{className:`text-sm font-medium ${L.mcpServers.includes(X0.id)?"text-[#f97316]":""}`,children:X0.name},void 0,!1,void 0,this),X0.project_id===null&&S.jsxDEV("span",{className:"text-[10px] text-[#666] bg-[#1a1a1a] px-1.5 py-0.5 rounded",children:"Global"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),S.jsxDEV("div",{className:"text-xs text-[#666]",children:J0},void 0,!1,void 0,this)]},void 0,!0,void 0,this),S.jsxDEV("div",{className:`text-xs px-2 py-0.5 rounded ${_0?"bg-green-500/20 text-green-400":"bg-[#222] text-[#666]"}`,children:U0?"remote":X0.status},void 0,!1,void 0,this)]},X0.id,!0,void 0,this)}),S.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),S.jsxDEV(n7,{label:"Skills",children:D.length===0?S.jsxDEV("p",{className:"text-sm text-[#666]",children:"No skills configured. Add skills in the Skills page first."},void 0,!1,void 0,this):S.jsxDEV("div",{className:"space-y-2",children:[D.filter((X0)=>X0.enabled&&(X0.project_id===null||X0.project_id===Y.projectId)).map((X0)=>S.jsxDEV("button",{type:"button",onClick:()=>F0(X0.id),className:`w-full flex items-center gap-3 p-3 rounded border text-left transition ${L.skills.includes(X0.id)?"border-[#f97316] bg-[#f97316]/10":"border-[#222] hover:border-[#333]"}`,children:[S.jsxDEV("div",{className:"flex-1 min-w-0",children:[S.jsxDEV("div",{className:"flex items-center gap-2",children:[S.jsxDEV("span",{className:`text-sm font-medium ${L.skills.includes(X0.id)?"text-[#f97316]":""}`,children:X0.name},void 0,!1,void 0,this),X0.project_id===null&&S.jsxDEV("span",{className:"text-[10px] text-[#666] bg-[#1a1a1a] px-1.5 py-0.5 rounded",children:"Global"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),S.jsxDEV("div",{className:"text-xs text-[#666]",children:X0.description},void 0,!1,void 0,this)]},void 0,!0,void 0,this),S.jsxDEV("div",{className:"text-xs px-2 py-0.5 rounded bg-[#222] text-[#666]",children:["v",X0.version]},void 0,!0,void 0,this)]},X0.id,!0,void 0,this)),S.jsxDEV("p",{className:"text-xs text-[#666] mt-2",children:"Skills provide reusable instructions for the agent."},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this),w&&S.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),S.jsxDEV("button",{onClick:Q1,disabled:!W1||T||!L.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:T?"Saving...":"Save Changes"},void 0,!1,void 0,this),Y.status==="running"&&W1&&S.jsxDEV("p",{className:"text-xs text-[#666] text-center",children:"Changes will be applied to the running agent"},void 0,!1,void 0,this),R&&V&&S.jsxDEV("div",{className:"mt-8 pt-6 border-t border-[#222]",children:[S.jsxDEV("p",{className:"text-sm text-[#666] mb-3",children:"Developer Info"},void 0,!1,void 0,this),S.jsxDEV("div",{className:"space-y-2",children:[S.jsxDEV("div",{className:"flex items-center justify-between",children:[S.jsxDEV("span",{className:"text-xs text-[#666]",children:"Agent ID"},void 0,!1,void 0,this),S.jsxDEV("code",{className:"text-xs bg-[#1a1a1a] px-2 py-1 rounded text-[#888]",children:Y.id},void 0,!1,void 0,this)]},void 0,!0,void 0,this),S.jsxDEV("div",{className:"flex items-center justify-between",children:[S.jsxDEV("span",{className:"text-xs text-[#666]",children:"Port"},void 0,!1,void 0,this),S.jsxDEV("code",{className:"text-xs bg-[#1a1a1a] px-2 py-1 rounded text-[#888]",children:Y.port||"N/A"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),S.jsxDEV("div",{className:"flex flex-col gap-1",children:[S.jsxDEV("div",{className:"flex items-center justify-between",children:[S.jsxDEV("span",{className:"text-xs text-[#666]",children:"API Key"},void 0,!1,void 0,this),S.jsxDEV("button",{onClick:()=>c(!a),className:"text-xs text-[#f97316] hover:text-[#fb923c]",children:a?"Hide":"Show"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),a&&S.jsxDEV("code",{className:"text-xs bg-[#1a1a1a] px-2 py-1 rounded text-[#888] break-all",children:V},void 0,!1,void 0,this)]},void 0,!0,void 0,this),Y.status==="running"&&Y.port&&S.jsxDEV("div",{className:"flex flex-col gap-1 mt-2",children:[S.jsxDEV("span",{className:"text-xs text-[#666]",children:"Test with curl"},void 0,!1,void 0,this),S.jsxDEV("code",{className:"text-xs bg-[#1a1a1a] px-2 py-1.5 rounded text-[#666] break-all",children:['curl -H "X-API-Key: ',a?V:"***",'" http://localhost:',Y.port,"/config"]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),S.jsxDEV("div",{className:"mt-8 pt-6 border-t border-[#222]",children:[S.jsxDEV("p",{className:"text-sm text-[#666] mb-3",children:"Danger Zone"},void 0,!1,void 0,this),F?S.jsxDEV("div",{className:"flex gap-2",children:[S.jsxDEV("button",{onClick:()=>N(!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),S.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):S.jsxDEV("button",{onClick:()=>N(!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 n7({label:Y,children:G}){return S.jsxDEV("div",{children:[S.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 GO=q0(k1(),1);var F4=q0(J1(),1);function w3({agents:Y,loading:G,selectedAgent:U,providers:O,onSelectAgent:q,onCloseAgent:R,onToggleAgent:L,onDeleteAgent:_,onUpdateAgent:T,onNewAgent:I,canCreateAgent:F=!0}){let{currentProjectId:N,currentProject:w}=g4(),k=GO.useMemo(()=>{if(N===null)return Y;if(N==="unassigned")return Y.filter((E)=>!E.projectId);return Y.filter((E)=>E.projectId===N)},[Y,N]),v=N===null?"Agents":N==="unassigned"?"Unassigned Agents":w?.name||"Agents";return F4.jsxDEV("div",{className:"flex-1 flex overflow-hidden relative",children:[F4.jsxDEV("div",{className:"flex-1 overflow-auto p-6",children:[F4.jsxDEV("div",{className:"flex items-center justify-between mb-6",children:[F4.jsxDEV("div",{className:"flex items-center gap-3",children:[w&&F4.jsxDEV("span",{className:"w-3 h-3 rounded-full",style:{backgroundColor:w.color}},void 0,!1,void 0,this),F4.jsxDEV("h1",{className:"text-xl font-semibold",children:v},void 0,!1,void 0,this),N!==null&&F4.jsxDEV("span",{className:"text-sm text-[#666]",children:["(",k.length," agent",k.length!==1?"s":"",")"]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),I&&F4.jsxDEV("button",{onClick:I,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?F4.jsxDEV(bz,{message:"Loading agents..."},void 0,!1,void 0,this):k.length===0?F4.jsxDEV(pI,{onNewAgent:I,canCreateAgent:F,hasProjectFilter:N!==null},void 0,!1,void 0,this):F4.jsxDEV("div",{className:"grid gap-4 md:grid-cols-2 xl:grid-cols-3 auto-rows-fr",children:k.map((E)=>F4.jsxDEV(R3,{agent:E,selected:U?.id===E.id,onSelect:()=>q(E),onToggle:(D)=>L(E,D),showProject:N===null},E.id,!1,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this),U&&F4.jsxDEV("div",{className:"absolute inset-0 bg-black/40 backdrop-blur-[2px] z-10",onClick:R},void 0,!1,void 0,this),U&&F4.jsxDEV("div",{className:"absolute right-0 top-0 bottom-0 w-full sm:w-[500px] lg:w-[600px] xl:w-[700px] z-20",children:F4.jsxDEV(b3,{agent:U,providers:O,onClose:R,onStartAgent:(E)=>L(U,E),onUpdateAgent:(E)=>T(U.id,E),onDeleteAgent:()=>_(U.id)},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}function pI({onNewAgent:Y,canCreateAgent:G,hasProjectFilter:U}){return F4.jsxDEV("div",{className:"text-center py-20 text-[#666]",children:[U?F4.jsxDEV(F4.Fragment,{children:[F4.jsxDEV("p",{className:"text-lg",children:"No agents in this project"},void 0,!1,void 0,this),F4.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):F4.jsxDEV(F4.Fragment,{children:[F4.jsxDEV("p",{className:"text-lg",children:"No agents yet"},void 0,!1,void 0,this),F4.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&&F4.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 w6=q0(k1(),1);var A1=q0(J1(),1);function M3({agents:Y,loading:G,runningCount:U,configuredProviders:O,onNavigate:q,onSelectAgent:R}){let{authFetch:L}=P1(),{currentProjectId:_}=g4(),[T,I]=w6.useState(null),[F,N]=w6.useState([]),w=w6.useMemo(()=>{if(!_)return Y;if(_==="unassigned")return Y.filter((V)=>!V.projectId);return Y.filter((V)=>V.projectId===_)},[Y,_]),k=w6.useMemo(()=>{return w.filter((V)=>V.status==="running").length},[w]),v=w6.useMemo(()=>{return new Set(w.map((V)=>V.id))},[w]),E=w6.useCallback(async()=>{try{let[V,m]=await Promise.all([L("/api/dashboard"),L("/api/tasks?status=all")]);if(V.ok){let a=await V.json();I(a)}if(m.ok){let a=await m.json();N((a.tasks||[]).slice(0,5))}}catch(V){console.error("Failed to fetch dashboard data:",V)}},[L]);w6.useEffect(()=>{E();let V=setInterval(E,1e4);return()=>clearInterval(V)},[E]);let D=w6.useMemo(()=>{if(!_)return F;return F.filter((V)=>v.has(V.agentId))},[F,_,v]),C=w6.useMemo(()=>{if(!_)return T?.tasks||{total:0,pending:0,running:0,completed:0};let V=D.length,m=D.filter((u)=>u.status==="pending").length,a=D.filter((u)=>u.status==="running").length,c=D.filter((u)=>u.status==="completed").length;return{total:V,pending:m,running:a,completed:c}},[T,_,D]);return A1.jsxDEV("div",{className:"flex-1 overflow-auto p-6",children:[A1.jsxDEV("div",{className:"grid grid-cols-2 sm:grid-cols-4 gap-4 mb-6",children:[A1.jsxDEV(F3,{label:"Agents",value:w.length,subValue:`${k} running`},void 0,!1,void 0,this),A1.jsxDEV(F3,{label:"Tasks",value:C.total,subValue:`${C.pending} pending`},void 0,!1,void 0,this),A1.jsxDEV(F3,{label:"Completed",value:C.completed,color:"text-green-400"},void 0,!1,void 0,this),A1.jsxDEV(F3,{label:"Providers",value:O.length,color:"text-[#f97316]"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),A1.jsxDEV("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[A1.jsxDEV(qO,{title:"Agents",actionLabel:"View All",onAction:()=>q("agents"),children:G?A1.jsxDEV("div",{className:"p-4 text-center text-[#666]",children:"Loading..."},void 0,!1,void 0,this):w.length===0?A1.jsxDEV("div",{className:"p-4 text-center text-[#666]",children:"No agents yet"},void 0,!1,void 0,this):A1.jsxDEV("div",{className:"divide-y divide-[#1a1a1a]",children:w.slice(0,5).map((V)=>A1.jsxDEV(cI,{agent:V,onSelect:()=>R(V),showProject:!_},V.id,!1,void 0,this))},void 0,!1,void 0,this)},void 0,!1,void 0,this),A1.jsxDEV(qO,{title:"Recent Tasks",actionLabel:"View All",onAction:()=>q("tasks"),children:D.length===0?A1.jsxDEV("div",{className:"p-4 text-center text-[#666]",children:[A1.jsxDEV("p",{children:"No tasks yet"},void 0,!1,void 0,this),A1.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):A1.jsxDEV("div",{className:"divide-y divide-[#1a1a1a]",children:D.map((V)=>A1.jsxDEV("div",{className:"px-4 py-3 flex items-center justify-between",children:[A1.jsxDEV("div",{className:"flex-1 min-w-0",children:[A1.jsxDEV("p",{className:"font-medium truncate",children:V.title},void 0,!1,void 0,this),A1.jsxDEV("p",{className:"text-sm text-[#666]",children:V.agentName},void 0,!1,void 0,this)]},void 0,!0,void 0,this),A1.jsxDEV(dI,{status:V.status},void 0,!1,void 0,this)]},`${V.agentId}-${V.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 F3({label:Y,value:G,subValue:U,color:O}){return A1.jsxDEV("div",{className:"bg-[#111] rounded p-4 border border-[#1a1a1a]",children:[A1.jsxDEV("p",{className:"text-sm text-[#666] mb-1",children:Y},void 0,!1,void 0,this),A1.jsxDEV("p",{className:`text-2xl font-semibold ${O||""}`,children:G},void 0,!1,void 0,this),U&&A1.jsxDEV("p",{className:"text-xs text-[#555] mt-1",children:U},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}function qO({title:Y,actionLabel:G,onAction:U,children:O}){return A1.jsxDEV("div",{className:"bg-[#111] rounded border border-[#1a1a1a] overflow-hidden",children:[A1.jsxDEV("div",{className:"px-4 py-3 border-b border-[#1a1a1a] flex items-center justify-between",children:[A1.jsxDEV("h3",{className:"font-semibold",children:Y},void 0,!1,void 0,this),A1.jsxDEV("button",{onClick:U,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 cI({agent:Y,onSelect:G,showProject:U}){let{isActive:O}=SZ(Y.id),{projects:q}=g4(),R=Y.projectId?q.find((L)=>L.id===Y.projectId):null;return A1.jsxDEV("div",{onClick:G,className:"px-4 py-3 hover:bg-[#1a1a1a] cursor-pointer flex items-center justify-between",children:[A1.jsxDEV("div",{className:"flex-1 min-w-0",children:[A1.jsxDEV("p",{className:"font-medium",children:Y.name},void 0,!1,void 0,this),A1.jsxDEV("div",{className:"flex items-center gap-2 text-sm text-[#666]",children:[A1.jsxDEV("span",{children:Y.provider},void 0,!1,void 0,this),U&&R&&A1.jsxDEV(A1.Fragment,{children:[A1.jsxDEV("span",{className:"text-[#444]",children:"·"},void 0,!1,void 0,this),A1.jsxDEV("span",{className:"flex items-center gap-1",children:[A1.jsxDEV("span",{className:"w-2 h-2 rounded-full",style:{backgroundColor:R.color}},void 0,!1,void 0,this),R.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),A1.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 dI({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 A1.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 h8=q0(k1(),1);var K4=q0(J1(),1);function P3({onSelectAgent:Y}){let{authFetch:G}=P1(),[U,O]=h8.useState([]),[q,R]=h8.useState(!0),[L,_]=h8.useState("all"),T=h8.useCallback(async()=>{try{let w=await(await G(`/api/tasks?status=${L}`)).json();O(w.tasks||[])}catch(N){console.error("Failed to fetch tasks:",N)}finally{R(!1)}},[G,L]);h8.useEffect(()=>{T();let N=setInterval(T,1e4);return()=>clearInterval(N)},[T]);let I={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 K4.jsxDEV("div",{className:"flex-1 p-4 md:p-6 overflow-auto",children:K4.jsxDEV("div",{className:"max-w-4xl",children:[K4.jsxDEV("div",{className:"mb-6",children:[K4.jsxDEV("div",{className:"mb-4",children:[K4.jsxDEV("h1",{className:"text-xl md:text-2xl font-semibold mb-1",children:"Tasks"},void 0,!1,void 0,this),K4.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),K4.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((N)=>K4.jsxDEV("button",{onClick:()=>_(N.value),className:`px-3 py-1.5 rounded text-sm transition whitespace-nowrap ${L===N.value?"bg-[#f97316] text-black":"bg-[#1a1a1a] hover:bg-[#222]"}`,children:N.label},N.value,!1,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this),q?K4.jsxDEV("div",{className:"text-center py-12 text-[#666]",children:"Loading tasks..."},void 0,!1,void 0,this):U.length===0?K4.jsxDEV("div",{className:"text-center py-12",children:[K4.jsxDEV(f6,{className:"w-12 h-12 mx-auto mb-4 text-[#333]"},void 0,!1,void 0,this),K4.jsxDEV("p",{className:"text-[#666]",children:"No tasks found"},void 0,!1,void 0,this),K4.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):K4.jsxDEV("div",{className:"space-y-3",children:U.map((N)=>K4.jsxDEV("div",{className:"bg-[#111] border border-[#1a1a1a] rounded-lg p-4 hover:border-[#333] transition",children:[K4.jsxDEV("div",{className:"flex items-start justify-between mb-2",children:[K4.jsxDEV("div",{className:"flex-1",children:[K4.jsxDEV("h3",{className:"font-medium",children:N.title},void 0,!1,void 0,this),K4.jsxDEV("p",{className:"text-sm text-[#666]",children:[N.agentName,N.execute_at&&K4.jsxDEV("span",{className:"ml-2",children:["· Scheduled: ",new Date(N.execute_at).toLocaleString()]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),K4.jsxDEV("span",{className:`px-2 py-1 rounded text-xs font-medium ${I[N.status]||I.pending}`,children:N.status},void 0,!1,void 0,this)]},void 0,!0,void 0,this),N.description&&K4.jsxDEV("p",{className:"text-sm text-[#888] mb-2 line-clamp-2",children:N.description},void 0,!1,void 0,this),K4.jsxDEV("div",{className:"flex flex-wrap items-center gap-x-4 gap-y-1 text-xs text-[#555]",children:[K4.jsxDEV("span",{children:["Type: ",N.type]},void 0,!0,void 0,this),K4.jsxDEV("span",{children:["Priority: ",N.priority]},void 0,!0,void 0,this),N.recurrence&&K4.jsxDEV("span",{children:["Recurrence: ",N.recurrence]},void 0,!0,void 0,this),K4.jsxDEV("span",{children:["Created: ",new Date(N.created_at).toLocaleString()]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},`${N.agentId}-${N.id}`,!0,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)}var z1=q0(k1(),1);var i4=q0(k1(),1);var b0=q0(J1(),1);function X2(Y){return Y.authSchemes.some((G)=>G.toUpperCase()==="API_KEY")}function UO(Y){return Y.authSchemes.some((G)=>G.toUpperCase()==="OAUTH2")}function lI(Y){return X2(Y)&&UO(Y)}function KO({providerId:Y="composio",onConnectionComplete:G}){let{authFetch:U}=P1(),[O,q]=i4.useState([]),[R,L]=i4.useState([]),[_,T]=i4.useState(!0),[I,F]=i4.useState(""),[N,w]=i4.useState(null),[k,v]=i4.useState(null),[E,D]=i4.useState(null),[C,V]=i4.useState(null),[m,a]=i4.useState(null),[c,u]=i4.useState(""),[Q0,o]=i4.useState(null),[t,l]=i4.useState(""),[p,i]=i4.useState(!1),[Z0,I0]=i4.useState(null),[F0,Q1]=i4.useState(null),W1=i4.useCallback(async()=>{T(!0),D(null);try{let[L0,a0]=await Promise.all([U(`/api/integrations/${Y}/apps`),U(`/api/integrations/${Y}/connected`)]),f1=await L0.json(),q4=await a0.json();q(f1.apps||[]),L(q4.accounts||[])}catch(L0){console.error("Failed to fetch integrations:",L0),D("Failed to load integrations")}T(!1)},[U,Y]);i4.useEffect(()=>{W1()},[W1]),i4.useEffect(()=>{if(new URLSearchParams(window.location.search).get("connected"))window.history.replaceState({},"",window.location.pathname),W1(),G?.()},[W1,G]),i4.useEffect(()=>{if(!k?.connectionId)return;let L0=setInterval(async()=>{try{let f1=await(await U(`/api/integrations/${Y}/connection/${k.connectionId}`)).json();if(f1.connection?.status==="active")v(null),w(null),W1(),G?.();else if(f1.connection?.status==="failed")v(null),w(null),D(`Connection to ${k.appSlug} failed`)}catch(a0){}},2000);return()=>clearInterval(L0)},[k,U,Y,W1,G]);let X0=async(L0,a0,f1)=>{if(lI(L0)&&!a0&&!f1){V({app:L0});return}if(X2(L0)&&!a0&&!f1){a({app:L0}),u("");return}w(L0.slug),D(null);try{let q4={appSlug:L0.slug};if(a0)q4.credentials={authScheme:"API_KEY",apiKey:a0};let h4=await U(`/api/integrations/${Y}/connect`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(q4)}),x1=await h4.json();if(!h4.ok){D(x1.error||"Failed to initiate connection"),w(null),a(null);return}if(x1.status==="active"||!x1.redirectUrl){w(null),a(null),W1(),G?.();return}if(x1.redirectUrl){v({appSlug:L0.slug,connectionId:x1.connectionId});let K1=window.open(x1.redirectUrl,`connect-${L0.slug}`,"width=600,height=700,left=200,top=100");if(!K1||K1.closed)window.location.href=x1.redirectUrl}}catch(q4){D(`Failed to connect: ${q4}`),w(null),a(null)}},U0=(L0)=>{if(L0.preventDefault(),!m||!c.trim())return;X0(m.app,c.trim())},_0=async(L0)=>{try{let a0=await U(`/api/integrations/${Y}/connection/${L0.id}`,{method:"DELETE"});if(a0.ok)W1();else{let f1=await a0.json();D(f1.error||"Failed to disconnect")}}catch(a0){D(`Failed to disconnect: ${a0}`)}},J0=(L0)=>{o({app:L0}),l(`${L0.name} MCP`),I0(null)},d=async()=>{if(!Q0||!t.trim())return;i(!0),D(null);try{let L0=await U(`/api/integrations/${Y}/configs`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:t.replace(/[^a-zA-Z0-9\s-]/g,"").substring(0,30),toolkitSlug:Q0.app.slug})}),a0=await L0.json();if(!L0.ok){D(a0.error||"Failed to create MCP config"),i(!1);return}I0(t),G?.()}catch(L0){D(`Failed to create MCP config: ${L0}`)}finally{i(!1)}},P0=(L0)=>{Q1({message:`Disconnect ${L0.appName}?`,onConfirm:()=>{_0(L0),Q1(null)}})},v0=(L0)=>{return R.some((a0)=>a0.appId===L0&&a0.status==="active")},X1=(L0)=>{return R.find((a0)=>a0.appId===L0)},r0=O.filter((L0)=>{if(!I)return!0;let a0=I.toLowerCase();return L0.name.toLowerCase().includes(a0)||L0.slug.toLowerCase().includes(a0)||L0.description?.toLowerCase().includes(a0)||L0.categories.some((f1)=>f1.toLowerCase().includes(a0))}),V0=r0.filter((L0)=>v0(L0.slug)),H1=r0.filter((L0)=>!v0(L0.slug));if(_)return b0.jsxDEV("div",{className:"text-center py-8 text-[#666]",children:"Loading apps..."},void 0,!1,void 0,this);return b0.jsxDEV("div",{className:"space-y-6",children:[C&&b0.jsxDEV("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50",children:b0.jsxDEV("div",{className:"bg-[#111] border border-[#333] rounded-lg p-6 w-full max-w-md mx-4",children:[b0.jsxDEV("div",{className:"flex items-center gap-3 mb-4",children:[C.app.logo&&b0.jsxDEV("img",{src:C.app.logo,alt:C.app.name,className:"w-10 h-10 object-contain"},void 0,!1,void 0,this),b0.jsxDEV("div",{children:[b0.jsxDEV("h3",{className:"font-medium",children:["Connect ",C.app.name]},void 0,!0,void 0,this),b0.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),b0.jsxDEV("div",{className:"space-y-3",children:[b0.jsxDEV("button",{onClick:()=>{V(null),a({app:C.app}),u("")},className:"w-full text-left p-3 bg-[#0a0a0a] hover:bg-[#1a1a1a] border border-[#333] hover:border-[#f97316] rounded-lg transition",children:[b0.jsxDEV("div",{className:"font-medium text-sm",children:"API Key"},void 0,!1,void 0,this),b0.jsxDEV("div",{className:"text-xs text-[#666] mt-0.5",children:["Enter your ",C.app.name," API key directly"]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),b0.jsxDEV("button",{onClick:()=>{V(null),X0(C.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:[b0.jsxDEV("div",{className:"font-medium text-sm",children:"OAuth"},void 0,!1,void 0,this),b0.jsxDEV("div",{className:"text-xs text-[#666] mt-0.5",children:["Sign in with your ",C.app.name," account"]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),b0.jsxDEV("button",{onClick:()=>V(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),m&&b0.jsxDEV("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50",children:b0.jsxDEV("div",{className:"bg-[#111] border border-[#333] rounded-lg p-6 w-full max-w-md mx-4",children:[b0.jsxDEV("div",{className:"flex items-center gap-3 mb-4",children:[m.app.logo&&b0.jsxDEV("img",{src:m.app.logo,alt:m.app.name,className:"w-10 h-10 object-contain"},void 0,!1,void 0,this),b0.jsxDEV("div",{children:[b0.jsxDEV("h3",{className:"font-medium",children:["Connect ",m.app.name]},void 0,!0,void 0,this),b0.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),b0.jsxDEV("form",{onSubmit:U0,children:[b0.jsxDEV("input",{type:"password",value:c,onChange:(L0)=>u(L0.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),b0.jsxDEV("div",{className:"flex gap-2",children:[b0.jsxDEV("button",{type:"button",onClick:()=>a(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),b0.jsxDEV("button",{type:"submit",disabled:!c.trim()||N===m.app.slug,className:"flex-1 text-sm bg-[#f97316] hover:bg-[#ea580c] text-white px-4 py-2 rounded transition disabled:opacity-50",children:N===m.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),Q0&&b0.jsxDEV("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50",children:b0.jsxDEV("div",{className:"bg-[#111] border border-[#333] rounded-lg p-6 w-full max-w-md mx-4",children:Z0?b0.jsxDEV(b0.Fragment,{children:[b0.jsxDEV("div",{className:"text-center mb-4",children:[b0.jsxDEV("div",{className:"w-12 h-12 bg-green-500/20 rounded-full flex items-center justify-center mx-auto mb-3",children:b0.jsxDEV("span",{className:"text-green-400 text-2xl",children:"✓"},void 0,!1,void 0,this)},void 0,!1,void 0,this),b0.jsxDEV("h3",{className:"font-medium text-lg",children:"MCP Config Created!"},void 0,!1,void 0,this),b0.jsxDEV("p",{className:"text-sm text-[#888] mt-2",children:['"',Z0,'" has been created successfully.']},void 0,!0,void 0,this),b0.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),b0.jsxDEV("button",{onClick:()=>{o(null),I0(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):b0.jsxDEV(b0.Fragment,{children:[b0.jsxDEV("div",{className:"flex items-center gap-3 mb-4",children:[Q0.app.logo&&b0.jsxDEV("img",{src:Q0.app.logo,alt:Q0.app.name,className:"w-10 h-10 object-contain"},void 0,!1,void 0,this),b0.jsxDEV("div",{children:[b0.jsxDEV("h3",{className:"font-medium",children:"Create MCP Config"},void 0,!1,void 0,this),b0.jsxDEV("p",{className:"text-xs text-[#666]",children:["Create an MCP config for ",Q0.app.name]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),b0.jsxDEV("form",{onSubmit:(L0)=>{L0.preventDefault(),d()},children:[b0.jsxDEV("label",{className:"block text-xs text-[#888] mb-1",children:"Config Name"},void 0,!1,void 0,this),b0.jsxDEV("input",{type:"text",value:t,onChange:(L0)=>l(L0.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),b0.jsxDEV("div",{className:"flex gap-2",children:[b0.jsxDEV("button",{type:"button",onClick:()=>o(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),b0.jsxDEV("button",{type:"submit",disabled:!t.trim()||p,className:"flex-1 text-sm bg-[#f97316] hover:bg-[#ea580c] text-white px-4 py-2 rounded transition disabled:opacity-50",children:p?"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),F0&&b0.jsxDEV("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50",children:b0.jsxDEV("div",{className:"bg-[#111] border border-[#333] rounded-lg p-6 w-full max-w-sm mx-4",children:[b0.jsxDEV("p",{className:"text-center mb-4",children:F0.message},void 0,!1,void 0,this),b0.jsxDEV("div",{className:"flex gap-2",children:[b0.jsxDEV("button",{onClick:()=>Q1(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),b0.jsxDEV("button",{onClick:F0.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),E&&b0.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:[b0.jsxDEV("span",{children:E},void 0,!1,void 0,this),b0.jsxDEV("button",{onClick:()=>D(null),className:"text-red-400 hover:text-red-300",children:"×"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),k&&b0.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:[b0.jsxDEV("span",{className:"animate-spin",children:"⟳"},void 0,!1,void 0,this),b0.jsxDEV("span",{children:["Waiting for ",k.appSlug," authorization..."]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),b0.jsxDEV("div",{children:b0.jsxDEV("input",{type:"text",value:I,onChange:(L0)=>F(L0.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),V0.length>0&&b0.jsxDEV("div",{children:[b0.jsxDEV("h3",{className:"text-sm font-medium text-[#888] mb-3",children:["Connected (",V0.length,")"]},void 0,!0,void 0,this),b0.jsxDEV("div",{className:"grid gap-3 sm:grid-cols-2 lg:grid-cols-3",children:V0.map((L0)=>b0.jsxDEV(BO,{app:L0,connection:X1(L0.slug),onConnect:()=>X0(L0),onDisconnect:()=>{let a0=X1(L0.slug);if(a0)P0(a0)},onCreateMcpConfig:()=>J0(L0),connecting:N===L0.slug},L0.id,!1,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this),b0.jsxDEV("div",{children:[b0.jsxDEV("h3",{className:"text-sm font-medium text-[#888] mb-3",children:["Available Apps (",H1.length,")"]},void 0,!0,void 0,this),H1.length===0?b0.jsxDEV("p",{className:"text-[#666] text-sm",children:I?"No apps match your search":"No apps available"},void 0,!1,void 0,this):b0.jsxDEV("div",{className:"grid gap-3 sm:grid-cols-2 lg:grid-cols-3",children:H1.slice(0,50).map((L0)=>b0.jsxDEV(BO,{app:L0,onConnect:()=>X0(L0),connecting:N===L0.slug},L0.id,!1,void 0,this))},void 0,!1,void 0,this),H1.length>50&&b0.jsxDEV("p",{className:"text-xs text-[#555] mt-3 text-center",children:["Showing first 50 of ",H1.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 BO({app:Y,connection:G,onConnect:U,onDisconnect:O,onCreateMcpConfig:q,connecting:R}){let L=G?.status==="active",_=X2(Y),T=UO(Y),I=_&&T;return b0.jsxDEV("div",{className:`bg-[#111] border rounded-lg p-3 transition ${L?"border-green-500/30":"border-[#1a1a1a] hover:border-[#333]"}`,children:[b0.jsxDEV("div",{className:"flex items-start gap-3",children:[b0.jsxDEV("div",{className:"w-10 h-10 rounded bg-[#1a1a1a] flex items-center justify-center flex-shrink-0 overflow-hidden",children:Y.logo?b0.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):b0.jsxDEV("span",{className:"text-lg",children:Y.name[0]?.toUpperCase()},void 0,!1,void 0,this)},void 0,!1,void 0,this),b0.jsxDEV("div",{className:"flex-1 min-w-0",children:[b0.jsxDEV("div",{className:"flex items-center gap-2",children:[b0.jsxDEV("h4",{className:"font-medium text-sm truncate",children:Y.name},void 0,!1,void 0,this),L&&b0.jsxDEV("span",{className:"text-xs text-green-400",children:"✓"},void 0,!1,void 0,this),!L&&_&&!T&&b0.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&&I&&b0.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&&b0.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&&b0.jsxDEV("div",{className:"flex flex-wrap gap-1 mt-1",children:Y.categories.slice(0,2).map((F)=>b0.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),b0.jsxDEV("div",{className:"mt-3 flex gap-2",children:L?b0.jsxDEV(b0.Fragment,{children:[q&&b0.jsxDEV("button",{onClick:q,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&&b0.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):b0.jsxDEV("button",{onClick:U,disabled:R,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:R?"Connecting...":_&&!T?"Enter API Key":"Connect"},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}var M=q0(J1(),1);function A3(){let{authFetch:Y}=P1(),{projects:G,currentProjectId:U}=g4(),[O,q]=z1.useState([]),[R,L]=z1.useState(!0),[_,T]=z1.useState(!1),[I,F]=z1.useState(null),[N,w]=z1.useState(null),[k,v]=z1.useState("servers"),{confirm:E,ConfirmDialog:D}=S6(),C=G.length>0,V=async()=>{try{let l=await(await Y("/api/mcp/servers")).json();q(l.servers||[])}catch(t){console.error("Failed to fetch MCP servers:",t)}L(!1)};z1.useEffect(()=>{V()},[Y]);let m=O.filter((t)=>{if(!U)return!0;if(U==="unassigned")return t.project_id===null;return t.project_id===null||t.project_id===U}),a=async(t)=>{try{await Y(`/api/mcp/servers/${t}/start`,{method:"POST"}),V()}catch(l){console.error("Failed to start server:",l)}},c=async(t)=>{try{await Y(`/api/mcp/servers/${t}/stop`,{method:"POST"}),V()}catch(l){console.error("Failed to stop server:",l)}},u=async(t)=>{if(!await E("Delete this MCP server?",{confirmText:"Delete",title:"Delete Server"}))return;try{if(await Y(`/api/mcp/servers/${t}`,{method:"DELETE"}),N?.id===t)w(null);V()}catch(p){console.error("Failed to delete server:",p)}},Q0=async(t,l)=>{try{await Y(`/api/mcp/servers/${t}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:l})}),V()}catch(p){console.error("Failed to rename server:",p)}},o=async(t,l)=>{try{await Y(`/api/mcp/servers/${t}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(l)}),V()}catch(p){throw console.error("Failed to update server:",p),p}};return M.jsxDEV(M.Fragment,{children:[D,M.jsxDEV("div",{className:"flex-1 overflow-auto p-6",children:[M.jsxDEV("div",{className:"max-w-6xl",children:[M.jsxDEV("div",{className:"flex items-center justify-between mb-6",children:[M.jsxDEV("div",{children:[M.jsxDEV("h1",{className:"text-2xl font-semibold mb-1",children:"MCP Servers"},void 0,!1,void 0,this),M.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),k==="servers"&&M.jsxDEV("button",{onClick:()=>T(!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),M.jsxDEV("div",{className:"flex gap-1 mb-6 bg-[#111] border border-[#1a1a1a] rounded-lg p-1 w-fit",children:[M.jsxDEV("button",{onClick:()=>v("servers"),className:`px-4 py-2 rounded text-sm font-medium transition ${k==="servers"?"bg-[#1a1a1a] text-white":"text-[#666] hover:text-[#888]"}`,children:"My Servers"},void 0,!1,void 0,this),M.jsxDEV("button",{onClick:()=>v("hosted"),className:`px-4 py-2 rounded text-sm font-medium transition ${k==="hosted"?"bg-[#1a1a1a] text-white":"text-[#666] hover:text-[#888]"}`,children:"Hosted Services"},void 0,!1,void 0,this),M.jsxDEV("button",{onClick:()=>v("registry"),className:`px-4 py-2 rounded text-sm font-medium transition ${k==="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),k==="servers"&&M.jsxDEV(M.Fragment,{children:[R&&M.jsxDEV("div",{className:"text-center py-8 text-[#666]",children:"Loading..."},void 0,!1,void 0,this),!R&&m.length===0&&O.length===0&&M.jsxDEV("div",{className:"bg-[#111] border border-[#1a1a1a] rounded-lg p-8 text-center",children:[M.jsxDEV(h6,{className:"w-12 h-12 text-[#333] mx-auto mb-4"},void 0,!1,void 0,this),M.jsxDEV("h3",{className:"text-lg font-medium mb-2",children:"No MCP servers configured"},void 0,!1,void 0,this),M.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),M.jsxDEV("div",{className:"flex gap-3 justify-center",children:[M.jsxDEV("button",{onClick:()=>T(!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),M.jsxDEV("button",{onClick:()=>v("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),!R&&m.length===0&&O.length>0&&M.jsxDEV("div",{className:"bg-[#111] border border-[#1a1a1a] rounded-lg p-6 text-center",children:M.jsxDEV("p",{className:"text-[#666]",children:"No servers match this filter."},void 0,!1,void 0,this)},void 0,!1,void 0,this),!R&&m.length>0&&M.jsxDEV("div",{className:"flex gap-6",children:[M.jsxDEV("div",{className:`space-y-3 ${N?"w-1/2":"w-full"}`,children:m.map((t)=>{let p=t.type==="http"&&t.url||t.status==="running",i=C&&t.project_id?G.find((Z0)=>Z0.id===t.project_id):null;return M.jsxDEV(iI,{server:t,project:i,selected:N?.id===t.id,onSelect:()=>w(p?t:null),onStart:()=>a(t.id),onStop:()=>c(t.id),onDelete:()=>u(t.id),onEdit:()=>F(t)},t.id,!1,void 0,this)})},void 0,!1,void 0,this),N&&M.jsxDEV("div",{className:"w-1/2",children:M.jsxDEV(oI,{server:N,onClose:()=>w(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),k==="hosted"&&M.jsxDEV(rI,{onServerAdded:V},void 0,!1,void 0,this),k==="registry"&&M.jsxDEV(nI,{onInstall:(t)=>{V(),v("servers")}},void 0,!1,void 0,this),k==="servers"&&M.jsxDEV("div",{className:"mt-8 p-4 bg-[#111] border border-[#1a1a1a] rounded-lg",children:[M.jsxDEV("h3",{className:"font-medium mb-2",children:"Quick Start"},void 0,!1,void 0,this),M.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),M.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((t)=>M.jsxDEV("code",{className:"text-xs bg-[#0a0a0a] px-2 py-1 rounded",children:t.pkg},t.name,!1,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),_&&M.jsxDEV(sI,{onClose:()=>T(!1),onAdded:()=>{T(!1),V()},projects:C?G:void 0,defaultProjectId:U&&U!=="unassigned"?U:null},void 0,!1,void 0,this),I&&M.jsxDEV(eI,{server:I,projects:C?G:void 0,onClose:()=>F(null),onSaved:()=>{F(null),V()}},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}function iI({server:Y,project:G,selected:U,onSelect:O,onStart:q,onStop:R,onDelete:L,onEdit:_}){let T=Y.type==="http"&&Y.url,I=T||Y.status==="running",F=()=>{if(T)return`${Y.source||"remote"} • http`;return`${Y.type} • ${Y.package||Y.command||"custom"}${Y.status==="running"&&Y.port?` • :${Y.port}`:""}`},N=()=>{if(G)return M.jsxDEV("span",{className:"text-xs px-1.5 py-0.5 rounded",style:{backgroundColor:`${G.color}20`,color:G.color},children:G.name},void 0,!1,void 0,this);if(Y.project_id===null)return M.jsxDEV("span",{className:"text-xs text-[#666] bg-[#1a1a1a] px-1.5 py-0.5 rounded",children:"Global"},void 0,!1,void 0,this);return null};return M.jsxDEV("div",{className:`bg-[#111] border rounded-lg p-4 cursor-pointer transition ${U?"border-[#f97316]":"border-[#1a1a1a] hover:border-[#333]"}`,onClick:I?O:void 0,children:M.jsxDEV("div",{className:"flex items-center justify-between",children:[M.jsxDEV("div",{className:"flex items-center gap-3",children:[M.jsxDEV("div",{className:`w-2 h-2 rounded-full ${I?"bg-green-400":"bg-[#444]"}`},void 0,!1,void 0,this),M.jsxDEV("div",{children:[M.jsxDEV("div",{className:"flex items-center gap-2",children:[M.jsxDEV("h3",{className:"font-medium",children:Y.name},void 0,!1,void 0,this),N()]},void 0,!0,void 0,this),M.jsxDEV("p",{className:"text-sm text-[#666]",children:F()},void 0,!1,void 0,this)]},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)=>{w.stopPropagation(),_()},className:"text-sm text-[#666] hover:text-[#888] px-3 py-1 transition",title:"Edit server settings",children:"Edit"},void 0,!1,void 0,this),T?M.jsxDEV("button",{onClick:(w)=>{w.stopPropagation(),L()},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"?M.jsxDEV(M.Fragment,{children:[M.jsxDEV("button",{onClick:(w)=>{w.stopPropagation(),O()},className:"text-sm text-[#f97316] hover:text-[#fb923c] px-3 py-1 transition",children:"Tools"},void 0,!1,void 0,this),M.jsxDEV("button",{onClick:(w)=>{w.stopPropagation(),R()},className:"text-sm text-[#666] hover:text-red-400 px-3 py-1 transition",children:"Stop"},void 0,!1,void 0,this),M.jsxDEV("button",{onClick:(w)=>{w.stopPropagation(),L()},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):M.jsxDEV(M.Fragment,{children:[M.jsxDEV("button",{onClick:(w)=>{w.stopPropagation(),q()},className:"text-sm text-[#666] hover:text-green-400 px-3 py-1 transition",children:"Start"},void 0,!1,void 0,this),M.jsxDEV("button",{onClick:(w)=>{w.stopPropagation(),L()},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,!0,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)}function oI({server:Y,onClose:G}){let{authFetch:U}=P1(),[O,q]=z1.useState([]),[R,L]=z1.useState(null),[_,T]=z1.useState(!0),[I,F]=z1.useState(null),[N,w]=z1.useState(null);return z1.useEffect(()=>{(async()=>{T(!0),F(null);try{let v=await U(`/api/mcp/servers/${Y.id}/tools`),E=await v.json();if(!v.ok){F(E.error||"Failed to fetch tools");return}q(E.tools||[]),L(E.serverInfo||null)}catch(v){F(`Failed to fetch tools: ${v}`)}finally{T(!1)}})()},[Y.id,U]),M.jsxDEV("div",{className:"bg-[#111] border border-[#1a1a1a] rounded-lg overflow-hidden",children:[M.jsxDEV("div",{className:"p-4 border-b border-[#1a1a1a] flex items-center justify-between",children:[M.jsxDEV("div",{children:[M.jsxDEV("h3",{className:"font-medium",children:[Y.name," Tools"]},void 0,!0,void 0,this),R&&M.jsxDEV("p",{className:"text-xs text-[#666]",children:[R.name," v",R.version]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),M.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),M.jsxDEV("div",{className:"p-4 max-h-[500px] overflow-auto",children:[_&&M.jsxDEV("p",{className:"text-[#666]",children:"Loading tools..."},void 0,!1,void 0,this),I&&M.jsxDEV("div",{className:"text-red-400 text-sm p-3 bg-red-500/10 rounded",children:I},void 0,!1,void 0,this),!_&&!I&&O.length===0&&M.jsxDEV("p",{className:"text-[#666]",children:"No tools available from this server."},void 0,!1,void 0,this),!_&&!I&&O.length>0&&!N&&M.jsxDEV("div",{className:"space-y-2",children:O.map((k)=>M.jsxDEV("button",{onClick:()=>w(k),className:"w-full text-left p-3 bg-[#0a0a0a] hover:bg-[#1a1a1a] border border-[#222] hover:border-[#333] rounded transition",children:[M.jsxDEV("div",{className:"font-medium text-sm",children:k.name},void 0,!1,void 0,this),k.description&&M.jsxDEV("div",{className:"text-xs text-[#666] mt-1",children:k.description},void 0,!1,void 0,this)]},k.name,!0,void 0,this))},void 0,!1,void 0,this),N&&M.jsxDEV(aI,{serverId:Y.id,tool:N,onBack:()=>w(null)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}function aI({serverId:Y,tool:G,onBack:U}){let{authFetch:O}=P1(),[q,R]=z1.useState("{}"),[L,_]=z1.useState(null),[T,I]=z1.useState(null),[F,N]=z1.useState(!1);z1.useEffect(()=>{let k=G.inputSchema;if(k&&typeof k==="object"&&"properties"in k){let v=k.properties,E={};for(let[D,C]of Object.entries(v))if(C.default!==void 0)E[D]=C.default;else if(C.type==="string")E[D]="";else if(C.type==="number"||C.type==="integer")E[D]=0;else if(C.type==="boolean")E[D]=!1;else if(C.type==="array")E[D]=[];else if(C.type==="object")E[D]={};R(JSON.stringify(E,null,2))}},[G]);let w=async()=>{N(!0),I(null),_(null);try{let k=JSON.parse(q),v=await O(`/api/mcp/servers/${Y}/tools/${encodeURIComponent(G.name)}/call`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({arguments:k})}),E=await v.json();if(!v.ok){I(E.error||"Failed to call tool");return}_(E.result)}catch(k){I(`Error: ${k}`)}finally{N(!1)}};return M.jsxDEV("div",{className:"space-y-4",children:[M.jsxDEV("div",{className:"flex items-center gap-2",children:[M.jsxDEV("button",{onClick:U,className:"text-[#666] hover:text-[#888] text-sm",children:"← Back"},void 0,!1,void 0,this),M.jsxDEV("span",{className:"text-[#444]",children:"/"},void 0,!1,void 0,this),M.jsxDEV("span",{className:"font-medium",children:G.name},void 0,!1,void 0,this)]},void 0,!0,void 0,this),G.description&&M.jsxDEV("p",{className:"text-sm text-[#666]",children:G.description},void 0,!1,void 0,this),G.inputSchema&&M.jsxDEV("div",{className:"text-xs",children:M.jsxDEV("details",{className:"cursor-pointer",children:[M.jsxDEV("summary",{className:"text-[#666] hover:text-[#888]",children:"Input Schema"},void 0,!1,void 0,this),M.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),M.jsxDEV("div",{children:[M.jsxDEV("label",{className:"block text-sm text-[#666] mb-1",children:"Arguments (JSON)"},void 0,!1,void 0,this),M.jsxDEV("textarea",{value:q,onChange:(k)=>R(k.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),M.jsxDEV("button",{onClick:w,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&&M.jsxDEV("div",{className:"text-red-400 text-sm p-3 bg-red-500/10 rounded",children:T},void 0,!1,void 0,this),L&&M.jsxDEV("div",{className:"space-y-2",children:[M.jsxDEV("div",{className:"text-sm text-[#666]",children:["Result ",L.isError&&M.jsxDEV("span",{className:"text-red-400",children:"(error)"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),M.jsxDEV("div",{className:`p-3 rounded text-sm ${L.isError?"bg-red-500/10":"bg-green-500/10"}`,children:L.content.map((k,v)=>M.jsxDEV("div",{className:"mb-2 last:mb-0",children:[k.type==="text"&&M.jsxDEV("pre",{className:"whitespace-pre-wrap font-mono text-xs",children:k.text},void 0,!1,void 0,this),k.type==="image"&&k.data&&M.jsxDEV("img",{src:`data:${k.mimeType||"image/png"};base64,${k.data}`,alt:"Tool result",className:"max-w-full rounded"},void 0,!1,void 0,this)]},v,!0,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}function nI({onInstall:Y}){let{authFetch:G}=P1(),[U,O]=z1.useState(""),[q,R]=z1.useState([]),[L,_]=z1.useState(!1),[T,I]=z1.useState(!1),[F,N]=z1.useState(null),[w,k]=z1.useState(null),v=async(C)=>{_(!0),k(null);try{let V=await G(`/api/mcp/registry?search=${encodeURIComponent(C)}&limit=20`),m=await V.json();if(!V.ok)k(m.error||"Failed to search registry"),R([]);else R(m.servers||[])}catch(V){k(`Failed to search: ${V}`),R([])}finally{_(!1),I(!0)}},E=(C)=>{if(C.preventDefault(),U.trim())v(U.trim())};z1.useEffect(()=>{v("")},[]);let D=async(C)=>{if(!C.npmPackage){k("This server does not have an npm package");return}N(C.id),k(null);try{let V=await G("/api/mcp/servers",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:C.name,type:"npm",package:C.npmPackage})});if(!V.ok){let m=await V.json();k(m.error||"Failed to add server");return}Y(C)}catch(V){k(`Failed to add server: ${V}`)}finally{N(null)}};return M.jsxDEV("div",{className:"space-y-6",children:[M.jsxDEV("form",{onSubmit:E,className:"flex gap-2",children:[M.jsxDEV("input",{type:"text",value:U,onChange:(C)=>O(C.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),M.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),w&&M.jsxDEV("div",{className:"text-red-400 text-sm p-3 bg-red-500/10 border border-red-500/20 rounded-lg",children:w},void 0,!1,void 0,this),!L&&T&&q.length===0&&M.jsxDEV("div",{className:"text-center py-8 text-[#666]",children:"No servers found. Try a different search term."},void 0,!1,void 0,this),q.length>0&&M.jsxDEV("div",{className:"grid gap-4 md:grid-cols-2",children:q.map((C)=>M.jsxDEV("div",{className:"bg-[#111] border border-[#1a1a1a] rounded-lg p-4 hover:border-[#333] transition",children:M.jsxDEV("div",{className:"flex items-start justify-between gap-3",children:[M.jsxDEV("div",{className:"flex-1 min-w-0",children:[M.jsxDEV("h3",{className:"font-medium truncate",children:C.name},void 0,!1,void 0,this),M.jsxDEV("p",{className:"text-sm text-[#666] mt-1 line-clamp-2",children:C.description||"No description"},void 0,!1,void 0,this),M.jsxDEV("div",{className:"flex items-center gap-2 mt-2 text-xs text-[#555]",children:[C.version&&M.jsxDEV("span",{children:["v",C.version]},void 0,!0,void 0,this),M.jsxDEV("span",{className:`px-1.5 py-0.5 rounded ${C.npmPackage?"bg-green-500/10 text-green-400":"bg-blue-500/10 text-blue-400"}`,children:C.npmPackage?"npm":"remote"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),M.jsxDEV("code",{className:"text-xs text-[#555] bg-[#0a0a0a] px-2 py-0.5 rounded mt-2 inline-block truncate max-w-full",children:C.npmPackage||C.fullName},void 0,!1,void 0,this)]},void 0,!0,void 0,this),M.jsxDEV("div",{className:"flex-shrink-0",children:C.npmPackage?M.jsxDEV("button",{onClick:()=>D(C),disabled:F===C.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===C.id?"Adding...":"Add"},void 0,!1,void 0,this):C.repository?M.jsxDEV("a",{href:C.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)},C.id,!1,void 0,this))},void 0,!1,void 0,this),L&&M.jsxDEV("div",{className:"text-center py-8 text-[#666]",children:"Searching registry..."},void 0,!1,void 0,this),M.jsxDEV("div",{className:"p-4 bg-[#111] border border-[#1a1a1a] rounded-lg text-sm text-[#666]",children:M.jsxDEV("p",{children:["Servers are sourced from the"," ",M.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 rI({onServerAdded:Y}){let{authFetch:G}=P1(),[U,O]=z1.useState("configs"),[q,R]=z1.useState(!1),[L,_]=z1.useState(!1),[T,I]=z1.useState(!1),[F,N]=z1.useState([]),[w,k]=z1.useState(new Set),[v,E]=z1.useState(!0),[D,C]=z1.useState(!1),[V,m]=z1.useState(null),{alert:a,AlertDialog:c}=J3(),u=async()=>{try{let[p,i]=await Promise.all([G("/api/providers"),G("/api/mcp/servers")]),Z0=await p.json(),I0=await i.json(),F0=Z0.providers||[],Q1=I0.servers||[],W1=new Set(Q1.filter((J0)=>J0.source==="composio"&&J0.url).map((J0)=>{let d=J0.url.match(/\/v3\/mcp\/([^/]+)/);return d?d[1]:null}).filter(Boolean));k(W1);let X0=F0.find((J0)=>J0.id==="composio"),U0=F0.find((J0)=>J0.id==="smithery"),_0=F0.find((J0)=>J0.id==="agentdojo");if(R(X0?.hasKey||!1),_(U0?.hasKey||!1),I(_0?.hasKey||!1),X0?.hasKey)Q0()}catch(p){console.error("Failed to fetch providers:",p)}E(!1)},Q0=async()=>{C(!0);try{let i=await(await G("/api/integrations/composio/configs")).json();N(i.configs||[])}catch(p){console.error("Failed to fetch Composio configs:",p)}C(!1)},o=async(p)=>{m(p);try{let i=await G(`/api/integrations/composio/configs/${p}/add`,{method:"POST"});if(i.ok)k((Z0)=>new Set([...Z0,p])),Y?.();else{let Z0=await i.json();await a(Z0.error||"Failed to add config",{title:"Error",variant:"error"})}}catch(i){console.error("Failed to add config:",i)}m(null)},t=(p)=>{return w.has(p)};if(z1.useEffect(()=>{u()},[G]),v)return M.jsxDEV("div",{className:"text-center py-8 text-[#666]",children:"Loading..."},void 0,!1,void 0,this);if(!(q||L||T))return M.jsxDEV("div",{className:"bg-[#111] border border-[#1a1a1a] rounded-lg p-8 text-center",children:[M.jsxDEV("p",{className:"text-[#888] mb-2",children:"No hosted MCP services connected"},void 0,!1,void 0,this),M.jsxDEV("p",{className:"text-sm text-[#666] mb-4",children:"Connect Composio, Smithery, or AgentDojo in Settings to access cloud-based MCP servers."},void 0,!1,void 0,this),M.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 M.jsxDEV(M.Fragment,{children:[c,M.jsxDEV("div",{className:"space-y-6",children:[q&&M.jsxDEV("div",{className:"flex gap-1 bg-[#0a0a0a] border border-[#222] rounded-lg p-1 w-fit",children:[M.jsxDEV("button",{onClick:()=>O("configs"),className:`px-4 py-2 rounded text-sm font-medium transition ${U==="configs"?"bg-[#1a1a1a] text-white":"text-[#666] hover:text-[#888]"}`,children:"MCP Configs"},void 0,!1,void 0,this),M.jsxDEV("button",{onClick:()=>O("connect"),className:`px-4 py-2 rounded text-sm font-medium transition ${U==="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),q&&U==="connect"&&M.jsxDEV("div",{children:[M.jsxDEV("div",{className:"flex items-center justify-between mb-4",children:M.jsxDEV("div",{children:[M.jsxDEV("h2",{className:"font-medium",children:"Connect Apps via Composio"},void 0,!1,void 0,this),M.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),M.jsxDEV(KO,{providerId:"composio",onConnectionComplete:()=>{Q0()}},void 0,!1,void 0,this)]},void 0,!0,void 0,this),q&&U==="configs"&&M.jsxDEV("div",{children:[M.jsxDEV("div",{className:"flex items-center justify-between mb-3",children:[M.jsxDEV("div",{className:"flex items-center gap-2",children:[M.jsxDEV("h2",{className:"font-medium",children:"Composio MCP Configs"},void 0,!1,void 0,this),M.jsxDEV("span",{className:"text-xs text-green-400",children:"Connected"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),M.jsxDEV("div",{className:"flex items-center gap-3",children:[M.jsxDEV("button",{onClick:Q0,disabled:D,className:"text-xs text-[#666] hover:text-[#888] transition",children:D?"Loading...":"Refresh"},void 0,!1,void 0,this),M.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),D?M.jsxDEV("div",{className:"text-center py-6 text-[#666]",children:"Loading configs..."},void 0,!1,void 0,this):F.length===0?M.jsxDEV("div",{className:"bg-[#111] border border-[#1a1a1a] rounded-lg p-4 text-center",children:[M.jsxDEV("p",{className:"text-sm text-[#666]",children:"No MCP configs found"},void 0,!1,void 0,this),M.jsxDEV("p",{className:"text-xs text-[#555] mt-2",children:["First ",M.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),M.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):M.jsxDEV("div",{className:"space-y-2",children:F.map((p)=>{let i=t(p.id),Z0=V===p.id;return M.jsxDEV("div",{className:`bg-[#111] border rounded-lg p-3 transition flex items-center justify-between ${i?"border-green-500/30":"border-[#1a1a1a] hover:border-[#333]"}`,children:[M.jsxDEV("div",{className:"flex-1 min-w-0",children:[M.jsxDEV("div",{className:"flex items-center gap-2",children:[M.jsxDEV("span",{className:"font-medium text-sm",children:p.name},void 0,!1,void 0,this),M.jsxDEV("span",{className:"text-xs text-[#555]",children:[p.toolsCount," tools"]},void 0,!0,void 0,this),i&&M.jsxDEV("span",{className:"text-xs text-green-400",children:"Added"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),p.toolkits.length>0&&M.jsxDEV("div",{className:"flex flex-wrap gap-1 mt-1",children:[p.toolkits.slice(0,4).map((I0)=>M.jsxDEV("span",{className:"text-xs bg-[#1a1a1a] text-[#666] px-1.5 py-0.5 rounded",children:I0},I0,!1,void 0,this)),p.toolkits.length>4&&M.jsxDEV("span",{className:"text-xs text-[#555]",children:["+",p.toolkits.length-4]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),M.jsxDEV("div",{className:"flex items-center gap-2 ml-3",children:[i?M.jsxDEV("span",{className:"text-xs text-[#555] px-2 py-1",children:"In Servers"},void 0,!1,void 0,this):M.jsxDEV("button",{onClick:()=>o(p.id),disabled:Z0,className:"text-xs bg-[#f97316] hover:bg-[#fb923c] text-black px-3 py-1 rounded font-medium transition disabled:opacity-50",children:Z0?"Adding...":"Add"},void 0,!1,void 0,this),M.jsxDEV("a",{href:`https://app.composio.dev/mcp_configs/${p.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)]},p.id,!0,void 0,this)})},void 0,!1,void 0,this)]},void 0,!0,void 0,this),L&&M.jsxDEV("div",{children:[M.jsxDEV("div",{className:"flex items-center justify-between mb-3",children:[M.jsxDEV("div",{className:"flex items-center gap-2",children:[M.jsxDEV("h2",{className:"font-medium",children:"Smithery"},void 0,!1,void 0,this),M.jsxDEV("span",{className:"text-xs text-green-400",children:"Connected"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),M.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),M.jsxDEV("div",{className:"bg-[#111] border border-[#1a1a1a] rounded-lg p-4 text-center",children:M.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),T&&M.jsxDEV("div",{children:[M.jsxDEV("div",{className:"flex items-center justify-between mb-3",children:[M.jsxDEV("div",{className:"flex items-center gap-2",children:[M.jsxDEV("h2",{className:"font-medium",children:"AgentDojo"},void 0,!1,void 0,this),M.jsxDEV("span",{className:"text-xs text-green-400",children:"Connected"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),M.jsxDEV("a",{href:"https://agentdojo.com/tools",target:"_blank",rel:"noopener noreferrer",className:"text-xs text-[#666] hover:text-[#f97316] transition",children:"Browse Tools →"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),M.jsxDEV("div",{className:"bg-[#111] border border-[#1a1a1a] rounded-lg p-4 text-center",children:M.jsxDEV("p",{className:"text-sm text-[#666]",children:"AgentDojo integration coming soon. Browse available tools on their platform."},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this),M.jsxDEV("div",{className:"p-3 bg-[#0a0a0a] border border-[#222] rounded text-xs text-[#666]",children:[M.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."," · ",M.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 tI(Y){let G=[],U=Y,O=null,q=Y.match(/(?:npx\s+-y\s+)?(@?[\w-]+\/)?(@?[\w-]+)(?:@[\w.-]+)?/);if(q){let _=q[2]||q[1];if(_)O=_.replace(/^@/,"").replace(/-mcp$/,"").replace(/-server$/,"").replace(/^server-/,"").replace(/^mcp-/,"")}let R=/--(\w+[-\w]*)\s+(YOUR_\w+|<[\w_]+>|\{[\w_]+\}|\$[\w_]+|[\w_]*(?:TOKEN|KEY|SECRET|PASSWORD|USER|ID|APIKEY)[\w_]*)/gi,L;while((L=R.exec(Y))!==null){let _=L[1],T=L[2],I=_.toUpperCase().replace(/-/g,"_"),F=O?`${O.toUpperCase().replace(/-/g,"_")}_${I}`:I;G.push({key:F,flag:_}),U=U.replace(new RegExp(`(--${_}\\s+)${T.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}`,"i"),`--${_} $${F}`)}return{cleanCommand:U,credentials:G,serverName:O}}function sI({onClose:Y,onAdded:G,projects:U,defaultProjectId:O}){let{authFetch:q}=P1(),[R,L]=z1.useState("npm"),[_,T]=z1.useState(""),[I,F]=z1.useState(""),[N,w]=z1.useState(""),[k,v]=z1.useState(""),[E,D]=z1.useState(""),[C,V]=z1.useState(""),[m,a]=z1.useState(""),[c,u]=z1.useState([]),[Q0,o]=z1.useState(O||null),[t,l]=z1.useState(!1),[p,i]=z1.useState(null),Z0=U&&U.length>0,I0=()=>{u([...c,{key:"",value:""}])},F0=(J0,d,P0)=>{let v0=[...c];v0[J0][d]=P0,u(v0)},Q1=(J0)=>{u(c.filter((d,P0)=>P0!==J0))},W1=(J0)=>{if(v(J0),J0.includes("YOUR_")||J0.includes("<")||J0.includes("{")||/TOKEN|KEY|SECRET|PASSWORD/i.test(J0)){let{cleanCommand:d,credentials:P0,serverName:v0}=tI(J0);if(!_&&v0)T(v0);if(P0.length>0){let X1=new Set(c.map((V0)=>V0.key)),r0=P0.filter((V0)=>!X1.has(V0.key)).map((V0)=>({key:V0.key,value:""}));if(r0.length>0)u([...c,...r0]),v(d)}}},X0=(J0)=>{if(J0.startsWith("npx ")||J0.includes(" --")||J0.includes("YOUR_")||J0.includes("<")||/\s+(TOKEN|KEY|SECRET|PASSWORD)/i.test(J0))L("command"),W1(J0);else if(F(J0),!_&&J0){let P0=J0.replace(/^@[\w-]+\//,"").replace(/@[\w.-]+$/,"").replace(/^server-/,"").replace(/-server$/,"").replace(/^mcp-/,"").replace(/-mcp$/,"");if(P0&&P0!==J0)T(P0)}},U0=async()=>{if(!_){i("Name is required");return}if(R==="npm"&&!I){i("npm package is required");return}if(R==="pip"&&!I){i("pip package is required");return}if(R==="command"&&!k){i("Command is required");return}if(R==="http"&&!E){i("URL is required");return}l(!0),i(null);let J0={};for(let{key:d,value:P0}of c)if(d.trim())J0[d.trim()]=P0;try{let d={name:_};if(R==="npm")d.type="npm",d.package=I;else if(R==="pip"){if(d.type="pip",d.package=I,N)d.pip_module=N}else if(R==="http"){d.type="http",d.url=E;let v0={"Content-Type":"application/json"};if(C&&m){let X1=btoa(`${C}:${m}`);v0.Authorization=`Basic ${X1}`}d.headers=v0}else{let v0=k.trim().split(/\s+/);d.type="custom",d.command=v0[0],d.args=v0.slice(1).join(" ")}if(Object.keys(J0).length>0)d.env=J0;if(Q0)d.project_id=Q0;let P0=await q("/api/mcp/servers",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(d)});if(!P0.ok){let v0=await P0.json();i(v0.error||"Failed to add server"),l(!1);return}G()}catch(d){i("Failed to add server"),l(!1)}},_0=(J0,d)=>{L("npm"),T(J0),F(d)};return M.jsxDEV("div",{className:"fixed inset-0 bg-black/50 backdrop-blur-[2px] z-50 flex items-center justify-center p-4",children:M.jsxDEV("div",{className:"bg-[#111] border border-[#1a1a1a] rounded-lg w-full max-w-lg max-h-[90vh] overflow-y-auto",children:[M.jsxDEV("div",{className:"p-4 border-b border-[#1a1a1a] flex items-center justify-between sticky top-0 bg-[#111]",children:[M.jsxDEV("h2",{className:"text-lg font-semibold",children:"Add MCP Server"},void 0,!1,void 0,this),M.jsxDEV("button",{onClick:Y,className:"text-[#666] hover:text-[#888]",children:"✕"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),M.jsxDEV("div",{className:"p-4 space-y-4",children:[M.jsxDEV("div",{children:[M.jsxDEV("p",{className:"text-sm text-[#666] mb-2",children:"Quick add:"},void 0,!1,void 0,this),M.jsxDEV("div",{className:"flex flex-wrap gap-2",children:[{name:"filesystem",pkg:"@modelcontextprotocol/server-filesystem",type:"npm"},{name:"fetch",pkg:"@modelcontextprotocol/server-fetch",type:"npm"},{name:"memory",pkg:"@modelcontextprotocol/server-memory",type:"npm"},{name:"github",pkg:"@modelcontextprotocol/server-github",type:"npm"},{name:"time",pkg:"mcp-server-time",module:"mcp_server_time",type:"pip"}].map((J0)=>M.jsxDEV("button",{onClick:()=>{if(L(J0.type),T(J0.name),F(J0.pkg),J0.type==="pip"&&"module"in J0)w(J0.module||"");else w("")},className:"text-sm bg-[#1a1a1a] hover:bg-[#222] px-3 py-1 rounded transition",children:J0.name},J0.name,!1,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this),M.jsxDEV("div",{className:"flex gap-1 bg-[#0a0a0a] border border-[#222] rounded p-1",children:[M.jsxDEV("button",{onClick:()=>L("npm"),className:`flex-1 px-2 py-1.5 rounded text-sm transition ${R==="npm"?"bg-[#1a1a1a] text-white":"text-[#666] hover:text-[#888]"}`,children:"npm"},void 0,!1,void 0,this),M.jsxDEV("button",{onClick:()=>L("pip"),className:`flex-1 px-2 py-1.5 rounded text-sm transition ${R==="pip"?"bg-[#1a1a1a] text-white":"text-[#666] hover:text-[#888]"}`,children:"pip"},void 0,!1,void 0,this),M.jsxDEV("button",{onClick:()=>L("command"),className:`flex-1 px-2 py-1.5 rounded text-sm transition ${R==="command"?"bg-[#1a1a1a] text-white":"text-[#666] hover:text-[#888]"}`,children:"Command"},void 0,!1,void 0,this),M.jsxDEV("button",{onClick:()=>L("http"),className:`flex-1 px-2 py-1.5 rounded text-sm transition ${R==="http"?"bg-[#1a1a1a] text-white":"text-[#666] hover:text-[#888]"}`,children:"HTTP"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),M.jsxDEV("div",{children:[M.jsxDEV("label",{className:"block text-sm text-[#666] mb-1",children:"Name"},void 0,!1,void 0,this),M.jsxDEV("input",{type:"text",value:_,onChange:(J0)=>T(J0.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),Z0&&M.jsxDEV("div",{children:[M.jsxDEV("label",{className:"block text-sm text-[#666] mb-1",children:"Scope"},void 0,!1,void 0,this),M.jsxDEV(V5,{value:Q0||"",onChange:(J0)=>o(J0||null),options:[{value:"",label:"Global (all projects)"},...U.map((J0)=>({value:J0.id,label:J0.name}))],placeholder:"Select scope..."},void 0,!1,void 0,this),M.jsxDEV("p",{className:"text-xs text-[#555] mt-1",children:"Global servers are available to all agents. Project-scoped servers are only available to agents in that project."},void 0,!1,void 0,this)]},void 0,!0,void 0,this),R==="npm"&&M.jsxDEV("div",{children:[M.jsxDEV("label",{className:"block text-sm text-[#666] mb-1",children:"npm Package"},void 0,!1,void 0,this),M.jsxDEV("input",{type:"text",value:I,onChange:(J0)=>X0(J0.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),M.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),R==="pip"&&M.jsxDEV("div",{className:"space-y-4",children:[M.jsxDEV("div",{children:[M.jsxDEV("label",{className:"block text-sm text-[#666] mb-1",children:"pip Package"},void 0,!1,void 0,this),M.jsxDEV("input",{type:"text",value:I,onChange:(J0)=>{if(F(J0.target.value),!N&&J0.target.value){let d=J0.target.value.split("[")[0].replace(/-/g,".");w(d)}},placeholder:"e.g., late-sdk[mcp]",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),M.jsxDEV("p",{className:"text-xs text-[#555] mt-1",children:"Python package with extras, e.g., late-sdk[mcp] or mcp-server-time"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),M.jsxDEV("div",{children:[M.jsxDEV("label",{className:"block text-sm text-[#666] mb-1",children:"Module (optional)"},void 0,!1,void 0,this),M.jsxDEV("input",{type:"text",value:N,onChange:(J0)=>w(J0.target.value),placeholder:"e.g., late.mcp",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),M.jsxDEV("p",{className:"text-xs text-[#555] mt-1",children:"Python module to run with -m. Auto-detected from package name if not specified."},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),R==="command"&&M.jsxDEV("div",{children:[M.jsxDEV("label",{className:"block text-sm text-[#666] mb-1",children:"Command"},void 0,!1,void 0,this),M.jsxDEV("input",{type:"text",value:k,onChange:(J0)=>W1(J0.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),M.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),R==="http"&&M.jsxDEV("div",{className:"space-y-4",children:[M.jsxDEV("div",{children:[M.jsxDEV("label",{className:"block text-sm text-[#666] mb-1",children:"URL"},void 0,!1,void 0,this),M.jsxDEV("input",{type:"text",value:E,onChange:(J0)=>D(J0.target.value),placeholder:"e.g., https://example.com/wp-json/mcp/v1/messages",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)]},void 0,!0,void 0,this),M.jsxDEV("div",{className:"p-3 bg-[#0a0a0a] border border-[#222] rounded",children:[M.jsxDEV("p",{className:"text-xs text-[#666] mb-3",children:"Optional: Basic Auth credentials (will be encoded and stored securely)"},void 0,!1,void 0,this),M.jsxDEV("div",{className:"grid grid-cols-2 gap-3",children:[M.jsxDEV("div",{children:[M.jsxDEV("label",{className:"block text-xs text-[#555] mb-1",children:"Username"},void 0,!1,void 0,this),M.jsxDEV("input",{type:"text",value:C,onChange:(J0)=>V(J0.target.value),placeholder:"username",className:"w-full bg-[#111] border border-[#333] rounded px-3 py-2 text-sm focus:outline-none focus:border-[#f97316]"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),M.jsxDEV("div",{children:[M.jsxDEV("label",{className:"block text-xs text-[#555] mb-1",children:"Password"},void 0,!1,void 0,this),M.jsxDEV("input",{type:"password",value:m,onChange:(J0)=>a(J0.target.value),placeholder:"password or app key",className:"w-full bg-[#111] border border-[#333] rounded px-3 py-2 text-sm focus:outline-none focus:border-[#f97316]"},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),M.jsxDEV("div",{children:[M.jsxDEV("div",{className:"flex items-center justify-between mb-2",children:[M.jsxDEV("label",{className:"text-sm text-[#666]",children:"Environment Variables / Credentials"},void 0,!1,void 0,this),M.jsxDEV("button",{onClick:I0,className:"text-xs text-[#f97316] hover:text-[#fb923c] transition",children:"+ Add Variable"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),c.length===0&&M.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),c.length>0&&M.jsxDEV("div",{className:"space-y-2",children:c.map((J0,d)=>M.jsxDEV("div",{className:"flex gap-2",children:[M.jsxDEV("input",{type:"text",value:J0.key,onChange:(P0)=>F0(d,"key",P0.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),M.jsxDEV("input",{type:"password",value:J0.value,onChange:(P0)=>F0(d,"value",P0.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),M.jsxDEV("button",{onClick:()=>Q1(d),className:"text-[#666] hover:text-red-400 px-2 transition",children:"✕"},void 0,!1,void 0,this)]},d,!0,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this),p&&M.jsxDEV("p",{className:"text-red-400 text-sm",children:p},void 0,!1,void 0,this)]},void 0,!0,void 0,this),M.jsxDEV("div",{className:"p-4 border-t border-[#1a1a1a] flex justify-end gap-2 sticky bottom-0 bg-[#111]",children:[M.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),M.jsxDEV("button",{onClick:U0,disabled:t||!_||(R==="npm"?!I:R==="pip"?!I:R==="http"?!E:!k),className:"px-4 py-2 bg-[#f97316] hover:bg-[#fb923c] text-black rounded font-medium transition disabled:opacity-50",children:t?"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)}function eI({server:Y,projects:G,onClose:U,onSaved:O}){let{authFetch:q}=P1(),[R,L]=z1.useState(Y.name),[_,T]=z1.useState(Y.package||""),[I,F]=z1.useState(Y.command||""),[N,w]=z1.useState(Y.args||""),[k,v]=z1.useState(()=>{return Object.entries(Y.env||{}).map(([p,i])=>({key:p,value:i}))}),[E,D]=z1.useState(Y.project_id),[C,V]=z1.useState(!1),[m,a]=z1.useState(null),c=G&&G.length>0,u=Y.type==="http"&&Y.url,Q0=()=>{v([...k,{key:"",value:""}])},o=(p,i,Z0)=>{let I0=[...k];I0[p][i]=Z0,v(I0)},t=(p)=>{v(k.filter((i,Z0)=>Z0!==p))},l=async()=>{if(!R.trim()){a("Name is required");return}V(!0),a(null);let p={};for(let{key:i,value:Z0}of k)if(i.trim())p[i.trim()]=Z0;try{let i={name:R.trim(),env:p};if(!u){if(Y.type==="npm"&&_.trim())i.package=_.trim();if(Y.type==="custom"){if(I.trim())i.command=I.trim();if(N.trim())i.args=N.trim()}}i.project_id=E;let Z0=await q(`/api/mcp/servers/${Y.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(i)});if(!Z0.ok){let I0=await Z0.json();a(I0.error||"Failed to save changes"),V(!1);return}if(Y.status==="running"&&!u)try{await q(`/api/mcp/servers/${Y.id}/stop`,{method:"POST"}),await q(`/api/mcp/servers/${Y.id}/start`,{method:"POST"})}catch(I0){console.error("Failed to restart server:",I0)}O()}catch(i){a("Failed to save changes"),V(!1)}};return M.jsxDEV("div",{className:"fixed inset-0 bg-black/50 backdrop-blur-[2px] z-50 flex items-center justify-center p-4",children:M.jsxDEV("div",{className:"bg-[#111] border border-[#1a1a1a] rounded-lg w-full max-w-lg max-h-[90vh] overflow-y-auto",children:[M.jsxDEV("div",{className:"p-4 border-b border-[#1a1a1a] flex items-center justify-between sticky top-0 bg-[#111]",children:[M.jsxDEV("h2",{className:"text-lg font-semibold",children:"Edit MCP Server"},void 0,!1,void 0,this),M.jsxDEV("button",{onClick:U,className:"text-[#666] hover:text-[#888]",children:"✕"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),M.jsxDEV("div",{className:"p-4 space-y-4",children:[M.jsxDEV("div",{className:"text-sm text-[#666] bg-[#0a0a0a] border border-[#222] rounded p-3",children:["Type: ",M.jsxDEV("span",{className:"text-[#888]",children:Y.type},void 0,!1,void 0,this),Y.package&&M.jsxDEV(M.Fragment,{children:[" • Package: ",M.jsxDEV("span",{className:"text-[#888] font-mono",children:Y.package},void 0,!1,void 0,this)]},void 0,!0,void 0,this),Y.command&&M.jsxDEV(M.Fragment,{children:[" • Command: ",M.jsxDEV("span",{className:"text-[#888] font-mono",children:Y.command},void 0,!1,void 0,this)]},void 0,!0,void 0,this),u&&Y.url&&M.jsxDEV(M.Fragment,{children:[" • URL: ",M.jsxDEV("span",{className:"text-[#888] font-mono text-xs",children:Y.url},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),M.jsxDEV("div",{children:[M.jsxDEV("label",{className:"block text-sm text-[#666] mb-1",children:"Name"},void 0,!1,void 0,this),M.jsxDEV("input",{type:"text",value:R,onChange:(p)=>L(p.target.value),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),c&&M.jsxDEV("div",{children:[M.jsxDEV("label",{className:"block text-sm text-[#666] mb-1",children:"Scope"},void 0,!1,void 0,this),M.jsxDEV(V5,{value:E||"",onChange:(p)=>D(p||null),options:[{value:"",label:"Global (all projects)"},...G.map((p)=>({value:p.id,label:p.name}))],placeholder:"Select scope..."},void 0,!1,void 0,this)]},void 0,!0,void 0,this),Y.type==="npm"&&M.jsxDEV("div",{children:[M.jsxDEV("label",{className:"block text-sm text-[#666] mb-1",children:"npm Package"},void 0,!1,void 0,this),M.jsxDEV("input",{type:"text",value:_,onChange:(p)=>T(p.target.value),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)]},void 0,!0,void 0,this),Y.type==="custom"&&M.jsxDEV(M.Fragment,{children:[M.jsxDEV("div",{children:[M.jsxDEV("label",{className:"block text-sm text-[#666] mb-1",children:"Command"},void 0,!1,void 0,this),M.jsxDEV("input",{type:"text",value:I,onChange:(p)=>F(p.target.value),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)]},void 0,!0,void 0,this),M.jsxDEV("div",{children:[M.jsxDEV("label",{className:"block text-sm text-[#666] mb-1",children:"Arguments"},void 0,!1,void 0,this),M.jsxDEV("input",{type:"text",value:N,onChange:(p)=>w(p.target.value),placeholder:"e.g., --token $TOKEN --verbose",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)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),!u&&M.jsxDEV("div",{children:[M.jsxDEV("div",{className:"flex items-center justify-between mb-2",children:[M.jsxDEV("label",{className:"text-sm text-[#666]",children:"Environment Variables / Credentials"},void 0,!1,void 0,this),M.jsxDEV("button",{onClick:Q0,className:"text-xs text-[#f97316] hover:text-[#fb923c] transition",children:"+ Add Variable"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),k.length===0&&M.jsxDEV("p",{className:"text-xs text-[#555] bg-[#0a0a0a] border border-[#222] rounded p-3",children:"No environment variables configured."},void 0,!1,void 0,this),k.length>0&&M.jsxDEV("div",{className:"space-y-2",children:k.map((p,i)=>M.jsxDEV("div",{className:"flex gap-2",children:[M.jsxDEV("input",{type:"text",value:p.key,onChange:(Z0)=>o(i,"key",Z0.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),M.jsxDEV("input",{type:"password",value:p.value,onChange:(Z0)=>o(i,"value",Z0.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),M.jsxDEV("button",{onClick:()=>t(i),className:"text-[#666] hover:text-red-400 px-2 transition",children:"✕"},void 0,!1,void 0,this)]},i,!0,void 0,this))},void 0,!1,void 0,this),M.jsxDEV("p",{className:"text-xs text-[#555] mt-2",children:Y.status==="running"?"Server will be automatically restarted to apply changes.":"Changes will take effect when the server is started."},void 0,!1,void 0,this)]},void 0,!0,void 0,this),m&&M.jsxDEV("p",{className:"text-red-400 text-sm",children:m},void 0,!1,void 0,this)]},void 0,!0,void 0,this),M.jsxDEV("div",{className:"p-4 border-t border-[#1a1a1a] flex justify-end gap-2 sticky bottom-0 bg-[#111]",children:[M.jsxDEV("button",{onClick:U,className:"px-4 py-2 border border-[#333] hover:border-[#666] rounded transition",children:"Cancel"},void 0,!1,void 0,this),M.jsxDEV("button",{onClick:l,disabled:C||!R.trim(),className:"px-4 py-2 bg-[#f97316] hover:bg-[#fb923c] text-black rounded font-medium transition disabled:opacity-50",children:C?"Saving...":"Save Changes"},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 I4=q0(k1(),1);var B0=q0(J1(),1);function Z2(){let{authFetch:Y}=P1(),{projects:G,currentProjectId:U}=g4(),[O,q]=I4.useState([]),[R,L]=I4.useState(!0),[_,T]=I4.useState("installed"),[I,F]=I4.useState(!1),[N,w]=I4.useState(!1),[k,v]=I4.useState(null),{confirm:E,ConfirmDialog:D}=S6(),{alert:C,AlertDialog:V}=J3(),m=G.length>0,[a,c]=I4.useState(""),[u,Q0]=I4.useState([]),[o,t]=I4.useState(!1),[l,p]=I4.useState(null),i=O.filter((U0)=>{if(!U)return!0;if(U==="unassigned")return U0.project_id===null;return U0.project_id===null||U0.project_id===U}),Z0=async()=>{try{let _0=await(await Y("/api/skills")).json();q(_0.skills||[])}catch(U0){console.error("Failed to fetch skills:",U0)}L(!1)},I0=async(U0)=>{t(!0);try{let _0=U0!==void 0?U0:a,J0=_0?`/api/skills/marketplace/search?q=${encodeURIComponent(_0)}`:"/api/skills/marketplace/featured",P0=await(await Y(J0)).json();Q0(P0.skills||[])}catch(_0){console.error("Failed to search marketplace:",_0)}t(!1)};I4.useEffect(()=>{Z0()},[Y]),I4.useEffect(()=>{if(_==="marketplace"&&u.length===0)I0("")},[_]);let F0=async(U0)=>{try{await Y(`/api/skills/${U0}/toggle`,{method:"POST"}),Z0()}catch(_0){console.error("Failed to toggle skill:",_0)}},Q1=async(U0)=>{if(!await E("Delete this skill?",{confirmText:"Delete",title:"Delete Skill"}))return;try{if(await Y(`/api/skills/${U0}`,{method:"DELETE"}),k?.id===U0)v(null);Z0()}catch(J0){console.error("Failed to delete skill:",J0)}},W1=async(U0)=>{p(U0.id);try{let _0=await Y(`/api/skills/marketplace/${U0.id}/install`,{method:"POST"}),J0=await _0.json();if(_0.ok)await C(`Installed "${U0.name}" successfully!`,{title:"Skill Installed"}),Z0(),T("installed");else await C(J0.error||"Failed to install skill",{title:"Installation Failed"})}catch(_0){console.error("Failed to install skill:",_0),await C("Failed to install skill",{title:"Error"})}p(null)},X0=(U0)=>O.some((_0)=>_0.name===U0);return B0.jsxDEV(B0.Fragment,{children:[D,V,B0.jsxDEV("div",{className:"flex-1 overflow-auto p-6",children:B0.jsxDEV("div",{className:"max-w-6xl",children:[B0.jsxDEV("div",{className:"flex items-center justify-between mb-6",children:[B0.jsxDEV("div",{children:[B0.jsxDEV("h1",{className:"text-2xl font-semibold mb-1",children:"Skills"},void 0,!1,void 0,this),B0.jsxDEV("p",{className:"text-[#666]",children:"Manage agent skills - instructions that teach agents how to perform tasks."},void 0,!1,void 0,this)]},void 0,!0,void 0,this),_==="installed"&&B0.jsxDEV("div",{className:"flex gap-2",children:[B0.jsxDEV("button",{onClick:()=>w(!0),className:"bg-[#1a1a1a] hover:bg-[#222] text-white px-4 py-2 rounded font-medium transition border border-[#333]",children:"Import"},void 0,!1,void 0,this),B0.jsxDEV("button",{onClick:()=>F(!0),className:"bg-[#f97316] hover:bg-[#fb923c] text-black px-4 py-2 rounded font-medium transition",children:"+ Create Skill"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),B0.jsxDEV("div",{className:"flex gap-1 mb-6 bg-[#111] border border-[#1a1a1a] rounded-lg p-1 w-fit",children:[B0.jsxDEV("button",{onClick:()=>T("installed"),className:`px-4 py-2 rounded text-sm font-medium transition ${_==="installed"?"bg-[#1a1a1a] text-white":"text-[#666] hover:text-[#888]"}`,children:["Installed (",O.length,")"]},void 0,!0,void 0,this),B0.jsxDEV("button",{onClick:()=>T("marketplace"),className:`px-4 py-2 rounded text-sm font-medium transition ${_==="marketplace"?"bg-[#1a1a1a] text-white":"text-[#666] hover:text-[#888]"}`,children:"Marketplace"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),_==="installed"&&B0.jsxDEV(B0.Fragment,{children:R?B0.jsxDEV("div",{className:"text-[#666]",children:"Loading skills..."},void 0,!1,void 0,this):O.length===0?B0.jsxDEV("div",{className:"text-center py-20 text-[#666]",children:[B0.jsxDEV("p",{className:"text-lg",children:"No skills installed"},void 0,!1,void 0,this),B0.jsxDEV("p",{className:"text-sm mt-1",children:"Create a skill or browse the marketplace"},void 0,!1,void 0,this),B0.jsxDEV("button",{onClick:()=>T("marketplace"),className:"mt-4 bg-[#f97316] hover:bg-[#fb923c] text-black px-4 py-2 rounded font-medium transition",children:"Browse Marketplace"},void 0,!1,void 0,this)]},void 0,!0,void 0,this):i.length===0?B0.jsxDEV("div",{className:"bg-[#111] border border-[#1a1a1a] rounded-lg p-6 text-center",children:B0.jsxDEV("p",{className:"text-[#666]",children:"No skills match this filter."},void 0,!1,void 0,this)},void 0,!1,void 0,this):B0.jsxDEV("div",{className:"grid gap-4 md:grid-cols-2 xl:grid-cols-3",children:i.map((U0)=>{let _0=m&&U0.project_id?G.find((J0)=>J0.id===U0.project_id):null;return B0.jsxDEV(zk,{skill:U0,project:_0,onToggle:()=>F0(U0.id),onDelete:()=>Q1(U0.id),onView:()=>v(U0)},U0.id,!1,void 0,this)})},void 0,!1,void 0,this)},void 0,!1,void 0,this),_==="marketplace"&&B0.jsxDEV(B0.Fragment,{children:[B0.jsxDEV("div",{className:"mb-6",children:B0.jsxDEV("div",{className:"flex gap-2",children:[B0.jsxDEV("input",{type:"text",value:a,onChange:(U0)=>c(U0.target.value),onKeyDown:(U0)=>U0.key==="Enter"&&I0(),placeholder:"Search skills...",className:"flex-1 bg-[#111] border border-[#1a1a1a] rounded px-4 py-2 focus:outline-none focus:border-[#f97316]"},void 0,!1,void 0,this),B0.jsxDEV("button",{onClick:()=>I0(),disabled:o,className:"bg-[#1a1a1a] hover:bg-[#222] text-white px-4 py-2 rounded font-medium transition border border-[#333]",children:o?"...":"Search"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this),o?B0.jsxDEV("div",{className:"text-[#666]",children:"Loading..."},void 0,!1,void 0,this):u.length===0?B0.jsxDEV("div",{className:"text-center py-20 text-[#666]",children:[B0.jsxDEV("p",{className:"text-lg",children:"No skills found"},void 0,!1,void 0,this),B0.jsxDEV("p",{className:"text-sm mt-1",children:"Try a different search term"},void 0,!1,void 0,this)]},void 0,!0,void 0,this):B0.jsxDEV("div",{className:"grid gap-4 md:grid-cols-2 xl:grid-cols-3",children:u.map((U0)=>B0.jsxDEV(Qk,{skill:U0,installed:X0(U0.name),installing:l===U0.id,onInstall:()=>W1(U0)},U0.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),I&&B0.jsxDEV(Xk,{authFetch:Y,onClose:()=>F(!1),onCreated:()=>{F(!1),Z0()},projects:m?G:void 0,defaultProjectId:U&&U!=="unassigned"?U:null},void 0,!1,void 0,this),N&&B0.jsxDEV(Zk,{authFetch:Y,onClose:()=>w(!1),onImported:()=>{w(!1),Z0()}},void 0,!1,void 0,this),k&&B0.jsxDEV(Jk,{skill:k,authFetch:Y,onClose:()=>v(null),onUpdated:()=>{v(null),Z0()}},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}function zk({skill:Y,project:G,onToggle:U,onDelete:O,onView:q}){let R={local:"Local",skillsmp:"SkillsMP",github:"GitHub",import:"Imported"}[Y.source],L=()=>{if(G)return B0.jsxDEV("span",{className:"text-xs px-1.5 py-0.5 rounded",style:{backgroundColor:`${G.color}20`,color:G.color},children:G.name},void 0,!1,void 0,this);if(Y.project_id===null)return B0.jsxDEV("span",{className:"text-xs text-[#666] bg-[#1a1a1a] px-1.5 py-0.5 rounded",children:"Global"},void 0,!1,void 0,this);return null};return B0.jsxDEV("div",{className:`bg-[#111] rounded-lg p-5 border transition cursor-pointer ${Y.enabled?"border-[#1a1a1a]":"border-[#1a1a1a] opacity-60"} hover:border-[#333]`,onClick:q,children:[B0.jsxDEV("div",{className:"flex items-start justify-between mb-3",children:[B0.jsxDEV("div",{className:"flex-1 min-w-0",children:[B0.jsxDEV("div",{className:"flex items-center gap-2",children:[B0.jsxDEV("h3",{className:"font-semibold text-lg truncate",children:Y.name},void 0,!1,void 0,this),L()]},void 0,!0,void 0,this),B0.jsxDEV("p",{className:"text-xs text-[#666] flex items-center gap-2 mt-0.5",children:[B0.jsxDEV("span",{className:`px-1.5 py-0.5 rounded text-[10px] ${Y.source==="skillsmp"?"bg-purple-500/20 text-purple-400":Y.source==="github"?"bg-blue-500/20 text-blue-400":"bg-[#222] text-[#888]"}`,children:R},void 0,!1,void 0,this),Y.metadata?.version&&B0.jsxDEV("span",{children:["v",Y.metadata.version]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),B0.jsxDEV("button",{onClick:(_)=>{_.stopPropagation(),U()},className:`w-10 h-5 rounded-full transition-colors relative ${Y.enabled?"bg-[#f97316]":"bg-[#333]"}`,children:B0.jsxDEV("span",{className:`absolute top-0.5 w-4 h-4 rounded-full bg-white transition-transform ${Y.enabled?"left-5":"left-0.5"}`},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this),B0.jsxDEV("p",{className:"text-sm text-[#888] line-clamp-2 mb-4",children:Y.description},void 0,!1,void 0,this),B0.jsxDEV("div",{className:"flex items-center justify-between",children:[B0.jsxDEV("div",{className:"flex gap-1 flex-wrap",children:[Y.allowed_tools.slice(0,2).map((_)=>B0.jsxDEV("span",{className:"text-xs bg-[#222] px-2 py-0.5 rounded text-[#666]",children:_},_,!1,void 0,this)),Y.allowed_tools.length>2&&B0.jsxDEV("span",{className:"text-xs text-[#666]",children:["+",Y.allowed_tools.length-2]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),B0.jsxDEV("button",{onClick:(_)=>{_.stopPropagation(),O()},className:"text-red-400 hover:text-red-300 text-sm",children:"Delete"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}function Qk({skill:Y,installed:G,installing:U,onInstall:O}){return B0.jsxDEV("div",{className:"bg-[#111] rounded-lg p-5 border border-[#1a1a1a] hover:border-[#333] transition",children:[B0.jsxDEV("div",{className:"flex items-start justify-between mb-3",children:[B0.jsxDEV("div",{className:"flex-1 min-w-0",children:[B0.jsxDEV("h3",{className:"font-semibold text-lg truncate",children:Y.name},void 0,!1,void 0,this),B0.jsxDEV("p",{className:"text-xs text-[#666] mt-0.5",children:["by ",Y.author," · v",Y.version]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),B0.jsxDEV("div",{className:"flex items-center gap-1 text-yellow-500 text-sm",children:["★ ",Y.rating.toFixed(1)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),B0.jsxDEV("p",{className:"text-sm text-[#888] line-clamp-2 mb-4",children:Y.description},void 0,!1,void 0,this),B0.jsxDEV("div",{className:"flex items-center justify-between",children:[B0.jsxDEV("div",{className:"flex gap-1 flex-wrap",children:Y.tags.slice(0,3).map((q)=>B0.jsxDEV("span",{className:"text-xs bg-[#222] px-2 py-0.5 rounded text-[#666]",children:q},q,!1,void 0,this))},void 0,!1,void 0,this),G?B0.jsxDEV("span",{className:"text-green-400 text-sm",children:"✓ Installed"},void 0,!1,void 0,this):B0.jsxDEV("button",{onClick:O,disabled:U,className:"bg-[#f97316] hover:bg-[#fb923c] disabled:opacity-50 text-black px-3 py-1 rounded text-sm font-medium transition",children:U?"Installing...":"Install"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),B0.jsxDEV("div",{className:"mt-3 text-xs text-[#555]",children:[Y.downloads.toLocaleString()," downloads"]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}function Xk({authFetch:Y,onClose:G,onCreated:U,projects:O,defaultProjectId:q}){let[R,L]=I4.useState(""),[_,T]=I4.useState(""),[I,F]=I4.useState(""),[N,w]=I4.useState(q||null),[k,v]=I4.useState(!1),[E,D]=I4.useState(null),C=O&&O.length>0,V=async()=>{if(!R||!_||!I){D("All fields are required");return}v(!0),D(null);try{let m={name:R,description:_,content:I,source:"local"};if(N)m.project_id=N;let a=await Y("/api/skills",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(m)}),c=await a.json();if(!a.ok){D(c.error||"Failed to create skill"),v(!1);return}U()}catch(m){D("Failed to create skill"),v(!1)}};return B0.jsxDEV("div",{className:"fixed inset-0 bg-black/60 flex items-center justify-center z-50 p-4",onClick:G,children:B0.jsxDEV("div",{className:"bg-[#111] border border-[#1a1a1a] rounded-lg w-full max-w-2xl max-h-[90vh] overflow-auto",onClick:(m)=>m.stopPropagation(),children:[B0.jsxDEV("div",{className:"p-6 border-b border-[#1a1a1a]",children:B0.jsxDEV("h2",{className:"text-xl font-semibold",children:"Create Skill"},void 0,!1,void 0,this)},void 0,!1,void 0,this),B0.jsxDEV("div",{className:"p-6 space-y-4",children:[E&&B0.jsxDEV("div",{className:"bg-red-500/10 border border-red-500/30 rounded p-3 text-red-400 text-sm",children:E},void 0,!1,void 0,this),B0.jsxDEV("div",{children:[B0.jsxDEV("label",{className:"block text-sm text-[#888] mb-1",children:"Name"},void 0,!1,void 0,this),B0.jsxDEV("input",{type:"text",value:R,onChange:(m)=>L(m.target.value.toLowerCase().replace(/[^a-z0-9-]/g,"-")),placeholder:"my-skill-name",className:"w-full bg-[#0a0a0a] border border-[#222] rounded px-3 py-2 focus:outline-none focus:border-[#f97316]"},void 0,!1,void 0,this),B0.jsxDEV("p",{className:"text-xs text-[#555] mt-1",children:"Lowercase letters, numbers, and hyphens only"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),B0.jsxDEV("div",{children:[B0.jsxDEV("label",{className:"block text-sm text-[#888] mb-1",children:"Description"},void 0,!1,void 0,this),B0.jsxDEV("input",{type:"text",value:_,onChange:(m)=>T(m.target.value),placeholder:"What this skill does and when to use it...",className:"w-full bg-[#0a0a0a] border border-[#222] rounded px-3 py-2 focus:outline-none focus:border-[#f97316]"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),C&&B0.jsxDEV("div",{children:[B0.jsxDEV("label",{className:"block text-sm text-[#888] mb-1",children:"Scope"},void 0,!1,void 0,this),B0.jsxDEV(V5,{value:N||"",onChange:(m)=>w(m||null),options:[{value:"",label:"Global (all projects)"},...O.map((m)=>({value:m.id,label:m.name}))],placeholder:"Select scope..."},void 0,!1,void 0,this),B0.jsxDEV("p",{className:"text-xs text-[#555] mt-1",children:"Global skills are available to all agents. Project-scoped skills are only available to agents in that project."},void 0,!1,void 0,this)]},void 0,!0,void 0,this),B0.jsxDEV("div",{children:[B0.jsxDEV("label",{className:"block text-sm text-[#888] mb-1",children:"Instructions (Markdown)"},void 0,!1,void 0,this),B0.jsxDEV("textarea",{value:I,onChange:(m)=>F(m.target.value),placeholder:`# Skill Instructions
|
|
216
|
-
|
|
217
|
-
Write detailed instructions here...`,rows:12,className:"w-full bg-[#0a0a0a] border border-[#222] rounded px-3 py-2 focus:outline-none focus:border-[#f97316] font-mono text-sm"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),B0.jsxDEV("div",{className:"p-6 border-t border-[#1a1a1a] flex justify-end gap-3",children:[B0.jsxDEV("button",{onClick:G,className:"px-4 py-2 text-[#888] hover:text-white transition",children:"Cancel"},void 0,!1,void 0,this),B0.jsxDEV("button",{onClick:V,disabled:k,className:"bg-[#f97316] hover:bg-[#fb923c] disabled:opacity-50 text-black px-4 py-2 rounded font-medium transition",children:k?"Creating...":"Create Skill"},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 Zk({authFetch:Y,onClose:G,onImported:U}){let[O,q]=I4.useState(""),[R,L]=I4.useState(!1),[_,T]=I4.useState(null);return B0.jsxDEV("div",{className:"fixed inset-0 bg-black/60 flex items-center justify-center z-50 p-4",onClick:G,children:B0.jsxDEV("div",{className:"bg-[#111] border border-[#1a1a1a] rounded-lg w-full max-w-2xl max-h-[90vh] overflow-auto",onClick:(F)=>F.stopPropagation(),children:[B0.jsxDEV("div",{className:"p-6 border-b border-[#1a1a1a]",children:[B0.jsxDEV("h2",{className:"text-xl font-semibold",children:"Import Skill"},void 0,!1,void 0,this),B0.jsxDEV("p",{className:"text-sm text-[#666] mt-1",children:"Paste the contents of a SKILL.md file"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),B0.jsxDEV("div",{className:"p-6 space-y-4",children:[_&&B0.jsxDEV("div",{className:"bg-red-500/10 border border-red-500/30 rounded p-3 text-red-400 text-sm",children:_},void 0,!1,void 0,this),B0.jsxDEV("textarea",{value:O,onChange:(F)=>q(F.target.value),placeholder:`---
|
|
218
|
-
name: skill-name
|
|
219
|
-
description: What this skill does...
|
|
220
|
-
---
|
|
221
|
-
|
|
222
|
-
# Instructions
|
|
223
|
-
|
|
224
|
-
Your skill instructions here...`,rows:16,className:"w-full bg-[#0a0a0a] border border-[#222] rounded px-3 py-2 focus:outline-none focus:border-[#f97316] font-mono text-sm"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),B0.jsxDEV("div",{className:"p-6 border-t border-[#1a1a1a] flex justify-end gap-3",children:[B0.jsxDEV("button",{onClick:G,className:"px-4 py-2 text-[#888] hover:text-white transition",children:"Cancel"},void 0,!1,void 0,this),B0.jsxDEV("button",{onClick:async()=>{if(!O.trim()){T("Paste SKILL.md content");return}L(!0),T(null);try{let F=await Y("/api/skills/import",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:O})}),N=await F.json();if(!F.ok){T(N.error||"Failed to import skill"),L(!1);return}U()}catch(F){T("Failed to import skill"),L(!1)}},disabled:R,className:"bg-[#f97316] hover:bg-[#fb923c] disabled:opacity-50 text-black px-4 py-2 rounded font-medium transition",children:R?"Importing...":"Import Skill"},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 Jk({skill:Y,authFetch:G,onClose:U,onUpdated:O}){let[q,R]=I4.useState(!1),[L,_]=I4.useState(Y.content),[T,I]=I4.useState(!1),F=async()=>{I(!0);try{await G(`/api/skills/${Y.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:L})}),O()}catch(w){console.error("Failed to save:",w)}I(!1)},N=async()=>{try{let k=await(await G(`/api/skills/${Y.id}/export`)).text(),v=new Blob([k],{type:"text/markdown"}),E=URL.createObjectURL(v),D=document.createElement("a");D.href=E,D.download=`${Y.name}-SKILL.md`,D.click(),URL.revokeObjectURL(E)}catch(w){console.error("Failed to export:",w)}};return B0.jsxDEV("div",{className:"fixed inset-0 bg-black/60 flex items-center justify-center z-50 p-4",onClick:U,children:B0.jsxDEV("div",{className:"bg-[#111] border border-[#1a1a1a] rounded-lg w-full max-w-3xl max-h-[90vh] overflow-auto",onClick:(w)=>w.stopPropagation(),children:[B0.jsxDEV("div",{className:"p-6 border-b border-[#1a1a1a] flex items-center justify-between",children:[B0.jsxDEV("div",{children:[B0.jsxDEV("h2",{className:"text-xl font-semibold",children:Y.name},void 0,!1,void 0,this),B0.jsxDEV("p",{className:"text-sm text-[#666] mt-0.5",children:Y.description},void 0,!1,void 0,this)]},void 0,!0,void 0,this),B0.jsxDEV("div",{className:"flex gap-2",children:[B0.jsxDEV("button",{onClick:N,className:"text-sm text-[#888] hover:text-white transition px-3 py-1 rounded border border-[#333]",children:"Export"},void 0,!1,void 0,this),B0.jsxDEV("button",{onClick:()=>R(!q),className:"text-sm text-[#888] hover:text-white transition px-3 py-1 rounded border border-[#333]",children:q?"View":"Edit"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),B0.jsxDEV("div",{className:"p-6",children:q?B0.jsxDEV("textarea",{value:L,onChange:(w)=>_(w.target.value),rows:20,className:"w-full bg-[#0a0a0a] border border-[#222] rounded px-3 py-2 focus:outline-none focus:border-[#f97316] font-mono text-sm"},void 0,!1,void 0,this):B0.jsxDEV("pre",{className:"bg-[#0a0a0a] border border-[#222] rounded p-4 font-mono text-sm overflow-auto max-h-[60vh] whitespace-pre-wrap",children:Y.content},void 0,!1,void 0,this)},void 0,!1,void 0,this),B0.jsxDEV("div",{className:"p-6 border-t border-[#1a1a1a] flex justify-between",children:[B0.jsxDEV("div",{className:"text-xs text-[#555]",children:Y.source!=="local"&&Y.source_url&&B0.jsxDEV("a",{href:Y.source_url,target:"_blank",rel:"noopener noreferrer",className:"text-[#f97316] hover:underline",children:"View source →"},void 0,!1,void 0,this)},void 0,!1,void 0,this),B0.jsxDEV("div",{className:"flex gap-3",children:[B0.jsxDEV("button",{onClick:U,className:"px-4 py-2 text-[#888] hover:text-white transition",children:"Close"},void 0,!1,void 0,this),q&&B0.jsxDEV("button",{onClick:F,disabled:T,className:"bg-[#f97316] hover:bg-[#fb923c] disabled:opacity-50 text-black px-4 py-2 rounded font-medium transition",children:T?"Saving...":"Save Changes"},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 E4=q0(k1(),1);var x0=q0(J1(),1);function WO(Y){let G=Y.category==="LLM",U=Y.category==="TOOL",O=Y.level==="error",q=Y.data?.input_tokens||0,R=Y.data?.output_tokens||0;return{llm_calls:G?1:0,tool_calls:U?1:0,errors:O?1:0,input_tokens:q,output_tokens:R}}function J2(){let{events:Y}=kQ(),{currentProjectId:G,currentProject:U}=g4(),{authFetch:O}=P1(),[q,R]=E4.useState(null),[L,_]=E4.useState([]),[T,I]=E4.useState([]),[F,N]=E4.useState(!0),[w,k]=E4.useState({level:"",agent_id:""}),[v,E]=E4.useState(new Set(["DATABASE"])),[D,C]=E4.useState([]),[V,m]=E4.useState(null),a=E4.useRef(new Set),[c,u]=E4.useState(new Set),Q0=E4.useRef(new Set);E4.useEffect(()=>{(async()=>{try{let v0=await(await O("/api/agents")).json();C(v0.agents||[])}catch(P0){console.error("Failed to fetch agents:",P0)}})()},[O]);let o=E4.useMemo(()=>{if(G===null)return D;if(G==="unassigned")return D.filter((d)=>!d.projectId);return D.filter((d)=>d.projectId===G)},[D,G]),t=E4.useMemo(()=>new Set(o.map((d)=>d.id)),[o]),l=async()=>{N(!0);try{let d=G==="unassigned"?"null":G||"",P0=new URLSearchParams;if(d)P0.set("project_id",d);let X1=await(await O(`/api/telemetry/stats${P0.toString()?`?${P0}`:""}`)).json();R(X1.stats);let r0=new URLSearchParams;if(w.level)r0.set("level",w.level);if(w.agent_id)r0.set("agent_id",w.agent_id);if(d)r0.set("project_id",d);r0.set("limit","100");let L0=(await(await O(`/api/telemetry/events?${r0}`)).json()).events||[];_(L0),a.current=new Set(L0.map((h4)=>h4.id));let a0=new URLSearchParams;if(a0.set("group_by","agent"),d)a0.set("project_id",d);let q4=await(await O(`/api/telemetry/usage?${a0}`)).json();I(q4.usage||[])}catch(d){console.error("Failed to fetch telemetry:",d)}N(!1)};E4.useEffect(()=>{l();let d=setInterval(l,60000);return()=>clearInterval(d)},[w,G,O]);let p=E4.useMemo(()=>{if(!q)return null;let d=0,P0=0,v0=0,X1=0,r0=0,V0=0;for(let H1 of Y)if(!a.current.has(H1.id)){d++;let L0=WO(H1);P0+=L0.llm_calls,v0+=L0.tool_calls,X1+=L0.errors,r0+=L0.input_tokens,V0+=L0.output_tokens}return{total_events:q.total_events+d,total_llm_calls:q.total_llm_calls+P0,total_tool_calls:q.total_tool_calls+v0,total_errors:q.total_errors+X1,total_input_tokens:q.total_input_tokens+r0,total_output_tokens:q.total_output_tokens+V0}},[q,Y]),i=E4.useMemo(()=>{let d=new Map;for(let P0 of T)d.set(P0.agent_id,{...P0});for(let P0 of Y)if(!a.current.has(P0.id)){let v0=WO(P0),X1=d.get(P0.agent_id);if(X1)X1.llm_calls+=v0.llm_calls,X1.tool_calls+=v0.tool_calls,X1.errors+=v0.errors,X1.input_tokens+=v0.input_tokens,X1.output_tokens+=v0.output_tokens;else d.set(P0.agent_id,{agent_id:P0.agent_id,llm_calls:v0.llm_calls,tool_calls:v0.tool_calls,errors:v0.errors,input_tokens:v0.input_tokens,output_tokens:v0.output_tokens})}return Array.from(d.values())},[T,Y]),Z0=E4.default.useMemo(()=>{let d=Y;if(G!==null)d=d.filter((r0)=>t.has(r0.agent_id));if(w.agent_id)d=d.filter((r0)=>r0.agent_id===w.agent_id);if(v.size>0)d=d.filter((r0)=>!v.has(r0.category));if(w.level)d=d.filter((r0)=>r0.level===w.level);let P0=L;if(v.size>0)P0=P0.filter((r0)=>!v.has(r0.category));let v0=new Set(d.map((r0)=>r0.id)),X1=[...d];for(let r0 of P0)if(!v0.has(r0.id))X1.push(r0),v0.add(r0.id);return X1.sort((r0,V0)=>new Date(V0.timestamp).getTime()-new Date(r0.timestamp).getTime()),X1.slice(0,100)},[Y,L,w,v,G,t]);E4.useEffect(()=>{let d=[];for(let P0 of Y)if(!Q0.current.has(P0.id))Q0.current.add(P0.id),d.push(P0.id);if(d.length>0)u((P0)=>{let v0=new Set(P0);return d.forEach((X1)=>v0.add(X1)),v0}),setTimeout(()=>{u((P0)=>{let v0=new Set(P0);return d.forEach((X1)=>v0.delete(X1)),v0})},5000)},[Y]);let I0=(d)=>{return D.find((v0)=>v0.id===d)?.name||d},F0=(d)=>{if(d>=1e6)return(d/1e6).toFixed(1)+"M";if(d>=1000)return(d/1000).toFixed(1)+"K";return d.toString()},Q1={debug:"text-[#555]",info:"text-blue-400",warn:"text-yellow-400",error:"text-red-400"},W1={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"},X0=["LLM","TOOL","CHAT","TASK","MEMORY","MCP","SYSTEM","DATABASE","ERROR"],U0=(d)=>{E((P0)=>{let v0=new Set(P0);if(v0.has(d))v0.delete(d);else v0.add(d);return v0})},_0=[{value:"",label:"All Agents"},...o.map((d)=>({value:d.id,label:d.name}))],J0=[{value:"",label:"All Levels"},{value:"debug",label:"Debug"},{value:"info",label:"Info"},{value:"warn",label:"Warn"},{value:"error",label:"Error"}];return x0.jsxDEV("div",{className:"flex-1 overflow-auto p-6",children:x0.jsxDEV("div",{children:[x0.jsxDEV("div",{className:"mb-6",children:[x0.jsxDEV("div",{className:"flex items-center gap-3 mb-1",children:[U&&x0.jsxDEV("span",{className:"w-3 h-3 rounded-full",style:{backgroundColor:U.color}},void 0,!1,void 0,this),x0.jsxDEV("h1",{className:"text-2xl font-semibold",children:G===null?"Telemetry":G==="unassigned"?"Telemetry - Unassigned":`Telemetry - ${U?.name||""}`},void 0,!1,void 0,this)]},void 0,!0,void 0,this),x0.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),p&&x0.jsxDEV("div",{className:"grid grid-cols-2 md:grid-cols-3 lg:grid-cols-6 gap-4 mb-6",children:[x0.jsxDEV(uQ,{label:"Events",value:F0(p.total_events)},void 0,!1,void 0,this),x0.jsxDEV(uQ,{label:"LLM Calls",value:F0(p.total_llm_calls)},void 0,!1,void 0,this),x0.jsxDEV(uQ,{label:"Tool Calls",value:F0(p.total_tool_calls)},void 0,!1,void 0,this),x0.jsxDEV(uQ,{label:"Errors",value:F0(p.total_errors),color:"red"},void 0,!1,void 0,this),x0.jsxDEV(uQ,{label:"Input Tokens",value:F0(p.total_input_tokens)},void 0,!1,void 0,this),x0.jsxDEV(uQ,{label:"Output Tokens",value:F0(p.total_output_tokens)},void 0,!1,void 0,this)]},void 0,!0,void 0,this),i.length>0&&x0.jsxDEV("div",{className:"mb-6",children:[x0.jsxDEV("h2",{className:"text-lg font-medium mb-3",children:"Usage by Agent"},void 0,!1,void 0,this),x0.jsxDEV("div",{className:"bg-[#111] border border-[#1a1a1a] rounded-lg overflow-hidden",children:x0.jsxDEV("table",{className:"w-full text-sm",children:[x0.jsxDEV("thead",{children:x0.jsxDEV("tr",{className:"border-b border-[#1a1a1a] text-[#666]",children:[x0.jsxDEV("th",{className:"text-left p-3",children:"Agent"},void 0,!1,void 0,this),x0.jsxDEV("th",{className:"text-right p-3",children:"LLM Calls"},void 0,!1,void 0,this),x0.jsxDEV("th",{className:"text-right p-3",children:"Tool Calls"},void 0,!1,void 0,this),x0.jsxDEV("th",{className:"text-right p-3",children:"Input Tokens"},void 0,!1,void 0,this),x0.jsxDEV("th",{className:"text-right p-3",children:"Output Tokens"},void 0,!1,void 0,this),x0.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),x0.jsxDEV("tbody",{children:i.map((d)=>x0.jsxDEV("tr",{className:"border-b border-[#1a1a1a] last:border-0",children:[x0.jsxDEV("td",{className:"p-3 font-medium",children:I0(d.agent_id)},void 0,!1,void 0,this),x0.jsxDEV("td",{className:"p-3 text-right text-[#888]",children:F0(d.llm_calls)},void 0,!1,void 0,this),x0.jsxDEV("td",{className:"p-3 text-right text-[#888]",children:F0(d.tool_calls)},void 0,!1,void 0,this),x0.jsxDEV("td",{className:"p-3 text-right text-[#888]",children:F0(d.input_tokens)},void 0,!1,void 0,this),x0.jsxDEV("td",{className:"p-3 text-right text-[#888]",children:F0(d.output_tokens)},void 0,!1,void 0,this),x0.jsxDEV("td",{className:"p-3 text-right",children:d.errors>0?x0.jsxDEV("span",{className:"text-red-400",children:d.errors},void 0,!1,void 0,this):x0.jsxDEV("span",{className:"text-[#444]",children:"0"},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},d.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),x0.jsxDEV("div",{className:"flex flex-wrap items-center gap-3 mb-4",children:[x0.jsxDEV("div",{className:"w-44",children:x0.jsxDEV(V5,{value:w.agent_id,options:_0,onChange:(d)=>k({...w,agent_id:d}),placeholder:"All Agents"},void 0,!1,void 0,this)},void 0,!1,void 0,this),x0.jsxDEV("div",{className:"flex flex-wrap items-center gap-1.5 flex-1",children:X0.map((d)=>{let P0=v.has(d),v0=W1[d]||"bg-[#222] text-[#888] border-[#333]";return x0.jsxDEV("button",{onClick:()=>U0(d),className:`px-2 py-0.5 rounded text-xs border transition-all ${P0?"bg-[#1a1a1a] text-[#555] border-[#333] opacity-50":v0}`,children:d},d,!1,void 0,this)})},void 0,!1,void 0,this),x0.jsxDEV("div",{className:"flex items-center gap-2",children:[x0.jsxDEV("div",{className:"w-36",children:x0.jsxDEV(V5,{value:w.level,options:J0,onChange:(d)=>k({...w,level:d}),placeholder:"All Levels"},void 0,!1,void 0,this)},void 0,!1,void 0,this),x0.jsxDEV("button",{onClick:l,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),x0.jsxDEV("div",{className:"bg-[#111] border border-[#1a1a1a] rounded-lg",children:[x0.jsxDEV("div",{className:"p-3 border-b border-[#1a1a1a] flex items-center justify-between",children:[x0.jsxDEV("h2",{className:"font-medium",children:"Recent Events"},void 0,!1,void 0,this),Y.length>0&&x0.jsxDEV("span",{className:"text-xs text-[#666]",children:[Y.length," new"]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),F&&Z0.length===0?x0.jsxDEV("div",{className:"p-8 text-center text-[#666]",children:"Loading..."},void 0,!1,void 0,this):Z0.length===0?x0.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):x0.jsxDEV("div",{className:"divide-y divide-[#1a1a1a]",children:Z0.map((d)=>{let P0=c.has(d.id);return x0.jsxDEV("div",{className:`p-3 hover:bg-[#0a0a0a] cursor-pointer transition-all duration-500 ${P0?"bg-green-500/5":""}`,style:{animation:P0?"slideIn 0.3s ease-out":void 0},onClick:()=>m(V===d.id?null:d.id),children:x0.jsxDEV("div",{className:"flex items-start gap-3",children:[x0.jsxDEV("span",{className:`px-2 py-0.5 rounded text-xs border transition-colors duration-300 ${W1[d.category]||"bg-[#222] text-[#888] border-[#333]"}`,children:d.category},void 0,!1,void 0,this),x0.jsxDEV("div",{className:"flex-1 min-w-0",children:[x0.jsxDEV("div",{className:"flex items-center gap-2",children:[x0.jsxDEV("span",{className:"font-medium text-sm",children:d.type},void 0,!1,void 0,this),x0.jsxDEV("span",{className:`text-xs ${Q1[d.level]||"text-[#666]"}`,children:d.level},void 0,!1,void 0,this),d.duration_ms&&x0.jsxDEV("span",{className:"text-xs text-[#555]",children:[d.duration_ms,"ms"]},void 0,!0,void 0,this),x0.jsxDEV("span",{className:`w-1.5 h-1.5 rounded-full bg-green-400 transition-opacity duration-1000 ${P0?"opacity-100":"opacity-0"}`},void 0,!1,void 0,this)]},void 0,!0,void 0,this),x0.jsxDEV("div",{className:"text-xs text-[#555] mt-1",children:[I0(d.agent_id)," · ",new Date(d.timestamp).toLocaleString()]},void 0,!0,void 0,this),d.error&&x0.jsxDEV("div",{className:"text-xs text-red-400 mt-1 font-mono",children:d.error},void 0,!1,void 0,this),V===d.id&&d.data&&Object.keys(d.data).length>0&&x0.jsxDEV("pre",{className:"text-xs text-[#666] mt-2 p-2 bg-[#0a0a0a] rounded overflow-x-auto",children:JSON.stringify(d.data,null,2)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)},d.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 uQ({label:Y,value:G,color:U}){return x0.jsxDEV("div",{className:"bg-[#111] border border-[#1a1a1a] rounded-lg p-4",children:[x0.jsxDEV("div",{className:"text-[#666] text-xs mb-1",children:Y},void 0,!1,void 0,this),x0.jsxDEV("div",{className:`text-2xl font-semibold ${U==="red"?"text-red-400":""}`,children:G},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}var y8=q0(k1(),1);var j0=q0(J1(),1),Yk={get:"#61affe",post:"#49cc90",put:"#fca130",delete:"#f93e3e",patch:"#50e3c2"};function OO(){let{authFetch:Y}=P1(),[G,U]=y8.useState(null),[O,q]=y8.useState(!0),[R,L]=y8.useState(new Set),[_,T]=y8.useState(null),[I,F]=y8.useState(!1);y8.useEffect(()=>{k()},[]);async function N(){if(!G)return;try{await navigator.clipboard.writeText(JSON.stringify(G,null,2)),F(!0),setTimeout(()=>F(!1),2000)}catch(c){console.error("Failed to copy:",c)}}function w(){if(!G)return;let c=new Blob([JSON.stringify(G,null,2)],{type:"application/json"}),u=URL.createObjectURL(c),Q0=document.createElement("a");Q0.href=u,Q0.download="apteva-openapi.json",Q0.click(),URL.revokeObjectURL(u)}async function k(){try{let c=await Y("/api/openapi");if(c.ok){let u=await c.json();U(u)}}catch(c){console.error("Failed to load OpenAPI spec:",c)}finally{q(!1)}}function v(c){L((u)=>{let Q0=new Set(u);if(Q0.has(c))Q0.delete(c);else Q0.add(c);return Q0})}function E(c,u=0){if(!c)return"{}";if(u>2)return"...";if(c.$ref)return c.$ref.split("/").pop()||"Object";if(c.type==="array")return`${E(c.items,u+1)}[]`;if(c.type==="object"&&c.properties){let Q0=Object.entries(c.properties).slice(0,3).map(([t,l])=>`${t}: ${l.type||"any"}`).join(", "),o=Object.keys(c.properties).length>3?", ...":"";return`{ ${Q0}${o} }`}return c.type||"any"}if(O)return j0.jsxDEV("div",{style:{padding:24},children:j0.jsxDEV("p",{style:{color:"#888"},children:"Loading API documentation..."},void 0,!1,void 0,this)},void 0,!1,void 0,this);if(!G)return j0.jsxDEV("div",{style:{padding:24},children:j0.jsxDEV("p",{style:{color:"#f66"},children:"Failed to load API documentation"},void 0,!1,void 0,this)},void 0,!1,void 0,this);let D=G.tags||[],C=Object.entries(G.paths);function V(c){let u=new Set;function Q0(o){if(!o)return;if(typeof o==="object"){if(o.$ref){let t=o.$ref.split("/").pop();if(t)u.add(t)}for(let t of Object.values(o))Q0(t)}}return Q0(c.requestBody),Q0(c.responses),u}function m(){if(!_||!G.components?.schemas)return Object.keys(G.components?.schemas||{});let c=new Set;for(let[u,Q0]of a)for(let[o,t]of Object.entries(Q0)){if(!["get","post","put","delete","patch"].includes(o))continue;if(t.tags?.includes(_))V(t).forEach((p)=>c.add(p))}return Array.from(c)}let a=_?C.filter(([c,u])=>Object.values(u).some((Q0)=>Q0.tags?.includes(_))):C;return j0.jsxDEV("div",{style:{padding:24,maxWidth:1000,height:"100%",overflowY:"auto"},children:[j0.jsxDEV("div",{style:{marginBottom:24},children:[j0.jsxDEV("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"flex-start",marginBottom:8},children:[j0.jsxDEV("h1",{style:{fontSize:24,fontWeight:600},children:G.info.title},void 0,!1,void 0,this),j0.jsxDEV("div",{style:{display:"flex",gap:8},children:[j0.jsxDEV("button",{onClick:N,style:{padding:"8px 16px",borderRadius:4,border:"1px solid #333",background:I?"#49cc90":"#1a1a2e",color:I?"#000":"#fff",cursor:"pointer",fontSize:12,fontFamily:"inherit"},children:I?"Copied!":"Copy JSON"},void 0,!1,void 0,this),j0.jsxDEV("button",{onClick:w,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),j0.jsxDEV("p",{style:{color:"#888",marginBottom:8},children:G.info.description.split(`
|
|
225
|
-
`)[0]},void 0,!1,void 0,this),j0.jsxDEV("p",{style:{color:"#666",fontSize:12},children:["Version: ",G.info.version]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),j0.jsxDEV("div",{style:{background:"#1a1a2e",padding:12,borderRadius:6,marginBottom:24,fontFamily:"monospace"},children:[j0.jsxDEV("span",{style:{color:"#888"},children:"Base URL: "},void 0,!1,void 0,this),j0.jsxDEV("span",{style:{color:"#61affe"},children:[window.location.origin,"/api"]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),j0.jsxDEV("div",{style:{marginBottom:24,display:"flex",flexWrap:"wrap",gap:8},children:[j0.jsxDEV("button",{onClick:()=>T(null),style:{padding:"6px 12px",borderRadius:4,border:"1px solid #333",background:_===null?"#333":"transparent",color:_===null?"#fff":"#888",cursor:"pointer",fontSize:12},children:"All"},void 0,!1,void 0,this),D.map((c)=>j0.jsxDEV("button",{onClick:()=>T(c.name),style:{padding:"6px 12px",borderRadius:4,border:"1px solid #333",background:_===c.name?"#333":"transparent",color:_===c.name?"#fff":"#888",cursor:"pointer",fontSize:12},title:c.description,children:c.name},c.name,!1,void 0,this))]},void 0,!0,void 0,this),j0.jsxDEV("div",{style:{display:"flex",flexDirection:"column",gap:8},children:a.map(([c,u])=>Object.entries(u).filter(([Q0])=>["get","post","put","delete","patch"].includes(Q0)).map(([Q0,o])=>{let t=`${Q0}:${c}`,l=R.has(t),p=Q0.toUpperCase(),i=Yk[Q0]||"#888";return j0.jsxDEV("div",{style:{border:"1px solid #333",borderRadius:6,overflow:"hidden"},children:[j0.jsxDEV("div",{onClick:()=>v(t),style:{display:"flex",alignItems:"center",gap:12,padding:"12px 16px",background:l?"#1a1a2e":"transparent",cursor:"pointer"},children:[j0.jsxDEV("span",{style:{background:i,color:"#000",padding:"4px 8px",borderRadius:4,fontSize:11,fontWeight:600,minWidth:60,textAlign:"center"},children:p},void 0,!1,void 0,this),j0.jsxDEV("span",{style:{fontFamily:"monospace",color:"#fff"},children:c},void 0,!1,void 0,this),j0.jsxDEV("span",{style:{color:"#888",flex:1,fontSize:13},children:o.summary},void 0,!1,void 0,this),j0.jsxDEV("span",{style:{color:"#666",fontSize:12},children:l?"[-]":"[+]"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),l&&j0.jsxDEV("div",{style:{padding:16,background:"#0d0d1a",borderTop:"1px solid #333"},children:[o.description&&j0.jsxDEV("p",{style:{color:"#888",marginBottom:16,fontSize:13},children:o.description},void 0,!1,void 0,this),o.parameters&&o.parameters.length>0&&j0.jsxDEV("div",{style:{marginBottom:16},children:[j0.jsxDEV("h4",{style:{fontSize:13,color:"#888",marginBottom:8},children:"Parameters"},void 0,!1,void 0,this),j0.jsxDEV("div",{style:{background:"#1a1a2e",borderRadius:4,padding:12},children:o.parameters.map((Z0)=>j0.jsxDEV("div",{style:{display:"flex",gap:12,marginBottom:8,fontSize:12},children:[j0.jsxDEV("span",{style:{color:"#61affe",minWidth:100},children:[Z0.name,Z0.required&&j0.jsxDEV("span",{style:{color:"#f66"},children:"*"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),j0.jsxDEV("span",{style:{color:"#666"},children:["(",Z0.in,")"]},void 0,!0,void 0,this),j0.jsxDEV("span",{style:{color:"#888"},children:Z0.schema?.type||"string"},void 0,!1,void 0,this),Z0.description&&j0.jsxDEV("span",{style:{color:"#666"},children:["- ",Z0.description]},void 0,!0,void 0,this)]},Z0.name,!0,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this),o.requestBody&&j0.jsxDEV("div",{style:{marginBottom:16},children:[j0.jsxDEV("h4",{style:{fontSize:13,color:"#888",marginBottom:8},children:["Request Body",o.requestBody.required&&j0.jsxDEV("span",{style:{color:"#f66"},children:" (required)"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),j0.jsxDEV("div",{style:{background:"#1a1a2e",borderRadius:4,padding:12,fontFamily:"monospace",fontSize:12,color:"#49cc90"},children:Object.entries(o.requestBody.content||{}).map(([Z0,I0])=>j0.jsxDEV("div",{children:[j0.jsxDEV("span",{style:{color:"#666"},children:[Z0,": "]},void 0,!0,void 0,this),E(I0.schema)]},Z0,!0,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this),o.responses&&j0.jsxDEV("div",{children:[j0.jsxDEV("h4",{style:{fontSize:13,color:"#888",marginBottom:8},children:"Responses"},void 0,!1,void 0,this),j0.jsxDEV("div",{style:{background:"#1a1a2e",borderRadius:4,padding:12},children:Object.entries(o.responses).map(([Z0,I0])=>{let F0=I0.content?.["application/json"]?.schema,Q1=F0?.$ref?.split("/").pop(),W1=F0?.type,X0=F0?.items?.$ref?.split("/").pop();return j0.jsxDEV("div",{style:{marginBottom:12,fontSize:12},children:[j0.jsxDEV("div",{style:{display:"flex",gap:12,marginBottom:4},children:[j0.jsxDEV("span",{style:{color:Z0.startsWith("2")?"#49cc90":"#f66",minWidth:40},children:Z0},void 0,!1,void 0,this),j0.jsxDEV("span",{style:{color:"#888"},children:I0.description},void 0,!1,void 0,this)]},void 0,!0,void 0,this),F0&&j0.jsxDEV("div",{style:{marginLeft:52,padding:"8px 12px",background:"#0d0d1a",borderRadius:4,fontFamily:"monospace"},children:Q1?j0.jsxDEV("span",{style:{color:"#61affe"},children:Q1},void 0,!1,void 0,this):W1==="array"&&X0?j0.jsxDEV("span",{style:{color:"#61affe"},children:[X0,"[]"]},void 0,!0,void 0,this):W1==="array"?j0.jsxDEV("span",{style:{color:"#888"},children:"array"},void 0,!1,void 0,this):j0.jsxDEV("span",{style:{color:"#888"},children:E(F0)},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},Z0,!0,void 0,this)})},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},t,!0,void 0,this)}))},void 0,!1,void 0,this),G.components?.schemas&&m().length>0&&j0.jsxDEV("div",{style:{marginTop:32},children:[j0.jsxDEV("h2",{style:{fontSize:18,fontWeight:600,marginBottom:16},children:["Schemas ",_&&j0.jsxDEV("span",{style:{color:"#666",fontSize:14},children:["(",_,")"]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),j0.jsxDEV("div",{style:{display:"flex",flexDirection:"column",gap:8},children:m().map((c)=>{let u=G.components.schemas[c];if(!u)return null;return j0.jsxDEV("div",{style:{border:"1px solid #333",borderRadius:6,padding:12},children:[j0.jsxDEV("h3",{style:{fontSize:14,color:"#61affe",marginBottom:8},children:c},void 0,!1,void 0,this),u.properties&&j0.jsxDEV("div",{style:{fontSize:12},children:Object.entries(u.properties).map(([Q0,o])=>j0.jsxDEV("div",{style:{display:"flex",gap:8,marginBottom:4,fontFamily:"monospace"},children:[j0.jsxDEV("span",{style:{color:"#fff",minWidth:120},children:Q0},void 0,!1,void 0,this),j0.jsxDEV("span",{style:{color:"#888"},children:[o.type||(o.$ref?o.$ref.split("/").pop():"any"),o.nullable&&" | null"]},void 0,!0,void 0,this),o.enum&&j0.jsxDEV("span",{style:{color:"#666"},children:["[",o.enum.join(" | "),"]"]},void 0,!0,void 0,this)]},Q0,!0,void 0,this))},void 0,!1,void 0,this)]},c,!0,void 0,this)})},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}var W4=q0(J1(),1);function $k(){let{isAuthenticated:Y,isLoading:G,hasUsers:U,accessToken:O,checkAuth:q}=P1(),{refreshProjects:R}=g4(),{isComplete:L,setIsComplete:_}=x9(),T=()=>{return O?{Authorization:`Bearer ${O}`}:{}},I=Y&&L===!0,{agents:F,loading:N,runningCount:w,fetchAgents:k,createAgent:v,updateAgent:E,deleteAgent:D,toggleAgent:C}=u9(I),{providers:V,configuredProviders:m,fetchProviders:a}=g9(I),c=m.filter((V0)=>V0.type==="llm"),[u,Q0]=V6.useState(!1),[o,t]=V6.useState(null),[l,p]=V6.useState("dashboard"),[i,Z0]=V6.useState(null),[I0,F0]=V6.useState(0),[Q1,W1]=V6.useState(!1);V6.useEffect(()=>{if(!I)return;let V0=async()=>{try{let L0=await fetch("/api/tasks?status=pending",{headers:T()});if(L0.ok){let a0=await L0.json();F0(a0.count||0)}}catch{}};V0();let H1=setInterval(V0,15000);return()=>clearInterval(H1)},[I,O]);let[X0,U0]=V6.useState({name:"",model:"",provider:"",systemPrompt:"You are a helpful assistant.",features:{...h9},mcpServers:[],skills:[]});V6.useEffect(()=>{if(c.length>0&&!X0.provider){let V0=c[0],H1=V0.models.find((L0)=>L0.recommended)?.value||V0.models[0]?.value||"";U0((L0)=>({...L0,provider:V0.id,model:H1}))}},[c,X0.provider]),V6.useEffect(()=>{if(o){let V0=F.find((H1)=>H1.id===o.id);if(V0)t(V0);else t(null)}},[F,o]);let _0=(V0)=>{let H1=V.find((a0)=>a0.id===V0),L0=H1?.models.find((a0)=>a0.recommended)?.value||H1?.models[0]?.value||"";U0((a0)=>({...a0,provider:V0,model:L0}))},J0=async()=>{if(!X0.name)return;await v(X0),await R();let V0=c[0],H1=V0?.models.find((L0)=>L0.recommended)?.value||V0?.models[0]?.value||"";U0({name:"",model:H1,provider:V0?.id||"",systemPrompt:"You are a helpful assistant.",features:{...h9},mcpServers:[],skills:[]}),Q0(!1)},d=async(V0,H1)=>{H1?.stopPropagation(),Z0(null);let L0=await C(V0);if(L0.error)Z0(L0.error)},P0=async(V0,H1)=>{if(H1?.stopPropagation(),o?.id===V0)t(null);await D(V0),await R()},v0=(V0)=>{t(V0),Z0(null),p("agents")},X1=(V0)=>{p(V0),t(null)},r0=()=>{_(!0),a(),q()};if(G||U===null)return W4.jsxDEV(bz,{fullScreen:!0},void 0,!1,void 0,this);if(!U)return W4.jsxDEV(uZ,{onComplete:r0,needsAccount:!0},void 0,!1,void 0,this);if(!Y)return W4.jsxDEV(O3,{},void 0,!1,void 0,this);if(L===null)return W4.jsxDEV(bz,{fullScreen:!0},void 0,!1,void 0,this);if(!L)return W4.jsxDEV(uZ,{onComplete:r0,needsAccount:!1},void 0,!1,void 0,this);return W4.jsxDEV("div",{className:"h-screen bg-[#0a0a0a] text-[#e0e0e0] font-mono flex flex-col overflow-hidden",children:[W4.jsxDEV(U3,{onMenuClick:()=>W1(!0)},void 0,!1,void 0,this),i&&W4.jsxDEV(W3,{message:i,onDismiss:()=>Z0(null)},void 0,!1,void 0,this),W4.jsxDEV("div",{className:"flex flex-1 overflow-hidden",children:[W4.jsxDEV(K3,{route:l,agentCount:F.length,taskCount:I0,onNavigate:X1,isOpen:Q1,onClose:()=>W1(!1)},void 0,!1,void 0,this),W4.jsxDEV("main",{className:"flex-1 overflow-hidden flex",children:[l==="settings"&&W4.jsxDEV(_3,{},void 0,!1,void 0,this),l==="agents"&&W4.jsxDEV(w3,{agents:F,loading:N,selectedAgent:o,providers:V,onSelectAgent:v0,onCloseAgent:()=>t(null),onToggleAgent:d,onDeleteAgent:P0,onUpdateAgent:E,onNewAgent:()=>Q0(!0),canCreateAgent:c.length>0},void 0,!1,void 0,this),l==="dashboard"&&W4.jsxDEV(M3,{agents:F,loading:N,runningCount:w,configuredProviders:m,onNavigate:X1,onSelectAgent:v0},void 0,!1,void 0,this),l==="tasks"&&W4.jsxDEV(P3,{},void 0,!1,void 0,this),l==="mcp"&&W4.jsxDEV(A3,{},void 0,!1,void 0,this),l==="skills"&&W4.jsxDEV(Z2,{},void 0,!1,void 0,this),l==="telemetry"&&W4.jsxDEV(J2,{},void 0,!1,void 0,this),l==="api"&&W4.jsxDEV(OO,{},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),u&&W4.jsxDEV(N3,{form:X0,providers:V,configuredProviders:m,onFormChange:U0,onProviderChange:_0,onCreate:J0,onClose:()=>Q0(!1),onGoToSettings:()=>{Q0(!1),p("settings")}},void 0,!1,void 0,this),W4.jsxDEV($O,{},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}function Hk(){return W4.jsxDEV(D9,{children:W4.jsxDEV(m9,{children:W4.jsxDEV(JO,{children:W4.jsxDEV(V9,{children:W4.jsxDEV($k,{},void 0,!1,void 0,this)},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 Gk=LO.createRoot(document.getElementById("root"));Gk.render(W4.jsxDEV(Hk,{},void 0,!1,void 0,this));
|
|
226
|
-
|
|
227
|
-
//# debugId=0F6FB26E3FCD7B3364756E2164756E21
|